files

How two merge several .csv files horizontally with python?

Hey, I've several .csv files (~10) and need to merge them together into a single file horizontally. Each file has the same number of rows (~300) and 4 header lines which are not necessarily identical, but should not be merged (only take the header lines from the first .csv file). The tokens in the lines are comma separated with no space...

C# - Check filename ends with certain word

Hi I would like to know how to validate a filename in C# to check that it ends with a certain word (not just contains but is located at the end of the filename) e.g I want to modify certain files that end with the suffix Supplier so I want to validate each file to test if it ends with Supplier, so LondonSupplier.txt, ManchesterSupplier....

How can I retrieve files from an iPad development tool app?

I'm not sure how best to word the Title of this, so if someone can suggest a better one, please feel free to edit. I'm writing an app for iPad that requires me to create some of the app data files with the iPad itself during development, i.e. a tool I am building with the iPad will be used by the developers themselves to create sample f...

Where does the "type" come from in $_FILES?

when you upload files, you can then get the necessary data from $_FILES files contains the list of file inputs, where each one has a field like [type] for example: Array ( [file1] => Array ( [name] => 'MyFile.txt' [type] => text/plain //where does this come from? [tmp_name] => /tmp/php/p...

which is best, either fetching from another PHP file or from mysql db in PHP?

i have a module called online events in my website, this module will run for every 8 sec and fetches a recent activities in my websites. So, if more than 100 users are using my website at a time, it consumes more memory and more cpu usuage. what should i do to reduce cpu usage and memory, provided it should not affect a online events mod...

Why is this batch file producing extra, unexpected, unwanted characters?

I'm trying to use the following batch script to concatenate some files together: copy NUL bin\translate.js for %%f in (source\Libraries\sprintf.js, source\translate-namespace.js, source\util.js, source\translator.js, source\translate.js) do ( type %%f >> bin\translate.js echo. >> bin\translate.js ) However, when I do this, an ...

What language resource files are used in different programming languages/frameworks?

As the question suggests, I would like to know as many different language resource file name & formats as possible based on the programming language. For example, in .net we have the .resx files in an XML format. Thank you ...

Unpack, modify and re-pack files in an MSI?

I'm trying to figure out the easiest and most secure way to Authenticode sign binaries in one of my projects. The easiest way I can see to do this is to grab the result of compilation--a completed install package containing all my binaries--extract the assemblies from it, sign them, then repack these signed assemblies in the MSI which t...

Asynchronous file transfer in ASP.Net Chat Application (peer to peer)

Hello I've developed a chat application using WCF/ASp.net. I want to asynchronously transfer a file from one chat user to another chat user. What is best approach for this? here are my insights/doubts Do i need a central server between two users to assist the file transfer? Can i create a direct channel without a central server? Do i...

Merge multiple doc or rtf files into a single doc or rtf file by using php script

Hi all, I would like to merge multiple doc or rtf files into a single file which should be the same format of multiple files. What I mean is that if a user selects multiple rtf template files from a list box and clicks on a button on web page, the output should be a single rtf file which combines multiple rtf template files, I should us...

Protect files with asp.net forms authentication

I'm using Asp.net running on a shared hosting environment. I'm using forms authentication to authenticate users. Now I need to add support for the users to create pdfs and images and save them on the server. The problem is that I need to protect the pdf/image created so only the user that created the file can use it, so it is protected f...

log4net problem : logging message in 2 log files at the same time when assembly has log statemet

I have a class library ABC where I have written logs using log4net.dll (Debug(),Error() methods). Path for log file is c:\abc\ab.log Now, I am referring the ABC.dll to my project TestSample. In this project I am logging messages again. Path for log file is c:\testlogs\logfile.log I am using log4net.dll 1.2.10 version for both projects. ...

Django FileField encoding

I have a django model as follows: class ExportFile(BaseExportFile): created_timestamp = models.DateTimeField(auto_now=True, editable=False) data = models.FileField(upload_to='exports') and a view function that renders a template to create a csv file: def create_csv(request): context = Context({'data': MyModel.object...

temporary image file in ruby

hi i would like to know how I can create a temporary file image (png) in ruby, because tempfile only gets you a random file name but it doesn't have an extension file. ...