Skip to main content

Posts

merge strategy -

Recent posts

google pub/sub

setup local:start ngrok
./ngrok http 3000change env-dev.env
PUBSUB_PUSH_ENDPOINT=https://299836d986cf.ngrok.io/copperstart emulator
firebase emulators:startcreate topic
mutation { createPubSubTopic(topicName: "copper") create subscription
mutation { createPubSubPushSubscription( topicName: "copper" subscriptionName: "sub_push_copper" ) } run mutation: 
mutation { changeListingStatus( input: { listingId: "hnWkg6i3vVtyohzVncpfr7" listingStatus: "SOLD" closingDate: "12/12/2020" soldPrice: "300000" buyerName: "John doe" agentName: "John A" agentOffice: "Agent Corp" titleCompany: "Title Corp" escrowCompany: "E Corp" } ) { success } }

Outdoor Tile Expansion Joints for tiles and concrete slab - tiles on concrete slab - how to grout outdoor tiles

If there are joints in the concrete slab under the tile, there needs to be an expansion joint in the concrete slab, as well.
What Expansion Joints Are and Why You Should Use ThemExpansion joints are spaces between tiles that, instead of being filled with grout, are filled with a flexible sealant. The type of sealant (also called the "caulk" or "caulking") chosen must be weather-resistant. Moreover, if you expect to be subjecting your patio to a lot of traffic, you must select a sealant designed to hold up to foot traffic. Note that even indoor tiling projects require the use of these joints. The elements can take their toll on pieces of tile used outdoors. These elements include direct sunlight, freezing temperatures, and snow and rain. All of these conditions can cause outdoor tile to move, and you need to allow room for it to do so. If the outdoor tile does not have room to move, it will make room. Grout will crack. Outdoor tiles will pop themselves up off the conc…

What is a “closure” in JavaScript?

What is a “closure” in JavaScript?
A closure is a function having access to the parent scope, even after the parent function has closed.
const add = (()=> {   var counter = 0;   return function () {     counter += 1;     return counter;   }; })();
console.log(add())  //1 console.log(add())  //2
Describe event driven and asynchronous programming, and why it is important in User Interface Javascript?
event-driven programming is a programming paradigm in which the flow of the program is determined by events such as user actions (mouse clicks, key presses), sensor outputs, or messages from other programs or threads., handling of events can either be synchronous or asynchronous. 
Asynchronous programming in JavaScript offers a great way of handling operations (I/O) that are not immediately executed and therefore have no immediate response. Rather than waiting for long-running operations to return, blocking the execution thread in the process, they are delegated to callbacks, which are functions that…

useHistory or Redirect did not render component with apollo client

Problem: call mutation from MlsForm, and redirect back to Signing page, but did not rerender todos and done docs in Signing page
Solution is use fetchPolicy: 'no-cache'

if (listingId === '') return constresult = awaitclient.query({ query:GET_LISTING_DOCUMENTS, variables: { listingId:listingId }, fetchPolicy:'no-cache', })
const { data: { getListingDocuments }, } = result
consttodos = awaitclient.query({ query:GET_TODO_DOCUMENTS, variables: { listingId:listingId }, fetchPolicy:'no-cache', })
const { data: { getTodoDocuments }, } = todos

================================

constprintPdf = async (form: PrintPdfInput) => { printListingDocumentToPdf({ variables: { printPdfInput:form, }, }) .then((data: any) => { constlinkToSigning = `${url.substr(0, url.search(/mlsform?/))}signing` history.push(linkToSigning) }) .catch((error: any) => { setMessage(error.message) }) }

fill in checkbox with pdf-lib

https://github.com/Hopding/pdf-lib/issues/109
constfooCheckBox=findAcroFieldByName(pdfDoc,'FooCheckBox');constbarCheckBox=findAcroFieldByName(pdfDoc,'BarCheckBox');constquxCheckBox=findAcroFieldByName(pdfDoc,'QuxCheckBox');constbazCheckBox=findAcroFieldByName(pdfDoc,'BazCheckBox');console.log('Selecting "Foo" and "Qux" boxes...');fooCheckBox.set('V',PDFName.from('Yes'));

turn GraphQL mutation into promise - with parameters

exportinterfaceSigningProps { forms: Document[] todos?: Document[] listingId: string listingAddress: Address addDocument?: (data: DocumentInput) =>void printPdf?: (data: PrintPdfInput) =>void fillInPdfForm: (data: FillInPdfInput) =>Promise<string> deleteTodo?: (id: string) =>void } functionfillInPdfForm(fillInPdfInput: FillInPdfInput): Promise<string> {returnnewPromise((resolve, reject) => { fillInPdf({ variables: { fillInPdfInput:fillInPdfInput, }, }) .then((data: any) => { constdoc = { ...data.data.fillInPdf, created:newDate().toString(), } setDocuments([...documents, doc]) consttodoDocs = todoDocuments.filter(todo=>todo.name !== doc.name) setTodoDocuments(todoDocs) resolve('') }) .catch((error: any) => { console.log(error) reject(error) }) }) }

useEffect(() => { constfillInPdf = async () => { try { letfieldNames: string[] = [] letfieldValues: string[] = [] if (formValues) { for (constnameinformVal…