Search Results

Search found 28682 results on 1148 pages for 'drop down menu'.

Page 87/1148 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • Scroll up/down while selecting multi-page block of text in Vim through putty

    - by shan23
    I'm using vim 6.3.81 on a xterm through putty. When I use set mouse=a , I can scroll through the file , but not select text. When mouse is disabled using set mouse=, I can select text with mouse (automatically copied to a buffer) , but if the text block is over one page long , I can't scroll up/down (and have to select text one screen at a time) !! Is there any way to have the best of both - while selecting text with mouse , if i reach the end of page , it automatically scrolls up/down depending on whether i've reached top/bottom of page and allows me to select text from the next page as well ? I know vim is powerful/flexible enough to do what I want - I just don't know how !! Can anyone help ?

    Read the article

  • Counting down to zero in contrast to counting up to length - 1

    - by Helper Method
    Is it recommended to count in small loops (where possible) down from length - 1 to zero instead of counting up to length - 1? 1.) Counting down for (int i = a.length - 1; i >= 0; i--) { if (a[i] == key) return i; } 2.) Counting up for (int i = 0; i < a.length; i++) { if (a[i] == key) return i; } The first one is slightly faster that the second one (because comparing to zero is faster) but is a little more error-prone in my opinion. Besides, the first one could maybe not be optimized by future improvements of the JVM. Any ideas on that?

    Read the article

  • jQuery click event to make a div slide down and push next div out of viewport

    - by Josh
    I'm trying to figure out how to make jQuery slide #content2 down and replace content1 with it while making it look like #content1 is actually being pushed down by #content1 removing it from view... Then the same button that was clicked to make #content2 replace #content1 would also need to do the reverse effect by replacing #content2 with #content1 making them slide up and push each other out of the way... I'm not all that great with jQuery so I'm sure I've gone about this the wrong way, but here's what I've tried: $(document).ready(function() { $('#click').click(function() { if($('#content1').is(':visible')) { $('#content1').slideUp(); } else { $('#content2').slideDown(); } }).click(function() { if($('#content1').is(':visible')) { $('#content2').slideDown(); } else { $('#content1').slideUp(); } }); });

    Read the article

  • Colors in Instruments when hunting down memory leaks

    - by Structurer
    Hi I'm currently hunting down a memory leak in my app for iPhone. I'm using Instruments to track down the code that is causing the leak (becoming more and more a friend of Instruments!). Now Instruments show two lines: one in dark blue (row 146) and one in a lighter blue (150). From some trial and error I get that they are connected somehow, but not good enough at Objective-C and Memory Management yet to really understand how. Does anyone know why different colors are used and what could be my problem? I have tried to release numberForArray but the the app crashes when showing the last line in a picker view. All ideas appreciated! (Posting this I also realize that line 139 is redundant! Se there, already an improvement ;-)

    Read the article

  • Best way to reverse bitmap data that is upside down

    - by Wladimir
    Hello, I have a method that I call and it returns bitmap data from a capture device. It returns a pointer to the buffer data as an IntPtr and the buffer length as an int. I know in advance that this bitmap is a 24bpp and its width and height. The problem is that the buffer contains the bitmap data upside down and I need this data to be in the right order (reverse it). What I do is create a for loop and using CopyMemory, I copy each line (stride) of this data from bottom to up to a newly allocated memory space. Is there any way to make it faster than creating more memory each time I receive a new frame? It makes the application get a bit slow and consumes more memory as each bitmap is pretty big. I do this because I use another component that analyses the bitmaps and it doesn't work propertly if the bitmaps are upside down. I'm using .net, c# thanks!

    Read the article

  • main content wrapper div get's pushed down the page in IE

    - by Blankman
    I have a 2 column layout, with the left side for navigation and the right side for the main content. The right side content has a wrapper div that looks like: Now this looks fine in FF and GC, and it IE but if I change the padding to anything over 4px that section gets pushed down below the left navigation. #content { padding:3px; // 4 makes it get pushed down } Does this mean IE has a different way of calculating the width of all my elements? Is this a common problem that has a solution for it?

    Read the article

  • loading xml slow down my site

    - by Ayrton
    Hi is it possible that loading an xml is slowing down my site? I've written this little function in php to iterate over an array of Strings to calculate the total amount of my followers function getFeedCount() { foreach ($array as $value) { $xml = simplexml_load_file("http://api.feedburner.com/awareness/1.0/GetFeedData?uri=$value") or die ("Unable to load XML file!"); $circulation += $xml->feed->entry['circulation']; } return $circulation; } the array is about 10 items big and since I started using it, it really slowed down my site. What could I do fix this issue.

    Read the article

  • Issue with Sliding Up/Down a Hidden Div using .toggle()

    - by user1760110
    Can you please take a look at this JSFIDDLE sample which I am trying to create a smooth animate of hidden div from down to up on mouse hover. As you can see the div appears from left down corner but I would like to animate it from bottom to top. I tried to use animate() but I didn't know how to change the hidden div statue from hidden? here is the code I am using: $(document).ready(function() { $('#handler').hover(function(){$('#hidden').toggle(1000)}); });? Can you please let me know how i can use jQuery easing plugin for something like this? Thanks

    Read the article

  • Gesture recognizer for mouse down and up in iPhone SDK

    - by user545201
    I want to catch both mouse down and mouse up using gesture recognizer. However, when the mouse down is caught, mouse up is never caught. Here's what I did: First create a custom MouseGestureRecognizer: @implementation MouseGestureRecognizer -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesBegan:touches withEvent:event]; self.state = UIGestureRecognizerStateRecognized; } -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesEnded:touches withEvent:event]; self.state = UIGestureRecognizerStateRecognized; } @end Then bind the recognizer to a view in view controller: UIGestureRecognizer *recognizer = [MouseGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)]; [self.view addGestureRecognizer:recognizer]; When I click mouse in the view, the touchesBegan is called, but touchesEnded is never called. Is it because of the UIGestureRecognizerStateRecognized? Any advice will be appreciated! Thanks!

    Read the article

  • Drupal - how to add add same page to two menus?

    - by bert
    How can I add same callback to 2 different menus? function my_callback_menu(){ $items = array(); $items['my_callback'] = array( 'title' => t('My title'), 'menu_name' => 'menu-my-menu', 'page callback' => 'my_callback', 'access arguments' => array('access content'), ); return $items; }

    Read the article

  • Sharepoint always down on the weekend?

    - by TheGambler
    For some reason, our sharepoint site always goes down on Saturday. It's the stangest thing and I can't figure out why. I'm a total noob at sharepoint and have been thrown into being the go to guy for sharepoint with my current employer. I've tried bouncing IIS on Fridays to see if there is anything I can do before hand. Is there anything that might be scheduled that I may not know about that would cause sharepoint to go down? Remember I'm a total noob as sharepoint. Thanks to all that reply. Edit: Also this our front-end and database instances are on virtual servers.

    Read the article

  • Moving an item up and down in a WPF list box

    - by DommyCastles
    I have a list box with a bunch of values in it. I also have an UP button and a DOWN button. With these buttons, I would like to move the selected item in the list box up/down. I am having trouble doing this. Here is my code so far: private void btnDataUp_Click(object sender, RoutedEventArgs e) { int selectedIndex = listBoxDatasetValues.SelectedIndex; //get the selected item in the data list if (selectedIndex != -1 && selectedIndex != 0) //if the selected item is selected and not at the top of the list { //swap items here listBoxDatasetValues.SelectedIndex = selectedIndex - 1; //keep the item selected } } I do not know how to swap the values! Any help would be GREATLY appreciated!

    Read the article

  • Sub Menu Rollover Pop up Not Showing

    - by Stradigos
    Hello everyone, hopefully this will be an easy answer for some of you CSS veterans out there. I'm developing a site for a client. For readability, I'll just give you a link to the website and the css page in question. HTML CSS I'm trying to make a sub menu pop up to the right of the main menu when you scroll over "Star Quartz Grout." My current CSS obviously isn't correct though, and I could use some guidance. ul#subNav {display: none; width: 134px; } li:hover ul#subNav, li.over ul#subNav {display: inline-block; position: absolute; top: 0px; left: 134px; } My guess is that it's working but it's hidden behind the rest of the page. I could be wrong though. It's kind of hard to confirm, even with Chrome's "Inspect Element" (very nice thing btw). It's probably some dumb mistake. Anyway, thanks in advance. I'm a bit of a CSS novice.

    Read the article

  • Apply jump menu functionality on select box styled with jquery

    - by ktsixit
    Hi all, I am using this script to apply style on a select box. It works fine as a standalone version. But I also need to apply a jump menu functionality on this select box. I tried adding a function but it seems that there is some conflict between the two scripts. The jquery styling and the jump menu function can't work together at the same time. Can you help me fix it? This is a sample code to let you know what I'm dealing with here: <script type="text/javascript"> $(document).ready(function() { $('#jumpMenu').selectbox({debug: true}); function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } }); </script> <select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)"> <option value="http://www.link1.com">link1</option> <option value="http://www.link2.com">link2</option> <option value="http://www.link3.com">link3</option> </select>

    Read the article

  • iphone menu navigation with buttons help requested

    - by David
    Hi, I'm trying to program an iphone app that will have several different (sub)apps. Ideally, I want to know how to make the main menu for this app look and behave like the iphone's own app menu, but I can't figure it out. If any one knows a package or library that does this, please let me know. Plan B is to mock one using UIButtons, and here is where I'm having problems. Basically, when I press a button that should push a new view, it calls the push method, but I still see the top view. in the app delegate, I have something like: AppViewController *viewController; App1ViewController *app1ViewController; UINavigationController *navController; and in didFinishLaunching method, something like: viewController = [ [ AppViewController alloc ] initWithAppDelegate: self ]; app1ViewController = [ [App1ViewController alloc ] initWithAppDelegate: self ]; navController = [ [ UINavigationController alloc ] initWithRootViewController:viewController]; [window addSubview:viewController.view]; and 2 methods -(void)app1{[ navController pushViewController: app1ViewController animated:YES ];} -(void)back{[ navController popViewControllerAnimated:YES ];} then I have 2 viewcontrollers in AppViewController.h @interface AppViewController : UIViewController { UINavigationController *navController; UIButton *appbtn1, *appbtn2, *appbtn3, *appbtn4; } -(id)initWithAppDelegate:(id)appDelegate; @end @interface App1ViewController : UIViewController { UITextView *textView; UINavigationController *navController; } -(id)initWithAppDelegate:(id)appDelegate; @end and define a loadView for each viewcontroller. However, when I press the app1 button and the app1 method gets called, it says the view hasa been pushed, but my view remains the buttons view, i.e. the root view. If I press the button again, it tells me I can't repush the app1view, the one I can't see. Any ideas? I can post the full code if that helps. Thank you for your time.

    Read the article

  • How to add share menu item to Gallery by code

    - by Anthony
    I know how to implement this issue by Menuifest.xml, see also: Google Android Developer Group related issue But my question is how to add share menu of Gallery by java code not Menuifest.xml. My code is as below: public class MyActivity extends Activity { private static final String TAG = "MyActivity"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(Intent.ACTION_SEND); intentFilter.addCategory(Intent.CATEGORY_DEFAULT); try { intentFilter.addDataType("image/*"); } catch (MalformedMimeTypeException e) { Log.e(TAG, e.toString()); } Intent x = registerReceiver(new BroadcastReceiver() { public void onReceive(Context context, Intent intent) { Log.d(TAG, "Received intent "+intent); intent.setComponent(new ComponentName(context, Uploader.class)); startActivity(intent); } }, intentFilter); if (x==null) Log.i(TAG, "failed to regist a receiver"); else Log.i(TAG, "registed a receiver successfully"); // ... But registerReceiver always return null, and there is no menu added to Gallery's Share. Thank you. Anthony Xu

    Read the article

  • Context Menu on QGraphicsWidget

    - by onurozcelik
    Hi, In my application I have two object type. One is field item, other is composite item. Composite items may contain two or more field items. Here is my composite item implementation. #include "compositeitem.h" CompositeItem::CompositeItem(QString id,QList<FieldItem *> _children) { children = _children; } CompositeItem::~CompositeItem() { } QRectF CompositeItem::boundingRect() const { //Not carefully thinked about it return QRectF(QPointF(-50,-150),QSizeF(250,250)); } void CompositeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget ) { FieldItem *child; foreach(child,children) { child->paint(painter,option,widget); } } QSizeF CompositeItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const { QSizeF itsSize(0,0); FieldItem *child; foreach(child,children) { // if its size empty set first child size to itsSize if(itsSize.isEmpty()) itsSize = child->sizeHint(Qt::PreferredSize); else { QSizeF childSize = child->sizeHint(Qt::PreferredSize); if(itsSize.width() < childSize.width()) itsSize.setWidth(childSize.width()); itsSize.setHeight(itsSize.height() + childSize.height()); } } return itsSize; } void CompositeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) { qDebug()<<"Test"; } My first question is how I can propagate context menu event to specific child. Picture on the above demonstrates one of my possible composite item. If you look on the code above you will see that I print "Test" when context menu event occurs. When I right click on the line symbol I see that "Test" message is printed. But when I right click on the signal symbol "Test" is not printed and I want it to be printed. My second question what cause this behaviour. How do I overcome this.

    Read the article

  • jQuery : add css class to menu item based on browser scroller position

    - by antosha
    Hi, I have a menu: <ul class="menu-bottom"> <li id="m1" class="active"><a id="1" href="#"><span>Link 1</span></a></li> <li id="m2"><a id="2" href="#"><span>Link 2</span></a></li> <li id="m3"><a id="3" href="#"><span>Link 3</span></a></li> </ul> I want that depending of browser's scroller position, the "active" class goes the correct < li element. This is how I see it : if ($(document).height() == 500) { $('#m1').parent().addClass('active'). siblings().removeClass('active'); } if ($(document).height() == 1000) { $('#m2').parent().addClass('active'). siblings().removeClass('active'); } if ($(document).height() == 1500) { $('#m2').parent().addClass('active'). siblings().removeClass('active'); } I am not very familiar with jQuery Dimensions properties so this code doesn't make much sense, but I hope you get the idea. If someone could tell me how to make this work, it would be really cool. Thanks :)

    Read the article

  • Dynamically populated NSPopUpButtonCell menu in an NSOutlineView

    - by Mo
    I’m working with an NSOutlineView which has two columns. My dataSource supplies the outline view with a tree of items of a custom class which represents file types (that is, you initialise it with a UTI). The first column is the display name of the file type (e.g., “Source code”, “Interface Builder NIB document”, etc.). The second column is an NSPopUpButtonCell which is supposed to allow the user to pick a handler for the given document type (think of Xcode’s “File Types” preference pane, and you’re pretty much there). I can generate an NSMenu for a given item in the tree, populated with options based upon the Launch Services database entries for the UTI, complete with the relevant application icon and and so on. In fact, the menu itself works wonderfully, populated by way of NSPopUpButtonCellWillPopUpNotification. The problem is, try as I might, the cell when the menu isn’t popped up always contains precisely one of two things: either an empty string, or the default text for the cell, the former if the result of -handlerName on the item (the attribute assigned to the column) is non-nil, the latter otherwise. Moreover, I’m manually calling -selectItem: on the NSPopUpButtonCell instance, which just seems Wrong. In contrast, the left-hand column, which is just an NSTextFieldCell, everything just works (although granted, all it’s got to do is read the value from the item and present it). (Disclaimer: I’m fairly new at Cocoa UI stuff; I know Objective-C, and lots of other programming languages, but I’ve not a huge amount of experience of building Mac OS X UIs, so be gentle).

    Read the article

  • Hook for adding new menu items,showing in wodpress header navbar not in admin menu?

    - by user1452376
    I want to add a new menu item by my plugin.I tried a lot but failed. What is the hook for creating a new items in the navbar menu?Please help. function add_new_item_in_nav_menu(){ ..... } action('init','add_new_item_in_nav_menu'); I know how to add the page by a hook function add_page2(){ global $user_ID; $new_page_title = 'abc'; $new_page_content = 'abc'; $new_page_template = ''; $page_check = get_page_by_title($new_page_title); $new_page = array( 'post_type' => 'page', 'post_title' => $new_page_title, 'post_content' => $new_page_content, 'post_status' => 'publish', 'post_author' => 1, ); if(!isset($page_check->ID)){ $new_page_id = wp_insert_post($new_page); if(!empty($new_page_template)){ update_post_meta($new_page_id, '_wp_page_template', $new_page_template); } } $homeSet = get_page_by_title( 'Home' ); update_option( 'page_on_front', $homeSet->ID ); update_option( 'show_on_front', 'page' ); } add_action( 'init', 'add_page2' );

    Read the article

  • Adding figures using contextual menu - Eclipse GEF

    - by darkie15
    All, I am creating a palette less eclipse plugin where am adding figures to the custom editor through the contextual menu, but am not finding a way to do it. Can anyone please guide me as to how to go about adding figures to editor dynamically through context menu i.e. adding actions/commands. Since Eclipse GEF plugin development finds so less examples to look at, I am adding my solution so others find it useful. This code helps to render a node to the editor. Source code for Action class to render figures to the editor: public class AddNodeAction extends EditorPartAction { public static final String ADD_NODE = "ADDNODE"; public AddNodeAction(IEditorPart editor) { super(editor); setText("Add a Node"); setId(ADD_NODE); // Important to set ID } public void run() { <ParentModelClass> parent= (<ParentModelClass>)getEditorPart().getAdapter(<ParentModelClass>.class); if (parent== null) return; CommandStack command = (CommandStack)getEditorPart().getAdapter(CommandStack.class); if (command != null) { CompoundCommand totalCmd = new CompoundCommand(); <ChildModelToRenderFigureCommand>cmd = new <ChildModelToRenderFigureCommand>(parent); cmd.setParent(parent); <ChildModelClass> newNode = new <ChildModelClass>(); cmd.setNode(newNode); cmd.setLocation(getLocation()); // Any location you wish to set to totalCmd.add(cmd); command.execute(totalCmd); } } @Override protected boolean calculateEnabled() { return true; } }

    Read the article

  • Adding select menu default value via JS?

    - by purpler
    Hi, i'm developing a meta search engine website, Soogle and i've used JS to populate select menu.. Now, after the page is loaded none of engines is loaded by default, user needs to select it on his own or [TAB] to it.. Is there a possibility to preselect one value from the menu via JS after the page loads? This is the code: Javascript: // SEARCH FORM INIT function addOptions(){ var sel=document.searchForm.whichEngine;for(var i=0;i<arr.length;i++){ sel.options[i]=new Option(arr[i][0],i)}} function startSearch(){ searchString=document.searchForm.searchText.value;if(searchString!=""){ var searchEngine=document.searchForm.whichEngine.selectedIndex; var finalSearchString=arr[searchEngine][1]+searchString;location.href=finalSearchString}return false} function checkKey(e){ var character=(e.which)?e.which:event.keyCode;if(character=='13'){ return startSearch()}} // SEARCH ENGINES INIT var arr = new Array(); arr[arr.length] = new Array("Web", "http://www.google.com/search?q="); arr[arr.length] = new Array("Images", "http://images.google.com/images?q="); arr[arr.length] = new Array("Knoweledge","http://en.wikipedia.org/wiki/Special:Search?search="); arr[arr.length] = new Array("Videos","http://www.youtube.com/results?search_query="); arr[arr.length] = new Array("Movies", "http://www.imdb.com/find?q="); arr[arr.length] = new Array("Torrents", "http://thepiratebay.org/search/"); HTML: <body onload="addOptions();document.forms.searchForm.searchText.focus()"> <div id="wrapper"> <div id="logo"></div> <form name="searchForm" method="POST" action="javascript:void(0)"> <input name="searchText" type="text" onkeypress="checkKey(event);"/> <span id="color"></span> <select tabindex="1" name="whichEngine" selected="Web"></select> <br /> <input tabindex="2" type="button" onClick="return startSearch()" value="Search"/> </form> </div> </body>

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >