« first day (1989 days earlier)      last day (2952 days later) » 
00:00 - 19:0019:00 - 00:00

12:09 AM
Installing a Ubuntu installer: complete.
 
 
2 hours later…
1:52 AM
Anybody online?
 
2:07 AM
lmao
yeah
just loved the 2 hours later the system put in
 
I need a bit of help
I'm running a node.js server and when I try to append something to the body of the webpage it returns, it gives the error Error: browser-only method
Using webtorrent
 
use fs to get the file
not cheerio
 
?
 
oh sorry
ignore me
 
k
Any idea what I could do?
 
2:12 AM
but actually no
var $ = cheerio.load(html);
I'd guess it's going to be that line that is throwing the error.
 
how does that affect the issue I am having?
its not
The issue is trying to append the file to the body
line 45
 
Well then it looks like you can't do that from the server side?
 
The Webtorrent Docs would suggest otherwise
 
well, use iron node
and see what throws the error and why
 
Can I send a javascript command via the sevrer to be executed client-side?
 
2:15 AM
I wouldn't suggest it
 
Is it possible
 
you can send an event to the client
and then run code on the client based on that
rather than send the actual code
 
Ok
I don't think that would work because file is server side
I took a look at the WebTorrent Docs and they suggested I could use my method
 
yes but did you debug the code?
because you might be using it wrong
or they might have changed
 
I knw what the issue is
file.appendTo('body');
because it was working fine before I added that
And it says that it is a browser-only method
 
2:21 AM
perfect
 
?
 
working out the issue is the hard bit
how are you going to fix it?
 
I'm not sure
Couldn't find out much about it with a quick google
Thinking about just asking on StackOverflow if I can't figure it out
Would people react negatively if they knew I was using torrents?
 
What are you trying to do?
Torrents can be used legitimately, no reason to think they'd be negative
 
I am getting the magnet links from a torrent site(KAT as of) through web scraping, then I would like to display the file on localhost
localhost:3000
Using certian search terms
Rigth now I have it as localhost:3000/usearch/:searchTerm
I can get the files from the torrent
 
2:25 AM
what are you using for rendering the HTML to send to the clinet?
 
I'm not rendering the html, I just send the data and it adds it to the DOM, according to the WebTorrents API
Thats what the function I did was supposed to do
 
so don't you have to do that bit on the client side?
 
Its written for Node
i think i can do it server side
I may just ask the community
 
It works without nodejs too.
> In the browser, WebTorrent uses WebRTC (data channels) for peer-to-peer transport. It can be used without browser plugins, extensions, or installations. It's Just JavaScriptâ„¢. Note: WebTorrent does not support UDP/TCP peers in browser.
 
If you want to scrape from the server, you're going to have to send data to the client to do stuff with the result
 
2:31 AM
As in I would have to send some html to be rendered?
 
Does anyone know anything about files and Google App Script?
 
@phenomnomnominal Specifically, what changes would I have to make? I'm not asking you to write my code, but what would I have to do?
 
I'm guessing you would want to do the scraping on the server, find the torrent data, then sent that to the client, have webtorrent running there and do all the streaming on the client
 
So I can run webtorrent just as I would sever side but on the client?
 
Yep
also, you can probably just tweet feross and ask for help, he's a nice guy
 
2:40 AM
Thats great!
I will if need be
So should I create a basic html page and send that as a http response?
This goes without saying, but thank you for helping so much
I am relitvely young and its great to have some help with this stuff
 
yeah, you could do it as html, or just create it as an API
then always serve the index page, and request the data from your API
 
I think I'm going to create some basic html, serve the index, and have some javascript in the html page
I know its not the best way
But I can make an external scrpit later
script*
 
JS in the page is probably fine as a proof of concept, but I'd suggest a JSON response from an API endpoint
 
I'll write up a quick html page with some js and let you know how it works
 
good luck
 
2:45 AM
thanks
Not most people here have the patience to help a 14 year old :)
But you do, thanks for the help
 
3:05 AM
Question
So I got the html to be delivered, but it says require is not defined, as well as other functions on my server such as the event
How to I fix this
 
browserify
 
Thats it?
 
3:22 AM
Hey whassup Guys!
@Jasch1 Your 14???
Wow is that my first time meeting my age group!! Im astonished!
 
3:37 AM
I'm 12
 
4:17 AM
Did something change with NPM recently? Doing npm install body-parser installed body-parser module as well as like 10 other modules.
 
anyone using css grid layout?
 
@DemCodeLines did you update to npm3?
 
should at least be on 3.7 I think right
 
4:40 AM
@phenomnomnominal Not myself, maybe brew decided to update itself at some point
 
npm -v?
 
I fixed it by setting the legacy option to true
 
it was doing the right thing...
it has a flat dependency structure instead of nested like in 2.*
 
4:59 AM
I'd rather have the directory uncluttered. Flat structure has technical advantages only for Windows, where is a limit on maximum path characters.
 
5:16 AM
It also has advantages for deduping
 
user image
4
 
5:33 AM
wow css grid is amazing
 
If I have a navbar that relies on bootstrap.min.css would there be anything wrong with just taking out the parts the my navbar references to and making a css file with just those to cut down on size?
 
If you are loading all of bootstrap.min.css just for the nav and all you need is the nav then I would take remove everything but the nav css
 
What is good for learn Angular.js or Node.js ?
 
I don't even use bootstrap anymore ever since I began using react and css grid
 
5:50 AM
That was my thought I just didn't know why the original designer didn't do that - they use bootstrap to make a mobile friendly navbar but using it makes it not mobile friendly because bootstrap is so damn big aha
Hmm I might look into react I had read some things about it
 
The designer was probably too lazy or overburdened to take the time to slim down the app
 
 
2 hours later…
7:21 AM
With vaading designer & wix.com in place, what is the career trend for UI developers?
 
it's still strong
biggest threat to UI developers is voice
 
7:59 AM
Is there an advantage of using variable form in the code where var form = $('#contact_form'); instead of repeatedly using $('#contact_form') in the code?
Are we avoiding expression evaluation using form variable?
 
Speed, clarity...
 
Speed in what sense?
 
there's even a convention to prefix reused jquery selectors with a $, so var $form.
@overexchange Doesn't have to parse the selector and look it up in the dom
 
parsing overhead
 
@phenomnomnominal Hardly
When 4 dependencies have the same dependency in 4 different versions, you don't get any deduping.
 
8:05 AM
I figured it must do something smart when you have a bunch of ^ versions etc
But maybe not.
I'm devving on windows so either way I'm happy
 
@phenomnomnominal that sentence does not compute
 
@SomeGuy reference error condition is not defined?
 
is that some kind of sarcasm, oxymoron, irony?
 
s/happy/less miserable
 
@AwalGarg want some interesting code to look at? look at util-linux
 
 
1 hour later…
9:34 AM
How do I concat two typedarrays (into a normal array?)?
 
crl
9:45 AM
what shitty language is it?
 
10:00 AM
@crl Javascript, I assume?
 
@MadaraUchiha hi, i didn't get a reply, my code doesnt seem to take into account the two set long lat coordinates?
 
crl
@overexchange look at jquery source, all your answers are there
the speed diff wouldn't be big, but well jquery..
@J0NNYZER0 the thing that works only on FF?
 
user5861300
11:46 AM
0
Q: How can i clear localstorage when i update apps from playstore?

ragii have made one andriod mobile application using angular and ionic .i have already uploded in playstore which is running in 1.0 version. now i am going to update my app in playstore. when user give update localstoragre need to be clean .any one help me out to move forward. I want to clear local...

 
You can always do it manually - store a Version key and if it's any other value than you expect, reset the localStorage.
 
12:38 PM
@SterlingArcher #phrasing i.imgur.com/uTHYQwg.jpg sonic ad fail
 
crl
12:49 PM
How many react mount points is acceptable in a webpage between 1 and 10?
 
shouldn't need more than 1
 
crl
yea, I agree, thanks
 
no reason you can't though
if you have a page/app that is only partially using react
for separate components
but I'm assuming you're talking about a wholly react app
 
crl
I could have a Wysiwyg react app, and another independant one, but they could be merged too
 
@crl technically they can be merged.
 
1:32 PM
Anybody around?
 
1:45 PM
I'm having a bit of an issue
I'm running a Node.js script that is supposed to send an even to the browser
And it ddoesnt seem to be sending and I can't figure out why
 
1:56 PM
I'd be grateful if anyone knew how to help
 
2:18 PM
@Jasch1 If someone wants to help, they will
Also, you've provided zero information about the problem
 
I was waiting for somebody to respond
There is the code
eventLoad isn't emiting the event MagnetLoad, and I have confirmed this because nothing is being logged to console
@Cereal That better?
brb
 
crl
2:41 PM
class Foo {
    bar: 1
    qux(){ .... }
}
I wish it was simple like that
 
?
@cri do you have any idea what my issue may be?
 
crl
what are you trying to do? more clearly, in 2 lines max
 
Emit an event server side to trigger something client-side
But the event isn't being emitted server-side, and I don't know why
 
crl
push api is on http2 for example, you could poll from client, or websocket
 
Could you take a look at the code and see if anytging seems to be wrong?
Because based on the numerous examples I saw, it should be working
 
crl
2:47 PM
where is the client code?
oh client isn"t a browser maybe, sorry
 
client is a browser
 
1 message moved to Trash can
@Jasch1 Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
but i used browserify to make it work in client
var EventEmitter = require('events').EventEmitter;
var eventLoad = new EventEmitter();

eventLoad.on('MagnetLoad', function(magnet){
    console.log('IT WORKED');
})
 
crl
where is the client code?
 
there it is
the actual cluent code is very long because it has been changed by browserify
<!DOCTYPE html>
<head>
    <title>Node Test Web Page</title>
</head>
<body>
    <script>
        (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
 
crl
2:49 PM
EventEmitter in browsers?
I'm confused
 
browserify allows you to use node modules in browser
Thats not the issue
The issue is the event isn't being emitted
from the server
 
crl
:))
seriously man
 
what?
 
crl
not all npm modules work on client
 
THATS NOT THE ISSUE
 
crl
2:51 PM
require('events') what does this do
 
The issue is that it isn't sending
The clinet side isn't important right now!
 
crl
I need to fucking know what stupid lib you're using to understand
 
?
It won't send, thats the important part
You don't need to know whether it is being received or not
 
crl
you're using webrtc?
 
WebTorrent which uses WebRTC
once again, not the issue
 
crl
2:58 PM
can't help (nvr used it), just use their tuto, and stop yelling at som1 trying to help
 
how do i promisify without a module?
 
@crl you don't know how to use events
do you?
 
crl
on the client, no
 
user2620028
#1 the terminology you are looking for is Server Sent Events
 
Ok
 
crl
3:11 PM
sse (not much used imo), long-polling (ajax), websockets, webrtc, push, just pick one
 
So how would I go about implementing those?
 
user2620028
^^ what crl said lol
 
user2620028
just google one of the names of those and add "with npm" at the end and they are all surely going to have building blocks tutorials
 
k
 
crl
3:15 PM
sorry sse might be fun actually yes ^
next time I try to make a chat, I'll use sse + ajax for sending, more webscale! (well server needs to maintain as many connections as for ws..)
 
4:06 PM
I'm confused with SSE already
Can somebody please help
There seems liek there should be a much simpler way availble
 
173
Q: How do I convert an existing callback API to promises?

Benjamin GruenbaumI want to work with promises but I have a callback API in a format like: 1. DOM load or other one time event: window.onload; // set to callback ... window.onload = function(){ }; 2. Plain callback: function request(onChangeHandler){ ... request(function(){ // change happened }); 3. No...

 
Is that for @cswl?
 
hello guys :D im new to stackoverflow
 
@RidleSambow Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
guys, can i shoot a question here?
i mean, i stumbled on something that i dont know what keyword should i use to know the answer. lol
 
user2620028
4:17 PM
whats up
 
i just read that external JS can only be called if its included into the header
 
user2620028
external JS can be called as long as it is loaded before it is called
 
but, on my downloaded template, there's a list of JS referrence (not with the codes), and it is on the body tag
bottom line
 
user2620028
can you show what you are talking about?
 
emm, sorry. how ?
i tried to delete the code, and try the page. resulted in my navbar (which is containing some visual dropdown, etc) not working
 
user2620028
4:20 PM
if its just a few lines of code to get your point across you can paste it into the chat room, just remember to format the code with indentations. If it is many lines of code you can put it somewhere like pastebin
 
*code = js reference
indentation? (4space rite?)
 
user2620028
or tab
 
    <script src="../assets/js/ace/ace.searchbox-autocomplete.js"></script>
on the bottom line
 
user2620028
yeah a script tag like that would include an external js file, likely the reason they are putting it below the html is because they are wanting the html to be loaded onto the page completely before the JS is called
 
cause it says i can use external js if i include it at the head tag
 
user2620028
4:24 PM
that site is giving general advice, not telling you why however
 
oh so its not an absolute rule? them 3 rules
 
user2620028
no it is not, in fact i would say that the website is giving old advice
 
oh lol, thank you.
 
user2620028
try googling about putting javascript at the bottom of the page
 
user2620028
hopefully it will give you a few good reasons to do so, i can think of a few but maybe the articles can explain it better
 
4:27 PM
well, i kinda satisfied just by your answer
 
user2620028
there is a first for everything right :P
 
yeah, but i kinda burnt after 6 hour of coding. and i just cant sleep until my prob solved. lmaoo
hey, didcha got/made any tutorial about codeigniter/javascript?
 
user2620028
i haven't used it but im sure there are articles for it.... maybe more specific questions of problems you encounter you could ask people here when you encounter them haha
 
like creating some checkboxes based on a selected dropdown option?
im creating a website using codeigniter, but stuck on that ^.
 
user2620028
if i were you i would post what code you have into a jsfiddle or codepen and get it to the spot you are stuck at and if you post it in here and be really nice a lot of the times people will help nudge you along.
 
4:35 PM
lol, i think i will try my question tomorrow after i know the first step to it. im really new to php and javascript.
 
Hello everyone.. I just got my rep to chat in stack overflow :)
 
@BalajeeKs Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
user2620028
well you can do what you asked how to do with javascript
 
user2620028
welcome Balajee
 
i tried it, based on technopoetic.com/2014/01/… , modified it so the js create a checkbox. But as i ran the code, no checkbox were made.
welcome balajee
 
4:39 PM
I have an issue with javascript and mongo db,
0
Q: How to store the javascript processed variable from a form to MongoDB using Mongoose?

Balajee KsHow can i store the array result of the Js processed form to the MongoDb with mongoose schema? I already used Passport to store the values for the remaining fields. This form is used in another HTML page called profile.ejs route.js app.get('/profile', isLoggedIn, function(req, res) { res.re...

 
o/
Hello guys!
 
Hello (Y)
 
I having a javascript problem, It not solving can you help ?
 
4:41 PM
!!welcome Abhishrek
 
@Abhishrek Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
user2620028
@abhishrek you have much better english than that. don't lie
 
user2620028
@awal lol nice
 
lmao
 
@AwalGarg @HatterisMad please npm install sarcasm
 
4:42 PM
likewise
 
@AwalGarg you need to update your module, its still running sarcasm@0.0.1-rc-india
 
ok thank you hatter. ima try post my whole question at the ask quesiton section :D
see ya guys
 
the global module is at 6.9.0
 
user2620028
you obviously didn't understand my sarcasm :/
 
@HatterisMad Oh I did yours :-)
 
user2620028
4:43 PM
then you can npm install my foot up your ass for pretending to not get it lol
 
lol :D
o/
 
user2620028
\o
 
user2620028
thought cap was supposed to not leave you hanging anymore lol
 
@HatterisMad i think you mean HatterIsMad/foot3
right ;-)
 
user2620028
pshnah i only post stuff under the repo "TayWasRight"
 
4:44 PM
lmao
 
user2620028
i started a new job... and my job title is "application developer"
 
user2620028
because the technologies they use are too saddening to put in a job title
 
crl
4:58 PM
"bs developer" :) what is it seriously?
 
bullsit developer? :D:D:D:D:D:D
 
5:17 PM
someone who develops bullshit
 
5:27 PM
i thought i should screenshot that
 
5:37 PM
@RidleSambow A developer who sits on a bull while coding.
 
5:54 PM
I imagine a rodeo with a windows pc :D
 
Hey guys, which methods should one use to remove an object from an array without modyfing the original array, but remove it only if a certain condition is met? I have the following code snippet pastebin.com/ytm9KuKh which although does remove an element leaves an undefined value it its place.
I am thinking some combination of slice/concat functions, but I don't see where the conditions should be placed.
 
user2620028
@abhishrek it would break because you were too cheap to get the ssd
 
@HatterisMad I only use macs
 
user2620028
your windows pc is a mac?
 
Mac is the best windows pc :P
 
user2620028
6:02 PM
I am sorry for your loss
 
@HatterisMad Oh am just kidding, nobody with a right set of mind will use a MAC in a rodeo
but*, using windows might end up in a literal "Blue screen of Death"
 
crl
@DavidPacker splice
oh without modifying, copy first maybe
 
@crl I figured it out. Used the filter function. Thanks.
 
crl
duh, ads on pastebin, vpaste ftw
 
crl
6:31 PM
i.imgur.com/amJQny0.png dat ram, and the guy can't install 64 bits softwares
 
crl
6:44 PM
damn.. this guy created an image bomb imgur.com/gallery/TIYVL beware on chrome, it freeze everything when trying to click the 2nd image, don't even try
 
00:00 - 19:0019:00 - 00:00

« first day (1989 days earlier)      last day (2952 days later) »