• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 01:00
CEST 07:00
KST 14:00
  • 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
Team TLMC #5 - Finalists & Open Tournaments0[ASL20] Ro16 Preview Pt2: Turbulence10Classic Games #3: Rogue vs Serral at BlizzCon9[ASL20] Ro16 Preview Pt1: Ascent10Maestros of the Game: Week 1/Play-in Preview12
Community News
Weekly Cups (Sept 8-14): herO & MaxPax split cups4WardiTV TL Team Map Contest #5 Tournaments1SC4ALL $6,000 Open LAN in Philadelphia8Weekly Cups (Sept 1-7): MaxPax rebounds & Clem saga continues29LiuLi Cup - September 2025 Tournaments3
StarCraft 2
General
#1: Maru - Greatest Players of All Time Weekly Cups (Sept 8-14): herO & MaxPax split cups Team Liquid Map Contest #21 - Presented by Monster Energy SpeCial on The Tasteless Podcast Team TLMC #5 - Finalists & Open Tournaments
Tourneys
Maestros of The Game—$20k event w/ live finals in Paris SC4ALL $6,000 Open LAN in Philadelphia Sparkling Tuna Cup - Weekly Open Tournament WardiTV TL Team Map Contest #5 Tournaments RSL: Revival, a new crowdfunded tournament series
Strategy
Custom Maps
External Content
Mutation # 491 Night Drive Mutation # 490 Masters of Midnight Mutation # 489 Bannable Offense Mutation # 488 What Goes Around
Brood War
General
[ASL20] Ro16 Preview Pt2: Turbulence BW General Discussion ASL20 General Discussion Diplomacy, Cosmonarchy Edition BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[ASL20] Ro16 Group D [ASL20] Ro16 Group C [Megathread] Daily Proleagues SC4ALL $1,500 Open Bracket LAN
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread General RTS Discussion Thread Nintendo Switch Thread Borderlands 3
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread Russo-Ukrainian War Thread The Big Programming Thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023
World Cup 2022
Tech Support
Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s)
TL Community
BarCraft in Tokyo Japan for ASL Season5 Final The Automated Ban List
Blogs
The Personality of a Spender…
TrAiDoS
A very expensive lesson on ma…
Garnet
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1130 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
Zurich15345 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
Spain18049 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
Spain18049 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
PiGosaur Monday
00:00
#49
Liquipedia
OSC
23:00
OSC Elite Rising Star #16
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft556
StarCraft: Brood War
Leta 533
Noble 51
ajuk12(nOOB) 43
Icarus 10
Dota 2
NeuroSwarm138
Counter-Strike
Stewie2K448
semphis_45
Super Smash Bros
Mew2King40
Other Games
summit1g4980
C9.Mang0320
XaKoH 150
ViBE142
SortOf52
Trikslyr34
trigger0
Organizations
Other Games
gamesdonequick684
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• OhrlRock 91
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1125
• Rush1120
• Stunt434
Other Games
• Scarra1215
Upcoming Events
LiuLi Cup
6h
OSC
14h
RSL Revival
1d 5h
Maru vs Reynor
Cure vs TriGGeR
The PondCast
1d 8h
RSL Revival
2 days
Zoun vs Classic
Korean StarCraft League
2 days
BSL Open LAN 2025 - War…
3 days
RSL Revival
3 days
BSL Open LAN 2025 - War…
4 days
RSL Revival
4 days
[ Show More ]
Online Event
4 days
Wardi Open
5 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

Proleague 2025-09-10
Chzzk MurlocKing SC1 vs SC2 Cup #2
HCC Europe

Ongoing

BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
LASL Season 20
RSL Revival: Season 2
Maestros of the Game
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

Upcoming

2025 Chongqing Offline CUP
BSL World Championship of Poland 2025
IPSL Winter 2025-26
BSL Season 21
SC4ALL: Brood War
BSL 21 Team A
Stellar Fest
SC4ALL: StarCraft II
EC S1
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
MESA Nomadic Masters Fall
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 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.