« first day (2231 days earlier)      last day (2720 days later) » 

12:14 AM
Sexy 286 I grabbed today
weekend project
has a 42mb hdd in it, ready to blaze it
not sure on the processor speed yet, either 8 or 12mhz
but man pumped to get one for $60
 
Woot! Finally broke 3K rep
 
grats!
 
I'm all grown up!
Like rlemon three years ago
 
user2620028
if only lemon got rep for chat messages
 
m59
@KarmaDoe 3k lines in one file?
But really, why even bother?
 
12:26 AM
@HatterisMad I get better than rep, I get cred
 
user2620028
@rlemon no
 
you don't own me
I GET CRED !
 
m59
@KarmaDoe I do bet I could write a script to do that kind of rewrite faster than I could do it manually
 
user2620028
i bet that speaker sounds terrible haha
 
user2620028
also i just saw the price tag on it HOLY FUCK WHY
 
12:29 AM
cc @KendallFrey
@HatterisMad yea, "wat" šŸ˜›
 
open the windows you fool
 
user2620028
@rlemon ksp is starting to look really good
 
nahh, they can never take my little green men
 
god
where did that even come from
I want to shake the author's hand
 
owned by the onion
 
12:33 AM
> I was looking forward to being weightless, but gravity still works for me in space. It kind of sucks seeing all the other astronauts floating around while Iā€™m stuck on the floor.
I think it's cool that the ISS actually has a floor
weird
 
I think it's weird to not have a concrete 'up'
like, your reference frame is all you have, but it's so much smaller than ours on earth
easily turned 'around' so to speak
 
Imagine if they turned it upside down so the cupola pointed away from earth
6 pissed off astronauts
one tiny space station
 
lol
"GO LEFT!"
"WHAT IS LEFT?! YOU'RE UPSIDE DOWN!"
 
they don't have left, they have port
 
listen here fancy ship man.
it's my made up scenario, they said left
every few weeks you should check out /r/space
 
12:40 AM
I do too much reddit as is
Today I posted my most upvoted post ever
so that's nice
 
I haven't read the article yet, but +1 on the image. arstechnica.com/science/2016/11/…
 
So far Scott Manley's is the best explanation I've heard
 
neat
I love his backyard science
 
I wanna run a SQL query: return column that has a certain value but no other type of value
how do I do this.
 
Use WHERE
 
12:52 AM
jesus, how slow is their connection
6 seconds for a few kb
 
WHERE data is x but never y is what I need
 
@qaispak wouldn't WHERE data IS x be enough?
 
I have a list of teachers that teach have a data of what semester of class they teach, like they teach either in fall or spring etc. I need teachers that teach only in fall. @littlepootis
so I need Where data is not spring but then that returns teachers that could also have a spring class.
so somehow I need to search for all those that are only in fall and no other class.
 
You can also do WHERE data IS x AND data NOT IS y
 
12:58 AM
yeah but for each row obviously a class will either be in Fall or Not in fall. What I need is to return the teachers that teach only in fall.
 
SELECT * FROM Teachers WHERE season = 'Fall';
 
like I could have.
Mr Smith = comp 55 Fall.
Mr Smith = comp 44 spring.
Mr John = comp 43 fall.

In this case I would only want to return John
as John teaches exclusively fall.
 
Depends on your model
 
WHERE season like '%fall';
or something
 
@rlemon that query would return Smith too.
 
1:00 AM
@qaispak so filter further? they're different rows
 
@rlemon what do you mean filter further?
 
If it's across rows, I'd recommend filtering them in your code.
 
Does that mean make another table?
 
Not really
 
@qaispak you could return all rows, then filter out the ones (not in sql) before you use them
or you could get fancy with the query, but I'd need to know what you're using
mysql? postgres? mssql?
 
1:01 AM
@rlemon just Mysql
 
or you could restructure the tables
 
Actually I have to use this table (assignment).
 
maybe with DISTINCT
 
that wont work. I think I need to learn how to do a subquerry
 
I'd have to test out if it allows you to only grab single name entries while adding in the like clause
 
1:04 AM
if somehow there was a way to get all non spring instructors then query to see non of them have a spring class or something
 
SELECT * FROM (SELECT * FROM blah WHERE blah like blah) WHERE blah like blarg
or something
wait, that inner is supposed to be the where clause
SELECT * FROM blah WHERE (SELECT blah from blah where blah)
 
let me try that
basically I have to select teachers who teach in the fall then from those, select those who don't teach in the spring. I'll try your suggestion
 
Classic subquery
 
SELECT `ProfessorFirstName`, `ProfessorLastName` FROM `student` WHERE `semester` LIKE 'F%' AND (SELECT `ProfessorFirstName`, `ProfessorLastName` FROM `student` WHERE `semester` NOT LIKE 'F%')
this didn't work
 
1:17 AM
You don't need backticks on column/table names iirc
114
Q: Using backticks around field names

nickfAfter reading a couple of answers and comments on some SQL questions here, and also hearing that a friend of mine works at a place which has a policy which bans them, I'm wondering if there's anything wrong with using backticks around field names in MySQL. That is: SELECT `id`, `name`, `another...

 
I shall remove htem
 
up to you, it doesn't make a difference
 
but still doesn't work :'(
(not that I expected backticks to do the trick)
 
Good evening guys :-)
 
urgh.. well a friend just taught me left join technique to do it
my mind is numb but it works
 
1:32 AM
Does anyone have an idea why $interval doesn't work in my controller in AngularJS - pastebin.com/jdw5MzMu . It doesn't log anything in the console at all.
 
I could be wrong as I don't really know angular but I presume interval is a number? looks like you have it passed as a string?
Could be wrong :-)
 
@DareDev1l Is your controller loaded?
 
$interval is a built-in service in angular, and that's how you pass dependencies in angular as far as I know, I am new to angular as well though, so any clues and hints are appreciated.
Yes my controller is loaded because the data in someVar is displayed on my html
 
Hmm, can you log before the interval?
 
let me try
Hmm I can't
 
1:42 AM
On line 15 you have a double semi-colon
Remove that
 
I will try to incerment a variable and display it
 
If the log doesn't show, I doubt it'll increment
 
You are right
It doesn't increment
 
@SterlingArcher doesn't make a difference
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; is valid
the jit just sees past it all
 
well shit
 
1:48 AM
if you think about what ; does it makes sense
 
It's true, I noticed double semicolons in other controllers and they work perfectly
I tried injecting $interval into all of my controllers and it doesn't work in any of them
Is it possible for the services to mess up with my $interval, because in SomeService I load $http and post get requests to my web api
 
Can you pass variables when calling a function with an event listener?, example ` canvas.addEventListener("mousemove", this.on_mousemove(x,y,z), false); `
I don't really want to clog the global scope inside my class, but I need to use a function for my event listener, though maybe I could use an anonymous function
 
@lix using .bind you can
but it preseeds
canvas.addEventListener('mousemove', this.on_mousemove.bind(this, x,y,z),false);

then the function signature would be on_mousemove(x,y,z,event)
but x,y,z are then ofc relative to when you make the bind.
 
Ok guys, sorry for troublind you with my problem about the $interval. I fixed my problem :)
 
Ahh cool, didn't know about this method @rlemon
 
2:01 AM
Function.prototype.bind is crazy useful in a handful of situations
 
I just hate the idea of making tons of global variables to solve something that should be passed
 
you could also do...
.addEventListener(event, (function(e) {
  const x = blah, y = blarg, z = poop;
  return function(bar) { ...  use x,y,z }
})(e), false);
 
Turns out that whenever I started the server, the browser cached the MenuController.js and it didn't even load the code I wrote with $interval. After I refreshed with Ctrl + F5 it all worked, I never felt so stupid by now...
 
m59
2:22 AM
dern. Stuck on a Ramda thing again
R.reject(v => R.isNil(v.foo))
How do I do that without the anonymous function?
dang I SUCK
as soon as I type it here it clicks
 
@Loktar @KendallFrey i.imgur.com/fR36Mss.gifv
 
m59
R.filter(R.has('foo')) I think
 
> Weā€™ll be shipping Oculus Touch very soon! Please take a moment to check that we have your correct information on file.
Got this today
I wonder when it will ship
Dec 6 probably
 
yeah something like that
or dec 2nd?
 
@Loktar That would be cool. Why 2nd specifically?
 
2:30 AM
no idea lol I just thought that was the original date
guess not
I didnt get that email :?
when did you get it like super recently?
 
hah #winner
I got it 3 hours ago
 
ah ok
well if youg et touch first I'll be ok with it :p
you waited a while for the rift
 
I was just about to say I hope I get mine before you get yours
Having something that Loktar doesn't is a rare experience.
fuck me I'm writing some ugly code right now
 
hah
sorry was in a round of overwatch
lol but yeah if you get them you will have to give me the lowdown
 
is it true that you can give people the finger with it
 
3:11 AM
yea
hah I got the email too
at 6:23
I wasn't left out!
 
@Loktar oh f u :(
6:33 for me
 
haha
wait no sorry I lied 6:36
you still beat me
 
wooooooo
 
I just hope there are some kickass games
the vive experiences while awesome are so short
hoping Oculus has some more meaty ones
 
 
1 hour later…
4:23 AM
what about the playstation vr?
 
its not bad
esp for the total investment
its about 50% of the investment of a Vive or Rift
and is actually pretty damn good overall compared to the two
 
4:52 AM
I am seeing a very strange behavior
I am passing an object to a function and then adding property to it so that it will be reflected everywhere
But when I add function to that object it is not being added while string and plain objects are being added succesfully
Am I wrong somewhere else?? Or is this some scope binding issue
 
Can you show some code?
 
    init:function(hookRecipe,pluginName,hook){
        var x =function(){
                return console.log;
        }
        hookRecipe.Data.widgetArea = {
            testing:x,
            resting:"D",
            fasting:new Function()
        };
}
 
@ankit31894 Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
I want to change hookRecipe but only resting property is being set
 
5:34 AM
Can someone tell me if I'm handling this the best way?
I have a script that makes a popup and the popup uses jQuery. So, the idea is, people link to the script and then call a function that is in the script to make the popup come up.
The file they link to will have something check to see if jQuery is loaded, then if not load it and loop to check every 5 milliseconds if it's been loaded until it is, then once it is load another file which has the function with the popup.
The thing is, if people just have it called right away it won't be defined yet because it didn't load the file with the function in it yet. So, what I did is put in the same file a function with the same name waits 5 milliseconds and calls itself so the function will continue to call itself until jQuery is loaded and the file with the function of the same name is loaded and replaces it so it doesn't call itself it calls the new function.
I don't know if any of this makes sense but here is a jsfiddle jsfiddle.net/ufhnfqyd
The makeitpopup(); uses jquery to make a popup
 
load Jquery, then load your script, this way JQuery will be available
then on DOMContentLoaded event you could trigger that makeitpopup()
 
What I am worried is that the person linking to my script will already have jQuery loaded, and loading it twice could have some problems
And they might not want the makeitpopup() function to happen until a button is clicked or something.
 
I dont think loading it twice will make any difference but I think someone else with more expertise should comment on that
 
I had read that it may cause errors :|
It would be so much simpler if it wouldn't!
 
5:45 AM
I think the way I do it should work but I don't know if it is bad to just replace the function like that..
I will post a question I just have no idea how to word the title of the question lol
 
6:14 AM
Hi, I've worked with AngularJS for a while. Is it fair to say: $rootScope and $scope are view model (VM) and variables (objects literally) made globally by AngularJS framework. While $rootScope is application wide, $scope is module-wide and it is binding to the scope/context wherever an ng-controller is defined. To communicate between 2 controllers (obviously different scopes), we need to call $scope.broadcast() method to send the value over. ?
 
depends on the relationship between the controllers
and you should almost never use $scope anymore
and sending messages on $rootScope is generally a bad time :(
 
okay, how's about my first 2 lines?
Are they correct in the way I understand ?
Oftentimes, in the interview, you get asked for explaining the MVC in AngularJS framework and what are the $rootScope, $scope literally?
I know the framework takes use of Declarative approach but I need to directly relate my understanding and answers to those kinds of questions, to be specific.
 
@phenomnomnominal do you have any angularjs example that demonstrates MVC ?
 
@FlyingGambit are you asking me? I've apps delivered but I need to validate my understanding and get the ideas across in a right way
 
6:30 AM
@PristineKallio I was actually asking phenomnomnominal but please share if you have something which I can use as a guide. I am kind of new to angular Js and still learning the ropes
 
hi i have a tinymce editor plugin cnfigured for a textarea, and i am creating this editor on click of a button using DOM element creation. When i create the DOM element, tinymce generates its own dynamic classes and hidden input text box. As of my requirements i need to get the hidden input value using query selector. But still i am getting undefined. can any one help me out in this?
 
7:06 AM
Hi, has anyone used webRTC here ?
 
7:44 AM
@waseem
 
@Hacky 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.
 
is there a way in d3.js to recall the function d3.json()
 
jquery caches the dom somehow. Use .find() to find just newly created elements
@andy
I looked into toxbox. vanilla webrtc is a pita.
 
8:22 AM
data instanceof $ <---- what does this means ?
check if data is a jQuery object ?
 
@Hacky @Hacky have you worked on webrtc beore ?
 
@Mathematics yes
 
8:50 AM
why are so many contracts with agencies these days?
 
9:05 AM
@SuperUberDuper why not ?
 
what would companies want to pay 2x your day rate to hire you via proxy?
and why would I want to work for such agency when it seems they are like sweat shops
 
@SuperUberDuper Because then it's easier to get rid of you
At least that's how it works here. Employees are protected from random layoffs while contractors are not
Also, contractors are easier to swap out if your needs change
 
I always thought it's common sense to answer question you are asking :/
I have an array of objects, how can I add another property to array while also converting it into an object :)
 
What?
 
I have an array of objects, how can I add another property to array while also converting it into an object :) I don't understand what you try to achieve?
 
9:19 AM
Yes, I am having this problem since yesterday, let me create a fiddle
 
Given a collection of objects, you want to add an extra property to each obj of the array ?
array = collection
 
@PristineKallio 20 years ago
 
when you have similar set of objs
 
@PristineKallio I would like to add a parent object to collection
 
@Neoares ? I just want to relate that to ensure smooth understand on the OP's end.
understanding *
 
9:20 AM
@PristineKallio it is helping, thanks :)
 
so, you want to push an extra obj to the collection?
 
yes, but it needs to parent of already objects in collection -- not parallel to them
 
ok, so like this var collection = [obj1, obj2, obj3]; // and you want parentObj = { key1: obj1, key2: obj2, key3:obj3} ?
 
something similar, 1 minute creating a fiddle :)
 
needs keys for those objs to land in a parentObj
ok
 
9:28 AM
var dataFromServices = [{
  "ID": "27_3",
  "Name": "A",
  "children": []
}, {
  "ID": "27_1",
  "Name": "B",
  "children": [{
    "ID": "27_2",
    "Name": "B.1",
    "children": []
  }]
}];

// This is what I want

var dataFromServices = {
  "ID": "0",
  "Name": 'Root',
  "children": [{
    "ID": "1",
    "Name": "A",
    "children": []
  }, {
    "ID": "2",
    "Name": "B",
    "children": [{
      "ID": "3",
      "Name": "B.1",
      "children": []
    }]
  }]
};
 
That makes absolutely no sense
 
Already some mutation to Name and ID props
They look like 2 set of different data to me.
Can you simplify the problem, the data furthermore? like my given example ?
 
9:58 AM
sorry that was typo mistake, let me fix it please
does this makes sense now
var dataFromServices = [{
  "ID": "1",
  "Name": "A",
  "children": []
}, {
  "ID": "2",
  "Name": "B",
  "children": [{
    "ID": "3",
    "Name": "B.1",
    "children": []
  }]
}];

// This is what I want

var dataFromServices = {
  "ID": "0",
  "Name": 'Root',
  "children": [{
    "ID": "1",
    "Name": "A",
    "children": []
  }, {
    "ID": "2",
    "Name": "B",
    "children": [{
      "ID": "3",
      "Name": "B.1",
      "children": []
    }]
  }]
};
so you can see what I added here,

"ID": "0",
"Name": 'Root', and placed objects as childrens
 
var data = {
	ID: "0",
  Name: "Root",
  children: dataFromServices
};
You vamp such trivial stuff, maybe you should read a book.
 
10:15 AM
Oh please, reading is for nerds!
 
@OliverSalzburg only if you know how much I read :/
 
dataFromServices.children.push({})
 
1 message moved to Trash can
@NASH Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
dataFromServices.children.push({
	'name' : 'abc',
	'xyz'  : 'abc'
})
 
10:19 AM
yes
10
Q: Add new object to array

user1219627I currently have the following code: var myArray = []; var myElement = { id: 0, value: 0 } myElement.id =0; myElement.value=1; myArray[0] = myElement; myElement.id =2; myElement.value=3; myArray[1] = myElement; The problem is that when I change ...

 
That's not what he's asking.
 
then what hes asking for?
 
Read the question maybe?
 
which one/
there are many above?
@Mathematics post your question again.
 
Why? It's sorted
 
10:23 AM
when?
 
@BenFortune yes, when :S
@NASH I don't mind but people will get annoyed if I keep reposting, sorry, let me find link to chat history
1 hour ago, by Mathematics
I have an array of objects, how can I add another property to array while also converting it into an object :)
 
But given your sample data, that's not your question.
 
@BenFortune I am not sure what I can do to improve my question as I even created fiddle now
 
@Mathematics did you find solution?
 
10:27 AM
hmm okay. So you need to change parent, which effecting any child node? correct?
 
That fiddle is bad and you should feel bad
Posting two sets of data into the JS box and writing "this is what I want" into it, that's not a fiddle
That's a load of garbage
 
He's posted worse
 
hello guys
can someone give me a hint
 
@BenFortune I like construct criticism, thanks
 
10:29 AM
how to disable bootstrap modal on desktop and enable only for mobile ?
 
It's not constructive, I'm just pointing it out.
 
@mcmwhfy Set it to display:none in a media query
Seems stupid though
 
@mcmwhfy You could add .visible-sm to your modal
 
@BenFortune I never knew we could do it the way you showed me, thank you
 
media query is not an option
is based on width
so if you'll resize browser ... will not work
 
10:32 AM
@Mathematics No problem, but you definitely need some work on explaining your question/problem.
@mcmwhfy Then you'll probably need to check the user agent
 
@mcmwhfy You're suffering from a bad case of the Xyproblemitis
Freudian slip
 
@BenFortune done that but I don't feel this is the best solution :)
 
:34239444 lol almost stared that one
 
@mcmwhfy Why do you want to disable it?
 
@BenFortune because on desktop I have some hover effects that bring me the info that I need
but for mobile we don't have hover so I preferred modal to show my content
 
10:37 AM
<div class="modal fade hidden-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
     <div class="modal-body">
    ...
      </div>
      <div class="modal-footer">
hidden-lg
 
@NASH is based on size ...
 
 
@NASH nope, I'm telling you
is based on size so if you resize browser will not work
 
then you can apply javascript on resize,
$('#myModal').on('resize', function (e) {
  if (window.innerWidth < 800) {
    return e.preventDefault();
  }
})
 
@NASH He doesn't want it to be based on size, he wants it based on device.
Which is backwards
 
10:41 AM
device category in bootstrap are xs,sm,lg.
and for speciic width we have media query
 
No, those are based on media queries, which are based on the width.
 
tell me one thing, why we are putting resizing approach, when a specific mobile can only transform into landscape mode or default mode, resizing is only for desktop and he doesn't want modal on desktop..
 
@BenFortune you are right, but it only happens on SO, I don't think I had this issue in real life ever :)
 
then go for viewport. it will help.
 
@BenFortune It is incredible that the bootstrap don't have some specific data attributes only for mobile
and not based on size
 
10:45 AM
How surprising!
 
@mcmwhfy Because those are usually handled by the server using the user agent
 
yeah
I don't know how to fix that :(
 
Not going with a well established design approach because "the user could just resize their browser" is a clear sign that you're on the wrong path
 
@OliverSalzburg eaxtly
xatly
:p
 
10:47 AM
Your design should be guided by the availability of screen real estate, not the tools the user has available. Relying on hover to convey information, in general, is considered sub-optimal
 
@OliverSalzburg how come ?
 
Usually, it is not clear to the user that there is hidden information which would be uncovered through hovering over an element. Users should be given a clear indication that additional information is available
 
@OliverSalzburg 80% of desktop menus are played by the hover
if you gave a very sophisticated page, you should use what you have
 
Progressive disclosure is an interaction design technique often used in human computer interaction to help maintain the focus of a user's attention by reducing clutter, confusion, and cognitive workload. This improves usability by presenting only the minimum data required for the task at hand. The principle is used in journalism's inverted pyramid style, learning's spiral approach, and the game twenty questions. == Definition and term use == Progressive disclosure is an interaction design technique that sequences information and actions across several screens in order to reduce feelings of being...
@mcmwhfy 80%? You got some hard data to back that up?
Or is this the typical 1-person, based-on-my-own-experience kind of study?
 
@OliverSalzburg is like on political studies, is a big difference between theories and real life
 

« first day (2231 days earlier)      last day (2720 days later) »