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 SwiftUI | |
import PlaygroundSupport | |
struct ContentView: View { | |
var body: some View { | |
// Placeholder | |
Text("Hello World") | |
} | |
} |
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 "Basic"; | |
// Cupcake compiler: #import "modules/Basic.jai"; | |
#run main(); main :: () { | |
factorial :: (n : int) -> int { | |
// Iterative method | |
result : int = 1; | |
while (n > 1) { | |
result *= n; |
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 "Basic"; | |
// Cupcake compiler: #import "modules/Basic.jai"; | |
#run main(); main :: () { | |
factorial :: (n : int) -> int { | |
// Recursive method | |
if (n == 1) { | |
return n; | |
} else { | |
return n * factorial(n - 1); |
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
def is_shifted(a, b): | |
shift_list = [] | |
def shift(n, s): | |
tmp = [char for char in s] | |
shift_str = ''.join(tmp[-n:] + tmp[:-n]) | |
return shift_str | |
for i in range(1, len(a)): | |
shift_list.append(shift(i, a)) |
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
package com.matdevtech.multility; | |
// Imports | |
import android.annotation.SuppressLint; | |
import android.content.ClipData; | |
import android.content.ClipboardManager; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.view.LayoutInflater; | |
import android.view.View; |
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
package com.matdevtech.multility; | |
// Imports | |
import android.annotation.SuppressLint; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
import android.graphics.Typeface; | |
import android.os.Bundle; | |
import android.view.LayoutInflater; |
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
sample_string = input() | |
def military_time(twelvehour_str): | |
if "PM" in twelvehour_str: | |
if len(twelvehour_str) == 8: | |
initial_hour = twelvehour_str[:2] | |
new_hour = int(initial_hour) + 12 | |
final24_str = str(new_hour) + twelvehour_str[2:5] | |
else: | |
initial_hour = twelvehour_str[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
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main() { | |
string twelve_hr_str; | |
string initial_hr; | |
int new_hr; | |
string final_24_str; |
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
// Old view in WL: https://www.youtube.com/playlist?list=WL&disable_polymer=true | |
var timer = window.setInterval(function() { | |
var videoDeleteButton = document.querySelector('.pl-video-edit-remove') | |
if (videoDeleteButton) { | |
videoDeleteButton.click() | |
setTimeout(function() { | |
document.querySelector('.yt-uix-load-more').click() | |
}, 5000) | |
} else { | |
window.clearInterval(timer) |
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
# Only requires the function for submission | |
def solution(k): | |
r,y = [],[] | |
m = 1 | |
while m <= k: | |
if m % 2 == 0: | |
r.append(m ** 2) | |
else: | |
y.append(m ** 2) |
OlderNewer