Posts

bash - How do I prevent this infinite loop in PowerShell? -

say have several text files contain word 'not' , want find them , create file containing matches. in linux, might do grep -r not *.txt > found_nots.txt this works fine. in powershell, following echos want screen get-childitem *.txt -recurse | select-string not however, if pipe file: get-childitem *.txt -recurse | select-string not > found_nots.txt it runs ages. ctrl-c exit , take @ found_nots.txt file huge. looks though powershell includes output file 1 of files search. every time adds more content, finds more add. how can stop behavior , make behave more unix version? use -exclude option. get-childitem *.txt -exclude 'found_nots.txt' -recurse | select-string not > found_nots.txt

Are there any open source resources for SQL schema design patterns? -

i can barely count number of times i've created "users" table, similar "computers" , "customers". i've tried looking around, haven't ever seen resource modeling these schema see on , on again. seems of these objects should some-kind-of-solved now. there this? i have never seen either , i'm not sure it's necessary. yes, there lot of similarities every application different. @ 1 point had built internal library of of more "standard" tables (user example) use jumping point, have yet create 2 identical tables different systems. thus, have yet ever use library built because can write new table quicker , more error free can modify existing example work current project.

c# - Delving into the world of XML (Windows Phone) Error I dont understand (The ' ' character, hexadecimal value 0x20, cannot be included in a name.) -

so starting learn how use xml data within app , decided use free data cannot life of me working code far. (i have done few apps static data before hey apps designed use web right? :p) public partial class mainpage : phoneapplicationpage { list<xmlitem> xmlitems = new list<xmlitem>(); // constructor public mainpage() { initializecomponent(); loadxmlitems("http://hatrafficinfo.dft.gov.uk/feeds/datex/england/currentroadworks/content.xml"); test(); } public void test() { foreach (xmlitem item in xmlitems) { testing.text = item.title; } } public void loadxmlitems(string xmlurl) { webclient client = new webclient(); client.openreadcompleted += (sender, e) => { if (e.error != null) return; stream str = e.result; xdocument xdoc = xdocument.load(str); ***xmlitems = (from ite...

c# - About Jamaa SMPP Asynchronous operation -

i have implemented application using jamaa lib , jamaa net. developers. but facing problem when use asynchronous sending operation. unhandled exception being raised continuously. highly appreciated if can me figure out problem. please noted. receiving , sending sms using same application. need send on average 100,000 sms per day. simultaneously receiving sms smsc also. in advance. my code snippet namespace transciever { class program { static void main(string[] args) { smppclient client = new smppclient(); mysqlconnect con = new mysqlconnect(); textmessage msg = new textmessage(); settings settings = new settings(); smppconnectionproperties properties = client.properties; string sysid = configurationmanager.appsettings["systemid"]; string pswd = configurationmanager.appsettings["password"]; string hst = configurationmanager.appsettings["host"]; int port = int32.pa...

compilation - What program/s or application can compile my Java Server Code, Android Client Code and Asynctask code? -

assuming have java server code, android client code , asynctask code, program or application can compile / write codes? what program can run code in java server, android client, , asynctask? found codes on google don't know paste it. i'm missing program/application. / suitable application(s) can job? i'm not sure mean asynctask code part of android code. anyway, android code can run eclipse need android sdk , adt plugin eclipse. details of can found here . there other ides used , if beginner @ android google has documentation eclipse make things easier. as java server, can run in eclipse, there lots of other browsers can used, netbeans example.

javascript - Enable/Disable debug code dynamically -

i'm writing decent sized javascript animation library, include debugging code in. check : if(mylib.debugger){ console.warn('warning message'); } however if runs couple thousand times second, cause performance issues. add in few more checks throughout code , effect more noticeable. what i'm wondering if possible check onload if debugger should enabled, , if so... turn this: //debugger if(!this.name) console.warn('no name provided'); into: if(!this.name) console.warn('no name provided'); leaving code commented if not enabled, , uncommenting if is, removing possible performance issues. done somehow regular expression on entire script if loaded in through ajax? i'm trying avoid need 2 versions of same code, lib.dbug.js , lib.js. cross browser compatibility not of great importance (i'm worried new browsers), see nice have item. if possible however, great thing have. any insight appreciated. the simplest way check if d...

Android compare two fragments -

when change fragment compare new 1 current one. if same, not necessary replace them. i tried public void displayfragment(fragment fragment){ fragmentmanager fm = getsupportfragmentmanager(); fragment currentfragment = fm.findfragmentbyid(r.id.content_frame); if(!currentfragment.equals(fragment)) getsupportfragmentmanager().begintransaction().addtobackstack(null).replace(r.id.content_frame, fragment).commit(); } but not work , fragment changed if new 1 same a solution ? thanks edit the solution : public void displayfragment(fragment fragment){ fragmentmanager fm = getsupportfragmentmanager(); fragment currentfragment = fm.findfragmentbyid(r.id.content_frame); if(!fragment.getclass().tostring().equals(currentfragment.gettag())){ getsupportfragmentmanager() .begintransaction() .addtobackstack(null) .replace(r.id.content_frame, fragment, fragment.getclass().tostring()) // add , tag new fragment .comm...