• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 04:18
CET 10:18
KST 18:18
  • 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
RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
Weekly Cups (Dec 15-21): Classic wins big, MaxPax & Clem take weeklies3ComeBackTV's documentary on Byun's Career !11Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win4Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2
StarCraft 2
General
ComeBackTV's documentary on Byun's Career ! Team TLMC #5: Winners Announced! What's the best tug of war? The Grack before Christmas Weekly Cups (Dec 15-21): Classic wins big, MaxPax & Clem take weeklies
Tourneys
OSC Season 13 World Championship $5,000+ WardiTV 2025 Championship $100 Prize Pool - Winter Warp Gate Masters Showdow Sparkling Tuna Cup - Weekly Open Tournament Winter Warp Gate Amateur Showdown #1
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 505 Rise From Ashes Mutation # 504 Retribution Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement
Brood War
General
BW General Discussion How soO Began His ProGaming Dreams Klaucher discontinued / in-game color settings BGH Auto Balance -> http://bghmmr.eu/ Recommended FPV games (post-KeSPA)
Tourneys
[Megathread] Daily Proleagues [BSL21] LB SemiFinals - Saturday 21:00 CET [BSL21] WB & LB Finals - Sunday 21:00 CET Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers Game Theory for Starcraft Current Meta Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread Mechabellum Stormgate/Frost Giant Megathread Beyond All Reason Path of Exile
Dota 2
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 Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas Survivor II: The Amazon Sengoku Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread 12 Days of Starcraft The Games Industry And ATVI Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List TL+ Announced Where to ask questions and add stream?
Blogs
National Diversity: A Challe…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Saturation point
Uldridge
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1598 users

The Big Programming Thread - Page 286

Forum Index > General Forum
Post a Reply
Prev 1 284 285 286 287 288 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.
yeastiality
Profile Joined April 2011
Canada374 Posts
Last Edited: 2013-04-18 01:41:23
April 18 2013 01:30 GMT
#5701
On April 09 2013 17:39 Tobberoth wrote:
Show nested quote +
On April 09 2013 17:24 Abductedonut wrote:
This doesn't have much to do with programming as it does ranting but here it goes.

Learn touch typing guys. Learn it properly (keys on home row and everything!). There will come a point in your career when you realize that IDEs are trash and that VIM is better than anything that you can find for text editing. And if you don't touch type it will be a pain to use.

Heed my warning! Don't be lazy and learn it!

I agree that learning to touch type is awesome for a programmer, but I don't know about that vim comment. Vim is certainly an amazing editor if you're good at it (as is emacs), but in some development, it's not as fitting. Especially if you work with microsoft technologies like C#, ASP.Net etc, you're going to want to use Visual Studio regardless.

That said, there are apparently some pretty sweet vim bindings for visual studio, but you have to pay for them.


edit:nah
dambros
Profile Joined July 2010
Brazil432 Posts
April 18 2013 01:57 GMT
#5702
Well, since Im pretty much lost regarding this problem I need to solve, maybe someone can give me some help.

I need to parse (in Java) a XML but the structure of the XML is as follow:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><list>
<AL type="1111" value="Company Name"/>
<AL type="2222" value="10"/>
<AL type="3333" value="20"/>
<AL addressType="MAC Address" type="44444" value="XX-XX-XX-XX-XX-XX"/>
<AL type="55555" value="YYYY"/>
</list>


I've looked around and couldn't find examples using a similar structure (including list and attributes values). Can someone give me some help or a similar example? I tried using XStream, but it wasn't clear to me how I would create POJOs for the xml in question, since all the examples I found used straightforward XMLs as follow:


<staff>
<name>John Doe</name>
<id>1234</id>
</staff>



No pain, no gain!
Kenpachi
Profile Blog Joined August 2009
United States9908 Posts
April 18 2013 01:57 GMT
#5703
I've been juggling some of my interests around and sometimes I wonder if I will truly love compsci and programming. I got a small taste of what its like from Flash Programming (class at school. had a blast just doing simple codes with introductory material) and programming my TI-83 lol. I also loved making maps back in Brood War but that probably isn't indicative of anything. How would I truly know if I should go further into programming and coding (i just read the article about programmers being a vague term but I guess I'm part of the majority that doesn't know enough ><)?
Nada's body is South Korea's greatest weapon.
JeanLuc
Profile Joined September 2010
Canada377 Posts
April 18 2013 02:01 GMT
#5704
On April 18 2013 10:57 Kenpachi wrote:
I've been juggling some of my interests around and sometimes I wonder if I will truly love compsci and programming. I got a small taste of what its like from Flash Programming (class at school. had a blast just doing simple codes with introductory material) and programming my TI-83 lol. I also loved making maps back in Brood War but that probably isn't indicative of anything. How would I truly know if I should go further into programming and coding (i just read the article about programmers being a vague term but I guess I'm part of the majority that doesn't know enough ><)?


You're here arent ya
If you can't find it within yourself to stand up and tell the truth-- you don't deserve to wear that uniform
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
April 18 2013 02:08 GMT
#5705
On April 18 2013 10:57 Kenpachi wrote:
I've been juggling some of my interests around and sometimes I wonder if I will truly love compsci and programming. I got a small taste of what its like from Flash Programming (class at school. had a blast just doing simple codes with introductory material) and programming my TI-83 lol. I also loved making maps back in Brood War but that probably isn't indicative of anything. How would I truly know if I should go further into programming and coding (i just read the article about programmers being a vague term but I guess I'm part of the majority that doesn't know enough ><)?

Program more if you're still interested in finding out.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
April 18 2013 02:15 GMT
#5706
On April 18 2013 10:57 Kenpachi wrote:
I've been juggling some of my interests around and sometimes I wonder if I will truly love compsci and programming. I got a small taste of what its like from Flash Programming (class at school. had a blast just doing simple codes with introductory material) and programming my TI-83 lol. I also loved making maps back in Brood War but that probably isn't indicative of anything. How would I truly know if I should go further into programming and coding (i just read the article about programmers being a vague term but I guess I'm part of the majority that doesn't know enough ><)?

Ya most programmers I know are like "herpa derpa nerd stuff"

And I'm like "I wanna play games"

Whenever I ask this question, I ask myself, what else would I do? Cook? Be a professional game theorycrafter?
There's nothing else I'm good at (either :p)
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
Last Edited: 2013-04-18 07:08:43
April 18 2013 07:06 GMT
#5707
While I'm not a fan of people doing jobs that they don't actually want (because they took it thinking they're good for no other jobs), I do encourage people to try programming to see if they enjoy it, because it really is a satisfying job. However, please don't stay in the profession simply because you like to program.

I see a lot of programmers just scrapping by because they enjoy programming and that just stuck with them because they didn't look at, try, or want other courses. Not that anything is wrong with that if your priorities are aligned well, but I would much rather you try to pursue all the goals you have set for yourself rather than just "settle" as a programmer.


In reality, a lot of "programmers" just do programming as their job - they're pretty chill otherwise. And then you have some that live and breathe programming and computer science. It's a really mixed bunch, and you don't really have to be "herpa derpa nerd" to be one, even though it caters to that area I suppose. And the jobs you can get that are considered programming are still extremely varied. So it's good in that regard. Just try not to go into programming, or any field, with the attitude that you're only here because you have no other useful skills.

To find out what programming really is, dive into your own projects and see what disciplines of programming you enjoy the most. After getting experience by developing your own applications and diving into open-source projects, try a short internship and see if you like it. If you don't, tell us and we'll tell you if it's what you should expect in the real world :p Experience is the most important point for programmers.
There is no one like you in the universe.
KaiserJohan
Profile Joined May 2010
Sweden1808 Posts
April 18 2013 07:12 GMT
#5708
On April 18 2013 10:57 Kenpachi wrote:
I've been juggling some of my interests around and sometimes I wonder if I will truly love compsci and programming. I got a small taste of what its like from Flash Programming (class at school. had a blast just doing simple codes with introductory material) and programming my TI-83 lol. I also loved making maps back in Brood War but that probably isn't indicative of anything. How would I truly know if I should go further into programming and coding (i just read the article about programmers being a vague term but I guess I'm part of the majority that doesn't know enough ><)?


Have a look at some coding tutorials I suppose.
Also be prepared computer science programs usually have some math as well (varies, but I had like 40-50%) although in practice you wont end up using that much of it.
Still some stuff like linear algebra became super useful when I started programming 3d graphics, something I could not have foreseen all those years ago
England will fight to the last American
Isualin
Profile Joined March 2011
Germany1903 Posts
Last Edited: 2013-04-18 12:26:26
April 18 2013 12:26 GMT
#5709
i know this is not programming but this thread is the best place i could ask.
+ Show Spoiler +
http://i.imgur.com/QlGpd.gif

i want to do a similiar thing by hiding a text in a bmp file. i tried few and all of them start with stuff like "BMZ 6 (     $ " then other characters according to colors in a text editor. anyone have any idea on the bmp format?
P.S:i know there is a method using the least significant bits to hide stuff in images and audio files but i dont want to do that.
| INnoVation | The literal god TY | ByuNjwa | LRSL when? |
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
April 18 2013 13:16 GMT
#5710
On April 18 2013 21:26 Isualin wrote:
i know this is not programming but this thread is the best place i could ask.
+ Show Spoiler +
http://i.imgur.com/QlGpd.gif

i want to do a similiar thing by hiding a text in a bmp file. i tried few and all of them start with stuff like "BMZ 6 (     $ " then other characters according to colors in a text editor. anyone have any idea on the bmp format?
P.S:i know there is a method using the least significant bits to hide stuff in images and audio files but i dont want to do that.


Wikipedia is your friend:
http://en.wikipedia.org/wiki/BMP_file_format
Isualin
Profile Joined March 2011
Germany1903 Posts
April 18 2013 15:22 GMT
#5711
of course i checked the wikipedia article before but i couldn't figure how i am going to use it until i tried a HEX editor. thanks anyway, i managed to do what i wanted.
| INnoVation | The literal god TY | ByuNjwa | LRSL when? |
AmericanUmlaut
Profile Blog Joined November 2010
Germany2583 Posts
April 19 2013 07:24 GMT
#5712
Does anyone in here have experience writing Firefox add-ins? I'm working on one and having a very frustrating problem: I have a script that by its nature (it's an implementation of bcrypt) runs slowly, and scripts running in the chrome's context run even slower, so I'm trying to dynamically load the script into the document so it'll run in the document context and (hopefully) run as quickly as the dedicated webpage version of the program. I've set contentaccessible=yes as described in the mdn docs in my chrome.manifest, but the scripts are still being blocked.

If you understood the above paragraph and think you can help, I would be eternally grateful for any ideas.
The frumious Bandersnatch
betaflame
Profile Joined November 2010
175 Posts
Last Edited: 2013-04-19 22:10:40
April 19 2013 16:41 GMT
#5713
Anyone have experience with PHP simple HTML DOM Parser? I am trying to parse a url and extract an img src from one of the headers.

EDIT: Figured it out!! But I am just wondering if anyone has any idea about the differences/pros/cons of simple HTML DOM Parser vs the built in DOM libraries.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2013-04-20 23:45:42
April 20 2013 23:29 GMT
#5714
On April 20 2013 01:41 betaflame wrote:
Anyone have experience with PHP simple HTML DOM Parser? I am trying to parse a url and extract an img src from one of the headers.

EDIT: Figured it out!! But I am just wondering if anyone has any idea about the differences/pros/cons of simple HTML DOM Parser vs the built in DOM libraries.

Not sure what the difference is between a dom parser and library is. I thought someone else would have experience with this.


I'm watching a speeding up joomla webinar right now.
In an effort to be more social, I'll post the link here
+ Show Spoiler +

How do I make a site better? Faster? With the joomla framework? I feel like it's just going to be telling me to use cloudflare and optimize the site by removing debugging / unused features / buying more hosting.
Oh god it's so boring... But I learned you can have binary versions of PHP files so that when people access them they don't have to be recompiled every time. I now wonder if this is done automatically by web service providers.
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.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
April 21 2013 00:33 GMT
#5715
On April 21 2013 08:29 obesechicken13 wrote:
Show nested quote +
On April 20 2013 01:41 betaflame wrote:
Anyone have experience with PHP simple HTML DOM Parser? I am trying to parse a url and extract an img src from one of the headers.

EDIT: Figured it out!! But I am just wondering if anyone has any idea about the differences/pros/cons of simple HTML DOM Parser vs the built in DOM libraries.

Not sure what the difference is between a dom parser and library is. I thought someone else would have experience with this.


I'm watching a speeding up joomla webinar right now.
In an effort to be more social, I'll post the link here
+ Show Spoiler +
http://www.youtube.com/watch?v=s3gwwcahnkA&feature=youtu.be

How do I make a site better? Faster? With the joomla framework? I feel like it's just going to be telling me to use cloudflare and optimize the site by removing debugging / unused features / buying more hosting.
Oh god it's so boring... But I learned you can have binary versions of PHP files so that when people access them they don't have to be recompiled every time. I now wonder if this is done automatically by web service providers.


Optimization is a huge pet peeve of mine, i see it done wrong all the time.
There are many ways to make a site faster. However, 90% of those ways cost more in man hours than just buying another server, so in reality noone cares if your site only has 80% of the possible performance. Readable and maintainable code is usually fast enough that only very few usecases require you to do performance optimization. Sites of the scope of Facebook or Amazon require careful optimization but, well, you won't be working on those any time soon.

Web Service Providers often don't have special optimizations because they can interfere with the clients scripts and have bad side effects. Sites that really require the performance usually have their own servers anyways.

From experience i can tell you:
Only optimize if there really IS a noticeable bottleneck, otherwise focus on writing clean code first.

Relevant links:
http://www.codinghorror.com/blog/2009/01/the-sad-tragedy-of-micro-optimization-theater.html
http://www.codinghorror.com/blog/2008/12/hardware-is-cheap-programmers-are-expensive.html
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2013-04-21 02:14:17
April 21 2013 02:02 GMT
#5716
On April 21 2013 09:33 Morfildur wrote:
Show nested quote +
On April 21 2013 08:29 obesechicken13 wrote:
On April 20 2013 01:41 betaflame wrote:
Anyone have experience with PHP simple HTML DOM Parser? I am trying to parse a url and extract an img src from one of the headers.

EDIT: Figured it out!! But I am just wondering if anyone has any idea about the differences/pros/cons of simple HTML DOM Parser vs the built in DOM libraries.

Not sure what the difference is between a dom parser and library is. I thought someone else would have experience with this.


I'm watching a speeding up joomla webinar right now.
In an effort to be more social, I'll post the link here
+ Show Spoiler +
http://www.youtube.com/watch?v=s3gwwcahnkA&feature=youtu.be

How do I make a site better? Faster? With the joomla framework? I feel like it's just going to be telling me to use cloudflare and optimize the site by removing debugging / unused features / buying more hosting.
Oh god it's so boring... But I learned you can have binary versions of PHP files so that when people access them they don't have to be recompiled every time. I now wonder if this is done automatically by web service providers.


There are many ways to make a site faster. However, 90% of those ways cost more in man hours than just buying another server, so in reality noone cares if your site only has 80% of the possible performance. Readable and maintainable code is usually fast enough that only very few usecases require you to do performance optimization.

Both good points. Developer time is very valuable imo and so it should be used in the most useful ways.

Optimization isn't worth the time for many sites.

Right now I'm going into a course for interactive programming for python on Coursera. I was always confused by how Coursera would make any revenue. They recently added certificates though $45 each I think... Also some of these companies trying to add certification use webcams to monitor test taking and others rent out test centers.
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.
b3n3tt3
Profile Joined January 2012
595 Posts
April 21 2013 02:42 GMT
#5717
On April 18 2013 21:26 Isualin wrote:
i know this is not programming but this thread is the best place i could ask.
+ Show Spoiler +
http://i.imgur.com/QlGpd.gif

i want to do a similiar thing by hiding a text in a bmp file. i tried few and all of them start with stuff like "BMZ 6 (     $ " then other characters according to colors in a text editor. anyone have any idea on the bmp format?
P.S:i know there is a method using the least significant bits to hide stuff in images and audio files but i dont want to do that.


There is a better and more sophisticated way. Try googling steganography. There's a program called openpuff that does it.
phar
Profile Joined August 2011
United States1080 Posts
April 21 2013 03:56 GMT
#5718
On April 21 2013 11:42 b3n3tt3 wrote:
Show nested quote +
On April 18 2013 21:26 Isualin wrote:
i know this is not programming but this thread is the best place i could ask.
+ Show Spoiler +
http://i.imgur.com/QlGpd.gif

i want to do a similiar thing by hiding a text in a bmp file. i tried few and all of them start with stuff like "BMZ 6 (     $ " then other characters according to colors in a text editor. anyone have any idea on the bmp format?
P.S:i know there is a method using the least significant bits to hide stuff in images and audio files but i dont want to do that.


There is a better and more sophisticated way. Try googling steganography. There's a program called openpuff that does it.

Gotta defeat that light pink book man. If Isualin is doing something for class this may be overkill. But I guess if he's trying to hide shit from someone, openpuff is probably right up his alley. Cool stuff
Who after all is today speaking about the destruction of the Armenians?
necrosexy
Profile Joined March 2011
451 Posts
April 21 2013 06:11 GMT
#5719
any recommendations of LInux API intro texts?
Arnstein
Profile Blog Joined May 2010
Norway3381 Posts
Last Edited: 2013-04-21 19:41:34
April 21 2013 19:41 GMT
#5720
I need help with something:

In a class, I have to make an add function that takes in another instance of that class, and iterate over a private member of that function, a map that takes in two string arguments. Then I have to iterate over the first string argument, and add both to the existing one. This doesn't work:
+ Show Spoiler +

void add ( const PhonebookEntry& copyFrom ) 
{
for ( map<string, string>::iterator itty = this->numbers.begin() ; itty != this->numbers.end() ; itty++ )
{
}

}



What is the correct way to iterate over this?
rsol in response to the dragoon voice being heard in SCII: dragoon ai reaches new lows: wanders into wrong game
Prev 1 284 285 286 287 288 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 42m
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
Larva 753
Jaedong 596
Mong 418
Stork 400
hero 160
sorry 140
Shuttle 116
Sharp 112
Sacsri 75
Pusan 60
[ Show more ]
NotJumperer 39
ToSsGirL 36
Rush 33
NaDa 23
JulyZerg 12
Terrorterran 11
eros_byul 0
Dota 2
XcaliburYe36
League of Legends
JimRising 597
C9.Mang0468
Counter-Strike
summit1g9642
minikerr64
Other Games
Happy308
mouzStarbuck293
XaKoH 156
trigger12
Organizations
Other Games
gamesdonequick881
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 12 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1534
• Jankos679
Upcoming Events
Sparkling Tuna Cup
42m
Krystianer vs Classic
TriGGeR vs SKillous
Percival vs Ryung
ByuN vs Nicoract
OSC
8h 42m
BSL 21
10h 42m
Cross vs Dewalt
Replay Cast
23h 42m
Wardi Open
1d 2h
OSC
2 days
Solar vs MaxPax
ByuN vs Krystianer
Spirit vs TBD
OSC
5 days
Korean StarCraft League
5 days
OSC
6 days
OSC
6 days
Liquipedia Results

Completed

Escore Tournament S1: W1
WardiTV 2025
META Madness #9

Ongoing

C-Race Season 1
IPSL Winter 2025-26
BSL Season 21
CSL Season 19: Qualifier 2
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025

Upcoming

CSL 2025 WINTER (S19)
Escore Tournament S1: W2
Escore Tournament S1: W3
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
OSC Championship Season 13
Nations Cup 2026
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 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 © 2025 TLnet. All Rights Reserved.