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; | |
public class DV | |
{ | |
// ============================================================== | |
public static void Main() | |
{ | |
try | |
{ | |
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
/* | |
* Binary search | |
* 03 Sep. 2018 | |
*/ | |
#include <iostream> | |
using namespace std; | |
int main() { |
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
#include <iostream> | |
using namespace std; | |
bool DEBUG = false; | |
int main() { | |
int n; | |
cin >> n; | |
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
#include <iostream> | |
using namespace std; | |
void testIt(int a, int b) { | |
if (a != b) cout << "\n=== Bad test === \n Expected: " << a << " \n Result: " << b << " \n"; | |
} | |
void testIt(string a, string b) { | |
if (a != b) cout << "\n=== Bad test === \n Expected: " << a << " \n Result: " << b << " \n"; |
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 io.github.dvegasa.civisz.screens.main; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import com.aurelhubert.ahbottomnavigation.AHBottomNavigation; | |
import com.aurelhubert.ahbottomnavigation.AHBottomNavigationItem; | |
import butterknife.BindView; | |
import butterknife.ButterKnife; |
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 io.github.dvegasa; | |
import org.junit.platform.commons.annotation.Testable; | |
import java.math.BigInteger; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { |
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 com.company; | |
import java.util.Scanner; | |
public class Main { | |
// 20 34 12 94 54 99 11 22 | |
// ^------------^ | |
// |
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
<resources> | |
<!-- Base application theme. --> | |
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> | |
<!-- Customize your theme here. --> | |
<item name="android:background">@color/colorBackground</item> | |
<item name="colorPrimary">@color/colorPrimary</item> | |
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | |
<item name="colorAccent">@color/colorAccent</item> |
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
private fun highlight() { | |
val s = etSearchBar.text | |
adapter.list.forEach { item -> | |
// {1} | |
item.abbr.getSpans(0, item.abbr.length, ForegroundColorSpan::class.java).forEach { | |
item.abbr.removeSpan(it) | |
} | |
// {2} |
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
private val spanHighlight by lazy { | |
ForegroundColorSpan( | |
ResourcesCompat.getColor(resources, R.color.colorAccent, null)) | |
} |
OlderNewer