• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 20:43
CEST 02:43
KST 09:43
  • 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 HomeStory Cup 2914Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12
Community News
Balance hotfix patch 5.0.16b (July 16)58Reynor: GSL Loss Wasn't About Preparation Format16[IPSL] Spring 2026 Grand Finals - This Weekend!13Weekly Cups (July 6 - 12): Protoss strike back12BSL Season 22 Full Overview & Conclusion8
StarCraft 2
General
Balance hotfix patch 5.0.16b (July 16) Clem: "I don't have that much hope in Blizzard" [D] Wireframe Casting Removed Reynor: GSL Loss Wasn't About Preparation Format Is the larve respawn broken?
Tourneys
RSL Revival: Season 6 - Qualifiers and Main Event Master Swan Open (Global Bronze-Master 2) WardiTV Summer Cup 2026 GSL CK #5 Race War HomeStory Cup 29
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 # 535 Assembly of Vengeance The PondCast: SC2 News & Results Mutation # 534 Burning Evacuation Mutation # 533 Die Together
Brood War
General
NaDa’s Body Followup BW General Discussion ASL22 General Discussion Pros Debate: Zerg Unfairly Nerfed? (ASL S22 map) Etiquete rules in Asl?
Tourneys
[IPSL] Spring 2026 Grand Finals - This Weekend! [Megathread] Daily Proleagues Escore Tournament - Season 3 Small VOD Thread 2.0
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Creating a full chart of Zerg builds Relatively freeroll strategies
Other Games
General Games
Nintendo Switch Thread Path of Exile Stormgate/Frost Giant Megathread General RTS Discussion Thread Beyond All Reason
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
TL Mafia Power Rank NeO.D_StephenKing vs This Guy From 1 Million Dance TL Mafia Community Thread Vanilla Mini Mafia
Community
General
How to buy a book - shipping from Korea to Europe US Politics Mega-thread Russo-Ukrainian War Thread The Games Industry And ATVI UK Politics Mega-thread
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Movie Discussion! Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023 McBoner: A hockey love story Tennis[sport]
World Cup 2022
Tech Support
Simple Questions Simple Answers FPS when play League Of Legend on laptop How to clean a TTe Thermaltake keyboard?
TL Community
Northern Ireland Global Starcraft The Automated Ban List
Blogs
Role of Gaming on Mental Hea…
TrAiDoS
ASL S22 English Commentary…
namkraft
Poker (part 2)
Nebuchad
An Exploration of th…
waywardstrategy
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 11817 users

The Big Programming Thread - Page 441

Forum Index > General Forum
Post a Reply
Prev 1 439 440 441 442 443 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.
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
February 10 2014 08:28 GMT
#8801
On February 10 2014 15:56 dapierow wrote:
Show nested quote +
On February 10 2014 15:46 Creepseep wrote:
On February 10 2014 15:18 dapierow wrote:
Hey guys, been trying to pop a card(class) off my stack(deck) in a java class for the past hour but it will always return the top card, even after Ive popped it off, can anyone help out?

...

The output works in the setUpDeck class, but in the main, it always returns ACE of CLUBS...


Just looked over it for a sec, maybe I'm wrong, but your class variables value and suit should'nt be static in this case.


2 hours of headache... because of that shit... are you fucking kidding me...
that'll teach me to write more than one class without testing it...

Thanks a bunch, ima go cry now for all that wasted time.


Welcome to programming :D
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
Manit0u
Profile Blog Joined August 2004
Poland17796 Posts
February 10 2014 08:34 GMT
#8802
On February 10 2014 15:56 dapierow wrote:
Show nested quote +
On February 10 2014 15:46 Creepseep wrote:
On February 10 2014 15:18 dapierow wrote:
Hey guys, been trying to pop a card(class) off my stack(deck) in a java class for the past hour but it will always return the top card, even after Ive popped it off, can anyone help out?

...

The output works in the setUpDeck class, but in the main, it always returns ACE of CLUBS...


Just looked over it for a sec, maybe I'm wrong, but your class variables value and suit should'nt be static in this case.


2 hours of headache... because of that shit... are you fucking kidding me...
that'll teach me to write more than one class without testing it...

Thanks a bunch, ima go cry now for all that wasted time.


Another thing that seems strange to me, is why are you setting up suits as ints only to transform them into strings later on?
Time is precious. Waste it wisely.
dapierow
Profile Blog Joined April 2010
Serbia1316 Posts
February 10 2014 10:08 GMT
#8803
On February 10 2014 17:34 Manit0u wrote:
Show nested quote +
On February 10 2014 15:56 dapierow wrote:
On February 10 2014 15:46 Creepseep wrote:
On February 10 2014 15:18 dapierow wrote:
Hey guys, been trying to pop a card(class) off my stack(deck) in a java class for the past hour but it will always return the top card, even after Ive popped it off, can anyone help out?

...

The output works in the setUpDeck class, but in the main, it always returns ACE of CLUBS...


Just looked over it for a sec, maybe I'm wrong, but your class variables value and suit should'nt be static in this case.


2 hours of headache... because of that shit... are you fucking kidding me...
that'll teach me to write more than one class without testing it...

Thanks a bunch, ima go cry now for all that wasted time.


Another thing that seems strange to me, is why are you setting up suits as ints only to transform them into strings later on?

Because I need the int of the suit rank in case there is a draw between the values of the cards
Eat.Sleep.Starcraft 2
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
February 10 2014 10:18 GMT
#8804
On February 10 2014 19:08 dapierow wrote:
Show nested quote +
On February 10 2014 17:34 Manit0u wrote:
On February 10 2014 15:56 dapierow wrote:
On February 10 2014 15:46 Creepseep wrote:
On February 10 2014 15:18 dapierow wrote:
Hey guys, been trying to pop a card(class) off my stack(deck) in a java class for the past hour but it will always return the top card, even after Ive popped it off, can anyone help out?

...

The output works in the setUpDeck class, but in the main, it always returns ACE of CLUBS...


Just looked over it for a sec, maybe I'm wrong, but your class variables value and suit should'nt be static in this case.


2 hours of headache... because of that shit... are you fucking kidding me...
that'll teach me to write more than one class without testing it...

Thanks a bunch, ima go cry now for all that wasted time.


Another thing that seems strange to me, is why are you setting up suits as ints only to transform them into strings later on?

Because I need the int of the suit rank in case there is a draw between the values of the cards


Should just set them up as ENUMs then. Store them as strings and ints.
Average means I'm better than half of you.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
February 10 2014 10:49 GMT
#8805
I need to automate the execution of a javascript file in Firefox imacro extension.

I'm starting Firefox and a the javascript imacro file using a batch/CMD file. I'm running the CMD file using Windows Task Scheduler.

Do you think using Windows Task Scheduler is the best way to automatically launch this every day?

I think the alternative would be to have the javascript running with a 24 hour timer or something?

Thankyou
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
February 10 2014 11:06 GMT
#8806
On February 10 2014 19:49 FFGenerations wrote:
I need to automate the execution of a javascript file in Firefox imacro extension.

I'm starting Firefox and a the javascript imacro file using a batch/CMD file. I'm running the CMD file using Windows Task Scheduler.

Do you think using Windows Task Scheduler is the best way to automatically launch this every day?

I think the alternative would be to have the javascript running with a 24 hour timer or something?

Thankyou

Any reason why you feel you shouldn't use the Task scheduler? I mean, it's used in professional settings, I can't think of a reason why you wouldn't want to use it.
Manit0u
Profile Blog Joined August 2004
Poland17796 Posts
February 10 2014 12:20 GMT
#8807
On February 10 2014 20:06 Tobberoth wrote:
Show nested quote +
On February 10 2014 19:49 FFGenerations wrote:
I need to automate the execution of a javascript file in Firefox imacro extension.

I'm starting Firefox and a the javascript imacro file using a batch/CMD file. I'm running the CMD file using Windows Task Scheduler.

Do you think using Windows Task Scheduler is the best way to automatically launch this every day?

I think the alternative would be to have the javascript running with a 24 hour timer or something?

Thankyou

Any reason why you feel you shouldn't use the Task scheduler? I mean, it's used in professional settings, I can't think of a reason why you wouldn't want to use it.


http://wiki.imacros.net/iimPlay


The version of iimPlay provided with the iMacros Enterprise Edition supports the playback of Javascript (.js) scripts in iMacros for Firefox. For example:


ret = iim1.iimOpen("-fx")
ret = iim1.iimPlay("MyScript.js")

Time is precious. Waste it wisely.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
February 10 2014 12:41 GMT
#8808
On February 10 2014 20:06 Tobberoth wrote:
Show nested quote +
On February 10 2014 19:49 FFGenerations wrote:
I need to automate the execution of a javascript file in Firefox imacro extension.

I'm starting Firefox and a the javascript imacro file using a batch/CMD file. I'm running the CMD file using Windows Task Scheduler.

Do you think using Windows Task Scheduler is the best way to automatically launch this every day?

I think the alternative would be to have the javascript running with a 24 hour timer or something?

Thankyou

Any reason why you feel you shouldn't use the Task scheduler? I mean, it's used in professional settings, I can't think of a reason why you wouldn't want to use it.


No reason but, being a nub, I need to check I'm not missing something! Thankyou :D
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2014-02-10 14:47:48
February 10 2014 14:45 GMT
#8809
On February 10 2014 09:55 darkness wrote:
How do you guys make a deep copy of an object in Java? I've done a bit of Google, and I've learnt that object.clone() is bad unless you just clone a primitive data type (Effective Java book as an argument). I've read about 2 other solutions - copy constructor and serialisation. Which one do you prefer and why? I feel like the copy constructor approach has so much code duplication (well, attributes are redefined) if I've understood the knack of it.


In case anyone is curious, I've found out some Java deep cloner library. Its link is: http://code.google.com/p/cloning/
I have to test it a little bit more to confirm if it works well, but from the quick run I've had, it does ok. I've noticed even StackOverflow users mention it.

Edit: I've noticed the cloner library depends on Objenesis (link). Is anyone familiar with it? Does it just bypass constructors and modify final variables?
Manit0u
Profile Blog Joined August 2004
Poland17796 Posts
February 10 2014 16:53 GMT
#8810
On February 10 2014 17:28 sluggaslamoo wrote:
Show nested quote +
On February 10 2014 15:56 dapierow wrote:
On February 10 2014 15:46 Creepseep wrote:
On February 10 2014 15:18 dapierow wrote:
Hey guys, been trying to pop a card(class) off my stack(deck) in a java class for the past hour but it will always return the top card, even after Ive popped it off, can anyone help out?

...

The output works in the setUpDeck class, but in the main, it always returns ACE of CLUBS...


Just looked over it for a sec, maybe I'm wrong, but your class variables value and suit should'nt be static in this case.


2 hours of headache... because of that shit... are you fucking kidding me...
that'll teach me to write more than one class without testing it...

Thanks a bunch, ima go cry now for all that wasted time.


Welcome to programming :D


Haha, I know how that feels. Just recently changed one header file in one of my projects, it was just a formatting change, no biggie. Suddenly, everything stops working and starts complaining. I revert the changes and everything is back to normal except for one class that keeps complaining (and it wasn't doing that before the changes).
Time is precious. Waste it wisely.
Cyx.
Profile Joined November 2010
Canada806 Posts
February 11 2014 01:29 GMT
#8811
On February 11 2014 01:53 Manit0u wrote:
Show nested quote +
On February 10 2014 17:28 sluggaslamoo wrote:
On February 10 2014 15:56 dapierow wrote:
On February 10 2014 15:46 Creepseep wrote:
On February 10 2014 15:18 dapierow wrote:
Hey guys, been trying to pop a card(class) off my stack(deck) in a java class for the past hour but it will always return the top card, even after Ive popped it off, can anyone help out?

...

The output works in the setUpDeck class, but in the main, it always returns ACE of CLUBS...


Just looked over it for a sec, maybe I'm wrong, but your class variables value and suit should'nt be static in this case.


2 hours of headache... because of that shit... are you fucking kidding me...
that'll teach me to write more than one class without testing it...

Thanks a bunch, ima go cry now for all that wasted time.


Welcome to programming :D


Haha, I know how that feels. Just recently changed one header file in one of my projects, it was just a formatting change, no biggie. Suddenly, everything stops working and starts complaining. I revert the changes and everything is back to normal except for one class that keeps complaining (and it wasn't doing that before the changes).

Oh my God, I fucking hate this lol... I spent upwards of three hours diffing my git logs down to every last fucking line over like three days of changes trying to find the one that had broken my game engine's FPS so horribly (made changes to unrelated part of the code, rebuild, FPS GOES TO SHIT OMG) and then I restarted my computer and everything was back to normal... why did I not think of that before I was at the point of almost breaking like twenty hours of work rofl.
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
February 11 2014 01:30 GMT
#8812
fuck debugging
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
phar
Profile Joined August 2011
United States1080 Posts
February 11 2014 02:29 GMT
#8813
debugging sucks, testing rocks

debugging tests sucks rocks
Who after all is today speaking about the destruction of the Armenians?
nunez
Profile Blog Joined February 2011
Norway4003 Posts
February 11 2014 05:34 GMT
#8814
There's a revolution coming to schools across England, one designed to transform a new generation's prospects in the digital age. Come September, a change to the curriculum means the study of computing - and specifically coding - will be mandatory across all state primary and secondary schools.
source

i dunno about this.
conspired against by a confederacy of dunces.
freelander
Profile Blog Joined December 2004
Hungary4707 Posts
February 11 2014 07:15 GMT
#8815
it's good to know a little bit of programming. I think it's a good idea.
And all is illuminated.
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
February 11 2014 07:34 GMT
#8816
On February 11 2014 14:34 nunez wrote:
Show nested quote +
There's a revolution coming to schools across England, one designed to transform a new generation's prospects in the digital age. Come September, a change to the curriculum means the study of computing - and specifically coding - will be mandatory across all state primary and secondary schools.
source

i dunno about this.

It's an amazing idea. First of all, computers are a massive aspect of life today, it makes sense that everyone should, to some extent, be able to tell them what to do . Another reason is the fact that programming is amazing for problem solving skills, it requires a ton of logical and abstract thinking. A third reason is the fact that most people who aren't computer nerds have no idea how programming and IT actually works, which is sad since they might enjoy it and could have made a career out of it. IT is a huge area of work these days, we need every young person to know what it's about in case they want to work in it.

It actually blows my mind that programming isn't mandatory everywhere by now. If nothing else, it should be included in math education since not only is it a really good way to train math, programming in stuff like Mathlab is actually very relevant to the field.
teamamerica
Profile Blog Joined July 2010
United States958 Posts
February 11 2014 07:45 GMT
#8817
On February 10 2014 23:45 darkness wrote:
Show nested quote +
On February 10 2014 09:55 darkness wrote:
How do you guys make a deep copy of an object in Java? I've done a bit of Google, and I've learnt that object.clone() is bad unless you just clone a primitive data type (Effective Java book as an argument). I've read about 2 other solutions - copy constructor and serialisation. Which one do you prefer and why? I feel like the copy constructor approach has so much code duplication (well, attributes are redefined) if I've understood the knack of it.


In case anyone is curious, I've found out some Java deep cloner library. Its link is: http://code.google.com/p/cloning/
I have to test it a little bit more to confirm if it works well, but from the quick run I've had, it does ok. I've noticed even StackOverflow users mention it.

Edit: I've noticed the cloner library depends on Objenesis (link). Is anyone familiar with it? Does it just bypass constructors and modify final variables?


The Objenesis doc says "allowing to create instance without any constructor being called...." but looking at the actual source code, it seems to go to Constructor.newInstance (http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Constructor.html#newInstance(java.lang.Object...)) which returns "a new object created by calling the constructor this object represents" so I'm a bit confused?
RIP GOMTV. RIP PROLEAGUE.
gedatsu
Profile Joined December 2011
1286 Posts
February 11 2014 08:24 GMT
#8818
I'm iffy about including programming as a mandatory subject. Most people will never have a reason to code a single line in their entire life. There are more important skills to "everyday life" that we don't teach in school, such as driving a car.

On the other hand, there already are a number of technical subjects in school curricula that are equally useless. Chemistry is a big one, which I think should be ditched immediately.
Manit0u
Profile Blog Joined August 2004
Poland17796 Posts
Last Edited: 2014-02-11 09:16:55
February 11 2014 09:16 GMT
#8819
On February 11 2014 17:24 gedatsu wrote:
I'm iffy about including programming as a mandatory subject. Most people will never have a reason to code a single line in their entire life. There are more important skills to "everyday life" that we don't teach in school, such as driving a car.

On the other hand, there already are a number of technical subjects in school curricula that are equally useless. Chemistry is a big one, which I think should be ditched immediately.


Some basic chemistry is actually pretty useful (how to counter acids for example, what substances produce toxic fumes when burned etc.).

I don't know about mandatory programming either. I had that (it was ages ago though) and because no self-respecting, good programmer is going to want to work with kids we got this clueless guy who was forcing Turbo Pascal down our throats. It sucked, we hated it, and just spent entire classes playing MUDs with friends.
Time is precious. Waste it wisely.
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
February 11 2014 09:25 GMT
#8820
On February 11 2014 18:16 Manit0u wrote:
Show nested quote +
On February 11 2014 17:24 gedatsu wrote:
I'm iffy about including programming as a mandatory subject. Most people will never have a reason to code a single line in their entire life. There are more important skills to "everyday life" that we don't teach in school, such as driving a car.

On the other hand, there already are a number of technical subjects in school curricula that are equally useless. Chemistry is a big one, which I think should be ditched immediately.


Some basic chemistry is actually pretty useful (how to counter acids for example, what substances produce toxic fumes when burned etc.).

Yeah science, bitch!

honestly, i hate chemistry. bonds, significant figures, elements and stuff
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
Prev 1 439 440 441 442 443 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 10h 17m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SpeCial 165
Tasteless 8
StarCraft: Brood War
GuemChi 3910
Artosis 722
Purpose 12
Dota 2
NeuroSwarm209
Counter-Strike
minikerr116
Super Smash Bros
hungrybox1089
Mew2King1017
C9.Mang0885
Heroes of the Storm
Khaldor187
Other Games
ToD296
Maynarde142
XaKoH 86
Organizations
Other Games
gamesdonequick2311
BasetradeTV296
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 16 non-featured ]
StarCraft 2
• Hupsaiya 112
• EnkiAlexander 47
• davetesta38
• RyuSc2 31
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota21516
Other Games
• Shiphtur664
Upcoming Events
WardiTV Weekly
10h 17m
Monday Night Weeklies
15h 17m
OSC
23h 17m
PiGosaur Cup
1d 23h
The PondCast
2 days
Kung Fu Cup
2 days
CrankTV Team League
3 days
Replay Cast
3 days
CrankTV Team League
4 days
Korean StarCraft League
5 days
[ Show More ]
RSL Revival
5 days
Online Event
5 days
Replay Cast
5 days
RSL Revival
6 days
Liquipedia Results

Completed

IPSL Spring 2026
HSC XXIX
Eternal Conflict S2 E2

Ongoing

Acropolis #4
CSL 2026 Summer (S21)
KCM Race Survival 2026 Season 3
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
Eternal Conflict S2 E3
Stake Ranked Episode 3
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

Upcoming

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
Stake Ranked Episode 4
Logitech G Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
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...

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.