Search Results

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

Page 24/2895 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • why can't i delete this file on my pc

    - by ooo
    i am trying to install some software and it requires removing the following file: cd %SYSTEMROOT%\assembly\GAC rename Microsoft.Office.Interop.Outlook Microsoft.Office.Interop.Outlook.Old the problem is when i do the rename it looks like its successful but it doesn't seem to actually delete Microsoft.Office.Interop.Outlook i tried to explicitally do: del Microsoft.Office.Interop.Outlook and again it looks like it works but then when i do a "dir" i still see that file. Do you have any suggestions on why this wouldn't allow me to delete this file. I have outlook closed when i am doing this so i wouldn't think outlook is locking the file.

    Read the article

  • Moving from mock to real objects?

    - by jjchiw
    I'm like doing TDD so I started everything mocking objects, creating interface, stubbing, great. The design seems to work, now I'll implement the stuff, a lot of the code used in the stubs are going to be reused in my real implementation yay! Now should I duplicate the tests to use the real object implementation (but keeping the mocks object of the sensitive stuff like Database and "services" that are out of my context (http calls, etc...)) Or just change the mocks and stubs of the actual tests to use the real objects....... So the question is that, keep two tests or replace the stubs, mocks? And after that, I should keep designing with the mocks, stubs or just go with real objects? (Just making myself clear I'll keep the mock object of the sensitive stuff like database and services that are out of my context, in both situations.)

    Read the article

  • File Acces\Rename Issue

    - by Moon .
    Guys, i am having serious problem with media files (only video files). When i try to rename or delete a Files or the Folders that contained media files, i get an error. "Access Denied .... Some other program might be using this file..... bla bla bla" Previously for this knida problem i had a freeware "Unlocker" that used to work. What "Unlocker" used to do was simply kill the process that is using the file. But in my case, now that is, the process using the files is "Explorer.exe" W.T.F... A strange behavior, when i copy paste the same file. The copied file, I can rename it, i can delete it, i can shit on it if i want to.... but what is wrong with the original file. Check the following list. It will give you a better idea of my situation. I am using Win XP SP 2 I have got Div Player installed (latest) The media files are from both, my hard drive, created by many of my previous window installations. And new downloaded files. So Files ownership or Privacy is not an issue. I may not be able to rename\delete those files one moment, the next moment, in the next try, i might succeed. The problem is a major F. i can't figure it out. Please F1! its getting on my nerves.

    Read the article

  • Rotating object around moving object/player in 2D

    - by Boston
    I am trying to implement a camera which rotates around the world around the player. I have found many solutions online to the task of rotating an object about the origin, or about an arbitrary point. The procedure seems to be to translate the point to be rotated about to the origin, perform the rotation, translate back, then draw. I have gotten this working for rotation around the origin as well as for a fixed point. Rotation of objects around the player works as well, provided the player does not move. However, if the objects are rotated around the player by some non-zero degree, if the player moves after the rotation it causes the rotated objects to move as well. I probably have done a poor job explaining this so here's an image: http://i.imgur.com/1n63iWR.gif And here's the code for the behavior: renderx = (Ox - Px)*cos(camAngle) - (Oy - Py)*sin(camAngle) + Px; rendery = (Ox - Px)*sin(camAngle) + (Oy - Py)*cos(camAngle) + Py; Where (Ox,Oy) is the actual position of the object to be rotated and (Px,Py) is the actual position of the player. Any ideas? I am using C++ with SDL2.0.

    Read the article

  • read file in shell script

    - by moata_u
    how can i read file in shell script , then assign each line to an variable that i can use later ,,,(am thinking in way to load an default setting from file) i already try : process (){ } FILE='' read -p "Please enter name of default file : " FILE if [ ! -f $FILE ]; then echo "$FILE : does not exists " exit 1 elif [ ! -r $FILE ]; then echo "$FILE : can not read " fi exec 0<"$FILE" n=0 while read -r line do (assign each line to an variable) done

    Read the article

  • Recommend a web file sharing software please

    - by Baczek
    I'm looking for a web platform to put company files at. My requirements are: should be accessible via a browser should be open source must be installable (dropbox is a no-go) must have an option to put a access time limit on a file must perform garbage collection automatically after a file expires must be able to mark files as public or private an option to protect a file via a pin-code for users without accounts in the system would be nice to have The problem is I don't even know what to search for - all my googling results in either complete groupware solutions or p2p file sharing software. If such a thing doesn't exist, please don't hestitate to say so, so I can crawl to a corner and cry myself to sleep. TIA

    Read the article

  • Moving a File While It's In Use -- How Does it work?

    - by Zaz
    I've noticed that on non-windows OS.... ie linux/mac i can do things like: - Send a zip to a friend over aim - Delete the file while it's in transfer And the transfer does not fail. Or, I can do operations like.. - start a movie - erase the file - the movie still plays to completion (read from disk, not just buffered in memory) Although the files are being "deleted", as i mentioned, they are actually being moved to a different location on the file system... ie a Trash directory or something. So it seems to me like the OS uses a pointer @ the file that is updated when it moves rather than accessing the files directly. Can anyone shed some light on how this AWESOME capability is actually implemented? I'm not even sure what to google to learn more about it. thank you.

    Read the article

  • Facebook likes reset after moving to HTTPS

    - by aarondicks
    I've got a question regarding the Facebook like button. We worked on a piece recently that embeds a number of social share buttons (please see the source code below). When the piece was released, it was on HTTP, and received over 2k likes (the URL 'slug' hasn't changed at all). The site was recently migrated to permanent-on HTTPS, and the like data has been reset, and we've been left with 50 new, recent likes. If you see in the source code, the URL is set explicitly to like the HTTP version, which I believe to be correct. Can anyone help me work out what's happened here? Here's the HTML bit of the like button: <div class="fb-like" data-href="http://www.harveywatersofteners.co.uk/history-interior-design" data-layout="box_count" data-action="like" data-show-faces="false" data-share="false"></div>

    Read the article

  • Moving two objects proportionally

    - by SSL
    I'm trying to move two objects away from each other at a proportional distance, but on different scales. I'm not quite sure how to do this. Object A can go from position 0.1 to 1. Object B has no limits. If object B is decreasing, then Object A should be decreasing at rate R. Likewise, if Object B is increasing, then Object A increases at rate R. How can I tie these two Object positions together so that in an update loop, they automatically update their positions? I tried using: ObjA.Pos += 0.001f * ObjB.VelocityY; //0.001f is the rate This works but there's an error each time it runs. ObjA starts off at its max position 1 but then the next time it will stop at 0.97, 0.94, 0.91 etc.. This is due to the 0.001f rate I put in. Is there a way to control the rate, yet not end up with the rounding error?

    Read the article

  • Can't delete file from windows 7

    - by r.s.mahanti
    I downloaded a torrent file from internet. The problem is it's size is showing 0 bytes. I tried to scan it with antivirus, upload it to virus total, delete it but it's showing the file is not found. I tried to delete it in safe mode also but no success. Can anybody explain me, what can be reason for this and what is the way to delete this file? Thanks in advance. My operating system is windows 7. EDIT : the name of the file is "[Torrentreactor.to] - Site Translator 4.06.torrent."

    Read the article

  • How can I reorder parts of a video file

    - by sandeep
    I have download a mkv movie file which gave me 3 files suffixed .001, .002, and .003. When i join them together with different tools like winrar, 7zip, hjsplit, concatenated file shows only last 40 min/1.22 hrs of the total length of the movie. If I play all the (.001, .002, .003) parts with vlc player, I can see that .003 is the first part of the video and .001 is the last part. Can anyone tell me how can join this parts of movie with correct position or how I can convert .003 file into .001 file.

    Read the article

  • Windows OS level file open event trigger

    - by john
    Colleagues, I have need to run a script/program on certain basic OS level events. In particular when a file in Windows is opened. The open may be read-only or to edit, and may be initiated by a number of means, either from windows explorer (open or ), be selected from a viewing or editing application from the native file chooser, or drag-n-drop into an editing or viewing application. Further, i need the trigger to "hold" the event from completing the action until the runtime on the program has completed. The event handler program may return a pass state, or fail state. If fail state has been returned, then the event must disallow the initially requested action. Lastly, I need to add to the file in question a property or attribute that will contain metadata that will be used by the above event trigger handler program to make a determination as to the pass/fail condition that will ultimately determine if the user is permitted to open the file. Please note that this is NOT a windows event log situation, but one at the OS level file open event. thanks very much for your help. regards, j

    Read the article

  • Slow network file copy on Windows 7

    - by Jason V.
    I wrote a program that uses xcopy to transfer files (usually between 1KB and 2MB) over our intranet. Usually, I am copying files from my host machine (Windows 7 x64) to a VMWare virtual machine running Windows Server 2008 (the VM is running on my host machine, if that matters). On Windows XP, the file transfers usually only require a few seconds to complete. But on my Windows 7 machine, the transfer of the first file (1.5 MB) takes around 1.5 minutes to complete. This is true whether I use xcopy, robocopy, or programmatically using File.Copy(). I noticed that if I use File.Copy, the first transfer is very slow and subsequent transfers are much faster. Any clue how I can speed up the process? Is there a setting in Windows 7 (or server 2008) that I could try?

    Read the article

  • PDO Statement moving away from mysql_connect [on hold]

    - by user3555680
    Can someone please help me write a simple query "SELECT first_name FROM table_name" using PDO. I want to move away from using mysql_connect. Im working on a php project with mysql. Can you please write for me such a code that i can use THANK YOU <?php $host="127.0.0.1"; // Host name $username="root"; // Mysql username $password=""; // Mysql password $db_name="microict-intrasys"; // Database name //$id = 5; try { $conn = new PDO('mysql:host={$host};dbname={$db_name}', $username, $password); // you neeeeeed this--^ and this--^ $stmt = $conn->prepare('SELECT version FROM system_info'); $stmt->execute(array('id' => $id)); $result = $stmt->fetchAll(); if ( count($result) ) { foreach($result as $row) { print_r($row); } } else { echo "No rows returned."; } } catch(PDOException $e) { echo 'ERROR: ' . $e->getMessage(); } ?>

    Read the article

  • Reverse SEO - Moving Online Reputations Forward

    Reverse search engine optimization (SEO)is intended to remove negative or unwanted information about a company from a website or supplant it with new information. Reverse SEO has become big business.Both companies and individuals have come to realize the value in changing the nature of the reverse SEO strategy. The process of reverse SEO has been both developed and refined by companies to help mitigate the damage such information can cause.

    Read the article

  • Rebuilding a file if files have changed

    - by Todd Strauch
    I'm having a hard time wrapping my head around this. It seems trivial, but I'm not getting it. I have two files. If either of those two files changes, I want to rebuild one of them. Essentially: if file a changes or file b changes then file {"a": content => template('a.erb', 'b.erb'), } I know I can audit a file for change, I just don't know how to include that within a conditional. Can anyone point me in the right direction?

    Read the article

  • Moving sprite from one vector to the other

    - by user2002495
    I'm developing a game where enemy can shoot bullets towards the player. I'm using 2 vector that is normalized later to determine where the bullets will go. Here is the code where enemy shoots: private void UpdateCommonBullet(GameTime gt) { foreach (CommonEnemyBullet ceb in bulletList) { ceb.pos += ceb.direction * 1.5f * (float)gt.ElapsedGameTime.TotalSeconds; if (ceb.pos.Y >= 600) ceb.hasFired = false; } for (int i = 0; i < bulletList.Count; i++) { if (!bulletList[i].hasFired) { bulletList.RemoveAt(i); i--; } } } And here is where i get the direction (in the constructor of the bullet): direction = Global.currentPos - this.pos; direction.Normalize(); Global.currentPos is a Vector2 where currently player is located, and is updated eveytime the player moves. This all works fine except that the bullet won't go to player's location. Instead, it tends goes to the "far right" of the player's position. I think it might be the problem where the bullet (this.pos in the direction) is created (at the position of the enemy). But I found no solution of it, please help me.

    Read the article

  • C file read leaves garbage characters

    - by KJ
    Hi. I'm trying to read the contents of a file into my program but I keep occasionally getting garbage characters at the end of the buffers. I haven't been using C a lot (rather I've been using C++) but I assume it has something to do with streams. I don't really know what to do though. I'm using MinGW. Here is the code (this gives me garbage at the end of the second read): include include char* filetobuf(char *file) { FILE *fptr; long length; char *buf; fptr = fopen(file, "r"); /* Open file for reading */ if (!fptr) /* Return NULL on failure */ return NULL; fseek(fptr, 0, SEEK_END); /* Seek to the end of the file */ length = ftell(fptr); /* Find out how many bytes into the file we are */ buf = (char*)malloc(length+1); /* Allocate a buffer for the entire length of the file and a null terminator */ fseek(fptr, 0, SEEK_SET); /* Go back to the beginning of the file */ fread(buf, length, 1, fptr); /* Read the contents of the file in to the buffer */ fclose(fptr); /* Close the file */ buf[length] = 0; /* Null terminator */ return buf; /* Return the buffer */ } int main() { char* vs; char* fs; vs = filetobuf("testshader.vs"); fs = filetobuf("testshader.fs"); printf("%s\n\n\n%s", vs, fs); free(vs); free(fs); return 0; } The filetobuf function is from this example http://www.opengl.org/wiki/Tutorial2:_VAOs,_VBOs,_Vertex_and_Fragment_Shaders_%28C_/_SDL%29. It seems right to me though. So anyway, what's up with that?

    Read the article

  • How do I find out what process Id and thread id / name has a file open

    - by peter
    Hi All, I am using C# in an application and am having some problems with a file becoming locked. The piece of code does this, while (true) { Read a packet from a socket (with data in it to add to the file) Open a file Writes data to it Close a file } But in the process the file becomes locked. I don't really understand how, we are are definately catching and reporting exceptions so I don't see how the file doesn't get closed every time. My best guess is that something else is opening the file, but I want to prove it. Can someone please provide a piece of code to check whether the file is open and if so report what processid and threadid has the file open. For example if I had this code, StreamWriter streamWriter1 = new StreamWriter(@"c:\logs\test.txt"); streamWriter1.WriteLine("Test"); // code to check for locks?? StreamWriter streamWriter2 = new StreamWriter(@"c:\logs\test.txt"); streamWriter1.Close(); streamWriter2.Close(); That will throw an exception because the file is locked when we try and open it the second time. So where the comment is what could I put in there to report that the current app (process Id) and the current thread (thread Id) have the file locked? Thanks.

    Read the article

  • MVC 4 Beta with Mobile Project FIle Upload does not work

    - by Jim Shaffer
    I am playing around with the new MVC 4 beta release. I created a new web project using the Mobile Application template. I simply added a controller and a view to upload a file, but the file is always null in the action result. Is this a bug, or am I doing something wrong? Controller Code: using System.IO; using System.Web; using System.Web.Mvc; namespace MobileWebExample.Controllers { public class FileUploadController : Controller { public ActionResult Index() { return View(); } [AllowAnonymous] [HttpPost] [AcceptVerbs(HttpVerbs.Post)] public ActionResult Upload(HttpPostedFileBase file) { int i = Request.Files.Count; if (file != null) { if (file.ContentLength > 0) { var fileName = Path.GetFileName(file.FileName); var path = Path.Combine(Server.MapPath("~/App_Data/uploads"), fileName); file.SaveAs(path); } } return RedirectToAction("Index"); } } } And the view looks like this: @{ ViewBag.Title = "Index"; } <h2>Index</h2> <form action="@Url.Action("Upload")" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" /> <input type="submit" value="Submit" /> </form>

    Read the article

  • larger file upload problem with php

    - by chris
    I need to upload a csv file to a server. works fine for smaller files but when the file is 3-6 meg its not working. $allowedExtensions = array("csv"); foreach ($_FILES as $file) { if ($file['tmp_name'] > '') { if (!in_array(end(explode(".", strtolower($file['name']))), $allowedExtensions)) { die($file['name'].' is an invalid file type!<br/>'. '<a href="javascript:history.go(-1);">'. '&lt;&lt Go Back</a>'); } if (move_uploaded_file($file['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "Possible file upload attack!\n"; } echo "File has been uploaded"; } //upload form <form name="upload" enctype="multipart/form-data" action="<? echo $_SERVER['php_self'];?>?action=upload_process" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="31457280" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="userfile" type="file" /> <input type="submit" value="Send File" /> </form> I have also added this to htaccess php_value upload_max_filesize 20M php_value post_max_size 20M php_value max_execution_time 200 php_value max_input_time 200 Where am i going wrong?

    Read the article

  • Python file iterator over a binary file with newer idiom.

    - by drewk
    In Python, for a binary file, I can write this: buf_size=1024*64 # this is an important size... with open(file, "rb") as f: while True: data=f.read(buf_size) if not data: break # deal with the data.... With a text file that I want to read line-by-line, I can write this: with open(file, "r") as file: for line in file: # deal with each line.... Which is shorthand for: with open(file, "r") as file: for line in iter(file.readline, ""): # deal with each line.... This idiom is documented in PEP 234 but I have failed to locate a similar idiom for binary files. I have tried this: >>> with open('dups.txt','rb') as f: ... for chunk in iter(f.read,''): ... i+=1 >>> i 1 # 30 MB file, i==1 means read in one go... I tried putting iter(f.read(buf_size),'') but that is a syntax error because of the parens after the callable in iter(). I know I could write a function, but is there way with the default idiom of for chunk in file: where I can use a buffer size versus a line oriented? Thanks for putting up with the Python newbie trying to write his first non-trivial and idiomatic Python script.

    Read the article

  • Handling file renames in git

    - by Greg K
    I'd read that when renaming files in git, you should commit any changes, perform your rename and then stage your renamed file. Git will recognise the file from the contents, rather than seeing it as a new untracked file, and keep the change history. However, doing just this tonight I ended up reverting to git mv. > $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: index.html # Rename my stylesheet in Finder from iphone.css to mobile.css > $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: index.html # # Changed but not updated: # (use "git add/rm <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # deleted: css/iphone.css # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # css/mobile.css So git now thinks I've deleted one CSS file, and added a new one. Not what I want, lets undo the rename and let git do the work. > $ git reset HEAD . Unstaged changes after reset: M css/iphone.css M index.html Back to where I began. > $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: index.html # Lets use git mv instead. > $ git mv css/iphone.css css/mobile.css > $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # renamed: css/iphone.css -> css/mobile.css # # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: index.html # Looks like we're good. So why didn't git recognise the rename the first time around when I used Finder?

    Read the article

  • Ada: Adding an exception in a separate procedure when reading a file

    - by yCalleecharan
    This is a follow-up of this question: Ada: reading from a file . I would like to add an exception that checks if the file that I'm opening actually exists or not. I have made a separate procedure to avoid code clutter. Here is the main code test_read.adb: with Ada.Text_IO; use Ada.Text_IO; with Ada.Long_Float_Text_IO; with Ada.Float_Text_IO; procedure Test_Read is Input_File : File_Type; Value : Long_Float; procedure Open_Data (File : in Ada.Text_IO.File_Type; Name : in String) is separate; begin Ada.Text_IO.Open (File => Input_File, Mode => Ada.Text_IO.In_File, Name => "fx.txt"); while not End_Of_File (Input_File) loop Ada.Long_Float_Text_IO.Get (File => Input_File, Item => Value); Ada.Long_Float_Text_IO.Put (Item => value, Fore => 3, Aft => 5, Exp => 0); Ada.Text_IO.New_Line; end loop; Ada.Text_IO.Close (File => Input_File); end Test_Read; And here is the separate body test_read-open_data.adb of the procedure Open_Data: separate(test_read) procedure Open_Data (File : in Ada.Text_IO.File_Type; Name : in String) is --this procedure prepares a file for reading begin begin Ada.Text_IO.Open (File => File, Mode => Ada.Text_IO.In_File, Name => Name); exception when Ada.Text_IO.Name_Error => Ada.Text_IO.Put(File => Standard_Error, Item => "File not found."); end; end Open_Data; On compilation I get an error message in the separate body test_read-open_data.adb: actual for "File" must be a variable How to fix this? Thanks a lot...

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >