• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 13:39
CEST 19:39
KST 02:39
  • 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
Code S Season 2 (2026) - RO8 Preview4[ASL21] Finals Preview: Two Legacies21Code S Season 2 (2026) - RO12 Preview2herO wins GSL Code S Season 1 (2026)7Code S Season 1 (2026) - RO4 & Finals Preview5
Community News
Weekly Cups (May 18-25): MaxPax wins doubles0Crank Gathers Season 4: BW vs SC2 Team League4Weekly Cups (May 11-17): Classic wins double0Code S Season 1 (2026) - RO8 Results2Weekly Cups (May 4-10): Clem, MaxPax, herO win1
StarCraft 2
General
herO wins GSL Code S Season 1 (2026) Code S Season 2 (2026) - RO8 Preview Weekly Cups (May 18-25): MaxPax wins doubles Code S Season 2 (2026) - RO12 Preview Weekly Cups (May 11-17): Classic wins double
Tourneys
GSL Code S Season 2 (2026) Sparkling Tuna Cup - Weekly Open Tournament Crank Gathers Season 4: BW vs SC2 Team League GSL Code S Season 1 (2026) Maestros of The Game 2 announcement and schedule !
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players
External Content
Welcome to the External Content forum Mutation # 527 Hell Train The PondCast: SC2 News & Results Mutation # 526 Rubber and Glue
Brood War
General
Pros React To: ASL S21 Finals Every Matchup's Top 5 Winrates (all ASLs & KSLs) BW General Discussion Very long shot - StarCraft x A7X video Pros React to: TvT Masterclass in FlaSh vs Light
Tourneys
[ASL21] Grand Finals Escore Tournament StarCraft Season 2 [BSL22] WB Final & LB Semis - Saturday 21:00 CEST [Megathread] Daily Proleagues
Strategy
Any training maps people recommend? Muta micro map competition [G] Hydra ZvZ: An Introduction Fighting Spirit mining rates
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread ZeroSpace Megathread Path of Exile Dawn of War IV
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Trading/Investing Thread Dating: How's your luck? European Politico-economics QA Mega-thread
Fan Clubs
The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread McBoner: A hockey love story TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
Facing Challenges in Mobile App Development streaming software
TL Community
The Automated Ban List
Blogs
Customization Drives Loyalty…
TrAiDoS
Why RTS gamers make better f…
gosubay
ramps on octagon
StaticNine
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2644 users

The Big Programming Thread - Page 852

Forum Index > General Forum
Post a Reply
Prev 1 850 851 852 853 854 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.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
February 24 2017 22:28 GMT
#17021
On February 25 2017 05:53 Blisse wrote:
Also in other news, words cannot describe how much I'm disgusted by indie developers.

Been meaning to do foobar2000 development for a while, but never got into it because of the high barrier to entry, so I finally sat down yesterday to plow through getting a build to... build. So many Visual Studio issues to work through, like hardcoded library paths, hardcoded build scripts, missing libs... and the code quality is also so poor. Like seriously, single 3000-line file. the nice part is refactoring stuff will help me learn what's what.

Be fair, you're disgusted by bad developers, not indie developers.
If you have a good reason to disagree with the above, please tell me. Thank you.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
February 24 2017 22:30 GMT
#17022
On February 25 2017 07:28 spinesheath wrote:
Show nested quote +
On February 25 2017 05:53 Blisse wrote:
Also in other news, words cannot describe how much I'm disgusted by indie developers.

Been meaning to do foobar2000 development for a while, but never got into it because of the high barrier to entry, so I finally sat down yesterday to plow through getting a build to... build. So many Visual Studio issues to work through, like hardcoded library paths, hardcoded build scripts, missing libs... and the code quality is also so poor. Like seriously, single 3000-line file. the nice part is refactoring stuff will help me learn what's what.

Be fair, you're disgusted by bad developers, not indie developers.


There's no difference! *mouth froths uncontrollably*
There is no one like you in the universe.
shz
Profile Blog Joined October 2010
Germany2687 Posts
February 24 2017 23:10 GMT
#17023
On February 25 2017 05:53 Blisse wrote:
Also in other news, words cannot describe how much I'm disgusted by indie developers.

Been meaning to do foobar2000 development for a while, but never got into it because of the high barrier to entry, so I finally sat down yesterday to plow through getting a build to... build. So many Visual Studio issues to work through, like hardcoded library paths, hardcoded build scripts, missing libs... and the code quality is also so poor. Like seriously, single 3000-line file. the nice part is refactoring stuff will help me learn what's what.



Don't you dare criticize our dear lord and savior Peter P.
Liquipedia
phar
Profile Joined August 2011
United States1080 Posts
Last Edited: 2017-02-25 01:49:11
February 25 2017 01:43 GMT
#17024
On February 25 2017 06:15 travis wrote:


also how do C developers not go crazy staring at this shit

Because they are crazy. See https://www.usenix.org/system/files/1311_05-08_mickens.pdf

I would copy some select quotes for enticement but there are so many I can't choose.
Who after all is today speaking about the destruction of the Armenians?
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2017-02-25 03:27:45
February 25 2017 02:31 GMT
#17025
+ Show Spoiler +

http://imgur.com/a/QQaZd

What am I missing about this question? (we include 0 as natural numbers)

Do i need sleep or something?

a and b are natural numbers.
make a = 0 and b = 0

4 * 0 + 5 * 0 = 0
0 >= 0


(i guess they want a and b to not be equal? but is that some rule that I don't know about? they didn't explicitly say that)


oops. click the spoiler if you want to see stupidity. I definitely do need sleep. I see my mistake now. I was thinking "there exists n >= n_0 instead of "for all n >= n_0"
tofucake
Profile Blog Joined October 2009
Hyrule19215 Posts
February 25 2017 02:47 GMT
#17026
0 is not a natural number
Liquipediaasante sana squash banana
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2017-02-25 03:00:21
February 25 2017 02:51 GMT
#17027
it is in our class.

(in other news, I got an interview with amazon)
scudst0rm
Profile Joined May 2010
Canada1149 Posts
February 25 2017 03:30 GMT
#17028
It has to hold for all n > n_0
It works for 0 but not for 1,2,3,6,7,11
You're like a one ranger army comin' at me...
tofucake
Profile Blog Joined October 2009
Hyrule19215 Posts
February 25 2017 03:35 GMT
#17029
On February 25 2017 11:51 travis wrote:
it is in our class.

(in other news, I got an interview with amazon)

well then your class is wrong

good luck with the interview
Liquipediaasante sana squash banana
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
February 25 2017 03:49 GMT
#17030
On February 25 2017 12:35 tofucake wrote:
Show nested quote +
On February 25 2017 11:51 travis wrote:
it is in our class.

(in other news, I got an interview with amazon)

well then your class is wrong

good luck with the interview


why is the class "wrong". A google search show's that it's pretty obvious there is no consensus.
Mr. Wiggles
Profile Blog Joined August 2010
Canada5894 Posts
February 25 2017 04:46 GMT
#17031
It seems like we have a quorum. As a C developer I'm officially crazy!

In other news I'm going to start working on a device driver at work, which should be fun. I'm wondering if the fact that I'm looking forward to it is a symptom of my insanity.
you gotta dance
bangsholt
Profile Joined June 2011
Denmark138 Posts
Last Edited: 2017-02-25 12:13:08
February 25 2017 12:12 GMT
#17032
Working with device drivers truely is a special kind of insanity.

Good luck, may the data sheet be with you... (Although the real funny part doesn't start until you realize the data sheet is lying, or you have a different HW rev from the one described where there's a change for no apparent reason)
tofucake
Profile Blog Joined October 2009
Hyrule19215 Posts
February 25 2017 13:25 GMT
#17033
On February 25 2017 12:49 travis wrote:
Show nested quote +
On February 25 2017 12:35 tofucake wrote:
On February 25 2017 11:51 travis wrote:
it is in our class.

(in other news, I got an interview with amazon)

well then your class is wrong

good luck with the interview


why is the class "wrong". A google search show's that it's pretty obvious there is no consensus.

well then your homework thinger is wrong
Liquipediaasante sana squash banana
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2017-02-25 15:48:11
February 25 2017 15:06 GMT
#17034
there is something in this project I am having so much trouble putting together
we are supposed to find every instance of a substring in our array of strings, and replace the substring with a new string (of varying length)

but we can't use dynamic memory allocation

it's... a bit beyond me. They didn't really explain how to do this.

So, I have an idea to start.. use strstr in a loop to find pointers to the locations where the targets are found

then I guess I need to copy the string into a new string up to that point
then copy the replacement from that point
then copy the rest of the original string after THAT point

and then replace the original string with my new one

but.. I don't really know how to do this

edit: I think I've figured it out using strcat and strcpy

edit: uh oh. stack smashing detected. that's new for me. think maybe I am copying too much into my string!
DickMcFanny
Profile Blog Joined September 2015
Ireland1076 Posts
February 25 2017 19:30 GMT
#17035
Sorry if that's a stupid question, but how do I express iteration in JS?

Let's say I have a quadratic formula, f(x) = x^2 + 1. f(0) = 1, so the next step is to find out f(1), which is 2, so the next step is to find f(2), which is 5, so the next step is to find f(5), which is 26, so the next step is to find f(26) and so on.

I'm not sure what I should even google, neither in German nor English.
| (• ◡•)|╯ ╰(❍ᴥ❍ʋ)
Acrofales
Profile Joined August 2010
Spain18296 Posts
February 25 2017 19:35 GMT
#17036
could do it recursively, or in a loop, depending on what you need. In a loop, it's pretty trivial:


x = 0;
while(<condition>) {
x = x^2 + 1; //not quite sure on squared syntax in JS, it might be x**2. If in doubt, just write x*x
}
DickMcFanny
Profile Blog Joined September 2015
Ireland1076 Posts
February 25 2017 19:41 GMT
#17037
How would it look recursively?
| (• ◡•)|╯ ╰(❍ᴥ❍ʋ)
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
February 25 2017 19:41 GMT
#17038
that's easy to do but what are you wanting to do with it? just print the outputs?

like, print out

1
2
5
26

etc?
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2017-02-25 19:45:04
February 25 2017 19:44 GMT
#17039
recursive would be just as simple
x = 0;
function(int x) {
x = x^2 + 1
function(x)
}

of course you'd need to stop it at some point

note: this may not be the syntax for javascript because I don't know javascript
DickMcFanny
Profile Blog Joined September 2015
Ireland1076 Posts
Last Edited: 2017-02-25 20:08:45
February 25 2017 19:48 GMT
#17040
Jesus, that's much easier than I expected.

"like, print out

1
2
5
26"

Exactly. Each change to X should be printed out.
| (• ◡•)|╯ ╰(❍ᴥ❍ʋ)
Prev 1 850 851 852 853 854 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 1h 21m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 389
mouzHeroMarine 266
elazer 213
UpATreeSC 111
ProTech82
BRAT_OK 58
StarCraft: Brood War
Britney 16034
BeSt 285
ggaemo 266
Rush 259
firebathero 163
Dewaltoss 101
Mind 47
sorry 32
Rock 26
IntoTheRainbow 22
[ Show more ]
Sacsri 20
Shine 19
Sexy 12
Dota 2
qojqva1734
Counter-Strike
fl0m1802
byalli455
edward18
Heroes of the Storm
XaKoH 115
MindelVK3
Other Games
Grubby2899
Liquid`RaSZi1091
Beastyqt607
Dendi483
ceh9336
Hui .219
ArmadaUGS114
C9.Mang095
Mew2King81
KnowMe72
QueenE69
Trikslyr57
Organizations
Counter-Strike
PGL262
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 18 non-featured ]
StarCraft 2
• intothetv
• Kozan
• sooper7s
• Migwel
• AfreecaTV YouTube
• LaughNgamezSOOP
• IndyKCrew
StarCraft: Brood War
• 80smullet 23
• Michael_bg 9
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• lizZardDota250
League of Legends
• Nemesis3872
• Jankos2384
• TFBlade1120
Other Games
• imaqtpie830
• Shiphtur108
Upcoming Events
OSC
1h 21m
Cham vs Percival
ShoWTimE vs Lambo
Krystianer vs sebesdes
Cure vs Babymarine
SKillous vs Arrogfire
Gerald vs MindelVK
goblin vs TBD
Jumy vs HonMonO
Replay Cast
6h 21m
Maestros of the Game
19h 21m
Big Brain Bouts
22h 21m
Shino vs Scarlett
Bly vs DnS
Serral vs ByuN
Replay Cast
1d 6h
RSL Revival
1d 13h
Lambo vs SHIN
Solar vs Rogue
herO vs Clem
Maestros of the Game
1d 17h
IPSL
1d 22h
ZZZero vs WorsT
Julia vs eOnzErG
BSL
2 days
TerrOr vs Dewalt
Bonyth vs eOnzErG
Replay Cast
2 days
[ Show More ]
RSL Revival
2 days
Maestros of the Game
2 days
OSC
2 days
IPSL
2 days
Dragon vs Artosis
dxtr13 vs Hawk
BSL
3 days
Wardi Open
3 days
Monday Night Weeklies
3 days
Replay Cast
4 days
Sparkling Tuna Cup
4 days
WardiTV Spring Champion…
4 days
Maestros of the Game
4 days
The PondCast
5 days
Maestros of the Game
5 days
Replay Cast
6 days
Replay Cast
6 days
WardiTV Spring Champion…
6 days
Maestros of the Game
6 days
Liquipedia Results

Completed

ASL Season 21
2026 GSL S1
Heroes Pulsing #1

Ongoing

2026 KK StarCraft Pro League
BSL Season 22
IPSL Spring 2026
KCM Race Survival 2026 Season 2
KK 2v2 League Season 1
Acropolis #4
CSCL: Masked Kings S4
SCTL 2026 Spring
WardiTV Spring 2026
2026 GSL S2
RSL Revival: Season 5
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals

Upcoming

Escore Tournament S2: King of Kings
YSL S3
BSL 22 Non-Korean Championship
CSLAN 4
Blizzard Classic Cup 2026
Kung Fu Cup 2026 Grand Finals
CranK Gathers Season 4: BW vs SC2 Team League
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
Bounty Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
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.