SwingUtilities.updateComponentTreeUI(this); will reset your own UI, if you call setUI() in constructor. Example: PeterCustomeTabbedPane —– extend ——> MaryCustomTabbedPane —- extend -> JTabbedPane (swing component) Suppose PeterCustomeTabbedPane and MaryCustomTabbedPane have their own TabbedPaneUI, once you called SwingUtilities.updateComponentTreeUI(this); , PeterCustomeTabbedPane’s UI class will be reset to MaryCustomTabbedPane’s UI class. Workaround: !!! dont call setUI in PeterCustomeTabbedPane, override the setUI() method and set whatever […]
Category: Programming
Enable core dump in mac
enable core dump in mac, you need these commands The core dump files are in /cores by default
a bug in tightvnc java library
I found a bug for the tightvnc java library, if my setup like this tightvnc (java) -> java proxy server -> java proxy server -> vnc server IT doesn’t work, after I trace the code, this could caused by this line: this.is = new DataInputStream(new BufferedInputStream(is)); In Reader.java constructor, it is called twice. You can see that if you […]
put python+django to apache through virtualhost
to put python+django to apache through virtualhost 1) edit /etc/httpd/conf/httpd.conf 2) edit /root/workspace/MyDjangoProject/P1/wsgi.py, change it to
error in manage.py createsuperuser
error in manage.py createsuperuser To solve the above issues, type in
compile grub2 : error: ‘gets’ undeclared here
if you compile grub2 , you may get “error: ‘gets’ undeclared here yum”, to fix it, run the following command: sed -i -e ‘/gets is a security/d’ grub-core/gnulib/stdio.in.h
compile 64 bits newlib on 64 bits linux host
If you compile newlib in x86-64 host and want to have 64-bits newlib, you have to add “–disable-multilib“, otherwise you will get the following error:
newlib compile error in Fedora 18 64 bits
when you meet the following error, add “.code32” can fix it. ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S: Assembler messages: ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S:18: Error: invalid instruction suffix for `push’ ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S:21: Error: invalid instruction suffix for `push’ ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S:22: Error: invalid instruction suffix for `push’ ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S:23: Error: invalid instruction suffix for `push’ ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S:72: Error: invalid instruction suffix for `pop’ ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S:73: Error: invalid instruction suffix for […]
10 places where anyone can learn to code
Teens, tweens and kids are often referred to as “digital natives.” Having grown up with the Internet, smartphones and tablets, they’re often extraordinarily adept at interacting with digital technology. But Mitch Resnick, who spoke at TEDxBeaconStreet in November, is skeptical of this descriptor. Sure, young people can text and chat and play games, he says, “but that […]
A x86 java disassembler from Maxine Project
I have been asking for a java x86 disassembler library for a long time, i finally found “Maxine” project from oracle, it is a VM project with built-in a x86 assembler written Java. I git-ed the source and compile them in eclipse, it works!, here is the source and screenshot. source : maxine_disassembler