Posts RSS Comments RSS 165 Posts and 357 Comments till now

Never Ever Immediately Fall Asleep After Having Meal

For this past few days I had discomfort in my throat. There was this feeling of almost-vomiting, like when you super-bloated after too much eating and/or drinking. Another uneasy feeling was the feeling as if you need to burp, but the air is refusing to move up from the gastric.

 

This uncomfortable feeling is actually quite familiar. I think I experienced it during Ramadhan month, albeit not as bad as now. I suspect it has something to do with immediately sleeping after meal.

 

So after skimming a number of Wikipedia articles, I found out the ‘possibly’ correct term for my discomfort as Gastroesophageal Reflux Disease. The mild vomiting-like feeling is called Regurgitation.

 

Moral of the story:

  • Never Ever Immediately Fall Asleep After Having Meal
  • If you really need the sleep, try not to fall-flat in the bed. Sleep in the sofa, or use multiple pillows to make the head in elevated position compared to the stomach
  • Coffee, or any acidic drinks/foods will amplify the uncomfortable feeling.

So far I did not take any medicine, nor I know any treatment to alleviate the discomfort. The discomfort will be gone by itself in 2-3 days. As long as you didn’t repeat to immediately sleep after meal.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • E-mail this story to a friend!
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • TwitThis
  • Reddit

Indonesia Won Global Enterprise Challenge (GEC) 2009

Global Enterprise Challenge 2009

 

Congratulations! Congratulations! Congratulations!

 

My fellow countrymen has done all of us proud. The team of 6 high school students has claimed the top prize in Global Enterprise Challenge 2009. The team consist of

  • Wismaya Adi Purnama (SMA Taruna Nusantara Magelang)
  • Lita Gunawan (SMAK Yahya Bandung)
  • Rizki Satrio Nugroho (SMA Madania Bogor)
  • Evelyn Antoinette (Bina Bangsa School Jakarta)
  • Asyraf Firas Abdurrasyid (SMAN 1 Bandung)
  • Christa Yona Twedrian (SMA Regina Pacis Bogor)

 

This year’s challenge is to To produce a working model of an innovative product or service that will reduce food waste in your country and help to alleviate starvation in one of the world’s poorest countries.

 

Below is the Team Indonesia’s presentation (YouTube):

 

Source:

  1. About Global Enterprise Challenge
  2. GEC 2009 website
  3. News about the winning (in Bahasa Indonesia)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • E-mail this story to a friend!
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • TwitThis
  • Reddit

My Head hurts when Reading News about Iran

ARRGGHH… For so long I have this ‘blind’ conviction that BBC is better than CCN. By better, I mean it’s more objective with no hidden agenda. But my oh my.. has my conviction been shaken …

 

But today a friend sent me this link that BBC caught in public mass deception regarding Iran’s Election. The disputed BBC article is dated 17 June 2009. I don’t know this is a coincidence or not, but when Ayatullah Khomenei gave Friday sermon, he called Britain as the most treacherous Iran’s enemy. And Britain protested this remark. BBC also has issued a statement regarding this issue.

 

Anyway, somehow I feel slightly less naïve than yesterday :D

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • E-mail this story to a friend!
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • TwitThis
  • Reddit

What Should I Do When Microsoft’s Bing is blocked by IWSS?

Microsoft Bing

Short answer? Call your network administrator and report the incident. He did not pick up the phone? Send him email, cc his manager if you deem necessary .. Haha, I’m kidding. :D

 

If you had the same problem as I did, you could advise your Network Administrator, or whoever maintaining the InterScan Web Security Suite (IWSS) to make small changes to IWSS configuration. You could advise them to follow either of the following steps, depending on your circumstances:

 

  1. Problem:You have set the action for the corrupted_zip parameter to “pass” in the [Scan-configuration] section in the intscan.ini file. However, IWSS continues to log the corrupted_zip_file events in the log file and send them to Control Manager (TMCM).

    Solution:
    To resolve this issue, please do the following:

    • Look for and open the intscan.ini file using a text editor.
    • Look for the “[http]” section and add the following parameter under it: “skipSpecificVirus=Corrupted_Zip_file”
    • Restart the IWSS daemon.
  2. Problem: When IWSS is used as the HTTP proxy, access to websites is blocked and the Corrupted_Zip_File error appears even if compressed files are not being downloaded.

    Solution: Some Web-servers compress the requested content (HTML, images, etc) using the GZIP-algorithm to decrease the amount of traffic. If such content is sent in multiple chunks, and VSAPI only has one chunk, it will exit with an error indicating that the archive is corrupted (CORRUPTED_ZIP_ERROR). The web browsers can handle that as they are rebuilding it in there cache space on their side.
    To avoid such situations, IWSS 3.0 and 3.1 include a new feature that modifies the Accept-Encoding header of the HTTP request to exclude GZIP from the supported encodings. This feature is controlled in the intscan.ini file by the [http]/ disallow_gzip_encoding parameter and is enabled by default (yes).

    • Please make sure that the parameter “disallow_gzip_encoding” is set to “yes”.
      If you change the value, you will have to restart the http daemon for the change to take effect. Use the following commands:
      /opt/trend/iwss/bin/S99ISproxy stop
      /opt/trend/iwss/bin/S99ISproxy start
    • If you are using an ICAP implementation as well (like squid, ISA, etc..), you will have to change your ICAP client settings to “don’t send the header Accept-Encoding: gzip”.

    This will reduce the instances of the contents being blocked and may increase bandwidth usage. Some web servers may ignore this setting and still return the compressed content.

Source:
Configuring InterScan Web Security Suite (IWSS) 3.x for Linux to stop sending corrupted_zip_file notifications
Unable to access web sites using InterScan Web Security Suite (IWSS) due to Corrupted_Zip_File issue

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • E-mail this story to a friend!
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • TwitThis
  • Reddit

.NET MS Excel Automation Guidelines

Microsoft Excel

Recently I had the pleasure to get involved with an MS Excel automation project. The project’s main goal was to read a number of Excel documents in a specific folder, validate their contents, and use the contents to generate a new Excel documents as an output.

 

Although I have been working with ASP.NET Excel automation before, I still feel there are a lot of things that I don’t know. So as I browsed through the list of URL given by Google’s Search Result, I found a number of interesting things that I would like to share with you.

 

Lesson Learned

Gary Read shares his experience on Automating Excel using .NET. I list a few Gary’s tips which are my favourites:

  • Tip #1: Seriously Consider NOT Automating Excel from .NET
    In short, only automate Excel when no budget (apart from your salary :D ) is allocated to the project.
  • Tip #2: Use VB.NET instead of C#
    The best tip for me. If you are already starting to write the code in C#–like I did when I read this article, immediately switch to VB.NET. The switch to VB.NET makes it a hell lot easier to complete the project compared to C#.
  • Tip #5: Wrap your Excel communication points
    Instead of cluttering your program with repeating lines of getting the cell and extracting the value, refactor the methods to make the program less hurting your eyes.
  • Tip #7: Watch out interruptions and disconnects
    IMHO, to avoid this problem basically we just need to ensure that only one process/user is opening MS Excel. In other words, combining automation and manual excel is a recipe for disaster.

As my project is now completed, I would like share a number of simple codes that I found useful. Hopefully it will be useful for you too.

How to create Excel document

Imports Microsoft.Office.Interop.Excel
'.....
Dim appExcel As New ApplicationClass
Dim wbObject As Workbook = appExcel.Workbooks.Add(XlWBATemplate.xlWBATWorksheet)
Dim wsObject As Worksheet = wbObject.Worksheets.Item(1)
wsObject.Name = "Overall Summary" 'Set Worksheet Title
'....Modify the Worksheet content here
wbObject.SaveAs("C:\Output.xls") 'Save the file
wbObject.Close()
appExcel.Quit()
'.....

How to open existing Excel document

Imports Microsoft.Office.Interop.Excel
'.....
Dim appExcel As New ApplicationClass
Dim wbObject As Workbook = appExcel.Workbooks.Open("C:\Output.xls", False, False)
Dim wsObject As Worksheet = wbObject.Worksheets.Item(1)
'....Modify the Worksheet content here
wbObject.Save() 'Save the file
wbObject.Close()
appExcel.Quit()
'.....

How to manipulate Excel Worksheet

Imports Microsoft.Office.Interop.Excel
'.....
    Public Function AddWorksheet(ByVal strName As String, ByVal wbObject As Workbook) As Worksheet
        Dim wsResult As Worksheet
        wsResult = wbObject.Worksheets.Add() 'Add as the first Worksheet
        wsResult.Name = strName
        Return wsResult
    End Function
'....
    Public Sub RemoveWorksheet(ByVal strName As String, ByVal wbObject As Workbook)
        Dim wsResult As Worksheet
        wsResult = GetWorksheetByName(strName, wbObject)
        If Not wsResult Is Nothing Then
            wsResult.Delete()
        End If
    End Sub
'....
    Public Function GetWorksheetByName(ByVal strName As String, ByVal wbObject As Workbook) As Worksheet
        Dim wsResult As Worksheet
        If Not IsNothing(wbObject) And Not IsNothing(strName) Then
            For Each wsObject As Worksheet In wbObject.Worksheets
                If wsObject.Name.ToLower().Trim().Equals(strName.ToLower().Trim()) Then
                    wsResult = wsObject
                End If
            Next
        End If
        Return wsResult
    End Function
'....
    Public Sub MoveWorksheet(ByVal strWorksheetName As String, ByVal pos As SheetPosition, ByVal wbObject As Workbook)
        Dim wsResult As Worksheet = GetWorksheetByName(strWorksheetName, wbObject)
        If Not wsResult Is Nothing Then
            If pos = SheetPosition.First Then
                If wsResult.Index > 1 Then 'ensure the target is not the first worksheet
                    Dim tempws As Worksheet = wbObject.Worksheets(1) 'Object Index starts with 1
                    wsResult.Move(tempws)
                End If
            ElseIf pos = SheetPosition.Last Then
                If wsResult.Index < wbObject.Worksheets.Count Then
                    Dim tempws As Worksheet = wbObject.Worksheets(wbObject.Worksheets.Count)
                    wsResult.Move(, tempws)
                End If
            End If
        End If
    End Sub
'.....

That's all for now :)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • E-mail this story to a friend!
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • TwitThis
  • Reddit

Page 1 of 3312345»...Last »