Questions tagged [invert]

1

votes
0

answer
366

Views

invert radial scale on polar plot in matplotlib

I'm using python 2.7.14 with matplotlib 2.1.1 on Debian buster. I want to create a polar plot with an inverted radial axis. My values on radial axis are mostly negative and I want lower values ploted at higher radius, as they represent a better outcome, and vice versa. Additionally I want to set the...
Lukas
1

votes
1

answer
33

Views

PHP Loop based on row number for bootstrap columns

I have one design issue that I want to solve. I've spend 2 days on this and I know that its an easy one... I want to echo the articles with this order: col-8, col-4, col-4, col-8, col-8,col-4... and so on. enter image description here I've made it to echo the articles like this: col-8, col-4, col-8,...
SilenceWF
1

votes
2

answer
101

Views

How to add calculated values to existing column in r?

I have a dataframe (file), which has two columns: Path length: 0.5; 0.5; NA; 5; NA; 8; NA Global efficiency: NA; NA; 0.8; 0.2; 0.3; NA; NA Now I want to convert the global efficiency values into path length values by: path length = 1 / global efficiency. I want to do this ONLY in case the path lengt...
user222905
1

votes
2

answer
21

Views

Matplotlib: categorical plot without strings and inversion of axes

Let's take this snippet of Python: import matplotlib.pyplot as plt x = [5,4,3,2,1,0] x_strings = ['5','4','3','2','1','0'] y = [0,1,2,3,4,5] plt.figure() plt.subplot(311) plt.plot(x, y, marker='o') plt.subplot(312) plt.plot(x_strings, y, marker='^', color='red') plt.subplot(313) plt.plot(x, y, marke...
sergiuspro
1

votes
1

answer
898

Views

Best way to invert a n x n Matrix

I was wondering what's the correct and best way on Java to invert a (double) 2D matrix. My input(MatrixToBeInverted) is a double[][] ,filled and over 20x20. Using code like this will throw me errors. invMatrix = LinearAlgebra.inverse(MatrixToBeInverted); I read that the .inverse() function is depre...
user3086819
1

votes
1

answer
14

Views

How to Fill Color Outside of a Shape (an Oval)

I want to be able to draw on a BufferedImage, using a Graphics2D instance, and fill Color outside of a Shape. If this was a shape such as a Rectangle it would be easy, but the Shape I need to work with is a Circle. It's easy to fill a circle with Color, just by writing: Graphics2D g2d = .createGraph...
Anju Maaka
1

votes
1

answer
102

Views

Inverting colours of an image callback in fullpage.js

I've changed the slide arrows to my own png, black arrows but on some slides, which have darker background I want to invert them so they are white. -webkit-filter: invert(100%); works just fine, but how to trigger this only on slides that using a callback? Quick animation of the invert parameter 0...
funkmaster3000
1

votes
2

answer
504

Views

Swap JSON key and value

I have a JSON object that I'm trying to swap the keys with their value. The values are all unique but the keys are not. Because they are not unique, when creating an object the non unique keys are removed. Is there anyway I can invert the keys and values before creating an object? I was attempting t...
William
1

votes
1

answer
112

Views

Flipping a boolean value

I have a small C# problem that I'm sure must be easy to solve, but I can't for the life of me figure out what's wrong. I have a debug mode in my game which is turned on when a boolean value debugMode is set to true. The variable is held within a gameInfo object, referenced in my GameInfo class. I wa...
Andy Latham
1

votes
6

answer
0

Views

Regex: Extracting readable (non-code) text and URLs from HTML documents

I am creating an application that will take a URL as input, retrieve the page's html content off the web and extract everything that isn't contained in a tag. In other words, the textual content of the page, as seen by the visitor to that page. That includes 'masking' out everything encapsuled in ,...
d7samurai
1

votes
1

answer
0

Views

How Do I Invert The Y Axis Motion Of This?

I'm making a little game for iPhone that involves whistling. The phone hears the frequency of your whistle, and sets the position of a sprite on the screen accordingly. Here is the code: if frequency > 1000 then soundbar.y = (frequency-1020)/10+30 end This makes the bar move between 30 and higher on...
Magicaxis
1

votes
2

answer
989

Views

Corona SDK inverting button

Okay, I just got the free trial of Corona SDK so I am new to Corona. I am trying to make a button class for my game. It has a white background and black text. I want it to invert when it is pressed down. The problem is that the draw event interferes with the touch event because the draw event sets t...
user1919334
1

votes
1

answer
1.1k

Views

Sort ALV grid by inverted date

I had a need to output TCURR table into ALV grid. All went fine but when user sorts table by 'valid from' date (GDATU) strange things happened. Sorting in ascending order behaves as sorting in descending order and vice versa. This is so because field GDATU contains date in inverted format and has do...
Suncatcher
1

votes
2

answer
270

Views

Inverting color of an image as it crosses a line?

Here is a jsfiddle example of what I have at the moment. http://jsfiddle.net/arcgale/z39hf/2/ In this example I'm trying to invert the color of the image as it crosses into the black section region. Assume the height of the sections can change. html: css: section{height:500px; width:100%} #s1{backgr...
user3224788
1

votes
1

answer
331

Views

How to use ILMath.invert function?

In ILNumerics, I want to inverting a matrix A. The result is matrix B. Here is my code: ILArray data = ILSpecialData.sinc(50, 50); ILArray data2 = ILMath.zeros(50, 50); ILMath.invert(data, data2); The method is: ILMath.invert Method (ILInArray, ILOutArray) public static void invert( ILInArray A, ILO...
ehmind
1

votes
2

answer
290

Views

How to do an invert selection in emacs?

I currently have a region of text selected. I want to kill/yank (or format in any other way) the whole buffer except the selected region. Is there any way in which I can do an invert selection in emacs and accomplish the same? Any help would be appreciated. Thanks.
Avijit Gupta
1

votes
2

answer
205

Views

Extracting subset of data with inner join to itself

I have data in the following format and want to extract the records that have year = 2013 and 2014 and 2015 for a Symbol. (ie those 3 years, not 2 of, not 4) The first one below (FLWS) fits but the next one (FCCY) only has 2013 and 2014 but not 15 so i don't want it in the end set. Further down DDD...
Brian D
-3

votes
2

answer
20

Views

Invert Colours of Transparent Image in Swift

Ive downloaded this picture with a transparent background and put it in an 'Image View' in swift, just want to know if there is anyway possible to invert the image's outline to be white instead of black? My background is blue which is the reason it looks the way is does now. Much appreciate everyone...
J.BAT
1

votes
1

answer
222

Views

Invert axis direction Altair

For some reason, the Y-axis while plotting with altair seems to be inverted (would expect values to go from lower (bottom) to higher (top) of the plot). Also, I would like to be able to change the ticks frequency. With older versions I could use ticks=n_ticks but it seems now this argument can take...
Yiti
0

votes
0

answer
5

Views

Creating a second inverted singly-linked list based on another list

So I need to create a function that takes a normal singly-linked list and creates another list based on it, except the first element in the new list will be the last element in the original list and so on. It doesn't sound hard at all but my function for some reason only ever returns the same numbe...
Matt17BR
1

votes
1

answer
76

Views

Inversing a twodimensional array in python

I have an array a, which is twodimensional. A contains objects which also contain objects. I want to make sure that a[1,1] becomes a[n,n], a[2,1] becomes a[n-1,n], a[2,2] becomes a[n-1][n-1] etc. I wrote the following code to do this: tempArray = copy(self.topArea) for y in range(0,len(tempArray)):...
Cheiron
1

votes
1

answer
230

Views

Invert all colors with LESS

I have a stylesheet I am happy with and I compile it using the following code. Works great. function css($inputFile, $outputFile) { $cacheFile = $inputFile.'.cache'; $cache = file_exists($cacheFile) ? unserialize(file_get_contents($cacheFile)) : $inputFile; $less = new lessc; $less->setFormatter('co...
Svish
1

votes
1

answer
579

Views

Incorrect results with invert in opencv

I am using opencv library in c++ for matrix inversion. I use the function invert with DECOMP_SVD flag. For matrices which are not singular, it computes using SVD method. However it gives me an incorrect answer for singular matrices (determinant = 0) when I compare it to the output in Matlab for the...
MonsieurBeilto
1

votes
1

answer
130

Views

Algorithm for Deep Hash Invert (should be in ruby)

I have a hash H (see bottom) and need to perform a deep invert operation on it, such that a new hash H2 is returned where each key K is a value inside the original hash. The keys in H2 map to an array of arrays of all the sequences of keys that, when applied onto the original hash H would give you t...
theideasmith
4

votes
2

answer
214

Views

Invert last bit

How can I invert the last bit in an int? int a = 11; System.out.print(a + ' ' + Integer.toBinaryString(a)) //11 1011 int b = invertLastBit(a); System.out.print(b + ' ' + Integer.toBinaryString(b)); //10 1010 I wrote this: static int invertLastBit(int i) { String s = Integer.toBinaryString(i); if (s....
maks28rus
2

votes
5

answer
386

Views

Cannot create a program which will invert string

I am using Linux. I am trying to write a program in c that will print a string backward. Here is my code: #include #include #include int main (){ char string[100]; printf ('Enter string:\n'); gets (string); int length = strlen (string)-1; for (length = length; length>=0; length--){ puts (string[l...
Tom
19

votes
3

answer
3.1k

Views

Is there a conventional method for inverting NSColor values?

I'm looking for a way to invert arbitrary NSColor values at runtime, and there doesn't appear to be any built-in method to do so. I will be using a category to extend NSColor as follows: NSColor * invertedColor = [someOtherColor inverted]; Here is the category method prototype that I am using: @impl...
e.James
2

votes
3

answer
2.2k

Views

Inverting a diff or patch || CVS diff

In CVS, my working copy (WC) is on a certain branch (which we'll call 'foo'). There have been other changes checked into foo by another dev. I want to do a diff between my WC and the upstream state of foo. Normally, when working in the trunk (HEAD), I just do a cvs diff, and that's fine. But for...
Pistos
5

votes
2

answer
6.8k

Views

css filter invert() not working on mozilla firefox?

I'm having an annoying issue with the css filter invert(); on Firefox 25. This is the code, inserted inside jQuery .ready() context: $('#colorcontrast').bind('click', function() { var css = 'html {'+ ' filter:invert(100%);' + ' -webkit-filter: invert(100%);' + ' -o-filter:invert...
Shad
1

votes
3

answer
4.6k

Views

invert specific bits using bitwise NOT

does anyone have experience to use Bitwise Not to invert specific bits for x number. I know we can do this use XOR and mask but question requires use NOT. I need to invert a group of bis starting at a given position. The variable inside the function includes original value, position wants to start...
user3552515
2

votes
2

answer
350

Views

Is it possible to invert audio using the HTML5 audio API?

I'm playing around a little with the HTML5 Audio API and wondering if it's possible to invert waveforms? That is, completely flip a waveform, in effect cancelling it out. Appreciate any insight. Greg
lionysis
2

votes
4

answer
8.4k

Views

Jython convert picture to grayscale and then negate it

Please bear with me, I've only started python a few weeks ago. I am using JES. I have made a function to convert a picture to grayscale. I created two names for each color r and r1, g and g1, b and b1. The idea behind this, was to keep the original values in memory, so the picture could be restored...
Yvette Colomb
6

votes
3

answer
2.4k

Views

Inverted glyph: bitmap > SVG via autotrace > glyph via fontforge

I am trying to create a font/glyph by: taking a bitmap image creating an SVG with autotrace (on Linux) importing the outline as a glyph with python-fontforge (glyph.importOutlines(svgfile) ) This works fine except that the resulting glyph in inverted (see images). Any idea how this can be prevented...
Hoff
3

votes
2

answer
5.6k

Views

Draw standard NSImage inverted (white instead of black)

I'm trying to draw a standard NSImage in white instead of black. The following works fine for drawing the image in black in the current NSGraphicsContext: NSImage* image = [NSImage imageNamed:NSImageNameEnterFullScreenTemplate]; [image drawInRect:r fromRect:NSZeroRect operation:NSCompositeSourceOver...
smartgo
1

votes
2

answer
158

Views

Auto Layout inverts views horizontally iOS

I haven’t been able to pinpoint the cause of an issue i’m having , regarding our company project. I have notice that in all the auto layout views in the project , the views that appear to be attached to a specific side in interface builder, are presented on the opposite side after the build. I...
Benzi Heler
2

votes
4

answer
82

Views

Inverting a two-dimensional array

I'm trying to invert and flip a two-dimensional array, but something goes wrong! Flipping works ok, but inverting is not. Can't find a mistake right here: public int[][] flipAndInvert(int[][] A) { int row = -1; int col = -1; int[][] arr = A; for (int i = 0; i < arr.length; i++) { row++; col = -1; fo...
Dmytro Z.
3

votes
3

answer
978

Views

iOS openGL image invert

I'm trying to get create an inverse of an image, as part of an app. I have implemented some image processing using openGL, following the GLImageProcessing demo from Apple. My image is loaded from a .jpg, and loaded to a texture. I can happily modify contrast and brightness. However, I am having unsa...
Deaglan O Meachair
3

votes
4

answer
12.8k

Views

How to flip an image horizontally

HiI was wondering how to flip and image horizontally, for a practce task I was given a code that reads an image, inverting it to an image indicating it's brightness from 0-5, I had to flip an image. This is my code of my reading an image and drawing it public int[][] readImage(String url) throws IO...
Judy Tran
4

votes
3

answer
23.9k

Views

Invert text-color of a specific element (using jQuery)

How do I invert the text-color of an element using jQuery? Invert me
David Knaack
3

votes
1

answer
2.1k

Views

Invert enum flags

Lets say I have the following flags: [Flags] public enum Foo { None = 0, Foo1 = 1, Foo2 = 2, Foo4 = 4, Foo8 = 8 } Now I have a variable foo: var foo = Foo.Foo1 | Foo.Foo4; What I want to get is the following the inverted flags of foo. That would mean something like this: Foo.Foo2 | Foo.Foo8 I've tri...
Florian

View additional questions