Things I have learned in programming (June 26, 2010)

Working in a startup company is an oportunity. You will have chances to get familiar with many programming languages. For me, they are PHP, JS, Python, XBL (Firefox Add-on), C#, C++, Bash, Windows Commandline (and of course, HTML and CSS) XBL 1.0 is a Mozilla-specific technology, and not a W3C standard. However, at least two standards are being worked on: sXBL and XBL 2.0. In my opinion, XBL is more powerful than XHTML. 1. How to fix overflow problem? There are so many ways to achieve this. I only show 2 ways. 1.a. The first way is using CSS overflow property. It’s CSS2. But you must set the width and height of container element in order to make overflow works properly. [code] #CF-carts-content, #CF-alerts-content, #CF-deals-content{ width:334px; height:455px; padding-bottom:5px; overflow-x:hidden; overflow-y:auto; } [/code] 1.b. The second way is using XUL crop attribute. Yeah, XBL is more powerful. See this example code and result: [code] <xul:label class=”CF-product-name CF-link” xbl:inherits=”value=product_name” crop=”end”/> [/code]

Things I have learned in C# (June 23, 2010)

Yesterday, I faced lots of problem in C#. Some were new, but some have already solved before but I don’t remember. I think I should write them down, in case I miss it again. 1. Execute a Command in C# CodeProject described two ways to run a command, synchronously and asynchronously 2. Build a .NET Solution or Project from the Command Line This solution comes from C# Corner. devenv can run in command line mode. And the command for build a solution for release is [code] devenv /build [Debug|Release] solution_file [/code]