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
14
votes
1 answer

IP restriction with htaccess

I want to restrict an entire site in such a way that just two IPs could enter the site. I have the following in my .htaccess (at the root of site): ErrorDocument 403 http://www.example.com/views/error403.html Order Deny,Allow Deny from all Allow…
ARemesal
  • 2,923
  • 5
  • 24
  • 23
14
votes
6 answers

Restricting parent class members to its immediate child class only

Suppose I have four classes in java with given hierarchy. class A {} class B extends A {} class C extends B {} class D extends C {} As per my understanding all the accessible fields of class A will be available to all its child classes through…
user8001621
  • 149
  • 1
  • 5
14
votes
4 answers

Using mysqlimport where the filename is different from the table name

I've been playing with mysqlimport and I've run into the restriction where the filename has to be the same as the table name. Is there any way to work round this? I can't rename the file as it is used by other processes and I don't want to copy the…
Mike Q
  • 22,839
  • 20
  • 87
  • 129
13
votes
2 answers

Restrict/Lock bookmarks from editing in word

I have many word document with lots of bookmarks. I use VBA code to change these bookmarks with data from a DB. The problem is, sometimes the users need to edit these documents, and they tend to accidentally delete/change my bookmarks, which leads…
Mana
  • 1,925
  • 6
  • 39
  • 55
12
votes
5 answers

How to allow introducing only digits in jTextField?

I have tried to use the example shown here but java showing error message of "AttributeSet cannot be resolved to a type" That is why I am trying to use another method of allowing only digits: txtUsername.addKeyListener(new…
Bakhtiyor
  • 7,198
  • 15
  • 55
  • 77
12
votes
5 answers

Incorporating shareware restrictions in C++ software

I wish to implement my software on a shareware basis, so that the user is given a maximum trial period of (say) 30 days with which to try out the software. On purchase I intend the user to be given a randomly-generated key, which when…
AndyUK
  • 3,933
  • 7
  • 42
  • 44
12
votes
3 answers

CROSS APPLY with table valued function restriction performance

I have problem with CROSS APPLY with parametrised table valued function. Here is simplified pseudo code example: SELECT * FROM ( SELECT lor.* FROM LOT_OF_ROWS_TABLE lor WHERE ... ) AS lor CROSS APPLY dbo.HeavyTableValuedFunction(lor.ID)…
Pavel Hodek
  • 14,319
  • 3
  • 32
  • 37
11
votes
4 answers

Why is the Scala for-loop (and internals) NumericRange restricted to Int size and how to elaborate the functionality?

What's behind the NumericRange Int size restriction on the Scala for-loop comprehension? Is it possible (without to much headache) to extend "for/Seqs" NumericRange to make use of Long (or anything bigger than Int.MaxValue)? scala>for (i: Long <-…
IODEV
  • 1,706
  • 2
  • 17
  • 20
11
votes
4 answers

XSD for simplecontent with attribute and text

How can i validate the text length of the element that has an attribute. E.g: Football Now i need to restrict the possible values of the code attribute(like "FB", "BB", "TT") and also i need to restrict the possible…
Thiyanesh
  • 519
  • 1
  • 6
  • 14
11
votes
2 answers

F# how to specify type restriction in recursive discriminated unions

I am trying to define my grammar as a discriminated union. It has two possible types: int and datetime and mathemetical operators of Add and Mul. Add works on int and datetime (as add days in int) Mul works only on int and not on datetime Grammar…
abhishek
  • 373
  • 1
  • 9
11
votes
5 answers

Can I restrict an enum to certain cases of another enum?

Say I have a bakery and an inventory of ingredients: enum Ingredient { case flower = 1 case sugar = 2 case yeast = 3 case eggs = 4 case milk = 5 case almonds = 6 case chocolate = 7 case…
Mischa
  • 15,816
  • 8
  • 59
  • 117
10
votes
3 answers

Restrict viewing access to an Excel worksheet

I thought this would be a readily used function in Excel but it's surprisingly difficult to implement a simple process of restricting access to specific worksheets within a larger workbook. There's a few methods that prompt an initial password to…
Chopin
  • 96
  • 1
  • 10
  • 35
9
votes
3 answers

Is it possible to restrict a table to have only one record in mysql?

Hi I'm a totally newbie in web development area. I want to create a table for admin login that has only one record (because there is only one admin). I want to know is it possible to set MySQL somehow to restrict a special table to have only one…
pouya
  • 3,400
  • 6
  • 38
  • 53
9
votes
1 answer

Content restriction and attribute validation on the same element in XSD

I would like to validate that an element 'Test' should Have its content restricted (for example, using a pattern restriction), and Contain certain attributes (for example, 'id', 'class' and 'name'). The XSD I'm writing looks like…
Jonathan
  • 32,202
  • 38
  • 137
  • 208
9
votes
1 answer

how to start activity from background service in android Q os, without click 'Allow background activity starts' from settings of developer option?

i want to start activity from background service in Android Q OS But it will give me message 'Background activity start from com.test.testandroidapp blocked.See g.co/dev/bgblock'. According following…
1
2
3
46 47