• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 00:47
CEST 06:47
KST 13:47
  • 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
[ASL21] Ro16 Preview Pt1: Fresh Flow3[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy21ByuL: The Forgotten Master of ZvT30
Community News
$5,000 WardiTV TLMC tournament - Presented by Monster Energy5GSL CK: More events planned pending crowdfunding7Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win0[BSL22] RO32 Group Stage5Weekly Cups (March 23-29): herO takes triple6
StarCraft 2
General
MaNa leaves Team Liquid Team Liquid Map Contest #22 - Presented by Monster Energy Quebec Clan still alive ? BGE Stara Zagora 2026 cancelled Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool
Tourneys
$5,000 WardiTV TLMC tournament - Presented by Monster Energy Sparkling Tuna Cup - Weekly Open Tournament RSL Revival: Season 5 - Qualifiers and Main Event GSL CK: More events planned pending crowdfunding Sea Duckling Open (Global, Bronze-Diamond)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 521 Memorable Boss The PondCast: SC2 News & Results Mutation # 520 Moving Fees Mutation # 519 Inner Power
Brood War
General
[ASL21] Ro16 Preview Pt1: Fresh Flow JD's Ro24 review The Korean Terminology Thread so ive been playing broodwar for a week straight. ASL21 General Discussion
Tourneys
[ASL21] Ro16 Group A [Megathread] Daily Proleagues Escore Tournament StarCraft Season 2 [ASL21] Ro24 Group F
Strategy
Any training maps people recommend? Fighting Spirit mining rates Muta micro map competition What's the deal with APM & what's its true value
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Battle Aces/David Kim RTS Megathread General RTS Discussion Thread Starcraft Tabletop Miniature Game
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
League of Legends
G2 just beat GenG in First stand
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 European Politico-economics QA Mega-thread Russo-Ukrainian War Thread The China Politics Thread Trading/Investing Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] Tokyo Olympics 2021 Thread
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
lurker extra damage testi…
StaticNine
How Streamers Inspire Gamers…
TrAiDoS
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1986 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
Hyrule19202 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
Hyrule19202 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
Hyrule19202 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
Spain18259 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
BSL
19:00
RO32 Group B
Sterling vs Azhi_Dahaki
Napoleon vs Mazur
Jimin vs Nesh
spx vs Strudel
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft503
RuFF_SC2 193
NeuroSwarm 164
Nina 107
StarCraft: Brood War
GuemChi 5951
Leta 172
ggaemo 69
scan(afreeca) 33
Noble 28
soO 22
Bale 19
Dota 2
ROOTCatZ288
League of Legends
JimRising 633
Counter-Strike
m0e_tv714
Super Smash Bros
C9.Mang0439
Mew2King88
Heroes of the Storm
Khaldor86
Other Games
summit1g17734
kaitlyn39
Organizations
Other Games
gamesdonequick607
Counter-Strike
PGL395
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• RayReign 88
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1729
• Rush1200
• Stunt350
Upcoming Events
Replay Cast
4h 13m
Wardi Open
5h 13m
Afreeca Starleague
5h 13m
Soma vs YSC
Sharp vs sSak
Monday Night Weeklies
11h 13m
OSC
19h 13m
Afreeca Starleague
1d 5h
Snow vs PianO
hero vs Rain
WardiTV Map Contest Tou…
1d 5h
GSL
1d 7h
Replay Cast
2 days
Kung Fu Cup
2 days
[ Show More ]
The PondCast
3 days
WardiTV Map Contest Tou…
3 days
Escore
4 days
WardiTV Map Contest Tou…
4 days
Korean StarCraft League
4 days
CranKy Ducklings
5 days
WardiTV Map Contest Tou…
5 days
IPSL
5 days
WolFix vs nOmaD
dxtr13 vs Razz
BSL
5 days
Sparkling Tuna Cup
6 days
WardiTV Map Contest Tou…
6 days
Ladder Legends
6 days
BSL
6 days
IPSL
6 days
JDConan vs TBD
Aegong vs rasowy
Replay Cast
6 days
Liquipedia Results

Completed

Escore Tournament S2: W2
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
StarCraft2 Community Team League 2026 Spring
Nations Cup 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026

Upcoming

Escore Tournament S2: W3
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
RSL Revival: Season 5
WardiTV TLMC #16
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 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.