This file contains hidden or 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
# sqlalchemy model with order and order_item tables | |
# sqlite3 database | |
# SQLAlchemy version 1.4 | |
from sqlalchemy import create_engine, Column, Integer, String, ForeignKey | |
from sqlalchemy.orm import relationship, registry | |
mapper_registry = registry() | |
Base = mapper_registry.generate_base() |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# Guess the Number | |
# 1. Ask the user how many times they would like to play | |
# 2. For every game, ask the player to select a random number between 1 - 25 | |
# 3. Inform the player if the number is higher or lower | |
# 4. Build a loop statement that will iterate number of games and numbers picked | |
# 5. When user guess correct, tell them how many guesses it took |
This file contains hidden or 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 a trigger firing when users log on to the server | |
CREATE TRIGGER LogonAudit | |
-- Use ALL SERVER to create a server-level trigger | |
ON ALL SERVER WITH EXECUTE AS 'sa' | |
-- The trigger should fire after a logon | |
AFTER LOGON | |
AS | |
-- Save user details in the audit table | |
INSERT INTO ServerLogonLog (LoginName, LoginDate, SessionID, SourceIPAddress) | |
SELECT ORIGINAL_LOGIN(), GETDATE(), @@SPID, client_net_address |
This file contains hidden or 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
[user] | |
name = <name> | |
email = <name>@gmail.com | |
[color] | |
ui = auto | |
[filter "media"] | |
required = true | |
clean = git media clean %f | |
smudge = git media smudge %f | |
[alias] |
This file contains hidden or 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
/* | |
* thanks to Ayende for idea, http://tekpub.com/shows/mct/1 | |
*/ | |
using System; | |
namespace AbstactFactory; | |
class Program | |
{ | |
public static void Main() |
This file contains hidden or 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
__author__ = "Marcus Holmgren" | |
import sys | |
import clr | |
clr.AddReference('System') | |
from System import (Console, ConsoleColor, Exception) | |
from System.IO import (Directory, File, FileInfo, FileAttributes, SearchOption) | |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<!--This file was autogenerated by the #Develop highlighting editor.--> | |
<!--VibrantInk inspired syntax highligthing for C# in #Develop.--> | |
<SyntaxDefinition name="C#" extensions=".cs"> | |
<Environment> | |
<Custom name="TypeReference" bold="false" italic="false" color="Pink" /> | |
<Custom name="UnknownEntity" bold="false" italic="false" color="Yellow" /> | |
<Default bold="false" italic="false" color="White" bgcolor="Black" /> | |
<Selection bold="false" italic="false" color="White" bgcolor="#6897BB" /> | |
<VRuler bold="false" italic="false" color="Pink" bgcolor="#E3E3E3" /> |