• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 00:04
CET 06:04
KST 14:04
  • 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
SC2 All-Star Invitational: Jan 17-1818Weekly Cups (Dec 22-28): Classic & MaxPax win, Percival surprises2Weekly Cups (Dec 15-21): Classic wins big, MaxPax & Clem take weeklies3ComeBackTV's documentary on Byun's Career !11Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win4
StarCraft 2
General
SC2 All-Star Invitational: Jan 17-18 Weekly Cups (Dec 22-28): Classic & MaxPax win, Percival surprises Chinese SC2 server to reopen; live all-star event in Hangzhou Starcraft 2 Zerg Coach ComeBackTV's documentary on Byun's Career !
Tourneys
OSC Season 13 World Championship WardiTV Mondays $5,000+ WardiTV 2025 Championship $100 Prize Pool - Winter Warp Gate Masters Showdow Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 506 Warp Zone Mutation # 505 Rise From Ashes Mutation # 504 Retribution Mutation # 503 Fowl Play
Brood War
General
I would like to say something about StarCraft A cwal.gg Extension - Easily keep track of anyone BGH Auto Balance -> http://bghmmr.eu/ (UMS) SWITCHEROO *New* /Destination Edit/ What monitor do you use for playing Remastered?
Tourneys
[BSL21] Non-Korean Championship - Starts Jan 10 [Megathread] Daily Proleagues [BSL21] Grand Finals - Sunday 21:00 CET SLON Grand Finals – Season 2
Strategy
Current Meta [G] How to get started on ladder as a new Z player Fighting Spirit mining rates Simple Questions, Simple Answers
Other Games
General Games
General RTS Discussion Thread Nintendo Switch Thread Awesome Games Done Quick 2026! Stormgate/Frost Giant Megathread Mechabellum
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 Survivor II: The Amazon Sengoku Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Canadian Politics Mega-thread The Games Industry And ATVI 12 Days of Starcraft
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece
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
National Diversity: A Challe…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1203 users

The Big Programming Thread - Page 708

Forum Index > General Forum
Post a Reply
Prev 1 706 707 708 709 710 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.
NovemberstOrm
Profile Blog Joined September 2011
Canada16217 Posts
March 06 2016 08:22 GMT
#14141
On March 05 2016 21:41 Manit0u wrote:
Show nested quote +
On March 05 2016 16:14 NovemberstOrm wrote:
I'm creating an application in VB.net, I need to have a next record/prev record button, I'm using hashtables atm, any ideas?


Can't you just call next() and previous() on a collection?

Show nested quote +
On March 05 2016 20:54 tofucake wrote:
On March 05 2016 13:32 Manit0u wrote:
What do you mean by "text not written in Windows"? I've never had problems with assetic on either Linux or Windows.

Here are some things that might help you:
http://stackoverflow.com/questions/19219578/nginx-and-css-issue

Also: Why Chromium? T_T


.align-go {
transform: translateY(75%);
-webkit-transform: translateY(75%);
}

^ was written in Windows and works. Anything else I type in Arch goes to null.


sendfile off worked though, thanks


Really strange...

In the meantime, I've found another cool article/FAQ on Nginx:
https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/


Thanks I figured it out!
Moderatorlickypiddy
Manit0u
Profile Blog Joined August 2004
Poland17556 Posts
Last Edited: 2016-03-08 12:47:33
March 08 2016 12:45 GMT
#14142
So, I've just got out of a job interview. The test was harder than I thought, since it was a lot about the fundamentals and if you've been working with OOP and high level abstractions for the past 2 years you tend to forget some of the basics. Still, was nice to take it. Here's the PHP part for anyone interested (all of the questions were about the output):

1.

$t = ['one', 'two', 'three'];

echo $t[1][2];


2.

$a = 4;
$b = &$a;
$c = 5;
$a = $c;

echo $b;


3.

function abc() {
return func_get_arg(1);
}

echo abc('a', 'b', 'c');


4.

function f() { }

var_dump(f());


5.

$a = 0;
$b = [];

while (++$a <= 6)
$b[] = $a++;

echo implode($a, $b);


+ Show Spoiler +

The firs one is really evil. I completely forgot about this PHP quirk, where even if you supposedly try to call a multi-dimensinal array index, if element at next-to-last index is a string, it'll treat this string as a char array...
Time is precious. Waste it wisely.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
Last Edited: 2016-03-08 12:58:06
March 08 2016 12:57 GMT
#14143
On March 08 2016 21:45 Manit0u wrote:
So, I've just got out of a job interview. The test was harder than I thought, since it was a lot about the fundamentals and if you've been working with OOP and high level abstractions for the past 2 years you tend to forget some of the basics. Still, was nice to take it. Here's the PHP part for anyone interested (all of the questions were about the output):

+ Show Spoiler +

1.

$t = ['one', 'two', 'three'];

echo $t[1][2];


2.

$a = 4;
$b = &$a;
$c = 5;
$a = $c;

echo $b;


3.

function abc() {
return func_get_arg(1);
}

echo abc('a', 'b', 'c');


4.

function f() { }

var_dump(f());


5.

$a = 0;
$b = [];

while (++$a <= 6)
$b[] = $a++;

echo implode($a, $b);


+ Show Spoiler +

The firs one is really evil. I completely forgot about this PHP quirk, where even if you supposedly try to call a multi-dimensinal array index, if element at next-to-last index is a string, it'll treat this string as a char array...


I probably would have walked out. Those are terrible questions with no real world application. Well, #5 is sort of relevant since such algorithms can easily lead to bugs, but writing code like that is a sin anyways and if I ever see something like that in production, I will strangle the person responsible myself. I hate interview tests that ask for useless trivia instead of actually testing ability.
tofucake
Profile Blog Joined October 2009
Hyrule19186 Posts
March 08 2016 13:30 GMT
#14144
Yeah these are dumb questions :\
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17556 Posts
Last Edited: 2016-03-08 14:41:51
March 08 2016 14:40 GMT
#14145
On March 08 2016 21:57 Morfildur wrote:
Show nested quote +
On March 08 2016 21:45 Manit0u wrote:
So, I've just got out of a job interview. The test was harder than I thought, since it was a lot about the fundamentals and if you've been working with OOP and high level abstractions for the past 2 years you tend to forget some of the basics. Still, was nice to take it. Here's the PHP part for anyone interested (all of the questions were about the output):

+ Show Spoiler +

1.

$t = ['one', 'two', 'three'];

echo $t[1][2];


2.

$a = 4;
$b = &$a;
$c = 5;
$a = $c;

echo $b;


3.

function abc() {
return func_get_arg(1);
}

echo abc('a', 'b', 'c');


4.

function f() { }

var_dump(f());


5.

$a = 0;
$b = [];

while (++$a <= 6)
$b[] = $a++;

echo implode($a, $b);


+ Show Spoiler +

The firs one is really evil. I completely forgot about this PHP quirk, where even if you supposedly try to call a multi-dimensinal array index, if element at next-to-last index is a string, it'll treat this string as a char array...


I probably would have walked out. Those are terrible questions with no real world application. Well, #5 is sort of relevant since such algorithms can easily lead to bugs, but writing code like that is a sin anyways and if I ever see something like that in production, I will strangle the person responsible myself. I hate interview tests that ask for useless trivia instead of actually testing ability.


I thought more of it as "do you know the basics" like how pointers work, what's the default return value of a function, what's the difference between pre- and post- increment etc.

Still, was expecting something completely different since in their offer they stated that 2+ years of experience is a requirement. Came in expecting questions about hydration strategies, event listeners, RESTful service implementations and such. Instead I got this, had to construct a db query with some joins and iterate over DOM elements with jQuery. All very basic stuff.
Time is precious. Waste it wisely.
Cynry
Profile Blog Joined August 2010
810 Posts
March 08 2016 15:45 GMT
#14146
What's roughly your skillset Manit0u ?
I'm seeing a lot of job offers (small missions mostly) going by these days, usually web apps, so if you're into that..
Manit0u
Profile Blog Joined August 2004
Poland17556 Posts
Last Edited: 2016-03-08 16:49:15
March 08 2016 16:41 GMT
#14147
On March 09 2016 00:45 Cynry wrote:
What's roughly your skillset Manit0u ?
I'm seeing a lot of job offers (small missions mostly) going by these days, usually web apps, so if you're into that..


I'm primarily a PHP developer. Used to do a bit of front-end work but for the past 1+ years I've been doing mostly back-end stuff (so it would be advanced PHP and intermediate JavaScript for the most part for me, I also know my way around CSS and HTML but have been a bit out of touch with those lately). If you need help with some smaller projects I believe I could help out, especially that I have a lot more leeway now that I've started my own one-man company and am mostly employed on a b2b basis

I did take part in a multitude of projects. From simple webpage portfolios, Magento- and Sylius-based e-commerce to various ERP solutions (this past year I've been dealing almost exclusively in DMS, QMS, SaaS and the like).
Time is precious. Waste it wisely.
Itsmedudeman
Profile Blog Joined March 2011
United States19229 Posts
March 09 2016 04:18 GMT
#14148
So let's see if I can word my question properly, but when I'm sending data to something like a jsp page from a servlet should I be flattening out that data? For example, I have an object in java that I want to send over but rather than having the jsp page fetch its details through getters should I instead lay it out in a simplified json/xml format?
Manit0u
Profile Blog Joined August 2004
Poland17556 Posts
March 09 2016 13:29 GMT
#14149
Aren't jsp pages parsed by jvm anyway? It doesn't matter what form your data takes there. It's just a matter of displaying it to the user. You should use json and xml as return data from your services to external resources (unless you somehow need them in that format in your view).
Time is precious. Waste it wisely.
Chocolate
Profile Blog Joined December 2010
United States2350 Posts
March 11 2016 08:24 GMT
#14150
The firs one is really evil. I completely forgot about this PHP quirk, where even if you supposedly try to call a multi-dimensinal array index, if element at next-to-last index is a string, it'll treat this string as a char array...


I don't use PHP but that seems like something the compiler should warn you about, shitty interview question though, why should you need to know all of PHP's weird quirks? That could be a career unto itself
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
March 11 2016 09:16 GMT
#14151
On March 11 2016 17:24 Chocolate wrote:
Show nested quote +
The firs one is really evil. I completely forgot about this PHP quirk, where even if you supposedly try to call a multi-dimensinal array index, if element at next-to-last index is a string, it'll treat this string as a char array...


I don't use PHP but that seems like something the compiler should warn you about, shitty interview question though, why should you need to know all of PHP's weird quirks? That could be a career unto itself


Usually such interview questions are the result of "clever" programmers that created a code base based on such quirks, and now they look for someone who understands their "clever" code.

Either way, PHP doesn't warn you about a lot of things, especially if you don't enable all the warning and strict flags, so it's easy for messy code to end up working by random chance. JavaScript might have a reputation as a terrible language - in my opinion unfounded -, but I much rather develop Node.js applications than PHP. PHP has too many quirks that just annoy me all the time.
iaretehnoob
Profile Joined June 2004
Sweden741 Posts
March 11 2016 13:18 GMT
#14152
I don't think "strings are character arrays" qualifies as a quirk.
tofucake
Profile Blog Joined October 2009
Hyrule19186 Posts
March 11 2016 13:44 GMT
#14153
On March 11 2016 18:16 Morfildur wrote:
Show nested quote +
On March 11 2016 17:24 Chocolate wrote:
The firs one is really evil. I completely forgot about this PHP quirk, where even if you supposedly try to call a multi-dimensinal array index, if element at next-to-last index is a string, it'll treat this string as a char array...


I don't use PHP but that seems like something the compiler should warn you about, shitty interview question though, why should you need to know all of PHP's weird quirks? That could be a career unto itself


Usually such interview questions are the result of "clever" programmers that created a code base based on such quirks, and now they look for someone who understands their "clever" code.

Either way, PHP doesn't warn you about a lot of things, especially if you don't enable all the warning and strict flags, so it's easy for messy code to end up working by random chance. JavaScript might have a reputation as a terrible language - in my opinion unfounded -, but I much rather develop Node.js applications than PHP. PHP has too many quirks that just annoy me all the time.

most of the quirks have been worked out of the language as of 7, and plenty of the remaining ones are going to be removed soon anyway.
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17556 Posts
Last Edited: 2016-03-11 14:49:09
March 11 2016 14:28 GMT
#14154
On March 11 2016 22:18 iaretehnoob wrote:
I don't think "strings are character arrays" qualifies as a quirk.


Well, it's all because most of the basic PHP functionality depends on the underlying C stuff (in which strings are character arrays). It's also why some of the functions behave differently on different platforms (and some of them simply don't work at all on Windows for example).

Usually, when you see something like that:

$arr = ['one', 'two', 'three'];

echo $arr[1][2];


You'd expect it to throw an undefined index, while in fact it'll return 'o'.

It's dumb, but it's there and some people even use those quirks to save a couple of lines of code here and there. It's really bad practice in my opinion and borders on code obfuscation.

As for me, I'm always trying to use Python's philosophy of explicit > implicit (including trying to avoid pre- and post- incrementation). Even if I often have to write more code because of that I'm usually glad I did when I come back to it after a couple of months.

On March 11 2016 22:44 tofucake wrote:
most of the quirks have been worked out of the language as of 7, and plenty of the remaining ones are going to be removed soon anyway.


I think there'll still be plenty of wrong with PHP until Zend won't change their philosophy of "PHP is not for programmers" and finally decide to:
1. unify function names (2 vs to etc.)
2. reduce the number of built-in functions (there's too much, and plenty of useless stuff. I mean, just check this out)
3. enforce writing secure and stable apps (removing eval, getting rid of php config files etc.)
4. unify function argument sequence (they swap it around for seemingly very similar functions, I can never remember all the search function's needle and haystack arguments order).
Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19186 Posts
March 11 2016 14:42 GMT
#14155
There's a bunch of RFCs now about unifying function arguments. One I'm especially happy about is to allow negative offsets in all the string functions.
Liquipediaasante sana squash banana
Cyx.
Profile Joined November 2010
Canada806 Posts
March 11 2016 16:13 GMT
#14156
On March 11 2016 23:28 Manit0u wrote:
Show nested quote +
On March 11 2016 22:18 iaretehnoob wrote:
I don't think "strings are character arrays" qualifies as a quirk.


Usually, when you see something like that:

$arr = ['one', 'two', 'three'];

echo $arr[1][2];


You'd expect it to throw an undefined index, while in fact it'll return 'o'.


I think what he's saying is that he *wouldn't* expect that to throw an undefined index, but instead to return the 3rd character of the 2nd string, which is what it does... I agree that treating strings as char arrays isn't weird at all, at least to me. (Not really trying to defend PHP here - just a comment )
Manit0u
Profile Blog Joined August 2004
Poland17556 Posts
March 11 2016 17:50 GMT
#14157
On March 12 2016 01:13 Cyx. wrote:
Show nested quote +
On March 11 2016 23:28 Manit0u wrote:
On March 11 2016 22:18 iaretehnoob wrote:
I don't think "strings are character arrays" qualifies as a quirk.


Usually, when you see something like that:

$arr = ['one', 'two', 'three'];

echo $arr[1][2];


You'd expect it to throw an undefined index, while in fact it'll return 'o'.


I think what he's saying is that he *wouldn't* expect that to throw an undefined index, but instead to return the 3rd character of the 2nd string, which is what it does... I agree that treating strings as char arrays isn't weird at all, at least to me. (Not really trying to defend PHP here - just a comment )


I'm not saying treating strings as char arrays is bad, but the fact that people do such things as in the example is preposterous in my eyes since it can lead to a metric ton of hard to find bugs.
Time is precious. Waste it wisely.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
March 11 2016 18:04 GMT
#14158
On March 12 2016 02:50 Manit0u wrote:
Show nested quote +
On March 12 2016 01:13 Cyx. wrote:
On March 11 2016 23:28 Manit0u wrote:
On March 11 2016 22:18 iaretehnoob wrote:
I don't think "strings are character arrays" qualifies as a quirk.


Usually, when you see something like that:

$arr = ['one', 'two', 'three'];

echo $arr[1][2];


You'd expect it to throw an undefined index, while in fact it'll return 'o'.


I think what he's saying is that he *wouldn't* expect that to throw an undefined index, but instead to return the 3rd character of the 2nd string, which is what it does... I agree that treating strings as char arrays isn't weird at all, at least to me. (Not really trying to defend PHP here - just a comment )


I'm not saying treating strings as char arrays is bad, but the fact that people do such things as in the example is preposterous in my eyes since it can lead to a metric ton of hard to find bugs.


Treating strings as string arrays is fun:

<?
$x = "abcd";
echo $x[0][0][0][0][0][0][0][0][0][0][0]; // a
Manit0u
Profile Blog Joined August 2004
Poland17556 Posts
March 11 2016 18:07 GMT
#14159
On March 12 2016 03:04 Morfildur wrote:
Show nested quote +
On March 12 2016 02:50 Manit0u wrote:
On March 12 2016 01:13 Cyx. wrote:
On March 11 2016 23:28 Manit0u wrote:
On March 11 2016 22:18 iaretehnoob wrote:
I don't think "strings are character arrays" qualifies as a quirk.


Usually, when you see something like that:

$arr = ['one', 'two', 'three'];

echo $arr[1][2];


You'd expect it to throw an undefined index, while in fact it'll return 'o'.


I think what he's saying is that he *wouldn't* expect that to throw an undefined index, but instead to return the 3rd character of the 2nd string, which is what it does... I agree that treating strings as char arrays isn't weird at all, at least to me. (Not really trying to defend PHP here - just a comment )


I'm not saying treating strings as char arrays is bad, but the fact that people do such things as in the example is preposterous in my eyes since it can lead to a metric ton of hard to find bugs.


Treating strings as string arrays is fun:

<?
$x = "abcd";
echo $x[0][0][0][0][0][0][0][0][0][0][0]; // a


What?! I don't even...
Time is precious. Waste it wisely.
madnessman
Profile Blog Joined May 2009
United States1581 Posts
March 11 2016 18:17 GMT
#14160
Has anybody had any success here writing an SC:BW AI which doesn't just execute a few hard coded strategies? I've finished my courses in AI and machine learning and I'm thinking about writing a BW AI to compete in the CIG AI competition this year. I found a few papers where researchers tried to implement more sophisticated methods but those bots didn't fare too well against the other competitive bots.
Prev 1 706 707 708 709 710 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 7h 56m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 245
Ketroc 48
StarCraft: Brood War
Leta 344
Shuttle 103
Snow 99
ZergMaN 93
Noble 32
Bale 11
Icarus 8
Dota 2
NeuroSwarm104
LuMiX1
League of Legends
JimRising 833
C9.Mang0528
Counter-Strike
summit1g8135
m0e_tv451
minikerr29
Heroes of the Storm
Khaldor118
Other Games
ViBE182
Organizations
Other Games
BasetradeTV87
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 20 non-featured ]
StarCraft 2
• Berry_CruncH211
• Hupsaiya 96
• practicex 14
• Kozan
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• IndyKCrew
StarCraft: Brood War
• RayReign 150
• HerbMon 4
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota22448
League of Legends
• Lourlo852
• Stunt378
Other Games
• Scarra2066
• Shiphtur156
Upcoming Events
OSC
7h 56m
Korean StarCraft League
21h 56m
OSC
1d 6h
IPSL
1d 8h
Dewalt vs Bonyth
OSC
1d 12h
OSC
2 days
uThermal 2v2 Circuit
2 days
Replay Cast
3 days
Patches Events
3 days
Liquipedia Results

Completed

C-Race Season 1
WardiTV 2025
META Madness #9

Ongoing

IPSL Winter 2025-26
BSL Season 21
Slon Tour Season 2
CSL Season 19: Qualifier 2
Escore Tournament S1: W2
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: W3
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Thunderfire SC2 All-star 2025
Big Gabe Cup #3
OSC Championship Season 13
Nations Cup 2026
Underdog Cup #3
NA Kuram Kup
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.