Maintain Image Relative To A Fixed Location Even Though It Scales Anchored By Its Top?
Jul 13, 2010
This is very programming related but a somewhat non-programming question. I am performing image scaling in a web based application and I need to maintain my image relative to a fixed location even though it scales anchored by its top, left corner. Hope the graphic make this possible.The idea is that C is a fixed location that I want to maintain as my scaling origin rather than B which which is the current css behavior. C may or may not be within the actual image. So as the image scale, B needs to move relative to C. Example: if the image was scaled 50%, then B would move 1/2 the distance to C. If the image grew to 200% of its size, then B would move twice the distance away from C.Ultimately looking for a formula for x & y for B given the location of C and a scaling factor for the image. Not sure the size of the image needs to be part of this but I have it if needed.
I'm struggling to find a way of specifying a file location in web.config appSettings that avoids using hard-coded paths but allows a non-'web aware' C# library to find a file. The C# library uses standard File.Open, File.Exists methods, etc. to operate on a data file, which is stored in my web application (ASP.NET MVC) tree, e.g. under:
I don't want the C# library to be aware of the web application it's being used in, as it is used in other software, and the web application has no need to know about the configuration of the C# library.
I am trying to create a small app that will stream read a remote web page (specified by user input)find all images within the page (using regular expressions)stream read these imagesadd them as LinkedResource 's to a HTML emailI have got it working fine when the images and defined using absolute urls but not when they are relative - How can I can webRequest / streamReader to behave like a web browser does and locate the images based on their relative location.I have thought about manipulating the main web url and prefixing it to the source of the image, but I am not sure how I would deal with am image source such as
I am using SlideShowExtender and I am using a Slideservice webservice located also in root folder. It works fine. My image folder is in ROOT FOLDER. But I have member webpage folders and a general web pages folder. Now, when I click on webpages of any of these folders, the slideshowextender stops working because it looks for my IMAGE folder in those Webpage Folders. I know this happens because I can see it trying to download the image from that URL which DOESNT EXIST(looking for my image folder in webpage folders).
How do I make a relative URL for the images so that the slideshowextender still POINTS to the ROOT FOLDER of images and displays images at all times.
I cannot make the slideshowextender work when I am logged into the system.
I could use absolute paths, but that would work only on the productive system and not on the development systems. Is there no other way to handle this?
In the above JS, the retrieval URL is CUSTOMER.com/Resource/Button.png (the site where the plugin runs), rather than my sites mycompany.com/Resource/Button.png.
Note that I cannot use absolute paths, as they become a pain between environments (test/prod) and also because my image retrieval must use http/https based on the client environment (otherwise you can errors if http is used on an https site).
I am writing web application using ASP.NET MVC + NHibernate + Postres stack. I wonder if images uploaded should be stored in database as binary blobs or on filesystem (and reference only in db).
One advantage of db storage I can think of is easy backup/recovery of all data without reverting to filesystem copy tools. On the other hand I suspect that filesystem access may be faster (but is it especially when dealing with many concurrent requests?)
URL....This link shows a demo that let user to put origin and destination then get direction. I want to know how to add a option which is let user to use their current location as origin location (Location from).
I have a table in my database, in which a certain field holds the locations of text or doc files (the files are of a transcript for a chat session).
In the Gridview right now i able to show the link locations. But i want to have Hyperlink or Button in the links location in the Transcript Location fields.And on the click of which the txt or doc file opens up in notepad or microsoft word.
Following is my code when user enters hospital name and city, he will be navigated to this page to show location on map. Now I want to get user current location and draw the route between current location and destination. Is there any way to integrate to geocoding and geolocation?
Have written an ASP.Net application. Part of the application deals with being able to view PDFs. The initial PDF viewed acts as an index to access other PDF documents. You click a link in the Index PDF and it jumps to another PDF file. Legal documents, agreements, etc.
This scenario works on some computers and on others it doesn't. I managed to figure out what the problem was. On some of the computers the initial Index PDF was being hosted within the browser and on some other computers it was actually jumping out of the browser and directly into Adobe Acrobat. As soon as the PDF jumps out of the browser and into Acrobat the relative links in the Index PDF stop working because it is hosted client side via Acrobat but the additional PDFs it is trying to access are on the server.
I figured out why some computers stay in browser and why some jump out. There is an option within Acrobat itself that determines this behavior. It is under Edit--> Preferences ----> Display PDF in Browser.
I am in a jam because I am not in control of the PDF documents themselves and how they are written, and I obviously have no control over the options selected in Acrobat on each and every computer. My problem is also compounded by the fact that our firm has just recently purchased a new PDF reader called Nuance that will be pushed out firm wide soon and I don't think it even has the option to have PDFs hosted in browser.
I can get what I need to work if I create the index in HTML, but the problem is I don't write the Indexes and the people who do are not trained in HTML. I can get the people who write the indexes to change from relative links to absolute links, but then I run into the problem of what if we change where we are hosting the PDF files? All the links will break again? I think we are stuck with relative URLs, but how can I make it work?
I am thinking about maybe hosting the PDFs within Silverlight?
This works fine on my "localhost" webserver, but I've also got a staging server for my clients to use. http://staging.infinitas.ws/ClientSite/
The problem that I'm having is that when the app is hosted on the staging server, the theSource is mapped incorrectly (contains /ClientSite/). I could do something like a String.Replace but I'm looking for a more elegant way of achieving this.