In my project i have created a file upload.Now it is required that any exe file or exe file in a zip folder having .zip as extension, be prevented from being uploaded.
Can someoe suggest me a solution?
hi friend i m getting that error can any one plz help
'System.Windows.Forms.DataGridViewSelectedCellCollection' does not contain a definition for 'Cast' and no extension method 'Cast' accepting a first argument of type 'System.Windows.Forms.DataGridViewSelectedCellCollection' could be found (are you missing a using directive or an assembly reference?)
I am using wamp, PHP 5.4 running on win 8,
I can't seem to get PHP to acknowledge the memcache dll.
I download php_memcache-3.0.8-5.4-ts-vc9-x86.zip (the only one I could find).
I copied the dll to C:\wamp\bin\php\php5.4.12\ext
I added extension=php_memcache.dll
restart the server.
but still I cannot use memcache, and it is missing from Loaded Extensions list.
Please supply a step-by-step instruction on how to set this up,
Thanks.
Hello, i am new in programming under linux and trying to get working this code:
http://scaryreasoner.wordpress.com/2007/11/17/using-ld_preload-libraries-and-glibc-backtrace-function-for-debugging/
but getting error: "ERROR: ld.so: object 'libwrap_ioctl.so' from LD_PRELOAD cannot be preloaded: ignored."
what can cause it?
system - Archlinux, kernel 2.6.32
thank you for answers
upd1:
"Check with ldd libwrap_ioctl.so if some dependency of this library is missing."
checked. no, i have all needed libraries
I generally have ignored using macros while writing in C but I think I know fundamentals about them. While i was reading the source code of list in linux kernel, i saw something like that:
#define LIST_HEAD_INIT(name) { &(name), &(name) }
#define LIST_HEAD(name) \
struct list_head name = LIST_HEAD_INIT(name)
(You can access the remaining part of the code from here.)
I didn't understand the function of ampersands(I don't think they are the address of operands here) in LIST_HEAD_INIT and so the use of LIST_HEAD_INIT in the code. I'd appreciate if someone can enlighten me.
i have a litle project for which i would like to remove all files outside of and not needed by the c:\windows operating system. therefore i need to create a list of what i want to keep i.e. boot.ini c:\windows etc and then delete everything else. i have seen examples using forFile, but i can be sure that extension will be on the machine. does anyone have any ideas how i can create the exclude list and then do the delete?
My question is: can i have 2 repositories without losing my original repository.
Lets say i want the the eclair source repository
repo init -u
git://android.git.kernel.org/platform/manifest.git
-b eclair
(already synced and working)
and i would also like to sync with cyanogens repository
repo init -u
git://github.com/cyanogen/android.git
-b eclair
All i basically want to do is have both repositories without altering or messing up the original.
thanks.
I have a folder full of files and i want to search some string inside them. The issue is that some files may be zip,exe,ogg,etc.
Can i check somehow what kind of file is it so i only open and search through txt, php, etc files.
I can't rely on the file extension.
Is it possible to write a regular expression for finding a typical file matching pattern.
e.g. File<13/04/2010.txt should be picked up and not any other file.
i.e. Starting file name will be File followed by some dates and then the file extension.
If so, can we specify this pattern in the config file?
Looking for the solution in C#
Thanks
I have a rather complete application based on sinatra. I feel in need for an easy to integrate forum module (code, extension, etc.). Running a parallel Rails application is not an option on my tiny VPS plan (I even use redis to keep a small footprint). A sinatra based forum would be great news. Thanks
Does the 'gaussian' filter in MatLab convolve the image with the Gaussian kernel? Also, how do you choose the parameters hsize (size of filter) and sigma? What do you base it on? etc
How to get PIDs of processes that are using a given file name and mutex name?
(Not by custom kernel driver, but in C# in user mode.)
UPDATE: Thanks to Daniel Renshaw I found a script that lists all handles with PIDs. (Using a not undocumented and unfrozen functions.)
I am profiling a C program using Mac's Shark which shows that some of CPU time goes to "blkclr" in "mach_kernel". What does this kernel function do? I speculate it is related to memory allocation, but I am not sure. I have googled for some time, but could not find the answer, either. Does someone know this? Thanks in advance.
Is it possible to have VIM auto populate a file based on the extension?
For example, when I open a new .sh file, I would like VIM to automatically type
#!/bin/bash
as the first line. (This example simplified down to the essentials)
I would like to create a batch file to rename all the files with extension ".log" in a folder to append with today's date.
For example :
App.log will be appended to App.log06112010
where date is 06112010.
Please suggest
My .htaccess file is as follows:
Options -Multiviews
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php
It works, but I'm wondering how it works. For example, if I type in example.com/main, I get the file at www.example.com/main.php. How do I get the .php extension if the code tells the rewriting to stop after adding the www. to the beginning of example.com?
Right now I am using an extension to linq to provide me with the functionality of Contains. I call the WhereIn like this:
Answers = Answers.WhereIn(x => x.category.catid, catSTRarray);
Is there a built in function within entity framework to use?
I have a partial view that I use for editing and creating my models. When a user is editing the model, I would like a particular drop-down to be rendered as text as I don't want them to change it. A read-only drop-down would suffice, but I'd prefer text.
I'm thinking I can accomplish this via an extension method, but I'm not quite sure how to get started. Any help would be appreciated!
Hi.
I'm about to build an app that has a database of places that has a location (lon/lat) and i'm about to build the dataModel.
Actualy the app is very simple and all i want is to be able to fetch all places around the user (say in a radius of 30miles).
Is it better to user SQLite (is there any geo-spatial extension out there)?
I'll have around 5000 places in the database and i'm wondering where i can ask a database without affecting performances.
(SquashFS is a compressed filesystem - http://en.wikipedia.org/wiki/SquashFS)
I'm looking for a way to read a SquashFS filesystem from a program. So far, I've know about the in-kernel drivers for it, but I'm sure that a userspace library for it must exist somewhere. Any language would be fine, but C is preferred.
Just mounting the filesystem and using it that way is technically possible, but I'd rather avoid that route because the application I'm looking at would involve working with at least a few dozen archives at any given time.
In my application,I have an option of adding files to a list..were it will let the user to select multiple files at the same..am using CFileDialog to do tis and I enabled OFN_MULTISELECT (for multiselect)...The problem am facing is,When I try to add a shortcut file..its not taking the actual shortcut path,its reffering to the actual path.Actually I wanted to avoid shortcut file being added to my list,but every shortcut file that is being added does not have the extension ".lnk"(i dont know the reason).
So,is there any way that we can neglect the shortcut file being added.
class UserClass{
#region Class properties which are binding from DB
.
.
.
#endregion
#region Constructor Methods
public UserClass(int _iUser_id)
{
// of course this is wrong but how can i quickly set properties
// which are coming from DB by extension method over context class?
this = DAO.context.GetById<UserClass>(_iUser_id);
}
#endregion
}
Is it possible on an IIS to redirect all files with the file extension .asp to one single file (i.e. switch.php, switch.cfm) and how?
Thx in advance for the upcoming solutions :)
EDIT:
version of IIS is "IIS 6.0"
I am writing a python script that downloads a file given by a URL. Unfortuneatly the URL is in the form of a PHP script i.e. www.website.com/generatefilename.php?file=5233
If you visit the link in a browser, you are prompted to download the actual file and extension. I need to send this link to the downloader, but I can't send the downloader the PHP link.
How would I get the full file name in a usable variable?
Should it be all fields, including super-fields, of a purposively immutable java class 'final' in order to be thread-safe or is it enough to have no modifier methods?
Suppose I have a POJO with non-final fields where all fields are type of some immutable class. This POJO has getters-setters, and a constructor wich sets some initial value. If I extend this POJO with knocking out modifier methods, thus making it immutable, will extension class be thread-safe?