Posts

package - Using Qt Installer Framework to create my Application Installer -

i want create installer application. so, have read qt installer framework , tested tutorial example , create installer , work find example. have doubt when try same process application. when compile code folder created @ same level of code: myapplication (my code) build-myapplication-desktop_qt_5_4_1_mingw_32bit-release (code compiled) so questions are: what files of compilation need copy folder myinstaller/packages/vendor/ recommended qt intaller framework? if have dependencies of qt serialport, multimedia, , others, how insert these dependecies qt installer framework? windeployqt.exe want. run on command line , give executable argument. automatically copy in required qt libraries , provide runtime redistributable installer. can use binarycreator generate installer.

javascript - When are variables evaluated when passing them into functions? -

this simple question, know answer. are arguments passed function calculated once , set local variables or calculated every time they're used inside function? for example: when write forloop, should set variable finds object using iteration: for(var = 0; < objects.length; i++) { var obj = objects[i]; obj.title = "title"; obj.description = "description"; } if don't set obj variable operation finding object run more once: for(var = 0; < objects.length; i++) { objects[i].title = "title"; objects[i].description = "description"; } so far i've learnt bad (although i'm guessing performance difference in modern browsers unnoticeable). my question is, if wrapped modifying methods in function , passed objects[i] function, objects[i] calculated once , set local variable obj in function or calculate every time obj called? what better practice, code or code b? code a: func...

python - How to convert tomorrows (at specific time) date to a timestamp -

how can create timestamp next 6 o'clock, whether that's today or tomorrow? i tried datetime.datetime.today() , replace day +1 , hour = 6 couldnt convert timestamp. need help to generate timestamp tomorrow @ 6 am, can use following. creates datetime object representing current time, checks see if current hour < 6 o'clock or not, creates datetime object next 6 o'clock (including adding incrementing day if necessary), , converts datetime object timestamp from datetime import datetime, timedelta import time # today's datetime dtnow = datetime.now() # create datetime variable 6 dt6 = none # if today's hour < 6 if dtnow.hour < 6: # create date object today's year, month, day @ 6 dt6 = datetime(dtnow.year, dtnow.month, dtnow.day, 6, 0, 0, 0) # if today past 6 am, increment date 1 day else: # 1 day duration add day = timedelta(days=1) # generate tomorrow's datetime tomorrow = dtnow + day # create ne...

Is there a conventional iterator interface in Java which separates traversal from element access? -

for application, element access expensive, java.util.iterator no use. want more c++ iterators, can move pointer around without returning element. there in standard library this, or has de facto standard interface evolved through custom? (if not, please don't waste time posting code snippets - i'm quite able think reasonable names job). (since no 1 came around write proper answer, i'll expand comments answer.) to extent of knowledge there's no interface in standard api suits (i.e. interface iterator.skip() ). best solution using standard api methods believe, yourlist.sublist(startindex).iterator() instance. i think that, if possible, should consider creating own iterator interface. (note can let extend java.util.iterator interface able use ordinary iterator if needed.) finally, , future readers have use java.util.iterator , have access underlying list lazily, can use java.lang.reflect.proxy . note proxy objects doesn't play serialization ...

sql server - sql trigger call webservice timeout -

i have sql trigger calls web service because there several trigger on insert , update trigger throws timeout error. i debugged in visual studio , receive timeout error when inserting or updating record. below code alter trigger [dba].[triggerwebservice] on [dba].[callid] after insert declare @internfactureren nvarchar(1) declare @id varchar(50) --check if updated or inserted begin -- insert statements trigger here select @id=id inserted exec [dba].[usp_callophalenvoordelaware] @id end use [helpdesk] go /****** object: storedprocedure [dba].[usp_webservice] script date: 13/06/2015 22:53:15 ******/ set ansi_nulls on go set quoted_identifier on go alter procedure [dba].[usp_webservice]] @callid varchar(38) = null declare @object int; declare @url varchar(255) declare @responsetext varchar(8000); set @url = 'http://localhost:4000/service1.asmx/xxxxxxx?callid=' + @callid + '' exec sp_oacreate...

email - How to insert a mail using the latest GMail API in Swift? -

so have following snippet: var url = nsurl(string: "https://www.googleapis.com/upload/gmail/v1/users/me/messages?uploadtype=media&internaldatesource=dateheader") var rawmessage = "" + "date: thu, 25 sep 2014 18:35:28 -0700\r\n" + "from: john appleseed <john@appleseed.com>\r\n" + "to: steve jobs <steve@jobs.com>\r\n" + "subject: 1 more thing\r\n\r\n" + "some message" var rawdata = rawmessage.datausingencoding(nsutf8stringencoding, allowlossyconversion: true) var request = nsmutableurlrequest() request.url = url request.httpmethod = "post" request.setvalue("bearer \(self.accesstoken!)", forhttpheaderfield: "authorization") request.setvalue("message/rfc822", forhttpheaderfield: "content-type") request.setvalue("\(rawdata?.length)", forhttpheaderfield: "content-length") request.httpbody = rawdata! if let ...

dbref - MongoDB DBReference how to? -

i'm learning mongodb , have next questions. there mongodb documents this coordenada document > db.coordenada.find().pretty() { "_id" : objectid("5579b81342a31549b67ad00c"), "longitud" : "21.878382", "latitud" : "-102.277364" } { "_id" : objectid("5579b85542a31549b67ad00d"), "longitud" : "21.878626", "latitud" : "-102.280379" } { "_id" : objectid("5579b89442a31549b67ad00e"), "longitud" : "21.878845", "latitud" : "-102.283512" } { "_id" : objectid("5579b8bf42a31549b67ad00f"), "longitud" : "21.879253", "latitud" : "-102.286698" } { "_id" : objectid("5579b8dd42a31549b67ad010"), "longitud" : "...