« first day (1036 days earlier)      last day (3909 days later) » 

12:00 AM
@tereško what are the factors that greatly affect that 'sometimes' you were saying?
 
mostly - configuration
assuming that you table really have no relations
 
anyone here?
 
will you believe, if I answer "no" ?
 
@DABAU5NERD (none)
 
ok then...
 
12:03 AM
jk
 
Hey, Is it possible to communicate with a Kryonet server with a PHP client.
 
is there any active SO guy here from PH? seems i'm alone here T-T
 
$decoded=base64_decode($image1);
file_put_contents('image1.JPG',$decoded);

why isnt this working?
 
@Nirock you could definitely do it with fsocket() but i suspect that you will want to look for some library
 
12:05 AM
@DABAU5NERD directory permissions?
 
@DABAU5NERD did you check for error messages ?
 
no errors
 
@Nirock , try to play with this: php.net/manual/en/function.fsockopen.php , and see what you can get
 
@DABAU5NERD does var_dump(file_put_contents('image1.JPG',$decoded)); return false?
 
I know that i can use Sockets in PHP... I will probably write my own library because i only need to transform Json data between the two.
 
12:09 AM
well , it doesn't look like there was any existing library for this
 
cuz if not, probably you are looking at the wrong folder.. (it was successfully generated)
 
@reikyoushin it returns int(56350)
 
did you look in the root directory then?
 
what do you see if you write var_dump( __DIR__ ); there ?
 
seems he can write alright.. question is where?
 
12:12 AM
i did look in the root directory, and there are no images there. I also looked in all the other directories
sorry, kinda new to php
 
@DABAU5NERD you can do what @tereško said.. your image should be in the directory that function will print out
 
wait, sorry, where do I write that?
and do I replace DIR with something else?
 
nope.. just print exactly this: " var_dump( __DIR__ ); "
 
you write it before file_put_content(...
 
I just get string(7) "DIR"
 
12:16 AM
you did something wrong
 
why is it getting rid of the underscores?
 
weird..
 
i did
 
did you copy the whole var_dump( __DIR__ ); as it is ?
 
__DIR__ you need the 2 underscores before and after
 
12:17 AM
wait .. lol
 
yeah
 
do this: var_dump( phpversion() );
 
try this: var_dump(dirname( __FILE__ ));
 
what does it return?
 
@tereško string(6) "5.2.17"
 
12:18 AM
oh, for fak sake
 
@tereško tada!
 
the support for 5.2 ended several years ago
you need a sever that has been updated in this decade
 
I'm using godaddy
 
if you are new to php, you really shouldn't lean on something that old
 
I cant update php manually
 
12:19 AM
there is a way to use 5.3 in godaddy
 
how?
my server came with 5.2
 
your server has 5.2 so as not to break old sites..
but you can choose to use the new versions.. ;)
"You get PHP for free, and PHP 5.3 is the most recent version that meets our stability and security requirements."
that's why i dont like godaddy.. T-T
 
yeah , php 5.3 would be minimum. 5.4 or 5.5 would be better , but 5.3 was the "6.lite" version and had major updates
 
they should really cut it already
 
not even in 5.4
 
12:21 AM
thanks
so if I update then it'll work?
 
I knew people assume jQuery is present when it is never mentioned, but this is just going a tad too far, if you ask me:
776
Q: event.preventDefault() vs. return false

RaYellWhen I want to prevent other event handlers from executing after a certain event is fired, I can use one of two techniques. I'll use jQuery in the examples, but this applies to plain-JS as well: #1 event.preventDefault() $('a').click(function (e) { // custom handling here e.preventDefau...

 
i mean what does this output?
 
The question is about something in jQuery and the same thing in plain js.
 
it's tagged :) but a lot of people tag PHP randomly
 
@DaveChen so @tereško would see the question and help the guy who tagged it as PHP lol
 
12:23 AM
The answer completely ignores the non-jQuery question (while the answer to it is actually different from the jQuery answer)
 
@reikyoushin it just shows me the current directory that the file is in
 
and the file isn't there?
 
and then gets 860 upvotes
grmbl
 
well once, there was a question that was tagged PHP so I answered with php code...then the tag was removed... :(
 
@reikyoushin nope
 
12:24 AM
not even hidden?
 
@Jasper the second paragraph is about vanilla JS
 
does your apache run as the ftp user? (i'm not sure on godaddy's setup. forgot it already)
 
J L
is there any type of local storage that doesn't cause modern browsers to prompt for user approval?
 
its not hidden
 
@DABAU5NERD what are the permission on the directory in which you are trying to save the file ?
 
12:26 AM
 
nvm, I can't read
 
@tereško how do i check?
 
dunno .. what tools do you have available to you ?
 
@tereško I see it's there now. Poor reading on my part. The wording could also be better...
 
what do you mean?
 
12:27 AM
you could do var_dump( is_writable( dirname( __FILE__ ) ) );
 
@DABAU5NERD in ftp you should see chmod
 
it shows true
 
then it should work
did you make sure that such file "image1.JPG" is not there ?
 
it works if I manually make a variable and put some base64 stuff in
 
wat
 
12:30 AM
it doesnt work when I pull that stuff from a form submission
 
are you trying to upload an image ?
 
yeah
 
then you are doing it wrong
read it
and try bits of it
@Jasper anyway , i prefer this way for event bubbling
 
@tereško wont the file break if you base64encode it and decode it back?
or as long as the correct headers are sent it will be fine?
 
i am quite sure he's doing something completely wrong
 
12:42 AM
37 mins ago, by DA BAU5 NERD
$decoded=base64_decode($image1);
file_put_contents('image1.JPG',$decoded);

why isnt this working?
 
.. like-pasting-the-content-of-image-in-a-textfield wrong
 
if the $image1 did not come from $_FILES.. then nothing is there to print i guess
 
which is why i linked to a tutorial
 
back to the same question..
http://chat.stackoverflow.com/transcript/message/11292694#11292694 wouldn't it break?
i hate this.. mysql workbench has a limit on the size of a page, now i dont know how to fit stuff in it T-T
 
i have no idea whether it would break or not
anyway, i need some sleeps
 
12:49 AM
@tereško gnyt then, i will be up for at least 6 hours more..
 
1:04 AM
@tereško makes sense. I mainly came to the question for the preventDefault thing, since I've always used return false myself and I've not used jQuery in such a way that I noticed the stopPropagation effect it had there. (on top of that, someone linked to the question, I probably wouldn't have looked it up otherwise)
 
http://hasin.me/2013/08/17/lazymouse-jquery-plugin-detect-mouse-inactivity-easily/
Planet PHP
LazyMouse jQuery Plugin – detect mouse inactivity easily :)
Hasin Hayder
1376689260
 
1:32 AM
Good evening all
 
Monring
 
im back.. >.<
@Danack do you know the PHPelephant dave is shipping? does he have a pic?
 
@reikyoushin I don't know the exact one - if you just search for blue php elephant you'll see lots of examples, but I'm not sure the exact size/shade of blue he's getting.
 
besides that.. how much would shipping from canada to ph be? phew!
 
@reikyoushin btw you're in the philippines? In Manila by any chance?
 
1:45 AM
yep
im in ortigas now, i work in makati..
(thats not manila technically but yeah)
why?
 
Cool - I've got an Australian mate who runs an outsourcing company in Manilla - actually looks like it's in makati flatplanet.com.au/contact-us
 
2 hours ago, by reikyoushin
is there any active SO guy here from PH? seems i'm alone here T-T
what's the name?
i am in a whitelabel seo company..
honestly, there are a lot of outsourcing here now in PH.
 
flat planet - the link above.
 
ahh.. that bldg is just in front of ours
well, almost.. haha
across the street
what do they do?
ahh virtual assistants and stuff
 
yeah - it's a startup really so they do whatever people ask for - a lot of it is telesales - calling people/companies on behalf of other companies to generate sales leads. But there is some back office work as well, e.g. generating invoices etc.
 
1:54 AM
@Danack there are lots of companies like that here.. they say its cheaper here.. (a good thing for us since more people get jobs here)
especially the call centers here, if you know what i mean..
@Danack aus is +7 or +6?
 
Yeah - my friend is based in Australia, so he can outsource a job to the Phillippines, pay a good wage to someone with an education there, for about 33% of the money you'd need to pay a moron to get out of bed in Australia.
Sydney is +2 from ph I think.
 
aah so you are gmt +6?
or +10?
 
Sydney is GMT +10 hours - which means 9 hours ahead of the UK right now due to summer daylight saving
 
@Danack i was wondering.. if you are gonna create another facebook and will use cloud servers, how much would you need (just in case)
@Danack then you are right. +2 it is.. should be about lunch time there :)
 
I have no idea - and it depends more on what your software does than anything else. e.g. reddit doesn't have complicated graphs of friends posting updates to each other, each page stands by itself, so they don't need much hardware, compared to other sites where people are interacting all the time.
 
1:59 AM
for example linkedin, would that be the same as reddit?
 
Closer to reddit than twitter - as there's not much activity per day on linked in, other than just people viewing other peoples info.
 
facebook is heavy because of all the ajax requests right? then i wonder how they handle those stuff
 
Well the Ajax doesn't help - but the issue is that each person can be connected to lots of other people, and each new piece of information needs to be written to lots of places to be viewable.
If you're interested in that you should read the facebook engineering page, highscalability.com and codeascraft.com
 
@Danack will check them out.. thanks!
 
np
 
2:04 AM
theyre using MySQL?? and apache? why don't they want litespeed? hmm..
 
I'm creating a game which has multiple "stages." E.g., when the game starts, there are 5 minutes in stage #1. Once those 5 mins end, stage #2 starts. However before stage #2 can begin, a few things need to be done to the DB like count up votes to determine who's to be killed in the game. How should these functions be executed? I don't think letting the first user (who loads the page) running the functions is a good idea. any suggestions? Should something like sockets be used, or something else?
 
what the hell would a site look on google glass o.O?
 
@Jeremy but you would still see the background of the glass right? i dont think it really looks like that..
 
@reikyoushin you'll have to ask ircmaxell =/
 
2:11 AM
@Jeremy he has one? cool.
 
@Jeremy i dont know if you can synchronize anything in php.. ive tried playing this html5 game and its not synced.. dragonbound.net
but it knows that you have been delayed for how many seconds.. and will try to follow on with the rest of the players
(in case you lagged or something)
it's turn based and has counter
if you know gunbound, you should be familiar with that game
so it tries to be synced as much as possible..
 
@reikyoushin It's not like a shooting game or anything... the interface/game style is extremely simple
Basically there are player cards and two types of rounds: day and night. During day, people vote on who they think the killers are by clicking on the player cards. During night, killers kill others. The function that needs to be executed is determining who got the most votes (so we can set their status to dead in the database)
 
then couldn't it be turn based?
 
@reikyoushin Are you saying have one person who acts like the "host"?
 
2:21 AM
nope.. the server is the host
but all players will need to respond on turns
and each turn has a time limit
that way you wouldn't need to check if its synced or not
 
@reikyoushin I still don't understand... I can't change the structure of the game as I'm remaking one from a while ago that doesn't exist anymore
 
as long as the time limit follows the server time
for example, 'day' is one turn
 
@reikyoushin No no no... lagging isn't the issue. It doesn't matter if one person has a slower connection... this isn't pixel-sensitive stuff.
 
you're just concerned about the time limit being accurate right?
its like the game where you find the killer before the killer kills everyone else right?
 
@reikyoushin Nope, time doesn't matter either. It's fine if the counter says 1 on a few users' pages even though the server is at 0... there will be a notice saying that within the last 2 seconds you should be careful
@reikyoushin Killers can only kill at night, so it doesn't matter.
As long as each player has their vote in before their page says 1 second, everything will be okay.
I'm interested in knowing how to process the information once the time is up
Who inserts the data collected into the database?
 
2:25 AM
well js sockets could certainly do that.. just dont know yet how
the same way live chats are implemented..
 
I don't want users to tamper with this stuff though
 
 
2 hours later…
4:29 AM
MYSQL HELP NEEDED
Having a table with column "salary"
I want to increment salary by 2000 if salary is less then 5000
in every row of table
 
@DextOr update table_name set salary = salary + 2000 where salary < 5000
 
lolzzzzzzzzz thats it @YogeshSuthar
thnks @YogeshSuthar
 
@DextOr welcome. :)
 
OK another problem
there are two tables ; Authors; books
print names of authors who have written more then two books
 
4:36 AM
do you have a reference from books to authors?
 
SELECT Authors.* FROM Authors WHERE 2 < (SELECT COUNT(books.*) FROM books WHERE books.author = Authors.id)
 
Bingo ;>
thanks @Jeremy
 
@DextOr No problem. I'm not sure if a join would be faster, though.
 
can u tell why we are using Authors.* instead of Authors
???
 
Authors.* means all column of Authors table.
 
4:39 AM
@DextOr Just to make it more clear that we're not touching anything in books, but you can go ahead and use * (if it works and doesn't select anything from the books table)
 
ok i will try
 
A question, why this query takes 2.2228 seconds? How I can optimize this:
SELECT count(*) AS total
FROM (`jobs_job_posting`)
WHERE `end_date` >= '2013-08-17'
There are 30000 records in jobs_job_posting table
 
try select count(id) as total
also create index of end_date column in that table.
 
@YogeshSuthar I already created end_date index. Regarding count(id) or count() I have read this: "COUNT() always counts the number of rows in the result. If you write COUNT(col1) it counts the number of times col1 is not null." in here: mysqlperformanceblog.com/2008/09/20/…
so don't you think count(*) is more faster than count(id)?
 
never tried. ;-)
 
4:49 AM
@YogeshSuthar :)
I will try to be sure then ;)
 
@Feeds you suck
@JamshidHashimi they return two different values
 
@tereško I just need the total records count. Currently count(*) do not provide me a faster solution.
 
@tereško How's that?
7
Q: In SQL, what’s the difference between count(*) and count('x')?

AndrewI have the following code: SELECT <column>, count(*) FROM <table> GROUP BY <column> HAVING COUNT(*) > 1; Is there any difference to the results or performance if I replace the COUNT(*) with COUNT('x')? (This question is related to a previous one)

 
179
Q: Count(*) vs Count(1)

super9Just wondering if any of you guys use Count(1) over Count(*) and if there is a noticeable difference in performance or if this is just a legacy habit that has been brought forward from days gone past? (The specific database is SQL Server 2005.)

119
Q: In SQL, what's the difference between count(column) and count(*)?

Bill the LizardI have the following query: select column_name, count(column_name) from table group by column_name having count(column_name) > 1; What would be the difference if I replaced all calls to count(column_name) to count(*)? This question was inspired by How do I find duplicate values in a table in ...

 
> There is no difference.
Oh, it looks like the null incident is the only difference
Didn't you just go to bed about five hours ago @tereško?
2
 
@Jeremy yeah, the null incident..
This note from the latest link make me to continue using count(*): "One thing to note - if you are using COUNT(col) (don't!) and col is marked NULL, then it will actually have to count the number of occurrences in the table (either via index scan, histogram, etc. if they exist, or a full table scan otherwise).

Bottom line: if what you want is the count of rows in a table, use COUNT(*)"
@tereško Thank you.
 
.. i guess you do not even know what is for
 
@tereško yeah I don't :)
 
guys, ive got a user table with a foreign key to the same table.. i tried creating a foreign key but when i add a user, i need the top most to be nullable. should i just have created a pivot instead of pointing to self?
@JamshidHashimi close vote
 
5:22 AM
@reikyoushin hmm didn't participate into one
 
you need 3k to be bale to CV..
 
@reikyoushin ok..
 
may I ask something? I wanna find room chat codeigniter but hasn't find yet in this website
 
@ashrovy I think you can ask here.
 
@ashrovy SO doesn't have chatroom for each technology..
 
5:35 AM
oke :-)
I have problem in my own coding, this post: stackoverflow.com/q/18270501/2673614 Some programmer had answer but, when I try, It doesn't change anything
 
Wonder why many people pronounce alarm as alaram
 
 
1 hour later…
6:39 AM
hello?
 
hi
I want to integrate the "Login with Google|Twitter|LinkedIn" feature in my website, just like here on SO
How to do that?
On Google, I get these two things
1- Using OAuth 2.0 for Login
2- Note: If you are planning to provide a sign-in with Google feature, we recommend using Google+ Sign-In,
what's the difference? I see OAuth 2.0 in both
 
haii all
0
Q: Remove value from array in match case with other array

IceCream Sandwitcham working with on some comments feed. there are two arrays arrayone is with comments and arraytwo is with self defined values if the value of arraytwo is present in arrayone then that value should be removed from arrayone those are here $arraytwo = array("cool","lo","love"); Array ( [0] =

can anyone solve this
 
Hi..anyone with SCORM experience?
have a question to ask about the player
in PHP
 
@ronnieaka plus services include all google user details
 
6:58 AM
any hints??
 
7:12 AM
Hi
I got a error message when sending a push notification. Error is " Warning: stream_socket_client() [function.stream-socket-client]: SSL operation failed with code 1. OpenSSL Error messages: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure"
@Mr.Alien @swapnesh @IceCreamSandwitch please help me...
 
Good morning Sir!
@reikyoushin if you ask the person who ships, I bet it would make more sense to share the words.
 
7:27 AM
early
morning
 
7:39 AM
Good morning Sir @JoeWatkins
it's coffee time
 
8:08 AM
Morning
 
Good morning Sir!
 
Hi all!
 
0
Q: How to convert json encoded PHP array to an array in Javascript?

OM The EternityI am fetching the an json encoded array using AJAX from a php file, but in javascript I need to use it as an array, how can I create an array in Javascript My AKAX call to PHP File: $.ajax({ type:"POST", url:"ajaxfetch.php", success:function(result){ alert(result);...

 
8:27 AM
@hakre mornin, long tym huh
 
@IceCreamSandwitch so in openID login of Google, I'll not email of the user? That's all I need for signing up on my webapp
 
@Mr.Alien tym Sir?
 
@ic
@IceCreamSandwitch Why you have removed message ?
 
morning
 
@hakre yes sir, I should gift you a watch now so you can keep a track of being present in the room
 
8:33 AM
hi guys
I want to create technical blog which can contain code snippets and images about programming concept.can someone suggest me some good theme or template for that ?
 
@Mr.Alien Oh thank you sir! :D
 
@MehulJoisar Most of us dislike WordPress here, if that's where you're heading.
Did you try anything, or perhaps make your own, or did you just come here to ask for suggestions?
 
@MehulJoisar Wordpress is especially bad with that so I would choose a different blogging system first of all. What did you consider to use?
 
@MehulJoisar Wordpress. As Hakre mentioned it's not great but it's easy. If you're inexperienced at this sort of thing.
 
@MadaraUchiha I am android developer.I am familiar with core php and html templates.I am just asking your suggestions so that I can move in right direction.
@hakre: Thanks for the suggestion.give me any alternate solution by which I can achieve it
@Fabien: thanks for response,kindly suggest me theme name so that I can have a look :-)
 
8:37 AM
Theme as in design?
 
@MehulJoisar Just search on themeforest
 
^
 
Whatever you are asking is highly subjective
 
@PeeHaa: ok.actually I asked here because it may happen that many developers are used to write the technical blogs.so I may get good suggestions due to their experience :-)
 
@MehulJoisar Many real developers will suck at design
imo
 
8:39 AM
@Fabien: yes,anything.like theme or template.
 
@MehulJoisar It's down to you. Just browse through a template site for something you think suits the design aspects required for your blog. Once you've selected a blogging platform. Depending on the importance of the blog, you could use a blogging website like Blogger if it's just something you're doing for yourself.
 
@PeeHaa: yes,but there may be many developers who are doing good
@Fabien: that sounds logical.thanks
 
8:52 AM
hey guys please check this and give me appropriate answer
http://stackoverflow.com/questions/18267847/how-can-i-install-xdebug
 
Why do I have the honor to be invited into some random chat room?
 
hey Peeha can you help me
 
no
 
And stop spamming
 
8:54 AM
what spamming?
 
Inviting people into some room and posting links to your question
 
okay
is that spaming
?
sorry i dont know actually
 
What DB abstraction do you guys use?
 
@Fabien I am currently writing one :P
 
Oh? Github?
Or literally writing one right now.
 
9:01 AM
@Fabien I started 5 minutes ago :P
 
oh heh. How come you're writing your own?
I mean as opposed to using PDO or something.
 
Not the same thing
PDO doesn't rewrite the queries for you for other database engines
And I need to support both mysql and postgres for my project :(
 
@hakre :D here you go --O-- <-- tik tok
 
@MehulJoisar there is one blog that is based on laravel 4 which looks like quite what you're looking for but I don't remember the name. Maybe I have it in history
@MehulJoisar wardrobecms.com <- there is is.
 
@hakre That looks kinda nice
 
@igorw what are you looking for in a comment system? cc @all others
 
@MehulJoisar I blog on wordpress.com but it's wordpress based and actually quite akward for tech-blogging. I know from practice you can say.
Many devs are blogging via github nowadays and that's quite fine!
 
9:31 AM
w
 
9:53 AM
 
Morning
 
@Mr.Alien Aaaah the filthy spam whore made it back :)
 
@PeeHaa expect some more till 10-15 mins from now
 
Hmmm need a good weekend project.
 

« first day (1036 days earlier)      last day (3909 days later) »