• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 05:29
CET 11:29
KST 19:29
  • 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
ByuL: The Forgotten Master of ZvT28Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
Weekly Cups (Feb 16-22): MaxPax doubles0Weekly Cups (Feb 9-15): herO doubles up2ACS replaced by "ASL Season Open" - Starts 21/0243LiuLi Cup: 2025 Grand Finals (Feb 10-16)46Weekly Cups (Feb 2-8): Classic, Solar, MaxPax win2
StarCraft 2
General
ByuL: The Forgotten Master of ZvT How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Oliveira Would Have Returned If EWC Continued Behind the Blue - Team Liquid History Book Weekly Cups (Feb 16-22): MaxPax doubles
Tourneys
http://facebook.com/TivanoCuttingBoard.OfficialUSD StarCraft Evolution League (SC Evo Biweekly) Sea Duckling Open (Global, Bronze-Diamond) PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
Map Editor closed ? [A] Starcraft Sound Mod
External Content
Mutation # 514 Ulnar New Year The PondCast: SC2 News & Results Mutation # 513 Attrition Warfare Mutation # 512 Overclocked
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ ACS replaced by "ASL Season Open" - Starts 21/02 TvZ is the most complete match up CasterMuse Youtube A cwal.gg Extension - Easily keep track of anyone
Tourneys
Escore Tournament StarCraft Season 1 [Megathread] Daily Proleagues [LIVE] [S:21] ASL Season Open Day 1 Small VOD Thread 2.0
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Zealot bombing is no longer popular?
Other Games
General Games
Path of Exile Nintendo Switch Thread Beyond All Reason Battle Aces/David Kim RTS Megathread New broswer game : STG-World
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
US Politics Mega-thread Canadian Politics Mega-thread Mexico's Drug War Russo-Ukrainian War Thread Ask and answer stupid questions here!
Fan Clubs
The IdrA Fan Club The herO Fan Club!
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
ASL S21 English Commentary…
namkraft
Inside the Communication of …
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1119 users

The Big Programming Thread - Page 664

Forum Index > General Forum
Post a Reply
Prev 1 662 663 664 665 666 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.
Itsmedudeman
Profile Blog Joined March 2011
United States19229 Posts
September 16 2015 01:05 GMT
#13261
On September 16 2015 06:34 Birdie wrote:
Y = Z is invalid as you didn't use an operation (other than assignment). Solution to 3 looks correct, although there's another way to do it which is slightly different (but same thought process).

oops

fixed and found another solution
Itsmedudeman
Profile Blog Joined March 2011
United States19229 Posts
Last Edited: 2015-09-17 03:40:42
September 17 2015 03:39 GMT
#13262
Anyone have any recommended books for learning computer algorithms? Unfortunately I can't take the computer algorithm course at my school because of a time conflict with another course and I'm graduating in 1 term so I plan on learning it in my off time.

edit: actually found one recommended by reddit: http://www.amazon.com/Introduction-Algorithms-Third-Thomas-Cormen/dp/0262033844/ref=pd_bxgy_b_img_c
Birdie
Profile Blog Joined August 2007
New Zealand4438 Posts
September 17 2015 03:51 GMT
#13263
Donald Knuth's Art of Computer Programming are supposed to be the best books on comp sci algorithms. I haven't had a chance to get my hands on them yet though.
Red classic | A butterfly dreamed he was Zhuangzi | 4.5k, heading to 5k as support!
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
September 17 2015 09:34 GMT
#13264
--- Nuked ---
xboi209
Profile Blog Joined June 2011
United States1173 Posts
September 17 2015 10:03 GMT
#13265
I challenge everyone to solve this mystery!
http://www.staredit.net/topic/16851/
http://www.reddit.com/r/broodwar/
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
September 17 2015 11:29 GMT
#13266
--- Nuked ---
xboi209
Profile Blog Joined June 2011
United States1173 Posts
Last Edited: 2015-09-17 17:52:06
September 17 2015 17:50 GMT
#13267
On September 17 2015 20:29 Nesserev wrote:
Show nested quote +
On September 17 2015 19:03 xboi209 wrote:
I challenge everyone to solve this mystery!
http://www.staredit.net/topic/16851/

Would it be possible to compare the calls to 'last_write_time()' with an 'ltrace'-like program for the different versions of windows? If the calls are the same for all platforms, then the problem is probably the .dll; if not, it's probably Warcraft 3.

Seems like a nullptr is referenced, so it might be warcraft 3; but my bet is still on Microsoft.

Actually none of the parameters are used in the function(they're there so that it can be loaded by WC3 for testing), I hardcoded the path to War3.exe and ensured that the file exists and it's a regular file before calling last_write_time(). The Runtime Library option is set to Multi-threaded (/MT) so the code shouldn't rely on external DLL's.
I have no idea how to compare calls though

I don't think we can blame the problem on Microsoft since I wrote a test program which was able to successfully call CheckRevision()(and last_write_time()).
http://www.reddit.com/r/broodwar/
3FFA
Profile Blog Joined February 2010
United States3931 Posts
Last Edited: 2015-09-18 01:32:50
September 18 2015 01:27 GMT
#13268
I'm trying to program a series of for loops that will take an inputted series of text and output it in single lines 60 characters long with an asterisk on the left and ride side of each line. Leaving the text centered in the middle.

This feels like it should be really simple but I can't remember/figure out(took a long break from programming, this was a challenge to myself as a starter to get back into it) how to find a space character, cut off the string, and then add the necessary surrounding spaces and asterisks. This is to prevent the problem of an awkwardly cut off word.

edit: language is Java.

Also, if someone wants to actually do it and post a full solution, I would be happy to see one spoiler'd so I can go back when I finish and see how someone else would've done it.
"As long as it comes from a pure place and from a honest place, you know, you can write whatever you want."
killa_robot
Profile Joined May 2010
Canada1884 Posts
September 18 2015 03:59 GMT
#13269
On September 17 2015 19:03 xboi209 wrote:
I challenge everyone to solve this mystery!
http://www.staredit.net/topic/16851/


I feel like its some sort of permission error, which is why the result is to point to nothing. Maybe it just can't access the file's last write time while you're running the file, and in later version's of windows its more lenient and lets you/accommodates that functionality.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2015-09-18 06:07:19
September 18 2015 05:49 GMT
#13270
On September 18 2015 10:27 3FFA wrote:
I'm trying to program a series of for loops that will take an inputted series of text and output it in single lines 60 characters long with an asterisk on the left and ride side of each line. Leaving the text centered in the middle.

This feels like it should be really simple but I can't remember/figure out(took a long break from programming, this was a challenge to myself as a starter to get back into it) how to find a space character, cut off the string, and then add the necessary surrounding spaces and asterisks. This is to prevent the problem of an awkwardly cut off word.

edit: language is Java.

Also, if someone wants to actually do it and post a full solution, I would be happy to see one spoiler'd so I can go back when I finish and see how someone else would've done it.


https://gist.github.com/Blisse/e68b99719c8e035a31f1

could use comments and a couple places could be done better but it's supposed to be rough

[image loading]
There is no one like you in the universe.
xboi209
Profile Blog Joined June 2011
United States1173 Posts
Last Edited: 2015-09-18 06:42:36
September 18 2015 06:37 GMT
#13271
On September 18 2015 12:59 killa_robot wrote:
Show nested quote +
On September 17 2015 19:03 xboi209 wrote:
I challenge everyone to solve this mystery!
http://www.staredit.net/topic/16851/


I feel like its some sort of permission error, which is why the result is to point to nothing. Maybe it just can't access the file's last write time while you're running the file, and in later version's of windows its more lenient and lets you/accommodates that functionality.

Microsoft's documentation of last_write_time() says that the function returns file_time_type(-1) on error, no mentions of throwing any exceptions, though the overload of the function I'm using is not marked as noexcept. I had also tested my test program with WarCraft 3 open as well with no errors.
http://www.reddit.com/r/broodwar/
Days
Profile Joined February 2010
United States219 Posts
September 18 2015 14:25 GMT
#13272
Can someone give me a very general and brief explanation as to when it's better to use a NoSQL backend opposed to a standard relational SQL backend?

I am going to start working on an application that will forecast pricing on residential real estate and we will be working with a lot of data, I was wondering if it was a good time to hop on the NoSQL choo choo train.
We buy things we don't need, with money we don't have, to impress people we don't like.
zatic
Profile Blog Joined September 2007
Zurich15362 Posts
September 18 2015 14:56 GMT
#13273
On September 18 2015 23:25 Days wrote:
Can someone give me a very general and brief explanation as to when it's better to use a NoSQL backend opposed to a standard relational SQL backend?

I am going to start working on an application that will forecast pricing on residential real estate and we will be working with a lot of data, I was wondering if it was a good time to hop on the NoSQL choo choo train.

Going from just that one sentence description, it doesn't sound like a good idea at all to ditch a proven relational DB for that. That's exactly the kind of application relational databases are great for.
ModeratorI know Teamliquid is known as a massive building
Days
Profile Joined February 2010
United States219 Posts
Last Edited: 2015-09-18 16:38:07
September 18 2015 16:14 GMT
#13274
On September 18 2015 23:56 zatic wrote:
Show nested quote +
On September 18 2015 23:25 Days wrote:
Can someone give me a very general and brief explanation as to when it's better to use a NoSQL backend opposed to a standard relational SQL backend?

I am going to start working on an application that will forecast pricing on residential real estate and we will be working with a lot of data, I was wondering if it was a good time to hop on the NoSQL choo choo train.

Going from just that one sentence description, it doesn't sound like a good idea at all to ditch a proven relational DB for that. That's exactly the kind of application relational databases are great for.


True, and what type of applications are NoSQL databases great for?

EDIT: To be more specific, I know NoSQL is a broad term. I am looking to use and implement MongoDB. I am wondering what would be the pros/cons of choosing MongoDB over standard SQL
We buy things we don't need, with money we don't have, to impress people we don't like.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2015-09-18 17:57:28
September 18 2015 17:55 GMT
#13275
--- Nuked ---
Days
Profile Joined February 2010
United States219 Posts
Last Edited: 2015-09-18 18:40:48
September 18 2015 18:36 GMT
#13276
On September 19 2015 02:55 Nesserev wrote:
Question: Are you going to be the next facebook/youtube/twitter/... ?

It's both a joke answer and the simple truth. The pro's of using NoSQL are:
+ horizontal scaling of your database to multiple machines is a lot easier than RDBMS
+ partially faster in the hands of someone who knows what he/she is doing: more control is given over the actual actions of your query, with potentially massive speed-ups, or slow-downs.

So, basically; will you have to dedicate at least a small datacenter to your application, and do you have the expert backing?
Also, keep in mind that NoSQL systems generally don't adhere to the ACID properties, so prepare for potential data loss; and fun features that you take for granted when using the relational data model will be a slow pain when using NoSQL.

General advice: stick to RDBMS


Yes we do have a dedicated data center for our application. I am working alongside an experienced SQL dev, but only so far as RDBMS stands. I am fairly familiar with SQL, not an expert but I can defend myself. I have 0 knowledge of NoSQL, only from my hipster friends who have used MongoDB before and they have told me it's the next big thing.

This part

On September 19 2015 02:55 Nesserev wrote:
+ partially faster in the hands of someone who knows what he/she is doing: more control is given over the actual actions of your query, with potentially massive speed-ups, or slow-downs.


Is the biggest selling point for me, because we will be doing a LARGE amount of querying.

We can sacrifice some time to learn NoSQL, time is not a problem for us, but efficiency and scalability is an absolute must.
We buy things we don't need, with money we don't have, to impress people we don't like.
Acrofales
Profile Joined August 2010
Spain18219 Posts
September 18 2015 20:22 GMT
#13277
On September 19 2015 03:36 Days wrote:
Show nested quote +
On September 19 2015 02:55 Nesserev wrote:
Question: Are you going to be the next facebook/youtube/twitter/... ?

It's both a joke answer and the simple truth. The pro's of using NoSQL are:
+ horizontal scaling of your database to multiple machines is a lot easier than RDBMS
+ partially faster in the hands of someone who knows what he/she is doing: more control is given over the actual actions of your query, with potentially massive speed-ups, or slow-downs.

So, basically; will you have to dedicate at least a small datacenter to your application, and do you have the expert backing?
Also, keep in mind that NoSQL systems generally don't adhere to the ACID properties, so prepare for potential data loss; and fun features that you take for granted when using the relational data model will be a slow pain when using NoSQL.

General advice: stick to RDBMS


Yes we do have a dedicated data center for our application. I am working alongside an experienced SQL dev, but only so far as RDBMS stands. I am fairly familiar with SQL, not an expert but I can defend myself. I have 0 knowledge of NoSQL, only from my hipster friends who have used MongoDB before and they have told me it's the next big thing.

This part

Show nested quote +
On September 19 2015 02:55 Nesserev wrote:
+ partially faster in the hands of someone who knows what he/she is doing: more control is given over the actual actions of your query, with potentially massive speed-ups, or slow-downs.


Is the biggest selling point for me, because we will be doing a LARGE amount of querying.

We can sacrifice some time to learn NoSQL, time is not a problem for us, but efficiency and scalability is an absolute must.


Firstly, the choice for NoSQL is not as plain as it sounds. NoSQL is not a single homogenic thing. It'd be like asking whether you should program your software in Java or in NoJava. Lets say the advantages of Java don't really entice you, you have not yet made a positive choice for something else yet, you have just rejected Java as your programming language.

Similarly, rejecting SQL is not a choice for anything. The most basic version of NoSQL is to save everything in a file on disk. Scalability is a bit shitty. Ability to retrieve data fast is absolutely awful. Ability to add new stuff is fucking fast as lightning. Integrity is not good, but if you want, you can write to two files simultaneously with negligible performance hits and that improves integrity something awesome. Concurrency is non-existent without some controller (see below)

Therefore, if all you want is a log of the past, and to compute some dynamically changing statistics based on the latest data, saving your data to a file is a fucking amazing solution.

But it's not very practical, and there are various different NoSQL solutions that add different functionalities. For instance, CouchDB focuses on the distribution of a DB: it is incredibly fast at replicating the DB to somewhere else. Once your query is indexed, it is also incredibly fast at querying. However, indexing itself is fairly slow. However, adding data without indexing, and also updates, are blazing fast. Note that updates are not actual updates, but simply addition of new data with the same key, but a newer "revision number".

Now CouchDB is just the NoSQL flavour I am most familiar with. Others like Mongo or Cassandra will offer different advantages and disadvantages. NONE of them are ACID, but imho ACID is overrated for most things anyway.

What they all have in common is that their toolset is FAR smaller than your standard SQL solutions. For instance, you want something like foreign keys? You had better just pray that the data introduced is sane, or write your own server-side code to guarantee that, because it won't be given out of the box. Hell, any kind of JOIN query is going to be a mess. I have done stuff that emulates joins in CouchDB, but the map-reduce paradigm is just really not meant for that kinda stuff, and if you go beyond map-reduce you are basically limited to your own code (CouchDB calls these CouchApps, but lets face it, it boils down to querying a FAR larger amount of data than you need and performing complex operations to manipulate it into getting the data that you want). I believe MongoDB is a lot better in this latter respect, but has other quirks.

So when you are evaluating whether you want NoSQL or SQL, your main question should be: what are my performance bottlenecks, and what are my requirements? If doing money transactions or dealing with other sensitive data, you need ACID, and NoSQL is a terrible idea. NoSQL is great for things where missing one or two events is unimportant. Facebook likes, for instance: if on the backend a like is only registered hours later, nobody cares. Same with web searches in Google: as long as it's approximately correct, that will be fine in virtually all cases. In the IoT: registering all the events that all the devices are sending: don't worry if some get saved in the wrong order.

Note that NoSQL don't have ACID, but they do ascribe to Eventually Consistency. Data won't magically go missing. Just a query might give outdated information.
TMG26
Profile Joined July 2012
Portugal2017 Posts
September 18 2015 20:33 GMT
#13278
From what i've heard, different NoSQL technology cuts different "letters" of ACID.

The I guess the thing that you should take is comparing SQL to NoSQL is like comparing Java to NoJava. NoSQL is pretty much everything that isn't traditional SQL systems. So you should compare a RDBMS to Cassandra or Couch, just like you compare Java to C# or Python.
Supporter of the situational Blink Dagger on Storm.
necrosexy
Profile Joined March 2011
451 Posts
Last Edited: 2015-09-19 08:07:03
September 19 2015 00:46 GMT
#13279
any good job sites that you guys recommend?

i got duped by this consulting company. i'm doing IT duties instead of programming.
i feel a bit bummed. (at least I have a good start on C and shell scripting with ksh and bash)

edit: i'm in the US
Acrofales
Profile Joined August 2010
Spain18219 Posts
September 19 2015 01:15 GMT
#13280
Without a location nobody can help you. There is no universal job site for the whole world...
Prev 1 662 663 664 665 666 1032 Next
Please log in or register to reply.
Live Events Refresh
CasterMuse Showmatch
09:00
SuperFight #002
Light vs Queen
Discussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SortOf 193
Creator 34
StarCraft: Brood War
Britney 30858
Calm 8046
Sea 4992
Rain 2110
Horang2 924
Flash 873
Bisu 310
Mong 256
BeSt 209
Dewaltoss 199
[ Show more ]
hero 159
Hyuk 144
EffOrt 101
Rush 67
Last 64
ToSsGirL 62
Soulkey 42
sorry 29
NaDa 23
Hm[arnc] 21
Free 18
910 15
Terrorterran 9
NotJumperer 5
Dota 2
XaKoH 502
febbydoto18
Counter-Strike
olofmeister1620
allub334
kRYSTAL_59
Heroes of the Storm
crisheroes177
Other Games
singsing1218
Liquid`RaSZi1005
ceh9584
Organizations
Other Games
gamesdonequick914
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• LUISG 39
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos1733
• Stunt583
Upcoming Events
WardiTV Winter Champion…
1h 31m
OSC
13h 31m
The PondCast
23h 31m
Replay Cast
1d 13h
Korean StarCraft League
2 days
CranKy Ducklings
2 days
SC Evo Complete
3 days
Replay Cast
3 days
Sparkling Tuna Cup
3 days
uThermal 2v2 Circuit
4 days
[ Show More ]
Replay Cast
4 days
Wardi Open
5 days
Replay Cast
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-02-22
LiuLi Cup: 2025 Grand Finals
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Acropolis #4 - TS5
Jeongseon Sooper Cup
Spring Cup 2026
WardiTV Winter 2026
PiG Sty Festival 7.0
Nations Cup 2026
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025

Upcoming

[S:21] ASL SEASON OPEN 2nd Round
[S:21] ASL SEASON OPEN 2nd Round Qualifier
ASL Season 21: Qualifier #1
ASL Season 21: Qualifier #2
Acropolis #4 - TS6
Acropolis #4
IPSL Spring 2026
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
FISSURE Playground #3
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
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 © 2026 TLnet. All Rights Reserved.