Questions tagged [reserved]

Denotes a resource that is usable only in a pre-determined way. This can reference memory, key words or hardware.

Denotes a resource that is usable only in a pre-determined way. This can reference memory, key words or hardware.

94 questions
3
votes
2 answers

Passing arguments as array to PowerShell function

I'm trying to figure out how I can pass multiple strings as an array to a powershell function. function ArrayCount([string[]] $args) { Write-Host $args.Count } ArrayCount "1" "2" "3" ArrayCount "1","2","3" ArrayCount…
Tom Deseyn
  • 1,735
  • 3
  • 17
  • 29
3
votes
2 answers

Reserved word as member of enum

I wanted to make a python Enum work having a reserved word as member. class Test(Enum): one = "one" is_ = "is" I wanted to customize __name__ to have the usual syntax return >>> print(Test.is_.name) is So how do I customize __name__,…
bad_coder
  • 11,289
  • 20
  • 44
  • 72
3
votes
1 answer

Why does urllib.parse.quote encode non reserved characters in urls?

The parse function in urllib.parse can be used to encode url components. But its behavior is different from the standard javascript encoder. In python >>> import urllib >>> urllib.parse.quote('(a+b)') ... '%28a%2Bb%29' in Javascript >>>…
yellowcap
  • 3,985
  • 38
  • 51
3
votes
1 answer

Device Driver for Reserved Memory

I am trying to develop a simple character device driver that access the reserved memory region as described in the site: http://www.wiki.xilinx.com/Linux+Reserved+Memory /* Get reserved memory region from Device-tree */ np =…
3
votes
2 answers

Using print as class method name in Python

Does Python disallow using print (or other reserved words) in class method name? $ cat a.py import sys class A: def print(self): sys.stdout.write("I'm A\n") a = A() a.print() $ python a.py File "a.py", line 3 def print(self): …
Oxdeadbeef
  • 1,033
  • 2
  • 11
  • 26
3
votes
1 answer

How can I write a hard drive sector as reserved?

I am hex editing a hard disk and I would like to mark some hard drive sectors as reserved so that they are not overwritten by Windows (Vista or 7). I think this is possible, since during a defrag, the disk says that there are some sectors that…
samoz
  • 56,849
  • 55
  • 141
  • 195
3
votes
1 answer

JNA and Java Language Keywords

Is there a way to map method names, member variables, struct data etc. when the member name is a java reserved keyword? I am creating a JNA wrapper for a third party C-library, whose sources I am not able to modify. A simplified example would be…
3
votes
1 answer

Reserved Memory Addresses?

Is there a list of reserved memory addresses out there - a list of addresses that the memory of a user-space program could never be allocated to? I realize this is most likely per-OS or per-architecture, but I was hoping someone might know some of…
Nate
  • 12,499
  • 5
  • 45
  • 60
3
votes
1 answer

Reserving an address of a variable array in c

I have what seems to be a simple problem, and I am sure that I have solved it before, but I am having trouble finding the answer again so hopefulley there is someone out there who can point me in the right direction I have an area of memory that i…
Stevo
  • 31
  • 1
2
votes
1 answer

Gremlin math step has issues if a reserved word "exp" is used in a label name

I have a query which has the math function like below, math('number1-expected_value').next() It throws error as **GremlinServerError: 499: {"detailedMessage":"Unknown function or variable 'cted_value' at pos 20 in expression 'number1 -…
2
votes
3 answers

Does non-reserved identifier at translation phase 4 make it impossible to reserve a file scope identifier at translation phase 7?

Consider this code: /* * stdio.h * * note: it is an example of a particular implementation of stdio.h * containing _x; it is not "my code added to stdio.h" */ void _x(void); /* t627.c */ #define _x 0 #include Invocation: $ gcc…
pmor
  • 5,392
  • 4
  • 17
  • 36
2
votes
2 answers

how to escape @ in javascript or how to retrieve data from a field containing @

I am retrieving data from an API and one of the fields in the object it returns is @timestamp. When ever I try to parse this data like item.@timestamp javascript throws an error because the @ symbol is reserved as a decorator. How can I retrieve…
2
votes
0 answers

How to use mmap'd reserved kernel memory in get_user_pages_fast()?

I have reserved several GB of memory via memmap=nn[KMG]$ss[KMG] in the kernel cmd line parameters. I also have a custom char device driver which uses mmap() and write() from the file_operations struct and performs DMA operations to a custom PCIe…
riffic
  • 131
  • 6
2
votes
2 answers

Convert Json to Java object using reserved variables

Am having a JSON file as below { "boost_id": "75149", "content_id": "627680", "headline": "19 Rare Historical Photos That Will Leave You Breathless ", "target_url":…
2
votes
2 answers

Stuffing a -1 in a pointer as a special value

In C, can one stuff a -1 value (e.g. 0xFFFFFFFF) into a pointer, using an approach such as this one, and expect that such memory address is never allocated at runtime? The idea is that the pointer value be used as a memory address, except if it has…
faken
  • 6,572
  • 4
  • 27
  • 28