« first day (713 days earlier)      last day (4235 days later) » 

4:00 AM
> is it exists, somebody will have a fetish about it
 
i think we're all working on that one
line 5
 
Yeah my family members are all pissed at me because my sleeping cycle is like +8GMT instead of +3 :D
 
*53
fixed it
 
But I thing that all that "good" sleep thing is BS...
 
wow @tereško it does look like crap
that's awesome
 
4:01 AM
well ... it's midnight in EST
and seems like i need only 18 more upvotes for my silver badge
ok ... that's it
time to resume the audiobook and go to sleep
 
thanks for the assist
 
oh yeah, tv series came out!
BBT, office, Parks & Rec and more..
 
@tereško audiobook and sleep? don't you have to hear it?
or is it like something outta Dexter's Lab ?
 
@ShyamK i usually manage to listen through few chapters before i fall asleep
 
oh... listen and fall asleep...
gud nite to you then
 
4:15 AM
What are you working on now, people?
or just exploring new things?
 
4:35 AM
i'm just ranting
lol
 
4:45 AM
Hey guys so I have a form and their is a issue I am having with a section. So this is a mail section where you can enter your mailing address. Now lets say you enters 1772 lakeshore drive, you submit rest of form and it goes through perfectly inserting into database. Now lets say you have you have addrss but you live in a apartment and you add 16 at the end. You submit it and it gets to inserting/or
updating depending on if user has already form filled out. It goes to execute but nothing happens it just stops. Only does that is you add the 16 at the end. Now I tried to make a secperate input box for optional appartment number and I have mailing address formatting by adding the values of each one then inserting - It does the same thing even if the 16 is in its own input box - if you take it away it works perfect.
I'll give you link to code
If you could check it out I would appreciate it!
NVM figured it out!
 
Hello friends i need a help on facebook comment plugins
i am try to include facebook comment plugins in my html page but it will not display any comments
i have already app key and secrate key
 
 
3 hours later…
7:58 AM
@all i need help on this... i need to execute 3 different queries in php and pass the 3 results to a java class how to do it...?
 
8:19 AM
I'm trying to configure a PHP-based site into UTF-8. I added the HTML5 doctype, and meta tag to all sites, and added mysql_set_charset('utf8'); to the database-related .php file. Some characters (loaded from directly from php and JS, not the database) still don't display as utf-8
I read that you need to configure an "MB-string" as well: allseeing-i.com/How-to-setup-your-PHP-site-to-use-UTF8
Anyone have some experience with this?
 
@AskeB. HTML5 doctype has nothing to do with charsets (although I still commend you for using one), you need to declare the character set. Add <meta charset="utf-8"> as the first child of the <head> element, and add header('Content-Type: text/html; charset=utf-8'); to your PHP code before you output anything.
 
@DaveRandom I did
 
@AskeB. Then the data in your database is not UTF-8, or you have not set the database to use UTF-8. Or possibly you are using a font that does not have a representation of those characters.
do you have a live example I can look at and inspect the hex dump?
 
@DaveRandom Well, it's not the data from the database that is displayed wrongly. It's the things I echo and the things that are named directly in the html code. Would an incorrect character setting for characters in the DB make the entire site to be displayed wrongly?
 
Which characters are you having a problem with? Did you make sure you saved your source code file as UTF-8 without BOM?
 
8:35 AM
Sorry, here is the site: organizer.hostetserver.dk/barebone.php
I'm not sure what you mean by "saved your source code file as UTF-8" Do you mean the .php files I upload to the ftp-server?
@DaveRandom How can I debug what could be the problem?
 
hello
how is it possible when a user have 13 upvote and accept and yet only have only 1 reputation stackoverflow.com/questions/12438911/…
 
8:50 AM
@AskeB. Sorry got called into a meeting, will take a look at it now and see if I can give you any pointers
 
@DaveRandom Thaks a lot
 
@all: how r u frends?
 
hello
whats up
 
fine and u?
 
@hekko Because you lack even the ability to read simple things "This account is temporarily suspended for voting irregularities. The suspension period ends on Oct 25 at 20:05."
 
9:02 AM
Oh that guy. I wondered how long that would take.
@AskeB. Sorry, my editor just totally screwed me over there and is showing me silly code points. I'll need a few mins to drill down to what I want
 
@Leigh and you have got absence of mind there isnt anything about the reputation that on the suspension period the user will have only i reputation
 
I know he was a complete pain in the arse here, but I wonder what he was actually doing. "voting irregularities". I certainly never saw him contribute anything useful, so I suppose it's odd that he had any rep at all :p
@hekko Ah another shrunken avatar, I shall leave you with this blog post and even the quote that you can search for. "Your account will be locked at 1 reputation."
Now go cry elsewhere, because we really don't really care about your trivial grievances with the system. Try being a better person in future.
 
@Leigh Well @tereško Has certainly been complaining about serial DVs and he was trolling that guy quite a bit, also I randomly got serial upvoted a couple of wks ago. You could always ask Tim, but I doubt he would be at liberty to say...
 
"Once I got into accidentally coding for IE's box model and became a fan of it. That's the perfect logic for a box. Ask W3C to run a container shipping firm, and it's dead in a week."
 
@DaveRandom Ah, yes I got serial downvoted by an idiot who I told to shut up for spamming. Kind of obvious who it was.
 
9:11 AM
@AskeB. Your source code file is encoded as Windows-1252. You need to change the file encoding setting in your editor/IDE
 
@Christian It's not the W3Cs fault each vendor implements in their own way
 
Also, for the record, I hate sites that use the © symbol in the page title. The page title should tell you about the page content, not about who owns it IMHO.
 
@DaveRandom Ah yeah, I see that now. Thanks.
 
Someone else better have been using my computer. I just found a W3Schools tab open while pruning.
On a related note, does anyone know if it's possible with JS to do something around window.open() to say "only open this if it's not already open, otherwise just switch focus to it"?
In fact, sod that, I'll go ask in JS
 
user1125394
9:29 AM
windows.tabs
 
user1125394
seems you can't have control on tabs by JS
 
user1125394
you would need a browser extension
 
I might have missed something really obvious actually, playing with it now.
 
user1125394
@DaveRandom you probably need to do a browser extension to do that
 
@cyril S'alright, I think I've found something that will work for what I need
 
user1125394
9:42 AM
cross domains ajax, cors or jsonp ?
 
user1125394
you could send your list of tabs to a central server
 
@cyril Just opening arbitrary external pages in new tabs/windows (_blank)
 
user1125394
@DaveRandom ahh it will look like spam
 
user1125394
adblock plus will filter it
 
Possibly. I'm playing with something now, I have a cunning plan...
 
10:00 AM
Good day everyone!
Any ZendFramework 2 users here?
 
Morning
Is there other way doing this: `$tariffAr = array('Tariff One', 'Tariff Two', 'Tariff Three');
if ($key = array_search("Tariff Two", $tariffAr)) {
print_r($tariffAr[$key]);
}`
Return value if found.
 
10:15 AM
in_array
 
Sorry I mean this:
How do I paste small code here
 
Paste code and push Ctrl + K
Then Enter
 
`function tariffField($tariff) {
    $tariffAr = array('Tariff One', 'Tariff Two', 'Tariff Three');
    foreach ($tariffAr as $tar) {
        if (isset($tariff[$tar]))
            return $tariff[$tar];
    }
    exit("Tarrif Not Found");
}
 
Okey.
 
Understood?
 
10:18 AM
Yep.
 
Is there other way doing this?
 
Let me think.
 
@I'll-Be-Back array_intersect, array_flip
 
You could get keys. $keys = array_keys( $tariff );
 
or array_keys, probably better than array_flip
 
10:20 AM
And then isset ( )
 
use array_intersect/array_diff, and don't bother with the foreach
 
good idea
 
If I have a finite list like that, I tend to declared it as $tariffAr = array('Tariff One'=>'', 'Tariff Two'=>'', 'Tariff Three'=>''); so I can just isset() on it, makes everything so much easier
Many would, I'm sure, consider that bad, but I don't care.
 
@DaveRandom via foreach loop?
 
@I'll-Be-Back array_diff($tariffAr, array_keys($tariff));- result should be all entries in $tariffAr that are not present as keys in $tariff
 
10:23 AM
No, literally just isset($tariffAr[$tariff]);
 
If you define it like Dave suggests, you can use array_diff_keys instead
 
$tariff is array
 
Oh wait did I miss something? Hang on, let me re-read that code
 
10:25 AM
Right yeh sorry ignore me, I talking nonsense in relation to what you are doing
 
no worries =)
 
Right, I missed the fact you wanted to return on first hit, what was wrong with array_search?
 
array_search You need to enter the value which I don't want that
because I don't know what value might be exist in the array.
 
To be honest I think your code looks like the best way of doing that specific operation, assuming that the operation is "return the first matching value in the input data based on pre-determined ordered list"
 
Thanks @DaveRandom =)
You manchester huh
you live near me
 
10:36 AM
Technically I live in Salford, which probably makes me even more of a dodgy b*****d. Don't p**s me off or I might come round and knife you :-P
 
Although I grew up in Hale dontcha know, spiffing, jolly good show and all that jazz
 
Cute baby picture
 
#12 in the Torygraphs richest towns 2008, apparently. Wonder why I never have any money.
 
Do you work?
 
10:40 AM
lol
Depends how you define "work". I sit in an office all day, if that counts.
 
lol ok
Other word, do you have a job! ha
 
Indeed I do. Hopefully I'll win £80M on the lottery tonight though.
 
Good luck lol
 
@DaveRandom what do you plan to do with the 80M ? invest it on you kid sounds good... what do you say?
 
5 mins ago, by I'll-Be-Back
Cute baby picture
Actually, that'll be why I never have any money
 
10:44 AM
@ShyamK He can buy me a pint
 
I mean really if I won £80M 75% of it would probably go to charity straight away. No-one needs that much money.
@Leigh You know what, I might even get you two.
 
@DaveRandom Nah, don't give it to charity straight away, leave it to charity in a will if anything, you might actually need it.
You may develop an incurable exotic strain of nymphomania and have to have people satisfy you 24/7, could be costly.
 
@DaveRandom baby born in Salford Hospital?
 
@I'll-Be-Back Trying to be creepy?
 
no, member of my family is a midwife
 
10:46 AM
@Leigh £80M? Once you get past 1 or 2 everything else is just unnecessary I think, I mean you could easily just live off interest.
 
@I'll-Be-Back Slightly better than you being able to recall the face of Daves baby from a hospital ;)
 
@I'll-Be-Back Born in Hope where the maternity unit no longer exists. Which is not a massively bad thing, it was about to fall down of its own accord I think.
 
@DaveRandom yea i know ... do you remember midwife name? :)
 
@Leigh Damn, you got me, I am in fact Silvio Berlusconi in disguise.
@I'll-Be-Back Was there for like 48hrs, there were many, many people peering up my GFs special place, can't remember 1 single name. TBH it's not at the forefront of your mind in that situation.
 
Well if it pakistani girl... if you remember lol
woman*
 
10:51 AM
So Dave is Chris, how confusing
 
@I'll-Be-Back Not really, I think there were a couple of eastern people but again not the sort of thing you really pay attention to (not the sort of thing I pay attention to in general). There was this one doctor I remember who was clearly about a week out of med school and s***ing himself, but that's the only reason I remember him. Still can't remember name though.
@Leigh Yeh I thought I'd just mix it up a bit. I have used that screen name everywhere for so long that I can't even remember where it comes from.
 
@DaveRandom Cool no worries.. one of my member of my family use to work in Hope.. so I thought might remember her..
No worries =)
 
@DaveRandom One of my aliases developed into the name of a gay bar in scotland (I had it first!), but I stopped using it anyway.
 
@Leigh Yeh there's some little 15YO kid who's pinched mine, I think he's got Twitter and FB, but I don't really care because I never use either. He's my spam magnet for people who think they should just add me because they've seen me on SO or similar.
@I'll-Be-Back Where are you at then? I'm guessing either your first language is not English or you're crap at typing :-P (no offence, and you're not that bad really)
 
@DaveRandom Bolton
Yea my english suck
 
11:26 AM
Before I open an bounty on my question stackoverflow.com/questions/12606993/… then I was wondering, can anyone of you answer this?
 
11:41 AM
Even if I could, I'd wait for the bounty now ;)
 
@dotTutorials The general consensus on the web seems to be that if you zip the file the warning will disappear, is this something that would be acceptable?
 
Are you sure your mime types are also accurate?
 
@Leigh I am almost certain yes. I have changed it between inline and attachment, however; both seem to do the same.
@DaveRandom Yes, It was actually an pretty good idea. =)
 
@dotTutorials mime-type not content-disposition
header("Content-type: $type"); this bit
 
Ah - Yeah I am sure it is set correctly. I am loading it directly from $_FILES["file"]["type"] - $_FILES is set by an HTML <form>
 
11:48 AM
@dotTutorials OK I'm afraid I'm going to have to close-vote your question because I found a dupe - the good news for you is that the dupe has a good answer on it that looks like it will work for you. Also I won't downvote you because it is a decent question
 
Rather have it closed than open an bounty =] Luckily the bounty had a 5 hours wait-time
 
@dotTutorials That doesn't mean it's correct
 
@dotTutorials Never trust $_FILES["file"]["type"], it is user input and not safe to use. Use finfo instead.
 
That value is set by the browser, so you've actually introduced a security hole
 
11:51 AM
Sorry. Not quite good at PHP - I just started learning it, though it has an simmilar structure as C#. Anyways, thanks for the help. Found the answer
 
@DaveRandom Why? It's useful info
Maybe not appropriate for SO entirely
 
might want to remove that if you can, so it doesn't end up in the cv-backlog
 
Too late. Really need to add a cancel feature to the plugin
 
Hehe true. But it is okay, got my answer. Thanks Dave :]
 
11:54 AM
Well I'm sure people looking at it will decide not to close, so no biggie
 
Actually that's one element of the plugin I've not looked at yet, do you know how it works? Does it crawl the transcript, doesn't seem to be client-side.
 
Also, Leigh thanks for the link to finfo. Quite got some reading stuff for this friday
 
-1
Q: Best practices for naming conventions for filename

I'll-Be-BackCoding in PHP, I use camelCase convention but What is the best practices for naming conventions for filename? For example: - name.php (primary) name-import.php name-report.php name-ajax.php (include all the funtions for ajax request) or name.php (primary) name_import.php name_report.php ...

 
@I'll-Be-Back Sorry, no, that's been covered many many times and is definitely Not Constructive.
 
11:59 AM
Oh :/
 
@I'll-Be-Back The problem is that there is no "Best Practice", it is highly subjective. Although FWIW, since PHP's OOP model was (at least at first) designed around Java, I usually point people at the Java naming conventions, which are fairly sensible and quite rigidly defined.
Will find the link, hang on
 
I am reffering for filesname
not the coding
 
Well the slightly irritating one-class-per-file convention PHP has inherited from Java dictates that you name the files classname.class.php (or I have also seen class.classname.php), and it's definitely advisable to stick to lower case IMHO.
 
It is not related to class (oop)
A group of files belong.
 
Well then to be honest is just doesn't matter, as long as 1) you pick a convention and stick to it for a given project and 2) the file names accurately describe what the file does/contains. Like I say, I would definitely stick to all lower-case though, for portability reasons.
 
user1125394
12:08 PM
Dudes sry but I have a stupid linux problem
 
cool @DaveRandom
 
user1125394
I'm now with home/cyril/Desktop/Desktop/..
 
@cyril You see the power button? Press that.
 
What can I do if I see an accepted revision that is wrong?
i.e. stackoverflow.com/posts/12639642/revisions he introduces that XML out of nowhere I think
ohhh nevermind
 
lol
did you just view source?
 
12:11 PM
derrrrr
No
didn't need to
it's obvious (stupid me)
 
user1125394
@DaveRandom it works thx
 
@cyril lol. What's the actual problem?
 
user1125394
I want to do mv Desktop/ .
 
user1125394
mv: Desktop/' and ./Desktop' are the same file
 
user1125394
~/Desktop$ ls
Desktop
 
12:13 PM
Do you mean you want to mv -R ./Desktop/* ./?
In other words, move the contents of the sub dir Desktop up a level?
 
user1125394
right
 
user1125394
@DaveRandom thx ~/Desktop/Desktop$ mv * ../
 
Yeh that would do it as well
Actually does mv even have a -R flag? Just realised it doesn't make much sense.
 
user1125394
no
 
user1125394
Linux .... sometimes it's -r , sometimes -R, sometimes nothing
 
12:22 PM
Guys, where did @Gordon go and for example @ircmaxell? They were more often here.
 
ircmaxell is probably still asleep
Gordon is probably doing some, y'know, work
 
user1125394
@DaveRandom what OS you are on?
 
WinXP :S (at work)
WinXP on old laptop (very broken)
Win7 new laptop
Various OSes on various machines at home, couple of XPs, one 7, two Fedoras and a Ubuntu
I have quite a few computers
I inherit old ones and it pains me to chuck a working machine
So I use them a test envs and slaves for various applications
I have two boxes specifically for torrents
Oh yeh, and a Raspberry Pi that currently does f**k all, although I'm hoping to change that this weekend
 
user1125394
may be a pain to sync your folders if necessary
 
user1125394
or some dropbox, even git
 
That's one reason I have so many, I'm working on a distributed SMB server to make directories from multiple machines over multiple protocols appear as a single volume
 
user1125394
ah good
 
user1125394
ntfs filesystem as you have windows?
 
Well yes, the idea is to make everything appear to be a single NTFS volume, but behind the scenes it will relay to NTFS, NFS, other SMB shares etc etc.
With built in replication and all sorts of good stuff. It's a huuuuge task though and a pet project that's been on the back burner for a while.
@hakra What did you edit about that post then? It screwed with my cv avatar notifications, I'm trying to track down a bug.
 
first there was no space between the tag markup and the link, then it was. you can get history for edited chat-lines: chat.stackoverflow.com/messages/5551379/history
 
12:40 PM
@hakra Oh nice one, thanks.
 
what did i miss ?
 
@tereško The morning. Don't you have a job?
 
not a regular one, no
 
Lucky b*****d
 
user1125394
the best is a state job, loosy working hours...
 
12:44 PM
not so much , the current projct did not work out =/
i basically wasted a month , with nothing to show for it .. the dark side of freelancing
 
1:09 PM
ehh ... i took an hour to respond to all the comments
 
@tereško You're trolling CI? I can't believe you could spend more than a few minutes in that tag without needing a stiff drink.
 
i am trolling in the (i'm getting close to my silver badge) .. it was originally tagged as such
 
@Eugene I am here
 
@Eugene i'm here, too
 
lol
 
1:24 PM
can anyone help me out with php unit testing ?
Well am I in right chat room ?
 
Read the room description, top right. Just ask your question.
 
@vascowhite I wanted some help with php unit testing ?
 
@AnandS.Bahuguna You've now asked 3 questions, when you could have used just one!
 
Really sorry for the inconveniences, if Any..
 
are you looking for moral support ... or something ?
 
1:28 PM
looking for PhP unit testing help..
 
no, not at all. just ask, if anybody knows the answer, she will share it with you.
 
OP is preventing low quality question from being closed by setting a bounty
 
@tereško You should have seen it before my edit! he's been trying to get an answer since February because he asked the wrong question.
He has an answer now, so he probably won't care if its closed .... again.
@AnandS.Bahuguna I take it you're not going to ask a question then.
 
@vascowhite classical
 
In App Purchase?
 
1:35 PM
india asking pattern
 
lol
 
not funny. I'd say it's just a less experienced guy, that's all.
and I do not see why the bounty was placed to prevent close-votes
 
@Leigh You missed the point. I didn't argue against our favorite vendor doing things its own way. I'm arguing against W3C being damn hard-headed just so that it doesn't give in to IE.
But now it's too late to fix the standard anyway. By several years, that is.
 
Constructor with 6 DI arguments: too many? Use setters instead?
 
1:45 PM
@DaveRandom 6?? Why, that's too little. The standard says at least 8.
 
@AnandS.Bahuguna and that means?
 
Can someone solve the riddle of why my multiselect checkbox values aren't being added to the array in this example? pastebin.com/NMiRsmAq
 
@DaveRandom use a parameter object instead and group what belongs to each other.
 
0
A: How to create arrays from multidimensional array based on index in php

ChristianThis is all the code you need to get it working:

 
@hakra Parameter object a good idea which I get, but what exactly do you mean by group what belongs to each other?
 
@DaveRandom well with 6 parameters, I'd assume that some of those belong to each other. So you can compact them into a parameter object.
 
0
A: My object contains multiple instances of itself, should I be concerned?

JvdBergDo not worry, since version 5 of PHP passing around objects is done by reference.

 
Right so constructor takes more than one parameter object? Sort of makes sense I suppose, although I'm not sure if in this case I would gain anything over a single object with all params. Will think about it, may be a design flaw here.
 
user1125394
Can we consider an application server as a software? (ex glassfih)
 
@cyril Of course not! It's called hardware!
 
user1125394
1:53 PM
(trying to do a cv)
 
user1125394
apache is not a sofware?
 
No, it's hardware too.
 
apache is hardware made from dead indians
 
@cyril yes, Apache is software.
 
@vascowhite
 
1:55 PM
Is there such a term as godawfulware?
 
user1125394
so did indians also wrote the wikipedia page en.wikipedia.org/wiki/Apache_HTTP_Server
 
@cyril apache is a helicopter. the deadliest in the world
 
user1125394
The Apache HTTP Server, commonly referred to as Apache (/əˈpætʃiː/ ə-pat-shee), is a web server software notable for playing
 
user1125394
^
 
@cyril , while we appreciate the entertainment , what are you actually confused about now ?
 
user1125394
1:56 PM
trying to classifying (small) stuff in a cv
 
you do not write "small stuff" in CV
 
user1125394
I thought I could put servers in softwares
 
@cyril "server software"? eg: apache, mysql, glassfish...
 
user1125394
k thx but the list is so short, I wanted to merge ;)
 
CV should be a single page thing .. 2 pages, if you are @ircmaxell and need a place to list all your conference talks
 
1:58 PM
Yeh only put big stuff in a CV. Do the whole thing in 24pt
 
user1125394
I'v seen 60 pages CV
 
user1125394
detailled
 
@cyril , are you from India ?
 
I actually lol'd
People are looking at me funny now
 
user1125394
@tereško from a very far country of yours
 

« first day (713 days earlier)      last day (4235 days later) »