I guess my previous question wasn't clear enough (http://stackoverflow.com/questions/2549585/android-failed-to-setcontentview-when-switching-to-listactivity), so I explain as follows.
In my app I have two listactivities which uses two different listviews:
public class Activity1 extends ListActivity {
@Override
public void onCreate(Bundle…
just want to verify that database partition is implemented only at the database level, when we query a partitioned table, we still do our normal query, nothing special with our queries, the optimization is performed automatically when parsing the query, is that correct?
e.g. we have a table called 'address' with a column called…
Is there anyway to get the actual images used in resources? e.g., I want the two png files in CheckBox in starstyle? Which directory does andorid keep them?
hi, guys, can the save method be used to update a record?
person = Person.new
person.save # rails will insert the new record into the database.
however, if i find a record first, modify it and save it. is it the same as performing a update?
person = Person.find(:first, :condition => "id = 1")
person.name =…
I know theres a better solution using arc4random (it's on my to-try-out-function list), but I wanted to try out using the rand() and stand(time(NULL)) function first. I've created a NSMutableArray and chuck it with 5 data. Testing out how many number it has was fine. But when I tried to use the button function to…
I have the following configurations in my web.config file, but how can I log the information into data.txt and general.txt separately in C#?
Could anyone provide some sample code for me?
<appender name="GeneralLog" type="log4net.Appender.RollingFileAppender">
<file value="App_Data/Logs/general.txt"…
What is the problem below?
routes.MapRoute(
"Default2", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "test" } // Parameter defaults
);
routes.MapRoute(
"Default1", // Route name
…
Hi all, I have two questions:
First one:
I have a order list and want to group them by the created month for the reports.
Each order's created datetime will be like "2010-03-13 11:17:16.000"
How can I make them only group by date like "2010-03"?
Note: the DateCreated is the DateTime tpye
The…
I tried to install the following dependencies for PyGTK 2.16.0 (the Python GIMP Tool Kit) on Mac OS 10.6.3:
glib 2.25.5
gettext-0.18
libiconv-1.13.1
When I tried to install glib, I got the following error message:
gconvert.c:55:2: error: #error GNU libiconv not in use but included iconv.h is…
I have the following list:
[('Steve Buscemi', 'Mr. Pink'), ('Chris Penn', 'Nice Guy Eddie'), ...]
I need to convert it to a string in the following format:
"(Steve Buscemi, Mr. Pink), (Chris Penn, Nice Guy Eddit), ..."
I tried doing
str = ', '.join(item for item in items)
but run into…
It seems that android has enforced that a listview must have the name android:id="@android:id/list", is there anyway to create multiple listview then? I have two activities which are both listview but have to control different format of Lists, one with image+text the other is just text.
I have a simple xml file and I want to remove everything before the first tag.
.....
item1
....
The following java code is not working:
String cleanxml = rawxml.replace("^[\\s\\S]+<item>", "");
What is the correct way to do this? And how do I address the non-greedy…
according to Apache AVRO project, "Avro is a serialization system". By saying data serialization system, does it mean that avro is a product or api?
also, I am not quit sure about what a data serialization system is? for now, my understanding is that it is a protocol that defines how data…
I want to output accuracy memory usage on iphone device, the method I used was taking from,
http://landonf.bikemonkey.org/code/iphone/Determining%5FAvailable%5FMemory.20081203.html
natural_t mem_used = (vm_stat.active_count +
vm_stat.inactive_count +
…
I have a bunch of (50+) XML files in a directory that I would like to insert into a SQL server 2008 table.
How can I create a SQL script from the command prompt or Powershell that will let me insert the files into a simple table with the following schema:
XMLDataFiles (
xmlFileName…
I have a transaction table of 1 million rows. The table has a field name "Code" to keep customer's ID. There are about 10,000 different customer code.
I have an GUI interface allow user to render a report from transaction table. User may select arbitrary number of customers for…
I understand that cubes are optimized data structures for aggregating and "slicing" large amounts of data. I just don't know how they are implemented.
I can imagine a lot of this technology is proprietary, but are there any resources that I could use to start implementing my own…
From MSDN:
If a statement that includes an OUTPUT
clause is used inside the body of a
trigger, table aliases must be used to
reference the trigger inserted and
deleted tables to avoid duplicating
column references with the INSERTED
and DELETED tables associated…
I'm using the MySql connector for .NET to copy data from MySql servers to SQL Server 2008.
Has anyone experienced better performance using one of the following, versus the other?
DataAdapter and calling Fill to a DataTable in chunks of 500
DataReader.Read to a DataTable in…
Hi,
I am using Dialog 2010 and Windows 7.
When I invoke TTaskDialog.Execute method, there is a short flash of screen cursor change to hour glass.
Is there any way to get rid of it? As it doesn't have much meaning for a simple task dialog but causing some delay to wait for…
is there any way to avoid using tmp table?
I am using a query with aggregate function (sum) to generate the sum of each product: the result looks like this:
product_name | sum(qty)
product_1 | 100
product_2 | 200
product_5 | 300
now i want to join the above…
We have a site developed in PHP. It is working just fine. We have used JQuery for every kind of situation like slide shows, menus, etc.
This site contains a lot of images which are large in size. because of this when viewed in a mobile phone user has to scroll a lot.
How…