Saturday, December 2, 2023

static constructor and singleton and object class

c# class static constructor

  1. Static constructor in C#
  2. When you work with static class variables, the static constructor allows you to create much cleaner code. It gives you the ability to execute code before one of the static methods of the class is executed. You are able to initialize the static variables of your class with no lock or if statement.

  3. Static Constructor In C# And Its Usages
  4. C# supports two types of constructors, a class constructor (static constructor) and an instance constructor (non-static constructor).

  5. Static Constructors (C# Programming Guide)
  6. A static constructor is used to initialize any static data, or to perform a particular action that needs to be performed only once. It is called automatically before the first instance is created or any static members are referenced. A static constructor will be called at most once.

  7. C# static class constructor
  8. Is there a work around on how to create a constructor for static class?

  9. C# | Object Class
  10. The Object class is the base class for all the classes in the .Net Framework. It is present in the System namespace. In C#, the .NET Base Class Library(BCL) has a language-specific alias which is Object class with the fully qualified name as System.Object.

  11. C# | Static Class
  12. In C#, one is allowed to create a static class, by using static keyword. A static class can only contain static data members and static methods. It is not allowed to create objects of the static class and since it does not allow to create objects it means it does not allow instance constructor. Static classes are sealed, means you cannot inherit a static class from another class.

  13. C# | Difference between Static Constructors and Non-Static Constructors
  14. Static constructors are used to initialize the static members of the class and are implicitly called before the creation of the first instance of the class. Non-static constructors are used to initialize the non-static members of the class. Below are the differences between the Static Constructors and Non-Static Constructors.

  15. Object Class
  16. Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

  17. Static Interfaces in C#
  18. Introducing a library (distributed as a Nuget package) that is compensating for the lack of static interfaces in C#

  19. Constant , Readonly and Static in C#
  20. Constant, readonly and static are mostly used and confused keywords in .NET framework. This article briefly explains about all of the keywords and explains them in the scenarios they can be used in. CodeProject

    Singleton Pattern

  21. Implementing the Singleton Pattern in C#
  22. The singleton pattern is one of the best-known patterns in software engineering. Essentially, a singleton is a class which only allows a single instance of itself to be created, and usually gives simple access to that instance. Most commonly, singletons don't allow any parameters to be specified when creating the instance - as otherwise a second request for an instance but with a different parameter could be problematic! (If the same instance should be accessed for all requests with the same parameter, the factory pattern is more appropriate.) This article deals only with the situation where no parameters are required. Typically a requirement of singletons is that they are created lazily - i.e. that the instance isn't created until it is first needed.

  23. Singleton in C#
  24. Singleton is a creational design pattern, which ensures that only one object of its kind exists and provides a single point of access to it for any other code.

  25. Singleton in C#
  26. Singleton is a creational design pattern, which ensures that only one object of its kind exists and provides a single point of access to it for any other code.

  27. Singleton Design Pattern in C#: Full Guide
  28. Have you ever wondered how to maintain a unique instance throughout the lifecycle of an application and ensure that one class only has one instance?

Friday, November 17, 2023

solar system

solar system

  1. C# Class for Calculating Sunrise and Sunset Times
  2. A class for calculating sunrise and sunset times, implemented as a thread-safe Singleton

  3. Sunrise/Sunset Calculations
  4. Code to help calculate sunrise and sunset times

  5. Sidreal Time Calculator
  6. A sidereal time calculator for Windows Phone

  7. World Time
  8. Displays current time in various timezones. Also demonstrates some Win32 API programming tricks.

  9. The Equation of Time
  10. Or why isn’t the earliest sunset on the year’s shortest day?

    Video

  11. A More Approximate Position of the Planets using JPL Ephemerides (Spirographs!!)
  12. Here I use some software I created on Github to plot the orbits of the planets and make some nice videos to watch and enjoy. I hope you enjoy this as well.

  13. How to calculate sidereal time
  14. 32,867 views Mar 1, 2012 This animation explains how sidereal time is calculated. You can find out more about how sidereal time is used in astronomy and WJ Macdonnell’s telescope at the National Museum of Australia

  15. 0:12 / 13:03 Celestial Coordinates
  16. Celestial Coordinates

  17. Astronomical Coordinates
  18. Describes the various coordinate systems used by astronomers, with a focus on the celestial coordinate system used in astronomical catalogues (also called equatorial coordinates) and how these are transformed to an azimuth and altitude (also know as an elevation).

  19. Right Ascension and Declination, explained. (RA and DEC celestial Coordinates in Astronomy)
  20. How to use setting circles on a budget telescope? What is RA and DEC on a telescope? How to use Right Ascension and Declination?
    Understanding how to use right ascension (RA) and declination (DEC) setting circles on the equatorial mount telescope. This video tries to simplify this confusing part for most amateur astronomers.

  21. Right Ascension and Declination Explained!
  22. Universal Equatorial Coordinates take the origin of Vernal Equinox which gives us a constant coordinate system that doesn't change as the earth rotates, but since the Vernal equinox itself is a position on the celestial sphere. So it rotates with the sky. The two coordinates of the Universal system are

  23. Astro Tutorial #1.4 (old version): Coordinate Systems of the night sky - ALT/AZ vs RA/DEC
  24. Today we discuss following items: a) the nomenclature of important points and plains b) coordinate systems of the night sky c) finding stars with their coordinates in both systems

  25. Terrestrial/Celestial Spheres Coordinate Systems Tutorial
  26. Working on it... This video explains the coordinate systems used in celestial navigation, with an overview of the terrestrial and celestial spheres. This video is part of a series that teaches celestial navigation using techniques that have been used for centuries. In this course, you will learn some basics needed to find your location using a sextant and elementary math. This course is free and available to everyone, and should take less than two hours to complete.

  27. Equation of Time
  28. The equation of time describes how the difference between the "natural time" kept by a sundial changes over the year, due to the changing length of the solar day.

  29. Introductory Astronomy: Path of the Sun in the Daytime Sky
  30. Video lecture on how the Sun's path is different throughout the year. This video refers to the lecture tutorial "Path of the Sun" from "Lecture Tutorials for Introductory Astronomy" by Prather, et al.

  31. Introductory Astronomy: Positions on the Celestial Sphere
  32. Introductory Astronomy lecture on the celestial sphere and how to start thinking of horizon diagrams. Refers to tutorial 1 ("Position") from "Lecture Tutorials for Introductory Astronomy".

  33. 0:04 / 5:49 Solar Geometry- How to read a sun-path diagram
  34. An introduction into Solar Geometry and basics of sun-path diagram

  35. 0:35 / 18:40 Sun Path Charts
  36. This lecture introduces sun path charts and how to use them to determine the general position of the sun at a given date and time. Along the way we'll discuss the difference between solar time and standard time. Finally, we'll briefly mention the use of sun path charts in shading analysis for a PV array.

  37. The Earth's Sun Angle
  38. @keegancan 2 years ago Great video, and great heat lamp comparison. I actually recreated an image in my mind of the heat lamps by having the heat lamps tilting at an angle and noticing that the foods would have varying amounts of heat.

  39. ASTR 503 - Class 1 - Video 1 - Celestial sphere: Definitions and Equatorial Coordinates
  40. ASTR 503 - Class 1 - Video 2 - Celestial sphere: Horizontal Coordinates
  41. ASTR 503 - Class 1 - Video 3 - Celestial Sphere: Ecliptic Coordinates
  42. ASTR 503 - Class 1 - Video 4 - Celestial Sphere: Hour Coordinates and Galactic coordinates
  43. ASTR 305 - Class 2 - Video 3 : Motions in the sky
  44. SPHERICAL TRIGONOMETRY:INTRODUCTION
  45. SPHERICAL TRIGONOMETRY : = INTRODUCTION = PLANE TRIGONOMETRY = GREAT CIRCLE = SMALL CIRCLE = SPHERICAL TRIANGLE = SYMMETRICAL SPHERICAL TRIANGLES .

  46. Celestial Sphere - altitude/azimuth
  47. Azimuths

C++ build system

C++ build system

  1. Use VS Code, CMake, and Batch Files to Simplify Your C++ Builds
  2. Build scripts are often complicated, sometimes even requiring things like Python or Perl to make them work. Here's a simple way to handle even moderately complicated projects.

  3. Windows desktop development with C++ in Visual Studio
  4. The Windows desktop platform has long been the most popular platform among C++ application developers. With C++ and Visual Studio, you use Windows SDKs to target many versions of Windows ranging from Windows XP to Windows 10, which is well over a billion devices. Popular desktop applications like Microsoft Office, Adobe Creative Suite, and Google Chrome all are built using the same Win32 APIs that serve as the foundation for Windows desktop development. Developing for Windows desktop allows you to reach the highest number of users on any non-mobile development platform.

  5. Bring your C++ code to Visual Studio
  6. C++ has been around for a long time and throughout its history many tools have been built to make life easier for C++ developers. This has led to a diverse C++ ecosystem in terms of the editing tools, build systems, coding conventions, and C++ libraries that we use in our day-to-day work. As a C++ developer, you are probably accustomed to using a variety of tools from different vendors for different purposes. Rest assured that you will not trade-in your flexibility in how you develop your C++ projects once you start using Visual Studio. Visual Studio provides industry-leading development tools for C++ for any platform you’re targeting.

  7. CMake Tools Extension for Visual Studio Code
  8. Microsoft is now the primary maintainer of the CMake Tools extension for Visual Studio Code. The extension was created and previously maintained by vector-of-bool, who has moved on to other things. Thank you vector-of-bool for all of your hard work getting this extension to where it is today!

Monday, November 13, 2023

GIS system and datum

GIS system and datum

  1. 经纬线
  2. 经线和纬线是人们为了在地球上确定位置和方向的,在地球仪和地图上画出来。
    经纬线相互垂直。纬线是一条条长度不等的圆圈。最长的纬线,就是赤道。 经线是一条条长度相等的弧线,连接南北两极。因为经线指示南北方向,所以,经线又叫子午线。
    国际上规定,把通过英国格林尼治天文台原址的经线,叫做0°经线,也叫本初子午线。在地球上经线指示南北方向,纬线指示东西方向。东西半球分界线:东经160° 西经20°。

  3. 北京市经纬度坐标
  4. 中心位置东经116°20′、北纬39°56′。

  5. 上海的具体经纬度坐标是多少?
  6. 上海市地处东经120°52′至122°12′,北纬30°40′至31°53′之间。
    上海面积6340.5平方公里。它位于太平洋西岸,亚洲大陆东海岸,中国南北海岸的中心点,长江和黄浦江的交汇处。北邻长江,东临东海,南临杭州湾,西连江浙两省。上海是长江三角洲冲积平原的一部分,平均海拔约2.19米。海拔最高点是位于金山区杭州湾的大金山岛,海拔为103.70米。

  7. 伦敦的经度和纬度,纽约的经度和纬度是多少,帮个忙!
  8. 伦敦:市中心位于北纬51度30分28秒,西经00度07分41秒(一般认为伦敦的经度就是0度)
    纽约:北纬40度43分,西经74度.

  9. 上海经纬度查询-在线经纬度定位转换工具
  10. 上海经纬度定位于:上海市
    纬度:31.230416
    经度:121.473701
    北京经纬度定位于:北京市
    纬度:39.904030
    经度:116.407526
    广东_深圳经纬度定位于:深圳市
    纬度:22.543099
    经度:114.057868

  11. What are Geodetic Datums? 5:09 / 5:09 Introduction to World Geodetic System 1984 | World Geodetic System 1984 Explained | WGS 84
  12. world geodetic system,world geodetic system 1984,World Geodetic System 1984 Explained,WGS 84,Introduction to World Geodetic System 1984,geodetic,is wgs 84 a projection system,coordinate systems,coordinate system,coordinate reference system,geodetic datums,introduction to frames of reference,geographic information system,projection system,convertion coordinate systems,geographical coordinate system,global positioning system,coordiante system,Prime meridian

  13. Premium webservices and data
  14. What are premium services and why do I need them ? Gisgraphy is a totally free open source framework under LGPL license :

  15. Sunset and Sunrise Calculation Based on Latitude, Longitude and UTC Offset for SQL Server 2005
  16. Sunset and Sunrise Calculation Based on Latitude, Longitude and UTC Offset for SQL Server 2005

Friday, October 6, 2023

regular expression engine

regular expression engine

  1. perlre - Perl regular expressions
  2. perlre - Perl regular expressions

  3. Regular Expressions/Perl-Compatible Regular Expressions
  4. Perl has a richer and more predictable syntax than even the POSIX Extended Regular Expressions syntax. An example of its predictability is that \ always quotes a non-alphanumeric character. An example of something that is possible to specify with Perl but not POSIX is whether part of the match wanted to be greedy or not. For instance in the pattern /a.*b/, the .* will match as much as it can, while in the pattern /a.*?b/, .*? will match as little. So given the string "a bad dab", the first pattern will match the whole string, and the second will only match "a b".

  5. Regular Expressions/POSIX-Extended Regular Expressions
  6. The more advanced "extended" regular expressions can sometimes be used with Unix utilities by including the command line flag "-E". Other Unix utilities, like awk, use it by default. The main difference is that some backslashes are removed: \{…\} becomes {…} and \(…\) becomes (…). Examples:

  7. Understanding Regular Expressions
  8. I'd like to tell you a story about a friend of mine, Fred. Because of the nature of the story, I'll talk a lot about Perl regular expressions and how they really work behind the scenes. To follow the story, I'll assume that you know Perl at least as well as Fred (which is not saying a lot, since he doesn't know it all that well, although he thinks he does).

  9. faqts : Computers : Programming : Languages : Tse : Parser
  10. TSE: Search/Replace:Regular Expression:Backus Naur Form:What is possible BNF for regular expression?

  11. PERL:Search/Replace:Regular Expression:Backus Naur Form:What is possible BNF for regular expression?
  12. PERL:Search/Replace:Regular Expression:Backus Naur Form:What is possible BNF for regular expression?

  13. Perl Style Regular Expressions in Prolog
  14. Case Study: Implementing Perl Style Regular Expressions

  15. Regex BNF Grammar
  16. Is there any BNF grammar for regular expression?

  17. Lecture 32: BNF Describing Language Syntax
  18. Lecture 32: BNF Describing Language Syntax

  19. Discussion 12: Regular Expressions & BNF
  20. This is an online worksheet that you can work on during discussions. Your work is not graded and you do not need to submit anything.

  21. Regex BNF Grammar
  22. Is there any BNF grammar for regular expression?

  23. MarpaX-Regex Public
  24. MarpaX-Regex Public

  25. Perl Compatible Regular Expressions (PCRE) Documentation
  26. Perl Compatible Regular Expressions (PCRE) Documentation

  27. translate BNF grammar to sequence of RegEx'es
  28. Simple program to read in a BNF grammar and create a regular expression for the root element. This can be used to create a validator.

  29. BNF Notation in Compiler Design
  30. BNF Notation in Compiler Design

    Video - BNF

  31. Regular Expressions and BNF (Backus Naur Form)
  32. An introduction to Regular Expressions, the use of Formal Language and BNF including Syntax Diagrams. Suitable for AQA A-Level Computer Science

  33. Introduction to Grammars and BNF
  34. An introduction to grammars and specifically Backus Naur Form (BNF)

  35. 0:16 / 7:50 How to write BNF and EBNF grammar
  36. How to write BNF and EBNF grammar for a given language

  37. Backus-Naur Form
  38. BNF, or Backus-Naur form is an elegant and succinct way of expressing a grammar in very few lines. Find out more about how this works in today's random Wednesday tutorial!

  39. 0:09 / 38:45 BNF, EBNF & Syntax Graphs
  40. This video is having an analysis of BNF, EBNF & Syntax Graphs. This is a live recorded video tutorial. So you can easily understand how to write BNF & EBNF grammar rules and conversion parts of them with examples. Also you can study how to visualize the BNF & EBNF grammar rules in Syntax Graphs.

  41. Programming Language Syntax 1 - Backus-Naur Form (BNF)
  42. his is a short introduction to the Backus-Naur Form of describing a Context-Free Grammar, with some simple examples.

  43. 22. BNF (BACKUS NAUR FORM)
  44. This explain the notation used for representing Grammar i.e BNF Form.

  45. 0:02 / 8:36 • Purpose of a Parse Tree Parse Trees
  46. An explanation of parse trees intended for students learning about BNF grammars and programming languages.

  47. 0:54 / 14:57 Parsing Explained - Computerphile
  48. How ambiguity is dangerous! Professor Brailsford simplifies parsing.

  49. 0:30 / 14:01 Building a Parser from scratch. Lecture [1/18]: Tokenizer | Parser
  50. 0:30 / 14:01 Building a Parser from scratch. Lecture [1/18]: Tokenizer | Parser

Saturday, September 23, 2023

PDF open source project

PDF viewer

    PDF classes

  1. FreeImage Display Demo
  2. How to display a bitmap in your MFC SDI application using FreeImage. Various rescaling algorithms considered.

  3. FreeImage-dotnet-core
  4. This is a clone of the FreeImage .NET project (http://freeimage.sourceforge.net/) modified to work with dotnet core. Note that all functions that use System.Drawing.Bitmap have been removed from the netstandard framework versions as there is no implementation for this class.

  5. FreeImage.NET Class Library Reference
  6. FreeImage.NET

  7. FreeImage Public License v1.0
  8. FreeImage Public License v1.0

  9. freeimage
  10. FreeImage is an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications. FreeImage is easy to use, fast, multithreading safe, and cross-platform (works with Windows, Linux and Mac OS X).
    Thanks to it's ANSI C interface, FreeImage is usable in many languages including C, C++, VB, C#, Delphi, Java and also in common scripting languages such as Perl, Python, PHP, TCL, Lua or Ruby.

  11. How to use FreeImage.NET in a x64 targeting project (AnyCpu)?
  12. I'm trying to use the FreeImage .NET wrapper in my project, my ptoject targets AnyCPU and the dll wrapper will not work under this, it will only works if I target x86 machine.

  13. .net – Is PDFLibNet.dll or It has any licence for commercial products?
  14. I am using PDFLibNet.dll (got here: http://www.codeproject.com/KB/applications/PDFViewerControl.aspx?msg=3154388 ) am not sure whether I can use it for commercial purpose (Licence) ?

  15. PDF Library for creating PDF with tables and text, in C#
  16. Create PDF files on the fly using this simple library.

  17. PdfFileWriter Public
  18. The PDF File Writer C# class library gives .NET applications the ability to produce PDF documents. The library shields the application from the details of the PDF file structure. The library supports: forms, text, images, tables, graphics, barcodes, web links, charts, sticky notes, encryption and more.

  19. PDF File Analyzer With PDF Parsing Classes. (Version 3.0 for VS 2022 .NET 6.0)
  20. PDF File Analyzer is designed to read, parse, and display the internal structure of PDF files. Version 2.1 supports encrypted files.

  21. PDF File Writer C# Class Library (Version 2.0.0)
  22. PDF File Writer is a C# .NET class library allowing applications to create PDF files. The code was developed for VS 2022 and .NET6. The latest update is a major upgrade.

    Utility

  23. E-signing PDF documents with iTextSharp
  24. An example demonstrating how to sign PDF documents with the iTextSharp library.

  25. Creating PDF documents with iTextSharp
  26. Creating PDF documents with iTextSharp using a combination of images and text.

  27. iSafePDF: The Open Source PDF Signature Tool
  28. iSafePDF is an Open Source software to sign, timestamp, and encrypt PDF documents.

  29. PDF Merger and Protector
  30. PDF MERGER and PROTECTOR is the best pdf merger software which is fast and powerful way to join(Merge) PDF files with password protection as well as you can apply stamper with either any type of image or text. Using this utility you don’t required installation of Adobe Acrobat. Looks Exciting ???

  31. Use pdfviewernet in a project for .net framework 4.0
  32. So I downloaded the source for pdfviewernet and just ran it out of the box. And it worked.

  33. PDF Viewer Control Without Acrobat Reader Installed
  34. PDF document viewer control that does not require any Acrobat product to be installed

  35. Tutorials on creating PDF files using C# 2.0
  36. Tutorials on creating PDF files using C# (.NET 2.0) and iTextSharp

  37. Create/Read Advance PDF Report using iTextSharp in C# .NET: Part I
  38. Create/Read/Write Advance PDF Report using iTextSharp.DLL in Desktop, Mobile, Web Application

  39. Creating PDF Tables using C# (.NET 2.0) and iTextSharp
  40. Creating PDF Tables using C# (.NET 2.0) and iTextSharp

  41. The Great PDF - Revealed
  42. A project to create PDF files using text editor and digitally sign them.

    PDF viewer

  43. SumatraPDFControl
  44. It allows you to construct Windows Forms application capable to view and read Portable Document Files (PDF) with all features present in great SumatraPDFReader made by Krzysztof Kowalczyk.

  45. pdfview4net
  46. PDFView4NET is a .NET toolkit for adding PDF render, view and print support in .NET applications. It includes a PDF viewer control for Windows Forms and WPF and a .NET library for rendering and printing PDF files from any .NET application. The PDF viewer control includes support for annotating PDF files, bookmarks navigation, adding and removing file attachments and other features. The toolkit includes its own PDF rendering engine and it does not rely on any other software for rendering and printing PDF files. PDFView4NET toolkit has been developed entirely in C#, being 100% managed code.

  47. How do I build dll from source code?
  48. I'm complete dum about coding, so much i don't even know where to find info about it. I want to know how to build dll's from repos like this one. That's not the first time i stumbling upon such things, and I want to start from something.

    PDFTK component

  49. PDF Hacks: 100 Industrial-Strength Tips & Tools
  50. PDF--to most of the world it stands for that rather tiresome format used for documents downloaded from the web. Slow to load and slower to print, hopelessly unsearchable, and all but impossible to cut and paste from, the Portable Document Format doesn't inspire much affection in the average user. But PDFs done right is another story. Those who know the ins and outs of this format know that it can be much more than electronic paper. Flexible, compact, interactive, and even searchable, PDF is the ideal way to present content across multiple platforms.

  51. STAMPtk - The PDF Stamp Maker
  52. Use STAMPtk + PDFtk to mark PDFs with custom data, like stamps, watermarks, headers or footers, as the PDFs are served to online users. Or use these tools on the desktop to add information to local PDFs.

  53. PDF LAb
  54. Welcome! PDF Labs is where you can find professional tools and services for your PDF needs. It is run by Sid Steward, author of PDF Hacks (O’Reilly) and the popular PDF Toolkit.

  55. PDFtk Server
  56. PDFtk Server is our command-line tool for working with PDFs. It is commonly used for client-side scripting or server-side processing of PDFs. It is also used by OEMs and ISVs to give their products the ability to manipulate PDFs. A commercial license is required to distribute PDFtk with your commercial product.

  57. Resource HackerTM
  58. ... a freeware resource compiler & decompiler for Windows® applications

  59. PDFTKBuilder TM
  60. Take control of your PDF documents - merge or split pages; stamp pages or add background watermarks; add page numbers; and even rotate pages.

  61. PDFTK Builder Enhanced
  62. Free and open source GUI application for manipulating PDF files using the Windows version of PDF Toolkit (PDFtk) - split, merge, stamp, number pages, rotate, metadata, bookmarks, attachments, etc. This project is a fork of PDFTK Builder by Angus Johnson that enhances the user interface, adds functions, and enables use of later versions of PDFtk. OS: Windows. Author: David King. License: GPLv3.