• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:01
CEST 15:01
KST 22:01
  • 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 ASL54Weekly Cups (June 23-29): Reynor in world title form?13FEL Cracov 2025 (July 27) - $8000 live event16Esports World Cup 2025 - Final Player Roster16Weekly Cups (June 16-22): Clem strikes back1
StarCraft 2
General
Weekly Cups (June 23-29): Reynor in world title form? The SCII GOAT: A statistical Evaluation PiG Sty Festival #5: Playoffs Preview + Groups Recap The GOAT ranking of GOAT rankings Statistics for vetoed/disliked maps
Tourneys
RSL: Revival, a new crowdfunded tournament series Korean Starcraft League Week 77 Master Swan Open (Global Bronze-Master 2) [GSL 2025] Code S: Season 2 - Semi Finals & Finals $5,100+ SEL Season 2 Championship (SC: Evo)
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 BW General Discussion Flash Announces Hiatus From ASL BGH Auto Balance -> http://bghmmr.eu/ Unit and Spell Similarities
Tourneys
[Megathread] Daily Proleagues [BSL20] Grand Finals - Sunday 20:00 CET Small VOD Thread 2.0 [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET
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 Trading/Investing Thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War 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
Formula 1 Discussion 2024 - 2025 Football Thread NBA General 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: 653 users

The Big Programming Thread - Page 664

Forum Index > General Forum
Post a Reply
Prev 1 662 663 664 665 666 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.
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
Zurich15325 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
Spain17970 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
Spain17970 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 1031 Next
Please log in or register to reply.
Live Events Refresh
WardiTV European League
12:00
Swiss Groups Day 2
WardiTV1198
TKL 366
Liquipedia
CranKy Ducklings
10:00
Master Swan Open #93
CranKy Ducklings86
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
TKL 366
Hui .279
BRAT_OK 84
MindelVK 43
StarCraft: Brood War
Calm 11547
Horang2 2182
Bisu 1330
Jaedong 1212
Flash 1209
Larva 874
Mini 536
BeSt 383
Stork 382
actioN 314
[ Show more ]
Last 206
Soulkey 190
Hyun 163
hero 103
Mind 103
Sea.KH 68
TY 56
sSak 49
Mong 36
Icarus 21
Free 17
HiyA 12
GoRush 11
Terrorterran 1
Stormgate
NightEnD19
Dota 2
XcaliburYe593
canceldota187
Counter-Strike
zeus475
Heroes of the Storm
Khaldor283
Other Games
Gorgc3088
singsing2852
B2W.Neo1352
DeMusliM557
Happy330
Fuzer 264
XaKoH 228
Lowko205
SortOf113
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Adnapsc2 22
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 2280
• WagamamaTV692
League of Legends
• Nemesis3053
Upcoming Events
FEL
2h 59m
RSL Revival
20h 59m
Clem vs Classic
SHIN vs Cure
FEL
22h 59m
WardiTV European League
22h 59m
BSL: ProLeague
1d 4h
Dewalt vs Bonyth
Replay Cast
2 days
Sparkling Tuna Cup
2 days
WardiTV European League
3 days
The PondCast
3 days
Replay Cast
4 days
[ Show More ]
RSL Revival
4 days
Replay Cast
5 days
RSL Revival
5 days
RSL Revival
6 days
Liquipedia Results

Completed

BSL 2v2 Season 3
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
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.