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
| class Integer | |
| N_BYTES = [42].pack('i').size | |
| N_BITS = N_BYTES * 16 | |
| MAX = 2 ** (N_BITS - 2) - 1 | |
| MIN = -MAX - 1 | |
| end | |
| p Integer::MAX #=> 4611686018427387903 | |
| p Integer::MAX.class #=> Fixnum | |
| p (Integer::MAX + 1).class #=> Bignum |
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
| function (user, context, callback) { | |
| // Check if this is AWS | |
| // If not don't run this rule | |
| if (context.clientID !== "xxx") { | |
| return callback(null, user, context); | |
| } | |
| // Do the AD Group checking | |
| var groupAllowed = 'xxx'; | |
| var userHasAccess = user.groups.some( |
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
| # If for whatever reason this doesn't work, check this file: | |
| Start-Transcript -path "C:\Startup.log" -append | |
| # Generic functions | |
| # Log a message | |
| function Log { | |
| param ( | |
| [Parameter(Mandatory=$True)] | |
| [string]$msg | |
| ) |
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
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: monoserve.sh | |
| # Required-Start: $local_fs $syslog $remote_fs | |
| # Required-Stop: $local_fs $syslog $remote_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Start fastcgi mono server with hosts | |
| ### END INIT INFO |
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
| using System; | |
| using MonoTouch.Dialog; | |
| using MonoTouch.UIKit; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| namespace IQX.OneList.Mobile.iOS | |
| { | |
| public class ItemElementDialogViewController : DialogViewController | |
| { |
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
| public static void RegisterDefaultsFromSettingsBundle () | |
| { | |
| string settingsBundle = NSBundle.MainBundle.PathForResource ("Settings", @"bundle"); | |
| if (settingsBundle == null) { | |
| System.Console.WriteLine (@"Could not find Settings.bundle"); | |
| return; | |
| } | |
| NSString keyString = new NSString (@"Key"); | |
| NSString defaultString = new NSString (@"DefaultValue"); | |
| NSDictionary settings = NSDictionary.FromFile (Path.Combine (settingsBundle, @"Root.plist")); |
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
| [XmlIgnore] | |
| public string IQfoundationUrl { | |
| get { | |
| NSUserDefaults.StandardUserDefaults.Synchronize (); | |
| return NSUserDefaults.StandardUserDefaults.StringForKey ("xIQfoundationUrl"); | |
| } | |
| set { | |
| NSUserDefaults.StandardUserDefaults.SetString (value, "xIQfoundationUrl"); | |
| NSUserDefaults.StandardUserDefaults.Synchronize (); | |
| } |
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
| using System; | |
| using MonoTouch.Dialog; | |
| using net.blazeware.groupsms.core.Sessions; | |
| using net.blazeware.groupsms.Controls; | |
| using Model = net.blazeware.groupsms.core.Model; | |
| using System.Linq; | |
| using net.blazeware.groupsms.UI; | |
| using MonoTouch.UIKit; | |
| using net.blazeware.groupsms.core.Model; | |
| using System.Collections.Generic; |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Drawing; | |
| using System.Linq; | |
| using MonoTouch.Foundation; | |
| using MonoTouch.UIKit; | |
| public class ActionSheetDatePicker { | |
| #region -= declarations =- | |
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
| BeginInvokeOnMainThread(() => { | |
| _descriptionElement.Highlight(); | |
| this.TableView.SetNeedsDisplay(); | |
| }); | |
| public void Highlight() | |
| { | |
| var cell = base.GetCell (GetContainerTableView()); | |
| cell.TextLabel.TextColor = UIColor.Red; | |
| } |