Wednesday, October 05, 2011

Using the Places module (or Gadget) in e17 or enlightenment

Apparently the new version of the enlightenment window manager (called e17 as of now) trys to use udisks instead of hal. But some of the modules, such as Places, have not been updated to use udisks yet.

So, if you load the "Places" module, and then add the Places gadget to, say, your bottom shelf in enlightenment, it may look something like this:So it just shows a blank grey area with no Gadget in it. Not to mention that if you plug a usb device in, the Places module will not detect it. So in order to fix this, I did this:

Solution

1) installed the hal daemon from here.
a) if you are using archlinux,
first install cower from the AUR, and then ...
b) cower -d -d hal-git
c) make dependencies first if needed
I only needed hal-info I think
d) cd hal-git
d) makepkg -s
e) sudo pacman -U hal-git-someDateYouBuiltIt-1-x86_64.pkg.tar.xz
2) Then start the hal daemon
For archlinux users, probably # /etc/rc.d/hal start
3) removed the old Places gadget from my shelf
right click the Places gadget
(which is just a blank area) -> Gedget Places -> Remove
4) unloaded the Places module
left click desktop -> settings -> modules -> Places -> unload
5) restarted enlightenment
left click desktop -> enlightenment -> restart
6) reloaded the Places module
left click desktop -> settings -> modules -> Places -> load
7) added the Places gadget to my shelf
left click shelf -> settings -> gadgets -> Places -> add gadget
8) plugged in a usb camera ...
watched it appear as a new device on the shelf ...
inside the Places gadget ... Yay!
9) Right Click Places -> Gadget Places -> Move to -> Desktop

My Places gadget on the desktop now looks like this with a camera plugged into a usb port:
And when I click on it, it opens a file manager, and shows me the files on my camera ... imagine that. Hope this blog post helps get the Places module working on your desktop.

Tuesday, May 10, 2011

The day of the cross

a similar lunar eclipseThis is an update to my earlier post on this subject. You can download Celestia and see what happened on April 3 of 33 A.D. for yourself with this handy little celestia script. Just save the script to your desktop, launch Celestia, and click File, Open Script, and select the file you downloaded. It appears that this script needed some adjustments for the newest version of Celestia 1.6.0.

Enjoy.

P.S. If anyone knows from the change logs, which revision it was in Celestia which caused this script to need adjustment, please let me know. Thanks.

Tuesday, May 03, 2011

Flex Jam Orlando 2011


Flex Jam with Greg Wilson, James Ward, and Holly Schinsky .... jamesward.com
gregsramblings.com
devgirl.org

Errors: unable to open 'C:\Documents and Settings\geek\Adobe Flash Builder 4.5\TourDeMobileFlex\libs

Description Resource Path Location Type
unable to open 'C:\Documents and Settings\geek\Adobe Flash Builder 4.5\TourDeMobileFlex\libs' TourDeMobileFlex Unknown Flex Problem
Do not worry about this ...

Right click "TourDeMobileFlex" -> New -> Folder
Then just type "libs" in for the Folder name, and click Finish.

Hope that helps.

error: SSL certificate problem, verify that the CA cert is OK.

$ git clone https://github.com/someguy/hisApp.git
Cloning into hisApp ...
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/someguy/hisApp.git/info/refs

fatal: HTTP request failed
If this happens to you ... no problem.  Here is a solution:
$ env GIT_SSL_NO_VERIFY=true git clone https://github.com/someguy/hisApp.git
Hope that helps.

Tuesday, March 29, 2011

Tuesday, March 15, 2011

Do Good Anyway

* People are often unreasonable, irrational, and self-centered. Forgive them anyway.

* If you are kind, people may accuse you of selfish, ulterior motives. Be kind anyway.

* If you are successful, you will win some unfaithful friends and some genuine enemies. Succeed anyway.

* If you are honest and sincere people may deceive you. Be honest and sincere anyway.

* What you spend years creating, others could destroy overnight. Create anyway.

* If you find serenity and happiness, some may be jealous. Be happy anyway.

* The good you do today, will often be forgotten. Do good anyway.

* Give the best you have, and it will never be enough. Give your best anyway.

* In the final analysis, it is between you and God. It was never between you and them anyway.

-- Mother Theresa

If you did not like this, try Beautiful Thoughts anyway.

Cứ làm tốt luôn luôn

* Người chung quanh chúng ta thường làm những điều vô lý, vớ vẩn, và ích kỷ. Tha thứ luôn luôn.

* Nếu bạn tử tế, có thể bạn bị tố cáo là bạn ích kỷ và có mưu đồ xấu. Tử tế luôn luôn.

* Nếu bạn thành công, bạn sẽ được một ít bạn không trung thành, và người thù nguyên thủy. Thành công luôn luôn.

* Nếu bạn là ngay thật, có thể bạn bị họ lừa. Cứ ngay thật luôn luôn.

* Những cái bạn chế tạo ra tốn thật nhiều thời gian, người ta có thể phá hoại trong chốc lát. Cứ chế tạo luôn luôn.

* Nếu bạn tìm được niềm vui và điều yên tịnh, người chung quanh bạn sẽ ghen tị. Cứ giữ niềm vui đó luôn luôn.

* Những gì tốt bạn làm hôm nay có thể không ai nhớ ngày mai. Cứ làm tốt luôn luôn.

* Hãy cho thế giới điều tốt nhất bạn có và chảng bao giờ đủ. Cứ cho điều tốt nhất luôn luôn.

* Đến lúc cuối, bạn sẽ thấy chỉ giửa bạn với Chúa. Chẳng bao giờ bạn với những người kia luôn luôn.

-- Mẹ Teresa

Nếu bạn không thích bài này, cứ thử Lời Hay Ý Đẹp luôn luôn.

Friday, March 11, 2011

Howto explore files on your Blackberry

Have you ever wanted to just explore files on your Blackberry?
The short answer is Media -> Menu -> Explore.
The long answer with screenshots is:

1. Navigate to your "Media" folder
2. Click the "Blackberry button" or menu button, or the button the is usually to the left of your trackpad or trackball
3. Then select "Explore"


You should get this menu below, which let's you choose between your SDCard and your on device memory:


Hope that helps.
 

PrimeFaces rocks ...

Location aware PrimeFaces mobile maps works fine on this BlackBerry OS 6 browser:

Read more about it here. By the way, the location above is Downtown Disney.

Monday, March 07, 2011

Dictionary - Từ điển (cập nhật)

Chắc nhiều người biết một trang web tiện dụng cho dịch một ngôn ngữ, nhưng tôi quyết định cập nhật cái trang web này đặc biệt cho các trình duyệt web di động được cho người nào chóng dịch một vài từ nhanh hoặc từ tiếng Anh sang tiếng Việt hoặc tiếng Việt sang tiếng Anh bằng Google Translate. Xin vui lòng với.

Many folks probably have a handy page for translating some language, but I decided to update this web page specifically for mobile browsers to allow folks to quickly translate a few words from either English to Vietnamese or Vietnamese to English using Google Translate. Enjoy.

This one is one for Vietnamese:
http://lightcloud.verns.net/mobile/vi/index.html

Here is one for Spanish also:
http://lightcloud.verns.net/mobile/es/index.html

Page rendering using iPhone (photo taken with a BlackBerry Bold 9700 :-)


Page rendering using BlackBerry OS 6.0.0.448 (photo taken with an android phone):


I didn't even bother posting a picture taken with an iPhone ... it was just too sad.

Thursday, March 03, 2011

X and such ...

So the other day, a gentleman that I respect sent several of us an email stating:
Ok, so remember now, next week we are going to do "X and such" ...
I thought about his email and replied to him asking, "Thank you so much for the timely reminder. And could you also explain for me, why it is that we are going to do 'X and such'?" Shortly there after, I received an emotional email in alternating Caps Lock, explaining:
Well! EVeRY year wE do "X and such"! And ... we have already anNOUNced it. We have announced bEFORe hand that we will do "X and such"!
So I thought this would make a great Monty Python skit, as follows:
John Cleese: Ok. Today we will commence with beating our faces against the wall with all our might. All ready now? And ... G! go? ..."

(interrupted)

Idiot: Excuse me. Excuse me! But what is this about beating your heads against the wall with all your might? I mean, why should we all be doing this?

John Cleese (Incensed): W(H)ell! Every year ... Every year! We beat our faces against the wall with all our might. And ... And we've announced it already. We have announced that we will be beating our faces against the wall with all our might. We ALWAYS announce before hand that we are about to do this, so that there is no question about our intentions.

(pause)

Now then! If there are no more questions about it ... let us commence immediately with the beating of our faces against these hallowed walls with all our might.
Several folks that I've related this story to have asked, "What is 'X and such'"? Or, "Who was this?"

Does it really matter what "X and such" is? or who it is that requires "X and such"? Isn't it reasonable sometimes to ask why?



What do you think?

Saturday, February 26, 2011

X11 error: BadAlloc (insufficient resources for operation)


If you have gotten this error, or maybe just a blue screen with mplayer or a black window with no video in vlc, just try changing the video output driver:

$ mplayer -vo x11 some_video.wmv
    or
$ vlc --vout x11 some_video.wmv

You can also use "mplayer -vo help" to get a list of available video output drivers, if you think x11 is not right for you, as follows:
$ mplayer -vo help
MPlayer SVN-r31628-4.4.4 (C) 2000-2010 MPlayer Team
Available video output drivers:
vdpau VDPAU with X11
xv X11/Xv
gl_nosw OpenGL no software rendering
x11 X11 ( XImage/Shm )
xover General X11 driver for overlay capable video output drivers
sdl SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)
gl OpenGL
gl2 X11 (OpenGL) - multiple textures version
dga DGA ( Direct Graphic Access V2.0 )
fbdev Framebuffer Device
fbdev2 Framebuffer Device
matrixview MatrixView (OpenGL)
aa AAlib
caca libcaca
dxr3 DXR3/H+ video out
v4l2 V4L2 MPEG Video Decoder Output
xvidix X11 (VIDIX)
cvidix console VIDIX
null Null video output
xvmc XVideo Motion Compensation
mpegpes MPEG-PES to DVB card
yuv4mpeg yuv4mpeg output for mjpegtools
png PNG file
jpeg JPEG file
gif89a animated GIF output
tga Targa output
pnm PPM/PGM/PGMYUV file
md5sum md5sum of each frame

Hope that helps.

Wednesday, February 16, 2011

How to grab the triggers from a SQL Server database

Have you ever needed to get the script that created a trigger on a table in a SQL Server database?

Try this:
select b.text
from sysobjects a
join syscomments b on a.id=b.id
where xtype='TR'
Hope that helps.

Wednesday, January 05, 2011

How do I get a list of commit comments from CVS after the given date or change?

The short answer is ... use subversion or git instead of cvs, and you will get your answer pretty quickly.

You may have made a bunch of changes to a number of files in a project, and made sure that every commit (usually at the file level) was accompanied by a comment of what was changed.

Then you may have asked yourself, is there a way to get a list from CVS of these comments on changes since some particular version?

Well, I had the same problem and here is how I quickly got all of the comments out of cvs from a given revision until the latest:
$ mkdir ~/repo
$ cd ~/repo
$ mkdir cvs
$ cd cvs
$ scp -pr geek@avoid.cvs.org:/cvs/CVSROOT .
$ mkdir -p my/favorite
$ cd my/favorite
$ scp -pr geek@avoid.cvs.org:/cvs/my/favorite/project .
$ cd ~/repo
$ mkdir -p ~/repo/svn/my/favorite/project
$ cvs2svn -s ~/repo/svn/my/favorite/project/src ~/repo/cvs/my/favorite/project/src
$ mkdir ~/work
$ cd ~/work
$ svn checkout file:///home/geek/repo/svn/my/favorite/project/src/trunk ./src
$ cd src
$ # get the comments made from revision 5 until today
$ svn log -r 5:HEAD
$ # get the comments made from 2010-07-03 until today
$ svn log -r {2010-07-03}:HEAD
The basic idea is to just use svn or git instead of cvs :-)
And that can be done by converting the cvs repo to svn or git using cvs2svn or cvs2git, which we should be doing anyway. It got my my answer within about three minutes because I had a small repository.

Hope that helps.

Monday, January 03, 2011

Problems with a Vietnamese character on mobile devices

Currently I am running version 5.0.0.714 of the BlackBerry OS on my bold 9700, because my carrier has not released the latest version 6 of the OS for my phone. Still version 5 is pretty mature, and so I was surprised to run across this bug with rendering a particular Vietnamese letter.

On my BlackBerry, whether I am using the blackberry browser, gmail, blackberry's messenger, or opera mini, the blackberry renders the character , which is unicode U+1EDD, as the character , which is unicode unicode U+1EDB.

Here is a blown up screenshot of the two _different_ characters "ờ ớ" on the BlackBerry noted above using blackberry's messenger application:
This is the same way that it looks in all of the applications noted above using BlackBerry OS 5.0.0.714.

Curiously, I also found that this same rendering problem is happening on my Android phone for the same email. And the issue is also happening using with Android web browser in pages like this one. So it looks like several mobile platforms are having this issue. And now that I think of it, this blog post would be much harder to understand if you are reading it on a mobile device which has this bug.

On the other hand if I use LogicMail, which is currently the most popular open source email client available for the BlackBerry, and I turn on the "Unicode normalization" feature in the configuration, here is the resulting screen shot from the same email:
What is nice about this feature of LogicMail is that it improves your ability to read Vietnamese emails whether you are running older versions of the OS or not, so anyone whose carrier (or company) has locked them into older versions of the BlackBerry OS, can still get the benefit of LogicMail's unicode normalization option. Open source is great.

I wonder if this is still an issue with BlackBerry OS 6. If it is then these two different characters will look the same: ờ ớ

Maybe you can let us know in the comments below.

Incidentally, this character must be from the same family of characters which appear to be quite popular on reddit.com.