• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 15:18
CET 21:18
KST 05:18
  • 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
RSL Season 3: RO16 results & RO8 bracket12Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge1[TLMC] Fall/Winter 2025 Ladder Map Rotation14Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA12
StarCraft 2
General
RSL Season 3: RO16 results & RO8 bracket SC: Evo Complete - Ranked Ladder OPEN ALPHA RSL Season 3 - Playoffs Preview Mech is the composition that needs teleportation t GM / Master map hacker and general hacking and cheating thread
Tourneys
RSL Revival: Season 3 $5,000+ WardiTV 2025 Championship StarCraft Evolution League (SC Evo Biweekly) Constellation Cup - Main Event - Stellar Fest 2025 RSL Offline Finals Dates + Ticket Sales!
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened
Brood War
General
Data analysis on 70 million replays A cwal.gg Extension - Easily keep track of anyone soO on: FanTaSy's Potential Return to StarCraft [ASL20] Ask the mapmakers — Drop your questions FlaSh on: Biggest Problem With SnOw's Playstyle
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] GosuLeague T1 Ro16 - Tue & Thu 22:00 CET [BSL21] RO16 Tie Breaker - Group B - Sun 21:00 CET
Strategy
Current Meta Game Theory for Starcraft How to stay on top of macro? PvZ map balance
Other Games
General Games
Stormgate/Frost Giant Megathread EVE Corporation Path of Exile [Game] Osu! Should offensive tower rushing be viable in RTS games?
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
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread The Games Industry And ATVI Things Aren’t Peaceful in Palestine About SC2SEA.COM
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread Korean Music Discussion
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
The Health Impact of Joining…
TrAiDoS
Dyadica Evangelium — Chapt…
Hildegard
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2102 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
Poland17448 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
Hyrule19158 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
Poland17448 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
Poland17448 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
Spain18129 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
Spain18129 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
Spain18129 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 11h 13m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Harstem 322
White-Ra 197
IndyStarCraft 133
UpATreeSC 126
SpeCial 92
MindelVK 35
JuggernautJason29
StarCraft: Brood War
Britney 29296
Calm 2703
Dewaltoss 129
Leta 58
HiyA 14
Dota 2
Gorgc5327
Counter-Strike
fl0m1137
pashabiceps1038
ScreaM667
Heroes of the Storm
Liquid`Hasu310
Other Games
Grubby2855
FrodaN1996
B2W.Neo545
DeMusliM391
crisheroes357
XaKoH 262
mouzStarbuck153
Sick133
RotterdaM125
C9.Mang095
Trikslyr46
SteadfastSC24
OptimusSC21
Organizations
Dota 2
PGL Dota 2 - Main Stream14943
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• intothetv
• sooper7s
• Migwel
• AfreecaTV YouTube
• LaughNgamezSOOP
• IndyKCrew
• Kozan
StarCraft: Brood War
• FirePhoenix15
• 80smullet 13
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 2677
• WagamamaTV439
• Ler95
League of Legends
• Nemesis3150
• TFBlade1075
Other Games
• imaqtpie862
• Shiphtur227
Upcoming Events
RSL Revival
11h 13m
Classic vs MaxPax
SHIN vs Reynor
herO vs Maru
WardiTV Korean Royale
15h 43m
SC Evo League
16h 13m
IPSL
20h 43m
Julia vs Artosis
JDConan vs DragOn
OSC
20h 43m
BSL 21
23h 43m
TerrOr vs Aeternum
HBO vs Kyrie
RSL Revival
1d 11h
Wardi Open
1d 17h
IPSL
1d 23h
StRyKeR vs OldBoy
Sziky vs Tarson
BSL 21
1d 23h
StRyKeR vs Artosis
OyAji vs KameZerg
[ Show More ]
OSC
2 days
OSC
2 days
Monday Night Weeklies
2 days
OSC
3 days
Wardi Open
3 days
Replay Cast
4 days
Wardi Open
4 days
Tenacious Turtle Tussle
5 days
The PondCast
5 days
Replay Cast
6 days
LAN Event
6 days
Liquipedia Results

Completed

Proleague 2025-11-16
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
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
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 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.