Search Results

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

Page 77/1148 | < Previous Page | 73 74 75 76 77 78 79 80 81 82 83 84  | Next Page >

  • Click outside menu to close in jquery

    - by George
    So I have a drop-down menu that shows on a click, as per business requirements. The menu becomes hidden again after you mouse away from it. But now I am being asked to have it stay in place until user clicks anywhere on the document. How can this be accomplished? This is a simplified version of what I have now: $(document).ready(function() { $("ul.opMenu li").click(function(){ $('#MainOptSubMenu',this).css('visibility', 'visible'); }); $("ul.opMenu li").mouseleave(function(){ $('#MainOptSubMenu',this).css('visibility', 'hidden'); }); }); <ul class="opMenu"> <li id="footwo" class=""> <span id="optImg" style="display: inline-block;"> <img src="http://localhost.vmsinfo.com:8002/insight/images/options-hover2.gif"/> </span> <ul id="MainOptSubMenu" style="visibility: hidden; top: 25px; border-top: 0px solid rgb(217, 228, 250); background-color: rgb(217, 228, 250); padding-bottom: 15px;"> <li>some</li> <li>nav</li> <li>links</li> </ul> </li> </ul> I tried something like this $('document[id!=MainOptSubMenu]').click(function() thinking it would trigger on anything that wasnt the menu, but it didnt work.

    Read the article

  • Remove application entry from switch-app menu

    - by bdhar
    What am I trying to achieve? I am writing a windows-form based application in C# .NET 2.0. The application should behave like this: No form should be visible; just a system tray icon is the entire application. So, I have to hide the form during startup and make a NotifyIcon available in the system tray with a ContextMenuStrip attached to it. What have I done so far? I have created a Windows application with the default form's properties WindowState-Minimized and ShowInTaskbar-false. Added a NotifyIcon and attached a ContextMenuStrip to it. What's happening? The application starts as a system tray icon and the form is hidden. So far so good. But when I am working with other applications and when I switch between other application using the Alt-Tab combination in Windows, the application icon appears in the switch-application menu; and when I select my application, the form appears. What's expected? The application should not be available in the switch-application menu; because, the form is empty and there is no functionality attached to it. All that is needed is the system-tray icon. How to hide the application entry from the switch-application menu? Thanks.

    Read the article

  • InputManager ignores cut/copy/paste when initiated from menu

    - by Wallstreet Programmer
    I'm using the InputManager to check if changes to controls are done by user or code. This works fine, except when user uses the context menu for cut/copy/paste. If the user do ctrl+v in a textbox, InputManager correctly notices it. However, if the paste is done from the context menu of the textbox, the InputManager never fires the PreNotifyInput or PostNotifyInput events. Anyone knows why? Or how to detect that these user actions? Below is a working sample. The lower textblock never gets updated when user uses the cut/copy/paste menu in the above textbox since PreNotifyInput never fires. XAML: <Window x:Class="InputMgrDemo.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="300" Width="300"> <StackPanel> <TextBox TextChanged="TextBox_TextChanged" /> <TextBlock Name="_text" /> </StackPanel> </Window> Code behind: using System.Windows; using System.Windows.Controls; using System.Windows.Input; namespace InputMgrDemo { public partial class Window1 : Window { public Window1() { InitializeComponent(); InputManager.Current.PreNotifyInput += ((sender, e) => _userInput = true); InputManager.Current.PostNotifyInput += ((sender, args) => _userInput = false); } private void TextBox_TextChanged(object sender, TextChangedEventArgs e) { if (_userInput) { _text.Text = (sender as TextBox).Text; } } private bool _userInput; } }

    Read the article

  • using threads in menu options

    - by vbNewbie
    I have an app that has a console menu with 2/3 selections. One process involves uploading a file and performing a lengthy search process on its contents, whilst another process involves SQL queries and is an interactive process with the user. I wish to use threads to allow one process to run and the menu to offer the option for the second process to run. However you cannot run the first process twice. I have created threads and corrected some compilation errors but the threading options are not working correctly. Any help appreciated. main... Dim tm As Thread = New Thread(AddressOf loadFile) Dim ts As Thread = New Thread(AddressOf reports) .... While Not response.Equals("3") Try Console.Write("Enter choice: ") response = Console.ReadLine() Console.WriteLine() If response.Equals("1") Then Console.WriteLine("Thread 1 doing work") tm.SetApartmentState(ApartmentState.STA) tm.IsBackground = True tm.Start() response = String.Empty ElseIf response.Equals("2") Then Console.WriteLine("Starting a second Thread") ts.Start() response = String.Empty End If ts.Join() tm.Join() Catch ex As Exception errormessage = ex.Message End Try End While I realize that a form based will be easier to implement with perhaps just calling different forms to handle the processes.But I really dont have that option now since the console app will be added to api later. But here are my two processes from the menu functions. Also not sure what to do with the boolean variabel again as suggested below. Private Sub LoadFile() Dim dialog As New OpenFileDialog Dim response1 As String = Nothing Dim filepath As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) dialog.InitialDirectory = filepath If dialog.ShowDialog() = DialogResult.OK Then fileName = dialog.FileName ElseIf DialogResult.Cancel Then Exit Sub End If Console.ResetColor() Console.Write("Begin Search -- Discovery Search, y or n? ") response1 = Console.ReadLine() If response1 = "y" Then Search() ElseIf response1 = "n" Then Console.Clear() main() End If isRunning = False End Sub and the second one Private Shared Sub report() Dim rptGen As New SearchBlogDiscovery.rptGeneration Console.WriteLine("Tread Process started") rptGen.main() Console.WriteLine("Thread Process ended") isRunning = False End Sub

    Read the article

  • ASP menu is not showing

    - by LauzPT
    My web application menu isn't showing in any browser I use to test. I looked around and checked out if it wasn't the z-index bug mentioned here, that seems to have caused some trouble to many people. I'm wondering if I'm doing something wrong: <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" Orientation="Horizontal" /> </asp:Menu> I've got this as my SiteMap: <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode title="Pagina"> <siteMapNode url="Default.aspx" title="Home" description="Página Inicial" /> <siteMapNode url="Generos.aspx" title="Géneros" description="Géneros" /> <siteMapNode url="Artistas.aspx" title="Artistas" description="Artistas" /> <siteMapNode url="Musicas.aspx" title="Musicas" description="Músicas" /> <siteMapNode title="Admin" roles="Administrador"> <siteMapNode url="Admin/Musicas.aspx" title="Musicas"/> </siteMapNode> </siteMapNode> </siteMap> Any suggestions about what might be wrong? TIA

    Read the article

  • how to delete multiple folders,desktop and start menu shortcut using vbscript

    - by user1756858
    I never did any vbscript before, so i don't know if my question is very easy one. Following is the flow of steps that has to be done : Check if exist and delete a folder at c:\test1 if found and continue. If not found continue. Check if exist and delete a folder at c:\programfiles\test2 if found and continue. If not found continue. Check if a desktop shortcut and start menu shortcut exist and delete if found. If not exit. I could delete 2 folders with the following code: strPath1 = "C:\test1" strPath1 = "C:\test1" DeleteFolder strPath1 DeleteFolder strPath1 Function DeleteFolder(strFolderPath1) Dim objFSO, objFolder Set objFSO = CreateObject ("Scripting.FileSystemObject") If objFSO.FolderExists(strFolderPath) Then objFSO.DeleteFolder strFolderPath, True End If Set objFSO = Nothing But i need to run one script to delete 2 folders in different paths, 2 shortcuts one in start menu and one on desktop. I was experimenting with this code to delete the shortcut on my desktop: Dim WSHShell, DesktopPath Set WSHShell = WScript.CreateObject("WScript.Shell") DesktopPath = WSHShell.SpecialFolders("Desktop") on error resume next Icon = DesktopPath & "\sample.txt" Set fs = CreateObject("Scripting.FileSystemObject") Set A = fs.GetFile(Icon) A.Delete WScript.Quit It works fine for txt file on desktop, but how do i delete a shortcut for an application from desktop as well as start menu.

    Read the article

  • How do I center align horizontal <UL> menu?

    - by Steven
    I need to centre align a horizontal menu. I've tried various solutions, including the mix of inline-block / block / center-align etc., but not being successful. Can someone help me please? :) Here is my code: <div class="topmenu-design"> <!-- Top menu content: START --> <ul id="topmenu firstlevel"> <li class="firstli" id="node_id_64"><div><a href="#"><span>Om kampanjen</span></a></div></li> <li id="node_id_65"><div><a href="#"><span>Fakta om inneklima</span></a></div></li> <li class="lastli" id="node_id_66"><div><a href="#"><span>Statistikk</span></a></div></li> </ul> <!-- Top menu content: END --> </div> UPDATE I know how to center align the UL within the DIV. That can be accomplished using Sarfraz's suggestion. But the list items are still floated left within the UL. Do I smell javascript to accomplish this?

    Read the article

  • Network is going down once per day

    - by Charly
    Once per day the network on eth0 is going down and we need to do sudo ifdown eth0; sudo ifup eth0 to get the network up. Here is the syslog: Feb 11 12:48:01 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67 Feb 11 12:52:35 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67 Feb 11 12:56:23 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67 Feb 11 13:00:28 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67 Feb 11 13:04:29 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67 Feb 11 13:09:16 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67 Feb 11 13:13:53 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67 Feb 11 13:18:16 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67 Feb 11 13:22:25 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67 Feb 11 13:26:52 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67 Feb 11 13:30:44 www-tech-1 dhclient: DHCPREQUEST of address> on eth0 to 131.121.113.228 port 67 Feb 11 13:31:49 www-tech-1 dhclient: There is already a pid file /var/run/dhclient.eth0.pid with pid 3198 Feb 11 13:31:49 www-tech-1 dhclient: Listening on LPF/eth0/00:e0:81:49:fc:e0 Feb 11 13:31:49 www-tech-1 dhclient: Sending on LPF/eth0/00:e0:81:49:fc:e0 Feb 11 13:31:49 www-tech-1 dhclient: DHCPRELEASE on eth0 to 131.121.113.228 port 67 Feb 11 13:31:49 www-tech-1 dhclient: There is already a pid file /var/run/dhclient.eth0.pid with pid 134519072 Feb 11 13:31:50 www-tech-1 dhclient: Listening on LPF/eth0/00:e0:81:49:fc:e0 Feb 11 13:31:50 www-tech-1 dhclient: Sending on LPF/eth0/00:e0:81:49:fc:e0 Feb 11 13:31:52 www-tech-1 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 Feb 11 13:31:52 www-tech-1 dhclient: DHCPREQUEST of 131.121.14.17 on eth0 to 255.255.255.255 port 67 Feb 11 13:31:53 www-tech-1 kernel: [265383.991682] eth0: no IPv6 routers present Please check the last portion of this syslog. Can anybody help me?

    Read the article

  • WPF - Drag from withing DataTemplate

    - by Gustavo Cavalcanti
    I have a ListBox displaying employees with a DataTemplate - it looks very similar to this screenshot. I want to be able to click on the employee photo, drag it and drop it somewhere out of the ListBox. How can I do that? I am not sure how to capture the PreviewMouseLeftButtonDown event of the Image, since it's inside the DataTemplate. Edit: The DataTemplate lives in a separate assembly and the drag/drop logic needs to be in the Window that has the ListBox. Edit2: I am thinking that the right way of doing this is using commands, am I right? Thanks!

    Read the article

  • I just restarted Apache and now the server is down

    - by James
    I am pretty terrified right now. I'm scared I'm going to get a call in a couple minutes from a hundred people saying the website doesn't work. I was at the terminal changing some configuration files when I went to restart the server to update the .conf files with this command: /etc/init.d/apache2 graceful After I ran that, none of the websites work and I have no idea what to do. There are about 100 errors I am getting according to the log files. They all begin with "PHP Notice" and most relate to "use of undefined constant" Also, I just spoke with a coworker, describing what I did, and he noticed that there are two installations of apache on the server and that I restarted the one that we don't use. This is what the error log says (assuming it's the correct error log): [Wed Jan 05 11:52:06 2011] [notice] Graceful restart requested, doing restart Warning: DocumentRoot [/u/apps/staging/antetr/current/public/] does not exist [Wed Jan 05 11:52:08 2011] [warn] NameVirtualHost *:80 has no VirtualHosts (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs FINAL UPDATE: Ok, I fixed it. The problem was (as you experts facepalming probably know) that it couldn't access an error log in the directory I was working in. I created an empty error log file and tried the restart command again and now all the sites are back up... Though my original problem is still there.. Thanks to all those who offered advice, it really helped and let me breathe for a moment.

    Read the article

  • I just restarted Apache and now the server is down

    - by James
    I am pretty terrified right now. I'm scared I'm going to get a call in a couple minutes from a hundred people saying the website doesn't work. I was at the terminal changing some configuration files when I went to restart the server to update the .conf files with this command: /etc/init.d/apache2 graceful After I ran that, none of the websites work and I have no idea what to do. There are about 100 errors I am getting according to the log files. They all begin with "PHP Notice" and most relate to "use of undefined constant" Also, I just spoke with a coworker, describing what I did, and he noticed that there are two installations of apache on the server and that I restarted the one that we don't use. This is what the error log says (assuming it's the correct error log): [Wed Jan 05 11:52:06 2011] [notice] Graceful restart requested, doing restart Warning: DocumentRoot [/u/apps/staging/antetr/current/public/] does not exist [Wed Jan 05 11:52:08 2011] [warn] NameVirtualHost *:80 has no VirtualHosts (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs (2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log. Unable to open logs FINAL UPDATE: Ok, I fixed it. The problem was (as you experts facepalming probably know) that it couldn't access an error log in the directory I was working in. I created an empty error log file and tried the restart command again and now all the sites are back up... Though my original problem is still there.. Thanks to all those who offered advice, it really helped and let me breathe for a moment.

    Read the article

  • Tying down a cloud by virtualizing everything and then locking VMs to real hardware as necessary

    - by tudor
    I'm looking for a cloud software solution that: Can run on both server and desktop machines; Virtualizes hardware and has the option of exposing each real machine to the cloud; Allows a VM to be "locked" to a set of real hardware capabilities and stay there until moved (e.g. a user's "real" desktop); Allows a VM to link to some types of devices elsewhere (e.g. USB/serial via ethernet); and Is geography-aware to control movement of VMs between real networks. I'm aware that this may be the holy grail of virtualization, and I've searched alot. Some solutions appear to meet some criteria but not others. Most cloud implementations appear to ignore real hardware, for example. I realise that this may be solved by using three different implementations in combination: A standard cloud server farm. A bare-metal network backup utility with PXEBoot. VNC and/or VDI. (VNC obviously would require the real hardware to be running.) This combination, however, has some serious drawbacks that I'd like to solve by treating it as one system. My explanation follows... I have a network of real servers and desktops in multiple locations. I've virtualized servers before using Virtualbox and that's worked quite well. I've even connected USB devices to VMs on servers. I would like to virtualize the desktops in all my offices to facilitate movement of desktops, remote access (e.g. VDI) and bare-metal backups. However, I know that there are problems with this. For example, some desktops have specific hardware (e.g. 3D graphics cards, USB devices, etc) that limit their mobility. Geographic constraints also limit movement in that VMs can be moved easily within offices, but transferring between offices is not always preferable. What I would like to find is a system that can virtualize everything from bare-metal easily by maintaining an abstraction layer on each client and server machine that exposes the hardware available and runs as a cloud. Then certain VMs would be "locked" to specific hardware (so that, e.g. the VM runs only on their own desktop.) This would be required for situations where speed is important (e.g. 3D graphics pass-through). In addition, abstracted low-speed devices (e.g. USB) could be piped from real hardware to a VM in the cloud. This is important since if a VM is taken down, another VM can connect to the real hardware for minimum downtime.

    Read the article

  • Creating same-width hit-zones on MenuItems in ASP.NET 2.0 Menus that include MenuItems added at runt

    - by Cary Jensen
    In an ASP.NET 2.0 application, I want to permit a user to select a MenuItem, even if the user does not click the actual text of the MenuItem, but instead only clicks the highlight area that ASP.NET places around the currently selected MenuItem (represented by the DynamicHoverStyle.BackColor property). Since the BackColor is displayed the same width for each MenuItem in a submenu, based on MenuItem with the longest text, I would like to make the hit-zone (clickable area) of each sub-MenuItem the same width (same at the BackColor area), regardless of how much text is displayed in the in each individual sub-MenuItem. Here's the setup. I am using a Menu on a MasterPage to display a similar menu on each of my pages. Some of the pages suppress this menu, and some of them add addition MenuItems, sometimes to the top level, sometimes adding sub-MenuItems to an existing top-level MenuItem, and sometimes both (adding a MenuItem to the top level and then additional MenuItems as submenuitems to that newly added top level. This menu has a horizontal orientation, and it is dynamic, in that only the top level is initially exposed, and the submenus are displayed when selected. During usability testing, we noticed that users would select a top-level menu item to expose the submenu, and then select a submenu item, but not by necessarily clicking on the submenu item text, but instead clicking on the BackColor area of the submenu item. Since the text of some MenuItems are longer than others, MenuItems with short Text have a rather large BackColor area. When the user clicks on the BackColor area, but not directly on the MenuItem Text, nothing happens, since the user didn't actually click on the submenu item hit zone. Although there are visual cues as to what part of the displayed MenuItem is clickable (the mouse pointer changes to a link cursor when the mouse is positioned on the MenuItem Text, but not when it is only hovering over the BackColor), this behavior confused the users. They highlighted a MenuItem, and clicked it, but nothing happened. I would to make clicking a MenuItem successful, even if the user did not click on the actual Text of the MenuItem, but simply click on the BackColor area. It seems like there should be a property somewhere to control the width of the active area of the displayed MenuItems, but I do not see it. Any suggestions, given that I am creating some of these MenuItems at runtime?

    Read the article

  • DragDrop registration did not succeed in Setup Project

    - by rodnower
    Hello, we have some installation project in Visual Studio solution (Other project types - Setup and deployment - Setup project). This project have other library type project with Installation class named InstallationCore like project output. In user action I call to Install and Uninstall functions of installer of InstallationCore. InstallationCore has windows forms for interaction with user. There, in forms, I use Drag and Drop functionality for Drag and Drop text from Tree View to Text Box. But in line: txbUserName.AllowDrop = true; I get error of JIT debugger: Unhandled exception has occured DragDrop registration did not succeed System.InvalidOperationException: DragDrop registration did not succeed And long stack trace after that. Important to say, that when I run Installer function from test project the error did not occur and all work fine. Error occurs only when I run the .msi package. Any suggestions? Thank you for ahead.

    Read the article

  • How can I get jQuery UI's Draggable and Sortable functions to work on the iPhone?

    - by Damovisa
    I have a page that uses JQuery UI; in particular the Sortable interaction. The page works fine for desktop web browsers with mice, however I can't get the drag-drop functionality to work on Mobile Safari on the iPhone. Any dragging action simply scrolls the page. The functionality on my page is extremely similar to the Sortable Empty-Lists demo on the JQuery UI site. This page also doesn't work on the iPhone. Is there any way to get the drag-drop functions working on the iPhone?

    Read the article

  • How to trigger a postback using JQuery Droppable plugin ?

    - by Sandeep K Ram
    Hi, This is my script for the draggable and droppable <script type="text/javascript"> $(function() { $(".Source li").draggable({ appendTo: "body", helper: "clone", revert: "invalid" }); $(".Destination ").droppable({ activeClass: "ui-state-default", hoverClass: "ui-state-hover", accept: ".Source li", drop: function(event, ui) { $(this).find(".placeholder").remove(); $("#Hf1").val(ui.draggable.text()); $("#TxtItemId").val($("#Hf1").val()); } }); }); </script> Now I want to access the value of the "TxtItemId" control in the code-behind through a postback. How do I go about doing this ? BTW, this is for a scenario where a person will drag an item from a panel into a shopping cart and I need to capture the Id of the dropped item and trigger a postback after the drop to update the quantity of that item in the cart.

    Read the article

  • Opting out of `dragenter` and `dragover` events (html5)

    - by aaaidan
    I have a collection of draggable "content" elements, and a root-level "feedback" UI element which is displayed above them to provide feedback during drag and drop. The problem is, during the drag operation, hovering over the "feedback" element causes the dragenter and dragover events to be fired on that element, rather than the underlying content element. It effectively "blocks" the dragenter event from firing on the correct element. Is there a way for an element to cancel, or "opt out" of a dragenter/dragover event? I could display the feedback element underneath the content, but I'd rather not do that. jsFiddle: http://jsfiddle.net/jact8/1/ I'm using the HTML drag/drop api, not jQuery or anything like that.

    Read the article

  • Rails migrations: Undo default setting for a column

    - by wulfovitch
    Hi Stack Overflow Community! I have the problem, that I have an migration in Rails that sets up a default setting for a column, like this example: def self.up add_column :column_name, :bought_at, :datetime, :default => Time.now end Suppose, I like to drop that default settings in a later migration, how do I do that with using rails migrations? My current workaround is the execution of a custom sql command in the rails migration, like this: def self.up execute 'alter table column_name alter bought_at drop default' end But I don't like this approach, because I am now dependent on how the underlying database is interpreting this command. In case of a change of the database this query perhaps might not work anymore and the migration would be broken. So, is there a way to express the undo of a default setting for a column in rails? Thanks in advance!

    Read the article

  • Android: chronometer widget and layout() method could not work well at the same time

    - by Lennard
    I write a test android app, in which there are only two views, a chronometer and a imageview. Using the layout() method of the imageview to dynamically change the position of it, I wish to implement drag-and-drop effect. It does work. However, each time the chronometer ticks, the imageview is always reverted to its original position, which seems that the whole screen is reloaded from the layout xml. So, does anybody know how to prevent the imageview from reverting to the original place, and let chronometer and drag-and-drop effect coexist? Thx

    Read the article

  • Drop down menus and pathetic art of styling

    - by fmz
    Sorry folks, I must be brain-dead or something but I can't get the styling on these drop-down menus to cooperate. I have the color and the font right, but I have unwanted spaces between the list elements and the a and the a:hover sizes should be the same. I would appreciate some help getting this to work correctly. Here is the page Here is the html: <ul class="dropdown"> <li><a href="#" id="home">Home</a></li> <li><a href="#" id="about">About Us</a> <ul class="sub-menu"> <li><a href="#">Our History</a></li> <li><a href="#">Our Process</a></li> <li><a href="#">Portfolio</a></li> <li><a href="#">Financing</a></li> <li><a href="#">Testimonials</a></li> <li><a href="#">Subcontractors</a></li> </ul> </li> <li><a href="#" id="personal">Personal Banking</a></li> <li><a href="#" id="commercial">Commercial Banking</a></li> <li><a href="#" id="service">Customer Service</a> <ul class="sub-menu"> <li><a href="#">Our History</a></li> <li><a href="#">Our Process</a></li> <li><a href="#">Portfolio</a></li> <li><a href="#">Financing</a></li> <li><a href="#">Testimonials</a></li> <li><a href="#">Subcontractors</a></li> </ul> </li> <li><a href="#" id="investors">Investor Relations</a></li> <li><a href="#" id="contact">Contact Us</a></li> Here is the CSS: ul.dropdown { position: relative; background: #4e8997; height: 40px; padding-left: 5px; } ul.dropdown li { float: left; zoom: 1; } ul.dropdown li a ul.dropdown li a:visited { display: block; margin-top: 5px; padding: .5em .6em; line-height: 16px; color: #fff; font: bold 14px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; text-transform: uppercase; border: none; } ul.dropdown a:hover { background-color: #c29c5d; color: #fff; } ul.dropdown a:active { background-color: #c29c5d; color: #fff; } /* LEVEL TWO */ ul.dropdown ul { padding-left: 0; width: 200px; display: none; top:36px; margin-left: 0; position: absolute; } ul.dropdown ul li { font: 10px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; border-bottom: 1px solid #ccc; display: block; margin: 0; padding: 0; float: none; color: #fff; background-color: #c29c5d; } ul.dropdown ul li a:link { display: block; font-size: 10px; width: 188px; height: 16px; } ul.dropdown ul li a:hover { background-color: #a2834d; color: #fff; } Thanks!

    Read the article

  • DNS Issue Windows 2003 AD-The server holding the PDC role is down

    - by Dave M
    Our network of Windows 2003 and Windows 2008 servers suddenly hasDNS issues. There are 7 DCs. Two at our main office and one each at branch sites (one branch has two a 2008R2 and WIN2K3) Only two are WIN2008R2 Running DCDIAG on the WIN2K3 at main site (DC1) reports no issues. Running at any branch site reports two issues All other test pass. The server DC1 can be PINGed by name from any site Starting test: frsevent There are warning or error events within the last 24 hours after the SYSVOL has been shared. Failing SYSVOL replication problems may cause Group Policy problems. Starting test: FsmoCheck Warning: DcGetDcName(PDC_REQUIRED) call failed, error 1355 A Primary Domain Controller could not be located. The server holding the PDC role is down. Netdom.exe /query DC reports the expected servers. netdom query fsmo This reports the server at the main office holds the following roles: * Schema owner Domain role owner PDC role RID pool manager Infrastructure owner In the DNS management snap-in, DC1 appears as DNS server but does not appear in _msdcs-dc-_sites-Default-First-Site-Name-_TCP There is no _ldap or –kerberos record pointing to DC1 Same issue msdcs-dc-_sites- -_TCP Again there is no _ldap or –kerberos record pointing to DC1 Under Domain DNS Zones there is no entry for the server. This is the case for any _tcp folder in the DNS. The server DC1 appears correctly as a name server in the Reverse Lookup Zone. There is a Host(A) record for DC1 but in the Forward Lookup Zone there is no (same as parent folder) Host(A) for the DC1 server but such an entry exists for the other DCs at branch sites and the other DC at the main office. We have tried stopping and starting the netlogon service, restarting DNS and also dcdiag /fix. Netdiag reports error: Trust relationship test. . . . . . : Failed [FATAL] Secure channel to domain 'XXX' is broken. [ERROR_NO_LOGON_SERVERS] [WARNING] Failed to query SPN registration on DC- One entry for each branch DC All braches lsit the problem server and it can be Pinged by name from any branch Fixing is number one priority but also would like to determine the casue.

    Read the article

  • Changing Dropdown based on Other Dropdown Menu

    - by Shaded
    I've seen a few questions like this, but mine is a bit more specific so I hope this isn't considered a repost. I am working on a website that is built with struts 2 and hibernate. I need to dynamically populate a drop down menu using data from a sql query based on an option selected in another drop down menu. So basically when the first option is selected I need to rehit the server and get the results from a query like SELECT column FROM table WHERE option = dropDownOption On top of that, I would really like to use ajax to only refresh the affected elements, however I'm really unfamiliar with ajax. I have jquery on this project and I found they have some ajax built in, but is this a good method for using it? any advice on this topic would be appreciated.

    Read the article

  • Drop down of Superfish Menu appear under Smart Slide Show in wordpress

    - by oscar
    Hi, I spent almost my entire Saturday trying to solve this problem and have not had success. Firefox works well, but in IE8 and Chrome, the dropdown menu appears below the Smart Slide Show (Flash). Please could someone help me? the link to the page: http://www.institutoforlanini.com.br/novosite This is the code of the index: <?php get_header (); ?> <div id=conteiner> <div id=content> <div id="slider"> php echo do_shortcode ('[smart_slide_show ]');?> </ div> </div> </div> <! - End of content div -> <?php get_sidebar ();?> <?php get_footer ();?>

    Read the article

  • clearTimeout not working as expected

    - by user543314
    Javascript sliding menu stay open. clearTimeout not working as expected -can you help me please <html> <head> <style> #Menu1 {position:absolute; top:-190px; left:150px; font-size:15px;visibility:visible; background-color:#D0BCFE; width:114px;z-index:0;border-style:solid; } #Menu2 {position:absolute; top:-190px; left:580px; font-size:15px;visibility:visible; background-color:#D0BCFE; width:114px;z-index:0;border-style:solid; } #Menu3 {position:absolute; top:-190px; left:1005px; font-size:15px;visibility:visible; background-color:#D0BCFE; width:114px;z-index:0;border-style:solid; } TD.TDHREFMENUS{font-size:20;color:red;position:relative;z-index:0;background-color:#C4ABFE;border-style:solid;width:114px;} </style> <script> var stopUp=null; var stopDown=null; var mov=-143; var on; function down(id){ if (!on){ on=true; clearTimeout(stopUp) stopUp=null; } var obj=document.getElementById(id) obj.style.top=mov +"px"; if (mov <=27){ mov+=2; stopDown=setTimeout(function (){ down(id) }, 20) } } function up(id){ if (on){ on=false; clearTimeout(stopDown) stopDown=null; } var obj=document.getElementById(id) obj.style.top=mov +"px"; if (mov >=-143){ mov-=2; stopUp=setTimeout(function(){ up(id)}, 20); } } </script> </head> <body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0> <div id="Menu1" onmouseover="down('Menu1')" onmouseout="up('Menu1')"> URL 1<br> URL 2<br> URL 3<br> URL 4<br> URL 5<br> URL 6<br> URL 7<br> URL 8<br> </div> </div> <div id="Menu2" onmouseover="down('Menu2')" onmouseout="up('Menu2')"> URL 1<br> URL 2<br> URL 3<br> URL 4<br> URL 5<br> URL 6<br> URL 7<br> URL 8<br> </div> </div> <div id="Menu3" onmouseover="down('Menu3')" onmouseout="up('Menu3')"> URL 1<br> URL 2<br> URL 3<br> URL 4<br> URL 5<br> URL 6<br> URL 7<br> URL 8<br> </div> </div> <TABLE cellSpacing=0 cellPadding=0 BORDER=1 WIDTH=100%> <TBODY> <TR> <TD align=middle CLASS="TDHREFMENUS"><span onmouseover="down('Menu1')" onmouseout="up('Menu1')">MENU 1</span> </TD> <TD align=middle CLASS="TDHREFMENUS"><span onmouseover="down('Menu2')" onmouseout="up('Menu2')">MENU 2</span> </TD> <TD align=middle CLASS="TDHREFMENUS"><span onmouseover="down('Menu3')" onmouseout="up('Menu3')">MENU 3</span> </TD> </TR> </TBODY> </TABLE> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <html> <head>

    Read the article

  • NSIS- Error handling

    - by Pia
    I have written an installer and uninstaller in NSIS which creates and drops an sql database, which is working fine. I have written some .bat and .sql files to create and drop the database and then just call these files from NSIS script. My problem is if I keep this database open in SQL Server Management Studio and run the uninstaller ideally it should give an error message that the database is opened. In my case it shows the success message of uninstaller but dosnt drop the database properly. How can I handle this error in NSIS?

    Read the article

< Previous Page | 73 74 75 76 77 78 79 80 81 82 83 84  | Next Page >