ElaKiri Programmer's Club

MihiCherub

Well-known member
  • Sep 14, 2009
    18,861
    1
    9,623
    113
    Gampaha
    කවුරු හරි දන්නවනම් මට කියල දෙන්නකෝ java වලින් mysql database එකෙන් ගත්තු backup එක restore කරන හැටි
    මං නෙට් එකේ පීර පීර හෙව්වා එක එක ඒවා හම්බු උනා. එකකින් වත් හරියට වැඩේ කරගන්න බැරිවුනා. දැන් එපාවෙලා ඉන්නේ අප්පා. මං මේ තාම නිදි නෑ. :sorry: මේ project එකක් දාගෙන හදනවා . දැන් මේක එපා වෙලා අප්පා ඉන්නේ pissu wage
    :growl::oo:
    ගානක් දීපිය :dull:
    Code:
        public static void setRestore(String source, Component component) {
           ResultSet rs = db.getdata("SELECT @@basedir");
            try {
                if (rs.first()) {
                    String path = "\"" + rs.getString(1) + "bin" +  "\\mysql.exe\" -uroot -p123 testdb -e \"source " + source + "\"";
                    System.out.println(path);
                    Process pros = Runtime.getRuntime().exec(path);
                    int count = pros.waitFor();
    
                    if (count == 0) {
                        MessageDialog.customInfoDialog(component, "Backup restored successfully!\nPlease restart the system.");
                        System.exit(0);
                    } else {
                        MessageDialog.customErrorDialog(component, "Could not restore the backup file.");
                    }
                }
            } catch (SQLException ex) {
                Logger.getLogger(dbHandling.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(dbHandling.class.getName()).log(Level.SEVERE, null, ex);
            } catch (InterruptedException ex) {
                Logger.getLogger(dbHandling.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    u<username> p<password> <database> -e
     
    • Like
    Reactions: ilanganthilaka

    ilanganthilaka

    Well-known member
  • Jun 4, 2008
    12,435
    1,004
    113
    ගානක් දීපිය :dull:
    Code:
        public static void setRestore(String source, Component component) {
           ResultSet rs = db.getdata("SELECT @@basedir");
            try {
                if (rs.first()) {
                    String path = "\"" + rs.getString(1) + "bin" +  "\\mysql.exe\" -uroot -p123 testdb -e \"source " + source + "\"";
                    System.out.println(path);
                    Process pros = Runtime.getRuntime().exec(path);
                    int count = pros.waitFor();
    
                    if (count == 0) {
                        MessageDialog.customInfoDialog(component, "Backup restored successfully!\nPlease restart the system.");
                        System.exit(0);
                    } else {
                        MessageDialog.customErrorDialog(component, "Could not restore the backup file.");
                    }
                }
            } catch (SQLException ex) {
                Logger.getLogger(dbHandling.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(dbHandling.class.getName()).log(Level.SEVERE, null, ex);
            } catch (InterruptedException ex) {
                Logger.getLogger(dbHandling.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    u<username> p<password> <database> -e


    niyamai machan
    keep it up
    rep 10+
     

    Voltage

    Well-known member
  • Feb 6, 2012
    21,723
    1
    15,120
    113
    ගානක් දීපිය :dull:
    Code:
        public static void setRestore(String source, Component component) {
           ResultSet rs = db.getdata("SELECT @@basedir");
            try {
                if (rs.first()) {
                    String path = "\"" + rs.getString(1) + "bin" +  "\\mysql.exe\" -uroot -p123 testdb -e \"source " + source + "\"";
                    System.out.println(path);
                    Process pros = Runtime.getRuntime().exec(path);
                    int count = pros.waitFor();
    
                    if (count == 0) {
                        MessageDialog.customInfoDialog(component, "Backup restored successfully!\nPlease restart the system.");
                        System.exit(0);
                    } else {
                        MessageDialog.customErrorDialog(component, "Could not restore the backup file.");
                    }
                }
            } catch (SQLException ex) {
                Logger.getLogger(dbHandling.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(dbHandling.class.getName()).log(Level.SEVERE, null, ex);
            } catch (InterruptedException ex) {
                Logger.getLogger(dbHandling.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    u<username> p<password> <database> -e

    ඔබතුමා දෙයියෙක් නෙවේ දේවාලයක්
    මං අර කියන @@basedir කෑල්ල වට්ටගන්න බැරිව පැයගානක් දහ දුක් විදලා ඔයාගෙ code එකෙන් තමයි සීන් එක හරියටම මීරර් කරගත්තේ මචන්
    :love::love:
    670px-Praise-and-Worship-God-Step-2.jpg

    ඔයගොල්ලේ ඉන්න එක ලොකු දෙයක් අප්පා අපිට. සමහර වෙලාවට stackOverFlow එකේ කොච්චර කරක් ගැහුවත් වැඩේ කරගන්න වෙන්නෙ නැ​
     
    Last edited:

    MihiCherub

    Well-known member
  • Sep 14, 2009
    18,861
    1
    9,623
    113
    Gampaha
    ඔබතුමා දෙයියෙක් නෙවේ දේවාලයක්
    මං අර කියන @@basedir කෑල්ල වට්ටගන්න බැරිව පැයගානක් දහ දුක් විදලා ඔයාගෙ code එකෙන් තමයි සීන් එක හරියටම මීරර් කරගත්තේ මචන්
    :love::love:

    ඔයගොල්ලේ ඉන්න එක ලොකු දෙයක් අප්පා අපිට. සමහර වෙලාවට stackOverFlow එකේ කොච්චර කරක් ගැහුවත් වැඩේ කරගන්න වෙන්නෙ නැ​
    :D:cool: ඕනෙ නම් @@basedir නැතිව ඔතනට පාත් එක කෝඩ් කරල ගන්නත් පුලුවන්. 32 ද 64 ද කියල බලල පාත් එක හදාගත්ත. මේක බලන්න.

    http://dev.mysql.com/doc/refman/5.0/en/mysql-server.html
     

    ilanganthilaka

    Well-known member
  • Jun 4, 2008
    12,435
    1,004
    113
    machan codeigniror walin gmail account ekakata mail ekak yawanna hadanakota error rkak enawa.

    meka thama error eka


    Failed to authenticate password. Error: 534-5.7.14 Please log in via your web browser and then try again. 534-5.7.14

    menna code eka

    Code:
    	function index(){ 
    	        $config['protocol'] = 'smtp';
                    $config['smtp_host'] = 'ssl://smtp.googlemail.com';
                    $config['smtp_port'] = '465';
                    $config['smtp_user'] = '[email protected]';
                    $config['smtp_pass'] = 'mypassword';
    		$this->load->library('email',$config);
    		$this->email->set_newline("\r\n");
    		$this->email->from('[email protected]','My Name');
    		$this->email->to('[email protected]');
    		$this->email->subject('Email Test');
    		$this->email->message('Hello friend');		
    		
    		if($this->email->send()){
    			echo 'Email send successvfully';		
    		}	
    		else{
    			show_error($this->email->print_debugger());
    
    		}
             }

    mama dapu password ekath hari

    me aula hadaganna kata hari help ekak denna muluwanda machan :(
     

    MihiCherub

    Well-known member
  • Sep 14, 2009
    18,861
    1
    9,623
    113
    Gampaha
    machan codeigniror walin gmail account ekakata mail ekak yawanna hadanakota error rkak enawa.

    meka thama error eka


    Failed to authenticate password. Error: 534-5.7.14 Please log in via your web browser and then try again. 534-5.7.14

    menna code eka

    Code:
        function index(){ 
                $config['protocol'] = 'smtp';
                    $config['smtp_host'] = 'ssl://smtp.googlemail.com';
                    $config['smtp_port'] = '465';
                    $config['smtp_user'] = '[email protected]';
                    $config['smtp_pass'] = 'mypassword';
            $this->load->library('email',$config);
            $this->email->set_newline("\r\n");
            $this->email->from('[email protected]','My Name');
            $this->email->to('[email protected]');
            $this->email->subject('Email Test');
            $this->email->message('Hello friend');        
            
            if($this->email->send()){
                echo 'Email send successvfully';        
            }    
            else{
                show_error($this->email->print_debugger());
    
            }
             }
    mama dapu password ekath hari

    me aula hadaganna kata hari help ekak denna muluwanda machan :(
    ඔයාගෙ codes වල අවුලක් නැත්නම් email එක compose කරන email එකට log වෙන්න. මෙන්න මේ වගේ email එකක් ඇවිත් ඇති. ඒකෙ තියෙන instructions follow කරන්න.

    Hi YourAccount

    We recently blocked a sign-in attempt to your Google Account [[email protected]].

    Sign in attempt details
    Date & Time: Wednesday, February 23, 2015 7:16:59 AM UTC
    Location: Western Province, Sri Lanka

    If this wasn't you
    Please review your Account Activity page at https://security.google.com/settings/security/activity to see if anything looks suspicious. Whoever tried to sign in to your account knows your password; we recommend that you change it right away.

    If this was you
    You can switch to an app made by Google such as Gmail to access your account (recommended) or change your settings at https://www.google.com/settings/security/lesssecureapps so that your account is no longer protected by modern security standards.

    To learn more, see https://support.google.com/accounts/answer/6010255.

    Sincerely,
    The Google Accounts team


    හරි ගියා නම් මෙහෙම email එකක් එයි,

    Code:
    Hi YourAccount,               
                  
                      You recently changed your security settings so that your Google Account [[email protected]] is no longer protected by modern security standards.
     

    Raghuvaran

    Member
    Mar 22, 2010
    35
    0
    0
    Please help me to find the Python syllabus

    Please help me to find the University of Colombo 1st year python syllabus. (Computer Science)
     

    markhaloce

    Member
    Mar 7, 2013
    10,298
    677
    0
    17
    The Real North
    ප්‍රෝග්‍රෑමිං සිඞ්හලයෝ...
    මොකක් හරි ඇප්ලිකේශන් එකක එන්න පුළුවන් එරර් වින්ඩෝස් ඔක්කොම බලාගන්න මොකක් හරි ක්‍රමයක් තියෙද ?
    වින්ඩෝ එකේ ටයිටල් එක විතරක් තිබ්බත් ඇති...
    Internet Download Manager සොෆ්ට්වෙයා එක.
    මොකක් හරි හේතුවකිං ඩව්න්ලෝඩ් එකක් ෆේල් වුනාම එක එක විදිහෙ ෆේලර් එක අනුව එරර් මැසේජස් පෙන්නනවනෙ..
    මට ඕනෙ ඒ විදිහට පෙන්නන ඔක්කොම එරර් මැසේජස්, වින්ඩෝස් වල ටයිටල්ස් දැනගන්න..
    කනෙක්ශන් එක සැරින් සැරේ ඩිස්කනෙක්ට් වෙනව..
    IDM එකේ මොක්ක හරි බෑවෙන්න දාල ගියාම කනෙක්ශන් එක ඩිස්කනෙට් වෙලා ආයෙම හරිගිහිං නං අපරාදෙ කරන්ට් එක IDM එක ඔහේ බලං ඉන්නව.
    ඩව්න්ලෝඩ් වෙන එක නැවතිලා එරර් එකක් ආවොත් කොම හයිබර්නේට් වෙන්නවත් ප්‍රෝග්‍රෑම් කෑල්ලක් ලියාගන්න බැලුවෙ..
    උදාව්...
     

    ilanganthilaka

    Well-known member
  • Jun 4, 2008
    12,435
    1,004
    113
    ඔයාගෙ codes වල අවුලක් නැත්නම් email එක compose කරන email එකට log වෙන්න. මෙන්න මේ වගේ email එකක් ඇවිත් ඇති. ඒකෙ තියෙන instructions follow කරන්න.

    Hi YourAccount

    We recently blocked a sign-in attempt to your Google Account [[email protected]].

    Sign in attempt details
    Date & Time: Wednesday, February 23, 2015 7:16:59 AM UTC
    Location: Western Province, Sri Lanka

    If this wasn't you
    Please review your Account Activity page at https://security.google.com/settings/security/activity to see if anything looks suspicious. Whoever tried to sign in to your account knows your password; we recommend that you change it right away.

    If this was you
    You can switch to an app made by Google such as Gmail to access your account (recommended) or change your settings at https://www.google.com/settings/security/lesssecureapps so that your account is no longer protected by modern security standards.

    To learn more, see https://support.google.com/accounts/answer/6010255.

    Sincerely,
    The Google Accounts team


    හරි ගියා නම් මෙහෙම email එකක් එයි,

    Code:
    Hi YourAccount,               
                  
                      You recently changed your security settings so that your Google Account [[email protected]] is no longer protected by modern security standards.

    wade goda giya machan
    mail eka yanawa elatama
    ethakota machan mail eka yawana hama gmail account ekema oya widihata
    security settings hadala inna wenawada?
     

    DooA

    Well-known member
  • Jun 22, 2011
    5,202
    773
    113
    ආගිය අතක් නැත
    ප්‍රෝග්‍රෑමිං සිඞ්හලයෝ...
    මොකක් හරි ඇප්ලිකේශන් එකක එන්න පුළුවන් එරර් වින්ඩෝස් ඔක්කොම බලාගන්න මොකක් හරි ක්‍රමයක් තියෙද ?
    වින්ඩෝ එකේ ටයිටල් එක විතරක් තිබ්බත් ඇති...
    Internet Download Manager සොෆ්ට්වෙයා එක.
    මොකක් හරි හේතුවකිං ඩව්න්ලෝඩ් එකක් ෆේල් වුනාම එක එක විදිහෙ ෆේලර් එක අනුව එරර් මැසේජස් පෙන්නනවනෙ..
    මට ඕනෙ ඒ විදිහට පෙන්නන ඔක්කොම එරර් මැසේජස්, වින්ඩෝස් වල ටයිටල්ස් දැනගන්න..
    කනෙක්ශන් එක සැරින් සැරේ ඩිස්කනෙක්ට් වෙනව..
    IDM එකේ මොක්ක හරි බෑවෙන්න දාල ගියාම කනෙක්ශන් එක ඩිස්කනෙට් වෙලා ආයෙම හරිගිහිං නං අපරාදෙ කරන්ට් එක IDM එක ඔහේ බලං ඉන්නව.
    ඩව්න්ලෝඩ් වෙන එක නැවතිලා එරර් එකක් ආවොත් කොම හයිබර්නේට් වෙන්නවත් ප්‍රෝග්‍රෑම් කෑල්ලක් ලියාගන්න බැලුවෙ..
    උදාව්...


    oya features tyena download manager ekak balapanko iwarai ne
     

    MihiCherub

    Well-known member
  • Sep 14, 2009
    18,861
    1
    9,623
    113
    Gampaha
    wade goda giya machan
    mail eka yanawa elatama
    ethakota machan mail eka yawana hama gmail account ekema oya widihata
    security settings hadala inna wenawada?
    මම දන්න තරමින් ඔව්. අනිවා බ්ලොක් වෙලා යනව. වෙන app එකක් හරහා gmail, FB acount එක use වෙනව නම් ඒක auto බ්ලොක් කරනව. :dull:
     

    MihiCherub

    Well-known member
  • Sep 14, 2009
    18,861
    1
    9,623
    113
    Gampaha
    ප්‍රෝග්‍රෑමිං සිඞ්හලයෝ...
    මොකක් හරි ඇප්ලිකේශන් එකක එන්න පුළුවන් එරර් වින්ඩෝස් ඔක්කොම බලාගන්න මොකක් හරි ක්‍රමයක් තියෙද ?
    වින්ඩෝ එකේ ටයිටල් එක විතරක් තිබ්බත් ඇති...
    Internet Download Manager සොෆ්ට්වෙයා එක.
    මොකක් හරි හේතුවකිං ඩව්න්ලෝඩ් එකක් ෆේල් වුනාම එක එක විදිහෙ ෆේලර් එක අනුව එරර් මැසේජස් පෙන්නනවනෙ..
    මට ඕනෙ ඒ විදිහට පෙන්නන ඔක්කොම එරර් මැසේජස්, වින්ඩෝස් වල ටයිටල්ස් දැනගන්න..
    කනෙක්ශන් එක සැරින් සැරේ ඩිස්කනෙක්ට් වෙනව..
    IDM එකේ මොක්ක හරි බෑවෙන්න දාල ගියාම කනෙක්ශන් එක ඩිස්කනෙට් වෙලා ආයෙම හරිගිහිං නං අපරාදෙ කරන්ට් එක IDM එක ඔහේ බලං ඉන්නව.
    ඩව්න්ලෝඩ් වෙන එක නැවතිලා එරර් එකක් ආවොත් කොම හයිබර්නේට් වෙන්නවත් ප්‍රෝග්‍රෑම් කෑල්ලක් ලියාගන්න බැලුවෙ..
    උදාව්...
    ඕකට ඩවුන්ලෝඩ් මැනේජරේ අස්සට ඔබන්න දගලන්නෙ මක්කටද.. උබ time out loop එකක් එක්ක කෝඩ් කෑල්ලක් ලියපන් bandwidth එක monitor කරන්න. ඊට පස්සෙ ඒක thread එකක් අස්සට දාල බලපන් Download speed එක.

    Code:
    if(downloadSpeed < 10 kbps){
        System.shutdown();
    }
    :P:P
     

    markhaloce

    Member
    Mar 7, 2013
    10,298
    677
    0
    17
    The Real North
    ඕකට ඩවුන්ලෝඩ් මැනේජරේ අස්සට ඔබන්න දගලන්නෙ මක්කටද.. උබ time out loop එකක් එක්ක කෝඩ් කෑල්ලක් ලියපන් bandwidth එක monitor කරන්න. ඊට පස්සෙ ඒක thread එකක් අස්සට දාල බලපන් Download speed එක.

    Code:
    if(downloadSpeed < 10 kbps){
        System.shutdown();
    }
    :P:P

    නෙට් කනෙක්ශන් එක මොනිටර් කරන්නෙ කෝමද ?
    Win32 වලට තාම ආධුනිකයි බං :(
     

    MihiCherub

    Well-known member
  • Sep 14, 2009
    18,861
    1
    9,623
    113
    Gampaha
    නෙට් කනෙක්ශන් එක මොනිටර් කරන්නෙ කෝමද ?
    Win32 වලට තාම ආධුනිකයි බං :(
    win 32 කියල කියන්නෙ මොකද්ද. :oo: උබ ඇඩ්වාන්ස් ටෙක්නික් ටිකක් ඉගෙන ගන්නෙ නැතුව කොමා ඇසෙම්බල් කර කර හිටපන්. :rofl::lol:
     

    K_ZONE

    Well-known member
  • May 28, 2009
    5,156
    4,057
    113
    invoke db "Injected Memory"
    ප්‍රෝග්‍රෑමිං සිඞ්හලයෝ...
    මොකක් හරි ඇප්ලිකේශන් එකක එන්න පුළුවන් එරර් වින්ඩෝස් ඔක්කොම බලාගන්න මොකක් හරි ක්‍රමයක් තියෙද ?
    වින්ඩෝ එකේ ටයිටල් එක විතරක් තිබ්බත් ඇති...
    Internet Download Manager සොෆ්ට්වෙයා එක.
    මොකක් හරි හේතුවකිං ඩව්න්ලෝඩ් එකක් ෆේල් වුනාම එක එක විදිහෙ ෆේලර් එක අනුව එරර් මැසේජස් පෙන්නනවනෙ..
    මට ඕනෙ ඒ විදිහට පෙන්නන ඔක්කොම එරර් මැසේජස්, වින්ඩෝස් වල ටයිටල්ස් දැනගන්න..
    කනෙක්ශන් එක සැරින් සැරේ ඩිස්කනෙක්ට් වෙනව..
    IDM එකේ මොක්ක හරි බෑවෙන්න දාල ගියාම කනෙක්ශන් එක ඩිස්කනෙට් වෙලා ආයෙම හරිගිහිං නං අපරාදෙ කරන්ට් එක IDM එක ඔහේ බලං ඉන්නව.
    ඩව්න්ලෝඩ් වෙන එක නැවතිලා එරර් එකක් ආවොත් කොම හයිබර්නේට් වෙන්නවත් ප්‍රෝග්‍රෑම් කෑල්ලක් ලියාගන්න බැලුවෙ..
    උදාව්...

    ඔය වගේ බිජජෙ වැඩ කරන්න පුලුවන් VB Script වලින්,
    ඒත් මම නම් ඔය වගේ Automations වලට පාවිච්චි කරන්නෙ Autoit
    >>https://www.autoitscript.com/site/autoit/

    au3spy_notepad.png


    Window Titles and Text (Basic) > https://www.autoitscript.com/autoit3/docs/intro/windowsbasic.htm

    Window Titles and Text (Advanced) > https://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm

    මෙන්න මේකෙ තියෙනවා උබට ඕන දේ කරන හැටි ටිකක් සරලව.

    http://www.maketecheasier.com/create-automation-scripts-for-windows-with-autoit/

    Aitoit කියන්නෙ පට්ටම ලේසි Language එකක්, දවසක් ඇති ඉගෙන ගන්න, ඒ වගෙම කෙලින්ම API එක පාවිච්චි කරන නිසා පට්ට Powerful :P

    කැමති ඕනම දෙයක් කරන්න පුලුවන්,
     

    markhaloce

    Member
    Mar 7, 2013
    10,298
    677
    0
    17
    The Real North
    win 32 කියල කියන්නෙ මොකද්ද. :oo: උබ ඇඩ්වාන්ස් ටෙක්නික් ටිකක් ඉගෙන ගන්නෙ නැතුව කොමා ඇසෙම්බල් කර කර හිටපන්. :rofl::lol:

    raw වින්ඩෝස් Api එක බං.. ඒකෙන්නෙ වින්ඩෝස් වල ලෝ ලෙවල් ප්‍රෝග්‍රෑම් ලියන්නෙ.. මං ඇහුවෙ ඒ වින්32 api එක පාවිච්චි කල්ල කොහොමද නෙට් කනෙක්ශන් එක මොනිටර් කරන්නෙ කියල ?