This file contains 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
Sub 全シート行数カウント() | |
Dim sheetname As String | |
Dim i As Integer | |
For i = 1 To ThisWorkbook.Sheets.Count | |
sheetname = ThisWorkbook.Sheets(i).Name | |
ActiveCell = "=CountA('" & sheetname & "'!G6:G65535)" | |
ActiveCell.Offset(1, 0).Activate | |
Next | |
End Sub |
This file contains 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
select to_char(123.12342145, 'TM9'), to_char(123784927348923.0010000, 'TM9') from dual |
This file contains 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
for /F "tokens=1,2,3" %%a in (abc.txt) do ( | |
echo %%b %%a %%c | |
) |
This file contains 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
// fibonacci number | |
alert( | |
(function(n) // nameless function 1 | |
{ // nameless function1 body | |
return "1," + (f = function(a, b, n) // nameless function 2 | |
{ // nameless function2 body | |
if (n == 0 ) | |
{ | |
return ""; | |
} |
This file contains 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 Sub VisibleNames() | |
Dim name As Object | |
For Each name In Names | |
If name.Visible = False Then | |
name.Visible = True | |
End If | |
Next | |
MsgBox "すべての名前の定義を表示しました。", vbOKOnly | |
End Sub |
This file contains 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
Sub Macro1() | |
Dim i As Long | |
For i = 1 To Selection.Count | |
If Not IsEmpty(Selection(i)) Then | |
If Selection(i).Value = "(NULL)" Or _ | |
Asc(Selection(i)) = -31871 Or _ | |
Asc(Selection(i)) = 63 Then | |
Selection(i).ClearContents | |
End If | |
End If |
This file contains 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 File.expand_path(File.dirname(__FILE__) + '/neo') | |
# Greed is a dice game where you roll up to five dice to accumulate | |
# points. The following "score" function will be used to calculate the | |
# score of a single roll of the dice. | |
# | |
# A greed roll is scored as follows: | |
# | |
# * A set of three ones is 1000 points | |
# |
This file contains 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 'minitest/autorun' | |
class TestMyClass < Minitest::Test | |
def setup | |
@orig_stdin = $stdin | |
@in = StringIO.new | |
$stdin = @in | |
end |
This file contains 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
@ruby -x "%~f0" %* & exit /b | |
#!ruby | |
# list recent startup and shutdown time | |
require 'tempfile' | |
require 'csv' | |
require 'date' | |
file = Tempfile.new('event') | |
CMD = "Get-EventLog System -After (Get-Date).AddMonths(-2) | Where-Object { $_.InstanceId -eq 12 -or $_.InstanceId -eq 13 } | Sort-Object TimeGenerated | Export-CSV #{file.path} -notype " |
This file contains 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 Emacsable | |
def self.readline(prompt) | |
print prompt | |
(gets || '').chomp | |
end | |
end | |
Pry.config.input = Emacsable | |
Pry.config.pager = false |
OlderNewer