This is a quick demo for a student on how to solve a problem in ruby, creating their own built-in version of a ruby method.
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
var AdCreationPages; | |
(function (AdCreationPages) { | |
AdCreationPages["CHOOSE_ORGANIC_OR_PAID"] = "organicOrPaid"; | |
AdCreationPages["AD_CREATION_FORM"] = "adCreationForm"; | |
AdCreationPages["ORGANIC_POSTS"] = "organicPosts"; | |
AdCreationPages["PAID_POSTS"] = "paidPosts"; | |
AdCreationPages["PAID_POSTS_CURATED"] = "paidPostsCuration"; | |
AdCreationPages["PAID_POSTS_BESPOKE"] = "paidPostsBespoke"; | |
AdCreationPages["POSTS_PUBLISHED"] = "postsPublished"; | |
AdCreationPages["SAVE_DRAFT"] = "saveDraft"; |
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
var AdCreationPages; | |
(function (AdCreationPages) { | |
AdCreationPages["CHOOSE_ORGANIC_OR_PAID"] = "organicOrPaid"; | |
AdCreationPages["AD_CREATION_FORM"] = "adCreationForm"; | |
AdCreationPages["ORGANIC_POSTS"] = "organicPosts"; | |
AdCreationPages["PAID_POSTS"] = "paidPosts"; | |
AdCreationPages["PAID_POSTS_CURATED"] = "paidPostsCuration"; | |
AdCreationPages["PAID_POSTS_BESPOKE"] = "paidPostsBespoke"; | |
AdCreationPages["POSTS_PUBLISHED"] = "postsPublished"; | |
AdCreationPages["SAVE_DRAFT"] = "saveDraft"; |
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
// @flow | |
import * as React from 'react'; | |
import { Spinner } from '@blueprintjs/core'; | |
import { SectionWrapper } from '../../commonElements/commonElements'; | |
import SectionHeader from './SectionHeader'; | |
import SectionBody from './SectionBody'; | |
import SectionFooter from './SectionFooter'; | |
type Props = { | |
customerData: UpdatedCustomerData, |
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
p "How many items do you want?" | |
input = gets.to_i | |
(1..input).each do |n| | |
if n % 15 == 0 | |
p "FooBar" | |
elsif n % 3 == 0 | |
p "Foo" | |
elsif n % 5 == 0 | |
p "Bar" |
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 "test/unit" | |
NOT_A_NUMBER = 1 | |
ALL_GOOD = 0 | |
def update_previous_value_if_one_ahead(i, prev) | |
if prev == nil | |
prev = i.to_i | |
else | |
check_value = prev.to_i + 1 |
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 'test/unit' | |
# complete for YouTube video. | |
class Image | |
attr_accessor :outer_array, :new_outer_array | |
def initialize(*arr) | |
@outer_array = arr | |
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
select * from SYSIBM.TABLES WHERE TABLE_NAME LIKE '%SWPRCRSELP%'; | |
SELECT * FROM SYSIBM; | |
select r.routinename as FunctionName, r.text as FunctionBody | |
from syscat.routines r | |
where r.routinetype = 'F' -- Function | |
and r.origin in ('U', 'Q'); -- User-defined sourced or query-based | |
SELECT * FROM SYSIBM.ROUTINES; |
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
abusaidm.html-snippets | |
benjavr.jshintrc-generator | |
bitlang.cobol | |
blanu.vscode-styled-jsx | |
capaj.vscode-standardjs-snippets | |
chenxsan.vscode-standardjs | |
christian-kohler.npm-intellisense | |
DavidAnson.vscode-markdownlint | |
dbaeumer.vscode-eslint | |
EditorConfig.EditorConfig |
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 convert (obj) { | |
Object.keys(obj).forEach(key => { | |
let internalValue = obj[key] | |
Object.defineProperty(obj, key, { | |
get () { | |
console.log(`getting key "${key}": ${internalValue}`) | |
return internalValue | |
}, | |
set (newValue) { | |
console.log(`setting key "${key}" to: ${newValue}`) |
NewerOlder