« first day (633 days earlier)      last day (4315 days later) » 

8:10 PM
Despite her invaluable contributions to CS, sometimes I just want to egg Barbara Liskov's house.
 
@Binyamin I am not sure why you are bouncing ideas off of Stack Overflow. That is not what Stack Overflow is meant for. Try doing some of the coding yourself, and then when you run into an error then post a question.... — Neal 12 secs ago
 
Evening everyone!
 
@Mittchel Shalom!
 
@Mittchel hiya
 
@rdlowrey What're you working on today?
 
8:21 PM
Oy...
 
Guys I'm building a query which uses a between table to solve multiple relationships. Basicly what I got is a Category table and an Advertisement Table and between those two I've got an CategoryAdvertisement table. My advertisement can contain multiple categories and my categories can have multiple advertisements. Now what I want is to retrieve the categories information for 1 advertisement. I build this one:

SELECT * FROM Category WHERE cat_id = (SELECT cat_id FROM CategoryAdvertisement WHERE advert_id = 1)
 
@GiovanniDiToro Your form would store the dates in the db, the cron file would read them
@Mittchel between table can also be known as a Join or Pivot table
 
Yea didn't know the english word for it haha
 
user895378
@LeviMorrison I've been mostly working on a POC for a personal pet project. Yesterday I implemented some Artax cleanup that I had been meaning to do since finishing Clean Code. My to-do list is : (1) finalize/fix the Artax error handling (because Atreyu depends heavily on it) (2) standardize the Atreyu config process
 
hi guys , i have echo $name->name which prints the name how can i make it to print also gender like that $name->gender but in only one variable thx .
 
user895378
8:31 PM
@LeviMorrison I feel like I need to do those two things before deciding where to go next with Atreyu.
 
@rdlowrey POC -> Proof of Concept ?
 
user895378
@LeviMorrison yes
 
this didnt work $name->name, gender but not working
 
bleh
sorry didn't mean to dump code but its there now and thats it not working
if anyone has any ideas
 
Define not working.
 
8:32 PM
@ert
 
not sending email
 
ugh. @ert3, define "not working"
 
> didn't mean to dump code
I think ya did.. ;)
 
@ert3 Does it leave anything in the error log?
What's the value of $success?
 
its a hosted server im still leraning how to get to the logs
 
8:33 PM
@ert3 You mean you pasted that code dump by accident? ;-)
 
i mean i was going to make an actual question and then just posted it wthout thinking
 
some help ?
 
Pretty sure it's standard procedure to donate $5 to everyone in the room when you "accidentally" dump code. ;)
 
@ircmaxell I knew that you'd like it :P
 
the first time i run mail()l it worked with different values, however the herodic did not return the variable values, assuming it was just a lack of proper data (IE i screwed up the array I was using) i decided to make this in its stead to test. and it has yet to send an email to the account listed
 
8:36 PM
i have echo $name->name which prints the name how can i make it to print also gender like that $name->gender but in only one variable thx . i tried this ``$name->name, gender` but no luck
 
@gosto an array
$name['name']->name
$name['gender']->gender
-> in my case being a yeild
 
@gosto echo $name->name, $name->gender;
 
@ert3 didnt work
@CharlesSprayberry tried this but it repeats the name , i want only one variable
tried this but no luck also $name->['name' ,'gender']
 
@gosto What you think you are doing is not possible
@gosto is $name an instance of a "real" class or stdclass?
 
8:44 PM
@PeeHaa $name is $name= moduserslatestHelper::getUsers($params);
 
Wow. That hurts my eyes
 
@gosto If it repeats the name then I would venture to say you have an invalid value in $name->gender
Also why are you so adamant about only one variable?
 
@gosto how can you do echo $name->anything when it contains an array?
 
this my code `<?php foreach($names as $name) : ?>
<li>
<?php echo $name->name ;?>

</li>
<?php endforeach; ?>`
 
@gosto Again what is $name?
4 mins ago, by PeeHaa
@gosto is $name an instance of a "real" class or stdclass?
 
8:48 PM
so if i make <?php echo $name->name , $name->gender;?> it will repeat name
 
that's it, I'm done
 
@PeeHaa i dont know what is it :)
 
@gosto If you don't know what type the $name is then I'm with PeeHaa and am done.
 
ok me too im done
 
user895378
May 11 at 19:39, by gosto
i thought i can find answer here quickly , but its the opposite , only advices
 
8:52 PM
@gosto To start with, perhaps you should name $name as $user, seeing as that is more semantic (I'm assuming)
$users = someWackyClass::someUserAggregator($someParameters);
foreach($users as $user):
<?= $user->name; ?> is a poopy face
 
@rdlowrey and spent your time to look for my previous post :) , you nice :)
 
user895378
@gosto Nah, I've got that one bookmarked. It's a classic.
 
oh dear
 
Would I be hurting kittens when I have a database class where I always disable the emulation of prepared statements (no matter what db engine)? Or are things likely to blow up?
 
@PeeHaa You'd only hurt kittens in vicinity of the explosion.
 
8:57 PM
:0 But serious. When a user can provide a dsn do I check whether dsn string contains mysql or do I just disable the hell out of it by default?
Nobody? I thought you people in here were smart :-)
 
@Binyamin You do realise that your current behaviour puts you at risk of an automatic permaban, don't you? meta.stackoverflow.com/q/86997/161340GordonM 48 secs ago
 
user895378
@LeviMorrison When you have a chance I'd like you to review the content negotiation API. I've made it dead simple with an adapter class. You just ask for the NegotiationAdapter in your resource class, specify the available types for negotiation and call the relevant method. The adapter will apply the necessary headers to the response object for you. If a 406 Not Acceptable response should result, it's handled automatically by the app.http-406 listener.
 
user895378
You can also use NegotiationAdapter::negotiate() instead of NegotiationAdapter::negotiateAndApply() if you don't want to automatically set the resulting response headers (not sure why you'd want to).
 
Hmm, hostage negotiations?
 
@GordonM Hmmmm
 
user895378
9:04 PM
@GordonM No, American developers don't negotiate with terrorists. It was outlawed during the Bush administration.
 
@rdlowrey Sorry, quoting a very old episode of The Simpsons.
How old? It was actually funny back then!
 
user895378
ba da dum
 
user895378
truth burn.
 
@rdlowrey I'm shocked you used extract.
Still getting over it.
 
user895378
@LeviMorrison It's an example.
 
user895378
9:06 PM
I was just demonstrating the return value without a super long comment :)
 
@rdlowrey Hmm . . . where have I heard that before? Oh, it was that one tutorial that taught me to connect to a database and I didn't sanitize my inputs!
 
I'm so sick of working with code that's full of this guy.
 
user895378
@LeviMorrison lol, you're right.
 
user895378
@LeviMorrison removed extract for great justice.
 
@GordonM I haven't seen that guy in years. Hello there, character from Thomas the Tank Engine whose name I don't remember.
 
user895378
9:09 PM
@LeviMorrison If you haven't specified a 406 listener the framework will still send an appropriate 406 response ... it's just available in case you want to customize the 406 response.
 
@LeviMorrison He's the Fat Controller
 
lol
 
user895378
@GordonM lol I couldn't figure out what he was supposed to mean.
 
user895378
The Fat Controller. Nice.
 
@GordonM Are your controllers full of business logic?
 
user895378
9:12 PM
I was all like, "why does @GordonM hate Franklin Delano Roosevelt so much?"
 
@rdlowrey SIR TOPHAM HATT!
That's his name!
It just triggered!
hahaha
 
@LeviMorrison Business spaghetti code :(
I've been there nearly a year and I still have no clue how the goddammed thing's meant to work.
Of course half the time it doesn't which means a day or 2 doing on an easter egg hunt to fix 3 lines of code.
 
I can't believe you just posted a picture of Sir Topham Hatt. hahah, made my day.
 
FML
 
user895378
FACT: Anyone writing web apps with MySQL should be prevented from using phpMyAdmin or Navicat or any other GUI DB admin tool for at least one year after they start so that they'll be forced to learn how to write queries by hand.
 
9:17 PM
s/ FACT / OPINION
 
@PeeHaa i know where is the error :)
 
user895378
yeah, when I said "FACT" I meant "OPINION" :)
 
@gosto yeah it just pinged me
 
@PeeHaa its true this code <?php echo $name->name;?> <?php echo $name->gender;?> but the wrong is here -->
 
> The copyright holders are strict about how these volunteers should appear: the South Devon Railway's Fat Controller was forced to either quit or shave off his beard,[1] and it is absolutely forbidden for a Fat Controller to be too thin.
^ epic.
 
9:18 PM
@LeviMorrison link?
 
`$query = $db->getQuery(true);
$query->select('a.id, a.name, a.username, a.registerDate, b.gender');
$query->order('a.registerDate DESC');
$query->from('#__users AS a');
$query->from('#__profil AS b');`
 
The Fat Controller (more formally referred to as Sir Topham Hatt in the U.S.) is the head of the railway in The Railway Series of books written by the Rev. W. V. Awdry. In the first two books in the series (The Three Railway Engines and Thomas the Tank Engine) he is known as The Fat Director. In the third book (James the Red Engine) he becomes The Fat Controller, as the railway has been nationalised. His full name is revealed in the foreword to the book Henry the Green Engine. The Fat Controller also appears in many episodes of the television series Thomas & Friends, adapted from the ...
 
@PeeHaa so if i remove $query->from('#__profil AS b'); it will not repeat the name , and if i put this line it repeats
 
@LeviMorrison Thanks. :-)
 
@PeeHaa i dont know how to make it
tried this ``$query->from('#__users AS a and #__profil AS b');` but no luck
 
9:31 PM
seen the new "review beta"?
 
@Leigh I tried to access it on meta, but only people with 2k+ rep on meta could see it
 
@Leigh review beta?
 
split in 2 now
low quality is working for me, suggested edits is broken (i can only click "not sure")
and close votes not available due to rep
If I link this question stackoverflow.com/questions/9258602/elegant-pythonic-cumsum is it too non-PG for this chat? ;D
bloody python and its cum sums
 
:P
 
lol
 
9:47 PM
Why didn't they just call it accumulative_sum? I can't stand shortened names like cumsum. Retarded.
 
Why Levi, you look so cumsum today
 
user895378
That sounds dirty.
 
Moving on . . .
 
So far in review beta, I've reviewed 2 low quality answers by or with comments from PHP chat regulars
 
10:04 PM
its actually funny, I recognise the same names coming up over and over again
some guy named ghostdog with 50k rep, has at least half of the low quality answers
 
hello
 
10:30 PM
Guys I've got a join table called CategoryAdvertisement. Which is a join between Category and Advertisement. Now when I delete a Advertisement or Category, it should also delete the row in CategoryAdvertisement.. how can I do this?
 
new reference image for PRNGs
 
@Mittchel ON DELETE CASCADE
 
I did
Sadly not working for some reason.
In the Joined table I got 2 cells: advert_id and cat_id. Both I added foreign keys + cascade constraint, by:
ALTER TABLE CategoryAdvertisement
ADD CONSTRAINT `fk_advertisement`
FOREIGN KEY (`advert_id` )
REFERENCES `members` (`advertisement` )
ON DELETE CASCADE
Now when I delete an advertisement row with advert_id 31 and CategoryAdvertisement also has a row with advert_id 31 it's still there :o
 
10:46 PM
what dbms are you using?
 
phpmyadmizzle
 
so, mysql?
 
Yea I tried figuring out the version
but I cant find it, but yep mysql
 
does mysql even enforce foreign key constraints? i seem to remember for the longest time it didn't
 
user895378
Drive-by chat crime:
 
10:51 PM
Not sure really, over the net there is a lot of support for it, but for some reason it doesnt show any sign of working. I should get an error if I inserted an CategoryAdvertisement row with a cat_id that isn't stored in the Category table right?
 
user895378
2 hours ago, by rdlowrey
FACT: Anyone writing web apps with MySQL should be prevented from using phpMyAdmin or Navicat or any other GUI DB admin tool for at least one year after they start so that they'll be forced to learn how to write queries by hand.
 
It doesnt for some reason.
I'm not using the interface at al :P
I'm creating my constraints and stuff mainly lol
by hand*
 
user895378
Oh yeah, the "phpmyadmizzle" shell. I forgot about that one :)
 
@rdlowrey Why even comment when you've nothing useful to say?
 
@Mittchel Fo-shizzle
:P jk
 
10:55 PM
;)
 
user895378
5 mins ago, by rdlowrey
Drive-by chat crime:
 
@rdlowrey Btw, I think it is okay to use pma etc for table creation. Because that's something you only do very rarely, so it doesn't make much sense to know all the queries for it
 
user895378
@NikiC I'm not saying you shouldn't, I'm just saying everyone's better-served if forced to learn manually first.
 
user895378
I'm all about making life easier, but it's best not to take shortcuts unless you know what they avoid.
 
@NikiC Nah, design them in a UML-ish tool; forward engineer, and write queries by hand for the rest.
MySQL Workbench is win for visualizing table relationships.
(I know there's lots of alternatives, but I got turned onto it awhile ago, and haven't looked back; rather nice)
 
user895378
11:00 PM
@Bracketworks Does it handle other RDBMS? Or only MySQL?
 
@rdlowrey Only MySQL.
 
user895378
@Bracketworks It looks free. Is that correct?
 
Correct.
 
user895378
Hmm, I'll have to give it a whirl.
 
The administration tools are nice too, for export/import etc., it support Python and/or Lua (forget if it's both) for some sort of automation (plugin dev, or something)
 
user895378
11:04 PM
rpm -i mysql-workbench-gpl-5.2.40-1el6.x86_64.rpm
 
Yea, it is plugin dev, and yea, it supports both Lua and Python from what it looks like.
There's some features which have been in the oven for awhile, but not completed; like identifier/keyword autocomplete.
You know, I've had Windows as my host, and Linux flavours as guest VMs for so long; I think it's time to inverse the dependency ;)
 
user895378
@Bracketworks Yeah, I was there and made the switch over about a year ago and haven't looked back. I just use windows VM for photoshop/illustrator.
 
@rdlowrey How's the performance of PS?
Related: What VM software are you using?
 
user895378
11:20 PM
@Bracketworks I use virtualbox to host a WinXP VM + Photoshop CS4 with 2GB of memory allocated to the VM. Performance isn't bad unless I try to work with really large images.
 

« first day (633 days earlier)      last day (4315 days later) »