Recent Posts

Pages: [1] 2 3 ... 10
1
Java / Re: Java 7 / Java 8 Large File Read and Run times Compared ...
« Last post by David on December 06, 2017, 05:41:26 AM »
And now a timed 'stream' file read method ...

Code: [Select]
/**
 * Reports the number of seconds the computer spent
 * reading 300,000 lines, via a Java 8 type Stream object,
 * and using its forEach method,
 * to then parsing out the 10 integers on each line,
 * adding each integer, as parsed out, to a growing List < Integer >
 *
 * @version 2017-12-06
 * @author dwz
 */
 

import java.nio.file.Paths;
import java.nio.file.Files;
;
import java.io.IOException;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;


public class TimedReadStream {
   
    static String FNAME = "MyRandomInts.txt";
    static List < Integer > nums = new ArrayList <> ();

    public static void main( String[] args ) {
       
        long startTime = System.currentTimeMillis();
        testItOut();
        long endTime = System.currentTimeMillis();
        System.out.println();
        System.out.println( "Run time in seconds was: " + (endTime - startTime) / 1000.0 );
        System.out.println( "There are " + nums.size() + " numbers in the List of nums." );
    }

    static void testItOut() {

        try( Stream< String > myLines = Files.lines( Paths.get( FNAME ) ) ) {
            myLines.forEach( line -> processLine( line) );
        } catch( IOException ex ) {
            System.out.println( ex );
        }
    }
   
    static void processLine( String line ) {

        String[] ary = line.split( " " );
        try {
            for( String val : ary )
                nums.add( Integer.parseInt(val) );
        } catch( Exception ex ) {
            System.out.println( ex );
        }
    }
}




Below , are some typical result times on my Windows 7 OS laptop , right after a computer 'reboot',
for 3 successive runs of reading with the new Java 8 Stream read methods,
followed by 3  sets of reading 'line by line' ...

then the computer was rebooted and the order of the sets was reversed with the read 'line by line' at the start ...

NOTE the MUCH longer read times for the first file read, in a set of repeats to read that file, when no part of the file is yet in cache memory right after the computer has been rebooted!



Computer was 're-booted' ... then these tests were done:

Run time in seconds was: 7.704
There are 3000000 numbers in the List of nums.

Run time in seconds was: 1.846
There are 3000000 numbers in the List of nums.

Run time in seconds was: 1.832
There are 3000000 numbers in the List of nums.
Stream ...


Run time in seconds was: 2.035
There are 3000000 numbers in the List of nums.

Run time in seconds was: 1.808
There are 3000000 numbers in the List of nums.

Run time in seconds was: 2.075
There are 3000000 numbers in the List of nums.
Line ...


Press any key to continue . . .



Run time in seconds was: 2.149
There are 3000000 numbers in the List of nums.

Run time in seconds was: 2.043
There are 3000000 numbers in the List of nums.

Run time in seconds was: 2.106
There are 3000000 numbers in the List of nums.
Stream ...


Run time in seconds was: 1.878
There are 3000000 numbers in the List of nums.

Run time in seconds was: 1.918
There are 3000000 numbers in the List of nums.

Run time in seconds was: 1.96
There are 3000000 numbers in the List of nums.
Line ...


Press any key to continue . . .



Computer was 're-booted' ... then these tests were done:

Run time in seconds was: 3.37
There are 3000000 numbers in the List of nums.

Run time in seconds was: 2.081
There are 3000000 numbers in the List of nums.

Run time in seconds was: 1.981
There are 3000000 numbers in the List of nums.
Line ...


Run time in seconds was: 2.1
There are 3000000 numbers in the List of nums.

Run time in seconds was: 1.997
There are 3000000 numbers in the List of nums.

Run time in seconds was: 2.005
There are 3000000 numbers in the List of nums.
Stream ...


Press any key to continue . . .




Run time in seconds was: 1.919
There are 3000000 numbers in the List of nums.

Run time in seconds was: 2.1
There are 3000000 numbers in the List of nums.

Run time in seconds was: 1.982
There are 3000000 numbers in the List of nums.
Line ...


Run time in seconds was: 2.056
There are 3000000 numbers in the List of nums.

Run time in seconds was: 2.013
There are 3000000 numbers in the List of nums.

Run time in seconds was: 1.981
There are 3000000 numbers in the List of nums.
Stream ...


Press any key to continue . . .
2
Java / Re: Java 7 / Java 8 Large File Read and Run times Compared ...
« Last post by David on December 06, 2017, 05:39:25 AM »
Now a timed  'readline' method ... reading this large file.

Code: [Select]
/**
 * Reports the number of seconds the computer spent
 * reading 300,000 lines, line by line,
 * and then parsing out the 10 integers on each line
 * adding each integer, as parsed out, to a growing List < Integer >
 *
 * @version 2017-12-06
 * @author dwz
 */
 

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

import java.io.BufferedReader;
import java.io.IOException;

import java.util.ArrayList;
import java.util.List;


public class TimedReadLine {
   
    static String FNAME = "MyRandomInts.txt";
    static List < Integer > nums = new ArrayList <> ();

    public static void main( String[] args ) {
       
        long startTime = System.currentTimeMillis();
        testItOut();
        long endTime = System.currentTimeMillis();
        System.out.println();
        System.out.println( "Run time in seconds was: " + (endTime - startTime) / 1000.0 );
        System.out.println( "There are " + nums.size() + " numbers in the List of nums." );
    }

    static void testItOut() {

        try( BufferedReader fin = Files.newBufferedReader( Paths.get( FNAME ),
                Charset.defaultCharset() ) ) {
            String line = null;
            while( ( line = fin.readLine() ) != null ) {
                processLine( line );
            }
        } catch( IOException ex ) {
            System.out.println( ex );
        }
    }
   
    static void processLine( String line ) {

        String[] ary = line.split( " " );
        try {
            for( String val : ary )
                nums.add( Integer.parseInt(val) );
        } catch( Exception ex ) {
            System.out.println( ex );
        }
    }
}

3
Java / Java 7 / Java 8 Large File Read and Run times Compared ...
« Last post by David 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 );
    }
}
4
Java / Re: Six Fast Steps in Java 8 ... (a continuation of the Six Fast Steps series)
« Last post by David on November 28, 2017, 04:40:05 AM »
Java 8 Stream versions ...

Code: [Select]
/**
 * @version 2017-11-27
 * @author dwz
 * An example of a Java 8 way a student might code to read
 * a text file line into a Stream ... displaying each line as read.
 */

// structure of below used data file: Persons.txt //
/*
Matt 1 19820611
Bonnie 2 19830202
Theo 3 20140712
Isla 4 20171119
*/


import java.nio.file.Paths;
import java.nio.file.Files;
import java.io.IOException;
import java.util.stream.Stream;


class StreamFileTest {
   
    // Place this file in the same folder
    // as the .class file(s) produced here. //
    static String FNAME = "Persons.txt";
   
    public static void main( String[] args ) {
       
        // code for try with resources that are auto-closeable //
        try( Stream< String > myLines = Files.lines( Paths.get( FNAME ) ) ) {
            myLines.forEach( System.out::println );
        } catch( IOException ex ) {
            System.out.println( ex );
        }       
    }
}

Also ...

Code: [Select]
/**
 * @version 2017-12-05
 * @author dwz
 * An example of a Java 8 way a student might code to read
 * text file lines into a Stream < String > ...
 * parsing each line (in the stream) into a Person object ...
 * and adding that new Person object to a growing List of type Person,
 * then show that list sorted by names.
 */


// structure of below used data file: Persons.txt //
/*
Matt 1 19820611
Bonnie 2 19830202
Theo 3 20140712
Isla 4 20171119
*/


import java.nio.file.Paths;
import java.nio.file.Files;
import java.io.IOException;
import java.util.stream.Stream;
import java.util.ArrayList;
import java.util.List;
import java.util.Collections;


class StreamFileTest2 {
   
    // Place this file in the same folder
    // as the .class file(s) produced here. //
    static String FNAME = "Persons.txt";
   
    public static void main( String[] args ) {
   
        List < Person > mattsFamily = new ArrayList <> ();
       
        // code for try with resources that are auto-closeable //
        try( Stream< String > myLines = Files.lines( Paths.get( FNAME ) ) ) {
            // note use below of lambda function: line -> mattsFamily.add( new Person(line) //
            myLines.forEach( line -> mattsFamily.add( new Person(line) ) );
        } catch( IOException ex ) {
            System.out.println( ex );
        }

        Collections.sort( mattsFamily, (a, b) -> a.name.compareTo(b.name) );
        // Now show each Person in the sorted List < Person> object: mattsFamily ...
        for( Person per : mattsFamily ) {
            System.out.println( per ); // calls the 'toString' Person method //
        }
    }
}


// an example of a simple class Person //
class Person {
    String name, id, dob;
   
    // constructor from (here a file) line passed in //
    public Person( String line ) {

        String[] ary = line.split(" ");
        name = ary[0];
        id = ary[1];
        dob = ary[2];
    }
   
    @Override
    public String toString() {
        return name + ", id: " + id + ", dob: " + dob;
    }
}
5
Java / Re: Six Fast Steps in Java 8 ... (a continuation of the Six Fast Steps series)
« Last post by David on November 28, 2017, 04:37:17 AM »
A simple Java reading-file-lines example vs a Java 8 version ...

Code: [Select]
/**
 * @version 2017-11-26
 * @author dwz
 * An example of a simple way a beginning student might code
 * to read a text file line by line ... displaying each line as read.
 */


import java.util.Scanner;
import java.nio.file.Paths;
import java.io.IOException;


class ScanFileTest {
   
    // Place this file in the same folder
    // as the .class file(s) produced here. //
    static String FNAME = "Persons.txt";
   
    public static void main( String[] args ) {
       
        // code for try with resources that are auto-closeable //
        try( Scanner scan = new Scanner( Paths.get( FNAME ) ) ) {
            String line = null;
            while( scan.hasNext() ) {
                line = scan.nextLine();
                System.out.println( line );
            }
        } catch( IOException ex ) {
            System.out.println( ex );
        }       
    }
}

Also ...

Code: [Select]
/**
 * @version 2017-12-05
 * @author dwz
 * An example of a simple way a beginning student might code
 * to read a (small) text file into an ArrayList < Person > ...
 * then to display that List < Person > in some sorted order
 * specified by using a lambda function to control the sort.
 */

// structure of below used data file: Persons.txt //
/*
Matt 1 19820611
Bonnie 2 19830202
Theo 3 20140712
Isla 4 20171119
*/


import java.util.Scanner;
import java.nio.file.Paths;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Collections;


class ScanFileTest2 {
   
    // Place this file in the same folder
    // as the .class file(s) produced here. //
    static String FNAME = "Persons.txt";
   
    public static void main( String[] args ) {
        List < Person > mattsFamily = new ArrayList <> (); // get an empty ArrayList //
       
        // code for try with resources that are auto-closeable //
        try( Scanner scan = new Scanner( Paths.get( FNAME ) ) ) {
            String line = null;
            while( scan.hasNext() ) {
                line = scan.nextLine();
                mattsFamily.add( new Person( line ) );
            }
        } catch( IOException ex ) {
            System.out.println( ex );
        }

        // show all family ... but firstly sort list by birthdays, youngest first //
        Collections.sort( mattsFamily, (a, b) -> b.dob.compareTo(a.dob) );
        for( Person per : mattsFamily ) {
            System.out.println( per ); // calls toString method here //
        }       
    }
}


// an example of a simple class Person //
class Person {
    protected String name, id, dob;
   
    // constructor from (here a file) line passed in //
    public Person( String line ) {

        String[] ary = line.split(" ");
        name = ary[0];
        id = ary[1];
        dob = ary[2];
    }
   
    @Override
    public String toString() {
        return name + ", id: " + id + ", dob: " + dob;
    }
}
6
Java / Re: Six Fast Steps in Java 8 ... (a continuation of the Six Fast Steps series)
« Last post by David on November 28, 2017, 04:29:38 AM »
6. (version 3 - no Java List container is used here)

Code: [Select]
/**
 * @version: 2017-12-05
 * @author: dwz
 * This demo uses the latest Java 8 Stream with map, filter and forEach methods
 * to read a .txt data file of names and blood pressures
 * and then to print a possible diagnosis to console and file
 * for each (NOT Normal) file record as read and processed.
 * (i.e. NO storage container is used here.)
 */
 

// structure of data file: BP.txt //
/*
Smith Jane 133/76
Jones Rob 98/70
Costello Judy-Ann 144/90
Frank-Anderson Bibby-Bonnie 190/30
Sue Peggy 10/5
James-Thomas Andrew 190/111
*/


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

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

import java.util.stream.Stream;


public class BloodPressure3 {

    final static String FNAME = "BP.txt";
    final static String RESULTS_FNAME = "Results" + FNAME;

    public static void main( String[] args ) {
           
        try( Stream< String > lines = Files.lines( Paths.get( FNAME ) );

            BufferedWriter bw = Files.newBufferedWriter( Paths.get( RESULTS_FNAME ),
                    Charset.defaultCharset() ) ) {
                   
            lines.map( line -> (new BP(line)).toString() )
                 .filter( diaText -> ! diaText.substring( diaText.length() - 6 ).equals( "Normal" ) )
                 .forEach( diaText -> output( diaText, bw ) );
                 
        } catch( IOException ex ) {
            System.out.println( ex );
        }
    }
   
    static void output( String diaText, BufferedWriter bw ) {
        System.out.println( diaText ); // print result to Console //
        try {
            bw.write( diaText ); // bw.write( diaText, 0, diaText.length() );
            bw.newLine();   
        } catch( IOException ex ) {
            System.out.println( ex );
        }
    }
}
7
Java / Re: Six Fast Steps in Java 8 ... (a continuation of the Six Fast Steps series)
« Last post by David on November 21, 2017, 05:51:46 AM »
(6. version 2)  New file stream version - uses file: class BP below


Code: [Select]
/**
 * @version: 2017-12-05
 * @author: dwz
 * This demos using the latest Java 8 Stream, with map and ForEach methods,
 * to read a .txt data file of names and blood pressures
 * and then to print a possible diagnosis to console and file.
 * (Note that each result (String) gets stored in a List <String> container here.)
 */
 

// structure of data file: BP.txt //
/*
Smith Jane 133/76
Jones Rob 98/70
Costello Judy-Ann 144/90
Frank-Anderson Bibby-Bonnie 190/30
Sue Peggy 10/5
James-Thomas Andrew 190/111
*/


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

import java.io.IOException;

import java.util.stream.Stream;
import java.util.List;
import java.util.ArrayList;


public class BloodPressure2 {

    final static String FNAME = "BP.txt";
    final static String RESULTS_FNAME = "Results" + FNAME;
    // get (a ref to) an empty List to be filled up below //
    final static List< String > results = new ArrayList<> ();

    public static void main( String[] args ) {
           
        try( Stream< String > lines = Files.lines( Paths.get( FNAME ) ) ) {
            lines.map( line -> diagnoseAndAddResultString(line) )
                 .forEach( System.out::println );
       
        } catch( IOException ex ) {
            System.out.println( ex );
        }
       
        // ok ... now can write List of results to file ...
        try {
            Files.write( Paths.get( RESULTS_FNAME ), results, Charset.defaultCharset() );
        } catch( IOException ex ) {
            System.out.println( ex );
        }
    }
   
    static String diagnoseAndAddResultString( String line ) {
        BP bp = new BP( line );
        String tmp = bp.toString(); // tmp now holds diagnosis also //
        results.add( tmp ); // Note that results is a (ref. to a) List< String > object //
        return tmp;
    }
}


And here is the class BP used above ...

Code: [Select]
/**
 * @version: 2017-12-05
 * @author: dwz
 * class BP handles Blood Pressure data
 * and methods to get and show a diagnosis
 */


// structure of data file ...
// BP.txt //
/*
Smith Jane 133/76
Jones Rob 98/70
Costello Judy-Ann 144/90
Frank-Anderson Bibby-Bonnie 190/30
Sue Peggy 10/5
James-Thomas Andrew 190/111
*/


public class BP {

    private final static String UNKNOWN = " <--\n Unrecognized diagnosis. \n" +
        "* CHECK VALIDITY of DATA entered. *";
    private String lname, fname;
    private int sys, dia;
   
    // ctor from passed in String line of data (from file) //
    public BP( String line ) {
        String[] ary = line.split( "[/ ]" ); // split on char '/' or char ' ' //
        //System.out.println( "ary.length = " + ary.length ); //debugging//
        lname = ary[0];
        fname = ary[1];
        try {
            sys = Integer.parseInt( ary[2] );
            dia = Integer.parseInt( ary[3] );
           
        } catch( NumberFormatException ex ) {
            System.out.println( ex );
        }
    }
       
    // Note: this returned string is also returned as part of below toString() //
    public String getDiagnosis() {

        if( sys < 120/2 || dia < 80/2 ) // ?? //
            return UNKNOWN;
        if( sys > 120*2 || dia > 80*2 ) // ?? //
            return UNKNOWN;

        if( sys >= 160 || dia > 100 )
            return " <--\n CHECK AGE re. possible Stage 2 Hypertension.";
        if( sys >= 140 || dia >= 90 )
            return " <--\n CHECK AGE re. possible Stage 1 Hypertension.";
        if( sys >= 120 || dia >= 80 )
            return " <--\n CHECK AGE re. possible Pre-Hypertension.";
        // else ...
        return "\n Normal";
    }
   
    // Note that this method calls above method getDiagnosis() //
    @Override
    public String toString() {
        // left adjust string of combined lname + ", " + fname in 40 spaces,
        // right adjust each number in 3 spaces
        return String.format( "%-40s %3d/%3d %s", (lname + ", " + fname),
            sys, dia, getDiagnosis() );
    }
}


And a demo text data file:  BP.txt

Code: [Select]
Smith Jane 133/76
Jones Rob 98/70
Costello Judy-Ann 144/90
Frank-Anderson Bibby-Bonnie 190/30
Sue Peggy 10/5
James-Thomas Andrew 190/111


And another Java 8 way ...
6. (version 2a)

Code: [Select]
/**
 * @version: 2017-12-05
 * @author: dwz
 * This demos using the latest Java 8 Stream with map, filter and collect methods ...
 * to read a .txt data file of names and blood pressures
 * and then to print a possible diagnosis to console and file
 * for all NOT Normal results ... sorted by names (Note result String starts with lname, fname).
 */
 

// structure of data file: BP.txt //
/*
Smith Jane 133/76
Jones Rob 98/70
Costello Judy-Ann 144/90
Frank-Anderson Bibby-Bonnie 190/30
Sue Peggy 10/5
James-Thomas Andrew 190/111
*/


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

import java.io.IOException;

import java.util.stream.Stream;
import java.util.stream.Collectors;
import java.util.List;
//import java.util.Collections;


public class BloodPressure2a {

    final static String FNAME = "BP.txt";
    final static String RESULTS_FNAME = "Results" + FNAME;


    public static void main( String[] args ) {

        List< String > results = null;
           
        try( Stream< String > lines = Files.lines( Paths.get( FNAME ) ) ) {
            // filter out all Normal results //
            results = lines.map( line -> (new BP( line )).toString() )
                           .filter( diaText -> ! diaText.substring(diaText.length()-6).equals("Normal") )
                           .sorted()
                           .collect( Collectors.toList() );
       
        } catch( IOException ex ) {
            System.out.println( ex );
        }


        // Now can sort result strings by names (that appear at front of each result string) //
        //Collections.sort( results );


        //for( String result : results ) // Now can print list of (NOT Normal) results to Console //
            //System.out.println( result );
        // or //
        results.stream().forEach( System.out::println );

        try { // And now can write List of results to file //
                       
            Files.write( Paths.get( RESULTS_FNAME ), results, Charset.defaultCharset() );
        } catch( IOException ex ) {
            System.out.println( ex );
        }
    }
}
8
Ask the Author / Re: Breakfast ... it's time to feed at Jesus Feet ...
« Last post by David on August 27, 2017, 04:54:14 AM »
Below I have listed several topics that arose during our first 'breakfast Bible Study' time. I hope you will find the below further references to these topics helpful.

Topics to address:

1) The Holy Bible is NOT man's word and is the standard to which we must compare all our own ideas and all other teachings, (as the Bereans did), else, if we 'light our own fire and walk in its light' ... we will then have from the very hand of God ... 'to lie down in sorrow.' (Psalm 12:6-7, Deuteronomy 12:32, Revelation 22:18-19, 2 Timothy 3:14-17, 2 Peter 1:15 – 2 Peter 2:3, Isaiah 50:11)

2) The wisdom from above is 'easily entreated' ... Note God says to us: 'Come, let us reason together.' (James 3:17, Isaiah 1:18)

3) There is a devil and he has a host of demons that serve him. Jesus overcame the devil for us and cast out many demons ... and commissions us, to do the same. (Luke 10:19)

4) The devil and his demons are not our only enemy ... we are also to overcome our own (fallen) fleshly desires and the voices of this world. (Mathew 26:41 and Mark 14:38 and Romans 8:3-5, John 5:4)

5) God has given us ALL we need to overcome: (a) the blood of Jesus to overcome all the accusations of the devil and his demons, (b) the Holy Spirit to help our weak flesh, (c) faith in His Word to overcome this world and its lusts. (Revelations 12:11, Mathew 26:41 and Mark 14:38 and Romans 8:3-5, John 5:4, also see Ephesians 6:10-18)

6) It is true that many of the children of Ishmael, desire to serve the God of their father Abraham, but 'Allah' does not have the same character as the God of Abraham. The whole religion of Mohamed was created by Rome in the 600's in an attempt to regain Jerusalem from which to rule the world. This was revealed to our generation by Alberto R... after he became a true believer in Jesus, and so he then left Rome and his Jesuit order to expose so much of the evil that he had been taught by Rome and seen there. (Link to be provided.)

links re. topic 6:

https://www.chick.com/articles/houstonletter.asp

https://m.youtube.com/watch?v=IrOWBqZbbew

7) There is none righteous ... No, not one. All have sinned and fall short of the glory of God. The wages of sin is death but the gift of God is eternal life through Jesus Christ our Lord and Saviour. (Psalm 14:2-3, Isaiah 53:6, Romans 3:10, Romans 5:12, Romans 6:23, Ephesians 2:1-3, Ephesians 2:8, 1 John 1:8-10)

8 ) Not all our saved. The gate is 'strait' and the road is 'narrow' that leads to life, and few there be that find it ... vs ... the gate is 'wide' and the road is 'broad' that leads to destruction and many go that way. (Matthew 7:13-14)

9) We must be born again ... flesh gives birth to flesh ... Spirit gives birth to Spirit. Flesh and blood can not inherit eternal life. (John 3:5-8, I Corinthians 15:50, Psalm 51:10)

10) Not every one who says Lord, Lord ... shall enter into the kingdom of heaven. (Matthew 7:21-23)

11) The lake of fire is the eternal end for all who follow the devil and his angels. (Matthew 25:41, Revelation 19:20, Revelation 20:15, Revelation 21 : 8 )

12) See Revelation 21, 22 to see what is prepared for all those who love the Lord Jesus Christ.
9


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.org/

(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
10
Ask the Author / Re: Breakfast ... it's time to feed at Jesus Feet ...
« Last post by David on August 08, 2017, 07:38:27 AM »
A start to 'Heaven's inspired answers':


Who is GOD?

Every building has a builder, but the builder of ALL things is God.

For every house is builded by some man; but he that built all things is God.
(Hebrews 3:4)

Genesis 1
1  In the beginning God created the heaven and the earth.
2  And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters.
3  And God said, Let there be light: and there was light.
4  And God saw the light, that it was good: and God divided the light from the darkness.
5  And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.
6  And God said, Let there be a firmament in the midst of the waters, and let it divide the waters from the waters.
7  And God made the firmament, and divided the waters which were under the firmament from the waters which were above the firmament: and it was so.
8  And God called the firmament Heaven. And the evening and the morning were the second day.
9  And God said, Let the waters under the heaven be gathered together unto one place, and let the dry land appear: and it was so.
10 And God called the dry land Earth; and the gathering together of the waters called he Seas: and God saw that it was good.
11 And God said, Let the earth bring forth grass, the herb yielding seed, and the fruit tree yielding fruit after his kind, whose seed is in itself, upon the earth: and it was so.
12 And the earth brought forth grass, and herb yielding seed after his kind, and the tree yielding fruit, whose seed was in itself, after his kind: and God saw that it was good.
13 And the evening and the morning were the third day.
14 And God said, Let there be lights in the firmament of the heaven to divide the day from the night; and let them be for signs, and for seasons, and for days, and years:
15 And let them be for lights in the firmament of the heaven to give light upon the earth: and it was so.
16 And God made two great lights; the greater light to rule the day, and the lesser light to rule the night: he made the stars also.
17 And God set them in the firmament of the heaven to give light upon the earth,
18 And to rule over the day and over the night, and to divide the light from the darkness: and God saw that it was good.
19 And the evening and the morning were the fourth day.
20 And God said, Let the waters bring forth abundantly the moving creature that hath life, and fowl that may fly above the earth in the open firmament of heaven.
21 And God created great whales, and every living creature that moveth, which the waters brought forth abundantly, after their kind, and every winged fowl after his kind: and God saw that it was good.
22 And God blessed them, saying, Be fruitful, and multiply, and fill the waters in the seas, and let fowl multiply in the earth.
23 And the evening and the morning were the fifth day.
24 And God said, Let the earth bring forth the living creature after his kind, cattle, and creeping thing, and beast of the earth after his kind: and it was so.
25 And God made the beast of the earth after his kind, and cattle after their kind, and every thing that creepeth upon the earth after his kind: and God saw that it was good.
26 And God said, Let us make man in our image, after our likeness: and let them have dominion over the fish of the sea, and over the fowl of the air, and over the cattle, and over all the earth, and over every creeping thing that creepeth upon the earth.
27 So God created man in his own image, in the image of God created he him; male and female created he them.
28 And God blessed them, and God said unto them, Be fruitful, and multiply, and replenish the earth, and subdue it: and have dominion over the fish of the sea, and over the fowl of the air, and over every living thing that moveth upon the earth.

For in six days the LORD made heaven and earth, the sea, and all that in them is,
and rested the seventh day:wherefore the LORD blessed the sabbath day, and hallowed it.
(Exodus 20:11)

It is a sign between me and the children of Israel for ever:
for in six days the LORD made heaven and earth,
and on the seventh day he rested, and was refreshed.
(Exodus 31:17)


Who is Jesus?

Verily, verily, I say unto you, He that heareth my word, and believeth on him that sent me,
hath everlasting life, and shall not come into condemnation; but is passed from death unto life.
(John 5:24)

John 10
11  I am the good shepherd: the good shepherd giveth his life for the sheep.
...
14  I am the good shepherd, and know my sheep, and am known of mine.
...
26  But ye believe not, because ye are not of my sheep, as I said unto you.
27  My sheep hear my voice, and I know them, and they follow me:
28  And I give unto them eternal life; and they shall never perish, neither shall any man pluck them out of my hand.
29  My Father, which gave them me, is greater than all; and no man is able to pluck them out of my Father’s hand.
30  I and my Father are one.

Ephesians 2
4  But God, who is rich in mercy, for his great love wherewith he loved us,
5  Even when we were dead in sins, hath quickened us together with Christ, (by grace ye are saved;)
6  And hath raised us up together, and made us sit together in heavenly places in Christ Jesus:
7  That in the ages to come he might shew the exceeding riches of his grace in his kindness toward us through Christ Jesus.
8  For by grace are ye saved through faith; and that not of yourselves: it is the gift of God:
9  Not of works, lest any man should boast.
10 For we are his workmanship, created in Christ Jesus unto good works, which God hath before ordained that we should walk in them.


John 8:38
I speak that which I have seen with my Father: ...

John 14:7
If ye had known me, ye should have known my Father also:
and from henceforth ye know him, and have seen him.

Joh 14:9
Jesus saith unto him, Have I been so long time with you,
and yet hast thou not known me, Philip?
he that hath seen me hath seen the Father;
and how sayest thou then, Shew us the Father?

John 15:24
If I had not done among them the works which none other man did, they had not had sin:
but now have they both seen and hated both me and my Father.

Isaiah 9
6 For unto us a child is born, unto us a son is given: and the government shall be upon his shoulder: and his name shall be called Wonderful, Counsellor, The mighty God, The everlasting Father, The Prince of Peace.
7 Of the increase of his government and peace there shall be no end, upon the throne of David, and upon his kingdom, to order it, and to establish it with judgment and with justice from henceforth even for ever. The zeal of the Lord of hosts will perform this.

Isaiah 12
1  And in that day thou shalt say, O LORD, I will praise thee: though thou wast angry with me, thine anger is turned away, and thou comfortedst me.
2  Behold, God is my salvation (Yeshua); I will trust, and not be afraid: for the LORD THE LORD is my strength and my song; he also is become my salvation (Yeshua).
3  Therefore with joy shall ye draw water out of the wells of salvation (Yeshua).
4  And in that day shall ye say, Praise the LORD, call upon his name, declare his doings among the people, make mention that his name is exalted.
5  Sing unto the LORD; for he hath done excellent things: this is known in all the earth.
6  Cry out and shout, thou inhabitant of Zion: for great is the Holy One of Israel in the midst of thee.

Isaiah 53
3  He is despised and rejected of men; a man of sorrows, and acquainted with grief: and we hid as it were our faces from him; he was despised, and we esteemed him not.
4  Surely he hath borne our griefs, and carried our sorrows: yet we did esteem him stricken, smitten of God, and afflicted.
5  But he was wounded for our transgressions, he was bruised for our iniquities: the chastisement of our peace was upon him; and with his stripes we are healed.
6  All we like sheep have gone astray; we have turned every one to his own way; and the LORD hath laid on him the iniquity of us all.
7  He was oppressed, and he was afflicted, yet he opened not his mouth: he is brought as a lamb to the slaughter, and as a sheep before her shearers is dumb, so he openeth not his mouth.
8  He was taken from prison and from judgment: and who shall declare his generation? for he was cut off out of the land of the living: for the transgression of my people was he stricken.
9  And he made his grave with the wicked, and with the rich in his death; because he had done no violence, neither was any deceit in his mouth.
10 Yet it pleased the LORD to bruise him; he hath put him to grief: when thou shalt make his soul an offering for sin, he shall see his seed, he shall prolong his days, and the pleasure of the LORD shall prosper in his hand.
11 He shall see of the travail of his soul, and shall be satisfied: by his knowledge shall my righteous servant justify many; for he shall bear their iniquities.
12 Therefore will I divide him a portion with the great, and he shall divide the spoil with the strong; because he hath poured out his soul unto death: and he was numbered with the transgressors; and he bare the sin of many, and made intercession for the transgressors.


John 1
1  In the beginning was the Word, and the Word was with God, and the Word was God.
2  The same was in the beginning with God.
3  All things were made by him; and without him was not any thing made that was made.
4  In him was life; and the life was the light of men.
5  And the light shineth in darkness; and the darkness comprehended it not.

Through faith we understand that the worlds were framed by the word of God,
so that things which are seen were not made of things which do appear.
(Hebrews 11:3)



Philippians 2
3  Let nothing be done through strife or vainglory; but in lowliness of mind let each esteem other better than themselves.
4  Look not every man on his own things, but every man also on the things of others.
5  Let this mind be in you, which was also in Christ Jesus:
6  Who, being in the form of God, thought it not robbery to be equal with God:
7  But made himself of no reputation, and took upon him the form of a servant, and was made in the likeness of men:
8  And being found in fashion as a man, he humbled himself, and became obedient unto death, even the death of the cross.
9  Wherefore God also hath highly exalted him, and given him a name which is above every name:
10 That at the name of Jesus every knee should bow, of things in heaven, and things in earth, and things under the earth;
11 And that every tongue should confess that Jesus Christ is Lord, to the glory of God the Father.



Joh 1:10
He was in the world, and the world was made by him, and the world knew him not.

Joh 5:17
But Jesus answered them, My Father worketh hitherto, and I work.

Joh 5:18
Therefore the Jews sought the more to kill him, because he not only had broken the sabbath,
but said also that God was his Father, making himself equal with God.

Joh 5:19
Then answered Jesus and said unto them, Verily, verily, I say unto you, The Son can do nothing of himself,
but what he seeth the Father do: for what things soever he doeth, these also doeth the Son likewise.

Ge 1:26
And God said, Let us make man in our image, after our likeness:
and let them have dominion over the fish of the sea, and over the fowl of the air, and over the cattle,
and over all the earth, and over every creeping thing that creepeth upon the earth.

Ps 33:6
By the word of the LORD were the heavens made; and all the host of them by the breath of his mouth.

Ps 102:25
Of old hast thou laid the foundation of the earth: and the heavens are the work of thy hands.

Isa 45:12
I have made the earth, and created man upon it:
I, even my hands, have stretched out the heavens, and all their host have I commanded.

Isa 45:18
For thus saith the LORD that created the heavens; God himself that formed the earth and made it;
he hath established it, he created it not in vain,
he formed it to be inhabited:
I am the LORD; and there is none else.

Eph 3:9
And to make all men see what is the fellowship of the mystery,
which from the beginning of the world hath been hid in God,
who created all things by Jesus Christ:


For by him were all things created, that are in heaven, and that are in earth, visible and invisible,
whether they be thrones, or dominions, or principalities, or powers: all things were created by him, and for him:
And he is before all things, and by him all things consist.
(Colossians 1:16, 17)

Hath in these last days spoken unto us by his Son, whom he hath appointed heir of all things, by whom also he made the worlds;
Who being the brightness of his glory, and the express image of his person, and upholding all things by the word of his power, when he had by himself purged our sins, sat down on the right hand of the Majesty on high;
...
And, Thou, Lord, in the beginning hast laid the foundation of the earth; and the heavens are the works of thine hands:
They shall perish; but thou remainest; and they all shall wax old as doth a garment;
And as a vesture shalt thou fold them up, and they shall be changed: but thou art the same, and thy years shall not fail.
(Hebrews 1:2,3,10,11,12)

For this man was counted worthy of more glory than Moses, inasmuch as he who hath builded the house hath more honour than the house.
For every house is builded by some man; but he that built all things is God.
(Hebrews 3:3,4)

Thou art worthy, O Lord, to receive glory and honour and power:
for thou hast created all things,
and for thy pleasure they are and were created.
(Revelation 4:11)





Pages: [1] 2 3 ... 10