« first day (641 days earlier)      last day (4298 days later) » 

12:30 AM
@NikiC: what would you think of refactoring the opcode array into a DLL instead?
 
12:45 AM
Hi Everyone. Could I get some Wordpress help? I think it's pretty simple, I just need some more detailed instructions.
0
Q: Wordpress: Exclude Posts from Site except for one page

bookcaseyI have a site with a blog. I also have a "Press" page. I would like all posts with the category "Press" to appear on the Press page, but not appear mixed in with the other blog posts, or on the front page. I have been trying variations on this, but the instructions aren't explicit enough for me...

 
1:10 AM
Tomorrows blog post is scheduled (and the one I was going to publish has been pushed back to Friday)
 
user895378
@ircmaxell I'm consistently impressed by your prolific publishing output.
 
I am too. I am going to try to do 3 per week as long as I can find the ideas and time...
this one has a plea in it
> Do you have a question that you want me to try to answer? Something about how PHP works internally? Something about OO Design? Something related to PHP? Shoot me an email at ircmaxell [at] php [dot] net, and I'll see if I can answer it!
 
user895378
Well, the quality is actually more impressive. I have yet to read anything that sounds like you wrote it just to fill a quota. I really appreciate that.
 
user895378
I get really turned off when things start to read like a content farm.
 
user895378
And nothing of yours ever does, so thanks.
 
1:19 AM
thanks! I really appreciate it
it makes the time and energy expenditure a bit more worth while
Yeah, I'm not going to answer every email, but if I get some that seem interesting and that peak my curiosity, I will definitely post it
And I really need to finish the next php source code for php devs series post. It's like half way done, just need to restructure it and finish it...
 
user895378
So much to do, so little lifetime. I know the feeling. There are so many things I want to get to and just don't have time. I already spend my whole life at the computer being as productive as I can reasonably expect myself to be :)
 
what's odd, is once I stopped trying to be productive, I got a lot happier, and a lot more done (at least the stuff that matters to me)...
 
user895378
Well I don't mean I'm beating myself down to be productive. I'm definitely doing the things I want to do most. There are just so many things I want to get to and good work takes time :)
 
@rdlowrey , remember you asked about Page Controllers few eons ago ? I finally understand why i though that it was a bad pattern
 
user895378
@tereško do tell
 
1:23 AM
I was beating myself down. Working 80 to 90 hours per week on stuff that (in retrospect) I didn't care about
 
user895378
@tereško I find myself completely in opposition to "Page Controllers" these days for what it's worth.
 
because in that case the controller becomes directly responsible for creating both view instances and initializing structures from model layer
essentially, it's easy to use when you are just starting to play with mvc , but soon begins to rot
 
user895378
Am I correct to assume that by "creating" you mean the opposite of dependency injection?
 
user895378
Or are you opposed to the whole idea of having a "One-class-per-web-resource" setup where each of those classes asks for a view instance and the requisite domain/business objects in a constructor and some sort of router determines which class should be used?
 
1:33 AM
in case of view , it basically is creating it (thought a factory, but view itself never leaves the controller)
basically the view becomes part of controller
this is where you get :
 
any php gurus in here or what? I'm writing an extensive answer with a sample snippet, though now I'm starting to worry about me wasting time if such a function already is in the standard php library? It's a full-blown function that does this:
0
Q: Find out parameters passed to a function

AlexI'm trying to find out the name of the paramters that were passed to a function. To do this I'm using debug_backtrace() to get the file and line from which the function was called. Then open the file, read it line by line until the line that I'm looking for comes up. $file = fopen($caller['fil...

 
// method in page controller
public function fooAction()
{
    // ... snip ..
    return $this->view->render();
}
 
the question title is a bit off, read the description and my post in the thread to find out what OP really wants
if there already is such a function I've wasted time, and can stop implementing a required feature for it to be used in "real-life"
 
Can anyone simply describe what the "model" does in Zend? I've managed to develop an application just using the View and Controllers...I feel like I'm missing the models, thus making all my efforts worthless.
 
@refp you rewrote PHP?
 
1:46 AM
@cHao nope, far from it..
 
well, very little short of a PHP parser and possibly half-assed interpreter is gonna be able to give her what she's asking for.
 
@cHao there is one little bug (which is because of the lack of information provided (without having to write a full parser))
let me codepad it
 
SQL injection and XSS vulnerability in one script... stackoverflow.com/questions/11533223/…
 
erhm why the fcuk do I get that token_get_all is undefined on both ideone and codepad, they both claim to be running versions higher than 4.3.0,
 
user895378
@CharlesSprayberry AND @ error suppression on the mysql calls :)
 
1:52 AM
@CharlesSprayberry , thats how real php looks like =/
 
@rdlowrey The cherry on top so to speak
 
Hi guys. Can you take a look at this? stackoverflow.com/questions/11533218/…... Well, this isnt much about syntax/coding. Any idea would be appreciated. Thank you
 
@refp Because they don't have the Tokenizer extension installed?
 
baaah , cake
 
user895378
@tereško I can agree with your disapproval of that scenario and I don't think the "controller" completely absorbing the "view" qualifies as MVC. I'd like to dive into this a bit deeper -- do you have any good book recommendations specifically dealing with MVC?
 
1:56 AM
none what-so-ever
@rdlowrey best you could do is read this one : itu.dk/courses/VOP/E2005/VOP2005E/8_mvc_krasner_and_pope.pdf
 
@CharlesSprayberry yeah, of course.. but why would they explicitly disable it when it's enabled by default from 4.3.0 and higher
that's just mean..
@cHao tmp.glork.org/workinprogress_php.txt scroll to the bottom and you will see what's left to implement
 
user895378
@tereško Is it just my chrome's pdf viewer being stupid or are there no spaces in that pdf?
 
blame chrome
 
@rdlowrey Your PDF viewer is being stupid. I see spaces, using Chrome 20.0
 
works just fine in SumatraPDF
 
1:57 AM
the funny thing is that it isn't that much code to do what she asks
 
user895378
hmm. I need to fix something. All the spaces between words are somehow missing for me.
 
user895378
eh, I'm using fedora at the moment. If I can't work it out I'll VM over to windows and d/l sumatra to read it.
 
=/
then do you have Okular or Evince?
 
user895378
Yeah, for some reason when I view it in chrome all the spaces go away but if I just save it locally and open it things work fine.
 
2:04 AM
@refp umm....how does this know, when you've said like func(1,1,1); func(2,2,2); func(3,3,func(4,4,4));, exactly which func to care about?
 
@cHao all the logic is in the source I sent you, just run it on a php-binary compiled with the tokenizer extension (it's in there per default from 4.3.0 and up), but it uses token_get_all together with debug_backtrace, though the information from debug_backtrace is limited so when you have several function calls on the same line it's difficult to always find the exact match
though it is possible, I have the code in my head already - just need to type it down.. first I gonna go out and buy smokes
@cHao and as you see I'm almost there, it's correct output on on the first two examples, it just can't handle func(3,3,func(4,4,4)); on the outer call
gonna buy smokes now, talk ta ya later.
 
@refp of course it's possible to some degree; PHP has to do it in order to run the code in the first place. problem is, it's a whole freaking interpreter...and being a whole interpreter is kinda out of the question
later
 
@refp they are building with --disable-all...
 
@cHao as you see by the code I sent you I've in no way implemented a full interpreter
 
and you're having problems. and will continue to, because you don't have the context an interpreter would.
 
2:12 AM
@cHao ... nope, as said; the solution is already in my head, you are not attacking this problem from the correct angle
but heck; I'll just let you judge the code when it's finished, I'm not even a PHP programmer.. I freakin' hate the language (and all about it), but I like challenges in form of questions on SO
<- AFK smoking his lungs out
 
heh. not a bad idea. well, it's a bad idea in that it'll give you lung cancer and such, but it still sounds like something worth doing atm. brb myself
 
2:30 AM
anyway...a solution that doesn't involve rolling your own interpreter is going to break in the presence of variable variables and/or call_user_func*. you can't really get past that without knowing the involved variables' values
and short of knowing exactly where the function call was made from (including column number), you're not going to be able to say whether you're actually parsing the right function call
func(1, 1, func(1, 1, 1)) is going to cause all kinds of problems because you don't have enough context to decide which func is the one you're being asked to get info on. it's not even in the backtrace -- the inner call is done before the outer one even starts
 
morning, can i ask something about design patterns?
 
@draconis i dunno. can you? :)
 
but not a proper question, it's something like theoretical
@cHao i was reading a book about design patterns but it was in java :S so i'm not sure did i write right in php
 
won't be able to tell ya til i see code :)
 
And what pattern it is you're trying to implement :)
 
2:43 AM
warning: if you say "singleton", i will mock you.
 
i tried to impelement strategy pattern
 
k...continue
 
i made a newspaper class and an ImageStrategy class, because some newspapers sends image in news text, some of them has image as an attribute, some of them doesnt send any image and some of them sends it like another text
so i think strategy pattern will be good to select behavior for image parsing
when you create a newspaper object, you pass a ImageStrategy(this is an abstract class) object like AttributeImageParser or TextImageParser to newspaper's constructor
 
k...
 
the question is here: Did i understand strategy pattern? Is this right usage of strategy pattern? cause i think extending newspaper class will be lack of code, when i discover a new newspaper that sends image in another way i will have to extends newspaper class again.
 
2:50 AM
if you have another way of parsing images, you create a parser/strategy/whatever type. the point of it is that you can pass that into the constructor for the newspaper, and not have to worry about creating a new newspaper subclass that's only different in how it parses images.
 
yup, so my usage of strategy pattern is right?
 
far as you've described it yet, it sounds ok
 
thanks a lot, it cost me 3 books to understand patterns :S
when you read about design patterns, OOP makes sense, when i look my old codes i only see objects that struct holds data and some methods
like multi-dimensional arrays
with functions
 
that's pretty much what they are...lol...particularly in php
patterns are just ways of organizing those objects...no more
 
yup, but now i can use this rss parser anytime i need it because until i learn these i was only knowing dictionary meanings of cohesion,encapsulation,composition and etc.
patterns also make you understand them too
thanks again cHao, see you later.
 
 
1 hour later…
5:26 AM
morning
 
morning all :)
 
5:55 AM
UGT
 
6:14 AM
7am, waking up in the morning
Gotta be fresh, gotta go downstairs
Gotta have my bowl, gotta have cereal
it's 8am, f* :) morning
 
posted on July 18, 2012 by Larry Garfield

That moment when you realize just how much awesome you have coming up that you're not sure you're going to survive it? Yeah, that. It's nearly time for the second half of the year conference season, and it looks like my schedule is starting to fill up. I've three conferences and 5 speaking engagements in the coming weeks, so for those interested in Stalking Crell here's where you'll be able

 
Everyone was a noob once, but not an idiot...
 
6:36 AM
sup
why does recapatcha hate php
 
@Gordon And what's with that?
 
6:53 AM
"I am creating a kind of a social network cum cloud computing script using php." stackoverflow.com/questions/11535623/…
 
@tereško pjong.
 
cum cloud
god i love when people come here armed with less than google translate
 
7:19 AM
@Raynos , ping
did you want something ?
 
@deceze really? me too!
 
@web Isn't everybody?
 
yes, and it is MVC
 
@draconis , it could be worse , you could see singletons all over the place
 
I removed singletons yesterday and somehow I'm happier today
...
is there a way to kill specific script that is already running (looping)
 
7:42 AM
morning
 
morning
 
morning
kill the webserver
 
morning
 
though , you might be able to just kill the php process , i you can find the right one
 
@PeeHaa morning
@tereško it looks like it can only be done if PHP is in CGI mode http://pokit.org/get/img/4ba29319a5ac5cb819786ddfb0f62256.png
 
7:48 AM
heya @PeeHaa
 
8:12 AM
@tereško it can be killed if you run via command line: pokit.org/get/img/3e741c1cf9130e80c31f458b4b8a51ad.png (which is true in my case)
 
wordpress framework programmers
 
8:37 AM
crap this switchable graphics card . .
 
morning
 
@Subhransu Well what is on line 33?
 
@PeeHaa wait....
 
SO is not a crowd-sourced debugging service
6
 
8:46 AM
@PeeHaa please follow pastebin.com/PH3QWFqQ
Its running good in terminal
but when I am trying to implement php its show an error
 
Hi how to create Remember Me in php
 
@Subhransu daaaaaaaaaaaaaaaaaaaaaaaaag
That's Dutch for byeeeeeeeeeeeeeeeeee
 
@PeeHaa please help me out with this
 
That isn't PHP and even if it was I'm not going through all that
 
8:49 AM
Any one implemet remember me in a php
 
@NikunjAkabari, thats cookies
 
And besides you have completely changed the content of the question after there were answers to your original question. close voting it
 
@tomexsans ok
 
@su
@Subhransu you tried shell_exec?
 
@NikunjAkabari, take a look at PHP Cookie .
@Subhransu, you wan't us to convert to PHP?
 
8:51 AM
HI @Abhic yeah I have tried
 
@NikunjAkabari , with cookies
 
but its showing an error
 
I was AFK to make coffee and when I got back room was raided by help vampires
@tereško your message should be "welcome message"
 
@tomexsans ok
@tereško ok
 
morning
 
8:54 AM
@Subhransu Stop spamming
@NikiC morning
 
@ircmaxell Why would you want to make it into a DLL?
 
@NikunjAkabari , you also might benefit from securing the cookie ( basically you store the value of cookie as 'value|hash|timestamp'
it is a bit more complicated , but you gain additional security
 
1 message moved to recycle bin
Hm, I think I used the wrong bin :/
 
the hash is made from timestamp and value, thus making sure that you cannot change the value or lifetime of the cookie
 
@tomexsans No. please give some link to the tutorial from where I could learn how to implement php on a shell script
 
8:55 AM
@NikiC Thinking about the environment with the recycle bin? ;)
 
@PeeHaa sorry my friend , I need help with that
 
@PeeHaa Yeah :P
 
@Subhransu Are we friends now?
 
@Subhransu, you don't need to convert it , there is a ffmpegPHP for that, look at the answers, they provided the link
 
@tomexsans thanks for being so generous :)
 
8:57 AM
@Subhransu where is the test1.php script with line 33 ?
 
You have drastically changed your question while there were answers, you fail to provide any useful information and you are spamming this channel. Doesn't sound like a friendly thinig to do
 
yeah, you are friends until he gets help :P
 
@webarto Wait .....
 
:)
 
@Subhransu, the one in pastebin is not PHP and the line 33 refer to a '#'.
 
9:00 AM
@tomexsans , just give it up
 
@tereško, i'm being generous because he called me one :D
 
@webarto @tomexsans pastebin.com/r6WcWYqY
 
shoot yourself
 
lol,
 
ok I am new to implementation of php in shell
help me with giving some tutoial link from where i could learn
 
9:03 AM
you are wrong in every aspect, don't try to force your "solution", but listen to others...
 
ok
 
pastebin.com/PH3QWFqQ < this should be a separate file e.g. ffmpeg.sh
 
@Subhransu, what would you like to achieve anyway??
 
@Subhransu , echo "foo "bar" text"; <-- where is is the mistake ?
 
9:08 AM
@tomexsans I have a shell script to convert several video format into mp4 format(using ffmpeg) . My task is to write php script for execute ffmpeg to convert any video format into mp4 video formath with hight quality,
for example to have 2 folders : video(where should to have many videos in any format) and videomp4(where will have the mp4 files after execute the php script)
 
it is in implementation of php in shell
 
@tereško any type exmple
@tereško Thanks
 
@webarto yeah ...
 
no, it is because of you not knowing the basic syntax...
do you expect a tutorial with "how to convert several video format into mp4 format(using ffmpeg) with shell script" name?
 
Go go gadget tiny avatar
 
9:15 AM
@webarto yeah , it would be helpful
 
why are japanese sites so terrible ?
 
lol and lol :)
@tereško maybe because they are not technologically advanced :P
 
riiiight
 
@tomexsans Please don't direct people to w3school
 
9:20 AM
@tereško Do you wish me to go on a rant...?
 
@PeeHaa, changed :D
 
i think you might have some strong opinions ons the subject , @deceze
feel free to tell me that i am full of it
 
@tomexsans ty
 
No, on the contrary. Most Japanese sites are awful!
 
lol
 
9:22 AM
is colorblindness more widespread condition in japanese population ?
(not a serious question)
 
Do you have an example you find particularly appalling right now? :3
 
yeah : exist-trace.com (heard song on youtube, tried to see what else the have)
and now i feel like someone too my soul to a cheese-grater
at least there aint any gifs in this one
 
Yeah, dunno what it is about tiny fonts and thousands of tiny images...
Might have something to do with the fact that more people are using non-PC devices to read those. I.e. keitais.
 
tiny-image practice comes from lack of font support
though , the original cause seems to be forgotten
 
Yeah, the main problem is the very widespread we have always done it this way and everybody else is doing it this way mentality. Seriously.
 
9:29 AM
i want use this method if(isset($_POST['remember']))
{
setcookie("user_id", $_SESSION['user_id'], time()+60*60*24*COOKIE_TIME_OUT, "/");
setcookie("user_key", sha1($ckey), time()+60*60*24*COOKIE_TIME_OUT, "/");
setcookie("user_name",$_SESSION['user_name'], time()+60*60*24*COOKIE_TIME_OUT, "/");
}
 
@NikunjAkabari , don't
you should store only single value for remember-me implementation
a unique key ( maybe a hash ) which is stored in a separate column of Users table
 
@NikunjAkabari, take note also of the cookie data limit
 
@tereško any exmple of rememberme
 
please suggest some resources to follow or examples on how to "php shell script"
 
9:33 AM
@tomexsans give me any exmple of rememberme
 
@NikunjAkabari , i don't really have a separate sample for it , and the online tutorials are pretty bad .. you will have to do the research on your own
 
@tereško ok Thanks
 
@tereško please suggest some resources to follow or examples on how to "php shell script"
 
setcookie() has an expire parameter.. it is set to '0'.. what does that mean? php.net says that _If set to 0, or omitted, the cookie will expire at the end of the session (when the browser closes)._
But what if I'm doing a curl call to that particular page and not really opening the browser?
 
@ShyamK It is the convention that cookies with an expiry time of 0 are discarded by the browser once it is closed. If you are not a browser, you are free to not discard the cookie and do with it whatever you want.
 
9:41 AM
@deceze what I am doing is a curl call from my page to a wordpress blog.. trying single sign on..kind of.. but it seems that the expiry time of the cookie is defaulting to '0'.. so I'm not getting signed on.. (Atleast thats what I think is happening)
 
@Bracketworks please suggest some resources to follow or examples on how to "php shell script"
 
@Subhransu You know.. I can see that you've asked that question at least twice before that now.
 
Sorry , but no one helped with that . thats why I am asking you
 
@ShyamK How are you handling the cookies...?
 
9:47 AM
@Bracketworks thanks , but could you be more specific
 
@Subhransu Nope. Your question isn't.
However, after looking at some of the results for about 8 seconds, the first, third, fifth, and sixth are probably in the direction of what you're interested in.
 
@deceze I have no cookies on my page.. only on the wordpress blog.. and I have never used cookies.. only eaten them :)
sorry for the reping
 
so you use wp blog, and you don't use cookies?
 
9:51 AM
well I dont set them is what I meant
the blog obviously does
 
10:01 AM
Hello, everyone!
 
@Subhransu Were you able to find the information you needed?
 
Anybody knows a way to substitute the line with an empty line assuming that the cursor is not at the linestart in Sublime Text 2?
 
Hello Experts
0
Q: Using a Java/.Net api from PHP

UdhayI am integrating the Forex GainCapital API in my PHP code. But these API is only available in Java and .Net (I don't know both of them). Here is the link http://api.efxnow.com/DEMOWebServices2.8/Service.asmx. So, is there any way to get the data from a .Net or Java API from PHP?

Can anyone have any idea on this?
 
10:18 AM
@tereško where is the lib in Fracture :) ?
 
there is one file there right now
should be 4 more in a day or two
i have been poking at it again
 
looking forward to it
 
you shouldnt .. it the autoloader , the most boring part of code
 
10:36 AM
-1 you are not using jQuery — webarto 13 secs ago
I troll'd
@tereško yeah, but your code is good...
 
Quick, how many levels of ifs are here? stackoverflow.com/questions/11539471/…
 
10:57 AM
how can "normal" login be considered as "legacy login", in favor of "facebook login"...
 
@webarto Oh you. You're so Web 0.8.
 
I'm so passé
 
didn't you know that all the businesses now must be social ?
 
I do like the idea of "outsourcing" user management: 1) you have no responsibility, 2) your users don't need to generate and manage a thousand different passwords.
Having said that, Facebook of all entities is not really someone I want to outsource to.
Also, I'm waiting for the day when an exploit is found and widely exploited in this whole system.
...or Facebook goes away and everyone's scrambling to get their users back.
 
you don't need a hack for it all to go horribly wrong
i doubt that Facebook counts as "too big to fail"
 
11:08 AM
maybe Facebook will end up as a user management service :P
@tereško my applications are unfriendly :P
Alice is a kindergarden teacher. She wants to give some candies to the children in her class.  All the children sit in a line and each  of them  has a rating score according to his or her usual performance.  Alice wants to give at least 1 candy for each child.Children get jealous of their immediate neighbors, so if two children sit next to each other then the one with the higher rating must get more candies. Alice wants to save money, so she wants to minimize the total number of candies.
back to school
 
Hello friends :
I have tried with :
<?php
shell_exec("bash ffmpeg-encode.sh");
?>
is that all what i need to execute a shell script with php
 
11:28 AM
@NikiC it would allow you to insert and remove elements on the fly. And enable certain optimizations (such as eliminating function init calls for non-dynamic function calls, resolving static addition at compile time, etc)..
 
@ircmaxell Not sure that it's that simple ;)
 
it's not, but it woud open some dorrs
 
Hey guys
 
@Subhransu don't invite me to chat please I have no time or will to help you
 
Could anybody give me some direction to URL Rewriting with NGINX and PHP
 
11:31 AM
@ircmaxell Also I'm not sure whether you can safely insert opcodes at the start / middle. I don't know how exactly they work, but I could imagine that JMP instructions would break
 
0
Q: Sublime Text 2 shorcut line substitution

hookmanExcuse me for the non-informative title. Just can't shortly describe what I want within one question. Okay, let's say we have two lines in our text file. The cursor is somewhere in the 1st line (the example shows cursor position): SO helps| people People like SO What I want is to substitute t...

 
@NikiC why would jmp instructions break? the address of a particular opcode would stay the same...
 
Could anybody give me some direction to URL Rewriting with NGINX and PHP
 
@JacobClark Have you tried: google.nl/…
 
@Pee
@PeeHaa yeah, but i cant find much direction as to what I wish to do
 
11:47 AM
hi i m sending request to paypal from a my page, with a return url. this return url contains an integervalue in a param of querystring. but when paypal payment is done, it loses the integervalue of param.
i want that value to be retained
e.g i give returnvalue = mysite.com/index.php?id=23437947 but after it's done with payment, paypal redirects to the page mysite.com/index.php?id=
id is lost
 
hello can someone help me with this question? triing to use uasort() but dont get it :(
http://stackoverflow.com/questions/11538146/php-sort-array-ouput-but-randomize-same-values/11538717#11538717
 

« first day (641 days earlier)      last day (4298 days later) »