I was reading on how Activities communicate and how the calls stack up on top of each other. But at any instant when the OS(or dalvik) is low on resources, it can choose to kill Paused or Stopped Activities. In this scenario, how do we restore previous state of the activity(in which it was before getting killed) when we reach the same activity on our way back.
Does stack store the state as well as references to the Activity? Aren't their chances of achieving a different state when we re-constuct activity (onCreate)?
Hi,
The same compiled .Net / C++ / Com program does different things on two seemingly same computers. Both have DOZENS of things installed on them. I would like to figure out what the differencebetween the two is by looking at an ASCII diff. Before that I need to "serialize" the list of installed things in a plain readable format - sorted alphabetically + one item per line.
A Python script would be ideal, but I also have Perl, PowerShell installed.
Thank you.
hi everyone,
whats the best way to configure openvpn clients to go selectively go about using an openvpn connection? i want to setup a vpn server for friends in china, but i dont want them to use it for everything, just so they can access sites like youtube, facebook, cnn, etc. while they are in china through the vpn (these are blocked).
it would be nice if the vpn was abackup, so for instance if they are trying to go to facebook (which is blocked), it would go through the vpn connection once finding that the normal connection does not work.
this would save a lot of bandwidth cost actually, and give them a better browsing experience.
is this a iptable route thing? or a dns server that i push to my clients?
Hi-- I have a UK date in the format "06/Apr/2010 13:24" that I need to insert into a mysql db date field.
The PHP strtotime function can't handle this string-- has anyone got any ideas other than writing a custom function?
Thanks!
Users attempting to check out files from a particular Subversion 1.4.x repository with Apache 2.2 on Windows 2003 have suddenly begun getting an error message in their log windows upon checkout with TortoiseSVN 1.4:
Error REPORT request failed on '/[path_to_repo]/!svn/vcc/default'
Error REPORT of '/[path_to_repo]/!svn/vcc/default': 200 OK (http://[server_name])
This started following an hd crash on the server and subsequent restore of about 10 subversion repositories. Only one repository is having this problem after an attempted working directory reconciliation. The repo owner reconcile their working directory with the repository by modifying/deleting the hidden .svn directories (though this was not advised).
I can't find anything on the Internets that represents my situation. The restored server is exactly as the original and no other repositories on this server are throwing errors. Any ideas on 1) what this error is and 2) how to fix it?
For every Card, I would like to attacha special number to them that increments by one.
I assume I can do this all in the controller.
def create
@card = Card.new(params[:card])
@card.SpecNum = @card.SpecNum ++
...
end
Or. I can be blatantly retarded. And maybe the best bet is to add an auto-incremement table to mysql. The problem is the number has to start at a specific number, 1020.
Any ideas?
When I right click on "databases" in Sql Server 2005 Management Studio
and then Attach... Add I get the following error:
C:\Documents and
Settings\Administrator\My
Documents\SQL Server Management
Studio\
Projects\Path\To\MDF\And\LDF\Files\
cannot access the specified path or
file on the server. Verify that you
have the necessary security privileges
and that the path or file exists.
The answer is easy - the MDF and LDF files where removed when Nant (by way of my dev
machine) issued a drop command.
But, after replacing the MDF and LDF files, I want to reattach the database but the
above error keeps coming up when I select "Add".
Also, I have already "unattached" the database in question and it no longer appears on
the left under "databases".
I have tried to replace a copy of the MDF and LDF files in the folder being referenced
and that didn't work.
Any ideas as to how to gracefully get rid of this error?
hi, i have 2 object: user, group that have a relationship many to many
i want create a user and associate some groups to it.
How can i do it?
thanks
I've tried with this. but it's wrong:
user = new User();
List<int> gruppi = new List<int>() {1,2};
utente.Group =db.Group.Where(p => gruppi.Contains(p.GruppoID)
I don't know the best way to title this question but am trying to accomplish the following goal:
When a client logs into their profile, they are presented with a link to download data from an existing database in CSV format. The process works, however, I would like for this data to be 'fresh' each time they click the link so my plan was - once a user has clicked the link and downloaded the CSV file, the database table would 'erase' all of its data and start fresh (be empty) until the next set of data populated it.
My EXISTING CSV creation code:
<?php
$host = 'localhost';
$user = 'username';
$pass = 'password';
$db = 'database';
$table = 'tablename';
$file = 'export';
$link = mysql_connect($host, $user, $pass) or die("Can not connect." . mysql_error());
mysql_select_db($db) or die("Can not connect.");
$result = mysql_query("SHOW COLUMNS FROM ".$table."");
$i = 0;
if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_assoc($result)) {
$csv_output .= $row['Field'].", ";
$i++;
}
}
$csv_output .= "\n";
$values = mysql_query("SELECT * FROM ".$table."");
while ($rowr = mysql_fetch_row($values)) {
for ($j=0;$j<$i;$j++) {
$csv_output .= '"'.$rowr[$j].'",';
}
$csv_output .= "\n";
}
$filename = $file."_".date("Y-m-d",time());
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: csv" . date("Y-m-d") . ".csv");
header( "Content-disposition: filename=".$filename.".csv");
print $csv_output;
exit;
?>
any ideas?
I've created a Dynamic Data project with an Entity Framework model. It works nicely. But, right now it shows all my database tables with the db column names - which aren't always the most friendly (e.g. address_line_1). How can I got about giving these more friendly column titles that will display to the end user?
I have a table with
name varchar
address varchar
country varchar
city varchar
.....
to store address of location
example:
name|address|country
HaLong hotel|156 blahblah street|Vietnam
Hotel Ha Long|156 blah blah|Vietnam
Two rows above is duplicate data.
I have a form, when user submit new location. The code need to find akin records to give a message (ex: This location already in db, use it or create new?)
How to make a query to get akin record like this?
Hi,
I need to get all dates and people modifications to currenlty displayed page, all changes which have been published and end user can see differencebetween them.
My page is aspx connected to pageLayout in which is richhtmlfield with article.
How to do that? Is it possible to do that ?
I have custom control - chart with size, for example, 300x300 pixels and more than one million points (maybe less) in it. And its clear that now he works very slowly. I am searching for algoritm which will show only few points with minimal visual difference.
I have link to component which have functionallity exactly what i need
(2 million points demo):
http://www.mindscape.co.nz/demo/SilverlightElements/demopage.html#/ChartOverviewPage
I will be grateful for any matherials, links or thoughts how to realize such functionallity.
I've seen various Grails plugins which allow easier handling of file uploads, however these tend only to support a single file per form-submit.
I'd like a multi-attach form where as soon as you pick one file, an extra field and button is added using JS (various sites do it like this).
Do you know of any good plugins which provide elegant uploading of multiple files without excessive coding? A progress bar either per-file of for the whole process would also be very nice.
I don't know to what extent I can allow GORM to handle a java.io.File field (or in this case a Collection<File>).
Hi
In my mode I am selecting a field as
$query1 = $this->db->query("SELECT dPassword
FROM tbl_login
WHERE dEmailID='[email protected]'");
How to return dpassword as a variable to my controller
I tried this way return dpassword;
Here is what happened,
i ve installed xubuntu via wubi on my D: drive. I have 2 drives by the way C: and D:
Basically i use C: drive for windows and D drive for rest andbackup as everybody does. And i installed my WUBI installation on drive D: too.
Than i tried to do a little extreme thing. Which is basically i tried to make a shortcut to D: folder within Xubuntu. The problem is suddenly all my files disappeared. Folders stayed same, but files disappeared. Also the drive have the files, i know because it is still full, but the thing is i cannot see any of my files.
I tried checking for errors and some basic data recovery which didn't worked at all
Any help?
I have seen this piece of code in jquery plugin patterns and the notes section mention that we could attach the plugin to the DOM element using the jQuery.data function. What I don't understand is how do I make use of this piece of code. Can somebody provide examples of how to use this functionality and explain its significance?
$.fn[pluginName] = function (options) {
return $Extend(this).each(function () {
if (!$.data(this, 'plugin_' + pluginName)) {
$.data(this, 'plugin_' + pluginName,
new Plugin( this, options ));
}
});
};
I am trying to persist member variables by saving them in the ViewState (only a few small variables) however I read up and I gather its better to save them into the ViewState at the PreRender stage than PageLoad?
I can see that the ViewState can be saved to anytime before Page rendering, but does it make any difference in PreRender or PageLoad?
The answer in this post http://stackoverflow.com/questions/2119680/use-jquery-to-check-if-a-url-on-another-domain-is-404-or-not shows how to use YQL in Jquery to check if URL is valid or not. However, I can't get this to work for me. The only difference I can think of is that my URL is a text file (http://mycrossdomain.com/sometext.txt) and not HTML.I think the YQL query needs to be adjusted accordingly. Any help is appreciated.
Perl 6 seems to have an explosion of equality operators. What is =:=? What's the differencebetween leg and cmp? Or eqv and ===?
Does anyone have a good summary?
I've been running my Wordpress install for months with 2 users, the original administrator which I use and another admin account created for my co-admin. We've been posting fine, no issues, all was great.
Two days ago I created another user, and now whenever I log in as the original admin (my account) I am no longer in the authors dropdown list. Any new users I create show up, but my original account is no longer listed.
I can't figure out what's going on, nor how to restore myself.
Hi there,
What's the differencebetween using the two options below to output link HTML?
theme('links', $primary_links, array('class' => 'links primary-links'))
theme_links($primary_links, $attributes = array('class' => 'links primary-links'))
Many thanks