[Solved] A Boolean is required [closed]

So, if I’m reading your post correctly, you are trying to perform a bitwise comparison against your value ({DataTableCable.ColumnChange}) in the Crystal Reports code. Looking around online, I can’t seem to see anything that indicates that crystal can perform that kind of comparison. One alternative is to perform that calculation in your .Net code, and … Read more

[Solved] for(++i;++i;++i) the second argument is < or

In the second argument it is actually ++i!=0, The loop is interpreted as for(++i;++i!=0;++i) If you start with a positive i or 0, it will be an infinite loop and will invoke undefined behavior when i reaches INT_MAX. If i was -Ve initially the loop may stop at a defined run. EDIT: As you changed … Read more

[Solved] Need a preg_replace or best option for this conversion [closed]

Your question is very unclear and I may be way off, but here is my attempt to your question. $link = array(‘S1, Ep1’, ‘S1, Ep2’, ‘S1, Ep3’, ‘S1, Ep10’); $results = preg_replace_callback(‘~^S(\d+)\D+(\d+)$~m’, function($m) { $which = strlen($m[2]) > 1 ? ’00’ : ‘000’; return $m[1] . $which . $m[2]; }, array_values($link)); print_r($results); Output Array ( … Read more

[Solved] How can I detect a simulated iOS device’s screen size?

The following returns a CGRect holding the size of your device’s screen in points. [[UIScreen mainScreen] bounds]; Note that the following would return the size of your screen without the status bar. Try to think of this as the frame rectangle for your application’s window. [[UIScreen mainScreen] applicationFrame]; 2 solved How can I detect a … Read more

[Solved] Regex for replacing certain string in python [closed]

You need regular expressions for this: import re s=”abc xyz.xyz(1, 2, 3) pqr” re.sub(r'[a-z]{3}\.{[a-z]{3}\([^)]*\)’, ‘NULL’, s) Explanation: [a-z]{3} stands for 3 small letters (lower case) \. escapes the dot, as it is special character [a-z]{3} again 3 small letters \( escapes the left parenthesis [^)]* any character but right parenthesis, 0 or more time \) … Read more

[Solved] how to extract ipaddress,date&time,http:// in a log file using java [closed]

File file = new File(“test.txt”); String word = “abc,catch,profile”; Scanner scanner = null; try { scanner = new Scanner(file); } catch (FileNotFoundException e) { System.out.println(“Error ” + e); } // now read the file line by line while (scanner.hasNextLine()) { String line = scanner.nextLine(); StringTokenizer st = new StringTokenizer(word, “,”); while (st.hasMoreTokens()) { if (line.contains(st.nextToken())) … Read more

[Solved] SQL – Insert 1000 values fast [closed]

I don’t know what data base are you using. You can search for “Bulk Insert” for your data base, it allows you to insert complete file in one step. If you need to create an instruction like this: INSERT CodesTable VALUES (91111), (91112), … (91999) You could open/copy&past the file in query editor. Make a … Read more