value | name |
---|---|
100 | extralight/ultralight |
200 | light/thin |
300 | book/demi/light |
400 | regular/normal |
500 | medium |
600 | semibold/demibold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.graphics.Matrix; | |
import android.graphics.drawable.Drawable; | |
import android.os.Build; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; | |
/** | |
* Created by chris on 7/27/16. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.Iterator; | |
import org.apache.poi.hssf.usermodel.HSSFCell; | |
import org.apache.poi.hssf.usermodel.HSSFRow; | |
import org.apache.poi.hssf.usermodel.HSSFSheet; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.lukehorvat; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.os.Parcel; | |
import android.os.Parcelable; | |
import android.preference.DialogPreference; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.widget.NumberPicker; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Downloader for Google Web Fonts | |
# | |
# For usage information run with "--help" | |
# | |
# Works on Python 2.6 and later, 3 and later | |
# Requires tinycss (and argparse for Python 2.6) from pip | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
A Static Site Generator is a program, that generates an HTML website as an output. ThisHTML website is then served through your web server, just like the old’n’days. This is usually achieved using template languages and code that separates out the layout of the website from its content and styles.
Advantages of a Static Site Generator?
- Security – There’s no database layer, or rails/pylons layer of code so security excellent.
- Performance – Under load, less memory / cpu usage to serve your website, so your website stays up longer
- Have a copy of your content separate from your server
- Easily move your website to another host – Copy and paste the HTML and re-route the domain name should you have one.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rahul.view; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.util.AttributeSet; | |
import android.view.View; | |
public class GridLineView extends View { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyApp extends Application { | |
@Override | |
public void onCreate() { | |
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.lukehorvat; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.os.Parcel; | |
import android.os.Parcelable; | |
import android.preference.DialogPreference; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.widget.NumberPicker; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte lineEnding = 0x0A; | |
//Data array that the received info from android app is recorded. Every byte corresponds to a digital pin. | |
byte readBuffer[15]; //For example readBuffer[5] is for digital pin 5. | |
byte defaultByte = 0x10; //On start all arduino digital pins must be input for electrical protection. | |
//Pins 0 and 1 are used for serial comminations. So read | |
void setup() { | |
for (int i=0; i < sizeof(readBuffer)-1 ; ++i) { |
OlderNewer