How to replace gdm with lightdm on Fedora

Posted on

Cinnamon does not work well with gdm. And there is no meaning to use gdm when using Cinnamon. On Fedora, the default one id gdm. How to replace gdm with lightdm on Fedora? First, install lightdm if it is not installed yet: # yum install lightdm lightdm-gtk Then, disable gdm service and make the lightdm
Read more

HTML form generation from the database and store value into the database

Posted on

I have a “t_form” table and a “t_attribute” table. It looks a little bit like below. Form table form_id | form_name | description ———————————– 1 | Laptop | Possible attributes are Model, Screen Size, OS, Cd Player 2 | Mobile | Possible attributes are Model, OS 3 | Tablet | Possible attributes are Model, Screen
Read more

How to delete multiple items from Kindle Library

Posted on

The Kindle Library Web interface only provide interface to delete items one by one. How to delete multiple items from my Kindle Library? This works on Chrome. First, browse deki.js to find the javascript for the “DeKi: Delete Kindle Items” plugin. Press “Ctrl + A” then “Ctrl + C” to copy all the javascript code.
Read more

How to install JRE for Chrome on Linux x86-64

Posted on

How to install JRE for Chrome on Linux x86-64? Use JRE from Oracle on Fedora Linux x86-64 as the example: Download jre from http://java.com/en/download/manual.jsp?locale=en#lin . Select Linux x64. Install it by # yum install jre-7u40-linux-x64.rpm (the downloaded rpm). Make a softlink of the plugin:$ cd ~/.mozilla/plugins/; ln -s /usr/java/jre1.7.0_40/lib/amd64/libnpjp2.so ./ Restart Chrome and browse chrome://plugins/
Read more

How to set and get an environment variable in C on Linux?

Posted on

How to set and get an environment variable in C on Linux? You can use the setenv and getenv POSIX APIs to set and get environment variables. To add or change environment variable: #include <stdlib.h> int setenv(const char *envname, const char *envval, int overwrite); To get value of an environment variable: #include <stdlib.h> char *getenv(const
Read more

g++: sorry, unimplemented: non-trivial designated initializers not supported

Posted on

g++ (version g++ (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1)) report: $ g++ -std=c++11 solution.cpp -o sol solution.cpp: In function ‘int main()’: solution.cpp:50:57: sorry, unimplemented: non-trivial designated initializers not supported Stat init_stat {.depth = 0, .moves = tv, .vec = init}; ^ solution.cpp:50:57: sorry, unimplemented: non-trivial designated initializers not supported solution.cpp:50:57: sorry, unimplemented: non-trivial designated initializers
Read more