420chan now has a web-based IRC client available, right here
Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the float Name#Password
A subject is required when posting a new thread
Subject
Comment
[*]Italic Text[/*]
[**]Bold Text[/**]
[~]Taimapedia Article[/~]
[%]Spoiler Text[/%]
>Highlight/Quote Text
[pre]Preformatted & Monospace text[/pre]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich


Community Updates

420chan now supports HTTPS! If you find any issues, you may report them in this thread
Scraping a webpage by Basil Sannerstine - Mon, 25 Jan 2016 11:29:57 EST ID:QSpowFMW No.35051 Ignore Report Reply Quick Reply
File: 1453739397830.png -(125408B / 122.47KB, 414x566) Thumbnail displayed, click image for full size. 125408
So, I've been interested in browser automation using Python for ages, and I just happened across the splinter module, which is great. I am not dead-set on using splinter for this, although the module will probably be involved in future ventures.

I would like to create a script that can go to a given page store all of the text from that page (html file or document, doesn't matter) while preserving the original formatting but leaving out images and such, navigate to every page linked to from the original page and do the same thing, and repeat the whole thing until I have the entire site archived on my computer. Of course, there would need to be some sort of safeguard so I only store that site, instead of the entire internet, ha.

What modules should I use for this? I've Googled it, but there are just too damn many and I suck too much at programming to figure out which one to use! xlml? BeautifulSoup? Point me in the right direction, guys.
1 posts omitted. Click Reply to view.
>>
Basil Sannerstine - Mon, 25 Jan 2016 12:31:04 EST ID:QSpowFMW No.35053 Ignore Report Quick Reply
>>35052
Will look into it, thanks.
>>
Ernest Sirringstat - Mon, 25 Jan 2016 13:33:58 EST ID:KrVLti/X No.35054 Ignore Report Quick Reply
If you can do it with wget then you should. If you can't, you really want something like phantomJS.
>>
Caroline Heblingridge - Wed, 27 Jan 2016 22:35:10 EST ID:arMXOJXj No.35065 Ignore Report Quick Reply
See below posts I did the base of this in C# and Python.
>>
Hannah Nunderman - Sat, 30 Jan 2016 13:44:37 EST ID:5q2tULje No.35086 Ignore Report Quick Reply
http://www.obeythetestinggoat.com/pages/book.html

Is probably what you want to read, and if not it tells you about browser automation and then some/
>>
Jarvis Chimmerbedging - Sun, 31 Jan 2016 03:00:15 EST ID:NRETuDGI No.35087 Ignore Report Quick Reply
use httrack


Simple website by Frederick Sizzlesere - Fri, 08 Jan 2016 05:41:34 EST ID:gm2HhQXH No.34971 Ignore Report Reply Quick Reply
File: 1452249694277.png -(1234866B / 1.18MB, 900x865) Thumbnail displayed, click image for full size. 1234866
Need to make a simple site for college creds.

Site needs:
CSS
Java script
HTML5

What software is free and easy to use?
Can I code it in FF in an empty tab with F12?
13 posts omitted. Click Reply to view.
>>
Alice Brevingked - Thu, 28 Jan 2016 16:17:10 EST ID:S+TDDgvB No.35079 Ignore Report Quick Reply
>>35064
Why would that be hundreds of files? Utilities for x in one file, utilities for y in another, a main file and some miscellanous stragglers that are probably going to just be configs. Like, if you have hundreds of files at 1000 lines of code, that's 10 lines of code per file. At 10000 that's 100. 100 LOC is not much.

Like, dafuq Java people?
>>
Samuel Brudgebanks - Thu, 28 Jan 2016 17:16:53 EST ID:+6d1kOO+ No.35080 Ignore Report Quick Reply
>>35079
I Should have said 140-200 lines for a simple app with multiple options. If you wanna be competitive in the market type apps not POC one function apps.
>>
Molly Fanninghood - Fri, 29 Jan 2016 07:04:28 EST ID:iqiK9pKW No.35081 Ignore Report Quick Reply
>>35063
I've got a project at about 12 000 LOC. It consists of many programs and a library. I keep my tree reasonably organised and from the terminal I can easily open anything I need to
I guess it's preference. To me, it seems like a waste, but I have yet to find an IDE that does projects and which does not feel sluggish and crap.
>>
Molly Fanninghood - Fri, 29 Jan 2016 07:05:28 EST ID:iqiK9pKW No.35082 Ignore Report Quick Reply
>>34971
I'm sorry if I ballsed your thread up OP. I asked a little question and now nobody is talking about your question
>>
Nigger Dopperway - Sat, 30 Jan 2016 10:20:54 EST ID:Dt0fmYlS No.35085 Ignore Report Quick Reply
>>35079

Well, Java forces you to put every public class in its own file. C# and some C++ programmers tend to do this by convention, as well.

>>35081

I could see that being doable at 12k LOC, but there's no way that's sustainable when you hit 100k LOC or even 1 million LOC. Not many one-person projects get that large, but it does happen, and for a lot of us (though perhaps not OP in this case) these projects are side projects. Using the same tools that you do at work cuts down on mental context-switching leads to better productivity.

Plus, even for small projects, I've found that using an IDE for debugging beats using a command-line debugger. Visual Studio's "parallel stacks" view in particular is fantastic. I showed that tool to a greybeard at work the other day and it blew his mind. I mean, look at this: https://msdn.microsoft.com/en-us/library/dd998398.aspx


table by Samuel Mimmleville - Sun, 17 Jan 2016 22:43:07 EST ID:FXoIGgo7 No.35021 Ignore Report Reply Quick Reply
File: 1453088587136.jpg -(136962B / 133.75KB, 742x500) Thumbnail displayed, click image for full size. 136962
so I have a simple table on my website and I am using a filter script on it that shows the rows that pass the filters, I want only the first column info to be shown so I have hidden all the other columns.
My problem is I want the first column info (images) to be presented horizontally like a gallery instead of vertically, since I am not very advanced is there any way to do this using html table or do I need divs?
>>
Archie Missleson - Mon, 18 Jan 2016 01:42:22 EST ID:FZqsCuoJ No.35024 Ignore Report Quick Reply
>>35021
It shouldn't be too hard. For each row of your table you should have:
<tr><td>your table row data</td></tr>
instead just have one set of <tr> tags with multiple <td> tags and everything should display on the same row.
>>
Cyril Chevingmudge - Mon, 18 Jan 2016 03:33:07 EST ID:tSOrTy4O No.35025 Ignore Report Quick Reply
>>35024
u know tables ur hired!!
>>
Rebecca Sacklefield - Tue, 19 Jan 2016 14:58:08 EST ID:l0DAvjTz No.35030 Ignore Report Quick Reply
>>35021
>My problem is I want the first column info (images) to be presented horizontally like a gallery instead of vertically, since I am not very advanced is there any way to do this using html table or do I need divs?
Use divs inside a flexbox: https://jsfiddle.net/JUq7C/ (Try resizing the output section.)

(Btw, don't complain that nothing supports flexbox; It's not 2010 anymore: http://caniuse.com/#search=flexbox )
>>
Jenny Sonkinstotch - Tue, 19 Jan 2016 23:55:48 EST ID:FXoIGgo7 No.35037 Ignore Report Quick Reply
>>35030
looks good but my filter script is using the table row and column numbers to do the filtering, if I make the table with divs how would the script take the values of each specific column? here is the script with the table id "thetable"

<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$(document).ready(function() {
$(function() {
$( "#slider-range ).slider({
range: true,
min: 0,
max: 100,
values: [ 0, 100 ],
slide: function( event, ui ) {

$( "#amount" ).val( ui.values[ 0 ] + "% - " + ui.values[ 1 ] + "%");
Comment too long. Click here to view the full text.
>>
Cyril Boddleway - Wed, 20 Jan 2016 12:29:39 EST ID:keuZFxhN No.35038 Ignore Report Quick Reply
>>35037
Learn what MVC is. Embrace it. Use it. https://www.wikiwand.com/en/Model%E2%80%93view%E2%80%93controller

Right now, your code is deviating from MVC. It has the following problems:
(1) It doesn't store the model, but instead parses the html *every* time.
(2) It then modifies the current html, instead of generating new html.
Also, a flex box is *NOT* a table. The only thing the table tag should ever be used for is storing tabular data. (Tabular data is data that has records (aka rows in Excel) and fields (aka columns in Excel).) The table tag should *never* be used for layout, nor for a gallery of items. (A gallery is what's in your pic and my fiddle.)


no subject here by Chim Richalds - Tue, 19 Jan 2016 18:39:36 EST ID:3WnFni9j No.35031 Ignore Report Reply Quick Reply
File: 1453246776407.jpg -(37645B / 36.76KB, 480x360) Thumbnail displayed, click image for full size. 37645
Hey yall, I've been working on a method that receives two strings as parameters. The method returns the concatenation of both strings BUT removes the duplicate characters. (e.x. "Red" and "Edge" become "redge"):

public class justforgiggles
{
public static void main(String []args)
{
String first = "red";
String second = "edge";
String third = "bu";
String fourth = "ull";

String concat = "";
String concat2 = "";
String finalConcat;
System.out.println(first.compareTo(first));
Comment too long. Click here to view the full text.
>>
Phoebe Druffingstone - Tue, 19 Jan 2016 19:07:09 EST ID:FZqsCuoJ No.35032 Ignore Report Quick Reply
>>35031
You are getting this error because char is a primitive type, so you cannot use compareTo

You can simply use the == operator:
second.charAt(i) == third.charAt(i)
>>
Jenny Blathershit - Tue, 19 Jan 2016 19:09:10 EST ID:zL5sUtUX No.35033 Ignore Report Quick Reply
The pro way to solve this is to find an off the shelf object that does exactly what you need it to do: accept only unique elements and preserve their order. I don't use Java so I can't recommend anything. I'm not reading that mess, but I will tell you that the clean way to do this yourself is to have one method that returns the comparison result for one pair of strings and then have some separate logic for managing the inputs and their order.
>>
Chim Richalds - Tue, 19 Jan 2016 20:18:14 EST ID:3WnFni9j No.35034 Ignore Report Quick Reply
>>35032
Currently working on this new version:

String first = "red";
String second = "edy";
String concat = "";

for(int i =0;i<first.length();i++)
{
for(int j =0;j<second.length();j++)
{
if(first.charAt(i)==second.charAt(j))
{
concat = first.charAt(i)+ concat;
}
Comment too long. Click here to view the full text.
>>
Phoebe Druffingstone - Tue, 19 Jan 2016 21:31:25 EST ID:FZqsCuoJ No.35035 Ignore Report Quick Reply
>>35034
What if, instead of comparing the characters in the Strings first and second, you compare the characters with what you have already added to the concat String

for each character in first
if character is not in concat, add it
for each character in second
if character is not in concat, add it


<<Last Pages
0 1 2 3 4 5 6 7 8 9 10 11
Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.