Skip to content

Instantly share code, notes, and snippets.

<DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kate - Digital Worker</title>
<link href="https://cdn.jsdelivr.net/npm/@n8n/chat/dist/style.css" rel="stylesheet" />
<style>
* {
margin: 0;
# Online Python - IDE, Editor, Compiler, Interpreter
from collections import deque
class Vertex:
def __init__(self, name):
self.name = name
self.color = "WHITE" # Initially unvisited
self.d = float('inf') # Distance is infinity initially
self.parent = None # No parent initially
public String longestPalindrome(String s){
int inputStringLen = s.length();
boolean[][] dpArray = new boolean[inputStringLen][inputStringLen];
int maxLen, start = 0,0;
for(int len =1; len <= inputStringLen; len++){
for(int i =0; i <= inputStringLen - len; i++){
int j = i + len -1;
if(len ==1){doArray[i][j] = true;} // a single char is always a palindrome
else if(len ==2){dpArray[i][j] = (s.charAt(i) == s.charAt(j)); }
else { dpArray[i][j] = (s.charAt(i) == s.charAt(j)) && dpArray[i+1][j-1];}
@Cirediallo
Cirediallo / exam2021S1MD.asm
Created June 12, 2021 17:56
Session 1 2021 exam asm
section .data
n dd 37209
power dd 1
tmp dd 0
eop: db 'End of program', 10
len_eop: equ $-eop
section .text
global _start
section .data
s1: db "Bonjour"
len_s1: equ $-s1
s2: db "Bonjour"
len_s2: equ $-s2
end: db "End of program",10
len_end: equ $-end
@Cirediallo
Cirediallo / q1.asm
Last active February 5, 2021 15:02
section .data
charToPrint: db 0
message: db 'ok'
len: equ $-message
section .text
global _start
EcrireNombre:
cmp eax, 9
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <sys/wait.h>
#define INVITE_SYMBOL "MaConsole> "
#define CHAR_MAX_LENGTH 2000
class GildedRose {
private static final int LOWEST_QUALITY_VALUE_POSSIBLE = 0;
Item[] items;
public GildedRose(Item[] items) {
this.items = items;
}
public void updateQuality() {
@Cirediallo
Cirediallo / GildedRose.java
Last active September 27, 2019 18:03
UpdateQuality method refactoring challenge
package com.gildedrose;
class GildedRose{
Item[] items;
private static final String AGED_BRIE = "Aged Brie";
private static final String SULFURAS_HAND_RAGNAROS = "Sulfuras, Hand of Ragnaros";
private static final String BACKSTAGE_PASS_CONCERT = "Backstage passes to a TAFKAL80ETC concert";
private static final int LOWEST_QUALITY_VALUE_POSSIBLE = 0;
{
"quotes":
[
{
"quote": " ==> here the quote <== ",
"author": " ==> here the quote author <==",
"country": " ==> here the country where the quote from if you don't know the author name <=="
},
]