Category: Uncategorized

[Solved] Pentaho kettle is unable to run in mac

Pentaho kettle is unable to run in mac if you click on “Data”, you will have this error LSOpenURLsWithRole() failed with error -10810 for the file /Users/peter/Downloads/data-integration/Data run the follow command will fix it.┬ádata-integration is the unzipped folder of kettle.

xattr -dr data-integration

The above error is fixed, but double click on “Data” still nothing. Edit spoon.command, add the line in red

cd `dirname $0`# if a BASE_DIR argument has been passed to this .command, use it
if [ -n “$1” ] && [ -d “$1” ] && [ -x “$1” ]; then
echo “DEBUG: Using value ($1) from calling script”
cd “$1”

export JAVA_HOME=’/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home’

cd `dirname $0`

read count : 18

Explanation of DMIPS

There are essentially two aspects of CPU performance:
1) How many instructions can the CPU execute in a second.
2) How much actual WORK can the CPU do in one second.

The first is controlled by CPU architecture, memory speed, and so on. The second has those as variables, and add “how effective is the instruction set at doing the sort of work I want to do.” For instance, a PIC16xxx running at 20MHz executes 5 million instructions per second, but those instructions operate on 8bit data, and don’t include things like multiply and divide. But the instructions DO include a bunch of bit manipulation and IO instructions. So if you compare the pic to, oh, the 5MHz 8088 in the original IBM PC (should be safe an inoffensive), the PIC will be faster than the 8088 at some things (in particular those things having to do with touching external hardware), and the 8088 will be faster at other things (16bit math.)
For a long time, people tended to measure CPU performance with floating point benchmarks (fortran geeks they were, every one!) There was a set of benchmarks developed (1972!) called the Whetstone benchmarks that would measure a computers floating point performance. Eventually, people started using computers for things other than math, and realized they needed a similar benchmark for non-floating-point (integer) performance. This led to the Dhrystone benchmarks (get it?)

So the PIC32 runs at 80MHz, and generally executes instructions in about 1 cycle, so it does close to 80MIPs. It also runs the Dhrystone benchmark at about 1.5DMIPS/MHz (also 1.5DMIPs/MIP), which shows a pretty efficient architecture (at the sort of application the Dhrystone measures.) It’s more than a tiny core run at very high speed.

(This is one of the reasons you may have read the messages asking about pin-toggle speed. It’s pretty common for fast CPUs to incur a lot of overhead when they have to talk to the outside world; some of the ARM7TDMI toggle rates are pretty embarassing, and a 3GHz x86 cpu can’t do IO instructions much faster than the ancient 8088 (not to mention the terrible things such instructions do to the pipeline/etc.))

read count : 8

SQL to convert all tables from MyISAM to InnoDB

This is the SQL to convert all tables to InnoDB, relace the word to your database name, then run the output again.


read count : 13

ffmpeg and ffplay for logitech webcam

These command works on windows and capture video using my logitech C920 webcam

Save viewcam to a file, becareful, windows media play may not able to play mp4 in a very clean windows. You can save it to avi.

ffmpeg -f dshow -i video="Logitech HD Pro Webcam C920" -c copy -y c:\users\peter\desktop\a.mp4

Save viewcam video and play it using ffplay, but it has few seconds delay

ffmpeg -f dshow -i video="Logitech HD Pro Webcam C920" -c copy -y c:\users\peter\desktop\a.mp4 -c:v copy -copytb 1 -an -f mjpeg udp:// | ffplay -f mjpeg p-rpbesize 32 udp://

Just play it by ffplay

ffmpeg -f dshow -i video="Logitech HD Pro Webcam C920" -c:v copy -copytb 1 -an -f mjpeg udp:// | ffplay -f mjpeg -probesize 32 udp://

read count : 91