You created many layers and want to apply some effect or adjustment to all of them. What do you do? Ctr+Alt+Shit+E = Magic.
Do you like to create funny graphics like the following for your paper?
Masters of Illustrator can probably chop-chop-compose such a thing in a flash. I, however, abruptly failed as I tried to insert formulae. Why not directly script it in latex, I thought. Continue reading »
I get frustrated every time I install latex and TeXnicCenter and wish to display some formulas or write a short essay and realize that there are no templates whatsoever that I could use. Then I get frustrated even more when I realize that I cannot even remember the most basic latex lines to start a new document. The last time that happened, I decided to add a small template here, so I – and hopefully some other dudes – shall simply copy the code and start a new latex document immediately!
Continue reading »
Throughout the whole Adobe Creative Suites, masks are among the most important editing tools. In particular, Photoshop provides a quick mask mode, which allows for creating a suitable mask on the current layer fast and comfortably.
We wish to darken the borders of an image in a smooth manner. This can be achieved in probably a hundred thousand ways or more, but I shall present the Quick-Mask-Mode-way.
Select an area using the Marquee Tool (M).
It happens that your C++ code solves large sparse linear systems that involve large sparse matrices. Debugging such code is a be-yotch. Only super-brained engineers can spot hidden errors in matrices that are displayed as an unformatted array of numbers. And even for them it’s an inconvenient affair. But not to worry. Matlab gladly helps us displaying any matrix in many wonderful ways.
First, we need some mechanism to render the matrix into a file. Let A be a sparse matrix. We open a file file, iterate over all values in A, and write every item sItem with preceding row and column number into a new line:
1 2 3 4 5 6 7 8 9 10 11 12 13 | QFile *file = OpenFileWriteOnly("A.txt"); if (file != NULL) { SparseRowMatrix::const_iterator it; for (it = A.begin(); it != A.end(); it++) { QString sItem = QString::number(it.data()); QString sLine; sLine.sprintf("%d %d %s \n", it.row(), it.col(), sItem.toAscii().data()); file.write(sLine.toAscii()); } CloseFile(file); } |