w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
While Sending Html Mails from my web application Recieved Mails contains Symbols like &ldquo,&rdquo, ‘
Check with another constructor for htmlView: ContentType mimeType = new System.Net.Mime.ContentType("text/html"); var htmlView = AlternateView.CreateAlternateViewFromString(bodyMessage, mimeType);

Categories : Asp Net Mvc

Cocoa finder menu item for folders only
Add the following code to the .plist: <key>NSServices</key> <array> <dict> <key>NSMenuItem</key> <dict> <key>default</key> <string>Folder Handling Demo</string> </dict> <key>NSMessage</key> <string>handleServices</string> <!-- This specifies the selector --> <key>NSPortName</key> <string>Tmp</string> <!-- This is the name of the app --> <!-- Here we're limiting where the service will appear. --> <key>NSRequiredContext</key> <dict> <key>NSTextContent</key> <string>FilePath&l

Categories : Objective C

Cocoa: how to remove item from Finder's context menu via service?
The documentation says: You should not use this function to unregister the services provided by your application. For your application’s services, you should use the setServicesProvider: method of NSApplication, passing a nil argument. So, do what you did in applicationDidFinishLaunching:, except pass nil instead of self. (I don't know whether you'll need to do the NSUpdateDynamicServices step.)

Categories : Objective C

Access function from within scripts and from commandline
try the following (note that the different indentation, the if __name__ part is not part of class test anymore): class test: def quicktest(params): pprint(params) if __name__ == '__main__': if sys.argv[1] == "quicktest": testObj = test() testObj.quicktest(sys.argv) else: print "Wrong call." from other scripts: from test import test testObj = test() testObj.quicktest(...)

Categories : Python

Vim Supertab plugin reverses the direction when navigating completion menu
This is because SuperTab's default completion is <C-p>, which cycles backwards (so matches before, not after the cursor are presented first, which is usually what you want). As documented, you can change that via: let g:SuperTabDefaultCompletionType = "<c-n>" (Put this into your ~/.vimrc.)

Categories : Vim

Keeping the accordion menu open to show selected menu item
The initMenu() function, should look like this: function initMenu() { $(".sub-menu").hide(); $(".current_page_item .sub-menu").show(); $('#menu li a').click( function() { var checkElement = $(this).next(); if ((checkElement.is('ul')) && (checkElement.is(':visible'))) { checkElement.slideUp('normal'); return false; } if ((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $('#menu ul:visible').not(checkElement.parentsUntil('#menu')).slideUp('normal'); checkElement.slideDown('normal'); return false; } }); $('.current-menu-item').parentsUntil('#menu').slideDown('normal'); var FullCurrentURL = window.location.href; var CurrentURLparts = FullCurrentURL.split("/"); var CurrentURLindex = CurrentURLparts.lengt

Categories : Misc

iOS NSUserDefaults access before synchronize completion
The purpose of [NSUserDefault synchronize]; is to make the user defaults get written on disk immediately. Regarding this: I'm unsure of if the synchronization is happening without me knowing it. You don't need to call [NSUserDefault synchronize] explicitly to store the value, iOS already does it at appropriate time (like when going into background). So you can avoid that line unless you want to store that value immediately. In fact, it's a performance problem if you call synchronize every time you set a value.

Categories : IOS

Keep Jquery slideDown menu open when hovering over that menu?
It's not a particularly easy problem to solve (out of the box) as there are multiple elements that rely on each other's state to work properly. I have done this before with setTimeout. Use setTimeout to maintain control of a variable that tells each of the hover events what to do. Just threw a jsFiddle together that does what you want (though I think there's a problem with the slideup part at the mo): http://jsfiddle.net/3vL3a/ And the JS / HTML: $(document).ready(function () { var menu = $('.menu') var timeout = 0; var hovering = false; menu.hide(); $('#mainbutton') .on("mouseenter", function () { hovering = true; // Open the menu $('.menu') .stop(true, true) .slideDown(400); if (timeout > 0) {

Categories : Jquery

Menu icon does not open menu after clicking a link
It turns out this is caused by TurboLinks in Rails 4.0 I found this page http://blog.joshsoftware.com/2013/06/28/troubleshooting-turbolinks-with-rails-4/ that talks about a solution. My application.js file looks like //= require jquery //= require jquery.turbolinks //= require jquery_ujs //= require foundation $(document).foundation(); $(function(){ $(document).foundation(); }); //= require_tree . //= require turbolinks and I had to add the following line to my Gemfile gem 'jquery-turbolinks'

Categories : CSS

Set a cookie when clicked on menu so next visit menu is open
I've modified your code. See inline comments. See the entire code here and the LIVE DEMO. $('.subitems').hide(); // check cookie checkCookie(); function checkCookie() { // the cookie exists if($.cookie('mainlevel')) { var index = $.cookie('mainlevel'); $(".mainitem:eq(" + index + ")").find("ul").show(); } } // click on .mainitem $('.mainitem').click(function() { // get the index var cookie = $(this).index(); // hide all subitems $(".mainitem").find("ul").slideUp(); // toggle the ul that is in the clicked item $(this).find('ul').toggle(function() { // save the cookie $.cookie('mainlevel', [cookie], { expires: 30 }); }); // toggle if change happend :: thanks @lolotron if (previousValue != cookie) {

Categories : Javascript

Open Context Menu by ctrl+menu
Not sure If I understand what you are looking for correctly. you probably should do something like that: define a Command OpenMenu = new RoutedUICommand("OpenMenu ", "OpenMenu ", typeof(Commands), new InputGestureCollection { new KeyGesture(Key.O, ModifierKeys.Control, "Ctrl+O") }); use it in your Window <Window.CommandBindings> <CommandBinding Command="local:Commands.OpenMenu " Executed="OpenMenuExecuted" /> </Window.CommandBindings> private void OpenMenuExecuted(object sender, ExecutedRoutedEventArgs e) { this.ContextMenu.IsOpen = true; } note: if you dont want the right click button opening the window ContextMenu you can prevent it by attaching ContextMenuOpening event

Categories : C#

When clicking on a link inside the accordion menu, how can I keep the accordion menu open once the page is refreshed with new html content?
I suggest you try another menu selector based on your current url (because when your page refreshes you can't get menu item clicked before). It could be something like this (for receipt-printer.html page): $('.menu > li > ul:not(:has(li > a[href="receipt-printer.html"]))') It's hard coded but I think it could work for you. The value of current page you can get from window.location.pathname. For example like this: var url = window.location.pathname.split('/')[3] //because on your site you have relative url lauren/ootpik5/receipt-printer.html But it also hard coded and I'm not sure that it will work for any urls on your site. So full example of algorithm could be: var splittedUrl = window.location.pathname.split('/'); var href = splittedUrl[splittedUrl.length - 1]; var menu

Categories : Jquery

Raise context menu command's CanExcute while open the context menu
Inside BaseCommand, replace the CanExecuteChanged to look like the following. And it will work the way you want it. public event EventHandler CanExecuteChanged { add { CommandManager.RequerySuggested += value; } remove { CommandManager.RequerySuggested -= value; } }

Categories : Wpf

My app won't open from the "open in..." menu
Because you got conflicts in your info.plist. You can try to roll back/jump to previous commit if you are using tower or github.Otherwise start with fresh copy of your initial project. So that you can find that where you are getting conflicts.

Categories : Iphone

How i can open vaadin menu bar
As far a I know you can not. Opening and closing a menu does not communicate with the server (tried in debug mode), so the state of the menu is not known to the server and can't be changed. I also checked the sources and could not find any sign that it should be possible somehow (see VMenuBar.java and MenuBarConnector.java).

Categories : Java

I can't open Sliding menu
Use somthing like that : @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: menu.toggle(); return true; }

Categories : Android

Display app in 'open in' menu IOS
It appears there are a few file types Apple does not allow an application to register as a handler of - JPEG and PNG are on that list. You can define a custom file type/extension and register that easily enough (as in the link you referenced), but Apple seems to prevent applications from showing up in the action sheet to receive images. If you want to see what your info.plist should look like if it were possible to register as a handler of images, take a look at the Evernote app (it's free). They register as a handler of a variety of file types, including images and PDF. For PDF's, Evernote shows up as a target to send the file to, but never in images. If I were to guess, I'd say this is because Apple doesn't want dozens of applications to show up as the target for an image the user wants

Categories : IOS

Is there a shortcut to open resharper menu?
You want the Action List. To access it hit.. Alt + Enter Here is the full list of R# commands Here is more info on the Action List.

Categories : C#

Tabs open according to links on sub menu
You can do this using Javascript. Just toggle property display of that class from none to block and vice versa. If you are using jQuery, you can do this: $(document).ready(function() { $('#cat_link').click(function() { $('#tabs-1').hide(); $('#tabs-2').show(); return false; }); $('#item_link').click(function() { $('#tabs-2').hide(); $('#tabs-1').show(); return false; }); }); You also have jQuery-UI widget tabs. If you are using pure javascript, you can do it like this (reference): function hideshow(which){ if (!document.getElementById) return if (which.style.visibility=="visible") which.style.display="hidden" else which.style.display="visible" }

Categories : HTML

open second Accordion Menu tab using Jquery
<script> $(document).ready(function(){ $('#accordion li:eq(1)').show(); // second tab show $('#accordion li:eq(1) ul').show(); // second tab show $("#accordion > li").click(function(){ if($(this).next().is(':visible')) { $('#accordion > ul').slideUp(300); } $(this).next().slideToggle(300); }); }); </script>

Categories : Jquery

Have to type .php to open menu link
Someone probably mis-edited the .htaccess file. That file make possible the redirections, which allows to have the called "nice urls" or "clean urls" Read the wikipedia article about it: https://en.wikipedia.org/wiki/Clean_URL Your contact url: http://www.mechanismdigital.com/contact was also broken. (I see you just fix it) Maybe you had an .htaccess but it was hidden, or the options set on a local php (If you can't alter the /etc/php, well, somehow you had configured the redirection, so is logical to assume an htaccess file or a local php.ini file) Now, the methods the other answers provide actually work, but require to manually add such lino for each php. With something like this, you can make it for each php file there: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d Re

Categories : PHP

Can't open Activity in options menu
The line startActivity(new Intent(getApplicationContext(),EmailActivity.class)); is wrong. You cannot start an activity with application context as you wrote. You should pass an activity instance instead of the application context. EDIT: If you are in a class of an activity, try pass this instead.

Categories : Android

Collapsible Menu Not Staying Open
It's because of this line: $(this).siblings("ul").slideToggle It says: "toggle the state of all the ul elements using a slide animation" You will want to change this to slideDown when it's hidden in order to show it and slideUp when it's visible in order to hide it. I would provide a code sample but I'm typing with one thumb on an iPhone at the moment.

Categories : Javascript

How to open context menu with right-click down instead of up?
The question is pretty old, but the answer is realy simple: #IfWinActive, ahk_class MozillaWindowClass *$RButton:: SendInput, {RButton Up} Return RButton Up:: SendInput, {LButton} Return

Categories : Firefox

How can I detect when a MenuButton open its menu in Javafx?
Adding dynamic menu items on showing can be this way: @Override public void start(Stage stage) throws Exception { final MenuButton m = new MenuButton("Cities"); m.getItems().addAll(new MenuItem("Moscow"), new MenuItem("Bishkek"), new MenuItem("Istanbul")); m.showingProperty().addListener(new ChangeListener<Boolean>() { @Override public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) { if(newValue) { m.getItems().add(new MenuItem("new city item")); } } }); StackPane stackPane = new StackPane(); stackPane.getChildren().add(m); Scene scene = new Scene(stackPane); stage.setScene(scene); stage.show(); }

Categories : Java

WP 8 - How to Open Menu with Application Bar Icon Button
There is no property or method available that will do this for you. See the MSDN The only way I see is to implement your own ApplicationBar.

Categories : C#

jQuery menu on hover open submenu
You have a couple of issues that need to be resolved. First, you should provide two arguments to the hover() function, the first is a function for onmouseenter, the other is for onmouseleave. Next, just tag all sub menus with the same class, e.g., sub. This will make writing you selectors much easier. Use the children() function to only apply the animation to direct children of the item that the user is hovering over. $(document).ready(function () { $("ul.top li").hover(function () { //When trigger is hovered... $(this).children("ul.sub").slideDown('fast'); }, function () { $(this).children("ul.sub").slideUp('slow'); }); }); Working Example

Categories : Javascript

Open and Close a menu with javascript not jquery
function openMenu(){ var left=document.getElementById('colorchanger').style.getPropertyValue("left"); if(left=='-200') { document.getElementById('colorchanger').style.left = 0 + 'px' } else { document.getElementById('colorchanger').style.left = -200 + 'px' } }

Categories : Javascript

Can't get my jQuery dialog to open on menu item click
You are missing a hash (#). Replace $("dateturn-form").dialog("open"); with $("#dateturn-form").dialog("open"); Demo

Categories : Javascript

How do I add this script to make my menu open on mouse hover
I think you are reinitializing the whole thing, thats why you mess up everything. Try this instead: $(function() { $( "#tabs" ).tabs({event: "mouseover"}).addClass( "ui-tabs-vertical ui-helper-clearfix" ); $( "#tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" ); });

Categories : Jquery

Keeping link in an inactive state while menu is open
Have you tried creating a hover-specific style when clicked, and then apply this style when clicked, and removing it when necessary? For example: button.one.hover, button.one:hover { color: #ccc; cursor: pointer; } DEMO

Categories : Jquery

Make last hovered menu item stay open
You had a couple of issues with your scripts and CSS. Firstly, your CSS had the following rule: nav ul#main-nav li:hover > ul.submenu { display: block; } This needs to be modified to: nav ul#main-nav li > ul.submenu.stick { display: block; } This meant that your CSS was controlling the visibility rather than the class 'stick'. As you mentioned the use of .hover() and .mouseleave() in the script code is incorrect and not required. As at that point you are already in the mouseleave (handlerOut) of the hover. The below code appears to perform the desired effect you were looking for: var menuStickTimeoutId; $('ul#main-nav > li').hover(function () { var $this = $(this); clearTimeout(menuStickTimeoutId); $('#main-nav ul.submenu').removeClass('stick'); $

Categories : Javascript

Open Option menu on device without hardware keys
There is a function openOptionsMenu() that you could call manually in your activity when you want to open the menu. public void openMenu() { openOptionsMenu(); } Better: if you want the 3 dot overflow button in the navigation bar just create your optionsMenu as usual: @Override public boolean onCreateOptionsMenu(Menu menu) { //add your menu } @Override public boolean onOptionsItemSelected(MenuItem item) { //select what happens when you click at an item return true; } and make sure to set both minSdkVersion and targetSdkVersion to "10" or lower! For example: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="your.package.name"> <uses-sdk android:minsdkversion="4" android:targetsdkversion="10" /> </manifest>

Categories : Android

jQuery Menu Management (functions) - Open and Close
The dlmenu code is interesting, once initialised you can call it again with a string for the function to execute. As such you could change the index.html from the git repository (here) to automatically open the menu by changing $(function(){...} to: $(function() { $('#dl-menu').dlmenu(); $('#dl-menu').dlmenu("openMenu"); }); You can also use the above to close a menu. However I couldn't find any mechanism to add listeners to the dlmenu code. So the best solution is to add your own and utilise the following: $('#dl-menu').dlmenu("closeMenu"); The '#dl-menu' is a reference to the id of your menu div, so you can specify whatever menu you wish to close by the id. The tricky part is firing the listener when the other menu is clicked. This is complicated by the fact that the

Categories : HTML

How do I make a Kendo Menu open on hover, not on click?
Take a look at this jsfiddle. FYI-it's using jQuery, not using Html helper. Hope it's helpful to you. You can open menu on hover.

Categories : CSS

how to create press and hold gesture and open new menu in UITextView
To remove the current menu when you do a long press: How to intercept long press on UITextView? To create your own menu: iPhone/iPad context menu

Categories : IOS

Bootstrap dropdown menu – stay open if search bar is focused
You can use :focus to find if the search box has focus in the second hover function, without any need to give things additional events. .size() will return 1 if it has focus and 0 otherwise, and then the ! casts those to true and false, respectively, before negating. Then in the first hover function, check to make sure there are no currently open menus before opening. $('ul.nav li.dropdown').hover(function() { if (!$(".dropdown-menu:visible").size()) { $(this).closest('.dropdown-menu').show(); $(this).addClass('open'); } }, function() { if (!$(".navbar-search input:focus").size()) { $(this).closest('.dropdown-menu').hide(); $(this).removeClass('open'); } }); CodePen demo

Categories : Javascript

Force reevaluate ICommand CanExecute upon context menu open
Yes there is. Use this implementation of ICommand. It reevaluates on each interaction, in your case "Context menu opening". It is not so performance efficient, but if you are not having hundreds of commands then should do the work: public class Command<TArgs> : ICommand { public Command(Action<TArgs> exDelegate) { _exDelegate = exDelegate; } public Command(Action<TArgs> exDelegate, Func<TArgs, bool> canDelegate) { _exDelegate = exDelegate; _canDelegate = canDelegate; } protected Action<TArgs> _exDelegate; protected Func<TArgs, bool> _canDelegate; #region ICommand Members public bool CanExecute(TArgs parameter) { if (_canDelegate == null) return true; ret

Categories : Wpf

Android SlidingMenu listeners for secondary menu open events
Pretty much the same.. /** * Sets the OnOpenListner for secondary menu {@link OnOpenListener#onOpen() OnOpenListener.onOpen()} will be called when the secondary SlidingMenu is opened * * @param listener the new OnOpenListener */ public void setSecondaryOnOpenListner(OnOpenListener listener) { mSecondaryOpenListner = listener; } https://github.com/jfeinstein10/SlidingMenu/blob/master/library/src/com/jeremyfeinstein/slidingmenu/lib/SlidingMenu.java#L887

Categories : Android

jQuery menu open after page load, should start out closed
$('.hidden').slideUp(1).delay(2000).slideDown('slow'); This is just a prototype integrate with your code .. JSFIDDLE DEMO

Categories : Javascript



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