This file contains hidden or 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
var obj = {}; | |
obj = { | |
a: function(a) { | |
console.log('Você escolheu A de ' + a); | |
}, | |
b: function(b) { | |
console.log('Você escolheu B de ' + b); | |
}, | |
c: function(c) { |
This file contains hidden or 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
function makeObj($form) { | |
let obj = {}; | |
$form.find("input, select, textarea").each( | |
(key, ele) => { | |
if (ele.name) | |
obj[ele.name] = null; | |
}); | |
return obj; |
This file contains hidden or 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
function findFirstLetter () { | |
let body = document.getElementsByTagName("body")[0]; | |
function childRun(ele) { | |
Object.keys(ele).forEach( | |
k => { | |
let childEle = ele[k]; | |
if (childEle.children.length > 1) | |
console.log(childEle.children); |
This file contains hidden or 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
function mergeArr(arr1, arr2) { | |
for (var i = 0; i < arr1.length; i++) { | |
for (var j = 0; j < arr2.length; j++) { | |
if (i !== j) | |
continue; | |
arr2[j] = arr1[i]; | |
} |
This file contains hidden or 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
/** | |
* Carrega arquivo HTML pelo caminho passado por parâmetro e retorna uma String do conteúdo do mesmo. | |
* Esses arquivos devem estar na pasta <b>resources</b> para que o método possa encontra-los. | |
* <p> | |
* <code>Ex.: FileUtil.getHtmlContent(Teste.class, "/htmlreport/template.html")</code> | |
* | |
* @param actualClass Clase atual | |
* @param filePath Caminho do arquivo HTML | |
* @return Conteúdo do arquivo em String | |
*/ |
This file contains hidden or 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
// Logo do SVG | |
.simbolo-talentrh-loading { | |
position: relative; | |
width: 150px; | |
max-width: 90%; | |
} | |
.simbolo-talentrh-loading svg { | |
padding: 16px 11px; | |
} | |
.simbolo-talentrh-loading .cls-1 { |
This file contains hidden or 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
// ----------------- | |
// Colors | |
// ----------------- | |
@loader-white: #FFFFFF; | |
@loader-black: #333333; | |
@loader-red: #EA4335; | |
@loader-green: #34A853; | |
@loader-blue: #409AFE; | |
@loader-yellow: #FBBC05; | |
@loader-purple: #9C27B0; |
This file contains hidden or 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
private void setParentId(T parentEntity, List<T> listEntity) { | |
try { | |
Long parentId = null; | |
for (Field field : parentEntity.getClass().getDeclaredFields()) { | |
if (field.getDeclaredAnnotation(SequenceId.class) == null) { | |
continue; | |
} | |
PropertyDescriptor pd = BeanUtils.getPropertyDescriptor(parentEntity.getClass(), field.getName()); |
This file contains hidden or 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
// Just puting the table element on a variable | |
// to not search for the element every time; | |
let $dataTable = $('#table'); | |
// Get the actual order; | |
$dataTable.DataTable().order(); | |
// Insert new order; | |
$dataTable.DataTable().order(/* params... */); |
OlderNewer