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 1000
...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 1000
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 1000
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 1000
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 1000
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
post #996 of 1000
How can I import images using C++ so I can edit them?I've asked google but I didn't get any specific answers. ._.
My First
(9 items)
 
My dream
(7 items)
 
 
CPUMotherboardGraphicsGraphics
i7 4960x ASUS Rampage IV Extreme Black Edition GTX 780 ti GTX 780 ti 
GraphicsRAMHard Drive
GTX 780 ti  64 GB corsair dominator Samsung 840 pro 256GB SSD 
  hide details  
Reply
My First
(9 items)
 
My dream
(7 items)
 
 
CPUMotherboardGraphicsGraphics
i7 4960x ASUS Rampage IV Extreme Black Edition GTX 780 ti GTX 780 ti 
GraphicsRAMHard Drive
GTX 780 ti  64 GB corsair dominator Samsung 840 pro 256GB SSD 
  hide details  
Reply
post #997 of 1000
You can load images just as any other files with fstream, you then get binary data which you need to interpret. There are many libraries which will make it easy for you, like libjpg or libpng. You'll generally end up with an array of pixel color values.

Now what do you mean by editing? Do you want to apply some filters to the image? Or do you want to draw on top of the image? In the first case you may be interested in looking at OpenCV, which comes with both loaders and a huge collection of algorithms for processing images (e.g. blur, sharpen, feature detection etc.). In the second case I'd suggest looking at Qt, although it's not going to be a trivial task.
buka
(17 items)
 
buka
(17 items)
 
 
Reply
buka
(17 items)
 
buka
(17 items)
 
 
Reply
post #998 of 1000
Quote:
Originally Posted by poroboszcz View Post

You can load images just as any other files with fstream, you then get binary data which you need to interpret. There are many libraries which will make it easy for you, like libjpg or libpng. You'll generally end up with an array of pixel color values.

Now what do you mean by editing? Do you want to apply some filters to the image? Or do you want to draw on top of the image? In the first case you may be interested in looking at OpenCV, which comes with both loaders and a huge collection of algorithms for processing images (e.g. blur, sharpen, feature detection etc.). In the second case I'd suggest looking at Qt, although it's not going to be a trivial task.

Some filter,rotating images,cropping, and re-size them and then compile the thing as a DLL like plan9 said and use C# for the GUI stuff. smile.gif
My First
(9 items)
 
My dream
(7 items)
 
 
CPUMotherboardGraphicsGraphics
i7 4960x ASUS Rampage IV Extreme Black Edition GTX 780 ti GTX 780 ti 
GraphicsRAMHard Drive
GTX 780 ti  64 GB corsair dominator Samsung 840 pro 256GB SSD 
  hide details  
Reply
My First
(9 items)
 
My dream
(7 items)
 
 
CPUMotherboardGraphicsGraphics
i7 4960x ASUS Rampage IV Extreme Black Edition GTX 780 ti GTX 780 ti 
GraphicsRAMHard Drive
GTX 780 ti  64 GB corsair dominator Samsung 840 pro 256GB SSD 
  hide details  
Reply
post #999 of 1000
http://www.codecodex.com/wiki/Read_a_file_into_a_byte_array

your filters and rotations are just transformations on bytes
post #1000 of 1000
So all I need to do is open it as a binary file using fstream and then use a library like libpng or libjpg to turn the raw binary data to an array full of pixels and now I can do operations on them?
My First
(9 items)
 
My dream
(7 items)
 
 
CPUMotherboardGraphicsGraphics
i7 4960x ASUS Rampage IV Extreme Black Edition GTX 780 ti GTX 780 ti 
GraphicsRAMHard Drive
GTX 780 ti  64 GB corsair dominator Samsung 840 pro 256GB SSD 
  hide details  
Reply
My First
(9 items)
 
My dream
(7 items)
 
 
CPUMotherboardGraphicsGraphics
i7 4960x ASUS Rampage IV Extreme Black Edition GTX 780 ti GTX 780 ti 
GraphicsRAMHard Drive
GTX 780 ti  64 GB corsair dominator Samsung 840 pro 256GB SSD 
  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)