Search Results

Search found 72370 results on 2895 pages for 'file moving'.

Page 106/2895 | < Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >

  • Could I return a FileStream as a generic interface to a file?

    - by Eric
    I'm writing a class interface that needs to return references to binary files. Typically I would provide a reference to a file as a file path. However, I'm considering storing some of the files (such as a small thumbnail) in a database directly rather then on a file system. In this case I don't want to add the extra step of reading the thumbnail out of the database onto the disc and then returning a path to the file for my program to read. I'd want to stream the image directly out of the database into my program and avoid writing anything to the disc unless the user explicit wants to save something. Would having my interface return a FileStreamor even a Imagemake sense? Then it would be up to the implementing class to determine if the source of the FileStream or Image is a file on a disc or binary data in a database. public interface MyInterface { string Thumbnail {get;} string Attachment {get;} } vs public interface MyInterface { Image Thumbnail {get;} FileStream Attachment {get;} }

    Read the article

  • Calculating collission for a moving circle, without overlapping the boundaries

    - by Robert Vella
    Let's say I have circle bouncing around inside a rectangular area. At some point this circle will collide with one of the surfaces of the rectangle and reflect back. The usual way I'd do this would be to let the circle overlap that boundary and then reflect the velocity vector. The fact that the circle actually overlaps the boundary isn't usually a problem, nor really noticeable at low velocity. At high velocity it becomes quite clear that the circle is doing something it shouldn't. What I'd like to do is to programmitically take reflection into account and place the circle at it's proper position before displaying it on the screen. This means that I have to calculate the point where it hits the boundary between it's current position and it's future position -- rather than calculating it's new position and then checking if it has hit the boundary. This is a little bit more complicated than the usual circle/rectangle collission problem. I have a vague idea of how I should do it -- basically create a bounding rectangle between the current position and the new position, which brings up a slew of problems of it's own (Since the rectangle is rotated according to the direction of the circle's velocity). However, I'm thinking that this is a common problem, and that a common solution already exists. Is there a common solution to this kind of problem? Perhaps some basic theories which I should look into?

    Read the article

  • Dynamic attached UILabel is not moving.

    - by coure06
    I have attached a UILabel to view. Now i want to move that label but its not working. here is my code UILabel *tick = (UILabel *)[self.view viewWithTag:tag]; CGRect frame = tick.frame; frame.origin.x = newVal; frame.origin.y = newVal; I can change text value of the UILabel tick but how can i move it here and there?

    Read the article

  • Python library to detect if a file has changed between different runs?

    - by Stefano Borini
    Suppose I have a program A. I run it, and performs some operation starting from a file foo.txt. Now A terminates. New run of A. It checks if the file foo.txt has changed. If the file has changed, A runs its operation again, otherwise, it quits. Does a library function/external library for this exists ? Of course it can be implemented with an md5 + a file/db containing the md5. I want to prevent reinventing the wheel.

    Read the article

  • jQuery - Moving background arrow in menu

    - by B M
    I would expect something like this to be pretty popular in demand but I had much trouble finding a suiting script. I've got a basic menu build like this: <div id="menu"> <ul> <li><a href="#"><img src="images/btn1.png"></a></li> <li><a href="#"><img src="images/btn2.png"></a></li> <li><a href="#"><img src="images/btn3.png"></a></li> </ul> </div> The div #menu has a background image of a small arrow. I want the arrow to move vertically in front of the corresponding menu image when you mouseover/mousemove the whole #menu div. Also when one of the menu images has been clicked the arrow should stay in it's position in front of the corresponding menu image. I started something but I notice it's going downwards, since it's only working when you're at the top of the page. What I have is this: $('#menu').css({backgroundPosition: '5px 10px'}); //Starting position $('#menu').mousemove(function(e){ $('#menu').stop().animate( {backgroundPosition: '5px ' + (e.pageY-60) + ' px'}, {duration:100} ) }).mouseout(function(){ $('#menu').stop().animate( {backgroundPosition: '5px 10px'}, {duration:100} ) }); Please help! ps. I'm using this plugin to move background images smoothly.

    Read the article

  • Moving a high quality line on a panel c#

    - by user1787601
    I want to draw a line on a panel and then move it as the mouse moves. To do so, I draw the line and when the mouse moves I redraw the line to the new location and remove the previous line by drawing a line with the background color on it. It works fine if I do not use the high quality smoothing mode. But if use high quality smoothing mode, it leave traces on the panel. Does anybody know how to fix this? Thank you. Here is the code int x_previous = 0; int y_previous = 0; private void panel1_MouseMove(object sender, MouseEventArgs e) { Pen pen1 = new System.Drawing.Pen(Color.Black, 3); Pen pen2 = new System.Drawing.Pen(panel1.BackColor, 3); Graphics g = panel1.CreateGraphics(); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; g.DrawLine(pen2, new Point(0, 0), new Point(x_previous, y_previous)); g.DrawLine(pen1, new Point(0, 0), new Point(e.Location.X, e.Location.Y)); x_previous = e.Location.X; y_previous = e.Location.Y; } Here is the snapshot with SmoothingMode Here is the snapshot without SmoothingMode

    Read the article

  • How do I find out which process is locking a file using .NET?

    - by AJ
    I've seen several of answers about using Handle or Process Monitor, but I would like to be able to find out in my own code (C#) which process is locking a file. I have a nasty feeling that I'm going to have to spelunk around in the win32 API, but if anyone has already done this and can put me on the right track, I'd really appreciate the help. Update Links to similar questions How does one figure out what process locked a file using c#? Command line tool Across a Network Locking a USB device Unit test fails with locked file deleting locked file

    Read the article

  • A file's web address is different from the local file structure

    - by allanb
    I'm not sure how best to describe this (as you can clearly tell from the title) so I'll give you an example: I have a multisite Drupal installation. Each of the sites' sitemap.xml files are located on the server at /sites/example.com/files though with a browser (and to search engines) it is accessible at example.com/sitemap.xml I was wondering how this was achieved? Is this called Virtual Directory? Thank you

    Read the article

  • Moving checkmarks in checkbox lists after page reload - Firefox only

    - by DaveS
    I'm getting some strange behavior in Firefox whenever I put checkboxes inside a list (ol, ul, dl), and then dynamically insert buttons above the list. If I start with a something simple list like this: <dl class="c"> <dt><label for="a1"><input type="checkbox" id="a1" />one</label></dt> <dt><label for="a2"><input type="checkbox" id="a2" />two</label></dt> <dt><label for="a3"><input type="checkbox" id="a3" />three</label></dt> </dl> and add some jQuery like this: $(document).ready(function(){ var a = $('<button type="button">a</button>'); var b = $('<button type="button">b</button>'); $('<div/>').append(a).append(b).insertBefore($('.c')); }); ...then open it in Firefox, it looks fine at first. But check the first checkbox, reload the page, and the check-mark jumps to the second box. Reload again, and it jumps to the third. Reload yet again, and no checkboxes are left checked. If I leave out one of the buttons by dropping one of the append calls, it's fine. If I change the buttons to divs or something similar, it's fine. If I replace the dl tag with a div (and get rid of the dt tags), it's fine. But I need both buttons, and the checkboxes have to be in a list for what I'm trying to build. Does anybody know what's causing this?

    Read the article

  • merge three file into one big file

    - by davit-datuashvili
    suppose that we have three array int a[]=new int[]{4,6,8,9,11,12}; int b[]=new int[]{3,5,7,13,14}; int c[]=new int[]{1,2,15,16,17}; and we want to merge it into one big d array where d.length=a.length+b.length+c.length but we have memory problem it means that we must need use only this d array where we should merge these these three array of course we can use merge sort but can we use merge algorithm without sorting method? like two sorted array we can merge in one sorted array what about three or more array?

    Read the article

  • Moving Binary logs in Mysql to a different harddisk

    - by Darini
    This question is about Mysql Binary logging.We need to move the Binary logging to a different hard disk . What is the configuration change required in Mysql?.Currently Binary logs go into the same folder as the ibdata and there is a replication slave running which needs the binary logs

    Read the article

  • Moving UITableView row to top of list when selected

    - by Max Kilgore
    I am sure this is an easy thing to do. I am very new to objective C (picked up a job the boss was going to outsource) and could use all the help I can get. Just point me in the right direction here. Basically what I want to set up is this: I have a list of phone numbers that expands to as many rows as needed. I have no problem populating and the list works fine, but I would like for all of the recently selected items in the list to be more easily accessible at the top. So, whenever the user "didSelectRowAtIndexPath", I would like the row to move to the top. I just KNOW this is super simple... but I haven't found the solution yet. No hurry. I am just trying to figure things out on my own. Thanks in advance!

    Read the article

  • Is there a way of getting a file name and inserting into Matlab script?

    - by torr
    In a folder, I have both my .m file that contains the script and an imaging .dcm file that needs to be analyzed. Folder structure: Folder1/analysis.m Folder1/meas_dynamic_123.dcm My script (analysis.m) begins as follows: target =''; <== here should go the full path to the file + filename example: /Volumes/Data/Folder1/meas_dynamic_123.m txt = dir(target); // etc So I'm wondering if there is a way of when running analysis.m it will: automatically search the folder it's in, grab the full path + filename of file containing string dynamic in the name, insert its full path + name into target variable continue running the script Does anyone have any pointers on how to achieve this? Using ffpath?

    Read the article

  • asp.net: moving from session variables to cookies

    - by P a u l
    My forms are losing session variables on shared hosting very quickly (webhost4life), and I think I want to replace them with cookies. Does the following look reasonable for tracking an ID from form to form: if(Request.Cookies["currentForm"] == null) return; projectID = new Guid(Request.Cookies["currentForm"]["selectedProjectID"]); Response.Cookies["currentForm"]["selectedProjectID"] = Request.Cookies["currentForm"]["selectedProjectID"]; Note that I am setting the Response cookie in all the forms after I read the Request cookie. Is this necessary? Do the Request cookies copy to the Response automatically? I'm setting no properties on the cookies and create them this way: Response.Cookies["currentForm"]["selectedProjectID"] = someGuid.ToString(); The intention is that these are temporary header cookies, not persisted on the client any longer than the browser session. I ask this since I don't often write websites.

    Read the article

  • Why is order important in moving from tab to tab programmatically (and new in 1.8.10

    - by Bruce
    Hi folks, Up until I updated to jquery-ui-1.8.10 (already using jQuery 1.5), the following code has worked as expected: case 'baseeditor': $('#tab1').html(responseText).fadeIn(500, function() { ... load the contents of the tab and stuff... }); $("#prolearn").tabs("select",1); break; case ... The tab is fueled and then focus is moved from tab0 (from where the ajax call is initiated) to tab1. Now, that code won't work, but this version does: case 'baseeditor': $("#prolearn").tabs("select",1); $('#tab1').html(responseText).fadeIn(500, function() { ... load the contents of the tab and stuff... }); break; case ... Can someone explain the difference - have I just been lucky getting away with my original version? Thanks/Bruce

    Read the article

  • moving a website built on struts to a CMS

    - by fabiobeta
    Hi. Imagine having developed a classical website with java&struts. Now you customer is learning that redeploying the application to change an image or a text is a significant cost. And it asks to add a function to the site: cms-like handling of the contents (editing, versioning, approved publishing). How would you handle this request? Would you develop it in the webapp? Would you merge the webapp with a CMS? Would tou MOVE the webapp into a cms? Would you run away?

    Read the article

  • Drupal 6: moving localhost to server | clear cached data

    - by artmania
    Hi friends, I worked on localhost to build my drupal site. then, I moved to server. Steps: Clear cache tables (Site Configuration Performance Clear Cached Data button) on localhost Export db and then import on live server Move files/folders to live server Edit settings.php to reflect live server config everything is working great until I make Clear Cached Data on Server. than my custom theme, custom front page, etc... all mess up :( What can be the problem? I appreciate helps so much!! Thanks! !!SORTED!! I used a subtheme for Zen, named mgf . then I had taken a back-up as mgf- somehow after I make Clear Cached Data, Drupal links to this mgf- which is old and doesnt have latest stylings. I just removed this folder from themes, and it linked to the right-latest mgf.

    Read the article

  • Moving the ScrollBar To the Selected Node In A TreeView Control

    - by Nick LaMarca
    I have a treeview control where I am dynamically selecting a node depending on user interaction. when a node is selected I want to be able to have the scrollbar go to the location of that selected node in the tree. The scrollbar is simply made by overflow:auto in the div tag where the treeview is located. Can someone give me some detailed code to accomplish this? Thanks in advance.

    Read the article

  • Read file structure into an array, but only specific files.

    - by dmackerman
    I have a directory structure that looks like this: /expandables - folder - folder - folder - folder - BannerInfo.txt - index.html Each one of the folder has the same exact stucture. One file named BannerInfo.txt and index.html. There are about 250 of these folders if that matters. I want to loop through these folders and store each of the index.html files into an array. Inside of the index.html file is just some simple HTML and Javascript of which I want to read into a string to be displayed later on. I'm struggling with how to filter out only the index.html file from the individual folders. The purpose of this is because I want to randomly select an index.html file and put the contents into a textarea. I thought I could do a simple array_rand() on the returned array and spit out the string. Any ideas?

    Read the article

< Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >