A set of limiting conditions or measures to delimit the behavior of software.
Questions tagged [restrictions]
232 questions
73
votes
2 answers
Hibernate Criteria Restrictions AND / OR combination
How would I achieve this using Hibernate Restrictions?
(((A='X') and (B in('X',Y))) or ((A='Y') and (B='Z')))

girishsovflow
- 735
- 1
- 6
- 5
19
votes
5 answers
How can I detect if camera is restricted by user
I'm doing an ios app with a button that launch the camera.
I want to enable/disable the button if the device has a camera available or not.
I want to detect if the device has a camera and also when the device has camera but it's restricted (with…

A.Vila
- 1,456
- 4
- 21
- 32
17
votes
3 answers
Hibernate Restrictions.in vs. Disjunction
Other than less code, what is the difference between the following two approaches to building an IN clause using the Hibernate Criteria API? Are there performance concerns? Is there some logic in the retrieval I am missing? They both seem to…

sma
- 9,449
- 8
- 51
- 80
15
votes
1 answer
Dart: extends generic class with restrictions
Is this the correct way to declare a "generic class" that extends another "generic class" in dart? Note that the generic parameter has a type restriction.
// available types
class BaseType {}
class DerivedType extends BaseType {}
class…

Cequiel
- 3,505
- 6
- 27
- 44
11
votes
2 answers
Restrict generic parameter on interface to subclass
The following is contrived, but bear with me:
interface Clonable
{
TSubClass Clone();
}
How can I restrict TSubClass to be of the implementing type?
i.e only let the implementor do this:
class Dog : Clonable
{
Dog Clone()
…

sheamus
- 3,001
- 4
- 31
- 54
10
votes
1 answer
Hibernate: Criteria with collections
I have a problem with hibernate and criterias. I have two Classes:
public class Place{
long id;
String name;
Set streets;
}
public class Street{
long id;
String name;
Place place;
}
I now want to write a method…

PhilippBüch
- 127
- 1
- 1
- 7
8
votes
5 answers
shuffling a list with restrictions in Python
I have a problem with randomizing a list with restrictions in Python (3). I have seen a few other questions relating to this, but none of them really seem to solve my problem. I'm a beginner, so any help is much appreciated!
I'm designing an…

Frederik
- 101
- 1
- 6
8
votes
1 answer
OWL restrictions - defining classes that only contains properties with a specific property value
I'm currently playing a bit with the OWL and especially with restrictions. I'm trying to create a query that does the following:
Suppose that I have a class 'Cinema' that has a property 'movies' (that contains objects of type 'Movie'). The class…

Devos50
- 2,025
- 4
- 25
- 56
7
votes
3 answers
wordpress show only media user has uploaded in wp_editor
I'm creating a wordpress site where the registered user has the ability to create his own post via wp_editor() on the frontend, but just one post.
Now I want to restrict the user to be able to only see his uploaded media. I use the following script…

Sebsemillia
- 9,366
- 2
- 55
- 70
5
votes
3 answers
Updating Configuration Profile installed in iOS device in MDM
I want to send a configuration payload to a device.
Eg. I want to send a restriction payload (Disallow safari) to a particular device.
i.e. I want to update the configuration profile installed on the device.
Do I need to send this configuration…

Manmay
- 539
- 2
- 12
- 28
5
votes
2 answers
Plone Folder Restrictions
In Plone, I created a new folder called "Admin" that appears at the top navigation bar. How do I restrict access to this folder so only site administrators will have access to this folder? (and, preferably, only those admins would see that link…

lightningmanic
- 2,025
- 5
- 20
- 41
5
votes
1 answer
MIPS memory restrictions?
I would like to ask about memory accessing. When I execute a load word command, what memory restrictions exist? Meaning what's the biggest number I can use as offset or base register?
Registers are 32 bits and as far as I know the "immediate" is 16…

Elias
- 53
- 1
- 5
5
votes
2 answers
Java 1.7.51 internet restrictions for applets
In the previous months I developed a sandbox Java applet for an academic project. I wasn't able to sign it with a trusted Certificate Authority because of the restricted budget.
With the release of Java 1.7.51 I found that the new security…

Carlos
- 71
- 1
- 7
5
votes
2 answers
Erlang records with both type and value restrictions as well as default values
I am trying to write a record which represents a bank account:
-record(account, { name :: atom(),
type :: atom(),
balance = 0 :: integer() }).
I also want to restrict the balance to always be >= 0. How do I…

2rs2ts
- 10,662
- 10
- 51
- 95
5
votes
1 answer
Hibernate alias to a simple boolean field
I am struggling with the Hibernate Criteria API.
In class Conversation I have:
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
@JoinTable(name = "Conversation_ConversationParticipants",
joinColumns = @JoinColumn(name =…

Boris Horvat
- 563
- 2
- 13
- 28