• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 03:37
CET 09:37
KST 17:37
  • 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
Behind the Blue - Team Liquid History Book15Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8herO wins SC2 All-Star Invitational14
Community News
LiuLi Cup: 2025 Grand Finals (Feb 10-16)12Weekly Cups (Feb 2-8): Classic, Solar, MaxPax win2Nexon's StarCraft game could be FPS, led by UMS maker8PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar)12Weekly Cups (Jan 26-Feb 1): herO, Clem, ByuN, Classic win2
StarCraft 2
General
Terran Scanner Sweep Nexon's StarCraft game could be FPS, led by UMS maker How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Behind the Blue - Team Liquid History Book Weekly Cups (Jan 12-18): herO, MaxPax, Solar win
Tourneys
RSL Revival: Season 4 Korea Qualifier (Feb 14) LiuLi Cup: 2025 Grand Finals (Feb 10-16) PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) Sparkling Tuna Cup - Weekly Open Tournament RSL Season 4 announced for March-April
Strategy
Custom Maps
Map Editor closed ? [A] Starcraft Sound Mod
External Content
The PondCast: SC2 News & Results Mutation # 512 Overclocked Mutation # 511 Temple of Rebirth Mutation # 510 Safety Violation
Brood War
General
ACS replaced by "ASL Season Open" - Starts 21/02 Gypsy to Korea Liquipedia.net NEEDS editors for Brood War Recent recommended BW games [ASL21] Potential Map Candidates
Tourneys
Escore Tournament StarCraft Season 1 [Megathread] Daily Proleagues Small VOD Thread 2.0 KCM Race Survival 2026 Season 1
Strategy
Fighting Spirit mining rates Zealot bombing is no longer popular? Simple Questions, Simple Answers Current Meta
Other Games
General Games
Nintendo Switch Thread Diablo 2 thread Battle Aces/David Kim RTS Megathread ZeroSpace Megathread EVE Corporation
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 Vanilla Mini Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread Ask and answer stupid questions here! Russo-Ukrainian War Thread Sex and weight loss
Fan Clubs
The herO Fan Club! The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
ADHD And Gaming Addiction…
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
Customize Sidebar...

Website Feedback

Closed Threads



Active: 3771 users

The Big Programming Thread - Page 914

Forum Index > General Forum
Post a Reply
Prev 1 912 913 914 915 916 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.
sc-darkness
Profile Joined August 2017
856 Posts
Last Edited: 2017-10-29 23:55:07
October 29 2017 23:54 GMT
#18261
If you have client and server which use AES, how do you exchange the key? I've read about Diffie–Hellman method, but people say it's vulnerable to man-in-the-middle attack. Is SSL the only secure way to exchange keys?
Hanh
Profile Joined June 2016
146 Posts
Last Edited: 2017-10-30 01:57:39
October 30 2017 01:26 GMT
#18262
Use DH but embed the public key in the client. MITM attacks come from impersonating the server by sending a fake PK to the client. Btw, SSL l uses DH (among other methods).
phar
Profile Joined August 2011
United States1080 Posts
Last Edited: 2017-10-31 01:47:42
October 31 2017 01:36 GMT
#18263
On October 30 2017 08:23 WarSame wrote:
Show nested quote +
On October 30 2017 01:23 phar wrote:

And again a plea to not hook this up for real to anyone's actual money (just doing it as a test thing is fine). Don't roll your own crypto, probably don't roll your own security.

But how?!? If I could get away without doing this, and also make it more secure I would love to do that. Or are you talking about just hiring someone for the security side of things?

OAuth, what I said a few days back in my first reply to you. Use Google or Facebook or whatever other existing auth scheme, and just OAuth on top of that.

Right even at large company X, essentially every single team will use an existing auth scheme, rather than inventing their own. Because even at a company like Google or Facebook or whatever, you'd only trust a few teams to actually get it right. Everybody else would fuck up in some way (forget one of the small details you need to have really hardened auth scheme), and bad shit would ensue.

The only difference is that for you doing a throwaway toy project, "bad shit" translates to "temporary embarrassment, maybe having to shut down the project", whereas "bad shit" of this nature (completely failed auth scheme) at Google would translate into like literally billions of dollars being flushed down the toilet.


On October 30 2017 03:12 Acrofales wrote:

Is my app secure? I store the passwords in plain text in MySQL database.

This is true. I do exactly that. But security is far far far less important than being able to tell 12-yo kids what password they used to register. And resetting 5-10 passwords every class would just take way too much time.


I mean I don't know your code, but probably not. It depends on the threat model. If your threat model includes ever having a single vulnerability in your auth db such that a third party ever get access to it, then you would join the list of places which have had plaintext password dumps stolen (just search around for some examples).

Read e.g. https://stackoverflow.com/questions/1197417/why-are-plain-text-passwords-bad-and-how-do-i-convince-my-boss-that-his-treasur


Again for small throwaway test projects, this isn't that big of a problem. This is under the assumption that you're fine with setting the thing on fire if shit hits the fan, and then walking away.
Who after all is today speaking about the destruction of the Armenians?
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
October 31 2017 03:21 GMT
#18264
Ah, sorry, I didn't connect the username. Alright, that would have saved me a lot of effort doing DB stuff and encryption, anyway. Why do most places have OAuth as well as a regular sign in option? Flexibility? Would it be that unusual to have an app that had no local way to sign in?
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Acrofales
Profile Joined August 2010
Spain18214 Posts
October 31 2017 11:33 GMT
#18265
On October 31 2017 10:36 phar wrote:
Show nested quote +
On October 30 2017 03:12 Acrofales wrote:

Is my app secure? I store the passwords in plain text in MySQL database.

This is true. I do exactly that. But security is far far far less important than being able to tell 12-yo kids what password they used to register. And resetting 5-10 passwords every class would just take way too much time.


I mean I don't know your code, but probably not. It depends on the threat model. If your threat model includes ever having a single vulnerability in your auth db such that a third party ever get access to it, then you would join the list of places which have had plaintext password dumps stolen (just search around for some examples).

Read e.g. https://stackoverflow.com/questions/1197417/why-are-plain-text-passwords-bad-and-how-do-i-convince-my-boss-that-his-treasur


Again for small throwaway test projects, this isn't that big of a problem. This is under the assumption that you're fine with setting the thing on fire if shit hits the fan, and then walking away.


It was obviously tongue-in-cheek. They don't even have to steal the database. I've printed out the passwords on a handy piece of paper! :p
phar
Profile Joined August 2011
United States1080 Posts
Last Edited: 2017-10-31 19:21:01
October 31 2017 19:20 GMT
#18266
On October 31 2017 12:21 WarSame wrote:
Ah, sorry, I didn't connect the username. Alright, that would have saved me a lot of effort doing DB stuff and encryption, anyway. Why do most places have OAuth as well as a regular sign in option? Flexibility? Would it be that unusual to have an app that had no local way to sign in?

I mean even just using OAuth doesn't solve all your problems, see e.g. warning here: https://oauth.net/articles/authentication/

As for why more places don't use oauth in place of their own stuff? Idk. Generally security practices across the entire industry are complete shit. Why did linkedin leak 6m (100m?) emails and passwords in 2012, despite being a big well-established company? Stuff ain't easy.

One reason why places insist on local sign-in is that it allows people who don't have accounts with any of your supported oauth providers to still use your stuff.

See here for an example of google messing up auth flow (actually a good read from the red team side of things if you want to see some ways that people will try to break your stuff): https://medium.com/@alex.birsan/messing-with-the-google-buganizer-system-for-15-600-in-bounties-58f86cc9f9a5

On October 31 2017 20:33 Acrofales wrote:
It was obviously tongue-in-cheek. They don't even have to steal the database. I've printed out the passwords on a handy piece of paper! :p

Ah ha ok, carry on
Who after all is today speaking about the destruction of the Armenians?
Programmer2
Profile Joined November 2017
9 Posts
Last Edited: 2017-11-01 22:10:13
November 01 2017 22:09 GMT
#18267
Hello everyone.

I am fascinated with programming.

Has anyone have any experience with Visual Studio 2015? If anyone does, how do I make it so an image doesn't move after clicking it but after clicking the image, a blue print of it appears for you to place anywhere? Like how on The Sims you can place objects in your house.

How would the code look? If I want the left click on the mouse button to do it, I assume I go to the "events" and click on "mousedown" but I have no idea what the code will be to get it to work.

I am coding in C*
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
November 01 2017 22:40 GMT
#18268
On November 02 2017 07:09 Programmer2 wrote:
Hello everyone.

I am fascinated with programming.

Has anyone have any experience with Visual Studio 2015? If anyone does, how do I make it so an image doesn't move after clicking it but after clicking the image, a blue print of it appears for you to place anywhere? Like how on The Sims you can place objects in your house.

How would the code look? If I want the left click on the mouse button to do it, I assume I go to the "events" and click on "mousedown" but I have no idea what the code will be to get it to work.

I am coding in C*

I think, if I understand properly, you'll basically want the following...

1) You'll have a blank area on the interface where images can be placed.

2) On mouse click, a "copy" of the image will be made. It either replaces your mouse cursor, or has a trigger on mouse movement to copy the mouse movement.

3) If you have an image selected (can use a boolean flag or something to check this), and you click on the blank area, the image from step 1 will have its x/y position locked. (Or if you went with a mouse cursor replace, a new image element will be placed where you clicked, and mouse will go back to default).

There's a lot of finagling you can do to make it the whole process look better, flashier, etc.
Average means I'm better than half of you.
Manit0u
Profile Blog Joined August 2004
Poland17660 Posts
November 01 2017 22:50 GMT
#18269
On November 02 2017 07:09 Programmer2 wrote:
Visual Studio 2015?

image doesn't move after clicking it but after clicking the image

I am coding in C*


Whoa! Not to discourage you but you're mentioning some weird stuff in conjunction with each other...

If you are coding in C, you don't need VS (kind of overkill unless your project is really big).
By "image doesn't move" do you mean VS templates for GUI or stuff in some game engine?

In other words. What are you working on and what is your exact problem? (Being able to define what your problem really is is probably the most crucial skill to attain when learning programming)

On October 31 2017 12:21 WarSame wrote:
Why do most places have OAuth as well as a regular sign in option?
Would it be that unusual to have an app that had no local way to sign in?


Not having OAuth as your only source of user info might indicate 2 things:
1) Possibility of signing up users who do not have accounts at other providers (most commonly Google, Facebook and Twitter, but in enterprise world this extends to Okta and other custom identity providers).
2) Need to consolidate OAuth accounts (there's no real way to tell if WarSame@Google is the same as WarSame@Facebook unless you have some other - sometimes virtual - local user account that you can link with other providers).

That's from my experience. Technically, you should have a different account for each provider but sometimes business requirements have you to allow the same user to be able to log on from different providers to the same account (I guess that's because most people don't realize how hard can it be to actually implement).

Time is precious. Waste it wisely.
Programmer2
Profile Joined November 2017
9 Posts
November 01 2017 23:47 GMT
#18270
On November 02 2017 07:50 Manit0u wrote:
Show nested quote +
On November 02 2017 07:09 Programmer2 wrote:
Visual Studio 2015?

image doesn't move after clicking it but after clicking the image

I am coding in C*


Whoa! Not to discourage you but you're mentioning some weird stuff in conjunction with each other...

If you are coding in C, you don't need VS (kind of overkill unless your project is really big).
By "image doesn't move" do you mean VS templates for GUI or stuff in some game engine?

In other words. What are you working on and what is your exact problem? (Being able to define what your problem really is is probably the most crucial skill to attain when learning programming)





I don't know how to quote more than one person in the same post but the person above you explained it wonderfully.
Manit0u
Profile Blog Joined August 2004
Poland17660 Posts
November 02 2017 00:56 GMT
#18271
On November 02 2017 08:47 Programmer2 wrote:
Show nested quote +
On November 02 2017 07:50 Manit0u wrote:
On November 02 2017 07:09 Programmer2 wrote:
Visual Studio 2015?

image doesn't move after clicking it but after clicking the image

I am coding in C*


Whoa! Not to discourage you but you're mentioning some weird stuff in conjunction with each other...

If you are coding in C, you don't need VS (kind of overkill unless your project is really big).
By "image doesn't move" do you mean VS templates for GUI or stuff in some game engine?

In other words. What are you working on and what is your exact problem? (Being able to define what your problem really is is probably the most crucial skill to attain when learning programming)


I don't know how to quote more than one person in the same post but the person above you explained it wonderfully.


Hah, I haven't seen the answer at the time of my posting (must've been posting it at the same time)

Glad someone knew the problem you're facing and was able to shed some light on it.
Time is precious. Waste it wisely.
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
November 02 2017 01:34 GMT
#18272
Going all in on rust, wish me a lot of luck getting a job, cause there is no going back now. This language is amazing (I feel like a televangelist).

Also, intellij is providing support to it now, and more importantly they're working on support for the windows subsystem. All I need now is microsoft to finally fix it's i/o speed and I'll be one happy man.

For anyone newish to low level languages but knows enough basics to understand functions, strings etc a good project is literally anything simple which has a gui - one of the best things I ever did was learn how to use qt to make a sine wave generator which used mouse position in a window to select the output frequency.
Hanh
Profile Joined June 2016
146 Posts
November 02 2017 04:11 GMT
#18273
What io performance issues are you referring to?
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
November 02 2017 05:20 GMT
#18274
Windows subsystem file i/o is really quite slow in comparison to normal linux, can be quite painful sometimes.
Hanh
Profile Joined June 2016
146 Posts
November 02 2017 08:22 GMT
#18275
On November 02 2017 14:20 bo1b wrote:
Windows subsystem file i/o is really quite slow in comparison to normal linux, can be quite painful sometimes.


Do you have an objective speed comparison study or is it your opinion?
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
November 02 2017 10:31 GMT
#18276
The objective speed can be found in pictures from sometime last year, and perhaps more obviously in the filesystem that's actually used (ntfs on windows vs ext4 on linux).

https://www.phoronix.com/scan.php?page=article&item=windows-10-lxcore&num=4

Here was a benchmark from a while ago, it's definitely somewhat better now but compiling things is still a pain in the ass on wsl in comparison to linux.
Silvanel
Profile Blog Joined March 2003
Poland4742 Posts
November 02 2017 11:03 GMT
#18277
Those tests are about native linux vs ubuntu environment running on windows 10.
Pathetic Greta hater.
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
November 02 2017 11:07 GMT
#18278
On November 02 2017 20:03 Silvanel wrote:
Those tests are about native linux vs ubuntu environment running on windows 10.

Thats what the windows subsystem is. wsl stands for windows subsystem for linux.
Silvanel
Profile Blog Joined March 2003
Poland4742 Posts
November 02 2017 11:11 GMT
#18279
Uhm. Didnt notice that was topic of discussion. Lol@me.
Pathetic Greta hater.
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
November 02 2017 11:19 GMT
#18280
Happens to everyone

On another note, I thoroughly recommend using wsl + vscode if you use a lowlevel language on windows at all, it's really quite good.
Prev 1 912 913 914 915 916 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 1h 23m
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
Bisu 7102
Mong 338
Leta 256
actioN 227
Tasteless 217
Sharp 89
ToSsGirL 38
NaDa 25
zelot 24
Killer 24
[ Show more ]
sSak 24
GoRush 16
JulyZerg 12
soO 10
League of Legends
JimRising 628
C9.Mang0426
Counter-Strike
shoxiejesuss653
kRYSTAL_30
Super Smash Bros
Mew2King137
Heroes of the Storm
Khaldor143
Other Games
gofns10077
summit1g4152
ceh9406
Happy264
KnowMe52
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Berry_CruncH106
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• LUISG 0
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 7
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos731
• Stunt476
Upcoming Events
Escore
1h 23m
LiuLi Cup
2h 23m
Serral vs Zoun
Cure vs Classic
Big Brain Bouts
8h 23m
ByuN vs GgMaChine
Serral vs Jumy
RSL Revival
18h 23m
RSL Revival
23h 23m
LiuLi Cup
1d 2h
uThermal 2v2 Circuit
1d 3h
RSL Revival
1d 9h
Replay Cast
1d 15h
Sparkling Tuna Cup
2 days
[ Show More ]
LiuLi Cup
2 days
Replay Cast
2 days
Replay Cast
3 days
LiuLi Cup
3 days
Wardi Open
3 days
Monday Night Weeklies
3 days
OSC
3 days
WardiTV Winter Champion…
4 days
Replay Cast
5 days
WardiTV Winter Champion…
5 days
Replay Cast
5 days
The PondCast
6 days
KCM Race Survival
6 days
WardiTV Winter Champion…
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-02-10
Rongyi Cup S3
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Escore Tournament S1: W8
LiuLi Cup: 2025 Grand Finals
Nations Cup 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025

Upcoming

[S:21] ASL SEASON OPEN 1st Round
[S:21] ASL SEASON OPEN 1st Round Qualifier
[S:21] ASL SEASON OPEN 2nd Round
[S:21] ASL SEASON OPEN 2nd Round Qualifier
Acropolis #4
IPSL Spring 2026
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
WardiTV Winter 2026
CCT Season 3 Global Finals
FISSURE Playground #3
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
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 © 2026 TLnet. All Rights Reserved.