w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to force the update of an Access combobox?
I think my last message kind of hit it. Instead of having the Information combo be bound, set it's Control Source dynamically in the AfterUpdate event of the Source field. You're trying to forcefully fill a bound field with a NULL when there's a "Is Not Null" validation set up in the table design. If you unbind it, you should be able to get it to work.

Categories : Ms Access

How to use eval to force variable update
The problem is that $var is already being substituted in randomPath="/path/$var/here/", and because it is blank, randomPath is set to /path//here. You want to use single quotes to prevent the early substitution: randomPath='/path/$var/here/' The second problem is that eval x runs x as a command. What you want to do is return the newly evaluated variable as a string: eval echo $randomPath You can store it in a variable in the usual way: randomPath=`eval echo $randomPath`

Categories : Shell

How to force a textbox to update its text
The control may just need to re-paint itself. You can try two API's to do that: InvalidateRect - PInvoke RedrawWindow - PInvoke

Categories : C#

Knockout force update of input value
Add an "else { target.notifySubscribers(current); }" clause. This will trick the textbox into thinking the value has changed and it will reset itself: ko.extenders.minLengthRevert = function(target, minLength) { "use strict"; //create a write able computed observable to intercept writes to our observable var result = ko.computed({ read: target, //always return the original observables value write: function(newValue) { var current = target(); if (current !== newValue){ if (newValue.length >= minLength){ target(newValue); } else { // forces textbox which is performing the write() to think // the value has changed and reset itse

Categories : Knockout Js

Force Update of RelativeSource Binding in WPF
You have triggered your DataTrigger on Binding="{Binding RelativeSource={RelativeSource Self} which will get triggered when the ListBoxItem's datacontext change. I will suggest here to use DataTemplateSelector for your item control and set ItemTemplateSelector property to it. In SelectTemplate method you can return the template for newly added item depending on any logic: TemplateSelector: public class MyTemplateSelector : DataTemplateSelector { public DataTemplate FirstItemTemplate { get; set; } public DataTemplate DefaultItemTemplate { get; set; } public override DataTemplate SelectTemplate(object item, DependencyObject container) { //Logic to return first or default template comes here } } In xaml: <local:MyTemplateSelector x:Key="myTemplate">

Categories : Wpf

Force table update for Kohana (even if nothing to save)
Your $current->values($_POST)->save() code doesn't update table data because no changes was made with loaded Model (Kohana tracks it). To update DB data on every submit use something like: $post = Arr::extract($_POST, array('title', 'text')); // array of POST fields you want to extract from POST $post['TIMESTAMP'] = time(); // Always set new timestamp $current->values($post)->save();

Categories : Mysql

D3 Force Directed Graph ajax update
You don't actually need to pass anything back to the server, as long as, server-side, you are able to tell what new nodes and links are being generated. Then, instead of reloading your whole d3 script, you load it once, and in the force.on("tick", function()), you make your 10 sec timeout AJAX call to go get from the server the new data you want to append, be it nodes or links. For instance, imagine that you initially have this JSON in your server: [ { "nodes": [ { "name": "MaaS", "object_id": 0 }, { "name": "Convergence", "object_id": "531", "colour": "#999900" } ] }, { "links": [ { "source": 0,

Categories : Ajax

Force update of QTListWidget to add/remove elements
1) You don't need to call repaint directly. 2) You should do your search asynchronously. It is big topic - you should learn basics of Qt first. Start with signals and slots and then learn about QThread or QtConcurrent. Then implement a class that will do searching and send necessary signals: first signal on search start, second signal - on search stop. Then connect slots to this signals and work with your list view insine this slots. Problem is that your "Search manager" blocks Qt's event loop. Thats why listview does not repainted.

Categories : Qt

Force application cache update after logging in / out
Could you pass along an id with the manifest url?. Since the session id will change after a logout/login the browser will see the manifest as a different file although it actuall did not change. <html manifest="myManifest.mf?id=<?= session_id() ?>"> ... </html>

Categories : HTML

Xamarin.iOS UITableView, how do you force a cell to update?
Create a subclass of UICell and bind to INotifyPropertyChanged there. You can create a public property for the model object that the UICell is displaying. Then update the cell's display properties when the model changes, or when a property changes... public class CarCell : UITableViewCell { private Car car; public Car Car { get { return this.car; } set { if (this.car == value) { return; } if (this.car != null) { this.car.PropertyChanged -= HandlePropertyChanged; } this.car = value; this.car.PropertyChanged += HandlePropertyChanged; SetupCell(); } } private void HandlePropertyChanged(object send

Categories : IOS

Force "soft" update of fields with Angularjs
It's a tad complicated depending on the actual case. My solution assumes that the elements are available on dom ready and not loaded by angular using partials. DEMO JS function setAngularValue($elem, value) { var scope = $elem.scope(); var ngModelName = $elem.attr('ng-model'); if(ngModelName) { var $injector = $elem.injector(); //get the parse service to use on the ng-model var $parse = $injector.get('$parse'); var ngModel = $parse(ngModelName); scope.$apply(function() { //this will allow any ng-model value ex: my.object.value ngModel.assign(scope, value); }); } else { //fallback if there is no model, weird case imho $elem.val(value); } } $(document).ready(function() { var $elem = angular.element('#myJqueryId'); var value = 'so

Categories : Angularjs

JTable - How to force user to select exactly one row
What is the easiest way ensure, that one (exaclty) row is always selected in the table ? there are three (basically) selection types JTable.setRowSelectionAllowed(boolean); JTable.setColumnSelectionAllowed(boolean); JTable.setCellSelectionAllowed(boolean); edit works for me too int row = table.getSelectedRow(); if ((row > -1)) { table.setRowSelectionInterval(row, row); } }

Categories : Java

Force backbone.js to use JSONP when user is using IE9<
First you would have to find out which browser the client is currently using, there are different ways to do this, I found this script from quirksmode to be useful. Then you could globally or on model/collection-level override your sync method in Backbone, passing in {dataType: "jsonp"} in case of IE in the options hash. For example: Backbone._sync = Backbone.sync; Backbone.sync = function( method, model, options ) { if (BrowserDetect.browser === "MSIE" && BrowserDetect.version < 9) { options.dataType = "jsonp"; } return Backbone._sync( method, model, options ); };

Categories : Backbone Js

D3 force-directed graph: update node position
For general shapes, you can simply use the transform attribute to move the nodes accordingly, see e.g. this example.

Categories : Javascript

Linq to sql - How to automatically capture user Id and update datetime on insert/update?
Instead of creating a save method on your partial classes, implement the OnValidate Method and set your properties there. public partial class MyClass { partial void OnValidate(System.Data.Linq.ChangeAction action) { if (action == System.Data.Linq.ChangeAction.Insert) { LastUpdated = DateTime.Now; ChangedBy = "Me!"; } } } This method is called automatically for you when the datacontext is submitted.

Categories : C#

Force verifying correct user on FB.login
At this point it seems that there is indeed no such functionality available in the Facebook API. If you want the user to confirm his identity, it's either you ask him to re-enter his password by auth_type:'reauthenticate', or implement a confirmation popup/dialog/etc yourself (as CBroe mentioned in his comment).

Categories : Facebook

How to force QtCreator to load a pro.user file?
Well, actually Qt Creator does support shared .pro files. This link: https://qt-project.org/doc/qtcreator-2.6/creator-sharing-project-settings.html shows how to do it. So, no reason to switch to shell scripts :-) Note: Qt (and Qt Creator) is an open source project. Everyone is free to add improvements to the code. Remember that Qt is free, and we should all be very thankful for that. It is one of the greatest C++ libraries in existence. It is maintained by a large number of volunteers, and, yes, there still some 'annoyances' and bugs in there. Please file your complaints on the Qt bug tracker, no need for ranting.

Categories : Qt

Symfony2 - Force User to complete profile
Absolutly, I already did it ! 1) First create your listener : <?php namespace SybioBundleWebsiteBundleServicesListener; use SymfonyComponentDependencyInjectionContainer; use SymfonyComponentRoutingRouter; use SymfonyComponentHttpKernelEventGetResponseEvent; use SymfonyComponentHttpFoundationRedirectResponse; use SymfonyComponentHttpKernelHttpKernel; /** * User listener : redirect user depending on his informations */ class UserListener { /** * @var Container */ private $container; /** * @var Router */ private $router; /** * Constructor * * @param Container $container * @param Router $router */ public function __construct(Container $container, Router $router) { $this->container = $container;

Categories : PHP

Force User Logout in jquery ajax
We tried something similar, but you cannot detect when user closes browser so easily. Easiest way was to use session as user access. This means that on each call, your client side should send some token and server side should check it. This token is saved on client side within cookie/storage (session storage, but it works only on tab as session) and it will expire as soon as user closes window/tab. Of course, your server side should support sessions. For tokens sending I suggest using authorization header, since it can be used from most development platforms, if you plan to expand from js to e.g. android platform sometime in the future.

Categories : Javascript

Entity Framework 5, Migrations, MVC 4, update-database -force - best way to run on server
That error looks like you are initializing your database connection more than once rather than having an issue with Migrations. WebSecurity.InitializeDatabaseConnection is what is called when you use the [InitializeSimpleMembership] attribute, which in MVC4 decorates the Accounts controller by default. As you only want this to be called once, you should remove the attribute from your Account Controller and add a call to WebSecurity.InitializeDatabaseConnection to AuthConfig file, which is called on application start by global.asax. You could put it straight into the application start method in global.asax or make your own file but AuthConfig seems the best place for it in my opinion. The code for it looks like this WebSecurity.InitializeDatabaseConnection("DatabaseConnectionString","Us

Categories : Asp Net

"php app/console doctrine:schema:update --force" gives a syntax error
This is was a design decision: For compatibility reasons between all the supported vendors and edge case problems Doctrine 2 does NOT do automatic identifier quoting. This can lead to problems when trying to get legacy-databases to work with Doctrine 2. Assuming you're now letting Doctrine name your indexes, my suggestion would be to rename (or drop) the index manually and then run the schema update.

Categories : PHP

force safari iOS select component to update when options change
Firstly, why would you want to - you should adjust the values in your HTML file, or with JavaScript as the page is loading. However, if the values are changing as the user selects the dropdown, you can use JavaScript to select another element, then reselect the dropdown, causing it to reload. You can bring focus to an element with the focus() method. Eg. Document.getElementById("input").focus();

Categories : Javascript

Force rack-offline (or Rails) to update caching manifest
Probably not, because AppCache is meant for static resources. Best to use a static HTML page, and use JavaScript to load in dynamic content. Check out appcachefacts.info for more information.

Categories : Ruby On Rails

How can I force a user to view a video before entering website?
check this out please... How do you detect HTML5 video events? You just need to put a window.location = 'http://seusite.com'; in the END event ..

Categories : PHP

Application force closes on clicking new User button
java.lang.NullPointerException because your object mydb is null 1. use mydb = new DbHelper(context); in your onCreate() or 2. Either remove mydb.close(); from onDestroy() or check for null in your onDestroy() like protected void onDestroy() { super.onDestroy(); if(myDb!=null) { myDb.close(); } }

Categories : Android

Force user to fill phone textfield in certain format
assuming that the entered numbers must be at the mentioned length each. Else just strip the {amount} pairs function fomratPhone(phone){ return phone.length == 15 && /^((d){4})-[d]-(d){6}$/g.test(phone); }

Categories : Javascript

Force user to input integer - not catching errors
Like True and False are referred to as "statements" True and False are both variables referring to singleton values of the bool type. As variables, they are atomic expressions. try, except, while etc. are statements, or more accurately, compound statements because they contain a group of other statements. Usually you would refer to that group of statements as a block, as in other languages they are encapsulated within block creating tokens (e.g. { and }). In the Python specification, they are being referred to as suite. The suites of each compound statement does not really have a special name, so I guess you could just call them “try suite”, “except suite” etc., or “try block” and “except block”. Is there any reason to change this function into this (the only cha

Categories : Python

How to force a target platform update in eclipse when adding an osgi bundle
I don't think that it is possible to have the Eclipse incremental build automatically react on changes to the target definition file. This may be possible though, and could be requested as enhancement from the Eclipse PDE project. Refreshing the target definition in every incremental build would not be a good idea, given that the resolution takes several seconds.

Categories : Eclipse

Can I force IE9 *from the user side* to operate in quirks/standards mode?
Use the registry key: [HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMainFeatureControlFEATURE_BROWSER_EMULATION] Add the following name: iexplore.exe Give it a value of 5,7, or 8 to force each respective mode. References Feature Controls: Browser Emulation Understanding Compatibility Modes

Categories : Internet Explorer

Force files creation in a folder to have a fixed group:user
You need to use acl to do that https://wiki.archlinux.org/index.php/Access_Control_Lists it will not always create the files as another user then the user who created the file, but you have control of which users have default permissions to the files

Categories : Linux

custom filter to force user filling all profile property
i just added new function that return bool value as below : public class ProfileRequiredActionFilter : IActionFilter { public void OnActionExecuting(ActionExecutingContext filterContext) { public bool checkFilledProfile() { return CheckFilledProfile("FirstName", "LastName", "Country", "State", "City", "Address", "PostalCode", "Phone", "Mobile", "Email"); } private static bool CheckFilledProfile(params string[] properties) { bool returnValue = true; for (int i = 0; i < properties.Length; i++) if (string.IsNullOrEmpty(HttpContext.Current.Profile.GetPropertyValue(properties[i]) as string)) filterContext.Result = new RedirectResult("Path-To-Create-A-Profile"); } } } and

Categories : C#

force user to select combo option before processing to second form
Have the button disabled if no option in the combobox is selected. Enable it when a selection is made. Use events to detect when this happens, for example by use of the ComboBox.SelectedIndexChanged Event

Categories : C#

Entity Framework: exclusive record update - force to increment current value instead of replacing it
This sounds like Entity Framework is the wrong tool for the job. It is not meant to completely replace every interaction you have with your database. To do what you are saying, your best bet is to run the SQL directly. However, I would suggest a change to your database structure. You stated that you are going to have 200 (20 thread * 10 requests) updates. Why not make an activity table. Those 200 updates will be translated to 200 inserts into the activity table. Instead of setting Amount = Amount + 50, just insert 50 into the activity table. This way there is no chance of any thread stepping on the other. Additionally, you get a history of the transactions, and if you need to back one out, it is nice and easy. Edit I just re-read the question. It looks like your Entry table is

Categories : Asp Net

Force facebook to show my prefered images of the site in status link update
Yes and it is very easy, on each page simply add the meta tag "og:image" and set the path of your image, "og" stands for OpenGraph. Facebook Documentation You can also find help on this blog and display a custom title, description, ... You may also be interested that there is also specific meta tags for links published in Twitter. Twitter documentation. For your information Facebook cache all the images, so if you change an existing image you may not directly see the new picture

Categories : PHP

How do I force user to enter specific pattern in input field using regex and javascript
Try this: P[0-9]{8} That's a P, and then any number eight times. If a P followed by any number of digits is valid, try P[0-9]+ That's a P, and then any number at least once. To make sure that this is all they enter, add ^ and $ (as mentioned in the comments): ^P[0-9]+$ A ^ is 'start of input', and the $ is 'end of input'. So, your final code might be something like: <input type="text" /> <div class="fail" style="display: none;">Fail!</div> and $("input").keyup(function() { var patt=/^P[0-9]+$/g; var result=patt.test($(this).val()); if (result) { $(".fail").hide(); } else { $(".fail").show(); } }); http://jsfiddle.net/fuMg4/1/ Finally, make sure you check this on the server side as well. It's easy to by

Categories : Javascript

How to force user to deal with dialog before allowing access to activity? AND What's wrong with my licensing code?
For your second question, I would set setCanceledOnTouchOutside to false like so: Builder builder = new AlertDialog.Builder(this); builder.setMessage("Connection Error: Retry?"); builder.setCancelable(true); builder.setPositiveButton("Retry", new RetryOnClickListener()); builder.setNegativeButton("Cancel", new CancelOnClickListener()); AlertDialog dialog = builder.create(); //Add this dialog.setCanceledOnTouchOutside(false); dialog.show();

Categories : Java

Force User Control (specifically ListView) to Refresh Every Time Page Posts Back
Well, nevermind, I guess. Making it update its datasource during PreRender worked for my purpose, and actually, now that I think about it, is likely the reason the ListView was not updating otherwise. It was updating on Load, before the other user control had the chance to do its stuff. However, I apparently can't just run my function to update its datasource at PreRender, because that made funky things happen with the Javascript (confirming delete). I don't know why that would be. I may have to test what that's about further. So, right now I just run it on Load and PreRender (waste of resources, but at least it works as I want now).

Categories : Asp Net

How to force to download a file than view inside the browser depending on the user agent via .htaccess?
If you want to force download for specific file extensions, the easiest way is using AddType which is a mod_mime directive. For pdf, you can add this line to your .htaccess file: AddType application/octet-stream .pdf The key is octet-stream, this is the guy forcing download (and disallowing "Open..." items in download popups for browsers). Hope this helps! EDIT (asker's request in comment) As I got to go I try to give as much details as possible. If you mean to add a user agent 'prevention' you need these lines: RewriteCond %{HTTP_USER_AGENT} ^UserAgentNameHere [OR] (...more user agents...then last one:....) RewriteCond %{HTTP_USER_AGENT} ^AnotherUserAgentsName RewriteRule ^.* - [F,L] If you mean e.g. "forcing download for different browsers only", you need Apache Server v2.4 as you

Categories : Htaccess

c# MVC: How to update user roles?
In light of your comments, I see a few straightforward solutions. First, remove the hidden input fields. Those don't buy you anything and only hurt you when you go to validate the model Utilize drop down lists for roles and pass it back up on your model. The value should be the selection. Pass them up as strings and parse in the controller, as you mentioned Use radial options, each with a unique ID. Pass up the ID and correspond that ID to a value in your controller. In the controller, you are absolutely correct. Get the role and call Roles.AddUserToRole(). I think you're already on the right track :).

Categories : C#

Update when the user is not logged in
I'm sensing you're programing a game and since games need to be real-time: Create a file e.g cron.php and include that file in every page. Inside that file put this: <?php $timeNow = time(); $timeExpire = $timeNow + 10; $Users = $con->query("SELECT * FROM players WHERE TimeExpire<='".$timeNow."'"); while($UserInfo = $User->fetch_object()){ $givenWood = $timeNow - $UserInfo->TimeExpire; $con->query("UPDATE players SET Wood = Wood+ {$givenWood} WHERE Username='". $UserInfo->Username ."'"); $con->query("UPDATE players SET Time = '".$timeNow."' WHERE Username='". $UserInfo->Username ."'"); $con->query("UPDATE players SET TimeExpire = '".$timeExpire."' WHERE Username='". $UserInfo->Username ."'"); } ?> Have in mind that I put this code

Categories : PHP

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