« first day (1994 days earlier)      last day (2954 days later) » 

12:03 AM
@KristianHareland I think you should try the DateTime class and its add method
I think the + in the strtotime format string is used to mean time zone
 
user5029208
Hey how do you change a function in a parent class that already has another class extending it.
 
user5029208
is it class NewClass extends Parent implements Existing Child??
 
please no^^
 
I like the response from Greg KH
 
Wes
3:43 AM
mornings
Happy Aprebecca Fools Day!
 
happy same, mornin
 
Wes
not same, repeat it! Aprebecca Fools
 
meh, too lazy :p
ok, happy Aprebecca Fools!!!!111!
 
Wes
that's not lazy. i just got tired writing my todo of the day
 
heh
2
 
Wes
3:56 AM
lol
 
that's mine at 1am of the bright new friday
 
mornings
 
o/
 
Wes
i'm envious. mine is already 10 entries long
morning ronni \o
 
Hi can you take a look at my preg_match
preg_match_all("/<div class=\'CR-2-content-div\'>.*?<a href=\'(.*?)\'>.*?<img src=\'(.*?)\' alt=\'(.*?)\'.*?<\/div>/s", $newData, $rss);
am I missing something?
 
4:01 AM
@winresh24 php.net/dom
 
Wes
1326
Q: RegEx match open tags except XHTML self-contained tags

JeffI need to match all of these opening tags: <p> <a href="foo"> But not these: <br /> <hr class="foo" /> I came up with this and wanted to make sure I've got it right. I am only capturing the a-z. <([a-z]+) *[^/]*?> I believe it says: Find a less-than, then Find (and capture) a-z one or ...

 
mrnngs
@Wes meh. I got lazy thinking about a todo list
 
Wes
yeah it wasn't the writing but rather the thinking i guess
 
(the next step would be "I got lazy", I think)
I'll admit oneboxing a rebecca video is pretty much the summum of lazyness though....
 
I would've got lazy, but wasn't feeling up to it.
 
4:09 AM
nostalgia is not what it was anymore
I've had one activity for which I wasn't lazy at all today. Buying scotch.
Somehow I was very willing to get out of the house and walk to the store for it.
 
Wes
someone got a link to some php project with well written tests?
as in well organized, tidy
 
4:45 AM
Hi, if I want the class of the first one in the loop to be active and any following one not,
for($i=0; $i < $arrlength; $i++) {
$path = $pic_path[$i];
echo "<div class =\"item active\">"."<img src=\"$path\" alt=\"content image\"/>"."</div>";
}
how do I do it
seems that I find the way
to do it
 
Wes
@fortrustit
<?php for($i = 0; $i < $arrlength; $i++) { ?>

    <?php $path = $pic_path[$i]; ?>
    <?php $active = $i === 0 ? 'active' : ''; ?>

    <div class="item <?=$active?>">
        <img src="<?=$path?>" alt="content image">
    </div>

<?php } ?>
 
Thanks for your reply @Wes
 
Wes
5:00 AM
it's not a good idea printing html with php. let php just print the plain strings, eg <?=$string?>
 
Right, I see, but I've no other way to get the img path atm. The path is stored in json files
 
Wes
so? that is irrelevant
 
Errr not really
for($i=0; $i < $arrlength; $i++) {
$path = $pic_path[$i];

if ($i == 0) {
echo "<div class =\"item active\">"."<img src=\"$path\" alt=\"content image\"/>"."</div>";
} else {
echo "<div class =\"item \">"."<img src=\"$path\" alt=\"content image\"/>"."</div>";
}
}
I've changed to something like this
but it's not working
 
Wes
i've already answered you
 
posted on April 01, 2016

New Cyanide and Happiness Comic

3
 
5:11 AM
Ah yeah, I'm trying to understand what you've written. I've just started coding
I think I undertand now, thx agian :)
 
Hey guys, anyone active?
 
@Wes there is one more problem
$arrLength is undefined
$flag='./json/'.$_GET['id'];
$json_string = file_get_contents($flag);
$data_output = json_decode($json_string, true);
$pic_path = $data_output["pic_path"];

$arrlength=count($pic_path);
this is how I get the array length
 
Wes
pastebin.com the complete code
 
5:27 AM
<?php
$flag='./json/'.$_GET['id'];
$json_string = file_get_contents($flag);
$data_output = json_decode($json_string, true);
$pic_path = $data_output["pic_path"];
//print_r($pic_path);
$arrlength=count($pic_path);
//echo $arrlength;
for($i=0; $i < $arrlength; $i++) {
$path = $pic_path[$i];
echo "<div class =\"item active\">"."<img src=\"$path\" alt=\"content image\"/>"."</div>";
}
?>
this is the complete code
 
morning
 
Hey guys, I've developed an API in PHP.
And I have an application.
Using jQuery, I fetch data from the API.
Is there any easy way to insert the data into the HTML view. (Plain html files).
 
Wes
print_r($data_output) @fortrustit
@fortrustit i can't answer that without knowing how the json looks like
 
It's simple.
The JSON is something like:
Well, I parse the JSON into a JS object.
Oh.
 
Wes
@HassanAlthaf you can use stuff like twig or blade, or even plain php, maybe?
 
5:33 AM
@Wes Eh, the application must be using jQuery only for frontend to display data. -___-
Would Angular be a good choice?
over jQuery^
 
Wes
mustache.js ?
 
woah does it exist?!
@Wes Thanks a lot mate. Exactly what I wanted! You saved me!
 
Wes
there are others though, just search for "javascript template engine". mustache is one of the simplest ones anyway and for that reason it's a good choice, imho
 
{"headline":"Our trip to Chicago",
oads\/56fda33eede479.33100344.jpg"]}
 
Yeah, thats all I needed. I just want to be able to parse the DOM easily and insert dat.
 
5:39 AM
morning
 
*data
 
@Wes This is what looks like in json
 
this will be a terrible, terrible day
10
 
@Wes By the way is there a way to escape {{ }} in laravel?
 
5:40 AM
lmfao
 
if only it was all that we will have to deal with
 
Aprebecca day.
 
Wes
avoid room 11 day!
 
mornin tereško
 
moin
 
Wes
5:42 AM
@HassanAlthaf The real question is, is there a way to escape away from laravel?
 
@Wes I wish I could. xD
 
Wes
yo joe
 
I'm trying to do that.
 
morning joe
 
5:44 AM
every time I write a patch for an RFC, my arm is twisted to make it worse, by the time it's merged, it's a totally different thing ... it's happening again ...
 
Wes
typed fields, right?
 
yeah ...
private Thing thing,
Other thing2;
 
morning
 
it's obvious why java doesn't support that, and just as obvious why we should ... but apparently nobody else sees that, and thinks that all declarations in a group are going to be the same type, even though there has been no types on fields for 20 years and there is no good reason to think that type is a criteria used to group things together in the first place ...
 
I work in a pretty big open space, about 120 IT+Sales. This night someone installed a fake camera with a blinking LED in woman's WC and put a sign on the door that for security reasons they will be filmed. Shit has hit the fan when this morning one of our heads saw that.
 
5:50 AM
@ircmaxell sees it ... but won't get involved in the conversation ... (don't blame him, just saying) ...
@SergeyTelshevsky that's an obvious joke, right ?
 
Wes
@JoeWatkins LOL
 
@JoeWatkins yeah, it's already was uninstalled, but for some time everyone forgot it's 01.04
 
yeah lol, but that's probably the rules were going to have ... because the people being vocal are saying we should ...
 
Wes
that's.... incredible @JoeWatkins seriously someone asked that? seriously someone agreed with that? seriously?
 
that what zeev, crell, dmitry and everyone who is saying anything at all are saying ... even @PhilSturgeon :(
 
Wes
5:56 AM
private Foo $foo1, $foo2, $foo3; ?
 
"but that's how C/Java/C# does it"
@Wes illegal, ambiguous ...
but they're saying that the type should apply like private/static other modifiers do
that's so fucking stupid ...
 
!!rfcs
 
@Wes if you write that in java, where everything must have a access modifier, and a type, it's safe to assume that the modifier and the type apply, you have to assume the type applies because they must have a type ... in php, where it should be the default to have no type, that's ambiguous ... in php, where nobody uses types as a criteria to group stuff together because they don't exist, it doesn't make sense to assume that all of a group is the same type if the first element is typed ...
moin @Ekin
 
Wes
i don't actually have an opinion because if one groups field declarations is a moron regardless. i don't go past that. it should be disallowed entirely because ambiguous and that very discussion explains why it is ambiguous
 
mornin Joe the grandmaster
 
6:04 AM
I could agree with that, but what would people say if we imposed that rule !?
probably no winning this argument ... I hate making stuff worse ...
@Ekin hehe, you know, I didn't call myself that ... it was @SergeyTelshevsky ...
 
:)
 
I thought everyone calls you that
 
it kinda conjures images of a little bald robed monk version of me ..
 
I picture you playing chess well
 
Wes
that said, i would group fields logically, rather than visibility or type. why on earth one would do that? what's the point of grouping by type or even visibility?
 
6:08 AM
... I am damaged
 
after this me too
 
"grandmaster" to me means a league in Starcraft
 
@Wes visibliity is one of the only criteria provided by zend ... would be one reason ...
 
Wes
doesn't php-fig tell people to not group fields declaration?
 
in languages where types are static, it's considered good practice to do that also ... because dry ...
type *thing, *thing2, *thing3 > type thing1; type thing2; type thing3;
@Wes not sure
 
Wes
6:11 AM
the fundamental difference is that in php type declarations are optional
 
couldn't find any code that actually does it in laravel or doctrine ...
yeah exactly!
it should be the default to have no type, to infer types is totally fucking strange ... why does nobody see that ...
I said it was a different decision to make and zeev said:
> I don't think the decision is fundamentally different. It's fundamentally very similar if not identical.
 
@tereško but is it, really ?
 
morning and happy Rebecca day
 
really hard to tell
 
6:15 AM
I think the people signing are joking, some of their responses have to be tongue in cheek
 
no, they are joking
 
Hi morning! one can say derived database table as a view?
 
oh but the petition might be actually real ...
 
@tereško They are making fun of the issue with some optional stance from one of the chars in the game
Where the girl shows the butt.
 
yes
 
6:17 AM
o/
 
that's probably a bit over the top ... but removing guns is a pretty stupid suggestion, I can't imagine anyone making it seriously ...
 
... there's even an all-in-one comment with vaccines, sexism, guns, theoretical kids
 
I'm a tad dissapointed in Blizzard tbh, I though they had more backbone than that.
 
> THINK OF THE THEORETICAL CHILDREN!
2
ha
 
Oh damn, still I have my issue from yesterday Im not yet able to pull from my staging server. Im trying to pull my git repo from a BitBucket account. >< Everytime: Permission denied (publickey).
fatal: Could not read from remote repository. Im already able now to push changes from my local machine to bitbucket but not more then that.
 
6:19 AM
> I am a girl who sexually identifies as leeroy jenkins if he was a warlock, and these guns are triggering to me
 
@Epodax TB made a fun rebuttal for that: youtube.com/watch?v=Ydii76-1l5w
 
ahaha
 
search "I feel guns are far too phallic"
 
I'll have to watch it when I get home
 
that's a good one too
 
6:24 AM
I had fun playing Overwatch beta, actually
 
I think it's a great game too, I'm just sad to see Blizzard bend their knee for this kind of bullshit idiocy.
 
are there naked men in it ?
 
Not that I know of :P
 
what if there were ?
 
@JoeWatkins even the gorilla has clothes
 
6:26 AM
lol
 
OT: the tesla model 3 sure looks nice. lets hope its not an april fools hoax
 
I'm not sure I get where you are going but, then it would be a issue since it's a game?
 
and that's a call for animal abuse
 
#NakedGorilasNow ?
 
@Epodax it was correct to remove the naked or partly naked people ...
 
6:27 AM
@JoeWatkins No one was naked
 
@JoeWatkins not really, but I guess Hanzo could be seen as sexualized
 
@Epodax got an image of whatever was removed ?
 
2 sec
 
hmm.. everyone has a draven face in league of legends now. today's indeed gonna be long.
 
@tereško half naked torso? so what..
 
6:28 AM
It's the STANCE
That they have a issue with, because it's too "sexy" the way her butt is showing
 
gotta watch for a topic with best jokes of today
 
well, this I don't understand ...
 
@SergeyTelshevsky the outrage culture does not care about details
.. or facts
 
@JoeWatkins eurogamer.net/articles/… <- where I got the picture
 
6:31 AM
@tereško should probably sue all tribes..
 
Omg whyyyyyy Duikboot eats his shoe.
 
Don't eat your own shoe?
 
this issue makes me so angry :D
 
they must not have noticed Lara Croft ...
hasn't that been going on for 15 years or something ?
 
more like 30
 
6:33 AM
yeah probably, it was already a thing when I was a kid ...
 
First release, Tomb Raider, 25 October 1996
 
iirc the best feature about the second version of the game was the shape of her boobs ...
yeah I was 12
 
at the very basics it's someone's work.. their creation. some people really look at the very wrong place to find where female is symbolized and to react
 
Oh god, Imagen if they wanted to change boobs / etc back to pixelated boxes to make the female chars less sexy :O
 
Hey huys what about I asked?
sorry I mean guys....
 
@Ekin agree ... sexuality is being imposed by the conversation ... it's not really sexual ...
 
@SergeyTelshevsky :P
 
when someone said they removed a picture of someones butt, I thought it meant actual naked people, which is obviously inappropriate, even for a game with guns and murder as it's main theme ...
 
@JoeWatkins No argument there, it was perhaps a poor choice of words from my side :)
 
6:42 AM
what it boils down to is people manufacturing outrage to make themselves feel important
 
poor choice of word! fantastic dialogue in @batman
 
... what?
 
I mean that dialogue in batman is a good one....
 
... what dialog? I haven't seen the movie
 
6:59 AM
so so so moved my local git /.git/ to the staging area again, and now its working.
FINALY ! Highfive!
 
7:09 AM
moin
@tereško ever the optimist
 
I actually suspect it might be real
 
Wes
@SergeyTelshevsky ahaha
 
@tereško I suspect there were no update notifications at all back then
 
7:13 AM
@Andrea nice logo :D
 
@SergeyTelshevsky is it possible to upgrade that to windows 10?
 
@SergeyTelshevsky you could be right about that one
 
good morning
 
7:15 AM
oldest windows I have seen is win3.11, and that was only once
 
@tereško I think the internet connection support back then was something that was not even out-of-the-box
 
I actually have a machine that still runs and has 3.11 on it
 
@DaveRandom will you update it to 10?
 
It's a Gateway 2000 486 and it's kept in the original box with the cow patterns on it
 
@SergeyTelshevsky trumpet winsock
 
7:18 AM
lol, I actually remember the cow boxes
 
@Epodax You should watch batman dark knight by Christopher nolan
 
@PaulCrovella never seen that one
 
That's the defacto-standard Windows TCP/IP stack before it was builtin
There were a couple of others as well
 
I only remember using internet on 95 I think..
 
Yeh 95 was the first OS with IE I think
 
7:22 AM
jeez, people, how long have you used computers?
 
@SergeyTelshevsky your isp would give you a copy of it on a floppy disk, which you'd lose so you'd dial into a bbs, pirate it, then go online
 
since about 1991-ish?
 
about 2005-ish for me
 
Actually we had a BBC micro before that but I wasn't allowed to touch it
 
mid/late 80s
 
7:23 AM
@DaveRandom you have 10 years on me
 
about 95 for me
 
My dad worked with IBM mainframes, I was only 7 in 1991
 
99+
 
I'm ballparking that based on my age that time, btw
 
7:25 AM
Windows Redstone
 
Windows Redstone?
 
2009-ish
 
my mom worked within a Unisys IT team when I was 7 in 99
 
yeah, search it in google
 
but I was 6years old in 95.. and been only playing games on pc.. like prince of persia on MS DOS..
 
7:26 AM
How old was the first computer you used? Join our pissing contest and see if you're a winner!
 
we had an atari 130xe.. my dad would bring home games on cassette (there was a kind of a pool with his coworkers) which I'd copy to 5 1/4" floppies
 
Windows Redstone Build
 
I learned cobol around 2001-2
 
and as a 6y I didn't demand porn so I didn't need no internet
 
7:27 AM
I remember first programming experience for me was writing scripts for mIRC..
 
I think that's true for a lot of people, I know @MadaraUchiha has spoken of mIRC scripting before
I started with QBasic when I was about 8 or something, then did nothing else until I was about 21/22
 
I can relate. I did completely irrelevant stuff until 17
then started when we had some ideas or somewhat projects to give a try
 
it has been 5 years my that i bought in college and started with some basic C..
serious coding started from last some months ago..
 
Soz wrong room.
 
7:33 AM
yeah, well .. seeing this thing in mid-90s left its mark: imdb.com/title/tt0113243
 
@DaveRandom It was probably a 1990 toaster running Win 95.
This was in 2001.
 
01001000 01100101 01101100 01101100 01101111 00101100 00100000 01010111 01101000 01101111 00100000 01100011 01100001 01101110 00100000 01110101 01101110 01100100 01100101 01110010 01110011 01110100 01100001 01101110 01100100 00100000 01110100 01101000 01101001 01110011 00111111
 
Holy shit, binary
 
@DaveRandom what do you mean "how old"? the way you phrase it, anyone with a 6 yo sinclair would win over someone with a 3 yo c64
 
Nothing like a good bit of pedantry
 
7:38 AM
0
A: What does "zend_mm_heap corrupted" mean

Joe WatkinsThis is not a problem that is necessarily solvable by changing configuration options. Changing configuration options will sometimes have a positive impact, but it can just as easily makes things worse, or do nothing at all. The nature of the error is this: #include <stdio.h> #include <string.h>...

me, saying things ...
 
@DaveRandom I was poor, so I was hmmm 11 by the time I got an Amiga 500
AmigaBASIC was kind of spesh
 
hey im trying to get equivalent of this code in php curl im new to curl in php 'curl -X GET --header "Accept: application/json" --header "authorization: Bearer <API token>" "https://website.com"' any help?
 
!!docs curl_setopt
hello @Jeeves? you listening?
@BhaveshDeshmukh php.net/curl_setopt
 
Happy rebecca!
 
!!version
@PeeHaa why does @Jeeves hate us ?
 
7:53 AM
can you blame him? have you met us?
 
Morning.
 
Anyone knows what have i done wrong?
<?php $flag='./json/'.$_GET['id'];
$json_string = file_get_contents($flag);
$data_output = json_decode($json_string, true);
$pic_path = $data_output["pic_path"];
$arrlength=count($pic_path);
if($arrlength > 0) { ?>

<?php
for($i=0; $i < $arrlength; $i++) {
$path = $pic_path[$i];
if ($i==0) {
$active = 'item active';
} else {
$active = 'item';
}
echo "<div class =\"$active\">"."<img src=\"$path\" alt=\"content image\"/>"."</div>";
}
?>

<?php } ?>
The $class doesn't set differently
 
Which $class?
There is no $class.
 
I've also post this in a question if you feel to answer
$array
sorry
$active
0
Q: php contidional output html

fortrustitI need to output html based on the string length of a array stored in json file on the server which can be obtained by php like this: $flag='./json/'.$_GET['id']; $json_string = file_get_contents($flag); $data_output = json_decode($json_string, true); $pic_path = $data_output["pic_path"]; $arrle...

 
@CharlesCraft50 3v4l.org/bZtAh
 
8:02 AM
@JoeWatkins I have probably screwed something up last night @Gordon
 
@PaulCrovella hehe
 
@fortrustit the formatting
 
@PeeHaa /me throws stuff at @PeeHaa
 
Sorry :(
 
@Gordo What about the formatting
 
8:03 AM
Yeh Gordo
 
@fortrustit "Anyone knows what have i done wrong?" <<< the formatting
 
@PeeHaa Don't drink and commit
 
@Gor
 
@DaveRandom I know :(
 
@gordon but I don't have syntax errors
 
8:04 AM
mumbles something about the tab key
@DaveRandom Where' the fun in that? Drunk commit messages are the best :D
 
@fortrustit He means that your code is unreadable because you didn't format it for posting. See the "fixed font" button when you paste code? Press that one before you post the message, or use a pastebin if you code sample is longer than 4-5 lines
 
@DaveRandom commitlogsfromlastnight.com < says it all ;-)
 
@DaveRandom Thanks for your explain!
 
> Nerfing vaginal & anal capacities + slight rework
wtf
 
8:07 AM
<?php 	$flag='./json/'.$_GET['id'];
		$json_string = file_get_contents($flag);
		$data_output = json_decode($json_string, true);
		$pic_path = $data_output["pic_path"];
		$arrlength=count($pic_path);
		if($arrlength > 0) { ?>

        <?php
			for($i=0; $i < $arrlength; $i++) {
				$path = $pic_path[$i];
				if ($i==0) {
					$active = 'item active';
				} else {
					$active = 'item';
				}
				echo "<div class =\"$active\">"."<img src=\"$path\" alt=\"content image\"/>"."</div>";
			}
		?>

<?php } ?>
 
> or use a pastebin if you code sample is longer than 4-5 lines
 
^
 
and back to the tiny avatar list.. when will I learn
 
@fortrustit $flag='./json/'.$_GET['id']; this part might end up being exploited as a vulnerability
 
8:09 AM
@PaulCrovella there's a big avatar list?
 
@tereško Yeah, but it's the easy way to do. I don't have much time to change to post
Now I've pasted the code on pastebin
My problem is I need to set the div class differently, but this seems not to be working
 
how to get the everything after the last slash in url. For example: www.mywebsite.com/test/anothertest/getthis

I want to store 'getthis' in a variable
 
@fortrustit, when you do a "view source" exactly do you see?
 
@DaveRandom did you look at the code?
 
No, I was slightly afraid to
 
wtaf is that repo
 
@MatthewSmart php.net/parse_url if you want to filter out a query string / fragment first
 
Hi, can anyone tell me how to use mysql_real_escape_string() in pdo?
 
@astrosixer you don't. In PDO you use prepared statements. Try reading this: wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers
 
8:28 AM
@astrosixer You don't. Use prepared queries. (Also, I recommend using a wrapper/query builder library such as Aura Sql/SqlQuery
 
@tereško that means I cannot use use it in pdo.. right?
 
@astrosixer yes
PDO uses a different system for securing queries
 
Thank you @tereško
 
anyone worked with altorouter before?
 
I may have to relent and finally reboot my computer :-(
 
8:37 AM
@AllenJB wrapper/query builder library?how can use it in my code?
 
@MatthewSmart nope. Sounds like something you dug up from depths of composer.
 
@tereško aha, pretty much was my last resort
 
for what?
 
routing, couldnt get anything else up and running
 
just make your own router
 
8:40 AM
I don't know how to, all i want to do is say if user goes to example.com/products/ then use the products.php template and get al lproducts
and if user goes to example.com/shoes/ or example.com/ties/ for it to use products.php template but only get the data for the category ties or shoes
 
gist.github.com/teresko/661ea3d969ee44213e2867c54df9e83f - here is a simple routing script .. no classes, no function, just a straightforward script
 
user image
2
 
I would normally use laravel, but company want buy a vps , we only have shared hosting which means laravel wont work.
and i refuse to use wordpress
@tereško is that one you made which you use in your sites?
 
what sites?
 
well, sites or applications, i'm assuming being on here you do those
 
8:45 AM
I have my own router library, that I use for my own projects
that script is just a simple example of the basic idea
 
Fair enough, im just going through it
 
@MatthewSmart there is an accompanying SO answer for it too: stackoverflow.com/a/19309893/727208
 
Thanks for that, will it allow me to do what i said earlier
 
@DaveRandom mIRC ftw :D
 
or will it need adding to
 
8:50 AM
the script will let you extract parameters from URLs
 
@MadaraUchiha moar intrnt spk wch cntns vry fw vwls
 
ok thanks
 
I always found txt spk harder to write as well as harder to read, I wish people would just write properly
It's not 1998 any more. Bandwidth is cheap.
 
@MadaraUchiha nice avatar :)
 
@FlorianMargaine Thank you
 
8:53 AM
Didn't you used to have that one ages ago as well?
Going old school, soon you'll change your screen name back to Truth and eventually be unborn
 
The pains of choosing what Virtuelisation OS to use :(
 

« first day (1994 days earlier)      last day (2954 days later) »