w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Disable reachability block from functioning while specific View Controllers are Loaded?
The best way depends on the structure of your classes and which class is monitoring the reachability. Because the reachability is a common task and can be interacted with from anywhere using notifications is suitable. Define 2 notifications, 1 for reachability not required and the other for reachability required. In your view controllers that want to disable reachability monitoring post the notifications inviewDidAppear and viewWillDisappear respectively. When the notifications are received you can set a flag so the reachability block suppresses the alert or just nil the callback block.

Categories : Iphone

Can I disable or suppress Vim W11 Warnings?
When editing this file, set the autoread setting, so Vim will automatically reread it: :setl autoread This can possibly be set via a modeline. Another alternative is to set the buftype option for this file. But I am not sure, what other consequences this have, so I suspect this might have some side effects. See :h 'buftype' For the possible values and their implications of the buftype option.

Categories : Vim

How can I suppress only specific codes for specific checkstyle rules?
Most Checkstyle checks can be customized in some way. The exact options (called properties) available vary by check. Each check documents its properties. So, for instance, MagicNumber has these options. Unfortunately, the properties you are looking for (to allow magic numbers in for loops; to detect only certain individual numbers) are not available. In such a case, you must write your own check, potentially as a subclass of the check you want to modify. My personal recommendation is to use the MagicNumber check as-is, and fix all the magic numbers, especially those in for loops. But that's just me. ;-)

Categories : Misc

how to disable javascript function on a specific condition
I added a onmouseup to the code, to make it draw only when mouse is held down, and the problem was due to the manually created first canvas and its callbacks. Using this way clear will clear the canvas currently being dealt with. Look at the code for more insight: http://jsfiddle.net/cryostat/grb8e/1/

Categories : Javascript

How to disable a specific javascript file in Web Browser control in C#
There's a great article on this at javascriptKit.com Dynamically removing an external JavaScript or CSS file: To remove an external JavaScript or CSS file from a page, the key is to hunt them down first by traversing the DOM, then call DOM's removeChild() method to do the hit job. A generic approach is to identify an external file to remove based on its file name, though there are certainly other approaches, such as by CSS class name. With that in mind, the below function removes any external JavaScript or CSS file based on the file name entered: function removejscssfile(filename, filetype){ var targetelement=(filetype=="js")? "script" : (filetype=="css")? "link" : "none" //determine element type to create nodelist from var targetattr=(filetype=="js")? "src" : (filetype=="css")? "hre

Categories : C#

I'm trying to disable my url from changing without disabling ajax in jquery mobile
You can set any url you want on each of your jquery-mobile pages. Use the data-url attribute on your data-role="page" div like this: <div id='myJQMPage' data-role="page" data-url="/the/url/i/want")> </div>

Categories : Ajax

How can I suppress specific checkstyle rules in eclipse?
Your suppression filter file uses the 1.1 syntax, but claims to be using the newer 1.3 syntax. Exchange the header like so: <!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> Also, your configuration file must reference the suppression filter. Add a module definition like this (add it before the last closing </module> tag, not under Treewalker): <module name="SuppressionFilter"> <property name="file" value="${workspace_loc}/MyProject/suppressions.xml"/> </module> Using the ${workspace_loc} variable makes sure that this works even when you copy or rename the workspace.

Categories : Misc

Disabling Android "autocorrect" for specific field
You can try the following: EditText etUsername = ............; etUsername.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS); To do this in xml, add this to your EditText: android:inputType="textNoSuggestions"

Categories : Android

Primefaces Calendar - disabling specific dates using EL
One possibility is just converting the value in a bean (["5-15-2013", "6-23-2013"]), and put it directly in the Javascript code: var disabledDays = #{myBean.disabledDays}; It's not the cleanest one, but the easiest. Another possibility is just having the list of strings in the bean and use <ui:repeat> to print it as a comma separated list.

Categories : Java

How to make Clang to ignore specific warning in specific block?
First of all, be aware that: std::numeric_limits<float>::min() will return zero, as std::numeric_limits<T>::min() returns smallest non positive number for integer types, smallest non negative number for floating point type Minimum negative number for a floating point type is: -std::numeric_limits<T>::max() I think you have to combine different numeric_limits methods/members (like is_integer and is_signed) and if statements, also to get rid of your warnings. (From the efficiency point of view) You do not have to worry of getting a too complicated function, as most of the checks will be evaluated at compile time and will have no influence on the execution time. In fact, if you can avoid some unnecessary checks at running time because of some checks done at compile

Categories : C++

Disabling javascript in Yii
In your config file main.php in components array: 'clientScript' => array('scriptMap' => array('jquery.js' => false, )), Exclude scripts which you dont need or load your scripts. Include CSS,javascript file in Yii Framework

Categories : Javascript

Disable block ui when asp validator is activated
I found the solution using simple javascript isValid property What I am doing is checking for the validity of all the validators, if all validators are correct and passed then only I am calling block ui to block the login form as follows:` $(document).ready(function () { $('#btnCustLogin').click(function () { if (document.getElementById("rfvCustEmailID").isvalid && document.getElementById("revCustEmailID").isvalid && document.getElementById("rfvCustPwd").isvalid) { $('div#LoginForm').block({ message: '<h3><img src="Images/Loading_Smaller.gif"/> Processing...</h3>', css: { border: '3px solid #35a7c1', width: '200px' } });

Categories : Javascript

disabling buttons using javascript
I have four buttons with button2 as id. Don't do that, it's invalid. id values must be unique in the document. Instead, perhaps give them the same class: <input type="button" class="button2"> <input type="button" class="button2"> <input type="button" class="button2"> <input type="button" class="button2"> Then on modern browsers you can do this: var list = document.querySelectorAll(".button2"); var index; for (index = 0; index < list.length; ++index) { list[index].disabled = true; } That works on current versions of, well, nearly everything. It doesn't work on IE7 and earlier. If you need to support those, I recommend using a decent DOM manipulation library (like jQuery, YUI, Closure, or any of several others), which will have the ability to look u

Categories : Javascript

Disabling Button Javascript and C#
The first thing I detect is that you're passing a boolean as string Try replacing "SetButtonStatus('{0}')" // <-- SetButtonStatus('true') by "SetButtonStatus({0})" // <-- SetButtonStatus(true)

Categories : C#

disabling javascript on HTML print page
after edit you can use window.onbeforeprint = function() { } and window.onafterprint = function() { } ook on webkit this should works var mediaQuery = window.matchMedia('print'); mediaQuery.addListener(function(mql) { if(mql.matches) { console.log('before print'); } else { console.log('after print'); } });

Categories : Javascript

Block a specific file
You can use the F flag to deny access to a given file: RewriteEngine On RewriteRule ^index.html$ - [F] Deny access to any file that ends with .pdf: RewriteRule .pdf$ - [F]

Categories : Htaccess

How can I disable text selection using shift without disabling all text selection?
That will bind on document an event where it disables text selection upon pressing DOWN shift document.onkeydown = function(e) { var keyPressed = e.keyCode; if (keyPressed == 16) { //thats the keycode for shift $('html').css({'-moz-user-select':'-moz-none', '-moz-user-select':'none', '-o-user-select':'none', '-khtml-user-select':'none', '-webkit-user-select':'none', '-ms-user-select':'none', 'user-select':'none' }); //or you could pass these css rules into a class and add that class to html instead document.onkeyup = function() { //here you remove css rules that disable text selection } } } Hopefully i have helped you. Based on comments document.onkeydown = function(e) { var keyPressed = e.keyCode; if (ke

Categories : Javascript

Block one specific URL by htaccess. Cannot be that hard
When someone requests: http://www.gute-mathe-fragen.de/40224/redaktionelle-frage-wann-antwort-wann-lediglich-kommentar The %{REQUEST_URI} variable is: /40224/redaktionelle-frage-wann-antwort-wann-lediglich-kommentar And the regex ^40224/$ will never match that. In fact, you don't even need a RewriteCond in this instance, just put the pattern in the rule: RewriteRule ^40224/redaktionelle-frage-wann-antwort-wann-lediglich-kommentar$ - [F] Note that the pattern in the rule itself doesn't lead with a /, it's because for the rule, it's stripped off, but for the %{REQUEST_URI} var, it's preserved.

Categories : Htaccess

block specific url in .htaccess and allow access by IP
Per this article you can do it like this: Let's say you want to block IP address 123.255.123.255 from accessing the page www.mydomain.com/index.php?option=com_my_special_component. Here is how you could write the rule: RewriteEngine On RewriteCond %{REMOTE_ADDR} ^123.255.123.255 RewriteCond %{QUERY_STRING} option=com_my_special_component [NC] RewriteRule ^(.*)$ index.php [F,L] The first line just turns on URL rewriting. The second line matches the IP address (use backslashes before each dot), the third line matches the querystring (ie. anything that comes after the ? in the URL) - in this case it would match if option=com_my_special_component comes anywhere in the URL after the ? (eg. index.php?id=1&option=com_my_special_component&action=dostuff would still match with this rule

Categories : Htaccess

Disable TapGestureRecognizer for a specific image
Set recognizer's delegate and implement this method: - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { if (gestureRecognizer == tapRecognizerToDisable && CGRectContainsPoint(_imageToDisable.bounds, [touch locationInView:_imageToDisable])) return NO; else return YES; } This will work disregarding to which view tapRecognizerToDisable is added.

Categories : Iphone

Disable Specific DIV when updateprogress is in progress
This answer is based on some assumptions. For instance, you have a place to put JavaScript and a possibility to trigger it. Also i assume your Update will get handled separately and also has a way to call JS. simple JS (put in <script>-Tags): var startProgress = new function(){ document.getElementById("progress").disable; //or do whatever else... //Start your progress } var finished = new function(){ document.getElementById("progress").enable; //revert whatever you did... //do other things you want to do when finished... } You would have to do something like this in you triggering control <asp:Button ID="trigger" onClick="startProgress" Value="Update" /> When you click your trigger, your Javascript will get searched for startProgress. This functi

Categories : C#

How I disable a specific HTML button?
You can try this, $('button').on('click',function(){ // your code; $(this).prop('disabled',true); }); HTML <button class="mybutton">1</button> <button class="mybutton">2</button> <button class="mybutton">3</button> <button class="mybutton">4</button> <button class="mybutton">5</button> <button class="disable">Disable</button> SCRIPT $(function(){ $('.mybutton').on('click',function(){ $(this).addClass('disableMe'); }); $('.disable').on('click',function(){ $('.disableMe').prop('disabled',true); }); }); Working Fiddle

Categories : Javascript

Block specific links in redirected page in c#
1) For I am opening the new site in separate window, how do I access its URL or document itself? WebBrowser.Url Property - Gets or sets the URL of the current document. WebBrowser.Document Property - Use this property when you want to access the contents of a Web page displayed in the WebBrowser control through the HTML document object model (DOM) 2) How to I block specific links code wise? You can handle the Navigating event to cancel navigation if certain conditions have not been met, for example, when the user has not completely filled out a form. To cancel navigation, set the Cancel property of the WebBrowserNavigatingEventArgs object passed to the event handler to true.

Categories : C#

How can I render a block only if a specific route is active?
Here are two possible options, although for both you first have to save the currentPath in your ApplicationController to have access to it whenever you need it: var App = Ember.Application.create({ currentPath: '' }); App.ApplicationController = Ember.ObjectController.extend({ updateCurrentPath: function() { App.set('currentPath', this.get('currentPath')); }.observes('currentPath') }); Using a computed property Then in the controller backing up the template, let's say you have a NavigationController you create the computed property and define also the dependency to the ApplicationController with the needs API to gather access, then in the CP you check if the currentPath is the one you want: App.NavigationController = Ember.Controller.extend({ needs: 'application', showS

Categories : Ember Js

Can I block network access for a specific moment?
I dont think you can make the network connection blocked progamatically Work Around Keep a bool variable for blocking network.Check on every network call the value on variable.If block is set to yes Dont call any webservice.

Categories : Iphone

block specific file for some users in Git repository
This must be done on the server, by setup a hook within Gitblit. Check one of the provided post-receive hooks. A post-receive hook is run by the server after the push data has been received, and if it returns false the push will be rejected. When the script will get invoked you get a list of refs, see in the example how to get the list of commits This should get you started to get a list of the files contained in the push: def commits = JGitUtils.getRevLog(repository, command.oldId.name, command.newId.name) for commit in commits: def diffs = git.diff().setNewTree(commit.getTree()) .setOldTree(commit.getParent(0).getTree()) .call(); for diff in diffs: def path = diff.getOldPath(); //check the extensio

Categories : GIT

Static Block for specific products in magento
Can you not create an attribute specifically for the Handmade products? e.g the attribute could be called 'IsHandmade'. Then on your product page (view.phtml) under the price have something like this?: <?php if ($product->getIsHandMade == 'Yes'): echo 'This Product is 100% Handmade'; endif; ?>

Categories : Magento

Disable all the dates except a specific date in calendar in wpf
I think that you can use the property BlackoutDates. Reference: http://msdn.microsoft.com/en-us/library/system.windows.controls.datepicker.blackoutdates.aspx

Categories : C#

Disable push to specific branches on GitHub
The hooks you are looking for are pre-receive and update - the former is run once per push, the latter once per branch per push; but importantly, these are hooks on the server side.

Categories : GIT

Emberjs, Disable singleton for a specific view
Instead of create use extend in your subviews, so ember will instantiate new subviews each time that a new App.Window is created: App.Window = Ember.ContainerView.extend classNames: ['window'] childViews: ['headerView', 'bodyView', 'footerView'] title: 'Default title' headerView: Ember.View.extend // <= extend instead of create classNames: ['window-header'] template: Ember.Handlebars.compile('{{ view.parentView.title }}') bodyView: Ember.View.extend // <= extend instead of create classNames: ['window-body'] template: Ember.Handlebars.compile('Body') footerView: Ember.View.extend // <= extend instead of create classNames: ['window-footer'] template: Ember.Handlebars.compile('Footer') U

Categories : Ember Js

How to disable a pep8 error in a specific file?
As far as I know, you can't. You can disable errors or warnings user wide, or per project. See the documentation. Update Instead, you can use the # noqa commant at the end of a line, to skip that particular line (see patch 136). Of course, that would skip all PEP8 errors. The main author argues against source file noise, so the suggested # pep8 comments did not get included.

Categories : Misc

Can I disable style definitions for specific elements?
Surely you could just do that in CSS by tweaking it slightly (unless I've misread): table:not(#exception) { /* Target all tables except the one with ID exception. */ } There may be other slight tweaks that could be used, but that depends on the layout. The :not selector is supported in all major browsers, but not in older versions of IE (8 and before). One way around this is to use the Selectivizr library. "Selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8. Simply include the script in your pages and selectivizr will do the rest." As you mentioned you're using DataTables, you're using jQuery, therefore using Selectivizr simply means including the <script>, and then :not will function in older versio

Categories : Jquery

how to disable right-click link with specific domain
Haven't tested this, but this is the solution from this thread here: Disabling right click on images using jquery $('body').bind('contextmenu', function(e) { return false; }); If that doesn't work, you could also try attaching the function you document or window instead.

Categories : Javascript

Disable orientation change for only specific page
For Android, you can use this screen orientation Phonegap plugin in your main page. I've updated the code to be compatible with Phonegap 2.8.0 - you can find the source code in my answer to this question as well my Eclipse project and resulting APK. There's an equivalent iOS plugin here but I haven't used it and it may need updating for use with the most recent versions of Phonegap.

Categories : Jquery

jquery disable specific submit button
It can be done by finding the parent div, relative to the current input, then finding the button within the div. $(this).parents('.shipdiv').find('.contact-button').prop('disabled', true); Side note: .prop('disabled', true) is preferred to .attr().

Categories : Jquery

Disable specific months JqueryUI datepicker
You can update your "disable function" to something like this: var daysToDisable = [1, 4, 6]; var monthsToDisable = [9]; function disableSpecificWeekDays(date) { var day = date.getDay(); if ($.inArray(day, daysToDisable) != -1) { return [false]; } var month = date.getMonth(); if ($.inArray(month, monthsToDisable) != -1) { return [false]; } return [true]; }

Categories : Javascript

If element has two specific classes, disable button
Use a selector that looks for an element having the ID and also the class. $("#logo-previous").prop("disabled", $("#first.current").length != 0); $("#logo-next").prop("disabled", $("#last.current").length != 0);

Categories : Javascript

How do you disable specific clang diagnostics via an .xcconfig?
Xcode allows you to copy entries from the Build Settings pane using ⌘-C; the result when pasting is the text that corresponds to that setting for use in an .xcconfig file. When I entered -Wno-objc-noncopy-retain-block-property into the "Other Warning Flags" row, and copy-pasted that into a new .xcconfig file, I ended up with this: //:configuration = Debug WARNING_CFLAGS = -Wno-objc-noncopy-retain-block-property //:configuration = Release WARNING_CFLAGS = -Wno-objc-noncopy-retain-block-property and that does indeed seem to supress the warning about a retain Block property.

Categories : Objective C

Disable a specific Django middleware during tests
There are several options: create a separate test_settings settings file for testing and then run tests via: python manage.py test --settings=test_settings modify your settings.py on the fly if test is in sys.argv if 'test' in sys.argv: # modify MIDDLEWARE_CLASSES MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES) MIDDLEWARE_CLASSES.remove(<middleware_to_disable>) Hope that helps.

Categories : Django

Disable editing on specific rows in Gridview asp.net
I would suggest to loop through the records using RowDataBound method and then on the CustID field look for 60 and 61 and then disable the entire Row: protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { var dr = e.Row.DataItem as DataRowView; if(dr["CustID"].ToString() == "60" || dr["CustID"].ToString() == "61") { e.Row.Enabled = false; //OR dr.Enabled = false; //DISABLED Controls only //((TextBox)e.Row.FindControl("TextBox1")).Enabled = false; } } } Remember to add OnRowDataBound="GridView1_RowDataBound" in the GridView markup declaration

Categories : Asp Net



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