This file contains 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
class MainActivity : ComponentActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContent { | |
MaterialSegmentedButtonTheme { | |
// A surface container using the 'background' color from the theme | |
Surface( | |
modifier = Modifier.fillMaxSize(), | |
color = MaterialTheme.colorScheme.background | |
) { |
This file contains 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
#NoEnv | |
#NoTrayIcon ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
; http://www.daveamenta.com/2011-05/programmatically-or-command-line-change-the-default-sound-playback-device-in-windows-7/ | |
Devices := {} | |
IMMDeviceEnumerator := ComObjCreate("{BCDE0395-E52F-467C-8E3D-C4579291692E}", "{A95664D2-9614-4F35-A746-DE8DB63617E6}") |
This file contains 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
public class ps8 { | |
public static void doooooooor(int num) { | |
int doors[] = new int[num]; | |
for(int i=0; i<doors.length; i++){ | |
doors[i] = 0; | |
} | |
for(int i=1; i<=num; i++){ | |
int temp = num; | |
for (int j=i; temp>=j; temp--){ | |
if(temp % j == 0){ |
This file contains 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 os | |
import sys | |
import pywintypes, win32file, win32con | |
from datetime import datetime | |
from PIL import Image, ExifTags | |
def changeFileCreationTime(fname, newtime): | |
wintime = pywintypes.Time(newtime) | |
winfile = win32file.CreateFile( | |
fname, win32con.GENERIC_WRITE, |
This file contains 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; | |
public class AnotherTest { | |
public static void main(String[] args) { | |
Scanner scanner= new Scanner(System.in); | |
String input = scanner.nextLine(); | |
StringBuilder output = new StringBuilder(); | |
for (int i=0;i<input.length();i++){ | |
char current = input.charAt(i); | |
if ( current == '+' || current == '-' || current == '*' || current == '/' || current == '=' || current == ';'){ |
This file contains 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.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Scanner; | |
public class Test { | |
private static ArrayList<String> operators = new ArrayList<>(); | |
private static ArrayList<String> keywords = new ArrayList<>(); | |
private static ArrayList<String> symbols = new ArrayList<>(); | |
private static ArrayList<String> variables = new ArrayList<>(); |
This file contains 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; | |
public class Main { | |
private static Scanner s = new Scanner(System.in); | |
public static void main(String[] args) { | |
System.out.print("Enter Your String: "); | |
String input = s.nextLine(); | |
if (input.matches("/\\*.+\\*/")) System.out.println("This is a block comment"); |
This file contains 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.ArrayList; | |
import java.util.Collections; | |
import java.util.Scanner; | |
public class Main { | |
// Arraylists for Input grammar, First and Follow | |
private static Scanner s = new Scanner(System.in); | |
private static ArrayList<String> lhs = new ArrayList(); |
This file contains 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> | |
int partition(int arr[], int start, int end){ | |
int pivot = arr[end]; | |
int i=end; | |
int j; | |
int tmp; | |
for (j=end;j<end-1;j++){ | |
if(arr[j]<=pivot){ |
This file contains 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> | |
void print(int array[], int i); | |
int main(){ | |
int i=0; | |
int array[]={1,2,3,4,5,6,7,8,9}; | |
print(array, i); | |
} |
NewerOlder