« first day (2111 days earlier)      last day (2851 days later) » 

11:03 AM
Webcam.js relies on Flash for browsers that do not support getUserMedia?...... are there any plugin that works without both flash and HTML5..... I don't know how it can be done
 
@KhalidHussain No.
 
@BenFortune Thank you.... Then may be I am in trap :(.... this is the requirement from client: mobile browser should be able to capture image using mobile camera without both flash and HTML5.
 
@KhalidHussain Why? They support HTML5
 
11:19 AM
@BenFortune, for example safari 6 does not support HTML5, in that case webcamJS depends on flash.... but client does not want to install flash...
 
user6524633
g
 
user6524633
guys
 
user6524633
how do I extract a substring from a string using regex
 
user6524633
function solution(S);
that, given a non-empty string S consisting of N characters, returns the length of its longest substring that is a valid password. If there is no such substring, your function should return -1. For example, given "a0Ba", your function should return 2, as explained above. Given "aobb", your function should return -1, since there is no substring that satisfies the restrictions on the format of a valid password.
 
Well then the client is shit out of luck.
 
11:21 AM
@KhalidHussain Maybe just send them a physical Polaroid camera
 
user6524633
this returns me the whole string
 
@Martinloc Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
user6524633
not just the part I need
 
user6524633
sorry
 
11:22 AM
1 message moved to Trash can
@Martinloc Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
user6524633
I just did
 
user6524633
...
 
1 message moved to Trash can
@Martinloc Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
Jesus fucking christ, she's telling you how to format
 
user6524633
I am doing that
 
user6524633
11:23 AM
I am pressing CTRL +k
 
Then don't.
 
@Martinloc While having the text selected
 
user6524633
i AM DOING THAT
 
user6524633
sorry for the caps
 
@OliverSalzburg that's not necessary
 
11:24 AM
@JanDvorak Oh, didn't know. Thanks
 
user6524633
function solution(S) {
var regex = /^(?=.*[A-Z])[0-9a-zA-Z]{1,}$/;
var test = S.match(regex);
alert(test[0]);
}
solution('1Adjdjdjj'); // 2
 
@OliverSalzburg ha ha.. yes you are right
 
Nice. Now, let's try the same with indentation.
 
How can I declare an empty matrix or two-dimensional array? I've tried this var m = [[]]; but it doesn't seem to be working.
 
user6524633
it works from my laptop not from my pc? wtf
 
11:25 AM
pc fail! \o/
 
user6524633
is it the same command for windows ? CTRL + K ?
 
user6524633
jesus
 
@JoãoPaiva There's no such thing as two-dimensional array. You have array of arrays.
 
user6524633
@JanDvorak why that function returns the whole substring and not just the regex match?
 
It does return the match
 
11:26 AM
@JanDvorak How can I declare an empty array of arrays, then?
 
user6524633
@JanDvorak so there is something wrong with my regex? I just want to return the substring that has at least one uppercase char
 
@Martinloc Your expression matches the whole string
 
You can have an empty array, or you can have an array of empty arrays.
@Martinloc well, you did.
 
@JanDvorak But what's the syntax?
 
@JoãoPaiva What for?
 
11:28 AM
@JanDvorak I tried it like this var m = [[]]; but it doesn't work.
 
user6524633
@JanDvorak so how would I extract "Ab" from something like "Abcdef
 
user6524633
sorry
 
@JoãoPaiva It totally does work. It creates an array with one array inside
 
user6524633
more like
 
would not [x, y] be considered two-dimensional?? [1, 1] = "first name', [1, 2] = "last name"... [2, 1] = "first name', [2, 2] = "last name"...etc. :P
 
11:29 AM
@thedigitalmouse that's not valid syntax
 
@Martinloc ([A-Z][a-z])+
 
user6524633
For example, given "a0Ba", the substrings that are valid passwords are "a" and "Ba". Note that "aBa" is not a substring and "aos" is not a valid password.
 
well ok, it's not valid javascript syntax... :D
 
@JanDvorak When I try filling it, there's no problems for the first line of the matrix, but when I add a new line to the matrix an exception occurs.
 
Sounds a lot like homework to me
 
user6524633
11:29 AM
basically
 
@Martinloc a0Ba is also a substring and a valid password
 
user6524633
I want to do not match the numbers
 
user6524633
and the substring
 
user6524633
has to have at least one uppercase
 
user6524633
var regex = /^(?=.*[A-Z])[a-zA-Z]{1,}$/;
 
11:30 AM
@JoãoPaiva because you only have one (empty) row. If you want multiple rows, you have to add the rows.
 
user6524633
does this look ok?
 
hmm for JS probably [1][1] = "first name', [1][2] = "last name" is better :D
 
That works, but it doesn't autovivify rows.
 
@JanDvorak But I need it to be dynamic. How can I add rows inside a for loop?
 
How do you assign an empty array as en element of some other array?
 
11:32 AM
@JanDvorak $scope.matrix[i] = new Array();?
 
Not optimal, but it works
 
user6524633
@JanDvorak how do I find a substring that contains no digits and at least 1 Uppercase?
 
user6524633
basically from"a0Ba",
 
user6524633
only "Ba" is a match
 
@JanDvorak Thanks, at least I now understand why it was lauching an exception. Thank you very much.
 
11:34 AM
@Martinloc now that's a specification you can try and implement. Hint: what do ^ and $ do in a regex?
 
user6524633
beginning and end of string?
 
user6524633
the thing is
 
Yes. Now why are those in your attempt to match a substring?
 
user6524633
because I suck at regex?
 
user6524633
lol
 
user6524633
11:37 AM
var regex = /(?=.*[A-Z])[a-zA-Z]{1,}/;
 
user6524633
with this
 
user6524633
if I have a string like '1Adjdjdjj3jdjdA'
 
Repeating the same regex over and over again is probably not going to help
 
user6524633
it matches the first substring
 
user6524633
but not hte second
 
11:41 AM
indeed
 
user6524633
@JanDvorak I dont understand why
 
@Martinloc what second substring? You have to be very specific when asking regex questions.
 
I guess he wants the global flag
 
user6524633
basically I want to match all substrings that have at least one uppercase
 
user6524633
and no digits
 
user6524633
11:48 AM
so if the string is "Abc1Def"
 
user6524633
it has to match Abc and Def
 
sounds doable
 
Does the matched substring need to have an uppercase, or is "ab" a valid match in "ab12CD"?
 
user6524633
@KendallFrey it has to have an uppercase
 
user6524633
so in "ab12CD"
 
user6524633
11:49 AM
only "CD" would be valid
 
user6524633
var regex = /"(?=.*[A-Z])(?=.*)[a-zA-Z]{1,}"/;
 
In that case you'll need something like:
 
user6524633
this wont work
 
@KendallFrey sssh
 
[A-Za-z]*[A-Z][A-Za-z]*
 
11:50 AM
OK, that's a better solution than I had in mind
 
user6524633
@KendallFrey do () parenthesis have to go somewhere?
 
Why would?
 
user6524633
not sure why it returns null
 
Not sure what does.
 
11:56 AM
If you want us to diagnose some code you have, we have to be able to read it
 
user6524633
function testRegex(str) {
    var regex = /"[A-Za-z]*[A-Z][A-Za-z]*"/;
    var test = str.match(regex);
    console.log(test);
}
testRegex('1Adjdjdjj3jdjdA'); // 2
 
any typeahead users here?
 
what on earth is a "bike shed mutex implementation"? -> github.com/mafintosh/mutexify
 
user6524633
@KendallFrey that returns null?
 
user6524633
I was expecting to have an array with all the matches
 
12:04 PM
@Martinloc ehm, why do you have quotes in your regex?
also, You probably need to use the 'g' (global) regex flag
 
@KendallFrey /2b|!2b/
 
@rlemon good question
 
user6524633
wope that worked!
 
user6524633
is any good resource for regex that is a must read
 
user6524633
12:07 PM
I have been reading tutorials about them but still not really getting them when they are complicated
 
Just learn about all the different features regex has. They're very simple by themselves, and very powerful when combined into a single expression.
 
user6524633
thanks @KendallFrey you are a star! @JanDvorak thanks to you too, you are the neckbeard's master :D
 
...
 
I hate naming things... I wonder if there's a job for someone good at naming
 
12:12 PM
so, a company for which I'm making a site is supporting various charity things and stuff, and I need to find a small amount of words so it can be put in a navigation bar
 
this kind of nav bar: coresecurity.com
can't think of much... "who we support" is too long, "support" gives the wrong idea...
 
clients
 
"causes" is wrong too
oh no, it's not clients
 
"helpees" is unorthodox but clear
 
12:14 PM
the company gives a percentage of the earnings to NGOs and similar
@JanDvorak that took me at least 10 seconds to process the meaning of
 
The more attention they give
 
or they're simply more confused
"supporting"?
that's a long word tho...
 
I'd keep "whom we support"
 
that's still way too long for a nav bar
 
donations?
 
12:16 PM
@KendallFrey that makes it look like you're donating to the company
not the company is donating to others
 
Well that's what you described
oh
that way
 
client pays company → company gives percentage of earnings to NGOs
 
!!urban ngo
 
@JanDvorak Ngo A Vietnamese last name, has chinese origins relating to that of Ng in Cantonese and Wu in Mandrin, all meaning corn the vegetable. About 1.3% of Vietnamese have this last name. Pronounced as "No" in english. Famous people having this last name include Ngo Dinh Diem a South Vietnamese President.
 
"NGOs"?
 
12:17 PM
non-grant organisation?
 
non governmental organizations, usually non profit charities
 
non player character
 
!!define ngo
 
@towc ngo NGO, non-governmental organization
 
not Google, obviously
 
12:19 PM
can't argue against that
anyway, ideas?
oh, turns out they're not actually charities
just research companies
 
enough with your europe foo
 
look who's risen from hell :D
sup?
 
pokemon go ?
 
@epynic Welcome to the JavaScript chat! Please review the room 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 often see those things on a submenu of "about us" or something similar, often under the name of "giving back" or "charities we support"
i'm guessing you want it to be a toplevel menu item?
 
12:28 PM
@epynic no, thanks, I've had enough.
 
it's "gotta catch em all", not "gotta catch some of em"
 
em is so old-school. Use rem.
 
px for-the-win! \o/
 
\o
@towc how about just 'we support' ?
 
12:37 PM
"our work"
 
Guys.. I have a question about mouseover mask images
http://preview.themeforest.net/item/kids-life-children-wordpress-theme/full_screen_preview/10068328 use something what I expect to do. but its works correctly if we have a background with 1 color and not an images.. (like, if you change background color for body element.. you saw the gray border...
It is possible to fix it?
 
closes the previous comment as unclear
 
its not clear?
 
indeed
 
12:54 PM
"we support" is a good one, thanks @thedigitalmouse
 
no problem
otherwise look up synonyms at thesaurus.com for 'support' :D
 
is there a better way to indicate FAQ so it's not all caps and to a non efl it doesn't sound like "fuck"?
 
need a short version of 'Frequent Questions'... might see how 'FQs' look on the page
or 'FAQs' if you don't want to spell it out
 
FQs is certainly better than FAQ
needs to be shortish
 
'Questions'
or 'Qs'
that will confuse 'em :D
i like FQs or FAQs
 
12:58 PM
Guys, there's these 2 documentation suggested edit that need rejection. Both are covered elsewhere already: stackoverflow.com/documentation/proposed/changes/59888 and stackoverflow.com/documentation/proposed/changes/59875 I'm out of review votes, myself...
In other words, :D
And boom, done :D
Another : stackoverflow.com/documentation/proposed/changes/59957 console.log with Node.js should be covered in the Node.js tag. Not in JavaScript's "Hello World".
 
As if node.js wasn't javascript
 
It is, but it has a section of it's own
The added example is more of a tutorial on running JS with Node.js than a "hello world" example.
Basically, that example should go here:
34
score
8
8 examples
21 contributors
 
Does node.js console go to stdout?
 
Heck if I know
By the way, that exact example was removed before
It's being added by a 101 rep user
Oh, and the grammar in there ain't exactly good, either.
 
@Cerbrus wtf lol
 
1:11 PM
Who cares about grammar, except me?
 
I do
In docs.
And in here, but to a lesser extent than you do
 
I do.
I'm not a JanDvorak about it, though. :)
 
@JanDvorak.. the features where you put your mouse into the cartoon in this [link](http://preview.themeforest.net/item/kids-life-children-wordpress-theme/full_screen_preview/10068328) (the mouse over..) to do this design.. the website use an overlay image with the background as the same as the "body" background. How should do the same thing.. but with a custom background image with a design.
If I change the background ([I saw something like](https://i.imgur.com/CcMWlZd.png)
the link setup not working?
 
[text](http://link.com)
@Jean-philippeEmond You're missing the http://
 
nop.
your link not work too..
 
1:17 PM
Google === [Google](http://google.com)
My link was in a code block.
Links are working just fine
@Jean-philippeEmond link <...> I saw something like
Working just fine.
 
@towc My company does something similar. What is the nature of the NGOs you support? For my company it's missionary work, so we use "Missions" in our nav bar.
 
@DawnPaladin Welcome to the JavaScript chat! Please review the room 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.
 
@DawnPaladin not actually NGOs, more like just companies who are giving free services
or doing really good research
 
its a copy/past.. well.. my http as here.. for the imgur I have the GreenShot tool.. it copy automatically in my clipboard.. JS room don't like me :P
 
"whom we help"
 
1:21 PM
@Cerbrus That's racist; where are all the black kids?
 
settled with "we support" @JanDvorak :P
 
@ndugger eh, whut?
 
it's a joke
 
@ndugger, behind the page!
:P
 
It's 50% women, though
 
1:22 PM
images of 3 or more children must represent all known ISO colors.
 
@ndugger Oh, I never even opened the links
 
What iso?
 
The ISO.
 
isometric children
 
serious question: why does React not recommend using context?
 
1:23 PM
What game?
 
@corvid it breaks react's normal rules of having data only passes directly to children. It's like a global variable.
 
@towc Ah, OK. We had something like that too that we called "Trusted Resources". Glad you found something you like :-)
 
@Luggage Would it be okay if you do want something passed to all children, regardless? Eg, for like the current user, creating an authentication component that passes the current user down to the children
 
Sounds reasonable. I'd still limit which components know about this context.currentUser as much as possible.
 
I ask a simple question .. and now we are in a political and moral debate -_-" gods..
lol
 
1:26 PM
e.g. Limit it to just the same components you'd reference directly in your router.
 
Are you propositioning polytheism? Boo ya.
 
A god is running for office?
which one?
 
That's not a god.
 
That's the god of privacy.
 
1:28 PM
can corporations run for an office?
 
Google is the god... check what he know about you... it know where you are.. access on all website with analytics, their spider.. he influence your choice
 
@JanDvorak omg, don't say that too loudly.
 
Just imagine Google was the chairman of Google.
 
Oh I was thinking of passing it in the Router context, eg:
export default (
  <Route path="/" component={App}>
    <IndexRoute component={Landing} />
    <Route path="/secure" component={Secure}>
      <Route path="/users" component={UserList} />
    </Route>
  </Route>
)
Where Secure is the one that will pass the currentUser down by context
 
A googol is the large number 10100. In decimal notation, it is written as the digit 1 followed by one hundred 0s: 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000. The term was coined in 1920 by 9-year-old Milton Sirotta (1911–1981), nephew of American mathematician Edward Kasner. Kasner popularized the concept in his 1940 book Mathematics and the Imagination. Other names for googol include ten duotrigintillion on the short scale, ten thousand sexdecillion on the long scale, or ten sexdecilliard on the Peletier long scale. == Size == A googol...
 
1:30 PM
@corvid i don't know. I understand why context is anti-react, and I know there are exceptions but I'm no expert on when it's appropriate.
 
anyone know how to fix the cartoon problem by the way?
 
@Luggage you're on the list just for reading that sentence
:o
 
which one? which sentence and which list?
I read sentences all day long.
 
Doesn't matter. You've read it already.
 
umm
 
1:33 PM
Well, sentence fragments, mostly.
 
well my chat thought your were replying to the comment above you (Jean's)
still, Jan's correct.. it doesn't matter
\s
 
@KendallFrey ahaha someone is making this mod
excellent
 
is that going up, down, or nowhere?
 
wouldn't it be very hard to make a buoyant balloon on mars?
(or duna)
 
Usually they make them on Earth
 
1:44 PM
touché
 
Mars, somewhat. Duna, less so
Duna has quite a bit of atmosphere
 
Which makes for some cool shots
 
 
I hate Solr so much
 
Welcome to my life
You are me now
 
1:52 PM
I love Solr. Never used it, though.
What's Solr?
 
I love Sol
 
Solr is satan's arsehole
 
It can't get too close though
 
it's a search framework, like elastic, but specifically meant for java nonsense
 
It's interesting how "It can't get too close" is the exact opposite of "It can never get too close"
 
1:55 PM
I don't think those are opposite.
ohh, i gotcha.
 
guys is my js selectall function correct?

http://pastebin.com/M3ZZuZ5w
 
well.. the second sentence can be interpreted two ways.
 
@Lynob you tell
 
seems correct to me and dont want to create a js array to test it, you are faster than me
 
Also, employed
 
1:57 PM
Unable to tell. It references variables (permissions) that aren't defined there.
 
Solr is literally satans asshole with an XML configuration
 
You lost me at XML.
 
A.W.F.U.L = Americans Who Figuratively Use Literally
 
Also, I prefer convention over configuration.
Is solr the search thing?
full text search?
make a replacement in JS. Call it Lunr.
 
1:59 PM
@JanDvorak I'm not being figuratively literal. I had to run...
 

« first day (2111 days earlier)      last day (2851 days later) »