The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
| ko.bindingHandlers.dialog = { | |
| init: function(element, valueAccessor, allBindingsAccessor) { | |
| var options = ko.utils.unwrapObservable(valueAccessor()) || {}; | |
| options.close = function() { | |
| allBindingsAccessor().dialogVisible(false); | |
| }; | |
| $(element).dialog(options); |
| using System; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Text; | |
| namespace AbpWebSite.Templates | |
| { | |
| /// <summary> | |
| /// Used to rename a solution | |
| /// </summary> |
| import { Modal} from "Modal"; | |
| let modal = new Modal("#mymodal"); | |
| modal.show(); |
| .bootstrap-wrapper {font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} | |
| /*.bootstrap-wrapper body{margin:0}*/ | |
| .bootstrap-wrapper article, .bootstrap-wrapper aside, .bootstrap-wrapper details, .bootstrap-wrapper figcaption, .bootstrap-wrapper figure, .bootstrap-wrapper footer, .bootstrap-wrapper header, .bootstrap-wrapper hgroup, .bootstrap-wrapper main, .bootstrap-wrapper menu, .bootstrap-wrapper nav, .bootstrap-wrapper section, .bootstrap-wrapper summary{display:block} | |
| .bootstrap-wrapper audio, .bootstrap-wrapper canvas, .bootstrap-wrapper progress, .bootstrap-wrapper video{display:inline-block;vertical-align:baseline} | |
| .bootstrap-wrapper audio:not([controls]){display:none;height:0} | |
| .bootstrap-wrapper [hidden], .bootstrap-wrapper template{display:none} | |
| .bootstrap-wrapper a{background-color:transparent} | |
| .bootstrap-wrapper a:active, .bootstrap-wrapper a:hover{outline:0} | |
| .bootstrap-wrapper abbr[title]{border-bottom:1px dotted} | |
| .bootstrap-wrapper b, .bootstrap-wrapper strong{font-weigh |
| html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video | |
| { | |
| margin: 0; | |
| padding: 0; | |
| border: 0; | |
| font: inherit; | |
| font-size: 100%; | |
| vertical-align: baseline; | |
| } |
| /***** GLOBAL *********************/ | |
| html, | |
| body { | |
| -webkit-font-smoothing: antialiased; | |
| -moz-font-smoothing: antialiased; | |
| -moz-osx-font-smoothing: grayscale; | |
| font-smoothing: antialiased; | |
| text-rendering: optimizeLegibility; | |
| font-smooth: always; |
| using System.Collections.Generic; | |
| using System.Reflection; | |
| using System.ArrayExtensions; | |
| namespace System | |
| { | |
| public static class ObjectExtensions | |
| { | |
| private static readonly MethodInfo CloneMethod = typeof(Object).GetMethod("MemberwiseClone", BindingFlags.NonPublic | BindingFlags.Instance); |
| public class SnowflakeIdGenerator | |
| { | |
| public const byte DefaultMachineIdBits = 6; | |
| public const byte DefaultSequenceBits = 12; | |
| private readonly long _machineId = 0; | |
| private readonly byte _machineIdBits = 0; | |
| private readonly byte _sequenceBits = 0; | |
| private readonly long _maxSequence = 0; | |
| private readonly Stopwatch _stopwatch = Stopwatch.StartNew(); | |
| private readonly object _lockObject = new object(); |
| try | |
| { | |
| throw new Exception("test"); | |
| } | |
| catch (Exception ex) | |
| { | |
| Assert.Equal("test", ex.Message); | |
| } |