how to intreacting with database in asp.net without interfering and
frezzing for page
In asp.net
How to run sql command in background and still play with controls and user
interface does not freeze until result for command return ...
I read about web worker in java script is that the best solution .. and
how to attach it with asp.net
Thursday, 3 October 2013
Wednesday, 2 October 2013
Save BinaryWrite to Server Path
Save BinaryWrite to Server Path
I am saving files to SQL Server on remote hosted server. I can upload
them. But I need to download a file to the remote servers path. The code
below extracts the file but saves it to the client.
I tried replacing Response.BinaryWrite(bytes) to Response.TransmitFile(
Server.MapPath("~/App_Data/DS/sailbig.jpg") but I get an error file not
found.
I simply want to extract the file I stored in sql and place it a the
directory on the server so I can use it in code later, but I cannot figure
it out. Any help is appreciated, this is a hobby for me.
Dim filePath As String =
HttpContext.Current.Server.MapPath("~/App_Data/DS/")
Dim bytes() As Byte = CType(dt.Rows(0)("Data"), Byte())
response.Buffer = True
response.Charset = ""
response.Cache.SetCacheability(HttpCacheability.NoCache)
response.ContentType = dt.Rows(0)("ContentType").ToString()
Response.AddHeader("content-disposition", "attachment;filename=" &
dt.Rows(0)("FileName").ToString())
Response.BinaryWrite(bytes)
Response.Flush()
Response.End()
I am saving files to SQL Server on remote hosted server. I can upload
them. But I need to download a file to the remote servers path. The code
below extracts the file but saves it to the client.
I tried replacing Response.BinaryWrite(bytes) to Response.TransmitFile(
Server.MapPath("~/App_Data/DS/sailbig.jpg") but I get an error file not
found.
I simply want to extract the file I stored in sql and place it a the
directory on the server so I can use it in code later, but I cannot figure
it out. Any help is appreciated, this is a hobby for me.
Dim filePath As String =
HttpContext.Current.Server.MapPath("~/App_Data/DS/")
Dim bytes() As Byte = CType(dt.Rows(0)("Data"), Byte())
response.Buffer = True
response.Charset = ""
response.Cache.SetCacheability(HttpCacheability.NoCache)
response.ContentType = dt.Rows(0)("ContentType").ToString()
Response.AddHeader("content-disposition", "attachment;filename=" &
dt.Rows(0)("FileName").ToString())
Response.BinaryWrite(bytes)
Response.Flush()
Response.End()
Get a resource string based on javascript value
Get a resource string based on javascript value
Is it possible to accomplish something like this?
<script type="text/javascript">
function getValues( keysArray ) {
var valuesArray = new Array(keysArray.length);
for (var i = 0; i < keysArray.length; i++) {
valuesArray[i] = @this.LocalResources(keysArray[i]);
}
return valuesArray;
}
Is it possible to accomplish something like this?
<script type="text/javascript">
function getValues( keysArray ) {
var valuesArray = new Array(keysArray.length);
for (var i = 0; i < keysArray.length; i++) {
valuesArray[i] = @this.LocalResources(keysArray[i]);
}
return valuesArray;
}
Servlet-Applet communication
Servlet-Applet communication
I have an applet successfully signed and deployed in my application.
I have a index.html which loads the applet correctly if I make a call like
/myApp
However,if I try to forward to index.html from a servlet, I´m getting a
ClassNotFoundException.
Here are the code that loads the applet.All these jars are in the
WebContent folder.
index.html
<applet code="com.griaule.grFingerSample.FormMain"
archive="fingerAssinado.jar,SignedGrFingerJavaAppletSampleAssinado.jar,postgresql-8.4-701.jdbc4Assinado.jar"
What am I doing wrong?
I have an applet successfully signed and deployed in my application.
I have a index.html which loads the applet correctly if I make a call like
/myApp
However,if I try to forward to index.html from a servlet, I´m getting a
ClassNotFoundException.
Here are the code that loads the applet.All these jars are in the
WebContent folder.
index.html
<applet code="com.griaule.grFingerSample.FormMain"
archive="fingerAssinado.jar,SignedGrFingerJavaAppletSampleAssinado.jar,postgresql-8.4-701.jdbc4Assinado.jar"
What am I doing wrong?
how to sync the perforce client to a particular change list using p4 sync command
how to sync the perforce client to a particular change list using p4 sync
command
let us assume depot contains change lists :
change lists : 300 299 280 270 260
I would like to sync my client at change list 280.
if i do p4 sync : my client will be updated with cl : 300 (latest one)
which i'm not looking for.
How can we achieve this ?
command
let us assume depot contains change lists :
change lists : 300 299 280 270 260
I would like to sync my client at change list 280.
if i do p4 sync : my client will be updated with cl : 300 (latest one)
which i'm not looking for.
How can we achieve this ?
Tuesday, 1 October 2013
iOS Core Data: How do I add subsequent records to the 'many' of 1:many relationships?
iOS Core Data: How do I add subsequent records to the 'many' of 1:many
relationships?
I am writing an GPS running app that I want to store multiple locations
per 'Path' or run. I am having a little trouble understanding the new
concepts of ORM style DBs. (I know Core Data uses SQLLite as the
underlying mechanism and isn't a true ORM, but that aside..,) I have two
entities setup, 'Path' and 'Location', with a 'To-Many' relationship going
from Path>>Location with Cascade Deletion, and an inverse that just has
nullify for Delete.
I am doing:
//SEND TO CORE DATA
bdAppDelegate *appDelegate =
[[UIApplication sharedApplication] delegate];
NSManagedObjectContext *context =
[appDelegate managedObjectContext];
// get GPS lat/lng
double lat = newLocation.coordinate.latitude;
double lng = newLocation.coordinate.longitude;
// insert Path
Path *currentPathInfo = [NSEntityDescription
insertNewObjectForEntityForName:@"Path"
inManagedObjectContext:context];
currentPathInfo.name = currentPathName;
currentPathInfo.createddate =[NSDate date];
// insert location/GPS point
Location *currentPathLocation = [NSEntityDescription
insertNewObjectForEntityForName:@"Location"
inManagedObjectContext:context];
currentPathLocation.lat = [NSNumber numberWithDouble:lat];
currentPathLocation.lng = [NSNumber numberWithDouble:lng];
// insert 'Location' relationship to 'Path'
[currentPathInfo addLocationsObject:currentPathLocation];
NSError *error;
if (![context save:&error]) {
NSLog(@"Whoops, couldn't save: %@", [error
localizedDescription]);
}
This is on initial startup (button press) but then how do I continue to
add more 'Locations' that relate to the initial 'Path' without continuing
to add more 'Path's as a result of repeating the above code?
In SQL, I'd have a PathID integer (identity) that I'd use for a foreign
key in a 'Locations' table to insert locations... I'm having a
disconnect...
relationships?
I am writing an GPS running app that I want to store multiple locations
per 'Path' or run. I am having a little trouble understanding the new
concepts of ORM style DBs. (I know Core Data uses SQLLite as the
underlying mechanism and isn't a true ORM, but that aside..,) I have two
entities setup, 'Path' and 'Location', with a 'To-Many' relationship going
from Path>>Location with Cascade Deletion, and an inverse that just has
nullify for Delete.
I am doing:
//SEND TO CORE DATA
bdAppDelegate *appDelegate =
[[UIApplication sharedApplication] delegate];
NSManagedObjectContext *context =
[appDelegate managedObjectContext];
// get GPS lat/lng
double lat = newLocation.coordinate.latitude;
double lng = newLocation.coordinate.longitude;
// insert Path
Path *currentPathInfo = [NSEntityDescription
insertNewObjectForEntityForName:@"Path"
inManagedObjectContext:context];
currentPathInfo.name = currentPathName;
currentPathInfo.createddate =[NSDate date];
// insert location/GPS point
Location *currentPathLocation = [NSEntityDescription
insertNewObjectForEntityForName:@"Location"
inManagedObjectContext:context];
currentPathLocation.lat = [NSNumber numberWithDouble:lat];
currentPathLocation.lng = [NSNumber numberWithDouble:lng];
// insert 'Location' relationship to 'Path'
[currentPathInfo addLocationsObject:currentPathLocation];
NSError *error;
if (![context save:&error]) {
NSLog(@"Whoops, couldn't save: %@", [error
localizedDescription]);
}
This is on initial startup (button press) but then how do I continue to
add more 'Locations' that relate to the initial 'Path' without continuing
to add more 'Path's as a result of repeating the above code?
In SQL, I'd have a PathID integer (identity) that I'd use for a foreign
key in a 'Locations' table to insert locations... I'm having a
disconnect...
setting css styles usign jQuery
setting css styles usign jQuery
I need to set the css styles to the following elements as follows using
jQuery
#hdr-nav-wrapper ul li:hover a{
background-color:#0294ca;
}
#hdr-nav-wrapper ul a:hover{
background-color:#00aeff;
}
Except that the actual color will have to be dynamic based on whatever the
background color of a div with id of "TestDiv". This site has a theme
engine where users can change colors using a color theme palette. I am
appending a nav bar to the top of the site but I want to have the
background of the nav bar as the same as whatever "TestDiv" currently has.
How do I convert the above css to jQuery with that dynamic logic?
I need to set the css styles to the following elements as follows using
jQuery
#hdr-nav-wrapper ul li:hover a{
background-color:#0294ca;
}
#hdr-nav-wrapper ul a:hover{
background-color:#00aeff;
}
Except that the actual color will have to be dynamic based on whatever the
background color of a div with id of "TestDiv". This site has a theme
engine where users can change colors using a color theme palette. I am
appending a nav bar to the top of the site but I want to have the
background of the nav bar as the same as whatever "TestDiv" currently has.
How do I convert the above css to jQuery with that dynamic logic?
Connecting to Ubuntu using Remote Desktop Connection on Windows 7
Connecting to Ubuntu using Remote Desktop Connection on Windows 7
I'm trying to connect to a machine with Ubuntu from a different machine
running Windows 7 using the Windows Program Remote Desktop Connection.
I used the command:
sudo apt-get install xrdp
which worked, except that when I connect from my Windows I can only see
the blank desktop background of the remote Ubuntu. The taskbar, icons etc
are all missing. Does anyone know how to fix this?
Thanks
I'm trying to connect to a machine with Ubuntu from a different machine
running Windows 7 using the Windows Program Remote Desktop Connection.
I used the command:
sudo apt-get install xrdp
which worked, except that when I connect from my Windows I can only see
the blank desktop background of the remote Ubuntu. The taskbar, icons etc
are all missing. Does anyone know how to fix this?
Thanks
Please help identify on which partition I have ubuntu installed
Please help identify on which partition I have ubuntu installed
I need to reinstall my GRUB since I cannot boot windows 8 anymore
(something happened with my installation of Ubuntu). I want to follow this
advice - Boot error > no such device: grub rescue in order to re-install
the grub but I made the stupid mistake of allocating half of the size of
the partition to windows and half to Ubuntu lol. So now I need to know on
which partition I have Linux could someone help me out ? Thanks. Here is
the partition list
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 718847 358400 7 HPFS/NTFS/exFAT
/dev/sda2 718848 1025779711 512530432 7 HPFS/NTFS/exFAT
/dev/sda3 1025779712 1851121663 412670976 7 HPFS/NTFS/exFAT
/dev/sda4 1851121664 1953521663 51200000 f W95 Ext'd (LBA)
/dev/sda5 1851123712 1953521663 51198976 7 HPFS/NTFS/exFAT
I need to reinstall my GRUB since I cannot boot windows 8 anymore
(something happened with my installation of Ubuntu). I want to follow this
advice - Boot error > no such device: grub rescue in order to re-install
the grub but I made the stupid mistake of allocating half of the size of
the partition to windows and half to Ubuntu lol. So now I need to know on
which partition I have Linux could someone help me out ? Thanks. Here is
the partition list
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 718847 358400 7 HPFS/NTFS/exFAT
/dev/sda2 718848 1025779711 512530432 7 HPFS/NTFS/exFAT
/dev/sda3 1025779712 1851121663 412670976 7 HPFS/NTFS/exFAT
/dev/sda4 1851121664 1953521663 51200000 f W95 Ext'd (LBA)
/dev/sda5 1851123712 1953521663 51198976 7 HPFS/NTFS/exFAT
Monday, 30 September 2013
Extracting a zip file in my machne givs me CRC error?
Extracting a zip file in my machne givs me CRC error?
I have a large zip that contain hundreds of file. I've unzip'ed it in more
than one machine and didn't have any problem before. However, for this
particular machine (Ubuntu Server 12.04) I keep getting CRC error for some
of the files inside my zip. I've unzip'ed the same file it on anther
machine just to and its fine.
Any clue?
I have a large zip that contain hundreds of file. I've unzip'ed it in more
than one machine and didn't have any problem before. However, for this
particular machine (Ubuntu Server 12.04) I keep getting CRC error for some
of the files inside my zip. I've unzip'ed the same file it on anther
machine just to and its fine.
Any clue?
Slave SQL Thread not running
Slave SQL Thread not running
My replication suddenly went offline. SHOW SLAVE STATUS shows me that I/O
Thread is running, while SQL thread is not.
I have error message:
Fatal error: Found table map event mapping table id 0 which was already
mapped but with different settings.
I haven't been able to find a solution for this using Google.
Stop/Start slave doesn't help much.
My replication suddenly went offline. SHOW SLAVE STATUS shows me that I/O
Thread is running, while SQL thread is not.
I have error message:
Fatal error: Found table map event mapping table id 0 which was already
mapped but with different settings.
I haven't been able to find a solution for this using Google.
Stop/Start slave doesn't help much.
jQuery css transition toggle fix
jQuery css transition toggle fix
I have a little problem with jquery toggle function. Sometimes i can fix
it very fast but now im totally crazy about this. Im using jquery transit
plugin to animate a DIV
The code:
$(".grid-1").toggle( function() {
$(this).transition({ perspective: '170px', rotateY: '180deg' },
function() {
$(this).transition({ perspective: '170px', rotateY: '0deg' });
});
});
If i refresh the page this DIV (.grid-1) just disappear... where i make a
mistake ?
Thank you!
I have a little problem with jquery toggle function. Sometimes i can fix
it very fast but now im totally crazy about this. Im using jquery transit
plugin to animate a DIV
The code:
$(".grid-1").toggle( function() {
$(this).transition({ perspective: '170px', rotateY: '180deg' },
function() {
$(this).transition({ perspective: '170px', rotateY: '0deg' });
});
});
If i refresh the page this DIV (.grid-1) just disappear... where i make a
mistake ?
Thank you!
generating true random number
generating true random number
I want to simulate a random deliver of 52 standard cards without using
rand/srand urandom etc...
this is my random number function
int rand2(int lim)
{
static int a = 34; // could be made the seed value
a = (a * 32719 + 3) % 32749;
return ((a % lim) + 1);
}
the struct where i will know if a card have already popped ( 0 = NO, 1 yes )
typedef struct s_game
{
int *cards;
int state;
unsigned int dat_rand;
} t_game;
int main()
{
t_game game;
int i;
int rd;
i = 0;
game.cards = malloc(sizeof(*game.cards) * 52);
while(i < 52)
{
rd = rand2(52);
if(game.cards[rd] == 0)
{
game.cards[rd] = 1;
printf("i:%d\n rd: %d\n", i, rd);
i++;
}
}
}
But my output is always the same, each cards is delivered at the same time
so im searching fo a better random function or a different way to fill my
deliver
I want to simulate a random deliver of 52 standard cards without using
rand/srand urandom etc...
this is my random number function
int rand2(int lim)
{
static int a = 34; // could be made the seed value
a = (a * 32719 + 3) % 32749;
return ((a % lim) + 1);
}
the struct where i will know if a card have already popped ( 0 = NO, 1 yes )
typedef struct s_game
{
int *cards;
int state;
unsigned int dat_rand;
} t_game;
int main()
{
t_game game;
int i;
int rd;
i = 0;
game.cards = malloc(sizeof(*game.cards) * 52);
while(i < 52)
{
rd = rand2(52);
if(game.cards[rd] == 0)
{
game.cards[rd] = 1;
printf("i:%d\n rd: %d\n", i, rd);
i++;
}
}
}
But my output is always the same, each cards is delivered at the same time
so im searching fo a better random function or a different way to fill my
deliver
Sunday, 29 September 2013
If the events $\{E_n\}$ satisfy a certain property show that $P(\cap_{i=1}^k E_i) > 0$
If the events $\{E_n\}$ satisfy a certain property show that
$P(\cap_{i=1}^k E_i) > 0$
Let $\{E_n\}$ be events such that $\sum_{i=1}^kP(E_i) > k - 1$ then we
want to show that $P(\cap_{i=1}^k E_i) > 0$.
My approach for this problem is by contradiction. Suppose $P(\cap_{i=1}^k
E_i) = 0$ and then try and arrive at a contradiction. But we are not told
if the events are independent. I am not sure how from knowing
$P(\cap_{i=1}^k E_i) = 0$ to go to making conclusions about
$\sum_{i=1}^kP(E_i)$.
$P(\cap_{i=1}^k E_i) > 0$
Let $\{E_n\}$ be events such that $\sum_{i=1}^kP(E_i) > k - 1$ then we
want to show that $P(\cap_{i=1}^k E_i) > 0$.
My approach for this problem is by contradiction. Suppose $P(\cap_{i=1}^k
E_i) = 0$ and then try and arrive at a contradiction. But we are not told
if the events are independent. I am not sure how from knowing
$P(\cap_{i=1}^k E_i) = 0$ to go to making conclusions about
$\sum_{i=1}^kP(E_i)$.
Splashscreen not showing Android PhoneGap
Splashscreen not showing Android PhoneGap
I am using PhoneGap 2.9.0 (cordova 2.7.0) to make an Android App. I want a
splashscreen in the application. I have followed all the steps mentioned
on:
http://docs.phonegap.com/en/2.9.0/cordova_splashscreen_splashscreen.md.html#Splashscreen
for setting up splashscreen. Still mentioning. I have added splash.png in
res/drawable-hdpi,res/drawable-xhdpi and so on...
I have the following code in my MainActivity.java file:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html", 10000);
I have the following code in index.html to hide the Splashscreen once the
document is loaded:
function onLoad(){
document.addEventListener("deviceready", onDeviceReady, false);
}
function onDeviceReady() {
navigator.splashscreen.hide();
}
Still the Splashscreen Image doesn't show up when I run the app. Instead
when I load the application a BLANK BLACK SCREEN shows up for round about
10 seconds.
(P.S. The PNG image is a 9-Patch image. So no problem there too..
Moreover, I have tried uninstalling and reinstalling the app to make sure
there's no problem due to caching. Still no results)
Please help
I am using PhoneGap 2.9.0 (cordova 2.7.0) to make an Android App. I want a
splashscreen in the application. I have followed all the steps mentioned
on:
http://docs.phonegap.com/en/2.9.0/cordova_splashscreen_splashscreen.md.html#Splashscreen
for setting up splashscreen. Still mentioning. I have added splash.png in
res/drawable-hdpi,res/drawable-xhdpi and so on...
I have the following code in my MainActivity.java file:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html", 10000);
I have the following code in index.html to hide the Splashscreen once the
document is loaded:
function onLoad(){
document.addEventListener("deviceready", onDeviceReady, false);
}
function onDeviceReady() {
navigator.splashscreen.hide();
}
Still the Splashscreen Image doesn't show up when I run the app. Instead
when I load the application a BLANK BLACK SCREEN shows up for round about
10 seconds.
(P.S. The PNG image is a 9-Patch image. So no problem there too..
Moreover, I have tried uninstalling and reinstalling the app to make sure
there's no problem due to caching. Still no results)
Please help
Selenium (Python): How to insert value on a hidden input?
Selenium (Python): How to insert value on a hidden input?
I'm using Selenium's WebDriver and coding in Python.
There's a hidden input field in which I'm trying to insert a specific date
value. The field originally produces a calendar, from which a user can
select an appropriate date, but that seems like a more complicated
endeavour to emulate than inserting the appropriate date value directly.
The page's source code looks like this:
<div class="dijitReset dijitInputField">
<input id="form_date_DateTextBox_0" class="dijitReset" type="text"
autocomplete="off" dojoattachpoint="textbox,focusNode" tabindex="0"
aria-required="true"/>
<input type="hidden" value="2013-11-26" sliceindex="0"/>
where value="2013-11-26" is the field I'm trying to inject a value (it's
originally empty, ie: value="".
I understand that WebDriver is not able to insert a value into a hidden
input, because regular users would not be able to do that in a browser,
but a workaround is to use Javascript. Unfortunately that's a language I'm
not familiar with. Would anyone know what would work?
I'm using Selenium's WebDriver and coding in Python.
There's a hidden input field in which I'm trying to insert a specific date
value. The field originally produces a calendar, from which a user can
select an appropriate date, but that seems like a more complicated
endeavour to emulate than inserting the appropriate date value directly.
The page's source code looks like this:
<div class="dijitReset dijitInputField">
<input id="form_date_DateTextBox_0" class="dijitReset" type="text"
autocomplete="off" dojoattachpoint="textbox,focusNode" tabindex="0"
aria-required="true"/>
<input type="hidden" value="2013-11-26" sliceindex="0"/>
where value="2013-11-26" is the field I'm trying to inject a value (it's
originally empty, ie: value="".
I understand that WebDriver is not able to insert a value into a hidden
input, because regular users would not be able to do that in a browser,
but a workaround is to use Javascript. Unfortunately that's a language I'm
not familiar with. Would anyone know what would work?
CREATE TABLE Query not working
CREATE TABLE Query not working
$con->query("CREATE TABLE jobs
(
ID INT AUTO_INCREMENT,
Title VARCHAR(32),
Company VARCHAR(32),
Country VARCHAR(32),
City VARCHAR(32),
Email VARCHAR(32),
Website VARCHAR(32),
Description VARCHAR(1000)
);");
Does anyone know why it does not work?
Thanks in advance
$con->query("CREATE TABLE jobs
(
ID INT AUTO_INCREMENT,
Title VARCHAR(32),
Company VARCHAR(32),
Country VARCHAR(32),
City VARCHAR(32),
Email VARCHAR(32),
Website VARCHAR(32),
Description VARCHAR(1000)
);");
Does anyone know why it does not work?
Thanks in advance
Saturday, 28 September 2013
Problem about indexing files between partitions
Problem about indexing files between partitions
I'm here for talking to you about a problem. First of all sorry for being
noobish but I just installed Ubuntu this night. Anyhow, here's the
problem: I have my PC with a double boot Ubuntu+Windows 8 and I installed
Ubuntu in a secondary partition in my 500gb hard drive. In the other
partition there are my files such as music, downloads etc for my windows
hard drive ( I have an SSD where is stored 8 and an hard drive where I
have my files and Ubuntu). So now I'm trying to use my music with
banshee's library system and at the first time that I used that library I
got no problems. Now that I reboot Ubuntu when I try to play the music the
software just says that he can't find the file ( I suppose that Ubuntu
gets some time before loading files from other partitions but dunno... ).
And the same thing happens with my Dropbox folder withc is in the same
partition of the music one. So, Is there a way to fix this annoying
problem or it's just something that I should ignore ? Anyhow, Ubuntu 13.04
is installed on ext4 and my file partition on ntfs. For better
understanding here a little graphic explanation about my partitions:
C: -> Windows 8 D: -> Ubuntu partition (E:) My files Basically the file
hard drive has two partitions Sorry for my English mistackes but I'm
Italian
Thank you for the attention given to me and have a nice day
I'm here for talking to you about a problem. First of all sorry for being
noobish but I just installed Ubuntu this night. Anyhow, here's the
problem: I have my PC with a double boot Ubuntu+Windows 8 and I installed
Ubuntu in a secondary partition in my 500gb hard drive. In the other
partition there are my files such as music, downloads etc for my windows
hard drive ( I have an SSD where is stored 8 and an hard drive where I
have my files and Ubuntu). So now I'm trying to use my music with
banshee's library system and at the first time that I used that library I
got no problems. Now that I reboot Ubuntu when I try to play the music the
software just says that he can't find the file ( I suppose that Ubuntu
gets some time before loading files from other partitions but dunno... ).
And the same thing happens with my Dropbox folder withc is in the same
partition of the music one. So, Is there a way to fix this annoying
problem or it's just something that I should ignore ? Anyhow, Ubuntu 13.04
is installed on ext4 and my file partition on ntfs. For better
understanding here a little graphic explanation about my partitions:
C: -> Windows 8 D: -> Ubuntu partition (E:) My files Basically the file
hard drive has two partitions Sorry for my English mistackes but I'm
Italian
Thank you for the attention given to me and have a nice day
Android - How to test onResume()?
Android - How to test onResume()?
I'd like a way to easily take an app and put it into a saved state mode
(on an actual device) so that I can resume the app and thus test the
onResume function. On android devices, when one exists an app, it does not
instantly save its state; instead, it keeps the app running for quite a
while in case you decide to return to it shortly. This causes the onResume
function to not actually be called. Instead of having to wait that long
period of time with the app out of focus before the OS decides to save its
state, I'd like a way to quickly tell the OS to do this. Any suggestions?
I'd like a way to easily take an app and put it into a saved state mode
(on an actual device) so that I can resume the app and thus test the
onResume function. On android devices, when one exists an app, it does not
instantly save its state; instead, it keeps the app running for quite a
while in case you decide to return to it shortly. This causes the onResume
function to not actually be called. Instead of having to wait that long
period of time with the app out of focus before the OS decides to save its
state, I'd like a way to quickly tell the OS to do this. Any suggestions?
Uncaught TypeError: Object [object Object] has no method 'multipleSelect'
Uncaught TypeError: Object [object Object] has no method 'multipleSelect'
I have used the ajax function when calling this function with
multipleSelect like this. suppose that I have a function that called again
in ajax load page
I have included jquery and jquery.multiselect.js include file also
$('#demo3').multipleSelect({
placeholder: "Select Country",
filter:true
});
});
$("#button").click(function(){
$.ajax({
url:"http:localhost/mydata",
success:function(data){
$('#demo4').multiSelect({
placeholder: "Select Country",
filter:true
});
},
});
});
demo3 has successfully generate multiselect function. But when I have
pressed button the code in demo4 has error that multiselect function has
not been registered in a page?
The error code said.. Uncaught TypeError: Object [object Object] has no
method 'multipleSelect'
How I can solve this ? Thanks
I have used the ajax function when calling this function with
multipleSelect like this. suppose that I have a function that called again
in ajax load page
I have included jquery and jquery.multiselect.js include file also
$('#demo3').multipleSelect({
placeholder: "Select Country",
filter:true
});
});
$("#button").click(function(){
$.ajax({
url:"http:localhost/mydata",
success:function(data){
$('#demo4').multiSelect({
placeholder: "Select Country",
filter:true
});
},
});
});
demo3 has successfully generate multiselect function. But when I have
pressed button the code in demo4 has error that multiselect function has
not been registered in a page?
The error code said.. Uncaught TypeError: Object [object Object] has no
method 'multipleSelect'
How I can solve this ? Thanks
Subscribe to:
Posts (Atom)