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 main() | |
{ | |
int con; | |
con = 0; | |
int account_balance = 1100; | |
while(con == 0){ | |
printf("Welcome to the Store App V1.0\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
$targetdirectory = "" | |
$sourcedirectory = "" | |
if (!(Test-Path -path $targetdirectory)) {New-Item $targetdirectory -Type Directory} | |
Get-ChildItem -Path $sourcedirectory | % { | |
Copy-Item -Path $_.fullname -Destination $targetdirectory | |
} |
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 Main { | |
public static void main(String[] args) { | |
int a = 300 * 4; | |
int b = 300 << 2; | |
System.out.println(a); | |
System.out.println(b); | |
} | |
} |
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 Main { | |
public static void main(String[] args) { | |
StringBuilder str = new StringBuilder("Hello"); | |
str.append(" World"); | |
System.out.println(str.toString()); | |
} | |
} |
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 Main { | |
public static void main(String[] args) { | |
myClass cl = new myClass(); | |
System.out.println(cl); | |
} | |
} | |
class myClass { | |
@Override | |
public String toString(){ |
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 time | |
cur_time = time.time() | |
print(time.asctime(time.localtime())) |
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 time | |
cur_time = time.time() | |
print(cur_time) |
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 json | |
class Button(object): | |
callback_data = "" | |
text = "" | |
def __init__(self, callback_data, text): | |
self.callback_data = callback_data | |
self.text = text | |
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 textwrap | |
# standard Paragraph | |
# width = 12 | |
para = "Hello World!" | |
print("Normal Paragraph:\n" + para + "\n") | |
# shorten |
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 textwrap | |
# standard Paragraph | |
para = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." | |
print("Normal Paragraph:\n" + para + "\n") | |
# Maximum length | |
print("textwrap.fill() Paragraph:\n" + textwrap.fill(para, width=50)) |
NewerOlder