Questions tagged [negate]

84 questions
1
vote
4 answers

How do I create a negated matrix? (Python)

Let's say I have a matrix [[-2,4],[-6,8]]. I want to know how to get the opposite of those numbers: [[2,-4],[6,-8]]. Is there a special function in Python I'm supposed to use?
user2581724
  • 237
  • 3
  • 9
  • 20
1
vote
1 answer

How to negate/ "reverse mean" this search - that is "!" the meaning

if [[ -n $(find $path -name "$string*") ]] then else fi I want to reverse the above search like if [[ ! -n $(find $path -name "$string*") ]] then else fi But it wont allow this because here I am…
user1874594
  • 2,277
  • 1
  • 25
  • 49
1
vote
1 answer

Print binary then negate without ones complement in python

i'm new to python and tried to do something like that: a=23 "{0:b}".format(a) ---> '10111' then i want to negate it WITHOUT ones complement, the result should be '01000' but nothing seems to work secondly i would have to fill up the left side with…
Stefan
  • 528
  • 4
  • 12
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 =…
1_bug
  • 5,505
  • 4
  • 50
  • 58
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 …
mbow
  • 147
  • 1
  • 3
  • 11
1
vote
5 answers

How to negate regex validation string?

I want to replace all the string except the @[anyword] I have string like this: yng nnti dkasih tau :)"@mazayalinda: Yg klo ada cenel busana muslim aku mau ikutan dong "@noviwahyu10: Model ! Pasti gk blh klo k and the @mazayalinda and @noviwahyu10…
nencor
  • 1,621
  • 3
  • 14
  • 15
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.
user2114865
  • 15
  • 1
  • 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 -…
ezamur
  • 2,064
  • 2
  • 22
  • 39
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: …
jetulis
  • 168
  • 1
  • 13
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…
kyoshiro
  • 1
  • 1
0
votes
1 answer

Match RegEx with Caret Negation (exclude)

I want to filter my array with an exclusion so I did const exclude = include.filter((d) => { let negate1 = '[^' let negate2 = ']' let negate = negate1.concat(letterexc).concat(negate2) …
louislugas
  • 147
  • 6
0
votes
1 answer

Analog to negating .filter()

So I have a stream and I am trying to filter it. Every object inside that stream has one of 5 different statuses. Every item that has one specified status is gonna make that list. Then I'll use a foreach to change another attribute of those filtered…
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…
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…
Matt
  • 187
  • 1
  • 4
  • 13
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:…