• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:46
CEST 22:46
KST 05:46
  • 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] Finals Preview: Arrival6TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9
Community News
Merivale 8 Open - LAN - Stellar Fest0Chinese SC2 server to reopen; live all-star event in Hangzhou21Weekly Cups (Oct 13-19): Clem Goes for Four3BSL Team A vs Koreans - Sat-Sun 16:00 CET10Weekly Cups (Oct 6-12): Four star herO8
StarCraft 2
General
RotterdaM "Serral is the GOAT, and it's not close" Chinese SC2 server to reopen; live all-star event in Hangzhou The New Patch Killed Mech! Weekly Cups (Oct 13-19): Clem Goes for Four 5.0.15 Patch Balance Hotfix (2025-10-8)
Tourneys
Merivale 8 Open - LAN - Stellar Fest Tenacious Turtle Tussle RSL Season 3 Qualifier Links and Dates $1,200 WardiTV October (Oct 21st-31st) SC2's Safe House 2 - October 18 & 19
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers
Brood War
General
Is there anyway to get a private coach? BGH Auto Balance -> http://bghmmr.eu/ [ASL20] Finals Preview: Arrival BSL Team A vs Koreans - Sat-Sun 16:00 CET OGN to release AI-upscaled StarLeague from Feb 24
Tourneys
[ASL20] Grand Finals ASL final tickets help Small VOD Thread 2.0 [Megathread] Daily Proleagues
Strategy
Roaring Currents ASL final Simple Questions, Simple Answers Relatively freeroll strategies BW - ajfirecracker Strategy & Training
Other Games
General Games
General RTS Discussion Thread Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Dawn of War IV
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Things Aren’t Peaceful in Palestine YouTube Thread The Chess Thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Korean Music Discussion Series you have seen recently... Movie Discussion!
Sports
2024 - 2026 Football Thread MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
The Benefits Of Limited Comm…
TrAiDoS
Sabrina was soooo lame on S…
Peanutsc
Our Last Hope in th…
KrillinFromwales
Certified Crazy
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1732 users

The Big Programming Thread - Page 608

Forum Index > General Forum
Post a Reply
Prev 1 606 607 608 609 610 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.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
March 24 2015 11:03 GMT
#12141
happy birthday! that's awesome haha

i saw a bunch of programming books (not on super sale) but they'd be too heavy to bring back to canada -sigh-
There is no one like you in the universe.
Manit0u
Profile Blog Joined August 2004
Poland17397 Posts
March 25 2015 18:00 GMT
#12142

men()
{
goto pub;
pub:
return pissed;
}

women()
{
goto bathroom;
bathroom:
while (1) ;
}


Genious.
Time is precious. Waste it wisely.
RoyGBiv_13
Profile Blog Joined August 2010
United States1275 Posts
March 25 2015 18:05 GMT
#12143
On March 24 2015 18:06 Nesserev wrote:
Just went to the annual book sale at our university's department library for old/damaged books, got my hands on 8 kilos of books, including:
- The C Programming Language
- Design Patterns
- Principles of Compiler Design (Green Dragon)
- ...

1 kilo = 1 euro, that's a steal

Damn, my birthday has been great so far


The green dragon is my favorite programming book out there. Good stuff!
Any sufficiently advanced technology is indistinguishable from magic
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
March 25 2015 23:46 GMT
#12144
ugh COM and C++/Cx....
There is no one like you in the universe.
Millitron
Profile Blog Joined August 2010
United States2611 Posts
March 26 2015 00:20 GMT
#12145
Speaking of good CS books, I highly, HIGHLY recommend Introduction to Theory of Computation by Sipser.

Covers all kinds of automata, FSM's, Push-down Automata, Turing Machines, you name it its in there.

The only textbook I ever actually liked to be honest.

http://www.amazon.com/Introduction-Theory-Computation-Michael-Sipser/dp/0534950973
If anyone's interested.
Who called in the fleet?
njt7
Profile Joined August 2012
Sweden769 Posts
March 26 2015 00:43 GMT
#12146
You linked to the second edition, any reason for that? I am considering buying it but I would feel kind of robbed if I go for the 3rd and latest edition but later find out that its virtually the same as the 2nd.
"All the casters who flamed me ever for anything."
Millitron
Profile Blog Joined August 2010
United States2611 Posts
March 26 2015 01:03 GMT
#12147
On March 26 2015 09:43 njt7 wrote:
You linked to the second edition, any reason for that? I am considering buying it but I would feel kind of robbed if I go for the 3rd and latest edition but later find out that its virtually the same as the 2nd.

I only linked the second edition because that's the one I used. I don't have any info on what the third is like. I know the 2nd edition was pretty much strictly superior to the 1st. All it really changed was it added a bunch of exercises. I would imagine the 3rd edition did something similar.
Who called in the fleet?
Ben...
Profile Joined January 2011
Canada3485 Posts
March 26 2015 02:18 GMT
#12148
On March 26 2015 03:05 RoyGBiv_13 wrote:
Show nested quote +
On March 24 2015 18:06 Nesserev wrote:
Just went to the annual book sale at our university's department library for old/damaged books, got my hands on 8 kilos of books, including:
- The C Programming Language
- Design Patterns
- Principles of Compiler Design (Green Dragon)
- ...

1 kilo = 1 euro, that's a steal

Damn, my birthday has been great so far


The green dragon is my favorite programming book out there. Good stuff!

Super jealous that you got one of the dragon books. I've wanted those for a long time. Doing a compiler is one of the projects I want to do after I graduate in a month or so.
"Cliiiiiiiiiiiiiiiiide" -Tastosis
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2015-03-26 08:18:24
March 26 2015 07:38 GMT
#12149
@millitron
i got it in my archives, haven't read yet though.
at the time i keep swapping between introduction to automata theory, languages and computation (hopcroft, ullman) and modern compiler design (grune). i'll start peeping in this as well.

working on a compile-time recursive descent parser for regular expressions, not completed yet but i can parse concatenation and groupings at least (pointless i know):
edit, added closures so the groupings have some value...
...

constexpr const unsigned char
source[] = "te(a*m)*(liq)*uii*d";

int
main()
{
using regex=parse<scan<source>>;
std::cout<<"parsed: "<<source<<"\n";
std::cout<<"result:\n"<<tt::to_string<regex>()<<"\n";
}

parsed: te(a*m)*(liq)*uii*d
result:
sequence__________________________________________________________________________________
| | | | | | | |
t e closure closure u i closure d
| | |
sequence_ sequence__________ i
| | | | |
closure m l i q
|
a

the structure of the resulting type mirrors the structure in the 'regular' expression source string.
sequence is alias for concatenation, hope formatting is ok.
conspired against by a confederacy of dunces.
Incognoto
Profile Blog Joined May 2010
France10239 Posts
March 26 2015 08:19 GMT
#12150
hmm i'm kind of stuck on this one, long post incoming. it's not homework or anything i'm working on a new community site with proboards and i could use a little help for something, if it's all right. question in spoilers so as to not muck up the thread. note i have very little to not programming experience or web design experience, so very obvious things might be totally new to me. i've been using google and experimentation to get my thing going

+ Show Spoiler +

basically i want to copy some html from one source to another.


<div class="content widget-content">

<div class="widget-recent-thread-title"><a href="/thread/257/pos-trpelays" class="thread-link thread-257 board-20">I really wish someone would pos trpelays</a></div>
<div class="widget-recent-thread-creator"><span class="widget-small-text">by</span> <a href="/user/184" class="user-link user-184 group-0" title="@incog">incog</a></div>
<br style="clear: both;">

<div class="widget-recent-thread-title"><a href="/thread/256/replays-ly" class="thread-link thread-256 board-20">No replays LY.L</a></div>
<div class="widget-recent-thread-creator"><span class="widget-small-text">by</span> <a href="/user/184" class="user-link user-184 group-0" title="@incog">incog</a></div>
<br style="clear: both;">


</div>


That HTML code makes a table, which shows recent threads. I want to take that table and copy it to the side-bar of the forum.

http://esocommunity.boards.net/page/news

Obviously, when I simply copy/paste that html code, all it does is re-produce the table at the time of the copy/paste. :p !

So my goal is to use JS to copy/paste that code every time the user refreshes his page. i can create plug-ins on the site to do stuff like that, a friend of mine already somehow used JS to check if streams were online or not, so this shouldn't be too hard.

i guess i need to declare the html code i want to copy as a variable, then use JS to output that code into another html table, the output going into the sidebar, if that makes sense.

): i have no idea what i'm doing

maru lover forever
excitedBear
Profile Joined March 2015
Austria120 Posts
Last Edited: 2015-03-26 08:41:51
March 26 2015 08:35 GMT
#12151
This should get you started:

var el = document.createElement( 'div' );
el.innerHTML = "yourHTMLCode";

var elements = el.getElementsByClassName("widget-recent-thread-title");
for (var i = 0; i < elements.length; i++) {
... do stuff with elements[i] ...
}



Manit0u
Profile Blog Joined August 2004
Poland17397 Posts
March 28 2015 16:38 GMT
#12152
On March 26 2015 17:35 excitedBear wrote:
This should get you started:

var el = document.createElement( 'div' );
el.innerHTML = "yourHTMLCode";

var elements = el.getElementsByClassName("widget-recent-thread-title");
for (var i = 0; i < elements.length; i++) {
... do stuff with elements[i] ...
}





If I were to nitpick I'd say it's the job for the controller, not javascript...
Time is precious. Waste it wisely.
r3dox
Profile Blog Joined May 2003
Germany261 Posts
March 29 2015 09:57 GMT
#12153
interesting AI tournament with great visualisation and ladder:
http://www.reddit.com/r/gamedev/comments/30iatz/zero_sum_game_ai_tournament/
excitedBear
Profile Joined March 2015
Austria120 Posts
March 29 2015 11:22 GMT
#12154
On March 29 2015 01:38 Manit0u wrote:
Show nested quote +
On March 26 2015 17:35 excitedBear wrote:
This should get you started:

var el = document.createElement( 'div' );
el.innerHTML = "yourHTMLCode";

var elements = el.getElementsByClassName("widget-recent-thread-title");
for (var i = 0; i < elements.length; i++) {
... do stuff with elements[i] ...
}





If I were to nitpick I'd say it's the job for the controller, not javascript...
What do you mean by 'controller'?
Incognoto
Profile Blog Joined May 2010
France10239 Posts
Last Edited: 2015-03-29 11:43:28
March 29 2015 11:43 GMT
#12155
first off thanks excitedBear for the tip. i want to say sorry for not answering sooner but over the past few days i've been working on other aspects to get this board running. i'm severely limited by my lack of knowledge and experience, but ya gotta do what ya gotta do

now that i have time to look at this aspect again i guess I might as well discuss it. i'll put this in spoilers if that's ok. i also want to ask if it's OK for me to ask all these questions since i have an absolute truck-ton of things i'd like to do; it might seriously weigh down the thread. also note that my questions are going to be super basic. NB: these are free, online forums, so we don't have access to stuff like source code and whatnot. we make do with included features and also JS plugins

+ Show Spoiler +


my current objective at the moment is to insert a "recent threads" panel into the sidebar on eso-community.net

it's done in html, however we can insert javascript into the html thing, using <script ></ script>. anyway, here is the html used in the "forum index" section of the sidebar, for example:

+ Show Spoiler +
<div class="sidebar-forum">
<ul class="sdb-list">
<li><a href="http://eso-community.net/forum">All</a></li>
<li><a href="http://eso-community.net/board/27/news">News</a></li>
<li><a href="http://eso-community.net/board/19/aoe3-discussion">AoE3 General</a></li>
<li><a href="http://eso-community.net/board/29/aoe3-strategy">AoE3 Strategy</a></li>
<li><a href="http://eso-community.net/board/20/recorded-games">AoE3 Recorded Games</a></li>
<li><a href="http://eso-community.net/board/26/off-topic-discussion">Off Topic</a></li>
<li><a href="http://eso-community.net/forum#category-2">AoE3 Spring Championships</a></li>
<li><a href="http://eso-community.net/board/16/tournament-bets">Tournament Bets</a></li>
</ul>
</div>


as you can see, it's basic links, nothing too incredible.


what I would like to do is have a "recent threads" thing, written in html and using JS to extract information. basically take the latest threads posted in this section : http://eso-community.net/board/20/recorded-games

and have those threads appear in the side bar. kind of like how it's done at tl.net

now that i have time, i'm going to be re-using excitedbear's advice and hopefully try to start coding something. this post is just to properly explain my problem, i guess
maru lover forever
JD.
Profile Joined September 2014
Australia250 Posts
March 30 2015 06:49 GMT
#12156
So I know this is a bit of a reach and possibly not the threads intended use, but I have a Java assignment that i'm not even sure how to begin on - if anyone is capable of helping me out implementing A* pathfinding please send me a PM

(Note I'm not looking for someone to do the work for me, but someone I can share the provided files+assignment spec with who can help me out from skype or w/e)
r3dox
Profile Blog Joined May 2003
Germany261 Posts
March 30 2015 08:23 GMT
#12157
On March 30 2015 15:49 JD. wrote:
So I know this is a bit of a reach and possibly not the threads intended use, but I have a Java assignment that i'm not even sure how to begin on - if anyone is capable of helping me out implementing A* pathfinding please send me a PM

(Note I'm not looking for someone to do the work for me, but someone I can share the provided files+assignment spec with who can help me out from skype or w/e)


did you try googling? there is so much information on the implementation of A* available... of course you can find full java implementations as well.

for example:
http://www.redblobgames.com/pathfinding/a-star/introduction.html

asking for someone to share your assignment and skype with you is pretty close to doing the work for you
Acrofales
Profile Joined August 2010
Spain18098 Posts
Last Edited: 2015-03-30 13:32:15
March 30 2015 13:26 GMT
#12158
Honestly, if you have no clue where to start when programming A*, you probably should be staying far away from studying CS...

1. As algorithms go, A* is a simple one. If you don't understand it, CS is not for you.
2. There are literally thousands of explanations of it, pseudocode implementations, and actual implementations in any programming language you can imagine. If you don't know how to find them, CS is not for you (or well, any other study, because some healthy dose of Google knowledge is necessary for most stuff nowadays)
Prillan
Profile Joined August 2011
Sweden350 Posts
March 30 2015 15:35 GMT
#12159
On March 30 2015 22:26 Acrofales wrote:
Honestly, if you have no clue where to start when programming A*, you probably should be staying far away from studying CS...

1. As algorithms go, A* is a simple one. If you don't understand it, CS is not for you.
2. There are literally thousands of explanations of it, pseudocode implementations, and actual implementations in any programming language you can imagine. If you don't know how to find them, CS is not for you (or well, any other study, because some healthy dose of Google knowledge is necessary for most stuff nowadays)

What the?! What kind of answer is that? You basically said: "If you don't know how to do it, you shouldn't try to learn it."
TheBB's sidekick, aligulac.com | "Reality is frequently inaccurate." - Douglas Adams
solidbebe
Profile Blog Joined November 2010
Netherlands4921 Posts
Last Edited: 2015-03-30 16:29:57
March 30 2015 16:28 GMT
#12160
On March 31 2015 00:35 Prillan wrote:
Show nested quote +
On March 30 2015 22:26 Acrofales wrote:
Honestly, if you have no clue where to start when programming A*, you probably should be staying far away from studying CS...

1. As algorithms go, A* is a simple one. If you don't understand it, CS is not for you.
2. There are literally thousands of explanations of it, pseudocode implementations, and actual implementations in any programming language you can imagine. If you don't know how to find them, CS is not for you (or well, any other study, because some healthy dose of Google knowledge is necessary for most stuff nowadays)

What the?! What kind of answer is that? You basically said: "If you don't know how to do it, you shouldn't try to learn it."

What he actually said (or meant at least, and what I got from it): "If you don't know how to learn how to do it, you shouldn't do it".

Which is generally a statement I agree with.
That's the 2nd time in a week I've seen someone sig a quote from this GD and I have never witnessed a sig quote happen in my TL history ever before. -Najda
Prev 1 606 607 608 609 610 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 11h 14m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
White-Ra 151
SpeCial 143
ProTech88
Railgan 68
JuggernautJason5
StarCraft: Brood War
Britney 20452
Artosis 892
ZZZero.O 161
Dewaltoss 125
NaDa 8
Dota 2
syndereN357
capcasts77
LuMiX1
Counter-Strike
fl0m1633
Super Smash Bros
Mew2King51
Heroes of the Storm
Liquid`Hasu431
Khaldor290
Other Games
FrodaN2867
Grubby2305
Mlord525
Beastyqt523
summit1g413
shahzam300
Skadoodle202
KnowMe151
ViBE2
Organizations
Other Games
gamesdonequick885
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• printf 53
• HeavenSC 38
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota21046
Other Games
• imaqtpie1340
• Shiphtur209
Upcoming Events
Afreeca Starleague
11h 14m
Snow vs Soma
Sparkling Tuna Cup
13h 14m
WardiTV Invitational
15h 14m
CrankTV Team League
16h 14m
BASILISK vs Streamerzone
Team Liquid vs Shopify Rebellion
Team Vitality vs Team Falcon
BSL Team A[vengers]
18h 14m
Gypsy vs nOOB
JDConan vs Scan
RSL Revival
20h 14m
Wardi Open
1d 15h
CrankTV Team League
1d 16h
Replay Cast
2 days
WardiTV Invitational
2 days
[ Show More ]
CrankTV Team League
2 days
Replay Cast
3 days
CrankTV Team League
3 days
Replay Cast
4 days
The PondCast
4 days
CrankTV Team League
4 days
Replay Cast
5 days
WardiTV Invitational
5 days
CrankTV Team League
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
EC S1
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
BSL 21 Non-Korean Championship
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
CranK Gathers Season 2: SC II Pro Teams
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
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...

Disclosure: This page contains affiliate marketing links that support TLnet.

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.