Search Results

Search found 13104 results on 525 pages for 'malcolm box'.

Page 20/525 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Dedicated Mouse and Keyboard on Virtual Box VM

    - by Myersguy
    To all super users, Currently I am trying to run virtual box on my second monitor, with a dedicated mouse and keyboard. However, doing so has not proven easy. There has been times where the mouse works, but not the keyboard, vice versa, or nothing works at all. The biggest problem I am running into is this: When enabling the USB mouse and keyboard from the VM, I get an error: 'USB Device is busy with a previous request.' The only thing that is using second mouse and keyboard, however, is Windows. The other error I have received stated that the VM was unable to create a proxy for the device. Additionally, the VM occasionally will disable the secondary keyboard entirely, requiring me to unplug and replug it into my PC to re-enable it again. Keyboard auto-capture is disabled, and while a solution I was reading online stated to turn off mouse integration, that option is grayed out on my machine. Any help would be appreciated. Thanks. /firstquestion.

    Read the article

  • Wi-Fi won't automatically connect (box in Windows configuration gets unchecked)

    - by greg88
    The checkbox that says "Use windows to configure my wireless network settings" keeps getting unchecked (Wirless Network Connection - Change advanced settings - Wireless networks tab.) How do I stop that from happening? (So the wi-fi will reconnect.) When I manually re-check the box, it automatically connects.) I have a D-Link AirPremier DWL-G550 PCI adapter. I installed the newest driver, 5.3.0.46, and that didn't solve the problem. I took the "Atheros Client Utility" (the program window says "D-Link AirPremier Client Utility" when you run it) out of the start menu, rebooted, and that didn't solve the problem. (That utility puts a signal bar similiar to the one MS Windows puts there, and it's gone now.) The D-Link client utility has an option to automatically connect to preferred networks, but it is greyed out. It is also greyed out if I install the driver and utility right off the D-Link installation CD, so the problem isn't that the utility and driver are incompatible versions. I want to use Windows to handle the connection anyway, as the D-Link utility is garbage. Windows XP SP3 w/all current updates.

    Read the article

  • Gentoo box can't cURL or ping after restarting net.eth1

    - by Curlybraces
    Hi all, the following is completely baffling me. We currently have a gentoo box which acts as our LAMP, DNS, DHCP server. This is assigned a static IP on the network. This server is connected directly to the internet via a BT BusinessHub Router. The server is also connected to a patch panel/switch port which connects the remaining office (around 10 PC's) to the server. Everything has been plain sailing until the other day when the server was restarted. For some reason now only portions of network accessibility is available depending on which ethernet device was last restarted. Restarting net.eth0 allows the office server to cURL, ping, etc but stops all networked PC's from accessing the internet. Then restarting net.eth1 restores all internet to the network but stops the server from curling, pinging, etc again. However, even when the server can't ping, curl, etc, I can still remote SSH and remote MySQL connect from the server command line to other external servers that we own. Here's my route map (router is 192.168.1.254): Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth1 Here's my /etc/conf.d/net: iface_eth0="192.168.1.99 broadcast 192.168.1.255 netmask 255.255.255.0" iface_eth1="dhcp" None of the above have ever been changed however. Things have just ceased to operate correctly, which makes me think it's a freshly added Iptables rule. Here's the Iptables Filter table: Chain INPUT (policy ACCEPT) target prot opt source destination DROP tcp -- ##.##.##.## anywhere tcp dpt:ssh ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere tcp dpt:2199 ACCEPT tcp -- anywhere anywhere tcp dpt:3199 ACCEPT tcp -- ##.###.###.## anywhere tcp dpt:http ACCEPT tcp -- ###.###.##.## anywhere tcp dpt:2199 ACCEPT tcp -- ##.###.###.### anywhere tcp dpt:http ACCEPT tcp -- ##.###.##.## anywhere tcp dpt:http ACCEPT tcp -- ##.###.###.### anywhere tcp dpt:3128 ACCEPT udp -- ##.###.###.### anywhere udp dpt:3128 ACCEPT tcp -- ##.###.###.### anywhere tcp dpt:http ACCEPT tcp -- ##.###.###.### anywhere tcp dpt:https Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere ##.###.###.## DROP all -- anywhere ##.###.###.## ACCEPT all -- anywhere anywhere state NEW,ESTABLISHED Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT udp -- anywhere anywhere udp spt:2199 ACCEPT udp -- anywhere anywhere udp spt:4817 ACCEPT udp -- anywhere anywhere udp spt:4819 ACCEPT udp -- anywhere anywhere udp spt:3199 Help gratefully appreciated.

    Read the article

  • displaying images in a list box so the image resizes based on parent container

    - by MikeU
    I have an expander with a list box in it that displays image thumbnails. I want the images to be sized according to the size of the listbox and the list box to be sized based on the width of the expander. When I expand the expander I want the list box and the images to resize also. Does anyone know how I can accomplish this? <Expander Style="{DynamicResource ExpanderStyle}" Name="pictureExpander" IsExpanded="True" ExpandDirection="Left" Collapsed="pictureExpander_Collapsed" Expanded="pictureExpander_Expanded" Grid.Column="4"> <ListBox Name="photoList" ItemsSource="{Binding Source={StaticResource PhotoBin}}" IsSynchronizedWithCurrentItem="True" HorizontalAlignment="Stretch" ScrollViewer.CanContentScroll="False"> <ListBox.ItemContainerStyle> <Style TargetType="{x:Type ListBoxItem}"> <Style.Resources> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Yellow" /> </Style.Resources> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="BorderBrush" Value="Black"/> <Setter Property="BorderThickness" Value="5"/> </Trigger> </Style.Triggers> </Style> </ListBox.ItemContainerStyle> <ListBox.ItemTemplate> <DataTemplate> <Image Source="{Binding FileLocation}" Margin="0,5" HorizontalAlignment="Stretch" MouseLeftButtonDown="DragImage" /> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Expander>

    Read the article

  • Get most left|right|top|bottom point contained in box

    - by skyman
    I'm storing Points Of Interest (POI) in PostgreSQL database, and retrieve them via PHP script to Android application. To reduce internet usage I want my mobile app to know if there are any points in the neighborhood of currently displayed area. My idea is to store bounds of the rectangle containing all points already retrieved (in other words: nearest point on the left (West) of most west already retrieved, nearest point above (North) of most north already retrieved etc.) and I will make next query when any edge of screen goes outside of this bounds. Currently I can retrieve points which are in "single screen" (in the area covered by currently displayed map) using: SELECT * FROM ch WHERE loc <@ (box '((".-$latSpan.", ".$lonSpan."),(".$latSpan.", ".-$lonSpan."))' + point '".$loc."') Now I need to know four most remote points in each direction, than I will be able to retrieve next four "more remote" points. Is there any possibility to get those points (or box) directly from PostgreSQL (maybe using some "aggregate points to box" function)?

    Read the article

  • Dynamically add event to custom control (Confirm Message Box)

    - by Nyein Nyein Chan Chan
    I have created a custom cofirm message box control and I created an event like this- [Category("Action")] [Description("Raised when the user clicks the button(ok)")] public event EventHandler Submit; protected virtual void OnSubmit(EventArgs e) { if (Submit != null) Submit(this, e); } The Event OnSubmit occurs when user click the OK button on the Confrim Box. void IPostBackEventHandler.RaisePostBackEvent(string eventArgument) { OnSubmit(e); } Now I am adding this OnSubmit Event Dynamically like this- In aspx- <my:ConfirmMessageBox ID="cfmTest" runat="server" ></my:ConfirmMessageBox> <asp:Button ID="btnCallMsg" runat="server" onclick="btnCallMsg_Click" /> <asp:TextBox ID="txtResult" runat="server" ></asp:TextBox> In cs- protected void btnCallMsg_Click(object sender, EventArgs e) { cfmTest.Submit += cfmTest_Submit;//Dynamically Add Event cfmTest.ShowConfirm("Are you sure to Save Data?"); //Show Confirm Message using Custom Control Message Box } protected void cfmTest_Submit(object sender, EventArgs e) { txtResult.Text = "User Confirmed";//I set the text to "User Confrimed" but it's not displayed txtResult.Focus();//I focus the textbox but I got Error } The Error I got is- System.InvalidOperationException was unhandled by user code Message="SetFocus can only be called before and during PreRender." Source="System.Web" So, when I dynamically add and fire custom control's event, there is an error in Web Control. If I add event in aspx file like this, <my:ConfirmMessageBox ID="cfmTest" runat="server" OnSubmit="cfmTest_Submit"></my:ConfirmMessageBox> There is no error and work fine. Can anybody help me to add event dynamically to custom control? Thanks.

    Read the article

  • How to display text outside of the box of <div></div>

    - by Steven
    <div class="signup"> <div>Tenxian ???????????</div><br/> </div> <br/><br/><br/><br/><br/><br/> <div align="center">@2009 Tenxian &nbsp;&nbsp;???? </div><br/> <div align="center"><a href="/en/bidding/index.php">Tenxian·English</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="/cn/bid/index.php">??·??</a></div><br/><br/> .signup { border: 1px solid #99CCFF; position: absolute; width: 700px; height:450px; left: 50px; right: auto; font-family: Arial, Helvetica, sans-serif; font-size: 13px; } The problem is that @2009 Tenxian ???? Tenxian·English ??·?? is displayed in the box of <div class="signup"></div>, how to display it out of the box of <div class="signup"></div>? I want to display @2009 Tenxian ???? Tenxian·English ??·?? at the bottom of a web page and outside of the box of <div class="signup"></div> . How to do it?

    Read the article

  • Databinding problem in dropdownlist box by generics in C#

    - by sakir-ali
    I want to implement stack in my program by Genericx. I have a textbox and button to add elements in stack, a dropdownlist box and a button to bind total stack in dropdownlist box. I have generic class and the code is below: [Serializable] public class myGenClass<T> { private T[] _elements; private int _pointer; public myGenClass(int size) { _elements = new T[size]; _pointer = 0; } public void Push(T item) { if (_pointer > _elements.Length - 1) { throw new Exception("Stack is full"); } _elements[_pointer] = item; _pointer++; } public T Pop() { _pointer--; if (_pointer < 0) { throw new Exception("Stack is empty"); } return _elements[_pointer]; } public T[] myBind() { T[] showall = new T[_pointer]; Array.Copy(_elements,showall, _pointer); T[] newarray = showall; Array.Reverse(showall); return showall; } } and my .cs page is below: public partial class _Default : System.Web.UI.Page { myGenClass<int> mystack = new myGenClass<int>(25); protected void Button1_Click(object sender, EventArgs e) { mystack.Push(Int32.Parse(TextBox1.Text)); //DropDownList1.Items.Add(mystack.Pop().ToString()); TextBox1.Text = string.Empty; TextBox1.Focus(); } protected void Button2_Click(object sender, EventArgs e) { //string[] db; //db = Array.ConvertAll<int, string>(mystack.myBind(), Convert.ToString); DropDownList1.DataSource = mystack.myBind(); DropDownList1.DataBind(); } } but when I bind the datasource property of dropdownlist box to generic type return array (i.e. myBind()), it shows empty... Please help..

    Read the article

  • Drop Down Box and other stuff in ASP.NET with VB.NET (VS 2008)

    - by typoknig
    Hi all, I am trying to polish up a program a program that I have converted from a Windows Form in to an ASP.NET Web Application. I have several questions: 1.) I have a drop down box where users can select their variables, but users can also enter their variables manually into various text fields. What I want is for the drop down box to show a string like "Choose Variables" when ever the user enters their variables manually. I want this to happen without having to reload the page. 2.) In the Windows Form version of this application I had a RichTextBox that populated with data (line by line) after a calculation was made. I used "AppendText" in my Windows Form, but that is not available in ASP.NET, and neither is the RichTextBox. I am open to suggestions here, I tried to use just a text box but that isn't working right. 3.) In my Windows Form application I was using "KeyPress" events to prevent incorrect characters from being entered into the text fields. My code for these events looked similar to this: Private Sub TextBox_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox.KeyPress If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> ControlChars.Back AndAlso e.KeyChar <> "." Then e.Handled = True End If End Sub How can I make this work again... also without reloading the page. 4.) This is not a major issue, but I would like all of the text to be selected when the cursor enters a field. In my Windows Form application I used "SelectAll", but again, that is not available in ASP.NET Thanks in advanced.

    Read the article

  • Adding a selection box into an ItemsControl?

    - by Jens
    I have a WPF ItemsControl with a Canvas ItemPanel. Drawing from an internal source, it displays lots of automatically generated Rectangles. As of now, it looks like this: <Window // .. NameSpaces > <Window.Resources> <DataTemplate x:Key="binTemplate"> <Rectangle x:Name="Rect" VerticalAlignment="Bottom" Canvas.Left="10" StrokeThickness="0"> // .. Databinding Height, Width, etc </Rectangle> </DataTemplate> </Window.Resources> <DockPanel x:Name="LayoutRoot" LastChildFill="True"> <ItemsControl ItemsSource="{Binding Bins}" ItemTemplate="{StaticResource binTemplate}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <Canvas MouseDown="Canvas_MouseDown" MouseMove="Canvas_MouseMove" MouseUp="Canvas_MouseUp"> <Rectangle x:Name="Selection" Canvas.Left="0" Canvas.Top="0" Visibility="Hidden" /> </Canvas> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </DockPanel> </Window> I now try to implement a selection box, too.. well.. select my Rectangles. =) I tried just adding the box into the ItemsControl PanelTemplate, and controlling it with the Canvas mouse events, but it appears I am not allowed to do so. The error message is "Cannot explicitly modify Children collection of Panel used as ItemsPanel for ItemsControl. ItemsControl generates child elements for Panel." What is the preferred way to implement such behavior? I thought about overlaying another canvas (using negative Margin) and drawing the selection box in there, but that seems like a bad hack. Thanks in advance!

    Read the article

  • Text box loses focus when DIV is hovered

    - by Konoplianko
    Hello. I have a problem: When I enter a text into suggestion text box, popup panel appears. But when user places mouse over this popup panel with suggestions - text box loses focus. What should I do to prevent losing focus ? Example which have the same behaviour: http://demo.raibledesigns.com/gwt-autocomplete/ Thanks for any help. Update 1 SuggestionMenu which is being shown is extending MenuBar which sets focus for all menu items. void itemOver(MenuItem item, boolean focus) { if (item == null) { // Don't clear selection if the currently selected item's menu is showing. if ((selectedItem != null) && (shownChildMenu == selectedItem.getSubMenu())) { return; } } // Style the item selected when the mouse enters. selectItem(item); if (focus) { focus(); } // If child menus are being shown, or this menu is itself // a child menu, automatically show an item's child menu // when the mouse enters. if (item != null) { if ((shownChildMenu != null) || (parentMenu != null) || autoOpen) { doItemAction(item, false); } } } It's clear that i cant fix loosing focus. Now question is - how to make on pressing backspace or any key to focus on edit box? Thanks in advance

    Read the article

  • Confirm box always displays first (javascript, jQuery, .Net)

    - by Jan-Frederik Carl
    Hello, I have a jQuery-Script to accomplish the following tasks: if a gridview in my form contains a row with a certain id, it has to be marked red. a confirm dialogue has to pop up to ask the user if he wants to do this or that. I built this code: if (response == "EntryInList") { $('#entryListContainer div table tbody tr').each(function() { if ($(this).attr('id') == 'entry_' + $('#<%= txtProductNumber.ClientID %>').val()) { $(this).css("color", "red"); } } ); if (!confirm("Entry already exists. Really overwrite?")) { jQuery('#<%= txtProductNumber.ClientID %>').val(''); jQuery('#<%= txtCount.ClientID %>').val(''); jQuery('#<%= txtProductNumber.ClientID %>').focus(); return false; } } As a result, the confirm box pops up first, without the row being turned red. Only after using the box, it becomes red. How would I get the row to be turned red at once? Another of my problems is that the confirm box denies my page to be scrolled down. But I would like to do this if the gridview is longer than the entire page.

    Read the article

  • What should I do with an over-bloated select-box/drop-down

    - by Tristan Havelick
    All web developers run into this problem when the amount of data in their project grows, and I have yet to see a definitive, intuitive best practice for solving it. When you start a project, you often create forms with tags to help pick related objects for one-to-many relationships. For instance, I might have a system with Neighbors and each Neighbor belongs to a Neighborhood. In version 1 of the application I create an edit user form that has a drop down for selecting users, that simply lists the 5 possible neighborhoods in my geographically limited application. In the beginning, this works great. So long as I have maybe 100 records or less, my select box will load quickly, and be fairly easy to use. However, lets say my application takes off and goes national. Instead of 5 neighborhoods I have 10,000. Suddenly my little drop-down takes forever to load, and once it loads, its hard to find your neighborhood in the massive alphabetically sorted list. Now, in this particular situation, having hierarchical data, and letting users drill down using several dynamically generated drop downs would probably work okay. However, what is the best solution when the objects/records being selected are not hierarchical in nature? In the past, of done this with a popup with a search box, and a list, but this seems clunky and dated. In today's web 2.0 world, what is a good way to find one object amongst many for ones forms? I've considered using an Ajaxifed search box, but this seems to work best for free text, and falls apart a little when the data to be saved is just a reference to another object or record. Feel free to cite specific libraries with generic solutions to this problem, or simply share what you have done in your projects in a more general way

    Read the article

  • Inline text box labels with WPF

    - by Douglas
    I'm trying to reproduce the layout of some paper forms in a WPF application. Labels for text boxes are to be "inline" with the content of the text boxes, rather than "outside" like normal Windows forms. So, with an Xxxxxx label: +-----------------------------+ | Xxxxxx: some text written | | in the multiline input. | | | | another paragraph continues | | without indentation. | | | | | +-----------------------------+ The Xxxxxx cannot be editable, if the user selects all the content of the text box, the label must remain unselected, I need to be able to style the text colour/formatting of the label separately, when there is no text in the text box, but it has focus, the caret should flash just after the label, and I need the baselines of the text in the text box and the label to line up. One solution I tried was putting a textblock partially over the input, then using text indent to indent the editable text, though this caused problems with following paragraphs, since they were indented too. I'm not sure how to indent just the first paragraph. It required some fiddling to get the text to line up - a more reliable setup would be ideal. So, any suggestions on how to set this up? Thanks

    Read the article

  • Wrong values reported by pyPDF for various box regions

    - by romor
    Using pyPdf, for most files I get matched results concerning various box's dimensions compared to what Acrobat reports. However for some files I get different values reported by pyPdf and Acrobat, like: pyPdf: artBox: 595.3 x 841.9 bleedBox: 595.3 x 841.9 cropBox: 595.3 x 841.9 trimBox: 517.3 x 754 Acrobat: artBox: 439.35 x 666.13 pt bleedBox: 439.35 x 666.13 pt cropBox: 439.35 x 666.13 pt trimBox: 439.35 x 666.13 pt I thought it's units issue, but then ratio between widths and heights doesn't match also, not mentioning trimBox mismatch Correct results are those reported by Acrobat of course. Does someone know why is this and is there a way I get correct dimensions by using pyPdf? Thanks couple of minutes later... After reading this question: Are PDF box coordinates relative or absolute? I figured I didn't considered uper left corner to be different then 0 (zero). It turned out that box starts at 77.95 x 87.87, so if we reduce reported values of trimBox by this values correct result is obtained. artBox: 0 x 0 bleedBox: 0 x 0 cropBox: 0 x 0 trimBox: 77.95 x 87.87 Other boxes seem with misleading values or I misinterpret them. Snippet: from pyPdf import PdfFileReader pdfread = PdfFileReader(file('my.pdf', 'rb')) page = 1 width = pdfread.getPage(page).trimBox[2]-pdfread.getPage(page).trimBox[0] height = pdfread.getPage(page).trimBox[3] - pdfread.getPage(page).trimBox[1] print width, height

    Read the article

  • How to retrieve data from a dialog box?

    - by Ralph
    Just trying to figure out an easy way to either pass or share some data between the main window and a dialog box. I've got a collection of variables in my main window that I want to pass to a dialog box so that they can be edited. They way I've done it now, is I pass in the list to the constructor of the dialog box: private void Button_Click(object sender, RoutedEventArgs e) { var window = new VariablesWindow(_templateVariables); window.Owner = this; window.ShowDialog(); if(window.DialogResult == true) _templateVariables = new List<Variable>(window.Variables); } And then in there, I guess I need to deep-copy the list, public partial class VariablesWindow : Window { public ObservableCollection<Variable> Variables { get; set; } public VariablesWindow(IEnumerable<Variable> vars) { Variables = new ObservableCollection<Variable>(vars); // ... So that when they're edited, it doesn't get reflected back in the main window until the user actually hits "Save". Is that the correct approach? If so, is there an easy way to deep-copy an ObservableCollection? Because as it stands now, I think my Variables are being modified because it's only doing a shallow-copy.

    Read the article

  • JQuery modal box form validation

    - by vikitor
    Hi, I was using a view to create an object for my specific project, but now I have to adapt this to another requirements, such as the creation of this object must be integrated in the creation of another one. The thing is, that this object must be created before starting to create the other one, and the way of doing it will be poping up a modal dialog box with JQuery with the form to create it. I've got to adapt the creation and it works fine, except for the validation messages. It is made in the controller like : if (not.NotName.Trim().Length == 0) { ModelState.AddModelError("NotName", "Name is required"); } if (_notification.checkIfExists(not.NotName, not.NotRecID)) { ModelState.AddModelError("NotName", "Notification already exists"); } And before with a normal view it worked fine, but now I'm not able to get the validation messages as I did. How can you get this validation messages thrown by the controller in the Modal Box? Because now when I made a mistake on purpose in the form in order to get the error it doesn't appear. I've seen the error is displayed in the site, because I've seen it on firebug, but it doesn't appear in my model box. How can I retrieve this errors? Do you know any tutorial that could help me with this? Thank you

    Read the article

  • Search box with images strange issue in ie

    - by mebots
    Have the following searchbox image: With the following code and css: #searchcontainer { margin: 40px 0 0 0; } .search { float: right; margin: 0; padding: 0; height: 21px; width: 310px; } .search input, .search button { margin: 0; padding: 0; font-size: 0.9em; color: #A7A9AC; border: 0; outline: none; } .search input.box { margin: 0; padding: 2px 5px 0 5px; width:230px; height: 19px; background: #FFF url(images/search.gif) no-repeat top left; } .search input.btn { margin: 0 0 0 -5px; padding: 0; width:70px; height: 21px; cursor:pointer; cursor: hand; /* cross browser */ text-indent: -9999px; background: #FFF url(images/search.gif) no-repeat top right; } <div id="searchcontainer"> <form id="searchform" class="search" method="post" action="#"> <input name="box" type="text" value="zoek..." class="box" /> <input name="btn" type="button" class="btn" /> </form> </div> In firefox it looks ok, but in ie and chrome the button "Zoek" goes down a bit, see image In my opinion the css is ok. but can't find where it goes wrong.

    Read the article

  • Detecting source of memory usage on a Linux box

    - by apeace
    I have a toy Linux box with 256mb RAM running Ubuntu 10.04.1 LTS. Here is the output of free -m: total used free shared buffers cached Mem: 245 122 122 0 19 64 -/+ buffers/cache: 38 206 Swap: 511 0 511 Unless I'm reading this wrong, 122mb is being used and only 84mb of that is disk cache. Here are all processes I'm running sorted by memory usage (ps -eo pmem,pcpu,rss,vsize,args | sort -k 1 -r): %MEM %CPU RSS VSZ COMMAND 5.0 0.0 12648 633140 node /home/node/main/sites.js 1.5 0.0 3884 251736 /usr/sbin/console-kit-daemon --no-daemon 1.3 0.0 3328 77108 sshd: apeace [priv] 0.9 0.0 2344 19624 -bash 0.7 0.0 1776 23620 /sbin/init 0.6 0.0 1624 77108 sshd: apeace@pts/0 0.6 0.0 1544 9940 redis-server /etc/redis/redis.conf 0.6 0.0 1524 25848 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 103:105 0.5 0.0 1324 119880 rsyslogd -c4 0.4 0.0 1084 49308 /usr/sbin/sshd 0.4 0.0 1028 44376 /usr/sbin/exim4 -bd -q30m 0.3 0.0 904 6876 ps -eo pmem,pcpu,rss,vsize,args 0.3 0.0 888 21124 cron 0.3 0.0 868 23472 dbus-daemon --system --fork 0.2 0.0 732 19624 -bash 0.2 0.0 628 6128 /sbin/getty -8 38400 tty1 0.2 0.0 628 16952 upstart-udev-bridge --daemon 0.2 0.0 564 16800 udevd --daemon 0.2 0.0 552 16796 udevd --daemon 0.2 0.0 548 16796 udevd --daemon 0.0 0.0 0 0 [xenwatch] 0.0 0.0 0 0 [xenbus] 0.0 0.0 0 0 [sync_supers] 0.0 0.0 0 0 [netns] 0.0 0.0 0 0 [migration/3] 0.0 0.0 0 0 [migration/2] 0.0 0.0 0 0 [migration/1] 0.0 0.0 0 0 [migration/0] 0.0 0.0 0 0 [kthreadd] 0.0 0.0 0 0 [kswapd0] 0.0 0.0 0 0 [kstriped] 0.0 0.0 0 0 [ksoftirqd/3] 0.0 0.0 0 0 [ksoftirqd/2] 0.0 0.0 0 0 [ksoftirqd/1] 0.0 0.0 0 0 [ksoftirqd/0] 0.0 0.0 0 0 [ksnapd] 0.0 0.0 0 0 [kseriod] 0.0 0.0 0 0 [kjournald] 0.0 0.0 0 0 [khvcd] 0.0 0.0 0 0 [khelper] 0.0 0.0 0 0 [kblockd/3] 0.0 0.0 0 0 [kblockd/2] 0.0 0.0 0 0 [kblockd/1] 0.0 0.0 0 0 [kblockd/0] 0.0 0.0 0 0 [flush-202:1] 0.0 0.0 0 0 [events/3] 0.0 0.0 0 0 [events/2] 0.0 0.0 0 0 [events/1] 0.0 0.0 0 0 [events/0] 0.0 0.0 0 0 [crypto/3] 0.0 0.0 0 0 [crypto/2] 0.0 0.0 0 0 [crypto/1] 0.0 0.0 0 0 [crypto/0] 0.0 0.0 0 0 [cpuset] 0.0 0.0 0 0 [bdi-default] 0.0 0.0 0 0 [async/mgr] 0.0 0.0 0 0 [aio/3] 0.0 0.0 0 0 [aio/2] 0.0 0.0 0 0 [aio/1] 0.0 0.0 0 0 [aio/0] Now, I know that ps is not the best for viewing process memory usage, but that's because it tends to report more memory than is actually being used...meaning no matter how you look at it all my processes combined shouldn't be using near 122mb, even if you account for the disk cache. What's more, memory usage is growing all the time. I've had to restart my server once a week, because once my 256mb fills up it starts swapping, which it wouldn't do just for disk cache. Shouldn't there be some way for me to see the culprit?! I'm new to server admin, so please if there's something obvious I'm overlooking point it out to me. Just for good measure, the output of cat /proc/meminfo: MemTotal: 251140 kB MemFree: 124604 kB Buffers: 20536 kB Cached: 66136 kB SwapCached: 0 kB Active: 65004 kB Inactive: 37576 kB Active(anon): 15932 kB Inactive(anon): 164 kB Active(file): 49072 kB Inactive(file): 37412 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 524284 kB SwapFree: 524284 kB Dirty: 8 kB Writeback: 0 kB AnonPages: 15916 kB Mapped: 10668 kB Shmem: 188 kB Slab: 18604 kB SReclaimable: 10088 kB SUnreclaim: 8516 kB KernelStack: 536 kB PageTables: 1444 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 649852 kB Committed_AS: 64224 kB VmallocTotal: 34359738367 kB VmallocUsed: 752 kB VmallocChunk: 34359737600 kB DirectMap4k: 262144 kB DirectMap2M: 0 kB EDIT: I had misinterpreted the meaning of free -m at first. But even so: the important thing is that my OS eventually begins to use swap memory if I don't restart my server, which disk caching wouldn't do. So where do I look to see what is using all this memory?

    Read the article

  • vagrant fails to bring up additional adapter for centos vm using virtual box provider

    - by Anadi Misra
    this is in continuation of the question asked here about host only adapter on dhcp I upgraded to vagrant 1.6.3 and the updated Vagrantfile to following setting for multiple adapters # add additional adapter for inter machine networking dev.vm.network :private_network, :type => "dhcp", :adapter => "2", :netmask => "255.255.255.0" it goes through creating adapters but then fails bringing up the mic on vm Anadis-MacBook-Pro:full-stack-env anadi$ vagrant up Bringing machine 'full-stack-env' up with 'virtualbox' provider... ==> full-stack-env: Clearing any previously set forwarded ports... ==> full-stack-env: Clearing any previously set network interfaces... ==> full-stack-env: Preparing network interfaces based on configuration... full-stack-env: Adapter 1: nat full-stack-env: Adapter 2: hostonly ==> full-stack-env: Forwarding ports... full-stack-env: 22 => 4223 (adapter 1) full-stack-env: 8080 => 8090 (adapter 1) ==> full-stack-env: Running 'pre-boot' VM customizations... ==> full-stack-env: Booting VM... ==> full-stack-env: Waiting for machine to boot. This may take a few minutes... full-stack-env: SSH address: 127.0.0.1:4223 full-stack-env: SSH username: vagrant full-stack-env: SSH auth method: private key full-stack-env: Warning: Connection timeout. Retrying... full-stack-env: Warning: Connection timeout. Retrying... full-stack-env: Warning: Remote connection disconnect. Retrying... ==> full-stack-env: Machine booted and ready! ==> full-stack-env: Checking for guest additions in VM... ==> full-stack-env: Setting hostname... ==> full-stack-env: Configuring and enabling network interfaces... The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! ARPCHECK=no /sbin/ifup eth 2> /dev/null Stdout from the command: Device eth does not seem to be present, delaying initialization. Stderr from the command: how ever when I log in to the environment I see two network interfaces as expected Anadis-MacBook-Pro:full-stack-env anadi$ vagrant ssh Last login: Wed Jun 4 12:54:47 2014 from 10.0.2.2 [vagrant@full-stack-env ~]$ ifconfig eth0 Link encap:Ethernet HWaddr 08:00:27:BD:39:57 inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:febd:3957/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:511 errors:0 dropped:0 overruns:0 frame:0 TX packets:360 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:54574 (53.2 KiB) TX bytes:46675 (45.5 KiB) eth1 Link encap:Ethernet HWaddr 08:00:27:A3:86:C9 inet addr:172.28.128.3 Bcast:172.28.128.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fea3:86c9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5 errors:0 dropped:0 overruns:0 frame:0 TX packets:9 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1360 (1.3 KiB) TX bytes:894 (894.0 b) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) I am bit confused here on why it is trying to add another mic (eth2)? In the VM I used for creating this vagrant box, I had added two NICs already.

    Read the article

  • swap a div to an embed form when user tweets using the @anywhere function box

    - by Jeff
    I'm using the @anywhere twitter function on the front page of my site (vocabbomb.com) and right now it works great to allow users to tweet straight away. Problem is, when they click tweet, it just reloads the twitter box, empty. I want it to load something new, like a "thank you, now fill in this email form" and show a mailchimp form. Ok so this is the @anywhere code currently working fine: <div id="tbox"></div> <script type="text/javascript"> twttr.anywhere(function (T) { T("#tbox").tweetBox({ height: 100, width: 400, defaultContent: " #vocabbomb", label: "Use the word foo in a tweet:", }); }); </script> So this is fine, and when the user writes a tweet, it just re-displays the twitter box. I understand there is a function that lets you specify stuff after the tweet is made: (example from http://dev.twitter.com/pages/anywhere_tweetbox) <div id="example-ontweet"></div> <script type="text/javascript"> twttr.anywhere(function (T) { T("#example-ontweet").tweetBox({ onTweet : function(plaintext, html) { console.log(plaintext); alert(html); } }); }); </script> Is this the best way to attempt this? Or do I need a function or something that changes what's in the div to something else? I want the mailchimp email form to show up after the tweet. It includes a ton of script and tags and starts like this: <!-- Begin MailChimp Signup Form --> <!--[if IE]> <style type="text/css" media="screen"> #mc_embed_signup fieldset {position: relative;} #mc_embed_signup legend {position: absolute; top: -1em; left: .2em;} </style> <![endif]--> <!--[if IE 7]> <style type="text/css" media="screen"> .mc-field-group {overflow:visible;} </style> <![endif]--> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> <script type="text/javascript" src="http://downloads.mailchimp.com/js/jquery.validate.js"></script> <script type="text/javascript" src="http://downloads.mailchimp.com/js/jquery.form.js"></script> <div id="mc_embed_signup"> <form action="http://faresharenyc.us1.list-manage.com/subscribe/post?u=106b58b4751a007d826715754&amp;id=2fe6ba4e6a" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" style="font: normal 100% Arial, sans-serif;font-size: 10px;"> ... So my attempt to just require it inside the function didn't work at all: <div id="tbox"></div> <script type="text/javascript"> twttr.anywhere(function (T) { T("#tbox").tweetBox({ height: 100, width: 400, defaultContent: " #vocabbomb", label: "Use the word foo in a tweet:", onTweet: function(plain, html){ <?php require_once('mailchimp.html'); ?> } }); }); </script> Nettuts had a brief discussion here: http://net.tutsplus.com/tutorials/javascript-ajax/using-twitters-anywhere-service-in-6-steps/ I am seeing now that the 'onTweet' function simply adds some text above the twitter box, but doesn't actually replace the entire twitter box. How do I do that? Is it possible? Thanks!

    Read the article

  • Set up linux box for secure local hosting a-z

    - by microchasm
    I am in the process of reinstalling the OS on a machine that will be used to host a couple of apps for our business. The apps will be local only; access from external clients will be via vpn only. The prior setup used a hosting control panel (Plesk) for most of the admin, and I was looking at using another similar piece of software for the reinstall - but I figured I should finally learn how it all works. I can do most of the things the software would do for me, but am unclear on the symbiosis of it all. This is all an attempt to further distance myself from the land of Configuration Programmer/Programmer, if at all possible. I can't find a full walkthrough anywhere for what I'm looking for, so I thought I'd put up this question, and if people can help me on the way I will edit this with the answers, and document my progress/pitfalls. Hopefully someday this will help someone down the line. The details: CentOS 5.5 x86_64 httpd: Apache/2.2.3 mysql: 5.0.77 (to be upgraded) php: 5.1 (to be upgraded) The requirements: SECURITY!! Secure file transfer Secure client access (SSL Certs and CA) Secure data storage Virtualhosts/multiple subdomains Local email would be nice, but not critical The Steps: Download latest CentOS DVD-iso (torrent worked great for me). Install CentOS: While going through the install, I checked the Server Components option thinking I was going to be using another Plesk-like admin. In hindsight, considering I've decided to try to go my own way, this probably wasn't the best idea. Basic config: Setup users, networking/ip address etc. Yum update/upgrade. Upgrade PHP/MySQL: To upgrade PHP and MySQL to the latest versions, I had to look to another repo outside CentOS. IUS looks great and I'm happy I found it! Add IUS repository to our package manager cd /tmp wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-1-1.ius.el5.noarch.rpm rpm -Uvh epel-release-1-1.ius.el5.noarch.rpm wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1-4.ius.el5.noarch.rpm rpm -Uvh ius-release-1-4.ius.el5.noarch.rpm yum list | grep -w \.ius\. # list all the packages in the IUS repository; use this to find PHP/MySQL version and libraries you want to install Remove old version of PHP and install newer version from IUS rpm -qa | grep php # to list all of the installed php packages we want to remove yum shell # open an interactive yum shell remove php-common php-mysql php-cli #remove installed PHP components install php53 php53-mysql php53-cli php53-common #add packages you want transaction solve #important!! checks for dependencies transaction run #important!! does the actual installation of packages. [control+d] #exit yum shell php -v PHP 5.3.2 (cli) (built: Apr 6 2010 18:13:45) Upgrade MySQL from IUS repository /etc/init.d/mysqld stop rpm -qa | grep mysql # to see installed mysql packages yum shell remove mysql mysql-server #remove installed MySQL components install mysql51 mysql51-server mysql51-devel transaction solve #important!! checks for dependencies transaction run #important!! does the actual installation of packages. [control+d] #exit yum shell service mysqld start mysql -v Server version: 5.1.42-ius Distributed by The IUS Community Project Upgrade instructions courtesy of IUS wiki: http://wiki.iuscommunity.org/Doc/ClientUsageGuide Install rssh (restricted shell) to provide scp and sftp access, without allowing ssh login cd /tmp wget http://dag.wieers.com/rpm/packages/rssh/rssh-2.3.2-1.2.el5.rf.x86_64.rpm rpm -ivh rssh-2.3.2-1.2.el5.rf.x86_64.rpm useradd -m -d /home/dev -s /usr/bin/rssh dev passwd dev Edit /etc/rssh.conf to grant access to SFTP to rssh users. vi /etc/rssh.conf Uncomment or add: allowscp allowsftp This allows me to connect to the machine via SFTP protocol in Transmit (my FTP program of choice; I'm sure it's similar with other FTP apps). rssh instructions appropriated (with appreciation!) from http://www.cyberciti.biz/tips/linux-unix-restrict-shell-access-with-rssh.html Set up virtual interfaces ifconfig eth1:1 192.168.1.3 up #start up the virtual interface cd /etc/sysconfig/network-scripts/ cp ifcfg-eth1 ifcfg-eth1:1 #copy default script and match name to our virtual interface vi ifcfg-eth1:1 #modify eth1:1 script #ifcfg-eth1:1 | modify so it looks like this: DEVICE=eth1:1 IPADDR=192.168.1.3 NETMASK=255.255.255.0 NETWORK=192.168.1.0 ONBOOT=yes NAME=eth1:1 Add more Virtual interfaces as needed by repeating. Because of the ONBOOT=yes line in the ifcfg-eth1:1 file, this interface will be brought up when the system boots, or the network starts/restarts. service network restart Shutting down interface eth0: [ OK ] Shutting down interface eth1: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: [ OK ] Bringing up interface eth1: [ OK ] ping 192.168.1.3 64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=0.105 ms Virtualhosts In the rssh section above I added a user to use for SFTP. In this users' home directory, I created a folder called 'https'. This is where the documents for this site will live, so I need to add a virtualhost that will point to it. I will use the above virtual interface for this site (herein called dev.site.local). vi /etc/http/conf/httpd.conf Add the following to the end of httpd.conf: <VirtualHost 192.168.1.3:80> ServerAdmin [email protected] DocumentRoot /home/dev/https ServerName dev.site.local ErrorLog /home/dev/logs/error_log TransferLog /home/dev/logs/access_log </VirtualHost> I put a dummy index.html file in the https directory just to check everything out. I tried browsing to it, and was met with permission denied errors. The logs only gave an obscure reference to what was going on: [Mon May 17 14:57:11 2010] [error] [client 192.168.1.100] (13)Permission denied: access to /index.html denied I tried chmod 777 et. al., but to no avail. Turns out, I needed to chmod+x the https directory and its' parent directories. chmod +x /home chmod +x /home/dev chmod +x /home/dev/https This solved that problem. DNS I'm handling DNS via our local Windows Server 2003 box. However, the CentOS documentation for BIND can be found here: http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-bind.html SSL To get SSL working, I changed the following in httpd.conf: NameVirtualHost 192.168.1.3:443 #make sure this line is in httpd.conf <VirtualHost 192.168.1.3:443> #change port to 443 ServerAdmin [email protected] DocumentRoot /home/dev/https ServerName dev.site.local ErrorLog /home/dev/logs/error_log TransferLog /home/dev/logs/access_log </VirtualHost> Unfortunately, I keep getting (Error code: ssl_error_rx_record_too_long) errors when trying to access a page with SSL. As JamesHannah gracefully pointed out below, I had not set up the locations of the certs in httpd.conf, and thusly was getting the page thrown at the broswer as the cert making the browser balk. So first, I needed to set up a CA and make certificate files. I found a great (if old) walkthrough on the process here: http://www.debian-administration.org/articles/284. Here are the relevant steps I took from that article: mkdir /home/CA cd /home/CA/ mkdir newcerts private echo '01' > serial touch index.txt #this and the above command are for the database that will keep track of certs Create an openssl.cnf file in the /home/CA/ dir and edit it per the walkthrough linked above. (For reference, my finished openssl.cnf file looked like this: http://pastebin.com/raw.php?i=hnZDij4T) openssl req -new -x509 -extensions v3_ca -keyout private/cakey.pem -out cacert.pem -days 3650 -config ./openssl.cnf #this creates the cacert.pem which gets distributed and imported to the browser(s) Modified openssl.cnf again per walkthrough instructions. openssl req -new -nodes -out dev.req.pem -config ./openssl.cnf #generates certificate request, and key.pem which I renamed dev.key.pem. Modified openssl.cnf again per walkthrough instructions. openssl ca -out dev.cert.pem -config ./openssl.cnf -infiles dev.req.pem #create and sign certificate. cp dev.cert.pem /home/dev/certs/cert.pem cp dev.key.pem /home/certs/key.pem I updated httpd.conf to reflect the certs and turn SSLEngine on: NameVirtualHost 192.168.1.3:443 <VirtualHost 192.168.1.3:443> ServerAdmin [email protected] DocumentRoot /home/dev/https SSLEngine on SSLCertificateFile /home/dev/certs/cert.pem SSLCertificateKeyFile /home/dev/certs/key.pem ServerName dev.site.local ErrorLog /home/dev/logs/error_log TransferLog /home/dev/logs/access_log </VirtualHost> Put the CA cert.pem in a web-accessible place, and downloaded/imported it into my browser. Now I can visit https://dev.site.local with no errors or warnings. And this is where I'm at. I will keep editing this as I make progress. Any tips on how to configure SSL email would be appreciated.

    Read the article

  • [C#/WPF] Combo box Item source = ObservableCollection & I need a '-None-' dummy entry at the top

    - by James
    I have a combo box using an observable collection as a datasource and I want a "dummy" value of "None" as the first item in the box as it controls filters against other data sources. Other databound objects also use the same observable collection so adding a "None" value directly to the datasource is not possible as I dont want, for example, my datagrids having a "none" in them. Also I'd rather avoid filters to just remove the "none" value for those that do not use it, as I'd like the observable collection to direclty reflect the database data; if at all possible. I'd also like to avoid having one observable collection per databound control. What I'm really after is a was to put a, non data bound, first entry into a combobox while also having the item source pointed at an obervable collection. Thanks

    Read the article

  • Create shortcut from vb.net on Windows 7 box (64 bit)

    - by Matt
    I am trying to create a desktop shortcut from vb.net code on a Windows 7 box (64 bit). The following code works on XP, but when run on Win7 I just get a message stating the App has stopped working: Imports IWshRuntimeLibrary Dim WshShell As WshShellClass = New WshShellClass Dim MyShortcut As IWshRuntimeLibrary.IWshShortcut ' The shortcut will be created on the desktop 'Win 7 MyShortcut = CType(WshShell.CreateShortcut("C:\Users\Public\Desktop\iexplore.lnk"), IWshRuntimeLibrary.IWshShortcut) 'MyShortcut = CType(WshShell.CreateShortcut("C:\Documents and Settings\All Users\Desktop\iexplore.lnk"), IWshRuntimeLibrary.IWshShortcut) MyShortcut.TargetPath = "C:\Program Files\Internet Explorer\iexplore.exe" 'Specify target app full path MyShortcut.Description = "IE" MyShortcut.Save() Any thoughts or better ways to create a shorcut from code on a Win7 box?

    Read the article

  • Getting the uptime of a SunOS UNIX box in seconds only

    - by JF
    How do I determine the uptime on a SunOS UNIX box in seconds only? On Linux, I could simply cat /proc/uptime & take the first argument: cat /proc/uptime | awk '{print $1}' I'm trying to do the same on a SunOS UNIX box, but there is no /proc/uptime. There is an uptime command which presents the following output: $ uptime 12:13pm up 227 day(s), 15:14, 1 user, load average: 0.05, 0.05, 0.05 I don't really want to have to write code to convert the date into seconds only & I'm sure someone must have had this requirement before but I have been unable to find anything on the internet. Can anyone tell me how to get the uptime in just seconds? TIA

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >