Search Results

Search found 10324 results on 413 pages for 'move'.

Page 16/413 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Move OS from RAID5 array to RAID 1 arrays

    - by Antoine
    I want to give a last boost to my old ProLiant ML350 G5 server which just needs to be reliable for a few more year only ! With a defined budget of about 1500$ (I do not have more), i plan to replace the CPU (+ adding a second one), the battery cache of my raid controller (E200i), double the RAM, and change all hard drives. I have 7 HDD (SAS 10krpm, 72Gb) + 1 spare in RAID5, and my system is all FULL (no empty tray, full disks). in my current RAID5 array, I have 2 partitions: - 1 OS partition, 20Gb - 1 data partition, 350 Gb I plan to replace these 8 disks with : - 2 x 300Gb SAS 15krpm in RAID 1 (= 1 partition for OS) - 2 x 2Tb SATA 7.2krpm in RAID 1 (= 1 partition for DATA) My biggest constraint is that I have only 01 day to upgrade my server. Therefore, I'm looking for cloning all my files (OS + data partition) to my new arrays, i.e : - the OS partition shall be cloned to the RAID1 "2x300Gb array" - the data partition shall be cloned to the RAID1 "2x2Tb array" My second problem is that I need to physically remove all the old hard drives before inserting the new ones. I'm running Windows Server 2003 R2, and even if MS support will expire soon, I cannot buy a new licence and spent time in configuration. Obviously, with 1500$, I cannot also buy a new server that I could start configuring from now ! Thought about ASR (NTBackup), but I have no floppy drive (and do not really want to invest in one !) Thought about a clonezilla clone, and read this interesting link : Windows Server 2003 - move C: partition to a new SAS disk , but i'm not so confident in using Clonezilla with RAID5. What should be the best option to quickly and easily (if possible!) "copy/paste" my OS (so no need to reinstall and reconfigure all) and DATA / programs / services, etc... ? Thanks for your comments

    Read the article

  • Move a screen session back to its original PID

    - by cron410
    Installed McMyAdmin (minecraft manager) on Ubuntu 12.04 32 bit. Wrote my own service to start McMyAdmin (.net app running in Mono) in its own screen session, and be able to inject proper McMyAdmin commands into that session with the init.d script. Its been running great! Today, I decided to start installing a Source dedicated server (counterstrike pro mod) I determine its going to be a long download process so I quit the process and fire up a fresh screen session called "source". I paste the command in, but it has a space at the begining and bash complains of ignoring semaphores or some such. I detach and reattach the session. Its sliding like butter. I ctrl+a-d out of the session and start exploring the new folder structure and figure out where I need to place a symbolic link. I go to resume that screen and this is what I see: $screen -r source There are several suitable screens on 20091.source (12/02/12 22:59:53) (Detached) 19972.source (12/02/12 22:57:31) (Detached) 917.minecraft (11/30/12 15:30:37) (Attached) It appears I am connected to the minecraft screen?!?!?! So I attach to the other screens one at a time. minecraft is running in 19972.source and sourceds is running in 20091.source So how the hell did I move the minecraft process to another session called source and my main terminal is now "attached" to the minecraft screen? more: I just used exit to quit the putty session, then logged back in, its still the same. did that 3 more times and now the minecraft screen is gone and everything is acting as it should except, of course, for the session name and start time of the "new" minecraft screen. Should I just submit this as a bug for GNU screen?

    Read the article

  • Move every 3 rows into a column in excel

    - by Eliane El Asmr
    Please i need your help. I need to move every 3 rows into a new colomn. --Let's suppose i have this: Ambassade de France S.E. M. Patrice PAOLI 01-420000-420150 Ambassade de France Mme. Jamilé Anan 01-420000-420150 Ambassade de France Mme . Marie Maamari 01-420000-420150 --I need them to be Like this: Ambassade de France S.E. M. Patrice PAOLI 01-420000-420150 Ambassade de France Mme. Jamilé Anan 01-420000-420150 Ambassade de France Mme . Marie Maamari 01-420000-420150 I have this code. Can you help me Please. It's giving me error. Out of range. What should i change? It's urgent:(the code is for every 7, i need for every 3) Sub Every7() Dim i As Integer, j As Integer, cl As Range Dim myarray(100, 6) As Integer 'I don't know what your data is. Mine is integer data 'Change 100 to however many rows you have in your original data, divided by seven, round up 'remember arrays start at zero, so 6 really is 7 If MsgBox("Is your entire data selected?", vbYesNo, "Data selected?") <> vbYes Then MsgBox ("First select all your data") End If 'Read data into array For Each cl In Selection.Cells Debug.Print cl.Value myarray(i, j) = cl.Value If j = 6 Then i = i + 1 j = 0 Else j = j + 1 End If Next 'Now paste the array for your data into a new worksheet Worksheets.Add Range(Cells(1, 1), Cells(101, 7)) = myarray End Sub Thank you.

    Read the article

  • Move EFI System Partition to another drive

    - by Pincopallino
    I had a Windows 8 installation on an HDD, using UEFI as boot. The HDD has the following GPT table: DISKPART> list partition Partizione ### Tipo Dim. Offset --------------- ---------------- ------- ------- Partizione 1 Ripristino 300 Mb 1024 Kb Partizione 2 Sistema 100 Mb 301 Mb Partizione 3 Riservato 128 Mb 401 Mb Partizione 4 Primario 390 Gb 529 Mb Partizione 5 Primario 540 Gb 390 Gb (I apologize it's in Italian, but the translation is quite straightforward). I recently bought an SSD drive, connected it and installed a fresh Windows 8. Now I have a working dual boot, but the UEFI partition is on the HDD instead of the SSD. Here's the SDD partition list: Partizione ### Tipo Dim. Offset --------------- ---------------- ------- ------- Partizione 1 Riservato 128 Mb 1024 Kb Partizione 2 Primario 221 Gb 129 Mb I think that the best solution would be to have it on the SSD for two reasons: the first is performance (I guess it would be a little be faster on the SSD due to the spin up time for an HDD, but I may be wrong about that) second reason is consistency. As I plan to use only the Windows 8 installation that is located on the SSD and I'm probably going to erase the system partition on the HDD to use it as a data storage device, I think that the boot partition should be on the same drive as the OS. So the question is how do I move the EFI System Partition to the SSD?

    Read the article

  • Subversion COPY/MOVE - File not found: transaction 'XXX-XX'

    - by theplatz
    I'm attempting to create a branch in one of my subversion repositories and keep running into an error. No mater what is done, I keep getting the following: File not found: transaction '3062-2e6', path '/Software/XXXXXX/branches/testbranch' I've noticed that the first part of the '3063-3e6' in the above message is the last successful committed revision in the repository. My apache logs don't give much more information: [Wed Nov 24 14:10:38 2010] [error] [client x.x.x.x] Could not MOVE/COPY /svn/p070361/!svn/bc/3049/Software/SXXXXXX/trunk. [404, #0] [Wed Nov 24 14:10:38 2010] [error] [client x.x.x.x] Unable to make a filesystem copy. [404, #160013] [Wed Nov 24 14:10:38 2010] [error] [client x.x.x.x] File not found: transaction '3059-2e2', path '/Software/XXXXXX/branches/testbranch' [404, #160013] This is all happening on a server with an nginx frontend that proxies to Apache for the subversion bits. Other repositories are able to branch fine and I was able to create the branch using file:/// from the command line on the server this is occurring on. The permissions on this repository match every other repository and disk space is not an issue.

    Read the article

  • Windows Server 2003 (w/Exchange) move to new machine

    - by James Booker
    I have an ageing domain controller (the only one on a 10-pc network) which needs rebooting often. I have a Dell Poweredge 2850 server doing nothing, so I'd like to move the DC to that, but here's the catch - I don't have Win2k Server Std install media any more as it's been lost. I purchased "Easus Todo Backup Advanced Server" which claims to be able to recover to dissimilar metal, but it's not quite working (although I don't think it's the product's fault) I know the server and PERC RAID card are good because I installed Ubuntu on the logical drive (4 x 72GB disks RAID 5) no problems. I've booted frmo the Easus Todo backup CD (which is WinPE based) and recovered to the logical disk on the RAID (after installing driver inside the WinPE environment from a NAS drive) The problem is when I boot the server, I can get the OS selection menu, but any option results in a blank screen, with no errors. I figure this is probably because the driver wasn't installed on the old machine (which is IDE-based (i know, i know!) and doesn;t have a RAID controller) I've booted from the CD and copied the mraid35x.sys file to the c:\windows\system32\drivers folder on the recovered system, but it makes no difference. I made a boot.ini with rdisks 0-10 defined, and booting from each of these resulted in a file error (i.e. 'this isn't a real disk') - the only disk that gets any response (the blank screen) is multi(0)disk(0)rdisk(0)partition(1) which just gives me the blank black screen and no disk activity. Is there any way I can force the drvier to be installed on the source system (so i can do a full backup again), i've tried right-clicking the oemsetup.inf and clicking install, but it didn't actually do anything. I attempted to force it with the 'Add new hardware' wizard and forcing with the 'have disk' option but it still gave me no hardware to select. Also I've got an identical machine running WinXP which uses the PERC driver successfully (which was obviously done at install time) and the boot.ini settings are the same : multi(0)disk(0)rdisk(0)partition(1) Any ideas would be appreciated.

    Read the article

  • How to move a ruby on rails application to a new server

    - by ManiacZX
    I have a rails app on an old Ubuntu server I need to move onto a new machine. I haven't worked with ruby on rails so I don't really know anything about the structure of the app. I want to load this onto an Ubuntu 8.04 AMI on Amazon EC2 and am looking for any information regarding the migration process such as: Do I copy over the entire folder defined as the application root in the mongrel config (for ex: /u/apps/myapp/current) or just certain folders? Am I looking for trouble if I go with the latest versions of ruby and the various gems? Any general gotchas to look out for in the process. Current server information: root@webnode001:/# cat /proc/version Linux version 2.6.15-27-server (buildd@terranova) (gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)) #1 SMP Fri Dec 8 18:43:54 UTC 2006 root@webnode001:/# rails -v Rails 1.2.3 root@webnode001:/# mongrel_rails cluster::configure --version Version 1.0.1 root@webnode001:/# gem -v 0.9.0 root@webnode001:/# gem list -l *** LOCAL GEMS *** actionmailer (1.3.3, 1.2.5) Service layer for easy email delivery and testing. actionpack (1.13.3, 1.12.5) Web-flow and rendering framework putting the VC in MVC. actionwebservice (1.2.3, 1.1.6) Web service support for Action Pack. activerecord (1.15.3, 1.15.2, 1.14.4) Implements the ActiveRecord pattern for ORM. activesupport (1.4.2, 1.4.1, 1.3.1) Support and utility classes used by the Rails framework. cgi_multipart_eof_fix (2.1) Fix an exploitable bug in CGI multipart parsing which affects Ruby <= 1.8.5 when multipart boundary attribute contains a non-halting regular expression string. daemons (1.0.7, 1.0.5, 1.0.4, 1.0.2) A toolkit to create and control daemons in different ways eventmachine (0.7.2, 0.7.0) Ruby/EventMachine socket engine library fastercsv (1.2.0, 1.1.0) FasterCSV is CSV, but faster, smaller, and cleaner. fastthread (1.0) Optimized replacement for thread.rb primitives ferret (0.11.4) Ruby indexing library. gem_plugin (0.2.2, 0.2.1) A plugin system based only on rubygems that uses dependencies only mongrel (1.0.1, 0.3.13.4) A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps. mongrel_cluster (0.2.1) Mongrel plugin that provides commands and Capistrano tasks for managing multiple Mongrel processes. mysql (2.7) MySQL/Ruby provides the same functions for Ruby programs that the MySQL C API provides for C programs. piston (1.3.3) Piston is a utility that enables merge tracking of remote repositories. rails (1.2.3, 1.1.6) Web-application framework with template engine, control-flow layer, and ORM. rake (0.7.3, 0.7.1) Ruby based make-like utility. sources (0.0.1) This package provides download sources for remote gem installation swiftiply (0.5.1) A fast clustering proxy for web applications.

    Read the article

  • Reliable file copy (move) process - mostly Unix/Linux

    - by mfinni
    Short story : We have a need for a rock-solid reliable file mover process. We have source directories that are often being written to that we need to move files from. The files come in pairs - a big binary, and a small XML index. We get a CTL file that defines these file bundles. There is a process that operates on the files once they are in the destination directory; that gets rid of them when it's done. Would rsync do the best job, or do we need to get more complex? Long story as follows : We have multiple sources to pull from : one set of directories are on a Windows machine (that does have Cygwin and an SSH daemon), and a whole pile of directories are on a set of SFTP servers (Most of these are also Windows.) Our destinations are a list of directories on AIX servers. We used to use a very reliable Perl script on the Windows/Cygwin machine when it was our only source. However, we're working on getting rid of that machine, and there are other sources now, the SFTP servers, that we cannot presently run our own scripts on. For security reasons, we can't run the copy jobs on our AIX servers - they have no access to the source servers. We currently have a homegrown Java program on a Linux machine that uses SFTP to pull from the various new SFTP source directories, copies to a local tmp directory, verifies that everything is present, then copies that to the AIX machines, and then deletes the files from the source. However, we're finding any number of bugs or poorly-handled error checking. None of us are Java experts, so fixing/improving this may be difficult. Concerns for us are: With a remote source (SFTP), will rsync leave alone any file still being written? Some of these files are large. From reading the docs, it seems like rysnc will be very good about not removing the source until the destination is reliably written. Does anyone have experience confirming or disproving this? Additional info We will be concerned about the ingestion process that operates on the files once they are in the destination directory. We don't want it operating on files while we are in the process of copying them; it waits until the small XML index file is present. Our current copy job are supposed to copy the XML file last. Sometimes the network has problems, sometimes the SFTP source servers crap out on us. Sometimes we typo the config files and a destination directory doesn't exist. We never want to lose a file due to this sort of error. We need good logs If you were presented with this, would you just script up some rsync? Or would you build or buy a tool, and if so, what would it be (or what technologies would it use?) I (and others on my team) are decent with Perl.

    Read the article

  • Trouble move-capturing std::unique_ptr in a lambda using std::bind

    - by user2478832
    I'd like to capture a variable of type std::vector<std::unique_ptr<MyClass>> in a lambda expression (in other words, "capture by move"). I found a solution which uses std::bind to capture unique_ptr (http://stackoverflow.com/a/12744730/2478832) and decided to use it as a starting point. However, the most simplified version of the proposed code I could get doesn't compile (lots of template mistakes, it seems to try to call unique_ptr's copy constructor). #include <functional> #include <memory> std::function<void ()> a(std::unique_ptr<int>&& param) { return std::bind( [] (int* p) {}, std::move(param)); } int main() { a(std::unique_ptr<int>(new int())); } Can anybody point out what is wrong with this code? EDIT: tried changing the lambda to take a reference to unique_ptr, it still doesn't compile. #include <functional> #include <memory> std::function<void ()> a(std::unique_ptr<int>&& param) { return std::bind( [] (std::unique_ptr<int>& p) {}, // also as a const reference std::move(param)); } int main() { a(std::unique_ptr<int>(new int())); }

    Read the article

  • How to move a symlink to the trash?

    - by neoneye
    I don't see any options for the FSPathMoveObjectToTrashSync() function for not following links. Here is what I have tried Create a link and a file [ 21:32:41 /tmp ] $ touch my_file [ 21:32:45 /tmp ] $ ln -s my_file my_link [ 21:32:52 /tmp ] $ la total 8 drwxrwxrwt 12 root wheel 408 17 Maj 21:32 . drwxr-xr-x@ 6 root wheel 204 9 Sep 2009 .. -rw-r--r-- 1 neoneye wheel 0 17 Maj 21:32 my_file lrwxr-xr-x 1 neoneye wheel 7 17 Maj 21:32 my_link -> my_file Move the link to the trash OSStatus status = FSPathMoveObjectToTrashSync( "/tmp/my_link", NULL, kFSFileOperationDefaultOptions ); NSLog(@"status: %i", (int)status); Output is status: 0 However the file got removed and not the link [ 21:32:55 /tmp ] $ la total 8 drwxrwxrwt 11 root wheel 374 17 Maj 21:33 . drwxr-xr-x@ 6 root wheel 204 9 Sep 2009 .. lrwxr-xr-x 1 neoneye wheel 7 17 Maj 21:32 my_link -> my_file [ 21:33:05 /tmp ] $ How can I move move symlinks to the trash? The Solution.. thanks to Rob Napier NSString* path = @"/tmp/my_link"; OSStatus status = 0; FSRef ref; status = FSPathMakeRefWithOptions( (const UInt8 *)[path fileSystemRepresentation], kFSPathMakeRefDoNotFollowLeafSymlink, &ref, NULL ); NSAssert((status == 0), @"failed to make FSRef"); status = FSMoveObjectToTrashSync( &ref, NULL, kFSFileOperationDefaultOptions ); NSLog(@"status: %i", (int)status);

    Read the article

  • Move SELECT to SQL Server side

    - by noober
    Hello all, I have an SQLCLR trigger. It contains a large and messy SELECT inside, with parts like: (CASE WHEN EXISTS(SELECT * FROM INSERTED I WHERE I.ID = R.ID) THEN '1' ELSE '0' END) AS IsUpdated -- Is selected row just added? as well as JOINs etc. I like to have the result as a single table with all included. Question 1. Can I move this SELECT to SQL Server side? If yes, how to do this? Saying "move", I mean to create a stored procedure or something else that can be executed before reading dataset in while cycle. The 2 following questions make sense only if answer is "yes". Why do I want to move SELECT? First off, I don't like mixing SQL with C# code. At second, I suppose that server-side queries run faster, since the server have more chances to cache them. Question 2. Am I right? Is it some sort of optimizing? Also, the SELECT contains constant strings, but they are localizable. For instance, WHERE R.Status = "Enabled" "Enabled" should be changed for French, German etc. So, I want to write 2 static methods -- OnCreate and OnDestroy -- then mark them as stored procedures. When registering/unregistering my assembly on server side, just call them respectively. In OnCreate format the SELECT string, replacing {0}, {1}... with required values from the assembly resources. Then I can localize resources only, not every script. Question 3. Is it good idea? Is there an existing attribute to mark methods to be executed by SQL Server automatically after (un)registartion an assembly? Regards,

    Read the article

  • How to avoid mouse move on Touch

    - by VirtualBlackFox
    I have a WPF application that is capable of being used both with a mouse and using Touch. I disable all windows "enhancements" to just have touch events : Stylus.IsPressAndHoldEnabled="False" Stylus.IsTapFeedbackEnabled="False" Stylus.IsTouchFeedbackEnabled="False" Stylus.IsFlicksEnabled="False" The result is that a click behave like I want except on two points : The small "touch" cursor (little white star) appears where clicked an when dragging. Completely useless as the user finger is already at this location no feedback is required (Except my element potentially changing color if actionable). Elements stay in the "Hover" state after the movement / Click ends. Both are the consequences of the fact that while windows transmit correctly touch events, he still move the mouse to the last main-touch-event. I don't want windows to move the mouse at all when I use touch inside my application. Is there a way to completely avoid that? Notes: Handling touch events change nothing to this. Using SetCursorPos to move the mouse away make the cursor blink and isn't really user-friendly. Disabling the touch panel to act as an input device completely disable all events (And I also prefer an application-local solution, not system wide). I don't care if the solution involve COM/PInvoke or is provided in C/C++ i'll translate. If it is necessary to patch/hook some windows dlls so be it, the software will run on a dedicated device anyway. I'm investigating the surface SDK but I doubt that it'll show any solution. As a surface is a pure-touch device there is no risk of bad interaction with the mouse.

    Read the article

  • Trying to move files with specific file names from root directory to a subfolder

    - by Justin Reagan
    Hi I'm still pretty new to powershell so I apologize if I ask something that extremely basic. I have a root directory on a tftp server that pulls down config files from routers and other equipment every night. The files are like this IPaddress_YYYYMMDD_TA5000. There is a limitation in the equipment where the files can't be set to move into the root directory on their own. What I want to do is make a powershell script that will only move the files with the TA5000 part in the filename to the sub directory and only keep the 5 most recent files. I looked but I couldn't seem to find what I would need to do to parse the file for that specific string. I already have the portion of the script to delete the files based on age that was simple. Any help on getting started would be appreciated. Edit: I forgot to post the code I was trying. Move-Item c:\tftptransferfiles c:\tftptransferfiles\sca | Where-Object {_.name -like "*TA5000*"} I keep getting a error saying that the item at C:\tftptransferfiles is in use.

    Read the article

  • How to move positions within an array?

    - by Jade Mulholland
    A program that simply moves array elements. Two variables: userInputVariable and blankSpaceVariable. I have a 2D array named table. Defined as table[userInputVariable + 1][6] I am printing out this array in a table format, and the far left column is numbered by whatever number the user entered at the beginning of the program. I then ask the user where they would like to enter a blank space within the array. This blank space acts like a divider for all the other information in the array. For example, if the user enters 10 at the start for the userInputVariable, and then enters 5 for the blank space. Once printed, the numbers should go like this: 1, 2, 3, 4, --, 5, 6, 7, 8, 9, 10. My plan has been to create a for loop and try to move all the numbers in the array back a position starting from the blank space variable. What I currently have, but does not work: for (int i = blankSpaceVariable; i < table.length - 1; i++) { table[i] = table[i + 1]; } table[blankSpaceVariable] = "--"; With my current code, the numbers go like this: 1, 2, 3, 4, 6, 7, 8, 9, 10 Tried completing this a few different ways also, but the other info within my 2D array didn't move with the numbers. So I thought that this approach can hopefully move all the info within my 2D array down, and make way for a blank section. All help is greatly appreciated!

    Read the article

  • UIView rotate and than move

    - by user1790354
    I have problem with rotating and moving image (UIView). If I use this for rotate: [UIView beginAnimations: @"rotate" contex: nil]; [UIView setAnimationDuration: 1]; [UIView setAnimationBeginsFromCurrentState: YES]; [UIView setAnimationCurve: UIViewAnimationCurveLinear]; spaceShip.transform = CGAffineTransformMakeRotation (angle); // spaceShip is the UIView [UIView commitAnimations]; And this to move: [UIView beginAnimations: @"move" contex: nil]; [UIView setAnimationDuration: 1]; [UIView setAnimationBeginsFromCurrentState: YES]; [UIView setAnimationCurve: UIViewAnimationCurveLinear]; spaceShip.center = destanation // destanation is a point where user tap [UIView commitAnimations]; It's working well one at a time. But together this two animations don't work. Space Ship is rotating, but does not move in direction. Where my mistake? P.S. Early I have specify anchor point (0.5, 0.5). But when I rotate image it coordinates is changing.

    Read the article

  • Modifying an ObservableCollection using move() ?

    - by user1202434
    I have a question relating to modifying the individual items in an ObservableCollection that is bound to a ListBox in the UI. The user in the UI can multiselect items and then drop them at a particular index to re-order them. So, if I have items {0,1,2,3,4,5,6,7,8,9} the user can choose items 2, 5, 7 (in that order) and choose to drop them at index 3, so that the collection now becomes, {0,1,3, 2, 5, 7, 4, 8,9} The way I have it working now, is like this inside of ondrop() method on my control, I do something like: foreach (Item item in draggedItems) { int oldIndex = collection.IndexOf(item.DataContext as MyItemType); int newIndex = toDropIndex; if (newIndex == collection.Count) { newIndex--; } if (oldIndex != newIndex) { collection.Move(oldIndex, newIndex); } } But the problem is, if I drop the items before the index where i start dragging my first item, the order becomes reversed...so the collection becomes, {0,1,3, 7, 5, 2, 4, 8,9} It works fine if I drop after index 3, but if i drop it before 3 then the order becomes reversed. Now, I can do a simple remove and then insert all items at the index I want to, but "move" for me has the advantage of keeping the selection in the ui (remove basically de-selects the items in the list..)....so I will need to make use of the move method, what is wrong with my method above and how to fix it? Thanks!

    Read the article

  • Using gluLookAt to move camera in 2D iPhone game ?

    - by Mr.Gando
    Hey guys, I'm trying to use gluLookAt to move the camera in my iPhone game, but every time I've tried to use gluLookAt my screen just goes "blank" ( grey in this case ) I'm trying to render a simple triangle and to move the camera, this is my code: to setup my scene I do: glViewport(0, 0, backingWidth, backingHeight); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glRotatef(-90.0, 0.0, 0.0, 1.0); //using iPhone in horizontal mode glOrthof(-240, 240, -160, 160, -1, 1); glMatrixMode(GL_MODELVIEW); then my "triangle rendering" code looks like: GLfloat triangle[] = {0, 100, 100, 0, -100, 0,}; glClearColor(0.7, 0.7, 0.7, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnableClientState(GL_VERTEX_ARRAY); glColor4f(1.0, 0.0, 0.0, 1.0); glVertexPointer(2, GL_FLOAT, 0, &triangle); glDrawArrays(GL_TRIANGLES, 0, 6); glDisableClientState(GL_VERTEX_ARRAY); This draws a red triangle in the middle of the screen, when I try to apply gluLookAt ( I got the implementation of the function from Cocos2D so I asume it's correct ), i do: glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(0,0,1,0,0,0,0,0,1); // try to move the camera a bit ? GLfloat triangle[] = {0, 100, 100, 0, -100, 0,}; glClearColor(0.7, 0.7, 0.7, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnableClientState(GL_VERTEX_ARRAY); glColor4f(1.0, 0.0, 0.0, 1.0); glVertexPointer(2, GL_FLOAT, 0, &triangle); glDrawArrays(GL_TRIANGLES, 0, 6); glDisableClientState(GL_VERTEX_ARRAY); This leads me to grey screen (glClearColor is grey), I've tried all sort of things and read what I've found about gluLookAt on the net, but no luck :(, if someone could explain me or show me how to move to move the camera in a top-down fashion ( zelda, etc ), I would really appreciate it. Thanks!

    Read the article

  • How to move an object along a circumference of another object?

    - by Lumis
    I am so out of math that it hurts, but for some of you this should be a piece of cake. I want to move an object around another along its ages or circumference on a simple circular path. At the moment my game algorithm knows how to move and position a sprite just at the edge of an obstacle and now it waits for the next point to move depending on various conditions. So the mathematical problem here is how to get (aX, aY) and (bX, bY) positions, when I know the Centre (cX, cY), the object position (oX, oY) and the distance required to move (d)

    Read the article

  • Using Xlib via JNA to move a window

    - by rob
    I'm using JNA to manipulate application windows on Linux by sending Xlib messages but can't seem to move a window. My original implementation executed wmctrl on the shell to move the windows and that successfully moved the windows. Unfortunately, there's a noticeable amount of overhead associated with calling shell programs from Java, so now I'm trying to make direct API calls using JNA. I'm using the X11 example available from the JNA website and can successfully do a few tricks, such as enumerating the window IDs and reading window properties, so I know JNA+Xlib is at least partially working. First I tried moving the windows directly using XMoveWindow() but the window manager was apparently blocking those calls. I ran across a thread that suggested I needed to send a client message using XSendMessage(), so I've done that below, but apparently XSendMessage() is failing because the window doesn't move and I get a return value of 0. I'm guessing I omitted something obvious, but can't quite figure it out. Any suggestions? Note that, for the purposes of this example, the main method has a window ID hard-coded. This is the window ID of the window I'm trying to move (obtained using wmctrl -l on the console). import com.sun.jna.NativeLong; import com.sun.jna.Pointer; import com.sun.jna.examples.unix.X11; import com.sun.jna.examples.unix.X11.Atom; import com.sun.jna.examples.unix.X11.AtomByReference; import com.sun.jna.examples.unix.X11.Display; import com.sun.jna.examples.unix.X11.Window; import com.sun.jna.examples.unix.X11.WindowByReference; import com.sun.jna.examples.unix.X11.XEvent; import com.sun.jna.examples.unix.X11.XTextProperty; import com.sun.jna.examples.unix.X11.XWindowAttributes; import com.sun.jna.ptr.IntByReference; import com.sun.jna.ptr.NativeLongByReference; import com.sun.jna.ptr.PointerByReference; private static final int FALSE = 0; /** C-style boolean "false" */ private static final int TRUE = 1; /** C-style boolean "true" */ public static void main(String[] args) { setWindowPos(new Window(0x01300007), 100, 100, 600, 400); // update the Window constructor with the appropriate ID given by wmctrl -l } public static boolean setWindowPos(Window window, int x, int y, int w, int h) { final X11 x11 = X11.INSTANCE; Display display = x11.XOpenDisplay(null); NativeLong mask = new NativeLong(X11.SubstructureRedirectMask | X11.SubstructureNotifyMask | X11.ResizeRedirectMask); XEvent event = new XEvent(); String msg = "_NET_MOVERESIZE_WINDOW"; //$NON-NLS-1$ long grflags = 0l; // use the default gravity of the window if (x != -1) grflags |= (1 << 8); if (y != -1) grflags |= (1 << 9); if (w != -1) grflags |= (1 << 10); if (h != -1) grflags |= (1 << 11); event.xclient.type = X11.ClientMessage; event.xclient.serial = new NativeLong(0l); event.xclient.send_event = TRUE; event.xclient.message_type = x11.XInternAtom(display, msg, false); event.xclient.window = window; event.xclient.format = 32; event.xclient.data.l[0] = new NativeLong(grflags); // gravity flags event.xclient.data.l[1] = new NativeLong(x); event.xclient.data.l[2] = new NativeLong(y); event.xclient.data.l[3] = new NativeLong(w); event.xclient.data.l[4] = new NativeLong(h); int status = x11.XSendEvent(display, x11.XDefaultRootWindow(display), FALSE, mask, event); x11.XFlush(display); // need to XFlush if we're not reading X events if (status == 0) { // 0 indicates XSendEvent failed logger.error("setWindowPos: XSendEvent failed (" + msg + ")"); //$NON-NLS-1$ return false; } return true; }

    Read the article

  • move selected item from one selectbox to another selectbox(with duplicate prevention)

    - by I Like PHP
    i have two select box, now what i want is i want to move option from one select box to another via a button below is my code: php <table> <tr> <td> <select size="5" id="suppliedMovies" name="suppliedMovies"> <option selected="selected" value="">Select Movie</option> <option value="1">sholay</option> <option value="3">Jism</option> <option value="4">Rog</option> <option value="5">Zeher</option> <option value="6">Awarpan</option> <option value="7">Paap</option> <option value="8">paanch<option> <option value="9">no entry</option> </select> </td> <td> <input type="button" id="toRight" value="&gt;&gt;"><br> <input type="button" id="toLeft" value="&lt;&lt;"> </td> <td> <select size="5" id="accquiredMovies" name="accquiredMovies"> <option> No item right now</option> </select> </td> </tr> </table> Jquery jQuery(document).ready( function() { function displayVals() { var myValues = jQuery("#suppliedMovies").val(); return myValues; } jQuery('#toRight').click(function(){ var x=displayVals(); console.log(x); var txt=jQuery("#suppliedMovies option[value='"+x+"']").text(); console.log(txt); if(x!=''){ jQuery('#accquiredMovies').append("<option value='"+x+"' >"+txt+"</option>"); } }); }); i m using above jQuery, that is working fine but, i want that when one item is copy from one select box to another select box, then that item should be disable(or probably delete) from first select box (to prevent duplicate entry). i also want to move item from right to left select box please suggest me optimized jQuery . Thanks. UPDATE if i want to use multiple select box on both side? then how do i use that? more update if i click on a item on rightselectbox and move it to left selectbox, and go further(post) then on right selectbox, there is nothing selected items?? what i need is on right selectbox, there all items shoud be always selected , otherwise what i need to do? after i move an item from right to left ,i again have to select rest of items on right selectbox and go further

    Read the article

  • Move to next page if Table can not adjust in current page using iText

    - by Saurabh
    I am generating a PDF report using iText. The report is having four parts as - Project Info1 (A PDF Table of variable height) Project Info2 (A PDF Table of variable height) Requestor Info (A PDF Table of Fixed height) Location Info (A PDF Table of Fixed height) The top two information are of variable height and they can acquire certain pages. The other two are of fixed size which comes at last. I want to move the last (one or both) boxes to the next page if there is no space available to fit those boxes in current page. If space for one box is available then place one to the current page and move other box to the next table. Is there way to decide this?

    Read the article

  • safely lock a file then move? windows

    - by acidzombie24
    I have a file and need to ensure it exist before inserting a row into the db. After i insert i need to use the PK as part of the filename and move it into another location. How do i check if it exist then lock it so it cant be deleted until i can insert into the db then proceed to move the file without it being deleted upon releasing the lock? also the file may be in use. I am thinking of copying the file into a safe location then moving that file away. In this case i need to copy a file that is being used for reading. How can i do the above steps safely? Using .NET

    Read the article

  • Calculate initial velocity to move a set distance with inertia

    - by Bodyscanner
    Hello, I want to move something a set distance. However in my system there is inertia/drag/negative accelaration. I'm using a formula like this for it: velocity = oldVelocity + ((velocity - oldVelocity * inertia) where inertia is a fractional value like 0.25 So to move the item a set distance, I need to calculate what the initial velocity should be (I know what all the other values are). I've been looking at Equations of motion (http://en.wikipedia.org/wiki/Equations_of_motion) but can't work out what the correct one for my problem is... Any ideas? Thanks!

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >