« first day (834 days earlier)      last day (4128 days later) » 

3:00 AM
I would need to fry some chicken to come close to that "I knew it!"
@webarto You have real problems with that?
 
@hakre Cooking?
 
@webarto Creating some food with your new kitchen?
 
how to set two primary keys at once ? ALTER TABLE table ADD PRIMARY KEY AND ADD PRIMARY KEY..
 
@bushdiver This is only possible with a so called Transaction
 
Transaction?
 
3:03 AM
Yes, Transaction.
 
I have to pay somebody to do it for me?
 
An action that transposes through multiple actions.
 
Sounds magical
 
@bushdiver No, technically, not.
 
@hakre I leave all the problems to wife on weekdays, but on weekends, it's my turn, because I have no life other than sitting in front of 'puter. I can fry, cook and bake some things, but wraps are first new to me :P
 
3:04 AM
how is it done? with statement?
 
@webarto do wraps. The feeling of cold bread comined wiht sauce, fresh veggies and fried stuff is just a relief
put sort of strong herbs on top and you will blow some minds.
 
@hakre I shall mimic KFC Twister afterwards.
 
oh come on node.js. i want to learn you, but i need to update my xcode, and to update my xcode, i need to update my os x? why don't people respect the fact that i like my os that's outdated by two years?
 
@webarto Oh KFC Twisters is like once a year. You can do once a week better.
 
@webarto now that you mention KFC, why are you even making a wrap? haven't you had a double down?
it's a sandwich, but instead of bread... fried chicken patties.
 
3:06 AM
ALTER TABLE tableName ADD PRIMARY KEY (columnName) AND ADD PRIMARY KEY (columnName); is not working =(
 
@dyelawn Looks healthy ... not :P Nope, haven't see one, that is probably US only :)
 
@bushdiver ONE primary key (1st key) per each table.
 
@dyelawn wanna know why people think all Americans are fat?
 
ok, before i refer you to the mysql documentation, i'd like to refer you to the dictionary, where you can find a definition for the word primary
@Lusitanian no, i'd prefer to double down
 
but I had 2 primary keys on this table just an hour ago, I removed them to do some statements.. now I want to put them back..
 
3:08 AM
Lol
 
@dyelawn This is a really good hint!
 
@bushdiver not possible
 
@bushdiver Sounds a bit like Mysql. Power to those who are doing!
 
so my table is ruint? I can't make 2 columns primary together anymore?
 
@hakre I eat in a restaurant (lunch), for like 3€ you get soup, main dish, salad and desert. So it's time consuming for me to make all that stuff and expensive. Although I would really like to know how to cook like I know PHP :P
 
3:09 AM
unique !== primary
noooo i love my snow leopard
 
You have a snow leopard?
 
Yeah, cooking is great, and the code is more worth than a compiler.
The truth is, that PHP is much like cooking. Quick decisions, lead to a lot of legacy code for which it is worth to keep legacy code. Legacy in the end is less than three to five years, so it's all fine and dandy. Explore the world for it's cuisine (not always good).
 
I guess I am wording this wrong.. I need a Composite Primary Key I guess
 
that is still worded wrong
 
@bushdiver could be, however, you did not share your table layout.
 
3:14 AM
do not make up words for what you're trying to make something do
 
@dyelawn that somewhat sounds philosophical.
 
@hakre been pretty valuable for me in the last 6-8 months
think only in terms of what you can tell the machine to do
 
I did it like this if anyone cares: ALTER TABLE tableName ADD PRIMARY KEY (columnName, columnNames)
I know you guys knew how the whole time..
 
@bushdiver no, sorry, i don't
 
yeah i don't believe you that you did that
well, that you did that and it worked
 
3:16 AM
I learned about it here: stackoverflow.com/questions/217945/…
And it did work - I just did it to 2 existing tables
 
@dyelawn composite primary keys do exist and that is valid sql
 
is columnNames singular?
 
yes was like this: ALTER TABLE tableName ADD PRIMARY KEY (columnName, columnName2)
 
@bushdiver well, you want to take an advice? The answer to that question is No!.
 
@webarto yesterday I had a double cheeseburger with jalapenos, grilled mushrooms, grilled onions and hot sauce for about $5 plus fries for $2. America!
 
3:19 AM
You might want to have a compound key which works fairly well with Mysql nowadays.
But never-ever two primary keys with one table (and you never need that).
 
anybody have a good use case of when you'd rather have a composite key than two tables with a foreign key?
or, for @bushdiver 's case, where a composite primary key is more fitting than a singular primary key with a UNIQUE key on another column?
although i should say, bushmaster: good work on doing some independent research
 
@Lusitanian Which mushrooms? Which jalapeños?
@dyelawn A primary key by definition is always unique
 
correct. and then a UNIQUE is also unique
 
@Lusitanian Yeah, same price here, so food is pretty cheap?
 
so what's a good scenario for using a PRIMARY with more than one column?
 
3:24 AM
@dyelawn Well, a primary key has a specific role already, UNIQUE is some kind of subset.
 
@webarto fast food is cheap everywhere here except Hawaii and Alaska :P
 
@dyelawn Best scenario is because it's build that way?!
 
@hakre right. i can't think of a situation where i'd define a PRIMARY key by two columns
 
@dyelawn Oh, think twice, you can!
 
i'd either set a UNIQUE on the second column (for de-dupe purposes) or define a new table and FOREIGN key it
 
3:25 AM
@dyelawn In my case, im tracking views per day - where the DATE and the ARTICLE_ID are a compound key, so if views come in on an article the same day it Increments the views, but the Next day it makes another row for DATE - ARTICLE_ID - VIEWS
might be a better way to do it, but has been working great.. just had to readd the key
 
@Lusitanian :D Have you seen something like this? tanjir.ba/image/135334772805.jpg
 
@bushdiver sounds very valid.
 
@webarto what is that, sausage and onion on naan or something?
 
@webarto köfte in pide with onions I'd say. - probably a bit of turkish slang.
 
shit... did i just get pwned by bushdiver?
probably time for bed.
(although i would keep the views as a separate object.)
 
3:28 AM
@dyelawn good idea.
 
@hakre bed, or separate view objects?
 
@dyelawn views are by definition separate.
So you can go to bed with views just fine ;)
Even if views are just like a table ;)
 
@Lusitanian minced grilled meat, onions, and something I can't find translation on with sauce :)
 
@webarto which sauce?
 
@webarto lol, looks similar to something I'd get at this place called Aladdin's
 
3:31 AM
@Lusitanian which place?
 
@hakre Hm, not sauce per se, more like "greased" so that bread softens, I think it's from grilling the bread on meat.
 
damnit guys, now i'm hungry
 
@Lusitanian Admiral General Aladdin :D
 
@hakre auf wiedersehen
@Lusitanian now who's the fat american?
 
3:34 AM
me :D
 
36 mins ago, by webarto
Damn, now I'm hungry.
 
@webarto lol
 
@webarto "greased" is one of the main foundations of a true sauce, it I'd say, you smell is not that wrong ;) . but my shoppe for that is closed now :(
@webarto Yeah, let's cook ;)
 
And it's 4.34 AM.
@hakre Right on, Sir!
 
@webarto fuck yeah. when you come close, you're invited.
just gimme a note, you're welcome.
 
3:35 AM
@hakre where do you live in europe?
 
@Lusitanian Western of germany, in the middle, close to Frankfurt am Main.
 
Wunderschon.
@hakre Same goes for you friend :)
 
Lol, however, if you plan to come to FOSEDEM or PHP BENELUX, you can break your trip here if you like.
 
I was going to tour Deutschland, but it's not a real tour if native doesn't show you around :P
 
We have got good wine here and also some nice food ;)
If you tour Deutschländ, you can take a break here, too, for sure.
 
3:38 AM
I lost Google Maps link, all roads lead to FaM :P
 
Frankfurt am Main (Frankfort on the Main) (; ), commonly known as Frankfurt, is the largest city in the German state of Hesse and the fifth-largest city in Germany, with a 2012 population of 704,449. The urban area had an estimated population of 2,300,000 in 2010. The city is at the centre of the larger Frankfurt Rhine-Main Metropolitan Region which has a population of 5,600,000 and is Germany's second-largest metropolitan region. Since the expansion of the European Union in 2007, the geographic midpoint of the European Union is about 40 kilometres east of Frankfurt am Main. Frankfurt i...
 
@Lusitanian I'd invite you but you are 17 :P
 
@webarto I have no problems to jump in for this summer if you ask ;)
 
@webarto haha it is quite alright
@hakre nice
 
@hakre You'll feel like home, VW all around :)
 
3:44 AM
@webarto In south america, VW's were popular for the guerrilla.
 
@hakre Hah, right, they now have new Golf Mk1.
 
@webarto I might come over but my golf is not that well. You know that I lilke to move aroudn a bit.
 
@hakre If you can fix Golf for almost nothing anywhere, it's here :)
Every % 2 is a Golf. Well Mk2 to be precise.
 
well I know CL2 from my Ex-Ex-GF, I'm not that much with cars like the girls to be precise.
No fucking clue what Mk2 means.
 
4:00 AM
@webarto sounds like the follow up of CL2.
 
Yeah, waste of f* money, cars...
 
@webarto well, if you like them, waste is not the right word I'd say.
 
I have a big ass, but not three of them :P
Well, it's expensive, you get less what you've paid for.
If you buy apartment, it always has value, like the ones around the block :)
I was selling cars, but now no one is buying...
 
You really like cars, I must admit, I'm not that focused, let's say "on girls". Enjoy what you strive fork and don't concentrate too much on the wrong things. Then it's all fine. Even with cooking. Come over here, with or w/o girly, you're welcome.
 
4:17 AM
@hakre wifey :) I hate that all my money is on a parking lot :) For that amount of money I could traveled anywhere, which is kind of what you've want because for 20 years of your life you were sanctioned :P
 
@hakre When would you like to come?
 
@webarto summer or early summer?
 
@hakre Exactly, that is the best time, sunny but not hot, and everything is blooming :)
 
@crypticツ thnks 4 reporting.
@webarto I love that
 
4:25 AM
/data/18/2/124/41/2939204/user/3258807/htdocs/includes/header.php
Wonderful path.
 
@hakre if I had a nickel for every Warning: Cannot modify header information - headers already sent by question...
 
@crypticツ you would be a rich women, I can imagine, yes.
so would I. The problem is, we just stilll need to close those questions to point to the right dupe.
 
if (isset($_GET['success']) && empty($_GET['success'])) {
 
@hakre I just found this post stackoverflow.com/a/8028987/1592648 is that the one you are referring to?
 
LOL
 
4:32 AM
@crypticツ No Idea if I was referrring, in any case Mario did a great job here.
I mean honestly, great job. Thumbs up @mario.
 
Covered pretty much 140%...
Why is @deceze not coming anymore? He loves us no more...
 
@webarto Oh he is pretty active this new year I'd say.
 
@hakre Yeah, but he was regular in chat for a while. He probably thinks chat is consuming his life :)
 
@webarto I don't know. He has some really well written links I'd say.
He also takes care of new PHP questions.
In a good sense.
I mean I actually wonder sometimes. Is the PHP tag really taken are of?
Who could? So many shitty questions.
In the end of the day, we just don't care, monitor the questions we can, garden some stuff and continue. And things work pretty well.
 
I think it is really hard to get rep in PHP tag because of all the shitty questions.
They should add x2 factor.
Yup, I can't answer anymore, just close vote :)
@hakre kudos for 3k answers :)
 
4:42 AM
@webarto for what? I even get a DV for this: stackoverflow.com/a/14543284/367456
 
Getting drunk and writing a recursive descent parser is hard.
 
yes, I always found it hard to write code when I'm drunk.
 
2.5 times more answers, so you would probably have over 100k in jQuery tag :P
 
for some other folks it always seemed easy, but I an't speak for them.
 
4:44 AM
 
True fact. Ballmer peak aside, I've had success in the past.
@webarto Quite the reverse. Code sober, debug like the wind with one eye open.
 
@webarto AND EATING FISH OUT OF THE OCEAN PUT ON THE GRILL - CUBAN LIFESTYLE I STILL CAN VISIT FRIENDS OVER THERE.
@Bracketworks you meant you got luck unnoticed?
 
Am I seriously only limited to $result? I am trying to do $resultTeams and it says syntax error
 
@DemCodeLines Yes, yes.
 
Eh. I dunno, I was drunk ;)
 
4:47 AM
@Bracketworks skol!
 
Well I need to get data from two tables, so I tried to run a query inside another, but I guess that isn't correct.
 
@webarto they were touring europe, indeed. nice vid.
@webarto but it only shows these two guys which is lame.
 
@hakre Video is out of sync :\ Dunno.
 
4:52 AM
@webarto It's not out of sync, it's just some vid material to the song.
such a video would be called "official music video" nowadays.
 
True :D
 
@hakre I forgot about the error suppression operator in gist.github.com/4628068
 
6AM, well that escalated quickly.
@Bracketworks Funny labels in 'merica, but good beer they say.
 
@webarto synched footage: youtube.com/watch?NR=1&v=uqvHMI8hsec&feature=fvwp (de-normalizer on audio)
 
@hakre :beer:
 
4:59 AM
I can up the FLAC rips i you wanna
 
@webarto Quite good.
 
@hakre If you can sometimes, please do :) Up it on mega.co.nz hehe.
 
morning ..:)
 
@NullPointer 10:30AM, right? :)
 
I used preg_split to tokenize nested blocks. God just threw a box of kittens under a tractor.
 
5:02 AM
$vars = preg_split('/([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff^|]*)\|/', $this->data, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
@Bracketworks
 
Yea, that's about where I'm at.
 
@Bracketworks sort of. you need some code?
 
Nah; I'm just writing a naive post-processor for CSS.
I don't have the time to learn enough Ruby to extend SASS, so I figured 'eff it. PHP FTW.
 
lol, SASS is not that wrong, you do not have to feel ashamed to learn a different language
 
5:08 AM
PHP code is here: gist.github.com/4642090
 
Nah, I wanna learn Ruby, but I'm under the gun with a pretty complicated stylesheet. I wanna add an @export directive that takes a path. Instead of compiling to a single .css file, the exports would also be generated.
Thanks for the parser; I just did this instead: preg_match_all('#(?<=@media all and).*?(?=(?:@media|$))#si', $input, $matches)
preg_split was giving me headaches.
 
@webarto y u still up
 
Btw, ([{}]) is valid, you don't need to reverse the curlies.
 
@Lusitanian Not sure.
 
lol
0
Q: codeigniter loading model from variable

Momen M El Zalabanyim trying to load some models from inside views, models are loaded correctly but i cannt access functions within ! example : VIEW <? $name='addbooking'; $this->load->model("plugins/$name"); $this->$name->logic(); //<------This generate error, although the function...

this question and answer make me want to smack my head against something
 
5:18 AM
I'm temped to comment... You cannot brake what is already broken.
$tmp = $_SESSION;
session_decode($string);
$decoded = $_SESSION;
$_SESSION = $tmp;
Should I do this?
 
@webarto: Apart from Orishas, this is older than Buena Vista Social Club: zucker-und-salz.eu/webarto
I rip the CD tomorrow.
@webarto what do you mean
I up you the CD tomorrow, I don't have it mounted right now. I the meantime I upload some other good stuff.
 
5:42 AM
Eh, it works :)
gist: 4646657, 2013-01-27 05:42:16Z
<?php
    
    class Media {
        private $rules;
        private $profiles = [];
        private $expressions = [];
        public function __construct(array $parts, $rules) {
            foreach ($parts as $part) {
                $part = trim(trim($part, ' ()'));
                switch (true) {
                    case preg_match('#^profile:(?<profiles>.*)$#', $part, $match): {
                        $profiles = array_filter(array_map(function($profile) {
                            return trim($profile);
                        }, explode(',', $match['profiles'])));
                        foreach ($profiles as $profile) {
                            $this->addProfile($profile);
                        }
                        break;
                    }
                    default: {
                        $this->addExpression($part);
                        break;
                    }
                }
            }
            $this->setRules($rules);
        }
        public function setRules($rules) {
            $this->rules = trim((string) $rules);
        }
        public function addProfile($profile) {
            $this->profiles[] = trim((string) $profile);
        }
        public function addExpression($expression) {
            $this->expressions[] = trim((string) $expression);
        }
        public function compile() {
            $query = implode(' ', array_map(function($expression) {
                return sprintf('and (%s)', $expression);
            }, $this->expressions));
            if (empty($query)) {
                return sprintf('@media %s', $this->rules);
            }
            return sprintf('@media %s %s', $query, $this->rules);
        }
        public function getPaths() {
            $paths = [];
            foreach ($this->profiles as $profile) {
                $paths[] = sprintf('./%s.css', $profile);
            }
            return $paths;
        }
    }
    
    function parse($input) {
        $medias = [];
        if (preg_match_all('#(?<=@media all)(?<block>.*?)(?=(?:@media|$))#si', $input, $matches, PREG_SET_ORDER)) {
            foreach ($matches as $match) {
                $block = trim($match['block']);
                if (preg_match('#^(?<query>[^{]*)(?<rules>.*)#si', $block, $match)) {
                    $query = trim($match['query']);
                    $rules = trim($match['rules']);
                    $query = array_filter(array_map(function($query) {
                        return trim($query);
                    }, preg_split('#\band\b#i', $query)));
                    $medias[] = new Media($query, $rules);
                }
            }
        }
        return $medias;
    }    
    
    $output = [];
    foreach (parse(file_get_contents('grids.css')) as $media) {
        $rules = $media->compile();
        foreach ($media->getPaths() as $path) {
            $output[$path][] = $rules;
        }
    }
    foreach ($output as $path => $rules) {
        file_put_contents($path, implode(PHP_EOL, $rules));
    }    
Whoah, didn't know gists expanded like that.
 
5:58 AM
@webarto yes .. you are right ... :)
@Bracketworks please man past only link if code is longer ... its almost cover my whole screen and its annoying ...
 
@NullPointer Sorry; I didn't realize gist links were expanded :(
 
@Bracketworks its okk... but please try next time like [gist]( link )
 
Shall do ;)
 
@Bracketworks it's fine
 
6:08 AM
I would've deleted it, but I was distracted by an alcohol related... uh, distraction.
;)
 
7:06 AM
newa about page is really cool
 
can I use excel sheet as database in php
 
7:24 AM
hello
 
8:05 AM
Wow... What happened the past few days...
 
8:17 AM
posted on January 27, 2013 by Ilia Alshanetsky

My slides from the two talks I gave at the PHP Benelux Conference are now available online and can be downloaded here: Application Logic Security Introduction to PHP 5.4.(11) If you've attended the talk(s) please leave feedback via Joind.In at: http://joind.in/talk/view/7814 and/or http://joind.in/talk/view/7791

 
hello
 
@ircmaxell whatcha mean?
 
0
Q: Please explain this strange output by mcrypt_decrypt

user2003663I am using this code to decrypt the information sent by GET on the other hand: $key="key"; $ema=$_GET['email']; $iv=$_GET['iv']; $ema=substr($ema,1,-1); $iv=substr($iv,1,-1); $ema=rawurldecode($ema); $cipher_alg = MCRYPT_RIJNDAEL_128; $decrypted_string = mcrypt_decrypt($cipher_alg, $key, $em...

 
8:31 AM
posted
I don't know why it's showing 32 chars
 
9:04 AM
hi can any one help me to activate "remeber me" option in joomla login module. I doesnt save password and username. do i need to do any configuration to make it work ? please help
hi can any one help me to activate "remeber me" option in joomla login module. It doesnt save password and username. do i need to do any configuration to make it work ? please help
 
-8
Q: working on my final year project using php

Akbar Ally MessiI am doing my project on project allocation and the students have to make a choice of 10 projects from 60.. how can i do it using php?? i have a form in which i want the students to make their choices and submit the projects.. can anyone help me with the codes..

 
hi can any one help me to activate "remeber me" option in joomla login module. It doesnt save password and username. do i need to do any configuration to make it work ? please help
 
@Fernandz if anyone wants to help you .. they will help .. dont past same message again and again its consider as spam ....
 
@NullPointer : ok sorry ...
 
morning
 
do not put other tags between delv/cv tag and link
otherwise it is not picked up by backlog
 
yup .. i wont again
 
you should examine the backlog's source .. it's available somewhere
 
9:38 AM
posted on January 27, 2013 by Tobias Schlitt

I finally managed to re-work my VIM setup completely, so it's time for an updated. First the sad news: VIP (VIM Integration for PHP) is dead. To relativate this: I still provide my current VIM setup via Github to deal for you as an inspiration. For more compensation I also have a good news: I rewrote PDV - phpDocumentor for VIM completely and it now nicely integrates with current plugin manager

 
Anonymous
morning..
 
morning
 
mornin
 
10:43 AM
0
Q: How to I switch from Memcache to Memcached?

AdamI'm using AWS Elasticache and I've installed there php module which I believe is an extension of spymemcached. The catch is I believe I'm running memcache and not memcached. This is the code to create the object: $memcached = new Memcached(); $memcached->setOption(Memcached::OPT_CLIENT_MODE, ...

 
^^ ?
 
talking about confusion ... memcached is also a client? o.0
 
lolwut
no...no it isn't.
also morning/afternoon/evening
 
evening :)
hmm ... dinner's been served in fact ... bbl
 
5:44 AM here lol, enjoy your dinner!
 
10:46 AM
Morning Guys
 
mornin
 
Just added 100 bounty on this quesion
1
Q: how to instruct Sencha SDK tools to bundle other js files specified in app.json

shiplu.mokadd.imMy app.json file of a Sencha touch 2 application contain. "js": [ { "path": "sdk/sencha-touch.js" }, {"path": "js/mootools-1.2.5-core.js"}, // I want these files to be bundled too {"path": "js/mootools-1.2.5.1-more.js"}, // <----------+ {"path": "js/soundmanager2-n...

 
12:27 PM
I need input from you guys on an issue I'm battling with
 
@iroegbu You can just ask.
 
Hi, is their a easy way to check if a string is in a db with a query, if the value of the column is an array with strings, or should I first return the array and do the checking with php?
 
I have built a forum and added a "report as abusive" feature
Do I allow reported posts to be displayed or should I hide them until the moderator approves?
because my thinking is... some people might not find the same post abusive/offensive
 
@iroegbu leave it to the mod if it gets multiple flags remove it
so... is their a query to check if a value is an array of a db column value, or is that just done with php?
 
12:42 PM
@grasshopper I don't understand :s do you want to check if a string in an array is a value in database or you want to compare string with db column name?
 
@iroegbu the db table contains a column that stores arrays, now I want to check if a variable is inside that array
 
@grasshopper if you have a db column that is storing arrays, you do not have a properly normalized schema
 
@grasshopper you are storing arrays in your table?! :o
 
there are very few circumstances under which you should store serialized data in a db column, and if you ever need to query on said column you really, really shouldn't
 
@Lusitanian ok thanks, then I'm off to create a relation table
 
12:49 PM
@grasshopper that'll do it :)
 
morning
 
@NikiC mornings (isn't it about 2 in the afternoon for you?)
 
@Lusitanian it is indeed
 
@NikiC afternoons
 
@NikiC morning ....
 
12:53 PM
why is heroku so rails-focused ah yes, rails is trendy
 
@Lusitanian I was going to say, "why its hot in summer"
 
ZOMG it's an @NikiC!!!
 
ZOMG it's a @GoogleGuy!!
 
WHERE?
 
-------> there
 
12:58 PM
<--------there
 
^^^^^^ there
 
me runs
 
no, ▼▼▼▼▼▼▼▼▼▼▼▼ there
 
@Lusitanian Not true.
 
12:59 PM
@NikiC hmm, good point
heroku's php buildpack sucks
 
Heroku is a horrible fit for a PHP stack.
I keep telling people that, but they won't believe me.
 
@GoogleGuy why say you that?
 

« first day (834 days earlier)      last day (4128 days later) »