Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
| # Tested on macOS 13. | |
| function manx { | |
| if [ "$1" = "" ]; then | |
| echo "manx [section] <page>: Creates and opens a PDF for a manpage." | |
| else | |
| pdfpath="/tmp/$*.man.pdf" | |
| man -t $* | pstopdf -o "$pdfpath"; open "$pdfpath" | |
| fi | |
| } |
Author: Michael Zeng
| import android.os.Build; | |
| import java.lang.reflect.Method; | |
| public class Device { | |
| /** | |
| * @return The device's serial number, visible to the user in {@code Settings > About phone/tablet/device > Status | |
| * > Serial number}, or {@code null} if the serial number couldn't be found | |
| */ | |
| public static String getSerialNumber() { |
| public class ReactiveTextViewHolder<T> extends ReactiveViewHolder<T> { | |
| private TextView label; | |
| private T currentItem; | |
| public ReactiveTextViewHolder(View itemView) { | |
| super(itemView); | |
| label = (TextView) itemView.findViewById(android.R.id.text1); | |
| } |
A quick list of tools for building HTML/CSS/JS apps that work well offline. Ping me at @nolanlawson if I missed anything!
Tools for bundling your HTML/CSS/JS into a native app.
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import android.content.Context; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.view.View; | |
| import android.view.ViewGroup; |
| public class ContentValuesBuilder { | |
| private ContentValues mValues; | |
| private ContentValuesBuilder() { | |
| mValues = new ContentValues(); | |
| } | |
| public static ContentValuesBuilder newBuilder() { | |
| return new ContentValuesBuilder(); | |
| } |
| public class UIUtils { | |
| public static <T extends View> T findView(View root, int id) { | |
| return (T) root.findViewById(id); | |
| } | |
| } |
| package com.cyrilmottier.android.citybikes; | |
| import android.os.Bundle; | |
| import com.cyrilmottier.android.avelov.R; | |
| import com.cyrilmottier.android.citybikes.app.BaseActivity; | |
| public class LicensesActivity extends BaseActivity { | |
| private WebView mWebView; |