Questions tagged [redefine]

101 questions
0
votes
1 answer

How to define asymmetric + operator

I'm trying to define the + operator for int + Date and make it return an int. So I define operator+ as a member to define Date + int, and I define a non-member function operator+(int, Date), but when using it in the main it doesn't seem to use that…
reverse_engineer
  • 4,239
  • 4
  • 18
  • 27
0
votes
2 answers

redefine Date() javascript

The official calendar of our country is jalali! Jalali is a type of calendar that has a mathematical relationship with the Gregorian calendar. I want to change Date() in JS to returns jalali values. there are many lib or func for this, but I don't…
0
votes
1 answer

Extend a public XSD schema with new attribute

I want to extend the existing XSD schema (trans-unit element) with new attribute called newAttr. So, the original schema has the following element called trans-unit which I want to extend:
0
votes
1 answer

Can I redefine a c++ static const defined in a OpenCascade/OCCT header at runtime?

Maybe this is simple but I would like to dynamically redefine a constant set in a library header, so that I don't have to recompile it every time it should be changed. In OpenCascade's Precision.hxx the constant "Precision::Confusion" is defined…
JacobP
  • 561
  • 3
  • 21
0
votes
1 answer

Appending to / redefining a function?

I have a function handler: function handler(data) { console.log(`1. ${data}`); } which I want to append, or redefine, in the same scope as follows: let oldHandler = handler; function handler(data) { oldHandler(data); console.log(`2.…
ajrlewis
  • 2,968
  • 3
  • 33
  • 67
0
votes
0 answers

allow to redefine the type name or not?

I have a quick questions about redefine the type name inside the class, is it allowed in the C++ always or some compiler will accept this, others will not accept such usage. From the describe of C++ premier 5th, chapter 7 section "Type Names Are…
0
votes
2 answers

Java 6 redefining currency symbol (via CurrencyNameProvider?)

Recently Sun/Oracle changed currency code for Ukrainian hrivna to incorrect one and I've to fix that in my code. I find out that Java 6 should allows me to do that at Java level (details are here) via CurrencyNameProvider (see also). Unfortunately…
FoxyBOA
  • 5,788
  • 8
  • 48
  • 82
0
votes
2 answers

I can redefine constant in PHP without getting an error

As I know we can't redefine a constant in PHP. So if I do: define("DEVELOPMENT", true); theoretical I can not redefine it using: define("DEVELOPMENT", false); (or) const DEVELOPMENT = false; The problem is PHP let me do that. It lets me redefining…
0
votes
2 answers

Redefining free memory function in C

I'm redefining memory functions in C and I wonder if this idea could work as implementation for the free() function: typedef struct _mem_dictionary { void *addr; size_t size; } mem_dictionary; mem_dictionary…
g0d1anier
  • 48
  • 6
0
votes
1 answer

How to set/redefine variable in external js file

How can I re-define variable in external js file 'js/sample.js'? The main idea was not touch core file and be possible to pass a new value (to var COUNT_DEFAULT) on js load from my new module. core js example: (function(_, $) { var…
nlsnmr
  • 55
  • 6
0
votes
1 answer

Meaning of warning in repl.it?

I wanted to experiment with != instead of = here (by switching the if and else statements), in case I wanted to add an elif: after (maybe a test-response if entered guess is greater than max). I don't understand why it is now throwing a…
toonarmycaptain
  • 2,093
  • 2
  • 18
  • 29
0
votes
1 answer

Redefine primitive types for quick change of RAM usage, better readability, (and possibly improving performance)

After quite a long time of spending in multiple programs I have found that, depending on the platform, I sometimes need to lower the RAM usage drastically, because of highly limited resources on some platforms. I normally store large maps and…
philkark
  • 2,417
  • 7
  • 38
  • 59
0
votes
1 answer

Javascript - Shorten Id's for more efficient script

I would like to make my script more efficient and while looking at my script which is fairly large I realize that nT.dS[v] is repeated quite often. I've tried do redefine it in a couple of ways, but none have worked, so I was wondering if any of you…
0
votes
1 answer

How to correcly redefine javascript objects

var test = {}; test.k1 = {}; console.log(test); test.k1.k2 = 'apple'; console.log(test); test.k1.k2 = 'banana'; First log: Object k1:Object k2:"banana" WHY? I expect empty object k1... banana is defined 3 lines later Second log: Object k1:Object…
Separd
  • 1
  • 1
0
votes
1 answer

Remove Duplicate Data from XML while using redefine in BizTalk

I have a schema which is formed by redefining 2 schemas Now I have called this schema to another using redefine to add elements to Extn. But the elements from previous schema is repeating with the added element. The Elynx Address is the added…
Avinash Kumar
  • 167
  • 2
  • 12