Questions tagged [restriction]

A restriction is anything that constrains or limits the code in some fashion.

Restriction is a very broad tag that denotes a requirement to restrict the code in some fashion.

706 questions
6
votes
1 answer

Restrict access to Node.js using Express

I do have a running node.js script located in a server. What i want is that it doesn't get directly accessed from browser and also i want that only certain domains/IP-s can call it! Is it possible?!
J Mon
  • 89
  • 1
  • 3
6
votes
1 answer

Rails Geocoder restrict region/country

I would like to restrict my search for latitude/long. for a specific region (i.e. New Zealand). Google provides some parameters that can be set to achieve the results, such as : 'componentsRestriction' and 'region'. I tried to set the same thing in…
Ar Thur
  • 61
  • 3
6
votes
5 answers

Restrictons of Python compared to Ruby: lambda's

I was going over some pages from WikiVS, that I quote from: because lambdas in Python are restricted to expressions and cannot contain statements I would like to know what would be a good example (or more) where this restriction would be,…
Shyam
  • 2,357
  • 8
  • 32
  • 44
6
votes
7 answers

Restrict input to number only on pasting

I have an input filed with a class called restrict-numbers which i want to restrict the entered characters to only accept numbers, i used the following code which is great but the problem that i want to make the same restriction works with pasting…
TSL
  • 63
  • 1
  • 1
  • 6
6
votes
1 answer

How to protect static files in a single page app with node.js

Iam plan to develop a website with a public area and a private area. Both areas of the site will be separate single page apps implemented with AngularJS. I use Node.js to create a REST Web Service for the front-end. The private area can only be…
tschiela
  • 5,231
  • 4
  • 28
  • 35
6
votes
3 answers

Eclipse 3.5.1 Compiler Error :The type OutputFormat is not accessible due to restriction on required library ../rt.jar

This error is weird and i cannot make much sense of it. I've installed EclipseRCP 3.5.1, Java SE 1.6 update 16 and switched to SWT 3.5. I've created a new project, set up the dependencies and tried to compile. When trying to import, use the…
hypercube
  • 958
  • 2
  • 16
  • 34
6
votes
2 answers

Android developing: restrict user to only run and use my application

I'm developing android application for CAR usage and I need that in phone or tablet the driver can only run and use this application: No calling or running other app. Is that possible? If it is not, is there any way to restrict the user for example…
hamid
  • 852
  • 11
  • 27
5
votes
2 answers

JAX-WS RI does not enforce XSD restrictions

I am currently developing a few Web services using the JAX-WS reference implementation (version 2.1.7). They are contract-based, that is, the WSDL and XSD files are not generated by wsgen. This allows me to freely use XSD restrictions to strengthen…
Jeff Morin
  • 1,010
  • 1
  • 13
  • 25
5
votes
2 answers

Restrict access to certain folders using NSOpenPanel

I'm using NSOpenPanel to allow a user to select a folder to save documents into. I would like to restrict what folder (in terms of hierarchy) they can save into. Essentially, I want to prevent them from choosing any folder above:…
minimalpop
  • 6,997
  • 13
  • 68
  • 80
5
votes
3 answers

Which Java xml framework can handle code generation with restrictions/extensions in schemas?

There is a set of XSD files, with the following types described in them: A is a complex type with various elements. B restricts A, keeping only some of its elements C extends B, adding some elements. So, this means that a Java class generated by a…
mahonya
  • 9,247
  • 7
  • 39
  • 68
5
votes
1 answer

Apply restriction to time attribute in XML Schema

I want to apply a specific restriction to an XML Schema (on which I have very little experience). I have an attribute of xsd:time type: What I want to to is apply a restriction so that the…
Nick Louloudakis
  • 5,856
  • 4
  • 41
  • 54
5
votes
3 answers

PHP5: restrict access to function to certain classes

Is there a way in PHP5 to only allow a certain class or set of classes to call a particular function? For example, let's say I have three classes ("Foo", "Bar", and "Baz"), all with similarly-named methods, and I want Bar to be able to call…
Tim
  • 59,527
  • 19
  • 156
  • 165
5
votes
2 answers

Excluding a folder from autotesting

I've just installed a ZenTest to use autotest in my project. I use rspec and have an integration folder inside it. As I don't want all my integration tests run every single time I start autospec , so I'd like to somehow restrict autospec from…
oldhomemovie
  • 14,621
  • 13
  • 64
  • 99
5
votes
7 answers

Constructor restrictions

i was wondering if there is a way to restrict a value in construction. Here is my code : class Student : Human { private double Grade; public Student(string FirstName, string LastName, double Grade) : base(FirstName, LastName) …
Yoan Dinkov
  • 531
  • 1
  • 5
  • 17
5
votes
1 answer

XSD restriction of element with inheritance doesn't work

I'm trying inherit and restrict an element but I'm getting following error (in eclipse validation): The particle of the type is not a valid restriction of the particle of the base. The "Description" element should not be part of the "TypeDevice"…
Bill
  • 53
  • 1
  • 4