« first day (1093 days earlier)      last day (4077 days later) » 
00:00 - 19:0019:00 - 00:00

user1125394
19:00
faster than Caprica
ok
I want to compare two images even if they have differents extension and different sizes
it is possible
?
user1125394
define compare
are they cross-domain?
what
and yeah, compression artifacts will cause differences
where are the images from?
19:03
one image is uploaded by user and others are from server
don't expect IE support
user1125394
!!google image comparison
user1125394
pixel by pixel euclidean distance
user1125394
or a hash like md5
19:18
this arrow is for letting the user know there is content scrolled up:
which one do you like better?
the blue line represents where the content gets hidden. so anything above the blue line is hidden
#2
but not really either
Scrollbars are so confusing
there won't be a scroll bar just an arrow letting them know they have scrolled
@JanDvorak you liked #2 but you don't think it would mean its not really a scroll but something else like toggle since its between the line
Can you put them within a larger picture?
I mean, take a screenshot of some scrolled content.
Maybe it's not as bad as we (or at least I) think
I don't really like the arrow design / color scheme
but ux-wise I prefer #2 for symmetry
what makes you think symmetry?
uh, wait, what is hidden?
Then it's just confusing and irrelevant
19:26
there would be content under the word destinations at the top
if if it's a fold for the content below, use #1
I originally understood as an entire block being collapsed/expanded
There's some UI thing that's popular now to blur the top or bottom edge if there's more content in that direction
yeah... add a shadow, period.
blur what?
The top/bottom of the screen
19:27
and here is the other way
Both are weird
That Mark Miller guy seems smart.
add a wide shadow below the header
@copy on a scale of one to 10, how offensive (in offensive units) do you find the following statement?
more shaddow
19:28
in PHP, 35 secs ago, by igorw
PHP, the haskell of OO languages.
as if the content was wound around a cylinder there
@BenjaminGruenbaum wtf
That...doesn't make a lot of sense
Not sure if insulting Haskell or OO
Probably 1.5 offensiveness units
Or so
1 on a 1 to 10 scale isn't too offensive. I'm surprised.
@Zirak It's PHP :P
19:34
no arrow, just a wide shadow
wider than this
@BenjaminGruenbaum His scales are not linear.
@BadgerGirl Are you having sexy time calls with the chat open again?
user1125394
@benlevywebdesign just saying there is chat.stackoverflow.com/rooms/29074/html-css-dom-webdesign for html discuss
19:37
@cc this isn't html yet and the peeps in here are cool
Updated: Added skip functionality, removed button zirak.github.io/js-questions
@phenomnomnominal (hopefully I got your name right), @SomeGuy ^
anyone know why a dynamically added stylesheet will not take affect?
@ShadowZzz because other rules override it
I'd wager that "dynamically added" has little to do with the issue
@Zirak Y only 5?
19:48
@BenjaminGruenbaum I'm adding 3 more questions now
@Zirak Make it 10 questions - that's better. Then I can use it in interviews :P
@whitehat101 There are no other rules, and this is for a widget that I am making. I have made the styles unique. I looked at the FF console and it is not retrieving the file.
user1125394
box.sumDigits = function sumDigits (x) {
    //sum the digits of the number x

    var s = x.toString(2);
    console.log(s)
    var r = 0;
    for (var i=0; i<s.length; i++){
        r+= s.charAt(i);
        console.log(r[i]);
    }

    return r;
};
user1125394
sniff doesn't work
How are you adding it?
appending it to the head?
user1125394
19:50
I'd like a number add
user1125394
@whitehat101 it's doing that unfortunately
@BenjaminGruenbaum hehe, yeah..."you must get a time of 8 minutes or less. Cheating makes you pass instantly."
That should work
is the stylesheet 404 or something? can you show us
user1125394
!!> var x= "01001", v=0; v+= +x[1]; v
19:51
@cc "01"
@cc 1
0
Q: Adding a Style Sheet to a document using JS

ShadowZzzjQuery(document).ready(function($) { /******* Load CSS *******/ $('head').append('<link rel="stylesheet" type="text/css" media="all" href="'+('https:' == document.location.protocol ? 'https://' : 'http://') +'thesite.com/api/widgets/tghd/pages.css">'); }); The above cod...

user1125394
box.sumDigits = function sumDigits (x) {
    //sum the digits of the number x

    var s = x.toString(10);
    var r = 0;
    for (var i=0; i<s.length; i++){
        if (s[i]!=='.' && s[i]!=='-')
            r += +s[i];
    }
    return r;
};
user1125394
I bet it's another way, but I don't like bit shifting :p
@cc so Imperative :P
user1125394
hehe
19:57
@cc If only you could turn a string into an array...or just take the numbers from it...
But a boy can dream
user1125394
!!> "-2.9".split('').filter((c)=> c!=='-' && c!=='.').reduce((a,b)=> +a + b, 0)
@cc ["2","9"]
@cc "029"
@cc "29"
Maybe if we had some sort of API, maybe a sub-language, made for extracting parts of a string...
@cc leh ugly
function sumDigits (x) {
    //sum the digits of the number x
    var y = x+"";
    return y.length ? (sumDigits(y.substr(1)) + (+y[0]||0)) : 0
};
user1125394
I started wrong thinking it was digits in binary representation
20:03
The most rational thought, of course.
user1125394
sumDigits(1/3) should be infinite..
Is anyone familiar with the jquery form plugin
I'm kind of confused about it's error handling function
Hmm
I think I'll have to post a question
it's kind of hard to explain
@cc floating point representation
user1125394
20:23
yep looks like they have always 15 significant digits max
Decimal 64 does indeed provide 16 digits
...wait you have to purchase it? wtf?
The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). Many hardware floating point units use the IEEE 754 standard. The current version, IEEE 754-2008 published in August 2008, includes nearly all of the original IEEE 754-1985 standard and the IEEE Standard for Radix-Independent Floating-Point Arithmetic (IEEE 854-1987). The international standard ISO/IEC/IEEE 60559:2011 (with identical content to IEEE 754) has been approved for adoption through J...
@JimmyBreck-McKye 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 have a question about a piece of work I'm about to do. I'm not looking for anyone to write code for me, but I would appreciate some hints about the approaches I could take.
@JimmyBreck-McKye yes....
Basically I have a form with lots of states, progressive disclosures, that kind of thing. I'm not very experienced, but my gut instinct is suggesting that I should do this 'properly' and split my form data from my view. How do I determine if this is overkill?
user1125394
20:29
'progressive disclosure' eww, learned a new expression
Hey, I didn't design it. But yeah, lots of panels being hidden / shown in various permutations related to existing data and validation states.
@JimmyBreck-McKye And you don't like the fact that lots of panels are hidden right?
0
Q: JS optimization for a 3D game

user1876542I am developing a 3D JS game for Windows 8(please download the current version here http://apps.microsoft.com/windows/app/rush-3/d5e21bf0-efc7-4609-9f71-561c76664c91 to test the performance). In my PC (i3, 8GB RAM) is quite fluid, but in low end computers its very laggy, so I'm searching for ways...

user1125394
I think he's trying to do the validation step by step maybe
I don't really have an opinion on the design. If the designers really feel it'll help, then it could be worth trying. But I don't like the idea of lots of jquery show/hide handlers all over the place.
Maybe I'm being fussy, though.
A colleague I spoke to mentioned that he'd look at doing it in backbone, but I'm not sure that's possible in this case (time is a pressure and I've never worked with an MVC framework before)
20:34
@JimmyBreck-McKye I would suggest angular, some would disagree but it would solve your problem
I use it a lot.
@BenjaminGruenbaum What was the question you recommended? Something about codility?
@Zirak Find out if there is a point in an array where the sum before it is equal to the sum after it
How long would it take me to get productive in writing this as an angular.js app, do you think?
@JimmyBreck-McKye I can see where you're coming from with the show/hide business, the only other option would be to change the data and text and generate the fields you need. A MVC would be the way to go in that case, either angular.js or ember.js - ember is a lot harder to learn though
oh, neat
user1125394
20:36
@BenjaminGruenbaum s/point/index
...how the hell would that function be named
@JimmyBreck-McKye Not long at all, angular is really easy to learn.
hasBalancePoint?
@cc Trailing / muddafukka
user1125394
:)) ok
@Connor - what do you mean by 'change the data and text and generate the fields you need'? You mean keep my actual form hidden and completely separate from the UI representation, then submit it via javascript?
Though I really do need to try getting to grips with something like Angular at some point.
The architects are talking about using an MVC framework for a lot of our company's front-end projects going forward, so it'd probably help.
20:40
@JimmyBreck-McKye No, i mean have one form container and you generate the fields needed for the current step on the form and insert it into the form.
Interesting - so you'd generate the view by templating, rather than simply swap pieces of the form into view.
Is that so you could generate pieces of the view on command as part of an automated test?
@BenjaminGruenbaum ugh, I'm lazy, do you have test cases too? :D
user1125394
[0,2.9,0,1,-1,2.9] / 2
Well, thanks for the pointer - Angular is something I should get to grips with, as well as getting used to working to a proper MVC philosophy. Thanks.
@BenjaminGruenbaum The question is a bit ambiguous. Which slice includes the current item? The "before" slice or the "after" slice?
20:53
@Zirak just pick one :P
!!before or after
@Zirak before
What would I do without you
@Deekey 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.
@Shmiddty is there an option to stay afk, even when you start talking again?
20:58
@Shea That would make no sense
It wouldn't make sense to give someone the option to stay afk?
@Shea The bot doesn't help you to lie
What if they expect to be afk, but happen to peak at the screen every now and then?
Then don't use /afk
Well I won't then
21:00
hey thanks @ Caprics Six
Don't, see if I care!
Good!
GOOD
!!!1one
@Shea That didn't make much sense. Maybe you meant: clone
21:01
@CapricaSix blow me
0
Q: Improving a JavaScript filtering function

Evan EmoloI created a function that compares an array of letters to the alphabet, and returns the letters that are not in the original array. While this works, it looks somewhat clumsy to me, but I don't know what I'm looking for to improve the code...Is there a way to make it more elegant? Perhaps gettin...

@CapricaSix u mean i can ask only question?
You're welcome to talk, as you can see above.
something confusing me.
I have data return in object. which in console it returns like this
`object{data1...}`
`object{data2...}`

then when I put in view. it only show `object{data2...}`
Helo. stackers.
Helo, Zirak
@Zirak, which sandbox plugin have you use for your you can't javascript underpressure clone? Or you used webworker?
21:14
You're free to look at the source
You can find the link on the intro screen
user1125394
!!github Zirak
@cc Elusive138/SEChatBotAwesomium Run the SO-ChatBot by Zirak (modified by allquixotic) headlessly via Awesomium.
user1125394
not working well :)
wow, I'm flattered
@cc You're not working well
user1125394
someone forked you
21:15
It worked to specification: It searches for repositories.
user1125394
not by user, hmm
user1125394
!!help github
@cc github: Search github for a repo./github repoName or /github username/reponame
user1125394
!!github Zirak/*
@cc Elusive138/SEChatBotAwesomium Run the SO-ChatBot by Zirak (modified by allquixotic) headlessly via Awesomium.
@cc User/Repo not found
21:18
That could be possible improvement. Could you make an issue?
user1125394
yea..
0
Q: Weird CSS issue; Resolution?

user741166I'm trying to figure out what is causing what seems to be a resolution issue on my website? I've got two similar versions of a website and with the newer one I'm using Bones (A WP Starter theme). Anyways, with the new one everything seems to be smaller and I can't seem to locate the cause using F...

I'm in Canada eh!?
@SomeGuy, @BenjaminGruenbaum, @Shmiddty, @phenomnomnominal, ... added a couple of questions
21:34
@BenjaminGruenbaum + is a function in lisp, not an special operator. So... (reduce #'+ '(1 2 3)) :P (just to please @Zirak)
@ttacompu 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.
@FlorianMargaine Is that why LISP is so slow?
Where did you read that?
Java for the Web
21:38
Solve the extra questions, and be amazed how wonderful the option to skip is.
isBalanced(")(") expected false, got true
There is an implementation on the jvm named abcl. Not sure how well it works
Of course it's not balanced
sure it is
the question doesn't specify that they have to be in the correct order.
...yeah, no
21:40
ugly
 var stack = 0;
    for(var i=0;i<x.length;i++){
        if(x[i] === "("){
            stack++;
        }else if(x[i] === ")"){
            stack--;
        }
        if(stack<0) return false;
    }
    return (stack === 0)
(x.match(/\(/g)||[]).length === (x.match(/\)/g)||[]).length && x.indexOf("(") <= x.indexOf(")")
success
lol @Zirak test that
@OctavianDamiean How are you doing?
@BenjaminGruenbaum Tests out fine
return x.split("").reduce(function(c,n){
        var cur = c+(({"(":1,")":-1})[n] || 0);
        return cur<0?-Infinity:cur;
    },0) === 0;
21:44
box.hasBalancePoint = function hasBalancePoint (x) {
    // x is an array of numbers. return whether there is an index where the sum
    // before (excluding) it is equal to the sum after (including) it.
    var sum = function(a,b){return a+b}

    for(var i = 1; i < x.length; i++){
        if (x.slice(0,i).reduce(sum) === x.slice(i).reduce(sum))
            return true;
    }
    return false || x.length < 2;
};
I suppose I don't need that false.
@Zirak I meant @Shmiddty 's
@Shmiddty lol
yeah...I knew he'd go for that solution
0
Q: How do i keep my current page menu highlighted on pagination?

OscarI have a navigation menu in a page that highlights the current page you’re on based on the URL by adding a div class. My problem is that my page is paginated, so sometimes the user will end up at: http:// example.com:4001/wordpress/calientes/page/2 /page/3 and so on... what’s the best way to ...

@Zirak why didn't you test it :P?
@BenjaminGruenbaum Do you see a flaw in his solution?
21:52
Mine would fail for: ())(
You mean the regex solution to the memory requiring stack automaton problem? Not at all.
It's theoretically impossible to use that approach to solve this specific problem.
Want a proof?
No thanks, I know why they clash
:) Regular expressions have no memory
what does it mean if something has "Native Java and Objective-C bindings"
@bushdiver It means you shouldn't use it
22:02
@Shmiddty That's because you were stupid
Just change indexOf to lastIndexOf
())(()
I'll add that in
() = 0
(()) = 1
(()(())) = 2
...
@Shmiddty Try now
Would anyone be interested in a hacker pen (lockpick/bootable backtrack ISO built in)
@SomeKittens =|
22:19
@SomeKittens Wouldn't that just be a pen with a USB stick in it?
and a lockpick
Oh, I thought that was 1337 for something digital
!!google backtrack
22:29
@BenjaminGruenbaum var cur = c+({"(":1,")":-1}[n] || 0); I don't think you need the extra set of parenthesis.
kali ^
and you could do c += {"(": 1, ")": -1}[n] || 0;
!!afk beer
@Shmiddty Nobody cares.
0
Q: Plugin/ Script request: Auto share/upload featured image with sites

user2803938We often share our posts and images from http://manofmany.com with sites such as Svpply, Tapiture, Punchpin, Springpad, Gentlemint etc which is done through a very manual process involving clicking a the associated bookmarklet, selecting the image and sometimes writing the title etc. I was wonder...

22:37
!!> "((((())()()()()))()()())()())))))".match(/[()]/g).reduce((a,b)=>(a+={"(":1,")":-1}[b])<0?-Infinity:a,0) === 0
@Shmiddty There goes the neighbourhood.
@Shmiddty false
How would i change this regex: .*(https?://)www((\\.\\w+)+).* to where i can have a string http://t.co/moreinfohere
!!> "()()".match(/[()]/g).reduce((a,b)=>(a+={"(":1,")":-1}[b])<0?-Infinity:a,0) === 0
@Shmiddty false
@Shmiddty true
Basically, i want to remove everything but a link like http://t.co/info
in regex
i even have tried editing the regex to this .*(https?://)t((\\.\\w+)+).*
but i will not work
22:40
your capturing groups are weird
well tha code needs to be correct for both Java and Javascript...
!!> "here is a hyperlink t.co banana".match(/.*(https?:\/\/)(www)?((\.\w+)+).*/)
@Shmiddty "SyntaxError: unterminated parenthetical"
and i was told to do that
@Shmiddty "SyntaxError: unterminated parenthetical"
22:42
hm
oh
@Shmiddty null
you have to escape the //
@Shmiddty null
!!> "here is a hyperlink t.co banana".match(/(https?:\/\/(\.\w+)+)/)
@Shmiddty null
22:43
@Shmiddty also, the domain will be a subdomain, so
i can not use www
@Shmiddty null
!!> "here is a hyperlink t.sub.blub.co banana".match(/(https?):\/\/((\.?\w+)+)/)
@Shmiddty ["http://t.co","http://t.co",".co"]
@Shmiddty ["http://t.co","http://t.co","http","t.co",".co"]
@Shmiddty ["http://t.sub.blub.co","http://t.sub.blub.co","http","t.sub.blub.co",".co"]
@Shmiddty ["http://t.sub.blub.co","http","t.sub.blub.co",".co"]
there
(https?):\/\/((\.?\w+)+)
what about: http://t.co/info
22:49
it would strip off the /info
Yea, but i need that
!!> "here is a hyperlink t.sub.blub.co/info/foo/barr banana".match(/(https?):\/\/((\.?\w+)+)((\/\w*)*)/)
@Shmiddty ["http://t.sub.blub.co/info/foo/barr","http","t.sub.blub.co",".co","/info/foo/b‌​arr","/barr"]
!!tell EliteGamer google regex pattern hyperlink
ok
@Shmiddty how do i escape those?
\\
@cc "ReferenceError: document is not defined"
/(https?):\/\/((\.?\w+)+)((\/\w*)*)/ : Does not work in Java
user1125394
double backslash \\/
/(https?):\\/\\/((\\.?\\w+)+)((\\/\\w*)*)/
is that correct?
user1125394
22:58
!!> /(https?):\\/\\/((\\.?\\w+)+)((\\/\\w*)*)/.test('...')
@cc "SyntaxError: illegal character"
user1125394
no
same here, idk what is wrong
you on't need to escape the \
well, I don't know about java
you probably don't need to escape / in java
user1125394
how do you declare it in Java new Regex("(https?):\\/\\/((\\.?\\w+)+)((\\/\\w*)*)") probably?
23:01
...
!!> "some url t.co.uk/foo/bar/baz/".match(RegExp("(https?):/((\.?\w+)+)((/\w*)*)"))
@Shmiddty "SyntaxError: unmatched ) in regular expression"
user1125394
remove / and ending /, it's for js
@Shmiddty null
@Shmiddty null
hrm.
user1125394
23:05
Why the heck is there Java code in this room?
user1125394
hmm yes it should work
@BenjaminGruenbaum trying to get the difference between regex of Javascirpt and Java
8 messages moved to Java
@EliteGamer Java is broken ^_^ they also have a good tutorial on the pattern class docs you should read.
i am reading them now
@Shmiddty i am confused XD
posted on October 13, 2013 by Victor Rodriguez

Google and NASA's Quantum Artificial Intelligence Lab Were the First Artists Mostly Women? New Operating System Seeks To Replace Linux In the Cloud

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

« first day (1093 days earlier)      last day (4077 days later) »