• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 19:33
CEST 01:33
KST 08:33
  • 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
ZeroSpace Early Access is Now Live!10Weekly Cups (July 13-19): Terran & Protoss rise; Zerg falters2Balance hotfix patch 5.0.16b (July 16)80Reynor: GSL Loss Wasn't About Preparation Format16[IPSL] Spring 2026 Grand Finals - This Weekend!18
StarCraft 2
General
Balance hotfix patch 5.0.16b (July 16) Weekly Cups (July 13-19): Terran & Protoss rise; Zerg falters How would you feel about frequent/monthly balance patches for SC2? Clem: "I don't have that much hope in Blizzard" [D] Wireframe Casting Removed
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
BW General Discussion HORROR STARCRAFT MOVIE BGH Auto Balance -> http://bghmmr.eu/ How Famous was FlaSh before his Debut? screpdb: new Starcraft reporting tool
Tourneys
[Megathread] Daily Proleagues [IPSL] Spring 2026 Grand Finals - This Weekend! Escore Tournament - Season 3 Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers PvT advise for noobs Fighting Spirit mining rates Creating a full chart of Zerg builds
Other Games
General Games
Path of Exile ZeroSpace Early Access is Now Live! General RTS Discussion Thread ZeroSpace at Steam NextFest - Last free demo Nintendo Switch Thread
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
TSM pausing esports and CLG Dead
Heroes of the Storm
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
US Politics Mega-thread Russo-Ukrainian War Thread How to buy a book - shipping from Korea to Europe The Games Industry And ATVI UK Politics Mega-thread
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Series you have seen recently... Anime Discussion Thread Movie Discussion! [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion MLB/Baseball 2023 McBoner: A hockey love story
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Simple Questions Simple Answers FPS when play League Of Legend on laptop
TL Community
Northern Ireland Global Starcraft The Automated Ban List
Blogs
Hello guys!
LIN1s
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
Customize Sidebar...

Website Feedback

Closed Threads



Active: 6521 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
Hyrule19229 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
Hyrule19229 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
Hyrule19229 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
Spain18382 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 27m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ViBE264
BRAT_OK 60
StarCraft: Brood War
Artosis 514
League of Legends
JimRising 427
Trikslyr47
Counter-Strike
summit1g8802
minikerr53
Super Smash Bros
hungrybox620
PPMD39
Other Games
tarik_tv5836
Grubby2630
shahzam586
UpATreeSC252
ToD202
Temp02
JuggernautJason1
Organizations
Other Games
gamesdonequick1098
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 17 non-featured ]
StarCraft 2
• Hupsaiya 90
• RyuSc2 44
• Adnapsc2 18
• Kozan
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• IndyKCrew
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• TFBlade623
Other Games
• Scarra1442
• imaqtpie892
• Shiphtur260
Upcoming Events
PiGosaur Cup
27m
The PondCast
10h 27m
Kung Fu Cup
11h 27m
OSC
1d
CrankTV Team League
1d 11h
Replay Cast
2 days
CrankTV Team League
2 days
Korean StarCraft League
3 days
Afreeca Starleague
3 days
RSL Revival
3 days
Serral vs SHIN
herO vs Solar
[ Show More ]
Online Event
3 days
Replay Cast
4 days
RSL Revival
4 days
Clem vs ByuN
Rogue vs Lambo
WardiTV Weekly
5 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

Acropolis #4
HSC XXIX
Eternal Conflict S2 E3

Ongoing

CSL 2026 Summer (S21)
KCM Race Survival 2026 Season 3
Proleague 2026-07-21
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
BLAST Bounty Summer Qual
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
ESL Pro League Season 24
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
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.