This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //+------------------------------------------------------------------+ | |
| //| SignalITF.mqh | | |
| //| Copyright © 2010, MetaQuotes Software Corp. | | |
| //| http://www.metaquotes.net | | |
| //| Revision 2011.03.30 | | |
| //+------------------------------------------------------------------+ | |
| #include <Expert\ExpertSignal.mqh> | |
| // wizard description start | |
| //+------------------------------------------------------------------+ | |
| //| Description of the class | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PROCEDURE process_all_rows | |
| IS | |
| TYPE employees_aat | |
| IS TABLE OF employees%ROWTYPE | |
| INDEX BY PLS_INTEGER; | |
| l_employees employees_aat; | |
| BEGIN | |
| SELECT * | |
| BULK COLLECT INTO l_employees | |
| FROM employees; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.net.URL; | |
| import java.net.URLConnection; | |
| import java.nio.charset.Charset; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ArrayList<String> stock_list = new ArrayList<String>(); | |
| stock_list.add("stock1"); | |
| stock_list.add("stock2"); | |
| String[] stockArr = new String[stock_list.size()]; | |
| stockArr = stock_list.toArray(stockArr); | |
| for(String s : stockArr) | |
| System.out.println(s); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true"); | |
| System.setProperty("com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump", "true"); | |
| System.setProperty("com.sun.xml.ws.transport.http.HttpAdapter.dump", "true"); | |
| System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump", "true"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.StringTokenizer; | |
| public class StringTokenizer { | |
| public static void main(String[] args) { | |
| String str = "This is String , split by StringTokenizer, created by mkyong"; | |
| StringTokenizer st = new StringTokenizer(str); | |
| System.out.println("---- Split by space ------"); | |
| while (st.hasMoreElements()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function curl_download($Url){ | |
| // is cURL installed yet? | |
| if (!function_exists('curl_init')){ | |
| die('Sorry cURL is not installed!'); | |
| } | |
| // OK cool - then let's create a new cURL resource handle | |
| $ch = curl_init(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Test(){ | |
| $NumberOfArguments = func_num_args(); | |
| for ($x=0; $x < $NumberOfArguments; $x++){ | |
| $Argument = func_get_arg($x); | |
| print $Argument . "\n"; | |
| } | |
| // Another way: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function array_remove_empty($arr){ | |
| $narr = array(); | |
| while(list($key, $val) = each($arr)){ | |
| if (is_array($val)){ | |
| $val = array_remove_empty($val); | |
| // does the result array contain anything? | |
| if (count($val)!=0){ | |
| // yes :-) | |
| $narr[$key] = $val; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function random_password($length, $characters='abcdefgh1234567890'){ | |
| if ($characters == ''){ return ''; } | |
| $chars_length = strlen($characters)-1; | |
| mt_srand((double)microtime()*1000000); | |
| $pwd = ''; | |
| while(strlen($pwd) < $length){ | |
| $rand_char = mt_rand(0, $chars_length); |
NewerOlder