• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 21:17
CET 03:17
KST 11:17
  • 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
SC2 All-Star Invitational: Tournament Preview5RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2
Community News
Weekly Cups (Jan 12-18): herO, MaxPax, Solar win0BSL Season 2025 - Full Overview and Conclusion6Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets4$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)16Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns7
StarCraft 2
General
When will we find out if there are more tournament PhD study /w SC2 - help with a survey! Weekly Cups (Jan 12-18): herO, MaxPax, Solar win I am looking for StarCraft 2 Beta Patch files Stellar Fest "01" Jersey Charity Auction
Tourneys
$70 Prize Pool Ladder Legends Academy Weekly Open! SC2 All-Star Invitational: Jan 17-18 Sparkling Tuna Cup - Weekly Open Tournament SC2 AI Tournament 2026 $21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)
Strategy
Simple Questions Simple Answers
Custom Maps
Map Editor closed ?
External Content
Mutation # 509 Doomsday Report Mutation # 508 Violent Night Mutation # 507 Well Trained Mutation # 506 Warp Zone
Brood War
General
Gypsy to Korea [ASL21] Potential Map Candidates Video Footage from 2005: The Birth of G2 in Spain BW General Discussion BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[Megathread] Daily Proleagues [BSL21] Non-Korean Championship - Starts Jan 10 Small VOD Thread 2.0 Azhi's Colosseum - Season 2
Strategy
Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2 Game Theory for Starcraft Current Meta
Other Games
General Games
Nintendo Switch Thread Battle Aces/David Kim RTS Megathread Stormgate/Frost Giant Megathread Beyond All Reason Awesome Games Done Quick 2026!
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 Russo-Ukrainian War Thread NASA and the Private Sector Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread
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
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Navigating the Risks and Rew…
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
James Bond movies ranking - pa…
Topin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1163 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
Poland17612 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
Hyrule19189 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
Poland17612 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
Poland17612 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
Spain18193 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
Spain18193 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
Spain18193 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
Next event in 8h 43m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft519
Nathanias 91
StarCraft: Brood War
GuemChi 1141
Sharp 230
Shuttle 96
HiyA 84
Stormgate
Artosis846
Dota 2
monkeys_forever208
febbydoto15
NeuroSwarm5
League of Legends
C9.Mang0533
Counter-Strike
fl0m1297
taco 349
m0e_tv211
Foxcn186
Coldzera 6
Other Games
summit1g6027
JimRising 461
XaKoH 322
Day[9].tv243
Maynarde161
minikerr28
ZombieGrub24
Liquid`Ken5
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• Hupsaiya 93
• HeavenSC 28
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• Migwel
• IndyKCrew
• LaughNgamezSOOP
• Laughngamez YouTube
StarCraft: Brood War
• Mapu5
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21418
League of Legends
• Scarra1977
Other Games
• Day9tv243
Upcoming Events
OSC
8h 43m
Shameless vs MaNa
Nicoract vs Percival
Krystianer vs TBD
Cure vs SHIN
PiGosaur Monday
22h 43m
The PondCast
1d 7h
OSC
1d 8h
Big Brain Bouts
3 days
Serral vs TBD
BSL 21
4 days
BSL 21
5 days
Wardi Open
6 days
Monday Night Weeklies
6 days
Liquipedia Results

Completed

IPSL Winter 2025-26
SC2 All-Star Inv. 2025
NA Kuram Kup

Ongoing

C-Race Season 1
BSL 21 Non-Korean Championship
CSL 2025 WINTER (S19)
KCM Race Survival 2026 Season 1
OSC Championship Season 13
Underdog Cup #3
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025

Upcoming

Escore Tournament S1: W5
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Rongyi Cup S3
Nations Cup 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
IEM Kraków 2026
BLAST Bounty Winter 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.