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
imageViewProfile = (ImageView) findViewById(R.id.image_profile); | |
int arcWidth = 15; | |
mAnimatedDrawable = new CircularAnimatedDrawable(imageViewProfile, arcWidth, Color.WHITE); | |
int offset = (imageViewProfile.getLayoutParams().width - imageViewProfile.getLayoutParams().height) / 2; | |
int left = offset; | |
int right = imageViewProfile.getLayoutParams().width - offset; | |
int bottom = imageViewProfile.getLayoutParams().height; |
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
# A simple Dockerfile for a RoR application | |
FROM ruby:2.3.1 | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
RUN mkdir /your-applicatioin | |
WORKDIR /your-application | |
ADD Gemfile /your-application/Gemfile |
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
defmodule Solution do | |
def main() do | |
n = IO.gets("") |> String.strip |> String.to_integer | |
IO.gets("") |> to_list(n) | |
end | |
def read_lines | |
IO.gets("") | |
end |
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 EventFragment { | |
companion object { | |
var fragmentEventsView : FragmentEventsView? = null | |
fun register(fragmentEventsView: FragmentEventsView) { | |
this.fragmentEventsView = fragmentEventsView | |
} | |
fun unRegister() { |
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 TemplateCommand extends OptionParsingCommand { | |
public TemplateCommand(String name, String description, OptionHandler handler) { | |
super(name, description, handler); | |
} | |
@Override | |
public String getUsageHelp() { | |
return "[options] <template>"; | |
} |
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
<dependency> | |
<groupId>org.elasticsearch.client</groupId> | |
<artifactId>elasticsearch-rest-high-level-client</artifactId> | |
<version>6.8.0</version> | |
</dependency> |
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
import org.apache.http.HttpHost; | |
import org.elasticsearch.client.RestClient; | |
import org.elasticsearch.client.RestHighLevelClient; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
@Configuration | |
public class ElasticsearchConfig { |
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
<dependency> | |
<groupId>io.quarkus</groupId> | |
<artifactId>quarkus-jdbc-postgresql</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>io.quarkus</groupId> | |
<artifactId>quarkus-liquibase</artifactId> | |
</dependency> |
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 | |
- db | |
- 2021-09-12-144812-create-table-users.xml | |
changeLog.xml | |
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" standalone="no"?> | |
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> | |
<changeSet id="1" author="nt-cli"> | |
<createTable tableName="users"> | |
<column name="id" autoIncrement="true" type="BIGINT" > | |
<constraints primaryKey="true" nullable="false"/> | |
</column> | |
<column name="name" type="varchar(255)"/> | |
<column name="email" type="varchar(255)"/> | |
</createTable> |