« first day (1437 days earlier)      last day (3511 days later) » 

12:15 AM
15 hours ago, by Levi Morrison
Oh wait, it passed.
 
12:26 AM
@sectus !! for?
 
12:50 AM
Now php ?? looks like js ||
 
@sectus well... !!$var in php is NOT NOT $var, so that would break BC hard
 
... you are right. But i am talking about integrity. If you add or operator it's would be logical to add and.
 
@sectus so you'd like the reverse of ?? also?
 
maybe dont {} while()?
 
@derp cool
:)
reverse of for ?? would be add a logical not ! for the check
 
1:06 AM
I mean that php will have ?? operator. It's very similar to javascript || operator.
 
btw i'm using this format now, so IDGaF for ?? even if it's a nice feature: isset($_GET['where']) && $room=$_GET['where'];
and ofc instantiate $room before properly
 
JS has && operator also. It would be logical to implement it also.
@CSᵠ , this statement has doubled information.
 
@sectus just read the docs :)
 
@CSᵠ , sorry, what do you mean?
 
nvm
@sectus you can do that in php right now
 
1:11 AM
@CSᵠ , yes, i could. But....
 
but $var=$this || $that; will set $var to a boolean
 
js: variable = expression1 || expression2;
php: $variable = expression1 or $variable = expression2;
 
yup
 
But ?? is going to be implemented (8 of 8 votes). But "one good turn deserves another", IMHO.
 
@sectus just a bit more of a hassle
@sectus looks like it, can't see many reasons to vote against it
nice feature, should be welcomed
 
1:56 AM
@Ja͢ck Hi there.
 
morning @LeviMorrison
 
I'm in Switzerland!
 
They have Internet in the Alps? :)
 
@LeviMorrison , Is chat the first thing that you have visited?
 
@Ja͢ck Well, it's not very good Internet :D
 
2:05 AM
hehe
 
@sectus No, I've been here nearly a day now ^^
 
@LeviMorrison Business or pleasure?
 
Both, mostly business though.
Plus, Switzerland is expensive o.O
 
it can`t be that expensive
 
11 CHF for a really lame burger is expensive.
One "scoop" of gelato is 3.50 CHF... and it was very, very small.
For $5.00 you can get a half-gallon of ice cream back home.
This was maybe 4oz.
 
2:17 AM
gelato is a different beast than cheap-ass ice cream though
 
Agreed, but the ice cream I'm referring too isn't the cheap stuff.
 
How do you check if table exist in PDO way?
    Trying to check if table exists in MySQL via PHP PDO query?

    if(count($Establishment->query("SELECT * FROM Application_Setting"))>0){
         echo 'Exist';
    } else {
         echo 'it doesn't exist';
    }

**Error i get within Browser** <br>
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'involive.application_setting' doesn't exist' in /Users/Vilvas/Sites/config.php:33 Stack trace: #0 /Users/username/Sites/config.php(33): PDO->query('SELECT * FROM A...') #1 {main} thrown in /Users/username/Sites/config.php 
 
Thats not PDO format @sectus
 
@BrianS , you could convert this code to PDO simply.
But better to use this one query: stackoverflow.com/a/1525801/1503018
 
2:29 AM
@sectus What you mean by converting? i should just request it this way mysql_query("SHOW TABLES LIKE 'myTable'"); even though i have PDO Connection to database
 
Ok, i'll rewrite it for you.
 
Thank you, it did work though
Sorry now when i hot refresh i get an error
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'application_setting' already exists' in /Users/username/Sites/config.php:35 Stack trace: #0 /Users/username/Sites/config.php(35): PDO->query('CREATE TABLE Ap...') #1 {main} thrown in /Users/username/Sites/config.php on line 35
 
$sth = $pdo->query("SHOW TABLES LIKE 'myTable'");
if ($sth->fetch())
echo 'tables exists';
else
echo 'tables not exists';
 
oh, you rewrote that one.
 
: )
 
2:45 AM
Thanks
 
3:18 AM
@BrianS Check out the INFORMATION_SCHEMA database.
 
 
2 hours later…
4:52 AM
moin
 
I don't want to go to work
 
@JoeWatkins morning, isn't it like 4am over there?
 
nearly 6
which is just like 4am, so, yes ...
 
@tereško surprisingly, i have no issues with going to work this monday ... the haze outside is bad, so sitting in paid-for air conditioning is worth it :)
 
it's raining outside
 
5:01 AM
rain would be very welcome, but alas.
 
it's raining man, aliluya...
 
men*
one drop doesn't make a shower :)
 
5:52 AM
hi, um what is the "cost" of any hash ing algorithm? does it determine the number of iteration?
 
@blackbee "of iteration" what?
 
6:35 AM
posted on September 22, 2014 by kbironneau

/* by Diogo Mateus */

 
Hello,
 
morning
@LeviMorrison Welcome :)
Where are you?
 
Is it hard to move a mailbox from webhost X to webhost Z without downtime?
 
7:06 AM
you can do it without downtime, but there will be some issues with concurrency
 
there will be some period of overlap
 
you basically set up second server, and when it's up and ready, you switch the MX entry in DNS
 
SMTP is made to be resilient against network route changes.
 
you could also adjust the TTL (make it smaller then usual) for old entry few days prior
 
yup, that helps speed up the transition.
 
7:08 AM
@Duikboot just keep in mind that we are NOT professional sysadmins
 
Well im doing a lot of front-end but they expect of me that can do that all too -_-'
 
@Patrick In Zurich.
 
7:29 AM
hello
everyone
 
M or ning
 
morning @RonniSkansing
need some help from the community
 
With what?
 
with webservices calling, using free webhosting
 
So...
 
7:34 AM
Could you formulate it into a question, a minimal coded example in a pastie/pastebin would also be great
Morning @Duikboot
 
Good morning, @RonniSkansing.
 
was reading http://markroland.com/blog/restful-php-api/ blog and used the webservice that he has mentioned but I dont know how to call it
i have uploaded it to my server ie. arijitmukherjee.net84.net
where my index/default pages were lying
 
1 min ago, by Ronni Skansing
Could you formulate it into a question, a minimal coded example in a pastie/pastebin would also be great
 
good morning
 
7:37 AM
Morning Sergey and Florian
 
morning
 
morning
 
@derp It's the only thing you can do below the threshold, but it would be easier if it is just closed voted :)
Morning all
 
user1642018
hi all.,
 
@JanDvorak It's not nice to ask for downvotes in this room.
 
user1642018
do i have to check whether the cookie is present before removing it ? i.e. setting its expire time in past.
 
user1642018
?
 
user1642018
i am doing like this
 
user1642018
8:03 AM
setcookie($id, "", time()-36000 , "/");
 
user1642018
do i have to check using isset ?
 
@Ja͢ck what about "review-pls"?
 
Sure, review is objective enough.
 
user1642018
is it a good practice to remove cookie without checking using isset ?
 
I love to make closing votes. :^ )
 
8:04 AM
@AMB it's faster to check than to set an extra cookie to the client
 
user1642018
@JanDvorak thanks
 
Also, it's harder to verify a cookie isn't present when it's reset at each connection - expiry takes time.
 
hey guys, where can I download the experimental phpstorm thingy?
 
@JanDvorak sigh here we go again
 
user1642018
@JanDvorak so its good idea to chcek first , i was hoping to receive notice but didnt get one , so i thought its ok to use it that way.,
 
8:07 AM
@MoshMage , google for "phpStorm EAP"
 
morning
 
@AMB you won't get a notice when you try to sort an array by shuffling it repeatedly ;-)
 
user1642018
@JanDvorak okie., thanks for your input.
 
0
A: Remove cv-pls tag from chat rooms

Second RikudoLet me answer each of your bullets one by one. That is true. It's an unending cycle. Crap questions cause unhappy users. Unhappy users become more aggressive in their moderation methods, which causes more unhappy users. The way to prevent it is not to fix the regulars. It's to better prevent cr...

 
@sectus thank you :)
 
8:09 AM
@SecondRikudo please quote the points you reply to
 
@JanDvorak That sounds suspiciously like work
Seriously though, I really have to go, could you do it for me?
 
@SecondRikudo I don't have the privilege; anyone with full editing power willing to volunteer?
 
@JanDvorak Just suggest an edit
I'll approve it from my phone
 
roger that
"We are intelligent people..." speak for yourself would ya you insensitive clod — PeeHaa 21 secs ago
5
 
Can I edit in meta.stackoverflow.com/questions/271684/… as a link behind " the quality of the questions on the site has become unbearable" @SecondRikudo ?
 
8:16 AM
@PeeHaa Feel free
What do you say? Chance for reversal?
 
8:29 AM
@SecondRikudo how much is needed?
 
@JanDvorak +20/-5
-5 is already cleared
 
@SecondRikudo in which case you're not going to space today
 
posted on September 22, 2014 by kbironneau

/* by el_curtismo */

 
8:58 AM
@DaveRandom pierre @ php.pecl
 
just made the perma-jump from timestamps to datetime.. It makes life so much easier :)
 
timestamp - mysql type?
 
each of them have a specific use
it's like saying that you made a perma-jum from integers to floating point
makes about the same amount of sense
 
oh, nice.
 
Javascript doesn't have integers
 
9:07 AM
SysAdmin doesn't let me install new stuff; I tried extracting PHPStorm to a folder using 7zip and it was a success!!
 
@JanDvorak actually untrue, but this is not the JS room
 
@sectus no just the use of datetime objects in php..
 
see "asm.js" for details
 
can anybody help me with getting started with php and webservices?
 
@ArijitMukherjee but... why?
 
9:11 AM
sorry didn't understood @JanDvorak
 
@ArijitMukherjee , install wordperss and use it.
 
@sectus i want consume those services in android application, i have never been into any of these technologies i'm from .net technologies background
 
@ArijitMukherjee start with learning the basics on language. This one is quite ok: amazon.com/Beginning-PHP-5-3-Matt-Doyle/dp/0470413964
 
Morning
 
@ArijitMukherjee also, what is preventing you from using .Net to make services which android can use ?
 
9:15 AM
@tereško its not free :) :p
 
you have to pay to use .NET ? (sorry, I have never used MS-dev-stack)
 
yes for hosting ans Database they are not opensource :)
M I doing anything wrong in this?
http://pastie.org/9583361
 
you CAN use MariaDB and Postgre with .NET
 
yes in that case I can use mysql as well
 
php.net/manual/en/function.http-response-code.php <- there is a function for setting the response code, you do not need to send the header manually
 
9:17 AM
but still none of the free web hosting supports .net framework :(
+1 @tereško thanks
but how can I send a simple string and get a response from this file
 
stackoverflow.com/questions/25970520/… I'm not a internal but even I can see where this thread is going :x
 
hmm .. it has been some time since I tried to do something "simple", also, your code is buried in comments =/
 
wait let me edit it
 
or if u have a demo where a w/s is created and called using javascript
 
9:25 AM
I am kinda unsure what most of it does, but what do you get, when you try to query that script ?
 
Back at workk!
 
right now i just pasted the code into my index.php and hosted it on server
 
yes, but what do you see when you call http://who.cares/?format=json ?
an error, a blank page ?
is error reporting enable on that box ?
if you see "white page of death" , it usually means that there is a fatal error in your code and server has set "display_errors" to false
 
PHP
Hello Everyone!
is there any alternative of http://php.net/manual/en/sdo-das-xml.examples.php
As this package is no longer updated. :(
I am basically looking for any kind of package to use XML schema with PHP
 
{"code":0,"status":404,"data":null}
@tereško this is what I'm getting
arijitmukherjee.net84.net/?format=json
notfound error
 
9:39 AM
@AndreaFaulds looks like you're causing some trouble with your RFC :P
 
#shenanigans :)
 
Morning!
 
well, I kind of get the detractors though
@PaulDragoonis hi
 
ASR
hi all
i have configured Virtual host in in apache with the followed tags.

NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot "/usr/doc"
ServerName www.example.com
ErrorLog "/usr/doc/example_error_log"
CustomLog "/usr/doc/example-access_log" common
</VirtualHost>
It's working fine when i try to access www.example.com with the respective index page. But localhost is not giving the test page , instead it's giving the same www.example.com's index page. How to get the default localhost's index page.
 
he screwed up on a controverted RFC... he couldn't expect any better
 
9:48 AM
@PaulDragoonis morning!
 
10:02 AM
^ What a bell end.
 
if we'll delete the question, will the badge disappear?
 
morning
 
Morning niki
 
@NikiC heya!
 
10:19 AM
morning
@NikiC in php.pecl ?????
 
@JoeWatkins now am :)
 
topic is rfc changes
 
@Joe log?
 
will get it one sec
 
thx
 
10:23 AM
np
 
@NikiC @JoeWatkins Would it be feasible / doable / sane to have a private const FOO in a class context?
Also @others :)
 
doable, not sure about the rest ... probably not sane ...
 
:(
 
@ArijitMukherjee sorry .. back from lunch
the issue seems to be in the conditionals
instead of if( strcasecmp($format,'json') == 0 ){ I would use if (strtolower($format) === 'json') {
or better:
switch (strtolower($format)) {
    case 'json':
        .....
        break;
    case 'xml':
        .....
        break;
    default:
        .....
}
ok ... actually I would be using classes and polymorphism for it, but for that you would have to actually learn some advanced PHP
(assuming that you already understand OOP from your experience with c#)
 
yes
the concepts are clear with me
@tereško i think when I'm refreshing my aite arijitmukherjee.net84.net
its printing the table and json format bydefault
after changin to 'strtolower'
 
10:38 AM
that "table" is the error message, generated by XDebug
but since you set the content type to JSON, it does not get rendered
it says:
 
@tereško using what, exactly? an interface for all the concrete classes like format(), and a factory to get the correct one?
 
> Wrong parameter count for strtolower() in /home/a1964071/public_html/index.php on line <b>45
 
so the switch would be in the factory?
honest question
 
@FlorianMargaine probably something along the lines of $output = new $format;
 
10:41 AM
you use factory ONLY if you need to do something else with the instance before or after it's creation (assembling dependencies or calling prepare() - respectively)
 
How's work @tereško?
 
@Fabien I am making a minimum viable product for a wordfuckingpress plugin
 
lol. What a waste
 
Sometimes I think that they just want to wast my time
especially since I am ONLY developer in the company who has never worked with wordpress before
 
It is your choice though
 
10:47 AM
@tereško ok not after converting my if conditions to swtich
i'm getting {"code":0,"status":404,"data":null}
site.com/?format=json
 
@JoeWatkins What in specific is not sane about it?
 
seems to work as you have written it
 
yes :) thanks :)
i think its working fine now
isnt it?
 
@ArijitMukherjee did you star that post?
 
10:57 AM
@Leigh xinchen @ php.pecl
 
what is that supposed to mean?
 
you're wanted, by laruence
 
is that IRC?
 
yeah
#php.pecl on EFNet
no irc client @Leigh ?
 
@JoeWatkins just getting one :p
 
11:09 AM
cool
 
Let's talk big(ish) database solutions.
 
@Fabien Googles crawler index
 
If I had to store billions of rows of data but the function of the data is simply to 'select where indexed = 0' and 'update indexed = 1 where id = xx'. The information held is only around 500 chars. What would you recommend?
 
A loop.
 
Older data isn't as relevant as newer. Realistically we could/will archive off all but the most recent millions. But the archived data can come in to play in future for selecting.
So to be able to select through the archived is a necessity.
What sort of DB solutions would you guys look at?
 
11:16 AM
@Fabien the data is numerically indexed?
 
while((row = query("select latest where indexed = 0")) {update index; sleep a little}
 
@Fabien flat files + SSD + RAID + 1928730982038GB RAM
 
The data all gets pushed to elasticsearch. When added to elasticsearch we change the row to notify us it's been indexed to ES.
@CSᵠ heh
 
@Fabien you have a sample row/schema?
 
id | Data | indexed | dateAdded
1      foo     0       2014-12-10 23:33:33
We'd select that. Insert to elasticsearch, update it to indexed=1
Once this is done we most likely won't select that row again for a long time, hopefully not ever.
 
11:19 AM
select based on id only?
 
select on indexed = 0
update on ID
that 'data' will just be a serialized array of around 500 characters.
 
@Fabien flat files, csv data. from your example filename _1 contents 1418247213|foo
 
Why that method?
 
^ precedin underscore signals Not Indexed, 1 is id
 
It'll be a lot fo files.
 
Why files anyhoo?
 
@FlorianMargaine derick is okay with changes ... good for him ...
and us ...
 
> It's one thing to put one million files into a filesystem, but what about one billion? Ric did this experiment on ext4, using the homebrew array described above... Actually creating those one billion files, instead, took a full four days. Surprisingly, running fsck on this filesystem only took 2.5 hours - a real walk in the park. So, in other words, Linux can handle one billion files now. src
@Fabien just an idea, keep it open
@Fabien why would you think not?
 
11:42 AM
@JoeWatkins yup. He sounds like he wants things to move on and improve.
I'll try to do the (valid) changes he's asking for some evening in the week
 
Hi, i wanna know about URL Masking , to quote an example if we click on stackoverflow chat we get chat.stackoverflow.com, how to achieve this, if some 1 can link me some post/question, it will really be helpful. I want to mask URLs in some what similar way.
 
@CSᵠ No reason just not heard of it done that often.
 
Hi. Anybody knows flow of Joomla Component ?
 
@JoeWatkins well this is exciting, I see why you all hang out on IRC now
 
he'll come back, probably travelling
 
11:46 AM
I think I'm going to start referring to everything as travelling. Make a coffee.. travelling. Go to the loo.. travelling
 
Hi, i wanna know about URL Masking , to quote an example if we click on stackoverflow chat we get chat.stackoverflow.com, how to achieve this, if some 1 can link me some post/question, it will really be helpful. I want to mask URLs in some what similar way.
 
@noobie-php don't spam
 
@Leigh brilliant, I will join you ...
(not to the loo ... I meant in referring to everything as traveling .. in case not clear)
 

« first day (1437 days earlier)      last day (3511 days later) »