« first day (1821 days earlier)      last day (3124 days later) » 

LGL
12:00 AM
now it should be 2 right?
 
Anonymous
nope.
 
Anonymous
go to sleep and tomorrow you head will work better.
 
LGL
Why but user2 also voted on same post
 
Anonymous
all is ok to me
 
LGL, because your unique constraint is only on the post, not the post+user. take a look again at what i gave you earlier
 
12:02 AM
@LGL if you want post to be repeated in the table, why did you set post to be unique?
what @PaulCrovella said
 
LGL
@andho cause user should be allowed to votes once.
@PaulCrovella where is you formula?
Guys just consider stackoverflow voting as example.
 
@LGL that means (user+post) should be unique. Not (post) only. Read about Composite key.
 
@LGL huh?
 
LGL
Now see, @PaulCrovella was right
But the problem was I needed to run ALTER TABLE votes` ADD UNIQUE unique_index(user, post);`not use MYSQLWorkbench
Is working, Yes. I hate Workbench a little now
See in visual it doesn't show as unique.
but in Query it does
CREATE TABLE `votes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user` varchar(150) NOT NULL,
  `post` int(11) NOT NULL,
  `vote` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_index` (`user`,`post`),
  KEY `votes_posts_FK_idx` (`post`),
  CONSTRAINT `votes_posts_FK` FOREIGN KEY (`post`) REFERENCES `posts` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=175 DEFAULT CHARSET=latin1
Super weird.
@PaulCrovella @samayo Thank you guys.
 
12:11 AM
workbench cannot show composite keys I guess
 
LGL
It actually does
But you have to set it up in different view
you have to set it up from indexes tap
 
@LGL btw, are you using userID or userName as the reference key?
 
LGL
userID
and votes.post to posts.id
and comments.post to posts.id
 
user5405273
is here anyone who could help me in .htaccess problem?
 
@AniketSingh No, the guy that does that is out sick today.
 
LGL
12:19 AM
If you give me 30m sure @AniketSingh my brain is on fire now
 
user5405273
so.. where should i ask my prob now
 
LGL
ask I will help just right and I will be back
 
user5405273
I I have this htacess file now whenever someone visit profile.php?user=aniket it doesnt open the link and shows 404 error page and if i put this line RewriteRule ^([a-zA-Z0-9_-]+)$ profile.php?user=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ profile.php?user=$1


above this line- RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L] it start working but then whenever someone visit login page it shows 404 page
 
@AniketSingh You should probably be a little more decisive here. The URL http://yourdomain.com/profile.php?user=aniket is what gives you a 404 or your login page?
Also "started working but then..." what did you change when it stopped working? That's probably a good place to start troubleshooting that bit.
 
user5405273
no...! the question is this htacess rule - RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L] & this -- RewriteRule ^([a-zA-Z0-9_-]+)$ profile.php?user=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ profile.php?user=$1 are conflicting with each other only one rule works at a time
 
12:30 AM
Of course, your first rule stops.
See the L there.
You should probably read the apache docs to learn what your rewrite rule is doing. httpd.apache.org/docs/2.2/mod/mod_rewrite.html
Also, that's not a question.
 
user5405273
ok so what should i write instead of l there?
 
Who knows? You could write Tolstoy for all we know. You never stated what your desired outcome is here.
Try formulating a question that has an objective.
 
@AniketSingh Doing routing like this is much easier in PHP than in Apache. If you pipe all requests to a single index.php file means you can then route it to the appropriate thing in PHP code, rather than having to fiddle with apache config.
 
FWIW, I posit that removing the Last flag in your first rewrite rule should probably resolve your immediate issue here. Either that or move it down to the bottom of the chain. But definitely, horrible practice in general.
Also, .htaccess yukh
At least stick it in your vhost.
 
 
1 hour later…
1:54 AM
hey
I am trying to making a server using laravel
I want to make an api
0
Q: Making an API in laravel

harvey_slashI am a laravel beginner. I am building a PHP backend using laravel that will serve multiple platforms. I want to make an api that multiple platforms can use. This is what I am thinking of doing: my api can be accessed like this: URL.com/api/v1/login (this responds in JSON) and , if it a web ver...

could anybody please answer /comment on that
 
That's a very broad question. Probably not suitable for SO.
 
 
1 hour later…
3:08 AM
@bwoebi I'm using news.php.net, the newsgroup server, rather than the mailing list. I am clicking the "Reply All" button, but I guess it doesn't have the Cc information.
 
3:27 AM
Ohh.
SeaMonkey's Reply All uses the "Reply to sender and newsgroup" option by default, not "Reply to all recipients"...
if I choose that latter option, it CCs everyone like usual
hmm
 
I can't decide if I prefer "Reply Some" or "Reply Many"
 
hey
please help me in laravel
 
Sorry i don't know larvel
 
@PaulCrovella why would one not use tags in the post body? you have some meta guidelines for this?
 
@CSᵠ because it's obnoxious to read and serves no purpose in the question
#may #as #well #speak #in #hashtags
 
i found it quite nice to hover on the terms and get that popup with a bit of info
 
4:02 AM
like ?
 
lol, without that :))
it might also be useful for newbies or the ones not accustomed with the term yet..
 
Tags relevant to the question should be tagged on the question itself, and are. The rest is noise.
 
good morning
 
morning o/
 
12
Q: Tags in question bodies

Peter MIn this question I just saw something that I hadn't seen before and didn't know you could even do. Using a [Tag:xxx] construct the author put actual tags in the question body in addition to those in the Tag section. Is this something that is allowed (and that I am just ignorant?) or should it b...

 
4:08 AM
that makes sense
so it's allowed on purpose for what it would constitute a valid tag
otherwise should be backticked
 
No...
@PeterM FWIW this feature mostly exists for Meta and tag wikis. There are rarely ever circumstances for legitimate use inside a question or answer on the main site, and they usually just get edited out. It's pretty rare to even see them on main. — animuson ♦ Dec 16 '14 at 3:22
Also the time to ping me and debate this was perhaps before rolling back the edit.
 
that's a comment and I remember voting for animuson
opinions.
 
It's a comment he could have just as easily put as an answer.
 
i figure about half of the tags should have been edited out
@PaulCrovella ohh, he complained about that in the js room...
the "abuse" if one could even call it that way would only be for the [coffee] joke
 
moin
 
4:14 AM
Well, complain is harsh
 
in a way the reason for the edit seems the same..
morning Joe
 
I didn't attribute it to "abuse", just said don't do that. It's noise, so I took it out.
 
doesn't really worth the time, but at least generated a nice discussion
 
@PaulCrovella - No worries, did not generally know some people see it as 'noise'. It's easy not to use them in the future :D
 
4:18 AM
So many f words
 
every few days these guys get shouted at by someone ...
oh wait ... it's the same guy
 
haha
seems he has been donating and not happy about delivery
 
I'd go so far as to say he's mildly perturbed, even.
 
he needs an attitude adjustment ... or punch in the throat ...
 
hahha :D
 
4:24 AM
-23
Q: Why hide the file extensions in URLs?

frostyWhy does Stack Overflow hide the file extensions in their URLs? For example this URL has questions instead of questions.php or some other extension: https://meta.stackoverflow.com/questions/307712/why-hide-the-fileextensions What does that accomplish? What does hiding the file extensions in ge...

 
>.>
<.<
Why wear clothes
 
next april 1st I want to see them use urls like https://meta.stackoverflow.com/questions.php/307712.php/why-hide-the-fileextens‌​ions.php
 
LMFAO
 
:))
 
LMFAO.php *
 
4:31 AM
https://meta.stackoverflow.com/questions.php?id=307712&safeTitle=why-hide-the-f‌​ileextens‌​ions
 
Wow the accepted answer on that question is a work of art.
 
Im fairly certain the OP thought 'questions' is actually a folder
Maybe it is >.>
<.<
 
> Yes didn't you read URL Fashion Magazine 2015? Extensions are soooo 2008
WIN
 
that was gold
Long story short, it's just for styling purposes? — frosty 2 days ago
but he insists ^
 
The snarkiness in his answer was subtle enough that he probably didn't feel like a dumbass, but suspected it just the same.
 
4:35 AM
The 3 upvotes on the question and 1 downvote on the answer conern me
and concern me as well
 
3?
Oh, upvotes.
 
Yea. 2 people thought it to be relevant
 
heh
 
3 *
 
Yes, there are at least 3 stupid people in the world.
Unfortunately they all wound up there.
 
4:38 AM
2 of them are trolling the Jquery tags atm im sure
 
or 3 people amused enough to egg it on
 
Ah, to upvote for lulz
 
Everyone in this room egged on Rebecca Friday so...
 
hey now, that was serious business
we never even got around to answering what day came after saturday
 
I remember that
 
4:41 AM
@PaulCrovella Elephant Day?
 
Isn't there a clever domain name with that?
I remember thinking it was clever enough
ha
 
php.wtf is clever enough
One of these days someone is going to make a .php tld and confuse the fuck out of some noobs.
 
there already is the .zip one, seems it's nearly 100% used for illegal activity
 
ugh, is there really ...
/me looks into this
".ZIP is a specially tailored TLD for the data storage industry."
So wheres our .exe TLD for the windows software industry
I was right there the second .cool came out.
 
4:46 AM
Sounds like a tld for the porn industry.
Or prostitutes.
 
I tried zero.cool - unable to get it as it was 'reserved' as a special domain. Im guessing the person who paid for that one made sure he got it
 
php.sucks ? AVAILABLE
 
We all know PHP sucks. No need to pay money to prove it.
 
it's like $2200... there is a financial threshold for php hatred
 
10 cents?
 
4:48 AM
we should that that ^^ into some other php hating room
 
The poor bastard that spends that much money to tell people PHP sucks is going to be sorely disappointed when they all tell him they already know.
 
299 a year for a .sucks... You have to really burn with hatred
 
thatllbethe.day
 
So we can put a monetary value on how much PHP sucks. Apparently right about $2000: https://www.get.sucks/?d=php /via @orange_pill
 
4:51 AM
> instra.sucks Registered
go figure
 
@Orangepill seems it's no longer a premium at 2k, available for 300 now
 
Hey look cplusplus only sucks for $200
 
lol
ROLF
 
hoover.sucks, dyson.sucks and oreck.sucks are already taken
 
I wonder how much $$$ Javascript .sucks for
 
4:53 AM
javascript sucks for $2400
That's too expensive
That better be a damn good blowjob
 
Priced by a js dev
 
javascript is a top notch .sucks language
 
asp.sucks - Available
How?
 
Look, Oracle already bought java.sucks and put their EULA on it.
 
doesn't viewing their EULA before signing it violate the EULA?
 
4:56 AM
No, by visiting the page you have already agreed to their EULA.
 
nothing left to do but format your computer at that point
 
If you disagree you are instructed to contact their attorneys, who will bill you $600/hr to tell you how much you suck and that you're wrong.
 
I knew it was something brain fucked like that.
 
It's prorated though so you get the first ~15 minutes for free if you hang up 1 second before.
 
You have to visit it using tails on tor with javascript and flash off
or else
i wonder how much it would be to register all the famous republicans with a .republican TLD and vice versa for democrats
 
5:00 AM
Wow, life.sucks triggered a fishing attack warning in Chrome.
 
wait, reverse that
 
I don't know if that's poetic or what... but nice
 
@Sherif - I cant get that one or the java one to load, just fails like it doesn't. probably a good thing
exist ^ *
 
same here
I should buy up php.sucks and just put a page there that says "Duh"
 
@Jesse It seems to redirect to another site that Chrome blocks for fishing scam. Don't know if that's just someone DNS squating or what.
 
5:02 AM
Maybe your DNS is hijacked
You seem to be able to view sites the world cant
 
my DNS is hijacked?
 
lol
 
I didn't know I could own DNS.
 
You own DNS?
Can I get your autograph?
 
You get one free when you buy an Internet
 
5:03 AM
biograph ?
 
Ah
If I buy 2 internets do I get more than one?
 
you need to download more ram for 2 internets
 
Limit one per customer
 
@Sherif gives me an idea to pollute my hosts file to trick my wife
 
she'll love it
oldie: hmpg.net
 
5:05 AM
@Jesse That would be so much better it it hung at 97%
 
^ and mentioned you need more ram to continue, and a button to click to do so
@CSᵠ I remember that one. aol days
 
@Orangepill you didn't have enough ram to download that ram into
 
No I think it would be funnier to see how long people would wait for it to complete...
 
Aol. The most fun part of aol was going to your local shop, grabbing the entire set of floppys and loading them up with viruses and then returning them to the store
 
wow
 
5:08 AM
I always microwaved the cd's
 
couldn't you just steal them like the normal kids....
 
That is not the right way to view the Hot Content on the internet
 
@Orangepill dvd's are waaay bettr
 
Ohh I remember downloading some sweet pcx files of Cindy Crawford
 
5:10 AM
hmm, never tried a BR disk though, but that tech came out useless
thanx, keep forgetting to try that
 
but grapes are useful
 
@CSᵠ Be careful, br discs are more advanced
 
@Orangepill so is plasma
 
I'm going to have to do the grape thing with my son.... he'll think that's the coolest
 
@Jesse pfff
@Orangepill soap !
 
5:12 AM
soap ...
OH. too cool
 
Peep jousting
 
@Jesse chat.stackoverflow.com/transcript/message/26216330#26216330 That's what my kid would do. You should at least learn how to ARP poison your router and build your own captive portal. Then you could do all kinds of interesting shit with all of the devices that connect to your wireless access point ;)
 
SOAP, REST, JSON
 
First comment on that youtube video == priceless
 
5:14 AM
@Sherif wait, what...
 
Which part confused you?
 
you mean, like.... after disconnecting from your router device?
 
s/router/access point
I highly doubt anyone in here has an actual router at home.
 
spiders explode in the microwave .... cockroaches act normal up until the point they just die.
 
I do.
 
5:15 AM
Doubtful
 
I bought an internet and they gave me one
 
i do... in the closet not hooked up.
 
What you think is a router is really just a hub.
s/hub/switch
 
an old xyplex
 
@Orangepill that was a good lol
 
5:15 AM
Nothing more than a glorified switch anyway
 
I did not see any switches on it
Do I need 2 internets for the switches?
 
@Sherif nope, but... could you explain if the arp poison remains in the connected device's veins after leaving your area?
 
@CSᵠ What are you talking about?
Do you understand what ARP is?
 
@Sherif - He did not buy the same internet as us, I know what you are saying. I need to poison my wife
 
@Jesse don't push the switch on your router switch man, it will not switch anymore
 
5:18 AM
There is a button that says "Do not push this button" ...
 
omg
 
Why would anyone label a button as such?
 
"button" ?
 
To make a certain type of person touch it
 
It might as well say "jump off a bridge when you read this"
 
5:18 AM
I think it is the entrance into the matrix
Of course. The entrance to the matrix comes from comcast
I am going to return my internet
 
better share it ;)
 
I will get a replacement internet
 
no returns, the seller sent it via UDP
 
I'm going to reformat my internet... there's way too much furry porn in it.
 
rm -rfv *.internet ?
 
5:21 AM
0
A: How to close or reset a pconnect() connection when using PHPRedis and PHP-FPM?

Joe WatkinsPersistent streams are provided by PHP internals, it is unwritten law that anything that exposes a way to create a persistent stream should also provide a way to destroy it. PHP Redis breaks that law, there is simply no way for you to destroy that persistent stream from userland. The course of ...

that's the first time an answer had a patch in it ...
 
fresh patch
 
never looked at redis ext before ... is quite horrible ...
PHP_REDIS_API int redis_sock_disconnect(RedisSock *redis_sock TSRMLS_DC)
{
    if (redis_sock == NULL) {
        return 1;
    }

    redis_sock->dbNumber = 0;
    if (redis_sock->stream != NULL) {
			redis_sock->status = REDIS_SOCK_STATUS_DISCONNECTED;
            redis_sock->watching = 0;

            /* Stil valid? */
            if(redis_sock->stream && !redis_sock->persistent) {
                php_stream_close(redis_sock->stream);
            }
            redis_sock->stream = NULL;

            return 1;
 
php7 ... are you a wizard?
 
@JoeWatkins could you please stop being so awesome... you are making the rest of us look bad
 
looks like someone didn't know what they are doing ...
 
5:23 AM
persistent connections... yukh!!!
 
inorite
how 90's is that ...
 
You can't afford the 1 ms of latency to connect to a TCP socket?
 
no
 
UDP FTW
 
@CSᵠ - Time is money, I already have to return an internet and poison the wife
 
5:25 AM
rolf, omg, lol
 
@JoeWatkins - Whoever doesnt upvote that is a nazi
 
The best thing about Redis is... it's one of the nicest documented protocols. The worst thing about Redis is... no one ever bothers to read the documentation and realize what a nightmarish mess it is.... albeit a very nicely documented nightmarish mess :)
 
whoa ... straight to nazi
 
@Sherif It worked for PHP
 
Thats right. No sugar coating it. Either upvote it, or nazi
case closed, street justifce
and justice too
 
5:28 AM
@PaulCrovella But we got there first!
To quote Steve Jobs "No copying BITCH!"
 
I know, true pioneers.
 
@PaulCrovella - Yea but PHP is really goo... nvm
 
I'm not falling for that
 
Now I gotta wait 2 days tomake a bounty so someone can recommend I use nodejs on a php question
great
 
5:29 AM
I know where that link goes
 
today isn't friday
 
That's would you like me to believe, isn't it?
 
lol
Starred the goo, spread the goo
 
@Sherif The best thing about PHP extensions is they can do almost anything ... the worst thing is that most extensions were written by amateurs when just becoming interested in internals (and I would wager, C), people then depend on pretty horrible code, and chances to fix it come around once or twice a decade ....
 
@JoeWatkins Yep, that's pretty much how I got started writing PHP extensions.
Wrote some of the worst shit very few people in this world have been unfortunate enough to see.
 
5:33 AM
@JoeWatkins - To be fair that is only because by the time someone becomes a guru at PHP they come to realizations ...
 
@Jesse do you know C ?
 
I gave it a go back when I got the source to Uplink. Was not a huge fan
 
    if (redis_sock->stream != NULL) {
			redis_sock->status = REDIS_SOCK_STATUS_DISCONNECTED;
            redis_sock->watching = 0;

            /* Stil valid? */
            if(redis_sock->stream && !redis_sock->persistent) {
do you see what is wrong with that code ?
 
I still remember when I first started writing PHP extensions and figured out that you could require a PHP function's return value to be assigned.
I was like.... I'm gonna do that! I have no fucking idea why, but hey I found a macro and I'm using that shit!
 
the misspelled comment?
:D
oh ..
 
5:35 AM
if (null_check) {
     /* stuff that cannot possibly effect ->stream */
    if (the_same_null_check && other_stuff) {

    }
}
it's not about being a guru of anything, anyone with eyes can see that is wrong ...
 
You really don't need ot know C to even see that stupidity
heh
Even if you were a 12 year old on your first day... Your IDE doesn't have "unreachable code block" warnings?
Come on... it's 2015
 
@JoeWatkins formatting DUH, i bet it mixes tabs with spaces
 
@CSᵠ - I bought a dedicated pad that generates tabs for me so I never do thatg
 
@Sherif Internet Dumb Environment
@Jesse must.. get... link
 
I press my palm on the pad and a tab is created like magic
 
5:38 AM
no waaaay
 
Was only like 40 bucks
 
does it do spaces also?
 
Thats the extension
requires 2 palms
im using it now
 
rolf!
:))
 
So(2palms)its(2palms)easy
 
5:40 AM
need to keep consistency with ye ol' files
 
What do you have to do for a carriage return? 2 palms and a foot?
 
@JoeWatkins - I see programmers all the time at work doing things like that. A code block that will never get hit, logically. Sometimes someone is just hours deep into code and their brain gets all fuzzy
 
you need the line feed foot pad also
 
@Sherif I have the pedal for the carriage return, duh
It's a foot pedal
 
I use vertical tabs to indent my code.
13
 
5:41 AM
hahahahahahahahahahahahahahahahahaha
 
Hours deep without commits means you copy/pastad shit all over. Hours deep with commits means you found the mistake you made 183 commits ago and just reverted and fixed it properly ;)
 
@Orangepill Its good to keep well indented code. I double up
 
I don't really think that's a good excuse ... I don't think there is a good excuse ...
 
vertical and horizontal
 
my brain is always fuzzy
 
5:42 AM
So when you look at my code you can follow it, like climbing a mountain
Some point halfway through I start de indenting
Kinda sucks when I have to make a change, I have to redo all my indents
 
hmm... combining @JoeWatkins's hand pads with @Jesse's foot pedals one could write whitespace
 
Whoa
Easy there albert einstein
 
easy, vim plugin ... get off my lawn ...
 
Your talking about straight future stuff now
 
dude, he was just my gran-grand
 
5:44 AM
Fair enough
I think I saw him trolling patents -- patents.stackexchange.com
No answers or questions, just comments like "interesting"
 
Software patents are the plague
 
I patent all my stuff bro
This whole chat has been patented
 
Good luck with that
 
inorite ®
@JoeWatkins - This sums up what you were saying pretty nicely rs218.pbsrc.com/albums/cc46/Wholesome1/grass.jpg~c200
 
the perfect lesson in not clicking on strange pages
(next)
stupid markdown ...
 
5:59 AM
Anyone there uses phpstorm or intellij or anything similar with VCS here?
 
changing one very specific set of rules for another very specific set of rules is not very useful ... #justsayin ...
 
If yes, how can I connect my project to a VCS without re-creating the project?
 
plus, there are two sets of rules you gotta learn now ... we're not smart, as a collective, we just bumble forward hoping that none of our mistakes turns out to be our undoing ...
 
6:16 AM
@JoeWatkins - Where I work, we spend a lot of time (SOmetimes it feels like too much time) evaluating almost everything we put out there. For the exact reason of 'undoing'. Working 6 months on a project and hitting a wall is alot of money lost for a local dev company
 
6:52 AM
Will it run on background ? — Mark 14 hours ago
yes, it will run on background. — Yevhen Lisovenko 14 hours ago
What is daemon btw ?? — Mark 14 hours ago
lol
 

« first day (1821 days earlier)      last day (3124 days later) »