I am wondering which way is the fastest to deliver images via ASP.net:
//get file path
string filepath = GetFilePath();
Response.TransmitFile(f);
or:
string filepath = GetFilePath();
context.Response.WriteFile(f);
or
Bitmap bmp = GetBitmap()
bmp.Save(Response.OutputStream);
or any other method you can think of
...
Is there is a way to put .mod files, generated by gfortran (GCC), into a separate output directory? I know how to place object files or other output with the -o flag as in:
gfortran -c test.f03 -o /path/to/output/dir/test.o
But the .mod files (which are generated by the above call) are not affected by the -o flag and placed in the curr...
I'm trying to make file I/O over a network drive (likely over a WAN or VPN) as reliable as possible for a native C++ Windows app...
What are the possible error conditions that I need to be able to handle?
How can I simulate these error conditions in testing?
How do I get detailed information on a particular error? For example, if fop...
I am just writing a test file and then i am trying to call a function inside my kernel.
Can somebody tell if i am making a mistake in my makefile or my code??
I wanted to call my int d = add(2, 4); function but the program does not seem to link test.c file with sourceadd2.c.
/* sourceadd2.c */
define KERNEL
define MODULE
include "t...
What is the most efficient to fill a ComboBox with all the registered file types in Windows?
I want the full file type, not just the extension. I'm using VB 9 (VS2008).
Thank you.
...
I would like to create a image uploading service (yes, i am aware of imageshack, photobucket, flickr...etc) :)
I have seen only imageshack show the directory names ("img294", "1646") of where the image is located, in the same way - i would like to do this.
http://img294.imageshack.us/img294/1646/jquery**kd5**.jpg
1) Are there any sec...
How can I find which processes have a specific file opened, and their open, access and share modes? Additionally, is it possible to change these values for a process? Or is it even possible to open a file for reading if it is already opened for exclusive access by another process?
Please note that I don't want to invalidate the handle o...
I am trying to figure out how to write a new line of text at the beginning of a file (a header). I know I can open the file, or seek to the beginning of a file, but if I write with that, it will overwrite what's there. Do I have to write a new file and then write the other data to it line by line, or is there a better way?
Example file:...
I have a name in a database, lets say its "DFectuoso" and some legacy system stored DFectuoso_randomnameofafile.doc.
Now I want to find all the filed "DFectuoso" owns and display links to them in a PHP page.
What would be the way to start on this?
...
The Windows file-systems (FAT, NTFS) do not care about the case of file names (case-insensitive). Consequently programs - like the Apache web server - running on windows handle file case-insenstive.
When you create web sites on Windows you inadvertently create links, etc. that do not match the case of the actual file name. You usually n...
I have a listview with 4 columns - Name, Extension, Size and Location. I have a method that takes the file size in bytes and converts to KB, MB, GB, etc as needed. An example output would be a 1024 byte file which is printed as "1KB". This value is then placed in the listview.
What I need to do is sort the size column intelligently. Rig...
I want to both backup my Xampp directory and also transfer it to another computer.
Is there an easy way to do this?
When I try to copy it, it gives me a restriction, even though I am not running xampp at the time.
Thank you!
...
Would this work on all platforms? i know windows does \r\n, and remember hearing mac does \r while linux did \n. I ran this code on windows so it seems fine, but do any of you know if its cross platform?
while 1:
line = f.readline()
if line == "":
break
line = line[:-1]
print "\"" + line + "\""
...
I'm using Python 2.6 to read latin2 encoded file with windows line endings ('\r\n').
import codecs
file = codecs.open('stackoverflow_secrets.txt', encoding='latin2', mode='rt')
line = file.readline()
print(repr(line))
outputs : u'login: yabcok\n'
file = codecs.open('stackoverflow_secrets.txt', encoding='latin2', mode='r')
line = fil...
So, I am working on this web based app following the Repository model, a wannabe DDD dork, using StructureMap.... blah, blah, blah...
One aspect of the application allows users to upload and manage files.
Where, what layer, should be responsible for managing the saving/ deleting of these user files?
The Business Layer,
or the Data Ac...
Is it possible via any Unix utility to read chunks of a remote file (like say 'head' does) instead of transferring the whole file ?
...
I want to delete every "_svn" in every folder and subfolder...
For example
c:\
proyect1
_svn
images
_svn
banner
_svn
buttons
_svn
Then I run something like
rm-recurse c:\proyect1 _svn
And I should get:
c:\
proyect1
images
banner
buttons
The ideal thing would be a tiny stan...
I've been trying to get this code to work for hours! All I need to do is open a file to see if it is real and readable. I'm new to C so I'm sure there is something stupid I'm missing. Here is the code (shorthand, but copied):
#include <stdio.h>
main() {
char fpath[200];
char file = "/test/file.this";
sprintf(fpath,"~cs43...
Any online C compiler that you know which can do the following:
Compile and execute the C programs online
File handling
System functions like exec(), system(), fork()
Or any compiler which does not need installation procedure (I mean that you can just copy paste a folder to run the compiler easily)
Note:Please do not propose Turbo C...
Given a collection of files which will have associated metadata, what are the recommended methods for storing this metadata?
Some files formats support storing metadata internally (EXIF,ID3,etc), but not all file formats support this, so what are more general options?
Some of the metadata would almost certainly be unique (titles/descri...