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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>uuid</key> | |
<string>36B0ED25-AAB7-42B2-BB65-4297F6D1D271</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>name</key> |
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
class ImmutableClass(type): | |
def __new__(mcs, class_name, bases, class_dict): | |
instance = type.__new__(mcs, class_name, bases, class_dict) | |
instance.__setattr__ = ImmutableClass._setattr_impl | |
instance.__delattr__ = ImmutableClass._delattr_impl | |
return instance | |
def __call__(cls, *args, **kwargs): | |
obj = type.__call__(cls, *args, **kwargs) | |
obj.__immutable__ = True |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ConsoleApplication10 { | |
public static class CollectionsMerge { | |
private interface IMergeNode<T> { |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var x = new[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; | |
var target = "x"; | |
typeof(string).GetField("m_stringLength", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(target, 16); | |
Console.WriteLine(target); | |
Console.Read(); | |
} |
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
<?xml version="1.0" ?> | |
<permissions> | |
<permission dangerous="true" group="android.permission-group.CALENDAR"> | |
android.permission.READ_CALENDAR | |
</permission> | |
<permission dangerous="true" group="android.permission-group.CALENDAR"> | |
android.permission.WRITE_CALENDAR | |
</permission> | |
<permission dangerous="true" group="android.permission-group.CAMERA"> | |
android.permission.CAMERA |
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 test.com.equalsizelayout; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.os.Build; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.FrameLayout; |
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 RootLayout extends android.widget.FrameLayout { | |
@Nullable | |
private WindowInsetsCompat windowInsets; | |
public RootLayout(Context context) { | |
this(context, null); | |
} | |
public RootLayout(Context context, AttributeSet attrs) { |
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
final class StyledContext extends ContextThemeWrapper { | |
@StyleRes | |
private static int themeRes(@NonNull final Resources.Theme theme, @AttrRes final int themeResId) { | |
final TypedValue outValue = new TypedValue(); | |
theme.resolveAttribute(themeResId, outValue, true); | |
return outValue.resourceId; | |
} | |
public StyledContext(final Context ctx, final @AttrRes int themeResId) { | |
super(ctx, themeRes(ctx.getTheme(), themeResId)); |
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 final class PrintedSpec { | |
private final int mode; | |
private final int size; | |
public PrintedSpec(int spec) { | |
this(MeasureSpec.getMode(spec), MeasureSpec.getSize(spec)); | |
} | |
private PrintedSpec(final int mode, final int size) { |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* <p> | |
* http://www.apache.org/licenses/LICENSE-2.0 |
OlderNewer