Skip to content

Instantly share code, notes, and snippets.

View technoir42's full-sized avatar

Sergey C. technoir42

View GitHub Profile
@technoir42
technoir42 / gist:972301
Created May 14, 2011 15:05
scoped_ptr, scoped_array
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
#ifndef __SCOPED_PTR_H__
#define __SCOPED_PTR_H__
#include <cassert>
template<class T>
module Render.D3D11;
import Core;
import Core.Logging;
import std.array;
import std.c.stdlib;
import std.comptr;
import std.conv;
import std.format;
import android.content.Context;
import android.support.v4.content.AsyncTaskLoader;
public abstract class AsyncLoader<T> extends AsyncTaskLoader<T> {
private T mResult;
public AsyncLoader(Context context) {
super(context);
}
import android.content.Context;
import android.database.Cursor;
import android.support.v4.content.AsyncTaskLoader;
public abstract class SimpleCursorLoader extends AsyncTaskLoader<Cursor> {
private Cursor mCursor;
public SimpleCursorLoader(Context context) {
super(context);
}

#Installing TeamCity for building Android projects

##Requirements

  • MySQL
  • JDK 1.7
  • 32-bit libstdc++ zlib.i686

##Install JDK

#How to install Sonatype Nexus

##Create user

useradd -r -m nexus
passwd nexus

##Download and unpack Nexus

cd /opt

import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.ViewGroup;
public abstract class HeaderFooterRecyclerViewWrapperAdapter<HeaderViewHolder extends RecyclerView.ViewHolder,
FooterViewHolder extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private static final int VIEW_TYPE_MASK = 0xfffffff;
private static final int VIEW_TYPE_HEADER = 0x10000000;
private static final int VIEW_TYPE_FOOTER = 0x20000000;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import java.util.ArrayList;
import java.util.List;
/**
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\msys2_shell]
@="Open MSYS2 here"
[HKEY_CLASSES_ROOT\Directory\shell\msys2_shell\command]
@="c:\\dev\\tools\\msys2\\usr\\bin\\mintty.exe -i c:\\dev\\tools\\msys2\\msys2.ico /bin/sh -lc 'cd \"$(cygpath \"%V\")\"; exec bash'"
[HKEY_CLASSES_ROOT\Directory\Background\shell\msys2_shell]
@="Open MSYS2 here"
import android.content.Context;
import android.support.annotation.Keep;
import android.support.annotation.Nullable;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.CoordinatorLayout;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.View;
@Keep