Nook Shelves Information - Nook Color General

I registered just to comment on this post: http://forum.xda-developers.com/showthread.php?t=892444&highlight=shelves Only to discover that I can't actually post in that forum due to number of posts being less than 10. (Which is odd since the person I'm replying to only has 5 posts but whatever.) So I'll share the information here...
Actually, shelves are a feature of the Home app, not the Library app for some reason. At least on my Classic, I haven't checked the color yet. Specifically there's the database:
/data/data/com.bravo.home/theDB.db
That contains the following two tables:
.schema bn_client_shelves
CREATE TABLE bn_client_shelves( id INTEGER PRIMARY KEY, shelf_name TEXT UNIQUE NOT NULL COLLATE NOCASE, shelf_priority INTEGER NOT NULL, created DATE, modified
DATE );
sqlite> .schema bn_client_item_shelf
.schema bn_client_item_shelf
CREATE TABLE bn_client_item_shelf( id INTEGER PRIMARY KEY, unique_item_id TEXT NOT NULL, shelf_id INTEGER NOT NULL, created DATE, modified DATE, UNIQUE(unique_item_id, shelf_id) );
I created a shelf and added a few books to it, and got:
sqlite> select * form bn_client_shelves
1|Flint|0|1298651251201|1298651251201
sqlite> select * from bn_client_item_shelf;
select * from bn_client_item_shelf;
1|/sdcard/Flint, Eric/1632 - Eric Flint.epub|1|1298651260706|1298651260706
2|/sdcard/Weber, David & Flint, Eric/1633 - David Weber & Eric Flint.epub|1|1298651263391|1298651263391
Looks like it'd be trivial to write something to add/remove from a shelf, but given how much I like the other file browsers, I honestly don't think it's worth the time.

Related

[Q] CAN Anyone help me with my homework? If you know java

Can anyone help me with my Computer science homework? its soo hard! omg
It's In Java, I use JE Creator, Please help me if you can. this is like my last project between me passing dudes!
Here it is
even if you do one part I would be blessed!
Part 1 (18 points): Implement a class Gradebook.
a) A Gradebook object will have a course name, total points earned, and total points possible. All points will be whole numbers.
b) When a Gradebook object is constructed the course name will be provided by the user. The total points earned and total points possible should be set to zero.
c) Create a static method named disclaimer that will print the words "This program is just a tool, please consult your instructor to verify your course grade."
d) Create a method that will return the course name.
e) Create a method that will return the points earned.
f) Create a method that will return the points possible.
Part 2 (13 points): Create a tester program to test the Gradebook class.
a) In your tester program create a method called banner that will print your name.
b) Call your banner method twice.
c) Prompt the user for the course name, and then construct a Gradebook object with that name.
d) Use a method from the Gradebook class to print the course name.
e) Use a method from the Gradebook class to print the points earned.
f) Use a method from the Gradebook class to print the points possible.
g) Run your program to verify it is working.
Part 3 (20 points): Add some points!
a) Add a method that will add points to both the points earned and the points possible.
b) Modify your tester program to prompt the user for the points earned on an assignment.
c) Modify your tester program to prompt the user for the points possible on an assignment.
d) Call the method you wrote to add these points to the Gradebook object.
e) Use a method from the Gradebook class to print the points earned.
f) Use a method from the Gradebook class to print the points possible.
g) Add another grade (repeat steps b – f).
h) And again .. (repeat steps b – f).
i) Run your program to verify it is working.
Part 4 (8 points): Find the average.
a) Add a method that will return the average (total points earned divided by total points possible).
b) Modify your tester program to print the average.
c) Run your program to verify it is working.
 
Part 5 (12 points): Find letter grade.
a) Add a method that will return the letter grade. (Use the standard grading scale discussed in class.)
b) Modify your tester program to print the letter grade earned.
c) Call your banner method again.
d) Run your program to verify it is working.
Part 6 (9 points): Read from a file
a) Use Save As to save a copy of tester program with the words FromFile appended to the end. (i.e. GradebookTesterFromFile).
b) Change the name of the class to match your file name.
c) Add the following import statement just under your Scanner import statement: import java.io.*;
d) Add the words throws IOException to the header of the main method. Like this:
public static void main(String [] args) throws IOException
e) Replace the System.in parameter to your scanner object with new File("grades.txt") like this:
new Scanner(new File("grades.txt"));
f) Comment out all of your input prompts (//).
g) Save and build your file.
h) Create a new text file named gradest.txt in the same folder as your java source code. (Not java file, a text file). Like this: File, New, File, Other, Text, Next, input.txt, Finish.
i) On the first line of the grades.txt file enter course name you would have normally typed at the prompt.
j) On the next 3 lines enter in pairs the earned points and possible points. For example:
90 100
85 90
10 15
k) Save the grades.txt file. Be sure it is in the same folder as your java files.
l) Run your program to verify it is working.
Part 7 (Tricky Bonus- worth up to 8 points if you complete parts 1 – 6.):
Add another method
a) Use Save As to save a copy of FromFile tester program with the words PlusMethod appended to the end. (i.e. GradebookTesterFromFilePlusMethod).
b) Add a static method to this file that will get the earned points, the possible points and then add them to an object that is passed to the method.
c) Run your program to verify it is working.
I'm not going to do your homework for you, but I will assist you in getting there. I've been studying computer and game programming for over three years now. PM me and we will do this there.
I really don't think this is the appropriate place.
Thank you.
"A Gradebook object will have a course name, total points earned, and total points possible. All points will be whole numbers."
OK, so make a new class, call it "Gradebook", and give it 4 fields. Three integer, one string. Then make 4 getter, and 4 setter method stubs.
"When a Gradebook object is constructed the course name will be provided by the user. The total points earned and total points possible should be set to zero."
Write your constructor method.
"Create a static method named disclaimer that will print the words "This program is just a tool, please consult your instructor to verify your course grade.""
Umm... if you can't do this, step away from the computer, as you should not be passing a course such as this...
Code:
public static void disclaimer()
{
System.out.println("This program is just a tool, please consult your instructor to verify your course grade.");
}
"Create a method that will return the course name", and the other two like it...
Remember I told you to make getter and setter methods. If you did that, you have already done this...
There you go, that took about 5 minutes Rest of project should take no more than about 30 minutes, I'd say
Hey i wanted to thank you even though this is old. Thank you.
Sent from my XT1056 using xda app-developers app

[Q] Adding custom text to retrived data from database

Hi,
im a beginner i have small problem i have small application build where i can add stuff to the database and read it thats working fine for me but now for example i want to be it like example the output from the database is test test but i want it like Name : test Adress : test how can i fix this.
Thank you
Splitting Text
Not sure if I've understood correctly, but are you getting a String back from the database like this: "test test"?
If so you can use the String split() command to break your String into segments. For example:
Code:
String returned = //Get String from the database
String[] split = returned.split(" ");
String name = "Name: " + split[0]; //This contains your first word
String address = "Address: " + split[1]; //This contains your second word
How are you connecting to your database? Depending on how you connect, it is possible to return just a name, or just an address, rather than all columns in a row.
For example, using HQL (Hibernate Query Language) you could write something like:
Code:
SELECT address FROM person p WHERE p.name = "Harry"
This would return all the addresses of people called Harry from the table person

[GUIDE][Difficulty: Intermediate] Read a Random Top Voted Thread from Reddit

I'm sure many users here have heard of or currently use Reddit, the link aggregation website. If you use the website for news, to find funny jokes, to find awesome tips, etc. then you'll be happy to know that Reddit offers the ability to read data from its subreddits in the form of a JSON feed, and using Tasker we can process this feed to get the data that we want, in this case the titles of each thread. In my setup, I'm taking a random title among the top 3 posts of the day from /r/quotes.
Instructions
Variables --> Variable Set. Name %subreddit to the name of a subreddit you would like to pull from.
Variables --> Variable Set. Name %numposts to whatever number of posts you want to pull before randomizing which one is picked.
Net --> HTTP Get. The Serverort you'll be grabbing is:
Code:
json.reddit.com/r/%subreddit/top/?sort=top&t=day
Code --> Javascriptlet. Here is the Javascriptlet you'll need to put under Code.
Code:
var arr = JSON.parse(global("HTTPD"));
var randomnumber = Math.floor((Math.random()*numposts)+1);
var selftext = arr.data.children[randomnumber].data.selftext
var title = arr.data.children[randomnumber].data.title
Variables --> Variable Clear. Set Name to %HTTPD* and check Pattern Matching.
Alert --> Say. For the text, you can say anything to preface what Tasker is about to put out. For instance, I've said it to "Your quote of the day is: %title." This should change depending on which subreddit you pull from.
That's it! Pretty simple to start with. You can change the Javascriptlet to pull N number of threads into an array and mess with that if you would like. Tasker's Javascriptlet user guide is a great resource for this.
Would you mind posting the xml file? Thanks!
Did exactly as you said and it doesn't work.
Edit : Darn this is a pretty old thread
Sent from my Honor 6X using XDA Labs

Help with comparing variables

This is probably simple for a programmer, but as a newb, I am getting stuck.
I have 2 variables and I want to check if the first is contained in the second
so, %event = Phone and %check = WorkPhoneReport
I have tried :
*%event* ~ %check
*%event* ~R %check
*%event\* ~ %check
And several other similar patterns. What to do to get this test working?
I am trying to read my calendar and not process the same event a second time. So, each item it reads is appended to another variable, then on its next loop, it compares the new event to the check variable to see if it was processed already. Don't know if I should be using an array instead of a variable, and if I can use an array in a if/then statement....
Any help is appreciated!!
Figured out a way.
Variable Search and Replace:
Variable %check Search %event store in %matches
then in the if statement just check if %matches is set.
If there's a simpler way, please let me know, this task is at 50 commands, never hurts to shorten it.
Code:
%check ~R .*%event.*
In Regex format, dot (.) can be any character including having no character there, and star (*) means repeat previous character as much as possible.
So .* means "look for no character or any number of any characters", and .*%event.* means "look for %event with something or nothing before it, and something or nothing after it"

How do I rename spreadsheet columns and alter app to suit?

I have built an app from a tutorial but I am having problems adapting it to my needs. I need to rename the spreadsheet columns but when I do (and match the names in the app) if fails to get the data.
I'm not sure what spreadsheet you are referring to, but just going off my excel & VBA knowledge, can you check that auto calc is turned on? and/or hit F9 to recalc. How about the name manager section in the tool ribbon in excel? Say for example the column you want is called "variables" and it was originally defined as $A:$A (i.e., all of column A) but you did something and now it's been altered so that it's $A:$B (i.e., is all of columns A & B) then that could cause problems. Similar thing if it the area was smaller, like $A$2:$A$6. If you added a row to cell A7, the name manager is not looking past A6 in this example so your new info won't get a hit.
Hope that helps
I am using a google sheet to hold data for the app, one entry per row. I have tried with the code I have that builds the basic app. The tutorial app has first_name, last_name, email as column headers. I need them to be gridref, fallname, w3w. I have to name the data fields (?) within the app but if I use GridRef it fails but gridref works. can string names not have/be capitalised?
Also if I create a new project called WF the code I'm using works but if I name it waterfalls it fails.
I can rename them in the spreadsheet, there are no calculation fields etc. just simply text in a cell, typed in to be passed over to the app in JSON format.
I can add a new line which displays in tha app as a new entry which is what I want. I will need to add columns at some stage but I'll be happy to get this working first.
I have managed to rename 3 of the four columns but it fails when i change the name of the 4th That may not be a problem but changing last_name to aw3w causes an issue. In the app I think they are called 'holders', are some names reserved by the system?
I have figured this one out.

Categories

Resources