Skip to main content

Posts

Integrate Barcode into React Native mobile app

On OC Copier mobile app, we have integrated QR Code into Contact Form, so contact info will automatically fill in when barcode is being scanned.

To generate QR Code, we are using
https://www.the-qrcode-generator.com

Expo
BarCodeScannerhttps://docs.expo.io/versions/latest/sdk/bar-code-scanner/



* feature: SendGrid provides service to send email notification
https://sendgrid.com/

see pricing:
Free Try it out! Send 40,000 emails for 30 days, then 100/day forever.
Recent posts

Upload file for React Native + Rest API

Using fetch:

constuploadResponse = awaituploadPhotoAsync(uris[0], newFileName.concat(ext)) constuploadResult = awaituploadResponse.text()
letformData = newFormData() formData.append('file', { uri:localUri, name:filename, type })
consturl = `${UPLOAD_PHOTO_TOANDMAP_URL}${newFileName}` returnawaitfetch(url, { method:'POST', body:formData, header: { 'content-type':'multipart/form-data' } })

Upload Files With GraphQL, Apollo, and React-Native

React-Native: we need extra component: RNFetchBlob
With React-Native, it’s a little bit more complicated. It boils down to intercepting the outgoing request and changing it to be a multi-part form and injecting the file blob. To trigger the action, you can include a special flag in your mutation that tells the code to treat the variable “file” as a file to upload.

use Quokka in Visual Studio code

To install Quokka:
https://quokkajs.com/docs/

Once the extension is installed, press Ctrl/Cmd + Shift + P to display the editor’s command palette:

exportconstarrayToObjectWithValue = array=> array.reduce((obj, item) => { obj[item.name] = item.value returnobj }, {})
exportconstobjectToArray = obj=> Object.keys(obj).map(key=> { return { name:key, value:obj[key] } })
constarr = [{ name:'test', value:123 }, { name:'test1', value:12 }] constobj = arrayToObjectWithValue(arr) console.log(obj)
constobj2 = { test:123, test1:222 } constarr2 = objectToArray(obj2) console.log(arr2)
screen shot:

The Trip to the Pacific Garbage Patch

(My name is M&M) I was thrown into a garbage can after I was used from The Mystical Smoothie Palace.
The wind was blowing and the garbage can was filled past the top, so I got blown off. I started rolling away towards the ocean. On my way to the ocean it was very rough because while I was rolling with the wind about 1 million people stepped on me (It was actually 20 people). I was flattened badly, but luckily I couldn’t feel a thing. A seagull tried to eat me but thought I didn’t taste good enough (thankfully). The wind kept blowing me until… I saw the sea for the first time!!! I’ve only heard tales about it from my old buddies,
but this is better than I ever imagined!!! I can’t wait to get in!!! The wind blew me faster than ever, until I wasn’t rolling anymore, I was flying over the ocean!!! I’m in the ocean!!! The fresh smell!!! I was floating deeper in the ocean as I heard the waves roar faint away. Soon, I couldn’t see the shore, but I still heard voices. I turned around and sa…
3 kids: 2 pre-teens and one teenager.  I am going to use this blog to record my own foot prints in this journey of growth with our three kids as they themselves grow into young adults. 
I will try to share our own experiences in helping them with their academic and extracuuricular endeavors. The goal is to provide some of our insights and hopefully encourage other parents to share their experiences and insights.

Vocabulary Victory - Build vocabulary at your own pace

download links:

iOS:
https://apps.apple.com/us/app/vocabulary-victory/id1485320131 Android:
https://play.google.com/store/apps/details?id=com.andmap.vocabularyvictory


https://www.qr-code-generator.com/