• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 10:39
CET 16:39
KST 00:39
  • 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 Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)11Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns6[BSL21] Non-Korean Championship - Starts Jan 103SC2 All-Star Invitational: Jan 17-1822Weekly Cups (Dec 22-28): Classic & MaxPax win, Percival surprises3
StarCraft 2
General
Spontaneous hotkey change zerg Chinese SC2 server to reopen; live all-star event in Hangzhou Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns SC2 All-Star Invitational: Jan 17-18 Weekly Cups (Dec 22-28): Classic & MaxPax win, Percival surprises
Tourneys
$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7) WardiTV Winter Cup WardiTV Mondays SC2 AI Tournament 2026 OSC Season 13 World Championship
Strategy
Simple Questions Simple Answers
Custom Maps
Map Editor closed ?
External Content
Mutation # 507 Well Trained Mutation # 506 Warp Zone Mutation # 505 Rise From Ashes Mutation # 504 Retribution
Brood War
General
Potential ASL qualifier breakthroughs? BGH Auto Balance -> http://bghmmr.eu/ I would like to say something about StarCraft BW General Discussion StarCraft & BroodWar Campaign Speedrun Quest
Tourneys
[Megathread] Daily Proleagues [BSL21] Grand Finals - Sunday 21:00 CET [BSL21] Non-Korean Championship - Starts Jan 10 SLON Grand Finals – Season 2
Strategy
Game Theory for Starcraft Simple Questions, Simple Answers Current Meta [G] How to get started on ladder as a new Z player
Other Games
General Games
Mechabellum Beyond All Reason Stormgate/Frost Giant Megathread Awesome Games Done Quick 2026! General RTS Discussion Thread
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine European Politico-economics QA Mega-thread Russo-Ukrainian War Thread Trading/Investing Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List TL+ Announced
Blogs
Physical Exercise (HIIT) Bef…
TrAiDoS
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
James Bond movies ranking - pa…
Topin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2830 users

The Big Programming Thread - Page 684

Forum Index > General Forum
Post a Reply
Prev 1 682 683 684 685 686 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.
Manit0u
Profile Blog Joined August 2004
Poland17588 Posts
November 28 2015 14:23 GMT
#13661
I support Acrofales here. I did setup a free EC2 instance for a simple website I did. At least this way you can test your think in an actual production environment. Just remember to select options that are noted as 'eligible for free instance' or something like that. I was running the website for 10 months (tournament registration, news, driving instructions etc.) and in total I had to pay for it $2.30 since the traffic was higher than I expected and I've made a mistake of uploading one really large image by mistake (this one image was like 5MB+ which increases your transfer a lot). I've corrected the mistake as soon as I noticed but still I had to pay up.

Well worth it in my opinion.

If you're working with PHP I really suggest you learn at least the basics of Linux. Stuff like git and composer can make deploying your websites a breeze.
Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19188 Posts
November 28 2015 14:34 GMT
#13662
git and composer both work on Windows too though

If your computer is powerful enough, you can also setup a VM for development and use vagrant. That's super handy.
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17588 Posts
November 28 2015 15:50 GMT
#13663
Thinking some more about it. Why use gpg when it's so troublesome on Windows?

I guess you could simply roll with this one, which is part of PHP core package:
http://php.net/manual/en/function.openssl-public-encrypt.php
Time is precious. Waste it wisely.
phantomfive
Profile Joined April 2010
Korea (South)404 Posts
November 28 2015 18:42 GMT
#13664
The biggest problem I have making a website is the artwork :/
To ease another's heartache is to forget one's own - Lincoln
Manit0u
Profile Blog Joined August 2004
Poland17588 Posts
Last Edited: 2015-11-28 22:28:55
November 28 2015 19:31 GMT
#13665
On November 29 2015 03:42 phantomfive wrote:
The biggest problem I have making a website is the artwork :/


That's why you hire an artist to make all the logos, favicons and other important pictures for you. You also tell them to design proper font, link and button colors for you. All is left for you is simply overriding several variables in Twitter's bootstrap and your page looks amazing.

Also, let me share with you this awesome resource that helped me a lot when I was doing some front-end work:

https://www.google.com/design/spec/material-design/introduction.html#

Really good for anyone interested in UI design. Also helps you realize what stuff you need to think about before designing how the user-facing part of your application is going to look like.
Time is precious. Waste it wisely.
Soap
Profile Blog Joined April 2010
Brazil1546 Posts
November 28 2015 21:20 GMT
#13666
I've been setting up a spare machine as a server. Most recently I couldn't get wake-on-lan to work while connected directly to the router, then I gave up and moved it to a wireless router I'm improvising as a switch, and there it worked. Go figure...
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
November 28 2015 22:24 GMT
#13667
You could use a Raspberry Pi for a very cheap/weak server nowadays. Or an AWS instance.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Acrofales
Profile Joined August 2010
Spain18178 Posts
November 29 2015 01:11 GMT
#13668
On November 29 2015 07:24 WarSame wrote:
You could use a Raspberry Pi for a very cheap/weak server nowadays. Or an AWS instance.

Pi is 100% fine for what most people want to host.you can install raspian and lamp and you're set. Or what we have running: mysql and node. We had couchdb at one point too. Runs like a charm and we do more intensive stuff than most people who aren't already looking at cloud solutions.
Draconicfire
Profile Joined May 2010
Canada2562 Posts
November 29 2015 12:44 GMT
#13669
Hey guys, so I'm trying to write an algorithm to search an image for a specific colour. I have a colour in RGB values that I'm looking for and I can extract pixel values from the image in RGB as well. Initially I just used these and calculated the Euclidean distance but the results weren't too accurate. So I read online that converting RGB into Lab colour space is more accurate as it accounts for human perception a bit better, so I did the conversion but it still doesn't really seem that accurate.

Does anyone have any ideas on how to improve this? I'm not too familiar with colour spaces so I'm at a bit of a loss here.
@Drayxs | Drayxs.221 | Drayxs#1802
Acrofales
Profile Joined August 2010
Spain18178 Posts
November 29 2015 13:30 GMT
#13670
On November 29 2015 21:44 Draconicfire wrote:
Hey guys, so I'm trying to write an algorithm to search an image for a specific colour. I have a colour in RGB values that I'm looking for and I can extract pixel values from the image in RGB as well. Initially I just used these and calculated the Euclidean distance but the results weren't too accurate. So I read online that converting RGB into Lab colour space is more accurate as it accounts for human perception a bit better, so I did the conversion but it still doesn't really seem that accurate.

Does anyone have any ideas on how to improve this? I'm not too familiar with colour spaces so I'm at a bit of a loss here.

Try the last response to this thread: http://stackoverflow.com/questions/6242114/how-much-worse-is-srgb-than-lab-when-computing-the-eucleidan-distance-between
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
Last Edited: 2015-11-29 19:23:00
November 29 2015 19:19 GMT
#13671
Where do all of you go for code review? I'm writing a lot of code in my free time right now, but there's definitely improvements to be made, even if just stylistically. Are there any communities with good, clear feedback on code?

EDIT: Also, about AWS, we got so lucky with it this year. My group for a project was trying to make a video of a Mandelbox which is very intense. We tried to do it on our computers but they couldn't handle it, so we though to try a free AWS instance. At 7 or 8 in the morning after an all nighter. Turns out that we selected the wrong instance and ran up $200 in usage. We explained it in an email about the bill and they let us off free. Thank god, because we had no money to pay that...
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Acrofales
Profile Joined August 2010
Spain18178 Posts
November 29 2015 20:47 GMT
#13672
On November 30 2015 04:19 WarSame wrote:
Where do all of you go for code review? I'm writing a lot of code in my free time right now, but there's definitely improvements to be made, even if just stylistically. Are there any communities with good, clear feedback on code?

EDIT: Also, about AWS, we got so lucky with it this year. My group for a project was trying to make a video of a Mandelbox which is very intense. We tried to do it on our computers but they couldn't handle it, so we though to try a free AWS instance. At 7 or 8 in the morning after an all nighter. Turns out that we selected the wrong instance and ran up $200 in usage. We explained it in an email about the bill and they let us off free. Thank god, because we had no money to pay that...

For anything coding related, your first goto option should almost always be stackexchange...

http://codereview.stackexchange.com/

That reminds me a bit of that guy who was here a few months back with his (somewhat disastrous) university homework project. I wonder if he got let off the hook too. We never heard the end of that story...
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
November 29 2015 21:41 GMT
#13673
That was probably me. We were getting destroyed on that project. It was heading into exam time, so two of the four of us had to split to study for exams. The other 2 of us stayed up until 8 or 9 in the morning one night trying to finish it. We had it working but not generating properly for higher resolutions because it took so long. That's when we thought of using AWS which took forever, especially with us sleep deprived. Eventually I figured it out and felt great about overcoming the struggle until I got hit by the $200 bill.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Soap
Profile Blog Joined April 2010
Brazil1546 Posts
November 29 2015 22:49 GMT
#13674
I think it was this guy:

On July 14 2015 18:48 FFGenerations wrote:
so like 2 months after i tried to host my project on amazon for like 2 hours just trying to see if it would work

they bill me $76 with an additional $10 usage last month and $40 forecast usage for this month

i have no fucking clue what is going on
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
November 30 2015 22:38 GMT
#13675
Just got that job offer from the interview I was talking about earlier. $60k and benefits. It starts in a month and a bit(they hire in waves). Boy, am I excited!
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Birdie
Profile Blog Joined August 2007
New Zealand4438 Posts
November 30 2015 23:29 GMT
#13676
On December 01 2015 07:38 WarSame wrote:
Just got that job offer from the interview I was talking about earlier. $60k and benefits. It starts in a month and a bit(they hire in waves). Boy, am I excited!

Nice job fam! Out of interest, is this a graduate position?
Red classic | A butterfly dreamed he was Zhuangzi | 4.5k, heading to 5k as support!
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
November 30 2015 23:32 GMT
#13677
Depends what you mean by a graduate position. It's a career job, and offers 6 weeks of training before getting placed. Is that what a graduate position is?
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Birdie
Profile Blog Joined August 2007
New Zealand4438 Posts
November 30 2015 23:33 GMT
#13678
On December 01 2015 08:32 WarSame wrote:
Depends what you mean by a graduate position. It's a career job, and offers 6 weeks of training before getting placed. Is that what a graduate position is?

I mean, did you just graduate from university/is it your first programming job.
Red classic | A butterfly dreamed he was Zhuangzi | 4.5k, heading to 5k as support!
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
November 30 2015 23:53 GMT
#13679
Yes! I'm actually 6 months out from graduation now, but it is my first programming job. In the intermission I've been coding for myself and working on a startup with my friend.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
December 02 2015 20:16 GMT
#13680
So I've been at the library 9-6 for today and yesterday preparing for my job. I've run into a snag with Java, and I can't understand the answers I've googled.

I'm creating a generic stack Stack<T extends StackNode<E>, E>, with StackNode<E>. However, I can't declare a new StackNode in my Stack properly. Using
T node = new T(data);
throws an error on the T, saying it can't be instantiated. Google results say this is due to erasure, but not really how to get around it. This seems to be the best answer, but I can't figure out how to apply it to my specific case. Where do I place the function mentioned? Where do I call it from? How do you call it? The comments tried to clear it up but I can't understand those well enough, either.

My current attempt in Stack looks like:


public class Stack<T extends StackNode<E>, E> {
private T top;
private int size;
public Stack(E data){
T node = createContents(T.class, data);
this.top = node;
}
}


and in StackNode:


public class StackNode<E> {
private E data;
private StackNode<E> next;
public E createContents(Class<E> clazz, E data) throws InstantiationException, IllegalAccessException{
return clazz.newInstance();
}
public StackNode(E data){
this.data = data;
this.next = null;
}
}


However, Stack has 2 errors - it can't find CreateContents and it says that T.class is an illegal literal. Further, the "constructor" is only able to call the empty constructor. I think that can be handled by calling another function that sets the value of data, although I'm not sure how to get the value where it needs to be. If anyone can give me advice on how to do this or tell me a better way to do this I'm all ears. Thanks!
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Prev 1 682 683 684 685 686 1032 Next
Please log in or register to reply.
Live Events Refresh
WardiTV Invitational
14:00
Group A
Percival vs RogueLIVE!
Percival vs Classic
ByuN vs Classic
ByuN vs Rogue
Classic vs Rogue
WardiTV1663
TKL 359
IndyStarCraft 215
Rex130
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
TKL 359
IndyStarCraft 215
Rex 130
Railgan 48
SC2Nice 19
StarCraft: Brood War
Britney 42587
Shuttle 2269
Horang2 1727
Mini 1223
Larva 676
Stork 551
ZerO 547
Light 475
Rush 376
Soma 328
[ Show more ]
hero 237
firebathero 169
Zeus 131
Hyun 109
Leta 103
Sharp 103
Last 74
sorry 61
Yoon 49
Mind 39
Free 32
Aegong 31
Movie 25
HiyA 25
Terrorterran 23
Sacsri 13
yabsab 12
Shine 12
GoRush 8
Dota 2
Gorgc6435
qojqva3073
syndereN416
XcaliburYe253
BananaSlamJamma173
ODPixel106
LuMiX1
Counter-Strike
byalli570
Super Smash Bros
Mew2King80
Heroes of the Storm
Khaldor334
Other Games
singsing2419
Liquid`RaSZi1598
B2W.Neo1146
Hui .338
KnowMe113
ZerO(Twitch)25
Organizations
Other Games
EGCTV787
BasetradeTV52
StarCraft: Brood War
Kim Chul Min (afreeca) 13
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• StrangeGG 53
• HeavenSC 24
• Adnapsc2 4
• naamasc21
• LaughNgamezSOOP
• AfreecaTV YouTube
• sooper7s
• intothetv
• Migwel
• Kozan
• IndyKCrew
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 2599
• lizZardDota2103
• HappyZerGling58
League of Legends
• Nemesis4864
• Jankos3322
Upcoming Events
IPSL
4h 22m
DragOn vs Sziky
Replay Cast
17h 22m
Wardi Open
20h 22m
Monday Night Weeklies
1d 1h
WardiTV Invitational
1d 20h
WardiTV Invitational
2 days
The PondCast
3 days
OSC
3 days
OSC
4 days
All Star Teams
5 days
INnoVation vs soO
sOs vs Scarlett
[ Show More ]
uThermal 2v2 Circuit
5 days
All Star Teams
6 days
MMA vs DongRaeGu
Rogue vs Oliveira
Sparkling Tuna Cup
6 days
OSC
6 days
Liquipedia Results

Completed

Proleague 2026-01-10
Big Gabe Cup #3
META Madness #9

Ongoing

C-Race Season 1
IPSL Winter 2025-26
BSL 21 Non-Korean Championship
OSC Championship Season 13
Underdog Cup #3
NA Kuram Kup
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025

Upcoming

CSL 2025 WINTER (S19)
Escore Tournament S1: W4
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Rongyi Cup S3
Thunderfire SC2 All-star 2025
Nations Cup 2026
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
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.