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
<?php | |
// author: Thiago Mattos | |
// original no site: http://www.tiagomatos.com/blog/dia-da-semana-mes-e-ano-em-portugues-utilizando-php | |
$data = date('D'); | |
$mes = date('M'); | |
$dia = date('d'); | |
$ano = date('Y'); | |
$semana = array( |
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
.panel-heading h3 { | |
white-space: nowrap; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
line-height: normal; | |
width: 75%; | |
padding-top: 8px; | |
} |
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
git reset --hard HEAD | |
git clean -f -d | |
git pull |
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"?> | |
<RelativeLayout 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:id="@+id/activity_main" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="com.example.felipegenuino.myowncard.MainActivity" | |
> |
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
// Problema: Sobreposição de imagens | |
// Causa: A altura (height) dos elementos é calculado antes de terminar o carregamento do site | |
// Solução 1: Inicializar o Isotope após todas as imagens terem sido carregadas. Para isso vai ser preciso usar o ImagesLoaded (Este plugin detecta quando as imagens foram carregadas). | |
// fonte: https://www.linhadecomando.com/jquery/resolvido-isotope-causando-sobreposicao-de-imagens | |
<script src="js/isotope.js" type="text/javascript"></script> | |
<script src="js/imagesloaded.pkgd.min.js" type="text/javascript"></script> | |
var $container = $('.$container').imagesLoaded( function() { | |
$container.isotope({ |
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
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@android:color/darker_gray"> | |
<ImageView | |
android:src="@drawable/mountains" | |
android:layout_height="wrap_content" |
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
$(".mdl-textfield__input").blur(function (){ | |
if( !this.value ){ | |
$(this).prop('required', true); | |
$(this).parent().addClass('is-invalid'); | |
} | |
}); | |
$(".mdl-button[type='submit']").click(function (event){ | |
$(this).siblings(".mdl-textfield").addClass('is-invalid'); | |
$(this).siblings(".mdl-textfield").children(".mdl-textfield__input").prop('required', 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
.embed-responsive { | |
position: relative; | |
display: block; | |
height: 0; | |
padding: 0; | |
overflow: hidden; | |
} | |
.embed-responsive .embed-responsive-item, | |
.embed-responsive iframe, | |
.embed-responsive embed, |
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
$("iframe").wrap("<div class='embed-responsive embed-responsive-16by9'></div>"); |