Rotate bits left?

I want to rotate stuff left and right.
I searched around and only got confused.
this is the algorithm im using to rotate a long integer, 149, left by 1 bit:
(149L << 1) | (149L >>> (64 -1) )
by my definition of "rotate left" i should get 43, but ofcorse i dont because im just |ing (149 << 1) with zeros
are there two definitions of "rotate left"?
or is somthing wrong with this algorithm?
or somthing else...

I want to rotate stuff left and right.
I searched around and only got confused.
this is the algorithm im using to rotate a long
integer, 149, left by 1 bit:
(149L << 1) | (149L >>> (64 -1) )
by my definition of "rotate left" i should get 43, but
ofcorse i dont because im just |ing (149 << 1) with
zeros
are there two definitions of "rotate left"?
or is somthing wrong with this algorithm?
or somthing else...I'm not shure what you're trying to do, but rotate left is simply this
(149 << 1)

Similar Messages

  • FCP Ignoring rotation bit

    Morning,
    Imported P2 Data from HVX using the RedRock system so the image comes in upside down. Opened clip in Quicktime Pro, under Show Movie Properties, selected video track/visual settings. Rotated the clip so it views correctly now. Save the clip, bring he clip into FCP and it still shows it upside down. Bring the clip into Motion, no problem it's showing correctly. I have tried the clip in other programs and the problem does not appear, it's only in FCP that the Rotate parameter is getting ignored. Where or how do you report a bug to Apple for FCP??
    Thanks,

    http://www.apple.com/feedback/finalcutpro.html
    or
    http://radar.apple.com

  • Rotate and left right flip of a complete frontpanel

    Hi everybody!
    Does anybody know if Labview allows to flip and rotate an entire front panel. I have to display  frontpanel on a 2nd monitor. This (2nd) front panel has to be flipped (L/R) and rotated by 180°. Is there any method available in labview?
    I know, using  Windows Monitor Settings,this job could be done, but I would prefer to code it instead of fiddeling around with the monitor set up... Any ideas?
    Best wishes,
    Luke
    (Labview 2013, cRIO, FPGA, Windows 7-64)

    The only way to do it in LabVIEW would be to take an image of the front panel periodically, rotate it and then display it in a picture control (or something like that) - that would allow you to display but not control the panel. Far easier to use the monitor settings in windows (perhaps there might be a way to control that programatically with a .NET or system call).
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • JTable JComboBox appears a few bits left than the cell

    Hi,
    I 'm using the following code to display a JComboBox in the 4th column of my JTable.
    TableColumn tableColumn = table.getColumnModel().getColumn(3);
    String[] values = {"", "ASC", "DESC"};
    tableColumn.setCellEditor(new DefaultCellEditor(new JComboBox(values)));
    JScrollPane scrollPane = new JScrollPane(table);
    mainContainer.setLayout(new BorderLayout());
    mainContainer.add(BorderLayout.CENTER, scrollPane);
    The strange thing is that when I click on the combo box to select a value, the combo box appears a few pixels on the left of the cell that I edit, and not exaclty under it. Has anybody else encountered such a problem?
    | ASC | <---------- table cell
    | |
    | ASC | <---------- combo box
    | DESC |
    Thanks in advance.
    John.

    Hi,
    I 'm using the following code to display a JComboBox in the 4th column of my JTable.
    TableColumn tableColumn = table.getColumnModel().getColumn(3);
    String[] values = {"", "ASC", "DESC"};
    tableColumn.setCellEditor(new DefaultCellEditor(new JComboBox(values)));
    JScrollPane scrollPane = new JScrollPane(table);
    mainContainer.setLayout(new BorderLayout());
    mainContainer.add(BorderLayout.CENTER, scrollPane);
    [/code/
    The strange thing is that when I click on the combo box to select a value, the combo box appears a few pixels on the left of the cell that I edit, and not exaclty under it. Has anybody else encountered such a problem?
    | ASC | <---------- table cell
    | |
    | ASC | <---------- combo box
    | DESC |
    Thanks in advance.
    John.

  • Image Orientation/Rotation Problem in Lightroom 3.2 Final

    This is a continuation of my previous post regarding this same problem in 3.2RC. It's still happening in the Final version of Lightroom 3.2.
    THE PROBLEM
    Image orientation is not working properly in Lightroom 3.2. This affects newly imported images and images that were already in my Lightroom database -  and which have been in the database since Version 1.
    Here's a screen capture showing the strange displays I'm seeing in  Lightroom's grid mode:
    Notice the odd angle of the image. When I use the Rotate Photo Left tool, the display looks like this sometimes. After a second or so, it will snap to either a vertical or horizontal orientation by itself but rarely gives me the 90-degree rotation this tool should give. The image may flip 90-degrees or 180-degrees, there's no way to tell.
    When I view the image in Loupe view or on my second monitor, the orientation shown in Grid view does not match that displayed in Loupe Vew. For this particular image, Grid view currently shows it as correctly orientated as a horizontal while Loupe view shows it rotated 90-degrees to the right. Shouldn't they match?
    BACKGROUND
    I never had a problem with image orientation in any preveious version of Lightroom prior to Lightroom 3.2RC and 3.2 Final. So, it seems to be a bug in 3.2. I'm still using the same computer and video card I used with previous versions. My operating system is Windows 7 Home Premium. Both Windows and Lightroom are 64-bit.
    HELP!
    Is anyone else having this problem? How can I solve it?
    Alan
    PhtooCitizen.com

    The size of the catalogue is almost certainly not at play here.
    FWIW, I recall seeing something like this once a long time ago on a Mac, possibly with Lr 3 beta, or Lr 2.x.  It went away with a restart. It almost looks like a threading issue, where a thread is suspended or preempted and then is lost or disconnected from the main UI thread.
    I recall you can just rotate the image again and it will right itself.
    Adobe fist-line support seem to want to use the number of images in the catalogue as some sort of catch-all.  The problem with this is that most of us can demonstrate that there is little correspondence with the number of image IDs in the database and many reported UI artefacts.
    I'd keep raising this with them, and suggesting that the size of the catalogue is probably not at play here. As a tactic, you can ask what the maximum size of a catalogue should be, and if it is raw images or the number of changes to the images and virtual copies that is the problem, and if this can be verified by second- or third-line support.

  • Move left to shoot center-left, etc?

    If I move the camera "a bit left" to shoot the chart center-left, top-left, bottom left, I have to rotate the camera right to place the chart images in the left of the viewfinder frame.  Is this what is intended by this instruction, rather than "move a bit left to shoot center-right, top-right, bottom right" with no rotation?  Thanks

    Adobe Lens Profile Creator actually EXPECTS the camera orientation and location with respect to the chart changes from one image view to the next.You should try to get more variety of camera orientations and positions out of the recommended 9 image shots. The other key to better profiling result is try to sample as close to the edge/corners without getting any of the squares got clipped by the image frame, because the lens aberrations are typically more severe at the image corners/edges. If your camera have live view feature, that provides a better preview than the view finder. You might want to experiment a little bit.
    Take a look at the FAQ and/or the calibration chart shooting guide, that help explains many of the reasonings behind it. See FAQ here http://labs.adobe.com/technologies/lensprofile_creator/faq.html .

  • Annoying screen rotation - no rotation lock

    Hello.
    To rotate my scree I need to tilt my iPad 2 about 30 degrees.
    But the screen rotated to left even I tilt it's about 5 degrees.
    This is very annoying. I know that I can use screen rotation lock but this is not he case.
    When I hold it flat i can have little variations to the sides and my screen is not rotating but if I only tilt it little bit to the left my screen tomatoes, but if I tilt it the same amount to the right my screen is not rotating.
    My accelerometer is ok, I checked it in level app.
    tl,dr.
    It takes very little little to rotate my screen to right ( to the left, top, or bottom it takes normal amount).
    I hope you understand me.

    You could take it to an Apple store and have them look at it.
    Also,
    I only tilt it little bit to the left my screen tomatoes
    what?

  • Dual monitor setup - need laptop on the left

    Hi All
    I'm running a dual monitor setup - specifically a HP G72 laptop and a widescreen monitor. I use the monitor as the default and sometimes I want to use the Laptop as a secondary screen for watching TV etc. My desktop is Enlightenment, I just changed to it from Gnome. My issue is that I want the laptop to be on the left of the monitor - that's how it is physically positioned - but when I switch the Laptop screen on all my applications shift over to the laptop screen. I've written 2 scripts, attached to hotkeys, one to turn the laptop off and the other to turn the laptop on. The script to turn the laptop on is as follows:
    xrandr --output LVDS1 --mode 1600x900 --pos 1600x0 --rotate normal
    --output VGA1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --left-of LVDS1
    This works fine, applications stay where they should be, except that the physical position is incorrect; VGA1 should be to the right of LVDS1 like this:
    xrandr --output LVDS1 --mode 1600x900 --pos 1600x0 --rotate normal
    --output VGA1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --right-of LVDS1
    However, when I use the second script all of the applications shift to the laptop but at least the physical position is correct. The issue appears to be something to do with laptops, almost as though when it's a laptop the default monitor is forced to be on the left. Has anybody got any suggestions how to get around this issue?
    Thanks
    Richard

    This is due to your window manager treating the two monitors as a larger 'desktop' area - that combined with your specification of the pos=0x0 you are telling it to do this.
    If you have only the VGA output on, the top left corner of the VGA monitor is 0x0.  If you open a window, and it is placed 10 pixels in and down from the top left, it is at coordinates 10x10 in the x session.  Then you turn on the laptop monitor and specify that the top left corner of the laptop monitor should now bo considered 0x0 - but nothing is done to move the windows, so the window with coordinates 10x10 is now near the top left of the laptop monitor.
    I see 3 possible ways of acheiving what you want:
    1) swap the "pos" parameters in your xrandr commands so that the monitor on the left is always at 0x0 and the one on the right is always at 1920x0 (or whatever).  This will leave a large area of available X desktop that is not visible - I don't know how your window manager will treat this.  It might try to map windows on the laptop screen space even though that screen is not on.  I know openbox is easy to configure where it tries to place windows.
    2) Keep the VGA monitor always at 0x0, but place the laptop monitor at a negative offset when you want it on.  I don't actually know if X allows negative coordinates like that, but it's worth a shot.
    3) Configure your window manager, or use a different window manager, so that it is aware of the two screens and treats them reasonably (e.g. moves windows when the desktop area is changed).
    Last edited by Trilby (2014-07-12 12:15:42)

  • Is Flash Player 11.7.700.224 really compatable with Windows Vista 64-bit?

    I ask this question because under System Requirements, Window Vista 64-bit isn't listed.  I've inserted the link for the system requirements below...
    http://www.adobe.com/products/flashplayer/tech-specs.html
    I'm trying to figure why my Flash Player disappears from time to time when I'm watching a clip/video and then my Internet Explorer 9 typically stops working, it closes down, and then it opens up and asks me if I want to restore the browsing session.  I'm thinking that this has to do with having both Internet Explorer 9 32-bit and 64-bit.  I read online that Internet Explorer 9 has both and this is why I'm questioning whether Flash Player 11.7.700.224 might be contributing to this issue or was Window Vista 64-bit left off the system requirements in error?
    Thanks!

    Try using the installers from the links in http://forums.adobe.com/thread/909550
    P.S. topic moved to the Installation section of the forum.

  • Image Rotation Problem in LR 3.2RC

    Anyone else having an issue with image rotation in Lightroom 3.2C?
    Here's what happens:
    I import images from my card. There are a combination of images taken horizontally and vertically. The vertical images come in sideways (horizontally). This is no big deal: maybe the cameras I was using in this case (Olympus E-PL1 and Panasonic GF1) don't properly mark the orientation.
    So, in Grid view,  I select one of the improperly orientated images and click the "Rotate Photo Left" arrow in the toolbar. Here's where it gets weird. Instead of rotating the image 90-degrees counter clockwise, the thumbnail rotates about 45-degrees, so now it's crooked in Grid view. However, on my second monitor, the image now looks properly orientated.
    I've tried rotating using the menu (Photo menu / Rotate Left) and got the same result. If I repeatedly rotate, it ends up in all sorts of odd positions in grid mode.
    What's up with this? Is it just me?
    Alan
    PhotoCitizen.com

    Restarted Lightroom and all looks good now. I'll be interested to see if the problem returns next time I import images.
    UPDATE: I spoke too soon. Closed LR3 and opened it again. No, the cockeyed thumbnails are not saved at their odd angles. But they still don't match the image shown on my 2nd monitor (or on my main monitor either if I go to Loupe View). The Grid view image might show the vertical image lying on its side (horizontal), even though the 2nd monitor shows it in the correct orientation.
    This happens with horizontal images too if I try to rotate them - something I tried just now but wouldn't normally need to do.
    Trying to rotate the thumbnail again results in the cockeyed thumbnail. If I then CLICK on that thumbnail, it straightens out, but never in the correct orientation. Here's a screen grab:
    Something seriously wrong here. Something that NEVER happend in Lightroom 3 until I installed version 3.2RC. So, I doubt that it's a video card problem - looks like a bug to me.
    Alan
    PhotoCitizen.com

  • [Solved] Multimonitor compositioning problem with rotated screen

    Hello,
    I have problem with picture compositioning on screen, problem is best described on video, if I rotate second screen situation is same, but roles are flipped.
    https://drive.google.com/file/d/0B0dkWJ … sp=sharing
    My setup:
    Acer 3820tg with Arch stable, catalyst-total from AUR and i3 wm:
    ATI 5650 - only discrete vga
    VGA output: 1280x1024 rotated to left
    HDMI out: 1680x1050
    nomodeset not in kernel line
    I tried both(gpu and display) image scaling
    $ glxinfo
    name of display: :0
    display: :0 screen: 0
    direct rendering: Yes
    server glx vendor string: ATI
    server glx version string: 1.4
    $ fglrxinfo
    display: :0 screen: 0
    OpenGL vendor string: Advanced Micro Devices, Inc.
    OpenGL renderer string: AMD Mobility Radeon HD 5000 Series
    OpenGL version string: 4.4.12874 Compatibility Profile Context 12.104
    Thanks for help.
    Jakub
    Last edited by kubco2 (2014-07-03 18:21:21)

    Out of the box, the fonts will suck.
    Go through the following wiki https://wiki.archlinux.org/index.php/Font_configuration and configure your fonts. You also need to make sure you have a couple good fonts installed. Then setup the hinting, filter etc and it will be much improved.
    I have used Infinality in the past and it works very well as well but made too many changes, one of which resulted in an issue with an app that was difficult to track down. Haven't used it lately so do not know the status.

  • Padlock Symbol at Lower Left of USB hard drive Icon - What does it mean ?

    Presumably the small locked padlock that appears at the lower left corner of my USB external hard drive's mounted icon when I boot into Leopard means the volume is locked in some way ????
    This volume is NOT my designated Time Machine volume.
    I seem to be able, as my computer's administrator, to still write to and read from this drive and the permissions look OK for it so what does this newly appearing lock icon mean and how do I get rid of it ?
    Also: on the Mac's internal drive this time, Why is the finder asking for my password very time I try to move or delete files and folders from my own home documents folder when logged in normally as myself ? Don't I "own" my own home folder ?????

    I too want to join in on this Band Wagon! I did nothing new to my Mac Pro running Leo 10.5.2 and all current updates applied. First thing I noticed was copying files from an external usb drive. The file would get to almost finished and have maybe a couple of bits left. Then a notice would appear saying the files were corrupted. (NOT) I had to Force Quit the Finder and Relaunch it in order to remove the warning notice off of the desktop. Then I noticed 1 of my 4 internal drives with the padlock on the lower left hand side. As I was investigating that drive another drive blinked and then it too had the padlock! Now the external usb drive also has a padlock. I looked at permissions with (Command I) and found that my permissions had been changed to "Custom" which could not be changed back to read & write. In fact all of the affected drives now have the same issue. So to try to fix them I added myself to the users side of the permissions box and gave myself read and write permissions in the hope I could delete the custom permissions account. No Luck! But I was able to delete the new read write account? Ran Disk utility from the DVD an the drives still show up as being locked. Anyway when I removed the DVD I let the machine reboot. Now for the fun! It gets up to the grey background & spinning gears, goes to black and restarts. It stays caught caught in this loop until I kill the power. Call Apple support & they told me what I already knew. Reformat & start over. I do not find that to be an answer I want to know what caused it & how to fix it! Since my company just invested in 50 of these units and I am the only technician for over 200 users.

  • How do I rotate view 90 degrees in digital editions?

    how do I rotate view 90 degrees in digital editions?

    In Library Grid view there are curved arrows that appear on the thumbnail or at the bottom of the Loup view if you turn Rotate controls on.
    In Develop you can right-click and choose Transform -> Rotate right/left (CW/CCW), or use the keyboard shortcuts.

  • Rotated photos in ATV slidshows

    ATV rotates photos left 90 degrees every once in a while when playing slideshows. The rotation seems independent of the original camera orientation and the photos' orientation in iPhoto. Has anyone experienced this? Is it a known bug?
    MacBookPro   Mac OS X (10.4.6)  
    MacBookPro   Mac OS X (10.4.6)  

    Here's some more information on EXIF and image orientation.
    You can view the EXIF orientation value using Preview. Open the problematic image, select "Get Info" from the "Tools" menu. In the document info window, click the "details" button. In that pane you will see the image metadata, including the orientation number.
    As others have already suggested here, you can synch the orientation tag and the actual image by opening the image and saving it again in the desired orientation. GraphicConverter will also batch update EXIF orientation. Search the Apple discussions for "EXIF orientation" to get an explanation on how to do that.
    This page, http://www.abc-view.com/articles/article5.html , has an illustration of the orientation values and their effect on the image.
      Mac OS X (10.4.9)  

  • I have 6mins and 25 seconds of The Jane Austen Club left to download from iTunes and it won't download - I've watched it all up until then.  Why is it stuck!

    Please help.  I want to finish watching it.  I only have a little bit left to watch.
    I have ADSL and I have 50 GB so heaps of space.

    Delete the references to them from the iTunes library and then either redownload them from the iTunes Store or use the Transfer Purchases function.
    (121569)

Maybe you are looking for

  • Open Letter to Apple

    Dear Apple, I love your products and have been using Apple since 1985. Currently, though, I am not too happy with the Quicktime 7.3.1 update. I recently authorized the purchase of multiple iWorks for the computers in our office. I chose iWork for Key

  • Is the problem in my PSU? vol.2 ;)

    Hi guys.. thanks for your yeasterday's replies.. i have now used other PSU and i am still encountering the same problem. the PSU i used this time was only 300w but its specifications were: 3.3V 28A, 12V 15A, 5V 30A..  if ur are too lazy to look for t

  • Problem mapping to XMLBean using database control

    Hi I have to generate an XML document based on the values returned from the database. I have an industry standard XSD with me and Im trying to use the database control to automatically map the resultset data to the XMLBean. While doing so, it works f

  • Program for Cash withdrawal function fom ATM

    I have a question and i dont undersatnd what should i write the code for this program.If any link related to this topic then give me.Please help Q) write compiling code for Cash withdrawal function from ATM which based on user specified amount,dispen

  • I can't drag folders on/off my deskstop

    Although, I have rebooted my puter, I cannot drag/move any of the folders on my desktop. What is happening?