Labels

.NET (2) Civ (1) ClickOnce (1) Fun (1) LEGO (1) Log4Net (1) PdfManual (1) Video (1)

Monday, January 13, 2014

The Conflict Between Religion and Science

Some thoughts of mine that I threw together on the "conflict between religion and science".

Of course, this is all oversimplified, but here goes:
  • Religions are worldviews, such as having a Biblical worldview (which I'll use for the duration of these thoughts)
  • Viewing the world non-religiously is a worldview.
  • Typically I think when people see a conflict of religion vs science, they are really using the term "science" loosely, and are (unintentionally?) including a non-religious worldview along with science.
  • Science is merely what is known through observation and experiment.  Worldviews should not conflict with science, and should try to explain and be compatible with scientific knowledge.
  • For example, science doesn't tell us the age of the earth.  It only tells us what can be observed.  Worldviews can take that data, and combine it with their worldviews to come up with conclusions, that may or may not "sound" scientific.
  • A Biblical worldview should use the belief formed around the Bible and the knowledge of science to form its view of our world.
  • A non-religious worldview can use the belief of the non-supernatural and the knowledge of science to form its view of our world.
  • If presented in this way, then the conflict would be either between worldviews, or between a worldview and pure science.
  • Generally, a person doesn't like to separate their worldview from the facts.  Christians blur facts with Biblical beliefs.  The non-religious blur facts with their beliefs.
  • In the realm of a Biblical worldview, such as in a church, one might hear "God made the earth in 6 days" or "Jesus rose from the dead", belief stated as fact.
  • Whereas in the realm of an non-religious worldview, such as in a venue of mainstream education or media, etc., one might hear about the big bang or "Millions of years ago" or of macro evolution presented factually, belief stated as fact.
  • And since the non-religious worldview wins in the U.S. where we need separation between church and state, and where one religion can't be forced on people, it is easy to see how almost everywhere is the realm of the non-religious worldview, and that's how "science" becomes loosely used to represent both science and the non-religion worldview.  And hence, you've got a conflict between religion and science, because most people slip in worldview stuff into the term "science".
  • And this makes sense, since typically what makes up the details behind the conflicts are actually between the worldviews or conclusions involving the worldviews, and not purely science itself.
  • Basically, the position that there is conflict between religion and science is effectively an admission that the person either doesn't understand how to take what is lumped into "science" and separate it back out into facts and beliefs, or that the person is zealously pushing these beliefs as facts and using the acceptance by the mainstream of the worldview to attack other worldviews by only allowing its worldview to insert belief into the "science" realm.
  • In the old days in the U.S., before the roles were flipped, it was the Biblical worldview that imposed its beliefs into the "science" realm.
  • I believe it is tragic that "separation between church and state" isn't "separation between worldview and state", as it forces separation of all faiths except that of the non-religious.
I could ramble on all day...

Friday, August 31, 2012

Rival TO-753 4 Slice Toaster Oven PDF Manual

I couldn't find a PDF of the Rival TO-753 4-Slice Toaster Oven manual in PDF form on the internet.  But I did find the TO-709, which I checked and is exactly the same as the TO-753.

http://www.rivalproducts.com/manuals/MANUALS/TO-709_43_88825170.PDF

So yeah, I prefer my manuals as PDFS rather than on paper.

Friday, July 27, 2012

Rolling files on date/time boundaries doesn't support a maximum number of backup files.

A few years ago I posted a patch to Log4Net: https://issues.apache.org/jira/browse/LOG4NET-27

I don't remember much about it anymore, but I'll use this blog entry to maintain what I know.

This patch allowed rolling logs by date and deleting them after they are so old.
It was against version 1.2.10.0

My full source code can be downloaded at https://sites.google.com/site/mafujosh/Log4Net_ModifiedByJoshMasek.zip

An example of limiting files by date and by size:

     <appender name="WhateverYouNameThis" type="log4net.Appender.RollingFileAppender">
        <threshold value="All" />
        <file value="logs\WhateverYouNameThisFile.log" />
        <appendToFile value="true" />
        <maxDateRollBackups value="15" />
        <maxSizeRollBackups value="20" />
        <maximumFileSize value="5MB" />
        <rollingStyle value="Composite" />
        <staticLogFileName value="true" />
        <datePattern value="yyyyMMdd-HH.lo\g" />
        <layout type="log4net.Layout.PatternLayout">
            <param name="ConversionPattern" value="%d [%t] %-5p - %m%n" />
        </layout>
     </appender>

So, basically, every hour, this will create a new file (because the format changes every hour).  And, any files older than 15 days should get deleted.  Also, if a file gets larger than 5MB, it will roll to another file, up to 20 times, and then these will start getting deleted too if it goes over 20 files.

Also, some related stack overflow links:
http://stackoverflow.com/questions/95286/log4net-set-max-backup-files-on-rollingfileappender-with-rolling-date/
http://stackoverflow.com/questions/2290552/log4net-remove-old-files-rolling-by-date/
http://stackoverflow.com/questions/2063329/do-you-know-of-a-log4net-appender-which-rolls-on-date-but-lets-you-limit-the-t/

Wednesday, December 29, 2010

mage.exe and trustURLParameters

When automating building ClickOnce applications, I have not found a way to get mage.exe to set trustURLParameters = true in the deployment manifest ".application" file.

My workaround is to have my batch file modify the deployment manifest file with something like: (use your filename instead of yourfilenamegoeshere.application)


ECHO Adding trustURLParameters="true" to deployment manifest...
IF EXIST ".\BuildClickOnceInstallationPackageReplaceText.vbs" del ".\BuildClickOnceInstallationPackageReplaceText.vbs" /F /Q
IF ERRORLEVEL 1 GOTO TheError
echo Set objFS=CreateObject("Scripting.FileSystemObject") > BuildClickOnceInstallationPackageReplaceText.vbs
IF ERRORLEVEL 1 GOTO TheError
echo strFile = WScript.Arguments.Item(0) >> BuildClickOnceInstallationPackageReplaceText.vbs
IF ERRORLEVEL 1 GOTO TheError
echo Set objFile = objFS.OpenTextFile(strFile,1,False,0) >> BuildClickOnceInstallationPackageReplaceText.vbs
IF ERRORLEVEL 1 GOTO TheError
echo allTheContents = objFile.ReadAll >> BuildClickOnceInstallationPackageReplaceText.vbs
IF ERRORLEVEL 1 GOTO TheError
echo objFile.Close >> BuildClickOnceInstallationPackageReplaceText.vbs
IF ERRORLEVEL 1 GOTO TheError
echo Set objFile = objFS.OpenTextFile(strFile,2,True,0) >> BuildClickOnceInstallationPackageReplaceText.vbs
IF ERRORLEVEL 1 GOTO TheError
echo objFile.Write Replace(allTheContents,"<deployment ","<deployment trustURLParameters=""true"" ") >> BuildClickOnceInstallationPackageReplaceText.vbs
IF ERRORLEVEL 1 GOTO TheError
echo objFile.Close  >> BuildClickOnceInstallationPackageReplaceText.vbs
cscript /nologo BuildClickOnceInstallationPackageReplaceText.vbs yourfilenamegoeshere.application
IF ERRORLEVEL 1 GOTO TheError
IF EXIST ".\BuildClickOnceInstallationPackageReplaceText.vbs" del ".\BuildClickOnceInstallationPackageReplaceText.vbs" /F /Q
IF ERRORLEVEL 1 GOTO TheError
pause
exit
:TheError
ECHO Error occurred.  Aborting mission.
pause

Saturday, September 25, 2010

Civ 5 garbled text

Civ 5 was recently released.

Both laptops I tried installing it on had trouble with garbled text, when run against DirectX 9 (Can't run 10 or 11 on XP).  Based on others' posts in forums, it is related to having a Mobile Intel(R) 965 Express Chipset Family video card and driver.  And with Windows 7 with DirectX 11, for me it still is faster to run in as DirectX 9.

Well, first, just to get the game not to crash, I had to go to Dell and download the latest driver.  Then it didn't crash, but the text was garbled.
I also tried downloading the latest from Intel that was newer than Dell's, but that didn't help.

I took a workaround posted on a forum: http://forums.2kgames.com/forums/showthread.php?t=89425  Many thanks to CockedAndLoaded for half of this workaround!

I took that one step further and basically forced uppercase which took out the garbled lowercase letters and looks a lot nicer.  Note, this is a temporary workaround until Civ 5 is patched, someday, theoretically.

 Some related forum posts:
If you want to further tweak the letters, here is what you can do:
  • Open up the ggxml files.
  • Every "glyph" node seems to represent a letter.
  • The "CH=" attribute of each glyph node matches up to a letter's ASCII or ANSI value.  This value is the number that computers use internally to match up to a letter.  Here are some examples of these matchups.
  • Basically, I remove the configuration for the lower case letters, and configured them instead to be the same as the uppercase.  For other languages, I didn't do this.  So you might want to experiment with this for special characters.
  • Basically, you can open up the "Character Map" utility that comes with Windows and is in the Start Menu somewhere (probably in Accessories).  Find the character that you want to replace with something else.  Look at its code.  The code in the "Character Map" utility is probably in HEX, so you'll need to convert that to regular decimal (you could use something like this.)  Do this for both the character you want to replace, and to the character you want to replace it with.  Then look for the lines in the ggxml file with those decimal values in their "CH=" attribute, and copy over the rest of the settings in that row.
If you have made some tweaks that you think others might want, and you want me to add it to this blog, I would be glad to.  Just let me know.

UPDATE 2011-10-23:
I don't know if I tried this, but someone claims to have solved this on their PC with "I found that the refresh rate selected in the game was making the fonts unreadable. When I selected a resolution that used a refresh rate that my desktop was using (and that the monitor was supporting), the fonts became readable." on http://forums.2kgames.com/showthread.php?89425-WORKAROUND-Text-unreadable&p=1471350#post1471350

    Saturday, November 1, 2008

    Josh in LEGO Costume


    LEGO Costume my buddy Matt and I made for Halloween party at work.

    Sunday, January 28, 2007

    first blog

    In the beginning God created the heavens and the earth.