cd ~/projects/myproject
git init
git add .
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
using System; | |
using System.DateTime; | |
using System.Text.RegularExpressions; | |
public class DateConverter | |
{ | |
public static DateTime ConvertStringToDate(string stringDate) | |
{ | |
// The regular expression to match a date string with month in word. | |
string regex = @"^\d{4}-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-\d{1,2}$"; |
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
#!/bin/bash | |
echo "Enter a number:" | |
read num | |
fact=1 | |
for((i=1;i<=num;i++)) | |
do | |
fact=$((fact*i)) |
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
#!/bin/bash | |
echo "Enter a number:" | |
read number | |
factorial=1 | |
counter=$number | |
while [ $counter -gt 0 ] | |
do |
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 checkType(arr, n): | |
# If the first two and the last two elements | |
# of the array are in increasing order | |
if (arr[0] <= arr[1] and arr[n-2] <= arr[n-1]): | |
print("Increasing"); | |
elif (arr[0] >= arr[1] and arr[n-2] >= arr[n-1]): | |
print("Decreasing"); | |
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
List<KeyValuePair<string, decimal>> sumList = new List<KeyValuePair<string, decimal>>(); | |
for(int i = 0; i < rowCount; i++) | |
{ | |
description = Context.Field("description").Items[i].Text; | |
amount = Context.Field("amount").Items[i].Text; | |
sumList.Add(new KeyValuePair<string, decimal>(description, amount)); | |
} |
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 pyart(n): | |
mylist=[] | |
for i in range(1,n+1): | |
mylist.append("* "*i) | |
print("\n".join(mylist)) | |
pyart(5) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder