Search Results

Search found 5371 results on 215 pages for 'keys'.

Page 6/215 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • How to reproduce the behavior of Mac OS X's dead keys on Windows 7?

    - by Pascal Qyy
    I'm French, but I've chosen to take a QWERTY keyboard for my MacBook Pro for many reasons: first of all, the AZERTY keyboard is not at all ergonomic because it has no numeric keypad, and I must use MAJ or CAPS LOCK to access to the numeric keys ; secondly, I've bought this mac for development ; and chars {, }, etc., are not directly accessible on the Apple AZERTY keyboard the last thing is that: the diacritics are VERY easy to produce on an Apple keyboard with Mac OS X : ? + c for a ç, for example, and many dead keys easy to use (e.g. ? + e, then e give you an é. So, I have no difficulties to write in my native language with this keyboard under Mac OS X. BUT, when I boot on Windows 7's Boot Camp partition, or when I use applications from it through VMware Unity, it is no longer the same comfort! Without numeric keypad, it's impossible to use it for produce specials characters (e.g.: Alt + 0231 for the ç) I've tried many solutions, like auto replacement in Microsoft Office (e.g.: ,,c being replaced by ç), but for all my diacritics, I must type a space, then a back space before the replacement work. I've also tried third party software, as Texter, but it is very buggy and don't work properly (or don't work at all) in many case! So, is there a solution somewhere, to have this Mac OS X's nice and comfortable way of producing diacritics for Windows 7? Thank in advance for your help and your time!

    Read the article

  • lwjgl isKeyDown canceling out other keys

    - by AKrush95
    While trying to create a simple game where a square is manipulated via the keyboard keys, I have come across a small, rather irritating problem. I would like it to work so that when the opposite directional key is pressed, the character will stop; the character may move the other two directions while stopped in this situation. This works perfectly with LEFT and RIGHT held down; the player may move UP or DOWN. If UP and DOWN are held down, however, the player will not move, nor will Java recognize that the LEFT or RIGHT keys were pressed. import java.util.ArrayList; import java.util.Random; import org.lwjgl.*; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.*; import static org.lwjgl.opengl.GL11.*; public class Main { private Man p; private ArrayList<Integer> keysDown, keysUp; public Main() { try { Display.setDisplayMode(new DisplayMode(640, 480)); Display.setTitle("LWJGLHelloWorld"); Display.create(); } catch (LWJGLException e) { e.printStackTrace(); } p = new Man(0, 0); keysDown = new ArrayList<>(); keysUp = new ArrayList<>(); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, 640, 480, 0, 1, -1); glMatrixMode(GL_MODELVIEW); while (!Display.isCloseRequested()) { glClear(GL_COLOR_BUFFER_BIT); checkKeys(); p.draw(); Display.update(); Display.sync(60); } Display.destroy(); } public void checkKeys() { ArrayList<Integer> keys = new ArrayList<>(); keys.add(Keyboard.KEY_A); keys.add(Keyboard.KEY_D); keys.add(Keyboard.KEY_W); keys.add(Keyboard.KEY_S); for (int key : keys) { if (Keyboard.isKeyDown(key)) keysDown.add(key); else keysUp.add(key); } keysDown.removeAll(keysUp); keysUp = new ArrayList<>(); int speed = 4; int dx = 0; int dy = 0; if (keysDown.contains(keys.get(2))) { System.out.println("keyUP"); dy -= speed; } if (keysDown.contains(keys.get(3))) { System.out.println("keyDOWN"); dy += speed; } if (keysDown.contains(keys.get(0))) { System.out.println("keyLEFT"); dx -= speed; } if (keysDown.contains(keys.get(1))) { System.out.println("keyRIGHT"); dx += speed; } //if (keysDown.contains(keys.get(0)) && keysDown.contains(keys.get(1))) dx = 0; //if (keysDown.contains(keys.get(2)) && keysDown.contains(keys.get(3))) dy = 0; p.update(dx, dy); } public static void main(String[] args) { new Main(); } class Man { public int x, y, w, h; public float cR, cG, cB; public Man(int x, int y) { this.x = x; this.y = y; w = 50; h = 50; Random rand = new Random(); cR = rand.nextFloat(); cG = rand.nextFloat(); cB = rand.nextFloat(); } public void draw() { glColor3f(cR, cG, cB); glRecti(x, y, x+w, y+h); } public void update(int dx, int dy) { x += dx; y += dy; } } } That is the code that I am working with. In addition, I am unsure how to compile an executable jar that is using the lwjgl library in addition to slick-util.

    Read the article

  • New MySQL Cluster 7.3 Previews: Foreign Keys, NoSQL Node.js API and Auto-Tuned Clusters

    - by Mat Keep
    At this weeks MySQL Connect conference, Oracle previewed an exciting new wave of developments for MySQL Cluster, further extending its simplicity and flexibility by expanding the range of use-cases, adding new NoSQL options, and automating configuration. What’s new: Development Release 1: MySQL Cluster 7.3 with Foreign Keys Early Access “Labs” Preview: MySQL Cluster NoSQL API for Node.js Early Access “Labs” Preview: MySQL Cluster GUI-Based Auto-Installer In this blog, I'll introduce you to the features being previewed. Review the blogs listed below for more detail on each of the specific features discussed. Save the date!: A live webinar is scheduled for Thursday 25th October at 0900 Pacific Time / 1600UTC where we will discuss each of these enhancements in more detail. Registration will be open soon and published to the MySQL webinars page MySQL Cluster 7.3: Development Release 1 The first MySQL Cluster 7.3 Development Milestone Release (DMR) previews Foreign Keys, bringing powerful new functionality to MySQL Cluster while eliminating development complexity. Foreign Key support has been one of the most requested enhancements to MySQL Cluster – enabling users to simplify their data models and application logic – while extending the range of use-cases for both custom projects requiring referential integrity and packaged applications, such as eCommerce, CRM, CMS, etc. Implementation The Foreign Key functionality is implemented directly within the MySQL Cluster data nodes, allowing any client API accessing the cluster to benefit from them – whether they are SQL or one of the NoSQL interfaces (Memcached, C++, Java, JPA, HTTP/REST or the new Node.js API - discussed later.) The core referential actions defined in the SQL:2003 standard are implemented: CASCADE RESTRICT NO ACTION SET NULL In addition, the MySQL Cluster implementation supports the online adding and dropping of Foreign Keys, ensuring the Cluster continues to serve both read and write requests during the operation.  This represents a further enhancement to MySQL Cluster's support for on0line schema changes, ie adding and dropping indexes, adding columns, etc.  Read this blog for a demonstration of using Foreign Keys with MySQL Cluster.  Getting Started with MySQL Cluster 7.3 DMR1: Users can download either the source or binary and evaluate the MySQL Cluster 7.3 DMR with Foreign Keys now! (Select the Development Release tab). MySQL Cluster NoSQL API for Node.js Node.js is hot! In a little over 3 years, it has become one of the most popular environments for developing next generation web, cloud, mobile and social applications. Bringing JavaScript from the browser to the server, the design goal of Node.js is to build new real-time applications supporting millions of client connections, serviced by a single CPU core. Making it simple to further extend the flexibility and power of Node.js to the database layer, we are previewing the Node.js Javascript API for MySQL Cluster as an Early Access release, available for download now from http://labs.mysql.com/. Select the following build: MySQL-Cluster-NoSQL-Connector-for-Node-js Alternatively, you can clone the project at the MySQL GitHub page.  Implemented as a module for the V8 engine, the new API provides Node.js with a native, asynchronous JavaScript interface that can be used to both query and receive results sets directly from MySQL Cluster, without transformations to SQL. Figure 1: MySQL Cluster NoSQL API for Node.js enables end-to-end JavaScript development Rather than just presenting a simple interface to the database, the Node.js module integrates the MySQL Cluster native API library directly within the web application itself, enabling developers to seamlessly couple their high performance, distributed applications with a high performance, distributed, persistence layer delivering 99.999% availability. The new Node.js API joins a rich array of NoSQL interfaces available for MySQL Cluster. Whichever API is chosen for an application, SQL and NoSQL can be used concurrently across the same data set, providing the ultimate in developer flexibility.  Get started with MySQL Cluster NoSQL API for Node.js tutorial MySQL Cluster GUI-Based Auto-Installer Compatible with both MySQL Cluster 7.2 and 7.3, the Auto-Installer makes it simple for DevOps teams to quickly configure and provision highly optimized MySQL Cluster deployments – whether on-premise or in the cloud. Implemented with a standard HTML GUI and Python-based web server back-end, the Auto-Installer intelligently configures MySQL Cluster based on application requirements and auto-discovered hardware resources Figure 2: Automated Tuning and Configuration of MySQL Cluster Developed by the same engineering team responsible for the MySQL Cluster database, the installer provides standardized configurations that make it simple, quick and easy to build stable and high performance clustered environments. The auto-installer is previewed as an Early Access release, available for download now from http://labs.mysql.com/, by selecting the MySQL-Cluster-Auto-Installer build. You can read more about getting started with the MySQL Cluster auto-installer here. Watch the YouTube video for a demonstration of using the MySQL Cluster auto-installer Getting Started with MySQL Cluster If you are new to MySQL Cluster, the Getting Started guide will walk you through installing an evaluation cluster on a singe host (these guides reflect MySQL Cluster 7.2, but apply equally well to 7.3 and the Early Access previews). Or use the new MySQL Cluster Auto-Installer! Download the Guide to Scaling Web Databases with MySQL Cluster (to learn more about its architecture, design and ideal use-cases). Post any questions to the MySQL Cluster forum where our Engineering team and the MySQL Cluster community will attempt to assist you. Post any bugs you find to the MySQL bug tracking system (select MySQL Cluster from the Category drop-down menu) And if you have any feedback, please post them to the Comments section here or in the blogs referenced in this article. Summary MySQL Cluster 7.2 is the GA, production-ready release of MySQL Cluster. The first Development Release of MySQL Cluster 7.3 and the Early Access previews give you the opportunity to preview and evaluate future developments in the MySQL Cluster database, and we are very excited to be able to share that with you. Let us know how you get along with MySQL Cluster 7.3, and other features that you want to see in future releases, by using the comments of this blog.

    Read the article

  • Convert your Hash keys to object properties in Ruby

    - by kerry
    Being a Ruby noob (and having a background in Groovy), I was a little surprised that you can not access hash objects using the dot notation.  I am writing an application that relies heavily on XML and JSON data.  This data will need to be displayed and I would rather use book.author.first_name over book[‘author’][‘first_name’].  A quick search on google yielded this post on the subject. So, taking the DRYOO (Don’t Repeat Yourself Or Others) concept.  I came up with this: 1: class ::Hash 2:  3: # add keys to hash 4: def to_obj 5: self.each do |k,v| 6: if v.kind_of? Hash 7: v.to_obj 8: end 9: k=k.gsub(/\.|\s|-|\/|\'/, '_').downcase.to_sym 10: self.instance_variable_set("@#{k}", v) ## create and initialize an instance variable for this key/value pair 11: self.class.send(:define_method, k, proc{self.instance_variable_get("@#{k}")}) ## create the getter that returns the instance variable 12: self.class.send(:define_method, "#{k}=", proc{|v| self.instance_variable_set("@#{k}", v)}) ## create the setter that sets the instance variable 13: end 14: return self 15: end 16: end This works pretty well.  It converts each of your keys to properties of the Hash.  However, it doesn’t sit very well with me because I probably will not use 90% of the properties most of the time.  Why should I go through the performance overhead of creating instance variables for all of the unused ones? Enter the ‘magic method’ #missing_method: 1: class ::Hash 2: def method_missing(name) 3: return self[name] if key? name 4: self.each { |k,v| return v if k.to_s.to_sym == name } 5: super.method_missing name 6: end 7: end This is a much cleaner method for my purposes.  Quite simply, it checks to see if there is a key with the given symbol, and if not, loop through the keys and attempt to find one. I am a Ruby noob, so if there is something I am overlooking, please let me know.

    Read the article

  • Keyboard layout - certain keys work with AltGr, other doesn't

    - by user23122
    I run Ubuntu 12.04 in VirtualBox 4.3.14 on Windows 7 with a Swedish keyboard layout. In Windows everything works fine but in Ubuntu some keys/characters (the most important for a programmer) doesn't work. This is the result from pressing the keys in the top row 1234567890+´ (Unmodified top row on keyboard) @£$€ {[]}\ (Windows with AltGr) ¡ £$€¥ ± (Ubuntu with "AltGr") More characters are broken (pipe | is a notable example) but the top row is the biggest problem. I can workaround this by enabling "direct connection" from my USB keyboard to VirtualBox but then I have to manually disable that every time I switch out of VirtualBox. I have tried different keyboard layout, sometimes @ et al works but then other characters are broken. I also tried sudo dpkg-reconfigure keyboard-configuration with default values, but it didn't change anything. I have guest additions installed (from the built in virtual CD). I got my VB disk image from a colleague who does not have this problem, however, he does not have guest additions installed (and hence can't use a higher resolution than 1024x768, and I need to run Ecplipse...). He also have different installation of Virtual Box and Windows. For example, the key for 2 should, in Ubuntu, produce four different characters, 2"²@. The first three works fine, including superscript 2 that requires AltGr-Shift-2, it is just plain AltGr-2 to get @ that does not work on this key (and all the other keys I have problem with). Any ideas for a fix?

    Read the article

  • Does ssh key need to be named id_rsa?

    - by dustyprogrammer
    I have come across this problem a couple of times when creating build servers with keyed authentication. I was wondering if anyone else has experience this. I have a couple of keys for my current user that may connect to different machines. Let say machine1 and machine2. I have pasted my public key into their respective authorized_keys file. The first one I have named the first key id_rsa and the second key bender. When I try to connect to bender I get the following output with my verbose ssh connection debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /home/bozo/.ssh/.ssh/identity debug1: Trying private key: /home/bozo/.ssh/.ssh/id_rsa debug1: Trying private key: /home/bozo/.ssh/id_dsa debug1: No more authentication methods to try. Permission denied (publickey). It only offers the id_rsa key, as you can see above. Is this correct? If so why? How do I get it to offer more keys? I know it is a problem I see intermittently, because I at home I have multiple keys without much trouble. I would also appreciate a overview on how the pub and private keys interact with the client and server. I thought I had a pretty decent idea, but apparently I am missing something. Please and thank you.

    Read the article

  • How can I configure the touchpad and keyboard settings on a Dell Inspiron 5110?

    - by Robik
    I am using ubuntu 11.10. I want the following 3 things: I have dell inspiron 5110 laptop. There is button at the top right corner of laptop which can be used for turning the screen off. It works in windows but it does not work in ubuntu 11.10. Even in the manual of the laptop, it the button is supported only in windows. Is there a way to activate it in ubuntu 11.10? Some of the keys like: "break" etc. are missing. Can I use other keys (or combinations of other keys) to function as those missing keys? In the program, "mouse and touchpad", there is no tab for touchpad. I want to enable vertical and horizontal scrolling. How do I do that? The command: xinput list shows Virtual core pointer id=2 [master pointer (3)] ? ? Virtual core XTEST pointer id=4 [slave pointer (2)] ? ? PS/2 Generic Mouse id=13 [slave pointer (2)] ? Virtual core keyboard id=3 [master keyboard (2)] ? Virtual core XTEST keyboard id=5 [slave keyboard (3)] ? Power Button id=6 [slave keyboard (3)] ? Video Bus id=7 [slave keyboard (3)] ? Video Bus id=8 [slave keyboard (3)] ? Power Button id=9 [slave keyboard (3)] ? Sleep Button id=10 [slave keyboard (3)] ? Laptop_Integrated_Webcam_HD id=11 [slave keyboard (3)] ? AT Translated Set 2 keyboard id=12 [slave keyboard (3)] ? Dell WMI hotkeys Please help!!

    Read the article

  • Standard F* keys need holding Fn key on Compaq CQ62

    - by Chandru
    I got a Compaq CQ62 laptop recently. I find that I have to hold down the Fn keys to use the standard F* keys while accessing the special functionalities like media keys does not. This is frustrating as the standard keys are used more often the special functions. Is there anyway to fix it so that it behaves like other sane laptops out there? I use Ubuntu Lucid, but this behavior is present on laptops running Windows 7 too.

    Read the article

  • Standard F* keys need holding Fn key on Compaq CQ62

    - by Chandru
    I got a Compaq CQ62 laptop recently. I find that I have to hold down the Fn keys to use the standard F* keys while accessing the special functionalities like media keys does not. This is frustrating as the standard keys are used more often the special functions. Is there anyway to fix it so that it behaves like other sane laptops out there? I use Ubuntu Lucid, but this behavior is present on laptops running Windows 7 too.

    Read the article

  • Standard F* keys need holding Fn key on Compaq CQ62

    - by Chandru
    I got a Compaq CQ62 laptop recently. I find that I have to hold down the Fn keys to use the standard F* keys while accessing the special functionalities like media keys does not. This is frustrating as the standard keys are used more often the special functions. Is there anyway to fix it so that it behaves like other sane laptops out there? I use Ubuntu Lucid, but this behavior is present on laptops running Windows 7 too.

    Read the article

  • Why is ssh-add adding duplicate identity keys?

    - by skyblue
    I have created a private/public SSH key pair using "ssh-keygen". I use this to authenticate to remote servers. However, I find that when I log in, "ssh-add -l" already lists my identity key even though I have not added it! If I use the command "ssh-add" it prompts me for my passphrase and loads my identity key. If I then list my keys with "ssh-add -l", it now shows two identity keys! These are obviously the same as both have the same fingerprint, but their descriptions are different (the automatically is "user@host (RSA)" and the one added using ssh-add is "/home/user/.ssh/id_rsa (RSA)"). So why does my identity key appear to be loaded without any action on my part, and why does ssh-add add the same key again? Obviously something must be doing this automatically, but what is it, and how can I stop it?

    Read the article

  • XFCE ~ Volume Hot Keys Not Working

    - by fleamour
    Just installed vanilla Xubuntu 12.04 LTS & updated on a ThinkPad E325 with Conexant CX20671 sound card. I notice volume hot keys work under Xubuntu DE but not XFCE. You can summon sound settings under Xubuntu but they are missing under XFCE. Also sound bar is greyed out though sound will still function. Muting/decreasing/increasing volume with hot keys has no effect. Is there a workaround? If not what package would I report a bug against?

    Read the article

  • What are safe keys to remap in vim?

    - by Weeble
    So far I've been trying to use Vim in as vanilla a configuration as possible, so as to save myself hassle when moving between machines. However, there are a few things I'd really like to bind keys, such as to shorten "_diwP which I use often to delete the word under the cursor and replace it with one from the clipboard. Are there any particular keys that are conventionally reserved for user-defined mappings? The point of this question is mostly that I would like to avoid hassle later on when I decide to install some plugin or take my configuration files to vim on another OS and find that my key mappings clash with something else.

    Read the article

  • Up, down, right arrow keys and delete key not working

    - by user210780
    I have already read Delete and arrow keys not working and tried what is written there. I have also tried restarting my computer. I have also searched elsewhere for answers, but I haven't found any solution. I am using Ubuntu 12.04, and there were not problems yesterday, but for the last hour, I've had the following problem. When I press the up or the right arrow, nothing happens. When I press the down arrow, it doesn't make anything go down, but something appears in the upper right corner of my screen: http://i.imgur.com/pmnFOCD.png When I press the delete key, nothing gets deleted, but something appears in the upper right corner of my screen: http://i.imgur.com/Wu9czel.png The left arrow still works. Can anybody help me get my three arrow keys and delete key back?

    Read the article

  • What are safe keys to remap in vim?

    - by Weeble
    So far I've been trying to use Vim in as vanilla a configuration as possible, so as to save myself hassle when moving between machines. However, there are a few things I'd really like to bind keys, such as to shorten "_diwP which I use often to delete the word under the cursor and replace it with one from the clipboard. Are there any particular keys that are conventionally reserved for user-defined mappings? The point of this question is mostly that I would like to avoid hassle later on when I decide to install some plugin or take my configuration files to vim on another OS and find that my key mappings clash with something else.

    Read the article

  • What command are my volume keys running?

    - by user2787904
    In Unity I use my ThinkPad hot keys to change the volume. I need to know the command that these keys run so that I can bind it in my window manager. I have tried using amixer but could not change the volume through command line amixer set Master 10%- amixer: Unable to find simple control 'Master',0 amixer scontrols: Simple mixer control 'IEC958',0 amixer set 'IEC958' 50%- amixer: Invalid command! So obviously this is not what Unity is running. I have tried changing the default sound card as well but that didn't help.

    Read the article

  • Navigation keys on numeric keypad randomly stop working

    - by Tom Hughes
    Shortly after a restart, the arrow and navigation (Home, End...) keys on my numeric keypad will randomly stop working, and -- regardless of the state of the NumLock -- return only numbers. I notice this the most in browser applications (like this edit box) but the same effect is true on the command line and in desktop applications like Word. I swapped keyboards and now use a Microsoft keyboard (both are USB keyboards) but the same behavior persists. I also tried a clean boot to clean out startup programs but this made no difference. The separate arrow keys and navigation keys between the QWERTY keys and the numeric keypad work fine, but my strong preference (dating back to DOS and MS Flight Simulator) is to use the navigation keys in the numeric keypad.

    Read the article

  • Home and End keys in Emacs don't work when run from Tmux

    - by Jan Stolarek
    When I run Emacs from Tmux, the Home and End keys do not work (Home key runs the Search command as if C-s was pressed). The problem started when I added this in my ~/.bashrc file: TERM="xterm" export TERM I've read somewhere that TERM variable should not be set manually but this was the only way I was able to solve problems with colors. Without this setting I got different colors in Emacs when running directly from the terminal and different when running from Tmux. This option caused some of the keys not to work in Emacs when it was run from Tmux, so I added this line to my ~/.tmux.conf: set-window-option -g xterm-keys on This solved problem with all keys except for Home and End. Any ideas how to make these keys work again?

    Read the article

  • Multiple SSH private keys for the same host

    - by Sencha
    How can I store 2 different private SSH keys for the same host? I have tried 2 entries in /etc/ssh/ssh_config for the same host with the different keys, and I've also tried to put both keys in the same file and referencing it from one hosts setting, however both do not work. More detail: I'm running Ubuntu server (12.04) and I want to connect to GitHub via SSH to download the latest source for my projects. There are multiple projects running on the same server and each project has a GitHub repo with it's own unique deloyment key-pair. So the host is always the same (github.com) but the keys need to be different depending on which repo I'm using. Different /etc/ssh/ssh_config versions I have tried: Host github.com IdentityFile /etc/ssh/my_project_1_github_deploy_key StrictHostKeyChecking no Host github.com IdentityFile /etc/ssh/my_project_2_github_deploy_key StrictHostKeyChecking no and this with both keys in the same file: Host github.com IdentityFile /etc/ssh/my_project_github_deploy_keys StrictHostKeyChecking no I've had no luck with either. Any help would be greatly appreciated!

    Read the article

  • Download Microsoft’s Series of ‘Work Smart’ Guides for Windows 8

    - by Asian Angel
    The general release date for Windows 8 is almost here and Microsoft has released a terrific set of free ‘Work Smart’ guides to help you get started with the new operating system. Whether it is an overview of Windows 8 itself, shortcut keys, backups, and more these guides cover a nice range of topics. HTG Explains: How Antivirus Software Works HTG Explains: Why Deleted Files Can Be Recovered and How You Can Prevent It HTG Explains: What Are the Sys Rq, Scroll Lock, and Pause/Break Keys on My Keyboard?

    Read the article

  • Every function key on laptop works except for brightness

    - by Dave M G
    I have an Asus UX21A, and I'm pleased to discover that almost all the hardware functions and features work perfectly with Ubuntu 12.10. The only thing that is not working straight "out of the box" are the brightness keys. In theory, the screen brightness can be adjusted downward by pressing fn+f5, and adjusted upward by pressing fn+f6. Is there a way I can connect the monitor brightness settings to these function keys?

    Read the article

  • Unix sort keys cause performance problems

    - by KenFar
    My data: It's a 71 MB file with 1.5 million rows. It has 6 fields All six fields combine to form a unique key - so that's what I need to sort on. Sort statement: sort -t ',' -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 -k6,6 -o output.csv input.csv The problem: If I sort without keys, it takes 30 seconds. If I sort with keys, it takes 660 seconds. I need to sort with keys to keep this generic and useful for other files that have non-key fields as well. The 30 second timing is fine, but the 660 is a killer. More details using unix time: sort input.csv -o output.csv = 28 seconds sort -t ',' -k1 input.csv -o output.csv = 28 seconds sort -t ',' -k1,1 input.csv -o output.csv = 64 seconds sort -t ',' -k1,1 -k2,2 input.csv -o output.csv = 194 seconds sort -t ',' -k1,1 -k2,2 -k3,3 input.csv -o output.csv = 328 seconds sort -t ',' -k1,1 -k2,2 -k3,3 -k4,4 input.csv -o output.csv = 483 seconds sort -t ',' -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 input.csv -o output.csv = 561 seconds sort -t ',' -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 -k6,6 input.csv -o output.csv = 660 seconds I could theoretically move the temp directory to SSD, and/or split the file into 4 parts, sort them separately (in parallel) then merge the results, etc. But I'm hoping for something simpler since looks like sort is just picking a bad algorithm. Any suggestions? Testing Improvements using buffer-size: With 2 keys I got a 5% improvement with 8, 20, 24 MB and best performance of 8% improvement with 16MB, but 6% worse with 128MB With 6 keys I got a 5% improvement with 8, 20, 24 MB and best performance of 9% improvement with 16MB. Testing improvements using dictionary order (just 1 run each): sort -d --buffer-size=8M -t ',' -k1,1 -k2,2 input.csv -o output.csv = 235 seconds (21% worse) sort -d --buffer-size=8M -t ',' -k1,1 -k2,2 input.csv -o ouput.csv = 232 seconds (21% worse) conclusion: it makes sense that this would slow the process down, not useful Testing with different file system on SSD - I can't do this on this server now. Testing with code to consolidate adjacent keys: def consolidate_keys(key_fields, key_types): """ Inputs: - key_fields - a list of numbers in quotes: ['1','2','3'] - key_types - a list of types of the key_fields: ['integer','string','integer'] Outputs: - key_fields - a consolidated list: ['1,2','3'] - key_types - a list of types of the consolidated list: ['string','integer'] """ assert(len(key_fields) == len(key_types)) def get_min(val): vals = val.split(',') assert(len(vals) <= 2) return vals[0] def get_max(val): vals = val.split(',') assert(len(vals) <= 2) return vals[len(vals)-1] i = 0 while True: try: if ( (int(get_max(key_fields[i])) + 1) == int(key_fields[i+1]) and key_types[i] == key_types[i+1]): key_fields[i] = '%s,%s' % (get_min(key_fields[i]), key_fields[i+1]) key_types[i] = key_types[i] key_fields.pop(i+1) key_types.pop(i+1) continue i = i+1 except IndexError: break # last entry return key_fields, key_types While this code is just a work-around that'll only apply to cases in which I've got a contiguous set of keys - it speeds up the code by 95% in my worst case scenario.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >