« first day (1042 days earlier)      last day (4136 days later) » 

09:00
Only until much later had I learned. These sorts of things come with experience, I haven't taken PHP in school or anything.
@user2645613 +1
I wonder how many people actually get php as part of their education.
I hope not too many :)
My university doesn't even offer PHP.. C+ only..
Hello, does anyone know any reading materials on how I should go on about using php sessions for my log-ins? I am at the moment using only sessions, is anything wrong with that? some people store sessions in cookies/mysql , why?
I was .. sadened
09:01
Delphi, Java and C++ for me :)
@Jack you have no idea my university offer php , c#, JS , html ,css :P
My lecturers know nothing about PHP, teaching theories without even checking
@Darius The two basic attacks that can happen with databases are SQL injection and password theft.
Both are very easily countered.
@NullPoiиteя GASP
Guys I'm curious, What do your "show status like '%onn%';" look like? how many connections?
09:02
SQL injection with prepared statements and password theft by hashing passwords properly (See password_hash())
@MadaraUchiha I'm salting my passwords, guess that's one prevented thing? SQL injection, luckily Zend helps me with that for the most part.
@Darius Just salting won't do you much good if the hashing algorithm isn't slow.
I think @ircmaxell made a video on it once, right?
@Darius Ah, if you're using a framework it's fine.
switched to PDO last month, and using salting for passwords now
I'll look over it at some point again in terms of passwords, I remember I followed some tutorial then went over all possible things, and it took me a while to find the best one. Thanks Madara.
no need for escape strings
09:04
@user2645613 That's assuming you're using prepared statements properly.
@user2645613 By salting I'm assuming you mean bcrypt? :)
Let me look, I'll post it in a sec
@MadaraUchiha work properly? If it means using prepared statements, then I will say yes
@Jack encrypting
@user2645613 Show me some example code, I'll tell you if it works fine :)
@user2645613 Encrypting and Hashing isn't the same thing.
@user2645613 Read through this and tell me again what you're using :)
09:09
oh man... yes my salting definitely needs an update.
@MadaraUchiha $sql = "INSERT INTO bizinfo (listid,ownerid,listname,bizslogan,short_desc,long_desc,country,region,locality) VALUES (:listid,:ownerid,:listname,:bizslogan,:short_desc,:long_desc,:country,:region,:locality)";

$q = $dbase->prepare($sql);

$q->execute(array(':listid'=>$listid,':ownerid'=>$ownerid,':listname'=>$listname,':bizslogan'=>$bizslogan,':short_desc'=>$shortdesc,':long_desc'=>$longdesc,':country'=>$country,':region'=>$region,':locality'=>$locality));
@user2645613 Looks good, what do you do with passwords?
Also, please hit CTRL+K or the button when pasting code in chat.
@webarto oh, didn't see this one, thx =D
Or pastebin your code :)
Guys lol, can you tell me how many "connections" you have when you run "show status like '%onn%';" Trying to figure out if mine's normal.
09:14
I was wondering why my class full of errors could ever work on the live server; on closer inspection I found that the live code carefully trots around those errors ... I'm sometimes amazed at my own brain maze.
@Darius How much does yours show?
77k, but i restarted a little while ago.
It was much larger before
@MadaraUchiha ok, am using a stuff called blowfish. Didn't read much about it
@user2645613 That's already good
@user2645613 And yet you're using it? :)
09:16
407
A: How do you use bcrypt for hashing passwords in PHP?

Andrew MooreYou do: bcrypt is an hashing algorithm which is scalable with hardware (via a configurable number of rounds). Its slowness and multiple rounds ensures that an attacker must deploy massive funds and hardware to be able to crack your passwords. Add to that per-password salts (bcrypt REQUIRES salts...

^ The answer here explains it well.
@jack lol, yes.
I want to cut down a tree in my back garden, I'm using this thing called a thermo-nuclear warhead, although I didn't read much about it.
@DaveRandom It's the perfect tool for the job. Keep going.
@DaveRandom I think that's sarcasm
@DaveRandom Works well on pests too.
@user2645613 I think it's Friday ;-)
@MadaraUchiha Just went from 77k to 100k, in past 5 mins
@DaveRandom No! This is Patrick!
Not that I am discouraging you from using bcrypt, but it's a good idea to know what you are using before you use it, is the point
@MadaraUchiha Classic
09:20
I think that's long enough, as long as you promise to be good
Congrats @MadaraUchiha
He was a naughty boy
@DaveRandom DIE REBECCA BLACK! DIE!
git log looks like wrong rename bin/selenium-server-standalone-2.25.0.jar => tests/data/image.sql (67%)
@MadaraUchiha oooh, I see you're back to room administration!
09:21
@SweetieBelle Have a look at the starred messages :P
I'll undo it in an instant, don't think I won't
@MadaraUchiha I know, I was being sarcastic. :P
I lOvE tHiS sOnG : )
Sarcasm Friday :)
@MadaraUchiha I have only 1 thread going on at a time, max connections was 11 , but there's so many hits that it reached 25k new connections within 5-10 mins. That crazy or ok?
Using innodb
09:23
Alright, we don't need two of them :-P
@Darius You could look at using a persistent connection but it's debatable whether that's a good idea
@DaveRandom is there any issue with the way it works right now and amount of connections it's making? Does it make the website unstable at all? The website works fast and good, haven't tested with large load traffic though.
@Darius The main thing using a persistent connection does is reduce the connection overhead, which isn't much of a gain but it could be a gain. But tbh if The website works fast and good - ain't broke, don't fix it.
The way it works now, is the controller grabs a model, and tells it to grab 5 functions, so for each of those 5 functions (get private messages, check for website announcements, etc) it opens a databae connection
sounds good, thanks Dave.
Good rule of thumb for life I would say
09:30
/me has a good purpose today: trolling all day long.
1 message moved to Trash can
You won't.
Haallp!
9 mins ago, by DaveRandom
I'll undo it in an instant, don't think I won't
:P
09:31
@MadaraUchiha what?
Do not anger the Gods Mods
O SE Gods, Why can we not kick people out?
not today.
you're locked in here WITH ME.
@Ocramius But someday :)
0
Q: PHP frameworks: are they all singletons and bad?

lauthiamkokSometimes I do find myself confused by the answers and advice by the programmers/ developers in stackoverflow here. For instance, there are programmers/ developers say that singleton/ global programming is bad. answer 1 answer 2 But I find that many PHP frameworks practise singletons/ globals...

Ready... Steady... Kill!
09:36
@MadaraUchiha Famous last words ;-)
Is there an alternative to php's sleep() function? Supposedly sleep() puts the user on hold in all windows/tabs and won't even let another page load while sleep is active because it's per user session. Websockets would be fun to use but not knowing how to work it, and scattered information on setups makes me weary of taking it on for a chat app.
@Darius You can session_write_close() first :)
But that's assuming you don't need the session anymore.
(which, if your architecture is sound, you won't)
Go2
Go2
@DaveRandom
hi
@Darius also you don't ever want to sleep() in a websockets application. You should hang on idle with stream_select()
09:42
@Feeds Room 11 needs more owners!
Go2
Go2
@DaveRandom hi
Not sure why that wasn't true already tbh
@Go2 Umm... hi?
@Feeds :D
Please don't ping random people, see room description, if you have a question just ask it
Go2
Go2
09:44
@DaveRandom i want to upload image on server using Drupal webserves in Mozila firefox addon POster
so how to upload image ??
I don't know without playing around with it a bit, which I haven't got time to do at the moment
Go2
Go2
ok..thnx
@Go2 Don't ping random people asking questions.
Read the room's description on the top right of this page.
I Imagine you'd have to construct a multipart/form-data body manually and set the headers explicitly though, poster doesn't give you much sugar (which is why it is useful)
If you're just trying to instead the message headers or something you'd probably be better making an HTML upload form and inspecting the info using firebug/Chrome dev tools
Note to myself: If you write "Cacke" into the docs and you're german and currently fiddling with some old code, it has probably be a Freudian.
09:50
Or you're just an anal retentive.
Which I suppose is also Freudian.
@zerkms Hate it, awful, worst thing I've ever seen... sorry, what did you want an opinion on?
@DaveRandom on a car in general. Still not sure what I want :-S
@zerkms dacia logan ftw
ugly as hell, but damn it's cheap :P
09:56
@Ocramius I already have an ugly car )))
As a non driver idk :D
and it's quite expensive to own an european car here
I'm not interested in cars until I can afford a Lamborghini.
@zerkms Ahh right, then no not a fan. The shape looks like a rather odd cross between 18y.o. rude boy and 1000y.o. man, and I don't like automatics personally.
(due to long distance)
My brother has just started work at Tesla Motors ... exciting stuff :)
When I can have that, I will be interested in driving.
@SweetieBelle you don't want to start driving with a lamborghini.
It's a terrifying experience @_@
@Ocramius I can drive, I just dont
I live about 3 minutes from work and 5 from the city center
@SweetieBelle you will be interested in driving when you have a baby
09:58
I have driven previously.
@SweetieBelle I'd rather buy a Golf and keep the change tbh, stuff like that is just porn
@zerkms I'm not interested in having a baby. :P
@DaveRandom we all love porn.
@SweetieBelle Who will give you a glass of water when you'll be 90?
@DaveRandom If I was going to buy an affordable car it'd be something like a Cadillac. I don't like 1.3 liter engines.
09:59
@SweetieBelle Better start with this.
@zerkms The nursing home I could afford because I didn't spend €300k bringing up a child. :P
@SweetieBelle I don't know what a liter is, I'm English.
:-P
@Jack I started with this:
@SweetieBelle I like the way you think
Yuck! At least it's red though.
10:01
Next one for me will most probably be an impreza...
Mine wasn't red, it was snot green. :(
Okay, then, yuck!
But it was £400
and it had a 2.6 liter engine.
The insurance costed a fortune; screw driving in the UK.
10:01
I'd only have an older (Colin McRae era) Imprezza, I don't like the new shape, I prefer the very-90's looking one
This is my current one:
@SweetieBelle Yeh but how old were you?
@DaveRandom 18
...and what, you expected someone to insure and 18 year old in something like that cheap?
400 pounds is pretty cheap, my car sells here for S$65k and you pay another S$90k to actually drive it =S
10:03
@DaveRandom It was a cheap old car, idk what else they want me to drive.
I didn't actually pay 90k though, I've paid the token sum of 500$
...probably
Realistically though I do enjoy driving big American cars.
They were awful
That looks like a lemon.
10:04
@SweetieBelle I prefer driving over sailing
If I ever have to drive for work etc again it'll be another American car.
@DaveRandom that's awesome
Cadillac maybe
I still opt for a reliant
I have considered buying something like this:
10:06
I like big cars, when I gonna drive, it gotta to be a big car
But I just don't know if I'd use it enough to justify those monthly payments.
Parking, gas, DMV (or regional equivalent), insurance, traffic jams .. it just too much of a pain to bother.
It's about €38k EUR
@tereško Exactly, I rather just walk the 5 mins to town. :P
A cool 100 bronze badges :D
I can walk in 25 minutes to the capitols center (or 15min with a tram-car)
10:08
I think I would buy an used Mercedes CLASS-E...
If you live and work in town then that's totally true. But I work about 20mi from my house and the UK public transport system is expensive and terrible, so I kinda have no choice.
@tereško For me the capitol is the other side of the country but I live 5 mins from Napoli city center, and about 3 from work.
All things considered (insurance/tax/fuel etc) it still costs me less to drive than it would to get the tram/train
talking of Humvee, they get fairly use here
@DaveRandom Ouch.
My monthly ticket for all Napoli buses is €37
10:10
@DaveRandom I have unlimited free bus and train :)
I could maybe save money by getting the bus but then it would take me 2 hrs to get to work every day
@MadaraUchiha Military perk?
@DaveRandom Aye.
@DaveRandom And that includes surrounding towns.
your local transportation system really sucks then .. or you live in lame part of city
@SweetieBelle wait... you live in napoli?
I know I am biased, but I thought the center of Napoli was a black hole...
10:11
@tereško both, actually. The UK public transport system sucks unless you live in London
@Ocramius Yes, I live here.
The center is fine, the outskirts are a black hole.
Hopefully I will be doing something about the former very soon though, trying to sort the house out so we can sell it and go somewhere less shit
gotcha. Been there only a couple of times and honestly left as fast as I could
@DaveRandom You're going to do something about your local transportation system?
fail
lol
10:13
:P
@DaveRandom well ... at least Riga is doing something about it. And it also looks like I might be living 5 minute from our own version of Canary Wharf
Anyone here using feedly?
@Ocramius It's not bad to be honest as a place to live. Hard to find work but I moved here for a job.
(On the same note, is anyone else having trouble with it?)
Room topic changed to Discussions for all things cars
10:14
Actually they are sorting the trams out as well at the moment, there's a load of new lines opened and they've invested in loads of new rolling stock, but obviously that all comes with a price ticket that's passed on to the consumer so... meh. But all things considered my overall view of the Manchester tram system is positive, it just doesn't go to enough places (yet)
@DaveRandom You don't get to complain about your public transport until you've seen ours.
@SweetieBelle courageous
We have one train company, you can guess how much of a monopolic assholes they are.
@Ocramius Also, we get good football. :P
But the center of Padova wasn't better either
@SweetieBelle I think I'm one of the 15 Italians that doesn't watch any football
I only do when it is time to troll the Germans
10:16
@Ocramius I'm one of the 1,000,000s of non-Italians who loves Italian football
When they got the first batch of the new trams they came from Germany and had been built for tracks that were... y'know... good. So they had to replace every bit of track on the whole system before they could use any of them.
Coming from the UK I was shocked how cheap football is here.
But anyway, 0.1% of faith in Napoli restored
Right, I need to go do some work
catch y'all in a bit
Season tickets for €250... in the UK they're £700+
@Ocramius Can't say I've ever had any issues in 18 months being here. Hopefully it will continue but I've certainly lived in worse places (I was born in south London).
10:21
@SweetieBelle well, my girlfriend was kidnapped in Napoli once =_=
Jesus :O
Kidnapped?
I don't really trust anyone or anything coming from Campania by principle
3
Q: 419 Nigerian scam problem

eternalidiotI fell in a scamming trap. It took me a while to figure it out. Blinded like an idiot. But it is what it is. I can only do as much as I can now. Tell me if there is anything else I should do. After realizing, I scanned everything for viruses but there where none. I used Macscan and ClamXav. I c...

@Ocramius Understandable...
@Ocramius FTR I'm not from Campania :P I'm from Brixton, not sure if that should make you any more comfortable though.
10:22
@SweetieBelle oh, no worries
@HamZa like seriously? Sorry, I happen to be a Nigerian but not a scammer
@user2645613 Have you read the story ?
@HamZa not really
@SweetieBelle /me reaches for stab vest
@DaveRandom :D
10:25
@HamZa what actually happened?
I think I'm one of the 10 Tories who comes from Brixton @DaveRandom.
@user2645613 lolz, read it that will save us some time
Brixton: The only place in the south where 'Thatcher' is a worse curseword than 'fuck'.
@SweetieBelle So... drinking a glass of Port while wearing a stab vest?
@HamZa I see no problem there, you were about to be scammed for $$$
@DaveRandom Something along those lines/
@user2645613 no problem ~_~ ?
@DaveRandom FWIW I don't consider Cameron a tory, and didn't/wouldn't vote for him.
The tories have made a real bad hole for themselves with Cameron as far as I can tell. Nobody likes him any more, including half of the party members
@DaveRandom I didn't like him from the start, wanted Davis as party leader.
10:29
@HamZa lucky you... All they can do is ask for cash, that's all.
All the UK major party leaders are tosspots at the moment.
Nigel Farage is sort of amusing from a distance, I wouldn't want to let him do anything that actually matters though
@DaveRandom I quite like Farage, but don't like the rest of his party.
10:30
@user2645613 Sigh It's about identity theft ! They can do things on his name without his knowledge
Seems like a lot of people are in tune on that
imo Farage is competent but the rest of them aren't.
I'd sort of like to let Boris have a go, it would be good if we could give him a sandbox country to run for a while and see what happens
I follow him from a distance (EU isn't particularly loved in Italy either).
He is a numpty in many ways but he still always seems to come out on top
10:31
that's werid
I like Boris, like David Davis, like Michael Gove.
Like David Laws as a person but he shot himself in the foot.
@HamZa not really, these guys are just average guys who know nothing about security, hacking or stuffs like that. They befriend you, ask for details etc what they are actually after is cash. They get arrested here everyday
Gove isn't making himself any friends at the moment but that's mostly because the changes he's bringing about are pretty radical, and no-one likes change. I'm not necessarily on board with the whole CSE thing but in general he seems to be talking some sense
Thing is hes taking a big gamble but I think it'll pay off
The UK education system is absolutely hopeless, the gap between private & public sector schools has been increasing for years.
I hope so but I'm largely on the fence at the moment. I know the system is broken but I can't work out if his proposed fix is the right one.
10:34
@SweetieBelle I think thats everywhere
It's the only politically saleable one that will work. Lib Dems wont allow selective school entry (Grammar system) so he has to go with 'Charter' schools and two-tier exam system option instead. At the end of the day, not all people are academic equals.
You don't make a school system fair by holding the whole year back to the pace of the slowest.
@SweetieBelle Yeh but if you ignore Oxbridge (which aren't the names they used to be anyway) it doesn't matter so much to universities. The problem is not so much who runs the place but what the incentives to improve are.
@DaveRandom I went to Imperial and 35-40% of my classmates were from private schools, compared to about 10% of the population.
@SweetieBelle Absolutely agree, although I would definitely have landed in the lower tiers due to chronic laziness I had when I was younger.
Presently, the public schools here are on strike for a month now.
@user2645613 where are you located?
@SweetieBelle Yes but is that grades or origin? I know the one is closely tied to the other but what should matter is the grades, whereas if you look at places like Eton it's all funny handshakes and backscratching
@DaveRandom Origin I think, though private school kids usually get better grades anyway due to smaller class sizes and better teachers.
@DaveRandom Look at parliament, it's got an extraordinary proportion of millionaires and private school boys.
@iroegbu 9ja
10:39
I think grammars were the great leveller, personally (but I'm biased -- I attended one).
@user2645613 oh! I see
@SweetieBelle Well yes - and that's fine IMO. Private establishments need to exist, and they won't exist without having and edge over the public facilities. The problem is that the public schools need the incentives - and a realistic mechanism - to be able to improve and aspire to chase the coat tails of the private schools
@user2645613 The private schools are expensive and the Public schools are more recognized
@DaveRandom Well, that's what free schools are supposed to accomplish, isn't it? Give the school's directors more freedom in direction and curriculum.
One observation I would have having attended a grammar school (public funded but wanting to behave like a private school) is that issues like drugs are much worse in the private schools because the boards don't want to annoy the parents too much, so they let the kids have a much freer reign over the place. Which has always made me suspicious about some of the grading statistics as well
10:42
@iroegbu yes, and that is a plus. Am a product of public schools.
0
A: Find double files using PHP with high performance

Joe WatkinsAs you guessed, it's hard to tell if you can see any gains by using threading ... However, I decided I would write a nice pthreads example based on your idea, I think it illustrates well things you should do while threading ... Your mileage will vary, but here's the example all the same: <?php...

wow, sexy answer joe ...
who said that ...
@JoeWatkins Yay for plugging your own libraries!
@DaveRandom Drugs were everywhere at grammar school too, where I went (admittedly central London location probably exacerbates that issue).
no plug, OP mentioned pthreads :)
"Hello World" room seems to me more like "Hello India". No offence to indians here :X
Most of our indians are awesome :D
10:46
@MadaraUchiha I used to chill in there, all seems to be Droid devs.
I'm still amazed every time I write one of these example that what I am executing is PHP ... not java, I think my head thinks it's java ...
So, who else here is sad that they won't be getting an Ubuntu Edge?
@SweetieBelle I think they will be everywhere... er... everywhere but the issue is more how much the school does to combat it. I had some mates who went to Manchester Grammar (private) who did very little about it unless some kid got caught by the police of their own accord, I went to Altrincham Grammar (public but more like a traditional grammar) who were more on top of it but still quite forgiving, I went out with a girl who went to a local comp and they were really aggressive over it.
@DaveRandom Me and a friend got caught with weed behind the bike sheds, got a 1 day suspension. Our school were pretty relaxed about it and it was endemic.
ooooh we are talking about drugs, whose got drugs ?? where's mine ??
10:50
There were other drugs on site regularly too.
@SweetieBelle 1 day??? In which you presumably went home and had a joint.
@DaveRandom Yeah, I went home, lit up and played Final Fantasy 8 I think :P
You remember school ??
@JoeWatkins I'm in my mid 20s and yes, I remember school. :D
@DaveRandom I do think weed isn't taken particularly seriously in central London though, because it's literally everywhere.
One of my mates got suspended for 6 weeks for having some weed, he then sat at home for 6 weeks and got baked every day, there were a few of us who went round at lunch for a joint, it was the worst thing they could possibly have done. Suspension is not a punishment for kids like that.
10:51
I'm in my late twenties, none of my memories start with one day at school ... don't remember any of it ...
I think one of the stats was 50% of 7-11s had tried marijuana in Lambeth. :/
@SweetieBelle Yeh and it's also not particularly damaging. I'm a big advocate of legalisation even though I haven't smoked for years.
ah I know the reasons I was suspended/expelled, they were written down :D
I am too, but I'd legalize all drugs just on the grounds that they're a medical issue and not a criminal issue.
ever met a heroin addict ?
10:52
Yes
really ?? a real one ??
I've also met an alcoholic. Eerily similar.
@JoeWatkins I grew up in Brixton, heroin addicts were hardly a rare encounter.
one that overdoses regularly, one that misses the veins in their limbs and has swollen limbs all the time, one with needle marks in the corner of their eyes ??
I'm not on board with that for opiates or Cocaine, but weed and E should both be legalised and regulated.
doubt it ... you wouldn't be saying you would like to legalize all drugs if you had ...
10:53
@DaveRandom I'd definitely legalize cocaine.
@JoeWatkins heroin is a bit extreme.. It's more like a poison rather than a drug...
@JoeWatkins I lost an uncle to alcohol addiction. I'm still not in favour of criminalizing alcohol.
Drugs have been legalized in Portugal since 2000/2001
It's too addictive and has a lasting effect on personality, so I can't agree with that. Although some form of regulation of the production is definitely required.
heroin goes hand in hand with cocaine, shit most crack heads turn to brown just to come down ...
you don't want to live in a place where that lifestyle is anything like legal ...
10:55
@DaveRandom Well, the UK already gives out methadone to heroin addicts, which is also an incredibly addictive opiate substance.
It's just a cheaper one.
because there is no cure
even if you kick it, for the rest of your life you'll be thinking about it ...
Did someone say cigarette? That's a good idea.
some people aren't strong enough to go through proper withdrawl, so methadone is what keeps them sane ...
this is crazy talk wanting to legalize cocaine and heroin
Again, legal in Portugal. It's not a bad place to live.
10:56
@JoeWatkins I know people who have used (not abused) opiates like heroin.
you want your kids to grow up in a world where their pharmacist can prescribe shit like that ??
barmy ...
there are no users, it uses you ...
@JoeWatkins Your doctor can prescribe worse drugs than heroin.
@JoeWatkins Yeh I suspect the group of people who can't deal with withdrawal and the group of people who would use it in the first place are quite closely aligned
and I refuse them too ...
Marijuana can make some people mad too
10:57
@JoeWatkins And you could refuse heroin (which would never be prescribed because it's less of a painkiller than morphine -- which they already prescribe)
then some get high
So can caffeine, that's not a valid argument IMO
@DaveRandom, statistically, yes ... there's the odd case where someone quite normal can be lead down the wrong path, they'll kick it ... but never ever forget ...
//creating the dump file via exec....
exec("mysqldump -u root -p my_db > C:\wamp\www\my_db.sql");   this will return empty dump file ?
@SweetieBelle Actually my GF was given a shot of diamorphine (chemically pure heroin) during labour. Apparently it did basically nothing and she demanded an epidural about an hour later
10:58
@JoeWatkins There are normal people who use opiates recreationally. Not every user turns into a fiend, contrary to popular belief. o.O
if I ever get stabbed in the face, then I'll have a jug of morphine, no problem ... that's what the use of these things are for, but to talk about legalizing them like legalizing weed is crazy talk ... that would poison everything ...
@JoeWatkins I only found out the other day, but apparently Davina McCall was a herion addict many years ago
Not sure how that's relevant, just throwing it out there
Heroin is an extreme case, but I still think the arguments for legalization are stronger than the arguments against.

« first day (1042 days earlier)      last day (4136 days later) »