Search Results

Search found 59849 results on 2394 pages for 'windows embedded 7'.

Page 108/2394 | < Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >

  • Get XML from Server for Use on Windows Phone

    - by psheriff
    When working with mobile devices you always need to take into account bandwidth usage and power consumption. If you are constantly connecting to a server to retrieve data for an input screen, then you might think about moving some of that data down to the phone and cache the data on the phone. An example would be a static list of US State Codes that you are asking the user to select from. Since this is data that does not change very often, this is one set of data that would be great to cache on the phone. Since the Windows Phone does not have an embedded database, you can just use an XML string stored in Isolated Storage. Of course, then you need to figure out how to get data down to the phone. You can either ship it with the application, or connect and retrieve the data from your server one time and thereafter cache it and retrieve it from the cache. In this blog post you will see how to create a WCF service to retrieve data from a Product table in a database and send that data as XML to the phone and store it in Isolated Storage. You will then read that data from Isolated Storage using LINQ to XML and display it in a ListBox. Step 1: Create a Windows Phone Application The first step is to create a Windows Phone application called WP_GetXmlFromDataSet (or whatever you want to call it). On the MainPage.xaml add the following XAML within the “ContentPanel” grid: <StackPanel>  <Button Name="btnGetXml"          Content="Get XML"          Click="btnGetXml_Click" />  <Button Name="btnRead"          Content="Read XML"          IsEnabled="False"          Click="btnRead_Click" />  <ListBox Name="lstData"            Height="430"            ItemsSource="{Binding}"            DisplayMemberPath="ProductName" /></StackPanel> Now it is time to create the WCF Service Application that you will call to get the XML from a table in a SQL Server database. Step 2: Create a WCF Service Application Add a new project to your solution called WP_GetXmlFromDataSet.Services. Delete the IService1.* and Service1.* files and the App_Data folder, as you don’t generally need these items. Add a new WCF Service class called ProductService. In the IProductService class modify the void DoWork() method with the following code: [OperationContract]string GetProductXml(); Open the code behind in the ProductService.svc and create the GetProductXml() method. This method (shown below) will connect up to a database and retrieve data from a Product table. public string GetProductXml(){  string ret = string.Empty;  string sql = string.Empty;  SqlDataAdapter da;  DataSet ds = new DataSet();   sql = "SELECT ProductId, ProductName,";  sql += " IntroductionDate, Price";  sql += " FROM Product";   da = new SqlDataAdapter(sql,    ConfigurationManager.ConnectionStrings["Sandbox"].ConnectionString);   da.Fill(ds);   // Create Attribute based XML  foreach (DataColumn col in ds.Tables[0].Columns)  {    col.ColumnMapping = MappingType.Attribute;  }   ds.DataSetName = "Products";  ds.Tables[0].TableName = "Product";  ret = ds.GetXml();   return ret;} After retrieving the data from the Product table using a DataSet, you will want to set each column’s ColumnMapping property to Attribute. Using attribute based XML will make the data transferred across the wire a little smaller. You then set the DataSetName property to the top-level element name you want to assign to the XML. You then set the TableName property on the DataTable to the name you want each element to be in your XML. The last thing you need to do is to call the GetXml() method on the DataSet object which will return an XML string of the data in your DataSet object. This is the value that you will return from the service call. The XML that is returned from the above call looks like the following: <Products>  <Product ProductId="1"           ProductName="PDSA .NET Productivity Framework"           IntroductionDate="9/3/2010"           Price="5000" />  <Product ProductId="3"           ProductName="Haystack Code Generator for .NET"           IntroductionDate="7/1/2010"           Price="599.00" />  ...  ...  ... </Products> The GetProductXml() method uses a connection string from the Web.Config file, so add a <connectionStrings> element to the Web.Config file in your WCF Service application. Modify the settings shown below as needed for your server and database name. <connectionStrings>  <add name="Sandbox"        connectionString="Server=Localhost;Database=Sandbox;                         Integrated Security=Yes"/></connectionStrings> The Product Table You will need a Product table that you can read data from. I used the following structure for my product table. Add any data you want to this table after you create it in your database. CREATE TABLE Product(  ProductId int PRIMARY KEY IDENTITY(1,1) NOT NULL,  ProductName varchar(50) NOT NULL,  IntroductionDate datetime NULL,  Price money NULL) Step 3: Connect to WCF Service from Windows Phone Application Back in your Windows Phone application you will now need to add a Service Reference to the WCF Service application you just created. Right-mouse click on the Windows Phone Project and choose Add Service Reference… from the context menu. Click on the Discover button. In the Namespace text box enter “ProductServiceRefrence”, then click the OK button. If you entered everything correctly, Visual Studio will generate some code that allows you to connect to your Product service. On the MainPage.xaml designer window double click on the Get XML button to generate the Click event procedure for this button. In the Click event procedure make a call to a GetXmlFromServer() method. This method will also need a “Completed” event procedure to be written since all communication with a WCF Service from Windows Phone must be asynchronous.  Write these two methods as follows: private const string KEY_NAME = "ProductData"; private void GetXmlFromServer(){  ProductServiceClient client = new ProductServiceClient();   client.GetProductXmlCompleted += new     EventHandler<GetProductXmlCompletedEventArgs>      (client_GetProductXmlCompleted);   client.GetProductXmlAsync();  client.CloseAsync();} void client_GetProductXmlCompleted(object sender,                                   GetProductXmlCompletedEventArgs e){  // Store XML data in Isolated Storage  IsolatedStorageSettings.ApplicationSettings[KEY_NAME] = e.Result;   btnRead.IsEnabled = true;} As you can see, this is a fairly standard call to a WCF Service. In the Completed event you get the Result from the event argument, which is the XML, and store it into Isolated Storage using the IsolatedStorageSettings.ApplicationSettings class. Notice the constant that I added to specify the name of the key. You will use this constant later to read the data from Isolated Storage. Step 4: Create a Product Class Even though you stored XML data into Isolated Storage when you read that data out you will want to convert each element in the XML file into an actual Product object. This means that you need to create a Product class in your Windows Phone application. Add a Product class to your project that looks like the code below: public class Product{  public string ProductName{ get; set; }  public int ProductId{ get; set; }  public DateTime IntroductionDate{ get; set; }  public decimal Price{ get; set; }} Step 5: Read Settings from Isolated Storage Now that you have the XML data stored in Isolated Storage, it is time to use it. Go back to the MainPage.xaml design view and double click on the Read XML button to generate the Click event procedure. From the Click event procedure call a method named ReadProductXml().Create this method as shown below: private void ReadProductXml(){  XElement xElem = null;   if (IsolatedStorageSettings.ApplicationSettings.Contains(KEY_NAME))  {    xElem = XElement.Parse(     IsolatedStorageSettings.ApplicationSettings[KEY_NAME].ToString());     // Create a list of Product objects    var products =         from prod in xElem.Descendants("Product")        orderby prod.Attribute("ProductName").Value        select new Product        {          ProductId = Convert.ToInt32(prod.Attribute("ProductId").Value),          ProductName = prod.Attribute("ProductName").Value,          IntroductionDate =             Convert.ToDateTime(prod.Attribute("IntroductionDate").Value),          Price = Convert.ToDecimal(prod.Attribute("Price").Value)        };     lstData.DataContext = products;  }} The ReadProductXml() method checks to make sure that the key name that you saved your XML as exists in Isolated Storage prior to trying to open it. If the key name exists, then you retrieve the value as a string. Use the XElement’s Parse method to convert the XML string to a XElement object. LINQ to XML is used to iterate over each element in the XElement object and create a new Product object from each attribute in your XML file. The LINQ to XML code also orders the XML data by the ProductName. After the LINQ to XML code runs you end up with an IEnumerable collection of Product objects in the variable named “products”. You assign this collection of product data to the DataContext of the ListBox you created in XAML. The DisplayMemberPath property of the ListBox is set to “ProductName” so it will now display the product name for each row in your products collection. Summary In this article you learned how to retrieve an XML string from a table in a database, return that string across a WCF Service and store it into Isolated Storage on your Windows Phone. You then used LINQ to XML to create a collection of Product objects from the data stored and display that data in a Windows Phone list box. This same technique can be used in Silverlight or WPF applications too. NOTE: You can download the complete sample code at my website. http://www.pdsa.com/downloads. Choose Tips & Tricks, then "Get XML From Server for Use on Windows Phone" from the drop-down. Good Luck with your Coding,Paul Sheriff ** SPECIAL OFFER FOR MY BLOG READERS **Visit http://www.pdsa.com/Event/Blog for a free video on Silverlight entitled Silverlight XAML for the Complete Novice - Part 1.  

    Read the article

  • Cannot connect Ubunto to Windows pc either direction

    - by Frank A
    New to ubuntu and really struggling with this. I want to connect to my old windows XP Pc on our home network. Searching for solutions gets complicated as at one level you are told use Connect to Server. I set to Windows Share, type in server IP address.. ... I get "Failed to retrieve share list from server" Demo on Youtube worked with no problem. Other advice in ask ubuntu is you need to install samba. Did that but nothing seems to happen when I try and run it other than it asking for admin password. (How do you tell what is running on Ubuntu?) So I try the other direction Windows XP to Ubuntu. I made the ubuntu directory within home frank shared and tried various combination such as \ipaddress\home\frank but just "The folder you entered does not appear to be valid. Please choose another." My entire data only drive is shared in Windows and no problems accessing that from other Win XP boxes on our network There are no alerts in Windows firewall, Ubuntu Firestarter did block but changed that to allowed... or so I thought. In firestarter I had set up Inbound traffic policy 192.168.1.1/24. And since then it has added the ip address of the win pc twice. So, I am in a state of confusion not knowing whedre to turn next so thought Ask Ubuntu :)

    Read the article

  • HTG Explains: What The Windows Event Viewer Is and How You Can Use It

    - by Chris Hoffman
    The Windows Event Viewer shows a log of application and system messages – errors, information messages, and warnings. Scammers have used the Event Viewer to deceive people – event a properly functioning system will have error messages here. In one infamous scam, a person claiming to be from Microsoft phones someone up and instructs them to open the Event Viewer. The person is sure to see error messages here, and the scammer will ask for the person’s credit card number to fix them. As a rule of thumb, you can generally ignore all of the errors and warnings that appear in the Event Viewer – assuming your computer is working properly. HTG Explains: What The Windows Event Viewer Is and How You Can Use It HTG Explains: How Windows Uses The Task Scheduler for System Tasks HTG Explains: Why Do Hard Drives Show the Wrong Capacity in Windows?

    Read the article

  • What is inside Windows SDK?

    - by AKN
    For developing programs for windows, we need windows SDK. I understand that this SDK is what helps to create windows and handle window events and all that. I suppose it also enables us to manipulate with files and registries. (Does the same SDK is the reason for thread creation and handling?) All that is fine! I would like to know what are the files and libraries that come as a part of this SDK. Also does it come when I install the OS or when I install editors like Visual studio? Sometimes I see links to windows SDK separately as such. Is it same as the one that I get when installing Visual Studio or has something more than that.

    Read the article

  • embedded php in html to include header (top part of page) into the page

    - by Andy
    Hi there, I'm trying to put the top of my page (which is all html) in a seperate file so I only need to change things once like the menu bar etc. So I googled some and found a solution on this website as well, but it doesn't work and I don't know why. So I have a page like article.html and on the top I have this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <?php include("/pages/header.php"); ?> <!-- rest of the html code --> In the header.php I have the html that should be on the top of each page and it starts with: <?php /** * @author name * website header */ ?> <!-- html code --> So what's wrong with this. When I open the page article.html and right click on it to view the source, I can see the php from above calling the header.php file. Thanks!

    Read the article

  • Pros/cons of embedded scripting environments?

    - by pomeroy
    There are several scripting environments available for .NET applications (e.g.this post). My question is, what are the pros/cons of using each of them? PowerShell IronPython Lua JavaScript I'm really looking for answers from folks that have tried to do this. Thanks.

    Read the article

  • Windows XP with Ubuntu 14.04 on 2 separate hard drives

    - by maplenet2
    I am new to Ubuntu. I have Windows XP Professional 32-bit on one 300GB IDE hard drive and Ubuntu 14.04 running on another 61GB IDE hard drive, and I cannot get my Windows XP to boot with Grub! When I select Windows XP from the boot menu, Grub just restarts my computer. The computer I have with those two hard drives is a Dell Optiplex GX240, so the hardware is old, and its BIOS won't let me change the boot priority on the two IDE hard drives. What can I do now? Is there a step I missed when installing Ubuntu? Can I edit Grub to boot Windows XP without messing with the BIOS? Do I have to downgrade to an older release of Ubuntu to make it work? I am willing to reinstall Ubuntu, if that's what it takes.

    Read the article

  • Windows 8 Security Flaws

    A Feeling of Complacency The amount of hype coming out of the Microsoft camp concerning Windows 8's enhanced security features is pretty high. With an improved Windows Defender integrated into the upcoming operating system, some users may feel that they will have adequate protection against malware and other threats. While the improved protection is a plus, this does not mean that other trusted programs should be avoided, as it is somewhat lazy to believe that Microsoft's integrated protection in Windows 8 will provide all the security that is necessary. Careless Web Surfing The internet of...

    Read the article

  • Responsive Design: Media query fix for IE10 on Windows Phone 8

    - by ihaynes
    Originally posted on: http://geekswithblogs.net/ihaynes/archive/2013/07/01/responsive-design-media-query-fix-for-ie10-on--windows.aspxThe version of IE10 on Windows Phone 8 apparently has a bug which results in media queries not seeing the correct device width.This post from Devhammer explains all.http://devhammer.net/responsive-design-fix-for-windows-phone-8-device-adaptationI'd not noticed this on the WP8 Emulator which proves yet again that testing on real devices is essential.

    Read the article

  • Ubuntu 12.04.3 alongside Windows 8.1

    - by user208329
    I brought a new Notebook which has pre-installed Windows 8.1 with an uefi* (-Bios) and secure boot*. (* can switch or turn so off, still no success) When i try to install Ubuntu 12.04.3, the installer doesn't recognize Windows 8.1. There were options, to delete the whole disk or do something else. The second option, shows a few partitions (NTFS) but no Windows. The Ubuntu 13.10 version even did start on my notebook, it gets frozen during start up. (I thought. maybe the newer one will recognize Windows.) I'm not very confident in manipulating grub, I hope there is an easy way or an easy description. Gparted shows: Device Type Size Used /dev/sda freespace 1MB /dev/sda ntfs 1073MB 408MB /dev/sda2 efi 104MB 52MB /dev/sda3 ntfs 134MB 45MB /dev/sda4 ntfs 988465MB 23947MB /dev/sda5 ntfs 10424MB 9483MB free space 0MB /dev/sdb1 fat32 16929MB 9412MB (USB-drive Ubuntu-image)

    Read the article

  • Can't install Ubuntu on my Windows 7 laptop

    - by Ana
    I tried installing Ubuntu in two different ways: First, I tried the Windows Installer, and it goes well until I reboot the system and, when booting on Ubuntu, I get the error: No root file system defined. Second, I uninstalled wubi by going to to Control Panel - Uninstall Programs - Ubuntu. Then, I booted the laptop from the live CD and selected install. It boots okay but in the screen right after the one that says to make sure you have 4.5 GB available, Internet connection, etc, when I click continue it throws me a message saying that Ubuntu had an internal error and asks me if I want to report the error. After that, I just have a black screen and nothing else! No Ubuntu installed, no boot option to go back to Windows. Nothing! My goal is to install Ubuntu alongside Windows 7 (without the hassle of formatting the computer, creating partition, etc). How can I do it (preferable using Windows Installer)? How can I solve the "No root file system defined" that I encountered when I used the Windows Installer?

    Read the article

  • Launch 7:Windows Phone 7 Style Live Tiles On Android Mobiles

    - by Gopinath
    Android is a great mobile OS but one thought that lingers in the mind of few Android owners is: Am I using a cheap iPhone? This is valid thought for many low end Android users as their phones runs sluggish and the user interface of Android looks like an imitation of iOS. When it comes to Windows Phone 7 users, even though their operating system features are not as great as iPhone/Android but it has its unique user interface; Windows Phone 7 user interface is a very intuitive and fresh, it’s constantly updating Live Tiles show all the required information on the home screen. Android has best mobile operating system features except UI and Windows Phone 7 has excellent user interface. How about porting Windows Phone 7 Tiles interface on an Android? That should be great. Launch 7 app brings the best of Windows Phone 7 look and feel to Android OS. Once the Launcher 7 app is installed and activated, it brings Live Tiles or constantly updating controls that show information on Android home screen. Apart from simple and smooth tiles, there are handful of customization options provided. Users can change colour of the tiles, add new tiles, enable/disable transitions. The reviews on Android Market are on the positive side with 4.4 stars by 10,000 + reviewers. Here are few user reviews 1. Does what it says. only issue for me is that the app drawer doesn’t rotate. And I would like the UI to rotate when my KB is opened. HTC desire z – Jonathan 2. Works great on atrix.Kudos to developers. Awesome. Though needs: Better notification bar More stock images of tiles Better fitting of widgets on tiles – Manny 3. Looks really good like it much more than I thought I would runs real smooth running royal ginger 2.1 – Jay 4. Omg amazing i am definetly keeping it as my default best of android and windows – Devon 5. Man! An update every week! Very very responsive developer! – Andrew You can read more reviews on Android Market here.  There is no doubt that this application is receiving rave reviews. After scanning a while through the reviews, few complaints throw light on the negative side: Battery drains a bit faster & Low end mobile run a bit sluggish. The application is available in two versions – an ad supported free version and $1.41 ad free version. Download Launcher 7 from Android Market This article titled,Launch 7:Windows Phone 7 Style Live Tiles On Android Mobiles, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • "vagrant up" fails with "NS_ERROR_CALL_FAILED" error [on hold]

    - by TahitiPetey
    I am following the basic "Getting Started" guide: http://docs.vagrantup.com/v2/getting-started/index.html I ran vagrant init <etc> followed by vagrant up, but it fails with "NS_ERROR_CALL_FAILED" error. Then by enabling debug logging with VAGRANT_LOG=debug vagrant up, I get the following error output: ERROR vagrant: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/driver/base.rb:316:in `execute' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/driver/version_4_2.rb:165:in `import' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/import.rb:15:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/handle_box_url.rb:72:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:in `call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/machine.rb:147:in `action' /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run' INFO interface: error: There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["import", "/Users/me/.vagrant.d/boxes/precise32/virtualbox/box.ovf"] Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Interpreting /Users/me/.vagrant.d/boxes/precise32/virtualbox/box.ovf... OK. 0%... Progress object failure: NS_ERROR_CALL_FAILED My system setup info: Vagrant 1.2.2 VirtualBox 4.2.14 (Also tried 4.2.10, same error) Mac OSX 10.8.3

    Read the article

  • Can't boot Windows Xp after intalling Ubuntu 12.04

    - by Omul Neted
    Here's the situation. I installed Ubuntu using the along side option. Everything went ok. When I restarted I went strait to Ubuntu and it worked beautifully. When I restarted and tried to enter windows, the loading screen appeared, and after 3 -4 seconds it restarted again. No error, no cursor waiting, no nothing. I looked on the internet for help and found several resources. I tried first lilo since it seemes that many people had they're issues solved with it. After lilo neither ubuntu nor Windows would start. I installed and used bootinfoscript. The RESULTS.txt can be seen below https://www.dropbox.com/sh/r3luoa672qe73uq/Mob13HhNiB After that I looked at Boot-Repair I did as instructed here Can't boot XP after Ubuntu Installation, how to fix? ,meaning I redid the mbr of my Ubuntu install using a generic mbr. with no success. The results of boot-repair are in the first link. Now when I restart my computer I don't even get the windows loading screen, just Missing operating system Missing operation system Operating system not found that's it. I did not use the fixboot or fixmbr option because I don't have a windows cd cabable of seeing my hdd drivers. The usual XP windows setup tells me that I have no hdd. Please help, I don't know what to to next. This is my first time with Ubuntu or any Linux OS.

    Read the article

  • Can't Dual Boot Ubuntu 12.04 and Windows 7 on Sony Vaio S 15 (2012)

    - by Nathaniel
    I just bought my dad a new laptop for fathers day, a Sony Vaio S 15 (the latest models from Sony) and he wants to dual boot Ubuntu and Windows 7. I put Ubuntu 12.04 on a USB drive and went to install it on the computer, but when I got into the partition part of the install there was no option to dual boot. Only to delete everything and install Ubuntu or 'other'. I installed using the 'other' feature by manually partitioning, however once I installed it the computer wouldn't ever go to grub. From inside windows I used Easy BCD to try and fix the boot loader so it would give the option to boot into Windows 7 or Ubuntu 12.04, but it couldn't detect ANY operating systems on the computer (not even windows). Is it not possible to dual boot on the latest Sony Vaios, or is there a workaround for this?

    Read the article

  • Using an array in embedded x86 assembly??

    - by Mark V.
    Hey all I have a method (C++) that returns a character and takes an array of characters as its parameters. I'm messing with assembly for the first time and just trying to return the first character of the array in the dl register. Here's what I have so far: char returnFirstChar(char arrayOfLetters[]) { char max; __asm { push eax push ebx push ecx push edx mov dl, 0 mov eax, arrayOfLetters[0] xor edx, edx mov dl, al mov max, dl pop edx pop ecx pop ebx pop eax } return max; } For some reason this method returns a ? Any idea whats going on? Thanks

    Read the article

  • Working with Tile Notifications in Windows 8 Store Apps – Part I

    - by dwahlin
    One of the features that really makes Windows 8 apps stand out from others is the tile functionality on the start screen. While icons allow a user to start an application, tiles provide a more engaging way to engage the user and draw them into an application. Examples of “live” tiles on part of my current start screen are shown next: I’ll admit that if you get enough of these tiles going the start screen can actually be a bit distracting. Fortunately, a user can easily disable a live tile by right-clicking on it or pressing and holding a tile on a touch device and then selecting Turn live tile off from the AppBar: The can also make a wide tile smaller (into a square tile) or make a square tile bigger assuming the application supports both squares and rectangles. In this post I’ll walk through how to add tile notification functionality into an application. Both XAML/C# and HTML/JavaScript apps support live tiles and I’ll show the code for both options.   Understanding Tile Templates The first thing you need to know if you want to add custom tile functionality (live tiles) into your application is that there is a collection of tile templates available out-of-the-box. Each tile template has XML associated with it that you need to load, update with your custom data, and then feed into a tile update manager. By doing that you can control what shows in your app’s tile on the Windows 8 start screen. So how do you learn more about the different tile templates and their respective XML? Fortunately, Microsoft has a nice documentation page in the Windows 8 Store SDK. Visit http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx to see a complete list of square and wide/rectangular tile templates that you can use. Looking through the templates you’ll It has the following XML template associated with it:  <tile> <visual> <binding template="TileSquareBlock"> <text id="1">Text Field 1</text> <text id="2">Text Field 2</text> </binding> </visual> </tile> An example of a wide/rectangular tile template is shown next:    <tile> <visual> <binding template="TileWideImageAndText01"> <image id="1" src="image1.png" alt="alt text"/> <text id="1">Text Field 1</text> </binding> </visual> </tile>   To use these tile templates (or others you find interesting), update their content, and get them to show for your app’s tile on the Windows 8 start screen you’ll need to perform the following steps: Define the tile template to use in your app Load the tile template’s XML into memory Modify the children of the <binding> tag Feed the modified tile XML into a new TileNotification instance Feed the TileNotification instance into the Update() method of the TileUpdateManager In the remainder of the post I’ll walk through each of the steps listed above to provide wide and square tile notifications for an application. The wide tile that’s shown will show an image and text while the square tile will only show text. If you’re going to provide custom tile notifications it’s recommended that you provide wide and square tiles since users can switch between the two of them directly on the start screen. Note: When working with tile notifications it’s possible to manipulate and update a tile’s XML template without having to know XML parsing techniques. This can be accomplished using some C# notification extension classes that are available. In this post I’m going to focus on working with tile notifications using an XML parser so that the focus is on the steps required to add notifications to the Windows 8 start screen rather than on external extension classes. You can access the extension classes in the Windows 8 samples gallery if you’re interested.   Steps to Create Custom App Tile Notifications   Step 1: Define the tile template to use in your app Although you can cut-and-paste a tile template’s XML directly into your C# or HTML/JavaScript Windows store app and then parse it using an XML parser, it’s easier to use the built-in TileTemplateType enumeration from the Windows.UI.Notifications namespace. It provides direct access to the XML for the various templates so once you locate a template you like in the documentation (mentioned above), simplify reference it:HTML/JavaScript var notifications = Windows.UI.Notifications; var template = notifications.TileTemplateType.tileWideImageAndText01; .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }   XAML/C# var template = TileTemplateType.TileWideImageAndText01;   Step 2: Load the tile template’s XML into memory Once the target template’s XML is identified, load it into memory using the TileUpdateManager’s GetTemplateContent() method. This method parses the template XML and returns an XmlDocument object:   HTML/JavaScript   var tileXml = notifications.TileUpdateManager.getTemplateContent(template); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }   XAML/C#  var tileXml = TileUpdateManager.GetTemplateContent(template);   Step 3: Modify the children of the <binding> tag Once the XML for a given template is loaded into memory you need to locate the appropriate <image> and/or <text> elements in the XML and update them with your app data. This can be done using standard XML DOM manipulation techniques. The example code below locates the image folder and loads the path to an image file located in the project into it’s inner text. The code also creates a square tile that consists of text, updates it’s <text> element, and then imports and appends it into the wide tile’s XML.   HTML/JavaScript var image = tileXml.selectSingleNode('//image[@id="1"]'); image.setAttribute('src', 'ms-appx:///images/' + imageFile); image.setAttribute('alt', 'Live Tile'); var squareTemplate = notifications.TileTemplateType.tileSquareText04; var squareTileXml = notifications.TileUpdateManager.getTemplateContent(squareTemplate); var squareTileTextAttributes = squareTileXml.selectSingleNode('//text[@id="1"]'); squareTileTextAttributes.appendChild(squareTileXml.createTextNode(content)); var node = tileXml.importNode(squareTileXml.selectSingleNode('//binding'), true); tileXml.selectSingleNode('//visual').appendChild(node); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }   XAML/C#var tileXml = TileUpdateManager.GetTemplateContent(template); var text = tileXml.SelectSingleNode("//text[@id='1']"); text.AppendChild(tileXml.CreateTextNode(content)); var image = (XmlElement)tileXml.SelectSingleNode("//image[@id='1']"); image.SetAttribute("src", "ms-appx:///Assets/" + imageFile); image.SetAttribute("alt", "Live Tile"); Debug.WriteLine(image.GetXml()); var squareTemplate = TileTemplateType.TileSquareText04; var squareTileXml = TileUpdateManager.GetTemplateContent(squareTemplate); var squareTileTextAttributes = squareTileXml.SelectSingleNode("//text[@id='1']"); squareTileTextAttributes.AppendChild(squareTileXml.CreateTextNode(content)); var node = tileXml.ImportNode(squareTileXml.SelectSingleNode("//binding"), true); tileXml.SelectSingleNode("//visual").AppendChild(node);  Step 4: Feed the modified tile XML into a new TileNotification instance Now that the XML data has been updated with the desired text and images, it’s time to load the XmlDocument object into a new TileNotification instance:   HTML/JavaScript var tileNotification = new notifications.TileNotification(tileXml); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }   XAML/C#var tileNotification = new TileNotification(tileXml);  Step 5: Feed the TileNotification instance into the Update() method of the TileUpdateManager Once the TileNotification instance has been created and the XmlDocument has been passed to its constructor, it needs to be passed to the Update() method of a TileUpdator in order to be shown on the Windows 8 start screen:   HTML/JavaScript notifications.TileUpdateManager.createTileUpdaterForApplication().update(tileNotification); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }   XAML/C#TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotification);    Once the tile notification is updated it’ll show up on the start screen. An example of the wide and square tiles created with the included demo code are shown next:     Download the HTML/JavaScript and XAML/C# sample application here. In the next post in this series I’ll walk through how to queue multiple tiles and clear a queue.

    Read the article

  • Ubuntu Install 11.10 doesn't recognize Windows 7 installation with new HDD

    - by arlendo
    Replaced my crashed HDD with a Seagate 2TB Sata (bought from a company who pulled it from a working computer, OS unknown) and did a fresh install of Windows 7. Windows shows 100MB boot partition (bootable NTFS) and 200GB Windows partition (NTFS), the rest is unallocated. Win7 Disk Management says the partitioning type is Master Boot Record. Win7 boots and runs fine. Ubuntu 11.10 Install procedes to Allocate Drive Space screen and should say This computer currently has Windows 7 on it. What would you like to do? Instead, it says something like Install doesn't detect any existing OS on this computer. When I click on Something else, the partition table shows only the unallocated space of 1.8TB. Ubuntu Disk Utility says Partitioning: Master Boot Record, but GParted Live says Partition Table: gpt. It was my original intention to have the Windows boot partition and application partition, then install Ubuntu 11.10 using boot, root, swap, and home partitions, and maybe another partition just for data (mostly photos). Currently, I would be happy if I could just get Ubuntu installed along with Win7. I am aware of the MBR limits of 3 Primary partitions and 1 Extended partition. I suspect that my new HDD is partitioned for GPT and that is why Ubuntu can't see the Win7 installation. Am I on the right track? I was going to use Windows Disk Management to convert GPT to MBR but I only have the one drive on my AMD-64 mini-computer and it says I have to empty the drive of all partitions before I can access the Convert command. And I can't find any bootable software that would allow me to do that conversion. Here is the result of sudo fdisk -l: ubuntu@ubuntu:~$ sudo fdisk -l WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/sda: 2000.4 GB, 2000398934016 bytes 224 heads, 19 sectors/track, 918004 cylinders, total 3907029168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xd4a68c18 Device Boot Start End Blocks Id System /dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT /dev/sda2 206848 419637247 209715200 7 HPFS/NTFS/exFAT ubuntu@ubuntu:~$ Keep in mind that I'm a definite newbie to screwing around with the inner workings of Ubuntu. I previously had Ubuntu 10.04 running with Vista and I don't remember even having to partition anything that wasn't automatic in the install. Thanks for taking a look here. My Win7 is running fine but I miss my Ubuntu.

    Read the article

  • 2 windows loaders after grub2 repair

    - by adi
    I have recently reinstalled w7 and had ubuntu 12.04 lts installed on it,w7 installation deleted the grub2 loader,after that i found solution to use boot-repair from live-cd session, BUT......now i have 2 windows 7(loader)in grub loader,and only 1 windows 7 installation,how can i remove it?One is on on /dev/sda1(which should be w7 sistem reserved partition) and second is on on /dev/sda2(which is w7 installment partition) it says and both log on same w7.All i need is to remove it without brake the grub2 again and if someone is willing to guide me to add windows on primary selection, cause my girlfriends doesnt get along with linux :D.

    Read the article

  • Let Your Desktop Run Wild and Free with the Mustangs Theme for Windows 7

    - by Asian Angel
    Add the natural, untamed beauty of Utah’s Onaqui mustang herd to your desktop with the Mustangs Theme for Windows 7. The theme comes with sixteen images featuring beautiful mustang photography by Gene Praag. Download the Mustangs Theme [via Softpedia] How to Get Pro Features in Windows Home Versions with Third Party Tools HTG Explains: Is ReadyBoost Worth Using? HTG Explains: What The Windows Event Viewer Is and How You Can Use It

    Read the article

  • Embedded Jetty resourceBase classpath URL

    - by drewzilla
    I'm embedding Jetty in a Spring based application. I configure my Jetty server in a Spring context file. The specific part of the configuration I'm having trouble with is this: <bean class="org.eclipse.jetty.webapp.WebAppContext"> <property name="contextPath" value="/" /> <property name="resourceBase" value="????????" /> <property name="parentLoaderPriority" value="true" /> </bean> If you see above, where I've put the ????????, I ideally want the resourceBase to reference a folder on my classpath. I'm deploying my application in a single executable JAR file and have a folder config/web/WEB-INF on my classpath. Jetty seems to be able to handle URLs defined in the resourceBase (e.g. jar:file:/myapp.jar!/config/web) but it doesn't seem to support classpath URLs. I get an IllegalArgumentException if I define something like classpath:config/web. This is a real pain for me. Does anyone know of anyway to achieve this functionality? Thanks, Andrew

    Read the article

  • Permanently mounting Windows' NTFS partition, fully enabled

    - by Bart van Heukelom
    I'm transforming a Windows 7 PC into a dual boot system with Ubuntu 10.10. Following other questions on this site, I've mounted my Windows drive by adding this to fstab UUID=blabla /windows ntfs users,defaults,umask=000 0 0 It appears to work well, I can read and write, but it appears to be a bit crippled still. When I tried to update an SVN working copy with RabbitVCS, it complained that it couldn't write to a temporary file inside the working copy, even though the permissions are all on 0777 inside /windows (by default, I haven't done that manually). It even corrupted that working copy :( It works when I use the command line SVN client with sudo, but that's hardly user friendly.

    Read the article

  • Deleted windows partition, now I can't get into Ubuntu

    - by Alejandro
    Back story: I installed ubuntu with wubi. I had windows on one NTFS partition, then I made a new NTFS partition in which I put wubi in and where My ubuntu OS was born. Eventually I moved /home into another partition and made a swap partition, but I digress. I deleted My original NTFS partition where windows is not thinking it would not matter but now I can't get into ubuntu. And the weird thing is that when I boot my computer I still see the option to boot into both windows and ubuntu. When I try to boot into windows, It tries to fix stuff and never succeds. When I try to boot into ubuntu, it shows me "cannot find GRLDR in all devices. Press CTRL+ALT+DELETE to restart". so, what do you guys think? I just want ubuntu running again, with all my stuff in /home there and all my system preferences how I like them.

    Read the article

  • Windows XP self-installing virus [closed]

    - by Oliver
    Do you remember. Some years ago, there was a huge virus attacking Windows XP in its first version. Once you had installed Windows XP, and on your first internet access, the virus installed itself on your computer, closing your internet connection and making the computer reboot after some seconds. I wonder... How can a virus install itslef this way from nowhere ? Without any user action. You install Windows XP... the computer just connects itself to the internet (assuming Microsoft don't connect to bad sites on its first connection)... and you have a virus. There is something magic I don't understand here. Can someone explain me how that virus could attack Windows that way, without any user action on a fresh installed system...

    Read the article

  • Grub Won't Boot WIndows 7

    - by STavros P.
    I have a problem with Grub 2. when i hit the Windows 7 (loader) option on the Grub boot screen Windows won't boot. i get a black screen with a white cursor blinking... Here is a log of my Boot options. I just want to delete all the other partitions which i don't know how they 've been made and stay just with the Ubuntu ext4 partition, the swap partition and the WIndows 7 partition. Can someoune help me with my problem? Here is the log: http://paste.ubuntu.com/1014619/ ps: I can only boot Windows with Hiren's Boot CD with the first option, Boot form first hard drive (win7, xp, vista).

    Read the article

< Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >