Posts

Showing posts from September, 2010

ios - NSCalendar.components().minute returning inconsistent values -

original problem encountered during post, testing , code in link below https://stackoverflow.com/questions/27339072/working-with-nsdate-components-in-swift/30822018#30822018 here minimal test-case i creating date offset particular date (self in case in nsdate() extension) using nscalendar.datebyaddingunit(..., value:x, ...) i difference "fromdate" (created date or self) "todate" (current time nsdate()) using nscalendar.components(..., fromdate, todate, ....).minute if x>0, answer in step above x-1. if x<0, answer x. x defined in step 1 above. this has potential cause bugs in applications filter events using human readable attributes such events in past 3 hrs since 180 minutes not 3 hours due behavior. this not bug in step 1 since date prints correctly seen in printout @ end of post. is there option in nscalendar.components missing or bug? here code. // // nsdatetest.swift // nsdatetestcase // // created jitendra kulkarni on 6/13...

mongoose - Mongodb database schema design issue -

i have 2 collections in mongodb database :- users , clubs user schema :- var userschema = new schema({ name: { type: string , required: true }, clubs: [ {type: mongoose.schema.types.objectid, ref: 'club'} ]}); now when user joins club , update club array . need fetch users particular club . therefore creating club schema :- var clubschema = new schema({ clubname : { type: string , unique: true , required: true }, members : [ {type: mongoose.schema.types.objectid, ref: 'user' , default: [] } ]}); my question : right way , or should maintain club information @ user collection ? maybe need optimize query related fetching users belonging club. it's quite hard what's "the right way" honest, case case depending on application queries , architecture. i have seen people designed above; solving many-to-many relationships using reference in both collection. work case queries above: db.user.find({...

php - MySQLi queries runs on each browser refresh -

when run code, "insert aks_balance_history" query , "update aks_account" query runs again , again.also database getting updated on each refresh, while "update aks_counter" runs once (as required). stuck in code please help. if(isset($_post['update_btn_counter'])) { mysqli_query($link,"insert aks_balance_history(bh_amount,bh_from,bh_to,bh_reason) values('".$_post["used_balance"]."','counter cash','".$_post["select_account"]."','".$_post["reason"]."') "); mysqli_query($link,"update aks_counter set counter_balance = counter_balance - '$_post[used_balance]' counter_id='0' "); mysqli_query($link,"update aks_account set account_balance = account_balance + '$_post[used_balance]' account_title='$_post[select_account]' "); } sure, because ...

c# - How to map ICollection<Type> to extending class -

i have created data model looks this: // base data item class public class dataitem { [key] public int id { get; set; } public string name { get; set; } [required] public int dataitemgroupid { get; set; } public virtual dataitemgroup dataitemgroup { get; set; } } // extending data item class public class specificdataitem : dataitem { public string extrafield { get; set; } } // class grouping of data items may extended or not. public class dataitemgroup { [key] public int id { get; set; } public string name { get; set; } public virtual icollection<dataitem> dataitems { get; set; } public virtual icollection<extendeddataitem> extendeddataitems { get; set; } } my issues when use entity frameworks lazy loading, dataitemgroup.dataitems populated items, including extendeddataitems, dataitemgroup.extendeddataitems empty. i suspect missing mapping of sort, don't know should looking for. ideas on ho...

Java/Clojure BouncyCastle reports wrong key size, but key size is right -

i'm trying generate mac using iso9797 alghrythm 3. in clojure, guess i'm having more of java problem here. run code: (defn mac2 [key message] (let [engine (org.bouncycastle.crypto.engines.desedeengine.) mac (org.bouncycastle.crypto.macs.iso9797alg3mac. engine) bytes (byte-array (.getmacsize mac)) key (->bytes key) msg (->bytes e-ifd)] (prn key (count key)) (.init mac (org.bouncycastle.crypto.params.desedeparameters. key)) (.update mac msg 0 (count msg)) (.dofinal mac bytes 0) (->hex-string bytes))) and output (the exception thrown @ (.init mac ...): #<byte[] [b@65e47e28> 16 illegalargumentexception key size must 16 or 24 bytes. org.bouncycastle.crypto.engines.desedeengine.init (:-1) now see, prn ist printing put key-length, 16. bouncycastle complains, not 16 or 24 (changing key key length of 24 not either) also when run code, there no problem: (defn mac1 [key message] (let [engine (org.boun...

c# - WPF CheckedListBox SelectionMode="Multiple" not updating SelectedIndex on SelectionChanged Event -

i testing kelly elias' article on creating wpf checklistbox . i'm needing selectedindex , checkedbox text. works needed until change listbox's selectionmode "multiple" need implemented. after that, selectedindex nor selecteditem not change using selectionchanged event. these 2 properties show info of first checkedbox. however, of checkedboxes added selecteditems collection. can please assist issue? thank in advance!!! using system.collections.objectmodel; using system.componentmodel; using system.windows; using system.windows.controls; namespace jarloo { public class customer : inotifypropertychanged { private string _name; public string name { { return _name; } set { _name = value; notifypropertychanged("name"); } } public event propertychangedeventhandler propertychanged; protected void notifypropertychange...

c# - Skype4COMLIB skype.message.chat.sendmessage -

i have problem c# code trying change group chat topic not work private void button10_click(object sender, eventargs e) { skype skype = new skype(); skype.message.chat.sendmessage("/topic " + textbox9.text); } and when press button says unknown message you have attach skype skype.attach(); should make 1 global skype object , on form load should attach skype.

c# - Entity Framework throws Invalid object name -

i have db in sql server several tables. i have created class library project in vs2013. created dbcontext, added database ado.net file , created repository running queries. i have created web api2 empty project controller creating rest api. this controller calling library repository running queries, throws exception: invalid object name 'dbo.tlog' the extrange thing table exists in database. query created repository is select [extent1].[idlog] [idlog], [extent1].[description] [description], [extent1].[insertdate] [insertdate] [dbo].[tlog] [extent1] and if run in sql server works, in web project doesn't. the controller looks this: [route("api/log")] public httpresponsemessage get() { var logs = myrepository.getalllogs(); httpresponsemessage response = request.createresponse(httpstatuscode.ok, logs); return response; } the repository query is var query = log in datacontext.log select log; my connection string exists in libra...

Errors in Python 2.7 -

when given following function: n=0 a=1 while a>0: n=n+1 print n a=(1.0+2.0**(-n))-1.0 python stop @ n=53 (meaning a=0, in case). how come happens? theoretically, should never stop. i'm assuming has python's aproximation errors, "explainable"?

ios - Cell"s are not showing properly when scrolled -

i have images within collection view can select. when select image(s) wrong image cells selected. once scroll down out of view of cell cell no longer selected. how can fix issue? the imageview defined in storyboard. assets in photo library. this photocell.h file. #import <uikit/uikit.h> #import <assetslibrary/assetslibrary.h> @interface photocell : uicollectionviewcell @property(nonatomic,strong) alasset * asset; @property (nonatomic,weak) iboutlet uiimageview * photoimageview; this photocell.m file. #import "photocell.h" @interface photocell () @end @implementation photocell #pragma mark - user made method - (void) setasset:(alasset *)asset { // 2 _asset = asset; self.photoimageview.image = [uiimage imagewithcgimage:[asset thumbnail]]; } #pragma mark - collectionview cell method -(void)prepareforreuse { } -(uicollectionviewcell *)collectionview:(uicollectionview *)collectionview cellforitematindexpath:(nsindexpath *)indexpath{ ...

In Java best way to convert json string with arrays to flat keys -

i have json file following structure. [ { "type":[ "blog", "article", "pressrelease" ], "states":[ "scheduled", "published" ], "roles":[ "editor", "admin" ], "actions":[ "review", "delete" ] }, { "type":[ "blog", "article", "pressrelease" ], "states":[ "draft", "review" ], "roles":[ "editor", "admin" ], "actions":[ "submit", "delete" ] }, { "type":[ "blog", "article" ], "states"...

Switch automatically between normal and insert mode in vim -

i new vim , have installed oh-my-vim , learnt these keybindings googling: jump forward word - w jump forward word - b jump end of sentence - close current file without exiting - bd undo u execute shell command ! (bang) of these typing shift + in normal mode allows me jump end of sentence , goes insert mode start typing after it. tried out shift + w , shift + b , shows similar behaviour of going insert mode start typing after use keybinding. what equivalents these keybindings not using letter? jump start of sentence - 0 redo ctrl + r jump previous line - `` hope clear in describing. thanks! it's not entirely clear asking. shift+w , shift+b not automatically enter insert mode, instead go , forth on words (vs words). if want enter insert mode, hit i . hit wi insert after word. you mention 0 , goes beginning of line. can hit i (shift+i) insert @ beginning of line. note inserts after initial whitespace on...

jquery - How to get `callback` from other element animation completion, not from self directive -

on click of element, doing animation other element (say sibling) how callback sibling scope function? here code : var myapp = angular.module('myapp', ['nganimate']); myapp.controller('count', function($scope) { $scope.flag=true; $scope.animate = function () { $scope.flag = !$scope.flag; } }); demo $animate service may used handle enter , leave callbacks. you have used ng-if show/hide content in example ng-if doesn't have hooks pass callback in. you'll have write own directive(say animated-if ) , provide custom hooks pass callbacks( animated-if-leave-callback , animated-if-enter-callback ). to fire event after ng-leave, use $animate.leave(element, scope.leaveonclick) the enter 1 bit more complicated not call callback on initial loading of directive. var callback = !oldvalue && $scope.animatedifentercallback ? $scope.animatedifentercallback : (function() {}); $animate.enter(clone, $element.pa...

Java & Apache-Camel: From direct-endpoint to file-endpoint -

i've tried build route copy files 1 directory other directory. instead of using: from(file://source-directory).to(file://destination-directory) want this: from(direct:start) .to(direct:dostuff) .to(direct:readdirectory) .to(file://destination-folder) i've done following stuff: route @component public class route extends abstractroutebuilder { @override public void configure() throws exception { from("direct:start") .bean(lookup(readdirectory.class)) .split(body()) .setheader("filename", method(lookup(createfilename.class))) .to("file:///path/to/my/output/directory/?filename=${header.filename}"); } processor @component public class readdirectory implements camelprocessorbean { @handler public immutablelist<file> apply(@header("source_dir") final string sourcedir) { final file directory = new file(sourcedir); final file[] files = directory.listfiles(); ...

concurrency - Thrust execution policy issues kernel to default stream -

Image
i designing short tutorial exhibiting various aspects , capabilities of thrust template library. unfortunately, seems there problem in code have written in order show how use copy/compute concurrency using cuda streams. my code found here, in asynchronouslaunch directory: https://github.com/gnthibault/cuda_thrust_introduction/tree/master/asynchronouslaunch here abstract of code generates problem: //stl #include <cstdlib> #include <algorithm> #include <iostream> #include <vector> #include <functional> //thrust #include <thrust/device_vector.h> #include <thrust/host_vector.h> #include <thrust/execution_policy.h> #include <thrust/scan.h> //cuda #include <cuda_runtime.h> //local #include "asynchronouslaunch.cu.h" int main( int argc, char* argv[] ) { const size_t fullsize = 1024*1024*64; const size_t halfsize = fullsize/2; //declare 1 host std::vector , initialize random values std::vector...

java - How to print even numbers in ascending order and odd numbers in descending order without using collection -

input: 10 3 1 45 67 2 56 89 22 11 69 output (what want): 2 22 56 89 69 67 45 11 3 1 i want print numbers in ascending order , odd numbers in descending order without using collection because don't know collection . me here how can print odd number in descending order able ptint till number code: import java.util.arrays; import java.util.scanner; class t { public static void main(string[] args) { // todo auto-generated method stub scanner sc = new scanner(system.in); system.out.println("enter number"); int n = sc.nextint(); int s[] = new int[n]; int i; (i = 0; < n; i++) { int e = sc.nextint(); s[i] = e; } arrays.sort(s); (int j = 0; j < n; j++) { if (s[j] % 2 == 0) { system.out.println(s[j]); } } } } code: import java.util.arrays; import java.util.scanner; class t { publ...

python - pyreport LaTeX formulae not working -

i'm trying create html report using pyreport , works single point, latex formulae not generated. here input file use testing: #$ \latex : $c = 2\cdot(a+b)$ than run pyreport -l -t html --verbose file.py , report empty . when add other comments input file, or python code, displayed within report. here output pyreport : running python script /tmp/file.py: outputing report /tmp/file.html ran script in 0.13s i'm using ubuntu , have texlive package installed. why isn't formula added report? i think have find problem. problem rst tools convert in html. in pyreport, when choose math mode, program sentence in bock .. raw:: latex in new version of rst2html, command doesnt work, it's replace by: .. math:: if use command: pyreport -l -e -t rst --verbose file.py , after rst2html file.rst > test.html you see problem. can change in pyreport code, in main.py of pyreport. (use locate find it). , replace .. raw:: latex , .. math:: t...

socket.io - cloudflare SSH and sockets: how to run them together? -

i using flexible ssl cloudflare , site now https ://www.example.com inside site, use socket.io : server = 'http://direct.example.com'; socket = io.connect(server+":1445" , {'force new connection': true }); problem got: mixed content: page @ 'https://' loaded on https, requested insecure xmlhttprequest endpoint 'http://direct.example.com:1445/socket.io/?eio=3&transport=polling&t=1434191759199-17'. so how can keep https on site , call sockets server ? (my server not have ssl: use flexible ssl cloudflare) cloudflare can't proxy websockets right other enterprise customer (we're rolling out broader support later year). unless going on 1 of these ports support right now, needs on subdomain don't touch (this mean ssl wouldn't work).

ruby - Make array elements lowercase with Liquid filters for sorting -

i can't figure out how case-insesitively sort array containing strings: ["a", "c", "e", "b", "d"] ["a", "b", "c", "d", "e"] . {% assign input = "a,c,e,b,d" | split:"," %} {{ input | join: "-" }} {{ input | map: 'downcase' | join: "-" }} {{ input | map: 'downcase' | sort | join: "-" }} {{ input | map: 'length' | join: "-" }} {{ input | map: 'size' | join: "-" }} what missing map: ? expected output: a-c-e-b-d a-c-e-b-d a-b-c-d-e 1-1-1-1-1 1-1-1-1-1 actual output: a-c-e-b-d ---- ---- ---- ---- note: @ first tried map: downcase (without quotes), got no implicit conversion nil integer . ok, hack, if knows better please post answer. {% assign input = "a,c,e,b,d" | split:"," %} {% capture intermediate %}{% entry in input %}{{ entry | downc...

sorting of month in matrix in R -

Image
i have matrix in format: year month freq 1 2014 april 466 2 2015 april 59535 3 2014 august 10982 4 2015 august 0 5 2014 december 35881 6 2015 december 0 7 2014 february 17 8 2015 february 24258 9 2014 january 0 10 2015 january 22785 11 2014 july 2981 12 2015 july 0 13 2014 june 1279 14 2015 june 31356 15 2014 march 289 16 2015 march 40274 i need sort months on basis of occurrence i.e jan, feb, mar... when sort gets sorted on basis of first alphabet. used this: mat <- mat[order(mat[,1], decreasing = true), ] and looks : row.names april august december february january july june march may november october september 1 2015 59535 0 0 24258 22785 0 31356 40274 84211 0 0 0 2 2014 466 10982 35881 17 0 2981 1279 289 879 8911 ...

java - ear deployed successfully but context missing in jboss as 7 -

i migrating application oc4j app server jboss as7 app server, ear involves 3 ejb jars in 1 consist persistence.xml , using eclipse link. 2 jars not contain persistence.xml showing when trying context using below code: final hashtable<string, object> jndiproperties = new hashtable<string, object>(); jndiproperties.put(context.url_pkg_prefixes, "org.jboss.ejb.client.naming"); jndiproperties.put(context.initial_context_factory, initialcontextfactory.class.getname()); jndiproperties.put(context.provider_url, "remote://127.0.0.1:4447"); jndiproperties.put(initialcontext.security_principal, "admin"); jndiproperties.put(initialcontext.security_credentials, "password-1234"); jndiproperties .put("jboss.naming.client.connect.options.org.xnio.options.sasl_policy_noanonymous", false); jndiproperties .put("jboss.naming.client.co...

javascript - External script not working in PaperJS v0.9.22 -

i new paperjs , i'm trying include external paperscript file in html, isn't working. while inline scripting working fine. code are: html code: <!doctype html> <html> <head> <script type="text/javascript" src="js/paper.js"></script> </head> <body> <script type="text/paperscript" src = "js/myscript.js" canvas = "mycanvas" > </script> <canvas id="mycanvas" resize></canvas> paperscript code (myscript.js): // create paper.js path draw line it: var path = new path(); // give stroke color path.strokecolor = 'black'; var start = new point(100, 100); // move start , draw line there path.moveto(start); // note plus operator on point objects. // paperscript us, , more! path.lineto(start + [ 100, -50 ]); i found old link on stackoverflow says using version 0.9.10 fix problem. issue still not fixed in newer version? here's...

php - Facebook : Invalid or no certificate authority found, using bundled information -

facebook login not working in php application.i error in error log invalid or no certificate authority found, using bundled information i tried find answer here, nothing worked. enabled facebook login , created app on facebook site.curl enabled , entered proper facebook id , secret in application configuration file. problem : when click login button, facebook console opens , take permission access information on facebook. after i've done that, nothing happens , browser switches between facebook , application , after few minutes shows "two many redirects". this far, please let me know if im doing wrong, or if forget something: add in base_facebook.php curlopt_ssl_verifypeer => false curlopt_ssl_verifyhost => false create file called fb_ca_chain_bundle.crt in facebook-login folder , add content here: https://github.com/facebook/facebook-php-sdk/blob/master/src/fb_ca_chain_bundle.crt any immediate highly appreciable. thanks.

inheritance - GoLang equivalent for inheritence using interface with data and member functions -

i golang newbie pardon me if there obvious missing. have following structures: type base interface { func1() func2() common_func() } type derived1 struct { base // anonymous meaning inheritence data datumtype } type derived2 struct { base // anonymous meaning inheritence data datumtype } now want following: keep ' data datumtype ' base in way looking @ definition of base 1 can know data common structs. implement common_func() in 1 place derived structs don't need it. i tried implementing function interface fails compilation. tried create struct , inherit not finding ways that. there clean way out ? go not have inheritance. instead offers concept of embedding . in case don't need/want define base interface . make struct , define functions methods. embedding base in derived structs give them methods. type base struct{ data datumtype } func (b base) func1(){ } func (b base) func2(){ } func (b base...

Checkbox enable EditText in RecyclerView issue -

i working quiz app project. i've got recyclerview, each of them contains textview, 2 checkbox , edittext. want when checked second checkbox enable edittext. have make work. problem if checked checkbox , type in edittext on first row, when scroll down of others mirroring edittext state not checked checkbox enable edittext of row. here adapter code: public class studentadapter extends recyclerview.adapter<studentadapter.studentviewholder> { private layoutinflater inflator; private int status; typeface typeface; list<student> students = collections.emptylist(); public studentadapter(context context, list<student> students, string font) { inflator = layoutinflater.from(context); this.students = students; typeface = typeface.createfromasset(context.getassets(), font); } @override public studentviewholder oncreateviewholder(viewgroup parent, int viewtype) { view view = inflator.inflate(r...

Visual Studio 2013 Click Once With SQL Server Express 2008 R2 -

i struggling find information on if possible use command line arguments sql server 2008 r2 express when it's deployed prerequisite app. configure sql server express network connections , login password information. i thinking that objective can't achieved click once. achieve aim installshield setup project type?

actionscript 3 - How to use variables from other classes? -

so if i'm making boolean variable saying 1 class. , setting true; class 1 yes = true; and boolean variable goes class 1 class 2, , class 2 applies action. class 2 if (yes) { } how do this? can give me formula? thanks. provided a variable of type class1 , instantiated , accessible in class2 simple if (a.yes) { do_this(); } should trick.

axapta - Datepart function error in Microsoft Dynamics SQL -

Image
i trying perform sql query in microsoft dynamics ax2012, output year delivery date using datepart function. i have created class "custrerportdemo" in aot, , while attempting perform query, query out year field "deliverydate" in table "salestable". encountered error prompts: variable datepart has not been declared i understood datepart function call in sql , shouldnt need declared. hence, wondering why , how rectify issue? trying show year delivery date. therefore, if date 13/06/2016, resultant query result 2016 or 16. have attached following code. please help. public void processreport() { custtable custtable; salestable salestable; //select customers while select * custtable { //clear temporary table custreportrdptmp.clear(); //assign customer account , name custreportrdptmp.custaccount = custtable.accountnum; custreportrdptmp.name = custtable.name(); //select count of invoiced sales order of customer select ...

javascript - Spaces in equal signs -

i'm wondering there difference in performance using removing spaces before , after equal signs. 2 code snippets. first int = 0; second int i=0; i'm using first one, friend learning html/javascript told me coding inefficient. true in html/javascript? , huge bump in performance? same in c++/c# , other programming languages? , indent, said 3 spaces better tab. used code this. want know if correct. your friend bit misguided. the spaces in code make small difference in size of js file make small difference in download speed, though i'd surprised if noticeable or meaningful. the spaces unlikely make meaningful difference in time parse file. once file parsed, spaces not make difference in execution speed since not part of parsed code. if want optimize download or parse speed, way write code in readable fashion possible best maintainability , use minimizer deployed code , standard practice many web sites. give best of both worlds - maintainable, re...

javascript - Canvas Marching Squares Glitch / Scroll Integration -

i'm attempting teach myself how work canvas — , i'm in way on head — thought i'd ask if has solution issue came across. as lesson decided try start metaball idea: http://codepen.io/ge1doot/pen/rndwqb and rework metaballs stationary move upwards @ varying rates 1 scrolls down page. i sort of got working here — displays better on fiddle below. https://jsfiddle.net/l7cr46px/2/ function getscrolloffsets() { var doc = document, w = window; var x, y, docel; if ( typeof w.pageyoffset === 'number' ) { x = w.pagexoffset; y = w.pageyoffset; } else { docel = (doc.compatmode && doc.compatmode === 'css1compat')? doc.documentelement: doc.body; x = docel.scrollleft; y = docel.scrolltop; } return {x:x, y:y}; } var lava, balldata; balldata = new array(); (function() { var metablobby = metablobby || { screen: { elem: null, callbac...

Going through elements in treeset and update the sorting in Java -

i have 3 set of 3 sets , want algorithmically: for first treeset in treesets till done: dosomething(treeset) if done(treeset) { remove treeset treesets sort treesets // next treeset dosomething first treeset in treesets since change sorting want make sure sorting applied there } } what best way of doing that? simple example: treeset1 treeset2 treeset3 treeset4 go treeset1, on it, if done, remove treeset1, sort, next element become treeset4 (originally treeset2), on treeset4, not done, not remove treesert4, sort again, next treeset3, something, done, treeset3 done, sort again, again treeset4 comes in sortting, on treeset4 ..... what best practice? have sorting function works. algorithm stop once reach last element , not remove more element. i figured out iterator. after each loop, resort iterator , call next(). solved problem.

javascript - angularjs ng-repeat evaluated with ng-if -

i'm looking way ng-repeat expression. here have. <tr ng-cloak id="{{$index}}" ng-repeat-start="item in currentcontoller.items | orderby: '-time'"> <td>item.a</td> <td>item.b</td> </tr> what looking this, firstitemonly checkbox <tr ng-cloak id="{{$index}}" ng-repeat-start="item in currentcontoller.items | orderby: '-time' | if ({{firstitemonly}}) {limitto: 1}"> //this line needs added <td>item.a</td> <td>item.b</td> </tr> the key solving problem think outside of box. instead of trying use expression within ng-repeat , add expression collection itself: // create function returns relevant collection of items $scope.getitems = function() { // if first item only, return first item if (this.firstitemonly) { return this.items.slice(0, 1); } // o...

c++ - Understanding Red-Black Tree Traversal of STL multiset in GDB -

i trying understand rb-tree traversal in following gdb script define pset if $argc == 0 pset else set $tree = $arg0 set $i = 0 set $node = $tree._m_t._m_impl._m_header._m_left set $end = $tree._m_t._m_impl._m_header set $tree_size = $tree._m_t._m_impl._m_node_count if $argc == 1 printf "set " whatis $tree printf "use pset <variable_name> <element_type> see elements in set.\n" end if $argc == 2 while $i < $tree_size set $value = (void *)($node + 1) printf "elem[%u]: ", $i p *($arg1*)$value if $node._m_right != 0 set $node = $node._m_right while $node._m_left != 0 set $node = $node._m_left end else set $tmp_node = $node._m_parent ...

docusignapi - checkbox population in salesforce whenever a docusign document is signed -

is possible have checkbox populated in salesforce, whenever docusign document associated account signed? a user has option sign docusign or check box (stating - 'no signature required"), if signature on file. its whenever signs document need checkbox in salesforce populated. thanks i believe can accomplish through salesforce trigger. see similar question asked not long ago: docusign update parent field on complete that question regarding updating picklist in sfdc instead of checkbox, think logic same. , there's sample code trigger.