« first day (1305 days earlier)      last day (3659 days later) » 

3:02 PM
:(
 
hello all!
had to step out
not that any one cared i suppose
can i write a OR statement in .search("STRING!" || "string2!")
 
@vimes1984 - was wondering where you disappeared to
 
Can you tell us what .search is? Which library you're using?
 
jquery i assume
let me check
 
And yes you can, search() accepts a regex
!! mdn string search
 
3:05 PM
@adeneo "SyntaxError: missing ; before statement"
 
lol
 
.search(/(STRING!|string2!)/)
 
@adeneo genius!
thank y ou
 
Note that there's an i flag if that's what you're really looking for (case insensitive)?
 
3:07 PM
0
Q: Set position of object in GLSL in WebGL project

Gelo VolroI'm trying to accomplish position setting with GLSL language. First of all, when I saw such lines: attribute vec3 aVertexPosition; uniform mat4 uMVMatrix; uniform mat4 uPMatrix; void main( void ) { gl_Position = uPMatrix * uMVMatrix * vec4( aVertexPosition, 1.0 ); } I thought, that I cou...

 
@adeneo does it return true if the statement exists?
can i use it in a if i mean...
 
It returns the index of the first match, so you can't use it directly as the index could be zero, you have to check if it's more than -1 etc.
'STRING! goes here'.search(/(STRING!|string2!)/); // 0
if ( 'STRING! goes here'.search(/(STRING!|string2!)/) != -1 ) {...
 
posted on May 13, 2014

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) {} POW

 
Good Afternoon
 
o/
 
3:16 PM
I think i hate regex is this normal?
 
Guys noob ass Grunt question here
 
@RaghdHamzeh 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.
 
@vimes1984 Javascript regex is terrible, but regex in general can be required and amazing
 
I don't know why it's asking about these asterisk locations

Running "concat:generated" (concat) task
File ".tmp\concat\styles\vendor.css" created.
File ".tmp\concat\styles\main.css" created.
File ".tmp\concat\scripts\vendor.js" created.
Warning: Unable to create directory "C:\wamp\www\donation-fever\.tmp\concat\scripts\**"
 
@Martin gonna need to see your concat code
 
3:17 PM
One sec
concat : {
  dist : {
    src : ['<%= yeoman.app %>/scripts/app.js', '<%= yeoman.app %>/scripts/controllers/main.js'],
    dest : '.tmp/concat/scripts/scripts.js'
  }
},
 
hmmm, that is strange
 
Your ",." is making my OCD itch
 
@Neil edited lol
 
ha
 
Thank you.
 
3:20 PM
dest : '.tmp/concat/scripts/scripts.js'
really?
noone is seeing something weird?
 
no
 
.tmp is a lovely name for a folder
 
ah, my bad
yeah I thought it was a typo
 
@Martin I would sudo it, and see what happens
 
If it helps, this is based on yo angular
 
3:22 PM
I do belive I'm going to cry...
it's still not working...
 
@vimes1984 what aint?
 
@Connor I'm on windows
 
@Martin oh ah
 
   filterMarkersstyle : function (text){
     if (text === undefined || text === null ){
         text='';
       }
     var arr = [];


        var ms = this.mapshapes,
        mss, shapeId, it;
               var t = text.toLowerCase().trim(),
                       isVisible;
      for ( shapeId in ms){
          if (ms.hasOwnProperty(shapeId)) {
              mss = ms[shapeId];
              console.log(mss);
            if (t === undefined &&  t === ''){
                this.setMapObjectVisibility(mss, true);
 
filterMarkersstyle should be filterMarkerStyle for a start
 
3:23 PM
text = text || '';
 
isVisible = (it.search(/(DSO Office|string2!)/) !== -1); never finds the DSO office string even if it exisits in the string i'm searching
 
I'm gonna install a fresh angular app and compare the generated Gruntfile to what I have now and see what I changed..
 
@vimes1984 what's the whole objective?
What's this?
 
to hide or show kml map markers
 
it = descrip.toLowerCase();
it = descrip.toLowerCase();
 
3:25 PM
ohhhhh...
 
You should remove both of them
 
@Derek 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.
 
@vimes1984 - just wondering, but how would an all lowercase string match "DSO Office"
 
yeah I removed them..
 
@adeneo That's the issue
 
3:28 PM
And I rarely use search(), I would prefer
isVisible = it.indexOf('DSO Office') != -1 || it.indexOf('string2!') != -1;
 
I need to pass one or more values through to it can i use index of like that?
 
or even just match
isVisible = it.match(/(DSO Office|string2!)/
 
filterMarkersstyle : function (text){
   var arr = [], ms = this.mapshapes, mss, shapeId, it, isVisible;
   text = text || ''
   var t = text.toLowerCase().trim();

   for ( shapeId in ms){
       if (ms.hasOwnProperty(shapeId)) {
           mss = ms[shapeId];
           console.log(mss);
         if (!t){
             this.setMapObjectVisibility(mss, true);
         } else {
            descrip = mss.description;
            if ( descrip !== undefined){
               isVisible = (it.search(/(DSO Office|string2!)/) !== -1);
Looks as though you're missing the } on the for loop also
 
I don't get it, where is "it" assigned a value ?
 
@adeneo I think it's supposed to be t
 
3:33 PM
That's still lowercase ?
 
HA
 
ok this is what i have now:
   filterMarkersstyle : function (text){
     if (text === undefined || text === null ){
         text='';
       }
     var arr = [];


        var ms = this.mapshapes,
        mss, shapeId, it;
               var t = text.toLowerCase().trim(),
                       isVisible;
      for ( shapeId in ms){
          if (ms.hasOwnProperty(shapeId)) {
              mss = ms[shapeId];
              console.log(mss);
            if (t === undefined &&  t === ''){
                this.setMapObjectVisibility(mss, true);
 
Bin it and start again
@vimes1984 Look at what I've just posted, then look at what me and adeneo were discussing
 
which still only finds the first value DSO Office
 
Hi! How can I shuffle the array (http://jsfiddle.net/alecstheone/F8p5j/) in this way:
Shuffle first 50 elements
than from 50-100
than 100-150
than 150-200
 
3:35 PM
Evening!
 
hey guys dumb question. How would one make a colorful circle with text in it? I am looking at this, except I want those <img> tags to be just text. getbootstrap.com/examples/dashboard
 
@AlexStanese do you know how to shuffle a whole array?
 
ok so do something like this
 
I just don;t know how to shuffle it in parts
 
3:36 PM
hold on
 
0
Q: Cannot load Google Geocoding API dinamically

Ionică BizăuI have the following code that works fine: <html> <head> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> <script> window.onload = function () { geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': "New York" },...

 
@connor it is actually description
 
Really
if (t === undefined &&  t === ''){
 
Has anyone an idea?
 
0
Q: jQuery Promise, $.when execute all deferreds in array

wootscootinboogieI've got some code which makes requests to two different files on my web server, and I'd like to take some action after they're done, leveraging deferreds: var url = 'testDataRoot.json', folderUrl= 'Content/testData.json'; var root = $.ajax({ url: url, type: 'GET', dataType: 'js...

 
user1596138
3:39 PM
..
 
@adeneo ha
 
@AlexStanese That should shuffle the first 50
 
args = shuffleArray(array.slice(0, 50))
args.unshift(0, 50)
array.splice.apply(array, args)
 
@impinball 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.
 
3:40 PM
@Connor and after the shuffle is complete it puts them back in array?
 
user1596138
These new profile pages are going to be awesome
 
@AlexStanese Yes, try it, it modifies the original array
 
@Connor ok thanks... but Isn't there another way not to split my array? Just to shuffle the original array in parts?
 
args = [0, 50].concat(shuffleArray(array.slice(0, 50)));
array.splice.apply(array, args)
 
right got it
 
3:42 PM
@AlexStanese What do you mean, split your array?
 
the values I'm passing to the .search are a string
as in they inlcude the ""
 
you don't want to modify the original array?
 
@Connor I want the original array to be shuffled in 4 parts... and I thought if there's another way to do it without taking a part of it and store it in a variable, then shuffle it and than repaste it in the original one...
 
@AlexStanese try the code i showed you and see if you get the right result
 
@Jhawins - those profile pages sure are a lot nicer than the old ones

http://stackoverflow.com/users/reloaded/965051
 
3:44 PM
@Connor oke..
 
user1596138
 
user1596138
@adeneo Apps & Projects will be awesome as soon as it's real :)
 
CRACKED IT!!!!
yes!
thank you @adeneo & @Connor for the time you took out of the day to help me with ths
 
ok
 
you're welcome
 
3:47 PM
:D
 
Ok so I restored the original Gruntfile.js to my project
And that did not work
Now I get

Running "svgmin:dist" (svgmin) task

Done, without errors.
Warning: TypeError on line ["390"] of C: no implicit conversion of nil into String
Run with --trace to see the full backtrace Use --force to continue.

Aborted due to warnings.
 
@Connor yes it works... it doesn't matter the other version xD
 
ok
 
@Connor and for the second part I use slice(50, 100) and what unshift?
 
.........and I still get that error now with the old version of the Gruntfile
 
3:53 PM
@AlexStanese you mean the second version i posted?
@Martin how big is it?
 
@Connor no... for the elements from 50 to 100
 
@Connor how big is what?
 
@Martin your gruntFile
 
11 KB
 
@AlexStanese use this version I gave you
args = [0, 50].concat(shuffleArray(array.slice(0, 50)));
array.splice.apply(array, args)
then just replace both 0, 50 with 50, 100
@Martin I'm gonna be honest and say I've had a lot of stressful hours with grunt, the only way i ever fix them is by starting again, but 11K's a lot
 
3:56 PM
@Connor that's why I tried to copy in a Gruntfile from a fresh generator-angular but that was giving me that error as well
ho hum
 
@Connor ah.. I didn't saw the second code..
@Connor but it's no working as it should... it cuts out elemnts
 
I tried deleted .sass-cache and I get a different error now
Warning: Encoding::UndefinedConversionError on line ["783"] of C: "\x9D" to UTF-8 in conversion from Windows-1252 to UTF-8
 
@Connor the array doesn't have after the shuffle 200 elements
http://jsfiddle.net/alecstheone/F8p5j/1/
@Connor it has only 150 elments.. he's loosing some of them...
 
@AlexStanese OK, hold on
 
Hey guys
 
4:06 PM
Hi sexy guys
 
and girls
 
@AlexStanese easier to do it this way, jsfiddle.net/F8p5j/2
 
@Connor THANKS! but why wasn't it working in my version?
 
@AlexStanese because when you do splice(50, 100) it removes the first 50 items Array.prototype.splice
 
@FredericCharette 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.
 
4:12 PM
@Connor I unserstand.. thank you!
 
You're welcome
 
have a nice day!
 
I'm going crazy why is this happening :(
If it helps anybody to help me, it's running after `concurrent:server`

Running "concurrent:server" (concurrent) task
Warning: TypeError on line ["390"] of C: no implicit conversion of nil into String
Run with --trace to see the full backtrace Use --force to continue.
 
> Grunt: a low-ranking or unskilled soldier or other worker.
 
What else would you suggest
 
4:16 PM
> inb4 delete system32
 
@Martin You need to find the root problem, probably got something to do with Bill Gates
 
Or hitler
 
:(
 
Well @Martin it looks like you need to have a look at what's on line 390 then delete it
 
@NatZimmermann But it doesn't give a file..
 
4:20 PM
and keep on just deleting the lines where you get errors and eventually it will work right?
Open up all the files?
 
There's thousands
 
Better get to work then
 
Very helpful smh
 
or you could just use gulp?
or run your tasks like a real man
by hand
 
Umm... so I closed the cmd window and reopened and tried again
It worked
 
4:24 PM
Wait... the first rule is to turn it off and on again, and you didn't do it?
jeeez
 
us christ
 
shame
 
fulness
 
Aaaaaaaaaaanyway
Now I'm back to my original problem
Running "concat:generated" (concat) task
File ".tmp\concat\styles\vendor.css" created.
File ".tmp\concat\styles\main.css" created.
File ".tmp\concat\scripts\vendor.js" created.
Warning: Unable to create directory "C:\wamp\www\donation-fever\.tmp\concat\scripts\**" (Error code: ENOENT). Use --force to continue.
 
well why are you trying to create a directory made up of symbols?
 
4:25 PM
@5et 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 don't want to, I'm trying to find why it's doing that in my Gruntfile
This is my concat:
concat : {
  dist : {
    src : ['<%= yeoman.app %>/scripts/app.js', '<%= yeoman.app %>/scripts/controllers/main.js'],
    dest : '.tmp/concat/scripts/scripts.js'
  }
},
 
I don't know what is making that happen in my Gruntfile. Since the errors are showing up after concat:generated, I was looking to that tasks's options
Thing is I see nothing here that would make that stupid ** directory
 
have you tried changing scripts.js to like main.js?
or something
 
Hm.. nope. I'll try it
 
4:28 PM
I'm confused
 
I was just thinking maybe scripts is some kind of dodgy reserved file name
 
Same error:

Running "concat:generated" (concat) task
File ".tmp\concat\styles\vendor.css" created.
File ".tmp\concat\styles\main.css" created.
File ".tmp\concat\scripts\vendor.js" created.
Warning: Unable to create directory "C:\wamp\www\donation-fever\.tmp\concat\scripts\**" (Error code: ENOENT). Use --force to continue.
 
In The good parts book it says object.property can be any value except undefined?
 
github.com/gruntjs/grunt-contrib-uglify/issues/74 there is an issue here but it's because the guy included * in his dest...
have you tried a directory that's not .tmp? maybe the period is messing it up?
 
I know it's not that
 
4:32 PM
@YuriyRypka 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 made a change to the Gruntfile (which I can't remember exactly what I did) that caused this to start
 
github.com/gruntjs/grunt-contrib-copy/issues/90 issue here was fixed by adding expand: true
 
copy: {
  dist: {
    files: [{
      expand: true,
      dot: true,
      cwd: '<%= yeoman.app %>',
      dest: '<%= yeoman.dist %>',
      src: [
        '*.{ico,png,txt}',
        '.htaccess',
        '*.html',
        'views/{,*/}*.html',
        'bower_components/**/*',
        'images/{,*/}*.{webp}',
        'fonts/*'
      ]
    }, {
      expand: true,
      cwd: '.tmp/images',
      dest: '<%= yeoman.dist %>/images',
      src: ['generated/*']
    }, {
      expand : true,
      cwd    : '.tmp/concat/scripts',
Oops but yeah expand is already true
 
¯_(ツ)_/¯
¯\_(ツ)_/¯
got to go now, have fun with grunt being a little bitch
 
am I loosing my mind, I just can't see any difference between the question and the accepted answer, other than that the code in the question is better?
0
Q: Unexpected end of input response from wp_handle_upload

RecoJohnsonThe file uploads through ajax no problem, but when a json encoded array is returned to ajax I get this error when trying to parse it: Uncaught SyntaxError: Unexpected end of input Client Side Script jQuery(".target-input").change(function() { var formData = new FormData(); formData.app...

 
4:35 PM
it avoids the use of a promise ? ^^
 
@Shea Was it you I talked to about js crypto? If so: matasano.com/articles/javascript-cryptography
grr, there should be a "go back to previous tab" option in browsers
There's probably in Vimperator
 
@dystroy - there's that ....
 
@needaname Where's the demo?
 
@adeneo promises are too complicated. It's time to write a manifesto pure-javascript-has-callbacks-not-promises.org
/s
 
@dystroy - Yeah, I get it now, deleting my answer and upvoting @NatZimmermann
 
4:41 PM
meh, promises aren't that complicated.
 
/s
 
meh, promises aren't that complicated.
 
brb just killing myself
 
@Zirak - Sure they are, you have do chaining or whatever it's called in jQuery ?
 
have fun
@adeneo You have addition in Promises? It's my favourite jquery feature
 
4:43 PM
you can do that with Promise.reduce
 
Like in
$.ajax({
    url: 'magicnumber.php'
}).done( + 4);
 
Okay re: my Grunt problem... I narrowed it down to a concat task. I'm still stumped though since I commented out the concat task and it still runs
 
If you write code that works you don't even need grunt ?
 
Hey. Has anyone here worked with the Google Maps API
 
I was using yeoman so that I can try out Angular for this app. It automatically comes with Grunt
 
4:48 PM
and if you have, how do I load it asynchronously? :-(
 
Besides now that I'm well on my way into this project I can't remove it
Until I finish fixing the build
Well maybe I could
 
is there a easy way to convert a object to array in Angular?
srry other way around array to object
 
user3071008
eh, isn't an array an object already?
 
I fixed it
The problem wasn't even in my Gruntfile
 
yes....
 
4:51 PM
is there a way to attach an ngClick to all child elements of an element? :d
 
5:13 PM
@MickATX 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.
 
woah, pants
 
I wish I had someone that worked under me who could write tests
 
user image
3
@RalphWiggum Don't we all
 
@SomeKittensUx2666 I hate you
oh come on, don't star that, it was pinned today
 
/me is ST2 wuss, what are you talking about?
@FlorianMargaine I pinned it last night so I'd remember to repost it
 
5:27 PM
imma emacs user
!!urban wuss
 
@FlorianMargaine wuss A person who is physically weak and ineffectual. Often a male person with low courage factor.
 
@FlorianMargaine emacs is a text editor program then?
 
@RUJordan kinda
@RUJordan emacs is a lisp OS that happens to edit text
 
Interesting
I'll have to look it up
 
@RUJordan more seriously, emacs is an IDE in which I can also read mails, go on irc, read pdf, connect to jabber, etc.
 
5:39 PM
Emacs is whatever you make it be
It can be a simple text editor, it can be an IDE, it can be an OS
 
No, I'm blind
 
See, I use my text editor to edit text
 
What a coincidence, emacs can edit text too.
 
@SomeKittensUx2666 fortunately, emacs is not a text editor.
 
5:41 PM
Would you use emacs as an OS? :P
 
@Zirak learned about C-c C-o (for c-arglist-intro and c-arglist-close) today, saved my life
@RUJordan totally
 
@FlorianMargaine Ever messed with org mode?
 
read up about lisp machines
 
@RUJordan It has a shell implementation
eshell. It's good.
 
@Zirak kinda, but didn't have a use for it
@Zirak I use ansi-term, I need bash to remain consistent with what teammates use
 
5:42 PM
I'm really digging it so far. I'm always messing around with ASCII tables and lists and so forth, saves me from the pain.
 
@Zirak I just don't need it.
 
What's the best way to convert this datetime into local time (only): 2014-05-11 00:35:10 -07
So far everything returns garbage
 
if I ever have to write blog posts/organize agenda/etc, I'll think about it
but till then... meh :/
 
@jbolanos That looks like local time
 
5:44 PM
nvm - talked them into sending unix timestamp
 
btw @FlorianMargaine, I switched caps-lock and ctrl on my work computer. It's so awesome, even for non-emacs stuff.
 
in javascript, is there an easy way to grab the query string parameters as a string?
 
@Crow google
 
@Zirak WHY DO YOU THINK I TOLD YOU THAT YEARS AGO
@Crow window.location.pathname
@Zirak I just use 2 ctrl btw
sometimes the pinky one is handy
never have I missed caps lock though
 
Yeah, it's just for the learning period so I'll adjust to using caps-lock
After that ctrl will be back to be ctrl
 
5:50 PM
ctrl + t to open a new tab or stuff like that is just godsend tbh
 
hehe, yeah. Ctrl+W has never been sweeter
 
You have it lucky. Caps lock is sadly useful for PHP.
I switched ctrl/alt - the one thing I missed after leaving OSX for good
 
@SomeKittensUx2666 uh?
I do php every day, and never use caps lock.
 
$_POST, for instance
 
shift ffs
 
5:52 PM
I hate holding down shift whilst typing
 
oh btw, did you try switching numbers and special characters?
like, no need to press shift to get !@#$%, and shift to get 12345
 
Hm..
Haven't tried it. Might need to
 
as programmers, it makes more sense
 
It's always been annoying getting to the different parentheses, especially in Lisp likes. The pinky hurts after a while.
 
yup, parentheses are the biggest winners there
$ too in php
 
5:56 PM
!!xkcd dvorak typing speed
 
@SomeKittensUx2666 Seems like you hallucinated this comic
 
Third time's the charm
 
Dvorak...just once. Quit after an hour.
 
I've been typing in qwerty so long that I'd never bother with dvorak
 
I think learning to type on a different keyboard would be like trying to learn to walk on my hands
 

« first day (1305 days earlier)      last day (3659 days later) »