Researchers are developing photovoltaic windows that can provide shade and generate electricity

From a article: “Researchers at the Lawrence Berkeley National Laboratory are developing smart photovoltaic windows that can shade you and generate electricity at the same time ... This coated glass is about 82% transparent when it’s at room temperature ... At 7% efficiency, they’re still under the minimum of 10% that the team led by Professor Peidong Yang believes would be adequate for commercial purposes. Dou told me that they hope to reach that mark in the next three to five years ... They also face a manufacturing roadblock: the color. Right now, Yang’s team can get the glass to turn orange, red, and brown ... But the main problem, right now, is the glass’s temperature threshold, which they’re working to reduce to 122 degrees Fahrenheit, the typical temperature of glass exposed to a typical sunny midday.”

How to set and use a vim color scheme

In an earlier vim color configuration tutorial I described how to have fine-grained control of your vi and vim color settings. In this article I’ll take an easier route and just show how you can use existing color schemes in your vi editor sessions.

Using a vim color scheme

Using a vim color scheme is actually pretty simple. If you’re in a vim editor session, just issue the vim colorscheme command from last line mode, like this:

How to make a color transparent in Gimp alvin March 12, 2018 - 10:44pm

I was recently working on some images of a mobile phone, where the mobile phone was surrounded by a solid color that I wanted to make transparent. Unfortunately the phone was black, and that color was dark gray, so when I made the dark gray a transparent color in Gimp using my usual approach — clicking Colors > Color to Alpha, then choosing dark gray — it had the effect of bleeding a lot of color out of the black phone. This was wrong.

How to use color in the Scala REPL alvin November 5, 2016 - 10:20pm

This image shows how to use color syntax highlighting in the Scala REPL. In short, just start the REPL like this:

$ scala -Dscala.color

CSS border-bottom dotted RGB color opacity setting

As a quick note, if you ever want to created a dotted border that has some RGB opacity to it, I just used the following CSS code to style some hyperlinks, and I can confirm that it works:

Scary font ideas alvin July 5, 2016 - 6:09pm

I’m working on cover designs for my new “Functional Programming in Scala” book, and I want the words Functional Programming to be scary or intimidating. These are some different font ideas. The red fonts seem to get the “scary” point across well, though I suspect that some combinations of grays and white can also work.

How to create an Android Color from a hexadecimal/HTML string (#fff)

Android FAQ: How can I create a Color from a hexadecimal color string in Android?

The Android Color.parseColor method

Solution: Use the Android Color.parseColor method, like this:

int color = Color.parseColor("#519c3f");

I just used it like this in my code, where I directly set the Paint color:

How to draw a rectangle in Android (using onDraw method of View) alvin May 10, 2015 - 3:46pm

Android FAQ: How do I draw a rectangle in Android?

To draw a rectangle in Android you’ll need to create your own View, i.e., a class that extends the Android View class. For example, this CustomView shows how to extend a View and then use the Rect and Paint classes along with the onDraw method to draw a rectangle: