« first day (1141 days earlier)      last day (4033 days later) » 

00:00
@NikiC ping?
@ThomasWeinert I know it's not a "biggie" but it's not negligible and weight does play a role, either in biking, skating, skiing, etc.
I'm a bit bored and I like to see tereško arguing :)
@webarto bicycle weight is not that important in the long run, but yes it is nice - my bike is at 13.5 kg at the moment
@ThomasWeinert Cool :) I think mine is 16kg, which is light compared to what I had (steel ones).
Okay @HamZa I think I figured out how to explain better.
So, you know how you can do "elementById" using JavaScript?
@DestinyDawn I know
00:07
It is an Brompton with most of the lightweight options, but a double headlight, brooks saddle and ergon grips
@HamZa Is there a way to do that using PHP?
@DestinyDawn If what you showed me earlier (the code), I don't think that would make sense. You would parse html if it came from an outside source. But you have everything in control, why would you parse your own generated html ?
Does it ring a bell ?
@HamZa Do you know ASP.NET? In ASP.NET there is a repeater controller, when you redatabind the repeater it appends the new data into the div, well technically just reloads everything.
Getelementbyid is available in php, too. But xpath is a lot more flexible
00:11
So basically, when a user enters "1 + 1"
The result box shoud become
1 + 1 = 2
Then if the user enters "2 + 3"
The result box should become
1 + 1 = 2
2 + 3 = 5
Right ?
And powerful

Xpath is for XML what SQL is for a database
XPath?
Hm
Interesting
@DestinyDawn Then what you need is not html parsing, you'll need ajax or just a place to store the actual progress.
@HamZa Alright
Okay, here's one more question that's a little simpler and I think I can explain better.
00:15
If you have an XML vor HTML data source and need to extract data from that data tree use xpath
Is there a way for a form to update only the content in the form, rather than doing a entire page postback and basically reseting all scrolls? I am using "e.preventDefault();" in JavaScript but it's not working.
In your JS dies its job yes
@DestinyDawn I've written a quick dirty demo using sessions pastebin.com/Yi7DBhac
@DestinyDawn ajax is your uncle
@HamZa That seems like it would work a lot better..I'll try something like that. Thanks :)
Does

I hate spell checking in my phone
It fixes my input to German
00:21
I need to find a job in the IT industry xD
@hamza location?
@ThomasWeinert netherlands
How do You think about cologne? If You send me some data I will ASK around
Grmpf
@DestinyDawn I was going to send you this nice ASCII schema, but when you told me xy years of programming, I thought "no, wait" xD
                            Request
                           index.php
#4 Processing |--------| 1#-----------> |--------|   #2 Processing
HTML/CSS/JS   | Client |                | Server |    the request
 etc...       |--------| <-----------#3 |--------|
                           Sending
                         the processed
                             page
00:29
?
How ironic, I see a lot of angry people >< — HamZa 6 secs ago
It is not possible to type English on my phone
Arrrg
00:46
@webarto nice
So anyone know how to deal with downgrading npm? :P npm install -g [email protected] is just giving me this error
01:08
good night
01:21
I downloaded PHP 5.5.6 from github. It tells me I shouldn't run buildconf but there isn't a configure file... In the past I've honestly built from src and not used a released version. Is there something I'm missing when building a released version?
01:34
@LeviMorrison where does it say to not run buildconf? I compile from github source and run buildconf
From a released version, when I run buildconf it tells me so:
$ ./buildconf
You should not run buildconf in a release package.
01:50
@LeviMorrison I've done so in a release package as well. I delete configure add my misc extensions into the ext directory then run buildconf --force
maybe they assume people will not be adding any additional source files so they tell them there is no need to run it?
But there wasn't a configure script to run either.
did you try with --force ?
that's how I have my compile script setup to do
Well, that's what I've done to get something running, but something seemed off.
user895378
02:04
I've just used buildconf in the past IIRC
02:35
Need help with my question
0
Q: How to use `bcrypt` algorithm within `encrypt` function in MySQL for verifying password?

sectusI have bcrypted value($2y$10$zQaDT8hXM4pLmBdwN0xEseda/oKJAQKMKMzUrV8jbs6Epz28BXzBS) of password (qwe). But when I am verifying I am getting wrong result hash value. mysql> select '$2y$10$zQaDT8hXM4pLmBdwN0xEseda/oKJAQKMKMzUrV8jbs6Epz28BXzBS' = encrypt('qwe', '$2y$10$zQaDT8hXM4pLmBdwN0xEseda/oKJA...

03:10
HUH? why are you using mysql's encrypt function?
@LeviMorrison because the configure script is added to the release tarball, but not to the git repo.
The tar file in the github repo doesn't have it.
Oh well, not a big deal.
@ircmaxell , thanks % )
user895378
> In my personal experience, T happens quite often precisely because tackling an unfamiliar problem space leads more often than not poor assumptions and these poor assumptions may get accidentally built into your initial architectural design.
user895378
^^ That.
@rdlowrey 100% test coverage PR incoming.
user895378
03:41
@Danack awesome. I'd like to think about what we need to do to go to an official v1.0.0 and start hacking away at that list.
user895378
Things seem relatively feature-complete at this stage to me (famous last words).
@rdlowrey Hmm, my guess would be more documentation, including a non-trivial example.
user895378
@Danack yeah documentation is sparse. There's a ton of stuff on the github wiki but it's probably all outdated as I haven't changed anything there in forever.
btw - you keep referring to Auryn as a 'container' - is that just from habit or do you consider it a container? The word seems weird, as it doesn't actually 'contain' other objects (not like symfony/zend's DIC does).
It would seem to be better to call it a real 'dependency injector' rather than a 'DIC'.
user895378
It's just habit. You're right and I'll start calling it an injector going forward.
user895378
03:48
@Danack Mind if I add you as a collaborator on the repo so you don't have to PR everything?
user895378
Or if you like you can stick with PRs as a check to prevent accidental stupidity. I need that myself more often than I'd like to admit :)
user895378
It's whatever.
@rdlowrey If you don't mind - then I really don't mind going through PRs. Long story, short version, I have chronic back pain, and occassionally through a combination of booze and pain killers I shouldn't be trusted with anything, let alone committing code to something that other people will be using.
user895378
lol okay. PRs are fine. If you ever get tired of the PR process let me know.
Will do.
user895378
03:52
Once a v1.0.0 is done all the dev will happen in a separate branch anyway so at that point it should be less of a thing.
tbh I'm also still really bad at git - forcing myself to use branches, and then submitting PRs is not a bad thing anyway.
well this is interesting.. I managed to screw up the sendmail installation on my server and in turn break php's mail function. Fun.
user895378
<--- doesn't know anything about setting up sendmail
Well I think I found my issue.. that I can't fix
@rdlowrey The only code thing that I think Auryn is missing is the slightly smelly ability to define what is injected by matching the 'chain of class constructors' that I have in my fork, which you didn't want to include in the main branch.
03:55
the sendmail executable no longer exists @_@
m59
m59
This may be a sucky question to post
0
Q: Get string from array via property lookup, but insert a variable

m59I want to use property look-up on an associative array of strings, but there's a catch - I need to be able to use a variable in the string. I came up with two solutions, but both seem hacky in PHP. $foo = [ 'someProp' => 'Some value here: $$value$$.' ]; $myProp = 'someProp'; $value = 'some val...

and attempting to reinstall it does.. absolutely nothing
m59
m59
I can delete or close if so.
@rdlowrey but It's almost 4am - I'll either re-open the old issue, or make a new one to discuss.
user895378
@Danack k, thanks for the good work! 'night
04:29
Anyone can help with a PHP Form submission problem?
Morning
Well, night here, but I understand. Haha.
how is the o/p of this program 15?
function zz(& $x1)
 {
$x1=$x1+5;
}

$x1=10;
zz($x1);
echo $x1;
04:55
& is reference :D it changes the variable that you send in
Hello
Does any one have idea about Magento API?
Rest API.
@blackbee .. Output is 15 , Because its make use of Pass by reference variable .
m59
m59
05:12
Does anyone have a link for a complete set of RESTful api headers, for reference?
I guess I could just use twitter's api and get it =D
@m59 i am resting that's restful api :P
m59
m59
Disregard that question. I'm tired =D
REST post or get?
xml, json?
You can use google chrome, or firefox add on for viewing headers list by browser
Anyway I am going offline now bye
m59
m59
05:35
@web2students.com lol I said disregard. I know, I was just tired and not thinking.
goodnight.
@Rakesh how is it diffrnt from c .. in c we had to derefrnc it with *
Sorry friend.. i am not good in C .. but its similar to pointer which actually hold memory location of variable to which it is pointing and not value of it.
05:53
does anyone know if CSP 1.1 is backwards compatible with CSP 1.0 browsers?
morning
stackoverflow.com/questions/663171/… .. because, repwhoring with RTFM
@tereško Good morning
Can anyone please tell me why is filter_var('http://www.google.com', FILTER_VALIDATE_EMAIL) return false?
Oops it should be FILTER_VALIDATE_URL, my bad :P
If I am setting HTTP headers through a provider in Silex, would I use a ServiceProvider or a ControllerProvider to do so?
@KamranAhmed did that answer your question? =oP
06:11
@cryptic Yes :P
06:22
0
Q: javascript: get value from json

shree202I want to get value from the json obtained by this Yahoo web service: http://api.geonames.org/citiesJSON?north=44.1&south=-9.9&east=-22.4&west=55.2&lang=de&username=demo This is the data obtained from this url: { "geonames": [ { "fcodeName": "capital of a political entity", "t...

What a shitty question
06:47
I am using preg_match_all('!<a(?:.*)?href=["\']([^"\']+)[\'"](?:[^>]+)?>(.*)?</a>!', $html, $matches); to get all the urls from an html page. It keeps returning the whole anchor as the first element of $matches array. Is this how preg_match_all works or is there any thing with my regular expression that's making it to return the whole anchor as well? I tried ?: but it doesn't work either.
Any idea how to use OAuth in PHP?
Thanks @kamran
@KamranAhmed Why don't you use an XML parser?
07:02
Do we need any extension to be enable in PHP?
@Rakesh nope, not as long as you use the library. PHP does have an outdated PECL extension for OAuth, but don't even bother with it.
Thanks
@AshwinMukhija for example?
@AshwinMukhija thanks. I'll look into that..
m59
m59
07:09
I'm reading about CORS and I'm pretty lost.
m59
m59
07:21
So, if my server will allow ajax from another site...you go to that site, it allows you to login to my site via an iframe or popup. Then that site sends a request to my api, that user is logged in, that site's js is then going to receive confidential information from my site....
so that's bad.
I don't see how such a thing can be done safely.
and now you could describe your problem, instead of your patch for a broken solution
@m59 What the JS will get is a cryptographical nonce, sort of a token which will be 'consumed' every time a call is made to your API. A new nonce will then be created and sent back from your server.
So, there's no confidential information that is going to be sent
... I think I will have to make a trip to bakery, because there is nothing breakfast-ish in the apartment
You could add a TTL to the nonce as well, so that if any request is made to your API after the nonce has expired, you ask for authentication again, although, that's a huge bother, but is necessary IFF your API gives access to a channel which needs to be highly secure.
Initialized this open source project github.com/kamranahmedse/zombie-links-finder. If anybody wants to contribute, he is more then welcome ;-)
m59
m59
07:32
@AshwinMukhija I was referring to the data itself, like if you had some kind of private messages that another site would allow you to view...something like that can't be displayed on that site without the site being able to steal it, right?
I think what I'm getting at is that only public information needs to be available for cross domain ajax
@m59 That defeats the whole idea of a private message.
m59
m59
I don't think you're understanding what I mean.
It doesn't at all defeat the idea of a private message if only the intended recipient can view it.
It doesn't matter where they view it from.
You could send an encrypted message, which will be decrypted at the client site via the user's secret key.
m59
m59
that doesn't make sense to me.
Basically, whenever a site wants to use your API, you give them a secret key. Whenever any user on that site logs into your site, you ask him to confirm that he would like to use that site to log into yours.
m59
m59
07:38
I get that, I'm asking how in the world that can possibly be secure.
2 way encryption is not exactly insecure.
m59
m59
:(
Nothing to do with encryption.
This is a pretty easy concept.
I'll just shorthand it
I get that you are trying to fetch data from your site's API to the client.
m59
m59
$.ajax(
  url: 'path/to/another/server/where/the/user/is/logged/in'
  success: function(data) {
    display(data);
    saveThisPrivateDataToMyServerAlso(data);
  }
)
But you don't want the client to be able to save that data
m59
m59
07:41
LOL that is my point!!
You can't stop them!
If you are authenticating them to fetch data, you can't do jackshit about what they do with that data. The point of authentication is to indicate that you TRUST this client.
m59
m59
so I am correct? don't ever allow cross domain ajax for non-public data?
unless the origin is trusted (like google.com or something)?
and I'm pretty sure Google isn't going to be using my api haha
Even Google is not trusted.
Google is the biggest data whore the world has seen
m59
m59
hmm, I think there's got to be more to it than this, though... it seems like youtube has functionality like this
I think you can use youtube's api to view your private videos from a different site.
And what is stopping from that site to store the video?
m59
m59
07:50
yeah, that's what I don't get.
It just seems like that has to be impossible to secure.
@AshwinMukhija actually the NSA =oP
@crypticツ The world has NOT seen NSA's data whoring capabilities. :D
that's classified
m59
m59
I'll have to figure it out another time, night all!
@tereško github.com/Achrome/Conphig Fixed a bunch of code issues and added more Configurators.
It supports xml and json config files now.
@AshwinMukhija lemme see what else can I do about dashing your hopes and dreams
@tereško Great. Looking forward to it. :P
BBL, have a nice day lads!
@AshwinMukhija please use curly braces even if it is for a single statement in them
if ( $foo )
    do_stuff();
^ this is extremely annoying to maintain
also, it have a tendency to degenerate in
if ( $foo )
do_stuff();
other_stuff();
^ I was seeing it all over the code in my previous workplace
on a different scope: the whole API seems really forced
It would seem to me taht having something like this would be a much more fluid API:
$factory = new ConfigurationFactory('/config_root/');
$dbDetails = $factory->create('/db/config.ini');
$SOAPconf = $factory->create('/soap.xml');
as it is now, your configuration factory can create only one specific instance per factory , @AshwinMukhija
08:29
@tereško you might even introduce a config reader for that
or config provider or whatever
he wants to call it "factory"
oh, it's already a config factory missed that
I thought it's a factory that produces something depending on a config file
in general I agree, but as it is now, I am not entirely sure what he want to do with those config abstractions that he creates ... it is not a finished result
/me mentors 2 students these days
it's not that funny as I expected it to be
:-(
it's mostly frustrating, because you yourself take many things for granted and have forgotten that you had to learn all these hundreds if tiny habits and concepts
08:34
yep. The guy is really fast learner btw
without any practical experience - I even like his code
but he is very tightly limited by phpmd + phpcs ))
probably high IQ
it helps with grasping abstract concepts faster
yep. he now even writes tests that makes sense, assuming he knew nothing about automatic testing in general and unit testing in particular
might give you an a bit different perspective on IQ: youtube.com/watch?v=9vpqilhW9uI
queued
Good morning
08:55
Good Morning Guys
i got Uncaught SyntaxError: Unexpected token < in jquery.js line x
each time i tried to append a received data from json to a table
any idea
okay Thanks :)
hello everyone...:)
can you please help for this...
4
Q: Update Databse according to the Date Entered

aliasgar vanakI have three rows in database i.e start_date = 2013-12-1 end_date = 2013-12-31 status = 'a' When i want to change the status for dates start_date = 2013-12-10 end_date = 2013-12-20 status = 'u' In this case i can easily update database and updated database will be- 1)start_d...

09:10
on it ..
@BenjaminGruenbaum One more
Hello All
Need small help
I want to show checkbox in pdf
turn it into an image for PDF
while pdf is generate all checkbox is checked in pdf form
you are making no sense
Did you know about the PDF form
09:17
@tereško He wants all checkboxes checked inside the PDF
@BenjaminGruenbaum Burned.
@PriteshMahajan in that case, it has nothing to do with PHP
wait i'll explain the flow
I have 10 PDF
Client add in admin section of the wordpress
09:28
Can someone tell me some use for bitwise operators?
I'm reading about them but I can't think of a situation where I can use them
those are usually for cases when you want to store several flags as a single number
the bitwise operators then can be used to verify which flag has been set
And what are flags
?
Google is not helping, I can see mysql flag, flag function
FILTER_FLAG_STRIP_LOW << Is that it?
@SabTheCoder Say you have a few access levels for your users
lets say you want to store 3 boolean conditions : "is update" , "needs admin" , "has pink" , as single number
09:37
GUEST, READER, WRITER, ADMIN
001 - update , 010 - admin , 100 - pink
that would mean that "not updated, pink admin" can be stored as 110 .. or commonly know as "6" ... make a mistake, updated
@SabTheCoder Also a benefit is that pink > admin + update.
So you can say, if you want, that "pink" is more significant than both "admin" and "update" together.
Ohh
Now that makes sense
I was thinking of making a script which stores moderators admins etc
never knew this was used for that
09:40
it usually is a bad idea to store complicated permissions as binary flags .. hard to maintain
when i thought about the moderator and admin, I thought of making a column in my database
admin = 1
mod = 2
etc
usually you will see them used for storing "status" of some entity instead
Aha
@tereško not updated, pink admin won't this be equal to 110+010+100 = 010?
update = 001 , not updated = 000
only one bit is significant
but look at this:
~14 = - 15
~00000000000000000000000000001110
=
11111111111111111111111111110001
09:53
Morning.
@Leri affirmative
@tereško How was your interview yesterday?
it went ok
if nothing extraordinary happens, I should be getting the job
Great. You really deserve interesting job.
10:03
in my experience, "deserving something" doesn't really factor into it
no, that's a lie
on an unrelated note: what's with all those self-important noobs making different "right way" articles ?!
I need some plan to stop constantly trying to make my code more maintainable and start creating actual products.
@tereško where who exactly?
@webarto on first pages on google
10:10
@webarto "the internets" .. stumbled on one such article about "js modules"
blah, we saw a fine example of that the other day...
@ircmaxell Yeah I’m struggling with them at the moment. Not so much understanding, but teaching...
A person that is unsure of its knowledge, teaches others in a book format...
@webarto And thus, we have PHP.
10:27
0
Q: SetParam - Username & Session

user2722718Lets say I have a session named $_SESSION['user'] And now, I want to use SetParam to be able to print out the username on the site using {username} (without the php tags) Should it be something like this maybe? public $db; // Database variable(?) public function Param() { $this->db->setPar...

> I'm really new into this "function" or whatever it is, and I will be grateful if you could help me out a bit.
@bwoebi Generator::throw($e) executed a throw $e at the position where the generator currently stopped. So you'll be able to catch the exception with a try/catch block inside the generator.
It's used for async error handling ;)
@tereško link?
too late
@tereško fwiw - I think the module pattern is one of the most abused pattern in JS.
(Or was he talking about actual Common or AMD modules? Meh)
@BenjaminGruenbaum I still need to learn about practical (non DOM) applications for JavaScript.
10:37
IIRC, it was about AMD
I can't seem to wrap my head about it ^_^
@MadaraUchiha you mean serverside JS ?
@tereško Also
because any clientside JS, which you run in a browser, will touch on DOM at some point
@tereško I've seen so much shit written about AMD that I started having Pavlovian conditioning and now it makes me want to go to the bathroom. Seriously - the ways people get it wrong are amazing.
10:40
@BenjaminGruenbaum what do you expect? 99.95% of people who claim to "know javascript" are actually only able to coble together jquery plugins
@MadaraUchiha It's worth your while to learn proper JS for front end development regardless of any other application. I use JS for other things (mobile, as a scripting language, server, etc) but honestly I wouldn't learn JS for any of those alone.
@BenjaminGruenbaum I already know proper JS for front end development, I'm pretty good with that too :P
@MadaraUchiha it's less about knowing the language and more about knowing how to properly design applications. It doesn't really change between JS and any other language.
@BenjaminGruenbaum Yes, but again, what kinds of "Applications" do I have with JS?
@MadaraUchiha we are conditioned to take such claims with a grain of salt
10:42
You see people with ''leet js'' who know all the 'clever' tricks mess up basic separation of concerns all the time.
I've only ever used it as a supplementary or "prettify", never as an actual "Application"
@MadaraUchiha how many LoC of JavaScript do you think there are in facebook, or GMail? Do you think GMail is any less of an application than what you have installed? What about Cloud9.io , or Gliffy? Or any other web app?
@BenjaminGruenbaum LoC?
lines of code
and in gmail they most likely don't program in a pure js
(but it still is a valid point indeed)
@zerkms they do, with the closure compiler for optimization - they have projects like adwords coded is Java that compiles to JS though.
@tereško I'm standing in front of (yet another) 4000 LoC file called 'view.js' right now. I want to stab someone.
10:47
lol
you are lucky that it is called "view.js" and not "func.js"
misc.js
or dat
don't remember if I told it here but on my first job I was given a database with 30+ tables each of which was named A..Z, just a single letter (and few like AA, AB, since it was more than 26)
and every column in each of it was following the same naming, except id
so id was literally a single meaningful column name in every table
it was funny to reverse engineer it to convert to a proper schema
that sounds traumatizing
10:49
@tereško I also had a 2500 LoC "controller.js" in the same project with 15 globals that does everything - bootstrapping, create things, attach things... prety much everything.
lemme guess ... it implemented implements "my very code" architecture
Use Hungarian Notation
lol
It's still better than someone from JS course I am in that has his blog and says JS is stricte OOP.
@Robik what is "strict oop" ?
That JS is great OOP langauge.
10:55
it is
it just implements it in a non usual way
I doesn't mean the newest JS.
I don't either
I would say it has OOP capabilites.
@tereško It's a "I saw your 10 hour PoC prototype for this 6 months project and decided to use the same architecture you had there instead of coming to discuss the architecture with you like you suggested. By the way, I read about this cool thing called MVC"
@Robik and that's enough. Everything else is just an additional sugar
10:57
Yeah but it isn't only OOP.
:-S
@Robik JS has very loose oop. One of the least enforcing object systems I know (maybe not as loose as Lua?). It makes you take care of things yourself.
Like Java which enforces OOP, JS doesnt force you to write OOP code.
ohhhhhhhh
not forcing something doesn't mean to not support something
That's what I meant :)
10:59
btw, Java enforces to write a code using classes and objects
not every code that uses classes and objects is an OO code

« first day (1141 days earlier)      last day (4033 days later) »