John Kwest

+ Follow
since Feb 16, 2011
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Kwest

I was wondering if anyone knew what book for java is most like Bjarne Stroustrup's book for C++.

Programming: Principles and Practice using C++

Thank you
10 years ago
Hi everyone,

I need to take a table from a website and put it into an app. My methodology is this: connect to a site, place html into a string, place table data into a webview. I have successfully connected to the website, placed the HTML into a variable called myString and have even the loaded myString into a webview as a test.

My question is what is the best way to only load the <table> everything here </table>. In other words, I only want the table data.
I have experimented with xpath but can't seem to get it to work.
Also, looking ahead to the next step I will ultimately have to change the padding and whatnot of the table to make it look better on the device correct?

Thank you very much for your help.
13 years ago
Hi everyone, i need a little help here.

My issue is that I have a layout that requires 5 buttons on the side that will be set to which values to look at. I have gotten the 5 buttons to align up and down just like I want, and have a new linear layout to the right with a text view that will be redrawn many times to show data. The problem is that every redraw of the text view creates 5 buttons inside of it....

Note, i have also tried this with tablelayout

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android=""
android:layout_width="fill_parent" android:orientation="horizontal" android:baselineAligned="false" android:layout_height="fill_parent">
<LinearLayout android:id="@+id/linearLayout1" android:layout_height="match_parent" android:layout_width="wrap_content" android:orientation="vertical">
<Button android:text="Button" android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
<Button android:text="Button" android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
<Button android:text="Button" android:id="@+id/button3" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
<Button android:text="Button" android:id="@+id/button4" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
<TextView android:text="TextView" android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/job_text"></TextView>

13 years ago
String description = article.getDescription();
int tempIndex = 0;
for(int i=0;i<3;i++) {
tempIndex = description.indexOf("<br />",tempIndex);
tempIndex += "<br />".length(); }
description = description.substring(1,tempIndex);

works perfectly, thank you very much fellows
13 years ago
Here is a example of the xml

<description>5 checks at $20,000<br />2 checks at $1,000<br />154 checks at $850<br /><br /> and then a very long breakdown of over a thousand characters <description>

I require everything before the third line break. The remainder of the description is not required to be saved. Right now i have everything being put into a variable called "description".

I have tried description = description.substring(1,70); which would be great if every field was the same size, but of course this will not work for every field as the data is different for each field.

I need to know how to just get everything before the third line break and discard the rest

thank you

13 years ago
Hello everyone, some help would be greatly appreciated.

I am working with an xml document that has very large descriptions. I only need the beginning part of each description. The common thing in each string is that I need everything before the third line break. How could I do this? Thank you very much
13 years ago
Ok, so I want to develop an application for the phone that gets some data from a website. There is an RSS feed and I only want a part of the description tag. I need to a starting point to jump off from. Many many moons ago I used to tinker with C and C++ using a GNU compiler. I have a basic understating of programming (or had anyway, but I'm sure it will come back). A major hurdle for me is that I have never developed anything with a GUI other than some little BS things with VBasic years and years ago. From what I've read it seems Eclipse with the ADT (android SDK) are the tools to use? Any help, tutorials, ebooks, would be greatly appreciated. Also, does java have procedures for taking that RSS feed and parsing the data I want from it? Thank you for the help, I'm sure I'll be asking for more soon.

Also, I have a 64 bit system but do I download the 64 bit or 32 bit Eclipse IDE and compiler?
13 years ago