Posts

module - Incorporate mqtt into appcelerator / titanium -

does have successful experience incorporating mqtt library appcelerator / titanium? what library have used how incorporate library (i.e. npm module, hyperloop, cocoapods, straight source code, etc) thanks in advance can give the existing module find http://gitt.io/component/it.uhopper.mqtt last updated in 2014. you'll have find (ios?) library , either wrap module or use hyperloop aware hl still in beta.

java - Jav save the date and time at a particular syncpoint and restart from same point -

my application looks daily updates api. wanted save date , time @ particular point , restart(let's tomorrow) same sync point updates. something structure: main() { long sync = getlastsavedstatetime() lookforupdates() savestatetimeagain() }

ios - Does GCSVideoView work with YouTube 360-degree live streaming? -

i saw announcement today youtube streaming 360 video, https://youtube.googleblog.com/2016/04/one-step-closer-to-reality-introducing.html does gcsvideoview loadfromurl: work? code below modified videowidget ios sample doesn’t show 360 video... nsstring *videopath =@"https://www.youtube.com/watch?v=db-uq08ydi4"; [_videoview loadfromurl:[[nsurl alloc] initfileurlwithpath:videopath]]; excited see working! thanks! before anything, check question answer's i'm looking forward see working answer this... working myself possible solution.. what found out gcscardboardview extension of glsurfaceview . cardboard viewports , proyections on top of opengl. i'm no expert way go (for me) 'how show videos through opengl view'. second step be: create pixel buffer in opengl support video stream.. that's i'm stuck.

javascript - Is there something like angular $watch in node js -

i'm rookie in web services , knowledges not deep in node js, apologize in advance if question not correct. question have 2 functions in angular-node js app. first function, uploading file public folder on server var storage = multer.diskstorage({ //multers disk storage settings destination: function (req, file, cb) { cb(null, './demo/'); }, filename: function (req, file, cb) { //var datetimestamp = date.now(); cb(null, file.originalname //file.fieldname + '-' + datetimestamp + '.' + file.originalname.split('.')[file.originalname.split('.').length -1] ); } }); var upload = multer({ //multer settings storage: storage }).single('file'); /** api path upload files */ app.post('/upload', function(req, res) { upload(req,res,function(err){ if(err){ res.json({error_code:1,err_desc:err}); return; } res.json({error...

How to avoid ssh connection overheads in scp? -

i testing performance of scp command. want minimize overheads making tcp connection of ssh protocol inside scp. how can open first ssh connection , reuse on time? thanks help. // should have said 1 way achieve zip files , send @ once, works when files available time. let's assume files generated in stream fashion in source side, , want send possible after generated. // pleaser refer link answer found: (how reuse ssh connection speed remote login process) http://www.cyberciti.biz/faq/linux-unix-reuse-openssh-connection/ if copying many tiny files connection overhead comes play, try tar'ing on fly , sending instead. try this: tar zcvf - data | ssh user@server "cat > data.tar.gz" you can drop z if compression isn't desired/helpful too.

c# - Does @Html.Textarea sanitize input? -

i have web form allows enter user input @html.textarea. if there form validation error, input shown in text area. if form submits successfully, user's input sent database. i've tried various things can think of sql injection, , appears microsoft's built in functionality catching it. should doing sanitize input? i'm using latest mvc razor framework. using strong types. i've read html.encode, think html.textarea method doing this? have not implemented it. the razor part not implement of checking (since has no way of knowing consider valid input). database layer using in mvc deals injection attacks.

vb.net - Set Minimum Number in ComboBox -

Image
i using line generate collection of numbers combobox. main.combobox.items.addrange(enumerable.range(1, maxnum).select(function(s) s.tostring()).toarray()) i wondering how set minimum it? example, 6-100, instead of default 1-100. update: i using numbersetting value of 0 in project properties settings tab. numbersetting getting actual value from: my.settings.numbersetting = cint(combobox.text) once numbersetting has value, use maxnum set maximum number of options in combobox: dim maxnum = my.settings.numbersetting dim winners = enumerable.range(1, maxnum).orderby(function(r) rand.next()).take(5).toarray() this allows me 100 checkboxes if select 100 option combobox. looking set minimum option 6, 1, 2, 3, 4, , 5 not options in combobox. solved: private sub options_load(sender object, e eventargs) handles mybase.load dim maxnum = my.settings.numbersetting2 numbercombo.items.addrange(enumerable.range(6, maxnum - 5).select(function(s) s.tostring()).toarra...