Search Results

Search found 7529 results on 302 pages for 'replace'.

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

  • Django store regular expression in DB which then gets evaluated on page

    - by John
    Hi, I want to store a number of url patterns in my django model which a user can provide parameters to which will create a url. For example I might store these 3 urls in my db where %s is the variable parameter provided by the user: www.thisissomewebsite.com?param=%s www.anotherurl/%s/ www.lastexample.co.uk?param1=%s&fixedparam=2 As you can see from these examples the parameter can appear anywhere in the string and not in a fixed position. I have 2 models, one holds the urls and one holds the variables: class URLPatterns(models.Model): pattern = models.CharField(max_length=255) class URLVariables(models.Model): pattern = models.ForeignKey(URLPatterns) param = models.CharField(max_length=255) What would be the best way to generate these urls by replacing the %s with the variable in the database. would it just be a simple replace on the string e.g: urlvariable = URLVariable.objects.get(pk=1) pattern = url.pattern url = pattern.replace("%s", urlvariable.param) or is there a better way? Thanks

    Read the article

  • How to use mod_rewrite to change external incoming images to local images?

    - by STRiDOR
    Hi, I'm trying to figure out how to use mod_rewrite so that I can replace linked images (coming in externally) and use local ones instead. Why am I doing this? I have a plugin which I'm integrating into my site, which uses ugly external images as buttons, and I want to redo these buttons to match my site. The links come in externally and are not embedded in a plugin php somewhere, so I figure there might be some way of using mod_rewrite to intercept and replace the incoming links. I hope someone can help, thanks!

    Read the article

  • Dell Poweredge R410 replace PERC S100 with PERC 6i

    - by Robe Eleckers
    I want to replace the PERC S100 RAID Controller with a PERC6i to be able to use 4 SAS harddrives instead of only SATA drives. What exactly do I need for this, what I've got so far: PERC6i PCIe x8 card. 4 x SAS 300GB 15000rpm drives Some questions I have Do I need a different backplane to accomodate the SAS disks? If so, what kind of backplane? Do I need a special cable to hookup the PERC6i with the backplane? If so, what kind of cable? Thanks.

    Read the article

  • replace laptop hard disk

    - by 5YrsLaterDBA
    I have bought a ACER Aspire 5736Z-4790 laptop for my parents. It just passed the warranty. I think the hard disk is bad now. I cannot open/copy some of my files. It will crash (blue screen) when I do chkdsk /f/r in the stage 4 of 5 which is verifying file data. I can hear a strange noise when it is reading the bad sectors (I guess because it hangs there.) I am thinking replace the hard disk. should I buy the same hard disk or any SATA laptop hard disk will be ok? BTW, is there a way to repair it (with software)?

    Read the article

  • Reviving a dead laptop battery

    - by Alex Ciminian
    Is there any way to revive a dead laptop battery? I have a three year old Dell Latitude laptop that I've been using pretty intensively. After a year or so, the battery dropped dead - if I plug the laptop out it goes into hibernation in a matter of seconds. Probably this was because I kept working on it plugged in all the time, but back then I didn't realize what effect it could have (this was my first laptop). Currently, I'm searching for a new laptop and I was thinking if there was something I could do to get the battery back working. I've found several links (sorry, I'm a new user so I can't post them) about freezing Li-ion batteries, but the opinions seem to mixed - some say that it worked for them, some not. If you've tried the freezing technique please let me know if it works. Or if you know another way to make a dead battery work again, please share here. I've already seen this thread, but I'm not very handy with soldering. If it's the only alternative I'll try it, but there's a big chance that I'll screw it up. Thanks!

    Read the article

  • Change YYYY-MM-DD to YYYYMMDD everywhere in file

    - by richardh
    I can't just delete all of the hyphens, because elsewhere they are used as minus signs. I can find these dates with [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\} but I can't figure out how to keep those three different digit wildcards in memory. My attempts end up replacing the dates with the search string (e.g., :%s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/[0-9]\{4\}[0-9]\{2\}[0-9]\{2\}/g). Any ideas? If there's a command line solution, I'd love to learn that, too. Thanks!

    Read the article

  • Replace the broken file copying UI in Windows 2008 Server 64-bit Explorer

    - by cbp
    Does anyone know a good GUI alternative for file copying on a Windows 2008 Server 64 bit edition. The built-in GUI has a hopeless interface and is bug-riddled which really hinders the ability to get things done safely. For example, often when moving a directory with subfolders, the directory and its subfolders will still remain, empty and not deleted. I've been through many of the common file copier and Windows Explorer alternatives, but either they flat-out do not work on a 64 bit/W2k8 machine or they do not actually fully replace the file copier.

    Read the article

  • I want to replace Windows Server by Samba 4 for authentication purpose [closed]

    - by garden air
    I am using windows Server 2008 in a mediam size organization. I have 200 clients at the moment. I have learn that Samba4 has a remarkable changes for windows clienmts. I want to use Samba 4 to authenticate my windows xp and windows 7 clients machines. In my home based pc I am using vmware to test samba 4. For that purpose I am using CentOS 6.3 with Samab4. Kindly guide me taht it is possible that I replace windows server as a PDC controller and use samba4 to onlu authenticate my clients. I does not want Group Policy only and only authentication . So what u suggest me. Is it good to use samba 4 instaled of windows server. thanks, gardenair

    Read the article

  • MSSQL Replace Database in Live Web App

    - by casoninabox
    I have a web app that is currently live. I had the need to make major modifications to the database and now I need to replace the current one. My dev SQL instance is not the live one. I usually just make a backup of the new DB, blow the old one away and Restore my updated one. But now I have data I need to preserve. Most of the current tables have changed, in that extra columns have been added, all existing columns are still there and unchanged. I have access to Management Studio. What is the right way to do this?

    Read the article

  • Software to automatically download a file from FTP and then rename->replace existing file

    - by pauska
    Hi. We pay a news agency to provide us mp3's of hourly news bulletins. They put the mp3's on a FTP server just about 10 minutes before every hour, with files named after date and time (example: 02012010_1600.mp3 or similar). I need to find some solution to download only the latest modified file from the FTP server, rename it to news.mp3 and replace the previous news.mp3 that was created. This should prefferably run on a Windows 2008 Server, as a service if its possible. Anyone have suggestion for software?

    Read the article

  • Have it fixed or buy a new one?

    - by Workshop Alex
    My dual-monitor system has just become a single-monitor system again when the older monitor decided it would be nice to just turn to black. It's a Samsung LCD monitor and is over three years old. Not sure if the warranty is still valid but I just wonder what option would me more efficient: 1) Have the monitor fixed for a small amount. 2) Buy a new monitor for a slightly bigger amount. When monitors were still expensive, I wouldn't doubt about this and would just have my monitor repaired. But prices are so low nowadays, (and repairs are expensive) that I wonder if it's worth the trouble... Of course, I'm in no hurry since I still have another monitor. It's just that I liked the dual-monitor setup. Solved! Just ordered a new monitor. A Samsumg Syncmaster T260HD 25,5". Much more than it would cost me if I just had my old one repaired but I noticed that this one has a build-in TV tuner, plus speakers. It's way more expensive than a repair, but it's worth the additional value it provides.

    Read the article

  • Broken Motherboard Trace

    - by CoffeeBean
    When you're fairly certain that a motherboard trace is broken near the CPU (i.e.: you suspect heatsink / fan was improperly inserted) is it advisable to attempt a repair? I've heard that it can be done using a substance for repairing embedded windshield defoggers. Has anyone had any experience with this?

    Read the article

  • eTrayz: Replace base system with a bootstrapped Debian

    - by knoopx
    I bought an eTrayz NAS time ago. The device is more or less good but it ships with a closed-source custom linux and a bunch of broken web-apps. I wanted to replace the whole system with a raw Debian installation. I successfully bootstrapped a Lenny Debian into a chroot and I'm able to use use it. However I would like it to be the default system and to boot automatically at login. The device itself ships with a bundled 2.6.24.4 kernel. I think the kernel is on a dedicated flash memory so I would prefere not to re-flash it. What do you think is the best way to accomplish it?

    Read the article

  • Best way to use mod_rewrite to replace WordPress pages with static files

    - by David Moles
    Here's the situation: I've got an old WordPress installation that I'd like to archive as static files, but I'd also like to preserve old URLs. I've already created the static archive with wget and sorted out the filenames and links. Now I'd like to configure Apache to intercept requests for the old dynamic URL and replace them with the new static one, e.g.: http://www.example.org/log/?p=1234 or http://www.example.org/log/index.php?p=1234 should redirect to http://www.example.org/log/archives/1234.html I've tried adding the following to the VirtualHost config for example.org, but to no effect -- I just get the PHP page. RewriteCond %{REQUEST_URI} /log/ RewriteCond %{QUERY_STRING} p=([^&;]*) RewriteRule ^/$ http://%{SERVER_NAME}/log/archives/%1.html [R,L] I've enabled logging and I can see what look like other rules being applied, but not this one. None of my other guesses at match patterns for %{REQUEST_URI} seem to have any effect either (log, log/, log.*, even .*). I'm new to mod_rewrite and this is mostly cargo cult, so I'm pretty sure I've gotten it wrong. Anyone know what I should be doing here?

    Read the article

  • Replace files with symlink

    - by soandos
    This question is intended to be the inverse of Replace Symbolic Links with Files, but for windows. I have started running out of space on my SSD drive, and I found that about 12% of used space is in my installer folder (holds the .msi files for all the programs that I have installed) I am looking for two things: A way to move this (or any) folder via symlink. Ideally, some powershell function that I could use to just designate a folder, a destination, and the symlink would be created in the original (pointing to the destination) In this particular case, a registry change that would allow the location to be move would also be helpful, but I would still prefer solution 1. How can this be done?

    Read the article

  • Registry Search & Replace Tool

    - by RHPT
    Can anyone recommend a good (and ideally free) Registry Search & Replace tool? There seems to be a lot of utilities that searches the registry, but not very many that does the replacing. I've found some really old ones (from the late 90s to 2007). I was hoping for newer ones or ones still maintained. I did run across RegReplacer, but that one doesn't seem to work very well (It only found 2 instances of a string where NirSoft's RegScanner caught 449). I also found Registrar Registry Manager via this question here, but it's $44 :-\

    Read the article

  • Replace gvimext.dll in Windows 8

    - by Leftium
    How can I get the "Edit with ... using tabs" functionality in gVim on Windows 8 (64-bit)? I'd like to swap out gVim's stock gvimext.dll for one that adds an "Edit with ... using tabs" option to Explorer's right-click context menu. On Windows 7 (64-bit) I used to be able to download the DLL and swap it in by following these instructions. However, I can't get it to work in Windows 8. The stock installation's context menu (sans "... using tabs") works fine (without a restart) ...but after replacing the DLL the gVim context menu options disappear and the gvimext.dll no longer seems to even load. (Windows 8 was restarted) if I again replace gvimext.dll with a backup of the stock DLL, the context menu options remain missing and the DLL still seems to fail to load (Windows 8 was restarted, again) If I re-install gVim, the context menu items return (even without a restart) What is the difference here between Windows 7 (where swapping DLL's works) and Windows 8 (where swapping DLL's fails)?

    Read the article

  • How to "demote" all titles and headings in Word 2010?

    - by dangowans
    I built a large help document for an application I wrote. I used all the default styles in Word 2010, including "Title", "Heading 1", "Heading 2", etc. Sadly, when I generated the Table of Contents, Titles were not included. I'm also now using chmProcessor to automatically generate a website from the document, and it's not including Titles in its Table of Contents either. I'd like to make all Titles into Heading 1s, all Heading 1s into Heading 2s, and Heading 2s into Heading 3s, etc. Is this possible without a huge manual effort? (I'm sure there's a better word than "demote" for this.)

    Read the article

  • Textmate: Find and replace across project with contents of one file from said project

    - by griotspeak
    I have a regular expression to find the text I want (I wrapped the relevant section in custom tags), and I can do it by hand without much issue, but what I want is a way to automatically find and replace throughout the entire project. A macro seems like an OK idea, but it would be nice to have a command (to edit and tweak). sed seems like a good bet, but I am pretty unfamiliar with it. I am not so much asking for a complete solution as I am asking for an example that does something close to what I want. I don't really know of a good way to start.

    Read the article

  • Replace values in column, space delimited file in Vim

    - by user1256923
    I have a file that looks like: 2067 24311 <hkxhk> {00} 2069 17219 <hkxhk> {00} 2071 20931 <hkxhk> {00} 2073 5557 <hkxhk> {00} 2075 2127 <hkxhk> {00} 2077 20947 <hkxhk> {00} 2081 18088 <hkxhk> {00} I want to replace the first column value so that it looks like 5 24311 <hkxhk> {00} 5 17219 <hkxhk> {00} 5 20931 <hkxhk> {00} 5 5557 <hkxhk> {00} 5 2127 <hkxhk> {00} 5 20947 <hkxhk> {00} 5 18088 <hkxhk> {00} Where the first space delimited column has been replaced by a new value, in this case 5.

    Read the article

  • Linux/Solaris replace hostnames in files according to hostname rule

    - by yael
    According to the following Perl command ( this command part of ksh script ) I can replaced old hostnames with new hostnames in Linux or Solaris previos_machine_name=linux1a new_machine_name=Red_Hat_linux1a export previos_machine_name export new_machine_name . perl -i -pe 'next if /^ *#/; s/(\b|[[:^alnum:]])$ENV{previos_machine_name}(\b|[[:^alnum:]])/$1$ENV{new_machine_name}$2/g' file EXPLAIN: according to perl command - we not replaces hostnames on the follwoing case: RULE: [NUMBERS]||[letter]HOSTNAME[NUMBERS]||[letter] my question after I used the Perl command in order to replace all old hostnames with new hostnames based on the "RULE" in the Perl command how to verify that the old hostnames not exist in file ? for example previos_machine_name=linux1a new_machine_name=Red_Hat_linux1a more file AAARed_Hat_linux1a verification should be ignore from this line @Red_Hat_linux1a$ verification should be match this line P=Red_Hat_linux1a verification should be match this line XXXRed_Hat_linux1aZZZ verification should be ignore from this line . . . .

    Read the article

  • Flex: replace all spaces with comma

    - by Treby
    im new with regexp, so can i ask for some assistance Using string.replace function what code that can replace spaces with comma Input:The quick brown fox jumps over the lazy dog. Output:The,quick,brown,fox,jumps,over,the,lazy dog. Thanks

    Read the article

  • Regex Replace Between Quotations

    - by Kyle Rozendo
    Hi All, I am wondering on where to begin to perform the following replace in regex: Read file (.cs file) Replace anything between quotations ("e.g:") with its uppercase version ("E.G:") By example: string m = "stringishere"; Becomes string m = "STRINGISHERE"; Thanks in advance, Kyle

    Read the article

  • Android SQLite: nullColumnHack parameter in insert/replace methods

    - by poke
    The Android SDK has some convenience methods for manipulating data with SQLite. However both the insert and replace methods use some nullColumnHack parameter which usage I don't understand. The documentation explains it with the following, but what if a table has multiple columns that allow NULL? I really don't get it :/ SQL doesn't allow inserting a completely empty row, so if initialValues is empty this column [/row for replace] will explicitly be assigned a NULL value

    Read the article

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