Questions tagged [negate]
81 questions
1
vote
2 answers
Negate and increment value in binary system
I've got binary number and I need to:
1) negate all bytes
2) add 1 to negate number
So, I wrote this:
public string u2_number_plus = "1001";
public string u2_number_minus = "";
public string binToU2()
{
int length =…
![](../../users/profiles/1385292.webp)
1_bug
- 4,454
- 3
- 39
- 49
1
vote
1 answer
PHP ImageMagick invert color
I'm working on a PHP app that converts a self portrait into a pencil drawing and part of the app requires a desaturated/inverted image similar to the example below:
before and after invert:
It's easy creating a desaturated image, but how would I…
user1105787
1
vote
3 answers
Oracle regexp_like negating special char
I'm using Oracle 10g trying to EXCLUDE entries that contain a - or a _ with a caret in the character class in Oracle 10g. I can find the entries containing dash or underscore through:
WITH example
AS (SELECT 'AAAA-1' n FROM DUAL
…
![](../../users/profiles/2379830.webp)
mbow
- 147
- 1
- 3
- 11
1
vote
2 answers
Negation of a specific string in regular expression
I want to negate the string
*.INFO
How can I do this?
I have tried
^(?!.*\*\.INFO).*$
but it is not working.
![](../../users/profiles/2114865.webp)
user2114865
- 5
- 1
- 4
1
vote
1 answer
How Pig deals with negating null value?
I have a problem not understanding how apache pig (version r0.9.2) is handling negation of null values.
I have an expression like this:
nonEmpty = FILTER dataFields BY NOT IsEmpty(children);
If children is null, IsEmpty function will return null -…
![](../../users/profiles/589571.webp)
ezamur
- 1,525
- 2
- 17
- 36
0
votes
2 answers
how do I match negative regex?
There is a sharepoint url :
http://teamspace.abc.com/sites/ABC/?list=%7bCEE6E6CB-A035-4FF9-Af95-98784D732938%7d
The listID could be various but I only want to allow the above one. Therefore, it shouldn't match: …
![](../../users/profiles/1183746.webp)
jetulis
- 115
- 1
- 8
0
votes
3 answers
Display unmatched strings, regex negation
Is there any way where I can display all characters and strings except a certain set of words or range of numbers, using Java? For example:
Regex:
^(if|else),[0-9]
Input String:
if x <= 7
Output:
Unrecognized Tokens:
x , <=
Since "if" and 7…
![](../../users/profiles/920216.webp)
kyoshiro
- 1
- 1
0
votes
1 answer
How to unkeep or force remove @javax.persistence.Transient annotated methods in JPA entities in ProGuard?
I'm extracting JPA entities into a separate Fat/Uber jar for external system to use.
ProGuard is used through com.github.wvengen:proguard-maven-plugin to shrink all other unused code.
I want to keep all methods in JPA entities except ones annotated…
![](../../users/profiles/9152465.webp)
Sergey Polyakov
- 11
- 6
0
votes
1 answer
Rspec: expect(request).to not_redirect? (opposite of redirect_to)
I've got a request test in rspec that tests for several potential redirects from an endpoint, such as:
get registrations_path
expect(response).to redirect_to(new_registration_path)
In one case, I expect it to not redirect. Is there a way to negate…
![](../../users/profiles/4454732.webp)
David Hempy
- 3,210
- 2
- 28
- 51
0
votes
5 answers
Negate a string in C#
Im writing a simple folder watcher program, I would like to ignore a temp.temp file that gets copied into the folder when a scan is made, so the program will detect anything placed in the folder and ignore the temp.temp file. At the moment I have…
![](../../users/profiles/695123.webp)
Matt
- 187
- 1
- 4
- 12
0
votes
3 answers
Easiest way to REGEX Capture eveything except what you specify?
I for the life of me cannot figure out how to negate everything but what I want to capture with REGEX.
I get close with [^(\d{4}-\d{3}-\d{3}]
But doing a replace in powershell with an input of:
1234-567-899 ABC 1W(23W) BLUE BIKE30 KIT
I get:…
![](../../users/profiles/13361776.webp)
Ryan Jamison
- 13
- 3
0
votes
3 answers
negating levels for fct_collapse
I have a smaller list of levels that should not be collapsed ("Alberta", "British Columbia", "Ontario", "Quebec") than the ones that should (all else). I haven't been able to negate the levels (code as example of the goal) for fct_collapse (all but…
![](../../users/profiles/6241870.webp)
ibm
- 158
- 1
- 9
0
votes
1 answer
Shell alias input search syntax for a negated find search
Mac OSX Bash Shell
I want to use find to identify anything (directories or files) which do not follow an input pattern.
This works fine:
find . -path /Users/Me/Library -prune -o \! \( -path '*.jpg' \)
However I want to have a general ability to…
![](../../users/profiles/8932194.webp)
Richard L
- 85
- 6
0
votes
0 answers
TextPad regular expression negation with a min/max
In TextPad I am trying to find any line that does not start with a 6 or 7 digit number. So it should find all lines that do not look like:
"123456" or "1234567"
I wrote this expression:
^[^(\d{6,7})]
It is not finding lines that start with only 2…
![](../../users/profiles/10459119.webp)
Sam Brown
- 3
- 3
0
votes
1 answer
PHP - nagate callback result
Is there any way to negate result of callback?
$this->myInjectedService->doSomething([$this, 'myCallback']);
I need to nagate result of myCallback method. I know I can do it by nested function, but is there any more clean way (exclamation…
![](../../users/profiles/3414654.webp)
MakoBuk
- 471
- 1
- 6
- 15