« first day (947 days earlier)      last day (4005 days later) » 

user1596138
6:00 AM
What browser are you using?
 
firefox
 
user1596138
Right click. Inspect element. Error Console tab
 
user1596138
Or just console. I forget.
 
user1596138
Actually is this page online?
 
6:03 AM
no, on localhost
 
user1596138
Alright. Well type $ into the console and let me know what it says
 
I am not seeing any error console tab here, what all i see are webconsole (but no provision to type), debugger, inspector, style editor
 
user1596138
webconsole
 
user1596138
Just click webconsole and then in the blank area type $
 
user1596138
I never use firefox....
 
6:07 AM
i couldnt type
there
 
user1596138
Is this what you want to happen?
 
user1596138
 
Yes, email validation is getting triggered
 
user1596138
Aside from PHP not functioning.
 
but as the username filed gets blurred
it should tell whether its valid or not
the logic is written in base.js
 
user1596138
6:10 AM
But that's doing more than your script is now?
 
for username tag
Yes! :-)
 
0
Q: Why doesn't the style change according to the div size?

Romantic ElectronI have set some styles on a content-editable div the div is resizable but the style doesn't get change according to the size when the size is changed. HTML: <div contenteditable="true" id="input"></div> CSS: #input { -moz-appearance: textfield; -webkit-appearance: textfield; ba...

 
Ah PHP... I remember those days
 
user1596138
I don't think jquery is loading.
 
k, php is unavailable right for it to load that..
but, i think in this case it should go to else loop
 
user1596138
6:13 AM
PHP has nothing to do with jQuery.
 
user1596138
On yours the form is just submitting and skipping validation completely right?
 
yes, exactly
 
user1596138
jQuery isn't loading.
 
user1596138
Thats got to be it.
 
but, it is loadint the form.php in body tag right
the only thing thats not working is base.js
how to debug this issue? can i do with this inspect element debugger?
 
user1596138
6:16 AM
You should be able to type in the webconsole... That's what you need.
 
aha
shal i switch to chrome?
 
user1596138
What's in the debugger tab? I forget where things are on Firefox.
 
i am on linux machine..
ubuntu
 
user1596138
Absolutely.
 
user1596138
Nice.
 
user1596138
6:17 AM
'Go to chrome and use the console on that page.
 
alrite
 
user1596138
Actually type jQuery
 
1
Q: In javascript, is it better to use two equal signs or three when comparing variables

user2396852I have noticed quite a few people use three equals signs when comparing things in Javascript, but I was taught to only use two. Can anyone shed some light on why someone would use three or two, and why do they both work? -Thanks :) Another user has pointed out that the question has already been...

 
@JosiahSouth here is the output when i type $
function (e,t){return new b.fn.init(e,t,r)}
 
user1596138
type checkmail()
 
6:27 AM
checkEmail();
ReferenceError: checkEmail is not defined
you are right! may be its not loading...but why?
 
user1596138
jQuery is loading. checkmail says it's undefined. Hold on
 
user1596138
Make sure your path to base.js is right.
 
user1596138
Oh.
 
i just put ./base.js
it is there in the current directory where
my main file is there...
 
user1596138
You don't need ./ then
 
user1596138
6:32 AM
Remove ./ and try it.
 
user1596138
../ would be one directory up from the main page's directory. You don't need anything if it's in the current directory.
 
no, i have put single dot slash,
i removed
not working yet!
 
user1596138
Actually you have checkEmail() wrapped in another function. It says undefined just like it should. That isn't the problem.
 
user1596138
In the console on Chrome are any errors showing up when you click submit? You might need to control+click submit that way the page isn't changed and you can see the console still.
 
user1596138
6:35 AM
Well it'll be a new tab. But then you can go back and look at the console.
 
Uncaught ReferenceError: checkEmail is not defined
 
user1596138
Well for starters checkEmail shouldn't be wrapped into another function. But that isn't the real problem.
 
do you mean to remove $(document).ready(function(){ from base.js?
not working yet!
 
user1596138
Nope. That isn't the problem.
 
I am sure that base.js isn't loading at all
 
user1596138
6:39 AM
I'm confused..
 
ha ha
me too!
<script src="base.js"></s
is this the correct way of loading the js file?
 
user1596138
type flag
 
<script src="base.js"></script>
 
user1596138
Yup, that's right.
 
okay!
or shall we move the loading of form.php into body tag also into base.js?
 
6:43 AM
Well that was irritating
 
now its this way-
 
Internet went out, had to fix it myself.
 
user1596138
Shitty.
 
        <script>
            var flag = "";
            $(document).ready(function(){
                $("body").load("form.php?type=insert");
       });
        </script>
<script src="base.js"></script>
OMG!
 
user1596138
Kittens.... Why the hell doesn't this fiddle work for him when he uses an external file for js? jsfiddle.net/pwsBq/6
 
6:45 AM
I am not seeing the form when i do this
So, its proven that base.js isnt loading!
 
user1596138
I'm not sure that proves anything at all. You didn't move the form's insert into base.js
 
user1596138
Just go to the resources tab and find scripts and see if base.js loaded.
 
my base.js
Yes, its there in script folder...
scripts*
Can we step debug this?
 
user1596138
Use a real function instead of onsubmit of your form. Call the function from the console and see if it runs.
 
Uncaught ReferenceError: myfunc is not defined
i used a function named myfunc
and alerted some text
 
user1596138
6:55 AM
Without seeing the page for real I can't really do anything here.
 
yes...
 
user1596138
Plus I've been awake 19 hours. Got work and a meeting in a few hours.
 
user1596138
Good luck.
 
pastebin.com/d1MicjCU <- 7 years ago i wrote that ... some words changed
 
Thanks @JosiahSouth
 
7:02 AM
2
Q: Can't use .css to change display from none to block

Jongz PuangputHere is my CSS: #optionHotel{ display:none; } Here is my JavaScript: function cb1(type){ switch(type){ case "hotel": alert("hotel"); $("#optionHotel").css("display","block"); break; } } Here is my Html: <div id="optionHotel"> Some Ele...

 
@Darkyen that's great!
Do you write poems?
 
!!/mustache CapricaSix
 
@dystroy Y U NO MAEK SENSE!? Could not understand mustache CapricaSix (perhaps you meant to execute a command? If so, prepend the command name with a /)
 
user1596138
!!/mustache dystroy
 
7:06 AM
0/2
but both have enough facial hairs
 
> The object-oriented model makes it easy to build up programs by accretion. What this often means, in practice, is that it provides a structured way to write spaghetti code. [Paul Graham]
 
Why was the bot renamed ?
!!/google caprica six
 
@CapricaSix I had a weird dream with her in it last night. I don't remember anything, just that it was sexy because she was in it.
 
7:46 AM
@udaysagar sometimes i do
^- now thats beautiful
 
@Darkyen Wow...
It may not be easy to read but it sure is pretty
 
Gag, thats awful
 
its pretty but unusable :P
 
> The only places for icons is in a church, a burning church at that. [mhat]
 
@Darkyen yuck
 
@Darkyen yeah if you want to lost your eyes before the time :D :D
anyway looks romantic IDE now
@Darkyen didn't noticed you are a PHPer too :) which framework do you use?
 
user1125394
it's fine to hide php syntax
 
Look at the link. It's not his setup
@Neil "She"? You had the bot in your sex dream?
 
@BenjaminGruenbaum thanks for posting the 'currying' slides, very informative.
 
8:25 AM
Hey guys, is there a way to use JSON stringify and only receive the string without the label?
 
Whadya mean?
 
When i use stringify I get this: {label: test}, but I only want "test" to return
 
Then don't give it an object?
Give it just the value
 
The value is from a backbone model so it is an object
 
Then grab the value and stringify that
 
8:28 AM
` var bank_name = page.viewModel.person_new_bank.details().bank_name;`

` console.log(JSON.stringify(bank_name));`
like that?
 
Yes.
 
{"bank_name":"ABN AMRO Bank"} is the output :\
 
Wait...first of all, console.log the details().bank_name to see whether that's actually the value you want. Second, if it's just a string, why do you want to stringify it?
 
Because I want to use that bank name in a ajax get function
var branch_url = '/branch/list?bank_name=' + bank_name;
$.getJSON(branch_url, function(data){
console.log(data);
});
 
....and a string just isn't good enough, so you have to turn that into a string instead?
 
8:32 AM
when i log branch_url i receive: '/branch/list?bank_name=[object][Object]'
without stringify
 
Yes because you're grabbing the wrong value, as we've already established
Maybe you need details().bank_name.bank_name because the data passing was weird like that
 
page.viewModel.person_new_bank.details().bank_name = Object {bank_name: "ABN AMRO Bank"}
 
Then you do need .bank_name.bank_name because the data passing was weird like that
 
cool thats man :)
yeah that worked :D
thanks a lot
 
Enjoy
 
8:37 AM
Time for jquery UI autocomplete...
 
...ew
 
yeah i know right
any better way to do it?
 
I'm sure there are
hehe. ∀x EatsRamen(x) ⇒ IsHomeless(x) ∨ IsAGradStudent(x)
@BenjaminGruenbaum Logic jokes
A whole new world is unveiled.
 
Lisp is for lusers
 
9:01 AM
@okok Php ?
purely horrible poop ?
My friend i dislike php for being slow and horrible
 
user1125394
9:16 AM
can be also apache that's slow, (if it's your case), but agreed on php
 
@Darkyen it is not your own IDE showing php code?
php = pure hydro power afaik
php = pure hoxigen peoples
 
lol for definition on php @okoks
 
@MirkoCianfarani ehehe
php = patriots holding power
and so on
 
@okok forum.html.it for me is needless
this is best site for programmer...
 
@MirkoCianfarani i leaved that forum in 1960 when Elvis was alive ;)
 
9:25 AM
Then this site is old ?
 
uhm no i was meaning html.it sucks :D
 
takes many years..
 
really old site, everyone turned to stack ;)
stack is more than a forum i mean
 
also for me...
 
;)
daaaamn i need a lightfire :P
 
9:27 AM
 
@XCritics hey you're getting seriously those kind of games :P
 
haha, I find it relaxing as lame as that is
 
@XCritics i think it is relaxing as well as making queue to the supermarket lol :)
people has their own relaxing tips i know :D
 
0
Q: Coffeescript basic MVC example - Review

thedevAny suggestions/criticism appreciated. 1 class @ShareController 2 3 constructor: -> 4 @view = new ShareView 5 @model = new ShareModel 6 7 $('.update-button').bind 'click', (event) => @view.updatePreview @model.previewImages[event.target.id]() 8 9 10 class ShareV...

 
Hey guys I have a question about knockout Options binding, the value doesn't seem to be working with me. Bank name:
<br><select id = "bank_name" data-bind = "options: bank_list, optionsText: 'bank_name', value: person_new_bank.details().bank_name, click: branch_list" style = "width:100%">

</select>
it displayed the first value of the optionsText instead
 
9:36 AM
not working help to short it $(document).ready(function()
{
$("ul#sortable div").mouseup(function(){
$("div#left").hide();
$("div#div_field").show();
$("div#div_form").hide();
alert(this.id);
});
});
 
on('mouseup',function(){ }); @JitendraPathak
try please
@JitendraPathak jsfiddle.net/aWwPE
 
user1125394
in english?
 
@JitendraPathak Don't use $("div#div_field"), use $("#div_field") : it's faster.
 
@romanticelectron en.wikipedia.org/wiki/Epoch_(geology) never seen the message till now
 
user1125394
<script type='text/javascript'>
var foo//indent like that
    var foo;//or like that ?
 
9:46 AM
@okok function is working properly when i call function by static element like ul#sortable but i am trying to call with dynamic < div> which is in side static ul#sortable and with dynamic element calling is not working
 
@JitendraPathak it depends if you reload the content on() is live
if you reload the content you have to re-bind the event
also check what @dystroy says
ul#id -> #id
 
@AmaanCheval 41
 
@JitendraPathak Use on :
$(document)on('mouseup', '#sortable div', function(){
 
ROT13 is sufficient encryption
 
$(document)on('mouseup', '#sortable div', function(){}
is also not working with dynamic element
 
9:55 AM
@JitendraPathak define dynamic element please
 
$(document).ready(function()
{
$("div#right div").on("mouseup",function(){
alert("The paragraph was clicked.");
}); });
 
this works
you can try children() but i don't think it's your main problem here
$('div#right').children('div').on('mouseup',function(){});
you should better exaplain what are you trying to achieve
 
@AmaanCheval 42
 
user1125394
is it a timer?
 
10:07 AM
Jon Skeet, Reading, United Kingdom
566k 186 3069 4553
 
user1125394
fan bot..
 
info for Jon Skeet please? @CapricaSix
 
@MirkoCianfarani just click...
 
@dystroy, you seem like the type to maybe do projecteuler?
 
@phenomnomnominal probably not : no time. And I don't like to do something that many people are already doing. I'd prefer spending my time on less walked paths
 
10:10 AM
Fair enough!
 
yeah I have info on SO but in real life?
 
I'm doing it at the moment while watching things render...
 
Does this question make sense ?
 
I like them because they're so bite sized.
Doesn't really make sense. It shouldn't matter how the CSS is displayed, I doubt there is a connection to how it is applied?
 
@dystroy I think it makes sense. You may find this interesting: github.com/necolas/idiomatic-css#declaration-order
I use csscomb.com to put my css into a custom order.
 
10:17 AM
@mikedidthis You mean it's a style guide question ? Then it's not constructive.
And the Firebug pictures then don't make sense in there.
 
@dystroy sorry just re-reading the question.
@dystroy the order the css is in doesn't matter for browser reading it, but I think an order for humans reading it is a nice thing.
 
@dystroy Sometimes style guide really means design patterns. CSS is a mystery to me however, so I shan't comment further.
 
@dystroy It maybe a best practice kinda question? I find it a useful question, but not sure what SO would think of it.
 
A horse walks into a bar. The bartender asks, "Why the long face?" The horse, incapable of understanding English, shits on the floor and leaves
 
@Zirak Would be interesting if that were true, but no. I was merely interested in the actress.
I think she's canadian actually
 
10:35 AM
@phenomnomnominal Die
 
@panpiper 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.
 
@XCritics That's pretty awesome!
 
@AmaanCheval 43
 
@phenomnomnominal Which language are you doing them in? Python or JS?
 
CS
It's a nice thing to kill time
 
10:51 AM
skeet
i've only been on here for two days, and already i feel like i live on this thing. i guess some people really do live here
 
@panpiper I think most are logged in but working.
 
oh, i was actually referencing mr. skeet's impressive numbers
 
how to refresh external file every interval?
This is possible?
 
how to neglect a resolve of a deferred obejct given it;'s rejected already?
help me peoplez
 
11:04 AM
@Sheldon are you speaking jquery?
 
World hunger will be solved by eating cats
 
@panpiper
yes
same ideology for angular $q objects too
 
11:25 AM
@AmaanCheval 44 :D
 
@phenomnomnominal Hahaha, that's nice
 
Man once you get on a roll there's a lot in common with a lot of the problems
and once you have a good prime sieve going you save a lot of time
 
Yeah, there is!
 
hey does someone knows how can i get a video audio track and save it as mp3 or midi ? is it possible ?
 
not as midi no
Although if you come up with a mp3 to midi converter that isn't shit, i'll love you forever
 
11:29 AM
and as mp3 !? :P
 
yeah it should be quite easy
depend on fornats
 
oh nice, do you have any kind of tut about? for example i would like to extract youtube audio trax and save them in mp3
 
It's against the ToS as far as I can remember
 
ToS?
 
@AmaanCheval yeah it is.
 
11:31 AM
Terms of Service
But things like this already exist
For example, youtube-mp3.org
 
nice thanks!
 
javascript should be called jujuscript
 
at the end i only expect a video link source, sousers can insert video source link from everywhere, then it's user's responsability to not insert youtube videos nope?
@AmaanCheval @mikedidthis @phenomnomnominal
 
Nope
 
why does?
once i write they should be aware ...
 
11:34 AM
@okok I have no idea what your talking about. I just know ripping audio from a youtube video is bad juju.
 
That does nothing
 
that's not how the world works
 
service is not for scraping youtube videos mp3 , service is for any video source, then if you enter youtube video it's up to you
 
Writing, "No offence" doesn't make things less offensive
And writing, "No copyright infringement" doesn't help your case
 
What you're doing is, to be frank, boring and unoriginal
 
11:35 AM
@AmaanCheval but it means they are aware, and i have then no responsibility afaik
 
Similarly, breaking the Terms of Service and saying you didn't mean to doesn't get you off the hook
 
@phenomnomnominal well i have to explain you the rest, but it's a secret ihihi
@AmaanCheval so what i need to take away responsabilityies on that?
 
@okok out of interest, and I may regret asking, what video are you trying to get audio from.
 
@mikedidthis no one , since i din't wrote a line of code about :)
just asking for infos :P
@AmaanCheval laws exists for both parts i mean
 
@okok Yeah, but you can't push your responsibility off to them
 
11:39 AM
youtube in this case as nothing related to "my webservice" until somone request their own video, which is not requested by the app but by the user itself ... i see in this terms
 
Plausible deniability is a term coined by the CIA during the Kennedy administration to describe the withholding of information from senior officials in order to protect them from repercussions in the event that illegal or unpopular activities by the CIA became public knowledge. The term most often refers to the denial of blame in (formal or informal) chains of command, where senior figures assign responsibility to the lower ranks, and records of instructions given do not exist or are inaccessible, meaning independent confirmation of responsibility for the action is nearly impossible. In t...
 
anyway ^ i think it depends on country side laws
i tihnk/guess
 
I don't even know what your doing, it just sounds illegal.
 
@mikedidthis if an app, takes video source input and output mp3
user has the responsability to input legal video inputs
not the app
or i'll need tons of blacklists i think
which is un-real
and not possible to do at the end
 
11:43 AM
Which is exactly why making this app would be more of a headache than a good thing
 
so the enteire internet should use tons of blacklists
@AmaanCheval nope , there are tons of these stupids apps , this i mean :)
and they not in jail ...
:P
so each image sharing app, should have blacklists of authors for example, un-real
i don't think i'm wrong , i am?
 
Is the entire internet free of infringements?
It's not about being in jail. It's about whether it'd be legal to put you in jail.
Image sharing isn't the same
Image sharing websites would have to deal with copyrights, which they do
 
well if you share a copyright image...
 
You can report images, and they do take them down
What you'd be doing would be editing the content
 
ok so the same for videos i guess
 
11:46 AM
Converting it
Well, look, I don't know much about this. Maybe you're right. Best of luck with whatever it is you want to do
 
@AmaanCheval sharing services edit the content resizing images :P
 
Seriously?
 
@AmaanCheval lol np , was just for having other's opinions ;)
resizing is not edit the content?
for me it is , since original is 1000px you edited content resizing to 80px
so the only way is to put responsability to users i guess
and this is what everyone do with terms
 
Man. You need to stop having so much time
 
11:50 AM
Bro, I'm sitting here at midnight watching images render
 
what is 45 phen?
 
@okok Well, you're right if these images were taken from something like Instagram, and their ToS prohibit this
 
The number of times I had intercourse with your mother, today.
3
 
But the point is, Imgur will allow Instagram to report it
You can't report and take back the mp3's your users download
@phenomnomnominal You're good with these burns
 
Hardly, that was pretty obvious
:D
 
11:51 AM
@AmaanCheval right, what i mean is you can't use ToS blacklists or you'll never do anything on internet.. :P
 
@AmaanCheval almost as good as @Zirak
 
@phenomnomnominal 45 milliseconds
 
@okok you should spend all your time doing this instead of being on here.
 
@okok He's right. Your first target: Solve 15 of those problems on your own
 
@phenomnomnominal eheh i'm particulary not good on math :P
 
11:53 AM
what an excellent way to learn
 
ehehe
@AmaanCheval Imgur too can't take back since you download the image... :P
 
@okok That's not the service the provide.
 
i think we need to stop the argument which is clear lawyers argument :/
 
What can be the reasons of _FILES empty uploading image?
 
@AmaanCheval dunno at the end dude if you are right i guess so, but i know there are laws for laws in this sick world so nothing is clear at all :/
@Joseph82 ask in php chat room ;)
 
11:56 AM
You are right @okok
 
Hi guys, quick question, may spark a huge row
 
@Joseph82 sometimes
 
This problem is making me foolish
 
@Joseph82 do you need php file upload?
 
@deep ask away.
 
11:58 AM
@Joseph82 google.com you will find tons of php file upload tutorials, follow one of them and you'll be ok ;)
 
How can i save a string and and int so that a user puts it in, and other people can access it, i.e. someone puts there name in, and they answer a few maths based questions, i then find out how they scored, and save it so that they can compare it with other users
 

« first day (947 days earlier)      last day (4005 days later) »