Monday, July 27, 2015

Webcam setup is easy

It seems setting up a real time online webcam is easy.

An example: http://foscam.us/

The webcam will be IP based, so user can log in and watch anytime online. There is IR mode (Infrared), so you can watch during night. You can control orientation and angle of the camera.

Other choices are like BlueIris and Webcam Surveyor.




Friday, July 24, 2015

Free Git repository

Assembla no longer has free repository. Bitbucket.org allows free repository of team up to 5 members.

Note:
- Git ignore file list: http://git-scm.com/docs/gitignore

Monday, July 6, 2015

Batch script to copy files

The batch script below can be used to automate file copy. You need to modify it to adapt to your needs.

echo off
echo Copy script


REM Source machines.
set SERVERS[0]=machine1
set SERVERS[1]=machine2
set SERVERS[2]=machine3


REM Source folder pattern.

set PATTERN=Folder_Pattern
 

REM Target location root.
set ROOT=machine_target_root
set VERBOSE=1

set "x=0"

:SymLoop

if defined SERVERS[%x%] (
  REM call echo %%SERVERS[%x%]%%
  call set SERVER=%%SERVERS[%x%]%%
  echo %SERVER%


  REM Create target folder.

  mkdir %ROOT%\%SERVER%

  FOR /f "tokens=*" %%i in ('DIR /a:d /b \\%SERVER%\%PATTERN%') DO (
      if VERBOSE=1 (
          ECHO Copy from \\%SERVER%\%%i\* to %ROOT%\%SERVER%\%%i\
      )
      xcopy \\%SERVER%\%%i\* %ROOT%\%SERVER%\%%i\
  )

  set /a "x+=1"
  GOTO :SymLoop
)

:END

Sunday, June 7, 2015

Use Java library in C# - IKVM.NET

[1] IKVM.NET
[2] http://en.wikipedia.org/wiki/IKVM.NET

From [2]:

IKVM.NET is an implementation of Java for Mono and the Microsoft .NET Framework. IKVM is free software, distributed under a permissive free software licence.[1]

IKVM.NET includes the following components:

    A Java Virtual Machine implemented in .NET
    A .NET implementation of the Java class libraries
    A tool that translates Java bytecode (JAR files) to .NET IL (DLLs or EXE files).
    Tools that enable Java and .NET interoperability

With IKVM.NET you can run compiled Java code (bytecode) directly on Microsoft .NET or Mono. The bytecode is converted on the fly to CIL and executed.


Therefore if you want to use a java Jar library as C# assembly, you can use IKVM for the conversion.

This is great.

Saturday, May 9, 2015

Blog Archive

Followers