files

COM OCX registration - 2 DLL's with same name

Hi, I have a native app that has an .OCX file that needs to be registered for it to be used in a .NET application. Now currently there's different versions of this .OCX on the machine. Can someone please explain how this can affect the registration of this new (updated) .OCX file registration? And how does my .NET app know which ob...

Image upload storage strategies

When a user uploads an image to my site, the image goes through this process; user uploads pic store pic metadata in db, giving the image a unique id async image processing (thumbnail creation, cropping, etc) all images are stored in the same uploads folder So far the site is pretty small, and there are only ~200,000 images in the u...

Problem with unlink() in php!

I'm creating a temp image always named 1.png under specific folder and once i read the image_contents and process, i use unlink() to delete that specific image from that folder. But sometimes the image file is not deleted and the same image is file is read and processed. That script is working otherwise fine... There is no permission...

Directory Search

This is a simple question and I am sure you C# Pros know it. If you want to grab the contents of a directory on a hard drive (local or otherwise) in a C Sharp program, how do you go about it? ...

Remove an element from an xml File using jdom

I have a 300 KB xml file with 70 elements in it. I need to be efficient upon removing one of the root's elements. What is the best approach? Should I detach the element in memory, save it and overwrite it by moving it? Is there a better option? I like org.jdom but any improvement is welcome ...

Getting page by GET, then submiting form

Hi there. I need to get one page (can be cURL, or filegetcontent), get some info from it, then submit form on same page. I don't want to reload page, becouse some things will change. How to do it? Thanks ...

PHP: csv generator creates extra field

I'm coding a script that takes one csv file to transform it into another one. Basically, two foreach loops are used: one to iterate records and another to iterate fields. Certain fields (cno 25, 26, 44) for each record needs to be modified. The problem is that each modificatino creates an extra empty field, i.e. the code $colStr .= '"' ...

C# - Problem while listing directories - DirectoryNotFoundException

I'm getting a "DirectoryNotFoundException" error, here is the code: string directorio = "D:\MUSICA\La Trampa - El Mísero Espiral De Encanto"; DirectoryInfo dir = new DirectoryInfo(directorio); DirectoryInfo[] dirs = dir.GetDirectories(); <------------This is the line I'm having this problem. I believe it's caused when it tries to pars...

Suggestions for duplicate file finder algorithm (using C)

Hello, I wanted to write a program that test if two files are duplicates (have exactly the same content). First I test if the files have the same sizes, and if they have i start to compare their contents. My first idea, was to "split" the files into fixed size blocks, then start a thread for every block, fseek to startup character of ev...

php & mySQL: Storing doc, xls, zip, etc. with limited access and archiving

Hi all, In my application, I have a provision for users to upload files like doc, xls, zip, etc. I would like to know how to store these files on my website and have only restricted people access it. I may have a group of people and let only these group access those uploaded files. I know that some may try to just copy the link to the d...

communicating swf files.

I have two swf files I would like communicate. I have a videoplaylist.swf and a player.swf. I would like to select a video from videoplaylist.swf and have it played in the player.swf. How do I do that? How am I going to dispatch the click event with the video url to the player.swf? from the videoplaylist.swf. Please help. ...

Git: copy all files in a directory from another branch

How do I copy all files in a directory from another branch? I can list all of the files in that directory by doing git ls-tree master:dirname I can then copy all of the files individually by doing git checkout master -- dirname/filename However, using wildcards has so far been a total fail. git checkout master -- dirname/*.png ...

ClickOnce Application Files dialog filename problem

In the ClickOnce "Application Files" files dialog, most of the entries for files are listed with the name "C". I have seen this on a colleague's machine for a different project as well. Has anyone else seen this and is there a way to get the correct filename inserted? We are both using VS 2008. ...

Flex SDK 3.5 - Check file magic number

Related to: Flex SDK 3.5 - Check file mimetype Is there a way to get a file's magic number in Flex SDK 3.5 in order to get the file type? ...

cant download youtube video

I'm having trouble retrieving the youtube video automatically, heres the code. The problem is the last part. download = urllib.request.urlopen(download_url).read() # Youtube video download script # 10n1z3d[at]w[dot]cn import urllib.request import sys print("\n--------------------------") print (" Youtube Video ...

Trying to cat files - unrecognized wildcard

Hello, I am trying to create a file that contains all of the code of an app. I have created a file called catlist.txt so that the files are added in the order I need them. A snippet of my catlist.txt: app/controllers/application_controller.rb app/views/layouts/* app/models/account.rb app/controllers/accounts_controller.rb app/vie...

Django: Serving a Download in a Generic View

So I want to serve a couple of mp3s from a folder in /home/username/music. I didn't think this would be such a big deal but I am a bit confused on how to do it using generic views and my own url. urls.py url(r'^song/(?P<song_id>\d+)/download/$', song_download, name='song_download'), The example I am following is found in the generic...

Prepending to a multi-gigabyte file.

What would be the most performant way to prepend a single character to a multi-gigabyte file (in my practical case, a 40GB file). There is no limitation on the implementation to do this. Meaning it can be through a tool, a shell script, a program in any programming language, ... ...

Open a file in a running java jar.

If I have a jar file that is running, what is the best way for it to handle the opening of launched files to it - is there any cross platform way of doing this or would I have to make it a native application via something like JSmooth first (would like to avoid as much as possible)? Say the jar file is running and is associated with tex...

Clearing content of text file using C#

How can I clear the content of a text file using C# ? ...