• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 13:57
CEST 19:57
KST 02:57
  • 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
[ASL20] Ro8 Preview Pt1: Mile High3Team TLMC #5 - Finalists & Open Tournaments2[ASL20] Ro16 Preview Pt2: Turbulence10Classic Games #3: Rogue vs Serral at BlizzCon10[ASL20] Ro16 Preview Pt1: Ascent10
Community News
StarCraft II 5.0.15 PTR Patch Notes186BSL 2025 Warsaw LAN + Legends Showmatch2Weekly Cups (Sept 8-14): herO & MaxPax split cups4WardiTV TL Team Map Contest #5 Tournaments1SC4ALL $6,000 Open LAN in Philadelphia8
StarCraft 2
General
StarCraft II 5.0.15 PTR Patch Notes Why Storm Should NOT Be Nerfed – A Core Part of Pr #1: Maru - Greatest Players of All Time SC4ALL: A North American StarCraft LAN Team TLMC #5 - Finalists & Open Tournaments
Tourneys
SC2's Safe House 2 - October 18 & 19 RSL: Revival, a new crowdfunded tournament series Stellar Fest KSL Week 80 StarCraft Evolution League (SC Evo Biweekly)
Strategy
Custom Maps
External Content
Mutation # 491 Night Drive Mutation # 490 Masters of Midnight Mutation # 489 Bannable Offense Mutation # 488 What Goes Around
Brood War
General
[ASL20] Ro8 Preview Pt1: Mile High BGH Auto Balance -> http://bghmmr.eu/ ASL ro8 Upper Bracket HYPE VIDEO BW General Discussion StarCraft Stellar Forces had bad maps
Tourneys
SC4ALL $1,500 Open Bracket LAN [ASL20] Ro16 Group D BSL 2025 Warsaw LAN + Legends Showmatch [ASL20] Ro16 Group C
Strategy
Simple Questions, Simple Answers Muta micro map competition
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Borderlands 3 General RTS Discussion Thread
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread The Big Programming Thread UK Politics Mega-thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023
World Cup 2022
Tech Support
Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s)
TL Community
BarCraft in Tokyo Japan for ASL Season5 Final The Automated Ban List
Blogs
The Dark Side of South Kore…
Peanutsc
Too Many LANs? Tournament Ov…
TrAiDoS
I <=> 9
KrillinFromwales
A very expensive lesson on ma…
Garnet
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2261 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
Hyrule19091 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
Hyrule19091 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
Hyrule19091 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
Spain18055 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
Online Event
16:00
PSC2L September 2025
CranKy Ducklings189
Liquipedia
BSL Open LAN 2025 - War…
08:00
Day 2 - Play Off & Finals Stage
ZZZero.O269
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 238
JuggernautJason182
StarCraft: Brood War
Sea 1361
Shuttle 1019
Larva 446
ZZZero.O 269
Mong 118
Movie 86
Dewaltoss 80
Backho 58
sorry 50
Aegong 42
[ Show more ]
Hyun 41
sas.Sziky 31
Free 28
IntoTheRainbow 12
Dota 2
Gorgc6755
qojqva4143
Dendi1582
XcaliburYe271
Counter-Strike
fl0m661
Stewie2K250
Heroes of the Storm
Khaldor269
Other Games
tarik_tv9577
FrodaN3883
Grubby1013
B2W.Neo586
KnowMe403
Mew2King101
NeuroSwarm56
QueenE47
MindelVK17
Organizations
Other Games
EGCTV1494
gamesdonequick545
StarCraft 2
angryscii 25
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• HerbMon 12
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 2816
Other Games
• imaqtpie551
• Shiphtur253
• WagamamaTV237
Upcoming Events
Afreeca Starleague
16h 3m
Barracks vs Mini
Wardi Open
17h 3m
Monday Night Weeklies
22h 3m
Sparkling Tuna Cup
1d 16h
Afreeca Starleague
1d 16h
Snow vs EffOrt
LiuLi Cup
2 days
The PondCast
3 days
CranKy Ducklings
4 days
Maestros of the Game
5 days
Clem vs Reynor
[BSL 2025] Weekly
6 days
[ Show More ]
[BSL 2025] Weekly
6 days
Liquipedia Results

Completed

Proleague 2025-09-18
Chzzk MurlocKing SC1 vs SC2 Cup #2
HCC Europe

Ongoing

BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
LASL Season 20
BSL World Championship of Poland 2025
RSL Revival: Season 2
Maestros of the Game
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1

Upcoming

IPSL Winter 2025-26
BSL Season 21
SC4ALL: Brood War
BSL 21 Team A
Stellar Fest
SC4ALL: StarCraft II
EC S1
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
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.