• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 12:06
CET 18:06
KST 02:06
  • 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 - Playoffs Preview0RSL 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
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
Chinese SC2 server to reopen; live all-star event in Hangzhou Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband
Tourneys
Sea Duckling Open (Global, Bronze-Diamond) $5,000+ WardiTV 2025 Championship Constellation Cup - Main Event - Stellar Fest RSL Revival: Season 3 Tenacious Turtle Tussle
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
Data analysis on 70 million replays BGH Auto Balance -> http://bghmmr.eu/ Which season is the best in ASL? [ASL20] Ask the mapmakers — Drop your questions BW General Discussion
Tourneys
[Megathread] Daily Proleagues [BSL21] RO16 Group B - Sunday 21:00 CET [BSL21] RO16 Group C - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
ZeroSpace Megathread Nintendo Switch Thread Stormgate/Frost Giant Megathread The Perfect Game Path of Exile
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
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine US Politics Mega-thread The Big Programming Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
James Bond movies ranking - pa…
Topin
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1447 users

The Big Programming Thread - Page 450

Forum Index > General Forum
Post a Reply
Prev 1 448 449 450 451 452 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.
ThatGuy
Profile Blog Joined April 2008
Canada695 Posts
February 28 2014 15:34 GMT
#8981
Are total1 and total2 both declared as doubles?
Makavw
Profile Joined April 2010
Croatia165 Posts
February 28 2014 16:07 GMT
#8982
yup , they are
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
Last Edited: 2014-02-28 16:38:14
February 28 2014 16:37 GMT
#8983
Try using Decimal instead of Double, and see if it makes a difference. (I'm assuming you're using C#)
Makavw
Profile Joined April 2010
Croatia165 Posts
February 28 2014 17:08 GMT
#8984
Yes it c#, and it doesn't make a difference. Meh I will just redo the whole thing using different logic since i can't seem to pinpoint the problem whatsoever.
Prillan
Profile Joined August 2011
Sweden350 Posts
Last Edited: 2014-02-28 19:39:12
February 28 2014 19:20 GMT
#8985
On March 01 2014 02:08 Makavw wrote:
Yes it c#, and it doesn't make a difference. Meh I will just redo the whole thing using different logic since i can't seem to pinpoint the problem whatsoever.

Have you tried entering the numbers using both the American and European (or whatever it is) decimal format? Try with "3,14" and "3.14" and see if it makes any difference.

Edit: For me "3,14" parses as 314.0 and "3.14" as 3.14

Edit 2: Here's a small test you can do. It tests the default, croatian and american locales. (Croatian since it says that you're from Croatia)
string xs = "3.14";
string ys = "3,14";

// msdn.microsoft.com/en-us/goglobal/bb964664.aspx
NumberFormatInfo croatian = CultureInfo.GetCultureInfo("hr-HR").NumberFormat;
NumberFormatInfo american = CultureInfo.GetCultureInfo("en-US").NumberFormat;

string def = string.Format("10*{0} -> {1}\t10*{2} -> {3}", xs, double.Parse(xs) * 10, ys, double.Parse(ys) * 10);
string hr = string.Format("10*{0} -> {1}\t10*{2} -> {3}", xs, double.Parse(xs, croatian) * 10, ys, double.Parse(ys, croatian) * 10);
string us = string.Format("10*{0} -> {1}\t10*{2} -> {3}", xs, double.Parse(xs, american) * 10, ys, double.Parse(ys, american) * 10);

MessageBox.Show(string.Format("Default:\t\t{0}\nCroatian:\t\t{1}\nAmerican:\t\t{2}" , def, hr, us));

For me the popup shows:
Default:		10*3.14 -> 31.4	10*3,14 -> 3140
Croatian: 10*3.14 -> 3140 10*3,14 -> 31.4
American: 10*3.14 -> 31.4 10*3,14 -> 3140

So it seems that I'm using the american version.
TheBB's sidekick, aligulac.com | "Reality is frequently inaccurate." - Douglas Adams
Makavw
Profile Joined April 2010
Croatia165 Posts
Last Edited: 2014-02-28 20:23:16
February 28 2014 20:22 GMT
#8986
Hehe yea, I was just about the post that I found the problem and that was exactly it.
I started debugging line by line and noticted that the variable didn't read the decimal point at all.
It seems that I am using american version too and that was the problem .

BlueRoyaL
Profile Blog Joined February 2006
United States2493 Posts
March 01 2014 10:00 GMT
#8987
Can someone please explain to me what git is? I know there's a site called github that I thin is related.

I was running through some tutorials for angular is and they used git but I don't really understand what it is. I've looked up some places but I'm not really gettin it. Thanks!
WHAT'S HAPPENIN
freelander
Profile Blog Joined December 2004
Hungary4707 Posts
March 01 2014 10:17 GMT
#8988
Git is a version control program. You can make repositories with it, special folders where every file change within them is followed and can be restored in case of screwups. Also have other nifty options such as forking repositories and later joining them again to allow people to work on the same system at the same time etc.

Github is an online social site for where they host git repositories online for you. Those can be set public or private (open source projects often have them public). You can also follow other people's projects, or modify them etc.

If angular is on github, it means they host their source code there in a repository.
And all is illuminated.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2014-03-01 10:19:36
March 01 2014 10:17 GMT
#8989
Git is a version control system - the most popular one being Git. There are others like Subversion and Mercurial that differ in how they're structured.

Github is a host for Git - you can "upload" and "retrieve" your files from the host if you set it up properly. You could also not use Github and build your own computer/server to host Git yourself, or many other version control systems.

The essential premise of version control is to keep track of the previous state of your application. If you've used "Tracking" in Word, it's the same concept. By storing the previous state of your application, you can more freely do bigger changes without being scared of breaking things, you can take a look and see exactly what you've done since last time, you can distribute "versions" of your software without doing the silly thing of making a new folder, copying ALL changes to the new folder and giving that folder a name and date.

That's essentially the point of version control - automating the task of saving that folder, and saving the state of your application.


When you write 10000s of lines of software, you want to make sure that when you make HUGE, GAME-BREAKING changes and they don't work out, you can restore yourself to a safe point. Git helps you with that. It also has the power to do cooler stuff like allow in parallel development and auto-managing what happens when you want to combine both your work together, and you can spin off other "branches" to work on in parallel.


http://git-scm.com/book/en/Getting-Started-Git-Basics
There is no one like you in the universe.
Encdalf
Profile Joined February 2012
Germany66 Posts
March 01 2014 10:39 GMT
#8990
The above and as a pretty good video introduction:
fabiano
Profile Blog Joined August 2009
Brazil4644 Posts
March 01 2014 11:53 GMT
#8991
Git is amazing. It should be taught in schools!
"When the geyser died, a probe came out" - SirJolt
adwodon
Profile Blog Joined September 2010
United Kingdom592 Posts
March 01 2014 12:23 GMT
#8992
Hey guys,

Just looking for a bit of advise / knowledge about SQL databases. They aren't something I know anything about apart from some basics but first some context. I work for a company which produces hardware and I mainly work in C, there are obvious advantages when you're traversing the whole stack but recently decisions have been made to move our applications over to the .NET framework. This is a large task obviously so we're taking it step by step with plenty of research and prototypes.

Currently part of our software is used for configuring and managing IP cameras, think security room type situation. This is part of our main application which controls 'walls', think 64 monitor desktop type thing. We have a database of cameras in the registry which is managed by this application, essentially what I need to do is shift this over to an SQL database.

This isn't some monstrous database, fairly simple actually, first stage would be two tables, one containing camera models and another containing cameras linked to the other table. This would be controlled by a C# DLL (first stage would be a small C# application though) which will be used by our native C application (baby steps).

Now the basics of SQL aren't a problem, I can watch some pluralsight courses and it doesn't seem complicated but where I'm stumbling a bit is management systems (I think). We are are a Microsoft OEM so my first thought was SQL Server 2012, would this be suitable for this or overkill? I've made small databases in Visual Studio but it seemed more suitable to prototypes, not very flexible but all I want is a small database to ship with the application which contains some camera models by default (I assume these can be made immutable?), and then the user can expand the database using our software.

Sorry if that was a bit long winded but I'm a little hazy on what tools I should really be using to accomplish this so if someone could tell me I can go off an learn them, I don't want to spend hours learning the ins and outs of something which either doesn't do what I need or is complete overkill for such a small scale solution.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2014-03-01 13:20:09
March 01 2014 13:12 GMT
#8993
--- Nuked ---
mantequilla
Profile Blog Joined June 2012
Turkey780 Posts
Last Edited: 2014-03-01 14:53:30
March 01 2014 14:52 GMT
#8994
^^ Wouldn't sqlite be a good choice for this scenario?
Age of Mythology forever!
Manit0u
Profile Blog Joined August 2004
Poland17493 Posts
March 01 2014 16:05 GMT
#8995
On March 01 2014 20:53 fabiano wrote:
Git is amazing. It should be taught in schools!


[image loading]
Time is precious. Waste it wisely.
Mr. Wiggles
Profile Blog Joined August 2010
Canada5894 Posts
March 01 2014 16:46 GMT
#8996
If you're learning git, I can recommend the following website as a very good reference:

http://git-scm.com/

There's a free book hosted on the site, that should provide a good introduction:

http://git-scm.com/book

The book covers everything from the basics of what a repo is, how to set it up, how to use basic commands, what branches are, etc., to more advanced features like interactive staging and rewriting your history.

In general, I'd say these two pages are very useful for people who use git frequently and don't know about them:

http://git-scm.com/book/en/Git-Tools-Interactive-Staging
http://git-scm.com/book/en/Git-Tools-Rewriting-History

Just don't rewrite public history

It also has the man pages for every git command, with examples for many commands.

For example, everything you'd ever want to know about git-log and git-branch:
http://git-scm.com/docs/git-log
http://git-scm.com/docs/git-branch
you gotta dance
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2014-03-03 02:34:00
March 03 2014 02:32 GMT
#8997
On March 02 2014 01:05 Manit0u wrote:
Show nested quote +
On March 01 2014 20:53 fabiano wrote:
Git is amazing. It should be taught in schools!


[image loading]


such pull
much commit

would have been perfect if he did git status at the end.
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
LaNague
Profile Blog Joined April 2010
Germany9118 Posts
March 04 2014 02:37 GMT
#8998
god, i just coded and read about Process Control statistics for 12 hours straight.

Cant tell anyone else since all are asleep.


Lets hope i got it right, i cant tell, i have no comparisons.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
March 04 2014 13:03 GMT
#8999
i have an exam for control theory in <12 hours
There is no one like you in the universe.
Requizen
Profile Blog Joined March 2011
United States33802 Posts
March 04 2014 16:44 GMT
#9000
Could someone give me a rundown as how to apply two different SSL Certs to two different sites on the same server? It's giving me a message that "Another site is using the same HTTPS binding with a different certificate". Do I need to open another port on the server?

We don't really have an IT guy here so I'm a programmer learning this shit on the fly -.-
It's your boy Guzma!
Prev 1 448 449 450 451 452 1032 Next
Please log in or register to reply.
Live Events Refresh
StarCraft2.fi
17:00
15V Cup / Groups Day 3
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
LamboSC2 520
Fuzer 307
BRAT_OK 74
gerald23 63
MindelVK 23
SpeCial 19
Livibee 15
StarCraft: Brood War
Calm 3436
Shuttle 1215
Mini 711
EffOrt 499
Larva 314
Rush 251
Light 151
hero 89
Hyun 86
Dewaltoss 47
[ Show more ]
ToSsGirL 28
Aegong 21
soO 18
Terrorterran 17
Rock 15
scan(afreeca) 15
Dota 2
Gorgc6014
qojqva4021
singsing2712
Dendi1134
syndereN356
Counter-Strike
zeus328
chrisJcsgo47
kRYSTAL_19
Other Games
DeMusliM1858
hiko856
FrodaN663
Hui .168
Liquid`VortiX135
QueenE90
KnowMe68
Trikslyr47
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• poizon28 20
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• HerbMon 17
• FirePhoenix6
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV533
League of Legends
• TFBlade1312
Upcoming Events
Replay Cast
6h 54m
The PondCast
16h 54m
OSC
22h 54m
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
1d 6h
Korean StarCraft League
2 days
CranKy Ducklings
2 days
WardiTV 2025
2 days
SC Evo League
2 days
BSL 21
3 days
Sziky vs OyAji
Gypsy vs eOnzErG
OSC
3 days
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
[ Show More ]
Sparkling Tuna Cup
3 days
WardiTV 2025
3 days
OSC
3 days
BSL 21
4 days
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
4 days
Wardi Open
4 days
StarCraft2.fi
4 days
Monday Night Weeklies
4 days
Replay Cast
5 days
WardiTV 2025
5 days
StarCraft2.fi
5 days
PiGosaur Monday
6 days
StarCraft2.fi
6 days
Liquipedia Results

Completed

Proleague 2025-11-30
RSL Revival: Season 3
Light HT

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
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

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 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...

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.