Questions tagged [chain]

Use the tag "method-chaining' if referring to the invocation of multiple methods against a single object. Chaining is the general idea of linking many smaller processes together to form a large process.

Method Chaining allows you to run multiple methods against an object on one line of code.

For example in Java the methods setName and setAge are chained:

Person person = new Person();        //instantiate a new person object.
person.setName("Peter").setAge(21);  //set the name, and age of object person.

First the method setName is applied to the object, then setAge.

Each method returns an object, allowing any number of calls to be chained together in a single statement.

561 questions
5
votes
2 answers

Why does Celery only run the first task in the chain?

I have a working chain, but when I add apply_async() it only executes the first task. @task(name='run_a', delay=True) def run_a(**kwargs): do_whatever(kwarg['var']) return @task(name='run_b', delay=True) def run_b(**kwargs): # ... …
GerardJP
  • 985
  • 2
  • 9
  • 20
5
votes
1 answer

Can I combine multiple certs into one without the private key?

I need to have up to date cert trust stores in many devices, so I would like to be able to combine them into on cert that I can then just push that one file. I only want to bundle the public keys of the many CA's but I do not want to add the private…
Goff
  • 343
  • 1
  • 3
  • 14
5
votes
1 answer

the feature of method Promise.prototype.chain in chrome

a method in chrome browser named Promise.prototype.chain. I cannot find any documentation about this method. Anybody know anything about it? btw can i find the documentations of google chrome for all methods in the browser?
LCB
  • 971
  • 9
  • 22
5
votes
2 answers

Chain filters in logstash

Is it possible to use logstash filters in sequence? For example I want to parse message into json then newly created field split by character. input => filter => filter => output => elasticsearch
Marcin
  • 231
  • 1
  • 6
  • 13
5
votes
2 answers

How to check completion of a pipe chain in node.js?

For example, I have this: var r = fs.createReadStream('file.txt'); var z = zlib.createGzip(); var w = fs.createWriteStream('file.txt.gz'); r.pipe(z).pipe(w); I want to do something after r.pipe(z).pipe(w) finishes. I tried something like this: var…
Mr Cold
  • 1,565
  • 2
  • 19
  • 29
5
votes
2 answers

How to add a certificate chain to a JKS

I have a certificate chain called: cert.cer with the content of: subject= ... OU=MyCA issuer= ... OU=MyCA -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- subject= ... OU=Client issuer= .. OU=MyCA -----BEGIN CERTIFICATE----- ... -----END…
My-Name-Is
  • 4,814
  • 10
  • 44
  • 84
5
votes
2 answers

dplyr: use chaining to pass variables

I'm new to dplyr and cannot figure out how to control the variables to pass through a chaining (%>%) command. Simple example: the str_sub function takes three arguments - the first is passed on through %>% but how can I get the last two?…
user3375672
  • 3,728
  • 9
  • 41
  • 70
5
votes
1 answer

Closing stream chains & try-with-resource

my first question on stackoverflow, I'm exited ;) When using stream chains it's usually good pratice to just close the last stream in the chain, since the close() operation should propagate through all streams of the chain. What would be considered…
Johnson
  • 306
  • 1
  • 15
5
votes
2 answers

AngularJS promise chain

I have my application that should open a popup ask a confirmation at the user, then make an ajax cal and close the popup. I tried to do it using a chain of promise (I've already used it, and I remember that it should work in this way), but it seems…
rascio
  • 8,968
  • 19
  • 68
  • 108
5
votes
2 answers

Chaining Hadoop MapReduce with Pipes (C++)

Does anyone know how to chain two MapReduce with Pipes API? I already chain two MapReduce in a previous project with JAVA, but today I need to use C++. Unfortunately, I haven't seen any examples in C++. Has someone already done it? Is it…
Ericswed
  • 115
  • 1
  • 5
4
votes
5 answers

jQuery: if inside a chain?

I have this if(noDelay){ $(element).find("." + options.class).remove(); } else { $(element).find("." + options.class).fadeOut().remove(); } Is there a way I could avoid repeating the sentence and only add the fadeOut() when a given condition is…
leopic
  • 2,958
  • 2
  • 27
  • 42
4
votes
2 answers

SSL Certificate - The certificate is not trusted in all web browsers

I am using zerossl.com website to generate an SSL certificate for my website developer.norght.com I successfully downloaded and installed a certificate from the zerossl.com website as per their documentation. And I am able to access…
Kaushik
  • 79
  • 1
  • 8
4
votes
1 answer

Simplify ifPresentOrElse chain

Given the code: Optional myOptional = getMyOptional(); myOptional.ifPresentOrElse( s -> Optional.ofNullable(someMap.get(s)) .ifPresentOrElse(g -> { doSomeStuff(); }, () -> doErrHandling()), …
DerBenniAusA
  • 727
  • 1
  • 7
  • 13
4
votes
2 answers

Execute Process Chain

public void ExecuteProcessChain(string[] asProcesses, string sInRedirect, string sOutRedirect) { Process p1 = new Process(); p1.StartInfo.UseShellExecute = false; p1.StartInfo.RedirectStandardOutput = true; …
Shahar Shmaram
  • 233
  • 1
  • 4
  • 10
4
votes
1 answer

CNAME chain discouraged?

Every time we make changes to our backend that requires changes to our clients DNS setup, we have to go through a lengthy process with emails, phone calls, email reminders, and so one in order to get each one to implement necessary changes. In order…
cmatofte
  • 51
  • 4