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
import React, { useContext } from "react" | |
import * as yup from "yup" | |
import WorkContext from "contexts/work_context" | |
import Link from "components/external_link" | |
import Form from "components/editable_area/components/form" | |
import NumberField from "components/editable_area/components/number_field" | |
import ProductIdsCheckboxField from "./form/product_ids_checkbox_field" | |
import OnixCodeField from "./form/onix_code_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
{ | |
"kind": "books#volumes", | |
"totalItems": 3218, | |
"items": [ | |
{ | |
"kind": "books#volume", | |
"id": "t0udCwAAQBAJ", | |
"etag": "SvMxvG5V10c", | |
"selfLink": "https://www.googleapis.com/books/v1/volumes/t0udCwAAQBAJ", | |
"volumeInfo": { |
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
% Search for *} and replace with \section{}} | |
% Tag up chapters with \chapter{}, and \chapter*{} if you want to skip the numbering. | |
% Go through error notifications and resolve overflows with a forced hyphen or otherwise | |
% Spellcheck | |
% Commas and full stops outside quotation marks | |
% ’[.,] | |
% e.g. ‘It doesn’t sound like it to me’, she said. |
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
% Commas and full stops outside quotation marks | |
% ’[.,] | |
% e.g. ‘It doesn’t sound like it to me’, she said. | |
% quotation marks the wrong way around | |
% (?!^([^’\r\n]++|’[^’\r\n]*’)*$)^.+ | |
% e.g. ‘It doesn’t sound like it to me‘, she said. | |
% and for double quotes | |
% (?!^([^“”\r\n]++|“[^“”\r\n]*”)*$)^.+ |
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
DEPRECATION WARNING: The factory_girl gem is deprecated. Please upgrade to factory_bot. See https://github.com/thoughtbot/factory_bot/blob/v4.9.0/UPGRADE_FROM_FACTORY_GIRL.md for further instructions. (called from <main> at /Users/Emma/rails/my_app/config/application.rb:16) | |
W, [2018-11-06T23:07:43.508902 #77737] WARN -- Skylight: [SKYLIGHT] [2.0.2] Running Skylight in development mode. No data will be reported until you deploy your app. | |
(To disable this message for all local apps, run `skylight disable_dev_warning`.) | |
rails aborted! | |
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "onix_codes" does not exist | |
LINE 8: WHERE a.attrelid = '"onix_codes"'::regclass | |
^ | |
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), | |
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod, | |
c.collname, col_description(a.attrelid, a.attnum) AS comment |
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 Book | |
def initialize(name:, jacket: :draft) | |
@name = name | |
@jacket = jacket | |
end | |
def name | |
@name | |
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
# Use the Ruby JSON gem to parse data in the JSON format | |
json = JSON.parse(our_names) | |
# Get the first person's firstname. Ruby counts from 0, not 1! | |
json[0]["firstname"] | |
=> "Emma" | |
# Get the second person's firstname | |
json[1]["firstname"] | |
=> "David" | |
# Get each bit of the JSON data... |
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
our_names = '[{"firstname": "Emma", | |
"lastname" : "Barnes"}, | |
{"firstname": "David", | |
"lastname" :"Aldridge"}, | |
{"firstname": "Rob", | |
"lastname" :"Jones" | |
}]' |
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
my_name = '{ "firstname": "Emma" , | |
"lastname" : "Barnes" | |
}' |
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
Dim strXPath1 As String | |
strXPath1 = "/ONIXMessage/Product/ProductIdentifier[ProductIDType='03']/IDValue" | |
ActiveDocument.ContentControls(1).XMLMapping.SetMapping strXPath1 | |
Dim strXPath2 As String | |
strXPath2 = "/ONIXMessage/Product/BICMainSubject" | |
ActiveDocument.ContentControls(2).XMLMapping.SetMapping strXPath2 | |
Dim strXPath3 As String | |
strXPath3 = “/ONIXMessage/Product/Title[TitleType='01']/TitleText" |
NewerOlder