This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ums.pau.resources; | |
import java.security.SecureRandom; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class GenPass { | |
private String str; | |
private StringBuilder sb; | |
private List<Integer> l; | |
public GenPass() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ums.pau.resources; | |
import com.ums.pau.SceneSwitcher; | |
import javafx.application.Platform; | |
import javafx.fxml.Initializable; | |
import javafx.scene.control.Label; | |
import java.io.IOException; | |
import java.net.URL; | |
import java.util.ResourceBundle; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
class LinkedList { | |
static class Node { | |
String data; | |
int index; | |
Node next; | |
} | |
private static Node head = null; | |
public static void main(String[] args) { | |
int command = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Version=1.0 | |
Name=AVD | |
Comment=AVD | |
Exec=bash -c "cd ~/Android/Sdk/emulator/ && DEVICES=$(./emulator -list-avds) && ./emulator -avd ${DEVICES[0]}" | |
Icon=/home/$USER/Android/Sdk/platforms/android-28/templates/ic_launcher_xhdpi.png | |
Terminal=false | |
Type=Application | |
Categories=Utility;Application; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
char *str = "ED.GDAD.DLEB.COCC.CV.FS.HQ." | |
"JN.MP.Go.Cr.Cq.Cp.Fk.Jf.J`.I`.H`ID." | |
"J^HE.K^FG.N[ABCG.L`CG.MTBT.MUCS.NTD" | |
"BCBAJ.NUBBHI.OTMI.OROI.OGDCSI.PE[I." | |
"RC[I.rBDB.rB.sB.tB"; | |
int c, i, j; | |
for(i = 0, j = 0; str[i] != '\0'; i++, j++) { | |
c = str[i]-64; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct Node { | |
int data; | |
struct Node *next; | |
}; | |
typedef struct Node *NodePtr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
#######---TEST DATA for QUICK CHECKING---####### | |
# processes = 5 | |
# resources = 3 | |
# allocated = [[0, 1, 0 ],[ 2, 0, 0 ],[3, 0, 2 ],[2, 1, 1] ,[ 0, 0, 2]] | |
# max_demand = [[7, 5, 3 ],[3, 2, 2 ],[ 9, 0, 2 ],[2, 2, 2],[4, 3, 3]] | |
# available = [3, 3, 2] | |
processes = int(input('Number of processes: ')) | |
resources = int(input('Number of resources: ')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# capacity = 3 | |
# pages = [1, 2, 3, 2, 1, 5, 2, 1, 6, 2, 5, 6, 3, 1, 3, 6, 1, 2, 4, 3] | |
capacity = int(input("Capacity: ")) | |
pages = [int(x) for x in input('Page References (separated by space): ').split(' ')] | |
current_pages = [] | |
page_indices = [] | |
page_faults = 0 | |
page_hits = 0 | |
for page in pages: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from queue import Queue | |
# capacity = 3 | |
# pages = [1, 2, 3, 2, 1, 5, 2, 1, 6, 2, 5, 6, 3, 1, 3, 6, 1, 2, 4, 3] | |
capacity = int(input("Capacity: ")) | |
pages = [int(x) for x in input('Page References (separated by space): ').split(' ')] | |
current_pages = set() | |
page_indices = Queue() | |
page_faults = 0 | |
page_hits = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle | |
pen = turtle.Turtle() | |
pen.ht() | |
pen.speed(0) | |
pen.penup() | |
generator = "ED.GDAD.DLEB.COCC.CV.FS.HQ.JN.MP.Go.Cr.Cq.Cp.Fk.Jf.J`.I`.H`ID.J^HE.K^FG.N[" \ | |
"ABCG.L`CG.MTBT.MUCS.NTDBCBAJ.NUBBHI.OTMI.OROI.OGDCSI.PE[I.RC[I.rBDB.rB.sB.tB " | |
colors = ["#239B56", "#28B463", "#2ECC71", "#58D68D", "#82E0AA", | |
"#F1948A", "#EC7063", "#E74C3C", "#CB4335", "#E74C3C", "#EC7063", "#F1948A", | |
"#82E0AA", "#58D68D", "#2ECC71", "#28B463"] |
OlderNewer