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
| package main; | |
| import java.io.FileInputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.sql.Connection; | |
| import java.sql.*; | |
| import java.sql.DriverManager; | |
| import java.sql.SQLException; |
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
| module ImageAnalyzer | |
| open System | |
| open System.Drawing | |
| open Emgu.CV | |
| open Emgu.CV.Structure | |
| type HistComparisonCategory = | |
| | PerfectMatch | |
| | CloseMatch //between 75% and 100% |
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
| @"with SomeTemporaryEmployeeTable(EmployeeID, SkillID, IsQualified) | |
| as | |
| ( | |
| select e.ID, jSkill.ID, case when jsQualifications.QualificationID is null then 0 else 1 end | |
| from Employee e | |
| join Job job on job.EmployeeID = e.ID | |
| and job.ID = (select max(ID) from Job | |
| where EmployeeID = job.EmployeeID) | |
| join JobGroup jobGroup on jobGroup.ID = job.JobGroupID | |
| join JobSkill jSkill on jSkill.JobGroupID = job.JobGroupID |
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( var dbCtx = new DataContext()) | |
| { | |
| var employeeTrainingResults = dbCtx.ExecuteQuery<EmployeeTrainingResult>( | |
| @"@"with SomeTemporaryEmployeeTable(EmployeeID, SkillID, IsQualified) | |
| as | |
| ( | |
| select e.ID, jSkill.ID, case when jsQualifications.QualificationID is null then 0 else 1 end | |
| from Employee e | |
| join Job job on job.EmployeeID = e.ID | |
| and job.ID = (select max(ID) from Job |
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
| import createStore from "redux"; | |
| import combineReducers from "redux" | |
| const todoItemCategoryAction = { | |
| Add: "ADD_TODO", | |
| Remove: "REMOVE_TODO", | |
| Toggle: "TOGGLE_TODO", | |
| ShowAll: "SHOW_ALL", | |
| ShowCompleted: "SHOW_COMPLETED", | |
| SetVisibilityFilter: "SET_VISIBILITY_FILTER" |
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 to be inside the WPF class | |
| public static class CustomClass | |
| { | |
| public static readonly DependencyProperty TextProperty = DependencyProperty.RegisterAttached( | |
| "Text", | |
| typeof(string), | |
| typeof(CustomClass), | |
| new UIPropertyMetadata(default(string))); | |
| public static string GetText(DependencyObject obj) |
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
| $ react-scripts build -verbose | |
| Creating an optimized production build... | |
| Failed to compile. | |
| ./src/index.re | |
| /usr/local/lib/node_modules/bs-platform/lib/bsb.exe: unknown option '-color'. | |
| Usage : bsb.exe <bsb-options> -- <ninja_options> | |
| For ninja options, try ninja -h | |
| ninja will be loaded either by just running `bsb.exe' or `bsb.exe .. -- ..` | |
| It is always recommended to run ninja via bsb.exe |
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
| namespace FailingPost | |
| { | |
| // using directives omitted. | |
| public class FoodGuideController | |
| { | |
| // Code omitted... | |
| [HttpGet] | |
| public IActionResult Index(PageModel model) => this.View(model ?? InitialPageModel); |
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
| # List of usefull snipets I always reuse. | |
| # Get all file types | |
| $extensionList = @((Get-ChildItem -Recurse -File).Extension); | |
| $extensionList | Select-Object -Unique | |
| # Snippets for git support in the team | |
| # ------------------------------------------- | |
| # When someone cannot checkout the files from lfs (whatever the user does, the file remain empty with a size of 1K) |
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
| module GameDomain | |
| [<Measure>] type gold | |
| [<Measure>] type dmg // damage | |
| [<Measure>] type ctr // critical | |
| [<Measure>] type hl // hit limit | |
| [<Measure>] type kg // weight in kilograms | |
| type HeroClass = | |
| | Archer |
OlderNewer