Search Results

Search found 6715 results on 269 pages for 'preg match'.

Page 39/269 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • Why the system information message when accessing an Ubuntu server doesn't match free -m?

    - by Andres
    Each time I SSH into my AWS Ubuntu servers I see a system information message, showing load, memory usage and packages available to install, like this: Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.2.0-51-virtual x86_64) * Documentation: https://help.ubuntu.com/ System information as of Sun Nov 10 18:06:43 EST 2013 System load: 0.08 Processes: 127 Usage of /: 4.9% of 98.43GB Users logged in: 1 Memory usage: 69% IP address for eth0: 10.236.136.233 Swap usage: 100% Graph this data and manage this system at https://landscape.canonical.com/ 13 packages can be updated. 0 updates are security updates. Get cloud support with Ubuntu Advantage Cloud Guest http://www.ubuntu.com/business/services/cloud Use Juju to deploy your cloud instances and workloads. https://juju.ubuntu.com/#cloud-precise *** /dev/xvda1 will be checked for errors at next reboot *** *** System restart required *** My question is about the memory percentage shown. In this case, it's showing a 69% of memory usage, but since the swap usage was 100% I checked it by myself. So when I run free -m I get this: total used free shared buffers cached Mem: 1652 1635 17 0 4 29 -/+ buffers/cache: 1601 51 Swap: 895 895 0 And that's of course closer to 100% than to 69%

    Read the article

  • Can I change the user id of a user on one Linux server to match another server in /etc/passwd?

    - by user76177
    I have a Rails application that is on a virtual machine (RHEL 6) and it's database is on dedicated hardware (also RHEL 6). The app server has an NFS directory from the db server mounted and accessible. It needs to write images to that server that are uploaded via the app. Background processes on the db server need to read and write to the same directory, as they perform resizing operations on the uploaded files. Right now none of this is working, because the user ids are different between the two systems. I only need this to work for this one application, so it is way too much overhead to put an LDAP system in place. Can I simply change the user id of this one user in one of the systems, or will that cause mass chaos? UPDATE: The fix worked, at least on local devices. Unfortunately the device I have mounted to the main db server still thinks my user id is 502 instead of 506. Do I need to remount that device, or is there an NFS daemon I can stop and restart to refresh it?

    Read the article

  • how do I match movement of an object from 2d video into a 3d package ?

    - by George Profenza
    I'm trying to add objects in a 3d package(Blender) using recorded footage. I've played with Icarus and it's great to capture the camera movement. Also the Blender 2.41 importer script works in Blender 2.49 as well. The problem is I can't seem to get 3d coordinates for objects. I have tried Autodesk(RealVIZ) MatchMover 2011 and gone through the tutorials. Tutorial 3 shows how to link a vertex from a 3d mesh to a 2d trackpoint, but the setup is for camera movement. Tutorial 4 goes into Motion capture, but it uses 2 videos of the same motion taken with 2 cameras from different viewpoints. I've tried to bypass that using the same footage twice, but that failed, as the 3d coordinate system ends up messed up. What software do you recommend for this (mapping 3d coordinates to 2d tracked points and importing them into a 3d package) ? What is the recommended technique ? Any good examples out there ? Thanks, George

    Read the article

  • How do I get grep color in the file names before each match?

    - by chimerical
    If I run grep -ir "somethingtomatch" . from the current directory, I typically get results like this: ./some/path/file1.html: filecontent filecontent keyword filecontent ./some/path/file2.html: filecontent filecontent filecontent keyword ./some/path/file3.html: filecontent keyword filecontent filecontent ./some/path/file4.html: keyword filecontent filecontent filecontent I used grep --color=auto -ir 'somethingtomatch" . but it only highlights the keywords in white on a red highlight. I'm trying to get file names on the left color-coded too. How do I do that? I'm using Terminal.app in OS X with bash and xterm (and I tried xterm-color too).

    Read the article

  • How can I compare two columns in Excel to highlight words that don't match?

    - by Jez Vander Brown
    (I'm using Microsoft excel 2010) OK, lets say I have a list of phrases in both column A and column B (see screen shot below) What I would like to happen whether it be with a macro, VBA or formula is: If there is a word in any cell in column A that isn't any of the words in any cell in column B to highlight that word in red. For example: in cell A9 the word "buy" is there, but the word buy isn't mentioned anywhere in column B so i would like the word buy to highlight in red. How can I accomplish this? (I think a macro/vba would be the best option but I have no idea how to create it, or even if its possible.)

    Read the article

  • How match 'other' applications to a tag in awesome-wm?

    - by Mnementh
    I use version 3.3.4 of awesome and it is fine. But I miss one thing I could do with an older version of awesome (without configuration via Lua): I could add a matcher with the regexp .* to add all windows without another tag to a specific tag: rule { name = ".*" tags = "9" } With that all applications I didn't made another rule for were added to tag 9. How can I do something similar with configuration in rc.lua?

    Read the article

  • How to match a string in URI with regular expression?

    - by forestclown
    In my Apache config httpd.conf, I wish to setup a rule like below SetEnvIfNoCase %{QUERY_STRING} ^.*(getBook+)$ no-gzip dont-vary I am hoping to do no-gzip when my URL looks like http://myurl.fake.com/book/getBook3?id=234 http://myurl.fake.com/book/getBook1?id=xxx I am not sure if I can do that by setting up something like the above in httpd.conf.. The reason I do query string is because the url myurl.fake.com/book/getBook3 was mod_rewrite from myurl.fake.com/index.php?controller=book&action=getBook3 Thanks!

    Read the article

  • Apache mod_proxy_html Substitute: how to re-use part of regex match? (regex variables?)

    - by goober
    Hi all, Have a unique URL-rewriting situation in Apache. I need to be able to take a URL that starts with "\u002f[X]" or '\u002f[X]" Where X is the rest of some URL, and substitute the text "\u002fmeis2\u002f[X] I'm not sure how the Regex works in Apache -- I think it's the same as Perl 5? -- but even then I'm a little unsure how this would be done. My hunch is that it has to do with Regex grouping and then using $1 to pull the variable out, but I'm entirely unfamiliar with this process in Apache. Hoping someone can help -- thanks!

    Read the article

  • Using sed, how to print all lines that match a certain date?

    - by Steve
    Using sed, how to print all lines where the birthdays are in November or December? Assuming input file name "datebook" as follows: Steve Blenheim:238-923-7366:95 Latham Lane, Easton, PA 83755:11/12/56:20300 Betty Boop:245-836-8357:635 Cutesy Lane, Hollywood, CA 91464:6/23/23:14500 Igor Chevsky:385-375-8395:3567 Populus Place, Caldwell, NJ 23875:6/18/68:23400 Karen Evich:284-758-2857:23 Edgecliff Place, Lincoln, NB 92743:7/25/53:85100 Fred Fardbarkle:674-843-1385:20 Parak Lane, Duluth, MN 23850:4/12/23:780900 Lori Gortz:327-832-5728:3465 Mirlo Street, Peabody, MA 34756:10/2/65:35200 Paco Gutierrez:835-365-1284:454 Easy Street, Decatur, IL 75732:2/28/53:123500 Ephram Hardy:293-259-5395:235 CarltonLane, Joliet, IL 73858:8/12/20:56700 ABE LINCOLN:813-555-0123:1549 Cabin Drive, Springfield, IL 61801:2/12/09:79000 James Ikeda:834-938-8376:23445 Aster Ave., Allentown, NJ 83745:12/1/38:45000

    Read the article

  • Windows XP: Make Google Chrome's minimize, restore and close buttons match other programs?

    - by TRiG
    I like the way Google Chrome puts the tabs above the address bar, but I don't like the way the minimize, restore, close buttons are a different shape to every other program's. It means that if I sit the mouse in the top corner and minimize everything, I find that I've restored Chrome, not minimized it. Is there any way to get these buttons to a normal shape and size? That's Firefox in front, looking normal, like every other program, and Chrome above and behind, with the buttons at an off-standard position and size.

    Read the article

  • EXCEL 2010 Check if sub string value in cell match with other string from range of cells

    - by gotqn
    I am stuck with this one from hours. I have range with cells with string values: A1 text1 A2 text2 An text3 And other column with other string values like: B1 text1sampletext B2 text2sampletext B3 text3sampletext B4 text1sampletext B5 text1sampletext I have to check if text in column A is sub string of text in column B. If it is, to set in column C the text from column A. Like this: B1 text1sampletext - C1 text1 B2 text2sampletext - C1 text2 B3 text3sampletext - C1 text3 B4 text1sampletext - C1 text1 B5 text1sampletext - C1 text1

    Read the article

  • Windows XP: Make Google Chrome's minimize, restore and close buttons match other programs?

    - by TRiG
    I like the way Google Chrome puts the tabs above the address bar, but I don't like the way the minimize, restore, close buttons are a different shape to every other program's. It means that if I sit the mouse in the top corner and minimize everything, I find that I've restored Chrome, not minimized it. Is there any way to get these buttons to a normal shape and size? That's Firefox in front, looking normal, like every other program, and Chrome above and behind, with the buttons at an off-standard position and size.

    Read the article

  • How do I get ftype & assoc to match Windows Explorer?

    - by Gauthier
    I changed the association to use upon launching a .py file, via Windows Explorer: Tools - Folders - File types. Then browse to .py. Change the association to Wordpad. Now when I type the name of a py file in the command line, Wordpad opens it. But assoc and ftype in the command line still return the following: C:\> assoc .py .py = Python.File C:\> ftype Python.File Python.File = "C:\Program\Python27\python.exe" "%1" %* How come the association is working, but assoc and ftype are not aware of it? I did restart the prompt. More info from my registry: HKEY_CLASSES_ROOT\.py = Python.File HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py\Application = wordpad.exe HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py\OpenWithProgids\Python.File = HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.py\(Standard) = Python.File More registry: HKEY_CLASSES_ROOT\Applications\python.exe\shell\open\command\(Standard) = "C:\Program\Python27\python.exe" "%1" %*` I suppose this is what is showing up in ftype Python.File. But it does not seem to get used. (I am doing this for testing, so I can eventually choose my default version of Python easily).

    Read the article

  • Google Analytics recording event based on <a> title attribute

    - by rlsaj
    I am declaring: var title = (typeof(el.attr('title')) != 'undefined' ) ? el.attr('title') :""; and then have the following: else if (title.match(/^"Matching Content"\:/i)) { elEv.category = "Matching Content Click"; elEv.action = "click-Matching-Content"; elEv.label = href.replace(/^https?\:\/\//i, ''); elEv.non_i = true; elEv.loc = href; } However, using Google Analytics debugger this is not being recorded. Any suggestions? The complete function is: if (typeof jQuery != 'undefined') { jQuery(document).ready(function gLinkTracking($) { var filetypes = /\.(avi|csv|dat|dmg|doc.*|exe|flv|gif|jpg|mov|mp3|mp4|msi|pdf|png|ppt.*|rar|swf|txt|wav|wma|wmv|xls.*|zip)$/i; var baseHref = ''; if (jQuery('base').attr('href') != undefined) baseHref = jQuery('base').attr('href'); jQuery('a').on('click', function (event) { var el = jQuery(this); var track = true; var href = (typeof(el.attr('href')) != 'undefined' ) ? el.attr('href') :""; var title = (typeof(el.attr('title')) != 'undefined' ) ? el.attr('title') :""; var isThisDomain = href.match(document.domain.split('.').reverse()[1] + '.' + document.domain.split('.').reverse()[0]); if (!href.match(/^javascript:/i)) { var elEv = []; elEv.value=0, elEv.non_i=false; if (href.match(/^mailto\:/i)) { elEv.category = "Email link"; elEv.action = "click-email"; elEv.label = href.replace(/^mailto\:/i, ''); elEv.loc = href; } else if (title.match(/^"Matching Content"\:/i)) { elEv.category = "Matching Content Click"; elEv.action = "click-Matching-Content"; elEv.label = href.replace(/^https?\:\/\//i, ''); elEv.non_i = true; elEv.loc = href; } else if (href.match(filetypes)) { var extension = (/[.]/.exec(href)) ? /[^.]+$/.exec(href) : undefined; elEv.category = "File Downloaded"; elEv.action = "click-" + extension[0]; elEv.label = href.replace(/ /g,"-"); elEv.loc = baseHref + href; } else if (href.match(/^https?\:/i) && !isThisDomain) { elEv.category = "External link"; elEv.action = "click-external"; elEv.label = href.replace(/^https?\:\/\//i, ''); elEv.non_i = true; elEv.loc = href; } else if (href.match(/^tel\:/i)) { elEv.category = "Telephone link"; elEv.action = "click-telephone"; elEv.label = href.replace(/^tel\:/i, ''); elEv.loc = href; } else track = false; if (track) { _gaq.push(['_trackEvent', elEv.category.toLowerCase(), elEv.action.toLowerCase(), elEv.label.toLowerCase(), elEv.value, elEv.non_i]); if ( el.attr('target') == undefined || el.attr('target').toLowerCase() != '_blank') { setTimeout(function() { location.href = elEv.loc; }, 400); return false; } } } }); }); }

    Read the article

  • How can I check for a string match AND an empty file in the same if/then bash script statement?

    - by Mike B
    I'm writing a simple bash script to do the following: 1) Check two files (foo1 and foo2). 2) If foo1 is different from foo2 and foo1 NOT blank, send an email. 3) If foo1 is the same as foo2... or foo1 is blank... do nothing. The blank condition is what's confusing me. Here's what I've got to start with: diff --brief <(sort ./foo1) <(sort ./foo2) >/dev/null comp_value=$? if [ $comp_value -ne 0 ] then mail -s "Alert" [email protected] <./alertfoo fi Obviously this doesn't check for blank contents. Any thoughts on how to do that?

    Read the article

  • Are there web search engines with exact match or regex capabilities (for related terms)?

    - by naxa
    Every once in a while I come upon a situation when google's way of searching results in too broad results even if I enclose my search terms in quotation marks. For example now I've tried to find pages that contain both "py.path" and "path.py" without much success. I'm currently aware of engines|sites like Google Code Search for searching actual code and (apparently) Stackoverflow for searching QAs, symbolhound that lets me find symbols, and also wikipedia is often a good place to find lists of symbols. But none of these seems to perform very good in matching exactly on search term pairs (or tuples) and use a broad-enough segment of the web. Is there a website that is good with exactly finding search term pairs? (Why not?)

    Read the article

  • How do I recursively delete all files or folders whose names match a pattern in Windows?

    - by zylstra
    For the file example, I would like to delete all files matching .+?[a-f0-9]{4}.html (i.e. any html file ending in a four digit hexadecimal). So paged47c.html would be deleted, but page.html would remain. For the folder example, I would like to delete all folders matching .+?[A-Z]+ (i.e. any folder containing a capital letter). So some-folderSE93_89ds/ would be deleted, but some-folder/ would remain. I don't work much with the command line, but I could probably get an example involving "del" to work for me. Alternatively, is there a simple GUI program for Windows that would do this?

    Read the article

  • How to make ssh match known_hosts to host/ip:port instead of just host/ip?

    - by Prody
    I have two machines behind a firewall, with the ssh ports forwarded to 2201 and 2202. When I ssh host -p 2201 it asks if I trust the machine, I say yes, it gets added to ~/.ssh/known_hosts Then I ssh host -p 2202 it doesn't let me, because there's already a known_host for this IP in ~/.ssh/known_host:1 (the file was empty when I started, so line 1 is the one added by the previous ssh run) This happens on CentOS 5.4. On other distros (I've tried Arch), it appears that ssh matches the knwown_hosts to the ports too, so I can have multiple fingerprints for multiple ports on the same host/ip without any problems. How can I get this same behavior for CentOS? I couldn't find anything in man ssh_config. (or at least not without disabling fingerprint checking)

    Read the article

  • SQL INSTR() using CSV. Need exact match rather than part

    - by Alastair Pitts
    This is a follow up issue relating to the answer for http://stackoverflow.com/questions/2445029/sql-placeholder-in-where-in-issue-inserted-strings-fail Quick background: We have a SQL query that uses a placeholder value to accept a string, which represents a unique tag/id. Usually, this is only a single tag, but we needed the ability to use a csv string for multiple tags, returning a combined result. In the answer we received from the vendor, they suggested the use of the INSTR function, ala: select * from pitotal where tag IN (SELECT tag from pipoint WHERE INSTR(?, tag) <> 0) and time between 'y' and 't' This works perfectly well 99% of the time, the issue is when the tag is also a subset of 2 parts of the CSV string. Eg the placeholder value is: 'northdom,southdom,eastdom,westdom' and possible tags include: north or northdom What happens, as north is a subset of northdom, is that the two tags are return instead of just northdom, which is actually what we want. I'm not strong on SQL so I couldn't work out how to set it as exact, or split the csv string, so help would be appreciated. Is there a way to split the csv string or make it look for an exact match?

    Read the article

  • How do I match complete XML objects in a string?

    - by cyclotis04
    I'm attempting to find complete XML objects in a string. They have been placed in the string by an XmlSerializer, but may or may not be complete. I've toyed with the idea of using a regular expression, because it seems like the kind of thing they were built for, except for the fact that I'm trying to parse XML. I'm trying to find complete objects in the form: <?xml version="1.0"?> <type> <field>value</field> ... </type> My thought was a regex to find <?xml version="1.0"?><type> and </type>, but if a field has the same name as type, it obviously won't work. There's plenty of documentation on XML parsers, but they seem to all need a complete, fully-formed document to parse. My XML objects can be in a string surrounded by pretty much anything else (including other complete objects). hw<e>reR@lot$0fr@ndm&nchrs%<?xml version="1.0"?><type><field>...</field>...</type>@ndH#r$omOre!!>nuT6erjc?y!<?xml version="1.0"?><type><field>...</field>...</type>ty!=] A regex would be able to match a string while excluding the random characters, but not find a complete XML object. I'd like some way to extract an object, parse it with a serializer, then repeat until the string contains no more valid objects.

    Read the article

  • Same query has nested loops when used with INSERT, but Hash Match without.

    - by AaronLS
    I have two tables, one has about 1500 records and the other has about 300000 child records. About a 1:200 ratio. I stage the parent table to a staging table, SomeParentTable_Staging, and then I stage all of it's child records, but I only want the ones that are related to the records I staged in the parent table. So I use the below query to perform this staging by joining with the parent tables staged data. --Stage child records INSERT INTO [dbo].[SomeChildTable_Staging] ([SomeChildTableId] ,[SomeParentTableId] ,SomeData1 ,SomeData2 ,SomeData3 ,SomeData4 ) SELECT [SomeChildTableId] ,D.[SomeParentTableId] ,SomeData1 ,SomeData2 ,SomeData3 ,SomeData4 FROM [dbo].[SomeChildTable] D INNER JOIN dbo.SomeParentTable_Staging I ON D.SomeParentTableID = I.SomeParentTableID; The execution plan indicates that the tables are being joined with a Nested Loop. When I run just the select portion of the query without the insert, the join is performed with Hash Match. So the select statement is the same, but in the context of an insert it uses the slower nested loop. I have added non-clustered index on the D.SomeParentTableID so that there is an index on both sides of the join. I.SomeParentTableID is a primary key with clustered index. Why does it use a nested loop for inserts that use a join? Is there a way to improve the performance of the join for the insert?

    Read the article

  • what is a RoR best practice? match by id or different column?

    - by Omnipresent
    I had a terrible morning. Lots of emails floating around about why things don't work. Upon investigating I found that there is a data mismatch which is causing errors. Scenario Customer and Address are two tables. Customer contains class Customer < ActiveRecord::Base has_one :address, :foreign_key => "id" end Address Contains class Address < ActiveRecord::Base belongs_to :customer, :foreign_key => "cid" end So the two tables match on id which is the default and that column is auto incremented. Problem on the edit Page we have some code like this. params[:line1] = @customer.first.address.line1 It fails because no matching record is found for a customer in the address table. I don't know why this is happening. It seems that over time a lot of records did not get added to Address table. Now problem is that when a new Customer is added (say with id 500) the Address will be added with some other id (say 425) ...now you don't know which address belongs to which customer. Question Being new to Rails, I am asking whether it is always considered good to create an extra column for joining of the records, rather than depending on the column that is automatically incremented? If I had a seperate column in Address table where I would manually insert the recently added customers id then this issue would not have come up.

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >