English

FeedTree 0.7.0: collaborative RSS and Atom delivery

FeedTree 0.7.0 has been released to the wild. Shortly, it is a peer-to-peer network for distributing feed, RSS and Atom, to all subscribers instantly. In contrast, new feeds will be pushed to a set of subscribers and they will then push to other subscribers in tree fashion. Instead of developing full-featured feed reader for FeedTree, just a proxy, ftproxy, has been developed.

Technically, FeedTree relies on a peer-to-peer overlay network namely Pastry and Scribe protocol running on top of that. I don’t know much about Pastry. All I know is just it is implemented in Java. I don’t hate Java and I don’t like Java too. It is too big for me to run a Java application on my laptop just to read feed faster than ever.

Install pure-ftpd with large file on Ubuntu

Pure-FTPd might not be the best FTP server but it is my most favorite one since yesterday. Its advantages are as belows.

  • Easy
  • Simple
  • Fast
  • Secure

It is enough for me right now. In addition, it is available on most distributions including Ubuntu. Unfortunately, it seems Pure-FTPd is too secure in term of compile-time options. The binary package of Pure-FTPd on Ubuntu 5.10 Breezy doesn’t support large file operation. As a result, I can’t see or transfer files larger than 2 GB. Oh, my god! Then I managed to rebuild the package again locally to support large file. Below are my instructions. Note that I am just a newbie for Ubuntu, Debian-style package management. This is a good practice for me.

Azureus produces bad sectors

Okay. Let me clarify a few things first. My favorite BitTorrent client is BTQueue for sure. I have never wanted to run other BitTorrent client especially on hosts placed in data center. BTQueue is the best candidate to run on server-class machine for remotely controlling through the Internet. Anyway, my friend didn’t think so. He had a machine running Windows 2003 because he like to use mouse to control everything instead of just a keyboard like me. This machine has been placed at a data center to run Azureus for him and then transferred files back to his home via FTP. Everything worked fine except only the bad sectors. Sometimes, the machine hung up without any notification. Then he checked all drives to ensure their healthy. In contrast, this machine has 3 drives, a IDE and two SATA. As a result, he found bad sectors in all drives, the most of them were existed in the IDE drive which is the system drive. This situation should not happen because all data are set to store in the two SATA. However, he claimed them all. Unfortunately, he had to claim some of them or all of them every 2 months.

Living with phpBB

phpBB is a powerful and popular bulletin board software running on top of PHP and mySQL. However, you will get some trouble to use so popular softwares. Can you guess what kind of trouble you will get from phpBB? It is a very simple one. If you have deployed phpBB for a year you could encounter this situation. Yes, it is hacked again and again.

My friend is providing hosting services on FreeBSD server. This server is very secure. However, it was hacked 2 days ago through phpBB deployed by his customer himself. The result is that the hacker successfully added a cron entry to run IRC bot. Then he found that the installed phpBB had at least a vulnerability relating to mishandling string.

ABAP/4 Example Code: ALV List by FM 'REUSE_ALV_LIST_DISPLAY'

Example

TYPE-POOLS: SLIS.

DATA: it_spfli TYPE TABLE OF spfli WITH HEADER LINE,
      it_cat TYPE SLIS_T_FIELDCAT_ALV,
      wa_cat TYPE slis_fieldcat_alv.

START-OF-SELECTION.
  SELECT * FROM spfli
           INTO TABLE it_spfli.

  PERFORM create_field_catalog.

  CALL FUNCTION ’REUSE_ALV_LIST_DISPLAY’
    EXPORTING
*     I_INTERFACE_CHECK              = ’ ’
*     I_BYPASSING_BUFFER             =
*     I_BUFFER_ACTIVE                = ’ ’
*     I_CALLBACK_PROGRAM             = ’ ’
*     I_CALLBACK_PF_STATUS_SET       = ’ ’
*     I_CALLBACK_USER_COMMAND        = ’ ’
*     I_STRUCTURE_NAME               =
*     IS_LAYOUT                      =
      IT_FIELDCAT                    = it_cat[]
*     IT_EXCLUDING                   =
*     IT_SPECIAL_GROUPS              =
*     IT_SORT                        =
*     IT_FILTER                      =
*     IS_SEL_HIDE                    =
*     I_DEFAULT                      = ’X’
*     I_SAVE                         = ’ ’
*     IS_VARIANT                     =
*     IT_EVENTS                      =
*     IT_EVENT_EXIT                  =
*     IS_PRINT                       =
*     IS_REPREP_ID                   =
*     I_SCREEN_START_COLUMN          = 0
*     I_SCREEN_START_LINE            = 0
*     I_SCREEN_END_COLUMN            = 0
*     I_SCREEN_END_LINE              = 0
*     IR_SALV_LIST_ADAPTER           =
*     IT_EXCEPT_QINFO                =
*     I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
*   IMPORTING
*     E_EXIT_CAUSED_BY_CALLER        =
*     ES_EXIT_CAUSED_BY_USER         =
    TABLES
      T_OUTTAB                       = it_spfli
*   EXCEPTIONS
*     PROGRAM_ERROR                  = 1
*     OTHERS                         = 2
            .
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
*&---------------------------------------------------------------------*
*&      Form  create_field_catalog
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM create_field_catalog .
  IF it_cat[] is initial.
    clear wa_cat.
    wa_cat-col_pos   = 1.
    wa_cat-fieldname = ’CARRID’.
    wa_cat-datatype  = ’CHAR’.
    wa_cat-inttype   = ’C’.
    wa_cat-intlen    = 3.
    wa_cat-seltext_l   = ’Airline Code’.
    wa_cat-seltext_m   = ’Airline Code’.
    wa_cat-seltext_s   = ’Airline Code’.
    append wa_cat to it_cat.

    clear wa_cat.
    wa_cat-col_pos   = 2.
    wa_cat-fieldname = ’CONNID’.
    wa_cat-datatype  = ’NUMC’.
    wa_cat-inttype   = ’N’.
    wa_cat-intlen    = 4.
    wa_cat-seltext_l   = ’Flight Conn. No’.
    wa_cat-seltext_m   = ’Flight Conn. No’.
    wa_cat-seltext_s   = ’Flight Conn. No’.
    append wa_cat to it_cat.

    clear wa_cat.
    wa_cat-col_pos   = 3.
    wa_cat-fieldname = ’CITYFROM’.
    wa_cat-datatype  = ’CHAR’.
    wa_cat-inttype   = ’C’.
    wa_cat-intlen    = 20.
    wa_cat-seltext_l   = ’Dep. city’.
    wa_cat-seltext_m   = ’Dep. city’.
    wa_cat-seltext_s   = ’Dep. city’.
    append wa_cat to it_cat.

    clear wa_cat.
    wa_cat-col_pos   = 4.
    wa_cat-fieldname = ’AIRPFROM’.
    wa_cat-datatype  = ’CHAR’.
    wa_cat-inttype   = ’C’.
    wa_cat-intlen    = 3.
    wa_cat-seltext_l   = ’Dep. airport’.
    wa_cat-seltext_m   = ’Dep. airport’.
    wa_cat-seltext_s   = ’Dep. airport’.
    append wa_cat to it_cat.

    clear wa_cat.
    wa_cat-col_pos   = 5.
    wa_cat-fieldname = ’CITYTO’.
    wa_cat-datatype  = ’CHAR’.
    wa_cat-inttype   = ’C’.
    wa_cat-intlen    = 20.
    wa_cat-seltext_l   = ’Arrival city’.
    wa_cat-seltext_m   = ’Arrival city’.
    wa_cat-seltext_s   = ’Arrival city’.
    append wa_cat to it_cat.

    clear wa_cat.
    wa_cat-col_pos   = 6.
    wa_cat-fieldname = ’AIRPTO’.
    wa_cat-datatype  = ’CHAR’.
    wa_cat-inttype   = ’C’.
    wa_cat-intlen    = 3.
    wa_cat-seltext_l   = ’Dest. airport’.
    wa_cat-seltext_m   = ’Dest. airport’.
    wa_cat-seltext_s   = ’Dest. airport’.
    append wa_cat to it_cat.

  ENDIF.
ENDFORM.                    " create_field_catalog

Global data in SAP smartforms

We can define global variables in SAP smartforms but these are not contained in form interface by define them in Global Settings -> Global Definitions and select Global Data tab.

img144

See above picture, we can define variable from:

  • Data type (DATE, CHAR, NUMC etc.)
  • Structure in Data Dictionary
  • Defined Type in Types tab

Technorati Tags: ,