Friday, October 30, 2009

Knowledgetree document management software

  • WebDAV:
    1. Don't rename the root folder. Otherwise access from WebDAV will be broken and the error says the folder is no longer available.
    2. No matter what name you give to the root folder, after turning on WebDAV Debug, the log shows KTWEBDAV [info] Root Folder is : Root Folder
  • Indexer Problem A: All documents are sitting in the quene to be indexed but none were indexed
    1. Change in config.ini or at URL /admin.php?kt_path_info=config/generalconfigpage to set loglevel=DEBUG
    2. Modify the file search2/bin/cronIndexer.php and change the line
    3. Enter the folder bin/luceneserver and edit to have the following contents:

    4. Access forbidden error found in the log file at var/log after the following line
    5. Modify the .htaccess file to allow access
    6. Indexer working

  •  Indexer problem B: File not indexed since it had the wrong extension
  1. Go to database dms table document_content_version
  2. Search for the known document_id that had indexing problem and write down its mime_id
  3. Search for this mime_id in the table mime_types: e.g. 167 has filetypes pptx but the file should have file type ppt (mime_id: 74)
  4. Update to the correct mime_id of the document in the table document_content_version
  • LDAP accounts import with uid set as default username
    Edit the file
    locate the following line in functions _do_editUserFromSource() and _do_massCreateUsers()
    $sUserName = $aResults[$this->aAttributes[1]]
    change it to
    $sUserName = $aResults[$this->aAttributes[7]]
    Note the definition of the array aAttributes is
    var $aAttributes = array ('cn', 'samaccountname', 'givenname', 'sn', 'mail', 'mobile', 'userprincipalname', 'uid');

    In order to correct the behavior that Mass Import Search for users returns unwanted objectclasses, locate the following line in function searchUsers:
    $sFilter = !empty($sSearch) ? sprintf('(&(%s)(%s))', $sObjectClasses, $sSearchAttributes) : null;
    and change it to
    $sFilter = !empty($sSearch) ? sprintf('(&(%s)(%s))', $sObjectClasses, $sSearchAttributes) : '(objectClass=posixAccount)';
    Recently I found a need to customize the LDAP search filter, therefore now it looks like
    $sFilter = !empty($sSearch) ? sprintf('(&(%s)(%s)(!(employeeNumber=0)))', $sObjectClasses, $sSearchAttributes) : '(&(objectClass=posixAccount)(!(employeeNumber=0)))';
  • Increase Session Timeout:

    1. In Mandriva Linux, PHP Session Timeout is affected by the file /usr/lib/php/maxlifetime. Default is 1440 seconds (24 minutes). Updating the file /etc/php.d/47_session.ini to include the following: session.gc_maxlifetime = 30000 will increase the timeout to 500 minutes.
    2. The config_settings table is queryed and populated into the global variable $default in file lib/config/ within function populateDefault()

Using the find command

  • In one case, I need to rename a bunch of files from upper case to title case (only the first letter of the file name is capitalized). For exmaple, AAA.C --> Aaa.c and ABC.C --> Abc.c

    This can be done with find and perl in the following manner:
    find . -maxdepth 1 -type f -execdir perl -e 'rename substr($_,2),ucfirst(lc(substr($_,2))) for @ARGV' '{}' \;

    Useful reference: How to rename to lowercase every file in a directory and its subdirectories?
  • How to check whether the contents of a directory is newer than 10-day old: I used the following command
    find /home/user -maxdepth 2 -mtime -10 -print -quit
    It will search the path /home/user and one level below that for anything that's newer than 10-day old and quit after a match is found.

Functions of MortScript

  1. Function to rename a directory/folder: just use Rename(oldDirName,newDirName,True) Although in the 4.1 manual it says Rename is for a file, it works for directories too.
  2. Function to enlarge the font size of Choice/ChoiceDefault: I use SetChoiceEntryFormat(45,36) when there are less than or equal to three choices to display on my 480x272 screen.

Sanyo NVM-4050 GPS

  1. Keep PNAShell.exe running for the Menu/Power button to work
  2. Kill MainPanel.exe before running Media player
  3. It can be wrapped in a MortScript to launch media player by the following command
    CallScript("MplayerLauncher.mscr", "\myflashdisk\programs\mediaplayer", "Player.exe")
    The content of the MplayerLauncher.mscr is shown below:
    CWD = SystemPath("ScriptPath")
    appFolder = argv[1]
    appEXE = argv[2]
    MainPanelRunning = "true"
    If(MainPanelRunning eq "true")
    Waitfor("MainPanel", 3)
    BigMessage(appFolder\appEXE&" was not found. Install the application to that path and try again.","Application not found")
  4. Native support by GAPI can be achieved by selecting the Acer P615 device for both 16 and 32 bit (thanks to Robert) . Otherwise use emulator (GAPI to GDI wrapper).
  5. When a corrupted folder is detected in myflashdisk by the windows CE, open error checking from XP to check the flash drive
  6. CPU ARM920T S3C2443 (thanks to Checko), Windows CE 5.0 core, 480x272 screen
  7. Bootloader's menu (unbrick a bricked GPS)
    • Download the driver package from here
    • Hold down the Menu button while powering it on or hard reset
    • Connect the unit to PC via USB
    • Install the driver secbulk.inf for SEC SOC USB Bulk IO Test Board Secbulk from the USB driver folder 
    • Run the USB/Serial Downloader DNW5.0e.exe 
    • Make a test of USB connection by clicking the” USB port/Status”. If all is ok go to next step
    • Click “USB port/Transmit” and select the file “MioP550 - Osc260A R05_P09.nb0” repair the WinCE (not working yet)
    • Press the reset button to reboot.

Nintendo Wii

  1. My Wii was purchased as a bundle from and has a serial number of LU 3086XXXXX. Its DVD drive chipset is GC2R-D2B.
  2. To open up the console, a special tool -- Tri-wing Screwdriver is needed. I got it from for $3.99+$1.30 shipping (Air Economy Bubble). I also have a small philipps screwdriver for other screws.
  3. The Wii modchip I have is WiiKit, which is based on WiiKey with the extra feature of an optional wires installation. I got it from for $9.99+$8.49 shipping (Registered Air Mail).
  4. I followed this Guide to disassemble the Nintendo Wii (Video and Pictures).
  5. Since the WiiKit comes with the installation wires, all I need is a soldering iron with a sharp tip and solder. The soldering job is straightford according to this picutre.
  6. Download the latest Update and Config disc files from the official website of Wiikey and generate the ISO images according to the Readme.txt file after extracting them (using the fixsize.cmd and filechop.exe).
  7. I burned the image to a TEON 8X DVD-R at 4/8X speed and TDK 16X DVD+R at 6/16X speed with either a Toshiba or Optiarc burner.
  8. Insert the burned Update disc into Wii and it updated the firmware of the Wiikey to the latest version (two cycles: one test and one actual update). Insert the burned Config disc after rebooting, the Wiikey Setup Menu showed up. It confirmed the installation of the Wiikit is good. I don't have a gamecube controller, so I have to use the reset button on the console to access the Setup Menu as suggested in the Readme.txt file.
  9. Guide -- Wii Disc Backup
  10. WII ModChip Compatibility List
  11. Wii SoftMod guide for System Firmware 4.1 and below: No need to disassemble your wii or use a soldering iron. All you need is a SD card.
  12. How to add/import a WBF file on a PC hard drive into a WBFS partition: I was able to do it with the wbfs.exe (wbfs windows port build 'delta'. Mod v1.7 by flfl.) tool from the package wbfs中文管理器2.91. The syntax is wbfs n a filename.wbf (assuming n: is the drive letter for the WBFS partition and a for add.). After it's done, the games installed on the WBFS partition can be listed by wbfs n l (l for list). You may need the file wwbfs.exe in the same folder as wbfs.exe and the wbf file to make it work. 
  13. How to add/import a WBFS file on a PC hard drive into a WBFS partition: An excellent GUI tool called Wii Backup Manager. I tried version 0.3.6 beta1.
  14. Unofficial USB to Ethernet adaptes for Wii

Samsung SPH-M500 cell phone

  • Discussion threads about Sprint SERO Plan: Fatwallet, Slickdeals

  • How to change your ESN number on a CDMA phone (haven't tried)
  • Download mode: When the phone is powered off, hold down key 9 and push PWR/END key at the same time to power it on. Then it will enter a Download Mode by showing Mode: Emergency and Port: USB.

  • Samsung PST dll file: discussion thread on Mobile-files

  • M500 service manual: discussion thread on Mobile-files

  • How to unlock the 6-digit SPC/MSL code of M500/M330:
    1. Install the Samsung MCCI Modem driver (Ver. 4.38.5 can be downloaded from Samsung) on your PC
    2. Plug in the USB data cable into the phone. You should see two new devices on your Windows Device Manager: Samsung Mobile Modem and Samsung USB Composite Device. Right click on Samsung Mobile Modem and click on Properties -> Advanced -> Advanced Port Settings. Set the COM port number to COM1 or COM2.
    3. Register an user on Mobile-files to download and run the Kyocera Slider Tool SE47. Select the COM port number you set in Step 2. and then click on the Connect button. The SPC code is displayed upon connection. Click the Connect button again and the SPC code will be set to all zeros: 000000.
    4. The SE47 tool also has a function for writing ESN into the phone (haven't tried).

  • How to activate SPH-M500/M330 on Verizon network or its MVNO (such as Page Plus cellular).
    1. Set the 6-digit SPC/MSL of M500 to all zeros with the method described above
    2. Download a Verizon PRL such as 52775.PRL
    3. Call your service provider and write down your Phone Number (MDN) and MSID (MIN)
    4. Enter "##000000#"from keypad of M500 to show the SVC menu and click Edit. Enter the Phone number and MSID obtained above.
    5. Open CDMA workshop 2.7 (which can be found on Mobile-files):
      • On the Main tab, select the correct COM port and click on the Connect button (the rightmost one)
      • After the connection is successful, click on the Security tab. In the left-bottom box named Password (16 digits), select Samsung (default) then click the Send button below. A message box should pop up saying the phone is unblocked.
      • Click on the Other tab. In the right-top box named PRL, click on the Read button to backup the sprint PRL of m500 with Universal method from NAM1. After the original PRL is backed up, click on the Write button next to it. Choose the 51600.PRL file and click Open, then click Ok.
      • After the Verizon PRL is written, go back to the Main tab and click the Mode button (second from left to right on the bottom) then click Reset. M500 will reboot.
    6. Program the M500 OTA by dialing *22890
    7. Update the PRL by dialing *228 and choose Option 2
    8. Make an outgoing call to complete the activation on Pageplus
    9. Reference: Verizon Handset Manual Activation on howard forums