« first day (1219 days earlier)      last day (3729 days later) » 

12:00 AM
And dv that thing
Night @nikita :)
 
NM, I just realized I have too many ";" in my program, which effectively stops the code from progressing. — user3313912 1 min ago
lulz
Nothing like a good if (condition);
 
:P
 
@DaveRandom As far as I know, does it not simply remove the .php extension at the end of pages like say, localhost/news.php to just localhost/news ?
 
@user3020461 And what happens to the last rule?
 
@PeeHaa tidied up that answer,, so I won't look like such an idiot when the bounty attracts the smart people =oP
 
12:04 AM
@user3020461 Nope, it adds the .php extension to URIs that don't exist
 
@crypticツ :D
 
(so basically if I ask for /foo it tries to serve /foo.php)
 
So I only need one of the two rules? Sorry, I'm a complete noob with this .htaccess codes and the regular expressions.
 
It's worth noting that mod_rewrite is one of the most complex machines ever devised by mankind. That aside, you still need to try and understand what you write, copypasta code never works out well for anyone...
I would consider myself pretty well versed in the intricacies of mod_rewrite, but it still occasionally does shit that I do not even begin to comprehend
 
@DaveRandom Wow, I wasn't aware it was that complex. So I only need one of the two block of codes then? Still kind of confused.
 
12:07 AM
@DaveRandom I don't always use mod_rewrite but when I do it is four lines
 
On a related note, if someone would care to CR stackoverflow.com/a/18958914/889949 I would appreciate it, I keep getting upvotes for it but I'm a little concerned it's a just generally a terrible idea
 
@DaveRandom Well doing cors in the webservice is horrible period if that makes you feel better :P
@PeeHaa just because something is not working doesn't mean the question is off topic, people ask questions about things not working all the time — Josh Engelsma 3 mins ago
Fucktard
I'm going to have to give you -1 for putting a shitty script that tries to prevent right click on elements, making it hard for people to help you. — Ben 2 mins ago
:)
 
@user3020461 I suggest you start by removing the first RewriteRule line (quickfix), and then go read httpd.apache.org/docs/current/mod/mod_rewrite.html twice. And if, after you have done that, you understand any of it, I will personally award you a medal
 
I genuinely had a hard time wondering WTF my rightclick didn't work last week in a project
You just don't see people stupid enough anymore
 
I like the idea of being able to intercept right clicks. I hate the idea of letting other people do it
Really what we need is a web API that lets you add items to the context menu, I don't want to disable the native context menu, I just want to add some shit to it
 
12:13 AM
WTF Dude write your own code instead of copy pasta'ing shit you find on the web. That shit will give you deceases for sure. — PeeHaa 14 secs ago
 
Damn it I nearly said "that's why XUL makes sense" and then I realised what I nearly did and had to punch myself in the face
 
@DaveRandom hehehehehehhehehehehahahahaha was just about to say about the same thign :P
 
@PeeHaa Deceases? Like, multiple deaths?
 
@DaveRandom Never seen faces of death?
:-)
 
Actually no, I've managed to avoid it and only hear about it
 
12:16 AM
The hype was better than the video :)
 
Fucking bastard pizza place doesn't take credit cards
 
@DaveRandom stupid pizza cunts
 
@DaveRandom Whaaa?
 
inorite
I may have to raid the emergency cash and pay it back tomorrow
 
Incoming world war III!
 
12:19 AM
(it's worth noting that the nearest cash machine to my house is about 200m away and I am a lazy cunt)
 
Stating the known facts is not really worth noting :P
 
Probably less than that actually
 
@DaveRandom 200 miles?? =oO
<- American
 
lol @crypticツ
 
Bizarrely I think in miles for long distances and metres for short ones
 
12:22 AM
You're one fucked up hybrid :P
What does this resolve into for you people? dev.pieterhordijk.com
 
I have been known to write down measurements of things like picture frames like 246mm x 12.4"
 
flaregramster or something else?
@DaveRandom hahahahahha perfectos!
 
@PeeHaa For me it resolves to "Oops! This page could not be displayed!"
 
Serious question, when is someone going to make a really good PHP framework?
 
@DaveRandom hmmmmm
 
12:24 AM
Will there ever be one
 
@David E_SUBJECTIVE
Although also, never
 
You are asking when some toolbox is going to be a good hammer
 
Maybe people should start building frameworks that don't try and do every single thing and just focus on certain types/areas
And have like 3 or 4 that are really good for a certain type of application
 
There are
 
Which ones?
 
12:26 AM
The thing with the specialized things are that they just don't work for you because well... they are specialized
 
PHP = worst language ever
 
@David My framework, because it works for the goal I intended and it works well. Not because it is cleve or works well for most people, just because it works well for me
 
Nothing beats your own framework
Especially since you know what every single line of code is there for
 
@user782220 You needed 161 questions against 11 answers while being in the c# tag so I beg to differ
So either c# is worse than php or you just suck
 
@user782220 That's helpful. Any other pearls of wisdom to offer?
 
12:30 AM
@David That and I have written it for a very narrow and specific purpose. I.e. helping me spit out projects :)
lol @ incoming github comment @DaveRandom
 
@user782220 You are a complete fuckwit and your mother is a whore. You blow goats daily. I hate you, I hate your face, and I wish you were dead.
^ while we're being constructive
 
*jerkoff
 
To the c# room!
 
BTW TinyColor is actualy a very cool library.
 
BTW that site looks pretty horrible webscale :P
 
12:37 AM
Good thing I spent an hour figuring out how to slap it in to node and just now read there's an npm install :'(
 
@DaveRandom pretty sure that thing just confused me even more lol...
 
@user3020461 I told you :-P
Normally I'm against giving out free code but when it comes to mod_rewrite there's something of an amnesty because it's so fucking incomprehensible
 
You are nice guy @DaveRandom for a reason
 
@DaveRandom Well, this is messed. After I removed the first 3 blocks of the code that were supposed to remove the .php extension, the localhost/article/bryan worked but none of the layout.css files were loaded..
 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?article/([^/]*)$ /article.php?id=$1 [L]
@user3020461 Ahh well that's a different issue, you're using relative paths (I guess)
You need to use paths that are absolute to docroot for resources like css
(as in /css/foo.css vs css/foo.css)
See when I ask for article.php?id=foo and the page references css/foo.css, that resolves to /css/foo.css but when I ask for /article/foo and the page references the same relative path, that resolves to /article/css/foo.css because the browser sees it as being in a subdirectory
 
@DaveRandom thanks man! You're awesome. So currently, my article file is in the root directory, and so is the style sheet.
 
@user3020461 OK, so presumably in article.php you have something like <link rel="stylesheet" href="style.css" type="text/css">? Well, just add a / before style.css (or whatever yours says)
 
@DaveRandom Okay that did the trick, you're a life saver man! Just to understand it a little though, I'm having some problems comprehending why exactly that's occurring though.
So a / before the traditional style.css does what, exactly?
 
Seems like they did a decent job though.
 
12:56 AM
So what exactly is "traditional" about 'style.css'?
 
@user3020461 Think of it in terms of a file system. Imagine you're in a command prompt and your current working directory is /root
 
If you do cd foo that will change to /root/foo
whereas if you do cd /foo that will just change to /foo
 
Oh heh :D
 
Basically the general rule is @user3020461: don't ever use relative paths, they will only cause you headaches
 
12:58 AM
Yes
fullpath all the things
 
I concur. I've worked on a system that relative path'd all the things
So brittle
Don't do it, it will wind up being a nightmare unless what you're doing is throw away
And once you start doing it it'll just be natural even with the throw away stuff ;)
 
Well the big thing about relative paths is "changed your rewrite rulez? fuck you idiot, now your site is terminally broken"
 
The two different ones are absolute paths, and relative paths right?
What's the major difference?
 
One is relative and the other is absolute
 
relative is relative tot he place you're calling from
absolute is from the base to the thing
 
1:03 AM
An absolute path describe how to get to a thing from anywhere, a relative path only describes how to get to a thing from where you are now
 
../images/poop.gif <-- Relative
/assets/images/poop.gif <-- Absolute
 
Night all!
 
Night @PeeHaa
 
Also it's worth noting "canonical" paths, which are kind of absolute paths on steroids
 
@Fabien Although I would personally call the latter also relative
 
1:03 AM
LOL
 
relative to docroot
 
@PeeHaa Yes.
 
@PeeHaa So say all my files are in root. In my index.php file, I wish to reference layout.css, how would I do it using an absolute path?
 
/var/www/html/public/assets/images/poop.gif <-- Absolute
Though that's a weird one for an image
 
@user3020461 /layout.css
 
1:05 AM
@user3020461 What dave said
night all
 
nite @PeeHaa
 
Night @PeeHaa
 
Enjoy the sleep of the hammered
 
Okay, so what does that "/" tell the system to do? Go back one?
 
I know I will when I get there
@user3020461 Starting a path with / says "start from the bottom"
.. says "go up one from where I currently am"
 
1:07 AM
@user3020461 What OS are you on?
 
and . is self referential, but that has no use in the web (although it does work)
 
I'm using Windows, and development on Wampserver.
Do you think this stuff will face issues when I put it live on a hosting service?
 
@user3020461 open a command prompt and do the following:
cd \
stupid markdown
(see what happens when you do that)
now do cd windows
then do cd system32
then do cd ..
then do cd \windows\system32\drivers
 
What's the pwd equivilent for Windows anyhoo?
 
Now mentally replace all those backslashes with forward slashes, and that's how *nix (and the web) works
 
1:11 AM
heh
 
@Fabien echo %CWD%
It's a magic env var
 
Seems excessive considering how much I use pwd. Maybe I use pwd too much :p
 
Although in a batch file you can also do some better magic with %0
Like %~dp0
(from memory)
By the way, Windows batch files suck balls
 
Just reminds me how glad I am I switched
 
Yeah, that does clear things up a bit DaveRandom. In a nutshell, adding / when linking things on website will create absolute paths, and make things easier in the big picture?
 
1:14 AM
You know how much writing bash sucks? Well imagine someone crippled bash with a baseball bat and asked you write scripts with the bloodied remains, that's Windows batch files
 
lol.
 
Powershell has gone some way toward rectifying this, but not far enough
 
Still ways to go.
Every one of the attempts at a better cli seems like a bandaid.
cygwin and all.
 
@user3020461 Well it means you are being explicit about where you want to go. Forgetting about rewrites, imagine you have a php file at /index.php. Now imagine you want to move it to /dir/index.php. If you use relative paths, you'll have to move all the CSS so that it stays in the same relative place. If you use absolute paths you dont.
Of course, sometimes you might want relative paths, it's not like they are completely useless
but 9/10 times you want to reference a specific thing in a specific place, rather than some dynamic thing that follows you around
@Fabien cygwin is more like giving up and trying to make Windows into *nix
(in which case, just go install *nix ffs)
Windows doesn't need a better shell anyway, it just needs to ship with Py
 
Indeed.
 
1:20 AM
or even PHP (but Py makes more sense)
 
I used to think Windows was a suitable dev environment.
Granted there's nothing strictly impossible about it. But it's just not as easy.
 
Actually to be fair JScript is awesome. It just makes fucking zeros sense as a shell scripting language
VBS could be awesome if it wasn't, y'know, VB
@Fabien Depends what you're trying to develop
 
Not windows (only) apps
 
@Fabien That's basically what it comes down to. Although it's worth noting that the main reason for that is that "not windows apps" are generally written in languages designed for not-windows. No-one writes C# on *nix, even though you could legitimately do so with mono
 
@DaveRandom okay, that makes sense! The only other issue I'm having now is converting %20 into "-" symbols, so that it's SEO friendly.
 
1:25 AM
@user3020461 OK so your problem there is going to be that you are trying to use the string itself to fetch the object it refers to
 
That's enough NodeJS for one night. Night all
 
You see in StackOverflow URLs it's structured like http://stackoverflow.com/:number/:seo-friendly-string
@Fabien nite
@user3020461 use the :number to fetch stuff from database instead of trying to translate the string into something your app understands
(the number should be the PK in your primary DB table)
 
Hiii
Back from sledding!
That was really quite fun!
 
@AustinBurk I slightly hate you
I wish we got snow/had mountains
 
I live in mid-Michigan
I've been accepted into Michigan Tech; I really love snow so it seems like a good fit
 
1:30 AM
So what, you spend your days building muscle cars?
(note that the only thing I know about Michigan is that Detroit is there)
 
Well, me? Not quite.
 
For some reason Michigan was way further south than it is in my brain
 
My dad has a Trans Am, he spent a long while building it and making it nice
 
@DaveRandom so will I have to pass the primary key (id) in the URL then?
 
even though, now I think about it, I know of Lake Michigan and I know where it is
 
1:36 AM
It's up on jacks right now though
https://www.facebook.com/TychoAussie <--My dad with one of the other things he does (for community and other stuff)
 
@AustinBurk Now see that just makes me think of Dolly Parton and that song about how here mother was a hooker
(I don't stereotype the US at all, as you can tell)
 
He's also a TA at the Department of Geosciences at Michigan State, and has a degree in Electrical Engineering
We're all ham radio operators too, so we're often hacking and trying experimental tech. I do more of the hacking though
 
@AustinBurk That looks scarier than I'm sure it's supposed to
 
The kids love it
 
Yeh I'm sure the photos don't do it justice, it's just that the dog costume looks slightly like it wants to kill me in the pics
@AustinBurk TA?
Oh, tech assistant?
 
1:39 AM
No
He's got a fellowship at MSU
 
Then TA == ?
Geosciences is kinda awesome btw, if you live in an actually interesting place like that
 
Teaching assistant
 
My whole mental geography of that general area is apparently fucked, New York is nowhere near where I though it was
 
haha, I wonder where you thought it was?
 
Further south
 
1:45 AM
Of course, I couldn't tell you where shit is in the UK either
 
Well no, but you could comfortably fit the UK into Lake Michigan
Basically the only things I got right in my personal little test were california, florida (i.e. the very easy ones) and washington state (because I live in Vancouver for a while)
Also wtf is the point in Rhode Island?
 
Florida is an easy one though; just look for the dick of the US.
 
user895378
London is bottom right. That's about all I've got.
 
@cspray Oh, Bush lives there now does he?
 
user895378
Oh, and I know Manchester is up.
 
user895378
1:49 AM
So I've got two things.
 
Wales is the weird looking bit that sticks out on the left in the in the middle, manchester is basically at the top of that
Bristol is at the bottom of that bit
The bit that sticks out on the left at the bottom we call "the west country" and that's basically our version or Arkansas where everyone is their own grandparent
 
user895378
lol
 
@DaveRandom nah - the west country is no where near as bad as cornwall.
to me at least - west country == somerset.
 
I don't really know where Somerset is
I know it's it's in that general direction but to me it's just "in that general direction"
 
@DaveRandom It's where all the water currently is - which is not too surprising given 'that the name derives from Seo-mere-saetan meaning "settlers by the sea lakes."'
All the flat bit south of Bristol and Bath.
 
2:05 AM
I have to say, Google maps picks out some odd places to show at a certain zoom level. Where the fuck is Tilehusrt and Leigh-on-Sea? Yet Leicester and Coventry aren't apparently worth marking...
Or Birmingham, come to thatz
Mind you, I'd rather pretend Birmingham didn't exist
 
2:19 AM
Hi, anyone knows about OAuth for an issue I am having?
 
 
1 hour later…
3:31 AM
morning
 
4:02 AM
hi
 
 
2 hours later…
6:16 AM
hellooo
 
7:05 AM
Pfah, do the 3v4l folks have any contact information that isn't Twitter? I've found two misbehaviors that are upsetting me, and I don't do Twitter...
 
7:23 AM
Who wrote the cv-pls extension?
Chrome 33 is going to ban unofficial extensions
 
@JanDvorak source?
 
hold on...
 
8:32 AM
morning
 
@crypticツ morning :)
 
morningz
 
Hello everyone!
I'm Hassan, a PHP developer with 1 year experience.
 
Hi @Hassan nice to meet you.
 
Oh, hey Benjamin!
So, Benjamin, are you good with OOP PHP or Procedural?
@BenjaminGruenbaum Is this group active?
 
@Hassan this is a chat :P
 
8:54 AM
@BenjaminGruenbaum Indeed, I know.
@BenjaminGruenbaum do you know PHP?
 
I'm not good with PHP, but if I had to pick one I'm better at OOP than procedural because I like the mindset better. I'm not a huge PHP fan, most other people here are.
 
@BenjaminGruenbaum which language do you fancy then?
 
Depends on the task, I mainly do web with C# and some JS and Python (again, depending).
 
Morning
 
mornign
 
9:11 AM
is it really though (deep)
 
@BenjaminGruenbaum how do you use C# in web? :O
 
@Hassan asp.net mvc
 
@Hassan almost any language can be used on web. Some languages are more suited than others.
 
9:28 AM
The best language for the web is jQuery
It does everything, from making fancy animations to doing my laundry
 
The best language for the web is Vogon
 
@Ocramius too much forms and paperwork =oP
 
9:41 AM
Second meta question of the day :P meta.stackoverflow.com/questions/221361/…
 
i dont really get how stackoverflow works other than you ask and get answers :p
 
It is again one of those days when my brain just won’t stop doing stupid things: https://github.com/Ocramius/LazyMap/issues/3 #php
waiting for obligatory stabbing
 
10:07 AM
good mornings and have fun playing :)
 
10:22 AM
morning and ...
74
Q: Why does "quadratic" describe second power while "quad" usually describes "four"?

PeterIn mathematics, quadratic means "involving the second and no higher power of an unknown quantity or variable". But the prefix quad- usually describes something that has to do with four, such as quad-core processor, quadrilateral. Why does quadratic describe the second power while quad usually des...

 
Anyone here decent with SE data queries?
 
Question, will a Mapper fetch into an existing Domain Object, or will it create one?
 
@MadaraUchiha existing
the entire idea behind "mapping" is taking something existing and wiring it together with another existing thing
 
@MadaraUchiha martinfowler.com/eaaCatalog/dataMapper.html. Book explicitly shows examples of a DataMapper creating Entities at pg. 167
 
@Gordon The entity already exists in the database.
 
How do you use a DataMapper/DomainObject scheme to list?
 
10:49 AM
Perhaps better said entities (as in pulral) as it's a mapper otherwise not much mapping would be necessary.
 
@hakre the record does in the example. the entity doesnt
also pg 172 has code saying new Person in the PersonMapper
 
Say I have people saved in my database
 
@Gordon That's perhaps a bit philosophically, but a mapper can not create something new, especial not the entity, otherwise it wouldn't be a mapper.
 
And I want to list them all.
How would I do that?
 
@MadaraUchiha You normally do that with a database query.
 
10:51 AM
@hakre No kidding! How would you do that with the DataMapper/DomainObject scheme?
:P
 
@MadaraUchiha fetch all the stuff from the DB in a query, then iterate over it and build objects from each result
 
@Ocramius So... the mapper has nothing to do with it?
 
@MadaraUchiha The pattern in the book suggests a find method (then showing next to that the SQL query)
 
@MadaraUchiha that's what the mapper does internally
 
@hakre So the mapper does create domain objects
 
10:53 AM
@MadaraUchiha well, if you mean the PHP object, yes. For the object, no. It uses the objects ID.
I have a very wide understanding of object btw.
 
@hakre Yes, the actual PHP object using a factory or new
We're talking about fetching for now, so no creating of new "people"
 
@MadaraUchiha The mapper takes care of that. However, the class of Person (or People) must already exist and is known to the mapper. The mapper could also fill an existing instance not creating any "new" object at all.
 
@hakre Yeah well, that wouldn't work well with a list though
 
@MadaraUchiha Your problem is not specific to Mapper here I'd say.
 
@hakre What do you mean?
 
10:56 AM
You normally do not want to create a list (array) of all person objects in memory.
 
Why not?
 
The mapper normally only takes care about the single person object, retrieving and saving it.
@MadaraUchiha Because then you wouldn't need a (sql) database in the first place, right?
 
@hakre I don't want all objects in memory.
I want all person objects from storage.
 
@MadaraUchiha That's what I'm saying.
@MadaraUchiha But so what now if I may ask? :)
 
@hakre Basically, display them, format them somehow.
That's not the job for neither though, it just needs to be passed on.
 
10:59 AM
@MadaraUchiha Then you could create some Iterator that will - if used - use the mapper to retrieve the object when needed. This would prevent taking all object of that list into memory.
The mapper then is used once per iteration / retrieval.
 
But then how would the Iterator know to iterate the person objects?
 
@hakre the DataMapper in POEAA definitely does more than just handling one single person object
 
It too, would need database access.
 

« first day (1219 days earlier)      last day (3729 days later) »