Search Results

Search found 53464 results on 2139 pages for 'find and replace'.

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

  • Replace LightDM with MDM on Ubuntu 13.10

    - by Daniel
    I'm trying to replace LighDM with MDM on Ubuntu 13.10, but there already is package in Ubuntu sources called mdm. It's not display manager, but "The Middleman System"... So the PPA install doesn't work. I tried installing .deb package and it changed login screen, but gave me an error message after login and then X stopped. I had to revert back... Any ideas on how to install mdm on Ubuntu 13.10...???

    Read the article

  • Insert Or update (aka Replace or Upsert)

    - by Davide Mauri
    The topic is really not new but since it’s the second time in few days that I had to explain it different customers, I think it’s worth to make a post out of it. Many times developers would like to insert a new row in a table or, if the row already exists, update it with new data. MySQL has a specific statement for this action, called REPLACE: http://dev.mysql.com/doc/refman/5.0/en/replace.html or the INSERT …. ON DUPLICATE KEY UPDATE option: http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html With SQL Server you can do the very same using a more standard way, using the MERGE statement, with the support of Row Constructors. Let’s say that you have this table: CREATE TABLE dbo.MyTargetTable (     id INT NOT NULL PRIMARY KEY IDENTITY,     alternate_key VARCHAR(50) UNIQUE,     col_1 INT,     col_2 INT,     col_3 INT,     col_4 INT,     col_5 INT ) GO INSERT [dbo].[MyTargetTable] VALUES ('GUQNH', 10, 100, 1000, 10000, 100000), ('UJAHL', 20, 200, 2000, 20000, 200000), ('YKXVW', 30, 300, 3000, 30000, 300000), ('SXMOJ', 40, 400, 4000, 40000, 400000), ('JTPGM', 50, 500, 5000, 50000, 500000), ('ZITKS', 60, 600, 6000, 60000, 600000), ('GGEYD', 70, 700, 7000, 70000, 700000), ('UFXMS', 80, 800, 8000, 80000, 800000), ('BNGGP', 90, 900, 9000, 90000, 900000), ('AMUKO', 100, 1000, 10000, 100000, 1000000) GO If you want to insert or update a row, you can just do that: MERGE INTO     dbo.MyTargetTable T USING     (SELECT * FROM (VALUES ('ZITKS', 61, 601, 6001, 60001, 600001)) Dummy(alternate_key, col_1, col_2, col_3, col_4, col_5)) S ON     T.alternate_key = S.alternate_key WHEN     NOT MATCHED THEN     INSERT VALUES (alternate_key, col_1, col_2, col_3, col_4, col_5) WHEN     MATCHED AND T.col_1 != S.col_1 THEN     UPDATE SET         T.col_1 = S.col_1,         T.col_2 = S.col_2,         T.col_3 = S.col_3,         T.col_4 = S.col_4,         T.col_5 = S.col_5 ; If you want to insert/update more than one row at once, you can super-charge the idea using Table-Value Parameters, that you can just send from your .NET application. Easy, powerful and effective

    Read the article

  • Wordpress - how to replace <!--more--> with string on the_content() in single.php [migrated]

    - by Bob Cavezza
    I want to add text on a single wordpress blog post page where the "read more" text would usually be inserted. However, I can't configure a plugin to replace that text. I tried a few different sources, but I'm having trouble finding the solution. After looking through WordPress plugin: finding the <!--more--> in the_content and the page it links to, I still haven't been able to find a solution to this.

    Read the article

  • whats the best way to parse and replace the string with its values ?

    - by shahjapan
    I may have string like, """Hello, %(name)s, how are you today, here is amount needed: %(partner_id.account_id.debit_amount)d """ what would be the best solution for such template may i need to combine regular expression and eval, input string may differ like $partner_id.account_id.debit_amount$ - for the moment I've kept as python string format - just for testing.

    Read the article

  • jquery find() function not working on ie. (ie 8) not tested on others

    - by Val
    I have a tiny problem: I am trying to use the find function to get data from an external page. here is the code can some one please help me why doesnt it work on ie? index.php <div id="testing">Hello Worlds</div> jquery var txt=$('<div id="Temp"></div>').hide().appendTo('body'); var t; $('#Temp').load('index.php',null,function (t){ t = $('#Temp').find('#testing').text(); alert(t); }) Please help me... it works well on fireworks and chrome result should be to alert "Hello Worlds" instead its blank.

    Read the article

  • C#: How to replace "-" with " -" only when it's not preceded by "e"?

    - by MaDDoX
    I imagine I should use Regex for that but I still scratch my head a lot about it (and the only similar question I found wasn't exactly my case) so I decided to ask for help. This is the input and expected output: Input: "c-0.68219,-0.0478 -1.01455-0.0441 0.2321e-4,0.43212" Output:"c -0.68219,-0.0478 -1.01455 -0.0441 0.2321e-4,0.43212" Basically I need either commas or spaces as value separators, but I can't break the exponential index (e-4). Maybe do two successive replacements?

    Read the article

  • Write a SQL Query to replace values and include all the Dates.

    - by VJ
    Well I have this - Table DimDate- Date Table Employee- Id,Name,Points,Date Now the Employee table has points for everyday unless they did not come...so the Date does not have all the Dates entries... I mean for e.g in a week he did not come for 2 days the Employee table has only 5 rows...so I have this dimdate table which has all the dates till 2050 which I want to join with and add Zeros for the dates he does not have points. So I have written this query but does not work - Select E.EmployeeId,D.Date,isNull(E.Points,0) from DimDate D left join Employee E on D.Date between '01-01-2009'and '06-01-2009' where E.EmployeeId=1 The above query give multiple dates and I tried group by on Date but does not work.

    Read the article

  • preg_replace replacing with array

    - by Scott
    What I want to do is replace the "[replace]" in input string with the corresponding vaule in the replace array. The total number of values will change but there will always be the same number in the replace array as in input string. I have tried doing this with preg_replace and preg_replace_callback but I can't get the pattern right for [replace], I also tried using vsprintf but the % in <table width="100%"> was messing it up. All help is greatly appreciated! Replace Array: $array = array('value 1','value 2','value 3'); Input String $string = ' <table width="100%"> <tr> <td>Name:</td> <td>[replace]</td> </tr> <tr> <td>Date:</td> <td>[replace]</td> </tr> <tr> <td>Info:</td> <td>[replace]</td> </tr> </table> '; Desired Result <table width="100%"> <tr> <td>Name:</td> <td>value 1</td> </tr> <tr> <td>Date:</td> <td>value 2</td> </tr> <tr> <td>Info:</td> <td>value 3</td> </tr> </table>

    Read the article

  • Search text in list of files. Double search. Search files within a files

    - by wormhit
    I'm trying to execute double search within files and return file names. I'm using find ./ -iname '*txt' | xargs grep "searchtext" -sl to find file names with 'searchtext' in them. Command is returning a list of files. How can I find "othersearchtext" in those already found files and show them in the same fashion? #### EDITED Answer: grep -l "othersearchtext" $(find ./ -iname '*txt' | xargs grep "searchtext" -sl)

    Read the article

  • Replace Listmenu with Textfield

    - by BRADINO
    Say you have a dropdown form field where you ask the user how they heard about you. You have numerous options and also an other field where if they selected other, then they enter the value in a text field. This is a cleaner alternative where if the user selects Other, then the dropdown turns into a textfield of the same name, so that your post routine, grooming, validation, writing to DB etc all works seamlessly. This example uses prototype JS library. Here is a working example: How did you hear about BRADINO? Select Google Yahoo MSN Other All you have to do is have an dropdown option for Other and then add call the function onchange: onchange="overrideListmenu('how-heard');" Here is the javascript function that uses Prototype: function overrideListmenu(field){         if ($F(field) == 'Other'){             Element.replace($(field), '<input name="'+field+'" id="'+field+'" type="text" value="">');                 $(field).focus();         } } Here is the javascript function that uses jQuery: function overrideListmenu(field){         if ($('#'+field).val() == 'Other'){             $('#'+field).after('<input name="'+field+'" id="'+field+'" type="text" value="">').remove();                 $('#'+field).focus();         } } listmenu replace textfield textfield for other how did you hear about us

    Read the article

  • A MongoDB find() that matches when all $and conditions match the same sub-document?

    - by MichaelOryl
    If I have a set of MongoDB documents like the following, what can I do to get a find() result that only returns the families who have 2 pets who all like liver? Here is what I expected to work: db.delegation.find({pets:2, $and: [{'foods.liver': true}, {'foods.allLike': true}] }) Here is the document collection: { "_id" : ObjectId("5384888e380efca06276cf5e"), "family": "smiths", "pets": 2, "foods" : [ { "name" : "chicken", "allLike" : true, }, { "name" : "liver", "allLike" : false, } ] }, { "_id" : ObjectId("4384888e380efca06276cf50"), "family": "jones", "pets": 2, "foods" : [ { "name" : "chicken", "allLike" : true, }, { "name" : "liver", "allLike" : true, } ] } What I end up getting is both families because they both have at least one food marked as true for allLike. It seems that the two conditions in the $and are true if any foods sub-document matches, but what I want is the two conditions to match for the conditions as a pair. As is, I get the Jones family back (as I want) but also Smith (which I don't). Smith gets returned because the chicken sub-doc has allLike set to true and the liver sub-doc has a name of 'liver'. The conditions are matching across separate foods sub-docs. I want them to match as a pair on a foods document. This code is not the real use case, obviously. I have one, but I've simplified it to protect the innocent...

    Read the article

  • VB script + replace word only in specific line

    - by yael
    hi I find way to replace word in text file as the following strNewText = Replace(strText, "OLD_WORD", "NEW_WORD")t but this replace every OLD_WORD in the file my question is if it possible to replace the OLD_WORD with the NEW_WORD only on specific line for example I want to replace only on line that start with "THIS_LOCATION" THIS_LOCATION=OLD_WORD THX for help

    Read the article

  • How To Replace Notepad in Windows 7

    - by Trevor Bekolay
    It used to be that Notepad was a necessary evil because it started up quickly and let us catch a quick glimpse of plain text files. Now, there are a bevy of capable Notepad replacements that are just as fast, but also have great feature sets. Before following the rest of this how-to, ensure that you’re logged into an account with Administrator access. Note: The following instructions involve modifying some Windows system folders. Don’t mess anything up while you’re in there! If you follow our instructions closely, you’ll be fine. Choose your replacement There are a ton of great Notepad replacements, including Notepad2, Metapad, and Notepad++. The best one for you will depend on what types of text files you open and what you do with them. We’re going to use Notepad++ in this how-to. The first step is to find the executable file that you’ll replace Notepad with. Usually this will be the only file with the .exe file extension in the folder where you installed your text editor. Copy the executable file to your desktop and try to open it, to make sure that it works when opened from a different folder. In the Notepad++ case, a special little .exe file is available for the explicit purpose of replacing Notepad.If we run it from the desktop, it opens up Notepad++ in all its glory. Back up Notepad You will probably never go back once you switch, but you never know. You can backup Notepad to a special location if you’d like, but we find it’s easiest to just keep a backed up copy of Notepad in the folders it was originally located. In Windows 7, Notepad resides in: C:\Windows C:\Windows\System32 C:\Windows\SysWOW64 in 64-bit versions only Navigate to each of those directories and copy Notepad. Paste it into the same folder. If prompted, choose to Copy, but keep both files. You can keep your backup as “notepad (2).exe”, but we prefer to rename it to “notepad.exe.bak”. Do this for all of the folders that have Notepad (2 total for 32-bit Windows 7, 3 total for 64-bit). Take control of Notepad and delete it Even if you’re on an administrator account, you can’t just delete Notepad – Microsoft has made some security gains in this respect. Fortunately for us, it’s still possible to take control of a file and delete it without resorting to nasty hacks like disabling UAC. Navigate to one of the directories that contain Notepad. Right-click on it and select Properties.   Switch to the Security tab, then click on the Advanced button. Note that the owner of the file is a user called “TrustedInstaller”. You can’t do much with files owned by TrustedInstaller, so let’s take control of it. Click the Edit… button. Select the desired owner (you could choose your own account, but we’re going to give any Administrator control) and click OK. You’ll get a message that you need to close and reopen the Properties windows to edit permissions. Before doing that, confirm that the owner has changed to what you selected. Click OK, then OK again to close the Properties window. Right-click on Notepad and click on Properties again. Switch to the Security tab. Click on Edit…. Select the appropriate group or user name in the list at the top, then add a checkmark in the checkbox beside Full control in the Allow column. Click OK, then Yes to the dialog box that pops up. Click OK again to close the Properties window. Now you can delete Notepad, by either selecting it and pressing Delete on the keyboard, or right-click on it and click Delete.   You’re now free from Notepad’s foul clutches! Repeat this procedure for the remaining folders (or folder, on 32-bit Windows 7). Drop in your replacement Copy your Notepad replacement’s executable, which should still be on your desktop. Browse to the two or three folders listed above and copy your .exe to those locations. If prompted for Administrator permission, click Continue. If your executable file was named something other than “notepad.exe”, rename it to “notepad.exe”. Don’t be alarmed if the thumbnail still shows the old Notepad icon. Double click on Notepad and your replacement should open. To make doubly sure that it works, press Win+R to bring up the Run dialog box and enter “notepad” into the text field. Press enter or click OK. Now you can allow Windows to open files with Notepad by default with little to no shame! All without restarting or having to disable UAC! Similar Articles Productive Geek Tips Search and Replace Specific Formatting (fonts, styles,etc) in Microsoft WordHow to Drag Files to the Taskbar to Open Them in Windows 7Customize the Windows 7 or Vista Send To MenuKill Processes from the Windows Command LineChange Your Windows 7 Library Icons the Easy Way TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 PCmover Professional Use My TextTools to Edit and Organize Text Discovery Channel LIFE Theme (Win7) Increase the size of Taskbar Previews (Win 7) Scan your PC for nasties with Panda ActiveScan CleanMem – Memory Cleaner AceStock – The Personal Stock Monitor

    Read the article

  • A problem with Bash script

    - by c.sokun
    I want to write a simple script to detect a file created by Windows virus, usually it create an .exe file with the same name as the directory it drop. Here is the script it only work if the path name doesn't contain \n. Can someone help me fix this script please! #!/bin/bash if [ $# == 0 ]; then echo "" echo "==== Give me a directory to begin with! ====" echo "" exit fi for f in `find $1 -name '*.exe'` | do filename=`basename "$f" .exe` dir_name=`dirname "$f"` current_dir_name=`basename "$dir_name"` if [ $filename == $current_dir_name ]; then rm -f "$f" # It can't remove file where path contain space or \n ??!! fi done

    Read the article

  • Can "go" replace C++? [closed]

    - by iammilind
    I was reading wiki article about "go" programming language, where Bruce Eckel states: The complexity of C++ (even more complexity has been added in the new C++), and the resulting impact on productivity, is no longer justified. All the hoops that the C++ programmer had to jump through in order to use a C-compatible language make no sense anymore --they're just a waste of time and effort. Now, Go makes much more sense for the class of problems that C++ was originally intended to solve. Can go really replace C++(11) for new development in future? How about generic programming? I don't know go , but the amount of time (in)wasted in learning C++ seems to go in vain.

    Read the article

  • Strategy for building an application to replace a large spreadsheet

    - by Dan Walmsley
    I'm working on an application that is going to replace a rather large spreadsheet. The spreadsheet is used to budget purchases and things like that. It is the largest spreadsheet I have ever seen, and it required a lot of manual data entry, so this application is going to automate much of that. But as I'm working on this I've noticed its slow going. And I got to thinking this must be a common thing to do many companies will start with something like a spreadsheet, then when they get too big to maintain that, they will get a custom application built. So is there anything out there ( a framework or similar ) that does this sort of thing, migrating a spreadsheet to a custom application. I've had a quick Google but not really seen the kind of thing that I'm looking for. It's too late for this project, but I thought it would be worth having a look for next time. How do you guys tackle this problem?

    Read the article

  • How to replace all images in Libreoffice with their description

    - by user30131
    I have a very long document containing lots of svg images created using the extension TexMaths. This extension uses the latex installation to create svg image of the inputted equation (or set of equations). The latex code for each equation (or set of equations) is embedded in the image as part of its Description. Such a Description can be accessed by right clicking the svg image and choosing the option Description. I want to replace all the svg images using a suitable macro, by the embedded descriptions. e.g. from The Einstein's famous equation, [svg embedded equation : E = mc 2], tells us that mass can be converted to energy and vice-versa. To The Einstein's famous equation, E = mc^2, tells us that mass can be converted to energy and vice-versa. This will allow me to convert by hand the odt file containing numerous TexMaths equations to LaTeX.

    Read the article

  • how to replace windows 7 completely and repair grub

    - by sud
    I am trying to install ubuntu on HP probook 4530s x64 system. there is windows 7 already installed and i want to remove it. so i format C:\ drive and make to partation \ (sha2) and swap (sha4) from it. there is also a partation sha1 (300mb) for MBR (don't know what is it) i just leave it. after some time i get fatal error unable to install grub. and so i choose partation sha1 when it ask. no at boot time there is option to choose windows 7. and not for ubuntu and windows is also removed. i also try to install grub form other answers but no success. how to replace windows completely and where to install grub and what to do with 300mb (MBR).

    Read the article

  • Replace Android on HP Slate 21?

    - by user288626
    I want to replace Android with Ubuntu for Androids on my new HP Slate 21. As far as I known none has ever tried it yet and I would appreciate if Ask Ubuntu would help out here. Would I need to unlock & root first my machine? (In which case I will need a second machine plugged to my Slate...) Or can I just insert the bootable usb with the distribution I need and go from there as in a normal non-optical drive situation? Also where can I find the downloadable file/image of Ubuntu for Android as describe here? I see no link with the name on it.. Should I just download the normal dis and choose from options when installing it?

    Read the article

  • How do I replace Unity?

    - by Krista O'Connors
    I wanted to use Ubuntu 12.04 for its long term support. But I cannot stand Unity. I cannot find a way to replace it with compizconfig, so I tried replacing it with Lubuntu. When I restarted my computer started to load lubuntu, then just went right on with ubuntu as if nothing had happened. Likewise, it shows lubuntu when it shuts down. What is the deal? I'm confused here, is ubuntu 12.04 supposed to be an operating system or a desktop interface? Can I even run ubuntu with a Lubuntu interface? Is there a way to do this in compizconfig that I should be doing instead?

    Read the article

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