« first day (2413 days earlier)      last day (2538 days later) » 

9:00 PM
@Tiffany I can access the amazon website .. but I cannot buy something
 
damn :(
 
@Tiffany :it's the same in Latvia
amazon basically works only in rich countries
 
would this be the same as the above one?
if( isset( $_GET['u'] ) && ( $_GET['u'] == 'true' || $_GET['u'] == 'false' ) ){
	if( !isset($_COOKIE['qanda_unanswered_status']) && !( $_COOKIE['qanda_unanswered_status'] != $_GET['u'] ) ) {
		setcookie("qanda_unanswered_status", $_GET['u'], 2147483647);
	}
}
I hardly thing so though
 
See if you're able to find that in your country
 
@Shafizadeh because that was not what I wrote :D
 
9:03 PM
@tereško yes, I wanted to improve yours
 
I only skimmed the first few pages to make sure it was an actual logic book, but I'm not sure how great it is.
anyway, quitting time for me, glhf
 
nevermind ... that's wrong
 
:-)
such things consumes lots of phosphorus
 
can you in your own words explain, when cookie has to be set?
 
can anyone update the code? p_id and Program_names are already stored in database table...when one program is select from the drop down list it should find the p_id of the chosen program name. And if it matches it should redirect to some other page.codes are below
<?php
error_reporting(0);
session_start();
include("connection.php");
$program=$_POST['Program_name'];
$_SESSION['SProgram_name']=$program;
$Pname=$_SESSION['$Pname'];
if($_POST['submit'])
{

$sql="SELECT p_id from program WHERE Program_name='$program'";
$rData=mysql_query($sql);
$res=mysql_fetch_array($rData);
if($res['Program_name']==$program)

{
header("location:userhome.php?Program_name='$program'");
}

}



?>
<table width="68%" height="475" border="0" cellpadding="4"
cellspacing="4" align="center" bgcolor="#666666">
<tr>
<td height="467" colspan="2" align="center">
<form method="POST">
PROGRAM NAME<br><br>
<select name="Program_name">
<option>B.tech CSE</option>
<option>B.tech IT</option>
<option>B.tech EE</option>
<option>B.tech AEI</option>
<option>B.tech ECE</option>
<option>B.tech ME</option>
<option>B.tech CIVIL</option><br><br>
<input type="submit" name="submit" value="Continue">
</form></td>
</tr>
 
9:11 PM
@tereško when either it isn't set already isset($_COOKIE['qanda_unanswered_status']) or it is different than $_GET['u']
got it, that's it:
if( isset( $_GET['u'] ) && ( $_GET['u'] == 'true' || $_GET['u'] == 'false' ) ){
	if( !isset($_COOKIE['qanda_unanswered_status']) && ( $_COOKIE['qanda_unanswered_status'] != $_GET['u'] ) ) {
		setcookie("qanda_unanswered_status", $_GET['u'], 2147483647);
	}
}
Yay for me :-)
 
@DebasishChoudhury hey there. please, don't just post walls of code in the chat. use a tool like pastebin or gist...
... especially when it's sql injection-prone code. y'know, it hurts the eyes.
 
I would just write:
 
@Félix Gagnon​ okk i am new in chat room..
 
if (!isset($_COOKIE['status']) || (isset($_GET['u'] && $_COOKIE['status'] !== $_GET['u']))) {
    setcookie(...);
    }
@Shafizadeh ^ this
because, that's how you described it
 
can anyone fix my problem?
 
9:16 PM
you set the cookie, when it is not set already OR when it does not match the value in get
@DebasishChoudhury try hiring a developer ... preferably someone from 2002, when that code was made
these days we dont use tables for form layout, attributes for design, or mysql_* function for queries
 
Give some new idea then. I am a student so
 
@tereško clever .. just I forgot to mention one thing: that setcookie() should be happen if the value of $_GET['u'] is either true or false
 
well .. then after you compare it with the cookie, you also add an in_array($_GET['u], ['true', 'false']) check
hmm ..
 
what about this?
if (in_array($_GET['u], ['true', 'false']) && (!isset($_COOKIE['status']) || (isset($_GET['u'] && $_COOKIE['status'] !== $_GET['u'])))) {
    setcookie(...);
}
 
are you just guessing?
 
9:23 PM
I'm almost sure :-)
 
if (isset($_GET['u']) && in_array($_GET['u'], ['true', 'false']) && (!isset($_COOKIE['status'] || $_COOKIE['status'] !== $_GET['u'])) {
    setcookie(..);
}
 
oh no, I need to use isset() on the $_GET['u'] before using it into in_array() function
@tereško yes, it is correct
thx
 
and you need to put that entire condition in a private method - call it something like isCookieRequired()
 
@DebasishChoudhury you mean, they actually teach that, presently, in schools?
 
@tereško why? However not sure what you mean
 
9:27 PM
if ($this->isCookieRequired()) {
so that you actually can understand at a glance, that that boolean expression is supposed to check
 
as for your question, it seems you'll have to use ajax and javascript to first catch the change event on the select, then make an ajax call to a server, that would find the row or not, then return a response with the answer, which would be evaluated by your javascript code and in turn determine what you display
 
@tereško I know, but why should I create a separated function for this?
 
yes boss.. i will try to know the latest versions.
 
ah .. you're trying to make the code more readable .. ok
 
@Shafizadeh because in 3 days, when you come back to this bit of code, you will have no clue, what it does
 
9:30 PM
@DebasishChoudhury ? you mean of mysql?
 
@tereško why*
 
@FlorianMargaine no
 
okk..definitely i would love to know..Thank you.
 
@tereško what it's doing is easy: it's checking some cookies/GET values and setting a cookie based on that.
 
I feel professional :-) I use OOP, git, MVC, TRIGGER, complex logics, complex queries and etc ..!
 
9:33 PM
@FlorianMargaine and it will take time to understand that ... every single time he reads it, and every time someone else reads it
90%+ of time is spent reading old code
 
Nah, I work on greenfield projects
:P
 
when you close the file, it becomes "old code"
 
You wait that long?
Any written character is legacy code
 
naah, that's a hyperbole
 
because you haven't hit backspace by then?
(but yes, I stand corrected, "what" is also valid.)
 
9:40 PM
@tereško also as a note its missing a parenthesis!
. . . !isset($_COOKIE['status']) . . .
 
@Shafizadeh as you might have noticed, the chat-box does not have syntax highlighter :P
 
:-)
how can I convert "true" to true ?
 
=== "true"
what is that?
 
that is "tereško can't remember bot commands"
 
like, not bigger than the string true, or a new hipster php7 syntax? oh.
:D
!!eval (bool) "true"
 
9:46 PM
well, it might be dead
 
ohnoes
!!help
@Jeeves ohhnoooooeessss!!!!
 
@FélixGagnon-Grenier well, it also wont work
 
anyway. I'm considering, how much of a bad idea throwing and catching errors is in a js context
heh, indeed eval.in/805474
 
@Shafizadeh not in any nice-looking way
but you could send "0" and "1" instead
because (bool) '0' will give you false
 
yes numbers are good .. but I found the solution: filter_var($str, FILTER_VALIDATE_BOOLEAN)
 
9:50 PM
I always forget about those even existing
 
probably because it's actually sane
 
@tereško thanks a lot man!I'l research it more than I'l post probably more questions(stackoverflow.com/questions/44165856/… spend a few more days to learn more about design patters, i think it would be a smart move before going into this.It's a huge project....
 
@Arslan.H just be careful. People, who have just discovered that design patterns exist, then to use them as "magic recipes", while instead they are just descriptions, that developers should use to explain to other developers what the fuck they have made there
 
@tereško i used a few of them before, to be honest haven't used all.Nor i did know about all of them.So i decided to spend a few days testing them.Thanks for the advice
@tereško i have a question if i may.Did i undarstood well from your answers on stack that in MVC the model holds all of the logic?
 
Are any of ze Germans still around? If so, can anyone tell me if they would agree with twitter.com/RouvenWessling/status/867857173858201600?
 
10:03 PM
@Arslan.H depends what you mean by logic. I would say it contains all of the "business logic", while UI layer contains all of the "presentation logic". It's kinda described here: stackoverflow.com/a/5864000/727208
(though, it's a slightly older post, that I would get around to update a bit ... the code hasn't aged well)
 
@tereško thanks !!!!!Helped a lot to be honest...The most quality answers i got from you
people are writing nonsense 90%
but you got to the point
 
May 16 at 14:14, by Arslan.H
@tereško in reality i would probably kick you because you are getting on my nerves right now a lot since you are sooooo arrogant.
:P
 
heh
 
@tereško yea i like you now :D Sorry for that
 
10:07 PM
truth is brutal sometimes
 
there is only one thing that i don't like at @tereško and it's that he is playing games....
or anyone here
 
? we're all playing games?
 
Anonymous
go on..
 
i think that you guys should be working on some projects since most of you have a lot of knowledge
which can be used to make crazy things
not all sorry hahaha
 
yes, obviously we mostly do nothing of our days...
 
10:09 PM
some of you
 
I am: a RBAC authorization library ... and I should probably get back to it
 
tbf this room is a total lottery
@Arslan.H you should check out people's github profiles, most people here probably have a link in their profile
the majority of people have the same username on github as they do here
 
@DaveRandom i know saw it :D But went here one time and most of them were talking about some games
@DaveRandom I even explored yours :O
 
because games are good
and the steam sale is on 22nd of June
 
May 21 at 13:02, by PeeHaa
And ignore @DaveRandom
advice for life
 
10:11 PM
@DaveRandom okay :D hahaha
sorry
 
@Arslan.H more seriously, I only put stuff on github that I don't mind people looking at (otherwise it would be sort of weird to put it there)
Some of the stuff on my github is horrifying
A lot of the time you should not do what I do
 
better than mine hahah
 
@DaveRandom you mean like "The Shitwork" :D
 
@Arslan.H what's wrong about talking about games?
 
Anonymous
@Arslan.H What is your Github link?
 
10:14 PM
@tereško that would be one of those things, yes
I never write web stuff any more, thankfully
I never realised how much I hate it until I stopped doing it
 
I'm the luckiest guy here i think :D I'm a bad programmer ,started programming seriously 3-4 months ago.I made some apps ,was working on them when i was 15 whan sold them for 200k USD.
I was coding all the time but i was jumping from making some game engines to ios than android
 
.. and now the entire room hates you
 
everything in in small chunks
whom?
me?
 
or now put you in the "people that talk" group
 
@FélixGagnon-Grenier i should create one probably :D
 
10:18 PM
what I mean is, either you are megalomaniac, or you indeed coded a 200k worth app at 15
from past experiences, I am somewhat drawn to the former. no offense meant ;)
 
Anonymous
@DaveRandom Sometimes you just have to push whatever you feel is ok. It doesn't have to be perfect or even very good, that's what Github is for :)
 
I'm 19 now..Yea i made the app when i was 15 ,and sold it few months ago.
 
@samayo I assume that was not supposed to be directed at me?
 
It's a long story....
 
Because don't worry, I will literally push any old shit up to github with no warning
 
10:20 PM
hehe
 
Just browse the commit log of Jeeves, see how many commits I have made fixing dumb mistakes because I push first and ask questions later
 
Anonymous
@DaveRandom I just mean the whole reason of sharing it in the first place is so people can check and improve your code. You don't have to wait until you create the perfect thing before you share it
 
> Temporary repo is temporary
> Updated on May 8, 2014
No idea what I was even doing there
lol dat PR
 
Anonymous
> fix everything
 
Anonymous
:)
 
Anonymous
10:25 PM
I wish it was that simple
 
@DaveRandom trying to see if future you will think like past you
 
Anonymous
When you thought you were developing on dev but you were on prod reddit.com/r/funny/comments/6dbmw8/muscle_memory_is_a_bitch
2
 
@tereško is my brother!!!!
 
@FélixGagnon-Grenier do you have something against it?
 
10:35 PM
@Arslan.H hmmm... what?
 
@FélixGagnon-Grenier I'm kidding
hey
 
but still my brother!!!
 
Anonymous
@Arslan.H You should use some of that money to get your head tested.
 
@Arslan.H It seems you misunderstand some basic function of chat. I was not answering to you speaking about teresko
if you hover over the message, another one will be highlighted
 
10:36 PM
@samayo How can i send pics on this chat hahaha Yea I have some issues to be honest.Had a crash on my bike last year, was in a coma for 10 days.Broke most of my bones.And fractured my skull
wait I'l upload the pic
to gdrive
 
as you can see, the "lol" was targeted at @samayo's message. I don't care about you being brother or not...
@DaveRandom yo @Jeeves seems down
!!fixit
 
!!uptime
 
than after 3 months this pic was taken
 
oh it's totally gone
moment
 
10:39 PM
@Arslan.H holy shit.
 
After the crash i lost the ability of fear.It's strange to be honest,, you dont give a fuck abut athinging than :D
I can't move my left arm that well
but it works hahahah
yea
 
... congrats on not being dead.
 
Thank you :D
got a new bike
:D
But dont have time to ride it
It's a good feeling to be honest.All problems go away when i'm on it
Nothing matters than
 
oh, I start to get the "I don't like video games" picture now ;)
 
hahahahha when you are going 300km/h you lose the sense for reality.It's similar like when you are in a video game....
Just doesn't feel real
 
10:43 PM
you will find a suitable amount of bike people in here
Feb 4 '16 at 17:17, by Félix Gagnon-Grenier
there's two kind of people in room 11, those that do motorcycle and those that play video games. I'd hazard the former have kids
 
hhahahahha
 
I do neither of those things
 
yeah, I forgot to cover the base of off-by-one errors
 
Anonymous
same
 
@DaveRandom is that your kid on the profile pic?
 
10:44 PM
Can anyone here help with a CSS problem? I know it's a PHP group but I figured I'd try
 
@Arslan.H yes]
!!uptime
 
╔════════════════════════════════════════════════╗
║ [3 minutes and 45 seconds] without an accident ║
║          since [2017-05-25 22:41:28]           ║
╚════════════════════════════════════════════════╝
 
cba debugging that now
working, anyway
 
can I try stuff and see if it breaks?
 
10:46 PM
@DaveRandom makes sense now
 
When you thought you were developing on dev but you were on prod https://www.reddit.com/r/funny/comments/6dbmw8/muscle_memory_is_a_bitch/
 
guys good night !
 
Anonymous
!!wotd
 
chinwag: an idle chat.
 
10:46 PM
nn Arslan
 
took bloody ages to reconnect, dunno what's going on
 
we should change the chat description to chinwag
 
playground reconnected immediately
well, that's horrifying
 
Anonymous
yup
 
10:47 PM
<3
 
@Arslan.H if I dream of anything related to motorcycle accidents, clowns and broken things I will totally blame you
on that note, gtg
glhfm8kthxbai
 
@FélixGagnon-Grenier I'l take that in count!
78hbsaidfbs
 
Anonymous
You can read three comments in youtube without someone saying "Who is watching in ..."
 
er, this isn't a login window
 
2 messages moved to bin
gonna have to get rid of those
sorry
nn @all
 
Anonymous
10:58 PM
night
 
11:11 PM
!!rfcs
 
11:28 PM
@Ocramius I will send you something to read this weekend. hint hint
 
@Danack kewl
 
11:51 PM
Wordpress Woocommerce Question:

Trying to make a second shop page, but woocommerce hooks/actions don't seem to be registering?

I copied and pasted everything from archive-product.php file into my template.php file, but the woocommerce loop doesn't work.

After spitting out one product, the loop doesn't continue
 

« first day (2413 days earlier)      last day (2538 days later) »