WordPress database error: [INSERT, UPDATE command denied to user '51213-2'@'10.10.20.199' for table 'wp_options']
INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_doing_cron', '1714402347.0068719387054443359375', 'yes') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)


Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372
{"id":1224,"date":"2012-08-06T10:34:59","date_gmt":"2012-08-06T08:34:59","guid":{"rendered":"http:\/\/www.jonathanantoine.com\/?p=1224"},"modified":"2012-08-06T10:36:51","modified_gmt":"2012-08-06T08:36:51","slug":"keep-access-to-filesfolders-the-user-granted-you","status":"publish","type":"post","link":"http:\/\/www.jonathanantoine.com\/2012\/08\/06\/keep-access-to-filesfolders-the-user-granted-you\/","title":{"rendered":"Store the access to files\/folders instead of using a picker each time !"},"content":{"rendered":"

\"\"In a Metro<\/del> Win8’s style app you have full access to the local, roaming and temp folder of the app. The app can also access the libraries(documents, videos, pictures, …) if the correct capabilities are declared in the package manifest.<\/p>\n

If the app needs to retrieve any other file or folder, it has to ask the user through a picker. This is a one-time UI which gives you access to the desired item only if the user is OK with that.<\/p>\n

It can be boring (and it is) for the user to give you access to a file each time you need it. In this post we will discuss the solution proposed by the WinRT Framework.<\/p>\n

<\/p>\n

This is in fact as easy as managing a list of strings ! <\/p>\n

Everything takes place in the FutureAccessList<\/strong><\/a> object of the Windows.Storage.AccessCache.StorageApplicationPermissions namespace. This object is a dictionnary of the the files\/folder you want to keep an access to. The key of the dictionnary is a string token and the value is the storage item (file \/ folder).<\/strong>
\n[csharp]
\nvar picker = new FolderPicker();
\npicker.FileTypeFilter.Add("*");
\nvar folder = await picker.PickSingleFolderAsync();<\/p>\n

StorageApplicationPermissions.FutureAccessList.AddOrReplace(Token, folder);
\n[\/csharp]
\nThe app still have to ask once for the folder but the next time, it can retrieve the folder from this list instead of using a filer\/folder picker. The app will then have access to it even if the app is terminated between the two use of it.<\/strong>
\n[csharp]
\nvar folder = await StorageApplicationPermissions
\n .FutureAccessList.GetFolderAsync(Token);<\/p>\n

var fileToCopy = await StorageFile
\n .GetFileFromApplicationUriAsync(new Uri("ms-appx:\/\/\/Assets\/Logo.png"));
\nawait fileToCopy.CopyAsync(folder, "Logo.png", NameCollisionOption.ReplaceExisting);<\/p>\n

[\/csharp]<\/p>\n

The list is cleared if the app is uninstalled or if you call the clear method on it. The MaximumItemsAllowed property of the FutureAccessList give you … the maximum number of item you can store in the list. At this time it seems to be 1000.<\/strong><\/p>\n

Finally, you can also use the MostRecentlyUsedList collection in the same namespace to store the files\/folder used the most in your application.<\/p>\n","protected":false},"excerpt":{"rendered":"

In a Metro Win8’s style app you have full access to the local, roaming and temp folder of the app. The app can also access the libraries(documents, videos, pictures, …) if the correct capabilities are…<\/p>\n","protected":false},"author":3,"featured_media":1232,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[35],"tags":[],"_links":{"self":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts\/1224"}],"collection":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/comments?post=1224"}],"version-history":[{"count":12,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts\/1224\/revisions"}],"predecessor-version":[{"id":1237,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts\/1224\/revisions\/1237"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/media\/1232"}],"wp:attachment":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/media?parent=1224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/categories?post=1224"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/tags?post=1224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}