• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 06:52
CEST 12:52
KST 19:52
  • 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
[ASL19] Finals Recap: Standing Tall9HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Flash Announces Hiatus From ASL50Weekly Cups (June 23-29): Reynor in world title form?12FEL Cracov 2025 (July 27) - $8000 live event16Esports World Cup 2025 - Final Player Roster16Weekly Cups (June 16-22): Clem strikes back1
StarCraft 2
General
How does the number of casters affect your enjoyment of esports? The GOAT ranking of GOAT rankings The SCII GOAT: A statistical Evaluation Statistics for vetoed/disliked maps Esports World Cup 2025 - Final Player Roster
Tourneys
https://www.facebook.com/MiracleSheetsOnline/ RSL: Revival, a new crowdfunded tournament series [GSL 2025] Code S: Season 2 - Semi Finals & Finals $5,100+ SEL Season 2 Championship (SC: Evo) FEL Cracov 2025 (July 27) - $8000 live event
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma Mutation # 477 Slow and Steady
Brood War
General
Player “Jedi” cheat on CSL Unit and Spell Similarities Help: rep cant save Flash Announces Hiatus From ASL BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET The Casual Games of the Week Thread
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile What do you want from future RTS games? Beyond All Reason
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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Trading/Investing Thread The Games Industry And ATVI
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2025 Football Thread NBA General Discussion Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Blogs
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 674 users

The Big Programming Thread - Page 608

Forum Index > General Forum
Post a Reply
Prev 1 606 607 608 609 610 1031 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
Poland17243 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
Poland17243 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
Spain17969 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 1031 Next
Please log in or register to reply.
Live Events Refresh
RSL Revival
10:00
Season 1: Playoffs Day 2
herO vs SHIN
Reynor vs Cure
Tasteless776
3DClanTV 90
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Crank 1438
Tasteless 765
Harstem 142
IndyStarCraft 134
Rex 114
StarCraft: Brood War
Calm 9717
firebathero 5922
Rain 5013
Horang2 1608
Jaedong 1511
Larva 554
Pusan 491
actioN 404
BeSt 317
Leta 280
[ Show more ]
EffOrt 162
Light 143
Mini 140
ToSsGirL 135
Rush 111
Hyun 110
PianO 78
JYJ53
JulyZerg 48
Mind 48
Killer 35
Backho 28
Sharp 24
Mong 23
NaDa 23
HiyA 18
sSak 17
Sacsri 14
zelot 12
Shinee 10
Movie 8
IntoTheRainbow 7
SilentControl 5
Bale 4
Barracks 4
Dota 2
XcaliburYe744
XaKoH 408
420jenkins279
League of Legends
JimRising 348
Counter-Strike
shoxiejesuss811
Stewie2K558
allub254
Other Games
DeMusliM412
Pyrionflax234
ArmadaUGS93
rGuardiaN53
Lowko34
Organizations
StarCraft 2
ComeBackTV 580
IntoTheiNu 37
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• Berry_CruncH255
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 3
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Stunt468
Upcoming Events
OSC
2h 9m
WardiTV European League
5h 9m
Scarlett vs Percival
Jumy vs ArT
YoungYakov vs Shameless
uThermal vs Fjant
Nicoract vs goblin
Harstem vs Gerald
FEL
5h 9m
Big Brain Bouts
5h 9m
Korean StarCraft League
16h 9m
CranKy Ducklings
23h 9m
RSL Revival
23h 9m
FEL
1d 5h
RSL Revival
1d 23h
FEL
2 days
[ Show More ]
BSL: ProLeague
2 days
Dewalt vs Bonyth
Replay Cast
3 days
Sparkling Tuna Cup
3 days
The PondCast
4 days
Replay Cast
5 days
RSL Revival
5 days
Replay Cast
6 days
RSL Revival
6 days
Liquipedia Results

Completed

Proleague 2025-06-28
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
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
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.