« first day (1746 days earlier)      last day (3427 days later) » 

10:00
@tereško actually no ! I don't want to undrestand. I just want a small example. If I see a example, I can use of it ...
@Gordon Yeah. Tnx
@ThW Morning
@tereško This webpage is not available
@Epodax regular. friday normal has to be earned by going through regular normal ;)
@tereško how to include php file in html page with out change file extension?
@Thennarasu You don't (want to)
10:01
@Sajad must be an India thing. You should probably look into using a VPN to bypass the Great Firewall of India Iran
@Gordon Shame, I was just getting excited to see Rebecca again.
@Epodax you will. be patient ;)
.. jeez , all of the countries in that area are fucking mad
@tereško ah ok, I have a proxy, I'm using of it now
@Gordon Of that I have no doubt ;)
10:03
@Thennarasu you would have to alter apache configuration then
@tereško How do you draw a line on the India ?
---text---
test
ow :-)
ok, back to that StructureFactory
@tereško ok
10:05
so, there are two function in that class: the constructor (which shouldn't need explaining) and the create() method
the $provider contains a .. emm .. "function"
that "function", when executed would return a PDO instance
any questions so far, @Sajad?
@tereško no, please go on
s/StructureFactory/ServiceLocator
*goesintohiding*
@Patrick wrong
@tereško I like something like the using pattern for a lot of the things I do
in the create() method you first do a check to see if you already have a PDO instance, and if is not there, you execute the $provider and store the returned value
10:09
@tereško ok, so?
@tereško no
then you instantiate a new object and pass a stored connection as a constructor parameter
@Patrick 102
@Patrick as in: "factories shouldn't have state" ?
@tereško Why are you passing a function?
10:10
is the $name is 'Test', then this line return new $name( $this->connection ); read actually as return new Test( $this->connection );
What's the point of allowing the consumer pick this specific bit of functionality?
My wrong. I didn't read properly and thought it can create anything
Still, I don't really like it
@Patrick now imagine it's not PDO but SOAP
10:11
@tereško What's a "Structure"?
@MadaraUchiha placeholder name
@tereško For?
What you used to call "Service"?
no, it usually would be Mapper, but I had no intention to explain DDD stuff in the post from which the code was taken
This is definitely the most explicitly straight thing I've ever seen anyone describe as gay. — Janus Bahs Jacquet yesterday
:P
10:15
@tereško Okay, and what's the point with allowing the consumer to inject functionality?
@tereško so if you want a structure/mapper you need to depend on the factory instead of the structure/mapper itself?
Why not have various types of StructureFactories each with their own dependency creation/injection logic?
Dafuq happened in here this morning
new PdoStructureFactory($pdoCredentials), new RestStructureFactory($url, $apiKey), etc
@MadaraUchiha it was solving the "configuration problem". A clear way to do the DB config somewhere near bootstrap
10:16
@tereško What's wrong with that ^ ?
@DaveRandom What happened here this morning?
@PeeHaa why bother? Why not just kick and be done with it?
25 mins ago, by PeeHaa
@Gordon Yeah ofc you are right
10:19
@MadaraUchiha the main issue would be that the code is less reusable: when making a Postgre connection to do different flags
@PeeHaa lolwut?
@tereško Not really
passing a closure seemed like a lot cleaner way than maing some magic flag parser
$pdoCredentials would be passing the DSN, the user and the password
And also, if you really want to, you can further extend into MysqlPdoFactory and PostgresPdoFactory
> cleaner
@tereško Meh
Mixing functional with OO objects and classes is a delicate game.
10:21
I am a delicate person
There are a lot of words I would use to describe you. "Delicate" would not be one :D
yay, Japanese troll
@tereško the photo of your profile is your photo ?
yes
but is 5 years old now (and I am a guy, if you are wondering ... for some reason many do)
ok, back to that example, @Sajad
so, now the "script 1" part
10:24
@tereško ok, I Embarrassed to ask again ...
at first it assigns (but does not execute) a function to $provider
ok, so ?
BTW @tereško have you considered typescript?
then, the factory is instantiated (this is the point when autoloader would find the "script 2" file and includes it)
then, when you run $x = $factory->create('Test'); the code in script 2 prepares the DB connection and creates a new instance of Test class
@PeeHaa naah .. I ma learning ES6 now and then I will be trying to wrap my brain around Erlang .. again
Morning, does anyone know if there is like a technical channel where I can ask about electronics (for example a detector that you put in your toilet plate and checks the levels of sodium in your urine)
10:31
Hi Guys,any one have idea about dynamic content based page flips
@tereško ok, but I need to a separate file for autoloader ?
@ziGi IRC > Freenode > #hardware or #electronics
i am unable to find it content based page flips. any purchased versions also ok
@Sajad a really simple autoloader would look like this:
10:32
spl_autoload_register( function( $name ) use ( $path ) {
    $filename = $path . '/' . $name . '.php';
    if ( file_exists( $filename ) === true ) {
        require $filename;
    }
);
you would initialize it somewhere at the very beginning of you code
and it would be executed every time your code cannot find a class
@tereško ah, I see
Thanks
(it would pass the name of that class in the $name parameter)
@tereško Overall, I need 3 file, autoloader.php, rovider.php, StructureFactory.php
right ?
please could any one suggest
10:34
so, you do not need a separated file for the autoloader, but you should have a separate file for every class
@Sajad not really :)
@Sajad Are you not using composer?
one moment, I will look up a working example
@Patrick honestly I don't know what is composer
@Patrick I have a feeling that it's a bit too complex for him this month
@tereško really thanks, In fact I need to a Practical example
10:36
hi @Patrick. Do you have any idea about page flips for dynamic content
@user3454479 I have no idea what you are talking about. Why did you ping me?
@user3454479 please don't hassle people. People are free to not answer your question.
ok. sorry
oh, looks like I will be locked out in few moments for this comment: chat.stackoverflow.com/transcript/message/24716115#24716115
I wonder .. who found it insulting
No idea
Insulting countries is perfectly fine.
10:40
lol @tereško
Chat messages over half an hour old shouldn't be flaggable in an active room...
We have created the application using cakephp 3.0 that an application runs in an Iframe.

Now the problem is not able to get the session value in the safari browser.

We have tried this solution added header ('P3P: CP="CAO PSA OUR"') --->It works fine in IE browser

Anyone please, help to get the session value in safari browser
But countries have feelings too
@KarthikKeyan please don't hassle people. People are free to not answer your question.
HE SAID FUCKING! FLAG HIM
@Danack Define "active room"
10:41
@ Danack okay thanks
@MadaraUchiha or maybe is was "racist against muslims" .. for being outraged about intenet censorship
@tereško what is your religion ?
none
@tereško :-) ! why ?
@KarthikKeyan You created a cakephp application that runs in an iframe? o.0
10:43
@Sajad I see them as ancient fables from times when people where scared of thunder and lightning.
they are as valuable as any fable
there are those who teach us how to be better people and then there are those that tell us that you can cure headache with chicken entrails
@tereško wrong !! anyway you need a religion!
I believe in the almighty Elephpant. And Rebecca. But please don't tell the Elephpant please or he will insert bugs into my code
@Sajad lol no. But that's offtopic and some people quickly get offended by religion talk. And then we get more flags...
@Patrick Human needs a god to worship
He NEED! Instinctively
what we need is to "explain things"
we want to attribute event to some type of agency
10:47
@tereško what things ?
@Sajad lets say you were a primitive from ancient time and you saw a bush moving
posted on July 28, 2015 by Joe Watkins

Fig 1: Part of the universe I'm very mindful of speaking clearly, when I think people might be listening. It's extremely important to communicate ideas precisely, so that they can be understood with minimal effort on the part of your audience. In my parallel PHP podcast and talk, and a previous blog post, I gave clear explanations of asynchronous and parallel concurrency. I'm going to assume

would believe that it is moved by something (like a tiger) or that it moved on it's own
and what would be the cost of being wrong
those who believe that bush was moved by something would have a better chance to survive
@tereško ok, ok, In your opinion, There is a God ? just yes or no ?
my opinion is, I don't know, but if there is such a being, then it probably is nothing like any of religions claim it to be
user924016
10:50
no
@tereško I like your opinion.
@RonniSkansing then negotiation is over !
@Sajad Do you have any scientific evidence for one?
user924016
@Sajad there is no negotiation
@Patrick This book says so, it must be true!
@Patrick you are a evidence !
10:51
@Sajad Is that an insult? :P
@Sajad it is the scientific opinion. You cannot prove a negative, and to prove a positive one would have to be god-like.
@Patrick no :-)
@Patrick , yes
@tereško cough
/me changes subject
10:53
room topic changed to PHP: Discussion for all things PHP. No religion. Chat Guidelines : room-11.github.io [php]
/me actually changes subject
well, @tereško I'm still waiting for an example :-)
@Sajad I claim that there is a pebble that's made of diamond
@Sajad I dont have anything simple enough
@Sajad burden of proof (totally unrelated to religion cough)
Now stop it please :)
To prove the existence of such a pebble, all I need to do is find one
To prove that it doesn't exist, and thus, me wrong, you have to inspect every single pebble on the planet, and prove that it is not made of diamond
10:55
@Sajad the best I can give you is this thing: github.com/glome/cbc/tree/overhaul
@Patrick actually I don't know english, and I can not explain my religion. so Ok, I will stop it there !
ok, now that we've settled that one, on to the next: tabs or spaces?
:)
btw, @Sajad: youtube.com/watch?v=8r-e2NDSTuE .. watch it and tell me what you think
@tereško this is about religion ?
yes it is
10:58
@tereško I can not open youtube in my country. but ok, I will use of proxy and download it.
oh, fuck
@tereško really fuck :(
you really need to look into getting that VPN
@tereško I have a server, and I download things here are filter on my server, and then download them on my laptop :P
@Sajad just set up a vpn on it then?
11:00
@Patrick your solution is great :) !! I have a VPN ! ;)
This will reduce the speed
@tereško ow, I saw this video already, I don't know why, but I hate that guy :)
awww
@tereško you like him ?
@MadaraUchiha like
I liked him a lot about 5 years ago. But I have seen all of his material and now it has lost some of it's .. dunno .. "edge" maybe would be the word
@tereško but I like Stephen Hawking
Carlin's fans are mostly teenagers. Then you grow up and stop being so absolute about everything
11:07
@Sajad that's a different type of "like"
I don't find Hawking to be entertaining
@tereško I see, you like fun guys :)
@tereško may you give me your skype account ?
heh, nope
@tereško ok
skype is for work
fuck, I've been using skype for fun things.
:P
11:10
how to create nested drag and drop menu using php mysql jquery
I honestly cannot remember when I last time associated skype with "fun"
@madu By writing the code for it.
yes
it's more along the lines of "oh shit, project manager wants something again"
any free scripts
11:12
@tereško Set your status as "busy" :D
riiight .. because that have ever worked
the first rule of IT nowadays should be "Make two skype accounts, one personal and one for work"
or it's fun on weekend evenings
if you're that busy ... you can always come in during the weekends, when it's less busy :p
i find it annoying when people leave their status set to busy or away
@SergeyTelshevsky what for do I need the personal one?
status should signal something meaningful, not "i don't want to use this software"
@tereško do you have facebook ?
I have an account, but I don't use it
@tereško aha ok
@tereško ^^
/me has been slowly removing himself from social networks since the SJW shit started going on
11:17
how to get [{"id":1},{"id":2,"children":[{"id":3},{"id":4},{"id":5,"children":[{"id":6},{"i‌​d":7},{"id":8}]},{"id":9}]},{"id":10,"children":[{"id":11,"children":[{"id":12}]}‌​]}]
children paremeter in php
any one
decode that JSON as array and look for the "children" key
should i take like this children->id[0];
try programming then
i am new to json
the native language of all of you is english ?? if not, What is your source?
11:22
english is my 4th language
@Sajad I'd expect that the majority of people in here are not native English speakers
@NikiC ok, give me a refrence
@tereško good for you ... and what is your native language ?
latvian
CQRS + ES
11:26
/throw a 6 to start
@ziGi Looks like a good model for an event dispatcher in PHP should we ever need one...
Nice, so the Event is an object which contains both observers and subjects
@Jimbo it's something I compiled from the DDD book with the help of Matthias Noback, a dutch architect
@Jimbo the event does not contain observers
it's the observable
what is that number ?
i have problem with css
i want to use css class on condition base
how it's possib;e
11:30
@PrashantBhatt here is a php room, go to css room here
@ziGi "An observable to which observers / handlers can be attached and notified". This says to me that it handles (no pun intended) both.
@Gordon actually, I don't understand it too..
@Jimbo both processor and projector are event handlers and implement the same interface, it's just that projector connects to the repository/data mapper and saves the information, and the processor can create reporst or send email or other infrastructure operations that are combined
how to get [{"id":1},{"id":2,"children":[{"id":3},{"id":4},{"id":5,"children":[{"id":6},{"i‌​d":7},{"id":8}]},{"id":9}]},{"id":10,"children":[{"id":11,"children":[{"id":12}]}‌​]}] id and childeren paremeters
any one know
@madu as @tereško said, you should decode it as a array, then select desired key.
11:47
@Sajad Reputation gained this week. Hover over it with your mouse, you get a tooltip that tells you.
@DaveRandom aha, got it, thanks
@Sajad omg, a real dreamweaver installed
@SergeyTelshevsky what ?
didn't think anyone still uses that
@SergeyTelshevsky I use of sublime now, but I like DW, you don't ?
@SergeyTelshevsky yea, that is heavy a bit
@Sajad i tried i this $datas='[{"id":1},{"id":2,"children":[{"id":3},{"id":4},{"id":5,"children":[{"id":6},{"id":7},{"id":8}]},{"id":9}]},{"id":10,"children":[{"id":11,"children":[{"id":12}]}]}]';
$datas1=json_decode($datas,true);

foreach($datas1 as $key=>$value)
{

echo $value["id"];
echo $value["children"]["id"];

}
but not getting childeren
values
@madu are you using a debugger?
no
how do you want us to help you if you're not helping yourself?
11:59
The sane way to figure out how to read data out of arrays, if you don't already know their structure is to use a debugger to see what the arrays actually contain, by stepping through the code.
PHPStorm has a free trial - please use it - and here is a tutorial on how to debug with it youtube.com/watch?v=LUTolQw8K9A
do yuo know
how to get children parameter
from json
posted on July 28, 2015 by kbironneau

/* by Chat noir */

@madu Yes thanks, I do.
Hello
can you get it its urgent
maybe its simple for you
how to get children parmeter from jsom
@Danack
12:07
@madu SO isn't a code writing service. We've already given you advice on how to solve the problem yourself. And no, it's not an urgent problem for me.
@ziGi you want to check Greg Young's material on the topic. /cc @Jimbo
@Gordon link?
@ziGi lazy @ziGi is lazy: goodenoughsoftware.net/?s=cqrs
I found a different thing
I thought, you had something specific in mind, not that I am lazy
as you can see I am not lazy to talk a lot and search a lot
12:13
to help people
how to featch time from data bse
DATE_FORMAT(orderDate,'%d-%m-%Y') AS orderDate
my sql field is like this in that field i am also insert time
@Gordon ok thanks!
12:15
what i do to fetch from database
a connection to the database
then a query to the database
then a loop over the collection of information you get from there (if not a single record)
@PrashantBhatt data
Hi iframe session is not work safari browser, we have not able to get the session value in iframe
Any one please help
@DaveRandom sir i want to fetch date and time from mysql table
@KarthikKeyan Either stop using Safari or stop using an iframe. Or go down to Apple HQ and start shooting. The last option won't actually fix the problem but it may make you feel better, if only briefly.
12:23
i am getting date but time is not fetch proper from my database table
@PrashantBhatt Please stop using 'sir'. We don't live in the middle ages anymore
@PrashantBhatt Then probably your column is of data type DATE and not DATETIME
@Patrick 'sir' is not limited to middle ages
@Patrick That would be "sire"
no my datatype is DATETIME
12:24
In the PHP/MySQL world, dates and times are just strings anyway. When you select a date/time/datetime/timestamp column you get all available data back as a string.
i am selecting date like this
DATE_FORMAT(orderDate,'%d-%m-%Y %h:%i %p') AS orderDate
but not a proper result it's give me wrong time
@FlorianMargaine it's a title for knights and baronets according to wikipedia. I don't think they still exist
As in computer world everything is a sequence of bits, everything is a string..
not C one :p
user895378
morning
Anonymous
@rdlowrey o/
12:26
@Patrick it's also a word used in current cultures
@PrashantBhatt Don't put presentational logic in your database. Just select the raw value and use PHP to format it as you want to display it (using DateTime)
@DaveRandom , So its is not possible to use session in iframe in safari browser, correct ?
Not reliably/sanely
There are whole bunch of dirty horrible hacks but don't do that
12:46
If you need any kind of dirty hacks, ask @Ocramius, he's an expert
Anonymous
@DaveRandom Why are sessions unreliable with iframes?
@Jay Because safari and "sekuriteh"
Good afternoon.
Anonymous
@PeeHaa Oh it's safari, not iframes specific.
The user first has to do something in said iframe before it is trusted
12:55
Is there an easy way to check if a website is SQL injection vulnerable?
@Jay It's a bit wonky in general, but safari is a whole nother level
@Duikboot Yeah
Either manually try to inject or if you are really lazy install havij
user895378
Am I the only person who wishes PHP could use C-style linkage specifiers on functions so that they're only available for use in the file in which they're defined? Would that be bad?
Havij
Anonymous
@PeeHaa Aaa I see, thanks :-)
@ziGi So an abstract way of having an unrelated event occur when something specific happens
12:56
@rdlowrey My brain cannot see a usecase for that. Doesn't mean it's a bad idea though
Never heard of that :)
@rdlowrey If you frame it as "visibility modifiers for functions and classes" I'm sure people would agree
@PeeHaa Seems like it's only available for windows?
I am always so tempted to write sth witty into the "How to reproduce" field in Jira Bug tickets
@Duikboot Not sure
12:57
Though I guess that would be about use in the same namespace, rather than same file.
must … resist …
Do you have that program installed?
user895378
@NikiC ah yeah same namespace would probably be more useful.
user895378
Could probably reuse private as the keyword too
private class Foo {} ?

« first day (1746 days earlier)      last day (3427 days later) »