access the user interface from multiple threads

By 28 Jun 2012

Using Windows.Forms gets really ugly when you need to access the user interface from multiple threads. IMHO, this is an example of leaky abstraction.

When you run a program with this UI threading issue from within Visual Studio, it will always throw an exception. The same program running as a standalone EXE may not throw the exception. That is to say, the development environment is stricter than the .NET framework.

How to delete books from Kindle

Posted by  on 12/11/2013 11:25:55 PM.

A significant advantage of eBook reading device is the capacity, even with a basic version of Kindle, you can hold thousands of eBooks with this handy size device. But every coin has two sides, after finishing and archiving more and more books, the storage space will become more and more disordered.

When you need to spend minutes to find the book you want to read, it is high time that you cleaned your ebook shelf up.

Identify Your Needs

Before cleaning your Kindle up, you should know what kind of deletion do you need.

1) You have downloaded too many books and finished most of them, now you want to make your Kindle looks clear and clean, delete those finished books from device but keep them in cloud.

• You are using Kindle device, like Kindle Touch, Kindle Paperwhite, Kindle Fire

• You are using Kindle app, like Kindle for Android, Kindle for iOS

2) You even don’t want to see those finished books in archive, want to delete them from Kindle Cloud.

• Delete books completely from your Kindle Cloud, delete books from Kindle archive

Click the links above you can jump to the part which can solve your problem.

Law of Leaky Abstractions

Una de las paradojas del desarrollo actual es que la disponibilidad de herramientas con grados de abstracción cada vez más altos ha hecho el convertirse en un programador de alto de nivel cada vez más difícil.


Si bien es cierto que se puede desarrollar en ASP .Net con el ratón, inevitablemente llega el momento del error extraño, o del requerimiento fuera del alcance de los asistentes y la ayuda en línea. La única manera de salir de esos pozos es entendiendo el código base, debajo de la capa del IDE y de los asistentes.

Point-and-click VB es un cómodo sillón, pero que flota en aguas turbulentas y más nos vale saber nadar.

Law of Leaky Abstractions:

All non-trivial abstractions, to some degree, are leaky.

Abstractions fail. Sometimes a little, sometimes a lot. There’s leakage. Things go wrong.

Joel Spolsky

Moon+ Reader, Google Play, Piracy Claims

How can I get more ebook OPDS download sites for the reader?

Here is a list in MobileRead Wikihttp://wiki.mobileread.com/wiki/OPDS#Online_OPDS_Catalogs, you can also google “opds sites” for more.

 


February 3rd, 2013 by  

Continue reading “Moon+ Reader, Google Play, Piracy Claims”

eXtreme Programming

Extreme Programming: A gentle introduction.40 % análisis y diseño5 % codificación30 % pruebas y soporte25 % más análisis, diseño, pruebas, y soportePero….5% de los programadores (o menos) hacen 95% del trabajo (o más)Un programador es producti…

diagrama xtrem programming

Extreme Programming: A gentle introduction.

40 % análisis y diseño

5 % codificación

30 % pruebas y soporte

25 % más análisis, diseño, pruebas, y soporte

Pero….

5% de los programadores (o menos) hacen 95% del trabajo (o más)

Un programador es productivo alrededor de 2 a 4 horas diarias en promedio. Por eso los beneficios de programación en pares en realidad no implican un costo en productividad. Antes al contrario, probablemente un equipo de 2 de programadores trabajando bajo el esquema de programación extrema sea 2 a 3 veces más productivo que los mismos programadores trabajando de manera aislada.

El enfasis en diseño y pruebas es simplemente una realidad del ciclo de desarrollo:

  • Un defecto en codificación es un defecto, aunque corregirlo puede generar más defectos.
  • Un error en la fase de diseño produce más de 10 defectos en código
  • Un error en la fase de levantamiento de requerimientos produce más de 100 defectos en código

Referencias:

http://www.objectmentor.com/resources/articles/ObjectiveView3.pdf

x = A b; in Matlab

x = A b;

  1. Is A square?
    no => use QR to solve least squares problem.
  2. Is A triangular or permuted triangular?
    yes => sparse triangular solve
  3. Is A symmetric with positive diagonal elements?
    yes => attempt Cholesky after symmetric minimum degree.
  4. Otherwise
    => use LU on A (:, colamd(A))

Blogger does not have a File Manager

BLOGGER: LINKING TO A PDF OR WORD DOCUMENT IN A POST

To do this in Blogger is a little different than with Typepad because Blogger does not have a File Manager.  Instead, you can use a free service from Google called Google Docs (http://docs.google.com).

http://www.blogsbyheather.com/2009/01/blogger-linking-to-a-pdf-or-word-document-in-a-post.html

Complexity of Matrix Inversion

What is the computational complexity of inverting an nxn matrix? (In 
general, not special cases such as a triangular matrix.)

Gaussian Elimination leads to O(n^3) complexity. The usual way to 
count operations is to count one for each "division" (by a pivot) and
one for each "multiply-subtract" when you eliminate an entry.

Here's one way of arriving at the O(n^3) result:

At the beginning, when the first row has length n, it takes n
operations to zero out any entry in the first column (one division,
and n-1 multiply-subtracts to find the new entries along the row
containing that entry. To get the first column of zeroes therefore
takes n(n-1) operations.

In the next column, we need (n-1)(n-2) operations to get the second
column zeroed out.

In the third column, we need (n-2)(n-3) operations.

The sum of all of these operations is:

n n n n(n+1)(2n+1) n(n+1)
SUM i(i-1) = SUM i^2 - SUM i = ------------ - ------
i=1 i=1 i=1 6 2

which goes as O(n^3). To finish the operation count for Gaussian
Elimination, you'll need to tally up the operations for the process
of back-substitution (you can check that this doesn't affect the
leading order of n^3).

You might think that the O(n^3) complexity is optimal, but in fact
there exists a method (Strassen's method) that requires only
O(n^log_2(7)) = O(n^2.807...) operations for a completely general
matrix. Of course, there is a constant C in front of the n^2.807. This
constant is not small (between 4 and 5), and the programming of
Strassen's algorithm is so awkward, that often Gaussian Elimination is
still the preferred method.

Even Strassen's method is not optimal. I believe that the current
record stands at O(n^2.376), thanks to Don Coppersmith and Shmuel
Winograd. Here is a Web page that discusses these methods:

Fast Parallel Matrix Multiplication - Strategies for Practical
Hybrid Algorithms - Erik Ehrling
http://www.f.kth.se/~f95-eeh/exjobb/background.html

These methods exploit the close relation between matrix inversion and
matrix multiplication (which is also an O(n^3) task at first glance).

I hope this helps!

- Doctor Douglas, The Math Forum
http://mathforum.org/dr.math/