hey i was wondering how i could make a copy of a sqlite3 table and save it to a seperate file in python. im confused as in python your sqlite3 object can only be connected to one database so how would i make it save to a seperate database?
the reason i want to do this is in sqlite3 the database file size can never get smaller, and ive made alot of changes so i want just copy this table to another file which wont have all the extra empty space and then delete the origonal database
thanks guys
I found this snippet of code here that allows you to log into a website and get the response from the logged in page. However, I'm having trouble understanding all the part of the code. I've tried my best to fill in whatever I understand so far. Hope you guys can fill in the blanks for me. Thanks
string nick = "mrbean";
string password = "12345";
//this is the query data that is getting posted by the website.
//the query parameters 'nick' and 'password' must match the
//name of the form you're trying to log into. you can find the input names
//by using firebug and inspecting the text field
string postData = "nick=" + nick + "&password=" + password;
// this puts the postData in a byte Array with a specific encoding
//Why must the data be in a byte array?
byte[] data = Encoding.ASCII.GetBytes(postData);
// this basically creates the login page of the site you want to log into
WebRequest request = WebRequest.Create("http://www.mrbeanandme.com/login/");
// im guessing these parameters need to be set but i dont why?
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
// this opens a stream for writing the post variables.
// im not sure what a stream class does. need to do some reading into this.
Stream stream = request.GetRequestStream();
// you write the postData to the website and then close the connection?
stream.Write(data, 0, data.Length);
stream.Close();
// this receives the response after the log in
WebResponse response = request.GetResponse();
stream = response.GetResponseStream();
// i guess you need a stream reader to read a stream?
StreamReader sr = new StreamReader(stream);
// this outputs the code to console and terminates the program
Console.WriteLine(sr.ReadToEnd());
Console.ReadLine();
im using Qwebkit to load heavy html page but mean while i don't what to show the user
blank page , how can i in QT load the html page in the background and in the mean while
show another HTML page in the same QwebKit widget ?
![alt text][1]Im am trying to test wcf method in C#. method return type is ilist. I need to catch that returned data in to an ilist and then i have to retrive each item from ilist. can some one send me a sample code how to do this?
I need to send messages to users when items are added to a list. My requirement is not to use email or IM application. Could I use MSG or Net send as a solution and if so can somebody give me some pointers ?
Hi, i have a small problem. Im using the ASP.NET Xml control and want to pass it a url to a rss feed and a stylesheet - so that i can style the rss myself on my website. When applying the full web path to the xml control (http://www.myserver.com/myfeed.rss) i get an exception telling me that the document source is not a valid virtual path. What am i doing wrong? I would hate to download the file before showing it...
Im pretty sure this has a simple solution. I am using jCarousellite, and i want to change the behaviour of built in nav buttons to fire on hover over.
$("#carousel").jCarouselLite({
vertical: true,
btnNext: ".btn-down",
btnPrev: ".btn-up",
visible:6,
circular: false
});
$("#carousel .btn-down").hover(function() {
$("#carousel .btn-down").click();
});
but it only fires once when mouseover, i need it to fire continueously while mouseover.
Hello. Im doing a webpage about apples (the fruit), I want to include Google search results for apple recipes in the bottom of the page. How can I do this? If there is a copy-paste code in Google, I didn´t find it. Thanks
hi. i have 2 tables:
tags (id_tag,name)
news (id,title,data,tags)
The field newstags is a varchar(255). Im planning to put data like this in that field: "1,7,34"
That means that a particular row in news is linked to tags 1, 7 and 34 from the tags table.
Then, how can i search for ALL news records that have the 34 value (among others) in the tags field?
Is there a better way to do this?
So far Ive managed to download and install the SDK and its in my PATH. Problem now is that I can't run "android update sdk" since it expects to be connected to a display and Im connected to a remote headless server through ssh (its a build server so there's no desktop env). Is there a command-line option for the android tool that tells it to run without X ?
Hi, i have the following scenario. i have a main application wich can import usercontrols/views from other .dlls via mef. all works fine. but if i define usersettings im my plugin dlls, i got the following error
Das Konfigurationssystem konnte nicht initialisiert werden.
is there any way to include the settings in my plugin.dlls? or are there other ways to use UserSettings with plugin.dlls and mef?
thx
Guys, Ive been using jquery to do this, but now I need to do it with Prototype and Im little confused due lack of documentation
I have 2 lists of check boxes
First List:
Check box 1
Check box 2
Second list:
Check box x
check box y
check box z
I need the JS code, using prototype to work like this: Second list, remains disabled unless I check one of the checkboxes of the First List.
Any suggestions, or help, please!
Thankyou.
Im getting following error while running the query.
org.hibernate.hql.ast.QuerySyntaxException: expecting CLOSE, found 'LIMIT' near line 1, column 194 [from com.claystone.db.Gpsdata where id.mobileunitid = '2090818044' and gpsdate in (select id.gpsdate from com.claystone.db.Gpsdata where id.mobileunitid = '2090818044' ORDER BY id.gpsdate DESC LIMIT 1 ) and gpsstatus='true']
This is my Query.Please give the suggession what is the mistake in this query?
data=session.createQuery[from com.claystone.db.Gpsdata where id.mobileunitid = '2090818044' and gpsdate in (select id.gpsdate from com.claystone.db.Gpsdata where id.mobileunitid = '2090818044' ORDER BY id.gpsdate DESC LIMIT 1 ) and gpsstatus='true']
Hi Guys,
Im trying to run a function that will never end (until the program is killed)
How would i start such a function and be able to continue on past that function, because at the moment the program will not run past the never ending function.
Regards
Paul
i'm trying to map my whole application in a UML diagram and i wonder what diagram type i should use.
im not doing this in class level, rather from a bird eye's perspective.
single application object (patterns: singleton)(examples: CodeIgniter application) that composes
multiple module objects (patterns: singleton, facades)(examples: guestbook, addressbook) that compose
multiple low level stand alone objects (examples: mysql mapper, doctrine mapper) that compose
various 3rd and in-house libraries (examples: doctrine, solr, xml-parser)
what UML diagram is suited for this kind of overview presentation?
thanks
Im trying to make my joomla powered site w3c compliant. I am stuck with ampersand encoding, I want to encode the '&' to '& amp;'(no space) under the menu, as required. However the menu link can not be directly edited (read-only), I was wondering how I can change this to be encoded?
Thanks
In codeigniter Im trying to use this plugin which requires I implement a toString method in my models. My toString method simply does
return $this->name
On my local machine with php 5.3 everything works just fine but on the production server with php 5.1.6 it shows "Object id#48" where the value of the name property of that object should appear..... I found something about the problem here but I still dont understand... How can I fix this?
Hi
Im trying to add a reference to a dll i downloaded which I want to use for some sftp work.
as soon as i add it i get
"could not load file or asse3mble....failed to grant minimum permission requests"
Is this to do with my own account permissions?
thanks
DD
What gives best performance for running PostgreSQL on EC2? EBS in RAID? PGData on /mnt?
Do you have any preferences or experiences? Main "plus" for running pgsql on EBS is switching from one to another instances. Can this be the reason to be slower that /mnt partition?
PS. im running postgresql 8.4 with datas/size about 50G, amazon ec2 xlarge(64) instance.
can i create a case insensitive string column in sqlalchemy? im using sqlite, and theres probaby a way to do it through DB by changing collation, but i want to keep it in sqlalchemy/python.
I am struggling to solve the following problem
http://uva.onlinejudge.org/external/1/193.html
However Im not able to get a fast solution.
And as seen by the times of others, there should be a solution of maximum n^2 complexity
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3&page=show_problem&problemid=129&page=problem_stats
Can I get some help?
Im working on a web site that has to be reachable from many countries under the same domain.
Id like to know how can I receive a request with nginx (or any other static file server), and send it to different web servers depending on IP's location.
I mean, what is the point on having multiple db machines on country A and B, if the server that serves you the page is chosen by round robin.
Maybe theres another solution to my problem, and I would be very happy if someone can explain it to me.