Skip to content

Instantly share code, notes, and snippets.

View Shuashuaa's full-sized avatar

Joshua Tania Shuashuaa

  • eCloudvalley Philippines
  • The Philippines
  • 09:19 (UTC +08:00)
View GitHub Profile
@Shuashuaa
Shuashuaa / FetchJSONDataController.php
Last active February 5, 2025 05:54
Fetching of JSON Data with Laravel
<?php
// What if, We want to get the specific data we need from a Json in your DB?
// The code below is my initial approach to it
DB::connection('your_db')
->table('your_table')
->select('gravity', 'bundle_date', 'DepartmentCode', 'SectionCode', 'TeamCode', 'xmlcad')
->where('DepartmentCode', '147')
->where('TeamCode', '00976')
@Shuashuaa
Shuashuaa / twoSum.js
Last active October 26, 2024 07:14
twoSum.js
// ✨ Stable ✨
function findProductPairs(prices, targetCost, maxItems) {
const priceMap = new Map();
const pairs = [];
function backtrack(currentSum, currentPair, startIndex) {
if (currentPair.length === maxItems && currentSum === targetCost) {
pairs.push([...currentPair]);
return;
}
@Shuashuaa
Shuashuaa / minari.gif
Last active October 10, 2024 10:59
minaminamina
minari.gif