Anki tip, inserting furigana (pop up on mouse hover)

Here is how you can make furigana appear abover kanjis in your anki flash cards as follows:


Learning japanese: a life's journey

Learning a langage is quite a challenge, here I will gather some resources and thoughts about learning japanese.

MAYA_SHELF_PATH not working, empty Maya shelves

Skeletal animation, forward kynematic

Maya MEL commands and procedures

[Maya C++ API] Save MPxData attribute on file

In Maya nodes are connected through attributes, Maya provides base types (e.g. matrices, vector of floats) but sometimes you want to use your own type to transfer data from one node to another. In this case you need to inherit from MPxData. There are functions to override in MPxData to specify how to write and load your custom data into the Maya scene file. I found the official documentation to be a bit thin on the topic, so I'm leaving additional tips here related to:

[Maya C++ API] Unable to unload plugin in Maya

When developing a Maya plugin it can be very frustrating not to be able to unload a plugin because you have to restart Maya every time you want to test a change. Here are a few tips to help you pinpoint why you can't unload a Maya plugin.

[Maya C++ API] Per vertex color update in MPxDeformerNode

Code snippet in C++ to be able to update the color of a mesh on a per vertex basis inside a custom Maya node. Useful for debugging by displaying weights / float values associated to each vertex.

AnkiDroid: How to solve "Syncing error, type: 409, message: Conflict" problem

I ran into the infamous message "Syncing error, type: 409, message: Conflict" while syncing my AnkiDroid with AnkiWeb on my Nexus 4. Here is the solution:

Upgrade to CUDA 5.0: cudaMemcpyToSymbol invalid device symbol error

You have just upgraded to CUDA 5.0 and the function cudaMemcpyToSymbol() throws you the infamous "invalid device symbol" error. Here is what to do.

CUDA constant memory, namespace, and weird bugs

Edit: the usage of cudaMemcpyToSymbol describded below is deprecated since CUDA 4.1 (See also my new entry Upgrade to CUDA 5.0: cudaMemcpyToSymbol invalid device symbol error)

Today I want to discuss some issues I had with CUDA constant memory and share some workarounds.

Constant memory is a usefull feature that enables CUDA programmers to share data within a kernel. Without constant  memory one can declare and use a global variable like this:

__device__ float c_array[10]

__global__ void kernel(float* d_array){ d_array[0] = c_array[0]; }

void test(){
    float* d_array = 0;
    float h_array[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};    
    cudaMalloc((void**)&d_array, 10 * sizeof(float));
    cudaMemcpyToSymbol("c_array", h_array, sizeof(float)*10, 0, cudaMemcpyHostToDevice );
    kernel<<< 1, 1 >>>(d_array);

 The global variable c_array is in global device memory. This type of memory is known to be the slowest memory you can access from a kernel. Instead one should prefer constant memory by putting __constant__ before c_array:

__device__ __constant__ float c_array[10]

[GPU specs]

Drag and drop not working in QTDesigner or QTCreator designer

This has upset me for some time and I finally found a forum entry solving this problem.

The problem: I wasn't able to drag&drop in QTDesigner any widgets from the widgets list to the form I was editing.
Solution found here:

You only need to add this entry to your /etc/X11/xorg.conf:

Section "Module"
Load "extmod"

Broken F4 shortcut in Qtcreator for cuda files ".cu"

Well I'm using QtCreator to code my CUDA project and there has been a lot of things bothering me. Among them is this F4 shortcut which doesn't work. The shorcut enables switching between the header and source file but apparently the extenssion .cu is not recognized as a C++ source file. Here is how to fix it.

  • 1