Skip to content

Instantly share code, notes, and snippets.

View demarchenac's full-sized avatar
🎯
Focusing

Cristhyan D. Marchena demarchenac

🎯
Focusing
  • Barranquilla, Colombia.
View GitHub Profile
@victornpb
victornpb / occurrences.js
Last active June 7, 2023 14:37
Function count the occurrences of substring in a string
/** Function that count occurrences of a substring in a string;
* @param {String} string The string
* @param {String} subString The sub string to search for
* @param {Boolean} [allowOverlapping] Optional. (Default:false)
*
* @author Vitim.us https://gist.github.com/victornpb/7736865/edit
* @see Unit Test https://jsfiddle.net/Victornpb/5axuh96u/
* @see http://stackoverflow.com/questions/4009756/how-to-count-string-occurrence-in-string/7924240#7924240
*/
function occurrences(string, subString, allowOverlapping) {
@brandonjp
brandonjp / findOverflowParents.js
Last active October 23, 2024 16:25
find overflow:hidden ancestors
// when you're trying to use `position:sticky` on an element
// you'll have trouble if any parent/ancestor element has
// overflow set to anything other than "visible" (such as: auto,hidden,overlay,scroll)
// & turns out if a parent is `display:flex` it might need some love
// (to remedy this you can set the `align-self` of your sticky element)
// see here for how the display & align-self properties affect: http://bit.ly/2ZaRu4o
// so, to find those troublesome parents...
// copy & paste this into Chrome Inspector/Dev Tools console
// (and be sure to change the #stickyElement below, if needed)
@demarchenac
demarchenac / Proy_Final_data.csv
Created December 1, 2021 04:00
Dataset for final project of the Machine Learning subject, due to 2021-12-02. Group formed by: Eduardo Angulo & Cristhyan De Marchena.
We can't make this file beautiful and searchable because it's too large.
,credit.policy,purpose,int.rate,installment,log.annual.inc,dti,fico,days.with.cr.line,revol.bal,revol.util,inq.last.6mths,delinq.2yrs,pub.rec,not.fully.paid
1765,1,credit_card,0.1505,277.53,11.28978191,12.07,667,3509.041667,9229,93.2,1,0,0,0
3891,1,debt_consolidation,0.1253,133.87,10.59663473,18.39,687,4050.0,7227,70.9,0,0,0,0
4486,1,debt_consolidation,0.1392,682.74,11.35040654,11.55,697,5220.0,17250,78.3,2,1,0,0
9071,0,all_other,0.0768,405.48,10.73630972,23.64,712,3240.0,58996,55.7,3,0,0,1
2380,1,major_purchase,0.1537,174.24,10.46310334,11.67,672,2070.041667,8105,87.2,1,0,0,0
5234,1,home_improvement,0.1183,828.35,12.37073927,2.51,802,5190.0,2069,4.0,1,0,0,1
1267,1,credit_card,0.1033,226.96,11.13616442,8.62,722,2789.958333,22595,61.9,1,0,0,0
6171,1,credit_card,0.1322,338.01,10.81977828,7.44,692,2070.0,7408,31.9,2,0,0,0
8950,0,all_other,0.1347,54.28,12.61153775,6.72,677,7680.0,27197,46.6,4,1,0,0
@demarchenac
demarchenac / Discrete Math T1_4.js
Last active February 16, 2022 20:17
Discrete Mathematics, Homework #01, Exercise #04.
// Code developed by:
// - Eduardo David Angulo Madrid.
// - Cristhyan David De Marchena Rueda.
// 2022-02-14.
/**
* Discrete Mathematics, Homework #01, Exercise #04. This methods verifies wether an
* Vertice A (Selected vertice) can be transformed to the vertice B (Target vertice)
* According to the following rules:
* - A letter from the vertice A can be changed and the result is the vertice B.
@demarchenac
demarchenac / settings.jsonc
Last active July 26, 2023 09:02
Basic Vistual Studio Code Settings
{
// theme
"workbench.colorTheme": "Night Owl",
"workbench.iconTheme": "material-icon-theme",
// font config
"editor.fontFamily": "FiraCode NFM",
"editor.fontLigatures": true,
// Editor settings