• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 16:26
CET 22:26
KST 06:26
  • 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
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1464 users

The Big Programming Thread - Page 287

Forum Index > General Forum
Post a Reply
Prev 1 285 286 287 288 289 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.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2013-04-21 19:57:27
April 21 2013 19:55 GMT
#5721
edit: might be wrong.
conspired against by a confederacy of dunces.
iaretehnoob
Profile Joined June 2004
Sweden741 Posts
April 21 2013 20:11 GMT
#5722
On April 22 2013 04:41 Arnstein wrote:
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?

Define "This doesn't work". What is the error?
Also while the rest of the question is not really clear to me, I think you want to iterate over copyFrom.numbers, not this->numbers.
Better yet: look at map::insert().
Arnstein
Profile Blog Joined May 2010
Norway3381 Posts
Last Edited: 2013-04-21 20:17:48
April 21 2013 20:15 GMT
#5723
On April 22 2013 05:11 iaretehnoob wrote:
Show nested quote +
On April 22 2013 04:41 Arnstein wrote:
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?

Define "This doesn't work". What is the error?
Also while the rest of the question is not really clear to me, I think you want to iterate over copyFrom.numbers, not this->numbers.
Better yet: look at map::insert().


I think I want to iterate over the old one, not the copyFrom. This is because you have to replace the old ones, but come to think about it, it's probably just better to iterate over the new one, then insert from it, and delete the ones left on the this->numbers.
The error I get is: invalid use of this outside of a nonstatic member function.

Edit:
If I iterate over the copyFrom, I will probably have to make a get-function for the map. This isn't mentioned in the task text, so I don't think that's the idea.
rsol in response to the dragoon voice being heard in SCII: dragoon ai reaches new lows: wanders into wrong game
iaretehnoob
Profile Joined June 2004
Sweden741 Posts
April 21 2013 20:29 GMT
#5724
I guess your function definition is in a .cpp file and you're missing the class identifier before the function name.
As in:
void PhonebookEntry::add(....) { } 

As for the logic, well, I don't know what you're trying to do, so I'll leave you to it, especially if it's HW.
tuho12345
Profile Blog Joined July 2011
4482 Posts
April 21 2013 20:43 GMT
#5725
hi everyone, I have an internship opportunity coming up, however I have to prepare some basic knowledge on MS SQL. I've read SQL for dummies but could anyone kind to guide me what else I can prepare and tutor or test me a little in the future? Thank you so much
Craton
Profile Blog Joined December 2009
United States17274 Posts
April 21 2013 20:45 GMT
#5726
Think of something to do and write queries that accomplish it.
twitch.tv/cratonz
Isualin
Profile Joined March 2011
Germany1903 Posts
April 21 2013 21:13 GMT
#5727
On April 22 2013 05:43 tuho12345 wrote:
hi everyone, I have an internship opportunity coming up, however I have to prepare some basic knowledge on MS SQL. I've read SQL for dummies but could anyone kind to guide me what else I can prepare and tutor or test me a little in the future? Thank you so much

i think you should find a sample database with a lot of data(like adventureworks) and try sql queries on it if you are inexperienced like me.
| INnoVation | The literal god TY | ByuNjwa | LRSL when? |
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
April 21 2013 22:58 GMT
#5728
On April 22 2013 05:43 tuho12345 wrote:
hi everyone, I have an internship opportunity coming up, however I have to prepare some basic knowledge on MS SQL. I've read SQL for dummies but could anyone kind to guide me what else I can prepare and tutor or test me a little in the future? Thank you so much


Just remember that MS SQL is different to MySQL.
The MS SQL (or rather SQL Server as it's called by MS) SQL dialect is T-SQL. There are some important differences to the MySQL dialect so be very careful when googling.

For something to program using the SQL Server, a simple blog or CMS should be easy enough but still complex enough to not be completely trivial.
Nazza
Profile Blog Joined August 2010
Australia1654 Posts
April 21 2013 23:20 GMT
#5729
On April 21 2013 11:02 obesechicken13 wrote:
Show nested quote +
On April 21 2013 09:33 Morfildur wrote:
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 +

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.


Coursera's pretty awesome. I don't think they expect to make too much money, as I think their main goals are just providing higher education to those that can't really afford it, or just giving access to as many people as they can. I'm about to finish a Python course called "Crafting quality code". It was pretty basic but I learned some things. Still taking a course in Scala, Hardware/Software Interface, and about to start one on machine learning. There's going to be Systematic Program design in a month too.
No one ever remembers second place, eh? eh? GIVE ME COMMAND
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
April 22 2013 01:20 GMT
#5730
On April 22 2013 08:20 Nazza wrote:
Show nested quote +
On April 21 2013 11:02 obesechicken13 wrote:
On April 21 2013 09:33 Morfildur wrote:
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.


Coursera's pretty awesome. I don't think they expect to make too much money, as I think their main goals are just providing higher education to those that can't really afford it, or just giving access to as many people as they can. I'm about to finish a Python course called "Crafting quality code". It was pretty basic but I learned some things. Still taking a course in Scala, Hardware/Software Interface, and about to start one on machine learning. There's going to be Systematic Program design in a month too.

I'm starting to dislike coursera again. I hate formal courses. I was able to do a project today: a rock paper scissors lizard spock game, but I didn't like having to watch video lectures.
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.
tuho12345
Profile Blog Joined July 2011
4482 Posts
April 22 2013 06:40 GMT
#5731
can anyone with Java skill help me with my particular problem? Please pm me I'll explain more.
Nazza
Profile Blog Joined August 2010
Australia1654 Posts
April 22 2013 08:05 GMT
#5732
On April 22 2013 10:20 obesechicken13 wrote:
Show nested quote +
On April 22 2013 08:20 Nazza wrote:
On April 21 2013 11:02 obesechicken13 wrote:
On April 21 2013 09:33 Morfildur wrote:
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.


Coursera's pretty awesome. I don't think they expect to make too much money, as I think their main goals are just providing higher education to those that can't really afford it, or just giving access to as many people as they can. I'm about to finish a Python course called "Crafting quality code". It was pretty basic but I learned some things. Still taking a course in Scala, Hardware/Software Interface, and about to start one on machine learning. There's going to be Systematic Program design in a month too.

I'm starting to dislike coursera again. I hate formal courses. I was able to do a project today: a rock paper scissors lizard spock game, but I didn't like having to watch video lectures.


The whole point of having lectures in that format is that you do projects and assignments, and that there is pressure on you to do them on the deadline. Otherwise, people don't learn, or won't be motivated to do stuff .

Some video lecturers are better than others, but frankly, as long as they speak proper English I don't really care.
No one ever remembers second place, eh? eh? GIVE ME COMMAND
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
April 22 2013 13:19 GMT
#5733
is somebody knowledgeable on how neural networks works here? can I send you a PM? specifically feed forward neural networks.
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
April 22 2013 13:45 GMT
#5734
On April 22 2013 22:19 icystorage wrote:
is somebody knowledgeable on how neural networks works here? can I send you a PM? specifically feed forward neural networks.

Why not just post it here?
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.
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
April 22 2013 14:25 GMT
#5735
i kinda feel these are basic questions and i just need someone to explain them to me :x i watched some videos and read about it but i need someone to answer my questions
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
AmericanUmlaut
Profile Blog Joined November 2010
Germany2583 Posts
April 22 2013 14:28 GMT
#5736
On April 22 2013 23:25 icystorage wrote:
i kinda feel these are basic questions and i just need someone to explain them to me :x i watched some videos and read about it but i need someone to answer my questions

So why don't you post them here? There's no rule against basic questions.
The frumious Bandersnatch
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
April 22 2013 14:39 GMT
#5737
Um okay

1) you can use neural networks to predict an output right?
2) how do you make it predict? do you have to train it?
3) by training it, it adjusts its weight right?
4) if i give NN a pattern of 1,1,1,1,1 will it predict the next number will be 1?
5) heres my general understanding in predicting neural networks
- train the network by feeding it data (it adjusts its weight and compares its output to your EXPECTED, not predicted, output)
- with the current configuration of the weights you now use it to get the predicted output

sorry if its confusing but im also very confused atm
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
nunez
Profile Blog Joined February 2011
Norway4003 Posts
April 22 2013 14:43 GMT
#5738
does anyone know some good reading material on lexical analysis?
need to buff my skills for summer job.
conspired against by a confederacy of dunces.
mcc
Profile Joined October 2010
Czech Republic4646 Posts
April 22 2013 15:18 GMT
#5739
On April 22 2013 23:39 icystorage wrote:
Um okay

1) you can use neural networks to predict an output right?
2) how do you make it predict? do you have to train it?
3) by training it, it adjusts its weight right?
4) if i give NN a pattern of 1,1,1,1,1 will it predict the next number will be 1?
5) heres my general understanding in predicting neural networks
- train the network by feeding it data (it adjusts its weight and compares its output to your EXPECTED, not predicted, output)
- with the current configuration of the weights you now use it to get the predicted output

sorry if its confusing but im also very confused atm

1) yes
2) You can either train it or set the weights "correctly" at the start by using some other process (but you can also call it training)
3) yes
4) Not necessarily. It depends on what patterns you trained it to recognize and also how well you trained it


Note that there is plenty of NN types and they have sometimes quite different ways of setting up weights. So you need to specify which type you are talking about, most likely some perceptron-like multi-layer network with backpropagation ?
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
April 22 2013 16:40 GMT
#5740
@mcc

im actually working on the perceptron-like multi-layer network with backpropagation and im kinda relieved it matched your suggestion (means im on the right track)

what im trying to do is use NN to predict stock prices (yes it is impossible but i want to test the NN with these data)
stock has 4 prices, open, low, high and close. i want it to predict the closing price. now, is the training (weight adjustment) separate from the predicting or should i input all the necessary data (technicalities aside, just the procedure) then expect the predicted value?
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
Prev 1 285 286 287 288 289 1032 Next
Please log in or register to reply.
Live Events Refresh
BSL 21
20:00
LB SemiFinal
Sziky vs eOnzErG
ZZZero.O208
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
IndyStarCraft 203
DisKSc2 44
Railgan 32
StarCraft: Brood War
Shuttle 616
ZZZero.O 208
Dewaltoss 138
JulyZerg 45
910 32
Dota 2
syndereN354
Counter-Strike
fl0m1408
pashabiceps1119
Heroes of the Storm
Liquid`Hasu438
Khaldor212
Other Games
Grubby6068
tarik_tv2593
Beastyqt859
B2W.Neo331
ToD280
RotterdaM231
ArmadaUGS133
XaKoH 110
ViBE1
Organizations
Other Games
gamesdonequick1334
StarCraft 2
angryscii 36
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• StrangeGG 64
• printf 61
• davetesta47
• IndyKCrew
• Migwel
• AfreecaTV YouTube
• intothetv
• Kozan
• sooper7s
• LaughNgamezSOOP
StarCraft: Brood War
• 80smullet 16
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV1251
• Ler86
League of Legends
• Stunt236
Other Games
• imaqtpie2692
Upcoming Events
Sparkling Tuna Cup
12h 34m
Krystianer vs Classic
TriGGeR vs SKillous
Percival vs Ryung
ByuN vs Nicoract
OSC
20h 34m
BSL 21
22h 34m
Cross vs Dewalt
Replay Cast
1d 11h
Wardi Open
1d 14h
OSC
2 days
Solar vs MaxPax
ByuN vs Krystianer
Spirit vs TBD
OSC
5 days
Korean StarCraft League
6 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.