Skip to content

Instantly share code, notes, and snippets.

View luiseduardogfranca's full-sized avatar
🎯
Focusing

Luís Eduardo luiseduardogfranca

🎯
Focusing
  • Alagoas, Brasil
View GitHub Profile
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta name="name" content="content">
<meta charset="utf-8">
<title>Codificando</title>
<link rel="icon" href="image/icon.png">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="css/css-codificando.css">
html, body{
height: 100%;
width: 100%;
}
.bar{
color: #fcfcfb;
background-color: #004959;
box-shadow: black 4px 1px 5px;
height: 100%;
<Button
android:layout_gravity="bottom"
android:layout_width="0dp"
android:layout_weight="12"
android:layout_height="wrap_content"
android:background="@drawable/layout_button"
android:fontFamily="Humnst777 BT"
android:textColor="#ffffff"
android:text="ENTRAR"
android:id="@+id/button" />
@luiseduardogfranca
luiseduardogfranca / pom.xml
Created April 28, 2017 03:05
Archive pom.xml with dependencies of Jersey 1.x
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>groupId</groupId>
<artifactId>untitled2</artifactId>
<version>1.0-SNAPSHOT</version>
@luiseduardogfranca
luiseduardogfranca / web.xml
Created April 28, 2017 03:07
File web.xml with configuration and mapping of Servlet Jersey
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<display-name>jersey-tutorial</display-name>
<servlet>
<servlet-name>Jersey REST Service</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
@luiseduardogfranca
luiseduardogfranca / MainActivity.java
Created April 29, 2017 02:43
Using Socket in Android
package com.example.luis.usingsocket;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import org.w3c.dom.Text;
@luiseduardogfranca
luiseduardogfranca / activity_main.xml
Created April 29, 2017 02:44
XML for application Android witch Socket
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.example.luis.usingsocket.MainActivity">
@luiseduardogfranca
luiseduardogfranca / get.java
Created May 18, 2017 13:53
Response with Retrofit
try {
Response response = c.execute();
if (response.isSuccessful()) {
Login.ID_LOGIN = (String) response.body());
} else {
throw new LoginException(response.errorBody().string());
}
}catch (IOException io){
throw new LoginException(io.getMessage());
}
#include <stdio.h>
int main(){
int value1, value2;
scanf("%d %d", &value1, &value2);
printf("Sum: %d\n", value1 + value2);
}
def extremeValues(mask):
element_x = []
element_y = []
for coord in mask:
element_x.append(coord[0])
element_y.append(coord[1])
# (minX, maxX, minY, maxY)
return (min(element_x), max(element_x), min(element_y), max(element_y))