Unable to access a file that was just created
File being used by another process after using File.Create()
How to extract and join files xxx.zip, xxx.z01 and xxx.z02 I have three files 1.zip, 1.z01 1.z02. I would like to extract and join them into a file, by right clicking 1.zip and selecting "Extract Here". But then there comes an error:     7-Zip 9.04 beta  Copyright (c)   1999-2009 Igor Pavlov  2009-05-30   p7zip Version 9.04   (locale=en_US.utf8,Utf16=on,HugeFiles=on,2   CPUs)      Error: /home/tim/Desktop/1.zip:   Can not open file as archive      Errors: 1   I was wondering what the problem it is and how I can solve it?  Thanks and regards!    ADDED: Is my usage of "unzip -FF" wrong? It seems not work:  $ unzip -FF 1.zip  Archive:  1.zip warning [1.zip]:  zipfile claims to be last disk of a multi-part archive;   attempting to process anyway, assuming all parts have been concatenated   together in order.  Expect "errors" and warnings...true multi-part support   doesn't exist yet (coming soon). file #1:  bad zipfile offset (local header sig):  0   Thanks again!  2nd ADDED: Still ain't right.  $ cat 1.z01 1.z02 1.zip &gt; combined.zip &amp;&amp; unzip -FF combined.zip Archive:  combined.zip warning [combined.zip]:  zipfile claims to be last disk of a multi-part archive;   attempting to process anyway, assuming all parts have been concatenated   together in order.  Expect "errors" and warnings...true multi-part support   doesn't exist yet (coming soon). warning [combined.zip]:  209829313 extra bytes at beginning or within zipfile   (attempting to process anyway) file #1:  bad zipfile offset (local header sig):  209829313   (attempting to re-compensate)  extracting: 1.wmv   bad CRC ee181eef  (should be f3c61875)   It generated 1.wmv, which can play well only until  midway in Gnome Mplayer.  3rd ADDED: Am I using 7z wrongly:  $ 7z e 1.z01  7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30 p7zip Version 9.04 (locale=en_US.utf8,Utf16=on,HugeFiles=on,2 CPUs)  Processing archive: 1.z01  Error: Can not open file as archive  $ 7z e 1.zip  7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30 p7zip Version 9.04 (locale=en_US.utf8,Utf16=on,HugeFiles=on,2 CPUs)  Processing archive: 1.zip  Error: Can not open file as archive Let $\phi : R \to S$ be a homomorphism. If $N$ is an ideal of $S$, then $\phi ^{-1} (N)$ is an ideal of $R$. Is zero input impedance good or possible when considering impedance matching? For RF applications, we are usually considering of impedance matching to choose load impedance as the conjugate of the source input impedance for the maximum transferred power. But how about design the source having zero input impedance? Is it even possible or good? A naive thought is that all the power will be on the load if so. I might think it is true for DC case and for amplifier design to have a small output impedance and big input impedance. I lack the knowledge to find the missed chain to put all the knowledge together. How do you think? Thanks! Usernames vs. Real Names I want to create a social network mainly geared towards user-to-user interactions such as commenting and discussion boards. From my observations, I've found that users are more likely to engage in constructive conversations when using their full names as opposed to creating flame wars when hiding behind a username. While the latter still has the possibility to exist using one's real name, it's not as evident considering that the user is bearing his or her identity—either through the site's main registration or through Facebook Connect.  Don't get me wrong I've seen many communities manage to still offer insightful user contributions using usernames. All in all, what are the pros and cons of the two? SEO repeated keywords in domain and url I took a bunch of photos at my son's martial arts club using a D90 with a 50mm F1.8.  The club is lit with overhead fluorescent lighting, and I was getting some weird results where some shots are "white", others have an "orange cast", and still others are partly white and partly orange in the same shot.  I suspect it has to do with the combination of the frequency of the light flicker and with the camera shutter speed. Here is a sequence of 3 shots that show the problem.  The shots were taken with 1/500s at F2 and ISO-800 and with Auto-WB.  First shot ("white/normal"):    Second shot ("orange cast" at top):   Third shot ("orange cast" at bottom):   These were taken in burst mode within a second of each other.  Can anybody tell me what is going on?  And, how I can avoid this? How did nobody at Hogwarts (especially Dumbledore) figure out what killed Myrtle? I have Ubuntu 12.04 LTS. I need the correct output because I edited it because it wasn't working but it has only made it worse. Passing custom string into a Salesforce email template. How to restrict some websites in Ubuntu 14.04 Equivalent conditions for a preabelian category to be abelian Let's fix some terminology first. A category $\mathcal{C}$ is preabelian if:  1) $Hom_{\mathcal{C}}(A,B)$ is an abelian group for every $A,B$ such that composition is biadditive,  2) $\mathcal{C}$ has a zero object,  3) $\mathcal{C}$ has binary products,  4) $\mathcal{C}$ has kernels and cokernels.  A category $\mathcal{C}$ is abelian if it is preabelian and satisfies:  5) every monomorphism is a kernel and every epimorphism is a cokernel.  Define the coimage of a map to be the cokernel of its kernel, and the image to be the kernel of its cokernel. We have the following commutative diagram:    where $\overline{f}$ is the only existing map (because of universality of kernel and cokernel).  I'm having trouble proving the following:     A preabelian category $\mathcal{C}$ is abelian iff $\overline{f}$ is an isomorphism.   The converse is easily shown, I'm having trouble proving $\Rightarrow$... This is a variation of the  questioned some time ago.  For a complex Hilbert space $H$ let $T: H \rightarrow H$ be a bounded operator. We call that $T$ is a trace-class operator if the following sum  $$\sum_{i}{\langle |T|e_{i}, e_{i} \rangle} &lt; \infty$$  converges, where $|T| = (T T^{*})^{\frac{1}{2}}$ is the absolute value of the operator.  Assume that  $$\sum_{i}{\langle Te_{i}, e_{i} \rangle}$$  converges for any basis in the space $H$. How to prove that if the aformentioned property holds then the operator is a trace class operator?  The progress on the problem is the following: Given an arbitrary bounded operator $T: H \rightarrow H$, one can use the following decomposition $$T = \big( \frac{T + T^{*}}{2} \big) ^{*} + i \big( \frac{T^{*} - T}{2i} \big) ^{*}$$  The latter line gives the decomposition $$T = A + i B$$ where $A, B$ are normal operators.  For the normal operators we can apply the spectral theorem that proposes that $T$ is unitary equivalent to  $$(UT U^{-1})(f(x)) = g(x) f(x)$$  where  $$U: H \rightarrow L^{2}(X, \mu)$$ $$g \in L^{\infty}(X, \mu)$$  Though this decomposition classify the operator in a broad sence, i see no direct way to conclude the statement. Are the any hints that may extend the previous argument? If not, are there any ways to conclude the statement? What data type to use for hashed password field and what length? I'm not sure how password hashing works (will be implementing it later), but need to create database schema now.  I'm thinking of limiting passwords to 4-20 characters, but as I understand after encrypting hash string will be of different length.  So, how to store these passwords in the database? Preserve bash history in multiple terminal windows I consistently have more than one terminal open. Anywhere from two to ten, doing various bits and bobs. Now let's say I restart and open up another set of terminals. Some remember certain things, some forget.  I want a history that:   Remembers everything from every terminal Is instantly accessible from every terminal (eg if I ls in one, switch to another already-running terminal and then press up, ls shows up) Doesn't forget command if there are spaces at the front of the command.   Anything I can do to make bash work more like that? Word for "someone who talks too much" Difference between UART and RS-232? Most of the time  and UART come together in serial communication theories. Are they both the same? From my readings I concluded UART is a hardware form of the RS-232 protocol. Am I correct? Should reputation points expire? While looking at the SO question  It occurred to me that this was an extremely simple question with an extremely simple answer.  And yet, it has garnered the OP thousands in upvote points, simply because he was the first one to ask this question in the early days of SO.  There are many examples of these simple questions and I believe they don't accurately model a user's participation in the SO community.  People shouldn't be getting thousands or even tens of thousands of points from a question just because they were lucky enough to get it in the system a while ago.  Another related issue is that the non-expiring point system rewards users for seniority.  Simply put, the longer you're around SO, the higher your score will be.  While there's some merit to this, it seems to have a disproportionate effect.  So what can we do to limit these effects?  I'm just brainstorming but here are a couple ideas:   Automatically close voting on questions after a certain time period.  Good questions will still be rewarded, but they won't give disproportionately large rewards simply because they are really old questions. Expire users' points after a certain time period.  If you expire users' points after, say 3 months, then this will force them to stay active and their points will be more a reflection of "How much have you participated lately"?  It forces old users to stay active rather than resting on their laurels, and allows junior members a chance to catch up to senior members of the community by putting in a lot of effort.  Currently, there is no chance at all for junior members to ever catch up with senior members and their only 'sin' is that they didn't register 5 years ago. Powershell Rename Multiple Files with LastWriteTime Prefix I am trying to put together a Powershell script that will:  -Search recursively from a root directory -Exclude files with existing "yyyyMMdd " file name prefix -Rename the files not excluded above with ""yyyyMMdd " file name prefix based on their specific LastWriteTime  Note: ideally, this script should include all file type extensions  I have tried myself, but it would seem to be above my head, as my attempts are not going well.  Thanks, in advance.    #StampMe.ps1 param( [string] $fileName)  # Check the file exists if (-not(Test-Path $fileName)) {break}  # Display the original name "Original filename: $fileName"  $fileObj = get-item $fileName  # Get the date $DateStamp = get-date -uformat "%Y-%m-%d@%H-%M-%S"  $extOnly = $fileObj.extension  if ($extOnly.length -eq 0) {    $nameOnly = $fileObj.Name    rename-item "$fileObj" "$nameOnly-$DateStamp"    } else {    $nameOnly = $fileObj.Name.Replace( $fileObj.Extension,'')    rename-item "$fileName" "$nameOnly-$DateStamp$extOnly"    }  # Display the new name "New filename: $nameOnly-$DateStamp$extOnly"   I am hoping to change the line:  $DateStamp = get-date -uformat "%Y-%m-%d@%H-%M-%S"   To be LastWriteTime instead of get-date, but I have no idea how to make this happen.  This code (from another Super User question):  Get-ChildItem "Test.pdf" | Rename-Item -newname {$_.LastWriteTime.toString("yyyyMMdd") + " Test.pdf"}   ...successfully renames a single file, but I can't seem to integrate this into the larger script.    With regards to running the above recursively, I have tried this (also from ):  foreach ($file in get-ChildItem *.* -recurse) { ./StampMe.ps1 $file.name }   Which succeeds to apply the PS script to files in the root directory, but fails to apply to any files in the sub-folder tree that propagates from the root directory. Java: Detect duplicates in ArrayList? How could I go about detecting (returning true/false) whether an ArrayList contains more than one of the same element in Java?  Many thanks, Terry  Edit Forgot to mention that I am not looking to compare "Blocks" with each other but their integer values. Each "block" has an int and this is what makes them different. I find the int of a particular Block by calling a method named "getNum" (e.g. table1[0][2].getNum(); Given two points (defined, for instance using nodes), I want to compute the distance between them.   Is there some build in functionality in tikz to do this? If not, how can it be done using the mathematical engine?   The application I have in mind is to draw an circular arc centered at (a) and passing through some second point (b), where only (a) and (b) are known.