• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 05:39
CEST 11:39
KST 18: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
TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
Chinese SC2 server to reopen; live all-star event in Hangzhou16Weekly Cups (Oct 13-19): Clem Goes for Four0BSL Team A vs Koreans - Sat-Sun 16:00 CET6Weekly Cups (Oct 6-12): Four star herO85.0.15 Patch Balance Hotfix (2025-10-8)80
StarCraft 2
General
Chinese SC2 server to reopen; live all-star event in Hangzhou RotterdaM "Serral is the GOAT, and it's not close" Weekly Cups (March 17-23): Clem Bounces Back DreamHack Open 2013 revealed The New Patch Killed Mech!
Tourneys
$1,200 WardiTV October (Oct 21st-31st) SC2's Safe House 2 - October 18 & 19 INu's Battles #13 - ByuN vs Zoun Tenacious Turtle Tussle Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers
Brood War
General
Is there anyway to get a private coach? BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ BSL Season 21 OGN to release AI-upscaled StarLeague from Feb 24
Tourneys
300$ 3D!Community Brood War Super Cup #4 [ASL20] Semifinal B Azhi's Colosseum - Anonymous Tournament [Megathread] Daily Proleagues
Strategy
Current Meta Roaring Currents ASL final [I] Funny Protoss Builds/Strategies BW - ajfirecracker Strategy & Training
Other Games
General Games
Path of Exile Nintendo Switch Thread Stormgate/Frost Giant Megathread Dawn of War IV ZeroSpace Megathread
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
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
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine The Chess Thread Russo-Ukrainian War Thread Men's Fashion Thread
Fan Clubs
The herO Fan Club!
Media & Entertainment
Anime Discussion Thread Series you have seen recently... [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 MLB/Baseball 2023 Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Our Last Hope in th…
KrillinFromwales
Certified Crazy
Hildegard
The Heroism of Pepe the Fro…
Peanutsc
Rocket League: Traits, Abili…
TrAiDoS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1093 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
Poland17389 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
Hyrule19144 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
Poland17389 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
Poland17389 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
Spain18095 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
Spain18095 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
Spain18095 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 21m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
OGKoka 205
SortOf 168
mcanning 63
StarCraft: Brood War
hero 1802
Flash 732
firebathero 417
GuemChi 359
Killer 339
Leta 259
Mini 188
Hyun 182
PianO 142
Soma 126
[ Show more ]
ZerO 107
ToSsGirL 76
Aegong 29
Free 25
Sacsri 15
Sharp 15
Rush 7
Bale 5
Mong 1
Dota 2
XaKoH 401
XcaliburYe169
canceldota73
League of Legends
JimRising 578
Counter-Strike
olofmeister1468
shoxiejesuss770
Stewie2K299
Other Games
summit1g7647
singsing798
ceh9571
B2W.Neo380
Hui .150
Mew2King56
Trikslyr13
ZerO(Twitch)6
Organizations
Other Games
gamesdonequick612
Counter-Strike
PGL270
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• LUISG 30
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• iopq 0
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV507
League of Legends
• Jankos1812
• Lourlo755
Upcoming Events
Replay Cast
21m
OSC
6h 21m
Tenacious Turtle Tussle
13h 21m
The PondCast
1d
OSC
1d 2h
WardiTV Invitational
2 days
Online Event
2 days
RSL Revival
2 days
RSL Revival
3 days
WardiTV Invitational
3 days
[ Show More ]
Afreeca Starleague
3 days
Snow vs Soma
Sparkling Tuna Cup
4 days
WardiTV Invitational
4 days
CrankTV Team League
4 days
RSL Revival
4 days
Wardi Open
5 days
CrankTV Team League
5 days
Replay Cast
6 days
WardiTV Invitational
6 days
CrankTV Team League
6 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
EC S1
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
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

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
BSL 21 Non-Korean Championship
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
CranK Gathers Season 2: SC II Pro Teams
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 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.