restrictions

Best practice for controlling access to a ".internal" package

I write Eclipse plugins and export some classes as an API while wanting to restrict access to other classes. I follow the common Eclipse practice of separating these classes into a ".internal" subpackage. However, then I can't use "package" or default level access on these classes since many of them need to be used by the classes I'm ...

hibernate restrictions and/or order

Hi, small questions about Restrictions.or and Restrictions.and If I do something like this: ... criterion = criterionA; criterion = Restrictions.and(criterion, criterionB); criterion = Restrictions.or(criterion, criterionC); criterion = Restrictions.and(criterion, criterionD); Will this be treated as: (A and B) or (C and D) (follow...

iPhone UDID restrictions?

On the iPhone, a unique identifier is available which is guaranteed to be unique and is tied to the serial number. This is the one: [[UIDevice currentDevice] uniqueIdentifier] According to the documentation, there are restrictions on using it: "It is guaranteed to be unique for every device but cannot publically be tied to a user acc...

How to send file via FTP and bypass the quota limit?

Hello. My question is : On my server there are limit of max 2MB file sended by FTP. If I send it by some script in PHP, there are no restriction, and I want to send something around 3.8MB. Any ideas? ...

Best strategies to manage file access restrictions on the web?

This is about selling files such as PDF files. Lets say there is a web interface where an administrator can upload files to the server. These files are for later download by clients who have paid for the rights to download these files. How to simply manage restrictions to these files for clients? How to prevent someone who has not paid f...

using detachcriteria & restrictions to equate date

We are using detach criteria and adding restrictions to equate the date. But the problem is the date in the database column contains time as well and i just want to do some query againts the date part. DetachedCriteria query = DetachedCriteria.For<RefundRequestedTicket>(); query.Add(Restrictions.Eq("ValidUntil", findRefundRequestedTicke...

To restrict the access of hard drive

Hi everybody! I'm a newbie for C# programming. I have a system that access a hard drive call -'H'. this system allows the authorised users to delete and modify the files in H drive. Now my qusestion is I want to restrict deletion of files, if the same authorized users try to access the drive H directly without using the above mentioned p...

Strange Behaviour Class Objects Inside Union.

Hi I wanted know the reasons of the following code void main() { class test { public: test(){} int k; }; class test1 { public: test1(){} int k; }; union Test { test t1; test1 t2; }; } For the Above code it gives error "error C2620: union 'Test' : member 't1' has user-defin...

Hibernate Criteria: Left Outer Join with restrictions on both tables

Hi all, I am doing a LEFT OUTER JOIN, but I am only able to apply Restrictions on the first table. Is there a way ti apply on the second table as well? Here is my code: Criteria criteria = this.crudService .initializeCriteria(Applicant.class).setFetchMode("products", FetchMode.JOIN);. This works (applicant has a...

Joomla: What's the Object to get value from current content, if Registered only?

Hi, I need to know if the content being displayed to the user, is for registered only, not public. I think I can't do this trough JDocument or Mainframe, etc. I'm trying to figure this out. Any help on this subject? Thanks for your attention, Have a nice day! ...

A pragmatic view on private vs public

Hello everybody! I've always wondered on the topic of public, protected and private properties. My memory can easily recall times when I had to hack somebody's code, and having the hacked-upon class variables declared as private was always upsetting. Also, there were (more) times I've written a class myself, and had never recognized an...

Winforms: How to prevent vertically resize in VB.NET

Hi, Working with winforms I wonder if there is some way to prevent vertically resize of the form. I would like to allow user to resize form in all directions except vertically.Moreover I would like to allow vertically resize in upward direction, but not downward. I have tried to use maximumsize by setting it to: Me.maximumsize = new si...

FBML on Profile Page - Any Workaround?

I noticed the following restrictions when I tried to hook my facebook application to a profile page [application tabs and profile boxes]. Apparently theses restrictions are not there for a canvas page. 1) No iFrames supported 2) No external scripts 3) No onLoad events [but a close substitute using setTimeOut works in canvas page but not...

Hibernate - Restriction for class in a list

I'm trying to pull back a list of items that have a specific type of item in a set. For example: <class name="Owner" table="OWNER"> <id name="id" column="OWNER_ID" /> <set name="cats" table="OWNER_CATS" lazy="false"> <key column="OWNER_ID" /> <many-to-many class="Cat" /> </set> <class name="Cat" table="CAT" discriminator-v...

How can I restrict the part of a website so that it can be viewed by only one computer at a time?

Using C# Visual Studio 2008 and SQL Server 2005. One database server. One webserver Three clients Webpage name is alpha. Site name is mysite. I want that only one client at a time can view the page alpha. If one is viewing the page and another from another computer tries to view the same page, access is denied. Is there any way to c...

Hibernate restrictions (And / Or)

Hi, small questions about Restrictions. i have query like this : Where A in(1,6) and (B not like 'Value%' or B not like 'ValueII%') the problem is the field B not contains a fixed value, can be one or more. Please, (N)Hibernate experts - help me with this, I cant find a working solution. Any help is greatly appreciated! ...

Adjusting PDF restrictions with PHP

I have a user uploading a PDF to my server, is it possible to adjust the PDF restrictions via PHP to not allow printing, copying, etc? Many thanks. ...

Are there limitations when using unsafe code in .NET?

I see the allow unsafe code option in .NET. Only one of my apps have it set so i can copy an image to a bitmap quickly. Will there be limitations now that i checked off that box? mono seems to run it fine on linux. I dont see any problems so far. ...

What is allowed in Restricted XPaths (constraints)?

I need to apply constraints in a large XML file, like this: <library> <book> <bookAuthor ID="1" nameAlias="PeerBR jr"/> </book> <book> <bookAuthor ID="1"/> </book> </library> <authorCatalogue> <author ID="1" name="PeerBr"/> </authorCatalogue> I need each bookAuthor's ID to refer to a valid author. ...

Hibernate Criteria Projection

Well as the question says, i am trying to make a projection criteria querying only couple of the table attributes. So I have a Person Table/class and it has about 40 attributes i want my criteria to get dynamical number of attributes, lets say 10, 11 or 12.(sql terms "select firstname, lastname from person") and i was doing it like this ...