Skip to content

Instantly share code, notes, and snippets.

View tomblench's full-sized avatar

Tom Blench tomblench

View GitHub Profile
Dear David,
Thank you for your interest in our two in one biscuit packaging system and your observations regarding the orientation of the last biscuit in the Jaffa pack.
The older Sigpack HSS packaging machines are fed by traditional slug (= shingled stack) building units that have the facility to turn the last product in each pack to ensure that the chocolate side is not facing the heat sealed end of the pack.
---
openapi: "3.0.0"
externalDocs:
description: Test
url: http://test.com/test
info:
version: 0.0.1
title: Test
license:
name: Test
diff --git a/CDTDatastore/query/CDTDatastore+Query.m b/CDTDatastore/query/CDTDatastore+Query.m
index 3ca9beb..a3ee2a2 100644
--- a/CDTDatastore/query/CDTDatastore+Query.m
+++ b/CDTDatastore/query/CDTDatastore+Query.m
@@ -31,7 +31,7 @@
// constructed. This association is cleared in
// [CDTQIndexManager dealloc].
objc_setAssociatedObject(self, @selector(CDTQManager), m,
- OBJC_ASSOCIATION_ASSIGN);
+ OBJC_ASSOCIATION_RETAIN);
### 1. Steps to reproduce and a small code sample that demonstrates the issue
<!--
// Example: a code sample which creates a document in the local document store.
DocumentStore documentStore;
// ...
DocumentRevision doc = new DocumentRevision();
doc.setBody(DocumentBodyFactory.create("{\"_foo\":\"bar\"}".getBytes()));
documentStore.database().create(doc);
-->
NSError *error;
CDTDatastoreManager *manager = [[CDTDatastoreManager alloc] initWithDirectory:@"/tmp" error:&error];
CDTDatastore *store = [manager datastoreNamed:@"my_ds" error:&error];
CDTDocumentRevision *rev = [CDTDocumentRevision revision];
rev.body = [@{ @"hello" : @"world" } mutableCopy];
[store createDocumentFromRevision:rev error:&error];
[store ensureIndexed:@[@"hello"]];
NSLog(@"Indexes: %@", [store listIndexes]);
public class Guff {
public static void doit() {
ArrayList<String> list = new ArrayList<String>();
list.add("bob");
list.add("rita");
list.add("sue");
list.add("rita");
System.out.println(dedup(list));
}

@mansura-habiba you should use db.replicator() as per the example shown here:

https://static.javadoc.io/com.cloudant/cloudant-client/2.12.0/com/cloudant/client/api/Replicator.html

Note that this call is asynchronous so you will probably want to poll the result if you have any logic which is dependent on the replication completing or erroring.

Sorry for the confusion, we have two similarly named methods for replicating:

import org.junit.jupiter.api.extension.AfterAllCallback;
import org.junit.jupiter.api.extension.AfterEachCallback;
import org.junit.jupiter.api.extension.AfterTestExecutionCallback;
import org.junit.jupiter.api.extension.BeforeAllCallback;
import org.junit.jupiter.api.extension.BeforeEachCallback;
import org.junit.jupiter.api.extension.BeforeTestExecutionCallback;
import org.junit.jupiter.api.extension.Extension;
import org.junit.jupiter.api.extension.ExtensionContext;
public class MultiExtension implements Extension, AfterAllCallback, AfterEachCallback,
16:13:02 in CDTDatastore$ appledoc --keep-intermediate-files --project-name CDTDatastore --project-company Cloudant -o build/docs --company-id com.cloudant CDTDatastore
appledoc version: 2.2 (build 963)
WARN | unsupported typedef enum at CDTDefines.h@23!
WARN | unsupported typedef enum at TD_View.h@50!
WARN | unsupported typedef enum at TDCollateJSON.m@37!
WARN | TDJSON: Merged class's TDJSON superclass is different from current!
WARN | unsupported typedef enum at Logging.m@35!
WARN | TDRemoteRequest.h@33: Description for parameter 'session' missing for -[TDRemoteRequest initWithSession:method:URL:body:requestHeaders:onCompletion:]!
WARN | TDRemoteRequest.h@33: Description for parameter 'method' missing for -[TDRemoteRequest initWithSession:method:URL:body:requestHeaders:onCompletion:]!
[Fri, 03 Nov 2017 13:43:28 GMT] [info] [<0.17725.6>] 127.0.0.1 - - PUT /a-19e91f23-69c9-4926-85c6-fc95b716a573? 201
[Fri, 03 Nov 2017 13:43:28 GMT] [info] [<0.17725.6>] 127.0.0.1 - - DELETE /a-19e91f23-69c9-4926-85c6-fc95b716a573? 200
[Fri, 03 Nov 2017 13:43:28 GMT] [info] [<0.17735.6>] 127.0.0.1 - - PUT /a-6c1c767f-867f-4782-b48f-7d7a0336c096? 201
[Fri, 03 Nov 2017 13:43:28 GMT] [info] [<0.17735.6>] 127.0.0.1 - - PUT /a-6c1c767f-867f-4782-b48f-7d7a0336c096/PutAttachmentTests? 201
[Fri, 03 Nov 2017 13:43:28 GMT] [info] [<0.17735.6>] 127.0.0.1 - - PUT /a-6c1c767f-867f-4782-b48f-7d7a0336c096/PutAttachmentTests/myAwesomeAttachment?rev=1-fe99b01854d7fc6b4a3771fe2c060347 201
[Fri, 03 Nov 2017 13:43:28 GMT] [info] [<0.17735.6>] 127.0.0.1 - - DELETE /a-6c1c767f-867f-4782-b48f-7d7a0336c096? 200
[Fri, 03 Nov 2017 13:43:28 GMT] [info] [<0.17737.6>] 127.0.0.1 - - PUT /a-31299b4c-41e8-4e66-8563-70b6b6243379? 201
[Fri, 03 Nov 2017 13:43:28 GMT] [info] [<0.17737.6>] 127.0.0.1 - - PUT /a-31299b4c-41e8-4e66-8563-70b6b6243379