Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - David

Pages: [1] 2 3 ... 5
1
Ask the Author / Python script to get/see verse for Today ...
« on: February 23, 2024, 12:16:21 AM »
Here is Python script that needs the .dat file verses found on the next page ...

Code: [Select]
# verseForToday.py
# this version: 20240222

from sys import exit
from datetime import datetime

# get the 1st 10 chars after datetime object converted to type str
todayStr = str( datetime.now() )[:10]

monthStr = todayStr[5:7] # get new substr taking chars from index 5 to 6 inclusive
dayStr = todayStr[8:] # get new substr taking chars from index 8 to end

dayNumStr = monthStr + dayStr
print(f"Today is: {dayNumStr} or {todayStr}")
print()

verses = [] # construct an empty Python list container to hold lines of text
try:
    with open("verses.dat") as f:
        line = f.readline()
        while line:
            if line[:4] == dayNumStr:
                print( line.rstrip() )
                line = line[4:]
                verses.append( line.strip() )
            line = f.readline()
except:
    print("There was some problem getting verses from file: verses.dat ...")
    input("Press Enter key to exit ... ")
    exit()


print()   
for line in verses:
    print(' '*9 + line)

input("\nPress ENTER key to exit ... ")

2
Here is the Python script that extracts daily 5 Psalms ... Psalm 1 to 5 for day 1 of each month, 6 to 10 for day 2 of the month, 11 to 15 for day 3 ... etc...

Save this as a text file as: DailyPsalms.py file in a folder ...

and also save the text file it needs ... see it on the next page ... save that text in the same folder as: 1To150PsalmsFixed.txt


Code: [Select]
#DailyPsalms.py
#2024-02-15

from datetime import date
from sys import exit

fNameFixed = "1To150PsalmsFixed.txt"
try:
    with open(fNameFixed) as f:
        lines = f.readlines() # get lines into Python list called lines
except:
    print("Can't find file", fNameFixed, "... ")
    input("PRESS Enter key to exit ... ")
    exit()
   
#get current date
now = date.today()
day = now.day

print("Today is: {:4d}-{:02d}-{:02d}".format(now.year, now.month, day))
if day == 31: # there are only 150 Psalms
    day = 30
end = day*5
beg = end-4

these = [] # get a Python list of these ...
for x in range(beg, end+1):
    these.append( '(Ps ' + str(x) + ':' )

verses = [] # get todays 5 verses into Python list of verses
for line in lines:
    for text in these:
        if text in line:
            verses.append(line)
           
for line in verses:
    print()
    count = 0
    for ch in line:
        count += 1
        if count <= 40:
            if count == 1 and ch == ' ':
                count = 0
            else:
                print( ch, end = '' )
        else: #count here is > 40
            print(ch, end = '')
            if ch in " .,?!":
                print()
                count = 0
            if ch == '\n':
                count = 0
                   
input("\nPress 'Enter' to quit ... " )


3
Ask the Author / Are we ‘there’ ... yet?
« on: March 14, 2023, 07:10:21 AM »
Shalom all who might read this,

Monday AM, March 13th, 2023 ... I was out clearing the fresh snow ...  and after, I was sitting inside ‘cooling down’ ...

I was there inspired to try again to share with my 2 year younger brother these facts ...

You may find useful this further ‘try’ ...

an attempt at ‘laying the foundations’ ...

4
Ask the Author / Last Days Deceptions ... Yes, We NEED Discernment
« on: April 15, 2021, 09:37:38 AM »
If we are in the generation that Jesus foretold ... see Matthew 24 ... then as much as ever ... if not more than ever ... we need discernment!

We were warned of false teachers, false prophets, false messiahs ... great deception, so great that even the elect would be deceived if possible ...

Matthew 24:24 - For there shall arise false Christs, and false prophets, and shall shew great signs and wonders; insomuch that, if it were possible, they shall deceive the very elect.

But how do we discern?

Recall also these words of Jesus:

Matthew 22:29 - Jesus answered and said unto them, Ye do err, not knowing the scriptures, nor the power of God.

Mark 12:24,27 - And Jesus answering said unto them, Do ye not therefore err, because ye know not the scriptures, neither the power of God? ... He is not the God of the dead, but the God of the living: ye therefore do greatly err.

John 8:31,32 - Then said Jesus to those Jews which believed on him, If ye continue in my word, then are ye my disciples indeed; And ye shall know the truth, and the truth shall make you free.

And further explained by the apostles ...

Acts 17:11 - These were more noble than those in Thessalonica, in that they received the word with all readiness of mind, and searched the scriptures daily, whether those things were so.

2 Timothy 3:15,16,17 - And that from a child thou hast known the holy scriptures, which are able to make thee wise unto salvation through faith which is in Christ Jesus. All scripture is given by inspiration of God, and is profitable for doctrine, for reproof, for correction, for instruction in righteousness: That the man of God may be perfect, thoroughly furnished unto all good works.

If you have not already seen, please review here before going on:

http://developers-heaven.net/forum/index.php/topic,2631.0.html

(Go to ‘Ask the author’ ... then go to ‘Breakfast...’ link ... if not there already.)

(to be continued)

5
My last email from Barry before he ‘disappeared’ ...


From: Barry Chamish <chamish@netmedia.net.il>
Date: April 16, 2016 at 9:23:19 PM EDT
To: chamish <chamish@netvision.net.il>
Subject: for

www.barrychamish.com

                                                                                                           FOR ISRAEL
                                                                                                        by Barry Chamish

   I have a horrid ethical conflict. I have an anti-semitic spammer that I mostly succeed in deleting. Today one got through. I will present it highly edited, for in its utter hatred of Jews, the
author has discovered the same facts that I had presented two decades before. AND I've received a LOT more material than this. I have to find some way to demonstrate that I'm FOR Israel...
just not FOR lying. It WILL catch up with us. In my world it already has.
   In the first article, the author makes the classic error; what he calls Zionists are LABOR Zionists. They are opposed by Right Wing and Religious Zionists and by Religious non-Zionists who according
to both British and Ottoman censuses were by far the leading populations of major 19th century cities like Haifa, Tsfat and Jerusalem. Instead, he paints a black and white caricature out of a glossy
and highly detailed color print. As does every Arab writer that I'm aware of..
   As do most Jewish writers about the founding of Israel and the Holocaust.
   It's messy, but it's not like I relate to anyone trying to bring Israel down. Most of us were puppets on a string when got there, and however it happened, we'll fight for our home.
   Before you begin reading the first piece, listen to my history in English:

https://www.youtube.com/watch?v=uGo8zwKeTf4
   
    Or Hebrew:

https://www.youtube.com/watch?v=wOYpkCP1WNM

    Read Spritzler, then stick around for more after:

John Spritzler
February 6, 2005
Lastly, let us see what the Zionist leadership did to rescue Jews during the actual years of the Holocaust.
On December 11, 1943, the Jewish Forward, largest Yiddish newspaper in the world, criticized the Zionist leaders, writing,

"The Jewish Conference [a Zionist organization] is alive only when there is something in the air which has to do with a Commonwealth in Palestine, and it is asleep when it concerns rescue work for the Jews in the Diaspora." [19]

Baruch Kimmerling, in his review of Yosef Grodzinsky's In the Shadow of the Holocaust: The Struggle Between Jews and Zionists in the Aftermath of World War II, writes:

"Ben-Gurion and other Zionist leaders vetoed the immigration of 1,000 orphans, who were in physical and emotional danger as a result of the harsh winter of 1945, from the camps in Germany to England, where the Jewish community had managed to secure them permits. Another group of roughly 500 children of camp inhabitants was barred, after Zionist intervention, from reaching France, whose rabbinical institutions had offered them safe haven." [20]

The head of the World Zionist Organization's Zionist Rescue Committee in Budapest during the war, Rudolf Kastner, later a prominent member of Israel's government under Prime Minister Ben-Gurion, collaborated with the Nazis. In the years 1944-45, Kastner was made a V.I.P. by the Nazis and not required to wear a yellow Star of David because, in exchange for being allowed to hand pick 1600 prominent Jews, including his own relatives and friends, to emigrate to Palestine, he helped Adolf Eichmann lure a half million Hungarian and Transylvanian Jews to their death without a fight by arranging for phony postcards "from other Jews" to convince them that the trains to the death camps were merely taking them to be "resettled." The betrayal was especially horrible because Eichmann only had "150 men and only a few thousand Hungarian soldiers at his disposal" and the Jews, had they known the truth, could have easily carried out a mass escape to territory that the Nazis did not occupy. These facts came out in a famous 1954 Israeli libel trial in which Kastner initially thought he could silence his accuser but, as the trial developed and witness after witness came forward to confirm the accusations, he began to shift his defense to the claim that he had only done what all top Zionist leaders of the time advocated. At this point Kastner was "conveniently" assassinated by persons unknown. [21]

Zionist sabotage of rescue efforts was an established policy as early as 1942. In a letter to the Times (of London), June 6, 1961, Rabbi Dr. Solomon Schonfeld, Chairman of the wartime Rescue Committee established by the Chief Rabbi of Britain, describes how the Zionist leadership in Great Britain opposed efforts to rescue European Jews from the Holocaust. He writes that, contrary to the claims that the British government was "largely indifferent to and unwilling to take action in defense of the European Jews who were being massacred daily by the Nazis in spite of efforts by Zionist leaders to persuade the British Foreign Office to rouse itself into action on behalf of the victims...My experience in 1942-43 was wholly in favour of British readiness to help, openly, constructively and totally, and that this readiness met with opposition from Zionist leaders who insisted on rescue to Palestine as the only acceptable form of help." Rabbi Schonfeld goes on to describe how, in December, 1942, he and others formed a Council for Rescue from the Nazi Terror which initiated a Parliamentary Rescue Committee supported by leading members of both Houses, and how they submitted a motion to Parliament calling for the government "to declare its readiness to find temporary refuge in its own territories or in territories under its control for endangered persons who are able to leave those countries; to appeal to the governments of countries bordering on enemy and enemy-occupied countries to allow temporary asylum and transit facilities for such persons; to offer to those governments, so far as practicable, such help as may be needed to facilitate their cooperation; and to invite the other Allied governments to consider similar action." But this is what happened, according to the rabbi's letter:

"As a result of widespread concern and the persistence of a few, this motion achieved within two weeks a total of 277 Parliamentary signatures of all parties. This purely humanitarian proposal met with sympathy from government circles, and I should add that H.M.Government did, in fact, issue some hundreds of Mauritius and other immigration permits -- indeed, in favour of any threatened Jewish family whom we could name. Already while the Parliamentary motion was gathering momentum, voices of dissent were heard from Zionist quarters: 'Why not Palestine?' The obvious answers that the most urgent concern was humanitarian and not political, that the Mufti-Nazi alliance ruled out Palestine for the immediate saving of lives and that Britain could not then add to her Middle East problems, were of no avail.

"At the Parliamentary meeting held on January 27, 1943, when the next steps were being energetically pursued by over 100 M.P.s and Lords, a spokesman for the Zionists announced that the Jews would oppose the motion on the grounds of its omitting to refer to Palestine. Some voices were raised in support of the Zionist view, there was considerable debate, and thereafter the motion was dead. Even the promoters exclaimed in desperation: If the Jews cannot agree among themselves, how can we help? It was useless to argue with a then current Zionist argument: 'Every nation has had its dead in the fight for its homeland -- the sufferers under Hitler are our dead in our fight'."

Why did  Zionist leaders sabotage rescue efforts? The answer is spelled out very clearly in a dramatic letter. In the autumn of 1942 Nathan Schwalb (Dror) was representative of the Zionist He-Halutz (The Pioneer) organization in Geneva. At this time a Jewish rescue Working Group in Bratislava, Czechoslovakia, was sending desperate appeals to He-Halutz for money to bribe senior Nazi officials to delay or prevent the transport of Czechoslovakian Jewry to Auschwitz and other death camps. Schwalb replied, in his letter to the rescue group, as follows:

"Since we have the opportunity of this courier, we are writing to the group that they must always remember that matter which is the most important, which is the main issue that must always be before our eyes. After all, the allies will be victorious. After the victory, they will once again divide up the world between the nations as they did at the end of first war. Then they opened the way for us for the first step [the British Balfour Declaration of 1917 supporting a Jewish homeland in Palestine -- JS] and now, as the war ends, we must do everything so that Eretz Yisroel [the Land of Israel -- JS] should become a Jewish state. Important steps have already been taken in this matter. As to the cry that comes from your country, we must be aware that all the nations of the Allies are spilling much blood and if we do not bring sacrifices, with what will we achieve the right to sit at the table when they make the distribution of nations and territories after the war? And so it would be foolish and impertinent on our side to ask the nations whose blood is being spilled for permission to send money into the land of their enemies in order to protect our own blood. Because 'rak b'dam tihyu lanu haaretz' ('only through blood will the land be ours'). As to yourselves -- members of the group -- 'atem taylu' ('you will get out'), and for this purpose we are providing you with funds by this courier." [22]

One might dismiss this cruel letter from Nathan Schwalb as an aberration, unrepresentative of the Zionist leadership at higher levels. But it turns out that Schwalb was acting in accordance with the views of his superiors in the Zionist movement. In his book, In Days of Holocaust and Destruction, Yitzchak Greenbaum, Chairman of the (Zionist) Jewish Agency's Rescue Committee in Jerusalem, wrote, "when they asked me, couldn't you give money out of the United Jewish Appeal funds for the rescue of Jews in Europe, I said, 'NO!' and I say again, 'NO!'...one should resist this wave which pushes the Zionist activities to secondary importance." In February, 1943, Greenbaum gave a speech in Tel Aviv on the subject, "The Diaspora and the Redemption" in which he said:

"When they come to us with two plans -- the rescue of the masses of Jews in Europe or the redemption of the land [settling Jews in Palestine -- JS] -- I vote, without a second thought, for the redemption of the land...If there would be a possibility today of buying packages of food with the money of the Keren Hayesod (United Jewish Appeal) to send it through Lisbon, would we do such a thing? No! and once again No!" [23]

Zionism's hostility to Jews trying to survive anywhere other than Palestine goes back at least to 1938 when, at a meeting of Labor Zionists in Great Britain, David Ben-Gurion, argued: "If I knew that it would be possible to save all the children in Germany by bringing them over to England and only half of them by transporting them to Eretz Israel, then I opt for the second alternative. For we must take into account not only the lives of these children but also the history of the people of Israel." [26] These are the words of a fanatic, obsessed with the dream of becoming a ruler of a "state of his own" no matter how many innocent Jewish lives must be sacrificed for that end. One might dismiss Ben-Gurion's words about Jewish children as merely rhetoric unconnected to real-life decisions, but as we have seen, it turns out that Zionist leaders during the Holocaust did indeed act in accordance with Ben-Gurion's insistence that Jewish lives -- hundreds of thousands of Jewish lives -- are less important than achieving a Jewish state.  Zionist leaders sabotaged efforts to rescue Jews in Europe during the Holocaust because they felt that the rescue of Jews threatened their goal of becoming masters of a "state of their own."

Every ethnic/racial group contains individuals who aspire to be part of an elite ruling class, enjoying great privileges and power over "their own people." The Zionist movement enabled people like David Ben-Gurion, Golda Meier, Menachem Begin and Ariel Sharon, among others, to rise in the world and become elite rulers of a state which now possesses nuclear weapons and one of the most powerful armies in the world. To achieve this end, Zionist leaders have sacrificed the welfare of ordinary Jews at every opportunity. They point to anti-Semitism (or what they speciously label as anti-Semitism) in order to justify a Zionist project which has nothing to do with helping ordinary Jews achieve a safe and secure and happy life free from real anti-Semitic attacks.

** Before we get back with James Baldwin, get to know what I do:

https://www.youtube.com/watch?v=9o6xj0PGOhg

https://www.youtube.com/watch?v=QDxtcS_6Y8M

https://www.youtube.com/watch?v=xRlCBhIl2r0

** A reader and close friend dives deep and sends this along...

James Baldwin makes some points worth considering :

Jews and Palestinians know of broken promises. From the time of the Balfour Declaration (during World War I) Palestine was under five British mandates, and England promised the land back and forth to the Arabs or the Jews, depending on which horse seemed to be in the lead. The Zionists—as distinguished from the people known as Jews—using, as someone put it, the “available political machinery,’’ i.e., colonialism, e.g., the British Empire—promised the British that, if the territory were given to them, the British Empire would be safe forever...But absolutely no one cared about the Jews, and it is worth observing that non-Jewish Zionists are very frequently anti-Semitic...the state of Israel was not created for the salvation of the Jews; it was created for the salvation of the Western interests.

The villain is Roundtable Group anglophiles who tried to create Israel after WWI and failed. These men weren’t men of faith they were Atheists that not only didn’t believe in god but felt them to be superior to their neighbors. If you feel superior to your neighbor then you don’t have to treat them as you would have them treat you. You can rationalize living by another rule – the ends justify the means.   They masqueraded as the faithful because it helped them fulfill their ends. The Jewish Prophets, Buddha, Jesus and Mohammed all preached the golden rule. It is the most elegant moral compass in the universe. It provides a path to peace. The Roundtable Group anglophiles weren’t successful after WWI. But they left a cadre of intelligent agents in Germany who brought Hitler to power and he was successful in establishing Israel. Israel wasn’t a Jewish homeland. It was a means to control middle east oil. Hitler also would help establish the Muslim Brotherhood. They would also be the means to controlling middle east oil.
If you don’t connect the Rhodes-Rothschild Roundtable Group to Zionism and the American Roundtable Group members who surrounded Wilson and wrote his 14 points to the movement you aren’t painting a true picture of who was behind the evil. These are the anti-religious scum who are still running the show. They have morphed into Chatham House and the CFR. You won’t find any members of these organizations moving to Israel to live – including the ones who claim to be Jewish. Interestingly the phony Jews who belong to the CFR are now speaking out against Zionism despite the fact that their fathers, who didn’t move to Israel were ardent Zionists.

**

**I got my books from Israel!! Five cartons of the rare Israel Betrayed,
plus, Save Israel, Shabtai Tzvi, Labor Zionism and The Holocaust, Hatzeelu
Et Yisrael,and  Last Days Of Israel. Thank you Tova and Bob. I now have books
which I'll send to anyone who asks and pays fairly.

write me at:  chamish@netvision.net.il

Essential contributions, if you want me to continue, at Paypal:  chamishba@gmail.com
or by writing:
Barry Chamish
POB 840157
Saint Augustine, FL  32080 
Get my books on lulu.com including Bye Bye Gaza, only $10 to download.black and white: http://www.lulu.com/content/575116

My radio show at:

http://www.libertyarchives.com /
 

6
Ask the Author / Links For Insights
« on: May 22, 2020, 06:07:06 PM »
Update: FREE homework help NOW available ...

You can contact me via:
http://sites.google.com/site/andeveryeyeshallseehim/home/he-comes

(Or ... see e-mail link near bottom of first page)
http://developers-heaven.net/forum/index.php?topic=2587.0


A few weeks ago, I met a new friend  ... He later, related his (quite remarkable) conversion story to me ... It was just last weekend ... as we were walking with some pups on a nearby forest trail ... I asked him if he could write it down ... (i.e. update it on his blog) ... he said he would.

Here is a link to an helpful article he wrote a few months ago ... it illustrates how demons can distract believers in many vain pursuits ... and how the Holy Scriptures are our continual guide.

https://hisyokeeasy.blogspot.com/2019/11/bigfoot-aliens-and-time-travellers-from.html?m=1


Jonathan also provided me with these next 2 links which you may find helpful / insightful ... when witnessing about Jesus ... to those who have grown up not knowing this:

https://youtu.be/6st_tFj6ouM

https://youtu.be/RXdES0-2tEs


Jonathan’s good advice when sharing the gospel:

1 Corinthians 15:1-4

That's the heart of it ...

Jesus' death for our sins, burial, and resurrection.

Yes! This is what I think on and try to communicate ...


My P.S.

Hey all ... is there any event in history that has been so well documented ... so many continued records that began so close to events documented ... so many copies (in spite of so much persecution) ... so many translations into so many languages even in the first two centuries and note that many of these still persist!!!

See: The Resurrection of Jesus Christ - the Best Documented Event in History

https://sites.google.com/site/andeveryeyeshallseehim/why_you_need_to_know_this

7
A few months ago, a dear friend and former neighbour of many years, asked me to review the following pages she wrote ... now posted here below, for your easy reference, and only slightly edited ...

By Sandra - 2018

I have been concerned regarding the many so called new translations of the bible.  So I decided to research for myself.

I read the KJV (the Authorized by King James Version) and when I compared it to the newer versions ... I found that the changes they make only weaken or minimize who God truly is.  They omit very important details in scripture. 

So ... one must ask one’s self:

Is my choice on what Bible (version) I'm reading because some say that The Authorized King James Version is too hard to understand?

Is it because my pastor or bible study leader is using this new version?  My group of Bible believing friends use it?  Or ... everyone I know uses it?

Do I like the translation (version) I'm reading because it is poetic?  Because it does not have (the old English) thee and thou’s, or because it is paraphrased into a story?

So, what are you reading and promoting in the version you are reading?

Wouldn't it be advisable for you to do your own research and decide for yourself, if the modern version you are reading is correct, and not just to rely on what the majority says?

(Note that a majority vote is not the way truth is discerned.  Please recall: 

Enter ye in at the strait gate: for wide is the gate, and broad is the way, that leadeth to destruction, and many there be which go in thereat.  Because strait is the gate, and narrow is the way, which leadeth unto life, and few there be that find it.)
(Matthew 7:13,14)

But NOTE the false gospel taught by the New King James Version (NKJV) for Matthew 7:13,14

Enter by the narrow gate; for wide is the gate and broad is the way that leads to destruction, and there are many who go in by it.  Because narrow is the gate and difficult is the way which leads to life, and there are few who find it. (NKJV)

But is that what Jesus taught ... that His way was DIFFICULT/HARD?  Recall Jesus said: Come unto me, all ye that labour and are heavy laden, and I will give you rest.  Take my yoke upon you, and learn of me; for I am meek and lowly in heart: and ye shall find rest unto your souls.  For my yoke is easy, and my burden is light. (Matthew 11:28-29)

The warning to all who would preach a false gospel is very severe: As we said before, so say I now again, if any man preach any other gospel unto you than that ye have received, let him be accursed. (Galatians 1:9)


I believe I was led to find out who (presently) owns the NIV bible.  It is published by Zondervan, who sold to Harper Collins, then owned by News Corp, that is owned by a man named Rupert Murdoch.  Note that Rupert Murdoch produces World Wide pornography and that Harper Collins also publishes the satanic bible.  It is perplexing to me that the writers of the NIV would entrust God's Holy Word to an organization controlled by such as Rupert Murdoch.  I always thought that the writers of Gods Word were Holy Men of God.  So, don't you think that the publishers should be the same? 

We seem already to be deep into deception, (but recall, Jesus said this deception would happen, that in the end times, even the elect could/would be deceived.)

However, I believe that God’s Spirit is at work in those people who truly want to walk in truth, and not to stay deceived.  If that is you, then please do your own research about this forewarned great deception.

In the following web page, you will see examples with 4 different versions to compare. 

Please pray for discernment for yourself, (if your desire is to not teach, or to be taught, from a Bible that has been corrupted.)  It seems that these un-holy editors and publishers are on a path to revise more and more … until the gospel they proclaim is NO Gospel at all. 

It will be difficult for leaders to take a stand against these new versions if they fear protest from their congregations, groups and peers.   But please recall that we are cautioned about this, that: The fear of man is a snare.

(By taking a stand I mean reading and teaching from the KJV, not the other versions. )

We are coming into times that we will have to make clear and firm choices not to go with the flow or the majority.  Have we become a church that wants to please men MORE than to please God?

I am convinced that many a preacher and teacher have seen errors … but are presently choosing to ignore them.  (Have they fully reckoned what this will cost them eternally?)

Is it possible we have entered into the times of the separation of the sheep from the goats?

I encourage all pastors, teachers and all who are seeking God in truth, to research for themselves and to not shut out the Holy Spirit’s warnings. 

Be strong to make the change, regardless of what others may say.  Is it not time to start speaking the truth about these versions and to warn others?

Silence is not golden here, but it is deadly.  It is a gateway to so deadly  great, and ever greater deception, as the flurry of revisions keep rolling off the printing presses, to be sold to an increasingly apostate church, just as we were cautioned against: Let no man deceive you by any means: for that day shall not come, except there come a falling away first, and that man of sin be revealed, the son of perdition.

8
Ask the Author / The Roman Road ...
« on: April 07, 2019, 03:58:51 AM »
Dear family and friends,

Recently, my 56 year old nephew, suddenly died with NO signs of distress ... NO warning ... this has given me and my family 'pause' ...

and I was reminded again about that prayer of Moses, recorded for us all in Psalm 90 :  http://developers-heaven.net/forum/index.php/topic,2637.msg3278.html#msg3278 

because my father often reminded me to ponder this part of that prayer (made personal here):

So, teach me to number my days so that I might apply my heart to wisdom.


In light of this ... please see carefully the following:


There is a 'Roman Road' that my 'big sister' reminded me about, recently, that we would like to share with you via this web page:

In Paul's letter to the church at Rome,
We find (an overview of) the way to the Heavenly Home.

Some of these verses are special as can be,
And so the 'Roman Road' ... PLEASE...  DO SEE!

This 'Roman Road' is very close, these days, to my heart,
Now ... here (below) ... is where this heaven blessed journey starts ...

(by Donna Jean Zavitz - 2019 at age 84 - slightly edited for this page.)


Did you know that Heaven sees ALL and thus says that ...

1)
"As it is written, There is none righteous, no, not one: ... all have sinned, and come short of the glory of God;" (Romans 3:10,23)

2)
"Wherefore, as by one man sin entered into the world, and death by sin; and so death passed upon all men, for that all have sinned:" (Romans 5:12)


BUT here is really GOOD NEWS ...

3)
"... scarcely for a righteous man will one die: yet peradventure for a good man some would even dare to die. But God commendeth his love toward us, in that, while we were yet sinners, Christ died for us. ... if, when we were enemies, we were reconciled to God by the death of his Son, much more, being reconciled, we shall be saved by his life." (Romans 5:7,8,10)

4)
"... the wages of sin [is] death; but the gift of God [is] eternal life through Jesus Christ our Lord." (Romans 6:23)

5)
" ... if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved. For with the heart man believeth unto righteousness; and with the mouth confession is made unto salvation." (Romans 10:9,10)


P.S. You may also want to see:
(Go to: Ask the Author)
http://developers-heaven.net/forum/index.php/topic,2587.0.html

9
Ask the Author / A reply letter to a friend’s question ...
« on: July 13, 2018, 10:22:58 PM »
Subject: A reply to a letter with a question from a friend

Update: FREE homework help NOW available ...


A copy for you to see and pass on as you see fit ...

Yesterday, I had an email from a friend in the USA ...

Please see copy/paste of main part of text below:


Hi David,

If you had a son today who was say, 11, 12, or 13 ... and he came to you and said:

"Dad, is evolution across species true?"

how would you guide him?

...

Thanks ...


My reply:


A good place to start is with:

Can you see that every house had a builder?

(i.e. every complex structure is designed and built to perform some function ... and a child can easily classify / play the game called: ‘Animal, Mineral, Vegetable’ ...)


Then ... I’d emphasize that we can be often deceived by repeated emphatic lies ...

For example, a child knows (and can know for sure) that any explosion, an example of *un-directed energy*,

*always* degrades existing order / structure ... i.e. *all* mutations *always* degrade

*pre-existing code* ...

(and note that mutations are examples of an *un-directed energy* event) ...

however we were designed/built with a DNA ‘code backup’ (and pre-built with hardware/software to permit this ‘restore operation’) ... so ... many mutations can be repaired / restored to original ... however as mutations build up ... to a critical loss of vital info ... extinction takes place ... so ... the fossil record is really a record of (Noah’s flood and) extinctions.


(The oft repeated *big lie* is that mutations are, very rarely, but sometimes, ‘helpful’ ... ‘helpful’ to create new ‘useful’ code, and that this ‘useful’ code accumulated over long periods to create purposeful structures and function ... by a process of survival of fittest ... *but* only *already* highly designed and prebuilt / predesigned systems can be ready to accommodate a limited variety of external conditions ... and they can ‘survive’ ... *only* as long as they are NOT degraded too much ... and only as long as they are still fit enough to ‘function’ in a new environment that is within the original design specs ... just ask any real engineer!)


The biblical ‘kind’ was created with the potential for a limited wide variation in ... offspring ...

but all mating of a ‘kind’ to a ‘different kind’ ...

*if* there is any (temporary) viable product ...

that 'product’ ...it is *always* sterile ... i.e. not able to reproduce.


An example of 'variation within the same kind' is seen in the hospitals these days where, if you go for even a short stay, you too often come away with an ‘opportunistic’ infection ...

The wide spread misuse of antibiotics, in modern medicine, (especially in hospitals), reduces the ‘vital healthy’ gut flora, (our vital healthy bacteria that keeps the pathogenic bacteria in check ... and is also vital to make ... and to make bioavailable ... essential nutrients from the GI tract) ...

so those pathogens they were already resistant to that antibiotic... flourish ...

and typically then, another antibiotic is tried ...

but ...

it often seems there were still pathogenic bacteria that were kept in check by all the
now wiped out competitors ... and these 'resistant to all typically used antibiotics'

... can now flourish ...


So ... you go to an hospital for some ‘minor’ problem ...

and you come away with a life threatening bacterial infection ... one that is resistant to all presently designed antibiotics ...

but that infection is probably still able to be managed if you support your highly complex and multifaceted immune system with something like nano-silver 10 ppm.


And these ... now 'resistant bacteria' ... tend to be passed on, in hospitals, from one patient to another ... by a not perfect containment of these so nasty pathogens that now seem to live in so many hospital settings.


A computer example:

Can (C++) compiled code from one computer, say a Windows OS, run on an other (as is),

say with a Linux OS ?

No !

Not unless there is a carefully designed and executed re-compile of the original text code ... and that original text code ... was re-compiled for that Linux Os with a C++ Linux based compiler for C++ code ... (and the original text code used no (non-standard) features that were machine dependent.)


Can a dog be trained to fetch ‘your slippers’ ?

Yes.

Can a child be trained to fetch ‘your slippers’ ?

Yes.

Here are examples of two highly engineered *self-replicating/self-repairing* and very mobile ‘computer systems’ that can be ‘taught’ to respond to the same input instructions ... to produce a very similar ‘end result'.

The dog used his mouth.
The child used his hand.

Just think of the hardware and the software that might need to be designed and built to accommodate just the simple task of *learning*, and *executing* the simple task of fetching slippers ... for two such distinct systems ... but they each need to be pre-programed with software (and pre-built with hardware) to be able to learn to do this simple task ... but also ... in any of the known languages of the world ... and in any of a wide variety of a limited and yet future context !!!

? ? ?

A very wise and exceeding skillful software and hardware engineer is needed ... one who is able to ‘control and limit’  future conditions that will arise ... and that sure is pushing way beyond the limits of (our) present (AI) ability ... yes  ? ? ?

--
dwzavitz@gmail.com
http://sites.google.com/site/andeveryeyeshallseehim/

Secure Services
http://SecureServices.ca
or try ...
http://securejoules.googlepages.com/securetransportservices

10
Ask the Author / Poems and writings to encourage ...
« on: March 05, 2018, 11:09:51 PM »
This poem comes to you, slightly edited from the original - the original was penned by Irena Dunleavey, who was born in Ireland.


It was titled:

God made me to be a mother

One of God's most precious gifts, given from above,
Is wrapped up in a blanket, and born out of love.

A very special task is given to a wife,
To help to shape and mold this tiny baby's life.

Nursing her through illness, wiping up her tears,
Telling bedtime stories, chasing away her fears.

Daily asking Jesus for the patience and the wisdom,
To bring out the best in this tiny creation.

Loving unconditionally as she watched her grow,
Training her up in the way she should go.

Learning to cope with the changes from 'boy to man',
Knowing that for this life, God has a purpose and a plan.

Loving her enough to break the ties to let her go,
Trusting that all she taught her, would continue to show.

This wife has grown so much, just from teaching another,
Her privilege has been great, God made her to be A MOTHER.

Irena Dunleavey
1977


I asked Irena if I could have a copy to give out and to put up on the web and if it was ok to edit it a bit ... like here I did changing 'him' to 'her', etc... to make it more personal to each ... Irena said yes ...  I asked Irena to date and sign, with her name, each poem that she said that the Lord gave her.


You may like to also see the below relevant text copied from Proverbs 31

10  Who can find a virtuous woman? for her price is far above rubies.
11  The heart of her husband doth safely trust in her, so that he shall have no need of spoil.
12  She will do him good and not evil all the days of her life.
13  She seeketh wool, and flax, and worketh willingly with her hands.
14  She is like the merchants’ ships; she bringeth her food from afar.
15  She riseth also while it is yet night, and giveth meat to her household, and a portion to her maidens.
16  She considereth a field, and buyeth it: with the fruit of her hands she planteth a vineyard.
17  She girdeth her loins with strength, and strengtheneth her arms.
18  She perceiveth that her merchandise is good: her candle goeth not out by night.
19  She layeth her hands to the spindle, and her hands hold the distaff.
20  She stretcheth out her hand to the poor; yea, she reacheth forth her hands to the needy.
21  She is not afraid of the snow for her household: for all her household are clothed with scarlet.
22  She maketh herself coverings of tapestry; her clothing is silk and purple.
23  Her husband is known in the gates, when he sitteth among the elders of the land.
24  She maketh fine linen, and selleth it; and delivereth girdles unto the merchant.
25  Strength and honour are her clothing; and she shall rejoice in time to come.
26  She openeth her mouth with wisdom; and in her tongue is the law of kindness.
27  She looketh well to the ways of her household, and eateth not the bread of idleness.
28  Her children arise up, and call her blessed; her husband also, and he praiseth her.
29  Many daughters have done virtuously, but thou excellest them all.
30  Favour is deceitful, and beauty is vain: but a woman that feareth the LORD, she shall be praised.
31  Give her of the fruit of her hands; and let her own works praise her in the gates.

11
Java / Java 7 / Java 8 Large File Read and Run times Compared ...
« on: December 06, 2017, 05:28:15 AM »
Firstly ... a Java program to generate a big file of random integers ...

Code: [Select]
/**
 * Reports the number of seconds the computer spent
 * creating a file of 3,000,000 random integers,
 * 10 integers per line
 * with a single space in between each integer on each line.
 * (Note! There is NO space output following the 10th integer on each line.)
 *
 * @version 2017-12-06
 * @author dwz
 */
 

import java.nio.file.Paths;
import java.nio.file.Files;
import java.nio.charset.Charset;

import java.io.BufferedWriter;
import java.io.IOException;

import java.util.Random;


public class TimedWriteLine {
   
    static final String FNAME = "MyRandomInts.txt";
    static final int NUM_NUMBERS = 3_000_000;


    public static void main( String[] args ) {

        testItOut();
    }


    static void testItOut() {

        System.out.println( "Getting/filing " + NUM_NUMBERS + " random integers." );

        long startTime = System.currentTimeMillis();
        Random randGen = new Random();

        try( BufferedWriter fout = Files.newBufferedWriter( Paths.get( FNAME ),
                Charset.defaultCharset() ) ) {
       
            for( int i = 0; i < NUM_NUMBERS; ) {
                String valStr =  Integer.toString( randGen.nextInt(NUM_NUMBERS) );
                fout.write( valStr );
                ++ i;
                if( i % 10 == 0 ) fout.newLine();
                else fout.write( " ", 0, 1 );
            }
        } catch( IOException ex ) {
            System.out.println( ex );
        }
     
        long endTime = System.currentTimeMillis();
        System.out.println();
        System.out.println( "Run time in seconds was: " + (endTime - startTime) / 1000.0 );
    }
}

12


Below is the contents of a recent letter to my niece, re. her daughter, my grand-niece, who hopes to go into engineering, and the text was also copied to my youngest son ...

I suspect that this may be of general interest to all 'Science Types' and also to all 'Bible Student Types' ... and so I have reproduced a copy, as per below:


While researching the other day to try to find a source to confirm what I had said that I had read years ago, re. Einstein's:

E = mc^2 (E equals m times c squared)

... that this formula was (pivotally) inspired by the words he had read from a text in the Holy Bible ...

I again came across much that suggested Einstein, sadly, had greatly plagiarized the work of several others that he was privileged to see ... etc...

I was already aware that his wife was the so very much better mathematician ...
and that he had not been faithful to her ... and that he also seemed to have been used (abused) greatly, in his time of world wars ...
to advance the coming (Satan inspired 666 - see Revelation 13) New World Order / One World Gov. (under the guise of world peace).

But ... I also, happily, came across a profound concept during my web search:

If one rearranges the parameters in the formula to have c, the speed of light, depend on E (energy) and m (rest mass),

then we have this:

c = sqrt( E / m )

where E could represent *all the Energy in the Universe*,

and m ... *all the mass*.

Now, needed also, to understand next, how I just thought to apply the above reformulation of c as a function of E and m  ...
we need to use one very profound outcome of the Bergman (of Common Sense Science) spinning ring model for electrons and protons ...

http://www.commonsensescience.net/

(and for a good 1st approximation to the Bergman model of electrons and protons, think of an hula-hoop shaped electron and proton, with the charge spread uniformly over the surface of the hollow ring), with the diameter of an electron with the order of magnitude about 10^(-15) meters ...
with the charge (i.e. the current in the torus shaped current loop - i.e a magnet) spinning at the speed of light (c) ...
with each electron having the exact same charge but opposite polarity in nature to that of a proton ...
and think of the proton as being very roughly speaking, having a diameter of only about 1/1000 that of the electron, so thusly, this (positive) charge is so much more 'dense' in space ...

and thus, when it 'is moved', the induced (opposing) fields (forces) are so much very greater (for a proton) than when an electron is attempted to be 'moved' ...
and this is what we call 'inertial mass' ... the property that an object has that resists 'change' to its 'rest' state.

SO ...
we see that 'inertial mass' is really a 'derived quantity' ...
while the charge for each electron (and proton) is the primary and constant property.


Also ... years ago, I came across a research paper, published by Barry Setterfield, and from Stanford U., in which he indicated that c, the speed of light, was not a constant, but had significantly steadily decayed over the time frame of about 100 years of its measurements ...
and so Barry further proposed that c, the speed of light had decayed so very rapidly after creation, so that it had reached to the present nearly 'asymptotically flat value, i.e. nearly constant present measured values'. 

Now ... we are also told that God 'stretched out the heavens ...
as a curtain' (Psalm 104:2, Isaiah 40:22, 42:5, 44:24, 45:12, 51:13, Jeremiah 10:12, 51:15, Zechariah 12:1) ... at the creation ...
and one day, it will be 'rolled up again, as a scroll', (Isaiah 34:4, Revelation 6:14) ...
and that finally, there will be a (re)newed heaven and earth wherein is righteousness ...
and that God shall wipe away all tears and there shall be NO more death, etc... (see Revelation 21).

So ... if all the charge in the universe is occupying a shrinking space ...
its charge density is increasing ...
and thusly, the 'secondary derived property of what we call 'inertial mass' is ALSO increasing' !!!

Thusly, in the formula,
 
c = sqrt( E / m )

if E is the (constant) total Energy in the Universe,

and m represents the (now ever more slowly) *increasing* 'total inertial mass in the universe' ...

we can see, very simply and clearly, a formula to validate Barry Setterfield's analysis of all the measured speeds of c ...
and to confirm his conclusion ...
that in the last hundred years or so, the speed of light has been decreasing asymptotically to its present nearly constant value.


You Stephanie, are the first to see this ...
you and your Melissa ...
and our delightful time to celebrate Melissa's 16 Birthday ...
and our conversation about her desire to pursue a career in Engineering Science, over our lunch together a few days ago ...
this was the impetus. 

Please show to Melissa, and I will copy Matt.

Much love,
Your uncle David

P.S.
Also, Melissa might want to know that the main stream idea the c is the upper-speed limit to everything is NOT true.
For example, physicist Tom Van Flanders knows that the effect of gravity is felt at  ...
at least 8 orders of magnitude faster than c
See:
http://m.mic.com/articles/19755/the-speed-of-gravity-why-einstein-was-wrong-and-newton-was-right

13
Ask the Author / Breakfast ... it's time to feed at Jesus Feet ...
« on: August 08, 2017, 07:24:53 AM »


A first rough draft to get started ...

Who IS GOD?

Every building has a builder, but the builder of all things is God. (also see: Hebrews 3:4, Genesis 1)
Note that we ALL know that every building has to have a builder ... so for this given we will all be held accountable. (See also Psalm 19, Romans 1:18-32)

When my then youngest grand-daughter was still in High School ... she asked me: 'Popa, how do you know?' My (then start to a) reply to her was like this:

How do you know that one and one are two?

How do you know if your dad is your father?

Many things are obvious ... and are 'the givens' that we all (adults) really do 'know are true' ... just like one and an other one ... we merely label the new total quantity as two ... and then adding an other ... gives us 'three' ... and so we have what we call the natural numbers. These are 'a given' ... the names we call these quantities ... and the base we use ... these are arbitrary ... but may be picked to make some math easier ... like base two for use inside modern digital computers ... or base ten, to facilitate the decimal number system and the use of powers of 10 to express very large (or very fractional) amounts.

Other things we 'know' because we 'see' them ... or we hear from honest witnesses to the event.

Other things we know from the laws of creation (forensics) ... so if the top of building hits the ground right below it at very close to free fall (in air) speed ... we know that any story about 'pan-caking' is a fraud.

God knows what we know and what we do not yet know and will hold us to account for all that we do know ... like the obvious fact that 'every building had a builder' ... so the design and highly irreducibly complex and  interdependent structures and 'engines' in His creation point to a very powerful and extremely skilled engineer.

Now since God created all things in the beginning, He can faithfully tell us some of the steps of His creation that He wants us to know ... and He has revealed them to several of His choosen vessels ... and has also promised to preserve ... and thus caused this revelation from Him to be preserved, of His Word, and His character ... in the Holy Bible ... and guided the faithful translation into many languages ... even during the 2nd and 3rd centuries following the final revelation given to the apostle John.

Who IS JESUS? (John 1:1-18, see also Isaiah 9:6,7, Isaiah 12, Isaiah 53)
In the beginning was the Word, and the Word was with God, and the Word was God.
The same was in the beginning with God.
All things were made by him; and without him was not any thing made that was made.
In him was life; and the life was the light of men.
And the light shineth in darkness; and the darkness comprehended it not.
There was a man sent from God, whose name was John. The same came for a witness, to bear witness of the Light, that all men through him might believe. He was not that Light, but was sent to bear witness of that Light. That was the true Light, which lighteth every man that cometh into the world.
He was in the world, and the world was made by him, and the world knew him not.
He came unto his own, and his own received him not.
But as many as received him, to them gave he power to become the sons of God, even to them that believe on his name:
Which were born, not of blood, nor of the will of the flesh, nor of the will of man, but of God.
And the Word was made flesh, and dwelt among us, (and we beheld his glory, the glory as of the only begotten of the Father,) full of grace and truth.
John bare witness of him, and cried, saying, This was he of whom I spake, He that cometh after me is preferred before me: for he was before me.
And of his fulness have all we received, and grace for grace.
For the law was given by Moses, but grace and truth came by Jesus Christ.
No man hath seen God at any time; the only begotten Son, which is in the bosom of the Father, he hath declared him.

Why do we need a SAVIOUR? (Romans 3:23, 5:12)
For all have sinned, and come short of the glory of God;  ... Wherefore, as by one man sin entered into the world, and death by sin; and so death passed upon all men, for that all have sinned:

Who is the SAVIOUR?  (Is there more than one SAVIOUR?) (Isaiah 43:11, 44:8,  Hosea 13:4)
I, even I, am the LORD; and beside me there is no saviour. ... Fear ye not, neither be afraid: have not I told thee from that time, and have declared it? ... ye are even my witnesses. Is there a God beside me? yea, there is no God; I know not any. ... Yet I am the LORD thy God from the land of Egypt, and thou shalt know no god but me: for there is no saviour beside me. (See also: Isaiah 12, Matthew 1:21 ... call his name JESUS: {YESHUA – GOD my SAVIOUR} for he shall save his people from their sins.)

Why do we need to get to know HIM? (John 17:3, Matthew 11:28-30)
And this is life eternal, that they might know thee the only true God,
and Jesus Christ, whom thou hast sent. ... Come unto me, all ye that labour and are heavy laden, and I will give you rest. Take my yoke upon you, and learn of me; for I am meek and lowly in heart: and ye shall find rest unto your souls. For my yoke is easy, and my burden is light.

How do we (1) get to know HIM, (2) come to know that we know HIM? (John 8:31,32; 1 John 2:3)
Then said Jesus to those Jews which believed on him, If ye continue in my word,
then are ye my disciples indeed; And ye shall know the truth, and the truth shall make you free. ...
And hereby we do know that we know him, if we keep his commandments.

Does He still speak to us today? (John 10:27, 14:26)
My sheep hear my voice, ... they follow me:  ... the Comforter, which is the Holy Ghost (the Holy Spirit), whom the Father will send in my name, he shall teach you all things, and bring all things to your remembrance, whatsoever I have said unto you.

14
Here is one more attempt, to demystify for beginning C++ students,  the steps to coding a simple Vector class ...



The first step will be just a Vector of int ...using a struct ... so all members are public by default.

Code: [Select]
// Vector_step1.cpp //  // 2017-03-09 //


#include <iostream>

using namespace std;

const unsigned INIT_CAP = 2;

struct Vector
{
    size_t len;
    size_t cap;
    int* ary;
   
    // default ctor ...
    Vector() :len(0), cap(0), ary(0) {}
   
    void push_back( int val );
    void enlarge();
   
    int operator [] ( size_t i ) const { return ary[i]; }
   
    // so can set new values in the vector //
    int& operator [] ( size_t i ) { return ary[i]; }
} ;


// definitions //

void Vector::push_back( int val )
{
    if( len == cap ) enlarge();
    ary[len] = val;
    ++ len;
}

void Vector::enlarge()
{
    if( cap ) cap += cap; // it gets doubled if had a value
    else cap = INIT_CAP;
   
    int* tmp = new int[cap]; // get enlarged memory //
   
    for( size_t i = 0; i < len; ++ i ) tmp[i] = ary[i]; // copy over //
   
    delete [] ary; // delete OLD aray memory //
   
    ary = tmp; // update ary pointer to point to new memory //
}




// a little test ... //
void print( const Vector& v )
{
    for( size_t i = 0; i < v.len; ++ i )
        cout << v[i] << ' ';
       
    cout << "\nThe len = " << v.len
         << ", the cap = " << v.cap << '\n';
}


int main()
{
    Vector v;
    v.push_back( 6 );
    v.push_back( 7 );
    v.push_back( 8 );
   
    print( v );
}

15
For students wanting to learn about several commonly used data container structures, and data handling algorithms, such as a linear search of the container to see if an element is there or not, and other methods such as erase, sort, etc...

the following pages may be, for you,

JUST what the Dr. has ordered

to help get you beyond the long start-up learning curve, for the linked-list type data structure, both single-linked and double-linked ...

Please see the following demo code progressions, beginning with a quite bare SLL ... and progressing to a fairly full featured DLL.




You may also like to see 6 Fast Steps to a C++ template class List ...
http://developers-heaven.net/forum/index.php/topic,2606.0.html


What follows, is a bare-bones list with an insert sorted method ...

Code: [Select]
// bareBonesListInsetSorted.cpp //  // 2017-02-11 //

#include <iostream>
#include <string>

using std::ostream;
using std::string;


template < typename T >
struct Node
{
    T data;
    Node* next;
   
    // ctors...
    Node( const T& data= T(), Node* next = 0 ) : data(data), next(next) {}

    // def'n for overloaded << for Node< T > objects ,,,
    friend ostream& operator << ( ostream& os, const Node* nd )
    {
        return os << nd->data;
    }
} ;


template< typename T >
struct List
{
    Node< T >* head;
   
    // default ctor...
    List() : head(0) {}
    // dtor...
    ~List() { clear(); }
   
    void clear()
    {
        Node< T >* del;
        while( head )
        {
            del = head;
            head = head->next;
            delete del;
        }
        // Note that head is set to 0 when done //
    }
   
    /*
    void push_front( const T& data )
    {
        // Note that this also sets the next to 'head' //
        Node< T >* newNode = new Node< T >( data, head );
        head = newNode; // update the head pointer //
    }
    */
   
    // insert sorted by <= def'n of objects ...
    void insert( const T& data )
    {
        Node< T >* nNode = new Node< T > (data); // recall next set to 0 //
       
        // case 1 : NOT inserted as the head node
        if( head != 0  &&  head->data <= data )
        {
            // find Node to insert after
            Node< T >* prev = head;
            Node< T >* cur = head->next;
            while( cur != 0 && cur->data <= data )
            {
                prev = cur;
                cur = cur->next;
            }
            // ok found spot ... insert after 'prev'

            prev->next = nNode;

            //if( cur ) // NOT at end
            nNode->next = cur; // link next to 'next' //
        }
        else // case 2 : insert at head ...
        {
            nNode->next = head;
            head = nNode; // update head //
        }
    }
   
   
    // def'n of overloaded << for List objects ...
    friend ostream& operator << ( ostream& os, const List< T >& lst )
    {
        for( Node< T >* cur = lst.head; cur != 0; cur = cur->next )
        {
            os << cur << '\n'; //uses overloaded << for Node above //
        }
        return os;
    }
} ;


struct Student
{
    string name;
    int id;
   
    // ctors...
    Student( string name = "", int id = 0 ) : name(name), id(id) {}
   
    // for insert sorted method ...
    bool operator <= ( const Student& st ) const
    {
        return id <= st.id;
    }
   
    friend ostream& operator << ( ostream& os, const Student& st )
    {
        return os << st.name << ' ' << st.id;
    }
} ;






int main()
{
    using std::cout;
    using std::cin;
   
    List< Student > studs;
   
    studs.insert( Student("Sam", 3) );
    studs.insert( Student("James", 1) );
    studs.insert( Student("Annie", 4) );
    studs.insert( Student("Jill", 2) );
   
   
    cout << "studs now are: \n" << studs;
   
   
    cout << "\nPress 'Enter' to continue/exit ... ";
    cin.get();
}


Same as above ... but class version ...

Code: [Select]
// bareBonesListInsetSorted_classVersion.cpp //  // 2017-02-11 //

#include <iostream>
#include <string>

using std::ostream;
using std::string;

template < typename T > class List; // forward declaration //

template < typename T >
class Node
{
public:
    // ctors...
    Node( const T& data= T(), Node* next = 0 ) : data(data), next(next) {}

private:
    T data;
    Node* next;
   
    // def'n for overloaded << for Node< T > objects ,,,
    friend ostream& operator << ( ostream& os, const Node* nd )
    {
        return os << nd->data;
    }
    friend class List < T >;
} ;



template< typename T >
class List
{
public:
    // default ctor...
    List() : head(0) {}
    // dtor...
    ~List() { clear(); }
   
    void clear()
    {
        while( head )
        {
            Node< T >* del = head;
            head = head->next;
            delete del;
        }
        // Note that head is set to 0 when done //
    }
   
    void push_front( const T& data )
    {
        // Note that this alos sets the next to 'head' //
        Node< T >* newNode = new Node< T >( data, head );
        head = newNode; // update the head pointer //
    }
   
    // insert sorted by <= def'n of objects ...
    void insert( const T& data )
    {
        Node< T >* nNode = new Node< T > (data); // recall next set to 0 //
       
        // case 1 : NOT inserted as the head node
        if( head != 0  &&  head->data <= nNode->data )
        {
            // find Node to insert after
            Node< T >* prev = head;
            Node< T >* cur = head->next;
            while( cur != 0 && cur->data <= nNode->data )
            {
                prev = cur;
                cur = cur->next;
            }
            // ok found spot ... insert after 'prev'

            prev->next = nNode;

            //if( cur ) // NOT at end
            nNode->next = cur; // link next to 'next' //
        }
        else // case 2 : insert at head ...
        {
            nNode->next = head;
            head = nNode; // update head //
        }
    }
    void print( ostream& os ) const
    {
        Node< T >* cur = head;
        for( ; cur != 0 ; cur = cur->next )
            os << cur << '\n'; //uses overloaded << for Node above //
    }
   
private:
    Node< T >* head;
   
} ;

// def'n of overloaded << for List objects ...
template < typename T >
ostream& operator << ( ostream& os, const List< T >& lst )
{
    lst.print( os );
    return os;
}



class Student
{
public:
    // ctors...
    Student( string name="", int id=0 ) : name(name), id(id) {}
   
    // for insert sorted method ...
    bool operator <= ( const Student& st ) const
    {
        return id <= st.id;
    }
   
private:
    string name;
    int id;
   
    friend ostream& operator << ( ostream& os, const Student& st )
    {
        return os << st.name << ' ' << st.id;
    }
} ;






int main()
{
    using std::cout;
    using std::cin;
   
    List< Student > studs;
   
    studs.insert( Student("Sam", 3) );
    studs.insert( Student("James", 1) );
    studs.insert( Student("Annie", 4) );
    studs.insert( Student("Jill", 2) );
   
   
    cout << "studs now are: \n" << studs;
   
   
    cout << "\nPress 'Enter' to continue/exit ... ";
    cin.get();
}


Same as above ... but with a nested Node class/struct ...

Code: [Select]
// bareBonesListInsetSorted_classVersion_nestedNode.cpp //  // 2017-02-11 //

#include <iostream>
#include <string>

using std::ostream;
using std::string;



template< typename T >
class List
{
public:
    // default ctor...
    List() : head(0) {}
    // dtor...
    ~List() { clear(); }
   
    void clear()
    {
        while( head )
        {
            Node* del = head;
            head = head->next;
            delete del;
        }
        // Note that head is set to 0 when done //
    }
   
    void push_front( const T& data )
    {
        // Note that this alos sets the next to 'head' //
        Node* newNode = new Node( data, head );
        head = newNode; // update the head pointer //
    }
   
    // insert sorted by <= def'n of objects ...
    void insert( const T& data )
    {
        Node* nNode = new Node( data ); // recall next set to 0 //
       
        // case 1 : NOT inserted as the head node
        if( head != 0  &&  head->data <= nNode->data )
        {
            // find Node to insert after
            Node* prev = head;
            Node* cur = head->next;
            while( cur != 0 && cur->data <= nNode->data )
            {
                prev = cur;
                cur = cur->next;
            }
            // ok found spot ... insert after 'prev'

            prev->next = nNode;

            //if( cur ) // NOT at end
            nNode->next = cur; // link next to 'next' //
        }
        else // case 2 : insert at head ...
        {
            nNode->next = head;
            head = nNode; // update head //
        }
    }
    void print( ostream& os ) const
    {
        Node* cur = head;
        for( ; cur != 0 ; cur = cur->next )
            os << cur->data << '\n';
    }
   
private:
    struct Node
    {
        Node( const T& data= T(), Node* next = 0 ) : data(data), next(next) {}

        T data;
        Node* next;
    } ;
   
    Node* head;
} ;

// def'n of overloaded << for List objects ...
template < typename T >
ostream& operator << ( ostream& os, const List< T >& lst )
{
    lst.print( os );
    return os;
}



class Student
{
public:
    // ctors...
    Student( string name="", int id=0 ) : name(name), id(id) {}
   
    // for insert sorted method ...
    bool operator <= ( const Student& st ) const
    {
        return id <= st.id;
    }
   
private:
    string name;
    int id;
   
    friend ostream& operator << ( ostream& os, const Student& st )
    {
        return os << st.name << ' ' << st.id;
    }
} ;






int main()
{
    using std::cout;
    using std::cin;
   
    List< Student > studs;
   
    studs.insert( Student("Sam", 3) );
    studs.insert( Student("James", 1) );
    studs.insert( Student("Annie", 4) );
    studs.insert( Student("Jill", 2) );
   
   
    cout << "studs now are: \n" << studs;
   
   
    cout << "\nPress 'Enter' to continue/exit ... ";
    cin.get();
}

Pages: [1] 2 3 ... 5