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 | |
rm -r sortedPalindromes.txt | |
rm -r sortedNotPalindromes.txt | |
cat palindromes.txt | while read line | |
do | |
if [[ $(rev <<< $line) == "$line" ]]; then | |
echo $line >> sortedPalindromes.txt | |
else |
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 "Where woudl you like to search from?" | |
read startDir | |
i=0 | |
n=0 | |
for file in ls -adR -1 *.sh $startDir | |
do | |
firstLine=$(head -n 1 $file) |
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 | |
touch chapter{1..5}.txt; | |
for file in chapter{1..5}.txt | |
do | |
echo "This is some text is $file" >> $file | |
done | |
echo "Filled chapters" |
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 tkinter as tk | |
tk.Tk() | |
print("This should show a new TK window") |
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
extension GitKit { | |
public class func getMyOrganisations() -> Observable<[Organisation]> { | |
guard let organisationsURL = GitKit.currentUser.value?.organizationsUrl else { return [] } | |
return Alamofire.request(.GET, (organisationsURL)) | |
.rx_responseJSON() | |
.map { response, json in | |
guard let array = json as? [[String:AnyObject]] else { return [] } |
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
-- Define the database to use | |
USE ExSQL7 | |
-- Gets all the parts I want and joins them together and links them. | |
SELECT Region.RegionID, Territories.TerritoryID, Region.RegionDescription, Territories.TerritoryDescription FROM Region | |
INNER JOIN Territories | |
ON Territories.RegionID = Region.RegionID | |
ORDER BY RegionDescription, TerritoryDescription |
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
SELECT Customers.CustomerID, Customers.CompanyName, Orders.Freight FROM Customers | |
INNER JOIN Orders | |
ON Customers.CustomerID = Orders.CustomerID | |
WHERE Customers.CustomerID IN | |
(SELECT CustomerID FROM Orders WHERE Freight > 500) |
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
CREATE TABLE mythicalBeasts | |
( | |
Name NVARCHAR(30), | |
Century TinyInt, | |
Details NVARCHAR(255) | |
) |
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
SELECT Orders.OrderID, Orders.CustomerID, Customers.CompanyName, COUNT(Orders.CustomerID) AS 'OrderCount' FROM Orders | |
INNER JOIN Customers | |
ON Customers.CustomerID = Orders.CustomerID | |
GROUP BY Orders.OrderID, Orders.CustomerID, Customers.CompanyName, Customers.CustomerID |
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.Collections; | |
using System.Collections.Generic; | |
using System; | |
using System.IO; | |
using System.Threading; | |
using UnityEngine; | |
using UnityEngine.UI; | |
using UnityEditor; |
OlderNewer