• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 08:24
CEST 14:24
KST 21:24
  • 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
[ASL19] Finals Recap: Standing Tall2HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Flash Announces Retirement From ASL18Weekly Cups (June 23-29): Reynor in world title form?12FEL Cracov 2025 (July 27) - $8000 live event16Esports World Cup 2025 - Final Player Roster14Weekly Cups (June 16-22): Clem strikes back1
StarCraft 2
General
The SCII GOAT: A statistical Evaluation What is Lactobacillus used for? Weekly Cups (June 23-29): Reynor in world title form? StarCraft Mass Recall: SC1 campaigns on SC2 thread How does the number of casters affect your enjoyment of esports?
Tourneys
FEL Cracov 2025 (July 27) - $8000 live event HomeStory Cup 27 (June 27-29) WardiTV Mondays SOOPer7s Showmatches 2025 $200 Biweekly - StarCraft Evolution League #1
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma Mutation # 477 Slow and Steady
Brood War
General
[ASL19] Finals Recap: Standing Tall Flash Announces Retirement From ASL ASL20 Preliminary Maps BW General Discussion BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[Megathread] Daily Proleagues [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET The Casual Games of the Week Thread [BSL20] ProLeague LB Final - Saturday 20:00 CET
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile What do you want from future RTS games? Beyond All Reason
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 Trading/Investing Thread Things Aren’t Peaceful in Palestine Stop Killing Games - European Citizens Initiative Russo-Ukrainian War Thread
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread Korean Music Discussion
Sports
2024 - 2025 Football Thread NBA General Discussion Formula 1 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
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
Game Sound vs. Music: The Im…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 684 users

The Big Programming Thread - Page 704

Forum Index > General Forum
Post a Reply
Prev 1 702 703 704 705 706 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.
Cyx.
Profile Joined November 2010
Canada806 Posts
Last Edited: 2016-01-28 04:10:46
January 28 2016 02:29 GMT
#14061
On January 28 2016 10:22 Shield wrote:
Show nested quote +
On January 28 2016 10:14 Cyx. wrote:
ugh... moved to vs2015 at work last week, and it takes siginificantly more memory to link... and since we statically link LIKE FUCKING EVERYTHING in this place linking some of our exes takes over 15 minutes now, consuming 5.5GB of memory in the process. Oh well, at least it gets people talking about using DLLs for some of our shit...


Is it Visual Studio really? What more is it doing then?

I'm a bit fuzzy on the exact details (someone described it to me earlier today) but it involves the PDB generation, as well as the /profile option to the linker. First problem is PDB generation requires a fair bit more memory for statically linked libraries, don't ask me why - don't ask me why we link so much shit statically either, I just work here. Second problem is that the /profile option to link.exe (which our dev build has turned on by default) triggers full PDB generation now (or something close to it), which it didn't do before.

So we would be fine with just turning off profiling, which most devs have been doing - unfortunately I kind of needed to debug one of our bigger exes over the last few days and I also have a couple VMs running most of the time, so every build is taking up ~6GB, my VMs take up ~8GB, and I have around 2GB left for Emacs, Chrome, my IMs, ... my workstation basically shuts down every time I need to rebuild.

EDIT: all this not to mention I have to pipe my build to "grep -v \(warning\|note\)" in order to see any sort of progress messages...
tofucake
Profile Blog Joined October 2009
Hyrule19029 Posts
January 29 2016 14:51 GMT
#14062
Our new project is pretty nice so far. Symfony 3 on PHP7 + nginx, and it's blazing fast. Getting all the assets installed was tricky since all the docs are still basically written for Symfony 2, but we got it working. AdminLTE is beautiful too :D
Liquipediaasante sana squash banana
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
January 30 2016 01:55 GMT
#14063
--- Nuked ---
Manit0u
Profile Blog Joined August 2004
Poland17242 Posts
January 30 2016 02:02 GMT
#14064
On January 30 2016 10:55 Nesserev wrote:
Does anyone know any resources to pick up Java quickly and thoroughly?
My background is mostly C++ and Python.


Thinking in Java is actually a pretty good book if you're able to ignore all of the "Java teh bestest thing in the world!" propaganda in it.
Time is precious. Waste it wisely.
Manit0u
Profile Blog Joined August 2004
Poland17242 Posts
February 06 2016 02:09 GMT
#14065
Oh man, trying to install php7 running in fcgi mode while using xampp on win7 blows
Time is precious. Waste it wisely.
Nyxisto
Profile Joined August 2010
Germany6287 Posts
Last Edited: 2016-02-06 02:32:10
February 06 2016 02:24 GMT
#14066
On January 30 2016 10:55 Nesserev wrote:
Does anyone know any resources to pick up Java quickly and thoroughly?
My background is mostly C++ and Python.


If you can read German Java ist auch eine Insel is what we used in university and I think it's the go-to book nowadays in German universities. The online version is also free. I doubt that quickly and thoroughly is possible though
Civil
Profile Joined May 2008
United States9 Posts
Last Edited: 2016-02-06 03:12:17
February 06 2016 03:11 GMT
#14067
Does anyone know any resources to pick up Java quickly and thoroughly?
My background is mostly C++ and Python.


My vote is Effective Java. One of my favorite books on Java.
http://www.amazon.com/Effective-Java-Edition-Joshua-Bloch/dp/0321356683
tofucake
Profile Blog Joined October 2009
Hyrule19029 Posts
February 06 2016 03:37 GMT
#14068
On February 06 2016 11:09 Manit0u wrote:
Oh man, trying to install php7 running in fcgi mode while using xampp on win7 blows

I found it easier to provision a vagrant box than to try to setup php7/xampp on windows.
Liquipediaasante sana squash banana
Thaniri
Profile Blog Joined March 2011
1264 Posts
February 06 2016 04:29 GMT
#14069
https://parse.com/docs/js/guide

Found Sean Plott while googling javascript stuff. And Dario Wunsch, Jonathan Walsh, Shawn Simon among others.
vik7
Profile Joined May 2009
United States227 Posts
February 06 2016 05:34 GMT
#14070
Hey I never really posted on this thread before, I'm just wondering If I could find a mentor or something I've been learning Java, yes I watch videos and read about java, and practice, however hopefully I can find a mentor I can skype here and there with questions =D
NA player, go KT Flash, ST Life( ;( ) , IMMvp, EGJD, CMStorm Polt, SKT Rain, KT Zest, Bisu, RootherO, Stats and teamliqiud
AKnopf
Profile Blog Joined March 2011
Germany259 Posts
February 06 2016 07:09 GMT
#14071
On February 06 2016 13:29 Thaniri wrote:
https://parse.com/docs/js/guide

Found Sean Plott while googling javascript stuff. And Dario Wunsch, Jonathan Walsh, Shawn Simon among others.


Haha, I love it when people sneak in there nerdy little interests in coding examples. Good find!

I use the numbers 42 (The Hitchhiker’s Guide to the Galaxy) and 4711 (cologne beer) as example integers.
The world - its a funny place
hooktits
Profile Blog Joined February 2008
United States972 Posts
February 09 2016 09:18 GMT
#14072
I know this question has been asked probably countless times, however i can't find the right search criteria on google to get the answer i need. I'm trying to figure out how to show the difference between 2 times in php ( i know javascript would be ideal but for this project of mine its php only) So What i'm trying to accomplish is find the difference between current time and 12 PM or 12 noon EST, and then just echo it out in the header " You have X Hours X Minutes and X seconds left" and if some one is viewing the page they get a reminder how much time is left when page is refreshed.

If you could please put the answer in procedural code
after the timer runs out of time (if some one refreshes the page)
I want to then have it say a message for the next hour, lets say between 12pm est and 1pm est it says
for example "time is up"

Then the timer resets and returns to showing

"You have X Hours X Minutes and X seconds left"

again after it reaches 1pm est and starts the process over again.

I have been at this for almost 2 hrs because i don't want to accept defeat but its getting late and i gotta go to work tom so i'm sure this is super easy for some one who has more experience then me.
Thanks
Hooktits of Tits gaming @hooktits twit
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
February 09 2016 09:36 GMT
#14073
On February 09 2016 18:18 hooktits wrote:
I know this question has been asked probably countless times, however i can't find the right search criteria on google to get the answer i need. I'm trying to figure out how to show the difference between 2 times in php ( i know javascript would be ideal but for this project of mine its php only) So What i'm trying to accomplish is find the difference between current time and 12 PM or 12 noon EST, and then just echo it out in the header " You have X Hours X Minutes and X seconds left" and if some one is viewing the page they get a reminder how much time is left when page is refreshed.

If you could please put the answer in procedural code
after the timer runs out of time (if some one refreshes the page)
I want to then have it say a message for the next hour, lets say between 12pm est and 1pm est it says
for example "time is up"

Then the timer resets and returns to showing

"You have X Hours X Minutes and X seconds left"

again after it reaches 1pm est and starts the process over again.

I have been at this for almost 2 hrs because i don't want to accept defeat but its getting late and i gotta go to work tom so i'm sure this is super easy for some one who has more experience then me.
Thanks



$now = strtotime("now UTC");
$target = strtotime("today UTC + 1 day"); // alternatively "today EST" and "now EST" above
$difference = $target - $now;
$hours = floor($difference / 3600);
$minutes = ($difference / 60) % 60;
$seconds = $difference % 60;

Manit0u
Profile Blog Joined August 2004
Poland17242 Posts
Last Edited: 2016-02-10 08:43:58
February 10 2016 08:11 GMT
#14074
Just in case you'd want to format the numbers (like outputting them with leading zeros) you can do it like that:


$readable_difference = [
sprintf('%1$02d', floor($difference / 3600)),
sprintf('%1$02d', ($difference / 60) % 60),
sprintf('%1$02d', $difference % 60),
];

echo 'Time left: ' . implode(':', $readable_difference);


Edit:

The client just stabbed me in the heart. They've changed stuff at their servers and logic of storing some voip files on their server. They're stored as .wav until 11PM, at which point they're converted to .mp3. This required some stupid ifology to let them save/download correct files (and I'm still not sure it's 100% correct):


$fileDate = substr($fileName, 0, 8);
$fileTime = substr($fileName, 9, 6);

$ymd = [
substr($fileDate, 0, 4),
substr($fileDate, 5, 2),
substr($fileDate, 6, 2),
];

$hms = [
substr($fileTime, 0, 2),
substr($fileTime, 3, 2),
substr($fileTime, 5, 2),
];

$fileTimestamp = strtotime(implode('-', $ymd) . ' ' . implode(':', $hms));
$yesterdayTimestamp = strtotime('yesterday +23 hours');
$todayTimestamp = strtotime('today + 23 hours');

if ($fileTimestamp < $yesterdayTimestamp) {
$extension = '.mp3';
} else {
$extension = ($fileTimestamp > $yesterdayTimestamp && $fileTimestamp < $todayTimestamp) ? '.wav' : '.mp3';
}
Time is precious. Waste it wisely.
netherh
Profile Blog Joined November 2011
United Kingdom333 Posts
February 10 2016 20:05 GMT
#14075
On February 10 2016 17:11 Manit0u wrote:

The client just stabbed me in the heart. They've changed stuff at their servers and logic of storing some voip files on their server. They're stored as .wav until 11PM, at which point they're converted to .mp3. This required some stupid ifology to let them save/download correct files (and I'm still not sure it's 100% correct):


If you're keeping file name, date and time around, can't you store the format too?
tofucake
Profile Blog Joined October 2009
Hyrule19029 Posts
February 10 2016 20:32 GMT
#14076
Uh...probably simpler to just use DateTime object
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17242 Posts
Last Edited: 2016-02-10 22:23:18
February 10 2016 22:15 GMT
#14077
On February 11 2016 05:05 netherh wrote:
Show nested quote +
On February 10 2016 17:11 Manit0u wrote:

The client just stabbed me in the heart. They've changed stuff at their servers and logic of storing some voip files on their server. They're stored as .wav until 11PM, at which point they're converted to .mp3. This required some stupid ifology to let them save/download correct files (and I'm still not sure it's 100% correct):


If you're keeping file name, date and time around, can't you store the format too?


Date and time are stored within the filename...

The heart of the problem:

- for the past 5 years all files were stored as .wav
- user-related filenames are stored in the db
- all filenames in the db are added when the file is created, this includes the .wav extension

I've had to choose between changing how filenames are stored in the db (without extension) and updating 5 years worth of records or dynamically switching file extension based on timestamps.

On February 11 2016 05:32 tofucake wrote:
Uh...probably simpler to just use DateTime object


Not really, I'd have to create multiple DateTime objects, then use ->diff on them and then calculate stuff.

The easiest way to do it would be this:


$filenameWithoutExtension = pathinfo($file, PATHINFO_FILENAME);

$extension = ftp_size($ftpStream, $filenameWithoutExtension . '.wav') > 0 ? '.wav' : '.mp3';
// might add another line here to test if mp3 actually exists (returns > 0 and not -1) just to be sure


Figured it out way too late... Will still do it this way as this makes the code immune to random time of file conversion to another format server-side.
Time is precious. Waste it wisely.
hooktits
Profile Blog Joined February 2008
United States972 Posts
February 11 2016 07:57 GMT
#14078
Thanks a lot for all your answers, To the timer question, i got it solved and it works perfectly and i also better understand how it works thanks to your replies, so thanks for all the feed back... (Morfildur, Manit0u, and any one else that helped or is going to help in the future.)
One more question?

1. i'm currently using XAMPP to test my site. I'm curious is there some kind testing server where i can test my code on a linux based server. (reason being, there is a php extension i wanna experiment with and its gunna be a while till i will have access to the final server to test on (which will be linux based). However the php extension i wanna play with only works on linux based server.(It won't work testing on xampp) So i looked up something called LAMP dunno if i can run it on my windows computer(or maybe it just plain sucks really bad, i have no experience with it so i dunno) or i would i have to use virtual box or vmware or something like that or again are there any other options other then lamp, just want a simple easy to use linux based testing server so i can test a php extension that only works on linux.?? what are my options?
Hooktits of Tits gaming @hooktits twit
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
February 11 2016 08:48 GMT
#14079
On February 11 2016 16:57 hooktits wrote:
Thanks a lot for all your answers, To the timer question, i got it solved and it works perfectly and i also better understand how it works thanks to your replies, so thanks for all the feed back... (Morfildur, Manit0u, and any one else that helped or is going to help in the future.)
One more question?

1. i'm currently using XAMPP to test my site. I'm curious is there some kind testing server where i can test my code on a linux based server. (reason being, there is a php extension i wanna experiment with and its gunna be a while till i will have access to the final server to test on (which will be linux based). However the php extension i wanna play with only works on linux based server.(It won't work testing on xampp) So i looked up something called LAMP dunno if i can run it on my windows computer(or maybe it just plain sucks really bad, i have no experience with it so i dunno) or i would i have to use virtual box or vmware or something like that or again are there any other options other then lamp, just want a simple easy to use linux based testing server so i can test a php extension that only works on linux.?? what are my options?


I would recommend setting up a virtualbox. There are already pre-configured boxes available that you just have to download and run. Quick google resulted in a good selection of boxes.

Alternatively you can rent a vhost for a few bucks a month, which allows you to also have your projects available to others.
Manit0u
Profile Blog Joined August 2004
Poland17242 Posts
February 11 2016 10:03 GMT
#14080
On February 11 2016 16:57 hooktits wrote:
Thanks a lot for all your answers, To the timer question, i got it solved and it works perfectly and i also better understand how it works thanks to your replies, so thanks for all the feed back... (Morfildur, Manit0u, and any one else that helped or is going to help in the future.)
One more question?

1. i'm currently using XAMPP to test my site. I'm curious is there some kind testing server where i can test my code on a linux based server. (reason being, there is a php extension i wanna experiment with and its gunna be a while till i will have access to the final server to test on (which will be linux based). However the php extension i wanna play with only works on linux based server.(It won't work testing on xampp) So i looked up something called LAMP dunno if i can run it on my windows computer(or maybe it just plain sucks really bad, i have no experience with it so i dunno) or i would i have to use virtual box or vmware or something like that or again are there any other options other then lamp, just want a simple easy to use linux based testing server so i can test a php extension that only works on linux.?? what are my options?


Also, LAMP stands for Linux Apache MySQL PHP, it's just an acronym for OS and programs
Time is precious. Waste it wisely.
Prev 1 702 703 704 705 706 1031 Next
Please log in or register to reply.
Live Events Refresh
Next event in 3h 36m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Harstem 294
RotterdaM 244
EnDerr 32
ForJumy 21
StarCraft: Brood War
Rain 6094
Sea 4705
Larva 600
EffOrt 532
Mini 455
Pusan 343
BeSt 311
Stork 290
Zeus 262
Last 193
[ Show more ]
Snow 148
Mind 142
ZerO 122
Hyun 112
Rush 87
Light 66
hero 63
JYJ46
Aegong 43
Movie 29
Sharp 23
NaDa 18
sSak 14
Noble 12
Barracks 10
ajuk12(nOOB) 10
scan(afreeca) 9
IntoTheRainbow 8
Icarus 7
SilentControl 7
HiyA 6
Hm[arnc] 3
Britney 0
Stormgate
NightEnD11
Dota 2
Gorgc4210
qojqva1549
BananaSlamJamma537
XcaliburYe421
febbydoto6
League of Legends
singsing2123
Counter-Strike
x6flipin599
markeloff54
Super Smash Bros
Mew2King160
Westballz12
Heroes of the Storm
Khaldor178
Other Games
B2W.Neo740
DeMusliM501
Fuzer 474
hiko260
Pyrionflax252
XaKoH 251
crisheroes215
SortOf93
ArmadaUGS41
ZerO(Twitch)7
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• StrangeGG 40
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 2
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 1178
Upcoming Events
uThermal 2v2 Circuit
3h 36m
OSC
6h 36m
Replay Cast
11h 36m
The PondCast
21h 36m
RSL Revival
21h 36m
ByuN vs Classic
Clem vs Cham
WardiTV European League
1d 3h
Replay Cast
1d 11h
RSL Revival
1d 21h
herO vs SHIN
Reynor vs Cure
WardiTV European League
2 days
FEL
2 days
[ Show More ]
Korean StarCraft League
2 days
CranKy Ducklings
2 days
RSL Revival
2 days
FEL
3 days
Sparkling Tuna Cup
3 days
RSL Revival
3 days
FEL
3 days
BSL: ProLeague
4 days
Dewalt vs Bonyth
Replay Cast
5 days
Replay Cast
5 days
The PondCast
6 days
Liquipedia Results

Completed

Proleague 2025-06-28
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
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
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025

Upcoming

CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
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...

Disclosure: This page contains affiliate marketing links that support TLnet.

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.