Saturday 26 December 2015

How to amend your Git history

Friday 25 December 2015

Scala JIRA

Grab an Object in 3D with Processing

Monday 14 December 2015

Processing with Scala

Thursday 3 September 2015

How to dynamically include js on the browser

Saturday 22 August 2015

How to open totally blank/white page?

Friday 21 August 2015

How to Type Accents on Mac

Sunday 16 August 2015

Reset Audio on Windows

ffmpeg converts double length on MacOS

Saturday 15 August 2015

The Usage Comparison of Mathematica and Maxima

GitHub Style on Blogger

Thursday 13 August 2015

How to use Syntax Highlighter (Code-Prettify) on Blogger

Monday 3 August 2015

Fibonacci Number Graph with Maxima

Sunday 2 August 2015

Fibonacci Number and their Factors

Friday 31 July 2015

Functional Patterns - Pair Reducing

Functional Patterns - zip

Sunday 26 July 2015

LilyPond: How to write Two Voices on Violin

Markdown on Blogger with marked.js

Friday 17 July 2015

difference between method and function in Scala



Monday 22 June 2015

Japanese units of measurement for the property


畳 /jou/ means the size of the tatami, a traditional Japanese mat woven soft rush straw.
坪 just equals the area twice 間 /ken/, which equals 1 9/11 meters.
坪 /tsubo/ nearly equals 2 畳.
畳 equals ca 1.653 square meters.
坪 equals ca 3.306 square meters.

For example,
35 cm3 equals ca 21.17 畳, ca 10.59 坪.
50 cm3 equals ca 30.25 畳. ca 15.12 坪.
60 cm3 equals ca 36.3 畳, ca 18.15 坪.

Wednesday 3 June 2015

How to create XML models in Scala? - scalaxb

How to create XML models in Scala?

Currently the way to create XML models in Scala (like JAXB) is scalaxb, cf. https://github.com/eed3si9n/scalaxb, http://scalaxb.org/.

Among several ways, to run scalaxb sbt-scalaxb is the simplest one to do so but I believe there is no full covered procedure for that so I write it here :)

Let's say we use scalaxb 1.3.0.

1. Set up sbt files.


To call scalaxb from sbt 0.13.x, put this in your project/scalaxb.sbt:
resolvers += Resolver.sonatypeRepo("public")

addSbtPlugin("org.scalaxb" % "sbt-scalaxb" % "1.3.0")
and this in scalaxb.sbt:
scalaxbSettings
// Write your own package
packageName in scalaxb in Compile := "com.blogger.xml"

sourceGenerators in Compile <+= scalaxb in Compile
// The version of Dispatch, which is an HTTP access library and in some cases scalaxb depends on.
dispatchVersion in scalaxb in Compile := "0.11.2"

Note: As of Scala 2.11, you need to write the parsing library dependency separately, like
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4"

2. Put XSD files into src/main/xsd.


3. Run $ sbt scalaxb on your project.


4. You'll see generated sources in target/scala-2.11/src_managed/main/sbt-scalaxb.


That's it.

Monday 20 April 2015

How to reset to the default font size of Apple Dictionary

Apple Dictonary on MacOS has an invisible font size gauge:

1 2 3 [4] 5 6 7 8 9 10
The default is 4.

To reset to the default (4)
1. Minimize font size with the smaller A icon.
2. Click the bigger A icon 3 times.

Sunday 5 April 2015

How to prevent Atom from removing duplicated empty line breaks

By default Atom Editor (https://atom.io/) removes redundant empty line breaks at the bottom. It makes a diff on Git unintentionally.

A solution for it is to switch off 'Ensure Single Trailing NewLine' of Whitespace package.

Cheers

Monday 9 March 2015

Why doesn't Web Audio API sound on iOS?

Why doesn't my script of Web Audio API sound on iOS?

Here are major missing points.

Did you mute your iPhone?

Yeah, really it's possible.

Did you listen to an user action?

Web Audio can't start by script itself on iOS. You need to create a listener, e.g. onclick.

Did you set an argument properly?

bufferSource.start() or oscillator.start()
bufferSource.stop() or oscillator.stop()
work on the desktop browsers but doesn't on iOS.

bufferSource.start(0) or oscillator.start(0)
bufferSource.stop(0) or oscillator.stop(0)
should work on any modern browsers.


Saturday 7 March 2015

How to rotate a video file?


You may have done this

$ ffmpeg -vfilter "rotate=90" -i input.mp4 output.mp4

but you would have

unrecognized option 'vfilters'.
Error splitting the argument list: Option not found

So you should run:

$ ffmpeg -i input.mp4 -vf "transpose=1" output.mp4

then input.mp4 will be rotated at 90 degrees to output.mp4.

TweetDeck > HootSuite

If you manage multiple accounts, the web app is better than the desktop one owing to its process burden.
I thought HootSuite was the best service for Twitter which can manage multiple accounts (on the web).

Here are HootSuite and TweetDeck as web apps for Twitter.
  • HootSuite for free subscription is limited to 4 accounts managed.
  • TweetDeck is however free to use totally.

Why not use TweetDeck?
It seems to have to have more improvement but if it improves continuously then it's the best for your personal use.

Wednesday 18 February 2015

Mac Shortcuts to input Alphabets with Accents or Symbols

MacOS-Accents-CheetSheet

Mac OS Cheat Sheet: How to Input Accents and Symobols

Here is how to input accents and symbols with keys on Mac.
You can try to type on the form on the right of each row.

Mac Key Legend

symbol name
Command key
Control Key
Option Key
Shift Key
Caps Key
fn Function Key

Accents (Diacritic)

name example keyboard keys here to practice
cédille ç any ⌥ + c
capital cédille Ç any ⌥ + ⇧ + c
acute (accent aigu) é á any ⌥ + e, an alphabet
grave (accent grave) è à Japanese, etc. ⌥ + _, an alphabet
English ⌥ + `, an alphabet
circumflex ê î any ⌥ + i, an alphabet
Umlaut ä ü any ⌥ + u, an alphabet
tilde ñ any ⌥ + n, an alphabet

Symbols

name symbol keyboard keys here to practice
Yen ¥ Japanese ¥
Yen ¥ English ⌥ + y
back slash \ Japanese ⌥ + ¥
leader any ⌥ + ;
guillemet start « Japanese ⌥ + ]
English ⌥ + \
guillemet close » Japanese ⌥ + ⇧ + ]
English ⌥ + \
bullet any ⌥ + 8
degree ° any ⌥ + ⇧ + 8
Eszett ß any ⌥ + s
euro any ⌥ + ⇧ + 2
apple any ⌥ + ⇧ + k
delta any ⌥ + j
function ƒ any ⌥ + f
phi ø any ⌥ + o
capital phi Ø any ⌥ + o

Friday 6 February 2015

Cheat Sheet as Presentor on MacOS

MacOSCheetSheet

Mac OS Cheat Sheet as Presenter

This is for presentation.

Mac Key Legend

symbol name
Command key
Control Key
Option Key
Shift Key
Caps Key
fn Function Key

Mac OS

Display

keys action
fn ⌘ F1 Mirror (Duplicate) the current desktop to the projector.
⌘ ⌥ D Hide/show the Dock.

Chrome

Display

keys action
⌃ ⌘ F Switches to the full screen.
⇧ ⌘ F Switches to the presentation mode.

Tabs

keys action
⌘ ⌥ → Switches to the next tab.
⌘ ⌥ ← Switches to the previous tab.

Bookmark

keys action
⌥ ⌘ B Open Bookmark Manager.