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
{ | |
"Meta Data": { | |
"1. Information": "Daily Time Series with Splits and Dividend Events", | |
"2. Symbol": "SPY", | |
"3. Last Refreshed": "2023-03-24", | |
"4. Output Size": "Compact", | |
"5. Time Zone": "US/Eastern" | |
}, | |
"Time Series (Daily)": { | |
"2023-03-24": { |
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
[ | |
{ | |
"timezones": [ | |
"America/Aruba" | |
], | |
"latlng": [ | |
12.5, | |
-69.96666666 | |
], | |
"name": "Aruba", |
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 DataTypes | |
def initialize | |
@columns = {} | |
end | |
def columns | |
@columns | |
end | |
def col(name, args) |
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 DataTypes | |
def col(name, args) | |
puts name | |
puts args | |
end | |
end | |
class Test | |
def column_defs(&block) | |
yield DataTypes.new |
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
'use strict'; | |
/** | |
* api/password/controllers/password.js | |
*/ | |
const { sanitizeEntity } = require('strapi-utils'); | |
const formatError = error => [ | |
{ messages: [{ id: error.id, message: error.message, field: error.field }] }, | |
]; |
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
SQL> select column_name, column_def from sysibm.sqlcolumns where table_name='BOOKS' and table_schem='LIBTEST' | |
+---------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |
| COLUMN_NAME | COLUMN_DEF | | |
+--------------------------------------------- |
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
irb(main):001:0> DB.connect | |
/home/yohanes/Projects/libs/odbc_test/lib/odbc_test.rb:10: [BUG] Segmentation fault at 0x000055a595665f8f | |
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux] | |
-- Control frame information ----------------------------------------------- | |
c:0021 p:---- s:0102 e:000101 CFUNC :fetch_all | |
c:0020 p:0023 s:0098 e:000097 METHOD /home/yohanes/Projects/libs/odbc_test/lib/odbc_test.rb:10 | |
c:0019 p:0010 s:0092 e:000091 EVAL (irb):1 [FINISH] | |
c:0018 p:---- s:0089 e:000088 CFUNC :eval | |
c:0017 p:0021 s:0081 e:000080 METHOD /home/yohanes/.rbenv/versions/2.6.5/lib/ruby/2.6.0/irb/workspace.rb:85 |
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
function solution(N) { | |
// Convert number to a binary string | |
const binString = (N >>>0).toString(2) | |
// Remove trailing zeros from the string | |
while(binString.slice(-1) === "0") { | |
binString = binString.slice(0,-1) | |
} | |
// Get gaps array by using split(1) then remove "" from the array |