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 React, { useRef, useLayoutEffect } from 'react'; | |
import * as am4core from '@amcharts/amcharts4/core'; | |
import * as am4charts from '@amcharts/amcharts4/charts'; | |
import am4themes_animated from '@amcharts/amcharts4/themes/animated'; | |
import am4lang_pt_BR from '@amcharts/amcharts4/lang/pt_BR'; | |
import * as am4plugins_rangeSelector from '@amcharts/amcharts4/plugins/rangeSelector'; | |
am4core.useTheme(am4themes_animated); | |
am4core.options.autoDispose = true; |
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 Pet | |
attr_reader :color, :breed | |
attr_accessor :name | |
def initialize(color, breed) | |
@color = color | |
@breed = breed | |
@hungry = true | |
end | |
def feed(food) |
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
def fav_foods | |
food_array = [] | |
3.times do | |
puts 'Please, type the name of a food that you really like:' | |
usr_fav_food = gets.chomp | |
food_array.push(usr_fav_food) | |
puts "Your favorite food \"#{usr_fav_food}\" was added to the list!" | |
end | |
puts "Here is your favorite foods list: #{food_array.join(', ')}" |
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
(0..10).each do |n| | |
p "the new number is #{n}" | |
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
def choose_option | |
puts 'Do you like programming? Please, answer with "yes", "no" or "maybe":' | |
usr_option = gets.chomp | |
case usr_option.downcase | |
when 'yes' | |
puts 'Great!' | |
when 'no' | |
puts 'Unbelievable!' | |
when 'maybe' | |
puts 'At least you are giving it a chance!' |
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
if true | |
puts 'true' | |
else | |
puts 'false' | |
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
# A simple greeting method! :) | |
def greeting | |
puts "Please enter your name: "; | |
usrName = gets.chomp; | |
puts "Hello" + " " + usrName; | |
end | |
# Call the method | |
greeting; |
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
let myWorkList = [ | |
{ | |
title: 'First Project', | |
thumb: 'https://placeimg.com/200/200/tech' | |
}, | |
{ | |
title: 'Second Project', | |
thumb: 'https://placeimg.com/200/200/tech' | |
}, | |
{ |
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
$(document).ready(function() { | |
// Tooltip | |
$(function () { | |
$('#item1').tooltip(); | |
}); | |
// Smooth Scroll | |
var $root = $('html, body'); | |
$('.navbar a').click(function () { | |
var href = $.attr(this, 'href'); |
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
/* styles.css | |
* | |
* Main layout for my Portfolio Website. | |
* | |
*/ | |
/* ============ General Settings ============ */ | |
body { | |
position: relative; | |
padding-top: 56px; |
NewerOlder