ElaKiri Programmer's Club

sithija.h

Well-known member
  • Nov 21, 2008
    9,679
    5,904
    113
    Matara
    Oya machan http authentication. Headers walin login wenna puluwan. Oya use karama http library eke so s balanna.


    මචං මම මේක Netbeans වලින් හදන්න ට්‍රයි කරන්නේ, මම මේකට පාවිච්චි කරන්නේ Http Client Component එක, මේ Login Page එකේ Source එක මට ගන්න තේරෙන්නේ නෑ මචං, මේක Prompt වෙන Dialog Box එකක් නිසා, ඒක නිසා මට මේකෙ ලොගින් එක ලියන්න තේරෙන්නේ නෑ, මට කොහොම හරි අන්තිමටම වෙන්න ඕන, මුලින් පේජ් එකට ලොග් වෙලා ඇතුලේ තියෙන Button එකක් Auto Click වෙන්න, මට මේකට හෙල්ප් එකක් දීපං මචං, මම මේ දාලා තියෙන පින්තූර බලන්න එතකොට උඹට වැඩේ මොකක්ද කියල තේරේවි... තෑන්ක්ස් මචං රිප්ලයි එකට:):):)

    Capture.jpg
     

    KingCM

    Well-known member
  • Jul 23, 2013
    6,920
    948
    113
    www.biogen.lk
    මචං මම මේක Netbeans වලින් හදන්න ට්‍රයි කරන්නේ, මම මේකට පාවිච්චි කරන්නේ Http Client Component එක, මේ Login Page එකේ Source එක මට ගන්න තේරෙන්නේ නෑ මචං, මේක Prompt වෙන Dialog Box එකක් නිසා, ඒක නිසා මට මේකෙ ලොගින් එක ලියන්න තේරෙන්නේ නෑ, මට කොහොම හරි අන්තිමටම වෙන්න ඕන, මුලින් පේජ් එකට ලොග් වෙලා ඇතුලේ තියෙන Button එකක් Auto Click වෙන්න, මට මේකට හෙල්ප් එකක් දීපං මචං, මම මේ දාලා තියෙන පින්තූර බලන්න එතකොට උඹට වැඩේ මොකක්ද කියල තේරේවි... තෑන්ක්ස් මචං රිප්ලයි එකට:):):)

    meka poddak balannako.

    http://www.avajava.com/tutorials/le...-a-url-using-basic-authentication.html?page=1

    http://www.mkyong.com/java/how-to-send-http-request-getpost-in-java/
     
    Last edited:

    owlX

    Well-known member
  • Jul 13, 2014
    1,321
    400
    83
    /usr/bin
    මචං මම මේක Netbeans වලින් හදන්න ට්‍රයි කරන්නේ, මම මේකට පාවිච්චි කරන්නේ Http Client Component එක, මේ Login Page එකේ Source එක මට ගන්න තේරෙන්නේ නෑ මචං, මේක Prompt වෙන Dialog Box එකක් නිසා, ඒක නිසා මට මේකෙ ලොගින් එක ලියන්න තේරෙන්නේ නෑ, මට කොහොම හරි අන්තිමටම වෙන්න ඕන, මුලින් පේජ් එකට ලොග් වෙලා ඇතුලේ තියෙන Button එකක් Auto Click වෙන්න, මට මේකට හෙල්ප් එකක් දීපං මචං, මම මේ දාලා තියෙන පින්තූර බලන්න එතකොට උඹට වැඩේ මොකක්ද කියල තේරේවි... තෑන්ක්ස් මචං රිප්ලයි එකට:):):)

    උඹ Routers ළුකට brute force එකක් දාලා username pass garb කරන්න නේද හදන්නේ මචං. මචං ඕක Telnet වලින් කරන්නත් පුළුවං. Java bump
    මං ඕක C# වලින් නම් හැදුවා SLT ආතල් ගත්ත දවස් වල. :rofl:
    මෙහෙම කරහන්

    PHP:
    http://username:[email protected]

    ex :
    username - admin
    password - owlX

    PHP:
    http://admin:[email protected]

    හරි ගියත් නැතත් කියපං :frown:
     
    Last edited:

    tery123

    Well-known member
  • Feb 25, 2011
    6,031
    177
    63
    34
    PHP:
    import java.util.*;
    
    public class Invoice{
    
    	private String strCustName,strCustAddr;
    	private int intInvoiceNum;
    	private Date dtInvoiceDate;
    
    	Invoice(String sCN,String sCA,int iN,Date dt){
    		strCustName=sCN;
    		strCustAddr=sCA;
    		int intInvoiceNum=iN;
    		dtInvoiceDate=dt;
    
    	}
    
    	class InvoiceItem{
    		private int intLineItem , intItemID , intUnits;
    		private String strItemDesc;
    
    		InvoiceItem(int li,int id,int iu,String desc){
    			intLineItem=li;
    			intItemID=id;
    			intUnits=iu;
    			strItemDesc=desc;
    
    			}
    		public void showInvoice(){
    
    			System.out.println("Customer name: " + Invoice.this.strCustName);
    			System.out.println("ITEM DESCRIPTION:" + strItemDesc);
    
    		}
    	}
    }

    PHP:
    import java.util.*;
    public class UseInvoice{
    
    	public static void main(String args[]){
    	Date today=new Date();
    	Invoice myInvoice = new Invoice("AMILA","SRI LANKA",003,today);
    	InvoiceItem myInvItem= new InvoiceItem(1,325,25,"CHOCALTE");
    	}
    
    }

    mokakda bun meken ena compile error eka???/

    PHP:
    E:\myjava\UseInvoice.java:7: error: cannot find symbol
    	InvoiceItem myInvItem= new InvoiceItem(1,325,25,"CHOCALTE");
    	^
      symbol:   class InvoiceItem
      location: class UseInvoice
    E:\myjava\UseInvoice.java:7: error: cannot find symbol
    	InvoiceItem myInvItem= new InvoiceItem(1,325,25,"CHOCALTE");
    	                           ^
      symbol:   class InvoiceItem
      location: class UseInvoice
    2 errors
    
    Tool completed with exit code 1

    :nerd::nerd::nerd::nerd::nerd::nerd:
     

    MihiCherub

    Well-known member
  • Sep 14, 2009
    18,861
    1
    9,626
    113
    Gampaha
    මචන්ල මට මේ කෝඩ් එකේ byte array සයිස් එක ගැන පොඩ්ඩක් පැහැදිලි කරපන්කො.. මේ array සයිස් එකෙන් මොකද්ද වෙන්නෙ. මේක මීට වඩා වැඩි කලොත් මොකද වෙන්නෙ?

    කෝඩ් එක file එකක් download කරගන්න එකක්.

    PHP:
     byte[] buf = new byte[1024];
     int bytesRead;
     while ((bytesRead = is.read(buf)) != -1) {
        fos.write(buf, 0, bytesRead);
     }
     

    markhaloce

    Member
    Mar 7, 2013
    10,298
    677
    0
    17
    The Real North
    මචන්ල මට මේ කෝඩ් එකේ byte array සයිස් එක ගැන පොඩ්ඩක් පැහැදිලි කරපන්කො.. මේ array සයිස් එකෙන් මොකද්ද වෙන්නෙ. මේක මීට වඩා වැඩි කලොත් මොකද වෙන්නෙ?

    කෝඩ් එක file එකක් download කරගන්න එකක්.

    PHP:
     byte[] buf = new byte[1024];
     int bytesRead;
     while ((bytesRead = is.read(buf)) != -1) {
        fos.write(buf, 0, bytesRead);
     }

    normally array ekaka max length eka int wala max value eka :yes: :yes: :yes:
    meeta wada wadiya monada ubata store karaganna thiyenne ?
     

    tery123

    Well-known member
  • Feb 25, 2011
    6,031
    177
    63
    34
    meke thibba bun kauru hari JAVA SINHALEN THIYENA BLOG EKAK GANA LINK ekak dala eka nane bun hoyaganna.....java igenaganna patta...nadda hodata wisthara karapu ewage link ekak english or sinhala...:dull::dull::dull:
     

    markhaloce

    Member
    Mar 7, 2013
    10,298
    677
    0
    17
    The Real North
    oka nathuwa wena ekak aththema nadda bun...:dull::dull::dull::dull: epa wenawane kiyawanna giyama:baffled::baffled::baffled::baffled:

    මට නං සෙට් වුනේ මූ ලියපු පොත් බං :dull: :dull:
    ජාව නං පොත් කියෝල නෑ... :no: :no:
    ඒත් මුගෙ C++ පොත නං පට්ට :D :D :D
    ඒ වගේම ජාව එකත් පට්ටෙට විස්තර කල්ල ලියල ඇති :yes: :yes:
     
    • Like
    Reactions: tery123

    tery123

    Well-known member
  • Feb 25, 2011
    6,031
    177
    63
    34
    මට නං සෙට් වුනේ මූ ලියපු පොත් බං :dull: :dull:
    ජාව නං පොත් කියෝල නෑ... :no: :no:
    ඒත් මුගෙ C++ පොත නං පට්ට :D :D :D
    ඒ වගේම ජාව එකත් පට්ටෙට විස්තර කල්ල ලියල ඇති :yes: :yes:

    ela thanku wewa...video tutorials nadda buns torrent ehema????:dull::dull::dull::dull:
     

    tery123

    Well-known member
  • Feb 25, 2011
    6,031
    177
    63
    34
    mata coding mathaka hitinne na bun...anika aulak awama solution eka denna ona kohomada kiyala hithaganna baha...meka kohomada hada ganne????:dull::dull::dull:
     
    • Like
    Reactions: markhaloce

    markhaloce

    Member
    Mar 7, 2013
    10,298
    677
    0
    17
    The Real North
    mata coding mathaka hitinne na bun...anika aulak awama solution eka denna ona kohomada kiyala hithaganna baha...meka kohomada hada ganne????:dull::dull::dull:

    කෝඩිං මතක හිටින්නැත්තං මරුනෙ බං :D :D
    ඒක අනිවා විය යුතු දෙයක් :yes:
    නැත්තං වෙන්නෙ ගිරව දාන්න පුරුදු වෙන එක :yes: :yes:
    ප්‍රෝග්‍රෑමිං තියෙන්නෙ එවෙලෙ හිතල එවෙලෙ ලියන්න :yes: :yes:
    නැතුව වෙන උන් ලියපුව පාඩං කරන්න නෙමේ :D
     
    • Like
    Reactions: ජොසී

    tery123

    Well-known member
  • Feb 25, 2011
    6,031
    177
    63
    34

    මම නම් ප්‍රෝග්‍රෑමිං කරන්න වීඩියෝ ටියුටෝරියල් බලල නෑ බං :no:
    :confused::confused::confused:
    කෝඩිං මතක හිටින්නැත්තං මරුනෙ බං :D :D
    ඒක අනිවා විය යුතු දෙයක් :yes:
    නැත්තං වෙන්නෙ ගිරව දාන්න පුරුදු වෙන එක :yes: :yes:
    ප්‍රෝග්‍රෑමිං තියෙන්නෙ එවෙලෙ හිතල එවෙලෙ ලියන්න :yes: :yes:
    නැතුව වෙන උන් ලියපුව පාඩං කරන්න නෙමේ :D

    :dull::dull::dull::dull::oo::oo::oo: mokakda yako eke theruma:confused::confused::confused:
     

    ජොසී

    Well-known member
  • May 29, 2014
    5,206
    4,453
    113
    Padavi Sripura
    කෝඩිං මතක හිටින්නැත්තං මරුනෙ බං :D :D
    ඒක අනිවා විය යුතු දෙයක් :yes:
    නැත්තං වෙන්නෙ ගිරව දාන්න පුරුදු වෙන එක :yes: :yes:
    ප්‍රෝග්‍රෑමිං තියෙන්නෙ එවෙලෙ හිතල එවෙලෙ ලියන්න :yes: :yes:
    නැතුව වෙන උන් ලියපුව පාඩං කරන්න නෙමේ :D
    :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:
    :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes:
    :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool: :cool:
    Rep+++
     
    Last edited:
    • Like
    Reactions: markhaloce