« first day (2047 days earlier)      last day (2895 days later) » 

9:00 AM
@Maurice { before add, and assign it to something
 
user3119231
@doug65536 what?
 
@OliverSalzburg Don't ever use eval. Most things you can do with eval, you can do without using eval. The rest, like dynamically declaring globals, are simply bad idea.
 
Anyone got experience with using Formidable for Node :/?
 
@Sheepy window. ... =
 
@JanDvorak hey! ah nevermind
 
9:04 AM
@JanDvorak Try that in web worker.
 
then global.
 
Yeah. We should remove eval like showModelDialog.
 
@doug65536 stop pinging me
 
@Sheepy You don't say...
 
9:06 AM
:(
 
@OliverSalzburg I stand corrected by Jan. Eval is simply sloppy job.
 
user5503464
0
Q: How to call one function from another function in express.js?

komalexports.usersignup= function(req, res) { console.log('user signed up working') } exports.addcustomer= function(req, res) { console.log('customer added') } I have two function which is exports.usersignup and exports.addcustomer .when i call exports.usersignup function it should call exports....

 
0
Q: indexOff is breaking for specific case in jquery

Ram SinghConcept: I want to add value to a string if it is not exists the string already. i tried to do achieve this by using below code: var liItems = '11,2,4'; if (liItems.indexOf('1') < 0) { liItems += '1' + ','; } in this case i am checking if "1" exists in string, but in string we have "11" n...

please help me
 
@RamSingh Where is jQuery. I don't see jQuery. Please remove jQuery from your title and tag.
 
Why you use string instead of array for liItems?
 
9:13 AM
As for that, I marked the real question as a duplicate of stackoverflow.com/questions/13313675/…
 
indexOff?
 
Could you guys perhaps also take a look at stackoverflow.com/questions/37408134/…
Pretty please?
 
And this non-jQuery question is now closed by a jQuery gold badge holder.
 
@Sheepy Help! Help! We're being repressed!
 
@StrahBehry Don't validate file extension, use file-type
 
9:27 AM
Why?
Because someone can't fake the file then
 
Because file extensions don't mean anything
 
By renaming an .exe to a .jpeg?
 
For example, yes
I'm not familiar with formidable sadly, so I can't answer your real question :(
 
Yeah I'm considering to use something else entirely
Just because it's such a massive waste and potential problem
 
We use busboy, which provides events for when form fields have been parsed, which then allows you to reject the upload before receiving all data
 
9:29 AM
@StrahBehry no, because the filename is part of the request body, and you have to receive it to check it
> Content-Disposition: form-data; name="file3"; filename="myfile.png"
 
Yeah so let's say someone derps and instead of selecting 10 jpegs
He also selects a 3.3gb .rar
 
oh that is different
 
Then it has to upload the whole 3.3gb rar and then it gets deleted?
Like it's an extreme example
 
@StrahBehry You can (and should) handle that in your HTTP server
 
But those are the cases I want to avoid
 
9:30 AM
Well, formidable seems to provide onField and onfileBegin events too... it doesnt matter which library you use, if you don't read the whole API..
 
when a browser posts a form, first it sends headers, including Content-Length... the client waits for 100 Continue before sending any post body
 
We set a max body size in nginx and the express body-parser/busboy middleware
 
your code can peek at the headeers and reject the whole request, before the body even starts being sent
 
onfield is just when the key doesn't contain a file
But a string value basically
But what if the request contains 50 valid files
 
that would have to be something in Formidable
 
9:32 AM
and one file like that 3.3gb rar to reject?
 
Oh so, finding a better documented library seems a better option.
 
lol
a formula that plots itself on a XY axis
 
ok then you've got it
if (expected > tooBig) doSomethingLikeIDKCancel()
if fileBegin and progress aren't exactly what you need, then I have no idea what you want
 
9:39 AM
It starts writing the file...
 
github.com/felixge/node-formidable/issues/373 it, says you have to override the onPart method, so that the file is not stored at all.
 
@Neoares any formula plots itself on the xy
 
@Neil have you seen the video?
 
@Neoares it should be pretty trivial to implement that as a GLSL shader
 
@Neoares no, I can't
 
9:45 AM
@doug65536 yes, at the end of the video you see that it's a little tricky
it's just a funciton that map bits
 
the extended precision is the only part that is non trivial
ah I see, it is just doing base conversion
k is the image, that formula just converts base 10 back to base 2 and reorders the scanlines
nice though, it's roughly analogous to programs that print their own source code as output
 
@AwalGarg Ooh, very interesting. Thanks!
 
that exploit modifies code pages? you should be able to drop the rights to change page protections D:
you can block mprotect for some processes in linux
 
10:07 AM
hi guys is there anyone who is familiar with ajaxcombo box
 
Is the event delegation approach better then the usual approach to bind events?
Im talking about $( "#dataTable tbody tr" ).on( "click", function() {... & $( "#dataTable tbody" ).on( "click", "tr",function(){...
which one would be best?
 
depends. The former can't always be easily used.
 
10:31 AM
@BadgerCat Hai. I've been getting a bit more serious about learning German lately, and I figured I'd ask you how you did it. Resource dump pl0x?
 
@SomeGuy you are learning Russian and German together?
 
Smash them... learn Prussian!
 
@Abhishrek I'm not learning Russian
 
Oh just went with Cyrillic alphabets
 
As I told you that day, I was only looking at the Cyrillic alphabet
 
10:36 AM
Sorry my bad!
 
Russian's definitely next. In like 4 years :P
 
@jAndy o/
@SomeGuy Ha!
 
\o/
 
Hows the game?
 
sigh I lost
 
10:37 AM
I'm losing it quiet a lot lately.. but beside from that it's fun like always
 
jAndy wins the game eternally, he makes me lose just by the thought of him :-|
Is there a way to handover sockets opened in one process to another?
 
@Abhishrek With clustering? Maybe
Just like that? Doubt it.
Although Awal or Benji are likely to give you a more definite answer.
 
Would cluster allow me to node instances with completely different code (updates, is the use case)
@AwalGarg @BenjaminGruenbaum
 
@Abhishrek I never tried that
 
10:42 AM
Well in that case I'll try it today!
I have a shoutcast like broadcast server implemented in pure node-js allows more cool stuff like dynamic audio quality "and other cool stuff". I don't want updates to kick out every listener, so the only possibility is to handoff sockets from one process to other
 
I wanted to read this (shows on Google) but it's deleted stackoverflow.com/questions/36650406/…
:/?
Thought even closed questions dont get deleted?
 
> I would like to know the difference between Multer, Formidable & BusBoy in NodeJS and which of these is more efficient?
That's the entire question. No answers.
 
Oh... Thought it was the title
:/
 
Well ignore benji and awal I figured it out
 
@SomeGuy do you know what level you are?
 
10:49 AM
@BadgerCat A2 at best. Most likely A1
 
What level?
 
I don't know, though
 
Have you been using only duolinguo?
 
I've been doing the German course on Duolingo for ~1.5 years consistently along with some of Leicht Deutsch Lernen's exercises. (They're simple stories with Q&A later)
Primarily, yeah. I realize how stupid that is :p
 
I'd actually love to learn spanish for a while, I'm just not sure about all the difference accents and nuonces
 
10:52 AM
Moving to USA?
 
like if you learn perfect spanish which is spoken in Spain, how far do you come with that in Mexico or let's say, Peru?
 
@jAndy I heard duolingo is very good.
cc @SomeGuy
 
I learned most of my German in university, you could try getting a textbook and working with that, also Deutsche Welle.
 
@MadaraUchiha To start off, it's great
@BadgerCat Ah. What level are you at, btw?
 
10:54 AM
> I teleported home last night with Ron and Sid and Meg. Ron stole Meggy's heart away and I got Sidney's leg.
 
@jAndy Mexico great/ Peru you're going to have a hard time understanding
@SomeGuy C1
 
Neat!
 
Most spoken language on the planet is still madarin isn't it?
at least some kind of asian
 
now I talk with copy exclusively in german
 
Das ist gut!
 
10:55 AM
@BadgerCat By the time you guys adopt me, maybe I'll be at that point too :P
 
Yeah :)
 
Achja...
 
Are you planning on learning any other foreign languages?
 
"Das Spiel!"
 
I would like to learn italian and portuguese just to add more languages to my list with low effort.
 
10:57 AM
teach me my first lesson, what is "The Game" in spanish?
 
Haha. Esperanto's supposed to be really easy to pick up too
 
El Juego
11
 
@jAndy You. Suck.
 
haha I'll never forget that
 
hahaha
 
10:58 AM
@SomeGuy do you ever speak in Hindi? (As in without english destroying your pronunciation)
 
@Abhishrek Yeah, of course
 
Oh perfect, Russian Pronunciation 4 year later will be a breeze then
 
Yeah?
 
You can also just play CSGO or Dota2 to practice
 
I learned the alphabet since I figured I could start getting some mindless reading practice with the alphabet and the pronunciation now
 
11:00 AM
As long as you're in Europe
 
My pronunciation is usually spotless and mostly I just write it in Hindi and read it off :P much easier to read stuff that way
 
@StrahBehry cyka blyat?
 
idi nahui
drop awp my friend
 
@jAndy when should we meet?
 
I rarely leave my cave nowadays.
 
11:01 AM
@jAndy because of the game?
 
I am still in my 30 minute cooldown dude.
 
@cswl The documentation is actually disgusting, can't find how to skip or ignore to the next file, seems it works for one file now... Which is the main use 1 file per request, but honestly it should be able to handle multiple files in one request too
 
@jAndy that was an honest question </3
 
right...
 
hi anyone knows how to read the text of a ajax combobox
 
11:04 AM
Did you try jQuery?
 
@Abhishrek not from userland with core node apis. you'd need a relay from the platform
 
@Peck_conyon Whether the box is ajax or not does not affect how you read it. If it is a non-standard box, consult the box's documentation for how you should read it.
 
yes I'm trying to read it using jquery
 
@AwalGarg Why can't I just pass the file descriptor around?
 
@Abhishrek what kind of sockets are you talking about here?
not all of them have fds
 
11:07 AM
Suppose I am connected to a socket, and am piping good and nice DeathClock
 
and FDs are platform support btw
 
a random updated process appears , I don't want to drop the socket to the user
 
@StrahBehry I'm trying to build a search drop box like google. So I want to read the text that typed by the user to load the data from the database in 'onkeyup' event
 
It might, if you don't read in a callback, .then whatever.
 
just want to pass it around
 
11:08 AM
@Abhishrek I am going to assume you are talking about unix domain sockets since you didn't answer me, so yes, FDs would work
 
ofcourse unix domain sockets, if I am talking about fds :P
 
@Sheepy I'm trying to build a search drop box like google. So I want to read the text that typed by the user to load the data from the database in 'onkeyup' event. The event is firing as expected but I can't get the value. I tried InnerText , Value etc but nothing worked :/
 
@Peck_conyon Google does not use combobox. Its search use Autocomplete. Which are you using and which is the component from?
 
@Sheepy It is AJAX Combobox in AJAX Control Toolkit
 
Hey, I´m creating a Form Component using React. Do I really need for each input field a separate "update" function to keep track of the input or is there any better way?
 
11:12 AM
!!tell Peck_conyon google stackoverflow javascript read value from AJAX control toolkit Combobox
Ok. Cap is hibernating again. That or she is ignoring me...
@Peck_conyon Try google "stackoverflow javascript read value from AJAX control toolkit Combobox". That's the best advise I can give.
 
import React from 'react'

export default React.createClass({
    getInitialState:function(){
        return {
            newUsername: '',
            newMail: ''
        }
    },
    updateText: function(e){
        this.setState({
            newUsername: e.target.value
        });
    },
    handleAdd: function(){
        console.log(this.state.newUsername);
    },
    render() {
        return (
            <div>
                <h1>Just some Form</h1>
                <input
                    type="text"
 
@cswl It starts writing the file and I think I might have found a bug bcs it just filled all my remaining disc space
was a 500mb upload and my remaining 9gb got filled even after the server crashed
like wut
823.3kb disk space left
/.config/google-chrome/Default/Storage/ext/<tons of letters>/def/IndexedDB/chrome-extension_<tons of letters>/1/ contains files for 15gb all written in the last 10mins
 
11:34 AM
@AwalGarg I actually got the Idea reading libuv (and apparently HAProxy does this)
and it works, but the descriptors must be passed in a unix domain socket or something
no idea how that works in the kernel, may you show some light?
 
@Abhishrek oh you just created a memory mapped file (mmap) and store the FD there. then ask the other process to use it. kernel does the hardwork for you here.
 
Neat, I wonder what is the "hardwork"
 
@Abhishrek you mean mmap internals? DARK. FUCKING. MAGIC.
 
yes, I like knowing what my code does
 
Hmm, one of my npm modules has an abnormally huge download count for the past month. AFAIK we're the only ones using it, and we don't even pull it from npm O__o
 
11:40 AM
@OliverSalzburg how much is huge?
 
What module?
 
@Abhishrek 4300
 
That is huge, huge
 
user3119231
I need a hint: I'm have a table with int in every cell. If I click header 1 I get following array: Array [ "1", "8", "6" ] - After sorting it becomes: Array [ "1", "6", "8" ]. My problem is that I have to switch position of the cells. How would you realize this?
 
link me :D ?
 
11:41 AM
 
@Abhishrek but anyways, why are you bothering with this instead of simple fifo pipes? they are cheap
 
@Maurice What table?
 
@AwalGarg hop onto ap rivate chat
 
user3119231
@JanDvorak html table with thead and tbody
 
11:42 AM
@Abhishrek a bit later. I'd ping you on skype in a while
 
Maybe somewhere wrote a blog post about it?
 
@AwalGarg You were going to ping me scared (What about?)
 
@StrahBehry I'm not even aware of anyone using it, except for us
 
@Maurice does [].sort.call(table, ...) work?
 
There have never been any tickets created on GitHub or anything like that
 
11:44 AM
If you Google it I see some results
 
user3119231
@JanDvorak this helped me. Thanks. You pushed me in the right direction.
 
@StrahBehry I mostly find stuff that just has the same name
 
absync (3.0.0): https://npmjs.com/package/absync absync
 
@StrahBehry I have no idea, maybe you could open an issue, if you still wanna use that library or move on to a new one.. :|
 
@cswl just cry I guess :(?
 
11:51 AM
@StrahBehry Still weird. The project is even as poorly documented as possible
 
@Maurice Can't you just update the contents of the cells with the new values, why do you have to like "switch position of the cells" , well unless you have some sort of state associated with the td elements.
 
12:08 PM
@OliverSalzburg yea, i wish the d/l stats were more accurate
the github 'unique visitors' might be some indication
 
user3119231
@cswl this won't help if the cells have an id for example
 
12:24 PM
@Maurice you making something like a spreadsheet.. ?
 
user3119231
@cswl I'm making a function which sorts my table
 
so a 2x2 matrix or a kD tree ?..
 
You don't need a kD tree to store four elements.
 
Well, yeah but I was not aware of the size of the table... then you could come up with some sort of data structure and algorithms
 
Let me put it this way: if it's too expensive to detach the old table from the document, move all rows to a new table and attach that to the original position, the table is too big for an HTML document in any case.
 
da hell is eljugo?
 
I googled, you google too.
 
ahh ffs
>:(
 
Now star and go cry in a corner
 
Not really I am playing with mailerjet's fucked up documentation right now
 
12:53 PM
I feel like fixing bad documentation could be a full-time job.
 
So is writing it.
 
*I feel like documentation for software could be a full-time job
 
I feel like fixing documentation could be a bad full-time job.
 
@rlemon I feel really stupid... same exact thing is happening again with that same girl. This is the third or fourth time. I don't know if I've learned my lesson yet, though, lol
 

« first day (2047 days earlier)      last day (2895 days later) »