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
| const bubbleSort = arr => { | |
| let didSwap = true | |
| while(didSwap) { | |
| didSwap = false | |
| for(let i = 0; i < arr.length; i++) { | |
| if (arr[i] > arr[i + 1]) { | |
| const tmp = arr[i + 1] | |
| arr[i + 1] = arr[i] | |
| arr[i] = tmp; | |
| didSwap = true |
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
| DO | |
| $do$ | |
| DECLARE n data_patchdata%rowtype; | |
| BEGIN | |
| FOR n IN SELECT * from data_patchdata LOOP | |
| insert into data_patchdata_content | |
| (stateset_id, description, identifier, name, severity, status, type) | |
| VALUES |
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.Linq; | |
| using System.Text.RegularExpressions; | |
| namespace Crux.Core.Types | |
| { | |
| //Hexavigesimal number system A = 1 ... Z = 26, AA = 27 ... | |
| public class Base26 | |
| { |
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
| @RunWith(SpringJUnit4ClassRunner.class) | |
| @ContextConfiguration(classes = DatabaseConfig.class, loader = AnnotationConfigContextLoader.class) | |
| public class RegistrationStatusPersistenceTests | |
| { | |
| @PersistenceContext | |
| private EntityManager entityManager; | |
| @Autowired | |
| private RegistrationStatusRepository registrationStatusRepository; |
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
| ObjectFactory.Initialize(x => | |
| { | |
| x.Scan(scan => | |
| { | |
| scan.TheCallingAssembly(); | |
| scan.WithDefaultConventions(); | |
| scan.ConnectImplementationsToTypesClosing(typeof(AbstractValidator<>)); | |
| }); | |
| }); |
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
| //THE BAD | |
| System.Console.WriteLine(ConfigurationManager.AppSettings["ConfigSettings.SampleSetting1"]); | |
| System.Console.WriteLine(ConfigurationManager.AppSettings["ConfigSettings.SampleSetting2"]); | |
| //THE BETTER | |
| System.Console.WriteLine(settings.SampleSetting1); | |
| System.Console.WriteLine(settings.SampleSetting2); |
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 bool IsIt404NotFound(this Exception ex) | |
| { | |
| var httpException = ex as HttpException; | |
| return httpException != null && httpException.GetHttpCode() == 404; | |
| } |
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; | |
| namespace Is3.App.Web.IS3Portal.Core2.Web.Conventions.Html.Attributes | |
| { | |
| [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)] | |
| public sealed class DisplayNameAttribute : Attribute | |
| { | |
| public DisplayNameAttribute(string displayName) | |
| { | |
| DisplayName = displayName; |