• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 21:10
CEST 03:10
KST 10:10
  • 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 Tall10HomeStory 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
Weekly Cups (June 30 - July 6): Classic Doubles2[BSL20] Non-Korean Championship 4x BSL + 4x China9Flash Announces Hiatus From ASL66Weekly Cups (June 23-29): Reynor in world title form?14FEL Cracov 2025 (July 27) - $8000 live event22
StarCraft 2
General
The GOAT ranking of GOAT rankings The SCII GOAT: A statistical Evaluation Weekly Cups (June 23-29): Reynor in world title form? Weekly Cups (June 30 - July 6): Classic Doubles Program: SC2 / XSplit / OBS Scene Switcher
Tourneys
RSL: Revival, a new crowdfunded tournament series FEL Cracov 2025 (July 27) - $8000 live event Sparkling Tuna Cup - Weekly Open Tournament WardiTV Mondays Korean Starcraft League Week 77
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ ASL20 Preliminary Maps [ASL19] Finals Recap: Standing Tall SC uni coach streams logging into betting site Flash Announces Hiatus From ASL
Tourneys
[BSL20] Non-Korean Championship 4x BSL + 4x China [BSL20] Grand Finals - Sunday 20:00 CET CSL Xiamen International Invitational The Casual Games of the Week Thread
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread 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 Summer Games Done Quick 2025! Russo-Ukrainian War Thread Stop Killing Games - European Citizens Initiative Summer Games Done Quick 2024!
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
The Automated Ban List
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: 708 users

The Big Programming Thread - Page 753

Forum Index > General Forum
Post a Reply
Prev 1 751 752 753 754 755 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.
amazingxkcd
Profile Blog Joined September 2010
GRAND OLD AMERICA16375 Posts
Last Edited: 2016-08-10 21:36:00
August 10 2016 19:57 GMT
#15041
anyone know why getting a Hystrix stream from a hystrix enabled server return a 404? github pages are not helping here -- dashboard works fine and event-stream dependency is injected, but why would curling the hsystrix.stream URI giff 404?

grumbles
The world is burning and you rather be on this terrible website discussing video games and your shallow feelings
berated-
Profile Blog Joined February 2007
United States1134 Posts
August 11 2016 00:02 GMT
#15042
On August 11 2016 04:57 amazingxkcd wrote:
anyone know why getting a Hystrix stream from a hystrix enabled server return a 404? github pages are not helping here -- dashboard works fine and event-stream dependency is injected, but why would curling the hsystrix.stream URI giff 404?

grumbles


Did you register the servlet?

https://github.com/Netflix/Hystrix/tree/master/hystrix-contrib/hystrix-metrics-event-stream
Hhanh00
Profile Joined May 2016
34 Posts
August 11 2016 02:51 GMT
#15043
On August 11 2016 03:11 Manit0u wrote:
Is it just for Windows or is Linux also vulnerable? I guess it'd be much harder to pull of on Linux since you need to download the stuff, make it executable and then it needs proper permissions to do any real damage. Quite a few hurdles to overcome.

Not necessarily, in some cases the open source nature of Linux was used against it. A flaw in a common code affects many systems from computers to routers. Take Heartbleed and Shellshock as an example.
Manit0u
Profile Blog Joined August 2004
Poland17244 Posts
August 11 2016 03:21 GMT
#15044
On August 11 2016 11:51 Hhanh00 wrote:
Show nested quote +
On August 11 2016 03:11 Manit0u wrote:
Is it just for Windows or is Linux also vulnerable? I guess it'd be much harder to pull of on Linux since you need to download the stuff, make it executable and then it needs proper permissions to do any real damage. Quite a few hurdles to overcome.

Not necessarily, in some cases the open source nature of Linux was used against it. A flaw in a common code affects many systems from computers to routers. Take Heartbleed and Shellshock as an example.


Heartbleed was actually the result of lazy maintainers who didn't give a damn. That's how LibreSSL was born (a fork of OpenSSL where they deleted half a million lines of code during the first 30 days of working on it) and picked up by people who care. They fixed a lot of bugs, improved performance and security greatly.
Time is precious. Waste it wisely.
Ropid
Profile Joined March 2009
Germany3557 Posts
Last Edited: 2016-08-11 06:55:13
August 11 2016 04:08 GMT
#15045
All you really care about will be accessible by your user account, so it's not necessary to "infect" the base system. There's sand-boxing schemes that can be used to protect a user from for example Firefox accessing everything. Those are right now not popular and not used by the packages you have on normal Linux distros. I think in theory Linux is just as vulnerable without those, and there's just a difference in practice because of popularity.
"My goal is to replace my soul with coffee and become immortal."
JJoNeEightY
Profile Joined December 2010
United States509 Posts
August 11 2016 06:13 GMT
#15046
Reading these last few pages has made me start implementing a proper backup strategy. Finally. Derp.

What do you guys use for personal remote backups? Backblaze? AWS? Anybody really fond of a particular service/piece of software?

Also, Hi Tofu o7
Hhanh00
Profile Joined May 2016
34 Posts
August 11 2016 06:33 GMT
#15047
On August 11 2016 12:21 Manit0u wrote:
Show nested quote +
On August 11 2016 11:51 Hhanh00 wrote:
On August 11 2016 03:11 Manit0u wrote:
Is it just for Windows or is Linux also vulnerable? I guess it'd be much harder to pull of on Linux since you need to download the stuff, make it executable and then it needs proper permissions to do any real damage. Quite a few hurdles to overcome.

Not necessarily, in some cases the open source nature of Linux was used against it. A flaw in a common code affects many systems from computers to routers. Take Heartbleed and Shellshock as an example.


Heartbleed was actually the result of lazy maintainers who didn't give a damn. That's how LibreSSL was born (a fork of OpenSSL where they deleted half a million lines of code during the first 30 days of working on it) and picked up by people who care. They fixed a lot of bugs, improved performance and security greatly.


Well - you are entitled to your opinion. I don't see how it is relevant to Linux being less vulnerable than Windows.
mantequilla
Profile Blog Joined June 2012
Turkey779 Posts
August 11 2016 12:15 GMT
#15048
Whenever I want to import data into mysql with a bunch of insert statements, a random error occurs at the nth insert but up to n-1 gets inserted. I fix the random error and then I have to revert that n-1 changes manually because they are already committed and won't work because of duplicate primary keys etc.

I know I'm supposed to wrap all of my inserts in a transaction to be able to revert in case of an error but it doesn't work like this:

set autocommit = 0;
start transaction;
//bunch of operations
commit;
set autocommit = 1;

why the fuck this does not work, do I have to read and understand a whole chapter about transactions to do this? why these things aren't a little intuitive?
Age of Mythology forever!
Acrofales
Profile Joined August 2010
Spain17971 Posts
August 11 2016 12:39 GMT
#15049
On August 11 2016 15:13 JJoNeEightY wrote:
Reading these last few pages has made me start implementing a proper backup strategy. Finally. Derp.

What do you guys use for personal remote backups? Backblaze? AWS? Anybody really fond of a particular service/piece of software?

Also, Hi Tofu o7

You talking about professional, or personal stuff? Why use a professional service for personal backups when Dropbox, Google Drive, OneDrive or some other virtually free service works perfectly well? Between an external hdd and a cloud service you have more than enough redundancy.
tofucake
Profile Blog Joined October 2009
Hyrule19031 Posts
Last Edited: 2016-08-11 12:46:11
August 11 2016 12:45 GMT
#15050
On August 11 2016 15:13 JJoNeEightY wrote:
Reading these last few pages has made me start implementing a proper backup strategy. Finally. Derp.

What do you guys use for personal remote backups? Backblaze? AWS? Anybody really fond of a particular service/piece of software?

Also, Hi Tofu o7

hi

our company has a colo with weekly backups, plus the base images of everyone's workstation, and aws backups

personally anything I want stored safely I keep on externals or google drive, but for the most part I don't care

hi aeth o7
Liquipediaasante sana squash banana
Hhanh00
Profile Joined May 2016
34 Posts
August 11 2016 13:33 GMT
#15051

use testdb;
create table test(a int not null primary key, b int);

start transaction;
insert into test values(1, 1);
insert into test values(2, 1);
-- crap, this doesn't work
insert into test values(2, 1);
-- so rollback
rollback;

start transaction;
insert into test values(1, 1);
insert into test values(2, 1);
-- ok now
insert into test values(3, 1);
-- so commit
commit;

select * from test;


What doesn't work?
Manit0u
Profile Blog Joined August 2004
Poland17244 Posts
Last Edited: 2016-08-11 14:06:07
August 11 2016 13:56 GMT
#15052
On August 11 2016 22:33 Hhanh00 wrote:

use testdb;
create table test(a int not null primary key, b int);

start transaction;
insert into test values(1, 1);
insert into test values(2, 1);
-- crap, this doesn't work
insert into test values(2, 1);
-- so rollback
rollback;

start transaction;
insert into test values(1, 1);
insert into test values(2, 1);
-- ok now
insert into test values(3, 1);
-- so commit
commit;

select * from test;


What doesn't work?


Were you trying to insert duplicate primary keys the first time?

On August 11 2016 15:33 Hhanh00 wrote:
Show nested quote +
On August 11 2016 12:21 Manit0u wrote:
On August 11 2016 11:51 Hhanh00 wrote:
On August 11 2016 03:11 Manit0u wrote:
Is it just for Windows or is Linux also vulnerable? I guess it'd be much harder to pull of on Linux since you need to download the stuff, make it executable and then it needs proper permissions to do any real damage. Quite a few hurdles to overcome.

Not necessarily, in some cases the open source nature of Linux was used against it. A flaw in a common code affects many systems from computers to routers. Take Heartbleed and Shellshock as an example.


Heartbleed was actually the result of lazy maintainers who didn't give a damn. That's how LibreSSL was born (a fork of OpenSSL where they deleted half a million lines of code during the first 30 days of working on it) and picked up by people who care. They fixed a lot of bugs, improved performance and security greatly.


Well - you are entitled to your opinion. I don't see how it is relevant to Linux being less vulnerable than Windows.


The sole fact that nothing you download has execution privilages by default is a great help.

Linux can be much less vulnerable if you're using chroots, user groups and permissions properly. If you're scared of losing some sensitive data you can always change folder permissions for it so that your every-day personal account doesn't have access to it. Then, nothing that you'll get infected with on this account can affect anything stored in a secured folder. You can then set up your tools (IDEs and such) to be launched with proper access rights to secure folders.

You can also set up secure folders on Windows if I remember correctly (at least you used to be able to), but it's way easier to bypass its security. The fact that you can launch javascript from command line in Windows is pretty scary, you can use it to create system messages that execute JS for example.
Time is precious. Waste it wisely.
mantequilla
Profile Blog Joined June 2012
Turkey779 Posts
Last Edited: 2016-08-11 14:30:48
August 11 2016 14:27 GMT
#15053
On August 11 2016 22:33 Hhanh00 wrote:

use testdb;
create table test(a int not null primary key, b int);

start transaction;
insert into test values(1, 1);
insert into test values(2, 1);
-- crap, this doesn't work
insert into test values(2, 1);
-- so rollback
rollback;

start transaction;
insert into test values(1, 1);
insert into test values(2, 1);
-- ok now
insert into test values(3, 1);
-- so commit
commit;

select * from test;


What doesn't work?


Thanks for answering but I didn't get your example. The behaviour I was expecting is "if an error occurs rollback everything, else commit everything". In the example, you know where the error will occur and purposely rollback so, what's the point? Like:

start transaaction;
insert ...
insert ...
insert ...
commit;

(if an error occurs at 3rd insert statement, rollback 1 and 2)
Age of Mythology forever!
Acrofales
Profile Joined August 2010
Spain17971 Posts
August 11 2016 14:34 GMT
#15054
Well, if all this shit starts as JS exploits, then presumably they can create binaries with execution permissions (which you don't need root for in most distros). From there, the world is their oyster and as long as they have some exploit for getting root, or can operate without root (like ransomware just encrypting your whole home directory), then Linux is not inherently safer than Windows. Linux is safer because most end users, including those in corporate environments, run Windows, and it is therefore simply a numbers game: make a Linux (or Mac) virus, you can expect to hit X users. Make a Windows virus, and you hit an order of magnitude (or two) more users.

And yes, you can set up a Linux box to be very secure. However, you can also set up a Windows box to be very secure. It's just a pain in the ass to do so for either system. I hate typing in passwords, as do most users. Having to change users (and thus type in a password) to access my photos, documents, etc. would be fucking irritating, and therefore I don't do that. On the other hand, backups I run as a separate super user, so the only one with write access to the backups (of my photos, docs, etc) is that superuser, so while a virus/ransomware might destroy/encrypt/corrupt the originals, it does not have write access to the backups. This is also further backed up on Google Drive. The only way of corrupting the backups is by actually backing up the corrupted data, which would overwrite my clean backup. Even then, Google Drive should be able to restore earlier versions, but it'd (probably) be a major pain in the ass. Luckily, I have never needed to go that far. I have also never gotten ransomware or a serious virus, and my backup regime has suffered at times, but luckily threads like this exist to keep me paranoid
Hhanh00
Profile Joined May 2016
34 Posts
Last Edited: 2016-08-11 15:43:51
August 11 2016 15:23 GMT
#15055
On August 11 2016 23:27 mantequilla wrote:

Thanks for answering but I didn't get your example. The behaviour I was expecting is "if an error occurs rollback everything, else commit everything". In the example, you know where the error will occur and purposely rollback so, what's the point? Like:

start transaaction;
insert ...
insert ...
insert ...
commit;

(if an error occurs at 3rd insert statement, rollback 1 and 2)


Yeah, this doesn't work that way. If a exception occurs, the client gets notified and the behavior depends on what it wants to do. The transaction isn't always rolled back. In workbench, it displays an error and you can continue. mysql client will quit in which case the transaction rolls back automatically. If you want control, wrap everything in a procedure with an exception handler like this:


delimiter //
drop procedure if exists p_test //
create procedure p_test(in v int)
begin
declare exit handler for sqlexception rollback;
start transaction;
insert into test values(1, 1);
insert into test values(2, 1);
insert into test values(v, 1);
commit;
END //
delimiter ;

-- will rollback
call p_test(2);
select * from test;

-- will commit
call p_test(3);
select * from test;



Edit: It's usually preferable to catch the error in the client because then the application would be aware of the failure.
mantequilla
Profile Blog Joined June 2012
Turkey779 Posts
August 11 2016 17:39 GMT
#15056
Hmm. I think I get it now. To roll back or not is client's choice.

Is the sample code standard sql or mysql specific?
Age of Mythology forever!
amazingxkcd
Profile Blog Joined September 2010
GRAND OLD AMERICA16375 Posts
August 12 2016 13:35 GMT
#15057
On August 11 2016 09:02 berated- wrote:
Show nested quote +
On August 11 2016 04:57 amazingxkcd wrote:
anyone know why getting a Hystrix stream from a hystrix enabled server return a 404? github pages are not helping here -- dashboard works fine and event-stream dependency is injected, but why would curling the hsystrix.stream URI giff 404?

grumbles


Did you register the servlet?

https://github.com/Netflix/Hystrix/tree/master/hystrix-contrib/hystrix-metrics-event-stream


yup. its wierd
The world is burning and you rather be on this terrible website discussing video games and your shallow feelings
norlock
Profile Joined March 2010
Netherlands918 Posts
August 13 2016 10:39 GMT
#15058
http://www.teamliquid.net/forum/tech-support/512785-creating-a-teamliquid-app If anyone is interested in helping me out. First of all I still need to wait for docs of the API (hopefully they can provide me with that).
Are you human?
graNite
Profile Blog Joined December 2010
Germany4434 Posts
August 14 2016 13:53 GMT
#15059
I am trying to code a builder for table tennis exercise graphics. I want it to show a table for each rally of the exercise, with arrows on it that show the movement path of the ball and rectangles of areas where to play.

Right now it looks like this: https://codepen.io/graNite/pen/grqXOo

You can add new tables, remove the last one, and draw two fixed arrows on the same canvas layer on the first table.

What I want to enable is to draw arrows* on each table via click-and-drag and delete them with right-click on them.

*(like they are drawn in the drawArrows function)

What is the best way to do this?

I already implemented a canvas layer for the arrows and could even do so for every single arrow on each table, but how can I access an arrow that is in a middle layer if I right click on it to delete it?
"Oink oink, bitches" - Tasteless on Pigbaby winning a map against Flash
Djagulingu
Profile Blog Joined December 2010
Germany3605 Posts
August 14 2016 19:07 GMT
#15060
On August 13 2016 19:39 norlock wrote:
http://www.teamliquid.net/forum/tech-support/512785-creating-a-teamliquid-app If anyone is interested in helping me out. First of all I still need to wait for docs of the API (hopefully they can provide me with that).

I'm down for this shit.
"windows bash is a steaming heap of shit" tofucake
Prev 1 751 752 753 754 755 1031 Next
Please log in or register to reply.
Live Events Refresh
Replay Cast
00:00
Korean StarCraft League #77
CranKy Ducklings119
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft404
Livibee 121
ProTech69
RuFF_SC2 54
Vindicta 8
StarCraft: Brood War
MaD[AoV]35
Bale 30
Icarus 4
Dota 2
monkeys_forever379
NeuroSwarm117
League of Legends
JimRising 609
Counter-Strike
summit1g10964
tarik_tv5375
Super Smash Bros
Mew2King154
Other Games
shahzam867
Maynarde148
Day[9].tv122
JuggernautJason93
ToD86
WinterStarcraft17
Organizations
Other Games
gamesdonequick49546
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 21 non-featured ]
StarCraft 2
• davetesta28
• Berry_CruncH28
• HeavenSC 15
• Mapu3
• IndyKCrew
• sooper7s
• Migwel
• AfreecaTV YouTube
• intothetv
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• Pr0nogo 1
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota2708
League of Legends
• Jankos1484
• Stunt262
Other Games
• Scarra1671
• WagamamaTV192
• Day9tv122
Upcoming Events
Sparkling Tuna Cup
8h 50m
WardiTV European League
14h 50m
MaNa vs sebesdes
Mixu vs Fjant
ByuN vs HeRoMaRinE
ShoWTimE vs goblin
Gerald vs Babymarine
Krystianer vs YoungYakov
PiGosaur Monday
22h 50m
The PondCast
1d 8h
WardiTV European League
1d 10h
Jumy vs NightPhoenix
Percival vs Nicoract
ArT vs HiGhDrA
MaxPax vs Harstem
Scarlett vs Shameless
SKillous vs uThermal
uThermal 2v2 Circuit
1d 14h
Replay Cast
1d 22h
RSL Revival
2 days
ByuN vs SHIN
Clem vs Reynor
Replay Cast
2 days
RSL Revival
3 days
Classic vs Cure
[ Show More ]
FEL
3 days
RSL Revival
4 days
FEL
4 days
FEL
4 days
CSO Cup
4 days
BSL20 Non-Korean Champi…
4 days
Bonyth vs QiaoGege
Dewalt vs Fengzi
Hawk vs Zhanhun
Sziky vs Mihu
Mihu vs QiaoGege
Zhanhun vs Sziky
Fengzi vs Hawk
Sparkling Tuna Cup
5 days
RSL Revival
5 days
FEL
5 days
BSL20 Non-Korean Champi…
5 days
Bonyth vs Dewalt
QiaoGege vs Dewalt
Hawk vs Bonyth
Sziky vs Fengzi
Mihu vs Zhanhun
QiaoGege vs Zhanhun
Fengzi vs Mihu
Liquipedia Results

Completed

BSL Season 20
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
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
CSL Xiamen Invitational
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...

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.