ofEnableAlphaBlending()/ofSetVerticalSync(true) results in program crashing:...
In a recent project using openFramework, the program crashes on startup. Debugging into the program shows that the program halts when the functions ofEnableAlphaBlending() or ofSetVerticalSync(true);...
View Articleunresolved external symbol _clReleaseContext@4
When tesging an OpenCL program in 64bit windows, Visual Studio 2010, building the program generates below error: error LNK2019: unresolved external symbol _clReleaseContext@4 referenced in function...
View ArticleInstalling Git-flow in Windows
git-flow is a bunch of Git extensions that makes version control extremely easy. Below is a concise procedure to install it on Windows platform. 1. Download getopt.exe from util-linux package, download...
View Article10 lines of code: using json in python
1. import httplib,json2. url = ‘www.yupoo.com’3. path = ‘/api/json/api_key=d74aad0331494be468c07f47987b099b&method=yupoo.photos.licenses.getInfo’4. conn = httplib.HTTPConnection(url)5....
View ArticleManage Google Cloud Storage with Python
Download and install GSUtil. GSUtil is bundled in a single archive named gsutil.zip. Unpack the archive in a convenient location, such as C:\GSUtil, see also...
View ArticleUsing Python & OpenCV to control WebCam, black window: problem and...
I recently involved in a project to capture images with webcam. I soon found that OpenCV seems to be the best solutions to program in Python. For how to install Python and OpenCV, refer to the link...
View ArticlePython Socket example: the simplest example
The python socket component is extremely easy to use, and this simplest example demonstrated its typical use. This is simplest, since both the server and client are the local machine: On the Server...
View ArticleC++: Show Full Screen Images in a UI (Part I: Using Nokia Qt)
I was asked to develop a mini-application: just to show a single full screen image to hide some ugly console output. The application supports a command line: FullScreen.exe SomeImage. The...
View ArticleC++: Show Full Screen Images in a UI (Part II: Using Openframework)
One of my colleague recommended me using Openframework to implement the program to show a full screen image. See more details in this previous blog. So I first created an application class...
View Articlefatal error LNK1104: cannot open file ‘PocoFoundation.lib’
When using openframeworks and building the application, occasionally you may encounter the below error: fatal error LNK1104: cannot open file ‘PocoFoundation.lib’ Searching the internet, and there...
View ArticleGit: rename a branch locally and remotely
git checkout master git push origin HEAD:newBranchName (1) Create a new branch remotely git branch newBranchName (2) Create a new branch locally git checkout newBranchName (3) Checkout the new branch...
View ArticleSetup CGAL in Windows 7: step-by-step tutorial
CGAL (Computational Geometry Algorithms Library) is a useful library for CAD/CAE/CAM users and developers. Below is a step-by-step tutorial on how to install CGAL in your windows system. Download the...
View ArticleSetup CGAL in Windows 7 using cmake command line
In my previous post, I discussed building CGAL using cmake-gui option, and in this post, I will demo how to do this from command line cmake: Download Boost. This is a must. It is recommended to...
View ArticleNokia Qt: Add and reference image resources
Right click the left project tree, click “Add New …” Select “Qt” in the left panel, and “Qt Resource file” in the right panel In the left project tree, there will be a new *.qrc...
View ArticleTroubleshooting: “conq: repository does not exist. fatal: The remote end hung...
In a recent project, suddenly I cannot pull and push, with below error: conq: repository does not exist.fatal: The remote end hung up unexpectedly Googling this indicates that remove and then re-add...
View ArticleWPF: Difference of Visibility.Collapsed and Visibility.Hidden
In a recent trial to rename a TreeViewItem in WPF, I added a TextBlock as well as a Hidden TextBox in the Header, so that when in a “rename”, I will toggle of the TextBlock and TextBox’s visibility and...
View ArticleExpression Blend 4: cannot see/switch to design view
If you are using Visual Studio 2012 to create a WPF application, and open it in Micosoft Blend 4, it is likely that you can only see the XAML file, but cannot switch to design view. To solve this, in...
View ArticleC#: How to get installed Matlab paths and versions
In a recent project, I need get the installed Matlab’s executable path and their versions, and I know that users might not install Matlab in default “C:\Program files\MathWorks\…”. The first solution...
View ArticleHow to use WPF AvalonWizard control (I)
The AvalonWizard control is a handy WPF wizard control. To use it in your project, follow below procedures: 1. In your project, add a reference to the AvalonWizard assembly. You can right click the...
View ArticleHow to use WPF AvalonWizard control (II): Adding event handlers
In my previous post, we have discussed on how to get started with AvalonWizard. Yes, we need do sth else to make it work for our project. In this post, I will demonstrate how to add some logic to...
View Article