Posts

c# - Access to StandardInput from NRECO.VideoConverter? -

i'm using answer this question pipe string of bitmaps ffmpeg. requires redirecting standardinput stream , writing it. is similar available nreco.videoconverter? there way either access running process, or access standardinput base stream? if want provide input data stdin or read output data stdout (or both) may use convertlivemedia method; has overloads different usage scenarios: var videoconv = new ffmpegconverter(); var ffmpegtask = videoconv.convertlivemedia( "rawvideo", h264stream, "h264", new convertsettings() { custominputargs = string.format(" -pix_fmt bgr24 -video_size 640x480 -framerate 5 ", framebmp.width, framebmp.height) }); ffmpegtask.start(); ffmpegtask.write( bmpbytes ); // call n times each input frame. image size should 640x480 ffmpegtask.stop(); you can adopt code snippet "image2pipe" if needed.

will IF SIGNAL SQLSTATE in mariadb exit stored procedure? -

i don't quite understand how mariadb signals work. i have stored procedure takes string input. testing string valid characters. if invalid characters found want send signal error invalid. stored procedure exit if signal sqlstate '......' set mesage_text='......' raised? or complete procedure before issuing signal? when using if...then statements not seem work. create procedure `testp`() begin if teststringsecurity('he;llo world') != 0 select 'invalid characters'; end if; select 'good go'; end; always returns good go . seems must wrap in if ... ... else valid case. though setting signal different. create procedure `testp`() begin if teststringsecurity('he;llo') != 0 select 'invalid characters'; else select 'good go'; end if; end using signal seem interrupt execution immediately. create procedure `testp`() begin declare exit handler sqlexception begin diagnostics condition 1 @sq...

sqlite - Android Room Persistence Library: Upsert -

android's room persistence library graciously includes @insert , @update annotations work objects or collections. have use case (push notifications containing model) require upsert data may or may not exist in database. sqlite doesn't have upsert natively, , workarounds described in so question . given solutions there, how 1 apply them room? to more specific, how can implement insert or update in room not break foreign key constraints? using insert onconflict=replace cause ondelete foreign key row called. in case ondelete causes cascade, , reinserting row cause rows in other tables foreign key deleted. not intended behavior. use @insert(onconflict = onconflictstrategy.replace) implement insert or replace , shown in the accepted answer on linked-to question.

forwarding a lua code to another -

i have lua code called lua file , wants assign value , print out value getting "nil", please me. here code: function main_setup() package.path = package.path ..";c:/users/kude/desktop/mqtt1/?.lua" require "ds18b20" end local = main_setup() print(a) output: nil function main_setup() package.path = package.path ..";c:/users/kude/desktop/mqtt1/?.lua" require "ds18b20" end this function not return anything. so local = main_setup() is equivalent to local = nil hence nil is expected output of print(a)

ruby on rails - How to check if nonce has been used? -

in rails 3.1.5 application, using ims-lti gem perform third-party authentication. perform authentication, 3 things must done: check request signature correct check if timestamp old check nonce has not been used the first 2 done, having trouble nonce check. questions have found deal generating nonces in rails, not checking them. there several related questions use oauth-plugin gem check nonce: rails oauth-plugin: multiple strategies causes duplicate nonce error oauth signature verification fails return false unless oauthnonce.remember(nonce, timestamp) unfortunately, oauth-plugin gem hasn't been updated since 2013, , not compatible version of oauth gem required lms-lti gem. it not appear oauth gem supports validating nonces. is there canned way check nonce, whether in native rails or through gem, or relegated to: creating nonce table checking nonce not in table storing nonce , timestamp in table cycling table drop entries expired timestamp ...

c# - disable dbclick event in Handson Grid -

i using handson table in project. getting issue related double-click function. step 1 . add grey color on button click handson table. step 2 . after when double-click on cell add/edit value, grey color of cell automatically disabled. how set grey color cell? example of problem: $(document).ready(function () { var data = [ ["2008", 10, 11, 12, 1], ["2009", 20, 11, 14, 0], ["2010", 30, 15, 12, 1] ]; var rowcount; var d = $("#example1grid").handsontable({ data: data, colheaders: ["", "kia", "nissan", "toyota", "honda"], cells: function (row, col, prop) { var cellproperties = {}; var hot = this.instance; rowcount = hot.countrows() - hot.countemptyrows(); return cellproperties; }, }); var buttons = { file: document.getelementbyid('btnbgcolor') }; but...

How to get the latest NuGet Packages during TFS2013 build -

Image
i've got local build getting correct nuget packages before build tfs (2013) build still fails. how latest packages before tfs build kicks off? i've read several articles talk deleting nuget.targets file solution, don't understand how solution can possibly know in our local nuget store packages if that??? based on this article i've added "$(solutiondir)\nuget restore" pre-build event of first project in solution built, doesn't seem working. @bikerdude - update 8/14/17 nope - nothing on process tab: