« first day (1303 days earlier)      last day (3645 days later) » 

12:00 AM
Although it did allow me to be awake to watch pretty all of Archer S3+4, which was good
 
user895378
Archer is great!
 
user895378
I've only recently been introduced. Made it about halfway through the first season.
 
user895378
anyway, dinner. bbl.
 
So is anyone here familiar with closures in Zend at all?
I feel like nobody knows anything.
lol
 
12:25 AM
@LeviMorrison You need to ask when European people who keep normal waking hours are awake (i.e. @JoeWatkins @bwoebi @NikiC) which is about 2-3hrs ago
 
They didn't seem to know either ^^
 
Oh, well then yeh, you're probably screwed :-P
 
12:51 AM
87
Q: Is it possible to apply CSS to half of a character?

Mathew MacLeanI have searched high and low for a solution, and I yet to come by anyone even mentioning what I am trying to do. I'm not even sure that it is possible. What I am looking for: A way to apply styling to one HALF of a character. (In this case, half the letter being transparent) What I have curren...

 
1:07 AM
@HamZa dafuq ...
 
@webarto my exact reaction, why would anyone want that? I guess because we're humans
 
user895378
1:44 AM
@LeviMorrison pretty much. That's been my experience with zend ... you kind of have to figure it out for yourself.
 
user895378
Because the zend people seem to treat it like an internal project and don't bother with documentation (opinion).
 
At the moment I'm trying to figure out exactly what these pieces are: lxr.php.net/xref/PHP_TRUNK/Zend/zend_closures.c#37
I know what they are in a high enough view to fix that bug but if I want to optimize or refactor the code I need to know more.
 
user895378
@LeviMorrison like what (specifically)? the _zend_closure seems pretty self-explanatory but maybe I'm missing things.
 
What is std actually used for?
I haven't found it used at all on the high level (maybe in macros somewhere)
 
user895378
1:48 AM
I think that represents the actual Closure instance (guessing)
 
What do you mean "represents"?
 
user895378
 
user895378
That's how zend_object is used
 
user895378
Because a closure is an "object" in userland
 
What is res?
Can we please use better names for things?
lol
 
user895378
1:51 AM
I have the same complaint about tons of php-src :(
 
Any idea what res is?
Seen it somewhere before?
It looks like the return value upon further inspection.
 
user895378
Well it ends up being the first parameter passed to _object_and_properties_init
 
But I have to do this same game for basically every variable in every function.
 
user895378
Yup. php-src.
 
user895378
It would be wholly impenetrable without using lxr to find other examples.
 
user895378
1:54 AM
yesterday, by rdlowrey
@Danack I basically just focus on C and pretend zend doesn't exist until I need to interact with userland and then I cruise lxr looking for specific examples.
 
Sadly right now I'm working on Zend itself trying to fix bug reports.
^^
 
user895378
I feel your pain :/
 
"res" must stand for "result"
 
user895378
I have about 10 lxr tabs open at any given time lately
 
@rdlowrey Sometimes I peek into HHVM's source for things too to try to see what they do.
 
user895378
2:00 AM
All's fair in true love and php-src.
 
I must say C++ has a lot of decoration for const versions of things and then basically the same stuff over again for non-const
But I find gems like this:
  /**
   * We store a pointer in the least significant 48 bits of data_, and a type
   * index (0 = empty, or 1-based index in Types) in the most significant 16
   * bits.  We rely on the fact that pointers have their most significant 16
   * bits clear on x86_64.
   */
> Although a pointer is 64 bits, current processors actually only support 48 bits, so the upper two bytes of an address are always either 0000 or (due to sign-extension) FFF
Quite ingenious but what happens next year (theoretically) when they use all 64 bits?
 
user895378
Yeah, seems like a bad idea to rely on something like that when it's guaranteed to break someday (in the not too distant future).
 
Surely there are optimization techniques that aren't so brittle?
 
user895378
I have to say, even though php-src is a poorly documented mess of a codebase I've enjoyed problem-solving my way through grasping how it works :)
 
user895378
And it's empowering to feel like I have the capability to change/improve things about the language.
 
2:08 AM
lol
over in #php.pecl someone is working on bug 66222 (the one I've been working on for days now)
I assigned the bug to myself but they are going at it anyway?
lol
Actually the fix is pretty simple; the real question is what the correct behavior should be.
Everyone is split; me, bwoebi, HHVM....
 
user895378
/me washes my hands of static closures
 
I think I want to wash PHP clean of static closures too
 
 
1 hour later…
3:23 AM
Another puzzling closure example: 3v4l.org/0GuU0
(Lots of uses of static in a very small snippet)
Oops, bad link.
 
Hello everyone
 
4:17 AM
Are we deleting this‌​? It is one of the canonical posts, well at least in the PHP QAs. If so, do we have a replacement?
 
4:51 AM
I definetly need help on ui design of a SPA . I have only one HTML file ... Its actually a photo effect app ... The ui gets scrambled every time the orientation changes .
I wrote media queries and then JavaScript to redifine the canvas height and width , but the image dimensions do not remain proportional ...something like width : auto would be simpler . but then again how to get the canvas dimensions
 
Hello guys, I noticed that the most login page does not have js validation like register. I mean if username must be at least 4 characters and you writing 3 it does not tell you that you need 4 characters, it says it only on register page. Why is that?
 
Coz when the people registered successfully the already fulfilled those conditions and then there is the fact that people have memories ....
 
@shortCircuit well this is not a fact, maybe I trying to login to a site that I haven't logged for a year and I trying different combinations, if it will tell me that username must be at least 4 characters I will exclude some of them and reduce time
 
5:07 AM
Well maybe that's why good websites provide email or username in the username field ... Like popular social networking sites ... AOL maybe
 
5:53 AM
maybe that's why good users pick names that they're not going to forget... :)
 
morning
 
morning
 
Damn tired this morning
 
3 kloc done, another 1 kloc to go ... yawn
 
=]
@shortCircuit do you have any fiddles or something with a example of what you mentioned
I like spa's =]
 
6:34 AM
Why this won't work?
$pagina1Keywords= echo implode(', ', $items);
 
remove the echo
 
been there, it don't echo anything, must be something else wrong then
thanks
well, here's the full code
$items = array();
$fields = array(
    $nome_do_lugar,
    $telefone_de_contato,
    'test1',
    'test2'
);
foreach ($fields as $field)
{
    isset($$field) && $items[] = $$field;
}
$pagina1Keywords= implode(', ', $items);
everything's right, right?
 
variables variable?
on purpose $$ ?
 
Yeah that's the problem, if he remove the extra dollar sign it will work, I also sometimes get double dollar on netbeans cause of intellisense
 
IntelliSense does not fit in Netbeans.. but I do understand you mean auto complete
 
6:50 AM
I'm sorry, got a blue screen on windows
 
@RonniSkansing yeah I though intellisense and autocomplete is the same, now I know its not :)
 
7:01 AM
I saw some people set variables like that, $user = new User(); $user->setUsername(...)->setPassword(...)->setEmail(...)` to do this I must add return $this; in setUsername, setPassword and setEmail? I didn't find any other way.
 
@Almis those are objects. You should read php.net/manual/en/language.oop5.php
Feel free to make a eval.in and share the link if that did not help =]
 
@RonniSkansing I know that they object.. I mean instead of doing $user = new User(); $user->setUsername(...); $user->setPassword(...); etc. they do user->setUsername(...)->setPassword(...)->setEmail(...) etc all at they same time (without reusing $user)
 
they might do $user->a()->b(), that is method chaining and yes to use that just return this in the setter functions.
But it is not always aproriate to do
=]
 
so what are the best cases to use it?
 
I think on value objects, such a DateTime
or in something like a builder (for example a queryBuilder, $db->select('id')->from('users')->limit(2) )
 
7:18 AM
@RonniSkansing okay thank you, now that I know that this "trick" called chaining method I will do some research :)
 
Np =]
 
using mysqli_real_escape_string i changed my query to select category_id from item_category where category_name like \'%victoria\'s secret%\' its throwing error
 
@krishna select category_id from item_category where category_name like '%victoria\'s secret%'
 
mysqli_real_escape_string didn't work?
 
@krishna please put the code in a pastebin, also what is the error?
Have you considered using prepared statements?
 
7:24 AM
no i just used real_escape_string
 
is [a-zA-Z]+ the same thing as [\w]+
?
 
@krishna mysql_real_escape_string >> HP Fatal error: Call to undefined function mysql_real_escape_string()
 
@krishna you dont escape the sql statement but the variable, so change $qry_search3=mysql_real_escape_string($qry_search3); to $search=mysql_real_escape_string($search); and also it must be before the sql statement
$search=mysql_real_escape_string($search);
$qry_search3="select * from  `quick_tags` where `quick_tag` like '%".$search."%'";
 
7:29 AM
Also mysql_* functions are deprecated, so replace them now
 
@Almis understood thanks @RonniSkansing
 
@Almis prepare is just for pdo? I use mysqli !
 
prepare is for mysqli as well =]
yay
 
wow! thanks for your time & guidance @Almis @RonniSkansing
 
^ np
@hakre lol at the comment
 
naming question: If there is a base URL and there is a full URL, how could that part of the full URL called that is not the base URL?
 
no =/
 
7:37 AM
yes it is a relative URL to the base URL then when extracted.
 
@user3291093 no /[a-zA-Z]+/ is the same as /[a-z]+/i, \w would be [a-zA-Z0-9_]
 
(symbol that points down) I think that would be relative or maybe partial
 
Example: Base URL is https://api.trello.com/1 - this is Trello API with it's version number. A full URL is https://api.trello.com/1/members/me/boards?params and I need a name for the somewhat local identifier members/me/boards?params in my case.
 
anyone here uses Codeigniter REST server ?
I created a test controller but whenever I try to access it via API, it gives 404 not found, do I need to set routes aswell out of the box ?
http://puu.sh/8HLG4.png
 
@hakre in php to get the right part of the base url you use $_SERVER['REQUEST_URI']; so maybe it called request_uri?
 
7:40 AM
@vongolashu I once did, but I threw it away as it didin't support non-REST requests through the controllers directly. That's design flaw in CI which you can also throw away IMHO.
 
any better framework you suggest for creating API ? Easier
 
@vongolashu json_encode()?
 
I tried slim framework and found it a bit confusing
well thats a bit too simple
 
You found slim confusing?
 
I am still using it n one of my projects but didn't found its documentation too good for starters
 
well I do am using slim framework atm, but looking for any alternates
funny how I folloed 3 tutorials for CI and rest, all were almost same and using rest out of the box, but somehow its not working for me from any of them
 
CI is crap already alone and also dead. Don't waste time learning it. CI+REST is even crappier. And there is no "out-of-the-box" in programming.
 
well tutorials showed, download, extract, include the library, write a test controller, run in browser
tried same from all 3 tuts but gettin 404 not found
 
Morning
 
@vongolashu if you move on from codeigniter now you will be thankful later on
 
move to what
cakephp any good ?
 
Is this any good ? looks lik slimframework but a bit more simplified codecanyon.net/item/php-rest-services-/4750857
 
user4957941
8:00 AM
that's payed item
 
is it worth it though
 
@vongolashu imo CakePHP is horrid also
 
Well I do want to avoid using a full php framework when all I want is to create just a API
 
@vongolashu how about composer and picking a few packages?
it sounds like all you need is a frontal controller, router and dispatcher to a function that json returns
 
8:02 AM
exactly
 
You could use PitchBlade but there's relatively no documenation.
 
or Arya
 
I could have done all this by using the old school way of using GET/POST, processing data and outputting json but thought might aswell create a proper REST API
 
@tereško I've been looking at your Fracture framework on github. Care to explain where domain object, mappers and services would live within that structure?
 
someone should create a cloud service for creating REST APIs already
$10 on codecanyon
 
yes please remove. the dupe of a dupe.
the person who answered had the chance to move the answer after it was closed as duplicate for enough time, can be safely deleted.
 
morning
 
Mornign Leri
 
needs one more downvote...
 
hmm, what to do with a question like this? bad question with great answer :)
apparently, pple are trying to get rid of it
 
Shouldn't be deleted, IMO. Questions with useful answers should just remain closed.
 
I tend to agree to that.
 
@Jack I don't know Haskell, so therefor delete it =oP
 
8:21 AM
@Jack That question is closed, so it won't attract low-quality answers while content is pretty good. I don't see any problems here.
 
lol
 
@crypticツ I don't know asm, let's throw computers away. ^_^
 
@Leri I know, it has 3 delv, so figured I would gather someone else's opinion :)
 
@Leri whoa whoa whoa, let's not get too crazy now.
 
8:23 AM
I don't know you, therefore ... I kill yoo!
 
In Soviet Russia, PHP rides you!
 
=.=
s/writes/rides/
 
@Jack wat? That's what I just said -.-
 
Hey, what happened to the 10k mod tools? I don't see the flags anymore =/
 
8:25 AM
Someone is going after questions where Shankar has answered? :)
 
@hakre aargh, why do we even have that syntax? =o(
 
hopefully some reppybeppy will get angry.
@crypticツ historical reasons :D
 
@Jack Yep, they're gone. RIP 10K tools.
There was a meta post. Let me see if I can find it.
 
=(
 
91
Q: Let's get rid of the 10K flag queue

Shog9The 10K tools are pretty cool... You get a birds-eye view of activity on the site, a "dashboard" view of what's happening. Some of the individual tools haven't scaled particularly well with Stack Overflow's growth, but the concept behind them is still sound: we trust you to enough to be a bee wat...

I'm happy with that change. 10K tools were pointless.
 
8:27 AM
@AmalMurali where's that dupe for it? I'd like to close against
 
I, for one, liked to review the flags actually.
 
@Jack Me too, but they weren't really useful.
Pile-on-flags only add confusion and make moderators' job harder.
 
But .. I like my "useful flags" counter =p
 
1 flag, 3 flags, 50 flags - the end result is always the same. A moderator will always have to look at it to decide whether it should actually be deleted/closed/whatever. The community can't do anything by themselves. So instead of focusing time on that review queue, why not divert the attention of the reviewers to a different activity stream? Like suggested edits, VLQ, close-vote queue etc.
@Jack Yeah. Are you going to participate in mod election next year? :-P
 
8:31 AM
Who knows heh
 
:-P
 
> Senior Back-End PHP Developer Wanted: Considerable experience with WordPress would be beneficial
Just doesn't go together IMO
 
Well, sounds promising. :D
Where did you found that @Fabien?
 
random job site searching
It's a mux of two parts rather than an single inline quote.
 
8:39 AM
lol
 
@LeviMorrison We're all familiar with how they work and are implemented, just not with how they are supposed to work ;)
 
@hakre Err..it's not a duplicate, in fact it's from the link that's provided.
 
@ICanHasKittenz could be yes. now as you say it. However no proper attribution so expected it to be from the site itself.
 
Good morning
 
morning
 
8:53 AM
@LeviMorrison Even without fundamental changes to the x86-64 address space, you still have the issue that on some systems some allocators may return addresses to the canonical upper half, which is perfectly valid (canonical addresses are sign extended). It's just by convention that systems reserve the upper half as kernel space and not everybody abides.
 
@NikiC Hi, can I ask you a quick php-src qn?
 
But that notwithstanding, it's a great trick :) allows you to store pointers, doubles, 48bit (or more) integers, etc including type information in just 8 bytes
 
@hakre I don't think it's a duplicate of the answer. Rather from the link... And there's attribution as well.
 
@Jack sure
 
My function return value is zval *, but inside the function I have zval ... what's the proper idiom to return it with phpng?
 
8:55 AM
@tereško That's one very long hour. — Second Rikudo 12 secs ago
 
Obviously, the hint from the compiler to just return &retval; will not really work very well :)
 
@Jack you need to have the zval* to write to available in the function and then do a ZVAL_COPY or ZVAL_COPY_VALUE to that, depending
 
but there's no MAKE_STD_ZVAL() anymore =/
 
@Jack yes
you don't allocate zvals anymore
You need to know where you want to write the zval into
E.g., is this supposed to go into return_value?
 
I suppose I could make the function return zval actually ... and then ZVAL_NULL(&retval); would do what I want :)
It's only used internally, so that would work :)
 
8:58 AM
zval retval;
get_zval(&retval);
// do something with retval
^-- That's the pattern
 
Oh yeah, I could do that too :)
Thanks!
 
@AmalMurali a link is rather not attribution. Attribution is first of all the name of the author.
 
guys, I'm trying to google a common thing in PHP but can't find the name
 
@LucasB What are you trying to search?
 
there's this /update/index.php file that I don't want anyone to run
 
9:01 AM
@hakre At least, there's a link :)
 
so for it to run should be accompained with some kind of key
 
I think the correct action would be to delete the post entirely (since it's an exact duplicate of the other one).
 
index.php?key=uS(kdsmk34 (example)
 
@LucasB "log in"?
 
if has key, run function
 
9:02 AM
get parameters?
 
@AmalMurali here another one: Reference
 
nah, there's a simpler code, just forgot wich was it
something like if get
 
@LucasB Google "$_GET"
 
What exactly are you trying to do, @LucasB?
 
However, note that passing passwords and keys by GET params is vulnerable to shoulder surfing.
 
9:03 AM
@hakre Uh what? That's just a link to this chat message transcript.
 
update/index.php?secret_key=mj43D8h3
RUNS SCRIPT

update/index.php
Access denied
 
isset($_GET['index'])
And do not place the key in a GET query
 
@Ronni Skansing pastebin.com/T4QmiVHS . u will be interested in the media queries and handleDisplay .. Rest are just image filters. My CSS is extremly rust .. So there are crappy codes
 
@AmalMurali Just some attribution for you because "at least there is a link" Reference or so :P
 
@hakre Most people just blindly copy paste and not include any reference/source/anything. This is a lot better.
 
9:05 AM
I am using Mozilla 's perspective design tool ... To view the app in different dimensions
 
Thanks @RonniSkansing and everyone else, it worked
 
@LucasB How public secret key is secret?
 
@shortCircuit hey, yea it jumps abit around in the different sizes, how would have wanted it to be. How could the adaptive sizes are both controlled via queries and js? (I can almost guess it is somehow related to the picture)
 
@Leri Yeah, but it probably goes over https, so you can't read it ... (teeheehee)
 
if((isset($_GET['secret_key'])) && $_GET['secret_key']=='9wQJgsKv9aDu6tfa77TX') {
// Do update
} else {
// Permission denied
}
plain and simple like that
 
9:17 AM
But in Chrome, Firefox it has no effect (I am guessing it should preview while editing) in canvas, but I will admit I have not parsed the code yet
 
morning
 
morning HamZa
 
@Jack What if client has some backdoor so your secret is stolen before it's encrypted? :p
 
@LucasB normally that goes together with a signature based on a common secret.
@Leri sigh ... you didn't catch my </sarcasm> huh?
 
@Jack My sarcasm filter is disabled. I'll enable it, now. :D
 
9:20 AM
> Google is your only hope...
What kind of hint is that?
Why not Yahoo?
 
You're still on it? Cool! I stopped :P
 
I managed to get 10 now .. yay
 
@Jack hell, why not Bing?
 
Exactly!
 
Yahoo api s are cool too,, I lykd YQL .. Although I used Google feeds
 
9:21 AM
@Jack DON'T TEMPT ME!
I mean... I could simply solve 'em all in a sec.
 
The hint for #4 is quite clear.
 
brb, hacking ircmaxell's website
:-P
 
Jack Reacher
 
@Jack Really?
> There's something cryptic about what's going on here...
dahell?
 
@shortCircuit let me just rewrite the other phrase.. *sigh* =] I can see it jumps around in different viewports abit. How would you like it to be (if it worked)?
Are the js functions you mentioned also for the adaptive design on the entire page or only something to adjust ratio and etc of the canvas?
 
9:23 AM
@crypticツ HALP
 
No, not that one!
 
@AmalMurali PLS
 
OK I am explaining
 
@crypticツ NO U
 
what you need?
 
9:25 AM
@crypticツ nothing, I was just kidding. sorry if my ping woke you up :-P
 
cryptic. 1) Any series watched lately you can recommend. 2) use Arya still?
 
@AmalMurali I was asleep and my surround sound speakers with 1000W sub-woofer shook the house and woke me up when you pinged =o(
 
aww
 
^ let's do it all!
@crypticツ wake
 
Quick. Everyone ping @crypticツ
@crypticツ rawr
 
9:27 AM
 
@RonniSkansing been watching all the seasons of Bob's Burgers, there aren't any new series I know of. There is this new series on Fox called Utopia not out yet, but looks alright. Basically it's like Survivor but you have to actually create a civilization from nothing.
 
Okay, thanks. I can tell you that if you watch all of season 1 of Hannibal, then Season 2 becomes quite good actully imo.
 
Off to life. Later.
 
@Jack best of classics
 
9:32 AM
Agreed :)
His condition is quite unfortunate =/
 
Hooray! @webarto is back!
 
The the js is to adjust the height and width of the image so that it fits the window. I am not actually sure whether changing the width and height of the image is actually necessary and that only the CSS would be enuf to scale down the image to fit the display keeping the dimensions same as original
if it worked I would like it too see it adjust like it partially does now
OR If it is somehow possible to put the options on the image and let the image occupy the entire width or height according to its aspect ratio.. I sort of tried that but the canvas was tainted ... I mean the filters weren't working on the image...
 
@LeviMorrison actually static function variables you just can pass to the use() part. They're technically just imported like global. What would you then expect to happen when you have static class and method variables named the same way then?^^
 
Answers on MSO gain no rep? The absurdity .. ;-)
 
Well, how would you like the canvas to react if my screen is 1080px wide and i upload a 40x40 img or reverse i have 420px space and upload a 800x800 img
 
9:40 AM
@Jack ja, sad ^^
 
should it retain original size, should it adapt the size, zoom?
 
inorite ... how am i supposed to meta repwhore now? oh right, mse :)
 
^^
 
@Jack If there is one site where people don't people complain when you repwhore, it's MSO :-D
 
nor mse I suspect.
 
9:43 AM
@PeeHaa ty
 
Probably because employers don't care about your meta rep heh
Though, that's a really sad reason.
2 warnings and 8 errors remain ... getting near now!
 
rep is pretty worthless in terms of employment, good answers are much better
Even good questions
 
@Jack what are you working on?
 
@bwoebi oauth
 
for phpng?
 
9:51 AM
Yeh =.=
 
I thought phpng would be great…
 
... but
 
but...?
 
It seems I'm getting outdated in the php field (hhvm? phpng?) isn't there a concise, small source where I can follow this without checking reddit, internals, SO everyday?
 
9:57 AM
@bwoebi I expected a 'but' after that sentence :)
It's a reasonably sized code base to update, and I won't know if what I'm doing will work until all are fixed and the whole project is linked :)
Other than that, I really like the new interfaces.
 

« first day (1303 days earlier)      last day (3645 days later) »