« first day (2352 days earlier)      last day (2964 days later) » 

09:05
Is anyone here familiar with JS and JQuery?
@Rahul2001 pretty sure Bob and I are, but no meta, just ask
Okay! Here we go!
		$.ajax({
			url: "log3.html",
			cache: false,
			success: function(html){
				$("#chatbox").html(html);
This is some code that my script uses to display a html page
However, I would like to load only the last 20 lines of log3.html
And I cannot for the life of me figure out how to do that
nth-child might help here
assuming you have the layout:
<div>
<p>line</p>
<p>line</p>
<p>line</p>
</div>
Nah, I have this layout:
<div class='msgln'>(2:33 PM) <b>Rahul</b>: hi<br></div>
<div class='msgln'>(2:33 PM) <b>Rahul</b>: another message<br></div>
well count the instances of msgln
09:14
@Rahul2001 are you okay with downloading and processing the entire log3.html, just not displaying it all?
then you can invert the array and loop through the first 20
there is no technical means whatsoever to only download a partial file, especially the "bottom" part of it (you might be able to hack something to download the first N bytes, maybe not in JS though, by terminating the connection early)
unless you have the server only serve what you want to see (this is the sane way of doing it)
@allquixotic UH, yes. that should be okay
so you essentially want to tail it? ;p That should be server side
I agree with geek
09:16
+1
although yeah, if you're OK with the server serving up the entire page and the layout engine rendering the entire page, you can process the element structure and set everything to invisible except what you want to see
nth-child should also work with hacky maths
If you just want to download the end of a file. GET it, grab the Content-Length, then send applicable Range header?
Now I need to figure out how to make PHP excho the last 20 lines then
09:19
20
A: xpath - get first 10 items of selected set

Chris Cameron-MillsHave the position condition operate on the result nodeset of your initial condition: //parent/child[sex='male'][position() >= 10 and position() < 21]

i would do array shenanigans
but i am probably a bad programmer shrug
you can use document.evaluate() to run xpath and use this condition at the end: [position() > last() - 20]
or, if you want to select the ones that you want to target to hide, invert the > to <
then you'll get a node set which you can iterate and make them invisible
that's all clientside though, and the total performance cost will be the cost of loading the whole page (all elements), plus the cost of running the xpath and hiding the elements
and the total bandwidth cost will be the cost of the entire log3.html
Which is why now I'm reverting to PHP... This is going to be used on slow connections, and downloading the entire file isn't viable
i guess if i worked somewhere that actually let me build websites rather than just promise me the chance to build them i might be a better coder
@Burgi Collab with me on this?
09:27
lol
Well, in theory, the right way to do this, is to totally drop storing everything as a webpage
capnproto? :D
and store it on a db, and pull whatever you need when you need it.
it looks to me like he's re-implementing Quassel, but idk
lol
s/quassel/every webchat in history
tricky part would be deciding how to refresh it
	setInterval (loadLog, 1500);	//Reload file every 2.5 seconds
This is what I use now :D
09:31
bleh.
Today's Friday the 13th!
oh no.
and I have to wrangle with a public transportation system. WHAT COULD GO WRONG
2
and a full moon
and wrecked sinuses
I think I'm ready to release it as a one-off hack 7z with a bat installer, will do that tomorrow night when I get home or on the weekend
!!batbatbatbat
09:35
@JourneymanGeek That didn't make much sense. Use the !!/help command to learn more.
!!/bababababat
@bwDraco That didn't make much sense. Maybe you meant: bababababat
Yeah, bat. I mean that
09:55
<?php
	function tailFile($filepath, $lines = 1) {
		return trim(implode("", array_slice(file($filepath), -$lines)));
	}
?>
What...?
> There is no need to try catching Chuck Norris' exceptions for recovery; every single throw he does is fatal.
@Bob there is certainly a performance difference installing big packages through apt on the SSD-less dedi :P but with all the caching ZFS does, I doubt short little bursty writes like DBs, etc. would matter with 128 GiB of RAM
just that installing qt-sdk is painful
@allquixotic newfangled apt is still strange to me
it does seem nicer than apt-get
four fewer keystrokes and does everything I need
I stopped using apt-get eons ago though, I used to use aptitude
which has better alternative prediction for conflicts, etc
I prefer apt-get to aptitude for some reason
way I see it, apt-get <<<<<<< aptitude < apt
10:06
apt is nicer, just not muscle memoried yet
apt-get is just worse except for build-dep
aptitude has the best search; apt-get has the (only!) build-dep; aptitude has the best show; apt's update doesn't work with repos without a gpg key so aptitude update; and whenever doing anything that might break something, always use aptitude so you get options and can pick the best solution
also aptitude full-upgrade is the best distro upgrade after you s/prior-release-name/current-release-name in /etc/apt/sources.list and /etc/apt/sources.list.d
basically I don't think they can (yet) fully deprecate / remove / replace any of the tools because each has their niche
and apt has the fastest performance for simple package installs, as well as an awesome progress bar
plus fewest keystrokes
the three CPUs I use on a daily/weekly basis :P MBP (6567U), desktop (6700K), and dedi (OVH SP-128-S)
10:34
@Rahul2001 if you've got a public repo i'm sure people here could help and guide
@Burgi Github! HERE I COME!
I'm hoping it finds memory leaks
> While we review your project application you cannot view defects.
It takes about 1-2 business day to review your association with the project and to make sure project meets open source guidelines.
bitch...
oh well, looking forward to seeing where it found my "resource leaks"
10:55
lol
Bob
Bob
@allquixotic oh yea, I forgot to get the discounted dedi -_-
whoops
@allquixotic <3 managed programs :P
1000 DEGREE KNIFE videos are so crappy :(
@Rahul2001 i'm following the repo now so i'll take a look at home
btw the CSS is missing from the repo
oh, yeah...
@Burgi Okay thanks... The main problem is that the log file gets too long to load everytime...
Uploaded CSS
Bob
Bob
@Rahul2001 don't click on em then
the views are what they want
11:10
"crappy"
DEFINE CRAPPY?
why are you looking at knife videos?
i watch 'making knife' videos
They're supposed to be "satisfying", but they're just boring and kinda ew
Oh, it's so nice to by typing on a real keyboard again...
Guys, it appears like new, very large, hard disks are available!
I have a leaked photograph of a woman holding one
That appears the kind of hard disk bay which you can simply pull/push into/out of big servers
11:27
@Rahul2001 Yeah, for 5.25" HDDs apparently ;D
i think he is being sarcastic @Rahul2001
Or maybe she is just not very tall
@Burgi I noticed
Just saw that in a job ad on SO ;P
@OliverSalzburg 0_0
11:31
how do we add a trial of visio to our O365 business subscription?
Ask me in 20 years maybe
@OliverSalzburg erm...
@Burgi As in a free trial?
You can just add it and cancel it when you no longer need it
If there even are free trials, use a different account for that
11:51
@DavidPostill Her mom read the email, didn't respond, said nothing to my friend about it. This is super weird :/
lol wut
@Rahul2001 Hmm. Maybe she is waiting till she can speak to you face to face ... how do you know she read the mail anyway?
@DavidPostill Because when I was speaking to my friend on the phone, she checked and it showed "read" on her mom's inbox
@Rahul2001 lol. Your friend shouldn't be reading her Mum's email ...
@DavidPostill She just checked whether an email was read... And besides, her mom gave her phone to her anyway...
12:04
reddit.com/r/nosleep/comments/3fsbv9/… reddit.com/r/nosleep/comments/3fx1gg/… ...do you believe these stories? it happened on deepweb..the site owner tracked the user and sent anonymous phone messages, hacked his PC..it can't be possible..you can't trace back on tor
@AlanWatch It's not completely impossible, just very difficult
@AlanWatch Oh, and btw, the nosleep subreddit on reddit is fiction
i was doubting that it was fiction
But here i found a fact in this video in which a person received anonymous text messages while being on tor..youtube.com/watch?v=L7JQ6tr_izE
@AlanWatch its on the internet. OBVIOUSLY the internet wouldn't lie to you. Also, you owe me a hundred dollars, and a squeeky toy.
internet hardly speaks the truth
@AlanWatch Those lists are often inaccurate
12:11
even the fact number 2 in which a person was viewing a pig site?
@AlanWatch That statement is offensive to me, I always tell the truth on the internet... (lie)
"a fact"
!!thatword
@JourneymanGeek what's so interesting in that word?
@AlanWatch its something you see on a random youtube channel
I hardly think its a fact
I mean, is any of this not stock photos?
12:15
they are just compilation with random pictures
So "facts"
these are not
@Rahul2001 I give my debit card to shop assistants
its pure, entirely unfounded garbage at best, conjuncture
I don't expect them to empty my bank account.
@AlanWatch you worry a lot
@djsmiley2k Are they your children? xD
12:16
TBH, I've seen more compelling facts come out of the rear end of my dog.
@Rahul2001 as a kid I posted my mums debit card between the floorboards, so no, i don't give mine to my kids
I also don't read my mums emails
or my kids diarys (if they had one)
@djsmiley2k Just to be clear, she didn't read any email
@djsmiley2k My sis always reads my diary and tells everyone everything that I've written, so I've stopped writing in it
@Rahul2001 meh, perfect chance for disinformation
@djsmiley2k i don't worry..i just know that you can't be traced or hacked just by visiting a potentially dangerous onion sites..it's a priciple tor is based on. Those facts were contradicting my knowledge about tor
@JourneymanGeek Yes!
12:19
@AlanWatch "facts"
Tor's just an alternate way to route traffic so its harder to tell where its from
@JourneymanGeek stories,hearsay,rumours?
it dosen't give you magic protection from nasty people
@AlanWatch bull...
@JourneymanGeek a potential hacker can't trace you unless they convince you to click their link to install a malware(phishing)
eh, not entirely true either
that's the 'easiest'
@AlanWatch HAHAHA
1. drive by infections exist
it doesn't matter how you access the site, the action happens in your browser
12:22
Be skeptical be smart but don't be paranoid
Trust, but verify
browser doesn't have any right to execute their malwares unless you are using windows..never use tor on windows
@AlanWatch Uh, there are equal chances of getting (mal|spy|ransom)ware on all platforms
12:25
@AlanWatch you believe facts right, we are telling you them
@AlanWatch windows has gotten quite a bit better as far as security goes
@djsmiley2k i don't believe facts ..i only investigate them a little
but there's a lot of cheeky stuff that could be done on your user account.
@AlanWatch "facts"
they arn't facts ;p
I've linked you an article from a authoritative source.
The information contained within is a fact, though one true for a certain situation
Bob
Bob
> i don't believe facts
we're done here.
12:27
This is a picture of a dog. The dog has a green nose.
Bob
Bob
no point arguing with trolls (or, worse, a manifestation of Poe's Law)
The first is a fact. The second is an observation.
But does the dog really have a green nose?
@JourneymanGeek that was a reply..not referring to that link you posted..i believe that and will be fixed soon
If the image is true, the dog has green dye coming out from its nose.
@Bob if you stab me in the eye, is poe's law invalidated?
12:30
@Bob I totally set that up to post a picture of a dog with a green nose
Bob
Bob
gad, why is it so hot here
it's nighttime
where's my cool breeze :(
@Bob Seems like I have it over here
And I'm on the train. That'd make me embarked upon leg #2 of 3 of my commute today
....
oh my god
They have plenty of seats today... lot more than I remember this train having... either they made it longer or fewer passengers
(just too perfect)
Trump: ”What’s the time difference between Washington and Berlin”?
Secretary: ”Just a second, Mr. President…”
Trump: <click>
I edited out the thanks because I doubt that trump knows how to thank people...
When you need to explain a joke...
@JourneymanGeek ??
12:44
(or edit the punchline)
@JourneymanGeek Uh, The joke is the fact the Trump thought the time difference was one second
Point made? ;p
Oh, just for the record. I saw a squirrel today. and I pointed and went squirrel.
I thought I needed to mention this
@JourneymanGeek Plot twist: It wasn't even a joke
mind blown
13:01
plot twist, trump isn't president yet
but he's been praticing that phone call for the last 8 years
Ehhhhh. The problem with jokes like that is you can swap Trump for any politician.
It lacks craft.
13:21
<?php
$file = file('log3.html');
echo $file[count($file) - 50];
echo $file[count($file) - 49];
echo $file[count($file) - 48];
echo $file[count($file) - 47];
echo $file[count($file) - 46];
echo $file[count($file) - 45];
echo $file[count($file) - 44];
echo $file[count($file) - 43];
echo $file[count($file) - 42];
echo $file[count($file) - 41];
echo $file[count($file) - 40];
echo $file[count($file) - 39];
echo $file[count($file) - 38];
echo $file[count($file) - 37];
echo $file[count($file) - 36];
echo $file[count($file) - 35];
Please forgive me, but I am not going anywhere near for loops in PHP...
@allquixotic hehehe... eh... eh
Drupal documentation is so clear, concise and plentiful!
The drupal.se chatroom is so active!
@DavidPostill siryessir
@djsmiley2k :)
I think it needs ORLY? in the middle...
13:28
@DavidPostill will nuke after dinner
@djsmiley2k Nail polish? :) orlybeauty.com
Bob
Bob
@Rahul2001 *SLAP*
Hah I made a thing!
@Burgi Man, government employees are the worst! They arrive late, do nothing and leave early. A total waste of our money...
That sounds like most employees to me :/
13:33
@ThatBrazilianGuy It's not your money. The government stole it from you. It belongs to them now :)
@DavidPostill Yeah, they pay me with my own stolen money.
My new "desk" apparently used to be a lab bench or something. Shit's an ergonomic nightmare.
@ThatBrazilianGuy xD
yesterday, by That Brazilian Guy
user image
Screens so high it makes my neck hurt.
Bonus point for the cabling WTF: cables go down a hole to come back up the same hole.
Outlets directly facing me
!!why
@ThatBrazilianGuy Because. Now shutup.
@ChatBotJohnCavil ¬¬'
Besides all that, now I need an extension cord for my headphones.
13:41
lol
get one?
@ThatBrazilianGuy >_> standing desk?
also, the monitor shelf seems to be bending
> cables go down a hole to come back up the same hole.
I actually do this, with under-table cable management
@JourneymanGeek I've seen it happen a few times.
It's smaller than the monitors, because it is not a monitor shelf.
It is not supposed to be a computer desk.
can't 'accidentally detach' it?
13:44
I suspect it used to be a lab bench and someone thought "hey let's save a few grand here"
@djsmiley2k That didn't make much sense. Use the !!/help command to learn more.
can i add stuff?
!!/help
@djsmiley2k Information on interacting with me can be found at this page
hmmm
i want to add !!orly D:
!!orly
@djsmiley2k That didn't make much sense. Use the !!/help command to learn more.
13:45
I have no clue how though
ty
!!learn orly <>https://i.sstatic.net/qPqZO.jpg
@djsmiley2k Illegal /learn object; see /help learn
errr fail
@djsmiley2k Command orly learned
13:55
,
yey
!!undo
@djsmiley2k I'm afraid I can't let you do that, djsmiley2k

« first day (2352 days earlier)      last day (2964 days later) »