This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<fragment | |
android:id="@+id/youtubePlayer" |
This file contains hidden or 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
interface SampleInterface { | |
fun getText(context: Context): String | |
fun getValue(context: Context): Int | |
} |
This file contains hidden or 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
class TopToBottomGradientDrawable(startColor: Int, endColor: Int, width: Int, height: Int) : GradientDrawable(Orientation.TOP_BOTTOM, arrayOf(startColor, endColor).toIntArray()) { | |
init { | |
shape = RECTANGLE | |
bounds = Rect(0, 0, width, height) | |
} | |
} |
This file contains hidden or 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
private Class<?> resolveClass(Type type) { | |
Class<?> clazz; | |
try { | |
clazz = (Class<?>) type; | |
} catch (ClassCastException e) { | |
Type wildcardType = ((WildcardType) type).getUpperBounds()[0]; | |
clazz = (Class<?>) wildcardType; | |
} | |
return clazz; | |
} |
This file contains hidden or 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
fun variableNullability(variable: PsiVariable): Nullability = Nullability.Nullable | |
fun methodNullability(method: PsiMethod): Nullability = Nullability.Nullable |
This file contains hidden or 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Camera : MonoBehaviour { | |
public Transform target; | |
void Start () { | |
target = GameObject.FindWithTag("Player").transform; | |
} |
This file contains hidden or 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
// Notify scroll | |
class ObservableScrollView : ScrollView { | |
interface OnScrollChangeListener { | |
fun OnScrollChangeListener(scrollView: ObservableScrollView, x: Int, y: Int, oldX: Int, oldY: Int) | |
} | |
var onScrollChangeListener: OnScrollChangeListener? = null | |
constructor(context: Context) : this(context, null) | |
constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0) | |
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : super(context, attrs, defStyleAttr) |
This file contains hidden or 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 | |
# coding:utf-8 | |
import numpy as np | |
import chainer.links as L | |
from chainer import functions as F | |
from chainer import Variable, optimizers, Chain | |
class Model(Chain): | |
def __init__(self): |
This file contains hidden or 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 | |
# coding:utf-8 | |
import numpy as np | |
import chainer.links as L | |
from chainer import functions as F | |
from chainer import Variable, optimizers, Chain | |
class Model(Chain): | |
def __init__(self): |
This file contains hidden or 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 | |
# coding:utf-8 | |
import numpy as np | |
import chainer.links as L | |
from chainer import functions as F | |
from chainer import Variable, optimizers, Chain | |
class Model(Chain): | |
def __init__(self): |
NewerOlder