Skip to content

Instantly share code, notes, and snippets.

View netodevel's full-sized avatar
🏠
Working from home

José Vieira Neto netodevel

🏠
Working from home
  • São Paulo, Brasil
View GitHub Profile
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;
# 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
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
class EventFragment {
companion object {
var fragmentEventsView : FragmentEventsView? = null
fun register(fragmentEventsView: FragmentEventsView) {
this.fragmentEventsView = fragmentEventsView
}
fun unRegister() {
@netodevel
netodevel / sample.java
Created July 5, 2019 14:28
integration cli error
public class TemplateCommand extends OptionParsingCommand {
public TemplateCommand(String name, String description, OptionHandler handler) {
super(name, description, handler);
}
@Override
public String getUsageHelp() {
return "[options] <template>";
}
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>6.8.0</version>
</dependency>
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 {
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-liquibase</artifactId>
</dependency>
-- resources
- db
- 2021-09-12-144812-create-table-users.xml
changeLog.xml
<?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>