Search Results

Search found 1218 results on 49 pages for 'razor shadow'.

Page 34/49 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • Trouble with backup on SBS2008

    - by MemLeak
    We have an SBS2008 installation, which has a backup task. It creates a backup twice a day onto external storage. This worked for a long time. But the backup can't be performed now. The last valid backup was before some Exchange updates, SBS Update Rollup 8 and SharePoint updates were installed. The only error in Event Logs is for VSS (the Volume Shadow Service), which I only have in German. Things I've done: restart the server chkdsk /r /f for all volumes restart the VSS service googling manual backup Nothing's helped. How can I set up the backup again?

    Read the article

  • How do I improve terrain rendering batch counts using DirectX?

    - by gamer747
    We have determined that our terrain rendering system needs some work to minimize the number of batches being transferred to the GPU in order to improve performance. I'm looking for suggestions on how best to improve what we're trying to accomplish. We logically split our terrain mesh into smaller grid cells which are 32x32 world units. Each cell has meta data that dictates the four 256x256 textures that are used for spatting along with the alpha blend data, shadow, and light mappings. Each cell contains 81 vertices in a 9x9 grid. Presently, we examine each cell and determine the four textures that are being used to spat the cell. We combine that geometry with any other cell that perhaps uses the same four textures regardless of spat order. If the spat order for a cell differs, the blend map is adjusted so that the spat order is maintained the same as other like cells and blending happens in the right order too. But even with this batching approach, it isn't uncommon when looking out across an area of open terrain to have between 1200-1700 batch count depending upon how frequently textures differ or have different texture blends are between cells. We are only doing frustum culling presently. So using texture spatting, are there other alternatives that can reduce the batch count and allow rendering to be extremely performance-friendly even under DirectX9c? We considered using texture atlases since we're targeting DirectX 9c & older OpenGL platforms but trying to repeat textures using atlases and shaders result in seam artifacts which we haven't been able to eliminate with the exception of disabling mipmapping. Disabling mipmapping results in poor quality textures from a distance. How have others batched together terrain geometry such that one could spat terrain using various textures, minimizing batch count and texture state switches so that rendering performance isn't negatively impacted?

    Read the article

  • Realtime file-level mirroring from local NTFS to network drive

    - by hurfdurf
    We have some data collection machines running WinXP. After a new file is written, we would like to immediately copy the new file to network storage (a NetApp CIFS share) automagically. We need realtime or near realtime copies generated (copy upon filehandle close would be fine -- these are not long-running system logs). Two commercial applications I've found so far are MirrorFile and IBM's Tivoli CDP. Are there any reliable open source programs or simple ways to get Shadow Copy to do something similar? Bonus points if it runs as a service.

    Read the article

  • Rendering design. How can I effectively deal with forward, deferred and transparent rendering?

    - by user1423893
    I have many objects in my game world that all derive from one base class. Each object will have different materials and will therefore be required to be drawn using various rendering techniques. I currently use the following order for rendering my objects. Deferred Forward Transparent (order independent) Each object has a rendering flag that denotes which one of the above methods should be used. The list of base objects in the scene are then iterated through and added to separate lists of deferred, forward or transparent objects based on their rendering flag value. The individual lists are then iterated through and drawn using the order above. Each list is cleared at the end of the frame. This methods works fairly well but it requires different draw methods for each material type. For example each object will require the following methods in order to be compatible with the possible flag settings. object.DrawDeferred() object.DrawForward() object.DrawTransparent() It is also hard to see where methods outside of materials, such as rendering shadow maps, would fit using this "flag & method" design. object.DrawShadow() I was hoping that someone may have some suggestions for improving this rendering process, possibly making it more generic and less verbose?

    Read the article

  • Accessing a storage-side snapshot of a cluster-shared volume

    - by syneticon-dj
    From time to time I am in the situation where I need to get data back from storage-side snapshots of cluster shared volumes. I suppose I just never figured out a way to do it right, so I always needed to: expose the shadow copy as a separate LUN offline the original CSV in the cluster un-expose the LUN carrying the original CSV make sure my cluster nodes have detected the new LUN and no longer list the original one add the volume to the list of cluster volumes, promote it to be a CSV copy off the data I need undo steps 5. - 1. to revert to the original configuration This is quite tedious and requires downtime for the original volume. Is there a better way to do this without involving a separate host outside of the cluster?

    Read the article

  • Creating disk snapshots in Windows 7

    - by Puneet Arora
    Does anyone know of a command or tool to create disk snapshots on Windows 7 (client SKU)? I see vssadmin.exe has a "create shadow" option, but that's available only on server SKUs: http://technet.microsoft.com/en-us/library/cc788055(v=ws.10).aspx I've a backup tool that replicates changes (creations, modifications and deletions to files and directories) since last backup, to my backup volume. Before each time this happens I want to create a persistent snapshot on my backup volume. I could then mount previous snapshots to view previous backups achieving a behavior similar to that of TimeMachine in OS X. This question has been asked before but unfortunately there weren't any good answers: Taking snapshots of filesystem/volume in Windows 7?

    Read the article

  • What is needed for 'Previous Versions' to be visible on the client OS?

    - by Zoredache
    I have servers with Shadow Copies enabled taking snapshots a couple times a day. From the server, if you look at the local devices you can see the Previous Versions being populated reliably. But from remote clients, the ability for an end-user to see the Previous Versions seems to be very hit-or-miss. For the sake of this question you can assume that all my clients are Windows 7 and the Servers are Windows Server 2008 R2. Is there an exhaustive list of everything that is required for end user to see Previous Versions? Are their any requirements for a certain level of share or filesystem permissions, other then read access? Does something need to be open on the firewall, other then what is already in-place for normal Windows networking?

    Read the article

  • Duplication of Windows 7 Backup

    - by Steven Pickles
    I use the built in backup utility for Windows 7 because it's automated and flexible enough to allow me to schedule a daily shadow copy backup of particular files and folders directly to a separate internal RAID 0 array (2 x 1TB). It's also lightweight and stays out of the way. For off-site backup purposes, each week I copy the contents of the internal backup from the RAID 0 array to an external 1 TB drive. I then store move this drive to a different building. The copy from the internal backup to the external backup typically works like this: mount and erase contents of external drive highlight "file" on internal drive, hit CTRL+C CTRL+V on root directory of external drive Is there a better way to synchronize? Microsoft's SyncToy application does a pitiful job, and often leaves the folders not truly synchronized... which completely defeats the ability to use the backup's restore feature.

    Read the article

  • Moving cpanel backup of magento site to VPS

    - by user2564024
    I was having my site in shared hosting, I took the entire backup, its structure is like addons homedir mysql resellerpackages suspendinfo bandwidth homedir_paths mysql.sql sds userconfig counters httpfiles mysql-timestamps sds2 userdata cp locale nobodyfiles shadow va cron logaholic pds shell vad digestshadow logs proftpdpasswd ssl version dnszones meta psql sslcerts vf domainkeys mm quota ssldomain fp mma resellerconfig sslkeys has_sslstorage mms resellerfeatures suspended Now I have subscribed to vps, I have copied the files inside homedir/public_html to var/www/html of my new hosting, but am seeing the following error when I view it browser, There has been an error processing your request Exception printing is disabled by default for security reasons. Error log record number: 259343920016 I have just created database with name magenhto inside mysql. Previously I had cpanel and used one click installer. Hence am not aware of how to use that data inside mysql to this new system and are there any more changes.

    Read the article

  • Backup all plesk MySQL Databases to individual files

    - by Michael
    Hy, Because I'm new to shell scripting I need a hand. I currently backup all mydatabases to a single file, thing that makes the restore preaty hard. The second problem that my MySQL password dosen't work because of a Plesk bug and i get the password from "/etc/psa/.psa.shadow". Here is the code that I use to backup all my databases to a single file. mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` --all-databases | bzip2 -c > /root/21.10.2013.sql.bz2 I found some scripts on the web that backup each database to individual files but I don't know how to make them work for my situation. Here is a example script: for db in $(mysql -e 'show databases' -s --skip-column-names); do mysqldump $db | gzip > "/backups/mysqldump-$(hostname)-$db-$(date +%Y-%m-%d-%H.%M.%S).gz"; done Can someone help me make the script above work for my situation? Requirements: Backup each database to individual file using plesk password location.

    Read the article

  • How best to automatically deal with multiple site_ruby locations?

    - by cclark
    Is there a way to automatically append to $: variable in ruby to account for additional site_ruby locations? Ruby is installed in /usr/local/ and using gem_install will properly install the new ruby files in to /usr/local/lib/ruby/site_ruby. However there are some RPMs for ruby bindings to tools like shadow which we'd like to install and they install to /usr/lib/ruby/site_ruby (no local). Is there a standard way to tell ruby that this directory should also be included by default? I know scripts could dynamically update $: or they could be called with -I but it seems like this is something that should be handled in the install. Has anyone else found a clean way around this kind of problem? thanks, chuck

    Read the article

  • Blurred refurbished TFT

    - by PeterMmm
    I got 3 refurbished PC+TFT 19". All TFT shows a very blurry image. I estimate the TFT's are 2-3 yrs old. The PC's running Windows7 Pro. The resolution is set to the TFT native values. It could be possible that all TFT's are broken but I have similiar models that are up to 5 yrs old, without any issue. I still think it could be a config issue but from the hardware it is possible that a TFT get broken I shows up a very blurry image. Update TFT HP 2035, grafic Intel Q35/GMA 3100, analog D-SUB connector, Manuf. date Sep 2005. Config. resolution 1600x1200, PPP 150% Without ClearType it is worst. Desktop Icon titles seems to be good and clear. But in Notepad for example the effect is that on the right of the characters is a pinky shadow.

    Read the article

  • Pros and Cons of Facebook's React vs. Web Components (Polymer)

    - by CletusW
    What are the main benefits of Facebook's React over the upcoming Web Components spec and vice versa (or perhaps a more apples-to-apples comparison would be to Google's Polymer library)? According to this JSConf EU talk and the React homepage, the main benefits of React are: Decoupling and increased cohesion using a component model Abstraction, Composition and Expressivity Virtual DOM & Synthetic events (which basically means they completely re-implemented the DOM and its event system) Enables modern HTML5 event stuff on IE 8 Server-side rendering Testability Bindings to SVG, VML, and <canvas> Almost everything mentioned is being integrated into browsers natively through Web Components except this virtual DOM concept (obviously). I can see how the virtual DOM and synthetic events can be beneficial today to support old browsers, but isn't throwing away a huge chunk of native browser code kind of like shooting yourself in the foot in the long term? As far as modern browsers are concerned, isn't that a lot of unnecessary overhead/reinventing of the wheel? Here are some things I think React is missing that Web Components will care of. Correct me if I'm wrong. Native browser support (read "guaranteed to be faster") Write script in a scripting language, write styles in a styling language, write markup in a markup language. Style encapsulation using Shadow DOM React instead has this, which requires writing CSS in JavaScript. Not pretty. Two-way binding

    Read the article

  • Remote Assist Windows 2008 R2 Session

    - by cbergman
    As mentioned in this kb article, it is not possible to shadow a session with multiple monitors enabled. It does mention that "Remote Assistance supports multiple monitors, and is the presently recommended solution if you need this functionality." My question is, is it possible (and if so, how) to remote assist a terminal services session. We have a few Windows Server 2008 R2 Terminal Servers running with about 10 or so users that use 2 monitors. It would be ideal to be able to remote into their session but have yet to find a viable solution. Thank you.

    Read the article

  • Syncronize Linux /etc/ directory

    - by entend
    I have virtual machine with Linux (Ubuntu server) which is used as prototype for other machines. Sometimes I make changes in prototype system and want to import this changes at some other machine. I know about Puppet, cfengine and FAI but want something easy for example rsync script which will work through ssh when it needed. Main goal is /etc/ directory. But I don't want to syncronize some private files for example /etc/passwd /etc/shadow and so on. I don't know all of it. Are there tips for my task ? May be someone have such rsync script.

    Read the article

  • How to pre-load all deployed assemblies for an AppDomain

    - by Andras Zoltan
    Given an App Domain, there are many different locations that Fusion (the .Net assembly loader) will probe for a given assembly. Obviously, we take this functionality for granted and, since the probing appears to be embedded within the .Net runtime (Assembly._nLoad internal method seems to be the entry-point when Reflect-Loading - and I assume that implicit loading is probably covered by the same underlying algorithm), as developers we don't seem to be able to gain access to those search paths. My problem is that I have a component that does a lot of dynamic type resolution, and which needs to be able to ensure that all user-deployed assemblies for a given AppDomain are pre-loaded before it starts its work. Yes, it slows down startup - but the benefits we get from this component totally outweight this. The basic loading algorithm I've already written is as follows. It deep-scans a set of folders for any .dll (.exes are being excluded at the moment), and uses Assembly.LoadFrom to load the dll if it's AssemblyName cannot be found in the set of assemblies already loaded into the AppDomain (this is implemented inefficiently, but it can be optimized later): void PreLoad(IEnumerable<string> paths) { foreach(path p in paths) { PreLoad(p); } } void PreLoad(string p) { //all try/catch blocks are elided for brevity string[] files = null; files = Directory.GetFiles(p, "*.dll", SearchOption.AllDirectories); AssemblyName a = null; foreach (var s in files) { a = AssemblyName.GetAssemblyName(s); if (!AppDomain.CurrentDomain.GetAssemblies().Any( assembly => AssemblyName.ReferenceMatchesDefinition( assembly.GetName(), a))) Assembly.LoadFrom(s); } } LoadFrom is used because I've found that using Load() can lead to duplicate assemblies being loaded by Fusion if, when it probes for it, it doesn't find one loaded from where it expects to find it. So, with this in place, all I now have to do is to get a list in precedence order (highest to lowest) of the search paths that Fusion is going to be using when it searches for an assembly. Then I can simply iterate through them. The GAC is irrelevant for this, and I'm not interested in any environment-driven fixed paths that Fusion might use - only those paths that can be gleaned from the AppDomain which contain assemblies expressly deployed for the app. My first iteration of this simply used AppDomain.BaseDirectory. This works for services, form apps and console apps. It doesn't work for an Asp.Net website, however, since there are at least two main locations - the AppDomain.DynamicDirectory (where Asp.Net places it's dynamically generated page classes and any assemblies that the Aspx page code references), and then the site's Bin folder - which can be discovered from the AppDomain.SetupInformation.PrivateBinPath property. So I now have working code for the most basic types of apps now (Sql Server-hosted AppDomains are another story since the filesystem is virtualised) - but I came across an interesting issue a couple of days ago where this code simply doesn't work: the nUnit test runner. This uses both Shadow Copying (so my algorithm would need to be discovering and loading them from the shadow-copy drop folder, not from the bin folder) and it sets up the PrivateBinPath as being relative to the base directory. And of course there are loads of other hosting scenarios that I probably haven't considered; but which must be valid because otherwise Fusion would choke on loading the assemblies. I want to stop feeling around and introducing hack upon hack to accommodate these new scenarios as they crop up - what I want is, given an AppDomain and its setup information, the ability to produce this list of Folders that I should scan in order to pick up all the DLLs that are going to be loaded; regardless of how the AppDomain is setup. If Fusion can see them as all the same, then so should my code. Of course, I might have to alter the algorithm if .Net changes its internals - that's just a cross I'll have to bear. Equally, I'm happy to consider SQL Server and any other similar environments as edge-cases that remain unsupported for now. Any ideas!?

    Read the article

  • jQuery pop up problems

    - by user327137
    Hi all, I am creating a site from a template i purchased from TM for a beauty salon! I want to create an online booking form with the validations of name number service type but i'm having trouble getting a link to open that will pop up also using jquery NOT html how do i fix this... what is the code i have to insert so that when you click "BOOK NOW" a jquery pop up appears in the centre of the page and it has a booking form on it.... i have googled and googled but it is all new to me as in a NOOB at jquery.... here is a live demo of the template (template link for demo http://osc4.template-help.com/wt_31562/index.html#) and here is the code for where i am trying to place a pop up jquery <dt class="dt3"><a href="#"></a><img src="images/shadow.png" alt="" class="shadow"></dt> <dd id="page3"> <div class="inner"> <div class="content"> <section class="col-1"> <h2>our services</h2> <p>Vintage Beauty</p> <p class="dark">We offer Free Consultation for Botox, Fillers, Medical Skin Peels, Cosmetic Surgery <br> & also specialise n body and skin care. </p> <img src="images/page2-img1.png" alt="" class="p2"> <a href="#" class="more">view more</a> </section> <section class="col-2"> <h2>services</h2> <ul class="list p2"> <li><a href="#">Fish Pedicures</a></li> <li><a href="#">Manicures</a></li> <li><a href="#">Pedicures</a></li> <li><a href="#">Waxing</a></li> <li><a href="#">Threading</a></li> <li><a href="#">Tanning</a></li> <li><a href="#">Body Massage</a></li> <li><a href="#">Nail/Eye Extensions</a></li> <li><a href="#">Eye Lash/Brow Tinting</a></li> <li><a href="#">Twinkle Toes</a></li> <li><a href="#">Teeth Whitening Kits</a></li> <li><a href="#">Hot Wax Specialists</a></li> </ul> **<a href="#" class="more">BOOK ONLINE NOW</a> </section>** </div> </div> </dd>

    Read the article

  • How to organize pictures on website using css? [on hold]

    - by user3624023
    Here is my website without any CSS: http://www.wmcicompsci.ca/cs20/students/theglowcloud/Bare%20bones%20website/classics_bare.html I am new to CSS and I would like to organize pictures these pictures in this fashion: http://css-tricks.com/examples/SlideinCaptions/ I would just like this layout for the pictures but I do not need the sliding of the captions(although I would like to but it does not work my browser). I would like the captions to be like titles on top of the pictures. Here is my current html code: <!DOCTYPE html> <html> <head> <title> My favourite Fantasy books</title> <meta charset = "utf-8"> <link rel="stylesheet" href="css.css"> </head> <body> <nav id="main_nav"> <ul> <li><a href = " homepage_css.html"> Homepage</a></li> <li><a href="science_fiction_css.html">Science Fiction</a></li> <li><a href="classics_css.html">Classics</a></li> <li><a href="fantasy_css.html">Fantasy</a></li> </ul> </nav> <h1> Fantasy Genre</h1> <p> Here are my favourites:</p> <ul> <li> Goblet of Fire by J.K Rowling (4th book in the Harry Potter Series) </li> <li><img class= displayed src="pics/fantasy/goblet_of_fire.jpg" width="200" alt="Goblet of Fire book cover"></li> <li> Graceling by Kristan Cashore </li> <li><img src="pics/fantasy/graceling.jpg" width="200" alt = " Graceling book cover"></li> <li> Serpent's Shadow by Rick Riordan (3rd book in the Kane Chronicles) </li> <li><img src="pics/fantasy/serpents_shadow.jpg" width="200" alt="Serpent's Shadow book cover"></li> <li> The Hobbit by J.R.R. Tolkein </li> <li><img src="pics/fantasy/the_hobbit.jpg" width="200" alt="The Hobbit book cover"></li> <li> The False Prince by Jennifer Neilson (1st book in the Ascendance Triology) </li> <li><img src="pics/fantasy/the_false_prince.jpg" width="200" alt="The False Prince book cover"></li> </ul>

    Read the article

  • How to allow my Asp.net MVC 3 web app using MathJax to accept user input $x<y>z$ ?

    - by Recycle Bin
    I am developing a mathematics site using Asp.Net MVC 3 + Razor + MathJax. MathJax is a javascript library to render TeX or LaTeX codes on the web browser. And TeX or LaTeX codes represent mathematics contents such as an inline math $y=mx+c$ and a displayed math \[y=mx+c\]. Right now my site can accept input, for example, $x<y$. However it cannot accept $x<y>z$ because the framework regards this input is vulnerable to XSS and XSRF. Shortly speaking, what I should do to accomplish what I want but it does not open security vulnerability.

    Read the article

  • Fluentemail not working locally but working on server

    - by sreginogemoh
    My web app using Fluentemail to send emails. But there is strange thing happening, it is sending emails on server successfully, but locally I am getting such kind of errors: RazorEngine.Templating.TemplateCompilationException: Unable to compile template. Check the Errors list for details. at RazorEngine.Compilation.DirectCompilerServiceBase.CompileType(TypeContext context) at RazorEngine.Templating.TemplateService.CreateTemplate(String template, Type modelType) at RazorEngine.Templating.TemplateService.GetTemplate(String template, Type modelType, String name) at RazorEngine.Templating.TemplateService.Parse[T](String template, T model, String name) at RazorEngine.Razor.Parse[T](String template, T model, String name) at FluentEmail.Email.UsingTemplateFromFile[T](String filename, T model, Boolean isHtml) error CS2001: Source file 'C:\Windows\TEMP\5yn3eqdw.0.cs' could not be found} Is there any way I can fix that?

    Read the article

  • Retreive value from model into view ib MVC 3

    - by prerna
    public class HomeController : Controller { public ActionResult Index() { return View(); } /* public string Browse() { return "Hello from Browse"; public string Details(int id) { string message = "Store.Details, ID = " + id; return message; // return "Hello from Details"; }*/ public ActionResult Details(int id) { var album = new Album { Title = "Album " + id }; return View(album); } } I am new to MVC 3 ,My View is Details.aspx without Razor engine. <html> <head runat="server"> <title>Details</title> </head> <body> <div> </div> </body> </html> Can anyone help

    Read the article

  • where should I put the EF entity and data annotations in asp.net mvc + entity framework project

    - by giddy
    So I have a DataEntity class generated by EntityFramework4 for my sqlexpress08 database. This data context is exposed via a WCF Data Service/Odata to silverlight and win forms clients. Should the data entities + edmx file (generated by EF4) go in a separate class library? The problem here then is I would specify data annotations for a few entities and then some of them would require specific MVC attributes (like CompareAttribute) so the class library would also reference mvc dlls. There also happen to be entity users which will be encapsulated or wrapped into an IIdentity in the website. So its pretty tied to the mvc website. Or Should it maybe go in a Base folder in the mvc project itself? Mostly the website is data driven around the database, like approve users, change global settings etc. The real business happens in the silverlight and win forms apps. Im using mvc3 rc2 with Razor. Thanks

    Read the article

  • MVC-3 User-Image Management - Best Practices

    - by Rob
    Hello Experts, Developing using MVC-3, Razor, C# Been searching around and cannot find advice I'm looking for. My site will contain user-uploaded images (possibly a high number). What is the best practice for managing these pictures (placement, breakdown into sub-folders, etc...)? Where do I place them that will prevent them from getting accidentally blown away if I republish my site periodically? If there are any good articles or blog posts, that would be helpful. Also, any advice/tips anyone wants to add would be great. Thanks for your time! Rob EDIT Also would like to know what people do to prevent hot linking.

    Read the article

  • Calling a function in a JavaScript file with Selenium IDE

    - by user1059903
    So, I'm running these Selenium IDE tests against a site I'm working on. Everything about the tests themselves is running fine, except I would like to do a bit of clean-up once I'm done. In my MVC3 Razor based site, I have a JavaScript file with a function that gets a JsonResult from a Controller of mine. That Controller handles the database clean-up that Selenium IDE otherwise couldn't handle. However, I'm having a hard time finding any sort of documentation on how to do this. I know I can do JavaScript{ myJavascriptGoesHere } as one of the Values for a line in the test, but I can't seem to find a way to tell it to go find my clean-up function. Is it even possible for Selenium IDE to do this sort of thing? If it comes down to it, I can just make a separate View to handle the clean-up, but I'd really like to avoid that if possible. Thanks!

    Read the article

  • Finding a Relative Path in .NET

    - by Rick Strahl
    Here’s a nice and simple path utility that I’ve needed in a number of applications: I need to find a relative path based on a base path. So if I’m working in a folder called c:\temp\templates\ and I want to find a relative path for c:\temp\templates\subdir\test.txt I want to receive back subdir\test.txt. Or if I pass c:\ I want to get back ..\..\ – in other words always return a non-hardcoded path based on some other known directory. I’ve had a routine in my library that does this via some lengthy string parsing routines, but ran into some Uri processing today that made me realize that this code could be greatly simplified by using the System.Uri class instead. Here’s the simple static method: /// <summary> /// Returns a relative path string from a full path based on a base path /// provided. /// </summary> /// <param name="fullPath">The path to convert. Can be either a file or a directory</param> /// <param name="basePath">The base path on which relative processing is based. Should be a directory.</param> /// <returns> /// String of the relative path. /// /// Examples of returned values: /// test.txt, ..\test.txt, ..\..\..\test.txt, ., .., subdir\test.txt /// </returns> public static string GetRelativePath(string fullPath, string basePath ) { // ForceBasePath to a path if (!basePath.EndsWith("\\")) basePath += "\\"; Uri baseUri = new Uri(basePath); Uri fullUri = new Uri(fullPath); Uri relativeUri = baseUri.MakeRelativeUri(fullUri); // Uri's use forward slashes so convert back to backward slashes return relativeUri.ToString().Replace("/", "\\"); } You can then call it like this: string relPath = FileUtils.GetRelativePath("c:\temp\templates","c:\temp\templates\subdir\test.txt") It’s not exactly rocket science but it’s useful in many scenarios where you’re working with files based on an application base directory. Right now I’m working on a templating solution (using the Razor Engine) where templates live in a base directory and are supplied as relative paths to that base directory. Resolving these relative paths both ways is important in order to properly check for existance of files and their change status in this case. Not the kind of thing you use every day, but useful to remember.© Rick Strahl, West Wind Technologies, 2005-2010Posted in .NET  CSharp  

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >