Posts

Showing posts from February, 2010

java - Converting a Base Ten Number to Any Number -

there several similar threads around here pose question mine unable find solution works relatively simply. wondering if guys had ideas. i have code take base ten number , convert number in base 1 11. it's when start getting things hexadecimal format struggle because need letters in addition numbers base. i'm sure solution pretty simple escaping me. appreciated. import static java.lang.system.*; public class tentoany { private int base10; private int newbase; public tentoany(int ten, int base) { base10 = ten; newbase = base; } public void setnums(int ten, int base) { base10 = ten; newbase = base; } public string getnewnum() { string newnum=""; int original = base10; while(original > 0) { newnum = original%newbase + newnum; original = original/newbase; } return newnum; } public string tostring(...

sitecore - Server Error "Object reference not set to an instance of an object" after insert from branch -

everything works correctly after sitecore update 7.0 7.2 see following server error when creating site branch [nullreferenceexception: object reference not set instance of object.] sitecore.nexus.data.datacommands.addfromtemplatecommand.(item , item , string , id , id , string , safedictionary`2 ) +420 sitecore.nexus.data.datacommands.addfromtemplatecommand.(item , item , string , id , id , string , safedictionary`2 ) +856 sitecore.nexus.data.datacommands.addfromtemplatecommand.(string , item , item , id ) +569 sitecore.data.engines.datacommands.addfromtemplatecommand.doexecute() +113 sitecore.data.engines.enginecommand`2.execute() +121 sitecore.data.engines.dataengine.addfromtemplate(string itemname, id templateid, item destination, id newid) +101 sitecore.data.managers.itemprovider.addfromtemplate(string itemname, id templateid, item destination, id newid) +363 sitecore.data.managers.itemmanager.addfromtemplate(string itemname, id templateid, item de...

java - rest services- pass parameters in key value format -

here controller: @restcontroller @requestmapping("/warning/data") public class earlywarningdatacontroller { @requestmapping(value = "/get/{soeid}/{gfcid}/{expressioncode}/{fiscalyear}/{timeperiod}", method = requestmethod.get) public string getearlywarningdata(@pathvariable("soeid") string soeid, @pathvariable("gfcid") string[] gfcid, @pathvariable("expressioncode") string expressioncode, @pathvariable("fiscalyear") long fiscalyear, @pathvariable("timeperiod") string timeperiod) throws ioexception { sysout(""); } when hit url htpt://xyz:8080/earlywarning/warning/data/get/samplesoeid/1005771621/cat_total_rev/2012/annual it works fine. but want send url like: htpt://xyz:8080/earlywarning/warning/data/get/soeid=samplesoeid/gfcid=1005771621/expressioncode=cat_total_rev/fiscalyear=2012/timep...

android - How to set ImageView right to the bottom? -

Image
i've got next template: <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" android:background="@drawable/fight" tools:context="ru.net.babobka.fightactivity" > <imageview android:id="@+id/imageview2" android:layout_width="150dp" android:layout_height="180dp" android:layout_alignparentbottom="true" android:layout_alignparentright...

android - Deserialise JSON with dynamic field -

i'm loading json dynamic field api using retrofit on android. this example: { "success": true, "messages": { "success": [ "success_message" ], "error": { "specific_error": { … } } }, "session": { "id": "fj4qewqrewq43fdsa", "expire": null, "yii_csrf_token": "fda432fdafasd78978fdas" }, "metadata": {…} } the structure of messages object can change every request. there success field , not. same goes error field. error field can array object several other objects , fields inside. does make sense deserialise messages field different pojos , if how that? make more sense keep field json object , values object when needed?

d3.js - D3 - Make Axes Include Origin at (0,0) -

the following scatterplot example has origin @ (2, 4) truncating graph even though range specifies zero. .range([0, width]); .range([height, 0]); http://bl.ocks.org/mbostock/3887118 question ----> how make origin start @ (0,0) regardless of data similar following example: http://bl.ocks.org/hunzy/11110940 also same range .range([0, width]); .range([height, 0]); does help? y.domain([0, d3.max(data, function (d) { return d.y; })]) .nice(); x.domain([0, d3.max(data, function (d) { return d.x; })]) .nice();

Asterisk dialplan get dynamic the technology of extension? -

i ask if possible retrieve dynamic technology(etc sip,zap...) of extension inside on dialplan script? need guide look. thanks attention , time! i manage create php, information need asterisk db, call curl application inside dialplan , can retrieve technology of extension dynamic.

Convert json into tree structure using javascript, client side -

Image
i want convert following json code have collected using requests tree structure "rules": [{ "name": "rule1", "isfirst": true, "conditions": [{ "outcometrue": { "gotorule": "rule2" }, "outcomefalse": { "changestatus": { "gotorule": "26" } }, "outcomeerror": { "changestatus": { "gotorule": "27" } }, }], },{ "name": "rule2", "isfirst": false, "conditions": [{ "name": "history check idnumber", "outcometrue": { "gotorule": "27" }, "outcomefalse": { "gotorule": "rule3" }, "outcomeerror": { "gotorule": "26" }, }], }] into this. normal graph this: ...

meteor - Why Is Wrong Spacebars #if Block Executed? -

i trying write if else statement in spacebars template inside meteor app shown below, unfortunately getting 3 blocks processed though 1 returning true, wondering if can please tell me doing wrong / missing here , how resolve it? thanks <template name="header"> <nav class="navbar navbar-default navbar-static-top" role="navigation"> <div class="container"> <div class="navbar-header"> <a class="navbar-brand" href="{{pathfor 'home'}}">{{ sitetitle }}</a> </div> <div class="collapse navbar-collapse" id="main-nav"> {{#if currentuser}} <ul class="nav navbar-nav navbar-right"> {{#if isappadmin}} <li class="dropdown"> <a href="#" class="d...

mysql - query sql need to resolve -

in table keybank there's 100.000 terms, want make sitemap list a, b, c, d showing data (id) 1 5000 not 100.000 in group a, b, c, d $data = 'a'; $where = "select * keybank left(title,1) = '".$data."' order title asc"; if using mysql workbench, maybe have default setting limiting query default (edit -> preferences -> sql queries -> untick "limit rows"). credit goes post: remove limit clause mysql workbench . also, might alternatively try append limit 999999 @ end of query overwrite default limit. you try adding before running query: set sql_select_limit=100000;

pandas - Applying a python function that returns a list and writing to columns of dataframe -

is there way can apply function pandas dataframe returns list each row applied to, , take list , put each item new columns of existing dataframe? for example function have returns given row list below of length 9 [u'republic of congo permanent mission united nations', u'embassy / consulate', u'10021', u'permanent mission of germany united nations', u'embassy / consulate', u'10021', u'permanent mission of kenya united nations', u'embassy / consulate', u'10021'] and want store values in columns labeled: colnames= ['prop1_name', 'prop1_type', 'prop1_zip', 'prop2_name', 'prop2_type', 'prop2_zip', 'prop3_name', 'prop3_type', 'prop3_zip'] right return of apply function list of lists each of inner lists 9 item list shown above. fine putting response new dataframe such below, hav...

How to use CNAME to properly redirect subdomain from host to Google Cloud -

i have outlined issue below in list format clarity: i have subdomain named clouddemo.camerontaylor94.com i used cname record redirect subdomain c.storage.googleapis.com on google cloud, have bucket named clouddemo.camerontaylor94.com (exactly same subdomain i uploaded html files, css file, , various text files make resume website bucket exact same file path in host when go clouddemo.camerontaylor94.com in browser, error "invalid bucket name" appears, , url changes c.storage.googleapis.com why bucket name invalid - shouldn't subdomain name? thank you! to use bucket static site need configure first using gsutil: https://cloud.google.com/storage/docs/website-configuration you need upload index.html , 404.html bucket , run this: gsutil web set -m index.html -e 404.html gs://clouddemo.camerontaylor94.com

types - Evaluation relation In Pierce's book: meaning of "a relation satisfies a rule if ..." -

Image
pierce writes in book in def. 3.5.2 : a rule satisfied relation if, each instance of rule, either conclusion in relation or 1 of premises not. so means if relation ( set of term pairs, pairs denoted t->t' ) contains element true->false relation satisfies rules given in fig. 3-1 because def 3.5.2 not forbid presence of such elements in relation not instance of conclusion of rule. so, in other words, element true->false not instance of conclusion of e-if, definition 3.5.2 not tell whether true->false can in relation satisfying rules in fig 3-1 or not. def 3.5.2 talks relation elements have form " if .... .... -> .... " , not explicitly forbid ( or ) presence of element true->false , example. question : understanding of mine correct ?

mysql - Joining Tables with duplicate rows as attributes -

i have question concerning mysql, have 2 tables: data : id .. | name .. | job...| 001 | name1. | job1 | 002 | name2. | job2 | 003 | name3. | job3 | dataattributes : id... | number | 001 | value 1 .| 001 | value 2 .| 002 | value 3 .| 003 | value 4 .| 003 | value 5 .| i want join these tables in way have: id .. | name.. | job ..|number 1 | number 2..| 001 | name1 | job1 |value 1......| value 2 ..| 002 | name2 | job2 |value 3......|...........| 003 | name3 | job3 | value 4.... | value 5 ..| can please give me ? =======solved======= i have found solution myself using following query select d.*, (select da.number dataattributes da d.id = da.id limit 1,1) number1, (select da.number dataattributes da d.id = da.id limit 2,1) number2, (select da.number dataattributes da d.id = da.id limit x,1) numberx data d try this select * data inner join dataa...

Return a value from shell script when it is called from a python script -

i have shell script abc.sh called python script custom_package.py using subprocess.call function call. want return value abc.sh , read in python. python call shell script follows. subprocess.call(['abc.sh', user, password]) abc.sh echos "running" or "not running". how can capture "running" or "not running" in python script? like: ret_val = subprocess.call(['abc.sh', user, password]) i have tried subprocess.check_output it's not working. ret_val = subprocess.check_output(['abc.sh', user, password]) use subprocess.check_output capture output of subprocess. if string 'not' not in returned value, output 'running' . output = subprocess.check_output(['abc.sh', user, password]) print(output) running = 'not' not in output

Python intersect two list with condition -

is one-liner best way (without error , efficient) merging (doing intersection) of 2 lists if condition met? res = [val val in list_1 if val in list_2 , condition[val] == true] i.e. list_1 = [2 4 6 8 10] list_2 = [1 2 3 4 5 8 9] condition = {2:true, 4:false, 6:false, 8:true, 10:true} should return res = [2 8] . dictionary condition has same keys elements in list_1 . how should change code if instead of 2 lists had sets? finally, note simplified case produced larger example cannot check visually. make sure solution valid in general , not posted example. this valid test case. however, isn't valid if val isn't guaranteed in condition . if that's possibility, should either put try: / except: around check (which mean abstracting out explicit loop statement or separate function), or use condition.get(val, false) (assuming want treat "not in condition " falsey). if isn't possibility, it's better leave code as-is; way, if "i...

objective c - Anyone know what cause this crash:"[__NSArrayI replaceObjectAtIndex:withObject:]: unrecognized selector"? -

recently use nstexttable draw table. want change attribute of selected block,so save selected paragraphs dictionary. after copy block of paragraph, once call method [nstexttableblock setbordercolor:], raise error: -[__nsarrayi replaceobjectatindex:withobject:]: unrecognized selector sent instance 0x6000002442c0 i try many times, found phenomenon, if don't copy block, setbordercolor: ok. know relation of [nstexttableblock copy] , error, why [nstexttableblock setbordercolor:] cause error? i'm quite confuse error. in advance. nsarray not have selector replaceobjectatindex:withobject: (so can't call it). trying modify nsarray can not modified that. want nsmutablearray instead. can create nsmutablearray nsarray , call method , replace reference original array this: nsmutablearray *mutablearray = [nsmutablearray arraywitharray:array]; [mutablearray replaceobjectatindex:index withobject:object]; array = mutablearray;//now array has been "updated" ...

c# - Customizing JSON serialized response -

i using json.net, getting following result of object in c#. {"library": [ { "key": "outfrmt", "description": "level 1 description", "label": "label 1", "value": "value 1", "id": 1 }, { "key": "outfrmt", "description": "level 2 description", "label": "label 2", "value": "value 2", "id": 2 }, { "key": "rqstypefrmt", "description": "level 2 description", "label": "label 2", "value": "value 2", "id": 2 } ]} however, what expecting following: { "library": { "new": [ { "label": "new", ...

mysql - How to combine these two credentials Queries? -

i wanted make 2 queries 1 query. purpose of query check if credentials match in either of table "user_credentials" or "workers". how can so? select user_name user_credentials user_name = '$user_email' , password = '$user_password' select user_name workers user_name = '$user_email' , password = '$user_password' try select user_name user_credentials user_name = '$user_email' , password = '$user_password' union select user_name workers user_name = '$user_email' , password = '$user_password' then check mysqli_num_rows or mysql_num_rows

memory leaks - Crash in Destructor in C++11, after shared pointer goes out of scope -

i facing crash in destructor. below code snippet of object creation of carrier , destructor of object once erase map here code snippet /* object creation */ shared_ptr<icarrier> factory::makecarrier(int carrierid, int beamid) { return make_shared < carrier > (carrierid, beamid); } /* dest */ shared_ptr<icarrier> pcarrier = nullptr; (auto carrieriterator = mcarrieridtocarriermap.cbegin(); carrieriterator != mcarrieridtocarriermap.cend();) { carrieriterator = mcarrieridtocarriermap.erase(carrieriterator); } virtual ~icarrier() { } carrier::carrier(int carrierid, int beamid) { // create new logger level appending beam id. string newloggerlevel = "rgw.beam." + to_string(beamid) + ".carrier."+ to_string(carrierid); // retrieve logger newly created logger level mlogger = log4cxx::logger::getlogger(newloggerlevel); log4cxx_info(mlogger, " carrier created id :" << carrierid); mpmcip = 0; ...

css - What's the font-end IE version compatibility debug tools (easy shifting from IE 8 9 10 11) on Win8? -

compatibility issues front-end headache. need emulators test diff browser versions. as known default it's not allowed install older ie versions on latest win8 directly. instead of using virtual machines or sandbox, or online tools such morden.ie / browser stack (need network or payment) are there tools front-end debugging of different ie versions can installed on win8 such kind of font-end cross-ie-version debugging? many thanks. hit f12 inside of ie. there developer tools built in ie 9/10/11. the last tab on dev tools give options emulating different versions of ie (note emulation isn't perfect, however)

python - Solving linear program using non-linear optimzation using scipy optimize? -

i need solve linear programming problem in python , have libraries numpy stack includes scipy.optimize since far understand linear program constrained optimization problem justified use "slsqp" scipy.optimize.or lead grossly inefficient solution?

javascript - AngularJS ng-repeat overflow -

i'm trying output html anchors inside fixed width container. when using angular's ng-repeat links overflow outside of container. below code snippet ng-repeat. refer jsfiddle example of overflow. http://jsfiddle.net/n1lkybwf/2/ <div style="width: 200px; padding: 5px; border: solid 3px #000;"> <a ng-repeat="tag in tags" style="margin-right: 5px;">{{tag}}</a> </div> the problem width of container being calculated before dom rendered (dom rendering asynchronous). in angular, order things happening... by default, anchor tag displays inline-block while simple div block. that's why solution ng-repeat div not anchor tag, fix block-displaying styling div display: inline-block. <div class="tag" ng-repeat="tag in tags" style="display:inline-block;"> <a style="margin-right: 5px;">{{tag}}</a> </div> here working fiddle : http://jsfidd...

ios - I want my application to identify iPhone models because I'm not using autolayout -

i wrote code in following way #define isiphone6 ( [[uiscreen mainscreen] bounds].size.height == 667)?true:false #define isiphone5 ([[uiscreen mainscreen] bounds].size.height == 568)?true:false uistoryboard *mainstoryboard = nil; printf("\ndetected resolution : %d x %d\n\n",(int)[[uiscreen mainscreen] nativebounds].size.width,(int)[[uiscreen mainscreen] nativebounds].size.height); if (isiphone5) { mainstoryboard = [uistoryboard storyboardwithname:@"mainiphone5" bundle:nil];; // iphone 4 inch } else if (isiphone6) { mainstoryboard = [uistoryboard storyboardwithname:@"mainiphone6" bundle:nil];; // iphone 4 inch } else { mainstoryboard = [uistoryboard storyboardwithname:@"main" bundle:nil]; //iphone 3.5 inch } self.window = [[uiwindow alloc] initwithframe:[[uiscreen mainscreen] bounds]]; self.window.rootviewcontroller = [mainstoryboard instantiateinitialviewcontroller]; [self.window makekeyandvisible]; but l...

How to redirect all the views in django-allauth to homepage/index instead of /accounts/* -

i using django-allauth user authentication in django project. my question is: how change default urls django-allauth of them point websites index/home page? i able display the login , registration form on index , seem work fine. want is, on index page instead of being on /accounts/something. so example, when invalid login details entered, redirects /accounts/login, want redirect homepage , display error messages there itself. same goes email confirmation, signup etc. using redirectview.as_view in urls.py allauth doesn't seem pass data in request. here project's urls.py from django.conf.urls import patterns, include, url django.contrib import admin urlpatterns = patterns('', # examples: # url(r'^$', 'instapayback.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^', include('main_site.urls')), url(r...

excel - CONCATENATE using IF -

i have excel sheet i'm attempting simplify , coming across issue. need combine 3 cells of strings together, shorten 1 of them based on value. i'd this: =concatenate(g6,=if(h6="black","b",if(h6="galv","g","err")),i6) which should straightforward, yet excel doesn't if statement in cell. has contained 1 cell, makes tough. is possible? it should this: =concatenate(g6,if(h6="black","b",if(h6="galv","g","err")),i6) there small issue formula. have used " = " operator inside formula invalid. hence instead of =if use if .

Changing the order of values on the x-axis in R -

Image
i attempting create line graph (time vs anxiety) in r x-axis ranging 10am 6pm. r, however, reorders values in numeric order , graph looks vaguely 's-shaped'. please see below vectors: anxiety <- c(1, 1, 2, 2, 3.5, 4, 4.5, 5, 5) time <- c(10, 11, 12, 1, 2, 3, 4, 5, 6) plot(time, anxiety, xlab='time (hour of day)', ylab='degree of anxiety (estimated)', xaxt='n', main='the effect of technology deprivation on anxiety', col='blue', type='l', cex.lab=1.5, cex.main=1.5, las=1) i prefer x-axis values presented in chronological order (10am, 11am, etc.) , graph reflect near linear pattern of increasing anxiety. thanks all. ~caitlin if willing give ggplot2 try # data anxiety <- c(1, 1, 2, 2, 3.5, 4, 4.5, 5, 5) time <- c(10, 11, 12, 1, 2, 3, 4, 5, 6) df <- data.frame(anxiety, time) # order level of time df$time <- factor(df$time, order=true, levels=time) # plot ggplot(df, aes(x=time, y=anxiety, group...

Cognos Content store - decode objid -

i want report of user names , user ids. got user names see userids in encrypted format. please me on how decrypt objid in content store table cmobjprops1 or other way achieve this? there's no report can run or way can within cognos, sorry that. but there's nifty tool ibm offers is, , you're looking for: http://www-01.ibm.com/support/docview.wss?uid=swg24034217 you can export data if want report off it. ps: don't report off content store, it's not idea. if did want see usernames @ cmobjprops33 guess. use tool, it's better around.

NLTK+TextBlob in flask/nginx/gunicorn on Ubuntu 500 error -

i trying run noun phrase analysis in flask app running on ubuntu, served through gunicorn , nginx. getting error 500 no (apparent) logging of error occurring either in nginx, supervisor, or unicorn error logs. nor 'supervisorctl tail app' shed light. my sites-available nginx.conf: server { listen 80; server_name [domain redacted]; charset utf-8; client_max_body_size 75m; access_log /var/log/nginx/nginx_access.log; error_log /var/log/nginx/nginx_error.log; location / { try_files $uri @app; } location @app { proxy_pass http://127.0.0.1:8000; proxy_set_header host $host; proxy_set_header x-real-ip $remote_addr; } } my supervisor app.conf [program:app] command = gunicorn app:app -b localhost:8000 directory = /home/www/app user = admin i running app in app.py following (issue experienced debug = false , true in config.py) app = flask(__name__, static_folder='static', static_url_path='/static...

system verilog - UVM virtual sequencer: choose the right child sequencer -

i have question virtual sequencer in uvm. let's think have n equal interfaces driven n equal drivers, each 1 connected own sequencer. want have transaction like: class my_transaction extends uvm_sequence_item; logic data; int num_if; endclass that when executed `uvm_do() sent driver number num_if. idea kind of work need virtual sequencer "forward" transaction right sequencer (the number num_if). right? if yes, how done? thanks. while tudor's answer work technically, conceptually decision on of interfaces run on (num_if) value should not belong transaction, sequence calls (which of course should randomized). transactions should contain representation of value travels b , way in travels protocol. specification of which , b outside of responsibility of transaction. in case, variation on transaction , tudor's sequence this: class my_transaction extends uvm_sequence_item; rand logic data; endclass ..and.. class s...

javascript - Highcharts Tootip in wrong location for multiple x axis -

i've got chart 2 x axis side-by-side, 1 series in each. when float on series 1 data, see tooltip, expected. when float on series 2 data, highlights line, no tooltip. however, if move cursor left @ same height data in series 2 data, above series 1 data, tooltip shows series 2 information, , series 2 points highlighted. here's example: http://jsfiddle.net/q0gphwx2/5/ is there way correct this? $(function () { $('#container').highcharts({ chart: { zoomtype: 'xy' }, plotoptions : { area : { stacking : 'normal', } }, title: { text: 'tooltip hover anomoly' }, subtitle: { text: 'float on series 2 data, stay @ same height, on series 1. ' }, xaxis: [{ width:300, categories: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct...

android - How to properly retrieve package name of the app that inserted data to Google Fit? -

i have following code using retrieve list of user's activities google fit: public void getactivitiesdata(date from, date till) { datareadrequest readrequest = new datareadrequest.builder() .aggregate(datatype.type_activity_segment, datatype.aggregate_activity_summary) .bucketbytime(1, timeunit.days) .settimerange(from.gettime(), till.gettime(), timeunit.milliseconds) .build(); fitness.historyapi.readdata(apiclient, readrequest).setresultcallback(new com.google.android.gms.common.api.resultcallback<datareadresult>() { @override public void onresult(datareadresult datareadresult) { status status = datareadresult.getstatus(); if (status.issuccess()) { (bucket bucket : datareadresult.getbuckets()) { if (!bucket.getdatasets().isempty()) { dataset dataset = bucket.getdatasets().get(0); string sourceapppackagename...

stm32 - STM32F0 Discovery USART sends the wrong value -

i'm making first steps in stm32 world, , quite hard. run discovery board. when learnt how control gpio , interrupts them decided play usart. , here hell began. i've spent 2 evenings struggling such simple thing serial communications! what have: configured gpio configured usart clock standard stm library - hsi 48 mhz i see characters in putty transmission parameters tested: 8n1 9600 , 115200 as can see code, i'm expecting see 'a' character while '_'. in opinion baud rate, wrong character. when change brr wrong value display junk characters. any idea welcome! #include <stm32f0xx.h> void putc(uint8_t character) { while(!(usart1->isr & usart_isr_txe)) ; usart1->tdr = character; } int main(void) { int i; rcc->apb2enr |= rcc_apb2enr_usart1en | rcc_apb2enr_syscfgcompen; rcc->ahbenr |= (rcc_ahbenr_gpiocen | rcc_ahbenr_gpioaen); //iosetup(); gpioa->moder &= ~(gpio_moder_moder9 | gpio_moder_moder1...

c++ - null pointer is returned -

i have test defined this: classname filehandle; classname1* data; //i want function define later filehandle.getdata(data); //this null after call isn't in function calls //why isn't pointer defined method called? how fix? the function calls looks this: void classname::getdata(classname1* data) { char * buf = "lots of data"; data = new classname1(buf, sizeof(buf)); //it's in there } i'm sure it's issue understanding of pointers , references. ideas i'm doing wrong here? why isn't value of data still defined when returns test? i saw examples of pointers , function calls here i'm having trouble finding example this. this seems might similar too, i'm still confused. pass pointer reference & : void classname::getdata(classname1* &data2) for clarity renamed variables data1 , data2 can see different. when passing reference same, otherwise address stored in local p...

javascript - How can I modify a date type field based when changing another date type field -

i have 2 input type date fields , when changing first 1 need add 14 business days set second one. how can this? here code: {% extends 'daciproveedorbundle::main.html.twig'%} {% form_theme form 'dacicontratosbundle:form:my_form_theme.html.twig' %} {% block title %}{{ parent() }} - ediciĆ³n de contratos{% endblock %} {% block css1st %} <link rel="stylesheet" href="{{ asset('bootstrap/css/custom-bootstrap-header.css') }}" > <link rel="stylesheet" href="{{ asset('bootstrap/css/custom-bootstrap-collapse.css') }}" > <link rel="stylesheet" href="{{ asset('bootstrap/css/custom-bootstrap-grid_and_table.css') }}" > <link rel="stylesheet" href="{{ asset('bootstrap/css/custom-bootstrap-tabs.css') }}" > {% endblock css1st %} {% block css2nd %} <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js">...