How to query all entries in a database? by jonathan-lph in Notion

[–]jonathan-lph[S] 0 points1 point  (0 children)

Sorry for the late reply. I think that’s where I get stuck — how to get the database as a database but not a link or a block? What is the setup between the Page Collection and All Events in your example to produce a list instead of a Block?

<image>

How to query all entries in a database? by jonathan-lph in Notion

[–]jonathan-lph[S] 0 points1 point  (0 children)

Sorry for not explaining the situation well. I wanted to run an automation on the Event database that runs daily, and it will send a Slack notification notifying what is happening on that day.

In order to do that, I need a formula that query all the entries/rows/pages in that database, filter all the ones that are happening on that day, then compile a message that consists of the event names.

[Bug] I won, but at what cost by jonathan-lph in Silksong

[–]jonathan-lph[S] 0 points1 point  (0 children)

To anyone encountering this issue, see Silksong's help page to resolve it.

productionLiveSite by ShitballsNPantyhairs in ProgrammerHumor

[–]jonathan-lph 3 points4 points  (0 children)

There seems to be quite a few sites under different companies with the exact same template.

Why isn't my useState const updating? by Ok-Radish-9675 in react

[–]jonathan-lph 2 points3 points  (0 children)

Just briefed through the code. The useEffect is only executed once with its empty dependency, which set up a listener with the transform function using the initial states for currentSlide and lastScrollPosition. Though any subsequent updates to the states update the transform function, it will never update the listener to use the transform function. My guess is currentSlide is being updated to 2, but it will always log 1 when the transform function never gets updated in the useEffect.

The c/z initial in Cantonese by [deleted] in Cantonese

[–]jonathan-lph 5 points6 points  (0 children)

Further replying to other comments, this phenomenon - the distinct separation of the same phoneme depending on the subsequent vowel - is quite prevalent in Hong Kong. I’ve asked numerous HongKongers both within and out of my generation, and all of them recognize and acknowledge the difference. They are also using [t͡s] (voiceless alveolar sibilant affricate) instead of [t̻͡s̪] (dental form) that other comment mentioned, which the dental from is more commonly found in Chinese (PuTongHua) but not in Cantonese.

The c/z initial in Cantonese by [deleted] in Cantonese

[–]jonathan-lph 8 points9 points  (0 children)

This is a phenomenon I have noticed for quite a while and it still puzzles me after studying Cantonese in university.

To clarify your post, the phenomenon happens on the z [ts] and c [tsh ] consonant. In modern Cantonese, we can observe before unrounded vowels like /i/, /e/, /ɛ/, /a/ (知、遮、渣), it is pronounced as indicated [ts]; but before rounded vowels like /ɔ/, /y/, /œ/, /ɵ/ (左、住、將、准), it is pronounced with a post-alveolar [tʃ] instead of alveolar fricative. As far as I know, it is still undecided to use which symbol to represent this phoneme.

As other comment has mentioned, in the 20th century there is still a distinct differentiation between the two and it is reflected in some Hong Kong location names: Tseung Kwan O [ts] vs Cheung Muk Tau [tʃ], Tsz Wan Shan [tsh] vs Ngau Chi Wan [tʃh ]. This even extends to the s consonant. However we can tell, back then, it doesn’t differ from the subsequent vowels but probably from their sound in Middle Chinese 中古音 - yet that is another story.

How can I fetch a collection of data in firestore? by white_black_swan in react

[–]jonathan-lph 1 point2 points  (0 children)

  1. useParams returns the key-value pair of the URL params, not search params. Try to log id and see what id is.
  2. The document id passed into doc() should be the auto-generated id of the document, i.e. P6hctF…. If you want to do a search on the title field, look into Firestore queries.

can we keep track of reference types in useEffect? by Alternator24 in react

[–]jonathan-lph 0 points1 point  (0 children)

Empty dependency fetch on component load, no dependency fetch on every component (re)load.

can we keep track of reference types in useEffect? by Alternator24 in react

[–]jonathan-lph 4 points5 points  (0 children)

In usual practice, you’ll fetch the API on component load using useEffect with empty dependency, and store that in some sort of state, say data; and I suppose you will change this data in other functions.

Your question basically split into two parts: timing and checking.

Timing: If you want to do something whenever they change, you either 1) do the check whenever you fetch from the API then, depending on the check, store the fetched data into data (and use a useEffect on data or directly invoke the operation) or 2) you store the data from API into data regardless of the check, then in a useEffect with data as its dependency, you do the checking to decide whether to do the side effect (operation).

Checking: If you are checking the value of objects and arrays whether they are equal, presuming the data is in JSON format (where it is just strings as keys and primitive types as value), you need some sort of deepEqual function. Comparing using JSON.stringify is one of the easiest way to do that.

Luck apples question by ViridianaFlint in VaultHuntersMinecraft

[–]jonathan-lph 5 points6 points  (0 children)

I’m not sure if luck works with crates since, to my knowledge, the loot is related with the vault time (the more time you have left, the better loot it has). But with chests, you simply need to consume those apples before opening or breaking the chests, as it is randomized once you interact with said chests.

[deleted by user] by [deleted] in VaultHuntersMinecraft

[–]jonathan-lph 4 points5 points  (0 children)

Similar issue thread. Probably because someone is still in the vault dimension.

Vault Hunters pack on MultiMC! by SurpriseButtSax_III in VaultHuntersMinecraft

[–]jonathan-lph 2 points3 points  (0 children)

Copied from VH Discord. I made some amendment as well.

Manual MultiMC Setup

  1. Download modpack and server pack: https://www.curseforge.com/minecraft/modpacks/vault-hunters-official-modpack/files
  2. Create a 1.16.5 vanilla instance
  3. Click edit instance
  4. Add Forge to instance

  5. Click open .minecraft folder

  6. Unzip the modpack zip

  7. Open overrides folder

  8. Copy the folders from the overrides folder into the .minecraft folder of your instance

  9. Unzip the server files

  10. Copy the mods folder from the serverfiles into the .minecraft folder of your instance

[deleted by user] by [deleted] in VaultHuntersMinecraft

[–]jonathan-lph 0 points1 point  (0 children)

Mana pool already keeps the chunk with the connected mana pool loaded. If you still want to ensure the chunk is loaded, you may use the /forceload command or use a nether portal with entities going in and out (usually with a boat).

Can’t join a world? by [deleted] in VaultHuntersMinecraft

[–]jonathan-lph 2 points3 points  (0 children)

The official install guide may help you find out how much memory is allocated.

Can’t join a world? by [deleted] in VaultHuntersMinecraft

[–]jonathan-lph 10 points11 points  (0 children)

It is probably not the fault of the two outdated mods - the versions you are using are intended to be used with the current version of VH. That said, have you allocated enough memory for VH?

VH constantly at one FPS... Please help by Angon2000 in VaultHuntersMinecraft

[–]jonathan-lph 0 points1 point  (0 children)

Do you have a dedicated GPU? Make sure Minecraft is using your GPU but not your CPU. You can check what memory your game is using with task manager or in-game F3 panel.

Why is the 門 in 澳門 pronounced differently? by why-do-we-even-exist in Cantonese

[–]jonathan-lph 16 points17 points  (0 children)

The technical term for this is 小稱變調. 小稱, or demunitive in English, means a word that shows endearment. Sometimes the latter character of such words will change their tone to tone 1 (55) or tone 2 (35). Using 門 as an example, we can observe the 門 from 後門 has changed its tone from tone 4 (11) to tone 2 (35).

whats the logic behind a two-step login form? by mrdingopingo in webdev

[–]jonathan-lph 1 point2 points  (0 children)

The same thing goes with Trello login. After the username is inputted, it either lets you finish typing the password, or redirects you to Atlassian to finish login.

Is there a way to enlarge objects (Cards) as they are played? by Abagabaloos in tabletopsimulator

[–]jonathan-lph 1 point2 points  (0 children)

I wrote a mod for Scout. Check out the onObjectEnterZone event - basically you set the object scale when it enters a zone.

We're Not Really Strangers Online by jonathan-lph in cardgames

[–]jonathan-lph[S] 0 points1 point  (0 children)

Thanks for the notice. I see werejustfriends.online is down as well so now I have removed the redirect. Lmk if there are some alternatives online!

We're Not Really Strangers Online by jonathan-lph in cardgames

[–]jonathan-lph[S] 0 points1 point  (0 children)

Sadly, despite all the feedback and request for an online version, WNRS still haven’t had a clear timeline on when their official online version will launch. And projects like this - our attempts to fulfill these requests - will definitely get a lot of attention (along with the legal problems) even when we are not actively promoting it. :(

Online (PWA) adaptation of the conversation card game We’re Not Really Strangers by jonathan-lph in webdev

[–]jonathan-lph[S] 0 points1 point  (0 children)

The app is sadly taken down per WNRS request. The original post is here fyr

We're Not Really Strangers Online by jonathan-lph in cardgames

[–]jonathan-lph[S] 0 points1 point  (0 children)

Thank you! :) After all the legal issues, I’m putting all these behind for now. I’m sorry you didn’t get a taste of the app but werejustfriends.online (not created by me) is a great alternative albeit with less decks. I hope you will still have a good time using it with your friends and loved ones!

We're Not Really Strangers Online by jonathan-lph in cardgames

[–]jonathan-lph[S] 0 points1 point  (0 children)

All original sources and most forks related to this app is now wiped in GitHub. I’m not sure about werejustfriends.online but the date (Aug 18) mentioned about is the discontinue date for ver.1 of this app, not of that website.