« first day (678 days earlier)      last day (4270 days later) » 

9:00 PM
@PeeHaa In when using a singleton DB class instead of doing global $db, you might do something like $db = db_class::get_connection() . The abstract db_class would then either return you a currently open connection if there is one, or create a new connection and return it. The thought on using the singleton for db access is that you could access the connection method from anywhere in your codebase and have it it always return one common db connection. — Mike Brant 4 hours ago
 
Anyone noticed how badly Chromium renders the Acid3 test?
 
@ShaquinTrifonoff Chrome does it just fine :)
 
@PeeHaa - I'll post a screenshot...
See?
 
@ShaquinTrifonoff :P
 
Chromium 23.0.1239.0 (Developer Build 152088)
From the 'About Version' page.
 
9:04 PM
Strange I'm on Chrome 23.0.1243.2. Didn't expect there would be these kinds of differences between them
@ShaquinTrifonoff Is that stable?
 
No.
It's a nightly build.
 
:D
In that case I don't think it is strange :)
 
I'll see if there is an update.
 
Acid3 with IE8 looks very funny (23/100)
 
Do you have IE8??
 
9:07 PM
yes, I do.
 
Yes! let's program an IM chat client! :-D
 
@PeeHaa
I'm actually making one with PHP, by the way.
 
@ShaquinTrifonoff Websockets?
 
9:12 PM
@PeeHaa
 
Just some PHP, a MySQL database, HTML, CSS, and JavaScript.
 
@ShaquinTrifonoff How are you going to poll the server?
 
@PeeHaa With AJAX.
 
I prefer magic. Less code.
 
I'm planning to make it check every second, sending the last message ID, then the server will reply with new messages, if any.
 
9:15 PM
@DaveRandom You remind me, where is @Leigh?
 
@NikiC flagged it as well for low qual.
 
He hasn't been here recently, right?
@PeeHaa Just delete it ... ah no, you can't :P
 
:P
@NikiC I think I have seen him somewhere this week
You guys do it ;)
 
I just hope that he hasn't abandoned us
 
@PeeHaa What does mean?
 
9:17 PM
"delete votes" please
it asks the people with the privilege to cast delete votes to vote for the question in the link, so it gets deleted
 
@Jocelyn Thanks. I knew what and meant.
But not .
 
user895378
$Date_File_Opened <--- ugliest variable naming convention ever.
 
@PeeHaa: he forgot to use isset for each $_POST entry (among other things)
 
Oh no... Not another mysql_* + SQL injection-filled question, with heaps of code too...
 
9:25 PM
@rdlowrey lol. How the fuck are you able to look at that code :P
 
user895378
it's horrible, right?
 
I would go as far as to say that that indeed horrible naming convention is the least of OPs problems :-)
 
What's the worst/most off-topic question you've come across?
 
user895378
No, I meant the whole thing is horrible -- sometimes there's just so much wrong with what someone is doing it's best to not even try ...
 
user895378
It'd be like trying to explain differential calculus to someone who just learned long division.
 
9:29 PM
@ShaquinTrifonoff difficult to answer, since there are so many in
 
@Jocelyn True. For me, it would be this: stackoverflow.com/questions/11771180/…
 
@ShaquinTrifonoff It's a bit subjective - there was one last week that (and I'm not joking) just said "I am a help vampire" about 50 times. Might make a good Fri afternoon meta question though.
 
the question no longer exists
 
@Jocelyn I know. I helped to close it.
It says This question was removed from Stack Overflow for reasons of moderation.
 
9:31 PM
@ShaquinTrifonoff There is an absolutely unchallenged, objective winner there. Let me find it for you...
Aug 21 at 13:32, by PeeHaa
user image
 
@tereško the OP thinks we are going to guess his schema?!
 
@ShaquinTrifonoff @NikiC Wait till you see this: stackoverflow.com/questions/7071309/…
 
@PeeHaa dafuq
 
9:32 PM
some people don't seem to realize what they write doesn't have a meaning for anyone except themselves...
 
@NikiC That is the worst one, ha ha!
@PeeHaa That's been removed.
 
@ShaquinTrifonoff 1 sec lemme see if I can cap the whole thing
 
i think this should basically lock down the user ...
 
user895378
> the answers above holds some tricks
 
user895378
^ only people who are used to not getting upvotes say things like this :)
 
9:35 PM
@Jocelyn , i think it is covered under "self-awareness" , even animals like dogs exhibit understanding of "the others do not know what i know"
 
The C# IM question was removed, so you have got your rep back from downvoting!
 
@ShaquinTrifonoff You don't lose rep for downvoting questions, only answers
 
@DaveRandom Oh, I didn't know that.
 
user895378
If I lost rep for all my Q downvotes I'd be in negative territory :)
 
9:37 PM
I got reputation anyway, because I edited the question before it was removed.
 
@PeeHaa Good effort. Can't help feeling you have too much time on your hands though :-P
 
@PeeHaa I see an upvote there!
3
 
@NikiC Yes, I noticed that too.
 
@DaveRandom The mere presence in this chat suggest that we all have ;)
 
@DaveRandom Guilty as charged
 
9:39 PM
@NikiC Touché...
 
@PeeHaa Nice first comment, though!
 
user895378
lol
 
user895378
> Do you give away a free Kindle with this question
 
I love the comment "@peeHaa would you pls explain clearly what you want to ask"
by the guy who wrote a question at least 500-line long
 
ok I'm going to find me some question. I need to repwhore to delv powah :)
 
9:41 PM
ur such a pimp
with all ur whores and powah
 
phh ... i have answered one question in past 3 days
 
bah
 
lol
 
@tereško I answered two questions this month...
 
@NikiC same here
 
9:45 PM
my excuse is that i am still in the stage when i actively need to seek out rep to get the magical 20k
and the legendary badge might be nice thing too
 
I posted 10 answers since yesterday morning, and earned 23 points for that
 
I'm still working my way up to 2k...
 
@Jocelyn that's not good
 
@NikiC no :-(
 
9:46 PM
You should get ~25 points per answer
 
I have fanatic 8 times over
 
@ircmaxell you are a fanatic :P
 
@Jocelyn I answered 0 today and got +30
 
@ircmaxell me too ^^
 
@ircmaxwell yes, you get upvotes for some past answers or questions
 
9:48 PM
I only have 1 rep free day this month, the 5th
 
I have been a member for only 3 months
 
I think I have a passive rep income of about 20 per day
 
member for 2 years, 3 months
visited 834 days, 831 consecutive
seen 3 mins ago
 
my passive is 40+ (today it was 60)
 
@tereško that's much ;)
 
9:50 PM
May I create a tag? I am sure there is a significant number of questions it could be applied to...
 
Ok I give up. I'm not going to answer anything:
 
@NikiC my passive is around 10 on average
 
-1
Q: OpenCart Buttons Not working when clicked

n_starnesThe Description, Photos, and Review buttons are not working in the products. When clicked they do not display the Description, Photos, or reviews even if there is any. This is open cart software. <div id="product_tabs" class="clear"></div> <div class="s_tabs grid_<?php ...

 
but some days i get 30 ish
 
but it's mostly because i have two rep-cow topics
 
9:51 PM
i've never answered a popular question...my two best answers only have 7 upvotes each ):
 
111
A: How should a model be structured in MVC?

tereško Disclaimer: the following is description of how I understand MVC-like patterns in context of PHP based web applications. All the external links, that are used in the content, are there to explain terms and concepts and not to imply my own credibility on subject. Updated version The first th...

and?
 
the ACL one
 
@Lusitanian I have 43 with >= 10 votes
 
9:52 PM
i get about two per day "model question" , ~ 1/2 vote per day from ACL and the rest is random stuff
 
My question that had the most upvotes was also the one that gained the most upvotes in the shortest amount of time:
7
A: (PHP - strpos) Why does this evaluate to true?

Shaquin TrifonoffYou are missing a parameter of strpos. Code: $url = rawurldecode($_GET['url']); if($url[0] == '/' || strpos($url, 'http') !== 0){ $url = ($_SERVER['HTTPS'] ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].($url[0] == '/' ? '' : '/').$url; } die($url);

 
@ircmaxell you were very inspired when you wrote your answer about Hash Functions
 
so basically the rule is : you need to write some long-form answers
 
-1
A: Load file into PHP array, best way?

ircmaxellThe file command is pretty quick, so I'm sure there's going to be much to gain by caching anything. Do you use the data on every single page load? If not, don't go with sessions as you'll have the overhead of loading it even when you don't need it. Does the data depend upon the user? If not...

that's my only downvoted answer (below 0)
 
9:55 PM
@tereško Long-form and high-traffic. Though actually, just high-traffic is usually enough too :D
 
yeah, i should find a question i can write a >2 paragraph answer to
 
@NikiC True, high-traffic is the best.
 
@Lusitanian I am going to post the question "How to program a space rocket simulator in PHP?" Is your 10-paragraph answer ready?
 
heh .. my negative topics are mostly me picking on poor codeigniter/cakephp developers and telling them that they are doing it wrong
 
9:57 PM
@Jocelyn heheh
 
@Jocelyn You want jQuery for that, I think...
 
Wow, this Sara vs Paul debate on Twitter is fun to follow
 
@DaveRandom yes, that goes without saying
 
@DaveRandom there's a couple of plugins for it
 
@ircmaxell lnk?
 
9:58 PM
$.simulateRocket('space');
 
@pmjones, Memphis, TN
1.6k tweets, 737 followers, following 228 users
@SaraMG, Silicon Valley
Facebook grunt, PHP runtime/engine developer, and spastic dancer.
8.6k tweets, 2.8k followers, following 345 users
 
@Lusitanian NO! TOO SHORT!
@NikiC I found interesting things to read in your blog
 
took a quick look .. verdict: it's bullshait
 
there's about 30 or so tweets already
 
what are they arguing over...
 
10:05 PM
The usual
 
@ircmaxell suspense
 
yeah. It's a huge decision... One that won't matter once the appeals court gets a hold of it
 
Why questions that contain the text "I hope this makes sense" are (very) often the ones that don't make sense?
 
@ircmaxell That answer is now not your most downvoted answer...
 
10:11 PM
@ShaquinTrifonoff Yes it is :-P
 
@ircmaxell I upvoted it
 
:-D
I know, but it's still my lowest scoring answer
 
@Jocelyn Same reason I guess as questions asking about a "complex problem" usually are rtfm questions
 
@PeeHaa I was trying to understand that one
 
@Jocelyn It would make sense if only OP wouldn't refuse to post the relevant data I guess
 
10:14 PM
@PeeHaa yes, probably
 
He said that he deleted the code.
 
@ircmaxell I'd appreciate a South Korea style decision
I.e.: Both of you can't sell anymore.
 
I like samsung products though...
 
But I think that it is the only kind of decision that would put the needed pressure on them ;)
 
/me cares about neither
 
10:17 PM
@NikiC if apple weren't allowed to sell the iphone anymore america would riot
 
i have been using Sony since CM-DX 1000
 
@Lusitanian exactly.
 
.......
lol
that's not what'll happen though
 
If two of the largest companies were cut of their sales, I could imagine that a lot things would change that otherwise wouldn't ;)
 
@Lusitanian Only the hipsters would riot. The rest of the country would just continue buying android phones
 
10:18 PM
@ircmaxell I'm aware heh
 
In particular it might motivate them to buy the government for a patent reform ;)
 
Android > iOS by quite a bit...apple products tend to annoy the crap out of me
We desperately need a reform of our patent system
 
lol
 
Amazon holds a patent for the "single-click buy"
 
I heard that 1/3 of American patents are for things like toasting bread, or a stick for a dog. Is that true?
There are multiple patents under the same name, 'Online backup system'.
 
10:21 PM
don't worry all true
 
@ShaquinTrifonoff , who cares about those patents .. what is scary is that all the oil companies own most of the patents that are related to different "electric car" projects
 
@tereško Yes.
They want the monopoly over electric cars.
 
the whole american patent system has beem smothering advancement worldwide
 
@ShaquinTrifonoff The name is irrelevant. Patents usually are very broad in their abstract, but they actually only patent one very precisely specified thing ;)
@tereško Yes, I think everyone agrees on that
 
10:24 PM
Oh, this question was just removed:
 
circular transportation facilitation device
 
Page Not Found
This question was voluntarily removed by its author.
@PeeHaa I just realized why Chromium failed on the Acid3 test: I had installed an add-on called 'Request Maker'. It was messing with the source.
 
ah k
 
k ah
 
10:33 PM
@PeeHaa "it's not a global! you can just access it from anywhere in your codebase..."
 
@tereško oh, and, can you explain that Don Quixote reference from earlier? I didn't get it (I apologize for my illiteracy)
 
I cannot understand why he just doesn't seem to see what is wrong with that quote :P @Lusitanian
 
nope , i do not explain literary references
 
Another pretty bad question:
-5
Q: Android make two things attack each other

dalton metlerOkay so here is my question. How can i make a good guy and a bad guy. The badguy comes out from the right side of the screen going left and comes out 1 second apart from each other forever and the good guy will come from the left of the screen going right to the bad guy and will come out when...

 
There is a cool free licence here: sam.zoy.org/wtfpl
@PeeHaa Closed in 2mins! That's fast!
 
10:43 PM
@ShaquinTrifonoff I like this one: github.com/philsturgeon/dbad
Damn it got translated to Dutch. Now it sucks :(
 
@PeeHaa Why? There is an English one.
 
Well the translations just sucks :P
 
BREAKING: On pinch and zoom, Samsung infringed with all but three phones. $AAPL #appsung (VIA @jonfortt)
 
Did you know that Google has handwriting recognition for it's search?
 
BREAKING: On the bounce back patent, Samsung infringed on all phones and tablets $AAPL #appsung (VIA @JONFORTT)
both of which have clear prior art that was demonstrated to the court
#juryfail
BREAKING: On double tap to zoom, Samsung infringed on all but eight phones and tablets (via @JonFortt)
except that google had that feature first... ?
 
10:49 PM
@ircmaxell , what level court is it ?
 
state IIRC
 
was supreme only one above it ? (my knowledge of US judicial system is a bit vague)
 
No, it goes to appeals court, then federal district court, then supreme court
 
lol
so .. by 2020 we should know the final decision
 
10:53 PM
basically
 
Aaaagggghhhh....... Comments can't contain links to LMGTFY.
 
@ShaquinTrifonoff yes, this is very very very very sad :-(
 
@Shaquin This really should be allowed for some ridiculous questions where a simple search returns immediately the answer to the question
 
11:03 PM
maybe it could be allowed when a question reaches some negative score (like -5)
 
@Jocelyn Yeah, that's a great idea!
Instead of getting that...
---
I ended up having to post a direct link to Google. It just doesn't have quite the same effect as LMGTFY.
 
I know, I had to do the same
 
You know, I sent an email to LMGTFY about the HTML validation. I got a reply, too.
 
Is it possible to do this if ID is an int?
SELECT * FROM table WHERE id > 20
And would this be valid syntax?
SELECT * FROM table WHERE id > 20 && id < 21
 
yes it is valid
 
11:11 PM
Use AND not &&.
 
ah yes Shaquin is right
 
Alright thanks.
 
be careful with case sensitivity in mysql queries
ID and id are not the same fields
 
Am I limited to how many "AND"s I can do? Like could I select upon 5 conditions, or just a mxaimum of two?
 
yes, you may have 5 conditions with AND between them
 
11:13 PM
Your second query will return nothing.
id is greater than 20: 21, 22, 23, ... and id is less than 21: 20, 19, 18...
 
true, there is no integer value greater than 20 and less than 21
 
But the syntax is valid!
 
Yes.
20 1/2 is not an integer, though.
 
column names are NOT case sensitive
 
Ugh, well basically I want to select 1-20, and I want to be able to do that in any spot & length, that was a example query. Like 90-1239, stuff like that.
 
11:15 PM
Column, index, stored routine, and event names are not case sensitive on any platform, nor are column aliases.
Although database, table, and trigger names are not case sensitive on some platforms, you should not refer to one of these using different cases within the same statement.
 
@Alec Your query is fine, then.
 
Very intellectual statement.
Alright, thanks.
 
Good that it's only at the first instance :)
 
@tereško Ha ha ha!
 
11:21 PM
I find it pretty sad when someone patents the way you move your finger across a touch screen.
 
@Alec Pretty sad that the patent office let it through, the person patenting is a genius.
 
@NikiC USA! USA! USA! ...
 
@Alec the US patents office is among the worst in the world, they seem to grant patents to anything that is asked
 
@Jocelyn Agreed. It's quite scary. Breathing pretty soon for sports might be patented ( no deep breaths ) lol.
 
Seems more like a monopoly that apple patented that stuff. They're preventing any other touch screen devices to show up really.
If I was Samsung I'd be sueing them for monopoly haha.
 
11:25 PM
Question: When I use uploadify to upload a file, I use init_set in the code to change the max_upload_size allowed, I should also set a timeout right? I'm looking at ideally uploading 100-200 MB max, what settings should I use
 
I am going to fill in a patent claim for the category tags, then I will sue Stackoverflow :-p
2
 
You could patent the tag ...
 
@Alec But Apple tried ;) "Has Apple proven by a preponderance of the evidence that Samsung has violated Section 2 of the Sherman Antitrust Act by monopolizing one or more technology markets related to the UMTS standard?" => No.
 
@Darius: 100MB is quite a lot to upload in a form, can't you give a write only FTP access to your users?
 
video upload site
:p
Point me in a direction as to how to handle video uploads perhaps if I'm looking at it the wrong way?
 
11:27 PM
@NikiC That's not fair, is it? Apple already has its billions...
 
@Darius I updated my previous answer
 
@Jocelyn I can create a form to use FTP and receive information about the video via php? :O?
and show upload progress
 
@Darius: file-sharing websites sometimes (often?) do that: if you upload a small file, then you can use a regular HTML form. If you want to upload a bigger file, they tell you to connect to their FTP server to upload it
 
@Jocelyn The normal user won't know how to upload a video using ftp, I'm looking at the regular facebook type of user.
 
@Darius: the FTP server would be accessible only with an FTP client, not a webpage
 
11:29 PM
@Jocelyn Means ftp is out of the question for me, this is a youtube sort of situation.
 
uploading large files in POST forms doesn't always work very well:
- the browser may timeout
- the user may close the webpage before upload is finished
- the user may accidentally resubmit the form
- the user connection may fail
 
Sam
depends on how large the file is; however, you might also need to increase some values in the php.ini file
 
Reading this webmasterworld.com/php/3902316.htm It says there is some sort of fork() function that may help.
 
you can't use fork() in a webpage
 
The browser may time out, correct. I don't know anything about that part to be honest.

-The user may close the window (too bad).
-Accidently resubmitting form (disabled resubmission button)
- User connection may fail (too bad?)
 
Sam
11:34 PM
uploading 100MB file through a website is insane; your server will most likely crash if 10 users were to upload their files at the same time
 
what if javascript is disabled on client side? the submit button would remain enabled
 
if javascript is disabled, they are redirected to mobile site that contains no uploading.
 
or if an evil user opens 20 tabs and start uploading 20 large files at the same time
 
@Sam I can see that happening, that's where I"m trying to figure out what to do. Youtube does it, and others so.. :\
 
Youtube has a hugely fast internet connection for downloading and uploading
 
11:36 PM
We're connected to the backbone of Verizon's network 100 MBPS
or w/e, but i understand that part, so maybe option would be to limit upload speeds?
lets say 200 KB per second
so it doesn't hurt the server AS much
@Sam What about HD videos of up to 1Gig?
 
I'm battling with a comment war on my most recent answer.
 
@Shaquin: link?
 
@Jocelyn Looking
 
@Jocelyn It's over now, but it's here:
1
A: In PHP, how does include() exactly work?

Shaquin TrifonoffSee the manual. If you include a text file, it will show as text in the document. include does not behave like copy-paste: test.php <?php echo '**'; $test = 'test'; include 'test.txt'; echo '**'; ?> test.txt echo $test; The example above will output: **echo $test;** If you are g...

 
@Jocelyn gigaom.com/video/youtube-doubles-upload-size-limit Here is an article, looking for a direct link from youtube
 
11:39 PM
@Shaquin I tried to make the question close, since it is a stupid rtfm question
 
Sam
@Darius I don't think Youtube allows you to upload files that large, but even if it were possible, they have unlimited funds to have as much hardware power as possible.
 
Oh no, it seems to have started again.
 
*scratches head :\ *So what would my options be at this point then? The company is barely starting up, have fast connection.
Most videos people have are in proximity of 50-100 MB
Is there a way to check if user is already uploading something? setting a session perhaps?
and limiting upload speeds to 200 kb per second for users so it doesn't bottle neck us?
I'm guessing they can suffer slower upload speeds if there's a likely hood of 20 people uploading at same time
 
Sam
what other functionality does your site offer?
 
but if 20 people uploading at same time constantly, means the site is doing pretty well and can expand right? :D
The site also offers photo sharing and forum discussions
AJAX calls and regular php calls.
 
11:45 PM
@Darius There are some good resources here. At the manual.
 
I just checked youtube upload page, I don't know exactly how it works
 
@ShaquinTrifonoff Reading.
 
@Shaquin I think I might add a comment about jquery to make things funnier
 
@Jocelyn Sure.
 
Sam
in addition to a great application architecture, you most likely need to have a huge hardware infrastructure in place
 
11:49 PM
So sounds like i'll have to use init_set and allow for the size and create a reasonable timeout for DSL connections. Then maybe use my firewall to block multiple uploads (if possible? Idk, will consult server know it alls).
 
@Darius I have nothing else to say about your question. Maybe someone else has other ideas...on my website there is only one form that takes file uploads, and the limit is 2MB (text file)
 
And not knowing this, if multiple people start uploading files, will it fail with the server or bottleneck upload speeds?
@Jocelyn I appreciate dearly your input. Thank you.
So for my last bit of the question, multiple people uploading, will it bottleneck the speed or just fail due to some sort of memory limit?
 
@Darius It depends on two factors:
1. The internet connection speed of the server.
2. The amount of RAM the servers have.
 
Sam
you need to start small........and once the site is profitable, increase the file size incrementally.
 
@ShaquinTrifonoff So if i notice upload speeds suffer (this would be the only tell tale?) I would just upgrade the hardware .
Right now the server only has 8 gigs of ram
KNowingly we'll need way more servers, but knowing 8 gigs of ram, what does that offer me in terms of uploading
100 MB x 80 people?
 
Sam
11:58 PM
lol....that's a wrong assumption, since your site offers more functionalities than just uploading
you have scripts running in memory, video uploads/downloads, image rendering, etc
 
understood, just trying to understand the process, the videos that are being uploaded are stored in the RAM ? (sorry if I sound totally stupid)
 
@Darius - I don't know about that stuff, but if your server runs out of memory, it will display an error message like Fatal error: allowed memory size of XXXXXXXX bytes exceeded (tried to allocate XXXXXXX bytes) in /home/username/public_html/upload.php on line 14. That will be displayed to your users, unless you set an error handler.
 

« first day (678 days earlier)      last day (4270 days later) »