Skip to content

Instantly share code, notes, and snippets.

View oceangravity's full-sized avatar
💭
WebsKit momentum

Juan Carlos Galindo Navarro oceangravity

💭
WebsKit momentum
View GitHub Profile
@oceangravity
oceangravity / data.json
Created October 31, 2023 12:16
JSON Structure
{
"Layout": {
"defaultSubCategory": "Basic",
"subcategories": {
"Basic": {
"Columns": {
"variants": {
"default": {
"1 ~ 6": {
"columns-1": {
<template>
<div>Data: {{ data }}</div>
<button @mousedown="method"></button>
</template>
<script lang="ts" setup>
import { computed, ref } from 'vue'
const test = ref(100)
const data = computed(() => test.value + 200)
@oceangravity
oceangravity / BitmapHoles.php
Created December 2, 2021 11:56
Bitmap Holes
<?php
/**
* Bitmap Holes
* Have the function BitmapHoles(strArr) take the array of strings stored in strArr,
* which will be a 2D matrix of 0 and 1's, and determine how many holes, or contiguous regions of 0's,
* exist in the matrix. A contiguous region is one where there is a connected group of 0's going
* in one or more of four directions: up, down, left, or right.
*
* For example: if strArr is ["10111", "10101", "11101", "11111"], then this looks like the following matrix:
*
@oceangravity
oceangravity / LongestIncreasingSequence.php
Created December 2, 2021 11:49
Have the function LongestIncreasingSequence(arr) take the array of positive integers stored in arr and return the length of the longest increasing subsequence (LIS). A LIS is a subset of the original list where the numbers are in sorted order, from lowest to highest, and are in increasing order. The sequence does not need to be contiguous or uni…
<?php
/**
* Longest Increasing Sequence
* Have the function LongestIncreasingSequence(arr) take the array of positive integers stored in arr
* and return the length of the longest increasing subsequence (LIS). A LIS is a subset of the original list
* where the numbers are in sorted order, from lowest to highest, and are in increasing order.
* The sequence does not need to be contiguous or unique, and there can be several different subsequences.
* For example: if arr is [4, 3, 5, 1, 6] then a possible LIS is [3, 5, 6], and another is [1, 6].
* For this input, your program should return 3 because that is the length of the longest increasing subsequence.
*
<template>
<keep-alive>
<transition-group tag="div" name="tool" appear>
<div class="wk-tool-inner" v-for="number in [active]" v-bind:key="number">
<component :is="componentInstance"/>
</div>
</transition-group>
</keep-alive>
</template>
<script>
@oceangravity
oceangravity / service-worker.js
Created November 27, 2018 11:17
WebsKit - E05
var CACHE_VERSION = 'WebsKit-CACHE-E05'
var CACHE_FILES = [
'./'
]
self.addEventListener('install', function (event) {
event.waitUntil(
caches.open(CACHE_VERSION)
.then(function (cache) {
<biblioteca>
<libro>
<nombre>Mastering Gradle</nombre>
<autor>Mainak Mitra</autor>
</libro>
<libro>
<nombre>Mastering GitHub</nombre>
<autor>Mainak Mitra</autor>
</libro>
<libro>
class CoinChange {
constructor(changes) {
this.coins = 0;
this.changes = changes;
this.output = {};
};
getEquivalence(equivalence) {
let output = 0;
if(this.coins / equivalence > 1){
output = (this.coins - (this.coins % equivalence)) / equivalence;
class CoinChange {
constructor(changes) {
this.coins = 0;
this.changes = changes;
this.output = {};
};
getEquivalence(equivalence) {
let output = 0;
if(this.coins / equivalence > 1){
output = (this.coins - (this.coins % equivalence)) / equivalence;
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
function parse(subselector) {