windows-8

insert csv file data into mysql

天涯浪子 提交于 2019-12-20 06:37:41
问题 I want to insert data into mysql table from csv file. Import data from region_codes.csv file. In region_codes.csv file having 3 columns in 3rd columns it had , separated data, include those commas how to insert in mysql. DROP TABLE IF EXISTS `region_codes`; CREATE TABLE `region_codes` ( `country_code` CHAR(2) NULL, `region_no` varchar(5) NOT NULL, `region` VARCHAR(45) NULL, INDEX `idx_country_code` (`country_code`) ) COLLATE='utf8_bin' ENGINE = MyISAM; Using LOAD DATA LOCAL INFILE I import

Pass complex object between pages in C#

一笑奈何 提交于 2019-12-20 06:36:18
问题 I am using this code to pass values in my Windows 8 app. The following code passes data to a page when an item is clicked, So it passes sectorId to the Quiz page. private void quizbtn_Click(object sender, RoutedEventArgs e) { var sectorId = "Items1"; this.Frame.Navigate(typeof(Quiz), sectorId); } The Quiz page receives the passed parameter sectorId in the load page function where Object navigationParameter is the sectorId passed. protected override void LoadState(Object navigationParameter,

How to change the cmd's current-dir using PowerShell?

感情迁移 提交于 2019-12-20 05:43:12
问题 I read some file using PowerShell , and change current dir accordingly, but all I can do is change the current PowerShell 's current dir, not the caller's dir (the cmd.exe environment that called that ps1 file). Things I tried: powershell ch-dir.ps1 | cd (won't work, obviously, since CD is internal command) powershell cd $myDir (changes current dir in PowerShell , but when script exits, the cmd environment still in original dir) I really hope I won't need to find the script's caller process

Can the Windows 8 Live SDK use another Microsoft Account other than the current user?

 ̄綄美尐妖づ 提交于 2019-12-20 04:32:50
问题 Using the Windows 8 Live SDK you can have a user give you permission to their Microsoft Account. With this you can get their name and photo and more. But using the Live SDK appears to require the user of the app to use the same Microsoft Account as whoever is signed into the current session of Windows 8. In some scenarios, using a different account is very legitimate. I have simple sign-in working like a charm! This uses the same account. I can't find a way to do use another. Is it possible?

Can the Windows 8 Live SDK use another Microsoft Account other than the current user?

左心房为你撑大大i 提交于 2019-12-20 04:32:15
问题 Using the Windows 8 Live SDK you can have a user give you permission to their Microsoft Account. With this you can get their name and photo and more. But using the Live SDK appears to require the user of the app to use the same Microsoft Account as whoever is signed into the current session of Windows 8. In some scenarios, using a different account is very legitimate. I have simple sign-in working like a charm! This uses the same account. I can't find a way to do use another. Is it possible?

Unable to access Asset files in Metro app

心已入冬 提交于 2019-12-20 04:28:19
问题 I am trying to read a text file, which is shipped as an asset in a Metro app. I am receiving an access denied error, if specifying the file path as "ms-appx:///Assets/file.txt". Clearly I need to set some capability to access installation location folder. I tried enabling all capabilities in manifest designer, but still the same error. Please suggest. 回答1: Try this: StorageFile file = await StorageFile.GetFileFromApplicationUriAsync( new Uri("ms-appx:///Assets/file.txt")); Stream stream =

Get HTTP-only cookie from Windows 8 JS App

好久不见. 提交于 2019-12-20 04:16:42
问题 I am making a Javascript Windows 8 app in which the user connects to my server and logs in. Currently, I am trying to use the XmlHttpRequest Object to do so (specifically, WinJS.xhr) but when I get the output of getAllResponseHeaders(), the Set-Cookie header isn't there (because it is an Http-only cookie). Is there any way to get http-only cookies from a JS Windows 8 app? All help is greatly appreciated and I always accept an answer! 回答1: As it turns out, Windows 8 apps are already able to

XAML ListView - Change Image Source for selected item

﹥>﹥吖頭↗ 提交于 2019-12-20 04:06:39
问题 I'm using a ListView with a Custom Template, something like this: <ListView.ItemTemplate> <DataTemplate> <Grid HorizontalAlignment="Center" Width="220" Height="220"> <Image x:Name="image" Stretch="UniformToFill" Source="{Binding Brand.Image, ConverterParameter=transparent, Converter={StaticResource LogoToUriConverter}}"/> <StackPanel VerticalAlignment="Bottom"> <TextBlock Text="{Binding Name}" Foreground="{StaticResource ApplicationColor}" Style="{StaticResource TitleTextStyle}" Height="30"

How to use reuse softlinks created on Mac in Windows 8

被刻印的时光 ゝ 提交于 2019-12-20 03:27:13
问题 I have few softlinks, says 1000 images which i have created in MacBook Pro which i am using in my iOS Apps. Now i am porting the same app in Windows 8 phone app, so i want to reuse the same Softlink in Windows phone 8 apps as well, so how can i use that ? I have tried to open the softlink in Windows 8 machine, but it says that the "File format is not supported". I have both the original file and the softlink in my Windows machine. Is there anyother way that i can reuse the same soft link ? if

Activating touch-enabled controls in JavaFX

…衆ロ難τιáo~ 提交于 2019-12-20 03:06:28
问题 I want to use the touch-enabled controls described in http://docs.oracle.com/javase/8/javafx/user-interface-tutorial/embed.htm. I'm building my application on a Windows 8 tablet, but the ScrollPanes are desktop-style, i.e. with scrollbars and no reaction to finger-dragging. How do I tell JavaFX that I'm on a mobile platform? Edit : I just realized that the standard, desktop-style ScrollPane does react to finger-dragging, but it doesn't look like the example one in the link above. Solution :