Wednesday, August 7, 2024

The Key to Understanding Moses

 

The Key to Understanding Moses

You already know that the story of Moses receiving the Ten Commandments on Mount Sinai is among the most famous in the Bible. But we don’t know much else about this mysterious time other than Moses neither eating bread nor drinking water (Ex. 34:28). 

When we turn to the Book of Deuteronomy, though, we learn an additional detail: “I lay prostrate before the Lord those forty days and forty nights” (Deut. 9:25). The original Hebrew word for “lay prostrate” is etnapal אֶתְנַפַּל from the root N-P-L (“to fall”). This is an extremely rare word in the Bible, literally meaning, “I threw myself down”.

We learn that Moses did not merely lie down on the ground waiting for the forty days to end. It was quite the contrary... He actively devoted himself to prayer and fasting, to atone for the sins of the people. See how this single Hebrew word contains a much deeper meaning? It not only tells the story of what was happening at that time, but it's also the key to understanding the spiritual character of Moses! 

Tuesday, May 21, 2024

Dataset to Json

 


        public static async Task<string[]> ExecuteReaderArrayAsync(string connectionString, string spName, List<SqlParameter> sqlParameters)

        {

            string[] strArray = new string[2];

            await Task.Run(() => {

                using (var connection = new SqlConnection(connectionString))

                {

                    using (var command = new SqlCommand(spName, connection))

                    {

                        var dataset = new DataSet();

                        var adapter = new SqlDataAdapter();


                        command.CommandType = CommandType.StoredProcedure;

                        command.Parameters.AddRange(sqlParameters.ToArray());

                        adapter.SelectCommand = command;

                        adapter.Fill(dataset);

                        strArray[0] = JsonDataHelper.DataSetToJson(dataset.Tables[0]);

                        strArray[1] = JsonDataHelper.DataSetToJson(dataset.Tables[1]);

                    }

                }

            });


            return strArray;

        }



        public static String DataSetToJson(DataTable dataTable)

        {

            var JSONString = string.Empty;

            JSONString = JsonConvert.SerializeObject(dataTable);

            return JSONString;

        }


Friday, May 17, 2024

JValue and JArray

    IEnumerable<dynamic> testObject = JValue.Parse(jsonString);

    var testLists = testObject .Select(obj => new { 

       FirstName = obj.first_name, 

       LastName = obj.last_name}).ToList();



Convert Newtonsoft.Json.Linq.JArray to a list of specific object type

List<SelectableEnumItem> items = ((JArray)array).Select(x => new SelectableEnumItem
{
    FirstName = (string)x["first_name"],
    Selected = (bool)x["selected"]
}).ToList();