restrict

Restricting access to page unless coming from a specific page

Hi there, I'm trying to figure out how to restrict access to a page unless the page is navigated to from a specific "gate" page. Essentially I want the page to be unaccessible unless you're coming from the page that comes before it in my sitemap. I'm not certain this is even possible. If possible, can you limit your suggestions to using...

How do I protect python code?

I am developing a piece of software in python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time restricted license file. If we distribute the .py files or even .pyc files it will be easy to (decompile), and remove the code that checks the license file. Another aspect i...

SQL 2005 sql login ip restriction

Is there a way to restrict a specific sql 2005 login on a Microsoft SQL Server 2005, standard version (sql is in mixed mode) to specific IP adresses, while other logins, windows authentated ones, are unaffected? ...

Restricting T to string and int?

I have build myself a generic collection class which is defined like this. public class StatisticItemHits<T>{...} This class can be used with int and string values only. However this public class StatisticItemHits<T> where T : string, int {...} Won't compile. what am I doing wrong? ...

Realistic usage of the C99 'restrict' keyword?

I was browsing through some documentation and questions/answers and saw it mentioned. I read a brief description, stating that it would be basically a promise from the programmer that the pointer won't be used to point somewhere else. Can anyone offer some realistic cases where its worth actually using this? ...

What does the restrict keyword mean in C++?

I was always unsure, what does the restrict keyword mean in C++? Does it mean the two or more pointer given to the function does not overlap? What else does it mean? ...

When to use restrict and when not to

I have a general understanding of restrict but I'm hoping to clarify some fine points. I have a function that reads a null-terminated string from one buffer and writes out a URL encoded version in another buffer. The function has this signature (currently without restrict): char const *StringUrlEncode(char const *unencoded, ...

restrict-edness with pre-c99

Considering this code, VC9 doesn't detect aliasing : typedef struct { int x, y; } vec_t; void rotate_cw(vec_t const *from, vec_t *to) { /* Notice x depends on y and vice versa */ to->x = from->y; to->y = -from->x; } /* ... */ vec_t a, b; rotate_cw(&a, &b); /* OK, no aliasing */ rotate_cw(&a...

Adobe Flex - Textinput messing up with commas

In Adobe Flex, I'm trying to restrict the input to allow the user to type only a list of IP addresses, separated by a space or a comma. Currently, I have: I expected it to be able to enter all alpha-numeric characters, periods, colons, spaces and commas. However, the commas I cannot be entered, unless the first character is a comma. ...

Restrict Certain Java Code in a Plug-in

Hi, I am creating an application which uses the Java Plugin Framework to load plug-ins and intergrate them into the program. My question is: Is there anyway restrict certain operations (such as starting a new process) in the plug-ins? What I have in mind is something like Java WebStart, i.e when the application wants to access the File...

How can I use outlook restict method to filter the Outlook Items on LastModificationDateTime including Seconds Part of DateTime?

I was reading http://msdn.microsoft.com/en-us/library/bb611267.aspx but I need to use DateTimeObje.ToString("g") for Restrict Method I tried several other format but still it throws exception for other formats. can any one has idea how can I get the outlook Items filter based on Full DateTime Part. ?? ...

Restricting using strong named dlls functionality

Hi, I'm trying to think of a way that prevent others using your published dlls, for example let's say you create a cool light weight winui photo processing tool that's separated into several assemblies. one of them is your precious filters.dll assembly that basically does all of the core filtering work. Once you publish your application,...

error using restrict keyword

In the following example: void foo (double *ptr) { const double * restrict const restr_ptr=ptr; } I get this error: error: expected a ";" const double * restrict const restr_ptr=ptr; ^ I compile with -std=c99, using gcc 3.4 Any Ideas? ...

What are the semantics of C99's "restrict" with regards to pointers to pointers?

I am doing lots of matrix arithmetic and would like to take advantage of C99's restrict pointer qualifier. I'd like to setup my matrices as pointers to pointers to allow for easy subscripting, like so: int **A = malloc (ncols * sizeof(int *)); A[0] = malloc (nrows * ncols * sizof(int)); for (int i=1; i < ncols; i++) { A[i] = A[0] +...

restrict url access in JSP

I have a site that uses forms and validates fields and redirects to another pages etc, but I need to know how to keep any user from access a page directly with the URL and it gets redirectionated to the login form... I've seen this, but I don't know how to call it. :S I think it's with session variables, and that I should check for a s...

What can human beings make out of the restrict qualifier?

If I got the C99 restrict keyword right, qualifying a pointer with it is a promise made that the data it references won't be modified behind the compiler's back through aliasing. By contrast, the way I understand the const qualifier is as compiler-enforced documentation that a given object won't be modified behind the back of a human be...

HTTP authenticate a file download ... how to? [SOLVED]

In my website I've a php script that launches a file download without showing the full path of the file, the code look like this: $path = '../examples/test.zip'; $type = "application/zip"; header("Expires: 0"); header("Pragma: no-cache"); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: pre-check=0, ...

Restrict file types on droplet.

This question isn't limited to people who know AppleScript, if you do Cocoa, etc., you should know the answer to this: I'm making a droplet in AppleScript that compresses JavaScript files, so obviously, I only want JavaScript files to be allowed into the scripts. Any ideas? Thanks so much. ...

How can i restrict the behavior of a Windows service?

How can i restrict the behavior of a Windows service? ...

Does the restrict keyword provide significant anti-aliasing benefits in gcc / g++

Has anyone seen any numbers / analysis on whether or not use of the C / C++ restrict keyword in gcc / g++ actual provides any significant performance boost in reality ( and not just in theory )? I've read various articles recommending / disparaging it's use, but I haven't ran across any real numbers practically demonstrating either side...