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 100

post #991 of 995
...want to reference a link of a page that i will create later, in my home page, so if i click on it it will open the link as if i have linked a different website. How do I make my life easier in doing this (organization, maybe), or how should it be done, before uploading it onto the net?
post #992 of 995
Quote:
Originally Posted by dBlisse View Post

http://pastebin.com/zY2NVfb2

you can do row and column checks like that. infinitely easier to read imo.

my comments are wrong so ignore them lol.


block check is similar but a bit more complicated.

i have worked my code and make it alot better!

http://pastebin.com/qfGTy0tB

have a look...some variables are in greeklish..if you need any help to understand tell me
Main Desktop
(17 items)
 
Nitro
(6 items)
 
Red Panther
(15 items)
 
CPUMotherboardGraphicsRAM
Intel Core 2 Duo E7500 MSI P41T C31 Sapphire 6870  4GB DDR2 
Hard DriveHard DriveOptical DriveCooling
WD 500GB Samsung 840 LG 3x 140mm fans in front 1x 200mm on top 1x 120mm... 
OSMonitorMonitorKeyboard
Windows 8 Pro Syncmaster Syncmaster Razer Arctosa 
PowerCaseMouseAudio
Superflower 650watt Fractal XL Cobra e-blue Logitech Z506 
Other
USB 3.0 
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
Main Desktop
(17 items)
 
Nitro
(6 items)
 
Red Panther
(15 items)
 
CPUMotherboardGraphicsRAM
Intel Core 2 Duo E7500 MSI P41T C31 Sapphire 6870  4GB DDR2 
Hard DriveHard DriveOptical DriveCooling
WD 500GB Samsung 840 LG 3x 140mm fans in front 1x 200mm on top 1x 120mm... 
OSMonitorMonitorKeyboard
Windows 8 Pro Syncmaster Syncmaster Razer Arctosa 
PowerCaseMouseAudio
Superflower 650watt Fractal XL Cobra e-blue Logitech Z506 
Other
USB 3.0 
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 #993 of 995
Quote:
Originally Posted by patriotaki View Post

i have worked my code and make it alot better!

http://pastebin.com/qfGTy0tB

have a look...some variables are in greeklish..if you need any help to understand tell me

From initial glancing I can see you're still chaining if else blocks instead of using switch case.

Also, you've taken a step backwards with your use of functions as this whole program is just one long function. You need to think about your code like Lego bricks and decide which parts of code are fairly self contained or can be reused in a few places; then put those chunks of code in a function. That way your code starts to become self-documenting (ie smaller chunks of code will have a function name that briefly summarises it's purpose - so you can glance at your code and understand what each bit does).

Lastly the code formatting still isn't all that clean (though definitely better than before). However this might just be Pastebin breaking your indentation with tab to space conversion.

You're getting there though dude smile.gif
post #994 of 995
Quote:
Originally Posted by patriotaki View Post

i have worked my code and make it alot better!

http://pastebin.com/qfGTy0tB

have a look...some variables are in greeklish..if you need any help to understand tell me

A bit better, but your code doesn't really check if the sudoku solution is valid, just if the user has written anything in array[][]

You can factor it even more though if you try

edit: procrastinating so i did it in a better but not optimal way http://pastebin.com/p5PHXnGe would prefer structs and malloc might be too much. honestly i dont think there's any way to explain what improvements you can do without actually showing you.
Edited by dBlisse - 11/19/14 at 11:23pm
post #995 of 995
Hey guys, While back I used listview to load connect clients data on my app, and I am wondering if I can switch it to expandable listview instead? can expandable listview be used on arrayadapter? I tried googling but it kept showing me listview not expandable.
    
CPUMotherboardGraphicsRAM
E8400 3.0ghz OC @ 3.8GHz @ 1.36v DFI BLood Iron P35 ECS 8800GTS 512MB G.Skill 2x 1gb DDR2 800 CAS @ 5-6-6-21 
Hard DriveOptical DriveOSMonitor
Seagate Barracuda 7200rpm 250GB + 1TB 7200rpm HDD Lite On DVD burner Windows 7 32 bit 21.5 inch Samsung monitor full HD 1080p :D 
KeyboardPowerCaseMouse
microsoft wireless Corsair 650 watts Cooler Master 690 Logitech mx518 
Mouse Pad
fryz mousepad 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
E8400 3.0ghz OC @ 3.8GHz @ 1.36v DFI BLood Iron P35 ECS 8800GTS 512MB G.Skill 2x 1gb DDR2 800 CAS @ 5-6-6-21 
Hard DriveOptical DriveOSMonitor
Seagate Barracuda 7200rpm 250GB + 1TB 7200rpm HDD Lite On DVD burner Windows 7 32 bit 21.5 inch Samsung monitor full HD 1080p :D 
KeyboardPowerCaseMouse
microsoft wireless Corsair 650 watts Cooler Master 690 Logitech mx518 
Mouse Pad
fryz mousepad 
  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)