« first day (1010 days earlier)      last day (3924 days later) » 

2:01 AM
@AshKetchum Do you have that directive in your vhost?
Have a look at C:/xampp/apache/conf/httpd.conf
Line 198, I've noted that I've changed mine:
# First, we configure the "default" to be a very restrictive set of
# features.
# DB - Put back to "normal"
<Directory />
    AllowOverride All
    Require all granted
</Directory>
 
@DannyBeckett I changed it because else "/style/style.css" would come out as "C:/xampp/htdocs/style/style.css" which throw a 404 Not found error.
To fix it, I would have to change every URL to "./" instead of just "/" in the beginning. But then that would create a serious problem as I have to change it back again when I push it to live server.
 
Do you have AllowOverride All in your default Directory directive of your httpd.conf?
 
Yes.
 
Did you try replacing your .htaccess with a load of crap?
To see if it 500's
 
I completely removed all text in it, but it made no difference.
 
2:08 AM
Try putting some nonsense line in
Just a bunch of characters
If it doesn't 500, the .htaccess never got loaded
 
0
Q: Would like help on improving my jQuery Validation code

Shivam BhallaWould like some assistance in improving my jQuery validation code. I have some repeated code, but I am not sure how to write it in a way so that I don't have to keep repeating the same code over and over again for different variable names etc... (such as the if statement part) My goal is to make ...

 
user1125394
and restart apache
 
Shouldn't need to restart Apache
If it's only a .htaccess change (not a .conf change)
 
user1125394
oh :)
 
So apparently my .htaccess file was named ".htacces"
last "S" missing.
 
2:09 AM
ahahahahaha
:D
 
aw man i got the worst type of javascript error going
 
@AshKetchum So it works now?
 
Yup, now I get the Error 500
 
@Dave What's up man?
 
random nonsense in there.
 
2:10 AM
@AshKetchum Try putting your original code back
 
But I don't know what made it work, the correction to file name (most likely) or just random nonsense lol
 
i make requests to my server on load to check for messages. 90% of the time works fine. then 10% of the time its a syntax error but its perfectly acceptable json_encoded data
 
Yes, DEFINITELY the name change
That extra "s" matters ;)
@Dave Do you have an example of the JSON where it fails?
 
i used breakpoints to check the value of the response, perfectly fine
 
Might be unescaped chars
 
2:12 AM
@kadumel Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
i can try
 
Bet you'll never make that mistake twice :p
 
Hopefully :D
 
The key is being able to logically debug
 
2:14 AM
[{"id":"1","to":"1","from":"2","fromname":"Username1","message":"Test","reported‌​on":"0000-00-00 00:00:00","hasread":"0"}]
@DannyBeckett
 
Hence the suggestion of writing crap to your file to test if it's loaded
 
that causes "Uncaught SyntaxError: Unexpected token < " lol
 
@Dave Hmm
 
Except now I am having all sorts of PHP problems (they don't have to do anything with url rewrite or htaccess, I know that for sure).
 
Any time I've hit an unexpected token error, there has genuinely been a bad token there
 
2:15 AM
what i don't get is its not all the time, only 10% of the time roughly
 
Notice: A session had already been started - ignoring session_start()
 
go to php room
 
user1125394
yep
 
@DannyBeckett the browser says this line: call_back(JSON.parse(xmlhttp.responseText),func);
syntax is perfectly fine there
 
2:16 AM
Strange
 
Tomorrow I have my two final interviews with two separate companies to officially become a paid front end developer. I love JavaScript libraries and don't really use native JavaScript besides in those libraries. Let me know how that makes you feel.
 
yeh its very weird
it makes me want to kill a kitten @kadumel
 
Not to annoy you Dave, but, is the responseText definitely what you posted?
 
ill put a console line before that ...(pre json_parse)
 
Yeah exactly what I was going to say to do, if you hadn't already
 
user1125394
2:18 AM
no trolling allowed
 
@cx are you new here :P
 
@kadumel I'm quite the opposite of you. Only use vanilla JS. I hate frameworks :p
 
Notice: Undefined index:
 
Not trolling. I am nervous and trying to sharpen my skills and the more I learn about JavaScript the happier I am for frameworks.
 
@AshKetchum That's just XAMPP being picky
You can safely disable Notices
It means your PHP isn't "perfect"
As the other guys said, try the PHP room if you have other problems
 
2:19 AM
ticking me off. I want it to be perfect, I guess I gotta halt the development a little more as I fix these things.
Sorry, didn't see that. My bad.
 
@AshKetchum I'll give you the answer for this one though, since it's a quickie
Open C:/xampp/php/php.ini
Ctrl+F for "reporting" til you find the line with no comment on
 
ok i found the cause
 
@AshKetchum You could use E_ALL & ~E_NOTICE for example. Save and restart Apache
 
well only "sorta" found the cause atm
 
@Dave Bad token? :p
 
2:23 AM
no its returning html files
but i dont know where i called a html file with it
 
Lol, so yes :p
< as in <html>
 
yeh
but no where in my scripts do i use call_data function for index.html its v.odd
 
You're only using JSON.parse, right?
No eval()?
 
correct
 
2:25 AM
well no i dont use json.parse for html files but thats a diffrent function
they aren't json_encoded you see
 
@DannyBeckett Thanks for that, but I don't want to shut off the correction engine just so I could get away with my code. I already know my code sucks :D
No self-esteem in programming haha
 
Good man ;)
 
m59
@BenjaminGruenbaum probably wrong, but I did it.
 
@Dave I don't really know to be honest... debug further
 
2:26 AM
Wait, I can get server stats because I am on localhost, right?
 
im trying :P
 
lol.. the answer will be logical
Debug debug debug ;)
@AshKetchum Yes. I think Webalizer is installed by default
Yes it is
From memory, it needs regenerating from your Apache logs on a schedule/manually
Or just install Awstats/similar
 
Access forbidden! lol
 
i wonder if its because its still processing a request whilst it then calls another
 
2:33 AM
@DannyBeckett so this is where I think I can make it easy to explain the problem to you. First, is there a way to use this as my primary server and would there be anything wrong in doing it? Second, say if I do use this as my primary server with domain name linked to it and laptop crashes, meaning the server crashes too, but I have xampp installed on my desktop computer too, would it be possible for that computer to take the load of the site and keep it up and running while the laptop gets fixed
?
 
@Dave Are you able to create a succint repro on a fiddle?
 
no i dont get how to do fake request simulation on fiddle
 
really hard to tell what's up without seeing a chunk of code
 
i can give u a pastie
 
@AshKetchum You can use your laptop to host your website. The only thing is if you're using slow internet, or if you have a powercut etc, your site goes down. If you can have 2 IP's, one to your desktop, and one to your laptop, you could setup your DNS to have 2 nameservers. First, someone requesting your site would be routed to your laptop. If no reply, then your desktop. Personally I'd just fork out the few $ a month to a proper host
@Dave Yeah go for it
 
2:37 AM
ok
 
@Sekm Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@DannyBeckett May I ask why you think I should just go to a proper host?
 
Cos it's a lot cheaper and they take care of all of this hassle for you
Also, unless you have a brilliant upload speed, your users will suffer from poor loading speeds
 
Right now, its hard for me to pay for this.
 
Then go for it!
Electricity probably costs more than hosting though :p
By all means go for it - it was interesting for me to do when I was first learning about the web.
 
2:39 AM
Other than that, is there anything major or significant downside to hosting it myself instead of using a proper host?
like security and stuff.
 
Of course, security. You have to manage the server yourself. Keep it up to date in way of PHP, Apache etc
Your main issues are: server management (security), speed based on your home internet, and powercuts. Configuration can be a pain sometimes too.
Speed will be your main issue, I think
All in all, most people can spare the $5/m, and it's well worth it
 
@DannyBeckett hang on i think i have worked out the issue
but im not sure how to solve it atm
 
ill make a SO question some wizard will know
 
what is it?
lol ok ;)
post the link here too
 
2:44 AM
whilst its still processing the response - its making the next request and thus its response for the second one is the first one
because it happens so fast
 
ahh
I actually had a very similar problem the other day with asynchronous Loader requests in AIR
 
@DannyBeckett The reason I ask is because I don't know the future of this website. I'd rather just try out and see how it goes. If it actually gets attention and users (unlikely but "anything is possible"), then I'll switch to a paid hosting.
 
@AshKetchum The good thing with a lot of cPanel/WHM hosts though, is that you can host multiple domains for no extra cost. Even access your server from 1.2.3.4/~username
So you always have a server to fiddle with when you want to try something
 
2:55 AM
@Dave Can't you just add another parameter?
 
i dont follow
 
Do you have an example of a call you make to the function, as well?
E.g. send it a variable with an ID of the request or something.... but that's probably overcomplicating it
 
typically got a jQuery reply
could of put money on that
 
Yeah I saw that
But it led me to this
6
Q: Is there a jQuery equivalent to prototype's defer?

shmuel613Is there a jQuery equivalent to prototype's defer? I'm looking for something that will delay the execution of a script until all of the scripts in the page are finished executing. Thanks! PART II: Is there any way to see if there are other setTimeouts in the queue and delay execution until a...

Which is apparently just the setTimeout trick
Have you used it before?
setTimeout(function, 1);
 
i dont like the idea of delaying
 
3:01 AM
It's necessary sometimes
Plus it's only a 1ms delay
 
theres no guarentee 1ms is enough
 
that much is true
brb going for a smoke
 
it feels too hacky
 
hopefully someone else will have an answer for you by then :p
 
im sure some one will :P
 
3:11 AM
@nidu Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
god damn why cant people answer with non library based javascript
 
@Dave Is the number of requests known?
 
im sending 2 requests but thats only for trying to work out a solution
it wont be known in a live situation due to user's interaction
 
The quick and dirty solution I used the other day was to have an array like var arr = [null, null, null] when I knew there would be 3 req's. Then on callback, change arr[idx] based on which req it was. On each callback, check if any index is null and if not, you're done
 
@DannyBeckett have you heard of promises in javascript
 
3:18 AM
I've probably used them, but I'm not sure of that phrase
I reckon you'll get an answer on SO soon though
 
$.when.apply(ajaxes).then(func)
 
i'll put a bounty on it in 2 days if i dont get a solution
 
Unfortunately I'm gonna have to try to get some work done.. spent too long chatting :p
@JanDvorak He's after a vanilla JS solution
 
then count the completed ones
or the running ones
if(!--remaining){...
 
Yeah I think that's what I was getting at
But the number is not known
 
3:21 AM
based on my code i dont see how i can tell it which response is given back to which call =/
 
you can increment the value when you make / know you'll make another request
 
but the response will go to that value rather than the one or how ever many previous
 
pass requestIDs along?
 
@Resure Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
$response["rqid"] = $request["rqid"]
 
3:24 AM
well this is how im giving the response back :

function call_back(result,func){
		if(typeof(func) != 'undefined' || func != false){
			func(result);
		} else {
			return false;
		}
}
what ever made the call is waiting for that ^ i don't see how you can seperate it by id
 
Does anyone know how I can search all revisions of a file on SVN for whenever a specific line (save(12)) was moved?
 
normally you'd close over the "whatever" in func
 
Stupid me, I remember moving it for a reason, and now it's causing another issue... but I can't remember why I moved it in the first place.... yes, I should have commented
 
god damn i think i'm guna have to re-understand ajax requests my mind is more confused than when i started now
 
Using VisualSVN + TortoiseSVN
 
3:27 AM
oh i got an upvote yay
 
@Dave I thought you deserved it ;)
 
LOOOOOOOOOOOOLLLLLLLLLLLLLLLL
 
@JavierGutierrez Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
0
Q: How do I sanitize a javascript text?

DanielI have a textarea that will receive a js snippet(Google Analytics). Is there a way to sanitize that? Since I cannot use functions like wp_filter_nohtml_kse(), what should I use?

 
has anybody used angularjs?
 
3:39 AM
@redshark Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
Hey
has anyone worked with the new twitter API?
 
So somebody is apparently selling the city of detroit on eBay. LOL
 
really
 
haha
 
3:49 AM
aint worth it
more importantly, do they deliver
 
wow
haha
free shipping
 
Check the bidding. It started at $7.50 Lol
 
And they bidded it up to $90k+
 
people are smart
 
3:52 AM
yup haha
 
@AshKetchum are you good in parsing through JSON in ajax?
i need a little help with the twitter api. I have got JSON to return, but i need to get a url out of it
via ajax
 
@EliteGamer I remember how much trouble I had with that lol until @BenjaminGruenbaum helped me out. He'd be your best source, but I can try a little from what I learned from him.
 
ah, dude, thanks
Ok, so if you go to this url ...
that is what is returned
 
What url and what is returned?
 
user1596138
3:55 AM
Freaking out over this interview tomorrow guys
 
JSON is returned, and i need to get the profile pic url
out of each user
 
@EliteGamer That shouldn't be too hard
long time no see btw
 
same here
nice to see you
 
indeed
 
i do not know how to do Javascript and Ajax lol
that is why i am here hahah
 
3:57 AM
we're not teachers
 
@Dave going too hard on him bruh
 
at least, not all of us. But yeah, see a tutorial.
 
we're not here to teach you. you should look up basic tutorials
we will help on problems that you get stuck on tho
 
well, this is my first time to do ajax, so ...
 
user1596138
Anybody got any tips for my first Skype interview?
 
3:59 AM
@Jhawinsss Relax.
 
according to @Dave , there are tutorials on it lol
 
user1596138
pod one haha. As if that's possible.
 
But not too much :D
 
user1596138
Good* I'm mobile.
 

« first day (1010 days earlier)      last day (3924 days later) »