Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kangli-bionic
kangli-bionic / des.java
Created December 15, 2021 00:05 — forked from yuvi-13/des.java
DES algorithm
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
public class des
{
void main() {
// Below you have an integer of 123456
int costInPence = 1234563252542;
// This is the total cost of a product in pence.
// Your challenge is to create a function to convert this integer to pounds.
// The number should end up looking like this: £1,234.56
// Notice there are commas to separate the thousands, a decimal place and a currency symbol.
@kangli-bionic
kangli-bionic / main.dart
Created December 15, 2021 00:05 — forked from jonjo156/main.dart
Tech test question (pence to currency)
void main() {
// Below you have an integer of 123456
int costInPence = 123456;
// This is the total cost of a product in pence.
// Your challenge is to create a function to convert this integer to pounds.
@kangli-bionic
kangli-bionic / thing.js
Created December 15, 2021 00:05 — forked from RoootTheFox/thing.js
vanilla discord snow fall (for copy pasting into devtools, https://cople.github.io/Snowfall.js/)
// load style
var tmp_head = document.getElementsByTagName('head')[0];
var tmp_style = document.createElement('style');
tmp_style.innerHTML = '.snowflake { \
position: absolute; \
color: #fff; \
line-height: 1; \
pointer-events: none; \
-webkit-user-select: none; \
-moz-user-select: none; \
@kangli-bionic
kangli-bionic / sha.java
Created December 15, 2021 00:05 — forked from yuvi-13/sha.java
sha algorithm
import java.security.*;
public class sha
{
public static void main (String[]a)
{
try
{
MessageDigest md = MessageDigest.getInstance ("SHA1");
String input = "sjce";
md.update (input.getBytes());
@kangli-bionic
kangli-bionic / cuse_tract_analysis
Created December 9, 2021 21:47 — forked from haleykorc/cuse_tract_analysis
mygis environment
from arcgis.gis import GIS
from arcgis.mapping import WebMap
from arcgis.features import FeatureLayer
from IPython.display import display, HTML
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets
gis = GIS()
#Creating list of disidx using temp map (temp map is arbitruary, canopy map contains disparity indexes too)
size_t val = 0;
// val expression is l-value
val = 1;
size_t fn() { // ... }
// Result of fn call expr is an r-value
fn();
@kangli-bionic
kangli-bionic / DA0101EN-Review-Introduction.ipynb
Created November 29, 2021 18:36 — forked from jhylin/DA0101EN-Review-Introduction.ipynb
Data Analysis with Python - Introduction Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import { useEffect, useState } from 'react';
import { Flex, Select, Box, Text, Input, Spinner, Icon, Button } from '@chakra-ui/react';
import { useRouter } from 'next/router';
import { MdCancel } from 'react-icons/md';
import Image from 'next/image';
import { filterData, getFilterValues } from '../utils/filterData';
import { baseUrl, fetchApi } from '../utils/fetchApi';
import noresult from '../assets/images/noresult.svg';