Skip to content

Instantly share code, notes, and snippets.

View dariogabriel113's full-sized avatar
:shipit:
...

Dario Gabriel dariogabriel113

:shipit:
...
  • FCPC - Fundação Cearense de Pesquisa e Cultura
  • Fortaleza - Brazil
View GitHub Profile
@rxaviers
rxaviers / gist:7360908
Last active April 29, 2024 19:31
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
anonymous
anonymous / activity_main.xml
Created April 8, 2015 22:18
RelativeLayout XML for Udacity quiz question
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<TextView
android:text="I’m in this corner"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
@Gaafar
Gaafar / syntax-promise.js
Last active June 18, 2019 16:26
syntax-promise
const makeRequest = () =>
getJSON()
.then(data => {
console.log(data)
return "done"
})
makeRequest()
@Gaafar
Gaafar / syntax-async.js
Last active June 18, 2019 16:27
syntax-async
const makeRequest = async () => {
console.log(await getJSON())
return "done"
}
makeRequest()
const makeRequest = () => {
try {
getJSON()
.then(result => {
// this parse may fail
const data = JSON.parse(result)
console.log(data)
})
// uncomment this block to handle asynchronous errors
// .catch((err) => {
const makeRequest = async () => {
try {
// this parse may fail
const data = JSON.parse(await getJSON())
console.log(data)
} catch (err) {
console.log(err)
}
}
const makeRequest = () => {
return getJSON()
.then(data => {
if (data.needsAnotherRequest) {
return makeAnotherRequest(data)
.then(moreData => {
console.log(moreData)
return moreData
})
} else {
@dariogabriel113
dariogabriel113 / Program.java
Last active June 30, 2018 03:35
Hello World Java
public class Program{
public static void main(String[] args){
System.out.println("Hello world");
}
}
public class TestConversion{
public static void main(String[] args){
float floatingPoint = 3.14f;
double salary = 1270.50;
int value = (int) salary;
System.out.println(value);
public class TestFloatingPoint{
public static void main(String[] args){
double salary = 1250.70;
System.out.println("My salary is " + salary);
double division = 5.0 / 2;
System.out.println("division: " + division);
}
}