« first day (1942 days earlier)      last day (3000 days later) » 

12:06 AM
!!afk Beer, wings, and dirty things.
 
user2620028
Question for anyone who has done hiring before. If someone has several (3 or more) jobs listed on their resume in the span of a month or two is this a big red flag to you?
 
Hi Anyone knows any helpful post regarding ..implementing unit testing in mvc architecture in single page application
 
12:29 AM
0
Q: How to handle an firebase web app when you start it in offline mode?

KasperSo I heard that firebase has no real out of the box support for starting up a web app in offline mode. Say you have a Todo Web App. You can login to google or something, and then the todos are saved under the uid to firebase. So that if you open the app on whatever device, the todos will always ...

 
@towc you would go back to the way I recommended, probably :P
 
@KendallFrey which would be? I still have no idea why the unit vector values are arranged in that way...
 
12:48 AM
@towc If you look at a simple linear transform (no translation or perspective), it can be represented by two vectors, (1,0) and (0,1) here the green and blue corners of the unit square. These vectors correspond directly to the columns of the 2x2 matrix representation of the transform.
 
so I just multiply that 2x2 matrix by a standard 2d rotation matrix to get my z in as well?
 
the third column of a 3x2 matrix is the origin vector, or (0,0) (the red corner)
 
yeah yeah
 
@towc you can only rotate on one axis in 2D
 
@KendallFrey yeah, z
 
12:52 AM
the way you extend this to 3D (if you're still rendering a rectangle) is you add a dimension to the vectors
so (1,0,0) and (0,1,0) and (0,0,0) are your 3 vectors then
 
isn't it the case that if you multiply a transformation matrix with another the result will be a transformation matrix with both effects?
 
you can apply the desired rotation to them in 3D space, then drop the Z axis from each vector to get back 3 2D vectors, to make your matrix
@towc yep, in a specific order
 
so my transformation matrix now is a 3x3 that includes translation and rotation on x,y, right? to add z I just multiply that matrix to a 3x3 with only z-rotation and no translation
 
however, there is no 2D matrix to represent a rotation about the X or Y axis
 
@KendallFrey but we have a hacky one that does the job
well, the one you proposed
 
12:55 AM
one what?
 
that one successfully does x/y rotation
 
that doesn't actually represent rotation on x or y axis
it might represent a 2D projection of one
 
which is what I'm interested in
 
which just results in a warped 2D linear transform
you can't do math on 2D transforms as if they were 3D transforms
 
now I just multiply it by the matrix I'd use for rotating in the z and I'm good, right?
 
12:57 AM
I don't think so
but maybe
 
the effects should just add up
 
I'm still suspicious of that x/y one
 
const {name, permission} = req.body;
const id = uuid();
client.sadd("game-"+id, req.session.player.id);
client.hmset(req.session.player.id, req.session.player);
client.hmset(id, {
    "name":name,
    "permission": permission
});
So I think I'm confusing myself here
I'm tying to setup my redis structure, and I'm trying to give my game metadata
 
@KendallFrey again, it does seem to work
 
name, permission. But it's tricky because redis.keys iterates EVERYTHING, hence why I gave it the game- for a matching pattern
 
1:03 AM
@towc Yeah, I think the reason I found it odd was the rotation precedence wasn't explicit so it was hard to spot
If you'd just use quaternions (or even matrices), you wouldn't have to use sin/cos at all :)
 
apparently just applying the z rotation to what you called _x and _y and then using their .x and .y works for z rotation too
no need for multiplying with another further matrix, even if in the end that's probably what's happening
 
1:23 AM
 
and I doubt I'm going to remember this @KendallFrey, but it works ;)
mat = [
  		[ rot.y.cos * rot.z.cos - rot.y.sin * rot.x.sin * rot.z.sin, -rot.x.cos * rot.z.sin, sx ],
		[ rot.y.sin * rot.x.sin * rot.z.cos + rot.y.cos * rot.z.sin, rot.x.cos * rot.z.cos,  sy ]
	  ]
 
@towc in that extreme case, you might was well not even use a matrix and just pass it directly to the canvas
 
?
this is the matrix that gets passed to setTransform
 
1:42 AM
using a lodash function like _.includes(myArray, 'testString'), is there any easy way to make that comparison case insensitive?
because _.includes(myArray, 'testString'.toLowerCase()) is easy enough for the test string, but how can I get in there before it's comaring the current array element?
 
hallo people
 
@MichaelMitchell Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
so ive seen that you can download a file from a nodejs server to the client
but can you download a file from an external url to the client?
 
oh man finally nailed it
 
2:10 AM
@ssube when you get a moment, can you peek at my hash creation and how I'm accessing it? I'm worried that I'm just randomly grabbing metadata and it's not attached to the db properly
I mean it's working, but I can't tell if it's the "right" way
 
2:23 AM
Just got 2GB free gdrive space
> 19 GB total storage
> Your plan 15 GB
> 2016 security check-up bonus 2 GB
> Security Check-up Bonus 2 GB
Heh
@MichaelMitchell of course, look it up
 
@SterlingArcher any reason you implement uuid yourself?
 
2:48 AM
(r&0x3|0x8) @SterlingArcher explain that to me ?
 
@phenomnomnominal @Abhishrek just a function I found on Stack
 
@SterlingArcher use node uuid :->
 
I don't wanna lol
 
vOv k then
looks good
 
The [potential] issue I'm worried about is the orders not matching. So I could be giving the wrong game data to a game lobby
 
2:59 AM
the create game part
 
hey
 
		let keysAsync = Promise.promisify(client.keys, {context: client});
		let smembersAsync = Promise.promisify(client.smembers, {context: client});
		let hgetallAsync = Promise.promisify(client.hgetall, {context: client});
@SterlingArcher wat ?
why aren't those things in ../server.js ? where you export client ?
 
Because until now I havent needed them
So I figured there's no need to promisify until needed
 
ah
why won't the order match ?
 
Well, as far as I know objects aren't ordered, right?
 
3:03 AM
yes
 
So theoretically, it could be iterating game-[uuid] and metadata-[uuid] and matching them up improperly
And if I run a check, and they don't match, it would just skip?
Or am I completely off here
[ { game: 'game-b74cdcdc-faf3-4df6-b5cc-804cd752fb7b',
    players: [ '34' ],
    meta: 'Derp',
    metaid: '51be9306-441b-4829-9266-91387f613bde',
    permission: 'false' },
  { game: 'game-51be9306-441b-4829-9266-91387f613bde',
    players: [ '34' ],
    meta: 'Lobby',
    metaid: 'b74cdcdc-faf3-4df6-b5cc-804cd752fb7b',
    permission: 'false' } ]
fml I was right
 
@SterlingArcher shouldn't you be matching them by hand ?
 
What do you mean?
 
			const combined = games.map((game, i) => ({game, players: players[i], meta:data[i].name}));
instead of that
iterate in data to find the correct metadata by id ?
const combined = games.map((game) => ({ game, meta: data.filter(d => 'game-' + d.uuid === game.uuid )[0] })
sorta thing ?
 
Well, metadata is another redis db entry
But I think you're onto something, hang on
 
3:42 AM
let combined = [];
games.map((game, i) => {
    const metakey = await keysAsync("*metadata-"+game);
    const data = await Promise.all(metakey.map(meta => hgetallAsync(meta)));
    combined.push({
        game,
        players: players[i],
        meta:data[i].name,
        metaid:"metadata-"+data[i].id
    });
});
For the life of me I can't figure out why it's throwing a syntax error on const metakey
Can you not have await in an arrow function or something?
 
4:01 AM
Probably unrelated, but why no template string?
`*metadata-${game}`
 
forgot about template strings lol
 
lol?
 
@Abhishrek your method worked, I completely missed what the filter was looping. Nice solution
 
hello can you help me about upload file with common.fileupload?
 
Never used it, but whats your issue?
 
with who are you talking?
can we make chat private?
 
I'm too tired to do a private chat
Just ask your question here, and those who can and are willing will help
 
@SterlingArcher nice
!!youtube suzy caravan palace
 
@DickyMahardika this is the JavaScript chat -- please take your question to the Java chat or the main site
I can almost guarantee nobody here knows your answer, if they even care/know Java
 
4:52 AM
<%@ page import="org.apache.commons.fileupload.disk.*" %>
<%@ page import="org.apache.commons.fileupload.servlet.*" %>

how can I get that .jar? I have error
 
@DickyMahardika This is JAVASSCRIPT
 
That looks like either asp or java
 
12 mins ago, by Dicky Mahardika
http://www.java2s.com/Tutorials/Java/JSP/0130__JSP_File_Upload.htm read before
It's Java Server Pages (JSP)
 
Java != Java // try it :P
also
Java !== JavaScript at all
 
4:55 AM
what?
 
You are in the wrong room
 
@DickyMahardika this is the JavaScript room, not the Java room. Please take your question elsewhere

Java

Dedicated to the discussion of the Java programming language a...
here, for example
 
Why is there no Room Owner in this timezone ?
 
because non-american times are lonely
also can't we get Cap to kick anyway?
 
This room needs an RO in my timezone
 
4:57 AM
^ agree with that
 
feel free to propose one
 
> I have been told I will get 1000 INR worth books. Somehow I go out of station and when parcel came I didn't get it. I finally return voyage within week. For next time you found any trouble like this never trust support. Return the product at same time. I am more happy with return it than buying it.
Review for Kindle
Claiming Amazon is Cheating Them -_-
jesus
 
not even he can help those who infer the wrath of amazon
 
I was gonna kick but he was suspended lol
 
You should be able to ping ROs
cause I'm lurking
 
5:13 AM
16 mins ago, by Quill
also can't we get Cap to kick anyway?
isn't that a thing too?
 
Hello, everyone. Had a problem that wouldn't really be on-topic on SO (asking for off-site resources, etc.) but the Javascript community would be most fit to help me...
 
shoot
 
At work our software's frontend is a dinosauric C++ application. It listens to data on hundreds of ports, i.e. port 24000, 24001, 24005, 24010, etc. to get its data (it's a trading platform, so there's bids, asks, executions, last trades, etc.) I was wondering if I could convert it to a Javascript-only, browser-based frontend, because it is so darn ugly the way it is right now.
I thought running a Node.js server might be a starting point, but I found out Node.js can only listen to one port at a time, if I understand correctly.
Does it seem possible to do what I'm trying to do?
 
you could run multiple node instances
 
Is running hundreds of instances an acceptable thing to do? (Overhead?)
 
5:25 AM
probably not
23
A: Using node.js to listen on 2 different ports

ShalldökJust create another instance of http and put it to listen to the port you are interested. Let me show you an example: var http = require('http'); http.createServer(onRequest_a).listen(9011); http.createServer(onRequest_b).listen(9012); function onRequest_a (req, res) { res.write('Response fr...

 
Thanks. I guess I'll just have to try it and see...
Anyone wanna namedrop any other technologies that might be even remotely related to my task, so I can do some research? :-)
Welp, no worries. Thanks for reading, and thanks @Quill.
 
np
 
hey guys any1 alive?
 
yo diggity
 
guys i have a strange question... im not native english speaking... and really familiar with EU/US comporation culture and stuff... can some one please take look at my CV and tell if its ok or really bad?
 
5:44 AM
I know this source is java
but thoughts on this ?
      Item itm = new Item(prodName,count);
      for(int i=0; i<items.length; i++){
          if(items[i]==null) {
              items[i]= itm;
              i=items.length;
          } else if(items[i].compareTo(itm)>0){
            //shift
            for(int j=items.length-1; j>i; j--)
               items[j] = items[j-1];
            items[i]=itm;
            i=items.length;
         } else if(items[i].equals(itm)){
            items[i].addStock(count);
            i=items.length;
         }
 
whats the problem?
what is the ide of this code? what should it do?
 
1 what if the array is full ?
oh add items to array, and shift to keep order
this will do silent errors, if the array is full also i = items.length instead of break ? WTF ?
 
is it ok that you create an Item instance not in the loop?
 
yeah thats fine
 
is this your code?
 
5:47 AM
I think it would be better to create a new array and just move objects to it
Nope xD
 
i think this code is bad
 
reviewing someone elses
 
just kill it
say that this shit will not pass
i=items.length; can be used like once after if statement
it repeats 3 times
 
nope it can't
 
why? right after the end of if statement
before the closing for loop
try it wont break anything
 
5:50 AM
it will
if the current object is at right place it will kill the loop instantly
 
u got an if statement with 3 variations... at end of each if statement u have the same code line... if u remove all this statements i=items.length; ... and place before the loop closes the code will remain the same logic man
reallly
and the thing is that this code fills the array with the same values always
all elements of array are absolute equal to each other ===
except for the last statement
it does something else
u should pass this review man )
shoudnt
 
:P
 
guys i have a strange question... im not native english speaking... and really familiar with EU/US comporation culture and stuff... can some one please take look at my CV and tell if its ok or really bad?
https://careers.stackoverflow.com/cv/employer/157421 please help
please guys help getiing me my dream job :)
ill help with JS no problemos
 
6:07 AM
@mikrowelt Page Not Found
 
sorry that should work
 
6:19 AM
any help with CV guys this link should work careers.stackoverflow.com/mikrowelt
 
The term for every class in Java can be seen as Object is Inheritance right ?
or <something else term> ?
 
cant quite get the question can you refrase?
 
Is there a technical term for instances of All Classes can be treated as instances of Object ?
 
for JavaScript yes
dont sure about Java
 
> I'm the best
That's a very hard thing to prove
 
6:30 AM
@phenomnomnominal should iremove that part?
i think ambitions is good too no?>
 
What is the term called
Inheritance ?
 
Ambition would be "I want to be the best"
"I'm the best" is arrogance
 
@Abhishrek, do Java instances of classes(with out inherinece) have same baisc methods like toString or something that are not implemented in the class it self?
@phenomnomnominal, ok ill remove that part
 
yes vOv
 
@Abhishrek, if they do have basic methods that i think yes its inherience
they all inherit same properties from some base object
@phenomnomnominal, and what do you think about it overall except for "the best" part
 
6:36 AM
Didn't read the rest, just saw that bit
 
^ Lol
Rep so high he breaks the layout
 
xD
 
lol EricLippert does the same
 
6:51 AM
Someone needs to suggest meta guys to convert taht number of medals to k
notations
and for Jon skeet now we will soon need an M notation
 
hi
i am trying not to apply css webkit scroll bar on my browser scroll
but i am not able to
 
this wont working crossbrowser/platform
 
i want to css the scroll to my left hand navigation
its fine
but u know how to do it?
 
what have you tried?
 
i used the webkit css and the css is applying to all the scroll baRS
i want to css only to my left hand navigation scroll bar
 
6:56 AM
can u provide some code or exmaple code would be better
i mean css
 
1 message moved to Trash can
@TahaDhailey 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 or pastie.org
1 message moved to Trash can
@TahaDhailey 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 or pastie.org
 
try adding it to body or html tag
i mean the pseudo selectors
 
i did
 
ctrl +a, ctrl + k
::-webkit-scrollbar {
width: 6px;
}

::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
}

::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
 
7:00 AM
@mikrowelt yes
 
@TahaDhailey did it help adding the body tag to before prseudo selectors?
didnt help?
 
No
it didnt
 
body::-webkit-scrollbar {
width: 6px;
}
like this?
 
the body scroll bar is accesed
 
@mikrowelt btw impressive resume (I just finished reading it thoroughly)
 
7:01 AM
and the css is changing
 
Only thing I can add is maybe codepen if you are more into doing crazy things with css / js
or maybe a few blog posts you have written (if any). If not its still impressive :P (works experience)
 
@Abhishrek, really ? you like it?... yeah im working right now on speacil demo project with comments tests and tough logic
 
@mikrowelt dont want any css to bady scroll bar
 
using BEM and stuff
 
7:07 AM
scrollbar solution
@TahaDhailey
 
Why does wikipedia still not have a quicklink thing for headers?
 
@mikrowelt i have been through this link
i can i prevent css the body scrollbar
>??
can u help me with that
 
can make a working exmaple on fiddle maybe?
or not working so i can help you there online
 
ok
@mikrowelt
check this
when i open my menu there is a scroll bar i just want to css that scroll bar not the right scroll bar of the browser
 
7:57 AM
@TahaDhailey did you see excmplae i gived you before
you didnt even use it
its woprking exmaple already just implement it in your code
guys
really what you about angular?
and i hear new ideas like OOP suxx and inherince suxx
im so mad at this that talking this to me right know on irc)
kids lol 15 years old only angular
 
I tried to understand if there was a question in there @mikrowelt, but I couldn't.
Can you rephrase?
 
I find it amusing when new devs in game dev chats talk about how they want to protect their games source code.
 
im like in an irc chat about JS... and like was talking to ppl and they say that OOP suxx and inherince suxx and bla bla
 
@mikrowelt Yes well, one "pro-tip" that I'd like to share with you regarding this. Anyone who has extreme opinions and doesn't seem to weigh any pro/con according to your situation can be ignored completely. They're ranting idiots. Any technology and choice has both pro's and con's and you weigh them to make a choice. There is no golden standard, and almost no technique is inherently bad.
3
 
@RoelvanUden so much this
 
8:12 AM
i was having a conversation with them asking why they think like taht and they didnt answer any thing they told that OOP suxx becouse we dont private method
and we should work in smalltalk style
 
pro-tip: not everything you hear on the internet is true.
 
Ignoring those types of people makes programming life better. :-)
 
Is that a paradox? I guess it could be.
 
Hahaha indeed, it could very well be.
 
@rlemon your fast metaballs + liquidfun === real water!
(or almost as close as you can get)
 
8:15 AM
@Abhishrek don't tell the Navier-Stokes equations that, I hear they're pretty sensitive
 
Should make a demo*
the wave demo with his metaballs
 
@Abhishrek Noice!
 
:P although
i will not play against you xD
cause if you get mad you can kill the server
 
I might have a little peek :P
 
8:38 AM
@phenomnomnominal I beg to differ.
 
@FlorianMargaine well now you've done it
 
@RoelvanUden err, I'm sorry, but this is wrong
there are inherently bad techniques
case in point: xhr's async: true
@phenomnomnominal è_é
 
@FlorianMargaine to be fair, they did say almost no
 
@phenomnomnominal that's fair. But I believe there are many inherently bad techniques.
case in point: your mom.
 
@FlorianMargaine I said almost no techniques, but why is that bad? You're just assuming things based on your scenario right now. Both synchronous and asynchronous XHR a place.
 
8:40 AM
Such as being french.
@FlorianMargaine your mother has excellent technique.
 
@phenomnomnominal I'll take that as a compliment.
 
omaigawd I cant type
 
@FlorianMargaine she did
 
@RoelvanUden no, both don't have a place. I will hit anyone with a stick thirteen times that uses async: false.
phrasing might be fucked up ^
 
@FlorianMargaine I've used it for good reason. ;)
It has cons, sure, but pros too. Hence my earlier statement.
 
8:42 AM
@RoelvanUden remind me to hit you when we meet
 
async: false has a place when the person writing the backend fucked up and you have to release tomorrow :P
 
@phenomnomnominal I'm pretty sure you're jealous because I can use accents to have smileys.
 
@FlorianMargaine I use synchronous XHR to mock require in the browser to avoid having to have a bunch of build tools and pipelines to combine files and shit. That's a completely valid scenario and usage of synchronous XHR. You're just assuming I'm using it for production sites and therefore call it "bad", but as I said earlier, almost no technique is inherently bad. It depends on how you use it.
 
@FlorianMargaine 100%
 
(During dev, of course)
 
8:45 AM
@RoelvanUden sounds like you need to use System :P
 
3 mins ago, by Florian Margaine
@RoelvanUden remind me to hit you when we meet
 
I don't need to use anything. If I want to keep the libraries I use small, and am putting together something I need to iterate fast on, I can use TypeScript's import as CommonJS modules and have it work without additional compiling. But this is truly a good case-in-point for @mikrowelt. Statements like ^ should be ignored completely. Sorry @FlorianMargaine.
 
that's still not a valid use case
 
Of course not, almighty-one, thee who are the only one that gets to decide on how others approach programming problems ;)
 
user4883426
hi everyone :) can anyone help me with this problem? stackoverflow.com/questions/35214817/…
 
user4883426
8:54 AM
0
A: How can i call onerror() callback for an <object> SVG tag in Chome only

GavrielIt works with img and by drawing on the canvas, not appending it: //note the "X" at the end of the url to make it invalid. //removing it you'll see the pinguin url = "https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Tux.svg/662px-Tux.svg.pngX"; var mycanvas = document.getElementB...

 
@FlorianMargaine lol
 

« first day (1942 days earlier)      last day (3000 days later) »