Questions tagged [shift]

Questions related to the usage of the right and/or left shift key on the keyboard. For questions regarding bitwise shift operations use [bit-shift]

shift
Filter by
Sorted by
Tagged with
-2 votes
2 answers
62 views

IE doesn't seem to like bootstrap modal, it shows up without rounded corners, gray background, and ugliest of all it shifts the entire page down

I am novice in using bootstrap into classic ASP, yes that what I am trying :) And I am struggling with getting the bootstrap modal look the way it looks and behaves in Chrome or Firefox. When I launch ...
jaiveeru's user avatar
7 votes
3 answers
10k views

how to get the shifted index value of a dataframe in Pandas?

Consider the simple example below: date = pd.date_range('1/1/2011', periods=5, freq='H') df = pd.DataFrame({'cat' : ['A', 'A', 'A', 'B', 'B']}, index = date) df Out[278]: ...
ℕʘʘḆḽḘ's user avatar
-1 votes
1 answer
150 views

Overflow error in shift? VHDL

I am trying to make a Kilogram to Lib conversion, to do this i am using shifters to make the conversion ( I will have an small error due the representation of the output doesn't be fractionary), i ...
Mutante's user avatar
  • 278
0 votes
2 answers
550 views

Why can't I use the first bit of an int?

I am trying to generate a random number using all the bits of an int. when I use the rand() fuction, it never seems to use the first bit, so I tried to shift the whole thing one place. However, when I ...
cmperezg's user avatar
  • 145
0 votes
1 answer
1k views

Assembly Language Shift into Carry Flags

I currently got an assignment where I have to code in assembly language where you take user input to get a 4 digit hexadecimal value and convert it into binary and then after you get the binary value ...
jbr012's user avatar
  • 13
0 votes
2 answers
518 views

Lex and yacc how to solve shift/reduce dangling else

I've found similar examples to my question but I can't seem to apply it to my example. Could someone help point me in the right direction? Here's the y.output error message: state 97 ifstatement : ...
momonkey's user avatar
0 votes
1 answer
122 views

Skip punctuation char when shifting words in C [closed]

Strings are to be input by user. Then the program will shift the strings in the word by input. The problem is, whenever it tried to shift over z, there will be punctuation char. How to overcome this ...
whoami's user avatar
  • 173
0 votes
1 answer
348 views

bison shift/reduce conflict with the same token appear in the same rule

Given the following bison rules, I do not understand why the INTO token can be both shifted and reduced in the same bison state and caused 1 shift/reduce conflict. How to fix it ? The Capitals are all ...
user3658306's user avatar
1 vote
2 answers
871 views

Knockout.js removeAll function is not working

Why isn't removeAll and indexOf working? Sort, splice, slice and reverse works fine. <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!...
Shaurya's user avatar
  • 134
1 vote
1 answer
3k views

Is it possible to shift more than 1 bit per cycle in verilog?

I am not sure whether more than 1 cycle is needed, and if I will need to account for a shift taking more than 1 cycle to complete. And if it is possible to shift more than 1 bit at a time, does ...
Brian Crafton's user avatar
2 votes
1 answer
347 views

How to use Highcharts to implement this dynamically shifting from right to left effect?

I'm using Highcharts to draw a graph with dynamic data. I found this official demo.http://jsfiddle.net/vn9bk80j/ $(function () { $(document).ready(function () { Highcharts.setOptions({ ...
ddzhj's user avatar
  • 82
0 votes
1 answer
142 views

Parsing shift-reduce conflict

I am using JavaCUP tool in order to produce a parser for my language. I am trying to write a grammar that matches nested and multiple if_else statements. Input file // matches if () if () ...
pirox22's user avatar
  • 912
1 vote
4 answers
781 views

Assembly Shift/Rotate

These are the problems: I have this hw, but I only know basic knowledge. It will be a great help if anyone can give me a hint on how to finish these problems. I know this may be a desperate move, but ...
hajile's user avatar
  • 37
2 votes
1 answer
959 views

Generating multiple columns in data.table using shift() for recursion

I have a large data set that has about 100M rows, with 8M groups. I'm trying to do a recursive calculation to generate multiple new columns and I keep getting stuck. This is sample data, grouped by ...
Karthik's user avatar
  • 31
0 votes
1 answer
419 views

Calculate 32 bit shift VHDL delay

[my wave form] [1] The shifter is a component which is able to implement both arithmetic and logical shift operations. For this implementation you are not allowed to use shift operator. AL input ...
N.chen's user avatar
  • 15
0 votes
2 answers
279 views

How to bring the answer of this binary multiplication code in binary?

int product = 0; String num1 = "11100001"; String num2 = "10110001"; int multiplicand = Integer.parseInt(num1); int multiplier = Integer.parseInt(num2); for(int i=7; i>=0; i--) { if((multiplier &...
user5951764's user avatar
4 votes
4 answers
2k views

C++ shift left with big value

I'm wonder how to shift left value in C++. For example: 1 << 180 and I beleve that result of that should be: 1532495540865888858358347027150309183618739122183602176 (tested in python [1 <&...
Robert's user avatar
  • 338
0 votes
0 answers
306 views

VHDL shift amount based on highest bit set

I have two numbers (1 smaller and 1 bigger number), where i'd like the shift the lower number to match the higher number in 1 clock cycle. This should be doable with something like: shift_amt <= ...
user2654735's user avatar
1 vote
1 answer
2k views

Multiplication in avr assembly

I can't understand the way that binary multiplication takes place in avr code. Here is code from avr freaks. What exactly does "ror" and "lsr" do? I thought that for multiplication in binary we need ...
singa1994's user avatar
  • 777
3 votes
2 answers
6k views

Python shift with alphabet

def menu(): choice = input("Press 1 to encode, 2 to decode, 9 to exit ") return choice def makeKeycode(message): key = input("What is the key? ").upper() length = len(message) ...
bobbysmith's user avatar
1 vote
0 answers
544 views

Exception Could not find class 'java.awt.font.FontRenderContext', referenced from method org.apache.poi.ss.util.SheetUtil for hSSFSheet.shiftRows [duplicate]

In Android app, wanted to append text in existing Xls file at start, and for that trying to shift rows in an existing Excel file. using eclipse But first getting below warnings E/dalvikvm(27775): ...
Shirish Herwade's user avatar
2 votes
1 answer
866 views

Bash getopt - shift multiple parameters

I have a script to launch some checks on Ubuntu machine. I call my script like this : ./script -f /tmp/file.txt --modules 001 002 003 All files 001, 002, etc... are bash scripts. The following ...
Isador's user avatar
  • 593
-1 votes
2 answers
266 views

Is there a way to shift bits between two contiguous memory spaces in C?

I'm trying to retrieve the bits lost after shifting an integer with the "<<" operator, so i created a int pointer "b" which i initialized with full 1. And on the left of the adress b i created ...
Addon's user avatar
  • 75
-1 votes
3 answers
146 views

How to delete elements in an array an reduce its size?

I have an array of byte that I want to process. My goal is to remove fixed size patterns. I am using the following code : byte buffer[] = {1,2,3,4,5,6,7,8,9,10}; int position; // position of the ...
Jules Simon's user avatar
1 vote
1 answer
381 views

Image transformation using GDAL

I have an image in UTM and want to be able to apply a shift in easting and northing using gdal tools. Does any body know which gdal function and how to re-project an image with shifts only? Thank you....
user2148425's user avatar
0 votes
1 answer
67 views

Error while creating an instance by using $self in a perl script

I try to create an object inside my perl Script. Therefore I have a constructor new(;@) { my $class = shift; my $self = {}; bless $self, $class; $self->_init(@_); return $...
yoko's user avatar
  • 516
1 vote
0 answers
105 views

PHP : How to detect a shift between two images

I would like to detect and get the shift between two images but I can't find anything except similarity comparaison. The idea is same as this post but in PHP instead of Python : How to detect a shift ...
Alex's user avatar
  • 557
2 votes
2 answers
9k views

make a shift by index with a pandas dataframe

Is there a pandas way to do that: predicted_sells = [] for row in df.values: index_tms = row[0] delta = index_tms + timedelta(hours=1) try: sells_to_predict = df.loc[delta]['...
Borbag's user avatar
  • 607
0 votes
1 answer
52 views

Insert a column of non-numeric data into a cell's column at arbitrary location and shift old data to the right

I need to insert a column (vector) with non-numeric data cells (one or multiple strings) into a cell of non-numeric data at an arbitrary location and retain old data columns by shifting them to the ...
mike's user avatar
  • 173
1 vote
2 answers
1k views

Shift elements of array list in java

so I'm trying to shift an array to the right so that x will appear as 4, 5, 6, 7, 1, 2, 3. I think my algorithm is correct but for some reason it won't return x and just skips anything after the "x = ...
waterytart's user avatar
0 votes
1 answer
147 views

Shifting matrix by nrow or ncol in R

I need to shift an image (which I have stored as a matrix) up/down or left/right and I would like this to stay within the bounds of the original matrix dimensions. To show an example, if I had a 3x3 ...
jordanawhite's user avatar
1 vote
1 answer
922 views

Use previous calculated row value in r

I have a data.table that looks like this: DT <- data.table(A=1:20, B=1:20*10, C=1:20*100) DT A B C 1: 1 10 100 2: 2 20 200 3: 3 30 300 4: 4 40 400 5: 5 50 500 ... 20: 20 200 ...
KhalidN's user avatar
  • 395
0 votes
1 answer
892 views

Create shift table for string matching in python from pseudo-code

I'm trying to take pseudo-code from my textbook and convert it to a python function. The pseudo-code is for creating a shift table for use with Horspool string matching. The pseudo-code is as follows:...
superfluousAM's user avatar
0 votes
3 answers
93 views

At a total loss with java list processing code

Okay, this is probably going to come across as a really easy question, but honestly I'm new to coding and I've run up against a brick wall here. I need to insert a value into an array, shift the data ...
churchill's user avatar
1 vote
1 answer
1k views

python pandas use previous calculated values

I'm new in python and i have a issue i can't fix. So, i need your help. I have a dataframe df with two columns: Close_M and Close_AA. The point is, i would like calculate two new columns Resultat_M ...
learn_is_great's user avatar
0 votes
1 answer
1k views

Disable bypass key in Access

I am trying to disable the shift key option to unhide all the objects in my database. I have tried many different variations of code and none seem to work. Could this be because I am working in a ....
Brianna Cates's user avatar
2 votes
1 answer
1k views

Bypass shift with pop up password box

I am trying to create an access database that is shut off from the users even the bypass shift option. I have done a code that does this but what I want to add is a pop up box when the shift key is ...
Brianna Cates's user avatar
4 votes
1 answer
1k views

Adding multiple constraints at once in Xcode 7

In previous versions of Xcode you could drag from one UI element in your storyboard to another and by holding the Shift button pressed, you could add more constraints between those two components - ...
kanstraktar's user avatar
  • 5,357
3 votes
1 answer
2k views

How to check if 'enter' key was pressed with 'shift' key in textarea

I know that the shift key code is 16, and the enter key code is 13. //@ catching any 'enter' keypress in textarea. function textareaOnEnter(){ $('textarea#someId').keypress(function(e) ...
DevWL's user avatar
  • 18.1k
0 votes
2 answers
767 views

Linux keyboard config (xkb) for three Shift keys

I am looking for a way to define an additional Shift key, for a given key scan code. So that I would end up with unchanged left and right shift, plus an extra shift key, which would be definable on ...
Steve's user avatar
  • 405
1 vote
1 answer
138 views

Shift current datetime in GBQ

Does anyone know how to shift unix timestamp in GBQ to minute (e.g. How to simulate function UTC_USEC_TO_MINUTE)? Thanks.
goRunToStack's user avatar
1 vote
0 answers
286 views

Angular Checkbox Range does not work

I use the Angular Checkbox Range, but it does not work. This is my html code: <script src="{{url_for('static', filename='js/angular.min.js')}}"></script> <script src="{{url_for('static'...
jingwei's user avatar
  • 47
0 votes
1 answer
186 views

how to add shiftcheckbox to dynamic generated checkbox?

Use this jQuery shiftbox plugin plugin or this one. in JS for (var hidx in hosts) { var h = hosts[hidx]; var line_html = '<tr><td><input type="checkbox" class="input ...
jingwei's user avatar
  • 47
0 votes
2 answers
890 views

Java: Is there any way to implement shift on a boolean array? If so, how would I go about doing this?

I'm trying to shift a boolean array to the left, based on how many times the user wants the number to shift, but I have no idea if I can even shift an array. I know that I can shift integers, so ...
Maddie's user avatar
  • 9
11 votes
3 answers
1k views

What is the value of number left shift by -1 [duplicate]

What is the result of number when it is left shifted by -1 in C programming using the left shift operator? e.g.: 23 << -1
Mithun Arunan's user avatar
2 votes
1 answer
183 views

Shift matrix rows to have maxima in the middle

This can be implemented with for loops and conditions but is there a fast efficient way to do it using Python and numpy, as I am working with matrices having hundred thousands rows. As an example we ...
Mehdi's user avatar
  • 1,456
3 votes
1 answer
77 views

Is it safe to use shift and @_ in the same statement?

Is the following code safe? Does it run on all perl versions >= 5.8? Is it guaranteed that the shifts are executed before @_ is unpacked? sub f1 { shift->update(p1 => shift, p2 => shift, ...
tim93's user avatar
  • 109
3 votes
1 answer
264 views

Why is `int >> 32` not always zero? [duplicate]

Can someone explain me why right 32 bitwise shift of some 4 byte integer number may return not zero in C/C++ ? Why does it depend on -O option of the compiler? For example this code gives 45 with -O0 ...
Denis Yurin's user avatar
15 votes
1 answer
33k views

How to indent/shift a line of code or a block of code in IntelliJ IDEA

I can shift a line of code or a block of code in Eclipse by the following way: Focus a line or select a block of source code Source menu -> Click "Shift Left" or "Shift Right" How to do the same ...
Ripon Al Wasim's user avatar
0 votes
1 answer
122 views

Trigger an action when both left and right shift keys are down

I wish to trigger a custom action once, when both shift keys are down. So if I press left shift and then right shift while the left one is down the action should trigger once. I have no problem ...
this's user avatar
  • 5,279

1
10 11
12
13 14
22