• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 10:05
CET 16:05
KST 00:05
  • 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
RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation12Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
Mech is the composition that needs teleportation t RotterdaM "Serral is the GOAT, and it's not close" RSL Season 3 - RO16 Groups C & D Preview [TLMC] Fall/Winter 2025 Ladder Map Rotation TL.net Map Contest #21: Winners
Tourneys
RSL Revival: Season 3 Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle BW General Discussion What happened to TvZ on Retro? Brood War web app to calculate unit interactions [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
PvZ map balance Current Meta Simple Questions, Simple Answers How to stay on top of macro?
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread Clair Obscur - Expedition 33 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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Russo-Ukrainian War Thread Artificial Intelligence Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
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
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2289 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
Zurich15355 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
Spain18117 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
Spain18117 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
Next event in 1h 55m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
TKL 370
SteadfastSC 346
Reynor 49
mcanning 46
StarCraft: Brood War
Britney 33170
Rain 4067
actioN 1777
Horang2 1531
Jaedong 1212
Shuttle 535
Stork 467
EffOrt 291
firebathero 269
Leta 120
[ Show more ]
Barracks 105
ggaemo 93
Shinee 91
Hyun 86
PianO 73
LaStScan 67
JYJ49
Shine 48
Mong 31
Rock 24
Movie 24
ToSsGirL 23
Bale 19
zelot 14
soO 10
HiyA 9
sorry 8
Sacsri 6
Dota 2
Gorgc5504
qojqva1754
Dendi1127
XcaliburYe145
LuMiX0
Counter-Strike
oskar107
Heroes of the Storm
Khaldor113
Other Games
FrodaN4271
B2W.Neo1782
DeMusliM470
Hui .329
Lowko301
Pyrionflax236
Fuzer 206
febbydoto6
Organizations
Dota 2
PGL Dota 2 - Main Stream8720
PGL Dota 2 - Secondary Stream3207
Other Games
EGCTV67
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• Berry_CruncH154
• StrangeGG 72
• IndyKCrew
• AfreecaTV YouTube
• intothetv
• Kozan
• sooper7s
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• Michael_bg 2
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 2112
• Ler59
League of Legends
• Nemesis3149
Other Games
• WagamamaTV236
Upcoming Events
IPSL
1h 55m
ZZZero vs rasowy
Napoleon vs KameZerg
OSC
3h 55m
BSL 21
4h 55m
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
18h 55m
RSL Revival
18h 55m
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
20h 55m
Cure vs herO
Reynor vs TBD
WardiTV Korean Royale
20h 55m
BSL 21
1d 4h
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
1d 4h
Dewalt vs WolFix
eOnzErG vs Bonyth
Replay Cast
1d 7h
[ Show More ]
Wardi Open
1d 20h
Monday Night Weeklies
2 days
WardiTV Korean Royale
2 days
BSL: GosuLeague
3 days
The PondCast
3 days
Replay Cast
4 days
RSL Revival
4 days
BSL: GosuLeague
5 days
RSL Revival
5 days
WardiTV Korean Royale
5 days
RSL Revival
6 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

Proleague 2025-11-14
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 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.