Posts

Dual command on batch file menu -

i new of this, took me hours make following: @echo off cls echo=========================================================================== echo menu echo=========================================================================== echo........................................................................... echo type 1,2 or 3 press enter: echo........................................................................... echo. echo 1 - server xxx.xxx.xxx.1 echo 2 - server xxx.xxx.xxx.2 echo 3 - exit echo. set /p opt=type 1,2 or 3 press enter: if %opt%==1 goto mstsc 1 if %opt%==2 goto mstsc 2 if %opt%==3 goto eof :mstsc 1 mstsc.exe /v:xxx.xxx.xxx.1 /admin /f goto eof :mstsc 2 mstsc.exe /v:xxx.xxx.xxx.2 /admin /f goto eof :eof exit when select options 1 , 3 work fine, when select option 2 same result option 1. it's not connecting second server, how can fixed? how can have command prompt close command executed? command ...

python - multithreading windows apache server -

i'm working apache 2.2, had tried run 2 threads (parallel) seeming it's not working 2 threads running sequentially. how can force running simultaneously (parallel) ?? test.wsgi:: import time def application(environ, start_response): status = '200 ok' output = str(time.time()) time.sleep(5) output += '<br/>' + str(time.time()) response_headers = [('content-type', 'text/html; charset=utf-8'), ('content-length', str(len(output)))] start_response(status, response_headers) return [output] i had inserted @ the end of httpd.conf following: include conf/extra/httpd-mpm.conf <ifmodule mpm_winnt_module> threadsperchild 253 maxrequestsperchild 0 </ifmodule> <virtualhost *> servername localhost wsgiscriptalias / c:\test\test.wsgi <directory c:\test> order deny,allow al...

c# - Load/Edit and Save XML Data on a different form -

Image
at moment have application looks this: it reads data xml file dataset, , sets datasource fit datagrid when user clicks on row, data within notes section displayed within textbox below when user clicks notes button brought new form, form2, data notes textbox brought across new textbox. want able able enter new text notes textbox on form 2 , when user clicks ok saves datagrid exactly this: http://youtu.be/mdmjmobrcsk?t=28m41s the code have @ moment ok button far below, , following error because haven't wrote datagridview1 on form. i'd know how user input textbox , 'update' xml file datagrid updated new notes i'm not sure if code how have linked datagridview1_cellcontentclick textbox below on form1, think need reuse last line on new form overwrite data i'm not sure if (e.rowindex >= 0) { datagridviewrow row = this.datagridview1.rows[e.rowindex]; //the data in cells notes column turns string , copied textb...

security - Auto Login from email link and PHP? -

i'm trying create link when clicked login user automatically , take them specific page. i've thought creating sort of hashed string contains user's id, username , few other pieces of info. when clicked these pieces of information looked in db , if validated login them in , redirect them specific page. for sites twitter , facebook when receive email notification , click link in email i'm automatically taken inbox on corresponding site. i'm trying duplicate behavior... are there security issues doing or there safer more preferred way? if want offer feature users, have take care of 2 things: the validity of created url must set in time (ex: 24hours, 48hours). the created url must work 1 specific user. (optionnal) created url work 1 page i propose kind of solution create url match these criteria (it's proof of concept): <?php $privatekey = 'somethingverysecret'; $username = 'cedric'; $url = 'my/personal/url';...

javascript - jQuery Virtual Keyboard plugin inserts the same character twice on Windows 8 touch devices -

i'm using virtual keyboard jquery got here ( https://github.com/mottie/keyboard/ ), works fine except on touch screen tablet running firefox + windows 8 when tap on key inputs character twice, reported on github project page under issues developer not responded yet , i'm not able find root of evil, kind of appreciated! thanks project page: http://mottie.github.io/keyboard/ github: https://github.com/mottie/keyboard/ reported issue: https://github.com/mottie/keyboard/issues/184/ i faced similar problem in qt5. double input may due system synthesizing mouse event primary touch point, resulting in 2 mouse events instead of one. 1 solution replace 'mousedown' keybinding touchstart follows $(input).keyboard({ keybinding : 'touchstart', alternatively write system hook filter out mouseeventf_fromtouch events.

javascript - insertAfter() is duplicating an element when I don't want it to -

okay, i'm making chatbot, , ran problem. need make function creates chat message everytime enter key pressed. far, it's coming out nicely, 1 problem. it's duplicating element, want 1 of. to see i'm talking about, go http://jsfiddle.net/matthewkosloski/bhxma/ , type out message, hit enter. notice how there 2 "foo!" messages? want one. i'd want make these messages go top-bottom in chronological order, can't until find out why duplication occuring! function insertafter(referencenode, newnode) { referencenode.parentnode.insertbefore(newnode, referencenode.nextsibling); } var robotmessage = usermessage; function intelresponse(){ // robot var robot = document.createelement("h4"); var robottext = document.createtextnode("robot"); robot.appendchild(robottext); robot.classname = "rtitle"; document.body.appendchild(robot); insertafter(usermessage, robot);...

ios - Set container view height to nib loaded subview height -

i loading subviews different .xib files , adding them container view. problem can't figure out how make container view's height automatically adjust subview. when access subview.frame.size.height comes correct value. example, 44. when set height of containerview making rect containerview.frame = gcrectmake(0, 0, containerview.frame.size.width, 44) not work , keeps original height. have tried [containerview sizetofit:subview.frame.size] no avail.