« first day (1014 days earlier)      last day (3965 days later) » 
00:00 - 20:0020:00 - 23:00

8:00 PM
@Lucio I'm still not sure what you are trying to do and what you expected to happen.. real code might help.
 
ok
 
yes..
 
PHP: bad. jQuery: good.
4
 
@NathanOsman nono
 
8:02 PM
@Seth There you go
@Jeremy see the stars
Is something wrong in that code??
 
@Lucio That doesn't need to be in a listener... in fact, it's (the anon func) causing your issue.
 
@NathanOsman Someone, I won't say who, is going to tell you "shush" ;P
 
hey everyone!
 
I know who, don't worry.
 
I'm calling the processInput() function from HTML like this:
<input onkeyup="processInput(this); />"
But it is never called.
 
8:04 PM
@Lucio Yeah, but without access. You're calling that function out of it's scope. In other words, you declared the function within a local scope, but are calling it in the global scope
 
@Jeremy right
 
In simpler terms, get rid of the $(document).ready or declare the processInput variable before it
 
@Jeremy That is how I have it now
and that is what I don't want to do
 
@Lucio Like the former or the latter?
 
what?
 
8:06 PM
@Lucio You said "that is how I have it now"
@Lucio What is how you have it now?
 
yep
Without the $(document).ready ...
 
@Lucio ...so issue is it's not working even when defining the function in the global scope?
 
So all you have in your file is
function processInput(name) {
     alert(name.value);
}
?
 
yep
that work, but when I use $(document).ready it doesn't
 
@Lucio Looks like you need to read up on how scopes and chaining work in Javascript
 
8:10 PM
I want unify both files, how can I do so?
 
I explained that when using it in $(document).ready, you're defining the function inside a local scope, so it doesn't have access
If you're really insisting on defining the function inside $(document).ready, this should do it:
$(document).ready(function(){
    processInput = function(name) {
         alert(name.value);
    }
});
 
@Jeremy trying this..
It didn't work.
The function is not called
checking syntax..
@Jeremy That worked.
 
@Lucio I wouldn't suggest it, though.
 
What should I do now? Keep like that or remove the $(document).ready
 
It just makes code messy when you should be defining it outside of the anonymous function anyways.
Remove the document.ready and either use the var keyword or define the function.
 
8:14 PM
ok
So $(document).ready(); shouldn't be used?
@NathanOsman Do you think the same?
 
For what?
 
@Lucio If you're not interacting with the DOM, then you're just cluttering your code
 
to declares a few Javascript functions
@Jeremy I do so
 
@Lucio Where do you interact with the DOM?
 
@Jeremy e.g.: $('input:checkbox').prop('checked',false);
 
8:16 PM
@Lucio I suggest defining functions outside of $(document).ready unless you want them to only be in the local scope.
 
ok
So I would load the JavaScript functions at the end of the HTML file.
 
I guess if you wanted to optimize your Javascript, then you may, but you're using inline listeners anyways... so it doesn't matter.
 
@NathanOsman I think that you like that
 
@Lucio Some people advocate for before </body>
 
You should always avoid polluting the global namespace if possible.
This is typically done by declaring functions within an anonymous function.
 
8:17 PM
@NathanOsman He's using inline Javascript to call a function, so he really doesn't have a choice.
 
@Jeremy Ah, okay.
 
discussion finished :)
 
But is it really necessary to use inline JavaScript?
Personally, I would avoid that if at all possible.
 
Though I'd still advise against it. It's always good to separate functions. Design is meant for HTML/CSS, so why mix Javascript in with it?
@NathanOsman samesies
 
let my explain it..
 
8:20 PM
I gotta go. Bye!
Good luck with your scripting.
 
It's better to bind event handlers from JavaScript instead of doing it inline - then you can bind anonymous functions to the events.
 
I cannot declare EventHandlers for objects that doesn't exist when the JavaScript code is read.
 
@Lucio That's why you use $(document).ready, though.
 
When precisely is the object created?
 
inputs
<input type="checkbox" />
etc
 
8:21 PM
Yes, but when are they created? After the DOM is loaded? After a button is clicked?
 
Because I create this elements using PHP scripts at run time with the .post() jQuery function
 
So in response to an AJAX request?
 
right
 
Are you using createElement() to create them?
 
no
 
8:22 PM
What are you using then?
 
@Lucio Oh boy. Use the success method, then.
 
just printing the HTML code
 
@NathanOsman Probably just copying the text from PHP... nothing json-ish
 
yes
 
Ah... I see now.
As @Jeremy mentioned, returning JSON would be a better option.
Then use the JSON data to construct the elements.
 
8:23 PM
I could write the Event Handler in the print, though. But I don't like that
 
api.jquery.com/jQuery.post <-- Look at "success"
 
@Jeremy I know..
 
Alright, I'm out (for realz). Bye
 
Can you give a short example of the data returned by the PHP script?
 
bye and thanks for your opinion..
yep
 
8:24 PM
Feel free to ping me if you have questions (@Lucio)
 
ok, thanks :)
@NathanOsman I'll show you, but I warn you, I'm not using CMS by now..
So that table is printed into a DIV
 
Well well well....
 
that table will have dynamic data
@coding_corgi Thank you guys :)
 
@Lucio blah blah blah [stupid-smiley-face] :P
 
haha
How is GNUplot?
 
8:29 PM
@Lucio boring.... Ha ha... Just needed to make a graph, don't label me :D
 
@Lucio: Here's what the JSON for that data might look like: paste.ubuntu.com/5859558
Then you create the table from that data.
 
@NathanOsman from JavaScrip?
why would I use that?
 
@Lucio because we told you so
:D
 
lol
 
@Lucio â–¼EVERYBODY DOWNVOTE NOW!
haha
ah....
well
me is bored
and me does not want to do math hw
so
i ended up here :P
 
8:34 PM
@coding_corgi Yeah, you use GNUplot, how can not be bored..
 
@Lucio I just wanted to make a graph! Don't label me!
 
hahahha
I'm just kidding, I'm bored too.
 
@Lucio GRRRRRRRRRRRRRrr.... not funny :O
@Lucio yeah...
made this new program
here's how you run it:
sudo selfdestruct now -h
 
@coding_corgi Your dog is still alive? Or that is you?
 
very useful...
@Lucio i don't have a corgi sadly...
 
8:36 PM
I can imagine that
 
@Lucio yes....
 
I'm out.
good bye
 
@Lucio sudo shutdown now -h
also add this to /etc/rc.local:
sudo shutdown now -h
@NathanOsman Hiya!
 
1
Q: Can I recover from a system disk error on Ubuntu Linux?

SammyI got a strange looking warning message in Windows Vista about a potential hard disk failure. I say strange because I have never in my life seen that type of warning in Windows. It suggested that I backup everything on this disk as soon as possible. The hard disk in question is the one I use for...

 
@NathanOsman I think that you were trying to tell me this procedure, isn't?
 
8:59 PM
5
Q: Why can I not set custom resolution for Ubuntu 12.04 running in a virtual machine?

user130003I have installed Ubuntu 12.04 on the latest VirtualBox release and I cannot change the resolution. Here are the commands that i run: -- in Windows VBoxManage setextradata "Ubuntu" "CustomVideoMode1" "1920x1080x32" -- in Ubuntu ~$ gtf 1920 1080 32 # 1920x1080 @ 32.00 Hz (GTF) hsync: 35.2...

VTR
 
@guntbert but there is no upvotable answer :/
 
naa - this answer is weird. Guest additions should always match the version of virtual box.
It's true however that you can not run 12.04 in old release of virtual box... but this is not really an answer to that question.
 
9:20 PM
0
Q: Booting and installing from USB

AfrosimonI've been trying to install ubuntu (server edition, 13.04 i386) through a USB pen drive, and so far I've miserably failed. This is on a lenovo x230, with USB-* options all up there in the boot order, as well as UEFI / secureboot support disabled (as it seems it messes with most linux distro). So ...

 
what is more popular byobu or screen?
 
9:36 PM
byobu
Screen has been deprecated iirc
@JohnMerlino If you run screen is says "exit screen and run byobu"
 
@Seth not on 12.04
 
oh? Since 12.10 then
 
@Seth So you are saying in the future byobu will be used and screen will not be used for even simple tasks such as multiplexing several virtual consoles and to ignore the HUP (hangup) signal?
 
@JohnMerlino yes, exactly
Wait a second.
@JohnMerlino I take that back. It does work, just not how I thought it would.
I guess I've never used screen before ^^
I still think byobu is preferred.
 
I see a lot of tutorials on GNU screen but not much on byobu, that's why I ask
 
9:46 PM
screen is older
 
in fact go on youtube and type byobu and all that comes up is a screen tutorial
 
Hmm.
 
9:58 PM
yeah it's a little confusing.
Im just tired of learning a lot of programs that do the same thing
 
yeah really.
 
10:20 PM
0
Q: how do i change a password on askubuntu

darKoramI usually just get auto-logged-in when i click a link leading to AskUbuntu. I just tried to follow this link: http://ubuntuforums.org/showthread.php?t=1117283 Instead, i was presented with a login. It's been a long time and i can't remember it. I don't see any of the usual "forgot my password" ...

 
10:43 PM
 
10:55 PM
I'm wondering if this is even possible to do. I am not looking for the path of the ruby program, but rather the path at which a ruby instance was executed: askubuntu.com/questions/318293/…
 
00:00 - 20:0020:00 - 23:00

« first day (1014 days earlier)      last day (3965 days later) »