« first day (811 days earlier)      last day (4141 days later) » 

1:00 PM
@MadaraUchiha TL? It's yet another one of those candidates for the much maligned "General Reference" close reason.
 
@DaveRandom

Hey, Can I do that directly below array? Like this:

$ra = mysql_query("SELECT Short FROM product WHERE Key = \"$dropBox2\"") or die(mysql_error());
$array = mysql_fetch_assoc($ra);

echo '<br />'.$dropBox2.'<br />';
echo "<b>Name:</b>".$array['Short'];

if(isset($_POST['submit'])) {
if( substr($str, 0,2) === 'KD' ) {
echo '1111';
}else {
echo 'OTHER22';
}
}
 
9 mins ago, by DaveRandom
if( substr($array['Short'], 0,2) === 'KD' ) {
 
@DaveRandom I had nothing to do with this.
 
@rlemon I do beg your pardon sir, please accept my humblest apologies as you f*ck off back to where you belong.
4
:-P
 
@DaveRandom oooo it works now :D man is there any way to add to your rep or something you helped me so much even I lost it once and had to get some air :D
 
1:04 PM
I be in ur codez mysql_* yo PDO bitch.... take that!
 
You better watch yourself. I know eval()-fu.
@user1914940 I have enough ;-)
 
@DaveRandom Well yes, but you are really awesome, you helped me so much man :)
 
np ;-)
 
@DaveRandom Btw we are neighbours I am from Slo :D
 
@DaveRandom eval("while(1)"); // dun dun DUUUNNNNN!!!!!!
 
1:08 PM
@DaveRandom its really humble ...lol
later ..all
 
@rlemon eval('eval(\'eval(\\\'include \\\\\''.__FILE__.'\\\\\';\\\');\');');
 
Dave..to me you look very inteligent if I may say..
 
Looks can be deceiving. As has already been ascertained here many times, I am in fact a gibbering simpleton.
 
I mean...from how much and good coding you know and stuff..
 
It's all relative. If you keep going at it then you could be better than me in no time at all. Knowledge of syntax and features is only a small part of being a programmer, I really fall down when it comes to some theoretical concepts, design patterns etc.
 
1:23 PM
Well..I watched quite some tutorials, wrote some code (not much but still I did some), and I still get lost at basics
 
Networking is my thing. That (if I may say so myself) is something that I am rather good at,
 
Throughout your programming career your most elaborate coding project is the synapses you'll be burning into your brains.
 
Sounds a bit philosophical for a Friday
 
I have a horrible sense of time, Dave.
 
Long sleeved shirts could be good. Or a suit of armour. However I suspect you are not talking about those sorts of injections - care to expand on what you really mean? — DaveRandom 1 min ago
 
1:27 PM
Besides, a lot of it is art but in practice a moot point anyway. I try to find excuses to experiment, but really, what's commercial is ad infinitum repetition of the mundane.
 
Tell me about it
 
So in business, it doesn't matter how much you've delved into theory.
 
Anybody has the github apocalypse comment thread ?
 
Well, unless you're working on new tech or calling the shots..
 
I can haz teh commentz?
 
But outside the tech industry there's a good chance a developer winds up an overly complicated copy-paste machine
 
@Sommer I really dont understand much of what you are saying. Dont get me wrong, nothing wrong with what you are saying, its just the way you write, dont know how to explain..
 
@Sommer I'm not sure I completely agree with that - I mean certainly when it comes to design patterns.
 
Why is SO still using gravatar..
 
@Dave, I'm a bit weary, I'll admit.
But with more than a few companies, I find their engineers stuffed into the basement kept preoccupied with what the upper floors consider trivial.
Their practice is weird and arcane to them, and this derision is an excellent way to feel better in contrast.
They want to exert control, don't want the engineers to grow too much of confidence, and walk away with whatever they invent so management can take the credit and profit.
 
1:35 PM
Jeez, cynical much?
:-P
 
Hahaha
Hey, I said in some cases.
But I've seen this put to practice. Coordinated blows to the ego to keep them in place.
I know one guy who's a Cisco guru/starting Android dev.
He's getting underpaid by about 50% probably.
Doesn't have the moxie to get up and leave for another employer, despite there being a shortage of personnel, because his current employer has spent years making sure he made just enough to not get kicked out of his house, but guilt tripping him everytime he wanted more or wanted out.
Making one false promise after another.
The guy's so demoralised he'll probably spend the next decade there as their human calculator.
 
I consider myself pretty sufficient in English.. @Sommer just made me realize I kind of suck..
 
Here's the kicker: I'm Dutch
 
Yeh I know it's annoying isn't it. He's probably better at English than I am, and I'm English.
 
Gezellig
 
1:39 PM
Ah, kijk eens
 
I am kind of surprised how many Dutchmen invaded SO.
 
Meh.
We do have the largest tech industry in continental Europe save for Germany, and contrary to Germany we don't turn our country into an enclave but have an international market instead.
My ex was a Viennese who while starting her doctorate (linguistics) still had all textbooks and whatnot in German.
I think I can call the Dutch ones I've had to deal with on one hand.
 
This is due to the trade techniques we posses.
The dutch are BUSINESS NAVIGATORS BRO 'SUP?
 
Its been a trading hub for centuries, there's no getting around English.
 
Bugger trade, just invade
 
1:41 PM
Frankly I would be content if we made it our new national language.
Dutch sounds like a marketing text.
 
9 times out of 10 I am thinking in English anyway.. we should just adopt that and discard Dutch and only use it in the pubs and bars :D
 
To talk to the monoglot simpletons!
 
The plebs
 
The English
 
Meh, there's a difference Dave.
I've got a Russian language course sitting next to me. It's taking ages. Because I don't use it.
There's no escaping English in daily life though.
At the same time I've encountered enough people who may even speak it, but refuse to out of some ridiculous nationalistic principle.
It's honestly quite vexing.
 
1:45 PM
@Sommer Really? Could have fooled me. I spend my life surround by at least 90% twats. That might just be a side effect of being a member of the human race though.
 
One thing that bothers me.. but also cracks me up is English with a heavy dutch accent.
Do they call you 'bruvva' @DaveRandom?
 
I've eaten cheese of that!
 
@MarioS Thankfully no, I live in the north, that's a largely southern thing.
 
If you don't pass on, I will keep you in the holes
 
You can make it the cat wise that you do not like sausage of it or it rusts your behind!
 
1:46 PM
hahaha
The last lines are dutch sayings translated literly @DaveRandom Don't try to make sense of it :P
 
Dave, last I was in London I got to see the chav phenomenon.
Our equivalent is worse.
 
See, I still wonder about that.
What is a 'chav'?
 
It's not that exciting
 
English sjonnies.
 
Really?
 
1:48 PM
At least their females are loudmouthed, sexually aggresive and have a fit body from the drug abuse.
 
I thought it was a race at some point
 
Much like our ravers used to.
 
*still do
or *still are
 
Ours eat deepfried gunk all day and develop unprecedented quantities of bodyhair
Yeah I guess so Mario.
I rarely see them anymore. They're dying out. Or I'm looking in the wrong places.
 
1:49 PM
Been to 'Hard with Style' the place was full of them.
you're looking in the wrong places I bet :)
 
Probably. I run into them accidentally.
 
Twats are twats the world over. There's not much difference, it's an inevitable unpleasant side effect of capitalism and at a more fundamental level, society.
 
I don't think you need capitalism for this.
 
Yes but twats are not sjonnies
sjonnies are in a league of their own.
 
uh oh, the C word
 
1:51 PM
When you start supporting the weak, the weak abuse the system. It's kind of an inevitable outcome of evolution.
 
I've seen a group of them on this show "Probleemwijken" burning stacks of wood in the street several times a night, every night, to draw out the cops for the sake of drawing out the cops.
 
define 'abuse'
 
Economic strategies don't register with them.
 
@Sommer What's "wijken"?
Week?
 
"Hoods"
"Neighborhoods"
 
1:52 PM
Right
 
Urban slums
 
And I don't think that's the case. There are people who need the aid, and there are people who seek it out to get an easy ride.
 
because they actually have a home..
but behave quite similar
 
It's just that they're so sociopathic and dysfunctional they will never reach another echelon in society.
 
The easy ride is the most boring one.. don't understand how some people can hold out their entire life..
 
1:54 PM
Meh, I dunno, at the end of the day we are still a bit British about things. We had a bunch of riots a couple of years ago, people were breaking into shops and stealing electrical goods and whatever but there was one guy who had originally gone out to riot but in the end he stole a crapload of stuff just so other people wouldn't steal it and gave it back to the shop in the morning.
 
If you commit crimes habitually, are in/out of prison or actually a fugitive, start fights left and right and start actual riots when you're bored, which is a couple times a week, you cannot function in society.
And while we put sick animals down, sick humans fall into this safety net.
 
I also regularly apologise to people for things that are clearly their fault.
 
I am going to guess here, cv-pls = close vote please right?
 
Yeah Dave, I saw the riots last year there too.
 
1:55 PM
@MarioS gist.github.com/1689430 no onebox
 
I would've liked to have seen a military crackdown on the looting chavs.
 
ffs that is really getting on my tits now
 
ahh thank you @DaveRandom
Tits? Please share.
 
:-P
 
1:56 PM
Or maybe gassing the area from the air.
Something like that is often interpreted as extraordinarily violent but if you use a harmless knockout gas at most a couple will bump their head on the way to the ground as they're running off with a stolen TV.
 
@Sommer There was serious talk of it, that's basically why it stopped I think. It was completely ridiculous, every single person involved was an opportunist. Even the thing that kicked it off was a bit of an over-reaction IMHO.
 
You reel in a van with gas masked cops, take in the unconscious looters, put them in cells and begin processing them.
 
Surely you can die hitting the ground headfirst. Imagine innocent people walking by.
You'll get those kinds of responses to those actions.
people who seek the 'middle ground'
 
Of course it was an overreaction. They made a humanistic police brutality scandal over a gun-toting drug smuggler getting busted during a transaction and then getting fatally wounded when he opened fire on the cops and found himself overpowered.
He deserved it.
 
@MarioS There were no innocent people walking by so far as I can tell. All the innocent people stayed well out of the way for once.
 
1:59 PM
@Mario, the place was a warzone though. You have to ask yourself why an innocent person is going out for a stroll there.
 
In that case, carpet bomb. Napalm surely does the trick.
 
There's infrastructure, and it would cause a PR backlash.
Non-lethal methods would be best.
 
@Sommer At the time what had actually happened was quite unclear though and there was reason to believe he wasn't actually even carrying a weapon.
 
I was jesting @Sommer
 
It's got a little off topic this convo guys, this is supposed be remember ;-)
 
2:00 PM
Yeah.
Ravers are still good though.
 
I don't know that function or variable @Sommer Please explain.
 
It's a class, Mario.
 
I see. What does it do?
 
please tell me you are not opening and closing your PHP on every line.... — War10ck 43 secs ago
haha
 
$shapes = new Exception('big fish, little fish, cardboard box');
throw $shapes;
 
2:04 PM
How distorted must your view of PHP be to do that.
 
@MikeB oh lawdy
 
class Raver {
private $weight = 1.0;
private $mood=0.0;
public function ingest_cocaine(){ $this->weight -= 0.1; $this->mood += 0.3; }
}
There you go Mario. I'm still looking for an event handler to allow for jittery scanning of the environment. The last raver I hooked up with thought commercial airliners followed her around.
 
I particularly like the use of short open tags but still using echo
 
Interesting.
 
Meh, that kind of paranoia obviously does not apply to the group though.
I always manage to find the crazies.
 
2:08 PM
I wish it did. Haha that would be quite the spectacle.
@Sommer Newsflash: Everyone is crazy.
 
Nah man.
Not like this
 
@MarioS I have no idea what you mean Mr talking octopus
 
I'm still recuperating from the last bout with my BPD ex.
Shit gets clinical at some point
Or at many, many points actually
You want an example?
 
@DaveRandom Please keep it civil, calling me an octopus while I am clearly a squid.
@Sommer my mom has BPD. I've had my share ^^
 
Your short story is really very short!!! Just kidding man. Please dont mind. — Bhavik Shah 30 secs ago
 
2:11 PM
Stark raving mad.
 
flagged as obsolete
 
Mike hard at work!
 
I'm on a roll, idiots have been hard at work overnight
makes up something like 7 of the top 10 worst questions in the last 24 hrs.. higher than usual
 
Speaking of, I need to get back to it.
 
2:14 PM
Do you think that has to do with PHP being the programming language entry for many noobs? :P
 
Hey Dave, we all know how much Britain values its royalty
 
catch 22 unfortunately
 
I've started mixing programming languages recently.
I've been writing too much Lua and Ruby
 
@Sommer
 
E.g. if ($var==$value) then..
 
@Sommer Funky. You should check out Wasabi :-P
 
I heard that's quite sharp in flavour.
 
@DaveRandom, I'm digging the tagline. "A superbly asinine interpreter"
 
wiki.php.net/rfc/… <-- Would be nice if you could read over this to make sure that it makes sense
 
@NikiC Yet another rfc to complement rfc 1.3.x.4.5.a ?
 
2:21 PM
@PeeHaa Yes
Mainly to satisfy @LeviMorrison a bit :) [and me]
 
and me :)
 
Hah, man, more adverts for USA green cards.
"Do you want to live, study and work in the USA?" No, no and no. Seems they're a decade too late with this.
 
They're taking our jebs!
 
We're taking your staff.
 
Anonymous
why is it recomended in oop, to put classes in separete files
 
2:25 PM
I'm in the process of setting up a migrant worker program for American (then) expats or temporary staff.
 
Salaries are 30% higher in Europe
 
@TheCOMPLETEPHPNewbie For autoloading and to keep code readable.
Also because PHP largely stole its OOP model from Java
But mostly for practical reasons
 
borrowed, we'll give it back
 
@MikeB Nah screw 'em. They think they are so good, they can bloody do it again.
@NikiC Makes sense to me. Actually it make a lot more sense to me than when Levi was trying to explain it to me yesterday, so I think it's a winner.
 
2:29 PM
I think a major part of the syntax and logic comes from the subsequent application of that language in frameworks though. And in the PHP department I'd like to see more inspiration from other languages.
I'd love to more frameworks with jQuery style chaining or shifting object context.
 
picture changes may take up to 24 hours
Thanks gravatar.
 
In particular applying this to multiple results and just branching off and calling the supplied methods universally.
 
@MarioS That's just because of client side caching. Wait 10 mins and clear your cache and it should work.
 
Among a set of selected objects as if it were one.
 
I am passing content md5 header to amazon api.
Content-MD5 HTTP header for your feed so we can be sure it was not corrupted
 
2:32 PM
@DaveRandom Hah, i've done that twice in the last 2 hours :)
 
but its currpted
Do any one know about?
 
Chaining = $readability-- though. Sounds a bit like your other proposal would be as well....
 
Well I started tinkering on a supplemental class for my Models, dubbed ModelCollection.
Search results and other sorts of references in principle pass a collection with an arbitrary amount of Models attached, which universally applies any called method to all of them with the same parameters.
 
@abdulwakeel Sounds like you are not calculating the MD5 header correctly. Or not sending it correctly. Or a proxy in between you and Amazon is stripping it maybe. Can you show your code on a pastebin please?
 
$feedHandle=fopen("php://memory", "rw");
fwrite($feedHandle, $feed);
rewind($feedHandle);
///file_md5_hex()
$contentmd5 = base64_encode(md5(stream_get_contents($feedHandle), true));
 
2:35 PM
As the methods are called the return values are checked and if found to be another object reference, i.e. shifting focus to a referenced object or keeping it with the current one, these results are aggregated in yet another Collection.
 
these are some of the header lines
$header[] = 'Expect: ';
$header[] = 'Accept: ';
$header[] = 'Transfer-Encoding: chunked';
$header[] = 'Content-MD5: ' . $contentMd5;
$headers[] = 'ContentType:application/octet-stream';
$headers[] = 'Transfer-Encoding: chunked';
$headers[] = 'Content-MD5: ' . $contentmd5;
 
do we have a suitable dupe for stackoverflow.com/questions/14142571/…? Otherwise I'll answer it.
 
@abdulwakeel How are you sending the request? Via cURL? Can you show that code as well? (everything you've posted so far looks good)
 
yes
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
///curl_setopt($ch, CURLOPT_POSTFIELDS, $feedHandle);

//echo $url_string;
curl_setopt($ch, CURLOPT_POSTFIELDS, $headers);
@DaveRandom thanks for reply, curl code is above.
 
side note: the decision to use a base64 encoded binary instead of ascii hex for Content-MD5 is bloody stupid IMHO.
(not your fault, RFC2616's fault)
 
@abdulwakeel
 
Dave, why?
 
@dev-null-dweller that is not an answer that should ever be linked
 
oh, If i found content md5 example some where, that will be good.
@DaveRandom fixed-font?
 
@abdulwakeel You didn't set CURLOPT_HTTPHEADER ;-)
 
2:40 PM
@abdulwakeel When posting code, please press the fixed font button
 
cURL should be nicer. Having to do curl_setopt() every time is just annoying, although I'm not sure how it could be better
Is just not nice
 
@Jimbo I'm sure there's a wrapper around it somewhere, and if there isn't we should start one
 
@dav
ContentMD5DoesNotMatch
@DaveRandom
 
@MadaraUchiha Glad to see it's not just me then :)
 
2:43 PM
@DaveRandom I've just cleared my cache again right, so I updated my avatar 3 hours ago. This does not work. Any other tips? Besides the obvious of not using gravatar :D
 
@Sommer I don't know, it just bugs me. Yes it's slightly shorter, but it's more prone to n00b errors because people deal with ascii md5 everywhere, they are just not used to using the binary hash (I've made exactly that mistake myself before now). It's not even that much shorter, because 128-bits ends up with == when you base64 it.
@abdulwakeel You need to set CURLOPT_HTTPHEADER with the $headers array.
 
yes, I uncomment that. now its there curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
 
Submitted: markmail.org/message/kzha62nyp4pj24ct Let's see what happens
 
@MarioS Are you sure you got the email address right in gravatar? How do you log in to SO? For ex gmail allow different variations with .s in the address to end up in the same place, but gravatar treats them differently. Add all your email addresses and variations thereof to gravatar.
 
again its throwing error ContentMD5DoesNotMatch
@DaveRandom
 
2:46 PM
@DaveRandom I add emails with different variations of my actual email?
 
@abdulwakeel OK also your CURLOPT_POSTFIELDS assignment is not right. You need to rewind($feedHandle); curl_setopt($ch, CURLOPT_POSTFIELDS, stream_get_contents($feedHandle));
 
ok let me try that.
 
@MarioS Depends, do you use google to log in?
 
@DaveRandom yes I use gmail.
 
@fixed     $feedHandle=fopen("php://memory", "rw");
    fwrite($feedHandle, $feed);
    rewind($feedHandle);
    ///file_md5_hex()
    $contentmd5 = base64_encode(md5(stream_get_contents($feedHandle), true));
 
2:49 PM
Well it might actually just be gravatar being crap, but I know that for ex. dave.random@gmail.com and daverandom@gmail.com would be treated as the same address by google but not by gravatar. So if I used daverandom@gmail.com to log in to SO, but I have only registered dave.random@gmail.com on gravatar then it won't work.
 
@DaveRandom above lines is open file and then convert to md5.
I have added these two lines
 
(I don't own those addresses btw, so if anyone decides they want to email me on them then don't you will be emailing some other random dude not me)
 
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, stream_get_contents($feedHandle));
InvalidRequestparameter FeedContent failed a validation check
 
@abdulwakeel Please can you post your entire file on pastebin.com?
 
ok sure
paste there
 
2:53 PM
OK 1 sec
@all because I am too lazy to check, how does PHP handle it if you pass 'rw' as the mode arg for fopen() ?
 
gravatar is seriously pissing me off.
 
@DaveRandom Painful fiery death.
@MarioS How so?
 
I've been trying to change my avatar. For a couple of hours. Clearing my cache and all that crap. Still doesn't work.
 
rw open for reading and writing
 
OK that's weird. If you do it with a local file it's treated as r which makes sense but if you do it with php://memory it's w+. Is php://memory always w+ or something? I guess that would make sense.
 
2:58 PM
let me check
 
@abdulwakeel No, you use one of the + methods for that, depending what you want to do. Check the man page of fopen() again ;-)
 
I give up
 

« first day (811 days earlier)      last day (4141 days later) »