« first day (1136 days earlier)      last day (4038 days later) » 

00:00
m'kay, if it works. I think this is wrong though:
try_files $uri /pig-latin-translator/public/index.php?$args
Appending the args is (apparently) only appropriate if that's the last parameter in the try_files, and so it gets reprocessed.
If it isn't the last argument, then it should just be:
try_files $uri /pig-latin-translator/public/index.php
and the query is passed to php-fpm via
fastcgi_param QUERY_STRING $args;
Or more completely:
Like on yours
    set $originalURI  $uri;
    try_files $uri /pig-latin-translator/public/index.php =404;
    fastcgi_param  QUERY_STRING  q=$originalURI&$query_string;
yeah - like mine. Either have the frontcontroller as the last parameter with the args - and have it reprocessed, or manually set the query_string.
Do you think it's better for me to set the static content paths in nginx or in the code?

I can now access the URLs at raspberry.pi/pig-latin-translator/public/index but obviously raspberry.pi/pig-latin-translator/index is better. Which works but css/images are off
It would be better to write another location block to catch those and try to serve them directly from the correct location on disk.
I think having something like:
 location ~* ^/pig-latin-translator/(.*)\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|svg|woff|ttf)$ {

		root  /var/www/btsync/pig-latin-translator/public

        try_files $1.$2 $uri;

        #access_log off;
        expires 24h;
        add_header Pragma public;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
   }
might work?
That should catch any requests to static files, and just serve them directly.
I don't use 'root' in my location blocks - as I just have sub-domains for each site, and then can have separate server blocks, rather than fiddling with root blocks so can't be sure.
00:17
ty
Thanks for all your help @Danack :) time for bed.
np mate
00:40
lol at the 'graduate' position: careers.stackoverflow.com/jobs/43357/…
I've just seen the most beautiful phrase on SO EVER
This is part of a huge query I was writing, and microsoft word made the space nearly invisible, thanks — Marshall Tigerus 8 mins ago
2
@zerkms didn't you know MS Word is the bestest IDE
@zerkms At my last company, the changes to databases needed to be requested in word files. Which were then printed out and signed before being done.
@Danack I had some similar process with applying patches on prod on my previous job
@crypticツ I use ms paint
00:55
>.<
474
Q: Why is this program erroneously rejected by three C++ compilers?

James McNellisI am having some difficulty compiling a C++ program that I've written. This program is very simple and, to the best of my knowledge, conforms to all the rules set forth in the C++ Standard. I've read over the entirety of ISO/IEC 14882:2003 twice to be sure. The program is as follows: Here i...

this ^ ^ ^
@zerkms That, is actually a thing.
33
Q: How did this person code "Hello World" with Microsoft Paint?

Eamonn O'BrienI have just seen this within the past few days and cannot figure out how it works. The video I talk about is here: It's the top rated answer from this Stack Overflow question: Why was this program rejected by three compilers? How is this bitmap able to show a C++ program for "Hello World"?

Ah - didn't see it as an answer.
 
1 hour later…
02:01
everyone on this site is a complete dick... holy jesus. I'm new to this, and I am just looking for help. — user3029650 50 secs ago
After posting the same crappy question two times.
@tereško yes walking dead with aliens instead
@tereško Look up some documentation, modifying state is not part of the controller anymore, controller is just plain navigation/request logic. State alteration should be kept to a minimum even in controllers to provide maximum portability to other entry points that can't easily be mapped to the web routing strategy such as command line arguments! I think this discussion has gone far enough into comments, you're free to think what you want as do i :) — Mathieu Dumoulin 43 mins ago
02:40
Heya
Server Error in '/' Application. on stackoverflow.com
Maintenance i think, nevermind :D
02:55
Cool, I saw a job post for Senior PHP Developer / Leam Lead ... I'd love to be a Leam Lead, if I knew what that meant =P
@ircmaxell Damn, I'm still thinking about that tread watch .. if only it was, like, below 10k :)
lol
nice
@tereško hmm, if the controller doesn't alter model state any more, then what is? :)
dunno ... manage active records
03:04
true, there's that.
> Knowledge of Facebook Graph&FQL API and Yii Framework is MUST
Oh gawwd, not that!
03:37
well ... it's not a wrong answer, only badly worded one
It should still be discouraged imo.
he's arguing that public static function methodName() { .. is equal to static function methodName() { .. because if you do not define the visibility, then PHP defaults to public
But that's not what OP is after.
at least that's how I understood it
there is that too
OP is wondering if it's okay to call a static method as an instance method.
03:48
interesting. I wonder why that doesn’t even raise a notice.
which ?
@toscho why it doesn't raise a notice is also described in my answer on the same qn.
Ah, I see, PHP calls the method statically, ignoring the notation.
So -> is converted to :: silently.
this is meh
Not really ... -> and :: are actually the same thing, they both resolve the method from its left hand operand.
It's just a matter of applying different rules.
But using :: for a non-static method raises a notice.
so they are different, it is just not very intuitive
03:58
That's not always true.
I can do self::bla() where bla() is an instance method ... as long as the call is made from another instance method.
My rule of thumb is, if ::method() is used either from within a static method or from outside the class, it gets called in "static mode".
get only INSERT,DELETE,UPDATE queries from mysql general log
tailf /var/log/mysql/query.log | grep -E '[[:space:]]+[[:digit:]]+[[:space:]]Query' | grep -ivE 'Query([[:space:]])+(/\*.*\*/)?(select|set|show|commit|rollback|use)'
any thoughts about this regex ?
04:38
Hello, I just wanted to ask a quick question about getting the size of a image during an upload. I've been trying to save a temporary file and then open it to get the file type and the image size, but that hasn't been working. Was curious if there was a better way to do this or not.
So you tried to get the image size, which hasn't worked, but you still want to get the image size?
Were you using getimagesize()?
It is required for what I am doing, I'm getting an lstat issue, so it's not even getting a chance to read the file.
Could you pastebin the relevant pieces of code that you're currently using?
Sure, give me a second.
Why are you doing mysql_real_escape_string() for something that you're using for fwrite() later? @user2994429
04:50
I didn't put my entire code in there.
MYSQL Is in use.
I meant fwrite().
So you believe it is the escape string causing the issue?
My point is that SQL escaping is only needed when you store the contents into MySQL.
Sorry, yes. Escaping the string there doesn't make sense.
Alright, one moment.
What's inside that variable anyway?
Is the whole image inside?
04:52
Same issue
Yes, it is linked to the input type 'file'.
So it is saving the image as a tmp file.
Warning: filetype() [function.filetype]: Lstat failed for Resource id #7 in xxxxx on line 34
Are you sure you have added enctype="multipart/form-data" in your form?
Argh, git branch <something> should also do ./buildconf --force && ./config.nice =P
Well.
I just added that enctype.
It seemed to ignore the data though? Skipped the 'die' command as if it skipped the if.
Basically the uploaded file is made available via $_FILES and not $_POST.
So, $_FILES['Newpicture'] is an array with upload information, such as name, temporary file location, any errors that occurred while uploading, etc.
Good luck!
Correct
or just use filesize() function
The file size is already part of the $_FILES info struct.
You don't need to waste a call on that.
05:05
Oops!, I forgot
05:17
Well.
Thank you, that is far easier than the older method I was trying to use.
06:02
Hay Can anyone help me simplifying this if else statement.. I am confused with it

if( isset( $arrValues['iname'] ) && $DirectSet ) $this->m_strName = trim( stripcslashes( $arrValues['name'] ) ); else if ( isset( $arrValues['name'] ) ) $this->setName( ( true == $StripSlashes ) ? stripslashes( $arrValues['name'] ) : $arrValues['name'] );
@ScoRpion format the code in chat, highlight the message and press Ctrl+K
if( isset( $arrValues['iname'] ) && $DirectSet ) $this->m_strName = trim( stripcslashes( $arrValues['name'] ) ); else if ( isset( $arrValues['name'] ) ) $this->setName( ( true == $StripSlashes ) ? stripslashes( $arrValues['name'] ) : $arrValues['name'] );
@crypticツ This is a one line code.. thats why i got confused
oh, I thought you just hated braces =oP
@crypticツ :) lack of braces confuse me
that too with so many nested if's
if (isset($arrValues['iname']) && $DirectSet) {
    $this->m_strName = trim(stripcslashes($arrValues['name']));
} elseif (isset($arrValues['name'])) {
    $this->setName((true == $StripSlashes) ? stripslashes($arrValues['name']) : $arrValues['name']);
}
self-explanatory, the last line is a ternary assignment for the setName() argument value
06:11
@crypticツ Thankyou so much but i did upto this, the confusing part is in last line
Could u please explain me the last line

    $this->setName((true == $StripSlashes) ? stripslashes($arrValues['name']) : $arrValues['name']);
it can be expressed as...
if ($StripSlashes) {
    $this->setName(stripslashes($arrValues['name']));
} else {
    $this->setName($arrValues['name']);
}
if (isset($arrValues['iname'])) {
    if ($DirectSet) {
        $this->m_strName = trim(stripcslashes($arrValues['name']));
    } elseif ($StripSlashes) {
        $this->setName(stripslashes($arrValues['name']));
    } else {
        $this->setName($arrValues['name']);
    }
}
end result.
Also big fat warning: if you're using stripslashes, your code is probably broken to begin with, as nothing anywhere should ever be adding slashes to anything ever. Ever. Ever. EVER.
@crypticツ Cool .. And thankyou everyone
06:14
EEEEEVER.
^^ That
@crypticツ I Have never come across this sort of code ... (Ternary Operator ).. Just have heard It.. :)
@ScoRpion pro-tip: don't abuse the ternary operator.
good morning
nest ternary operators
06:18
Nest them without parens.
For the ultimate in future hatecode.
job security
^ that
@AlmaDo Acknowledgement of universal greeting.
quick silex routing question....
I have this:
$app = new Application();
$app->get("/{partner}", function (Application $app, $partner){
    return "$partner";
});
$app->get("/{partner}/{view}", function (Application $app, $partner, $view){
    return "$partner $view";
});
06:22
kay
why not return a Response()?
and I want the first route to forward to /{partner}/index
You mean a sub request?
I guess... I have something I can search for now :)
You could also consider calling a shared function / method with "index" as the partner.
Fork! I have to write 14 test cases because a behaviour went from emitting a warning to a fatal error =/
@jack ... duh ... there is the simple solution... thanks as always
06:29
Okay, yay ... test cases reduced to 6 =D
$partnerController = function(Application $app, $partner, $view = "index"){
    return new Response("$partner $view", 200, ["Content-Type"=>"text/plain"]);
};

$app->get("/{partner}", $partnerController);
$app->get("/{partner}/{view}", $partnerController);
win
Yeah, that would do it :)
use Node.js
Or Aerys, when it comes out =D
Aerys? can you give me an idea what it is?
It's a web server written in php, cc @rdlowrey
i tried searching about it they just give me Aerys as Aerys II Targaryen lol
06:55
haha yeah.
the guy I've cc'ed above will be able to tell you sth more about it.
But it comes with web sockets support, which is awesome cool.
ok now im interested
searching
morning
hi, @JoeWatkins
good afternoon
07:10
morning joe
pow() is now a language construct ... oooh ahhhh.
what??
Not now now.
07:12
What does that do for me?
In my RFC now.
@Jack why?
@Orangepill Your script performance will go through the roof!
Why make it language construct?
okay...
07:13
For one, it was easy to do.
mornin'
And second, it has all the performance and gmp features of the operator.
hello, @tereško
So, even if they vote 'no' for the operator, without changing code developers can still reap some benefits.
10**2 shorthand?
07:14
Yeah, so what I've done now is basically 10 ** 2 is internally equivalent to pow(10, 2).
As in, the same opcode is used.
Before that, pow() was still a a regular function.
@Jack can you give me a link about Aerys?
@Ramz not public yet :(
u know dmitry doesn't like adding language constructs
(no idea why)
it would be clever to email dmitry personally and ask him what he thinks of it ...
07:21
i see :( now im getting more interesting with it :)
look what someone done on pecl pecl.php.net/package/sdl/0.9.0
Hello
I want to know about, barclays payment gateway
how we can get test account for this
can anyone help me
@JoeWatkins Galen gave an interesting reason ... to still be able to use 'pow' as a callback function :)
yeah when we were working on the assert patch, dmitry actually suggested that we add a dummy function entry for assert such that is was bc with call_user_func[_etc] ... these are crazy thoughts if you ask me ... but you have to work with them ...
I think for pow() that's probably a sane idea though, who knows what they're using it for.
I think the argument is weaker for assert().
07:28
it's not a sane idea whatever, the idea of using a language construct is to gain speed, if you call a user function to execute a language construct you are defeating the whole point of the language construct existing by inserting at least one ZEND_SEND_VAL/ZEND_SEND_VAR and one ZEND_DO_FCALL with possibly ZEND_DO_FCALL_INIT/ZEND_DO_FCALL_BY_NAME ... you have ruined your op array, basically ...
I don't think a majority of the devs will think that way.
I personally think that way, though.
most devs don't know what php is doing ... hopefully, that will change in the coming years ...
well .. that's another thing altogether lol
What I'm saying is that the likelihood of pow() being used as a callback is higher than that for assert(), to name one example.
And I would like this patch to go into a 5.x version rather than 6.0
hahahaha
the misses just found that on facebook ... hehe ...
Still funny.
Missing the next slide where they all laugh at IE.
Or beat him up, either way.
07:34
I'm not sure what is more likely to be used as a callback ... but it's probably a good idea for you to implement that dummy function thing to satisfy what is going to be required ...
I gave up on assert, the new implementation is intrusive and no better than the last ...
That sucks :(
I guess some people are just not ready for exceptions yet ;-)
dmitry made it that way, and that's what required to get it in ... it required changes to opcache even, I'm not doing that, it will introduce instability ...
oh it's not really to do with exceptions even ...
Oh okay.
You know, it was only recently (when I was working on the array_filter patch) that I found out that Sherif is GoogleGuy on IRC lol
it would be nice if people could use one name right ...
Well yeah ... plus, for a while I didn't like him at all ... some time before that I was working on a document scanning algorithm which required recursion.
Once finished, I was quite happy with the end result ... to which he replied that I shouldn't have been using PHP in the first place.
Hello
I want to know about, barclays payment gateway
how we can get test account for this
can anyone help me
Lior has a good sense of humor; sends an email to the whole list asking who he can contact ... ehh, you just did? :)
08:08
Good morning! :-)
morning, @Duikboot
afternoon
Is it worth learning VIM?
@Duikboot yes
@Duikboot everything's worth learning only if you implement on right things..
08:13
it's opinion-based. There are other, more simple editors (like nano)
@AlmaDo I prefer sublime
I prefer vim..
it always will be about I prefer <...>
Just use Word.
Oops, did I type that out loud?
I'm using LibreOffice instead of MS Office.
@AlmaDo vim is like ubuntu, needs commands for each, where sublime is like windows..
08:15
@Mr.Alien linux != ubuntu
@Duikboot yes , because if you end up trying to fix a remote site at the middle of night, you are very likely to be dealing only with balck'n'white nix console
@AlmaDo sorry I meant linux
when it comes to linux, ubuntu comes first in my mind..
@Mr.Alien my condolences
@Mr.Alien well, it's because that is most popular distro..
@Duikboot What would you use vim for if I might ask?
08:17
however, I'm using Slackware for long-long time (since 10.x till now, i.e. 14.x)
@AlmaDo yea, used kubuntu as well as mint
@Jack o/
so basically you have only used different flavors of ubuntu
yes..
but as a windows user, I find them very very complicated..
08:22
sigh, but anyways I read some articles recently saying ubuntu is loosing it's way
I like nix, but unfortunately I have Windows on my workstation.
I don't know about ubuntu. But I know that is you want 'windows-like' way to do things 'easy' ( = user don't know what he is doing), well - then, why use linux? just install Windows (and it's ok, I admit that there are things which are easier in Windows for those who don't understand whole stuff)
@Mr.Alien ubuntu has always been the wrong way in linux
it's core userbase is wannabes
@tereško as far as the front goes, I feel comfortable, but when it comes to user friendliness .. I didn't liked, may be I didnt sticked with it for a long time
@Mr.Alien mostly, in ubuntu... user
user image
2
08:27
hahahahhaa
lol
just tried for few days and I uninstalled, had also installed w8, got rid of that too, am really happy with w7 + vmware - xp
@AlmaDo lol that goes for a star
@tereško what are you upto these days?
@Mr.Alien that's sad, but it is - what will happen if OS will all the things behind GUI
currently putting final touches on CV that i will be sending off today
@tereško what? you too? :)
@tereško great, planning for a job again? @AlmaDo which os do you use? I know this bitch -> @tereško uses 7
08:31
@Mr.Alien
14 mins ago, by Alma Do
however, I'm using Slackware for long-long time (since 10.x till now, i.e. 14.x)
I use win7 for desktop and freebsd for server
pce
pce
@tereško win7 is for wannabees ;)
I have Win 7 too (on one of home machines, for gaming)
pce
pce
sorry, but ubuntu bashing is stupid as php bashing.
but now, I'm typing this message from Slackware :p
08:32
no, win7 is for gamers
^^ this
@pce this only means that you have completely no idea why people hate ubuntu
@pce chat.stackoverflow.com/transcript/message/13136240#13136240
o_O .. I though transcript will not paste image :D
@AlmaDo that looks real geeky.. and games is always fun on w7, though I took out the graphic card last month, cuz I didn't got time to play games, unnecessary it was costing me badly..
I have some time, bot not too much. My linux (workstation) machine has .. umm..
user@host:~$ sudo -i
root@host:~# uptime
 12:36:32 up 134 days, 10:54,  8 users,  load average: 0.22, 0.53, 0.74
while Win7 - is only 2-3 hours a week
08:41
Your power company must be happy with you, if that's your workstation :)
huh, why?
lol.. btw that uptime is longer than my SO uptime :p
good moaning :)
yelo, @salathe
ok tata bye!
@AlmaDo I've missed one day recently, so I'm back at 9 consecutive =(
08:54
haha looser :p
why don't just set up cron job ? :D
=.="
ah yes, that means dealing with curl and it's authentication
Pff, I eat cURL for breakfast!

« first day (1136 days earlier)      last day (4038 days later) »