« first day (1036 days earlier)      last day (4137 days later) » 
00:00 - 19:0019:00 - 00:00

00:01
Chat, tell me the best TV show that I haven't seen yet
copy, tell us the TV shows you have seen.
:P
Game Of Thrones, most comedy shows
So?
I'm working my way through Star Trek.
00:24
Hi all. I need a regular expression that checks if a number is 12 or 13 and was using 1[23] but either my regex is wrong or there's a bug in the app that I'm using. Is this regex wrong?
@user1447679 No
@KendallFrey Thank you.
00:46
seems weird to use a regex for that
@user1447679 Why are you using a regular expression for that?
@Jeremy I'm using a RDI for a CMS that has select and case statements. <Case Comparetype="Regex" Value="MyDatabaseToken" Operator="=" Expression="1[23]"> I can use Numeric as the comparetype but only for direct number match, not range.
Seems like a bad CMS, then...
 
2 hours later…
03:02
We decided to watch Pokemon. :)
@Claire 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.
Anyone in here this late?
it's never late everywhere
Hahaha I like your style
Hm, may be a syntax error. Hold on. >.<
Okay. Here's the deal. How would changing, in the definition of an array, ()'s to []'s send a 'syntax error', but not hit the debugger; line right beforehand?
Guess it is to late. LO
:P
03:31
not sure what you mean by in the definition of an array?
do you mean var array = new Array() vs var array = []
exactly that
Array is a function, it needs to be called with ()
whereas [] is a shortcut to creating a literal array
@carbonara 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.
so new Array[] will throw a syntax error
yeah, its needed as an object not as a function
03:35
Um.. I didn't find error in "new Array()".
Because of JavaScript Array is simple problem, You find a solution easily to search it in website.
@Piyush 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.
04:02
@carbonara of course there is no error with var a = new Array();, nor with var a = [];. var a = new Array[]; will throw an error though.
@ElvinArzumanoğlu 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.
Array[] is error throw. Array is keyword is not variable
Keyword is ...not good explantion
You use it like variable.
it's a constructor.
I mistake ..
Array.lenth is not defined. It is not array. It's prototype
Array is a function
!!> Array
04:08
@phenomnomnominal "function Array() {\n [native code]\n}"
You can call it as a constructor:
!!> new Array()
@phenomnomnominal []
Or you can access properties of it's prototype.
!!> Array.prototype.map.call({ 0: 1, 1: 2, 2: 3, length: 3}, function (val) { return val * 2 });
@phenomnomnominal [2,4,6]
Um. Yes. You know better. Then, Why do you think that Array[].
04:11
@carbonara I didn't. I was pointing out to @Claire that Array[] would be an error.
Unless you passed it a string name of a property of the Array function
for example:
!!> Array['call'];
@phenomnomnominal "function call() {\n [native code]\n}"
Ah~... I misunderstood.
@acloudbuster 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.
posted on August 17, 2013 by Loktar

I was checking out some old books the other day and I came across Commodore Step by Step Graphics Vol 3. It had an interesting looking screenshot for a bit of code, which showed shaded spheres entirely made of points. I thought the effect would look cool if multiple ones were layered over each other […]

05:03
all are sleeping..
just some
05:39
@Mokkun Good morning
05:56
@Mr_Green negetive
06:37
0
Q: How do I access (r/w) the Firefox Boomark Toolbar items using JavaScript?

William DonnellyI want to access the Firefox Bookmark Toolbar items using standard JavaScript. I need to read the Name, and would like to be able to set it, too, if possible. I can access the Bookmark Toolbar items using CSS in the userChrome.css file, like: .bookmark-item[label="showLinkedImagesRegex"] image ...

07:20
@all, hi friends, anybody working with WEBGL here, what to share the discussion
what?
what do you mean by saying "what to share the discussion"?
@oo i like to learn new technologies, and this webGL made me so interesting, so i did small projects, and want to lean more by discussion and share my know:)
hi
im trying to call a c# method using ajax
but the call does not work
<script type="text/javascript">
$(document).ready(function () {
$('#btnsave1').click(function () {
alert("hello");
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "LeaveSurrender.aspx/apply",
dataType: "json",
success: function () {
alert('Successfully Saved');
// window.location.href = "ClubCreation.aspx";
},
Error: function () {
alert('error');
}
});

});

});
is the script
Cool error, but could you post an error message please?
and change Error to error
upper case to lower case
user1125394
07:47
!!> Array.length
can i ask mine question here on the chatroom ?
user1125394
s/mine/my
"What seems to be the officer problem"
i have a dashboard in which i am showing user a progress bar ... and in db the progress bar value value is keep changing after some seconds and minutes ... so i write this function
var auto_refresh = setInterval(
function ()
{
$.get('https://localhost/userinfo/battery_level', function(data){
$(".demo-progress").progress(data);

});

}, 10000);
i want to know is that this function consumes memory
or slow the script
?
as the query is running every some miliseconds
sorry for bad english
07:57
Lol, u guys know there is a HTTP status code called 418 I'm a teapot (RFC 2324) ???
What seems to be the interval ajax?
user1125394
ajax polling mostly consumes bandwidth I think, but 10s should not kill anything
I think you should worry about number of requests sent to your server first
right now is that i am sending request to the server ... sorry i am new to ajax, jquery
?
user1125394
@hellosheikh search what $.get is doing
08:00
so i want to know i have other things too in dashboard and i have to update that too by using these time interval .. so i dont need to reload the page to see the changes .. so should i use the same thing to other data too
user1125394
!!jquery get
$.get is getting a value from controller function
which is fetching the result from db
user1125394
then you don't have to worry about perf
user1125394
but you poll your progress every 10 seconds? how long does it take?
okk thankyou ... well not much ,... i just see the result without reloading ? should i have to use less seconds ... or 10 seconds is fine
?
is that facebook and twitter doing the same thing
?
user1125394
08:05
what the size of the ajax reply?
user1125394
if it's small try with 1s or less
351B
i have changed it too 1 sec .. but the size is same
user1125394
normal
so i dont have to worry now ?
user1125394
you can worry when you have 1000's of users, and your server crash perdiodically
08:14
if thats the case then whats the alternative ... facebook and twitter is doing this too .. so should i have to buy a expensive server in order to prevent it from crashing
There are many alternatives
ookkk .....can you tell me only ov of them .. if thats okk to you
user1125394
you don't really buy a server, a server is just a program, you buy for ip hosts, etc where the server runs, when those hosts let you hopefully choose your server
HaHa... you will never figure it out
hohoho...
i actually working on a mobile security app ... so i am just about to launch it in a month ..so i dont know yet how many users will use it .. it may b no one or it may b 1000s
08:19
Are you building a little notification feature?
user1125394
if you reach that number, just hire someone else
like saying "Tomorrow there will be an major update"
nope right now not ... well i am showing him the battery level of his mobilephone
but later i will implement the notification too
who's "him"?
hahahha yup thats gud idea .. i will hire
user
him is the user
08:22
What's the relationship between ajax and showing battery level of someone's mobilephone?
i am saving the battery level value into db ... and then fetching it frrom the db .. i want to show him the battery level percentage live
without he reloads the page ..
interesting
user1125394
@hellosheikh you are aware there is often a small icon in the top right corner of the screen
I'm not so sure why it must be "live" updated from server
didnt get u c x?
@cx
user1125394
08:27
yup so ?
i am showing this on the webapp
the battery level
user1125394
but the top bar is always visible I think, but whatever maybe you want to show that battery level
actually i m not able to understand u
i always find battery level apps ironic
o hoooooooo
08:29
Having another app running, draining battery, just to show what you can already see.
ho?
hey, don't call people ho
i am not making a battery level app ...
i am making a backup app ... in which i am showing a user dashboard in which he can see everything on webapp
battery is just a feature
user1125394
you should show what portion of battery your webapp used :), that would be interesting
hmmmm so u r saying that show him the how much my app consuming his battery
?
user1125394
well forget it webapps consume all about the same, offline webapps consume less though :))
08:34
that sounds like an super-exciting app
how would you ever know?
watching at my battery draining on an web app.. drinking coffee
wait until my battery is completely dead
user1125394
make a webapp that recharge your battery, ok let's stop saying shit
yup thankyou ... i am actually at a startup ... so i am working on mobile phone security app .. so i can tell you what i am doing ..may b u guys give me some new idea
user1125394
no problem
08:37
i am giving all the features that kasperspy and norton is giving
sluggishness?
but i am giving cheaper ,, and some additional features too
which they are not giving
and nowadays i am collecting feedback that what extra thing u want actually
i am about to launch an alpha
in about 1 week
user1125394
I wasn't even aware there was antivirus for mobiles, not much fan of mobiles, anyway good luck
ookk thankyouu .. ok one last problem i want to discuss it with you
Is it possible to convert uploaded document into a image file...?
08:50
okk thankyou ...
09:03
@SomeGuy ^
user1125394
Why can't I hide that div.. jsfiddle.net/89YFY
user1125394
oww double style, that's what you get with bad code
how can u findout the current window size? like live, after resizing it manually
not necessarily a javascript question, but is there a browser tool?
nevermind, just found one: whatsmy.browsersize.com
user1125394
09:30
> World's tiniest functional browser ^ hehe
user1125394
ah sucks it doesn't browse in it, not even an adress bar
user1125394
I don't know what they call functional then
I wonder how do they express "Javascript" in sign language
1
Q: IDE autocompletion for javascript AMD loading style

dmidzdoes anyone know an IDE that can autocomplete javascript AMD style : // my dojoConfig defined aliases to the packages I use (dojo, dmidz) // so in dmidz/my-module.js define(['dojo/dom-construct'], function(cons){// requiring some dojo module cons.// <- oh it is nicely displaying list of dom-c...

@copy does vim do this ^
@Zirak does emacs do this ^ * 2
I'm sure they can somehow say "Javascript" in sign langauge because they can even sing a song in sign language
10:38
is it wise to say that restful api calls are good because they are cacheble ?
since for example i need users basic immutable details
that detail should be able to cache, aye ?
user1125394
websocket calls are thus bad because they are not cacheable
0
Q: Setting up HBase with Spring Data Hadoop with Maven artifacts

WakkoI am pretty new to spring data hadoop , hbase and maven so I am confused.... Do I need to have a running installation of Hadoop & Hbase when before importing all the dependencies through Maven following the directions here:http://blog.guident.com/2013/01/spri...apache-hadoop/ or does Maven set i...

11:43
@BenjaminGruenbaum Maybe, probably not. The "autocompletion" is based on opened buffers, so technically, you can autocomplete anything you have open.
But probably not in the way he envisioned it.
12:07
0
Q: Javascript: Calculate the center point of multiple Lat/Long

OM The EternityI am using Google Map to display multiple lat/long points. But the google map javascript code has the code snippet to track the center of lat/long of the available lat/long. <script type="text/javascript"> var locations = JSON.parse('<?php echo json_encode($data);?>');//alert (locations); ...

user1125394
center of gravity man, but with spherical coordinates hmm
user1125394
12:44
stupid jquery children, that works with classes, not with dom elts it seems
user1125394
nah it works, but just not with my code jsfiddle.net/xrFKf/1
user1125394
well it need <table> wrapping
13:04
jquery has children?
damn, how many?
13:17
posted on August 17, 2013

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Dumbest joke I've ever done? Btw, just a friendly reminder that we

@cx they can be cached
but websocket are intended to be lower level of abstraction
u can implement a ws cache yoursel
13:35
@OMTheEternity I answerd
Bonjour
user1125394
13:53
@dievardump nah too easy, explain how it's done :p
14:12
14:28
factory : function ( $object ) {
    this.image    = $object;
    this.replaced = false;
    this.applySrc = this.applySrc;
    return this;
}
I have a factory method, that I want to use with a jquery collection, but I am struggling on how to do this for each elem inside the $object. Any pointers?
hi to all
i have some doubt in javascript
anyone help me?
Why kind of doubt is it? Do you think it doesn't work?
=*( Sorry
@mikedidthis loop
You want everything in object to be this[key] = value;?
@Connor I thought this, but I would need to loop all functions associated with the object
@mikedidthis i don't get what you mean?
if object is {name: 'something', age: 99} do you wan't this.name = 'something'; & this.age = 99;?
14:37
@Connor for this.applySrc(); I would have to have an innner loop for each of the objects?
@Connor Yeah. Basically I want an object for each elem in $object. I think ? :D
@mikedidthis whats the goal?
Some desktop applications are written in js these days. This is cool. What's a common way to distribute them? node.js or something else?
@Connor to output an object, that contains a new object for each elem in $object.
I think.
@mikedidthis give a example of input/output
@Connor sure, give me a moment
// Input
Object = {
  factory : function ( $object ) {
      this.image    = $object;
      this.image.replaced = false;
      this.image.applySrc = this.applySrc;
      return this;
  }
  applySrc : function ( ) {
    return this.src....
  }
}

//Output
Object = {
  image = {
    replaced : false;
    applySrc : function () {
    }
  }
}
-5 points for being so bad at explaining.
Basically I have a jQuery collection of images. I need to set a property for each of these images and then run a function on each one.
14:49
@mikedidthis what property are you setting and what will the function do?
I start the factory as: Object.factory( $('img') );
@mikedidthis and the $('img'); is all the images?
@Connor yes
and for each image I want to update a prop on the object and run a function called applySrc
@mikedidthis and nothing happens untill you do this Object.factory( $('img') ).applySrc();?
@Connor correct.
Well.. I mean Object.factory( $('img') ) will create the objects.
14:52
@mikedidthis where's the new src's coming from?
@Connor another function, but for this example, just getting one function to work would be fine.
@Connor also I apologise for the vague explanation. I am a designer :D
@mikedidthis - And what's wrong with :

$('img').prop('src', function() {
    return callMyFunction(this);
});
@mikedidthis ok, just working on something, are you going to be applying all the src's at the same time?
I don't actually know. I was asked to look at objects, rather than jQuery syntax.
@Connor nope, they will be called when needed.
@mikedidthis and and how are you identifying the images?
in the object
14:58
I maybe over thinking things, but I am trying to do this in a programatic way.
@Connor I originally had a nested object with them all in, but again this is another thing I am not sure of.
@mikedidthis ok where's the new src's coming from? are they random?
@Connor its comes from dataset prop
each image has some data attrs
@mikedidthis oh, and you want to be able to do this $('#myImage').replaceSrc(); ?
@Connor nah, I should be ok with: var imgs = Object.factory( $('img') );
and then imgs.replaceSrc();
@mikedidthis i just asked you if you are going to replace them all at the same time, and you said no
or is $('img') not all of them
15:03
Yeah I just figured I messed that up
so you're replacing them all at the same time?
@Connor no. Sorry. I will be replacing them if a prop is changed. Its for image replacement when the user scrolls.
I am not very helpful I know, sorry @Connor
@mikedidthis Well, then you would have to do that in the factory otherwise, you won't be able to identify the images in the object
@Connor ok, I can work with that
@mikedidthis do the img tags have anything unique about them? id?
15:06
@Connor nope
@mikedidthis and you wan't to change the image when you update the data attribute
@Connor no I want to update the src, with one in the data attr when the object prop is updated.
but I am not 100% sure if thats possible, due to tracking, as you say.
@mikedidthis so say you have a factory, you wan't to be able to add images whenever and then the src automatically change..
@Connor kinda. I just want to update the src when a prop is changed.
But it may not work
I maybe making this too hard.
I gotta dash, @Connor thanks for the help, I will be back in an hour.
How are you changing the data attribute then? You should just change the source instead!
15:15
I am changing the SRC with a new one from the data attr
And when exactly are you doing it, what triggers the change ?
Another function but at the moment I just want to handle the multiple elems
haloha
user1125394
h
I'm trying to use fabricjs with angular. One my problems is that I have to wait for fabric to load before I'm binding stuffs to it with angular. How can I tell angular to init only when the fabric object is not undefined?
15:30
As far as I know fabricJS loads synchronously, so when the file is loaded, it's ready
In angular i don't know when that happens though
coz i load it on jquery document ready
maybe thats a bad idea, I'm willing to try alternatives
can I somehow make angular start functioning when I tell it to?
15:48
Well... Angular already waits for you to do things.
16:00
why i can't change window ? such as: window = { name: 'abc'};
@DMDGeeker - seriously ?
yes, i just test it at chrome. @adeneo
does this mean only return if var greater than 1? return $count > 1;
php btw..
lalalalalalalat
@bushdiver - no, it always returns true or false based on wether or not the condition is true or false !
@DMDGeeker - The window is the global object that keeps everything together, what do you think would happen if you could just change it to some random object ?
16:05
@adeneo so i can't do that: window = otherObj?
@DMDGeeker - Nope, why would you ?
@DMDGeeker you can do var window = 'something' in a function then use top but that is STUPID
or this, depending
@DMDGeeker Why do you wan't to change the window?
Espresso :)
@adeneo @Connor because i don't want use (function(){...})();
@DMDGeeker and why does that make any difference
@DMDGeeker - say what now? So changing the window object is your "custom" solution to avoid IIFE
16:12
i have some doubt, my question is when we close the browser, at that time one confirm message displayed , if ok close browse otherwise not close, i done this but my problem is when refresh the page , at that time also that confirm message is display so how to control this one? please guide me
I hope to do something like Node.js
i am using this code
window.onbeforeunload = confirmExit;
function confirmExit()
{
return "ok?";

}
if anyone know solution for this please help me
a file is a module, then i can load a script file without change window
user1125394
window.onbeforeunload = function() {return confirm("u sure?");};
@karthys - There is no way to distinguish between a reload or a close, they both trigger the onunload and onbeforeunload events.
16:15
@Connor its ok but reload time the confirm box is not display..
@karthys Yeah return won't do anything, you need to do it like @cx just said
@karthys change it to return confirm('ok?');
@Connor k i try it
@Connor i dont want confirm box, kindly run this code window.onbeforeunload = confirmExit;
function confirmExit()
{
return "ok?";

}
Trying not to be offensive...
You need everything. Did you already program in JavaScript or is that a first ? — dystroy 47 secs ago
@karthys That code won't do anything. What are you expecting it to do?
@Connor its javascript
16:20
@karthys really?
@Connor yes
@karthys And what are you expecting that javascript to do?
@dystroy i already lot of projects work with javascript
@Connor i expecting is when reload the page the pop is not display but when close the browser window the pop will enable thats all
@karthys even while it may seem this was the appropriate time to post this here, I wasn't speaking of you. See link.
@karthys Not possible
16:22
@Connor thanks
@dystroy which link?
@dystroy is it possible?
Does anyone here make a lot of fiddles out of questions on SO?
@karthys You can only detect when the page is unloaded, so that means when it's refreshed and when the browser is closed.
@Connor we have anyother option ?
@karthys no, hence the word "only"
@Connor k thanks but its my project requirement so i will try
user1125394
/me trying to make a good app
user1125394
16:27
(the graph are all flat because the market is closed)
@karthys Impossible means "Not capable of being accomplished: an impossible goal."
LMAO slow.com
@karthys - didn't I already answer this half an hour ago? Reloading and closing the browser is the same thing when it comes to onunload, there is no way to distinguish between the two, so it's not possible, and you'll just waste time trying, believe me.
@adeneo he/she is on Mission Impossible
16:43
@Connor - indeed, if this was possible, someone else would have figured it out a long time ago.
Agreed!
16:54
Discussion:
is it sane to store user data [ the json files ] in file system itself ?
rather then a Db [ though it will be just a copy of db ]
to reduce db hits ?
user1125394
there are some good dbs nowadays, so I wouldn't care
Depends on what you do with the JSON, the DB is just a fancy way to store data in files, and it's normally faster to do lookups, but files are faster for just loading the JSON outright into a variable or something for use later. I often use files for storage if it makes sense!
@cx i do
if i store my whole user data as a fs
then i can cache user data in cloudfront
but that will become 40 network calls for 40 details rather then one, [the only way to fetch it back is get by 40 requests, but with a db i can send an array ]
fuck it ... i am going with a db
m59
m59
If anyone is windows hack savvy, what would be the best way to run xampp from dropbox, but have it use its tmp folder somewhere else? I'd like it if I could click a .bat in my dropbox folder that would route any request to the current tmp folder to one somewhere else and if the new tmp folder doesn't already exist, it will create it.
@Darkyen I don't know if I'm sane but I do that a lot without problems. I probably have a dozen applications, some with many users, storing many data as JSON files.
17:05
Hmm
using caching as advantage ?
@Darkyen What do you mean ?
no @dystroy i mean we use RESTFul api calls anyway
GET /Users/204/
so i can just make it in fs
/Users/204/index.json
It really depends on what you do, how you search your data, and so on.
user1125394
I have an http API, it seems not cached at all when looking network console tab 188.165.206.195:8888/api/convert/10/EUR/USD
user1125394
I guess ajax calls are better cached maybe
user1125394
17:20
or maybe I have to set that on server
17:31
hello all
Hello, as3isolib
I just gained access to actually chat inthe chat rooms here
are we allowed to ask certain questions about JavaScript and such here?
You're allowed to ask questions about politics, the opposite sex, music, weddings and JavaScript here
haha duly noted.
yeah so I'm really new to js, about a month into it. Before I had about 8+ years with as3/Flex
but I can't seem to make heads or tails or this issue. I'm using RequireJS along with a canvas lib called KinecticJS. And sometimes it renders, then the next, no code chance, nothing, it just doesn't work. So I'm really at a loss as to how to find the issue
would offering a bounty be more appropriate to finding a solution or would chat suffice?
Sounds like a problem you could figure out yourself by debugging or consulting the documentation
17:36
yeah both debuggin and docs don't seem to help. It's an intermittent issue
You can't offer bounties here. There are other sites appropriate for this. But as copy said, you should debug first. Look for Chrome developer tools for example.
liek one day works, next day doesn't
Well, debug on odd days.
ha
are there any tips for trying to debug objects that are added to the canvas?
user1125394
17:52
@Darkyen any quick opinon on 188.165.206.195:8888 ?
user1125394
I need to test it on mobile on day
18:25
Works like shit on mobile chrome
You don't add object to the canvas. You paint shit. The object are just references for where and what to paint.
18:38
0
Q: What is the best practice of filtering by unicode character? SQLite

INgeegI am having hard time to find any solutions for my problem, var sql = "select e.id, e.Word, e.Definition " + "from words e " + "where e.Word LIKE '%" + index + "%' order by e.Word LIMIT 64 "; this code is working fine for latin alphabet, but doesn't filter cyril...

00:00 - 19:0019:00 - 00:00

« first day (1036 days earlier)      last day (4137 days later) »