« first day (3198 days earlier)      last day (1736 days later) » 
00:00 - 15:0015:00 - 23:00

DRP
12:12 AM
I removed global go:
$ npm uninstall -g go

$ go get github.com/ethereum/go-ethereum
bash: /home/user/.nvm/versions/node/v12.6.0/bin/go: No such file or directory

Issue tied to nvm...


Checked env again:
$ export GOPATH="$HOME/go"
$ env |grep go
OLDPWD=/home/user/go/src/github.com/ethereum/go-ethereum
PWD=/home/user/go
 
hi
 
DRP
Hi Brian
I indeed checked the path
So yeah /go is not there... as it should be, but not sure now where to move
Ok just saying hi
 
not familiar with Go more so JS
 
DRP
I didn't see go rooms so thought of taking a look over here.. anyways cheers
 
morn!
 
12:52 AM
!!refresh
!!MAGiC
 
(∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。 ᵀᴴᴱ ᴳᴬᴹᴱ
 
1:10 AM
!!meow
 
 
3 hours later…
4:04 AM
 
 
2 hours later…
5:41 AM
yo
 
Morning.
 
6:02 AM
Hello...I am facing some scope issues while accessing array from MongoClient function. When I try to access array from outside MongoClient Scope, it is empty. How can I solve this problem?
 
@omkarlanghe Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
can someone please take a look:
https://stackoverflow.com/questions/57096755/angular-unit-testing-how-does-one-unit-test-if-an-observable-has-been-subscribe
 
@SamuraiJack What's the matter with the comment on the question? The idea sounds reasonable.
 
good morning
 
@geisterfurz007 I can not change the code
 
6:07 AM
@KarelG Good morning!
 
but i have to unittest
 
1 message moved to Trash can
@omkarlanghe Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
@SamuraiJack That might be something you want to clarify in your question and in a comment towards Mathias
 
@ShrekOverflow it depends. Not sure if there are any investigation
@SamuraiJack to me, that API is not complete. If you can subscribe to it, why is there no functionality to check if you are subscribed ?
 
@geisterfurz007 I have added it now
 
6:12 AM
if there is one, use it. if there is none, say that the api is not complete, not usable
 
@KarelG you have a valid point there.
 
what is with the entropy of earphones that putting in your pocket is a pretty much guarantee that they'll form knots?
 
typically i would be checking functionality within the subscribe method
 
I'd think not creating a knot would be somewhat probable considering that twisting the ends in such a way a to create a knot would be so much more complicated
 
@KarelG but just out of curiosity , is there any other way to test it? Without checking the functionality within subscribe?
 
6:18 AM
I don't know the api. Ask your colleagues
 
6:59 AM
1 message moved to Trash can
@RaheelAslam Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
    db.schema.where({section_id: section_id}).offset(offsetNumber).limit(2).toArray().then( function (data) {
            console.log("Data" , data);
            callback(data);
        });
When i use orderBy with where it's not accept Can anyone guide me how to handle this query with limit orderBy and where Clause. Or is any other solution please
https://github.com/dfahlander/Dexie.js/issues/297
Is any other solution. I am using indexDB
 
mhm
 
I want to maintain ordering and limit also.
Devs please guide thanks
 
eh I don't use that plugin but it is surely lacking good support.
according to the issue you just linked, it is currently not possible to chain your query requirements
 
have any other solution for that
?
I have 500 above records in indexDB
Can i do if i fetch all records from indexDB then apply limit using array objects with lazyloading with javascript @KarelG ?
 
7:10 AM
fetch only by the where clause
then you have a smaller dataset to sort and put limit/offset
not an ideal approach
😕
if there is no where, use the sort by index. Then you only have to get a subset of it
 
http://prntscr.com/oh5jqg
here i get record where by section id then what function will be use to limit and order then offset ?
how limit and offset use after get record @KarelG ?
 
arrays has a set of funtions you can use
similarly for getting a subset of it (slice)
 
I means offset and limit
 
.slice
note that it gives you a new array which is a shallow copy of the content
if you don't want that, check for .splice
 
hmmm
 
7:21 AM
use .reduce to group it together by section id
 
7:41 AM
function Paginator(items, page, per_page) {

  var page = page || 1,
  per_page = per_page || 10,
  offset = (page - 1) * per_page,

  paginatedItems = items.slice(offset).slice(0, per_page),
  total_pages = Math.ceil(items.length / per_page);
  return {
  page: page,
  per_page: per_page,
  pre_page: page - 1 ? page - 1 : null,
  next_page: (total_pages > page) ? page + 1 : null,
  total: items.length,
  total_pages: total_pages,
  data: paginatedItems
  };
}
i using this function some time it's leave the record
 
@Neil check for the trailer Cats
next level CGI
@RaheelAslam if browser compatibility is not an issue, you can use default arguments
function Paginator(items, page = 1, per_page = 10)
 
I have offset(0)+2 and limit 2
offset increment by 2 every time.
 
.slice accepts 2 arguments fyi
turn items.slice(offset).slice(0, per_page) into items.slice(offset, offset+per_page)
 
@KarelG I think they use green suits for that
but yeah, looks very impressive
something in between animated film and musical
 
eh "green suits". They use mocap gear
like this one
 
7:51 AM
but same issue my last two record is missing
async function getSelectedSections(selectedSectionId, offsetNumber, callback) {

    //limit(2)

    let section_id = parseInt(selectedSectionId);
    let rowsArray = await db.schema.where({section_id: section_id}).toArray();
    rowsArray = await getRowsOrdering(rowsArray);
    let resultRows = Paginator(rowsArray,offsetNumber,2);
    console.log("rowsArray  ", rowsArray);
    console.log("resultRows  ", resultRows);
    console.log("offsetNumber  ", offsetNumber);

    callback(resultRows.data);
 offsetNumber = offsetNumber + 2;
@KarelG last two record missing
only 6 record is showing but in DB is 10 record
 
debug time
 
But did you understand the problem
 
8:06 AM
@RaheelAslam items.slice(offset).slice(0, per_page) is the same as items.slice(offset, offset + per_page)
 
8:49 AM
I think Meta is broken... I posted something there that isn't a question or feature request, and doesn't really warrant a lot of discussion, and after an hour it still has no close-votes and is at +20/-0
 
post it on meta then
 
9:04 AM
@Cerbrus just like fb's like button
 
@Neoares I think Meta is broken
 
where do you post meta questions about meta, then?
is there any meta squared forum?
@Neil also, that was the joke xD
 
@Neoares I got the joke, was continuing the joke :P
 
oh
OH
 
it's a meta joke ;)
 
9:15 AM
I understood that reference
by the way, is Cap still here?
!!are you there?
 
@Neoares Doubtfully
 
9:34 AM
Hi. Why is a new branch needed for making every pull request?
(Sorry I found no room for "git")
 
@Neil but where is my problem?
 
I read tutorials on pull requests and all of them say "create a new branch" without explaining why it's needed...
 
@RaheelAslam If you don't know where your problem is, I sure as heck don't know
@aderchox because in theory, all new development should be added to a branch and merged later
that's just best practice stuff
you don't have to
 
It doesn't make sense if I'm already editing code in a totally distinct fork.
@Neil Thanks
 
But i thinking that may problem due to offset @Neil
 
9:38 AM
@aderchox lol for your first commit, maybe it doesn't make sense, no
but it would make sense for any successive commit
 
@Neil oh that's right...
 
@RaheelAslam so do some stupid tests, make sure offset is correct and everything is being passed as you'd expect
 
@Neil thanks
 
 
1 hour later…
10:55 AM
hello
i want to upload a file on my aws s3
file:
{ fieldname: 'file',
originalname: 'test.torrent',
encoding: '7bit',
mimetype: 'application/octet-stream',
buffer: { type: 'Buffer', data: [Array] },
size: 7449 },
there is my params
var params = { Bucket: myBucket, Key: data.patientfile.file.fieldname, Body: file };
then i do
s3.upload(params, function (err, data) {}
but i get as error Unsupported body payload object
any idea?
 
Did you try using new formData ?
 
 
2 hours later…
1:30 PM
Hello
 
Hello
 
.....
!!hmmmmmm
 
wtf
 
1:40 PM
??
what
 
!!tell StephanS define wtf
well that was risky
 
!!sandbox Neoares
 
@StephanS Please go and play in the Sandbox
 
commands take the chatroom to a new level
the chatbot needs to have some work done to it because there's alot of url-rot
 
command purges are a pita
and localStorage is only like 10% utilised
so we're good
 
1:46 PM
I just wish !/!/hang would work
 
1:58 PM
!!backup
 
@BenFortune Donna Noble has left The Library Donna Noble has been saved.
 
nub
@StephanS Feel free to go through it
 
Excuse me, could anyone give me any advice on why a script may work offline but may not work online? So i was toying around with the "execCommand" function, and decided to create a little "Copier" for my website, so people could click to copy the discord link, rather than selecting and copying it... And it works fine in my eyes, tested it in the index.html file.... like i said, works fine. But as soon as I uploaded it and my website updated, I tested it, and it didnt copy crap
function copyFunc() {
  var copyText = document.getElementById("copyInp");
  copyText.select();
  document.execCommand("copy"); //this function copies the text of the input with ID "copyInp"
}
I know its connected to the javascript file
otherwise the site itself wouldnt function
So im clueless
 
@BenFortune I think we found the issue, we were talking about it in the sandbox. I'm sure if rlemon wants to fix it then he'll get around to it.
nvm, he got around to it.
 
why must internet and javascript be so finicky to each other... for one day can i have a javascript chunk work the first time, and continue working 5 minutes after???
 
2:03 PM
@TaylorSpark Welcome to JS 😛
 
protocols. trusted vs not (probably)
you'll have to better define your environments for us to know tho
 
Github user page
 
I cant afford a webserver
 
> Copy and cut commands triggered through a scripting API will only affect the contents of the real clipboard if the event is dispatched from an event that is trusted and triggered by the user, or if the implementation is configured to allow this.
 
2:04 PM
Poor lol
Im guessing Github pages doesnt support serversided use of the executeCommand
 
There is no server side use.
 
serverside?
@StephanS the build was also broken. so it took longer to fix
had to track down that issue
 
sorry... I mean like you said, github pages tends to... block things sometimes. Like it would block things that would be normally possible in an average everyday website
 
Eh, github pages shouldn't block anything
 
but there is no serverside on github pages that you can control
 
2:06 PM
its an "imitation" php based webserver network...
 
They do no sanitization as far as I'm aware. Anything you push should be 100% identical to your repo
 
its whole purpose is "to not use php"
 
they do all of the generation without you
 
lmfao what
 
if you want dynamic generated content for github pages you need to use an offline tool, like jekyll
 
2:06 PM
I already use jekyll
for shortening all my links and such
 
Using angular w/ NgRx how do I hook into another component's state?
Basically I have a parent component and a child component. I'm passing an observable that emits an array of items to this child component.
 
Ill check the JS console if theres some kind of error
 
But for all the change actions the child component is going to have generic store with actions corresponding to each update action.
 
Usually a good place to start
 
lol
 
2:08 PM
@Vap0r I don't use angular, but does this help? blog.angularindepth.com/…
 
In the parent component's effect file (eventually multiple parents will utilize this component, each with different data structures but same base-need) I plan on hooking into these child generic actions to then manipulate the data.
 
@BenFortune let me look. thanks
 
Both the offline and online pages have the same code
the offline index doesnt give the same error
infact no error
 
inb4 script defined in head
 
2:09 PM
@StephanS are you sandboxing me?
 
nah
 
Link to the repo then
So we can see.your fault
 
I play with Cap's buttons wherever I want >:c
 
its telling me its not defined, I have CLEARLY defined it in the Javascript.
 
@BenFortune unfortunately no that's a little more of a basic overview. This is a higher level concept that in standard angular applications is probably not needed. Basically once you start reusing components for similar functionality (mine is a list that allows selection and saving of the modified items) you have three options:
 
2:11 PM
Every time javascript just stops working and starts working in different environments
 
1) a bunch of anglar input and outputs for attribute and event data passthrough
2) a service that emits changes
3) hooking into the child components actions to get the data out of that slice of state
 
I kill my self mentally
 
I'm trying to do 3 since it's probably the best solution in my case.
 
Every time you ask for code help without showing the code I die mentally
 
2:12 PM
@Vap0r Yeah that's where I thought the "selectors" came in, pulling data from the global store
 
He doesn't want you to steal his sick code ideas
 
https://skylerspark.github.io/ - Website
https://github.com/skylerspark/skylerspark.github.io/tree/master - Complete source code.
is that enough code for you????
lol
 
That's the code we'd need.to help you, so yes
 
Holy shit clean up your markup
 
I swear if jekyll is causing this error like the last one, Im going to smash my head into my screen
 
2:13 PM
why are there elements outside <html>, and no <head>?
 
Dont even ask
:l not right now please
I always fix that crap later
 
Yea that's super wrong
 
you aren't closing your body tag either
 
one problem at a time as I always say
 
good lord
 
2:14 PM
@BenFortune I suppose I could do it that way. I was really hoping rather than hook into pieces of state via the global store and having component instance references that I would be able to hook into the actions so all the handling could be done directly from the store rather than handling in the component instance.
 
my html is messy ik
no closing tag for body?
wait wtf
 
Also you're using jekyll, look into abstracting your header and other stuff into templates
 
Yea it's a scope issue
Move your script tags to the end.of the nody
Body*
Ben called it
 
nevermind, that was a retarded autofix thing that visual studio code caused
 
what's the reason for that? @rlemon
 
2:16 PM
it switched my closing body tag with an extra <html> tag
 
I've been doing that but without knowing the actual reason
 
@Neoares how the body is parsed
 
like, if you want to wait for the HTML being loaded, there are JS ways to do it
 
@Neoares Scope mostly, especially if you have inline JS
 
2:17 PM
ew inline JS
is that still a thing?
 
when a program changes a part of your code "for you" in the background.. and doesnt even bother telling you or asking..
 
I'm assuming ` document.getElementById("ip").textContent = "Connecting From: " + ip` is going to fail in that case
because the body is probably not parsed yet
 
Works fine
everything in my page works but that damn copy script
 
well you're risking it not passing. because you're trying to update the dom from the script in the head without waiting for the dom to load
 
once i finish this dumb project, Ill clean it up
 
2:17 PM
it's asking for race conditions
 
I basically duck tape and wire everything together, make it work, then polish it
ik its outlandish but its how I do it
well rlemon, can we focus on that later? I simply am wondering why the copy script is digitally "OK" yet in a github page fails to "define" itself
ah screw it, yall will probably have an answer and not tell me later and call me a help vampire or some shit.
im tired
cya
 
this guy reminds me of Towc
 
!!vamp
 
lol
I don't get it, everyone was helping him
 
2:23 PM
o/
any recommended best practice on avoiding a client of ddos'ing your server with any standard input field/submit? :P
 
ddosing is just overflow the server with requests
 
making them lose before they can ddos?
 
true, but it seems way easier because of this line out of the specs for input fields:
 
What happened to towc? I haven't been around
 
> If it is not specified, the user can enter an unlimited number of characters.
 
2:27 PM
you could put a speedbump to submits or authorization before submitting
 
I guess I was just a little shocked about no native max value on any random input field
 
this is more of a php question unless you're using ajax
 
reads like you can just send a 2 TB bomb to any server at will
 
well the server should disallow that
it'll have a max limit
 
if you Define it in mysql then the value of submits won't go over the value defined
 
2:30 PM
not even mysql. nginx/apache/whatever should limit payload sizes
 
Guys can we please get to the important questions?
1) Is towc still alive?
2) how are his plants?
3) does he have a girlfriend?
 
1,2,3) no one cares
😉
 
Dang he became that bad?
rough.
 
I fear it's worse then we might think
 
wasn't he stalking some random girl?
 
2:32 PM
he might have gotten a life
 
2:43 PM
well, I lied, I was tired, but I still worked on my crappy website. Anyways i validated alot of the html and made it "correct form".... Once i publish it Ill see how you like it then...
 
You should probably credit the guy you stole that background from, too
 
No idea who made it
 
good start would be to look where you got it from
 
I could always disable the background... just didnt want the front page to be so... bland...
Im not very good at webdesign
github.com/skylerspark/skylerspark.github.io/tree/master - Okay so how does the HTML look now? I removed all the Stray tags and stupid madness, added ACTUAL Doc headers
etc
and beautified it
 
wait wait
 
2:51 PM
it looks much better to me now
didnt realise how messy it was before until now
 
"Im not very good at webdesign" but this is a site to hire you from webdesign......
!!wtf
 
@StephanS This isnt meant for "hiring me" i just put that there as a placeholder
No one would actually visit my site (for now because its shitty)
as you may have noticed, its just got basic stuff in there
 
"no will will actually visit my site" that's how I feel about everything I make too :D
 
Isnt that how we all feel? atleast for the few of us who are newbies who everyone is mean to lol
 
2:59 PM
!!tellmeajoke
 
@StephanS You
 
00:00 - 15:0015:00 - 23:00

« first day (3198 days earlier)      last day (1736 days later) »