Search Results

Search found 8 results on 1 pages for 'lhahne'.

Page 1/1 | 1 

  • Is it possible to get dragging work on a Macbook multi-touch touch pad

    - by lhahne
    I have a Macbook 5,1. That is to say that it is the only 13 inch aluminium Macbook as the later revisions were renamed Macbook Pro. Two-finger scrolling seems to work fine but dragging doesn't work. In OsX this works so that you point an object, click and keep your finger pressed on the touch pad while slide another finger to move the cursor. This causes weird and undefined behavior in Ubuntu as it seems the driver doesn't recognize this as dragging. Any ideas?

    Read the article

  • Is it possible to get dragging working on a Macbook multi-touch touch pad?

    - by lhahne
    I have a Macbook 5,1. That is to say that it is the only 13 inch aluminium Macbook as the later revisions were renamed Macbook Pro. Two-finger scrolling seems to work fine but dragging doesn't work. In OsX this works so that you point an object, click and keep your finger pressed on the touch pad while slide another finger to move the cursor. This causes weird and undefined behavior in Ubuntu as it seems the driver doesn't recognize this as dragging. Any ideas?

    Read the article

  • Python + MySQLdb executemany

    - by lhahne
    I'm using Python and its MySQLdb module to import some measurement data into a Mysql database. The amount of data that we have is quite high (currently about ~250 MB of csv files and plenty of more to come). Currently I use cursor.execute(...) to import some metadata. This isn't problematic as there are only a few entries for these. The problem is that when I try to use cursor.executemany() to import larger quantities of the actual measurement data, MySQLdb raises a TypeError: not all arguments converted during string formatting My current code is def __insert_values(self, values): cursor = self.connection.cursor() cursor.executemany(""" insert into values (ensg, value, sampleid) values (%s, %s, %s)""", values) cursor.close() where values is a list of tuples containing three strings each. Any ideas what could be wrong with this? Edit: The values are generated by yield (prefix + row['id'], row['value'], sample_id) and then read into a list one thousand at a time where row is and iterator coming from csv.DictReader.

    Read the article

  • Calculating the maximum distance between elements of vector in Matlab

    - by lhahne
    Lets assume that we have a vector like x = -1:0.05:1; ids = randperm(length(x)); x = x(ids(1:20)); I would like to calculate the maximum distance between the elements of x in some idiomatic way. It would be easy to just iterate over all possible combinations of x's elements but I feel like there could be a way to do it with Matlab's built-in functions in some crazy but idiomatic way. Any ideas?

    Read the article

  • Compile-time trigonometry in C

    - by lhahne
    I currently have code that looks like while (very_long_loop) { ... y1 = getSomeValue(); ... x1 = y1*cos(PI/2); x2 = y2*cos(SOME_CONSTANT); ... outputValues(x1, x2, ...); } the obvious optimization would be to compute the cosines ahead-of-time. I could do this by filling an array with the values but I was wondering would it be possible to make the compiler compute these at compile-time?

    Read the article

  • Embedding existing page in a CakePHP site

    - by lhahne
    We have an existing PHP page (from an earlier project) which could be described as cryptic and ancient. It basically displays a form, catches the input and runs an external application to process the input and then pipes the output to the user. I would really like not to modify this file any more than is required. Would there be an easy way to just make this file magically work by copying it to some location in the CakePHP's directory and have it receive $POST etc. as usual?

    Read the article

1