« first day (954 days earlier)      last day (4219 days later) » 

19:00
@Hanut laters
@PeeHaa埽 ciao! hey btw watch eddie izzard...
funny
@PeeHaa埽 Well that's a bit rude.
Just link him to upload.stackoverflow.com
:P
All that jquery in there! The horror!
@PeeHaa埽 Certainly a copy of scaled-conjugate-gradient-back-propagation-1.7.js is in there somewhere.
19:08
:D
Or at least 1.6; though that has the tendency to turn all <div>s blue.
If he comes back with "link dsnt wrk!!!!!11!" I'm going to shit my pants.
That would make my day
He can comment on his own posts, right?
Though, it seems those with 1 rep can't ever find the comment button anyways ...
Or the accept button.
I think that'll be my canonical answer for "give me the codes now pls"
That is, until it get's ban-hammered from meta.
19:20
HTML / interface question: to lazy load or not to lazy load?
@PeeHaa埽 Subjective ;)
Really though; what's the use case?
@PeeHaa埽 Lazy load if it would noticeably slow down the first load. So navigation menus - no. Content from another server, yes.
lazy load with no JS !
19:23
Basically think about twitter @Bracketworks. Actually nothing like that but the thing I am working on has a list of items vertically placed on the frontpage. I personally hate the jumping scrollbars like twitter does its lazy load
@kaᵠ <iframe>?
NO way
or others btw
@PeeHaa埽 So, you want a sort of infinite-scrolling?
@Bracketworks That's the question. I'm thinking of using real pagination instead
19:25
Well, if you wanna support non-JS user agents, you'll need to support pagination anyway.
However I can't (off the top of my head) think of a way to alleviate the scroll-jump you described.
grab the scrollbar and drag it all the way down
Well yea; you could do that, but if you're working with variable sized content, then you might blow past freshly loaded content.
If everything is fixed size, then eff it, that'll work.
Twitter has set a sort of precedent with that functionality, so duplicating it won't hurt from what I can see.
Basically that ^ is what I'm working on (don't mind the stolen design for now ;-))
lol, I was gonna say
Well, if they're fixed size, you could load n result objects based on the viewport-height and drop the scroll to the bottom displaying the fresh results.
@Bracketworks yep fixed size
19:32
Yea; frankly, I don't see the scrollbar remaining stationary, requiring further scrolling to view the new content as an issue. If it surfaces as one, since you're likely loading the next n records anyway, it'd be moderately trivial to implement a viewport-size based query
Yeah might just implement it
Besides, you'd need a "Load More Things" button, as you couldn't use the scroll-position of the viewport to determine that.
@PeeHaa埽 actually always have content loaded a few more steps than the current scrollbar position, that way you never reach the end, no scrollbar jumping
19:40
@kaᵠ I can scroll faster than loading content
I think I need websockets! :D
blank, js generated nothing if it doesn't show up...
you'll always scroll faster than fetching something (for now)
don't mind the method..
@kaᵠ Also that would still make the scrollbar jump, because when the new content is added at the end the scrollbar moves up
No matter when I load the content
@Bracketworks That is kinda nice stuff they have
dynamically add placeholders and fill them up in the background
@PeeHaa埽 Yeop. Then, buy some uranium and become a household exterminator.
@PeeHaa埽 Yea, have been big into BOC since I can remember. Long time coming on this album, and the marketing fiasco was pretty nifty.
20:00
Another good tune:
20:23
packstorm security website is close... arght
20:55
why google when you can SO
also sir alert:
ok sir i will definetaly change ths ? can u provide help regardng my question — user2421659 33 secs ago
3
guys, is mysql's ENCODE function deprecated? can't find if it is while searching in google. maybe my keywords are incorrect.
its because of this: i dont know why this keeps returning null ENCODE('123456','test')
21:24
@reikyoushin Probably because it's returning a blog which you're then not converting correctly.
select CAST(ENCODE('123456','test') AS CHAR(10000) CHARACTER SET utf8)
gives a string, which I apparently can't copy and paste though.
Well, my wine rack now only has 3 openings
I think I need one of your bottles.
usort - If two members compare as equal, their relative order in the sorted array is undefined. :P
@Danack ive put varchar(255) as the container.. btw, why is it not in phpmyadmin? is it deprecated?
I don't use PHPMyAdmin - but I guess because it returns a blob data it's difficult to display.
21:39
21 bottles... 4 of which are beer :-D (but special beer)
@ircmaxell As special as fullers.co.uk/rte.asp?id=47 ?
A drink and a meal in one.
Yup
and is sooooo good
@ircmaxell I'm very interested in your Protocol Library. I actually have a use case that your code essentially solves.
21:50
He's good like that...
@rei
bah
@reikyoushin if you use PMA, there's a flag that you can use to see BLOG's in the config
$cfg['ShowBlob'] = TRUE;
Hi guys. This is my first time using chat. Is this an area where I can ask a question for help?
Sure, though what's wrong with SO?
points to upper right corner of chat screen under the PHP title
I'm looking to set up a Highstock chart.
My data is in php arrays. Anyone know how to input the data from a PHP graph into the highstock api?
@Willow The highstock docs?
21:56
@cspray. checked them. i was able to create a highcharts graph, but there is less documentation on setting up a highstock graph
@Willow I think you'd have better luck asking on SO or a highstock specific forum.
I personally am not familiar with the service
@cspray, thanks for the advice. What is SO?
uh really?
Stack Overflow
@Willow The site for the chat you're using :P
^^ haha, got it. Didn't realize it went by SO. thanks. =)
21:58
Looks like it needs a json array of data... just json_encode($array)
javascript array, rather
Night, all
@Farkie
And it seems to be json? Though I've never used json before
Night? Are you in Europe?
Yes, UK
Oh nice. =) It's 3pm here
11pm, but I'm up at 5:30am
Well good luck tomorrow. I'll try to post my question on SO then.
22:02
Going to watch TV in bed
good luck? What's gunna happen?!
I don't know, work?
heh, well yes, that i
s
It's a habit of mine. Haha, I wish everyone good luck even if I don't know what's going on in their life. It never hurts to have good luck right?
@Willow Until you start to think that the luck is genuine skill.
Night!
22:05
@cspray, haha. some do seem to be luckier than others don't they.
@Farkie, night!
Here's a random thought to my php friends. Why are there more men coders than women? I'm a woman and love code, but just about everyone in my classes are guys.
@Willow That's a really good question. All of the developers I've ever worked with have been men and when I was in school for a brief time I only had 1 female programmer in my classes
Global concerns about current and future roles of women in computing occupations gained more importance with the emerging information age. These concerns motivated public policy debates addressing gender equality as computer applications exerted increasing influence in society. This dialog helped to expand information technology innovations and to reduce the unintended consequences of perceived sexism. The gender gap Statistics in education In the United States, the number of women represented in undergraduate computer science education and the white-collar information technology work...
@cspray, I wonder if it is going to change over time to be more balanced
May have more information for you
@Willow I believe that ultimately over a long enough period of time yes. Computer software is becoming ever more powerful and society is becoming ever more dependent on it
Which means that we'll need competent people writing that software and eventually the industry will get to a point where these imbalances don't exist
Haha, nice edit
@Willow :P
But ultimately the web dev industry is still really in its infancy
And software as a whole is really still in its infancy
At the most getting into the "tween" years
If you look at other more traditional job roles, like a carpenter or a plumber the software industry hasn't been around but for a very brief amount of time
22:11
Right, not many web programs exist out there. Computer science still dominates the school systems.
I think a lot of people still think of web software as just a simple dynamic web site
But with the Internet being such a powerful force in our society web software is becoming much more than just a simple shopping cart website
Right. And with so many API
's available, web applications are very powerful
Well, we're still learning how to be an industry. Either we'll figure these problems out or we'll fail miserably. I have faith in humanity that we can figure them out though :P
^^ Haha, unless electronics as a whole just stop working, I think our industry is headed in some pretty great directions
@Willow If electronics as a whole stop working our society would break down into utter chaos and all bets are off
I mean, imagine tomorrow what it would be like if all the computers everywhere just stopped working
22:15
Lol. This thought has crossed my mind before. Just one day of blackouts creates an inner chaos of that area.
dont have to immagine, somebody already has, there is a tv show about this very subject..
@bizzehdee, oh really? which one?
@bizzehdee What channel? What's the name of the program?
revolution
Oh that looks interesting. I'll for sure check that out later.
Well, nice talking to you guys. Need to get back to this Highstock project and see if I can figure this out.
22:21
need to think of something to do for my last 4 days as a professional php developer
switching not only to C#, but (back) to desktop software
(^ . --)〜  ☆☆
22:51
$email = $_REQUEST["email"];
$result = $db->prepare('SELECT * FROM members WHERE email=?');
$result->execute(array($email));

if ($result->rowCount()>0) {
    echo false;exit;
} else {
    echo true;exit;
}
1 message moved from JavaScript
E_MISSING_CONTEXT
2
@cspray awesome
@DemCodeLines wwe should continue it here ;)
22:56
?
instead of javascipt room ;)
can you post a link to your script src here? like on pastebin or something?\
i meant your php one
<?php
$email = $_REQUEST["email"];
$result = $db->prepare('SELECT * FROM user-list WHERE email=?');
$result->execute(array($email));

if ($result->rowCount()>0) {
    echo false;exit;
} else {
    echo true;exit;
}
?>
@Happyninja ^
replace $email = $_REQUEST[email'']; with $email = '[email protected]'; and execute it
Anonymous
23:03
Why
if ($result->rowCount()>0) {
    echo false;exit;
}
?
Anonymous
If row count is not zero, it should be true, because it means, one or more rows are returned.
It still works and moves to the next page when it shouldn't because I put an email for $email that already exists in the database.
Anonymous
but, it depends on ur logic
Anonymous
It moves to the next page?
@DemCodeLines did you change the $email and it didn't pop a tasty error?
23:05
Doesn't matter when I set true or false, it still submits the data either ways
Yes, $email="[email protected]"; and [email protected] is already submitted in the database, so it shouldn't accept it and show a red border around the textbox. Instead, it accepts it and moves forward
@DemCodeLines and does the php script tell you it's already in the database or not?
Anonymous
This is trival
I am so confused
Anonymous
It does not make any sense
Anonymous
there is nothing in your script that shows where/how to move!!
Anonymous
23:07
And you are telling us, it moves.. .to WHERE?
@phpNoOb it merely depend on his logic
@phpNoOb because there is this stuff in the main index file:
<script type="text/javascript">
    jQuery(function(){
        jQuery("#email").validate({
        expression: "if (VAL.match(/^[^\\W][a-zA-Z0-9\\_\\-\\.]+([a-zA-Z0-9\\_\\-\\.]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$/)) return true; else return false;",
        remote: "inc/check-email.php"
        });
    });
</script>

<input id="email" name="email" type="text">
i think he's doing a ajax call to it
remote: "inc/check-email.php" should call this php file
personally i don't care too much about email validation. is people problem if they don't input something valid in the first place. Cause your validation won't prevent something like [email protected] cause it's valid
23:09
Yes, but I need to prevent email duplicates
There can't be two users with same email in the database.
the code i present to you in the first place is not optimal but it works
which one?
Anonymous
Since there is jQuery involved, I can't say much. But, the PHP script by itself, is unable to move anywhere
It shouldn't move anywhere. It should only return true (no error) or false (error).
Anonymous
try the script by itself. in a plain php file
Anonymous
23:13
that should help you debug it
Anonymous
better than us
@DemCodeLines If only there was a built in way in the protocol to know if a request to the server ended successfully without having to pass a string like "true" back, I think maybe something like a status code indicating the status of the server response, like "OK" or "Internal Server Error" or "Authorization Failed" or "I'm a Teapot", that'd be awesome.
Well, that isn't there unfortunately
aah what the heck. Now my whole project is halted because of this stupid thing
@BenjaminGruenbaum isn't something similar with a status callback? (except for the teapot ;)
:9656227
$isUniqueFlag = false;
	$sql = 'bla bla bla';
	$result = $pdo->query($sql);
	while($row = $result->fetch()){
		if($row['email'] != $email){
			$isUniqueFlag = true;
		}
	}
(everybody i know i suck at this)
@Happyninja @DemCodeLines No, I mean like, if you could send a request to the server, and it could tell you back how it responded (a status maybe?), like you'd ask the server something, like "I want to GET this", or "I'm POSTing that to you", or "DELETE this record", and it'd reply right back to you with "OK" or "Created" or "Service Unavailable", or in the case of email already existing "Conflict". That'd be an awesome protocol, if only we were using something that does this :/
That would be way better than having to send back strings like "true" or "false" :)
23:18
@BenjaminGruenbaum it would be awesome
I wouldn't be here if that was there.
maybe, maybe not. library like jquery make reading code fun, still it's complicate for the 99%
Do you think jQuery is a good solution to this problem? Like, using verbs for requests and status codes in responses?
I mean, having verbs for requests and status codes in responses, would allow really simple representational state transfer :/
@BenjaminGruenbaum i do something similar using a callback with the status inside it and a switch to deal with circumstance
@Happyninja did you ever go to a page that did not exist on a website by accident? Like, any website?
23:23
@BenjaminGruenbaum like a 404?
@Happyninja Yeah, like a 404, do you know why a 404 is called a 404?
(no googling!)
"Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0"
lol
@BenjaminGruenbaum not exactly no (no googling)
resource not find i think
@Happyninja is an HTTP status code, as in the protocol that pretty much drives the internet
HTTP is that protocol, it contains verbs like GET and POST, and has response codes like 200 (OK) 404 (Not Found) and 409 (Conflict).
That's how the internet works, you send requests to servers using an HTTP verb (like GET me "/index.html") and the server responds with "OK (200), here it is"
@BenjaminGruenbaum protocol speak, so to us to capture it, isn't it?
23:26
So, I guess no solution for my problem?
Those are the actual verbs, GET, POST, DELETE, PUT, all real names
@DemCodeLines what is your php version?
@Happyninja The correct thing, instead of returning a file with the string "true" or "false" is to return an HTTP 200 response if the email is valid and an HTTP 409 response if it isn't. Any other solution is stupid
@BenjaminGruenbaum how? i think i understand what you mean
23:28
@Happyninja In PHP? http_response_code probably.
@BenjaminGruenbaum this is really interesting
@BenjaminGruenbaum is it how you do it?
@Happyninja No, I don't use PHP, but if I were using PHP, that's how I'd do it, yes
Also, learn your HTTP, it's the basic protocol all your serverside works on
@BenjaminGruenbaum okay! i never think of it that way, i mean using http code instead of true or false
That's what these codes are for, if you return "200 OK" with a body containing only "false" you're not making any sense, the request failed
@DemCodeLines the problem you have, i had it too and i solve it using a part of the not so good code i provide you
23:33
You're sending less data, but passing a lot more information, you get why the request failed (There was a conflict) and that it failed without a single character in the response body
@Happyninja the code you gave confused me even more.
@DemCodeLines i'm sorry about that, it was not my intention. you do have procedure in place to avoid duplicate username right?
not really.
No.
@DemCodeLines maybe go back and make thing more simple
or even take a break, clearing your head and think about something else, it help me want my head is full
Ill try that, thank you.
23:39
and best of luck
Thank You

« first day (954 days earlier)      last day (4219 days later) »