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
import androidx.compose.ui.tooling.preview.PreviewParameterProvider | |
import kotlin.reflect.KClass | |
/** | |
* Creates a [PreviewParameterProvider] based on the classes of two existing providers. | |
* | |
* You can create your own easily with Kotlin delegation: | |
* ``` | |
* class ExampleProvider : PreviewParameterProvider<Pair<Type1, Type2>> | |
* by compositeProvider(Type1ParameterProvider::class, Type2ParameterProvider::class) |
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
#parse("File Header.java") | |
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
import drebin.core.Binder; | |
import drebin.core.BinderEnvironment; | |
import drebin.core.ViewFactory; | |
import drebin.core.ViewHost; | |
public class ${Model}Binder implements Binder<${ViewClass}, ${Model}Binder.${Model}ViewHost, ${Model}, BinderEnvironment> { |
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
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
import android.content.Context; | |
import io.nlopez.smartadapters.views.BindableFrameLayout; | |
#parse("File Header.java") | |
public class ${NAME} extends BindableFrameLayout<${MODEL}> { | |
public ${NAME}(Context context) { |
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
public class Adder { | |
private OnMathOperationPerformed onMathOperationPerformed; | |
private int a, b; | |
public Adder(int a, int b) { | |
this.a = a; | |
this.b = b; | |
} |
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
DoroboWeb::Application.routes.draw do | |
use_doorkeeper | |
devise_for :users | |
# API definitions | |
namespace :api do | |
namespace :v1 do | |
resources :users, only: [ :new, :show, :edit, :destroy ] |
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
# Be sure to restart your server when you modify this file. | |
# | |
# This file contains settings for ActionController::ParamsWrapper which | |
# is enabled by default. | |
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. | |
ActiveSupport.on_load(:action_controller) do | |
include ActionController::ParamsWrapper | |
wrap_parameters format: [:json] if respond_to?(:wrap_parameters) | |
end |
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
- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace { | |
return [protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]; | |
} | |
- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { | |
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) | |
if ([trustedHosts containsObject:challenge.protectionSpace.host]) | |
[challenge.sender useCredential:[NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust] forAuthenticationChallenge:challenge]; | |
[challenge.sender continueWithoutCredentialForAuthenticationChallenge:challenge]; |
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0.7653 0.699234 0.758969 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>SourceCodePro - 13.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0.6431 0.5881 0.637824 1</string> |
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
package com.bikeshare.hacks; | |
import android.app.LocalActivityManager; | |
import android.os.Bundle; | |
import android.support.v4.app.Fragment; | |
@SuppressWarnings("deprecation") | |
public class LocalActivityManagerFragment extends Fragment { | |
private static final String KEY_STATE_BUNDLE = "localActivityManagerState"; |
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
// Obtenemos el factor de incremento para las graficas | |
- (NSInteger)calculateDividerForMaxValue:(NSNumber*)maxValue withBaseIncrement:(NSInteger)increment { | |
NSInteger resultDivide = [maxValue floatValue] / increment; | |
if (resultDivide<=kGraphMaximumHorizontalLines) { | |
if (resultDivide<kGraphMaximumHorizontalLines/2) { | |
return [self calculateDividerForMaxValue:maxValue withBaseIncrement:increment/2]; | |
} else { |
NewerOlder