Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Programmers' lounge. (Programming-related discussions only)
New Posts  All Forums:Forum Nav:

Programmers' lounge. (Programming-related discussions only) - Page 114

post #1131 of 1137
Quote:
Originally Posted by andyroo89 View Post

For some reason when ever a client connects my listview updates, BUT it updates on the same line as the previous connection

like

Client A

then when a new client joins it will remove client A and add client B

Client B

but I want it like this

Client A
Client B
Client C
etc...

Here is my SO question, with piece of code.
http://stackoverflow.com/questions/36739500/listview-updates-but-not-on-a-new-row

Nevermind, figured it out, my code kept "resetting" my hasmap/listview values. Works like a charm now.
Collecting Dust
(13 items)
 
Server
(9 items)
 
 
CPUMotherboardGraphicsRAM
E8400 3.0ghz OC @ 3.8GHz @ 1.36v DFI BLood Iron P35 none OCZ 2x 2gb DDR2 800 CAS @ 5-6-6-21 
Hard DriveOptical DriveOSMonitor
none none loonix ssh is my monitor 
KeyboardPowerCaseMouse
none Corsair 650 watts old pc case Logitech mx518 
Mouse Pad
none! 
CPUMotherboardGraphicsRAM
AMD Athlon 64 X2 Dual Core Processor 6000+ GX611AA-ABA m8300f onboard 1x 2GB OCZ RAM DDR 
Hard DriveOSMonitorPower
320gb + 1TB HDD xubuntu 14.04 SSH 350 watt 
Case
crappy HP case 
  hide details  
Reply
Collecting Dust
(13 items)
 
Server
(9 items)
 
 
CPUMotherboardGraphicsRAM
E8400 3.0ghz OC @ 3.8GHz @ 1.36v DFI BLood Iron P35 none OCZ 2x 2gb DDR2 800 CAS @ 5-6-6-21 
Hard DriveOptical DriveOSMonitor
none none loonix ssh is my monitor 
KeyboardPowerCaseMouse
none Corsair 650 watts old pc case Logitech mx518 
Mouse Pad
none! 
CPUMotherboardGraphicsRAM
AMD Athlon 64 X2 Dual Core Processor 6000+ GX611AA-ABA m8300f onboard 1x 2GB OCZ RAM DDR 
Hard DriveOSMonitorPower
320gb + 1TB HDD xubuntu 14.04 SSH 350 watt 
Case
crappy HP case 
  hide details  
Reply
post #1132 of 1137
why doesnt this work?
it always goes to the s2!=key situation
Code:
BufferedReader br2 = null;
        String s2;
        String key="XYJC6SQ1Y4RC";
        try{
        br2 = new BufferedReader(new FileReader("C:\\license.txt"));
        s2 = br2.readLine();
        
            if(s2==key)
            {
                JOptionPane.showMessageDialog(null, "Validation Succeed Starting the proccess...");
                System.out.println(s2);
            }
            else if(s2!=key){
                JOptionPane.showMessageDialog(null, "Validation Failed! Program will exit");
                System.out.println(s2);
                  System.exit(0);
                
            }
        
        }
        
        catch(FileNotFoundException x){ JOptionPane.showMessageDialog(null, "File not found");
        System.exit(0);
        }
Black Panther
(16 items)
 
Nitro
(6 items)
 
Red Panther
(15 items)
 
CPUMotherboardGraphicsRAM
Intel i5 6600K @ 4.4GHz ASUS Z170 PRO GAMING 6870 G.Skill RipjawsV 16GB DDR4-2400MHz  
Hard DriveHard DriveHard DriveHard Drive
Samsung 820 120GB SSD Samsung 840 EVO 250GB SSD Samsung 850 EVO 250GB SSD Western Digital Blue 500GB 
CoolingOSMonitorKeyboard
Cooler Master 412s - CPU Cooler (push/pull) Windows 10 Samsung LED S22D300 Corsair Strafe RGB Cherry MX Red switches 
PowerCaseMouseMouse Pad
Corsair RM650x Corsair 400C ROCCAT TYON Razer Goliathus Speed Extended 
CPUMotherboardGraphicsRAM
i7-4710HQ Acer GTX 860m 8 GB 
Hard DriveHard Drive
WD Blue Kingston SSD 
CPUMotherboardGraphicsRAM
AMD FX 8350 Black Edition @ 4.22Ghz ASUS CROSSHAIR V FORMULA Z Sapphire 7870 Flex GHz edition G Skill TridentX 16GB @2133Mhz 
Hard DriveHard DriveHard DriveHard Drive
Seagate Barracuda 7200rpm (RAID 1) Seagate Barracuda 7200rpm (RAID 1) Samsung 840 PRO (RAID 0) Samsung 840 PRO (RAID 0) 
Optical DriveCoolingOSMonitor
Pioneer Bluray Reader/Writer 2x NZXT NS-F200 Fans Windows 8 Pro LG 27" FULL HD 
MonitorPowerCase
Samsung MultiTouch 22" FULL HD Zalman ZM750-XG Gold NZXT 820 
  hide details  
Reply
Black Panther
(16 items)
 
Nitro
(6 items)
 
Red Panther
(15 items)
 
CPUMotherboardGraphicsRAM
Intel i5 6600K @ 4.4GHz ASUS Z170 PRO GAMING 6870 G.Skill RipjawsV 16GB DDR4-2400MHz  
Hard DriveHard DriveHard DriveHard Drive
Samsung 820 120GB SSD Samsung 840 EVO 250GB SSD Samsung 850 EVO 250GB SSD Western Digital Blue 500GB 
CoolingOSMonitorKeyboard
Cooler Master 412s - CPU Cooler (push/pull) Windows 10 Samsung LED S22D300 Corsair Strafe RGB Cherry MX Red switches 
PowerCaseMouseMouse Pad
Corsair RM650x Corsair 400C ROCCAT TYON Razer Goliathus Speed Extended 
CPUMotherboardGraphicsRAM
i7-4710HQ Acer GTX 860m 8 GB 
Hard DriveHard Drive
WD Blue Kingston SSD 
CPUMotherboardGraphicsRAM
AMD FX 8350 Black Edition @ 4.22Ghz ASUS CROSSHAIR V FORMULA Z Sapphire 7870 Flex GHz edition G Skill TridentX 16GB @2133Mhz 
Hard DriveHard DriveHard DriveHard Drive
Seagate Barracuda 7200rpm (RAID 1) Seagate Barracuda 7200rpm (RAID 1) Samsung 840 PRO (RAID 0) Samsung 840 PRO (RAID 0) 
Optical DriveCoolingOSMonitor
Pioneer Bluray Reader/Writer 2x NZXT NS-F200 Fans Windows 8 Pro LG 27" FULL HD 
MonitorPowerCase
Samsung MultiTouch 22" FULL HD Zalman ZM750-XG Gold NZXT 820 
  hide details  
Reply
post #1133 of 1137
Quote:
Originally Posted by patriotaki View Post

why doesnt this work?
it always goes to the s2!=key situation
Code:
BufferedReader br2 = null;
        String s2;
        String key="XYJC6SQ1Y4RC";
        try{
        br2 = new BufferedReader(new FileReader("C:\\license.txt"));
        s2 = br2.readLine();
        
            if(s2==key)
            {
                JOptionPane.showMessageDialog(null, "Validation Succeed Starting the proccess...");
                System.out.println(s2);
            }
            else if(s2!=key){
                JOptionPane.showMessageDialog(null, "Validation Failed! Program will exit");
                System.out.println(s2);
                  System.exit(0);
                
            }
        
        }
        
        catch(FileNotFoundException x){ JOptionPane.showMessageDialog(null, "File not found");
        System.exit(0);
        }

== tests for reference equality (whether they are the same object).

.equals() tests for value equality (whether they are logically "equal").
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
post #1134 of 1137
Quote:
Originally Posted by tom.slick View Post

== tests for reference equality (whether they are the same object).

.equals() tests for value equality (whether they are logically "equal").

any ideas how can i protect my program (jar) ? i mean i dont want others to send it to other people because i will be charging the program.
i dont want anything special like connection to servers etc.. something simple
Black Panther
(16 items)
 
Nitro
(6 items)
 
Red Panther
(15 items)
 
CPUMotherboardGraphicsRAM
Intel i5 6600K @ 4.4GHz ASUS Z170 PRO GAMING 6870 G.Skill RipjawsV 16GB DDR4-2400MHz  
Hard DriveHard DriveHard DriveHard Drive
Samsung 820 120GB SSD Samsung 840 EVO 250GB SSD Samsung 850 EVO 250GB SSD Western Digital Blue 500GB 
CoolingOSMonitorKeyboard
Cooler Master 412s - CPU Cooler (push/pull) Windows 10 Samsung LED S22D300 Corsair Strafe RGB Cherry MX Red switches 
PowerCaseMouseMouse Pad
Corsair RM650x Corsair 400C ROCCAT TYON Razer Goliathus Speed Extended 
CPUMotherboardGraphicsRAM
i7-4710HQ Acer GTX 860m 8 GB 
Hard DriveHard Drive
WD Blue Kingston SSD 
CPUMotherboardGraphicsRAM
AMD FX 8350 Black Edition @ 4.22Ghz ASUS CROSSHAIR V FORMULA Z Sapphire 7870 Flex GHz edition G Skill TridentX 16GB @2133Mhz 
Hard DriveHard DriveHard DriveHard Drive
Seagate Barracuda 7200rpm (RAID 1) Seagate Barracuda 7200rpm (RAID 1) Samsung 840 PRO (RAID 0) Samsung 840 PRO (RAID 0) 
Optical DriveCoolingOSMonitor
Pioneer Bluray Reader/Writer 2x NZXT NS-F200 Fans Windows 8 Pro LG 27" FULL HD 
MonitorPowerCase
Samsung MultiTouch 22" FULL HD Zalman ZM750-XG Gold NZXT 820 
  hide details  
Reply
Black Panther
(16 items)
 
Nitro
(6 items)
 
Red Panther
(15 items)
 
CPUMotherboardGraphicsRAM
Intel i5 6600K @ 4.4GHz ASUS Z170 PRO GAMING 6870 G.Skill RipjawsV 16GB DDR4-2400MHz  
Hard DriveHard DriveHard DriveHard Drive
Samsung 820 120GB SSD Samsung 840 EVO 250GB SSD Samsung 850 EVO 250GB SSD Western Digital Blue 500GB 
CoolingOSMonitorKeyboard
Cooler Master 412s - CPU Cooler (push/pull) Windows 10 Samsung LED S22D300 Corsair Strafe RGB Cherry MX Red switches 
PowerCaseMouseMouse Pad
Corsair RM650x Corsair 400C ROCCAT TYON Razer Goliathus Speed Extended 
CPUMotherboardGraphicsRAM
i7-4710HQ Acer GTX 860m 8 GB 
Hard DriveHard Drive
WD Blue Kingston SSD 
CPUMotherboardGraphicsRAM
AMD FX 8350 Black Edition @ 4.22Ghz ASUS CROSSHAIR V FORMULA Z Sapphire 7870 Flex GHz edition G Skill TridentX 16GB @2133Mhz 
Hard DriveHard DriveHard DriveHard Drive
Seagate Barracuda 7200rpm (RAID 1) Seagate Barracuda 7200rpm (RAID 1) Samsung 840 PRO (RAID 0) Samsung 840 PRO (RAID 0) 
Optical DriveCoolingOSMonitor
Pioneer Bluray Reader/Writer 2x NZXT NS-F200 Fans Windows 8 Pro LG 27" FULL HD 
MonitorPowerCase
Samsung MultiTouch 22" FULL HD Zalman ZM750-XG Gold NZXT 820 
  hide details  
Reply
post #1135 of 1137
Quote:
Originally Posted by patriotaki View Post

any ideas how can i protect my program (jar) ? i mean i dont want others to send it to other people because i will be charging the program.
i dont want anything special like connection to servers etc.. something simple

Don't know, I never tried. I'm more the open source type. You can try some kind of obfuscator
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
post #1136 of 1137
Quote:
Originally Posted by tom.slick View Post

Don't know, I never tried. I'm more the open source type. You can try some kind of obfuscator

one last question.. is there any way i can create an installation package (.msi for example) and select for each file where it should be extracted?
Black Panther
(16 items)
 
Nitro
(6 items)
 
Red Panther
(15 items)
 
CPUMotherboardGraphicsRAM
Intel i5 6600K @ 4.4GHz ASUS Z170 PRO GAMING 6870 G.Skill RipjawsV 16GB DDR4-2400MHz  
Hard DriveHard DriveHard DriveHard Drive
Samsung 820 120GB SSD Samsung 840 EVO 250GB SSD Samsung 850 EVO 250GB SSD Western Digital Blue 500GB 
CoolingOSMonitorKeyboard
Cooler Master 412s - CPU Cooler (push/pull) Windows 10 Samsung LED S22D300 Corsair Strafe RGB Cherry MX Red switches 
PowerCaseMouseMouse Pad
Corsair RM650x Corsair 400C ROCCAT TYON Razer Goliathus Speed Extended 
CPUMotherboardGraphicsRAM
i7-4710HQ Acer GTX 860m 8 GB 
Hard DriveHard Drive
WD Blue Kingston SSD 
CPUMotherboardGraphicsRAM
AMD FX 8350 Black Edition @ 4.22Ghz ASUS CROSSHAIR V FORMULA Z Sapphire 7870 Flex GHz edition G Skill TridentX 16GB @2133Mhz 
Hard DriveHard DriveHard DriveHard Drive
Seagate Barracuda 7200rpm (RAID 1) Seagate Barracuda 7200rpm (RAID 1) Samsung 840 PRO (RAID 0) Samsung 840 PRO (RAID 0) 
Optical DriveCoolingOSMonitor
Pioneer Bluray Reader/Writer 2x NZXT NS-F200 Fans Windows 8 Pro LG 27" FULL HD 
MonitorPowerCase
Samsung MultiTouch 22" FULL HD Zalman ZM750-XG Gold NZXT 820 
  hide details  
Reply
Black Panther
(16 items)
 
Nitro
(6 items)
 
Red Panther
(15 items)
 
CPUMotherboardGraphicsRAM
Intel i5 6600K @ 4.4GHz ASUS Z170 PRO GAMING 6870 G.Skill RipjawsV 16GB DDR4-2400MHz  
Hard DriveHard DriveHard DriveHard Drive
Samsung 820 120GB SSD Samsung 840 EVO 250GB SSD Samsung 850 EVO 250GB SSD Western Digital Blue 500GB 
CoolingOSMonitorKeyboard
Cooler Master 412s - CPU Cooler (push/pull) Windows 10 Samsung LED S22D300 Corsair Strafe RGB Cherry MX Red switches 
PowerCaseMouseMouse Pad
Corsair RM650x Corsair 400C ROCCAT TYON Razer Goliathus Speed Extended 
CPUMotherboardGraphicsRAM
i7-4710HQ Acer GTX 860m 8 GB 
Hard DriveHard Drive
WD Blue Kingston SSD 
CPUMotherboardGraphicsRAM
AMD FX 8350 Black Edition @ 4.22Ghz ASUS CROSSHAIR V FORMULA Z Sapphire 7870 Flex GHz edition G Skill TridentX 16GB @2133Mhz 
Hard DriveHard DriveHard DriveHard Drive
Seagate Barracuda 7200rpm (RAID 1) Seagate Barracuda 7200rpm (RAID 1) Samsung 840 PRO (RAID 0) Samsung 840 PRO (RAID 0) 
Optical DriveCoolingOSMonitor
Pioneer Bluray Reader/Writer 2x NZXT NS-F200 Fans Windows 8 Pro LG 27" FULL HD 
MonitorPowerCase
Samsung MultiTouch 22" FULL HD Zalman ZM750-XG Gold NZXT 820 
  hide details  
Reply
post #1137 of 1137
Quote:
Originally Posted by patriotaki View Post

one last question.. is there any way i can create an installation package (.msi for example) and select for each file where it should be extracted?

All kinds. Google around for something that suites your needs.
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Programmers' lounge. (Programming-related discussions only)