Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,195,582 members, 7,958,796 topics. Date: Thursday, 26 September 2024 at 01:19 AM

Benjibabs's Posts

Nairaland Forum / Benjibabs's Profile / Benjibabs's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (of 8 pages)

Religion / Re: Why Is The God In The New Testament Different? by benjibabs(m): 12:16am On Jun 24, 2023
TheMadame:
Good day to my brothers and sisters in Christianity. May the Lord be with all of us. May the Lord refresh us and give us the knowledge to attain everlasting life in heaven.
Please I write to seek knowledge on a topic which distressed me. This is the dichotomy between the God of the new testament and God in the old testament of our holy Bible.
The God in the Old testament comes across as very angry over issues,while the God of new testament comes across as kind and loving . Benevolent, forgiving, blessing and the father of all creation,while the old testament of the Bible reflects God as only for the nation of Israel. I welcome any explanation with Bible passages to enlighten
God bless as you contribute to this discourse. Apologies for poor spelling and please let us avoid insulting language.
Thank you.

Short answer: God is the same back in the Old Testament period and now, in the New Testament era. The way He dealt with sin then was different from the way He is dealing with sin now. Hence, the perception of a very angry God back then and a gracious God now. During the Old Testament period, God dealt with sin with laws - you do this, you get this, period! And yes, the law was for the Israelites only. Fast forward to the New Testament period, God sent His son to die in order to pay the price for the sins of the world, thereby God's wrath against sin was pacified. However, only those who received the gift of salvation through the death of God's son will be saved on the day He has appointed to judge the world.

Long answer: If you read the short answer carefully, you should have a lot of questions like, Why did God change the way he is dealing with sin? Why did He use law in the Old Testament? Why was the law for the Israelites only? Why did He send his son to die for sins? If God's wrath against sin has been pacified in the New Testament, does it mean sinners now are going scot-free? This is the reason for the long answer: Each of those questions and others you may have, would require pages of explanation. I'm not going to write epistles here, but I will point you in the right direction to get the truth. My first recommendation is for you to get a good overview of the books in the Bible and how they are strung together to form a complete story with one theme. Once you get a good grasp of the storyline from Genesis to Revelation, most of your questions would have been answered.

There is an excellent resource I came across a few months ago which I will strongly recommend. The program is called SEAMLESS, by Angie Smith. It is a 7-week program that will take you through the whole Bible by focusing on certain points in the storyline. You won't get a theology degree for going through the program, and it is not like reading your Bible through in a 7-week program, but a simple, general overview of the complete storyline of the Bible. This will greatly help you to put each book in perspective when studying your Bible. The program is designed for small group discussion. You can go through it by yourself, but you will benefit from other people's contributions in a small group setting. You may want to check out some of the videos for the program on YouTube. My prayer is that God will guide you into all truth and keep you away from all strange teachings.

Shalom!
Programming / Blockchain Demo by benjibabs(m): 4:07am On Jan 17, 2022
Hey Folks,

If you have been trying to get a better understanding of blockchain and you are tired of the same basic explanations on the web, check out this video:

https://andersbrownworth.com/blockchain/

Also, if you are a Python programmer and want to get into developing smart contracts on the blockchain, check out the video below:


https://www.youtube.com/watch?v=M576WGiDBdQ&t=2587s

Those two videos are sooooooo good I couldn't resist to share them.

Happy learning and coding! smiley

1 Like

Programming / Re: Don't Know What Next To Do After Learning Python by benjibabs(m): 7:23am On Oct 09, 2021
Learning a programming language to develop a software is way more than learning the syntax. My advice is this: get a python book that walks you through developing a sample software. Study the book thoroughly, completing all suggested tasks and typing out all the codes. This will introduce you to some of the concepts, techniques and methodology you need to know to develop a software. Are you familiar with the terms such as frameworks, bootstrap, dependency manager, libraries, DRY, OOP etc ? Studying a book with a sample project will demystify all those terms and many more.

When you’re done with the book, get yourself a pet project and follow the methodology your learned in the book to complete it. You will encounter lots of issues that will lead you to learn more rstuff to solve. You may want to join some python communities where you can ask for help when you get stuck.

Are you still with me? Ok. Next will be the almighty right of passage! This is where you’ll code a software development framework based on python. It does not have to come with all the bells and whistles, Just a decent framework. Once you complete this, you will be ready to take on commercial project with confidence and ease.

Good luck!

NB. My advice is purely from my experience learning PHP; it is not set in stone. However, I believe the experience is transferable to any other language. Feel free to skip steps or add more steps as you see fit. I hope my experience and others you may come across will help you to chart your own path, and make your journey a lot easy.
Religion / Re: Pastor Chris Oyakhilome 'Exposes' Coronavirus And 5G Network (Video) by benjibabs(m): 7:30am On Apr 05, 2020
Maestro21:


Did he say that 5G burnt the plants or that the plants around where the masts were placed got burnt?

You are kidding me, right?
Religion / Re: Pastor Chris Oyakhilome 'Exposes' Coronavirus And 5G Network (Video) by benjibabs(m): 5:49am On Apr 05, 2020
Kirinwa:


You didn't watch the video.

I did bro! But leave that. Let me add two points to the list:
11. God sent Covid-19 to punish China, and now the whole world for our sins
12. US and Europe instigated the protest in Hong Kong to cut China’s ”take-over everywhere” wing but failed. They then dropped corona virus on China. China got hold of the virus, tweaked it, made it deadlier and sent back to senders.
Religion / Re: Pastor Chris Oyakhilome 'Exposes' Coronavirus And 5G Network (Video) by benjibabs(m): 5:30am On Apr 05, 2020
Kirinwa:



5 and 10 seem plausible.
10 is silly (not you). grin Why would any one shutdown the planet to install some Comms equipment?
Religion / Re: Pastor Chris Oyakhilome 'Exposes' Coronavirus And 5G Network (Video) by benjibabs(m): 5:09am On Apr 05, 2020
Maestro21:



Where did he say 5G burns plants?

Part 1 : 2:07 - 2:15

There is no need to answer the other questions since you are already biased to the point of not even hearing all he said.
Religion / Re: Pastor Chris Oyakhilome 'Exposes' Coronavirus And 5G Network (Video) by benjibabs(m): 4:29am On Apr 05, 2020
A quick google search will show you that providers have started to roll out 5G network in the US and no death has been reported.

It is a shame that someone as highly educated and well travelled as pastor Chris would fail to do simple research before spreading such uninformed opinion. Where exactly did he see plants getting burned by 5G? Is there no one in IT In his church that could help him understand 5G?

Again, let’s apply common sense: the “THEY” all these conspiracy theorists are referring to who are trying to kill everyone with 5G, would they not be exposed to the same 5G? Or maybe they have anti-5G radiation jackets?

To explain this to my granny, I would say 5G is simply a much faster network than 4G, and the radiation level is still within a safe and acceptable level. Period!

What people are afraid of are the various applications of the 5G network. For example, real time tracking that is not possible on 4G will be possible on 5G. Is that a good thing? It depends. Self-driving cars and other IOT devices that require real-time data to function safely and perfectly will now be possible. And just like any good thing in life, some folks will explore the new possibilities with 5G network to do bad things.

1 Like

Religion / Re: My Take On The Doctrine Of Trinity And Those Saying Jesus Is God Almighty! by benjibabs(m): 1:41pm On Oct 26, 2019
uzuede4:
It is interesting to note that even Christ who people call almighty God never laid claim to that. Jesus always made it clear that all he is doing does not originate with him, but comes from the father who has sent him (John12:44-50).
During his baptism, as Jesus was coming out of the Jordan, the holy spirit descended on him in form of a dove, and a voice from heaven said, "This is my son, the beloved, whom i have approved". (Matt 3:16,17). That scripture shows clearly that Jesus was sent by someone, and he is not God Almighty since he can't be getting batised and approving himself from heaven at the same time.
In John 14:28. Jesus himself acknowledged the fact that his father is greater than he is, and in verse 31, he said he is doing just as the father has commanded him.
Jesus further differentiated between himself and God when he gave the illustration of the vine and cultivator (John15:1-10). Jesus asked his disciples to pray to the father in his name, not vice versa. No one prays to Jesus inGod's name, rather, we pray to God in Jesus name(John 15:16).
In Col 1:15, Jesus is called the firstborn of all creation. We all know that God is was not created by anyone, but Jesus was created by God.
This goes to show that there is no equality between God and Jesus. Even Jesus never seized any opportunity to be equal to God. Phil 2.

The bold portion caught my attention. Read the verses below and pay particular attention to verse 6.

Philippians 2:5-8 Good News Translation (GNT)

5 The attitude you should have is the one that Christ Jesus had:

6 He always had the nature of God,
but he did not think that by force he should try to remain[a] equal with God.

7 Instead of this, of his own free will he gave up all he had,
and took the nature of a servant.
He became like a human being
and appeared in human likeness.
8 He was humble and walked the path of obedience all the way to death—
his death on the cross.
Religion / Re: My Take On The Doctrine Of Trinity And Those Saying Jesus Is God Almighty! by benjibabs(m): 1:36pm On Oct 26, 2019
OneJ:

Benjibabs ,in the same manner that Jesus & his disciples are one (john17:11,,21) just as husband & wife are one (matt19:4-6). Can two walk together (in unity) unless they agree? Amos 3:3.

Take a look at this one:

Philippians 2:5-8 New Living Translation (NLT)

5 You must have the same attitude that Christ Jesus had.

6 Though he was God,[a]
he did not think of equality with God
as something to cling to.
7 Instead, he gave up his divine privileges[b];
he took the humble position of a slave[c]
and was born as a human being.
When he appeared in human form,[d]
8 he humbled himself in obedience to God
and died a criminal’s death on a cross.

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

Philippians 2:5-8 Good News Translation (GNT)

5 The attitude you should have is the one that Christ Jesus had:

6 He always had the nature of God,
but he did not think that by force he should try to remain[a] equal with God.
7 Instead of this, of his own free will he gave up all he had,
and took the nature of a servant.
He became like a human being
and appeared in human likeness.
8 He was humble and walked the path of obedience all the way to death—
his death on the cross.
Computers / The Next Dimension Of Printing Has Arrived - 4d Printing. ** by benjibabs(m): 5:22am On Jun 27, 2019
Imagine flat-packed furniture that can assemble itself, or a water pipe that can repair itself if it breaks or bursts. Items that are too large for a 3D printer can be printed using a compressed design and then self-assemble on its own.
Just as importantly, many 4D-printed objects are being designed to return to their shape once the stimuli are removed. Imagine a building that repositions itself to brace for an earthquake, then shrinks back to normal afterward.

https://store.hp.com/app/tech-takes/4d-printing-already?utm_content=S2R5C1_Mod3&jumpid=em_com_nc_ns&aoid=190122740&utm_medium=em&utm_source=sf&rid=FEB729CE1C71A114984CB5613FD75719&test=&jobid=1901227&emailid=100185
Programming / Re: Why Waste 4 Years On Computer Science In University? by benjibabs(m): 4:09pm On Feb 07, 2019
pjosh1:
This is a conversation between my uncle and I.

Uncle: Josh, what course do you want 2 study.
Me: Computer Science
Uncle: Why
Me: Because I like it
Uncle: Do you know any programming language
Me: Yes, I know python and am still learning it.
Uncle: Who taught you?
Me: I learnt it by my self.
Uncle: Do not study com. Sci
Me: Why?
Uncle : Why waste 4 years in a Nigerian university studying Computer Science when you can learn it on your own or even register and learn it somewhere else.

Me: I will need the certificate when looking for work.

Uncle: Look, even if you want to learn computer science don't depend on your cert. When looking for work, you can work on your own.

To some extent, what he said is true. I advice other student not to take Computer Science as a course.

School is not only about a certificate. The life lessons you learn going through the campus are invaluable. Really, there is nothing stopping you from doing both simultaneously - while in school, learn a programming language. School will teach you computer fundamentals which will make you a better programmer. If you can get into a school with updated computer curriculum, that would be a great option.
Programming / Re: Jave Script Or PHP by benjibabs(m): 5:32pm On Jan 11, 2019
mikezuruki:
Hello Everyone. Happy new year.

I started off my journey in programming with python last month, and so far, it has been really good experience.

With my little experience so far, I've come to know that every programming language has its advantage over others in its unique way.

Python for me is not the best option for Web development, so I'm in a cross road to seek advise from masters here as regards the subject above.

The option advised should be based on easier syntax, fast in running, interactive nature of the site, and the level of complexity in learning either one.

I would sincerely appreciate comments.

warm regards!

I think the first thing to do is to define what you want to achieve. Do you want to learn programming as an hobby or do you want to be a pro in it? Frontend or backend ? Web, desktop or mobile? So, ask yourself what do you want to do with the programming skills at the end of the day?
When you nail that down, selecting a language and track will be easy.

You may want to check out this post to spark your interest.

https://www.nairaland.com/4781324/web-developer-roadmap-2018
Religion / Re: The Matter Of Tithing: My Personal Encounter With The Bible by benjibabs(m): 12:09pm On Dec 23, 2018
3. How Is it to Be Distributed:

A. The Priests, Pastors, Apostles:
Nehimiah 13:5, Neh 12:44, Acts 4:36, Acts 4:34-35, Numbers 18:21, 24-26, Galatians 6:6

B. The Brethern in Need I.e GOD'S People In Need.. Acts 4:34-35, Romans 12:13

C. The Poor in the Society: Luke 18:22-25..

Bro, you have actually contradicted yourself with some of the verses you referenced. See below and pay particular attention to the bold portions.

Acts 4:34-37

“Nor was there anyone among them who lacked; for all who were possessors of lands or houses sold them, and brought the proceeds of the things that were sold, and laid them at the apostles’ feet; and they distributed to each as anyone had need. And Joses, who was also named Barnabas by the apostles (which is translated Son of Encouragement), a Levite of the country of Cyprus, having land, sold it, and brought the money and laid it at the apostles’ feet.”
‭‭Acts‬ ‭4:34-37‬ ‭NKJV‬‬
http://bible.com/114/act.4.34-37.nkjv

Luke 17:22-25

“So when Jesus heard these things, He said to him, “You still lack one thing. Sell all that you have and distribute to the poor, and you will have treasure in heaven; and come, follow Me.” But when he heard this, he became very sorrowful, for he was very rich.”
‭‭Luke‬ ‭18:22-23‬ ‭NKJV‬‬
http://bible.com/114/luk.18.22-23.nkjv

As you can see, those people gave ALL, not 10%. Jesus also said ALL. Why did they not only bring 10% or why did Jesus not ask the rich guy to only give 10% to the poor?

The key to understand where tithing falls in our time is in the book of Hebrews; study that book and you will get the big picture.

Now, to put a spin on the response above and show you another side of tithing you did not mention, consider the following verses from the Old Testament. Also, pay particular attention to the bold parts.

“Thou shalt truly tithe all the increase of thy seed, that the field bringeth forth year by year. And thou shalt eat before the Lord thy God, in the place which he shall choose to place his name there, the tithe of thy corn, of thy wine, and of thine oil, and the firstlings of thy herds and of thy flocks; that thou mayest learn to fear the Lord thy God always. And if the way be too long for thee, so that thou art not able to carry it; or if the place be too far from thee, which the Lord thy God shall choose to set his name there, when the Lord thy God hath blessed thee: Then shalt thou turn it into money, and bind up the money in thine hand, and shalt go unto the place which the Lord thy God shall choose: And thou shalt bestow that money for whatsoever thy soul lusteth after, for oxen, or for sheep, or for wine, or for strong drink, or for whatsoever thy soul desireth: and thou shalt eat there before the Lord thy God, and thou shalt rejoice, thou, and thine household,”
‭‭Deuteronomy‬ ‭14:22-26‬ ‭KJV‬‬
http://bible.com/1/deu.14.22-26.kjv

Did you read this: And thou shalt bestow that money for whatsoever thy soul lusteth after? tongue

2 Likes

Programming / Web Developer Roadmap - 2018 by benjibabs(m): 8:29pm On Oct 10, 2018
Do you want to be a web developer or learn programming and you don't know where to start? I came across this blog post (Web Developer Roadmap - 2018) while researching a PHP class. The author did a great job of outlining what to learn, where to start and how to practice in order to become a web developer in the the different tracks. I've attached the infograph for the frontend track to this post. Visit the blog site for details of the different modules and also for the backend and devops tracks. The three tracks are in the GitHub profile of the author.

Blog post: https://medium.com/tech-tajawal/modern-frontend-developer-in-2018-4c2072fa2b9c
Github link: https://github.com/kamranahmedse/developer-roadmap

Religion / Re: Ijebu, The Yoruba & Their Influence On The Bible & Judaism- Reno Omokri by benjibabs(m): 12:23am On Oct 10, 2018
Ehya! The dark clouds of the black Jesus movement have enveloped Reno's soul -
poor thing!

There are lots of holes in Reno’s article, but the portion below held my attention for a while. Did he even fact-check the verse ?


. . .
A lot of the spiritual and physical laws which Moses passed on to the Hebrews in
the form of the religion of Judaism were actually taught to him by his Black father-
in-law. How do I know? Because the bible says so.
Exodus 18:24 says:
“Moses listened to his father-in-law and did everything he said.”

This is by far the most misleading reference of all that Reno quoted. This verse (Exodus 18:24) only refers
to the advice Jethro gave to Moses when he was burning himself out due to
judging the Israelites singlehandedly. Please step back and read the whole of
Exodus 18 to in order to put this verse in the right context. No where was there a nention of Jethro teaching Moses anything Judaism in the chapter or even in the whole Bible.

Exodus 18:13 – 14 :13 And so it was, on the next day, that Moses sat to judge the people; and the
people stood before Moses from morning until evening. 14 So when Moses’ father-in-law saw
all that he did for the people, he said, “What is this thing that you are doing for the people?
Why do you alone sit, and all the people stand before you from morning until evening?”

17 So Moses’ father-in-law said to him, “The thing that you do is not good. 18 Both you and
these people who are with you will surely wear yourselves out. For this thing is too much for
you; you are not able to perform it by yourself. 19 Listen now to my voice; I will give you
counsel, and God will be with you:
Stand before God for the people, so that you may bring
the difficulties to God. 20 And you shall teach them the statutes and the laws, and show them
the way in which they must walk and the work they must do. 21 Moreover you shall select from
all the people able men, such as fear God, men of truth, hating covetousness; and place such
over them to be rulers of thousands, rulers of hundreds, rulers of fifties, and rulers of tens. 22
And let them judge the people at all times. Then it will be that every great matter they shall
bring to you, but every small matter they themselves shall judge. So it will be easier for you, for
they will bear the burden with you. 23 If you do this thing, and God so commands you, then you
will be able to endure, and all this people will also go to their place in peace.” 24 So Moses heeded the voice of his father-in-law and did all that he had said. 25 And Moses
chose able men out of all Israel, and made them heads over the people: rulers of thousands,
rulers of hundreds, rulers of fifties, and rulers of tens. 26 So they judged the people at all times;
the hard[i] cases they brought to Moses, but they judged every small case themselves.
Religion / Re: My Take On The Doctrine Of Trinity And Those Saying Jesus Is God Almighty! by benjibabs(m): 9:57pm On Jul 03, 2018
tomakint:
God is Supreme and He Alone Is One but how come some Christians call Jesus God When the Bible never said so. Below is my take with references from the Holy Scriptures;

I Saw In The Night Visions, And, Behold, One Like The Son Of Man (Jesus Christ) Came With The Clouds Of Heaven, And Came To The Ancient Of Days (God Almighty Father, Yahweh), And They Brought Him Near Before Him. (Daniel 7: 13)
The Revelation Of Jesus Christ, Which God (Yahweh, Jehovah) Gave Unto Him, To Shew Unto His Servants Things Which Must Shortly Come To Pass; And He Sent And Signified It By His Angel Unto His Servant John: (Revelation 1:1)

Jesus Said Unto Them, If God Were Your Father, Ye Would Love Me: For I proceeded Forth And Came From God (Yahweh); Neither Came I Of Myself, But He Sent Me. (John 8: 42) How Come Trinitarians Are Preaching Three Gods With Equal Powers And Strength When The Bible Never Said So. What Do You Believe? Bible Never Calls Jesus As God Almighty But Calls Him Only Begotten Son Of God Who Is Subservient To God Almighty And Was Sent By God To Redeem All Mankind To God Almighty By The Shedding Of His Precious Blood As Instructed By The Ancient Of Days.

@the bold portion - Which version of the bible are you reading? see below:

John 10:30 King James Version (KJV)
30 I and my Father are one.
Celebrities / Re: Bill Cosby Found Guilty On All 3 Counts In Sexual Assault Retrial by benjibabs(m): 8:16pm On Apr 26, 2018
thatigboman:
american judicial system no send u. Remember they jailed Will Smith for underpaying tax
Source? shocked shocked shocked

He was never jailed; uncle Sam only follow am chop him income till he finished paying his igbese. (They call it income ganishing.)

1 Like

Science/Technology / Re: Why My Fuelless Generator Is So Unique by benjibabs(m): 5:09pm On Feb 02, 2018
This is a good thinking & trial considering that you are a self-taught 'engineer'; however, your idea is not new. Basically, you power a motor with a battery and also use the rotating motion of the motor to generate electricity to recharge the same battery (alternator principle). Yes, in theory, this seems like it will work great, but other factors come into play in practical. Energy transfer from one form to another will always be accompanied by energy loss.

Below is a response (copy & paste) from a forum so I don't need to type all the stuff all over. This response succinctly captures the principles you should be aware of:
===================

Example one: We have a battery that is supplying energy to a motor. The motor spins as a result of the conversion of electrical energy into mechanical energy. Heat is also produced in the process and this energy is lost to the environment and is not practically recoverable. Suppose for this example 80 joules of energy is going into spinning the motor and 20 joules of energy is being wasted as heat. This motor is said to be 80% efficient. Now let's assume that we have a crank on the motor and we can turn that crank very fast. We begin turning the crank with all our might and the chemical energy of our muscles is converted to the mechanical spin of the motor. At some point we will be spinning the motor fast enough so that it is no longer using energy from the battery. The crank is keeping the motor spinning and the electricity that is being made by the motor by our efforts on the crank exactly equals the energy supplied from the battery. At this point the system is in electrical equilibrium. If we want to charge the battery however we have to increase the energy and speed of the turning of the crank. Now the voltage that we are producing by turning the crank is greater than the voltage of the battery and energy starts to flow back into the battery and the battery recharges. In this direction we will not be as efficient and perhaps 50% of our effort will be lost to heat and will not be practically recoverable. Since electrical energy can only move one direction at a time we can not use the battery to spin the motor and use the spin of the motor to recharge the battery simultaneously at the same time. We also loose energy to heat in both directions.

Example two: We have a battery spinning a motor and at the same time we have a battery of a lower voltage connected across the circuit. In this case energy from the higher voltage battery spins the motor as before. Energy from the higher voltage battery will also flow to the lower voltage battery and recharge it. However the energy we loose from the big battery will be much greater than what is gained in the smaller battery. All the while we are doing this the motor will run use the same energy as before and contribute nothing.

There are no circuits no matter how sophisticated that can get around the fact that we can not create energy. We can convert energy from one form to another but always with a cost of loss of some of the energy that is converted. It is like pouring water from one container to another using leaky pipes. We will always have less after the process than we began with. Check out the Second Law of Thermodynamics.
I hope this clarifies a bit.

=====

See the full thread here: https://www.element14.com/community/thread/44536/l/battery-charging-using-dc-motor?displayFullThread=true

I really commend you for thinking and trying to help with the power issue in Nigeria. Keep going bro!

cool

1 Like

Programming / Re: Please Help Look At My Code (what is wrong with my code ) by benjibabs(m): 4:35am On Jan 24, 2018
Looks good!

nicolas247:

my final Code

<?php
require_once('config.php');
error_reporting(1);
// Pull all the required data from the three tables into one 2 level array
$sql = 'select * from january UNION ALL select * from february UNION ALL select * from march UNION ALL select * from april UNION ALL select * from may UNION ALL select * from june UNION ALL select * from july UNION ALL select * from august UNION ALL select * from september UNION ALL select * from october UNION ALL select * from november UNION ALL select * from december';
$query = $pdo->prepare($sql);
$query->execute();
$row = $query->fetchAll();

// Pull a list of all the staffId from one of the table assuming we have the same number of IDs in all tables
// I added UNION to the select statement because of some record not in all of the table and that works very fine
$sql1 = 'select staffId, name FROM january UNION select staffId, name FROM february UNION select staffId, name FROM march UNION select staffId, name FROM april UNION select staffId, name FROM may UNION select staffId, name FROM june UNION select staffId, name FROM july UNION select staffId, name FROM august UNION select staffId, name FROM september UNION select staffId, name FROM october UNION select staffId, name FROM november UNION select staffId, name FROM december';
$query = $pdo->prepare($sql1);
$query->execute();
$staffIdList = $query->fetchAll();
// start a loop to loop through the list of the staffIds
foreach ($staffIdList as $staffIdList) {


//initialize the variable that will store the sum of each column
$loanamt = 0;
$loan_int = 0;
$saving = 0;
$total = 0;



//start a loop to loop through the 2 level array
foreach ($row as $key => $value){



// use an IF statement to select each of the staffIds and corresponding columns (loan_amt etc) and add them together as the loop runs
if ($row[$key]['staffId']== $staffIdList['staffId']){
$loanamt += $row[$key]['loan_amt'];
$loan_int += $row[$key]['loan_int'];
$saving += $row[$key]['saving_ded'];
$total += $row[$key]['total_ded'];
}
}
// print out the values after each staffId iteration
//echo $staffIdList['staffId']." ".$loanamt." ".$saving." ".$total."</br>";
echo "<tr>";
echo "<td>".$staffIdList['staffId']."</td>";
echo "<td>".$staffIdList['name']."</td>";
echo "<td>".$loanamt += $row[$key]['loan_amt']."</td>";
echo "<td>".$loan_int += $row[$key]['loan_int']."</td>";
echo "<td>".$saving += $row[$key]['saving_ded']."</td>";
echo "<td>".$total += $row[$key]['total_ded']."</td>";
echo "</tr>";
}


?>
Programming / Re: Help With Htacess Multiple Rewrite Rules by benjibabs(m): 5:44am On Jan 23, 2018
youngscholar:
RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^([^/]*)$ /topics.php?url=$1 [L]

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^([^/]*)$ /marktet.php?url=$1 [L]

How can I make both working..Only the first one works..Please assist.

What are you trying to achieve with the rewrite rule?
Programming / Re: Please Help Look At My Code (what is wrong with my code ) by benjibabs(m): 7:44pm On Jan 22, 2018
nicolas247:
You are the bomb
thanks so much
problem solved though i am finding it difficult to add a column with staff's name.


You are welcome! I'm glad that got you off the hook. grin

You can easily add the column for the staff name by pulling the column with the names along with the staffid as below:

. . .

// Pull a list of all the staffid & Staff_name from one of the table assuming we have the same number of IDs in all tables
$sql1 = 'select staffid, staff_name FROM january';
$query = $pdo->prepare($sql1);
$query->execute();
$staffIdList = $query->fetchAll();

and then echo it out as below with the other columns:
. . .

// print out the values after each staffid and staff_name iteration
echo $staffIdList['staffid']." ".$staffIdList['staff_name']." ".$loanamt." ".$saving." ".$total."</br>";

change staff_name to the name of the column where you have the staff names.

Happy coding! smiley
Programming / Re: Please Help Look At My Code (what is wrong with my code ) by benjibabs(m): 6:05pm On Jan 19, 2018
Here you go:

Note:
I used PDO instead of mysqli to connect to mysql database. However, the logic will still work so far you have the data in a multilevel array after using mysqli.

// Pull all the required data from the three tables into one 2 level array
$sql = 'select * from january UNION ALL select * from february UNION ALL select * from march';
$query = $pdo->prepare($sql);
$query->execute();
$row = $query->fetchAll();

// Pull a list of all the staffid from one of the table assuming we have the same number of IDs in all tables
$sql1 = 'select staffid FROM january';
$query = $pdo->prepare($sql1);
$query->execute();
$staffIdList = $query->fetchAll();

// start a loop to loop through the list of the staffids
foreach ($staffIdList as $staffIdList) {

//initialize the variable that will store the sum of each column
$loanamt = 0;
$saving = 0;
$total = 0;

//start a loop to loop through the 2 level array
foreach ($row as $key => $value){

// use an IF statement to select each of the staffids and corresponding columns (loan_amt etc) and add them together as the loop runs
if ($row[$key]['staffid']== $staffIdList['staffid']){
$loanamt += $row[$key]['loan_amt'];
$saving += $row[$key]['Saving_ded'];
$total += $row[$key]['total_ded'];
}
}
// print out the values after each staffid iteration
echo $staffIdList['staffid']." ".$loanamt." ".$saving." ".$total."</br>";
}



Depending on the number of columns and tables you are dealing with, the solution might not be efficient.

Happy coding! grin









benjibabs:
Have you resolved it?

You should also provide details of what your code should achieve and not the output only.

From the code you posted, I think the result you are expecting is the sum of saving_ded, total_ded from Jan, feb & mar tables for each staffid. Is this accurate? If it is, your code is not complete yet. What your code is returning as it is is a 2 level array with all rows from each table as arrays. You need to find a way to select each staffid and corresponding xyz_ded values and add up the values, save them in another array and them echo them as needed. You may also be able to use MySQL statements to sum up the values before retrieving with php. I’ll try my hands on it later today and post my codes.

Happy coding ! cheesy

Programming / Re: Please Help Look At My Code (what is wrong with my code ) by benjibabs(m): 6:19am On Jan 19, 2018
Have you resolved it?

You should also provide details of what your code should achieve and not the output only.

From the code you posted, I think the result you are expecting is the sum of saving_ded, total_ded from Jan, feb & mar tables for each staffid. Is this accurate? If it is, your code is not complete yet. What your code is returning as it is is a 2 level array with all rows from each table as arrays. You need to find a way to select each staffid and corresponding xyz_ded values and add up the values, save them in another array and them echo them as needed. You may also be able to use MySQL statements to sum up the values before retrieving with php. I’ll try my hands on it later today and post my codes.

Happy coding ! cheesy
Webmasters / Let'sencrypt.org - Get Free SSL Cert For You Site by benjibabs(m): 4:19pm On Sep 21, 2017
Hello Webmasters,

Just in case you have not seen this . . .

Let'sencrypt.org is providing SSL certs for free. I just installed their free certs for two of my domains; both are working fine so far. The info on the "ABOUT" page on their web site (https://letsencrypt.org) has a good summary of what they do and why. See below.

========

Let’s Encrypt is a free, automated, and open certificate authority (CA), run for the public’s benefit. It is a service provided by the Internet Security Research Group (ISRG).

We give people the digital certificates they need in order to enable HTTPS (SSL/TLS) for websites, for free, in the most user-friendly way we can. We do this because we want to create a more secure and privacy-respecting Web.

The key principles behind Let’s Encrypt are:

Free: Anyone who owns a domain name can use Let’s Encrypt to obtain a trusted certificate at zero cost.
Automatic: Software running on a web server can interact with Let’s Encrypt to painlessly obtain a certificate, securely configure it for use, and automatically take care of renewal.
Secure: Let’s Encrypt will serve as a platform for advancing TLS security best practices, both on the CA side and by helping site operators properly secure their servers.
Transparent: All certificates issued or revoked will be publicly recorded and available for anyone to inspect.
Open: The automatic issuance and renewal protocol will be published as an open standard that others can adopt.
Cooperative: Much like the underlying Internet protocols themselves, Let’s Encrypt is a joint effort to benefit the community, beyond the control of any one organization.

We have a page with more detailed information about how the Let’s Encrypt CA works.
===

BTW, do you know that HTTPS is now a ranking signal on Google?

https://webmasters.googleblog.com/2014/08/https-as-ranking-signal.html

This is a good time to grab a free SSL cert to improve the ranking of your site on google.

Enjoy! cool
Gaming / Re: How Can I Improve On My Skills In Playing CHESS? by benjibabs(m): 5:45am On Sep 10, 2017
EniHolar:
I have interest in playing chess since the first time I saw some guys playing it over 10 years ago. Although I never knew what the game was all about but from the way they gave it 100% unwavering attention, I knew the gains will be worth the pains. Someone (an amateur too sha grin ) later explained the functions of the 'people' on the chessboard (some months back when I went visiting)... and I realised it's actually more than a game.

I downloaded the app but if I play it 50 times, the computer will win 50 times cheesy despite the fact that I'm still on 'level one'. I even used it as my wallpaper (maybe seeing it always will enhance my ability) but it didn't help... angry

Please I will like any member who would be willing to share basic techniques with me... maybe there's something I'm yet to get right. Any necessary tip you share will be welcomed. Someone out there may also develop an interest in it as u share your knowledge on it.

Thanks

What have you learn so far? Just how the pieces move?

Since an amateur explained the basics to you earlier, I would advise you learn from a reliable source. Chess.com is a great resource.

Start here:

https://www.chess.com/learn-how-to-play-chess

Read that and post any questions you may have here and I will try to answer them as quickly as possible.

Happy learning.
Gaming / Re: How Can I Improve On My Skills In Playing CHESS? by benjibabs(m): 5:24am On Sep 10, 2017
geebril:

let's see...
1. C4(white)
2. B3
3. Bishop B2
4. C4XD5
5. Kc3

that's queen gambit opening/style

Bro c4 is not queens gambit. And how could black play b3? And c4xd5 when d5 has not been played. Obviously, you are just bs'ing the OP. Not cool at all.
Family / Pornography Is Addictive by benjibabs(m): 8:06pm On Aug 31, 2017
Just want to share an excerpt from a blog post on the conquerseries.com website titled "What The Porn Industry Doesn’t Want You To Find Out."

Check out the full blog here - https://conquerseries.com/blog/
===================

Porn has the same effect on your brain that drugs do. In brain scans, the changes to a porn addict’s brain look much like a heroin addict’s.

As neuropsychologist Dr. Tim Jennings explains in the Conquer Series, a cinematic series that helps men break free from porn addiction, “Any type of repetitive behavior will create trails in our brain that are going to fire on an automatic sequence.” By repeatedly watching porn – or repeating any activity, really – you are programming your thought life and actions, so that they become second nature.

Not only that, when you have a sexual release, your brain gets flooded with the same neurochemicals drugs release in the brain. Whatever you’re viewing at the time this happens, you become “bonded” to.

In this way porn can restructure your brain – and not in a good way. This sets you up for years, possibly a lifetime, of sexual bondage.

Career / Re: What Does It Mean To Be A Contract Staff? by benjibabs(m): 3:14am On Aug 30, 2017
EniolaEwa:
Good morning....I just got out of school so I applied for a job pending when I will go for service, I applied somewhere and they told me I can only be given a contract position, I need to know what a contract staff mean and the advantage and the disadvantage....I'm waiting thanks

A contract employee is employed based on a contract (a legal agreement). The contract will state what task the employee will perform, how much the company will pay and how long the employee is needed. When the duration of the contract elapses, the company may or may not renew the contract depending on if they still have tasks for the employee to complete. If the contract is renewed, the employee continues to work for another duration specified in the renewed contract. If the contract is not renewed, the employee would have to leave the company and seek employment elsewhere.

Did you tell them you will leave for service? They probably offered you a contract position because of your availability. No company would employ you on full time basis knowing fully well that you would leave within a year. It takes time to place ad, conduct interview, orientate and get a new employee to speed.

I did not go into advantages and disadvantages because the contract job is just appropriate for your situation. Take it and hang on to it till you leave for service and that would be a good experience on you cv when you finish service.

Good luck. cheesy

(1) (2) (3) (4) (5) (6) (7) (8) (of 8 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 126
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.