• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 00:01
CEST 06:01
KST 13:01
  • 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 1 - Final Week6[ASL19] Finals Recap: Standing Tall12HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0
Community News
Team TLMC #5 - Submission extension1Firefly given lifetime ban by ESIC following match-fixing investigation17$25,000 Streamerzone StarCraft Pro Series announced7Weekly Cups (June 30 - July 6): Classic Doubles7[BSL20] Non-Korean Championship 4x BSL + 4x China11
StarCraft 2
General
TL Team Map Contest #5: Presented by Monster Energy Team TLMC #5 - Submission extension RSL Revival patreon money discussion thread The GOAT ranking of GOAT rankings Weekly Cups (June 30 - July 6): Classic Doubles
Tourneys
$5,100+ SEL Season 2 Championship (SC: Evo) WardiTV Mondays RSL: Revival, a new crowdfunded tournament series Sparkling Tuna Cup - Weekly Open Tournament FEL Cracov 2025 (July 27) - $8000 live event
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
External Content
Mutation # 482 Wheel of Misfortune Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome
Brood War
General
A cwal.gg Extension - Easily keep track of anyone Flash Announces Hiatus From ASL [Guide] MyStarcraft BW General Discussion [ASL19] Finals Recap: Standing Tall
Tourneys
[BSL20] Non-Korean Championship 4x BSL + 4x China [Megathread] Daily Proleagues 2025 ACS Season 2 Qualifier Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile CCLP - Command & Conquer League Project The PlayStation 5 Nintendo Switch 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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Summer Games Done Quick 2025! Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine The Accidental Video Game Porn Archive
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread [\m/] Heavy Metal Thread
Sports
2024 - 2025 Football Thread Formula 1 Discussion NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Men Take Risks, Women Win Ga…
TrAiDoS
momentary artworks from des…
tankgirl
from making sc maps to makin…
Husyelt
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 596 users

The Big Programming Thread - Page 684

Forum Index > General Forum
Post a Reply
Prev 1 682 683 684 685 686 1031 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
Poland17247 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
Hyrule19035 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
Poland17247 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
Poland17247 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
Spain17975 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
Spain17975 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
Spain17975 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 1031 Next
Please log in or register to reply.
Live Events Refresh
Next event in 6h 59m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nina 230
NeuroSwarm 154
StarCraft: Brood War
Sea 7068
Leta 172
EffOrt 142
NaDa 62
Mind 60
Noble 19
Bale 7
Icarus 4
Dota 2
monkeys_forever709
League of Legends
JimRising 762
febbydoto33
Counter-Strike
Stewie2K1082
Super Smash Bros
hungrybox841
Heroes of the Storm
Khaldor141
Other Games
summit1g18601
shahzam799
WinterStarcraft457
ViBE189
Maynarde186
RuFF_SC2130
ROOTCatZ35
Organizations
Other Games
gamesdonequick5162
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• Berry_CruncH328
• davetesta33
• gosughost_ 23
• practicex 12
• Migwel
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• Doublelift6278
• Rush1762
Other Games
• Scarra1788
Upcoming Events
Wardi Open
6h 59m
Replay Cast
1d 5h
WardiTV European League
1d 11h
ShoWTimE vs sebesdes
Percival vs NightPhoenix
Shameless vs Nicoract
Krystianer vs Scarlett
ByuN vs uThermal
Harstem vs HeRoMaRinE
PiGosaur Monday
1d 19h
uThermal 2v2 Circuit
2 days
Replay Cast
2 days
The PondCast
3 days
Replay Cast
3 days
Epic.LAN
4 days
CranKy Ducklings
5 days
[ Show More ]
Epic.LAN
5 days
BSL20 Non-Korean Champi…
5 days
Bonyth vs Sziky
Dewalt vs Hawk
Hawk vs QiaoGege
Sziky vs Dewalt
Mihu vs Bonyth
Zhanhun vs QiaoGege
QiaoGege vs Fengzi
Sparkling Tuna Cup
6 days
Online Event
6 days
BSL20 Non-Korean Champi…
6 days
Bonyth vs Zhanhun
Dewalt vs Mihu
Hawk vs Sziky
Sziky vs QiaoGege
Mihu vs Hawk
Zhanhun vs Dewalt
Fengzi vs Bonyth
Liquipedia Results

Completed

2025 ACS Season 2: Qualifier
RSL Revival: Season 1
Murky Cup #2

Ongoing

JPL Season 2
BSL 2v2 Season 3
Copa Latinoamericana 4
Jiahua Invitational
BSL20 Non-Korean Championship
Championship of Russia 2025
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters

Upcoming

CSL Xiamen Invitational
CSL Xiamen Invitational: ShowMatche
2025 ACS Season 2
CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
BSL Season 21
K-Championship
RSL Revival: Season 2
SEL Season 2 Championship
uThermal 2v2 Main Event
FEL Cracov 2025
Esports World Cup 2025
Underdog Cup #2
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
IEM Cologne 2025
FISSURE Playground #1
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.