Sir,
I create a project, where I use ShellTreeView, ShellListView, ListView. Now I drag folder from ShellTreeView and files from ShellListView. Now I want to retrieve file name including full path (like: c:\abc\file.txt) or folder (like C:\abc).
For retrieving the path I use a command button and a text box.
What will the code?
Dev
I need to create Perl code which allows counting paragraphs in text files. I tried this and doesn't work:
open(READFILE, "<$filename")
or die "could not open file \"$filename\":$!";
$paragraphs = 0;
my($c);
while($c = getc(READFILE))
{
if($C ne"\n")
{
$paragraphs++;
}
}
close(READFILE);
print("Paragraphs: $paragraphs\n");
import urllib
import xml.etree.ElementTree as ET
def getWeather(city):
#create google weather api url
url = "http://www.google.com/ig/api?weather=" + urllib.quote(city)
try:
# open google weather api url
f = urllib.urlopen(url)
except:
# if there was an error opening the url, return
return "Error opening url"
# read contents to a string
s = f.read()
tree=ET.parse(s)
current= tree.find("current_condition/condition")
condition_data = current.get("data")
weather = condition_data
if weather == "<?xml version=":
return "Invalid city"
#return the weather condition
#return weather
def main():
while True:
city = raw_input("Give me a city: ")
weather = getWeather(city)
print(weather)
if __name__ == "__main__":
main()
gives error , I actually wanted to find values from google weather xml site tags
Hey folks,
I am looking at using phonegap to create a mobile app that accesses a xml api, I noticed there is a HTTP class defined in phonegap http://phonegap.pbworks.com/JavaScript-API#http, but I can't seem to find anyone that has used it yet. Any examples out there or hints/tips on using the http class to access a xml api?
Using the bulkloader.py utility you can download all data from your application's Datastore.
It is not obvious how the data is stored, however. From the looks of it, you get a SQLite file with all data in binary format in a single table:
sqlite> .tables
bulkloader_database_signature result
sqlite> .schema result
CREATE TABLE result (
id BLOB primary key,
value BLOB not null,
sort_key BLOB);
Are there any tools to work with this data?
Hi there
I'm lookin for a javascript plugin (for js/any framework)
I want to create a textarea that while I type will using a supplied data array, check for predictive matches to the current word im typing and try to suggest a solution.
All solutions I've found so far (for jquery) only match one word, then end...
I want to write like a sentence or paragraph but have autocomplete ability.
Mockup image attached.
What would be a good aproach to localize a MVVM based WPF allication that can change its language at runtime? Of course I could create a string property in the ViewModel for each and every string that is displayed somewhere in the View but that seems rather tedious to me. Is there a common approach/best practice for this?
Hi,
My client wants to implement podcast on his website.
I mean to create a webpage which offers podcasts and subscribe.
I don't have any idea about this technique.
If anyone knows about this, please share your ideas.
Many Thanks
Lucky Luck
I am building a Drupal website and want to have a facebook like box which create a content namely quotation in my facebook. How can I do this in drupal.. Below the box I want to display other quotations...
I noticed a lot of Android functions have a parameter that you can pass in that's a bitmask, for different options, like on PendingIntent, you can pass in things like you can call getActivity() with PendingIntent.FLAG_CANCEL_CURRENT|PendingIntent.FLAG_NO_CREATE.
I'm wondering how I can create a function that has a parameter like this?
What's the best method of storing a large number of booleans in a database table?
Should I create a column for each boolean value or is there a more optimal method?
Employee Table
IsHardWorking
IsEfficient
IsCrazy
IsOverworked
IsUnderpaid
...etc.
Hi,
We are working on a Windows Mobile 6.5 application.
The application is already installed in some devices, and we need to distribute a new version with changes in the database schema (we added a few tables).
Is there a way to make a "patch" windows mobile installer that will replace the application and update the embedded SQL database with some scripts?
In a normal windows installer we would create a custom action in the installation process to apply the changes in the database, but I'm not sure how to do that for Windows Mobile
Thanks.
Hello,
i did save png and pdf file in Sqlite successfully. but when i retrive png and pdf data from sqlite and trying to display in Webview its create a problem.
for exp
NSData *data = [[NSData alloc] initWithBytes:sqlite3_column_blob(selectstmt, 1) length:sqlite3_column_bytes(selectstmt, 3)];
[webview loadData:data MIMEType:@"image/png" textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:@""]];
but problem is there only see image tag not display image.
any solution of below of the code.
Thanks you
I've to create hyperlinks in Excel as above. On click of the hyperlink, the data should be populated somewhere down the excel.
Am using Apache POI to generate the excel. is it possible with POI or other tools to generate such hyperlinks.
Hi,
I have a nested list comprising ~30,000 sub-lists, each with three entries, e.g.,
nested_list = [['x', 'y', 'z'], ['a', 'b', 'c']].
I wish to create a function in order to output this data construct into a tab delimited format, e.g.,
x y z
a b c
Any help greatly appreciated!
Thanks in advance,
Seafoid.
Hi,
I would like to create a simple XMPP client in java that shares his location (XEP-0080) with other clients.
I already know I can use the smack library for XMPP and that it supports PEP, which is needed for XEP-0080.
Does anyone have an example how to implement this or any pointers, i don't find anything using google.
thanks in advance.
I have a Drupal view that displays vacation leaves for a particular employee.
I want to have a button or link right on this view that says 'Add Vacation Leave'. When this button/link is clicked, I want the create content form for Vacation Leave to be displayed with the employee's name already filled in.
When 'Save' is clicked, I would like to go right back to the view, with my new content added. Is all of this possible?
Thanks,
Paul
I would like to use the Google Doc API to retrieve the plain-text content of a Google Doc document (not a spreadsheet) via the Google Docs API.
In the documentation I can find information about accessing Spreadsheets and how to "create/upload/copy" documents:
http://code.google.com/apis/documents/overview.html
Does anyone have a C# code example to do this in Silverlight, something like this:
//PSEUDOCODE:
WebClientGoogleDoc proxy = new WebClientGoogleDoc ();
proxy.DownloadStringCompleted += new DownloadStringCompletedEventHandler(proxy_DownloadStringCompleted);
proxy.DownloadProgressChanged += new DownloadProgressChangedEventHandler(proxy_DownloadProgressChanged);
proxy.DownloadStringAsyncWithGoogleDocId("dc7gj86r_20dn2csqg3");
Hi
I have to create a regular expression for some path conversion.
Example for path are
//name:value /name:value // name:value
/name:value /name:value
/name:value//name:value
thing is how to check for // or / at the start or middle of the string and how can i specify that name can contain any of this a-zA-Z and _
Path also contains white spaces.
thanks-
Is there a trick to making 9patch images with single pixel borders?
I'm not talking about the single pixel black borders that you use to define the stretchable and content areas. I'm talking about the image itself. If I create an image that has a 1 pixel border around it, often times android will pick one of the edges and stretch it to 2 (or sometimes more) pixels, even though I specifically left the edges out of the stretchable area in the draw9patch utility.
I have an already pre-designed PDF, and I would like to fill the PDF with some database information. So I'm curious if I should save the PDF into JPG's and render them out with the data on top of the image and re-create a PDF.
Or is there a way to use the PDF already, and print data into the PDF that is already made?
I am trying to figure out the best solution to generating this type of PDF.
All thoughts would be greatly appreciated!
Currently i need to construct and update large xml files. So what is the best C# xml parser to create or update the xml files? I heard about LINQ in c#, can this be used?
I'm trying to create a jQuery plugin that will create something like an autoCompleteBox but with custom features. How do I store member variables for each matching jQuery element?
For example I'll need to store a timerID for each. I'd also like to store references to some of the DOM elements that make up the control.
I'd like to be able to make a public method that works something like:
$("#myCtrl").autoCompleteEx.addItem("1");
But in the implementation of addItem() how can I access the member variables for that particular object like its timerID or whatever?
Below is what I have so far...
Thanks for any help or suggestions!
(function($)
{
//Attach this new method to jQuery
$.fn.autoCompleteEx = function(options)
{
//Merge Given Options W/ Defaults, But Don't Alter Either
var opts = $.extend({}, $.fn.autoCompleteEx.defaults, options);
//Iterate over the current set of matched elements
return this.each(function()
{
var acx = $(this); //Get JQuery Version Of Element (Should Be Div)
//Give Div Correct Class & Add <ul> w/ input item to it
acx.addClass("autoCompleteEx");
acx.html("<ul><li class=\"input\"><input type=\"text\"/></li></ul>");
//Grab Input As JQ Object
var input = $("input", acx);
//Wireup Div
acx.click(function()
{
input.focus().val( input.val() );
});
//Wireup Input
input.keydown(function(e)
{
var kc = e.keyCode;
if(kc == 13) //Enter
{
}
else if(kc == 27) //Esc
{
}
else
{
//Resize TextArea To Input
var width = 50 + (_txtArea.val().length*10);
_txtArea.css("width", width+"px");
}
});
}); //End Each JQ Element
}; //End autoCompleteEx()
//Private Functions
function junk()
{
};
//Public Functions
$.fn.autoCompleteEx.addItem = function(id,txt)
{
var x = this;
var y = 0;
};
//Default Settings
$.fn.autoCompleteEx.defaults =
{
minChars: 2,
delay: 300,
maxItems: 1
};
//End Of Closure
})(jQuery);
Hi,
I'm looking for the function that will take rows older then X days and put it in archive table...
Was thinking to make function so it will be easer to execute... something like
CREATE TABLE archive_NUMBER_OF_WEEK (...);
INSERT INTO archive_NUMBER_OF_WEEK SELECT * FROM content WHERE DATE < X days;
DELETE * FROM content WHERE DATE < X days
RENAME TABLE content TO content_backup, content_temp TO content;
Will post when I finish it :)