I need to use the tmpnam function in C++, but I need to know about its thread safety. Namely, If I have several threads which will each need to acquire a different name for a temporary file, am I guaranteed that each thread will receive a file with a different name?
...
Hi when building my application I am getting some temporary files shown in Solution Explorer under Miscellaneous Files lie App_Web_YDKG.VB with following code block in that generating error
Protected ReadOnly Property Profile() As System.Web.Profile.DefaultProfile
Get
Return CType(Me.Context.Profile,System.Web.Profile.Defaul...
The temporary directory that's used by ASP.NET is usually located under
C:\Windows\Microsoft.NET\Framework\<version>\Temporary ASP.NET Files\
Sometimes however it is overridden by the tempDirectory attribute on the compilation element in the web.config file.
How can I get the temporary directory currently used by ASP.NET regardless if...
The official documentation for TemporaryFile reads:
The mode parameter defaults to 'w+b'
so that the file created can be read
and written without being closed.
Yet, the below code does not work as expected:
import tempfile
def play_with_fd():
with tempfile.TemporaryFile() as f:
f.write('test data\n')
f.wri...
I'm developing a Django project where I need to serve temporary images, which are generated online. The sessions should be anonymous; anyone should be able to use the service. The images should be destroyed when the session expires or closes.
I don't know, however, what's the best approach. For instance, I could use file-based sessions ...
Our program has an option for users to export data into an access database. The user then downloads the database and uses this for reporting, so on and so forth.
Recently, we upgraded to Office 2007, and in testing, when downloading this database, we get the error message:
"Cannot open database "filename" It may not be a database ...
My question is about handling temporary files in a small .NET program. This program/utility just does the following with two URLs:
Download each URL to a string (WebClient.DownloadString).
Save each string to a temporary file.
Call WinMerge (Process.Start) to diff the two files (in read-only mode for both files).
I currently have the ...
Hey, i am looking for a method to creat temporay thumb file in PHP. Is there any way not to store the image on the server or delete them right after. What I am looking for is a solution like this: http://www.dig2go.com/index.php?shopbilde=772&type=1&size=120
Could some one explain to me how the php code behind this works? For th...
I've set the OutputPath, IntermediateOutputPath, and BaseIntermediateOutputPath tags in all my csproj files. Despite that, Visual Studio creates extra "obj" folders in my source directories. As far as I can tell, it creates the directory obj\Debug\TempPE and then leaves it empty.
I don't mind Visual Studio creating all sorts of crap, bu...
I'm creating an online game in PHP where users can create playable characters. Each character can have a user-uploaded portrait. A player can simultaneously have multiple characters, and the pictures for them can be changed anytime. Naturally, the pictures have to be resized and re-compressed to avoid huge files. Here's my problem:
When...
I need to create some bitmaps and save them to the file system. For some reason the MScharting system wants it's background files supplies as paths in string form.
I'm dynamically creating the background image, although only a few times.
What's the best way to create these files and then clean them up?
...
hi,
my situation: i have a file based sqlite db and want to have all temporary stuff done in memory (temp databases for large queries, etc). i tried using the PRAGMA temp_store = 2 command, but i am not 100% sure if it really does what i want. the strange thing is that while debugging i still reach the function winGetTempname which open...
Hi All,
I need to backup (for debugging) some temporary files meanwhile a program running. I used to do it with rsync-ing the /var/tmp/someprogram directory with find . -iname 'blahblah' -exec rsync -someoptions $DESTdir, which works wonderful.
Except the case of someone in some program (for which I don't have source code access, and n...
Before I describe my problem, here is a description of the program (IHExplorer.exe) I'm writting:
This is a C++ application.
The IHExplorer application is to look as much like a Windows Explorer window as possible. With one exception, and that is that launching files from within this Explorer window will decrypt them first to the user'...
To be a little more specific:
I've built a simple multithreaded TCPServer (Java) which communicates with clients (C# / mono). On request the Clients take a screenshot and send it to the Server.
The screenshots are then displayed in a JTable. I'd like to add a tooltip to these images in the table with the same image but in another size.
T...
I have an application written in Python that's writing large amounts of data to the %TEMP% folder. Oddly, every once and awhile, it dies, returning IOError: [Errno 28] No space left on device. The drive has plenty of free space, %TEMP% is not its own partition, I'm an administrator, and the system has no quotas.
Does Windows artificia...
Hi all,
I found myself passing InputStream/OutputStream objects around my application modules.
I'm wondering if it's better to - save the content to disk and pass something like a Resource between the various methods calls - use a byte[] array instead of having to deal with streams everytime.
What's your approach in these situatio...
The code below does its work but leaves copies of the font file in the temp directory each time it is run. These files are named +~JF7154903081130224445.tmp where the number seems random for each created file.
InputStream fontStream = this.getClass().getResourceAsStream("handsean.ttf");
Font baseFont = Font.createFont(Font.TRUETYPE_FONT...
Hi all,
I am writing a anti-leeching download script, and my plan is to create a temporary file, which is named by session ID, then after the session expires, the file will be automatically deleted. Is it possible ? And can you give me some tips how to do that in PHP ?
Thanks so much for any reply
...
I'd like to generate a dynamic Excel file on request from Django. The library pyExcelerator does this, but I haven't found any way to use the contents of the Excel file without generating a server-side temporary Excel file, reading it, using its contents and deleting it.
The problem is that pyExcelerator only way to extract the contents...