₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,331,293 members, 8,449,602 topics. Date: Wednesday, 22 July 2026 at 06:05 AM

Toggle theme

TruthCoder's Posts

Nairaland ForumTruthCoder's ProfileTruthCoder's Posts

1 2 3 4 5 6 7 8 ... 16 17 18 19 20 21 22 23 24 (of 49 pages)

ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 4:15am On Dec 24, 2022
Werey claims to have 3 years experience in HTML

LOL.

He even says Node.js and ‘their numerous subsets’

LWKMD

ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 4:11am On Dec 24, 2022
Sleekcode:
Na the nonsense way u wan so be this?

Was thinking there's something special ur about to do?

How about the DDOSing Me Quack?
Is this not your api?

ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 4:09am On Dec 24, 2022
Sleekcode:
See the wannabe mentioning DDOS as if there's anything special in it.
Quack!
Says the fool that commits .env files to github

ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 4:06am On Dec 24, 2022
Sleekcode:
You need an address?
Dont worry.

I have all that i need.

And your bravado in the face of oncoming bullets wont help you.

Sha hold on.

I am going through your reao life socials now.

FUTO graduate abi?

Your other name is Andrew abi?

Sha wait. Your breakfast would be ready soon
ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 4:02am On Dec 24, 2022
Sleekcode:
The most basic form of attack

Grow up kid... won't take me more than 3 seconds to blacklist your useless ip grin
LMAO.

You are still making mouth?

OK.

Your harvest don land today.

I would make you an example to all other dumbos like you on Nairaland here who think the world revolves around their school hostel.

Just wait.
ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 3:55am On Dec 24, 2022
Sleekcode:
What's so special having my names lol?

I dare u to have my time grin

You need an ID Mr Quack?
You think it is only your name that i have?

grin
ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 3:55am On Dec 24, 2022
Sleekcode:
Keep on ranting Mr Quack!

I'll continue to expose your type!
I will make you my work this morning.

That your small api that you created with no security, i will DDOS the living daylight out of it soon.

Sho lo stupid ni
ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 3:50am On Dec 24, 2022
Sleekcode:
Keep on ranting Mr Quack!

I'll continue to expose your type!
Izeogu Maduabuchi,

Dont let me have your time.

You are a small fry.

Few minutes and i have your real name, all social handles , your pictures and your life history.

LOL
ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 3:39am On Dec 24, 2022
Sleekcode:
Now you're copying from ChatGPT

next thing we'd hear is your site is under cyber attack.

grin
Every normal and sensible human who read my initial post here, saw my attribution (which was explicit) and my follow ups would understand that i simply gave an alternative view.

Yes, i asked chatGPT and wrote it here that it was an answer provided by chatGPT. (I clearly wrote courtesy of chatGPT under the post or are you mot smart enough to know that such attributions are not written by chatGPT?)

You have been going round my old threads on a personal vendetta, looking for where to pour your anger.

If you are a real programmer, you would know that every single valuable site in the world would one day get its fire test from potential hackers.

Yahoo, Facebook, Heroku, etc all had their close shaves with potential attacks recently. Are you better that the programmers in these organizations?

It is the attitude of never-do-wells like you that has made programming section on Nairaland dull. You have nothing to your name. NOTHING. Yet, you come here looking for where to expend your frustration.

You are simply frustrated with your unsuccessful life. Dont stop at this thread, dig further.

You are simply angry because i have no job for you.

That’s how you went to an old thread i opened when i wanted to sell off my 2012 MBP which was a core i7 with 16gb. You were asking the dumb question that who codes on a 2012 MBP.

You are simply an unhappy fellow.

It’s Christmas and I don’t know about your side, but i am here celebrating the successes of this year.

I have no space for a toxic slowpoke like you.
Computer MarketRe: 2012 Macbook Pro 16GB, Core I7, 500gb For Sale by truthCoder(op): 11:44am On Dec 23, 2022
Sleekcode:
All these Quacks

Who uses a 2012 MacBook in 2022?

I bet you've never gotten a gig higher than $100
LOL

I dont do ‘gigs’

I handle projects.
Computer MarketRe: 2012 Macbook Pro 16GB, Core I7, 500gb For Sale by truthCoder(op): 11:17am On Dec 23, 2022
Sleekcode:
So u still use 2012 MacBook?

Chai... I wonder the type of projects you've been working on.
Yes, I used a 2012 Macbook Pro for coding and i sold it when i was decluttering my space when i this year. What exactly do you think is wrong with a 2012 MBP? Have you ever owned one before?

If you even have any basic understanding of programming, you would know that a core i7 with 16GB RAM and dedicated graphics is more than enough for web development.

The 2012 to 2015 Macbook Pros are still one of the best intel-based Macbooks out there. There are many developers that i know that still use the 2015.

I currently use the 2015 because it is more reliable than any other thing from 2016 to 2019.

The projects i work on fuel my lifestyle and passion. I build business solutions and currently am working on a project on Yas Island with my 2015 MBP.

Now, what are you working on?

You came to this thread, trying to dig up on me.

Be careful young one.
ProgrammingRe: Someone Tried To Hack My Server by truthCoder(op): 10:50am On Dec 23, 2022
bedfordng:
well, there is really nothing you can do other than to make sure your URL paths doesn't lead to leaks on your site. Most of them uses random IP. Blocking it can still reduce the rate at which they tries though.

Also make sure your codes logic doesn't break or do other things when mix matched paths are inputed.


Vulnerabilities can come from any angle. So don't trust users inputs even when you think it's only your client that would use the app. Hackers doesn't really care who is using the app. This is why they use automation tools to test most of the payloads they have succeeded in using to game other system before.
All unrecognised paths resolve with a res.json() response, as long as they are within the rate limit. All requests above the rate limit simply fail and block the ip automatically.

I also have my error logics in place for all valid paths to reduce crashes.

I have zod and validator in place for input validations.

I also have my headers with custom tokens from my web and mobile apps for all requests which is verified via a middleware. This is in addition to the jwts for protected routes.

I am considering logging all rouge ips and storing them in a central blacklist for all my projects but the load time cost is what i am concerned about. Maybe if i create the list centrally, then have my projects have cron jobs that fetch from this list and update locally to a redis cache? Then cross referencing via the locally updated list should not cost more in time and compute.
ProgrammingRe: Someone Tried To Hack My Server by truthCoder(op): 10:28am On Dec 23, 2022
Sleekcode:
The earlier you stop copying codes, the better for you.

Still don't see any reason why someone would want to hack your valueless app. grin
You opinion has been noted.

You can now move along

Thanks
ProgrammingRe: Someone Tried To Hack My Server by truthCoder(op): 9:20am On Dec 23, 2022
bedfordng:
this did not happen through railway, this is just a random guess automation which the attacker is trying to search for vulnerabilities.

You can see he tried several URLs including wordpress paths. He doesn't even know the kind of stack you used for the portal. So it's a guess work on automation which is normal for novice.

The attacker is not trying to gain access to railway, rather the person is trying to guess work vulnerabilities on your portal by automating the process for path traverser and other yadayada
Very true.

My main concern would be how he got the server link Could it be through crawling?

What are the possible mitigations against such since the APIs are not customer facing?

I dont think i can use an IP whitelist as railway does refresh intermittently.

Inputs welcome
ProgrammingRe: Someone Tried To Hack My Server by truthCoder(op):
Sleekcode:
Stop using malicious scripts nulled themes/files they won't listen.


How else would you explain someone trying to gain access to your totally irrelevant server with zero financial/non-financial benefits whatsoever if not that the Hack was already in a malicious file u added to the server.

Happens a lot with nulled scripts angry
Dont you think it would be wiser if you read the post before commenting from your already-formed biased mind?

Since you are the god of code, abeg tell me which theme or scripts i copied on a simple Nodejs Express server? Do you even know how serverless deploys work?

To you, the system has no value but not to the company that paid in USD for a fully integrated workflow automation system. Do you even know what workflow automation is?

I don’t copy codes and would not have been able to spot this if i had unnecessary or unknown scripts running. This is not a landing page for iya basira’s food canteen or an NFT scamming site. It is a custom built site and you might not believe it but some people do write their own codes.

Even if you know more than everyone here, dont you think it is better you share your unlimited knowledge than trying to ridicule?

Edit: Someone smarter has given a response above. You can do well to read it. Thanks
PhonesRe: How Much Is Iphone X Screen by truthCoder: 7:57am On Dec 23, 2022
Asekun434:
It works
Great.
PhonesRe: How Much Is Iphone X Screen by truthCoder: 5:54am On Dec 23, 2022
Asekun434:
I was able to fix it and it has been working perfectly since then. I wasn’t active here that’s why I’m just replying it cost around 35k
I would like to ask. Does the face id still work?
ProgrammingRe: Someone Tried To Hack My Server by truthCoder(op):
Railway deploys their default client servers as Bleep dot up dot railway dot app where Bleep is the client’s identifier.

For production, it is expected to use a custom domain which replaces the default with your domain.

Since this project is still in development, i have not applied the custom domain.
ProgrammingRe: Someone Tried To Hack My Server by truthCoder(op): 7:58am On Dec 22, 2022
airsaylongcome:
How do you have your OS secured? Do you have it seating behind a firewall? Do you have it exposed to the internet?
It is a serverless deployment on Railway.

One of my assumptions is that the attack happened via Railway (possibly an hacker has access to their systems and its not yet discovered).

I would be contacting their support via email soon.
ProgrammingSomeone Tried To Hack My Server by truthCoder(op): 7:46am On Dec 22, 2022
I am writing to share an experience I recently had while working on an automation system for a client.

The system is built using an Express server that serves a svelte-kit and flutter app from Railway, and security is always a top priority for me. That's why I implemented measures such as cors, helmet, and express-rate-limit to keep the system secure.

However, while going through the logs for the system, I noticed that the express-rate-limit had been triggered. This was surprising because the site is still in development and I am the only user. Upon further investigation, I discovered that someone had been trying to gain unauthorized access to the system. These attempts included trying to locate unprotected .env files on the routes, and some of the requests were made less than a second apart, which indicated that it was a malicious attack rather than an accident.

In response to this event, I changed all passwords and identified and fixed any bugs in the system that were discovered through the logs. I also implemented a persistent blacklist for rogue IPs to prevent future attacks of this nature.

This experience has reminded me of the importance of continuously monitoring and securing my systems, and the need to stay vigilant in protecting against potential threats. I hope this post helps others to stay aware of the potential risks and take the necessary precautions to keep their own projects secure.

ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 12:26pm On Dec 21, 2022
GREATIGBOMAN:
sqlPAIN

I dare u to explain your solution line by line.


chances are, u don't even understand what you've pasted. grin
grin
ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 12:04pm On Dec 21, 2022
Wow, it's really impressive how there are all these self-proclaimed geniuses out there who think they're the best because they can answer some trivia questions about data structures and algorithms. Newsflash: that doesn't mean you're actually a good coder. In fact, most of these DSA-obsessed babies don't have a single practical project to their name. They've never solved a real-life dev problem, let alone achieved 100 MAU on anything. And yet, they have the audacity to beg for hand-me-down laptops and criticize others who can afford brand new desk set-ups.

But hey, it's not like being a good coder is about being able to think on your feet and adapt your current knowledge to solve real problems. Oh wait, that's exactly what it's about. That's why teams are made up of different people with different skills, not just the CTO. But I'm sure these yapping puppies know better than that. Carry on, guys
ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 11:46am On Dec 21, 2022
is coding all about data structures and algorithms

Coding involves many different aspects, and data structures and algorithms are just one part of it. In general, coding involves designing, writing, testing, and debugging code to solve problems or accomplish specific goals.

Data structures and algorithms are important tools that are used to solve problems and perform tasks in an efficient and effective way. They allow you to organize and manipulate data in a way that is optimized for a particular purpose, such as searching, sorting, or storing data.

However, there is much more to coding than just data structures and algorithms. Other important aspects of coding include:

Designing and planning: This involves understanding the problem or goal, determining the requirements and constraints, and designing a solution that meets those requirements.
Writing code: This involves writing the actual code that implements the solution, using a programming language and following best practices for code organization, readability, and maintainability.
Testing and debugging: This involves testing the code to ensure that it works correctly, and debugging any issues that arise.
Collaborating and communicating: This involves working with other developers and stakeholders, such as project managers and users, to ensure that the solution meets their needs and meets project goals.
Overall, coding involves a wide range of skills and activities, and data structures and algorithms are just one part of the picture.
ProgrammingRe: Can You Solve This Google Coding Interview Problem? (pics) by truthCoder: 11:34am On Dec 21, 2022
TastyFriedPussy:
A board has got a painted tree graph, consisting of n nodes. Let us remind you that a non-directed graph is called a tree if it is connected and doesn't contain any cycles.

Each node of the graph is painted black or white in such a manner that there aren't two nodes of the same color, connected by an edge. Each edge contains its value written on it as a non-negative integer.

A bad boy Vasya came up to the board and wrote number sv near each node v — the sum of values of all edges that are incident to this node. Then Vasya removed the edges and their values from the board.

Your task is to restore the original tree by the node colors and numbers sv.

Input
The first line of the input contains a single integer n (2 ≤ n ≤ 105) — the number of nodes in the tree. Next n lines contain pairs of space-separated integers ci, si (0 ≤ ci ≤ 1, 0 ≤ si ≤ 109), where ci stands for the color of the i-th vertex (0 is for white, 1 is for black), and si represents the sum of values of the edges that are incident to the i-th vertex of the tree that is painted on the board.

Output
Print the description of n - 1 edges of the tree graph. Each description is a group of three integers vi, ui, wi (1 ≤ vi, ui ≤ n, vi ≠ ui, 0 ≤ wi ≤ 109), where vi and ui — are the numbers of the nodes that are connected by the i-th edge, and wi is its value. Note that the following condition must fulfill cvi ≠ cui.

It is guaranteed that for any input data there exists at least one graph that meets these data. If there are multiple solutions, print any of them. You are allowed to print the edges in any order. As you print the numbers, separate them with spaces.


Sample input
3
1 3
1 2
0 5
Sample output

3 1 3
3 2 2

Sample input
6
1 0
0 3
1 8
0 2
0 3
0 0

Sample output
2 3 3
5 3 3
4 3 2
1 6 0
2 1 0
To solve this problem, you can iterate over the nodes and use the node colors and values to reconstruct the tree. Here's a rough outline of a possible solution:

Start with an empty list of edges.
Iterate over the nodes, starting from the first one. For each node, do the following:
If the current node is white, find the next black node in the list and create an edge between the two nodes with a value equal to the difference between their sv values.
If the current node is black, find the next white node in the list and create an edge between the two nodes with a value equal to the difference between their sv values.
Repeat this process until you have processed all the nodes.


function restoreTree(n: number, nodes: Array< [number, number] > ) : Array < [number, number, number] > {
const edges: Array<[number, number, number]> = [];
for (let i = 0; i < n; i++) {
const [ci, si] = nodes[i];
let j = i + 1;
while (j < n && nodes[j][0] === ci) {
j++;
}
if (j < n) {
const [cj, sj] = nodes[j];
edges.push([i + 1, j + 1, Math.abs(si - sj)]);
}
}
return edges;
}


Courtesy, ChatGPT.
ProgrammingRe: Let's Talk About OpenAI ChatGPT. What's The Future of Developers ? by truthCoder: 9:13am On Dec 17, 2022
truthCoder:
Unfortunately, chatGPT would become a paid service very soon. There are other products by openai which are fully paid for.

GitHub copilot started as a free trial before they locked it up behind a paywall after we have used our codes to finetune its training.

As long as chatGPT is free, we would keep using
As i said here, its all about the money.

OpenAI has announced that it is expecting $1 billion in revenues for 2024.

Na who no smart na him fasting dey kill.

Now the question, would i pay for chatGPT? The answer is a resounding YES.

I dont mind paying based on my experience with it in the last few days.

It has made my job and life so much easier. Google search looks like one antique service from 1970 in comparison.

Advanced sql queries, code refactoring, process designs, back and forth discussions about a project and even i was able to write a romantic letter to my french girlfriend in french and she was just blushing grin

Many tech companies are having disruptive meetings right now on adapting this to their products

As i said earlier, na who no smart na him fasting dey kill.

ProgrammingRe: Let's Talk About OpenAI ChatGPT. What's The Future of Developers ? by truthCoder: 8:55am On Dec 17, 2022
dapojaja:
Afraid or not, the reality is what we're talking about here. Script copying, third party modules are what make your live easier as a programmer. A farm labours job are definitely at risk the day the farm owner decides to bring in farming machineries.
Let me make one thing very clear to you. The untold reason why slave trades were eventually abolished globally were not because of global advocation, it was because of advent and advancement of machines that made it possible for slave masters to eventually let go. Imagine slavery is real job. Do you know how many people have lot their jobs?
Can you even see what's already happening in tech industry? The birth source of AI. This is not being pessimistic, its just being reasoning outside the box. Thoughtfully.
I like your response. Yes farm labourers jobs are at risk when the tractor comes in. Now are you a farm owner or a farm labourer?

Laborious or tedious parts of a process are just necessary evils.

We are humans and the main thing that separates us from other animals is our ability to identify useful resources and adapt them to our convenience in such manners that it makes our lives more comfortable than what nature intended.

That is why we live in houses and not on trees. The main reason why we cook our food etc.

Should we now limit a chance to better development for the whole human race because some labourers are afraid of adapting?
ProgrammingRe: Let's Talk About OpenAI ChatGPT. What's The Future of Developers ? by truthCoder: 7:32pm On Dec 16, 2022
A lot of people who are afraid that AI would take their jobs are not real programmers to begin with.

It is like a farmer getting afraid that a Tractor will take their job because it can plough faster and better.

Learn to decide which is your real job and use all available tools to make it more efficient

If you just belong to the pool of script copiers, then i am sorry, your days are numbered.

If however, you are more focused on the logic and management side of coding, how would a tool that will make your life easier be a threat?
ProgrammingRe: What Programming Languages Do You Know? by truthCoder: 2:37pm On Dec 16, 2022
Great thread.
ProgrammingRe: Help! My Site On Github Doesn't Load Properly But It's perfect on my Local web. by truthCoder: 11:46am On Dec 14, 2022
Solanaa:
whenever I host a website on GitHub it doesn't load properly, More of as if the CSS wasn't link very well and some image files too.

To confirm the fault is not from me, I decided to host on netlify and it worked perfectly just like my local web browser.

Is this a common problem? I believe the answer is NO, so please how do I solve this isshhh?
Share a link to the code if public and let’s review.

I have my production codes on GitHub with no issues whatsoever.

There are thousands, if not millions of production codes on GitHub
PhonesRe: Iphone Users Pls Why Is My Phone Doing This. by truthCoder: 7:35am On Dec 13, 2022
Blake755:
Not really that I don't have money for data but the was just making me to spend unnecessarily
How was iPhone making you spend unnecessarily?

You wake up to debit alerts from your billions balanced account?

Lamba United
PhonesRe: Iphone Users Pls Why Is My Phone Doing This. by truthCoder: 7:33am On Dec 13, 2022
henrygold100:
no oo, I don’t know if it’s update Abi wetin, it say a problem has been dictated with true dept sensor Abi wetin.

If I go to general and about phone, this will appear, if I go to learn more the later will appear
They have sold you gbewu dani.

You just bought a refurbished iphone. Battery too is not genuine.

Next time, always mask your serial number when sharing screenshots. This is not android pemi pada.

Unfortunately, you need to return the phone and collect your money or use like that.
PhonesRe: Iphone Users Pls Why Is My Phone Doing This. by truthCoder: 7:30am On Dec 13, 2022
Allison012:
So your durable and reliable iphone is having issues?? wonders shall never end.


Thought iphone would never have issues because of the way it's perfectly made. base on iphone users.
Which issues did you notice there?

OP no get data don turn to issues for you?

Oluaye infinix dey get opinions

1 2 3 4 5 6 7 8 ... 16 17 18 19 20 21 22 23 24 (of 49 pages)