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
container.Register(Classes.FromAssemblyContaining(typeof(IRepository)) | |
.BasedOn<IRepository>() | |
.If(Component.IsInSameNamespaceAs<BaseEntityRepository<BaseEntity>>()) | |
.If(t => t.Name.EndsWith("Repository") && (t.Name.StartsWith("Foo") || t.Name.StartsWith("Bar"))) | |
.Configure(c => c.DependsOn(ServiceOverride.ForKey("Session").Eq("db.session.second")) | |
.DependsOn(ServiceOverride.ForKey("SessionFactory").Eq("db.sessionfactory.second"))).LifestylePerThread()); |
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
(************************************************************************** | |
* File : inl2.sml | |
* Project : Inlämningsuppgift 2 | |
* Author : Christian Axelsson | |
* Created : 2005-12-27 | |
* Description : Webchat | |
**************************************************************************) | |
(* | |
load "TextIO"; load "Random"; load "Time"; load "Mosmlcgi"; load "Mosmlcookie"; | |
*) |
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
function easterDay($y) { | |
// Se http://aa.usno.navy.mil/faq/docs/easter.html | |
$c = floor($y / 100); | |
$n = $y - 19 * floor( $y / 19 ); | |
$k = floor(( $c - 17 ) / 25); | |
$i = $c - floor($c / 4) - floor(( $c - $k ) / 3) + 19 * $n + 15; | |
$i = $i - 30 * floor( $i / 30 ); | |
$i = $i - floor( $i / 28 ) * ( 1 - floor( $i / 28 ) * floor( 29 / ( $i + 1 ) ) | |
* floor( ( 21 - $n ) / 11 ) ); | |
$j = $y + floor($y / 4) + $i + 2 - $c + floor($c / 4); |
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
/* CSS | |
.tooltip-bubble { | |
background-color: #fffff7; | |
-moz-border-radius: 3px; | |
-webkit-border-radius: 3px; | |
border: 1px solid #7f7f7f; | |
padding: 8px; | |
margin-top: -4px; | |
} | |
.tooltip-bubble .tooltip-arrow { |
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
namespace CampaignTracker.Data.Data { | |
public class CampaignTrackerDataReader : CampaignTrackerDataContext { | |
public CampaignTrackerDataReader() { | |
ObjectTrackingEnabled = false; | |
} | |
public CampaignTrackerDataReader( IDbConnection connection ) : base( connection ) {} | |
public CampaignTrackerDataReader( bool log ) { |
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
root@eof:/root# cat do_nat.sh | |
#!/bin/sh | |
EXTIF="eth1" | |
#route add -net 192.168.1.0/24 dev eth1 | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
iptables -F; iptables -t nat -F; iptables -t mangle -F | |
iptables -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE |
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 <string> | |
#include <iostream> | |
int main(int argc, char* argv[]) | |
{ | |
std::string fileName("filename.obj"); | |
if(fileName.substr(fileName.rfind(".") + 1) == "obj") | |
std::cout << "Yup"; | |
else | |
std::cout << "Nope"; |
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
/// <summary> | |
/// Escapes an LDAP filter value. | |
/// </summary> | |
/// <param name="filter">Unescaped filter value.</param> | |
/// <param name="allowWildcard">If true, * will not be escaped.</param> | |
/// <returns><paramref name="filter"/> with all occurances of (, ), \, NUL and / (and eventually *) replaced.</returns> | |
/// <remarks>See http://msdn.microsoft.com/en-us/library/windows/desktop/aa746475(v=vs.85).aspx</remarks> | |
public static string EscapeFilterString( string filter, bool allowWildcard = false ) { | |
string result = string.Empty; | |
foreach( char c in filter ) { |
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
[SystemSettings] | |
StaticDecals=False | |
DynamicDecals=False | |
DynamicShadows=True | |
LightEnvironmentShadows=True | |
CompositeDynamicLights=True | |
DirectionalLightmaps=False | |
MotionBlur=False | |
DepthOfField=False | |
AmbientOcclusion=False |
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
SettingValue[] values = Item.GetSettingsValues(); | |
XElement xml = new XElement( "settings", | |
new XAttribute( "id", Item.Id ), | |
from v in values | |
select new XElement( "setting", | |
new XAttribute( "name", v.Name ), | |
new XAttribute( "value", v.Value ), | |
new XAttribute( "args", v.Args ?? string.Empty ), | |
new XAttribute( "sortorder", v.SortOrder ) ) ); |