Posts

c# - Windows Universal App - Launch CMD from app -

i'm building first win 10 app (in visual c#) , had quick question. (i'm java/ android guy) i want able run cmd line programs app. desktop app , need have ability shutdown, restart, lock, , abort restart app. know can use 'shutdown' cmd, how can launch it? thank you! any program can run command line program can run without command line. example, shutdown ; try opening run box ( win + r ) , typing: shutdown /r /t 60 you'll see windows warns system rebooting in 60 seconds (of course, shutdown /a abort shutdown). so, should able use process.start run command. no need launch full command line.

sql server - Merge the result of an Inner Join to a table SQL -

using sql query have result used inner join, results displayed underneath query. how can jot results down in existing table ie merge it? update curinghistorydata.dbo.curingdata set pressnumber = master.dbo.tagtable curinghistorydata.dbo.curingdata.tagindex = master.dbo.tagtable.tagindex; when execute error msg 4104, level 16, state 1, line 11 multi-part identifier "master.dbo.tagtable.tagindex" not bound. dont know going wrong. both tables exist way. update t1 set t1.pressnumber = t2.pressnumber curinghistorydata.dbo.curingdata t1 inner join master.dbo.tagtable t2 on t1.tagindex = t2.tagindex;

java - How to move a sheet with smartsheet api -

when create new sheet using smartsheet java api created in "sheets" folder under home. possible move sheet or create in different workspace/folder? below have listed example on how create sheet in new folder how copy existing sheet new folder. if want move sheet new folder can first copy sheet new folder , delete original sheet. please note, both sheet id , folder id can retrieved right clicking on sheet or folder inside smartsheet , clicking properties. create sheet in folder string token = "your_token"; smartsheet smartsheet = new smartsheetbuilder().setaccesstoken(token).build(); // define sheet copy sheet sheet = new sheet(); sheet.setname("new sheet"); // create columns new sheet list<column> columns = new arraylist<column>(); column column = new column(); column.settitle("column #1"); column.setprimary(true); column.settype(columntype.text_number); columns.add(column); column column2 = new column(); column2...

nginx - ipython notebook server SSL error -

i have ssl certificate server (its .crt bundle) keep getting errors when trying use ipython notebook server i have nginx setup in windows. access ipython setup via reverse proxy. followed here thread here: how configure ipython behind nginx in subpath? i followed instructions on how set notebook server . i'm using /ipython prefix. changed location of certificate, .crt file , not .pem , else left same (besides password). whenever try access www.domain.com/ipython, error: [w 03:43:22.463 notebookapp] ssl error on 916 ('127.0.0.1', 1586): [ssl: wrong_version_number] wrong version number (_ssl.c:581) [e 03:43:22.463 notebookapp] uncaught exception traceback (most recent call last): file "c:\python27\lib\site-packages\tornado\http1connection.py", line 693, in _server_request_loop ret = yield conn.read_response(request_delegate) file "c:\python27\lib\site-packages\tornado\gen.py", line 870, in run value = future.r...

java - JSON Replacing '.' with -

i want program takes json file input , results json file. input file contains like: {"empname":"surname.firstname","department.name":"production","salary":11254.42} the output file must replace '.'(dot) '_'(underscore) of input json. expecting output: {"empname":"surname_firstname","department_name":"production","salary":11254_42} i want program using java, without using serialization , deserialization. can 1 help? if using java 7+: string str = new string(files.readallbytes(paths.get("in.json")), standardcharsets.utf_8) .replace('.', '_'); files.write(paths.get("out.json"), str.getbytes("utf-8"), standardopenoption.write);

javascript - Fluid Packery Layout -

i posted yesterday there seemed confusion. posting again, , try clearer time around. i big fan of wordpress theme: http://prothemeus.com/demo/litho/ following reasons: it positions , scales content tiles fill browser window 100% when resizing browser window re-positions , re-scales these tiles still fills browser window 100% when resizing browser window, motion of tiles fluid. no gaps form between tiles, has nice action all. love. the tiles never smaller amount, 240px wide. once go smaller 240px, grid reshuffles tiles there less tiles in each row. (difficult explain this, play size of browser window , see mean) the things doesn't work me theme: cannot display content tiles of varying sizes. key me want draw attention posts. specific, featured post tiles double width , height of regular post tiles. so result have customised theme stripping out litho theme's javascript, renaming nodes , containers etc. , replacing packery libraries, position content tiles: ...

c# - WCF RESTful Service Error -

hi came accross error , cant figure out how fix it. have restful wcf service trying retrieve data sql server database. thanks. error 1 'restservice.restserviceimpl.getcompany(string)': not code paths return value my coding restserviceimpl.svc.cs public class restserviceimpl : irestserviceimpl { public string xmldata(string id) { return ("you requested product" + id); } public string jsondata(string id) { return ("you requested product" + id); } //error underlined @ getcompany public company getcompany(string compid) { company comp = new company(); { sqlconnection con = new sqlconnection(); con.connectionstring = ""; con.open(); sqlcommand cmd = new sqlcommand("select companyname tblcompany", con); con.open(); ...