Excel: Return row number if value of a cell in a column matches a cell in another column and another condition is matched in yet another column

I needed to do this at work (SPG), and google's AI worked marvelously, as easy as it maybe for advanced Excel Formula experts which I am not.

Ingenious solution by Google:

In Excel, you can return a row number based on multiple criteria using a combination of the INDEX and MATCH functions. For users with newer versions of Excel (Microsoft 365, 2021), the FILTER function is a more straightforward alternative. 

Example scenario

Imagine you have a table with sales data that includes ProductRegion, and Sales. Your goal is to find the row number for the entry where the Product is "Mug" and the Region is "West".

ABC
1ProductRegionSales
2T-ShirtEast$150
3MugWest$200
4T-ShirtWest$120
5MugEast$180

Formula:
=MATCH(1, (A2:A5="Mug")*(B2:B5="West"), 0)

How it works:

  • (A2:A5="Mug") creates an array of TRUE or FALSE values. In our example, it becomes {FALSE;TRUE;FALSE;FALSE}.
  • (B2:B5="West") does the same for the second condition, creating {FALSE;TRUE;TRUE;FALSE}.
  • The multiplication operator * acts as an AND operator. Excel treats TRUE as 1 and FALSE as 0, so the formula multiplies the two arrays element by element. Only the row where both conditions are TRUE will result in a 1. The resulting array is {0;1;0;0}.
  • MATCH(1, {0;1;0;0}, 0) then searches for the value 1 in this new array and returns its relative position. In this case, it's the second position. 
Posted in Computer Science | Leave a comment

Journal of the Week

9/23/2025 Tuesday

The Business founder seen as Prophet & Priest. Interesting article that clearly shows the writer, Jeff Huber, has enough Christian knowledge to write this. Prophet = who sees what others don't. Priest = sacrifice their time and energy for the future success. Babel = thousand languages = so many startups today that confuses people, and probably without a true goal. He said more in his article about temple, kairos and chronos, and such.

China's solar power project as a nation is remarkable according to this chart:

The U.S. is awkwardly behind on this. Perplexity AI gave these reasons: China's solar power project is far ahead of the U.S. due to several major factors, including policy, scale, cost, industrial strategy, and state investment. U.S. political policy shifts and fossil fuels reliance pulled themselves back.

This Tiktok deal is interesting. I think it's stupid to "Americanize" tiktok, not to mention licensing it from China. Tiktok is a global thing. You cannot contain it. You can only compete against it. But it would be fun to watch, because this concerns "intellectual property", which is why the U.S. considers licensing it from China, which probably would not care about IP, which to me is a made up moral code by the West. Would Americans use the American Tiktok? China could easily create a new direction for the American population, circumventing the need for American Tiktok.

A ticket at my SPG work that requested for a deleted Youtube Video. So I came across these solutions that suggested two great sites dealing with deleted videos/pages online:

By google AI "how to find any information on deleted youtube video": https://web.archive.org": If you have the url of the deleted site (i.e. Youtube video), this site not only records when Wayback Machine crawled the site with a nice calendar of it, it also archived the video/page itself that you can play it!!! I wonder how long these archives would stay up.

By reddit: https://www.recovermy.video: A free account that tracks Youtube playlists, etc. such that it remembers for you the video info when the video on the playlist is deleted.

9/22/2025 Monday

TYT (The Young Turks) shows Charlie Kirk's only time to go against Israel. And probably the only time he did so, before becoming more pro-Israel:

Posted in News | Leave a comment

Paedocommunion

David Tong posted this on facebook:
Paedobaptism, Yes
Credocommunion, Yes
Credobaptism, No
Paedocommunion, No.

I obviously would agree with the first three. But I haven't dealt deep enough with Paedocommunion, and thus it interests me. It may not be something popular among the Reformed. But google search gives me one name:


The Reformed theologian Wolfgang Musculus (d. 1563) is a primary example of a historical Reformed advocate for paedocommunion, which is the practice of allowing children to participate in the Lord's Supper. While many Reformed thinkers historically opposed it, Musculus based his support on a covenantal understanding of the church and the identity of children within the body of Christ, although he did not advocate for its reintroduction in his own time. More recently, scholars and theologians such as James B. Jordan, Peter Leithart, and Douglas Wilson are also noted as supporters of the practice. 

And this reddit discussion seems beneficial. I will post the raw data in the comment in case it gets removed.

Posted in Reviews, Theologization | 1 Comment

The True Bible Reading

Many don't listen to what they read in the Bible, they read only to memorize it. Therefore, they have to open a Bible to quote ALL THE TIME something they want to speak to others. They cannot digest the Word of God to become their own words, they cannot become effective witnesses.

The Bible also has great many golden phrases in various languages. These are also good to put them to heart in meditation as well as growth not just in literature or eloquence, but in enjoying God.

Posted in Theologization | Leave a comment

Journal of the Week

9/19/2025 Friday

AI (Mantic) has the highest score in forecast predicting platform called Metaculus. So I signed up and joined the fun.

9/18/2025 Thursday

OpenAI beat programmers with perfect scores at the International Collegiate Programming Contest (ICPC) World Finals 2025: An OpenAI system has solved every problem at the world’s most prestigious collegiate programming championship, outperforming not only human competitors but also Google's Deepmind model. When I'm free I'll check out what are these 12 tasks.

App that detects chords. There are plenty nowadays with AI (i.e. Chord AI phone app - I love this on my Samsung Galaxy S25 Ultra, Chordify, etc.) But the first one I encountered was this youtube, which I thought I've entered in my journal before. I had to search for my comments (good thing Youtube provides a link to all my archived comments) on youtube for it. And in this case, the one I came across on youtube was Chordie by Matkat Music LLC:

9/16/2025 Tuesday

I can't believe Mr. You quoted Stephen Tong (well, maybe unknowingly):

真正的自由,不是你想做什麽就可以做什麽;而是你不想做什麽就可以不做什麽。

To the context of Mr. You's video: This applies to both sides obviously. To the right (my own addition), are things such as wearing masks; to the left, are things such as gender identity.

Mr. You has great points concerning his critics of Progressivism:
They are not for diversity 多元化, but quota controlled diversity 配額制多元化
They are not for equality of opportunity 機會平等, but for equality of the end 結果平等

09-14-2025 Sunday So when the pastor goes on vacation for the week, what did Nadia and I do? We took the opportunity to visit Crossroads Community Church (PCA) in Somerville. The preacher was Daniel Liu. So far so good. I told Nadia that though it seems topical, Liu's preaching was more expository; while the sermons of Pastor Chris of GCC, though expository-wannabe, are more topical in reality. And obviously, both Nadia and I noted coherence in Liu's preaching. The whole experience was like Redeemer PCA of NYC on her best day. The sermon was on the Power of the Gospel, Galatians 1:10-24. Nadia said that at least Daniel Liu gets out more (than Pastor Chris), referring to the reference to a lake Liu came across in his sermon. That's a minor note for me. I did however find myself looking up for the reference to Thomas Jefferson denial of miracles and Christ's divinity. I certainly appreciate that what seemingly to be Dan Liu's vision (though not stated directly), in his sermon, that while he recognized that not all should be preachers, but he hoped that ministers will come out of this congregation.

Overall, Crossroads certainly is many times ahead of our Grace church in most areas: Spiritual health, rationality, finance (2025 YTD budget $490,664 vs. GCC's $184,590, which is 2.6x of ours), sermons, music (though all modernized, still better than GCC's modern music), evangelism, ministries, etc. The only exception at this time, as I do not have enough time to ascertain the character of its church members and elders, I maintain my stand before that Pastor Chris' one pro, is that he held the Bible studies/Sunday Schools (an area most professional pastors would prefer to play safe and save their jobs, if not uninterested) himself and invite challenges/questions. This is a small advantage Chris has over most pastors/preachers, as his other areas (sermons, communication, etc.) would be mediocre if not weaker. People like Chris' sermons I think mainly because of the classic elocutionist oratory style speech. If so, any well trained theater actors can pull the same trick. However, I do believe there is some importance on how we proclaim the message in a pulpit, that is, the early pulpit orators tend to do better art than your typical casual TED talk style preaching today. But this is a minor art because the contents are to be weight first.

I remember Eleni once argued with me about music, that she thinks we would not like the music at Crossroads. I beg to differ now that I have seen it. I once told her that I wouldn't mind their music if they don't mind my broken English. "Quality is in the eye of the beholder" she said, without realizing that she just insulted the whole of the liberal arts department. Imagine if you tell your Literature professor, "your grading means nothing, for quality is relative/subjective". I told Nadia, the primary key to a good music in the church, is clarity.

People I've met at that church: We were greeted by Pastor Dan and elder David Mark before the service. The during greeting time (mid service) we greeted the couple (Steve & Karen) who were also sort of new (5th times or so, from a Grace Community Church in Piscataway, probably an independent church) behind us, and to my right was an "empty nester" as she considered herself, Joana, I think. After service, I was greeted by someone from India, Narendar, whose daughter is freshman at Rutgers and they all go to this church.

So, in order to know the pastor and the others better, I would like to check out their men's groups. Starting with their Pastor at the Pub on Tuesday 9/30, at 6:30pm. I would need a day off to do so. Nadia was not interested in their women's ministries, as they were doing bible study using Kathleen Nielson's material. I don't see an issue, unless one goes the Solo Scriptura route. But I leave it to her, as she is pitting GCC's Denise's Women's Bible Study against this.

Posted in Theologization | Leave a comment

Vocabulary: 你識條鐵

This I asked in the comment of the video, but I never got an answer then until now, when I try searching with various keywords again, I found it myself, what 「你識條鐵」means:

Google: 「你識條鐵」是廣東俗語,意思是你什麼都不懂、不了解,或者一無所知。這句俗語與其他類似的說法如「識條毛」、「識條春」等意思相近,都用來表示某人對某事一無所知。

Posted in Vocabularies | Leave a comment

How to Recycle in South Amboy

After converting all residents' recycling method with city-provided 95-gallon carts, South Amboy issued a sort of reminder as to what can be recycled and what cannot, with a picture of how the bin should be placed for pickup. Although, I've only seen they used the special pickup robotic truck (operated by only a single human staff) a couple of times, while the other times were actually picked up the conventional way (one driver & two garbage men), I wonder if they couldn't afford renting the special truck all the time or something:

As we prepare for the upcoming recycling pickup on Friday, September 12th, we encourage you to place your recycling cart out starting after 6pm this evening to ensure your recycling is out and ready to be serviced. 

Please note the following important guidelines:

  1. Only the new blue 95-gallon recycling carts will be serviced. Old recycling containers will not be accepted.
  2. All recyclable materials, including cardboard, must be placed inside the new cart. Items left outside the cart or on top of the cart will not be collected.
  3. Place the cart at the curb with the silver pick up bar facing the street and the wheels toward your home.
  4. Leave at least 4 feet of clearance on both sides of the cart.
     

Items You CAN Recycle:

  • Glass bottles and jars
  • Plastic containers (#1 and #2)
  • Aluminum, steel, and tin cans
  • Cardboard
  • Mixed paper and newspapers
     

All recyclable materials may be placed together in the cart—this is a single-stream recycling program.

Items You CANNOT Recycle (Carts containing these items will not be collected):

  • Food waste, hazardous materials, chemicals, hot embers
  • Construction debris or regular household trash
  • Leaves, brush, plastic bags, textiles
  • Batteries, tires, electronics, computers, or white metal goods
     

Please be advised that additional recycling carts are not available at this time.Updates will be provided as soon as more information becomes available.

Posted in General | Leave a comment

Engaging Children in Sensory Wordship by Marie Valle

This was in the Reformed Forum Spring/Summer 2025 Magazine. I had it in my hand months ago and been waiting to do a review on this until now. I have a digital copy so I will throw out the paper magazine.

Here's the summary:

Marie Valle is wife of a pastor, Angelo of Christ Reformed Church PCA in Central Pennsylvania, with 4 children.

She applies 5 senses: Sight, hearing, taste, smell, touch. In order to engage children in worship. I think this goes with adults as well. But this article is about the less disciplined ones, the children interrupt worship services because they need more sensory interaction, according to Valle.

God used the 5 senses (sort of) in the Tabernacle (Exodus 25-30) by making it tangible. Psalm 141 embodied this worship vividly: 1. Sounds of God's calling, 2. Smell of incense, 3. Feeling of raised hands, 4. Utterance of self-controlled words, 5. Gaze of fixed eyes.

Suggested help for children in worship:

  1. encourage holding bulletins, hymnals and Bibles with their own hands and follow along with their eyes, as they hear.
  2. Sing boldly as example of stimulating their hearing and mind with worship.
  3. Place coin (stimulate hearing) offerings themselves to encourage sensation of importance.
  4. Listen for specific frequent words during sermon: i.e. God, Bible, etc.
  5. The Lord's Supper: all senses but taste (until they are old enough to participate).

I would say though this doesn't go against parenting in the pews, it also does not discourage a separate children's church (that is, during adult's sermon session).

Posted in Theologization | Leave a comment

TOP vs. IaaS vs. CaaS vs. PaaS vs. FaaS vs. SaaS

Cloud Google has a good introduction on these differences, I'm pasting it here in case it's lost:

To understand cloud and the different models to choose from, it can help to think about it in terms of housing:

  • On-premises: If you decide to build your house from scratch, you do everything yourself. You’ll need to source the raw materials and tools, put everything together, and run to the store every time you need anything. This is similar to running an application on-premises, where you own everything from the hardware to your applications and scaling.
  • Infrastructure as a service: If you are busy, you might consider hiring a contractor to do the work. You tell them how you want the house to look and how many rooms you want, and they take the instructions and build your home. IaaS works in a similar way for your applications. You rent the hardware to run your application on, but you are responsible for managing the OS, runtime, scale, and all the data. Example: Compute Engine
  • Containers as a service: If buying a home is just too much work due to the maintenance it comes with, you can choose to rent instead. The basic utilities are included, but you bring your own furniture and make the space yours. With containers, you can bring a containerized application, so you don't have to worry about the underlying operating system but still have control over scale and runtime. Example: Google Kubernetes Engine (GKE)
  • Platform as a service: If you don’t want to worry about furnishing your living space, you can rent a furnished house. PaaS lets you bring your own code and deploy it but leaves the server management and scaling up to the cloud provider. Examples: App EngineCloud Run
  • Function as a service: If you just need a small dedicated place to work away from your home, you can rent a desk in a coworking workspace. Similarly, FaaS allows you to build and deploy a small piece of code, or a function, that performs a specific task. The cloud provider adds scale if needed when a function executes. Example: Cloud Functions
  • Software as a service: Now, imagine you move into a finished house (rented or purchased), but you have to pay for upkeep, such as cleaning or lawn care. SaaS is the same—you pay to use a complete application for a specific purpose that is managed, maintained, and secured by the cloud provider, but you are responsible for taking care of your own data. Example: Google Workspace

Choosing which is right for you: pros and cons

When it comes to choosing whether cloud IaaS, PaaS, or SaaS is right for your business, there are different advantages and disadvantages to each service model. 

In addition, it’s important to understand that all three are not mutually exclusive, where you can only choose a single service model. It’s possible to choose one for your needs, but you can also decide to combine it with another one or even use a mix of all three along with more traditional IT infrastructure. 

Let’s take a look at some of the most common advantages and disadvantages for each model: 

IaaS pros Highest level of control over infrastructureOn-demand scalabilityNo single point of failure for higher reliabilityReduced upfront capital expenditures (for example, pay-as-you-go pricing)Fewer provisioning delays and wasted resources Accelerated development and time to marketIaaS cons Responsible for your own data security and recoveryRequires hands-on configuration and maintenance Difficulties securing legacy applications on cloud-based infrastructure
CaaS prosIdeal for running, managing, and scaling microservicesStreamlined development speeds up time to marketMore control and configuration of networks and application componentsIncreases workload portability between environments, such as hybrid cloud and multicloudBuilt-in performance monitoring and container orchestration CaaS consSome CaaS solutions have limited language support available depending on the cloud service providerContainer security risks may increase when using CaaS as they share the same kernel with the OS (although they are considered safer than VMs) 
PaaS pros Instant access to a complete, easy-to-use development platformCloud service provider is responsible for maintenance and securing infrastructure Available over any internet connection on any deviceOn-demand scalabilityPaaS cons Application stack can be limited to the most relevant componentsVendor lock-in may be an issue depending on the cloud service providerLess control over operations and the overall infrastructureMore limited customizations 
SaaS prosEasy to set up and start usingThe provider manages and maintains everything, from hardware to softwareSoftware is accessible over any internet connection on any device SaaS consNo control over any of the infrastructure or security controlsIntegration issues with your existing tools and applications Vendor lock-in may be an issue depending on the cloud service providerLittle to no customization
Posted in Computer Science | Leave a comment

Journal of the Week

9/12/25 Friday

15 tips for distinctive character art (with samples). These are good pointers and it's for character art, not just art in general:
 1. Strike the perfect pose: A character’s pose communicates personality and emotion without words; consider interaction with the environment and subtle facial/hand angles to convey story.
2. Use anatomy as a foundation: Focus on bone and muscle structure to create believable, natural poses, even in a stylized style.
 3. Remember that less is more: Simplify backgrounds and use selective color or minimal detail to emphasize pose, anatomy, and expression.
 4. Colour as an emotional tool: Use warm colors for energy/passion and cool colors for calm/mystery to reinforce the character’s emotion and mood.
5. Highlight the personality of your character: Use minimal backgrounds and strategic elements to keep the character’s personality front and center.up
6. Guide the composition with patterns: Employ simple patterns or repeating shapes to direct attention and create visual flow, not just literal backgrounds.
7. Master composition: Consider character interaction, posture, gaze, and placement to tell the story without words; elements like a sword cut or moonlight can imply narrative importance.
8. Perfect lighting and contrast: Use light and shadow to define form, create emotion, and add depth; adjust lighting to make the subject stand out against a minimalist backdrop.
9. Remember that movement brings characters to life: Convey motion through pose, gaze direction, and element arrangement, even in static images.
10. Use body language: Posture, gaze, and hand positioning convey emotion and intention; a single pose change can communicate a lot.
11. Give your characters charisma:
A) Sketch the energy
B) Clean up and shadows
C) Add color, depth, and attitude
This workflow helps establish a strong attitude from the initial sketch through lighting and color.
12. Focus the viewer's gaze: Direct attention with contrast, lines, and gesture direction; minimize distractions to emphasize a key expression.
13. Balance the visual rhythm: Alternate busy areas with simple ones to avoid crowding and help the character stand out.
14. Create details that tell stories: Each accessory, scar, or torn garment should communicate something about the character; fewer, intentional elements carry more weight.
15. If the silhouette reads, it works: Start from strong silhouettes; vary proportions, angles, and poses to create distinct designs that read well even in shadow.

9/10/25 Wednesday

Just when I'm starting to like and follow him for about a year or so, Charlie Kirk (1993-2025), he had to get himself assassinated in Utah campus. The shooter's still at large (update 9/12/25 Suspect identified as Tyler Robinson who confessed the crime to his family which reported him to authority). Allegedly shooting from 130 meters away with a single professional shot. I first found out about this the night of the day he was killed in VR BigScreen where there's so many channels titled "RIP Charlie Kirk" and I thought it was a joke or something until the next day morning I realized from some Facebook posts that it was real. I managed to find some close to uncensored videos (it's not easy finding uncensored videos of such as they get removed by Western pampered ideology media as soon as they were posted, but I found them - both Kirk and Zarutska's killing and now stored into my drive, had to use Russian's Yandex search engine to find these), which I'll save to my Journal drive in case they take it down. These videos tend to get blurred or cut at the gory part.

Mr. You believed the song that's most apt for Kirk's funeral is Bob Dylan's The Times They are a Changin':

The media is crazy around the world for this because it's like Trump's assassination but only this time Kirk's killed. Allie Stuckey also commented on working with Charlie:

He's done the debate rounds in major campuses and rings:

I've followed Kirk long enough to know, that he's certainly smart. Leaning towards fundamentalist Evangelical Christian, probably a Sabbatarian, but also Old Earth Creationist, not willing stand on matters for or against human evolution, etc. He's certainly tried to play fair with the left, giving them plenty of speaking space, although there are places where he's only caring about winning when he has met his matches (i.e. when a Catholic student challenged him on Christian Nationalism, a Liberal Socialist tried to engage a mature debate with him on a topic that he was less inclined to respond and more on attacking the label Liberal Socialist" as oxymoronic, etc.).

My only problem with Kirk, like Trump, is Christian Nationalism (Or a Christian who is also a Nationalist, as he preferred to put it in one of the debates with students): That America is the greatest and best country in the world, which is obviously proven otherwise by school shootings. This is by any common sense of any political party, a proud bias. The general rhetoric is: If you don't like America, then leave. This kind of ideology is never going to build any bridges with outsiders. You only make your own supporters more hard headed and lower IQ. People don't come here only because they think America is great. Some came here for $$$, some for family, and thus, they would not like other aspects of America. I do wonder what do all the Christian Nationalists say about this news. I only looked up Stephen Wolfe's tweets and found nothing much other than his reposts of someone else's tweets around Sept. 10. There's a TYT video circling around since 6 years ago where Kirk lost it with Cenk (liberal) of TYT and it resurfaced now and the Kirkians are in denial of it, calling it made up by A.I. because they worship Kirk:

I wonder if the wife (Erika) could see the perpetrator. I wonder if she would forgive him (which would make her no smaller person than her husband). The law would probably still execute him regardless. Nationalism is not the way, discerning good and bad persons are not the ultimate goal. Only the Gospel, only the difference between a dead or a living soul that matters.

How Kirk honored or served God (he did say he wanted to be remembered for the courage for his faith), I'm sure many can debate about this. It would seem to me that Charlie Kirk's martyrdom is more nationalistic/political than evangelical. However, Kirk had done more work for the Kingdom above than many Christians and preachers today. Those mislabeling of fascists/anti-fascists on either parties, the pretended speech against violence yet inspiring hateful provocation happened both on Kirk's side as well and not just his opponents'. The talk on the left or right of standing up against the terror against free speech with fear, are old data recycled. But one lesson is clear from this, that we are in a race against time, serve God to our fullest as long as we are still breathing on Earth. And Christians should have no fear of any terror against the ministry of God, as horrible as it may kindled our natural hearts. And the solution to Charlie Kirk martyrdom would be to open more opportunity for oppositions to debate in a peaceful way, rather than turning away from this opportunity which I think lots of Christians are good at (play safe) as well as bad at (having intellectual discussions). When Nadia told me to be careful doing evangelism on campuses, I would tell her that if martyrdom were to happen to me in evangelism, please forgive them.

Update 9/18/25: I like David Bahnsen's responses to the Kirk incident: That the federal government has no right in monitoring free speech:

No one would agree with me more than Charlie Kirk. Employers should have, and do have, every right to go after people who say utterly inexcusable "hateful" things. And the DOJ has NO JURISDICTION in any of this, whatsoever. None. And Pam Bondi knows this.

Now, the left and the right are finding ways to attack each other over Charlie Kirk's death. The far right wants to shut the left up. The left also tries to do the same, only that the left is smaller now that Trump is the president. While we now see a lot of firing of jobs of those who despised Charlie Kirk in their jobs as teachers, etc. the left (or the neutral enabler of the left) has suspended ABC News reporter in Illinois, Beni Rae Harmony, who resigned from her job, for remembering Charlie Kirk as her mentor, giving tribute to Kirk on air in her Marketplace program:

This shocking killing of Kirk happened the same week Trump was bringing to light around 9/9 the killing of Ukrainian refugee Iryna Zarutska by a black criminal (DeCarlos Brown) of 14 crimes set loose on streets by Judge Teresa Stokes without bail. I'll store the two youtube videos below in my Journal Media folder with file name dated 9/9/25. I think many took notice of this case because it's a white young girl of modern model beauty. If it's some ugly dude, I doubt Trump would care to bring it up. Nevertheless, this catch and release leftist ideology really needs to stop.

9/9/25 Tuesday The Math needed for LLM. Just a quick overview on what's crucial in LLM design.

Posted in Computer Science, Theologization | Leave a comment