Search Results

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

Page 10/413 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • What would be the fastest way of storing or calculating legal move sets for chess pieces?

    - by ioSamurai
    For example if a move is attempted I could just loop through a list of legal moves and compare the x,y but I have to write logic to calculate those at least every time the piece is moved. Or, I can store in an array [,] and then check if x and y are not 0 then it is a legal move and then I save the data like this [0][1][0][0] etc etc for each row where 1 is a legal move, but I still have to populate it. I wonder what the fastest way to store and read a legal move on a piece object for calculation. I could use matrix math as well I suppose but I don't know. Basically I want to persist the rules for a given piece so I can assign a piece object a little template of all it's possible moves considering it is starting from it's current location, which should be just one table of data. But is it faster to loop or write LINQ queries or store arrays and matrices? public class Move { public int x; public int y; } public class ChessPiece : Move { private List<Move> possibleMoves { get; set; } public bool LegalMove(int x, int y){ foreach(var p in possibleMoves) { if(p.x == x && p.y == y) { return true; } } } } Anyone know?

    Read the article

  • Outlook 2007 - Right Click Email > Move To {Folder Name}

    - by HK1
    I know it seems like an elementary question. What's the simplest and fastest way to move a read/completed email to a different folder in Outlook 2007 (connected to Exchange 2007)? I have a particular user that is challenged by technology. Using keyboard shortcuts is not an option. Dragging and dropping things - forget it. And too many clicks is frustrating to him. He keeps his email inbox completely clean (OCD=True) but he does that by deleting every single email as quickly as he's done with it. If an email can't be resolved in a day or two it almost drives him to insanity. As far as he's concerned, there's only one right thing to do with an email - reply to it and then delete it. He's being asked to save emails unless they are clearly trash. I'm trying to figure out what the simplest method is to move an email to a "Saved Emails" or "Archived" folder (don't confuse "folder" with .PST file, that's irrelevant for this discussion). I envisioned that I could possibly hi-jack every delete and put the email in his Saved folder. But I don't like this option because some emails are truly trash and I don't want him saving those. What I'd really like to do is something like this: Right Click Email in List > Move To {Folder Name} Is there a simple way to do this? Maybe someone has another suggestion on how to handle this situation.

    Read the article

  • How to move Mdadm RAID drive (EBS based) to different AWS Instance

    - by Stanley
    We have a media-rich web application that is hosted on AWS. We have several Web Servers and we have an NFS server. On the NFS server (Linux server) we have several EBS volumes that are mounted and we've used mdadm to implement the different mounted volumes as a single RAID volume. The Web Servers simply access the NFS storage through a mount point. Amazon has now let us know that they will be performing power maintenance on this server in a couple of days time. Since all our media is on here it would render our site unusable for the hours while Amazon is working on it. We want to try and prevent this downtime. I was thinking that we can prevent server downtime by perhaps setting up a new server temporarily and attaching the EBS drives (raid volume) to that server and have our web servers point there during maintenance. This is a very high risk operation since this involves several terabytes of our production data. What would be the safe way to move over our logical raid drive (md0) to a new amazon instance? I was hoping that I could start with building the new server, mounting the ebs volumes and assembling the RAID partition using mdadm --assemble --scan before unmounting from the existing instance so that I can first test that everything works and thus having it mounted on two instances at the same time, but I don't believe that is possible with the way that filesystems work. How do I move a Linux software RAID to a new machine? suggests a way to move drives, but isn't really a cloud-based question. Perhaps there are simpler ways to prevent system downtime with our solution being hosted on the cloud? I have considered taking an EBS snapshot, but that tries to replicate all the many terabytes of mounted storage, so this is not a practical solution. Any ideas?

    Read the article

  • Move the uploads folder in Wordpress

    - by Victor Hurdugaci
    Currently, my Wordpress' upload folder is located in \wp-content\uploads. Initially there was no structure so all files were put there. After a while it was changed to upload the files in \wp-content\uploads\YEAR\MONTH. Now that folder contains a mix of files (those starting with + are folders) like: +wp-content | +2010 | | +02 | | | File-1 | | | File-2 | | | .. | | | File-n | | +01 | | | File-1 | | | File-2 | | | .. | | | File-n | +2009 | | +12 | | | File-1 | | | File-2 | | | .. | | | File-n | | +11 | | | File-1 | | | File-2 | | | .. | | | File-n | +.. | | | .. | Unstructured-file-1 | Unstructured-file-2 | ... | Unstructured-file-n Based on the dates of the unstructured files, I would like to move them in a structured hierarchy (based on date, move it to a folder \wp-content\uploads\YEAR\MONTH). Now, my questions are: Where do I write and execute a script to the movement (I don't have full access to the server, just to a cPanel and to the Wordpress Admin page)? What must be updated so that the links in posts, that reference the unstructured files, point to the new location of those files? Not fully related to the previous description: is it alright to move the whole uploads folder to another location, like \uploads? PS: Moving the files/updating the database manually is not an option :)

    Read the article

  • win 7: copy all files from a complex folder structure to one folder

    - by Jason
    I'd have a complex folder structure like: h:\folder1\folder2\folder3 h:\folder1\folder2\a h:\folder1\b h:\folder1\folder3 h:\folder1\folder4\d Only with probably 100's of folders and a depth of around 4 (I'm guessing) Anyway I want to run a command that will move all the files from every sub folder into the top level folder. so something like h:\folder1\*\*.* to h:\folder1 Is there a tool I can use to do this? does win 7 have a command that will do this? Thanks Jason

    Read the article

  • Xen guest miration to host with missing features

    - by deploymonkey
    If I want to move a xen guet (domU) from one host (dom0) to another host on another hardware platform which misses some capabilities, say virtualisation features, especially directio or likewise, will my image be able to run despite missing capabilities of the new host? This is important because I need to know if I can prepare XEN images on my workstation with full virtualisation features and deploy same images on less capable Servers later on. Thanks for the help and input

    Read the article

  • Moving a window that can't be dragged by the title bar?

    - by ccat
    I have Fallout Collection and I am trying to run it windowed because of the low resolution. When I change the mode to windowed via the .ini file, however, it starts the game with the window shoved into the upper left corner of my screen. Clicking the title bar of the window just clicks back into the game program. So how can I move it to the center of my screen? I am using Windows 7 professional 64-bit.

    Read the article

  • Moving inserted container element if possible

    - by doublep
    I'm trying to achieve the following optimization in my container library: when inserting an lvalue-referenced element, copy it to internal storage; but when inserting rvalue-referenced element, move it if supported. The optimization is supposed to be useful e.g. if contained element type is something like std::vector, where moving if possible would give substantial speedup. However, so far I was unable to devise any working scheme for this. My container is quite complicated, so I can't just duplicate insert() code several times: it is large. I want to keep all "real" code in some inner helper, say do_insert() (may be templated) and various insert()-like functions would just call that with different arguments. My best bet code for this (a prototype, of course, without doing anything real): #include <iostream> #include <utility> struct element { element () { }; element (element&&) { std::cerr << "moving\n"; } }; struct container { void insert (const element& value) { do_insert (value); } void insert (element&& value) { do_insert (std::move (value)); } private: template <typename Arg> void do_insert (Arg arg) { element x (arg); } }; int main () { { // Shouldn't move. container c; element x; c.insert (x); } { // Should move. container c; c.insert (element ()); } } However, this doesn't work at least with GCC 4.4 and 4.5: it never prints "moving" on stderr. Or is what I want impossible to achieve and that's why emplace()-like functions exist in the first place?

    Read the article

  • Using ant, rename a directory without knowing the full path?

    - by mixonic
    Howdy friends, Given a zipfile with an unknown directory, how can I rename or move that directory to a normalized path? <!-- Going to fetch some stuff --> <target name="get.remote"> <!-- Get the zipfile --> <get src="http://myhost.com/package.zip" dest="package.zip"/> <!-- Unzip the file --> <unzip src="package.zip" dest="./"/> <!-- Now there is a package-3d28djh3 directory. The part after package- is a hash and cannot be known ahead of time --> <!-- Remove the zipfile --> <delete file="package.zip"/> <!-- Now we need to rename "package-3d28djh3" to "package". My best attempt is below, but it just moves package-3d28djh3 into package instead of renaming the directory. --> <!-- Make a new home for the contents. --> <mkdir dir="package" /> <!-- Move the contents --> <move todir="package/"> <fileset dir="."> <include name="package-*/*"/> </fileset> </move> </target> I'm not much of an ant user, any insight would be helpful. Thanks much, -Matt

    Read the article

  • DateTimePicker automatically move to next datepart

    - by Leon Tayson
    Currently, when using the datetimepicker, after you enter the month you have to either hit the right arrow or the "/" for it to move to the day. Is there a property that I can set or a way to know that the month is done and move to the day and move to the year after the user is done with the day? This is the same behavior with applications written in the old FoxPro/Clipper days.

    Read the article

  • VSS: Move file from one folder to another?

    - by shoosh
    Is there a way in Visual SourceSafe to move a file from one directory to another while retaining its history? Edit I actually found a round about way to do this. First I drag the file I want to move to the directory I want to move it to, this creates a "Link" to the file there and then I "permanently destroy" the file in its original location. Does this actually do what I thing it does?

    Read the article

  • Move Emails Easily Using Search - Outlook 2011 Feature on the MAC for Outlook 2010 Windows

    - by Arthor
    My main email client is Outlook 2010 for Windows 7. I also have a Mac but I do not use it that much however on the MAC you have Outlook 2011. In my Outlook 2010 for Windows 7, I have many many folders. There is one feature I would like to know if it is available or something similar which is on Outlook 2011 for the Mac. On the Outlook 2011 for the mac you can go to: Top Menu Message Move Choose Folder or press (SHIT+CMD "press" M) This bring up a box where you can just type the beginning part of the folder and all the folders with that beginning appears (To search), you select the one you want and the selected emails move to that folder. I hope I have explained it well. Does anyone know if there is a plugin on Outlook 2010 or may I have just missed the function. Thank you

    Read the article

  • Cocos2d: Move a Sprite along a path/bezier ?

    - by eemceebee
    Hi I need to move a sprite from one CGPoint to another using Cocos2d for the Iphone. The problem is that the animation should be along a bezier. Basically I would use this : id move = [CCMoveTo actionWithDuration:.5f position:ccp(100,200)]; [sprite runAction:move]; Now how can I do this in a non linear path ? Thx

    Read the article

  • Move some iTunes library items to different drive?

    - by Sören Kuklau
    My internal hard drive is somewhat small, and I only regularly listen to a fraction of my iTunes library anyway, so I'd like to keep large portions on it on an external drive for archival purposes. Since dealing with multiple iTunes libraries is somewhat painful, the solution I'm looking for is to move individual items of the library to a different location, without compromising the "Keep organized" and "Copy files" settings. I found an AppleScript that I assume is supposed to do this, Move Files To Folder…, but it instead copies them, and doesn't update the library accordingly. I can do this manually by moving the file, then accessing it in iTunes — it'll prompt me for the new location. I just don't intend to do this one by one for thousands of files.

    Read the article

  • Have rTorrent to move .torrent files

    - by David Alvares
    I am running rTorrent 0.9.2 and have configured it to move completed torrents to a different folder with this configuration line: system.method.set_key = event.download.finished,move_complete,"d.set_directory=~/done/;execute=mv,-u,$d.get_base_path=,~/done/" This is working fine, but I would like it to also move the .torrent file that it creates (from a magnet link into the session directory) into this done directory with the same name as the torrent and a .torrent extension. I tried adding another cp command, but I can not seem to figure out which variable ($d.get_hash did not work) stores the torrent's hash (which is what the .torrent files are named in the session directory). Is there a way to do this with rTorrent, if so how?

    Read the article

  • zfs rename/move root filesystem into child

    - by Anton
    Similar question exists but the solution (using mv) is awful because in this case it works as "copy, then remove" rather than pure "move". So, I created a pool: zpool create tank /dev/loop0 and rsynced my data from another storage in there directly so that my data is now in /tank. zfs list NAME USED AVAIL REFER MOUNTPOINT tank 591G 2.10T 591G /tank Now I've realized that I need my data to be in a child filesystem, not in /tank filesystem directly. So how do I move or rename the existing root filesystem so that it becomes a child within the pool? Simple rename won't work: zfs rename tank tank/mydata cannot rename to 'tank/mydata': datasets must be within same pool (Btw, why does it complain the datasets are not within same pool when if fact I only have one pool?) I know there are solutions that involve copying all the data (mv, or sending the whole dataset to another device and back), but shouldn't there be a simple elegant way? Just noting that I do not care of snapshots at this stage (there are none yet to care of).

    Read the article

  • FTP an entire folder via the command line

    - by Chris Southam
    I'm looking so migrate some websites to a new server. I have SSH access to the current one but only FTP access to the new one. How can I via Centos and SSH copy entire folders to the new server via FTP? I can log into the new server via the built in FTP client on Centos but I'm not sure of the commands after this. I need to move the httpdocs folder from the old to the public_html folder of the new server. I'd love to do this server to server as it'll be a lot quicker than download - upload via my broadband connection. Yours, Chris

    Read the article

  • Move flag for follow of a specific color to a folder in Outlook 2003

    - by Campo
    I have a user request to be able to create a rule that would move an email in outlook 2003 that the user flagged for follow up to a specific folder. That seemed simple enough till he requested that depending on the flag color they were to be moved to a specific folder. Issue is that in outlook 2003 that's not an option when creating a rule. I know that this is very straight forward in outlook 2007 and 2010 and using the categories feature is very convenient as it displays as a list when you right click.... Though in 2003 categories are not so convenient. as an example the user will flag for follow up as so... Red Flag for sales Blue Flag for requests Green Flag for personal They want a rule that will move all items with a red flag to the sales folder, Green flag to the requests folder and so on.... Thank you for your suggestions.

    Read the article

  • Move MySQL database while instance is online

    - by Mike Scott
    I have a MySQL instance containing a number of databases, one of which is an archive database (although using the INNODB rather than ARCHIVE storage engine) that is not queried or written to in normal operation. The data filesystem is filling up and I'd like to move the archive database's data directory to a different filesystem (and then symlink it back, obviously). If there are no SQL statements attempting to query or update the data during the move, can I safely do this while the MySQL instance and the other databases stay online and in use? I plan to rsync the database directory to the new filesystem, then rename the old one on the original filesystem to something different and create the new symlink. lsof reports that MySQL does have the .ibd files open, so presumably it would have to reopen them.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >