w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Configure the settings page of the application in mobile device settings
How to do that? Download the Android source code. Modify the Settings app to contain this sort of feature. Compile the source code into a ROM mod, and install that ROM mod on your device. Otherwise, an SDK app cannot affect what appears on the app's page in Settings in the manner that you describe.

Categories : Android

Saving CEWP Settings
The only reason I can think of is JavaScript is erroring out on page load, and this is causing your web part not to save the settings. For clarity, is it only the appearance chrome settings that is not saving. Can you change the web part title? Use IE9+ and press F12 to show the developer toolbar. Click on the Console tab after the page loads, when you edit the web part, you're looking for JavaScript errors that may prevent your WP from saving the dialog after changes. Chrome and Firefox's Firebug plugin can do the same thing. Start there, and we can troubleshoot further if I'm wrong.

Categories : Sharepoint

How to add own VPN settings to system VPN settings page?
Here is starting point to what @shoe rat proposed, using Java Reflection: package com.nikola.despotoski.whatever; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; public class VpnSetter { private static Map<String , Class<?>> getMappedFields(){ Map<String , Class<?>> fieldsAndTypes = new HashMap<String, Class<?>>(); fieldsAndTypes.put("name", String.class); // 0 fieldsAndTypes.put("type" , int.class); // 1 fieldsAndTypes.put("server", String.class); // 2 fieldsAndTypes.put("username", String.

Categories : Android

Saving TextView's settings on Orientation Changes - Android?
Save them in bundle @Override protected void onSaveInstanceState (Bundle outState) { outState.putBoolean("CFLAG",CFlag); } and it will be restored in Activity onCreate. @Override protected void onCreate (Bundle savedInstanceState) { CFlag = savedInstanceState.getBoolean("CFLAG"); }

Categories : Android

Saving user color settings of a clicked Button in WPF
You probably need to create items in the Settings tab of your project that store the information about the color. I would recommend storing the hex strings. Then, on MainForm_Load retrieve those values. Make sure to also put the settings in the User scope, or else they will reset each time they close the application.

Categories : C#

iOS: Saving a double picker's settings (data persistence)
In your UIPickerViewDelegate: - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setInteger:row forKey:[NSString stringWithFormat:@"DoublePickerViewController.%i", component]]; } To get the data out: for (int i = 0; i < doublePicker.numberOfComponents; i++) { NSInteger *storedInteger = [[NSUserDefaults standardUserDefaults] integerForKey:[NSString stringWithFormat:@"DoublePickerViewController.%i", i]; [doublePicker selectRow:storedInteger inComponent:i animated:NO]; } For storing multiple values: In your UIPickerViewDelegate: - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:

Categories : IOS

Saving and updating configuration settings in Java application
You are declaring a new Properties every time and add just windowstate to it. How could it know about anything else? You have to: load the properties from the file add and/or modify settings save the properties to the same file

Categories : Java

small database for saving limited number of settings
If the data set is small and flat (e.g. non-relational or hierarchical), I would either put the data into your App_Data.xml or Web.config file. A relational database is too much hassle for flat application settings. You can then edit the App_Data file during runtime using just the Xml libraries that come with .NET.

Categories : C#

ImportError: Could not import settings 'company.foo.settings' (Is it on sys.path?): No module named foo.settings
Have you tried setting the DJANGO_SETTINGS_MODULE environment variable to "company.foo.settings"? From the Djanjo Documentation; https://docs.djangoproject.com/en/dev/topics/settings/#designating-the-settings When you use Django, you have to tell it which settings you’re using. Do this by using an environment variable, DJANGO_SETTINGS_MODULE. The value of DJANGO_SETTINGS_MODULE should be in Python path syntax, e.g. mysite.settings. Note that the settings module should be on the Python import search path. EDIT: Can you also add the following to the top of your manage.py file? import sys sys.path.append('/path/to/folder/containing/company') EDIT2: In response to your clarification, you can try relative imports: http://www.python.org/dev/peps/pep-0328/#guido-s-decision

Categories : Python

Page settings for an app
On the page having the app click Edit Page and then select Edit settings. On the Settings page click more... (under the page name) and select apps. Now you have the old app list with the link to go to app.

Categories : Facebook

How to add custom settings to a Magento Product Meta Page?
Make yourself familiar how product properties are handled in magento (product attributes). To add your meta field to the product, you need to create an attribute first. Then this attribute needs to be assigned to the attributeset of your product (Adding attributes to attributesets). The default attributeset will do. The new field will now be visible in your productconfiguration. To access your new attribute you can call $product->getData('your_attribute') or $product->getYourAttribute() on a product object.

Categories : Magento

Checkbox won't stay checked on plugin settings page
Use the checked attribute of the checkbox tag instead: public function jo_checkbox_del_setting() { $checked = ( (int)$this->options['jo_checkbox_del'] == 1 ) ? 'checked' : ''; echo "<input id='jo_checkbox_del' name='jo_plugin_options[jo_checkbox_del]' type='checkbox' value='{$this->options['jo_checkbox_del']}' $checked />"; } This is the only way to have a pre-selected checkbox. Setting the value to the stored value will not automatically trigger it to be set. Also be aware that by default checkboxes in a form will not be sent along at all unless they are checked.

Categories : PHP

Multiple settings Wordpress Options Page plugin
I just modified the example in the Codex: Creating_Options_Pages#Example_.232. Now it includes a second Settings Field. The sanitization function is simpler to understand and expand. Also changed the names of the variables and added documentation in the code. I think it's easier to follow the logic now. Here it is in full: <?php class MySettingsPage { /** * Holds the values to be used in the fields callbacks */ private $options; /** * Start up */ public function __construct() { add_action( 'admin_menu', array( $this, 'add_plugin_page' ) ); add_action( 'admin_init', array( $this, 'page_init' ) ); } /** * Add options page */ public function add_plugin_page() { // This page will be under "Settings

Categories : Wordpress

jquery how to keep settings after page reload using filtrify plugin?
So, if you're dead set on a javascript solution, and you are in fact using jQuery, I'd consider taking a look at the jQuery Cookie Plugin ( https://github.com/carhartl/jquery-cookie ). It's perfect for situations like this and might inspire you investigate cookies further, with say php. If you decided to take this route, the implementation would be straight forward. You'd handle it in a similar fashion as localStorage: $(function() { var edit = document.getElementById('filter-menu').innerHTML; $.cookie('todoData', edit, { expires: 7 }); }); I've used this to implement a similar feature set, and I believe it's handled well across most modern browsers. I'd also recommend being a little more specific grabbing each tag, perhaps loop through each list item (LI), and separate wi

Categories : Jquery

Wordpress settings page, how to default the state of a checkbox to checked?
Check boxes are stored as 0 or 1 (for unchecked, checked) so you need something like this: <input type="checkbox" name='sold_text' id='sold_text' value="1" <?= checked( get_option('sold_text'), 1, false );?> /> WP's checked() function is designed for this: http://codex.wordpress.org/Function_Reference/checked

Categories : PHP

How to open Android Play Store settings page programmatically
You may use the App Intent Intercept to find the intent for the PlayStore Settings-Activity. I guess you can just run the app to start tracking and then open PlayStore and go to settings. Intent Intercept should show you the called Intents.

Categories : Android

How can I set and get the values of a multiple select with the Wordpress settings API for a theme options page?
try using <select name='plugin_options[clusters][]' multiple='multiple'> instead. This will ensure that the clusters value is saved as an array instead of a string

Categories : Wordpress

Pixelunion Extended Photosets revert to default settings after first page (with infinite scroll)
By simply calling pxuPhotoset() again you are letting the plugin use the defaults. The options need to be set every time you call the function (because you could, in theory, have different photosets use different options). What you'll want to do is save your options in a single variable and use that instead. It should look something like this: var photosetOptions = { 'lightbox' : true, 'highres' : true /* etc */ }; Then all of your options are stored in one place and all you need to do is call the function like this: $('.photo-slideshow').pxuPhotoset(photosetOptions); Update So altogether, using your options, the code would look like this: var photosetOptions = { 'ligthbox' : true, 'highRes' : true, 'rounded' : false, 'exif' : false, 'captions

Categories : Jquery

Saving page state mvc4
I am struggling to see how to save a page state without making a session var Using a view model to retain your information across post backs would do the trick. public class ConnectionViewModel { public string AuthenticationType { get; set; } public string ConnectionString { get; set; } ... } public ActionResult Login() { // pass in defaults return View(new ConnectionViewModel { AuthenticationType = "Windows", ConnectionString = "..." }); } [HttpPost] public ActionResult Login(ConnectionViewModel viewModel) { // pass view model back into view to retain values return View(viewModel); }

Categories : C#

Saving WebView page to cache
@yeradis(How I can Save WebView Contents to show even when no network available?): Maybe using a cache is the best way... for that you should check http://developer.android.com/reference/android/webkit/WebSettings.html "Manages settings state for a WebView. When a WebView is first created, it obtains a set of default settings. These default settings will be returned from any getter call. A WebSettings object obtained from WebView.getSettings() is tied to the life of the WebView. If a WebView has been destroyed, any method call on WebSettings will throw an IllegalStateException." Especifically: public static final int LOAD_CACHE_ONLY Since: API Level 1 Don't use the network, load from cache only. Use with setCacheMode(int). Constant Value: 3 (0x00000003) Or public static final int LOA

Categories : Java

PSPDFKit UIImage from page (for saving)
Use renderImageForPage:withSize:clippedToRect:withAnnotations:options:receipt:error: from your document object.

Categories : IOS

How to use saving the file without page refresh?
<s:form action="demo" theme="simple" target="foo"> Enter the location and filename for template to be saved (eg: C: empa.xml) <s:textfield name="fileLoation" id="FileLoationID" /> <s:submit value="save" method="saveTemplate" target="foo" /> </s:form> <iframe style="display:none" name="foo"> This is an hidden iframe targeted by the form to avoid page refresh and new page / tab opening </iframe> And you can return NONE from the Action. Btw you will have to notify the user if the operation has been successfully executed or not, then use iframe to receive an JSP snippet with the ok or ko message... This is only ONE of the several ways to call Actions without refreshing the page, it's up to you... But the code of your Action is executed on

Categories : Ajax

Saving page views in mysql
try this: select page_id from users_pages where user_id = @user_id order by id desc limit 20. This should work, because the id of users_pages is auto_increment (and primary key), and unless you don't save the page views by the same order they were visited, a descendent sort will do the trick.

Categories : Mysql

Loading and Saving state before going to next page using History.js
Not sure if I completely understood what you'r asking for, but how about storing the content of each page through the History.pushState - and then retrieving it from State.data.content instead of doing a new AJAX request each time? So replace your AJAX ($.get) with something like this: var $main_content = $('#main_content'); History.Adapter.bind(window, 'statechange', function(e) { var State = History.getState(); $("body").css("cursor", "default"); $main_content.html(State.data.content); }); And then add the content you are loading with AJAX into State.data.content $.ajax({ url: url }.done(function(data) { History.pushState({content: data}, null, '/replace/with/dynamic/urlpath'); $main_content.html(data); }); If you have javascript functions that alters the DOM

Categories : Javascript

cakephp saving data without reload page
if you don't wanna reload the page to do this, you need to use Ajax..since you've already got unique id for this, what you need to do is use Jquery Ajax to handle this. first download jquery lib and put it into your app/webroot/js folder and load it http://jquery.com/download/ download Jquery lib here then you can do: <script> $( document ).ready(function() { //do sth when click on #btPrice $('#btPrice').click(function(){ $.ajax({ type:"POST", //the function u wanna call url:"<?php echo $this->webroot;?>example/increase_price/", /* data you wanna pass, as your $param1 is serverSide variable, you need to first assign to js variable then you can pass: var param1 = '<

Categories : PHP

How to load a page after downloading without first saving it to a file
You're XPath expression to get the node is not correct. If you want to get single h1 node use this var titlenode = htmldoc.DocumentNode.SelectSingleNode("//h1"); If you want to get single h1 with title eTitle node use this var titlenode = htmldoc.DocumentNode.SelectSingleNode("//h1[@title = 'eTitle']"); For more see this page. Then you have to access the node value and display it.

Categories : C#

ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details
Did you try the stuff in the documentation at https://devcenter.heroku.com/articles/django#django-settings? import dj_database_url DATABASES['default'] = dj_database_url.config() It says Django settings Next, configure the application for the Heroku environment, including Heroku’s Postgres database. The dj-database-url module will parse the values of the DATABASE_URL environment variable and convert them to something Django can understand. Make sure ‘dj-database-url’ is in your requirements file, then add the following to the bottom of your settings.py file: settings.py # Parse database configuration from $DATABASE_URL import dj_database_url DATABASES['default'] = dj_database_url.config() # Honor the 'X-Forwarded-Proto' header for request.is_secure() SE

Categories : Django

Saving the page title in a variable so that it is accessible after post
I wouldn't exactly recommend a JS based approach for this but if you are interested only in this option, the following algorithm/pseudo-code will help you: Assumption: Your pages follow a strict Home > Search > Details structure and that the Details page cannot be called from anywhere but it's corresponding Search Page) Is Page Type == Home? If yes, breacrumb = "Home" // This is because when it is Homepage, the breadcrumb is always just Home and no anchor needed because it will become a link to same page. Is Page Type == Search? If yes, breadcrumb = "<a href='home.htm'>Home</a>" + "Current Page Title" // This is because your search page is always 2nd level and the first level is always home. Notice there is no link on the 2nd level because it actually is the cur

Categories : Javascript

Page not saving state of Media Element in WinRt
When you navigate to a page - by default a new instance of the page is created. You can change NavigationCacheMode of the page to enabled to keep it in memory, but then you have to take ownership of the resource management of the page and all memory it might be using. Alternatively you might want to simply save the position in that video when you navigate away from the page and restore the position once you get back, which makes more sense since it could then also survive the application being restarted or terminated and resumed.

Categories : C#

asp.net mvc 3 Save button that links to specific page after saving
Make a home button click event in jQuery Success function Example: if (d === true) { alert("Readings Saved"); $("#listOfParamsDiv").empty(); $("#homeButtonLink").trigger("click"); } I think this is what your expecting.

Categories : Asp Net Mvc

Show 'saving...' message with js/jQuery and then redirect to page
Try fadeOut callback method. Like shown below. $(document).ready(function () { $("input[id$='btnSaveBanners']").click(function () { var elem = $('#save-msg'); elem.toggle(); elem.fadeOut(3000, function () { setTimeout(function () { window.location.href = "/Admin/Orders/ViewAll.aspx"; }, 5000); }); }); })

Categories : C#

Proper way of reading a page and saving it into a html file?
There are several problems / confusions: As the error says, the open methods expects a String (i.e. the url), but you're providing an Anemone::Page object. This object has a url method, which you already use on line 9. On line 9: open(page.url) You're already opening the page, so you could reuse that. But: According to the docs http://anemone.rubyforge.org/doc/classes/Anemone/Page.html Anemone::Page contains a body method that may already contain the content (I'm just guessing, haven't use or tried that library). If that's the case, there's no need to use open. As I see it, the following untested code may be more like what you're looking for: doc = Nokogiri::HTML(page.body) # [snip] File.open("#{node_id}.html", "wb") do |f| f.write(page.body) end

Categories : Ruby

Saving variable data from jQuery to PHP and getting it after page reload
In the PHP code you could use a PHP session variable like so: $_SESSION['saveMe'] = $saveMe; Then get it later, even after a refresh, by using the session variable in php as you would normally use any variable. For more info see http://www.w3schools.com/php/php_sessions.asp

Categories : PHP

Saving data in theme options page wordpress
On your server end, you'll have to convert the values to an array first. Then update_option which will automatically serialize the data.

Categories : PHP

Saving CSS class on object in localstorage on reload page
After $( "#well" ).addClass( "disappear" ); add localStorage['wellClass'] = 'disappear'; And in the line below $(function() { add previousWellClass = localStorage['wellClass']; if (previousWellClass) $('#well').addClass(previousWellClass);

Categories : Javascript

Encrypt segments of config file (Settings.settings)
You don't need to encrypt the section, only the value for the password. An example of how to encrypt/decrypt a password is shown here: http://www.codeproject.com/Questions/304187/how-to-create-password-encrypt-decrypt-in-csharp I hope this helps. Ed

Categories : C#

How to export/import settings and change advanced settings
Regarding question #2, jshint ignore list in web essentials is currently implemented (hardcoded) as a private static, see the source on GitHub (lines highlighted). Also, parsing .jshintignore files is not currently implemented.

Categories : Visual Studio

Django: "Could not import settings 'blog.settings'"
Do not touch DJANGO_SETTINGS_MODULE, revert to the original value. You need to set properly DATABASES dictionary, at least 'default' key - ENGINE -> what kind of database backend you are using, username/password for the database access, name of the database etc.

Categories : Python

Can I store settings in a settings.config file in ASP.NET MVC?
To answer the title question, yes you can store settings in a separate config file, to do so you need to define the configSource property of appSettings element E.g. <appSettings configSource="settings.config" /> and in the settings.config file <?xml version="1.0" encoding="UTF-8"?> <appSettings> <add key="settingKey" value="environmentValue" /> </appSettings> However, for the sake of environment specific settings, you may want to look at config transforms. Setting up a transform config for each environment then deploying to that environment with the specified build configuration. E.g. Web.Dev.config (provided you have setup a 'Dev' build configuration) <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <app

Categories : C#

App settings attributes missing in "Settings" app of device - iOS
You can't put the Settings bundle wherever you want. It needs to be in the top level diretory of your app's bundle. from the manual: A Settings bundle has the name Settings.bundle and resides in the top-level directory of your app’s bundle.

Categories : Iphone



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.