« first day (1939 days earlier)      last day (3007 days later) » 
00:00 - 17:0017:00 - 00:00

5:00 PM
I'm creating a input to add tags for each post. That input has a autocomplete box. Now I store all tags in a js-array and search in that array for autocomplete. Is this algorithm correct? Or should I send a request to database every time?
 
hi
 
For my next act I'm going to make an image tag disappear lol. That'd be some good developer humour
 
hi
 
@CSᵠ Yo
 
yolo
 
5:01 PM
@Lemony-Andrew, how can I make it reappear
?
 
@trilolil You're thinking about it backwards. They don't disappear. javascript makes them appear.
 
ok
 
Hahaha, depends whether or not they actually made their way on the page
 
You start out with the html you downloaded, and through interaction or time they're added.
 
@trilolil It is not about what you want, but about what the webpage author wants to convey via the page itself... this is deep, think about it
 
5:02 PM
I would like all the tags to magically appear in another html page on my desktop
 
you need to delve into the ajax magic my friend
 
JQuery has a plugin for that
I think it's called majax*
 
@Shafizadeh NO, array is fine, as long as it's short and non privacy related
 
Not serious don't look that up lol
 
i mean, if you have a huge db, then yea, connect, otherwise send it once with the page
 
5:04 PM
so actually
if I understand it correctly
there is some code that
modifies the html code (include the img tags) each time I scroll a litlle more to the bottom?
 
you either: A run the js, B decypher the js, C get the rendered version after js (btw, C kinda implies A)
 
@CSᵠ ah ok, but the number of tags is 1000, still you believe is fine?
 
@Shafizadeh will that grow?
 
No... or maybe maximume until 1010
 
@trilolil I suggest you read up on what javascript is, and how webpages are built.
 
5:07 PM
The isssue is I don t know JS, so I am kinda screwed
I am an embedded software developper
 
You don't necessarily have to learn it to do what you need, just understand how webpages are built.
 
but there are like 7 different js files
 
what is that, like C / ASM crappy code?
 
...
@CSᵠ yes
 
I also don't know your goal, so you might have to know more, specifically about http, to use tools like Selenium or phantomjs
 
5:08 PM
cool
 
my goal: scrape the whole html code, retrieve all the links and save them in a separate text file
everything is donde so far by using a C program I wrote
but
 
there are already tools for that, try some research 1st
 
There's a difference between scraping the initial html and scraping the page after some interaction is done
 
I am unable to get a file with the html code containing aaalll the img tags
 
well... C isn't in tier 1 for this kind of stuff...
 
5:10 PM
@Zirak indeed...
 
crl
also js generated pages
 
@CSᵠ I am fighting with the weapons I have. I am familiar with C so...
 
you should have no issue with js then
 
how can I know which of all the js files I should analyze?
 
no better way than the scientific method]
 
5:12 PM
Use phantom js
 
@trilolil You might be interested in Selenium. It's a program which automates a browser for you, it has adapters in several languages
 
ok I ll look it up
 
hey wait
 
@trilolil You first have to learn a bunch about js and how things work
 
he can do it in c if he understands js
 
5:13 PM
?
do what in C?
 
no need to do selenoim/phantom/greasemonkey...
do in C, what you need guy
 
Learn js, its fun
 
well... what has to be done in C?
open a webpage, scroll and constantly analyze the html code?
 
 
I am still a student... so I don't have your expierience and knowledge
@CSᵠ, could u plz correct me?
 
5:17 PM
maybe, but unsure where
 
np let s try :)
@CSᵠ^
 
?
 
You can safely ignore him.
 
well ok...
do u have a final proposition?
because what I wrote wasn't correct appearantly
 
5:25 PM
Not knowing more, Selenium seems like a decent option.
 
ok well I ll tell u more if that can help
this is a website: http://www.scribd.com/doc/98591038/Spacecraft-Attitude-Determination-and-Control-9027709599#scribd

I am trying to get the html code of that site. But the html code has to contain all the <img > tags, because eacht <img> tag is actually a page of that book
another good option: just getting all the img tags without having to scrape all the html code
 
hence that each img tag contains a link to a page of that book, that s what I am aiming for!
@Zirak ^
 
There's a giant "download" button. Doesn't that help?
 
this button costs money...
 
5:32 PM
@trilolil you already said this a few times
anyway gotta go, left my garlic in the owen, bbl
 
With enough research you could understand what they're doing; specifically, how they're initializing the page.
 
that will take a huge amount of work appearantly
but the book costs 120euro...
 
@trilolil They're using pdfjs or a variant, which lazily loads pages as you progress. But there's some seed somewhere, he has to load from somewhere.
 
mhm
 
It's not that difficult, it's just more than five minutes so I gave up
 
5:41 PM
xD
i hate you
(joking)
just give me the seed-url plz
 
If you don't want to do that work yourself you can probably pay someone on freelancer or whatever to do it. Someone with basic js debugging experience can probably do it in a couple of hours, someone more experienced in about half an hour.
 
If I have that see url
is there a way to surf to that url
and get html code containing all the images of that book?
 
Paste that into the browser? curl? wget?
 
yes
 
oh
Maybe
I dunno how scribd works
 
5:43 PM
well I would like to be sure that looking for that one specifici seed url
will be the solution
 
@FlorianMargaine aww
 
if all things would be that easy
damn garlic's toast, put another fresh batch in
 
oh, lulz, found it. Sort of.
 
so its a url where all the data is stored?
 
Search the html for pageParams.contentUrl = "some-url", you'll get one per page
That was more stupid than I thought
 
5:47 PM
 
yes ok now I see
indeed so you should get a link like that for each page
but that means I should write C code to:
1) scroll the page
2) get the html code
3) scrape it and retrieve that specific link
4) go to that specific link and get the url of the image
5) surf to that image
6) save the image
7) delete unnecessary files
 
More like:
1) Fetch the page
2) Search for those lines
3) For each, fetch them.
4) You'll get *html*, not an image. Save that html or render it into an image. Whatever.
5) Dance.
6) Cry a few months later when it breaks.
 
the annoying part is
the "for each"
 
or days later if unlucky, after the scribd guys read bits of chatter in a publicly indexed discussion about circumventing their paywall
 
I live in Kazaghstan, I am safe here
 
5:53 PM
meh, it's fine. strstr or use a regex library
 
But the image tags get included in the html code each time you scroll (according to some other gyu here on SE)
so I should find a way to "scroll" on that page in C
 
Not quite. That's why I said it's stupid. Look at the source, search for the line I sent above
It appears once per page
 
but that s exaclty the point I mentionned previously, detecting those pages. Because if I just surf to that url I'll just get the html code for one page of the book
do you see what I mean?
 
I don't think you're understanding
Go to the source
 
might be
 
5:56 PM
Ctrl+F that line
 
yes, indeed t
 
It appears once per page, with the url to get that page
 
I saw that line you were speaking about
"it appears once per page" of the book
so....
I will have to get a link (like the one you were speaking) for each page of the book
are we on the same wave length so far?
 
...sure
 
ok
but the issue is (I think):
in my program, I will write a function like goTo(www.thisBook.com)
I will get html code. But the issue is. This html code will contain only the link for the first page
 
6:02 PM
Do a simple test
Download that page
Ctrl+F
 
did it
oooh no you are right!
it contains all the links in only one html page!!
thx man!
 
Enjoy
 
Hi Zirak
 
@KendallFrey okay flex @ 450mm/s^2
 
@rlemon realtime iss animation?
 
6:14 PM
@CSᵠ Kerbal Space Program
Rlemon has taken the position of Ambassador
 
source link pls
 
!!tell CS google Kerbal Space Program Steam
 
ty cap
 
How secure does it make your code to wrap in an anonymous function and keep all your variables in that scope?
 
6:17 PM
slightly
@Lemony-Andrew million dollar advice
dont trust the client
 
I'll take it
It just makes it less convenient to work against, right?
 
yes
but in js
thats still almost nothing
 
There's nothing worth in my project defending from the client until I add the data-base part of it -- which I'm assuming there's a fair number of articles for working with that
 
@Lemony-Andrew Not any more or any less secure
 
There's really nothing you can protect easily against in JS huh. I mean, you have access to data being sent and received and you have access to the code that's encrypting/decrypting then parsing. The biggest abstraction I can think past that would just be uglifying it
 
crl
6:40 PM
!!> var o={x:1}; o===Object.assign({}, o)
 
@crl true
@crl false
 
hey everyone
i have this peace of code:
clean.forEach(function (element, index, arr)
			 {
			   console.log("dataItem",dataItem,"Element Id:",element.id);
			    if (dataItem != element.id)
			    {
			        clean.push(element);
			        console.log(arr);
			    }
			 });
i want to start that "if" statment after index 0
how do i perform that?
 
clean.forEach(function (element, index, arr, index){ if (index===0) return;...
whoops
 
if (dataItem != element.id && index>0)?
 
6:47 PM
thanks man
 
no thanks, you figured it yourself.
 
crl
or clean.slice(1).forEach ...
ok in react, I think it's a good idea to keep states objects flat
 
@KendallFrey DID IT!
#fuckyea
decided to ditch two of the tanks and empty their remainder into the other two
 
7:07 PM
@rlemon where to now?
 
jool
but I fucked up and forgot to take the monopropellent from the tanks I just ditched
:/
 
eh, monoprop isn't needed much anyway
not at all if you're not docking
 
helps turn the craft, and I'm impatient
:P
 
@jhawins I find it kind of funny that you open a GH issue about "punish people who don't use GH" and then one about "let's not use GH"
 
7:38 PM
how would you guys bench a view library (like react)?
minimally
 
@Mosho well, full render times by reconstructing 2-3 website layouts (highly changing, one with big list and simple site) built with it vs built with other libraries.
 
ain't nobody got time fo dat
 
the test setup makes me cringe so hard wtf
> Yeah just testing out this bare system on the carpet, seems to work great!
 
@Mosho anything less is meaningless.
 
8:23 PM
I'm an adult now
 
Guys
Anyone has experience with file backup services for Windows?
 
nice blinds
 
Looking for a decent++ one (paid is cool too)
@littlepootis They even match the carpet.
 
Yeah, I'm not sure if I care enough to get some curtains, or something like that
It's just an apartment
I am gonna go get a floor lamp today for that back corner
 
Get a lava lamp
 
8:27 PM
pls
 
The question is.. does it always stay that way?
 
@MadaraUchiha local or offsite?
 
@KendallFrey offsite
Something that doesn't need user intervention
 
8:55 PM
Hello
 
@user1275105 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.
 
9:15 PM
@ndugger lookin snazzy
I like the addition of the books
really makes it look like you got your shit together
next you need a bowl of fucking lemons
 
crl
9:29 PM
@MadaraUchiha like dropbox and drive? or I don't get it
 
10:07 PM
moon
 
10:50 PM
Hi everyone. I'm trying to send a get request to the instagram API from the client. if I don't include a "access-control-allow-origin" header, it doesn't work, but if I don include one, the preflight options request isn't allowed. does anyone know what I might be doing wrong here?
 
@user114338 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.
 
@rlemon dayyum. #3 is my favourite
 
is my fav
my last return module looked just like it :D
 
I didn't know they did spacewalks before the moon
 
man, cooking ribs is the hardest thing I think I can do
they smell so effing good and they still need like 45 minutes
they've been teasing me for over an hour already
 
user2620028
11:02 PM
yes... tell me more tell me more
 
do you know what this is?
 
user2620028
!!afk creeped myself out
 
@KendallFrey particle collector?
The ongoing Lunar Laser Ranging Experiment measures the distance between the Earth and the Moon using laser ranging. Lasers on Earth are aimed at retroreflectors planted on the Moon during the Apollo program (11, 14, and 15), and the time for the reflected light to return is determined. The first successful tests were carried out in 1962 when a team from the Massachusetts Institute of Technology succeeded in observing laser pulses reflected from moon's surface using a laser with a millisecond pulse length. Similar measurements were obtained later the same year by a Soviet team at the Crime...
nvm
 
that's the one
it's a retroreflector
 
11:16 PM
dude, 3 and a half hour slow cooked ribs are killing me
they smell so good and I'm so hungry
 
I can't believe it took almost 50 years to photoshop 10 thousand photos
 
@Cerbrus happy birthday bestie!
13
 
11:39 PM
@BadgerCat am I having a deja vu or did you post exactly the same thing a year ago
 
Maybe?
 
Feb 7 '15 at 0:16, by Badger Cat
@Cerbrus Happy Birthday bestie
weird, why would I remember that so vividly
probably jealousy
 
yeah
 
@mosho is secretely stalking @badgercat and recording each and every one of her actions
 
but you're very similar to @Cerbrus, your ears and snout look almost the same
 
11:49 PM
@BadgerCat um.
 
00:00 - 17:0017:00 - 00:00

« first day (1939 days earlier)      last day (3007 days later) »