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
| var squaresTo = (limit) => { | |
| var iterator = { | |
| value: 1, | |
| nextDelta: 3, | |
| done: false, | |
| next: () => { | |
| return { | |
| value: this.value + this.nextDelta, | |
| nextDelta: this.nextDelta + 2, | |
| done: (this.value + this.nextDelta) <= limit, |
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
| Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) | |
| Dim wsSheet As Worksheet | |
| Application.ScreenUpdating = False | |
| Select Case Range("H5") | |
| Case "Hain" | |
| For Each wsSheet In Worksheets | |
| wsSheet.Visible = xlSheetHide | |
| If wsSheet.Name Like "*Hain*" Or wsSheet.Name = "Customer Contacts" Or wsSheet.Name = "Retail Overview" Or wsSheet.Name = "Strategies & Decision Criteria" Or wsSheet.Name = "Leadtimes" Or wsSheet.Name = "Scorecard" Or wsSheet.Name = "Select Client Profile" Then |
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
| RSpec.describe SomeHelper do | |
| let(:helper_class) do | |
| Class.new do | |
| attr_reader :request | |
| include SomeHelper | |
| def initialize(request) | |
| @request = request | |
| end |
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
| def start_request | |
| method = http.post :body => { data: { serial_no: serial } } | |
| method.errback do | |
| yield | |
| $stderr.puts 'Can\'t connect to cloud' | |
| end | |
| method.callback do | |
| yield | |
| p method.response_header.status |
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
| unit = ARGV[2] | |
| if unit == "hours" | |
| report = 12 | |
| dosing_interval = 24 | |
| elsif unit == "days" | |
| report = 1 | |
| dosing_interval = 1 | |
| else | |
| unit = "days" | |
| report = 1 |
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
| ary.sort do |left, right| | |
| IMPORTANT = %w(X Y) | |
| if IMPORTANT.include?(left) && IMPORTANT.include?(right) | |
| IMPORTANT.index(left) <=> IMPORTANT.index(right) | |
| elsif IMPORTANT.include?(left) | |
| 1 | |
| elsif IMPORTANT.include?(right) | |
| -1 | |
| else | |
| left <=> right |
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
| · Junior Web Developer Role | |
| · Up to £25K | |
| · Excellent Training and Mentoring in C# / .NET / MVC | |
| · Company benefits | |
| · Graduates welcome - no commercial experience necessary | |
| This well known software house in Macclesfield is on the hunt for an aspiring Junior Web Developer to join their team of techies in developing the most cutting edge and modern software solutions. In joining this growing company, you will have the opportunity to work on numerous projects, including web applications, internal systems and websites. | |
| This role would suit a 2016 graduate as well as those looking for a step up after their first commercial role after university. A degree is not necessary - if you have demonstrable skills in software development and are ready for a challenge then you will also be considered. |
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
| user system total real | |
| Length: 10, encoding: US-ASCII 0.000000 0.000000 0.000000 ( 0.002861) | |
| Length: 100, encoding: US-ASCII 0.010000 0.000000 0.010000 ( 0.003694) | |
| Length: 1000, encoding: US-ASCII 0.000000 0.000000 0.000000 ( 0.003162) | |
| Length: 10000, encoding: US-ASCII 0.000000 0.000000 0.000000 ( 0.003325) | |
| Length: 100000, encoding: US-ASCII 0.010000 0.000000 0.010000 ( 0.003654) | |
| Length: 1000000, encoding: US-ASCII 0.000000 0.000000 0.000000 ( 0.004246) | |
| Length: 10000000, encoding: US-ASCII 0.010000 0.010000 0.020000 ( 0.010525) |
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
| require 'benchmark' | |
| p ["Encodings: ", Encoding.default_external, Encoding.default_internal] | |
| strings = { | |
| 10 => " " * 10, | |
| 100 => " " * 100, | |
| 1000 => " " * 1000, | |
| 10_000 => " " * 10_000, | |
| 100_000 => " " * 100_000, | |
| 1_000_000 => " " * 1_000_000 |
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 True | |
| class << self | |
| def true? | |
| self | |
| end | |
| def !@ | |
| False | |
| end |
NewerOlder