• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 11:12
CEST 17:12
KST 00:12
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Serral wins Maestros of the Game 238ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12TL.net Map Contest #22 - Voting & Ladder Map Selection7
Community News
BSL Season 22 Full Overview & Conclusion5BSL Season 22 Full Overview & Conclusion5Weekly Cups (June 29-July 5): Solar Doubles0MC vs IdrA, Boxer vs Nal_rA to be Legacy Matches @ BlizzCon445.0.16 Hotfix (June 30) - Balance + Bug Fixes40
StarCraft 2
General
What is your PC setup in 2026 for SCBW/SC2 ? Most successful SC2 players of Q2 2026 Serral wins Maestros of the Game 2 MC vs IdrA, Boxer vs Nal_rA to be Legacy Matches @ BlizzCon Is the larve respawn broken?
Tourneys
RSL Revival: Season 6 - Qualifiers and Main Event GSL CK #5 Race War HomeStory Cup 29 Vespene Cup #1 — $300+ USD, July 10 Sea Duckling Open (Global, Bronze-Diamond)
Strategy
[G] Having the right mentality to improve
Custom Maps
New Map Maker - Looking for Advice - Love or Hate Work In Progress Melee Maps [D]RTS in all its shapes and glory <3
External Content
Mutation # 533 Die Together The PondCast: SC2 News & Results Mutation # 532 Nuclear Family Mutation # 531 Experimental Artillery
Brood War
General
ASL 22 Proposed Map Pool ASL22 General Discussion BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ BSL Season 22 Full Overview & Conclusion
Tourneys
[ASL22] Wildcard Qualifier [Megathread] Daily Proleagues IPSL Spring 2026 Top 4! CSLAN 4 is Coming!
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Creating a full chart of Zerg builds Relatively freeroll strategies
Other Games
General Games
General RTS Discussion Thread Summer Games Done Quick 2026! Nintendo Switch Thread Stormgate/Frost Giant Megathread Dawn of War IV
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
NeO.D_StephenKing vs This Guy From 1 Million Dance TL Mafia Community Thread TL Mafia Power Rank Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread UK Politics Mega-thread YouTube Thread Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! Series you have seen recently...
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Tennis[sport] Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
FPS when play League Of Legend on laptop How to clean a TTe Thermaltake keyboard? Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Major Shifts in the Gaming I…
TrAiDoS
An Exploration of th…
waywardstrategy
Gauntlet SC2: A Retrospectiv…
Ctone23
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Evil Gacha Games and the…
ffswowsucks
Customize Sidebar...

Website Feedback

Closed Threads



Active: 5592 users

The Big Programming Thread - Page 342

Forum Index > General Forum
Post a Reply
Prev 1 340 341 342 343 344 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2013-08-13 09:21:16
August 13 2013 09:20 GMT
#6821
Alright guys. Thanks for help. I'll keep your advice in mind.
HardlyNever
Profile Blog Joined July 2011
United States1258 Posts
August 13 2013 13:49 GMT
#6822
On August 13 2013 16:46 Encdalf wrote:
Show nested quote +
On August 13 2013 01:34 HardlyNever wrote:
Anyone with a lot of experience with recaptcha? I got it to work on one of the forms I made, but I can't get it to work (it always fails, no matter what) on another form someone else made but I need to add it to. I've isolated the problem to an event handler javascript piece that for some reason always causes a fail. I'm not super familiar with javascript, especially if someone else wrote it (and this is kinda big), and was wondering if anyone has a similar problem in the past. Somewhere in here is the part that is causing the recaptcha to always fail (I'm thinking it is one of the set global variables, but I'm not sure). I believe it is some premade piece of script that a lot of people use. Warning, it is pretty big:

[...]

I can't just remove the event helper, as this particular form needs it to do what it needs to do right. I may be able to come up with a simpler solution for getting the form to work if I can't figure it out. I don't 100% need recaptcha on this form, but it would be nice as we've had a few spam bots hit it.


I'm sorry, but without any further context, I doubt anyone will be able to help you. This is a problem caused by the combination of scripts on your page, and without a live example these things are pretty hard to track down.

Or to put it into a metaphor..
You get a combustion engine to a mechanic, and tell him "I think this eingine is broken.". "Why?" the mechanic asks. "Well, I checked everything and I believe it's the engine which is broken.". The mechanic checks the engine, but unfortunately the engine is brand new and working perfectly.
The real problem was somewhere else: The car was electric.


Not really...
I know 100% that the problem is within the script. If I take that out, the recaptcha works, and if I leave it in, it doesn't. I've added/removed other things, and they don't change the outcome. And more specifically, I believe it is one of the global variables in the script that is causing the problem.

I know that is a pretty big chunk of script, but since it seems to be a premade piece of open-source and recaptcha is a pretty common thing. I thought there was an outside chance someone had run into the same problem. I know it's a long shot, but it was worth a try.
Out there, the Kid learned to fend for himself. Learned to build. Learned to break.
UdderChaos
Profile Blog Joined February 2010
United Kingdom707 Posts
Last Edited: 2013-08-13 14:13:54
August 13 2013 14:13 GMT
#6823
I know there is a lot of guides and such in the OP but it's a bit overwhelming. Basically i have an interview in a weeks time for a programming job (entry level) and i need to brush up on my c++ to a fairly good standard. Any advice on some intermediate to advanced guides/websites? stuff like multi-threading and the factory method pattern would be useful i guess? It's for an electronic engineering company, for their software development side(entry level ofc).
Nunquam iens addo vos sursum
phar
Profile Joined August 2011
United States1080 Posts
August 13 2013 15:40 GMT
#6824
What format is their interview in? Some places ask a lot of language-specific bullshit, while others will ask almost no language questions, just algorithms, data structures, design, problem solving.

Can you ask your recruiter what to expect?
Who after all is today speaking about the destruction of the Armenians?
Shikada
Profile Joined May 2012
Serbia976 Posts
August 13 2013 16:19 GMT
#6825
On August 08 2013 18:04 n0ise wrote:
Starting with Ruby on Rails, coming from java/J2EE/Spring MVC

Any quick tips/pointers or a particular piece worth reading?

Much appreciated


Guess your question was missed due to the heavy discussion going on.

At a minimum, I would recommend:
http://www.amazon.com/Ruby-Programming-Language-David-Flanagan/dp/0596516177

This is your Ruby language reference book. For Rails, get the newest version of Agile Web Development with Rails. It gets you writing a demo app in no time, and the other half of the book explains Rails nicely (though keep in mind that Rails changes and improves often).

http://www.amazon.com/Ruby-Rails-Tutorial-Addison-Wesley-Professional/dp/0321832051/ref=pd_sim_b_8
Another fine Rails book, which also has DVD video tutorials, if you're into that.

Good luck and have fun
heroyi
Profile Blog Joined March 2009
United States1064 Posts
August 13 2013 17:36 GMT
#6826
Piggy-backing on the recent posts:

I was wondering if someone could explain linked list quickly to me. I have read some of it on Google but I am quite confused with some of their explanation. Also, why is it mergesort is better than quicksort on a linked list??
wat wat in my pants
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
August 13 2013 17:53 GMT
#6827
A linked list consists of multiple list elements each linked to a next one (and often also to the previous one) through a reference. Each list element also contains a reference to data object.

Linked lists are good at adding/removing/inserting/splitting elements or sequences of elements because you only need to change a couple of next/previous references. They are bad at indexed access because you need to traverse the list.

Mergesort is good on linked lists because the algorithm just goes very naturally with linked lists. Quicksort isn't really worse either as long as you do it properly (see http://stackoverflow.com/questions/14805936/optimal-quicksort-for-single-linked-list).
If you have a good reason to disagree with the above, please tell me. Thank you.
Freaky[x]
Profile Blog Joined August 2005
Canada995 Posts
August 13 2013 18:31 GMT
#6828
I've seen people talk a lot about algorithms and software programming, does anybody here work on hardware programming (fpga and such) using vhdl?

I've been working on a project relating to the 3gpp lte, simulating coding schemes in matlab. I wanted to try and implement what I built in hardware and would like to know if people had knowledge in this field (vhdl programming).
gedatsu
Profile Joined December 2011
1286 Posts
August 13 2013 18:52 GMT
#6829
On August 14 2013 02:36 heroyi wrote:
Piggy-backing on the recent posts:

I was wondering if someone could explain linked list quickly to me. I have read some of it on Google but I am quite confused with some of their explanation. Also, why is it mergesort is better than quicksort on a linked list??

An array-list will have its elements lined up in order in the physical memory. With a linked list, every element has a pointer to where the next element is in memory, and it may be in a completely different place. This means that you can immediately find the 100th element in an array - just look 100 steps from the start of the array. With a linked list, you have no idea where the 100th element is, you need to ask the 99th element where it is (and to find the 99th, you need to ask the 98th...). So for lookups and overwrites, array is typically better. But if you want to insert an element into the middle of an array, you need to move every following element one step, and that can take a lot of time. Linked lists can do that operation very quickly.

Mergesort involves a lot of comparing two neighboring elements and switching their positions, which is easy to do with a linked list. You can do that with quicksort too, but it's easy to write a quicksort that assumes random access to elements which linked lists don't provide.
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
August 13 2013 19:05 GMT
#6830
On August 13 2013 17:19 darkness wrote:
Where do you guys read/learn which algorithm is best for your problem? For example, I've read today that MergeSort is best for linked lists, while QuickSort is best for general use and that it is more memory efficient than MergeSort. Well, I guess that's logical when you know MergeSort uses additional array.

Is it also a good idea to just use already implemented algorithms in the language you use? I've read that std::sort, Java's Collections.sort(), Linked List, etc are much more optimised than you would possibly implement them.

It just has to do with the way things are laid out in memory. You might not want to, or be able to, move the nodes of a linked list around in memory. Merge sort allows you to sort the linked lists in-place by just swapping head/tail pointers around.

Other sorting algorithms are better suited for moving around stuff that is packed together in memory within an array.

That's about it. You take note of how things are stored in memory, how they will be used in that memory, and find the fastest algorithm you can apply given the restrictions.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
Last Edited: 2013-08-13 19:17:06
August 13 2013 19:07 GMT
#6831
On August 14 2013 02:36 heroyi wrote:
Piggy-backing on the recent posts:

I was wondering if someone could explain linked list quickly to me. I have read some of it on Google but I am quite confused with some of their explanation. Also, why is it mergesort is better than quicksort on a linked list??


A linked list basically consists of a series of this:

class LinkedListNode
{
// A pointer or reference to the next node
LinkedListNodePointer Next;

// The actual content of the node
SomeType Value;

// A doubly linked list also contains a pointer to the preceding node:
LinkedListNodePointer Prev;
}



Adding an element somewhere in the middle of the linked list is as easy as creating a node with the Next pointer on the following node and changing the previously preceding node so it points to the new one.


Node1.Next -> Node2
Node2.Next -> Node3

Add new node NodeX:
Node1.Next -> NodeX
NodeX.Next -> Node2
Node2.Next -> Node3


The advantages of linked lists are:
They can be (in theory) infinitely large without having to reallocate the whole array every time you exceed the storage space of the previous arry. This makes them good at dealing with situations where you have to store an unknown amount of data. If an array exceeds it's storage space, a new, bigger storage space has to be allocated and the old data has to be copied over to the new space, which is time consuming. For the linked list, each node is in it's own memory space and seperately managed.

Insertion/Deletion at the start or in the middle is extremely fast. If you remove an array element in a classical array, you have to move all following elements a step forward which in large arrays can take a lot of time, i.e. array[2] has to be moved to array[1], array[3] to array[2], array[4] to array[3], etc.
If you insert an element in the middle, all following elements have to be moved a step back.
In linked lists adding a node in the middle of the list doesn't affect any other nodes than the directly preceding one, so you don't have to move elements around no matter what you do in the list itself, you just have to set the pointers.
In the previously discussed big-O notation that means adding/removing is O(1) since you always just have to change two pointers (or 3 in a doubly linked list), in an array it is O(N) with N being the number of elements in the array since it can happen that you have to move every single element in the array if you insert/delete right at the start.

The disadvantages of linked lists are:
Getting a specific element in the list requires going through all elements in the list, so in terms of the big-O notation, a linked list has an access time of O(N) where N is the number of elements in the linked list. An array has an access time of O(1), i.e. you get the element in a constant time no matter how big the array grows. Finding a specific element in an array of a million entries is as fast as finding it in one with 10 entries. Finding a node in a linked list of a million entries can potentially require a million comparisions until you finally find it.

Since you also store a pointer in conjunction with the actual content of the node, a linked list requires more memory than an array. This is not a big deal if each node stores a relatively high amount of data but if the content of each element is very small, e.g. only a single integer, then using a linked list can use twice as much memory as an array.
heroyi
Profile Blog Joined March 2009
United States1064 Posts
Last Edited: 2013-08-14 03:33:53
August 14 2013 02:13 GMT
#6832
easy question:
how/what comprises of the windows gui system language wise (I understand that the kernel, while holds true for other OS like OS x and linux, is written in C) but what is written for the shell?
wat wat in my pants
tofucake
Profile Blog Joined October 2009
Hyrule19228 Posts
August 14 2013 03:23 GMT
#6833
C++ does not lack GUI capabilities.
Liquipediaasante sana squash banana
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2013-08-14 05:23:20
August 14 2013 03:29 GMT
#6834
C/C++ has many library extensions/toolkits you can include in your project file, like Qt, Gtk, that allow you to create GUIs. Your understanding here is incorrect. Qt is not Java (or any) language specific. Qt uses OS specific APIs to be portable. Programming languages simply build a wrapper on top of the toolkit, which are packaged out as a library for you to add to your project file in order to "write Qt code in Java". (and then some other programming voodoo happens)


On most Unix (X Window) systems, the GUI is written in Xlib.
Windows Shell I believe is currently DirectX, which is built on top of WinAPI.

Everything is C.
There is no one like you in the universe.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2013-08-14 03:40:06
August 14 2013 03:32 GMT
#6835
Nvm, dumb question. No one does this.
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
August 14 2013 03:58 GMT
#6836
On August 14 2013 12:32 obesechicken13 wrote:
Nvm, dumb question. No one does this.


http://www.ggobi.org/rgtk2/
http://www.omegahat.org/RwxWidgets/

apparently this is the best if you want to avoid wx or gtk

http://cran.r-project.org/web/packages/gWidgets/gWidgets.pdf
There is no one like you in the universe.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
August 14 2013 04:16 GMT
#6837
On August 14 2013 12:58 Blisse wrote:
Show nested quote +
On August 14 2013 12:32 obesechicken13 wrote:
Nvm, dumb question. No one does this.


http://www.ggobi.org/rgtk2/
http://www.omegahat.org/RwxWidgets/

apparently this is the best if you want to avoid wx or gtk

http://cran.r-project.org/web/packages/gWidgets/gWidgets.pdf

Oh thanks. I missed this on my first search for R gui dev packages.
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
adwodon
Profile Blog Joined September 2010
United Kingdom592 Posts
Last Edited: 2013-08-14 08:44:41
August 14 2013 08:03 GMT
#6838
Probably not the place to ask but it's always fun to see what people know.

I've made an audio peak meter 'control', it's actually just a progress bar at the minute, I may create a custom control in future but the tricky part was actually make the damn thing work which I've now done.

Anyway I just noticed that once I've stuck it into the main app from my little test app that Visual Styles are enabled and the shiney green bar does not look as appealing as the solid blue one before, it distracts and now it does definitely look like a progress bar.
I'm a little unfamiliar with Visual Styles but is it possible to override them for individual controls? Either disabling them or removing the aero theme plus changing the colour? Would be nice if I could change the colour with no aero, then I could have a table of colours going from green->red and have it change colour dynamically, would be pretty

This is all C/C++ by the way, no .NET or anything fancy.

EDIT - Solved

Ok so straight forward enough

SetWindowTheme( hCtl, L"", L"") disables visual styles for an individual control. Passing in NULL instead of an empty string does not work by the way and was why I was a bit stumped before.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
August 14 2013 08:43 GMT
#6839
That kind of depends on the technology (for example WPF, MFC, Win32 or whatever that ancient stuff is called) you are using for your user interface, but generally I'd assume you can change styles for individual controls, yes.
If you have a good reason to disagree with the above, please tell me. Thank you.
adwodon
Profile Blog Joined September 2010
United Kingdom592 Posts
Last Edited: 2013-08-14 09:02:03
August 14 2013 09:01 GMT
#6840
On August 14 2013 17:43 spinesheath wrote:
That kind of depends on the technology (for example WPF, MFC, Win32 or whatever that ancient stuff is called) you are using for your user interface, but generally I'd assume you can change styles for individual controls, yes.


Yea its all Win32, I've not dared touch anything else, MFC looks a bit horrible. WPF looks mental but I hear if you can do it you can get some pretty swanky jobs, looks like a bitch to debug though and in my current job I've got very little excuse to learn .NET outside of writing some sample apps for our SDK.

Figured it out in the end though
Prev 1 340 341 342 343 344 1032 Next
Please log in or register to reply.
Live Events Refresh
Showmatch
15:00
Shopify Rebellion Sunday #7
Harstem283
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Harstem 338
SHIN 76
MindelVK 62
StarCraft: Brood War
Britney 58228
Calm 4849
Shuttle 1289
Jaedong 1166
Hyuk 790
EffOrt 784
Mini 598
Light 403
Soma 399
firebathero 235
[ Show more ]
Stork 221
actioN 203
ZerO 175
BeSt 172
Soulkey 153
ggaemo 107
Last 104
Mong 94
hero 86
ToSsGirL 56
Sharp 55
Free 42
scan(afreeca) 41
soO 35
sorry 21
HiyA 20
Rock 20
yabsab 16
Hm[arnc] 14
Sexy 12
Noble 11
zelot 9
Purpose 6
Dota 2
Gorgc7811
qojqva1411
Dendi1241
XaKoH 615
XcaliburYe68
Counter-Strike
fl0m1022
byalli606
edward343
Other Games
gofns19434
FrodaN7868
B2W.Neo842
Liquid`RaSZi555
crisheroes291
Pyrionflax282
Hui .197
KnowMe179
ZerO(Twitch)19
Organizations
Other Games
BasetradeTV236
StarCraft: Brood War
lovetv 14
Kim Chul Min (afreeca) 13
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 15 non-featured ]
StarCraft 2
• poizon28 60
• StrangeGG 31
• HeavenSC 24
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Michael_bg 12
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Nemesis3430
Upcoming Events
IPSL
48m
Bonyth vs Hawk
OSC
8h 48m
GSL
19h 48m
Monday Night Weeklies
1d
Replay Cast
1d 8h
WardiTV Weekly
1d 19h
The PondCast
2 days
Replay Cast
3 days
CrankTV Team League
3 days
Replay Cast
4 days
[ Show More ]
CrankTV Team League
4 days
Replay Cast
5 days
RSL Revival
5 days
Clem vs Lambo
Scarlett vs Cure
CranKy Ducklings
5 days
RSL Revival
6 days
Classic vs Trap
herO vs SHIN
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

ASL Season 22: Wild Card Qualifier
HSC XXIX
Eternal Conflict S2 E1

Ongoing

IPSL Spring 2026
Acropolis #4
YSL S3
CSL 2026 Summer (S21)
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
Eternal Conflict S2 E2
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026

Upcoming

Escore Tournament S3: W3
ASL S22 SEASON OPEN Day 1
Escore Tournament S3: W4
ASL S22 SEASON OPEN Day 2
Escore Tournament S3: W5
CSLAN 4
Blizzard Classic Cup 2026
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
Light Tournament 2026
Eternal Conflict S2 Finale
Eternal Conflict S2 E3
Logitech G Connect 2026
StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Disclosure: This page contains affiliate marketing links that support TLnet.

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.