Posts

Showing posts from January, 2015

javascript - Why is the facebook pixel counting event conversions wrong? -

we have installed fb pixel track conversion events. fb tools verify set right. results dramatically inaccurate point isn't working. track events such user entering phone number, etc. used fb js code provided. compared our own results, measured directly incrementing counter using javascript every time event fires, tracked on fb, , results dramatically different (e.g. off >50%). in addition, results event inconsistent within fb depending on in fb ui look. if @ analytics event tester see 1 number, on pixel page different one, on ads manager different one. differences large (e.g. factor of >2x). in order test made simplest possible html page using fb pixel code directly fb. have pasted below. using code (with our actual pixel id of course), , fb 'event debugging' feature, see no pixel fires. using fb pixel helper in chrome, finds pixel , events fine. tried loading page in several different browsers on different machines. what going on? thanks help.

c++ - Sending multiple values through serial port -

i using arduino uno project, don't know how go achieving want. i'm beginner therefore don't know how use functions want. i want send 3 values through serial monitor @ once. the first value string points operator (a, s, m, d, p), , want take 2 more values. example, if input 'a012556 should add 12 , 556 give me 568. currently doing this, it's asking each input separately. example, ask operator (i can input ints because cannot take string/chars) first, input 1 (should addition), , asks first number, , second number, , adds them both , outputs result. works fine, it's not i'm trying achieve. serial.println ("enter chosen operator"); serial.println ("a addition, s subtraction, m multiplication,"); serial.println ("d division, , p potentiometer: "); // takes input user int theoperator = datainput(); if (theoperator == 1) { // if input equal 1, carry out function 'addition()' addition(); } el

scala - Spark Interactive/Adhoc Job which can take Dynamic Arguments for Spark Context -

i looking solution interactive/adhoc spark job. have arguments need pass spark job. fine, want pass these arguments selected user form dropdown menu user. so e.g. spark-submit job looks below, following arguments "prod /opt/var/var-spark/application.conf vc fx yes yes yes". $spark_home/bin/spark-submit \ --class main.gmr.sparkgmr \ --deploy-mode client \ --verbose \ --driver-java-options "-dlog4j.configuration=file:///opt/var/spark-2.1.0-bin-hadoop2.7/conf/log4j.properties" \ --conf "spark.executor.extrajavaoptions=-dlog4j.configuration=file:///opt/var/spark-2.1.0-bin-hadoop2.7/conf/log4j.properties" \ file:///opt/var/var-spark/var-spark-assembly-1.0.jar \ prod /opt/var/var-spark/application.conf vc fx yes yes yes now want make job running because caches many dataframes in memory can used later analysis. problem job dies , in-memory dataframes/views not there more. also, want submit different arguments job next time, e.g. "p

Repeat a JavaScript action every certain amount of clicks? -

i've made script calls function every 5 clicks on element. i'd repeat action every 5 clicks, , not call once. there way reset variable count when action called? $(document).ready(function(){ var count=0; $(".logo").click(function(){ count+=1; if (count==5) { $( "body" ).toggleclass('easteregg'); } }); }); you don't have reset do if(count % 5 === 0){ //your code here } this called every time count multiple of 5

asp.net - handle webform usercontrol load event from within the control code behind -

the subject line says all. not talking event handler of instance of usercontrol put in aspx page. referring load event handler within code behind of usercontrol class itself. have page_load(object sender, eventargs e){} event handler of page. method signature of user control event handler? thanks.

node.js - How do I preload or install static files into Highchart's export server? -

this if export chart using html, can reference styling classes , chart generate on web application. currently tried storing css in resources.json file however, styling not seem applying of charts. i know in line styling tags apply chart when use in html however, since have lot of styling preferable load on once using resources.json update the command d_paul provided works, , thank that! i trying load resources enableserver command wouldn't read it. is there anyway send in resources argument through exporting api http://api.highcharts.com/highcharts/exporting i know can send json server resources argument , have render way, wondering if there way send through exporting api linked above. or if not through api, if can load resources when start server using enableserver argument? i have created simple resources.json file in node-export-server folder looks this: { "css": ".highcharts-background {fill: #bada55;}" } generated i

c# - How to get oauth2 token with the WWW API? -

i working on project requires oauth2 token communicate. backend gives me curl command, have no idea how put www form in unity because have no former experience http or json file. me access token? thanks. here how curl code looks like: $ curl -v -u {client_id}:{client_secret} " https://api.domo.com/oauth/token?grant_type=client_credentials&scope= {scope}" and here example: $ curl -v -u 441e307a-b2a1-4a99-8561-174e5b153fsa:f103fc453d08bdh049edc9a1913e3f5266447a06d1d2751258c89771fbcc8087 " https://api.domo.com/oauth/token?grant_type=client_credentials&scope=data%20user " thank much! to oauth2 token www api, use wwwform create form contains grant_type , client_id , client_secret . when make request, token should returned in json format. use unity's jsonutility convert string can obtain. retrieving token : [serializable] public class tokenclassname { public string access_token; } ienumerator getaccesstoken() { var url = &

com - Attach to process instead of Dispatch -

i using pywin32 , calling dispatch function create com object, means new instance of application created (in case ptv vissim) whenever call function. possible, instead, attach existing vissim application? speed development, since wouldn't have wait application start every time run test. this existing relevant code: import win32com.client com vissim = com.dispatch("vissim.vissim.540")

input - Kotlin and Gradle - Reading from stdio -

Image
i trying execute kotlin class using command: ./gradlew -q run < src/main/kotlin/samples/input.txt here helloworld.kt class: package samples fun main(args: array<string>) { println("hello, world!") val lineread = readline() println(lineread) } here build.gradle.kts : plugins { kotlin("jvm") application } application { mainclassname = "samples.helloworldkt" } dependencies { compile(kotlin("stdlib")) } repositories { jcenter() } the code executes, data contained inside input.txt file not displayed. here output get: hello, world! null i want able execute gradlew command above , input.txt stream redirected stdio. can in c++. once compile .cpp file, can run: ./my_code < input.txt and executes expected. how can achieve same thing kotlin , gradle? update : based on this answer , i've tried adding build.gradle.kts not valid syntax: almost, doesn't work :'

html - Full width image in react-native flexbox not stretching -

i have 2-column grid of products , i'm trying images fill width of it's container. current code, image fills available height of imagewrapper. if set large height imagewrapper, the images stretch fill width, not viable images different products have variable height. <touchableopacity style={styles.item} onpress={() => this.openproduct(item)}> <text style={styles.boldlabel}>{item.name}</text> <view style={styles.imagewrapper}> <image style={styles.gridimage} resizemode={'contain'} source={{uri: image }} /> </view> </touchableopacity> the css: item: { flexdirection: 'column', width: metrics.screenwidth / 2 - metrics.doublebasemargin, justifycontent: 'center', margin: metrics.basemargin, backgroundcolor: "#fff", }, imagewrapper: { flex:1, flexdirection:'row' }, gridimage: { flex:1, height: null, widt

orm - Using JOOQ in AWS Lambda -

have tried using jooq aws lambda? using same working config have previous project runs on tomcat , transitioned lambda. lambda not getting passed query part. if run standard prepared statement working ok not vpc/access or other infrastructure issue. jooq code: final street street = dsl.using(configuration).select(street.fields()).from(street) .where(street.address.eq(message.address()) .fetchoneinto(street.class)); i initializing config: @bean public defaultconfiguration configuration() { defaultconfiguration jooqconfiguration = new defaultconfiguration(); jooqconfiguration.set(connectionprovider()); jooqconfiguration.set(new defaultexecutelistenerprovider(exceptiontransformer())); string sqldialectname = environment.getrequiredproperty("jooq.sql.dialect"); sqldialect dialect = sqldialect.valueof(sqldialectname); jooqconfiguration.set(dialect); return jooqconfiguration; } my bad, ther

python - How to insert an already created json-format string to Elasticsearch Bulk -

in python script, i'm trying elasticsearch.helpers.bulk store multiple records. i json-format string software, , want attach in source part i got helpers.bulk format answer part of code: def savees(output,name): es = elasticsearch([{'host':'localhost','port':9200}]) output = output.split('\n') i=0 datas=[] while i<len(output): data = { "_index":"name", "_type":"typed", "_id":savees.counter, "_source":[[problem]] } i+=1 savees.counter+=1 datas.append(data) helpers.bulk(es, datas) i attach json-format string in [[problem]] how can attach in? have tried hard, not output in correct.. if use: "_source":{ "image_name":'"'+name+'",'+output[i] } and print data res

html - How can I add a font-awesome icon to an input box without bootstrap? -

i want include font-awesome icon form input, running issues finding solution. looking on site gives questions with bootstrap , including 1 without it. tried adapting code this answer alignment off. how can fix this? .inner-addon { position: relative; } .inner-addon .fa { position: absolute; padding: 10px; pointer-events: none; } .left-addon .fa { left: 0px;} .left-addon input { padding-left: 30px; } <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/> <div class="inner-addon left-addon"> <i class="fa fa-adn"></i> <input type="text" class="form-control" placeholder="username" /> </div> depending on size want input be, add additional padding input: .left-addon input { padding: 8px 5px 8px 30px; } or reduce padding on font-awesome icon: .inner-addon .fa {

react native - Is there a way to develop an Expo app on 32-bit Windows? -

i'm getting react native expo. main machine macbook i'm sorting out problems i'm looking doing coding on windows 10 notebook backup, has 32-bit windows. i know expo ide, xde, requires 64-bit windows far can't seem either confirm nor deny whether can run expo command-line without ide on 32-bit windows.

c# - WMI printer.put() access denied -

i trying modify "keep printed jobs" property each printer using following code: using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using system.management; namespace consoleprintpref { class program { static void main(string[] args) { console.writeline("modify printer parameters"); managementscope scope = new managementscope("root\\cimv2"); scope.connect(); string searchquery = "select * win32_printer"; managementobjectsearcher searchprinters = new managementobjectsearcher(searchquery); managementobjectcollection printercollection = searchprinters.get(); foreach (managementobject printer in printercollection) { propertydatacollection printerproperties = printer.properties; foreach (propertydata property in printerproperties) { if (property.name == &qu

cordova - My android app icon on phone screen doesn't show up after download -

i published app google play store built ionic v1. app showing fine on play store when searched , showing correct icon.. when download app, shows different icon on phone screen. splash screen shows incorrect icon when launch app. icon looks sort of box or block cat or fox figure blue eyes. have ran ionic resources multiple times generate icons/splashscreens images , have checked make sure images generated... config.xml file seem have path correct also. please, appreciated. thank you. <platform name="android"> <icon src="resources\android\icon\drawable-ldpi-icon.png" density="ldpi"/> <icon src="resources\android\icon\drawable-mdpi-icon.png" density="mdpi"/> <icon src="resources\android\icon\drawable-hdpi-icon.png" density="hdpi"/> <icon src="resources\android\icon\drawable-xhdpi-icon.png" density="xhdpi"/> <icon src="resources\android\i

angularjs - Button control inside bootstrap modal ui is not working -

how button control inside modal work? able modal open button not work. new angular ui bootstrap. suggestion or great! here component: export default function (app) { app.component('review', { templateurl: 'content/app/components/review/review.html', controller: ['$uibmodal', reviewcontroller] }) function reviewcontroller($uibmodal) { var $ctrl = this; $ctrl.showmodal = function() { $uibmodal.open({ templateurl: 'errormodal', backdrop: true, controller: ['$uibmodalinstance', function($uibmodalinstance) { var $ctrl = this; $ctrl.cancel = function () { $uibmodalinstance.dismiss('cancel'); }; }] }) } } } here html of modal: <script type="text/ng-template" id="errormodal">

php - How to run javascript code when table design is in controller of laravel 5.4 -

i have table design in controller of laravel. it populated in form designed in blade via ajax call. my table looks this: if(count($sublaw_details)>0) { $res_div.='<table width="100%" border="0" class="table table-striped table-bordered table-hover">'; $res_div.='<tr> <td colspan="2" rowspan="2"> <strong>'.$law_details->lm_id.' ('.$law_details->law_name.')</strong> </td> <td > <span class="required" aria-required="true">* </span><input type="text" value="'.$start_date.'" placeholder="dd-mm-yyyy (start date)" onchange="showdata();&quo

javascript - Objects being pushed to a list have just 1 property value changed some how after all objects have been pushed -

i've got code runs x in xlength, z in zlength, , if want include y axis, y in ylength. then object created position x,y,z , pushed array. now what's happening is, first loop on y values done, position.y value of last pushed object, , subsequent objects, changes it's assigned value final value of position.y of y in ylength loop. object's position.y value linked position.y value of y in ylength loop, how work? here's code: in case, props.includey == true props.position.type == 'center' i tried var y = yhere trick fixes promise resolution in loops use increment value in resolve function. but fear bug more nasty... this.rendercoverage = function(props) { /* include @param-object faces calculated * include @param-interger resolution size of squares evaluated * include @param-array[string] lights array of light id's want calculate coverage */ props.class = props.class || 'floorcoverage'

Get build information from jenkins using rest api -

i want retrieve build summary last 3 days jenkins using rest api's , save result xml file, how can proceed this? you read full guide in: http://your_jenkins:8080/job/your_job/api/ the build sumary in xml format: http://your_jenkins:8080/job/your_job/api/xml retrieve name of first 10 builds http://your_jenkins:8080/job/your_job/api/xml?%20tree=jobs[name]{0,10}

How to identify and crop a rectangle inside an image in MATLAB -

Image
i have image has rectangle drawn in it. rectangle can of design background isn't single color. it's photo taken phone camera one. want crop inner picture (scenary) in image. how can in matlab? i tried code img = im2double(imread('https://i.stack.imgur.com/is2ht.jpg')); bw = im2bw(img); dim = size(bw) col = round(dim(2)/2)-90; row = min(find(bw(:,col))) boundary = bwtraceboundary(bw,[row, col],'n'); r = [min(boundary) , max(boundary)]; img_cropped = img(r(1) : r(3) , r(2) : r(4) , :); imshow(img_cropped); but works 1 image, 1 and not 1 above or one i need find code works image specific rectangle design.any aprreciated.thank you the processing below considers following: backgroung monochrome, possible gradient a border monochrome(gradient), distinguishable background, not barocco/rococco style a picture kind of real world picture lots of details, not malevich's black square so first search picture , flatten backgrou

Opencv + Python cv2.imwrite() and cv.imshow both images present different output -

Image
i using opencv(3.0) , python 2.7 image processing, have issue cv2.imwrite() , cv2.imshow() . produce different output, code below: tfinal = (255)*(nir_img-red_img)/(nir_img+red_img) cv2.imwrite(_db_img1+'_ndvi'+_ext_img,tfinal) cv2.imshow('ndvi',tfinal) first image output of cv2.imshow() second image output of cv2.imwrite() this can happen because of data type. imwrite , imshow determine data automatically, relaying on datatype. said in documentation imwrite , imshow : imwrite : the function imwrite saves image specified file. image format chosen based on filename extension (see imread() list of extensions). 8-bit (or 16-bit unsigned (cv_16u) in case of png, jpeg 2000, , tiff) single-channel or 3-channel (with ‘bgr’ channel order) images can saved using function. imshow : the function may scale image, depending on depth: if image 8-bit unsigned, displayed is. if image 16-bit unsigned or 32-bit integer, pixels divid

android - Using Intent to move from one activity to other takes alongtime and show blank screen -

i showing mp3 files of device in recyclerview.on click of item of recyclerview,i moving other activity shows blank screen few seconds , moves next activity. adapter class of recyclerview follos: public class songsadapter extends recyclerview.adapter<songsadapter.myviewholder>{ context context; arraylist<hashmap<string, string>> songlist; public songsadapter(arraylist<hashmap<string, string>> songlist,context context) { this.songlist = songlist; this.context=context; } @override public myviewholder oncreateviewholder(viewgroup parent, int viewtype) { view view = layoutinflater.from(parent.getcontext()).inflate(r.layout.list_item, parent, false); return new myviewholder(view,context); } @override public void onbindviewholder(myviewholder holder, int position) { holder.textview.settext(songlist.get(position).get("file_name")); } @override public int g

.net - TPL dataflow preserving input -

i using .net tpl dataflow operation. using match list of resumes job category. final block gives me matched resumes/candidates. want associate matched candidate initial input category. have find list of matching candidates list of job categories. however, unable preserve original input. want final output this {category, list< matchedcandidates >} 1 category if searching mutiple categories, want output be list of {category, list< matchedcandidates >} here code: var transformblock = new transformblock<int, category_keywordstomatch>(x => { return getkeywordstomatch(x); }); var matchedcandidates_dataflow = new list<matchedcandidate>(); var finalblock = new actionblock<category_keywordstomatch>(x => { list<resume> resumes = new list<resume>(); using (var context = new indepthrecruitdbcontext()) { resumes = context.resumes.

Android, Realm: Is need every time call realm.insert(permissionOfferResponse)? -

on android client need realmurl. next steps: login realm object server (ros) create response received token after processing, offerresponse's realmurl property contain url of shared realm here snippet: public class mainapp extends multidexapplication { private void loginandconfig() { string authurl = "http://" + buildconfig.object_server_ip + ":" + buildconfig.object_server_port + "/auth"; syncuser.callback callback = new syncuser.callback() { @override public void onsuccess(syncuser user) { setpermissions(user); } @override public void onerror(objectservererror error) { string errormsg; switch (error.geterrorcode()) { case unknown_account: errormsg = "account not exists."; break; case invalid_credentials:

c# - MySQL Insert & Select in same statement returns 'records' when none exist -

so have following code (heavily simplified) - mysqlcommand cmd = new mysqlcommand(@"insert helpdesk.calls set callid = @callid, viewed = 1, date = current_timestamp(); select * helpdesk.calls id = @callid", con); cmd.parameters.add("callid", mysqldbtype.int32).value = id; using (mysqldatareader reader = cmd.executereader()) { if (reader.read()) { retval = tocallheader(reader); } else { // never throws reader.read() returns true. throw new exception(string.format("call ({0}) not found", id)); } } where inserting record , running select @ same time. problem reader.read() returns true whether rows selected select statement or not when insert statement used. behavor design , require 2 queries transaction? that insert query syntax wrong , throw exception. insert helpdesk.calls set callid = @callid, viewed = 1, date = current_timestamp(); check here correct sql syntax on insert statement: https://www.w3sch

regex - Rails - validates_format_of for datetime (mysql format) -

i'm having custom input field in simple_form user sets datetime bootstrap datetimepicker plugin = f.input :published_at, as: :date_time_picker the datetime set in sql format, yyyy-mm-dd hh:ii:ss now, 'd set validation, check datetime entered in correct format in case user tries type datetime instead of clicking calendar icon , choosing it validates_format_of :published_at, with: /^((19|20)\\d\\d)-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01]) /i, allow_nil: true how can set format of time in case?

c# - Whenever I Insert Data in Database It Saves an Extra Row in Database -

layout , db if (!(string.isnullorempty(b.tostring()))) { string connection = "server=127.0.0.1; database=accounts;user=root; password='';"; mysqlconnection conn = new mysqlconnection(connection); conn.open(); string sql = "insert payment_voucher (voucher_no, paid_to, date, account_cr, account_dr, description, student_emp_id, amount, total ) values ('" + label8.text.tostring() + "','" + textbox1.text + "', '" + datetimepicker1.value + "','" + + "','" + b + "', '" + richtextbox1.text + "', '" + textbox3.text + "', '" + textbox4.text + "', '" + label11.text.tostring() + "');"; mysqlcommand command = new mysqlcommand(sql, conn); command.executenonquery(); conn.close(); } i dont know why happening. front end in c#. that statement not insert 2 rows. you have

javascript - How to test functional selectors in redux saga? -

currently possible write reducers , test sagas this: // selector const selectthingbyid = (state, id) => state.things[id] // in saga const thing = yield select(selectthingbyid, id) // , test expect(gen.next().value) .toequal(select(selectthingbyid, id)) however want use more functional approach write reducers , put data (state) last in arguments: // selector const selectthingbyid = r.curry((id, state) => state.things[id]) // in saga const thing = yield select(selectthingbyid(id)) // test: fails expect(gen.next().value) .toequal(select(selectthingbyid(id))) the test fails because selectthingbyid(id) creates new function everytime. this solved option prepend arguments select instead of apending. possible or there way how test such selectors? you need call selector factory using call effect can inject right function saga using gen.next(val) // in saga const selector = yield call(selectthingbyid, id) const thing = yield select(selector) // test con

ios - Swift SpriteKit Layer/Node doesn't load fast enough -

i created first simple ios game , created layers gamelayer game , pauselayer resume button/node. in gamelayer have button pause game , in pauselayer button/node resume. did in function gets points touchesended function: var ispaused = false func touchend(atpoint pos : cgpoint) { if ispaused == false && pausebutton.contains(pos) { pauselayer.ishidden = false view?.ispaused = true ispaused = true } if ispaused == true && resumebutton.contains(pos) { pauselayer.ishidden = true view?.ispaused = false ispaused = false } } everything working besides cant see resume button. can click should , game resumes. when delete line view?.ispaused = true the button displayed should be. gave me idea pausing view might pause process of loading/displaying resume button. how can avoid problem? well test out theory of not loading quick enough. you can delay code execution this: let delayduration

cplex - Gurobi MIP : how to select the variables on which to branch -

i use gurobi 7.02 solve mip. i'd choose set of variables on branch (i'm confident ease solving). in fact i'm looking equivalent in gurobi cplex's mip.strategy.variableselect does knows it? thanks attention you can find comparison of gurobi , cplex parameters in switching cplex web page . in particular, varbranch similar cpx_param_varsel . however, page explains following: gurobi , cplex use different strategies , algorithms. gurobi strategy tuning may differ cplex tuning you've done, , may not necessary @ all. recommend start default settings, , change parameters when observe specific behavior you'd modify.

How to create a Function2 instance using lambdas in Java? -

i trying implement lambda function2 in java: javapairrdd<string, integer> reducedcounts = counts.reducebykey(new function2<integer, integer, integer>() { @override public integer call(final integer value0, final integer value1) { return integer.valueof(value0.intvalue() + value1.intvalue()); } }); the above sample, how change lamb8 format? wanna define separate function function2<...> f2 = lambda; counts.reducebykey(f2); you can go method reference easiest option in case: function2<integer, integer, integer> f2 = integer::sum; counts.reducebykey(f2) which equal to: function2<integer, integer, integer> f2 = (i1, i1) -> i1 + i2; counts.reducebykey(f2) also, such simplification possible because perform lot of unnecessary boxing/unboxing in order calculate sum of 2 integers.

python - I retrieved data from mongodb using pymongo but why every time fields' sequence is different in output? -

the code is:- import pymongo cur=pymongo.mongoclient() db=cur.test1 site in db.sites.find(): print(site) in output, why sequence different everytime? should url first , name filled. ouput screenshot there no order in dictionaries , these key,value pairs normal have different output everytime.

javascript - if alerted yes marker won't set -

i wanting make if statement has alert function. however if don't use localstorage function alert box keep popping changes marker. if if use localstorage function marker won't set color. any ideas on do? all appreciated. var alerted = localstorage.getitem('alerted') || ''; if (alerted != 'yes') { if (value.squawk == "7500" || value.squawk == "7600" ||value.squawk == "7700") { console.log(value.hex + " squawking " + value.squawk); alert(value.hex + " squawking " + value.squawk + ". error in transponder transmission please not alert local authorities"); markers[value.hex].seticon(squawkerror(value)); } } else just check alerted around alert , if not set, alert , set it. next time, no alert set , no stored value changed. var alerted = localstorage.getitem('alerted') || false; if( value.squawk == 7500 || value.squawk == 7

java - How to get unique results from joined Hibernate queries -

this continuation questions this: why hibernate hql distinct cause sql distinct on left join? you may have noticed findall() repository methods return duplicates, while findall(pageble pageble) works fine. so, share additional way obtain unique results. so, let's have @ org.hibernate.hql.internal.ast.querytranslatorimpl final boolean haslimit = queryparameters.getrowselection() != null && queryparameters.getrowselection().defineslimits(); final boolean needsdistincting = ( query.getselectclause().isdistinct() || haslimit ) && containscollectionfetches(); as can see, hibernate apply distincting if define limits. is, if afraid of word distinct in queries , criteria, call javax.persistence.query.setfirstresult(0); , make hibernate apply distincting.

.net - Julian Date and Time to regular Date and Time -

i receiving julian date , time jde table as: slupmj(date) | sltday(time) --------------------------- 116173 | 94959 i need convert them regular date , time values integrate application. while able concert date part using custom code: dcy = left(date1, 3) if left(dcy, 1) = "0" dyear = "19" & right(dcy, 2) else dyear = "20" & right(dcy, 2) end if dinterval = cint(right(date1, 3)) tdate = dateadd("d", dinterval - 1, "01/01/" & dyear) j2d2 = day(tdate) & "/" & month(tdate) & "/" & year(tdate) how convert time part in vb.net ? here's code convert time portion of julian datetime. there simpler way, coding should hard!™ :) ''' <summary> ''' converts time portion of julian datetime ''' </summary> ''' <param name="djdatetime">the julian datetime. example: 2457984.021181</pa

c# - Binding to DataGridComboBox -

i know has been asked few times, cannot binding work on datagridcombobox, never displays @ all. can show me error of ways? c# ilist<servicecodes> servicecodes = app.getinfo.getservicecodes(); newinvoice.invitemsdatagrid.datacontext = servicecodes; newinvoice.showdialog(); xaml <datagrid x:name="invitemsdatagrid" datacontext="{binding}"> <datagrid.columns> <datagridcomboboxcolumn x:name="invscdropdown" displaymemberpath="codename" selectedvaluepath="codename" selectedvaluebinding="{binding codename}" /> </datagrid.columns> </datagrid> thanks always. the first thing need set itemssource property of datagrid ienumerable . once have done this, bind combobox or same ienumerable this: <datagrid x:name="invitemsdatagrid" itemssource="{binding}"> <datagrid.columns> <datagridcomboboxcolumn x:name="invs

ruby on rails - mandrill-mailer with sidekiq 5.0.4 uninitialized constant Sidekiq::Extensions::ActionMailer -

i've juste updated sidekiq gem 5.0.4, , have error when run server. nameerror: uninitialized constant sidekiq::extensions::actionmailer /users/mike/documents/paycar/back_end/config/initializers/mail.rb:15:in `<top (required)>' /users/mike/.rvm/gems/ruby-2.3.1@paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:652:in `block in load_config_initializer' /users/mike/.rvm/gems/ruby-2.3.1@paycar-api/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:166:in `instrument' /users/mike/.rvm/gems/ruby-2.3.1@paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:651:in `load_config_initializer' /users/mike/.rvm/gems/ruby-2.3.1@paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:engine>' /users/mike/.rvm/gems/ruby-2.3.1@paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `each' /users/mike/.rvm/gems/ruby-2.3.1@paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `block in <class:engine>

php - AutowiringFailedException when overriding FOSUserBundle registration form -

(using symfony 3 on wampserver on windows 10) i trying extends fosbundle's user form according following instructions https://knpuniversity.com/screencast/fosuserbundle/customize-forms (i chose option "override" skipped "extend" part using getparent() ) i get **autowiringfailedexception** cannot autowire service "app.form.registration": argument "$class" of method "appbundle\form\registrationformtype::__construct()" must have type-hint or given value explicitly. some configuration: ..\appbundle\form\registrationformtype.php <?php /* * file part of fosuserbundle package. * * (c) friendsofsymfony <http://friendsofsymfony.github.com/> * * full copyright , license information, please view license * file distributed source code. */ namespace appbundle\form; use fos\userbundle\util\legacyformhelper; use symfony\component\form\abstracttype; use symfony\component\form\formbuilderinterface; use symfony\compo

git - TortoiseGit does not show commit log properly -

i using tortoisegit repository on bitbucket. problem when make "show log" in tortoisegit , refresh log still don't see pushed commits in repository. if go bitbucket web page can see them in list of commits not shown in tortoisegit log until make pull. there way see in tortoisegit log commits before making pull ? the bitbucket web page runs in server using git repositories located in server you're looking updated data. tortoisegit runs locally using local repositories, need update repository see updated data. can update repository executing either fetch or pull. see more details fetch , pull here .