|
Why should we code to test a method
No need for postman or any testing framework for c# development for testing.
use DMH debug method helper
Extension for Visual Studio 2015/2017/2019.
DMH - Visual Studio Marketplace[^]
Free & opensource
Not just for web services or web API it supports all frameworks written in c#.
supporting Core version are 2.1 & 3.1.
|
|
|
|
|
Hello,
I am looking for software where I can code and alter my wordpress site. Using a mac, tried dreamweaver, didnt get far. Recommandations please. Thank you in advance!
|
|
|
|
|
Wrong place to ask - this forum is for telling other members about tools, not for askign for tehm.
You could try Quick Answers[^] but probably you won't have much luck: this is a development site, not a web design one. I'd suggest asking in the Wordpress forums: Forums | WordPress.org[^] you'll be talking direct to people with a lot more experience of exactly what you are trying to do than here.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Try Bluegriffon's free version and if you like you can upgrade to the pro version. Coffee cup HTML editor is another good choice
|
|
|
|
|
Message Removed
modified 6-Sep-20 10:46am.
|
|
|
|
|
|
|
I update my logging NuGet package. It is free to use, and has free support by email.
The NuGet package is at NuGet Gallery | Jeff.Jones.JLogger 1.1.2[^]
The publicly available demo code and documentation is located at GitHub - MSBassSinger/JLogger_Demo: Demo of how to use the JLogger NuGet package[^]
Features:
- Made for simplicity, multi-threaded .NET (Framework or Core) applications. Targeted to .NEDT Standard 2.0
- Creates logs to a file (tab delimited that can be opened in Excel)
- Creates logs to a SQL Server table (T-SQL code provided for table and stored procedures)
- Option for SQL Server to audit changes to the log table
- High throughput (file or DB writes are handled on a separate thread in the background)
- User defined log fields (in addition to a number of fixed log fields
- Log retention is user settable
- Optional email sent, specified per log entry.
Sample log entries (UDF 1 and UDF 2 are user defined columns; column names can be anything the programmer sets):
Time Log Type Message Addtl Info Entity Name Device Exception Data Stack Info Module Method Line No. ThreadID UDF 1 UDF 2
19:42:56.731 StartupShutdown Default Debug Options Bitset Value: [000A18CA]. Unit Tests JJONES-DEV CreateDebugLogFile 0 1
19:42:58.929 Informational Initial Log entry Log Testers Anonymous frmMain.cs btnRunTest_Click 350 1
19:42:58.945 Error Type: [Error] - Attempted to divide by zero.; Source=[LoggingDemo] Division by zero was intentional Log Testers Anonymous JJONES-DEV [Exception Data:] [x]=[100]; [y]=[0]; N/A frmMain Void TestMethod(Int32) 464 12 Sample value for UDF 1. Sample value for UDF 2.
19:42:58.955 Error, SendEmail Type: [Error, SendEmail] - Attempted to divide by zero.; Source=[LoggingDemo] Division by zero was intentional Log Testers Anonymous JJONES-DEV [Exception Data:] [x]=[100]; [y]=[0]; N/A frmMain Void TestMethod(Int32) 464 1 Sample value for UDF 1. Sample value for UDF 2.
19:42:58.957 StartupShutdown Last line in the log This denotes the last log entry for the logging session. Log Testers Anonymous JJONES-DEV N/A N/A Logger Boolean StopLog() 23 1
If you have any questions, please let me know.
modified 21-Jul-20 10:24am.
|
|
|
|
|
Still works under Windows 10. If you need to "navigate" an XML file, this is still a great tool.
Download XML Notepad 2007 from Official Microsoft Download Center
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
There's a more up-to-date version on Microsoft's GitHub account:
https://microsoft.github.io/XmlNotepad/[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I trust the other link more ... but that's just me.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
|
Given a choice, it "smells" like it was more of a personal project. I've used 2007 since ... 2007? I also wear a mask in public and practice social distancing.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
thanks you so much, i find this tool
|
|
|
|
|
I’ve created a WPF C# docking pane manager for my own use which will be free for others to use. It will be posted on this web site along with my other free utilities. I used AvalonDock for a commercial project, and although it’s really powerful I found it rather complicated to tweak, and failed to make some desired changes, hence my own version. It is finished apart from the settings for the appearance. I see two ways to do this.
The first way is to allow the user to change pretty much any aspect of the appearance such as the corner radius, and the border thickness and brush for panes. The application would come with a canned style that can be changed by the user. I’ve created a dialog that allows just that, so if the font is too small, no problem, the user can change it. If they are colour blind, they can change the pane header colour, or the border colour. There is also support for programmatically overriding the templates for icons, the side bar and so on so that the application developer can add their own branding and make it look like a MegaCorp (TM) product. I’ve added a mechanism so that the user can save their settings as a ‘theme’, and load the preferred theme whenever they want, though they’ll probably just create one personal theme.
The second way is to implement themes as intended by Microsoft. Thus the user is given a selection of themes, and loads the one they prefer. This is an all or nothing approach. They can’t tweak the font size, or the pane border colour, they can only choose between one or more hard coded themes, each with it own fixed values for the borders, the brushes and so on.
I much prefer the first approach, it’s perhaps unconventional but it’s more useful for the user in my opinion as it gives them far more control. What do other people think? If you have created a product around a dock pane manager, would you be okay with the first way, or are you strongly in favour of the second? Does the ability to undo your branding (colour scheme) annoy you? I suppose it could be the second approach, but with an adjustable font size.
|
|
|
|
|
For visual handicaps, high contrast scheme in Windows settings is prefferred; I wouldn't want to have to declare those settings for each app individually.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Interesting point, thanks. I decided to go with themes, it actually makes the code easier, and users generally don’t need to tinker.
|
|
|
|
|
As you probably know, the old 16 bit DOS edit[^] program is still included in 32 bit Windows versions. However, 64 bit Windows does not include the 16 bit DOS utilities.
My main workstation is 64 bit Windows and I'd really like to have a DOS edit clone available to me. Does anyone know of one?
( Yes, I know there are a zillion alternatives. My preferred text editor is Notepad++ and I use Notepad, VS Code, VS, Cygwin ed (yes, really) and one day I might even get round to learning vi. But none of these replicate the experience of edit that I seemed to find so convenient when working in a console window. )
It surprises me that no one has ported or rewritten edit as a 32/64 bit Win32 console app. I've googled but found nothing. Did I overlook it?
|
|
|
|
|
No one? Or would I be better of asking this in Lounge?
|
|
|
|
|
|
And 'tilde' on Linux matches what I'm looking for too.
|
|
|
|
|
I published a free to use, free to distribute, free support NuGet package for .NET Core. Standard, and Framework that provides a number of helpful methods and objects, called JHelpers[^] .
To keep this post short, there is a public GitHub .NET project, JHelpers_Demo[^] that has source code showing how to use each method and object.
The NuGet package is targeted to .NET Standard 2.0, is signed, and includes documentation.
If you have any questions, please feel free to ask.
Thank you.
For those who might want a little more info, here you go. There are two primary parts of the library, ContextMgr and CommonHelpers.
ContextMgr
ContextMgr is a thread-safe singleton that can be used to store data in a single place accessible from anywhere, and any thread, in the application. One typical use is to store settings and other runtime values so their sources (file, database, etc.) only have to be read once. Anything that can be defined as a unique String name and a value or reference type of any kind can be kept there. Items in the collection are added as a String key name (which must be unique) and any value or reference type, boxed as a dynamic type.
ContextMgr has no initialization, and as a singleton, does not use “new” to be created. The actual instance is dynamically created on the first reference in the code.
Example:
ContextMgr.Instance.ContextValues.AddCheck("Computer Name", Environment.MachineName);
ContextMgr.Instance.ContextValues.AddCheck("Startup Time", DateTime.Now);
dynamic machineName = "";
retVal = ContextMgr.Instance.ContextValues.TryGetValue("Computer Name", out machineName);
dynamic startupTime = "";
retVal = ContextMgr.Instance.ContextValues.TryGetValue("Startup Time", out startupTime);
this.Text = $"This program on {machineName} started at {((DateTime)startupTime).ToShortDateString()}";
In your application’s shutdown code, I recommend adding this line so the ContextMgr disposes of its resources without waiting on the .NET garbage collector.
ContextMgr.Instance.Dispose();
CommonHelpers
This is a static class with a number of useful static methods and extension methods.
Extension Methods
String GetFullExceptionMessage(this Exception ex2Examine,
Boolean getDataCollection,
Boolean getStackTrace)
This Exception object extension returns error messages from the parent exception and any exceptions down the stack, and optionally, the data collection. The Exception.Data collection is used to store name-value pairs that typically record runtime values or other significant data for debugging.
Boolean Contains(this String source, String toCheck, StringComparison strComp)
This String object extension allows string comparison type on the string to check. The extension method returns true if the toCheck string is in the source string, false if not.
Int32 ContainsHowMany(this String source, String toCheck, Boolean ignoreCase = false)
This String object extension gets the count of how many times a given string occurs within another string. The extension method returns a Count of 0 to n occurrences.
Boolean ConvertToBoolean(this String valueToExamine, out Boolean isBoolean)
This String object extension to convert a string, assumed to be in a format that can be converted, to a Boolean value. Recognizes as true (case insensitive) true, on, yes, up, ok, good, 1, -1. Recognizes as false (case insensitive): false, off, no, down, not ok, bad, 0. If the conversion fails, false is returned. Check the isBoolean out value to see if the conversion detected a Boolean value. If it is false, the value was not converted.
Boolean IsBoolean(this String valueToExamine)
This String object extension tests a string, assumed to be in a format that can be converted, to a Boolean value. Recognizes as true (case insensitive) true, on, yes, up, ok, good, start, 1, -1. Recognizes as false (case insensitive): false, off, no, down, not ok, bad, stop, 0. If the conversion fails, false is returned. Otherwise, true is returned.
Boolean IsOnlyDigits(this String testString, Boolean includePeriod = false)
This String object extension checks for all characters being digits. Conversion functions to test numbers may translate letters as Hex values. includePeriod is set to true if the one and only period is to be treated as being a number, so that decimal number strings can be handled properly.
String GetOnlyDigits(this String testString, Boolean includePeriod = false)
This String object extension gets all digits in a string and ignores any non-digits. If includePeriod is true, then the first period in the string will be included in the results.
String GetOnlyLetters(this String testString, Boolean includeSpace = false)
This String object extension gets all letters in a string and ignores any non-letters. However, if includeSpace is true, then any spaces found are included in the return value.
String GetOnlyLettersAndDigits(this String testString, BooleanincludePeriodAndSpace = false)
This String object extension gets all letters and digits in a string, and ignores all else, with the exception of periods and spaces when includePeriodAndSpace is true.
Boolean IsOnlyLetters(this String testString, Boolean includeSpace = false)
This String object extension checks for all characters being letters. If includeSpace is true, then spaces are accepted as if they were letters.
Boolean IsOnlyLettersAndOrDigits(this String testString, Boolean includePeriodAndSpace = false)
This String object extension checks for all characters being only letters and numbers. If includePeriodAndSpace is true, then all periods and spaces are treated as if they are letters.
Boolean IsEmailFormat(this String email)
This String object extension checks the string to see if it is a valid email format. It does not check whether it is a valid, working email.
DateTime GetDateTime(this String dateString, DateTime dateDefault)
This String object extension converts string to date, or returns the default value.
Decimal GetDecimal(this String numberString, Decimal decimalDefault)
This String object extension converts string to decimal value, or returns the default value.
Int32 GetInt32(this String numberString, Int32 integerDefault)
This String object extension converts string to an Int32 value, or returns the default value.
Int64 GetInt64(this String numberString, Int64 integerDefault)
This String object extension converts string to an Int64 value, or returns the default value.
Object GetDefaultValue(this Type t)
Generic extension method that returns a default value for the type, if one exists. This is useful in generic instances where default<T> may not work.
Helper Functions and Properties
Enum
DistanceUnitsOfMeasureEnum
Unassigned
Miles
Kilometers
Feet
Meters
This is used with geolocation to specify the units of measure for distance.
Class
AddressGeoData
Double Latitude1
Double Longitude1
Double Altitude1
Double Latitude2
Double Longitude2
Double Altitude2
Double LinearDistance (value is calculated, read-only)
DistanceUnitsOfMeasureEnum UnitsOfMeasure
Class Constructor
AddressGeoData(Double pLatitude1,
Double pLongitude1,
Double pAltitude1,
Double pLatitude2,
Double pLongitude2,
Double pAltitude2,
DistanceUnitsOfMeasureEnum pUnitsOfMeasure)
Class Methods
void SetUnitsOfMeasure(DistanceUnitsOfMeasureEnum lngUnitsOfMeasure)
Specify the units of measure to use during this class' instantiation.
void SetLinearDistance(Double dDistance)
This class is used to store two geolocations specifying the latitude, longitude, and altitude. The units of measure determine the units corresponding to the LinearDistance value. Altitude may be 0 if not known or not wanted.
String RowDelimiter (Get only)
This value can be applied to the value for a constant. RowDelimiter is the same non-printable ASCII character used in teletypes and other devices to indicate a new row, and not likely to be seen in string data.
String ColumnDelimiter (Get only)
This value can be applied to the value for a constant. ColumnDelimiter is the same non-printable ASCII character used in teletypes and other devices to indicate a new column, and not likely to be seen in string data.
String TableDelimiter (Get only)
This value can be applied to the value for a constant. TableDelimiter is the same non-printable ASCII character used in teletypes and other devices to indicate a new table of data, and not likely to be seen in string data.
String FullComputerName (Get only)
Gets the full computer name that DNS will recognize in any domain.
String GetDNSName(String pComputerName = "")
Gets the DNS host entry table name for a given computer name. Pass in any computer name. If left blank or null, the current computer name will be used.
String CurDir (Get/Set)
Gets or sets the fully qualified path of the current working directory. For services, the current directory via normal means shows the Windows System32 directory because the service runs under an EXE located there. This property accounts for that by using one method call for running in the IDE, and another for running compiled.
Boolean AmIRunningInTheIDE (Get only)
This method will return true if this project, or any project that calls this component as compiled code, is running under the IDE. This method returns false if no IDE is being used.
Boolean IsInDomain()
Returns true if the computer running the code is in a domain. False if it is not.
String GetComputerDomainName()
Returns the Domain which the computer is joined to. Note: If user is logged in as local account, the domain of computer is still returned. Returns a String with the domain name if it's joined, or an empty String if it isn't.
String GetFullComputerDomainName()
Returns the full domain name instead of the alias.
Boolean IsDaylightSavingsTime(DateTime dtmToTest)
True if the datetime supplied falls within the period of Daylight Savings.
Boolean IsDaylightSavingsTime()
True if it is currently daylight savings time.
String CurrentTimeZoneDaylightName (Get only)
Name of the current time zone for daylight savings.
String CurrentTimeZoneName (Get only)
Name of the current time zone, regardless of daylight savings.
Int32 Asc(String strChar)
Same functionality as the VB6 ASC function - give it a character, get back the ASCIII decimal number.
String Hex(Int32 lngValue)
Same as the VB6 function. Converts a 32 bit integer to a String hex value.
Int32 GetCurrentCPUUsage()
Gets the current % processor time.
Int32 AvailableRAMinMB()
Returns available RAM MBs.
PingReply Ping(String strHostName, Int32 lngTimeout)
Pings the specified server synchronously. Returns a PingReply instance indicating whether or not the operation was successful.
void GetLinearDistances(ref List<AddressGeoData> objAddressList)
This function uses the Haversine formula to calculate linear distance between two sets of latitude and longitude, with an adjustment for the earth's radius based on the latitude. Haversine is used instead of Vincenty’s formula to keep the computation simpler and less processor intensive. This function takes a List of address geo data instances and processes them, updating the individual class instances in the List for the linear distance property.
Double GetLinearDistance(double Latitude1,
double Longitude1,
double Altitude1,
double Latitude2,
double Longitude2,
double Altitude2,
DistanceUnitsOfMeasureEnum lngUnitsOfMeasure)
This function uses the Haversine formula to calculate linear distance between two sets of latitude and longitude, with an adjustment for the earth's radius based on the latitude. Haversine is used instead of Vincenty’s formula to keep the computation simpler and less processor intensive. This overload allows the caller to specify what units of measure is desired for the return value.
Double GetLinearDistance(Double Latitude1,
Double Longitude1,
Double Altitude1,
Double Latitude2,
Double Longitude2,
Double Altitude2,
Boolean UseMiles)
This function uses the Haversine formula to calculate linear distance between two sets of latitude and longitude, with an adjustment for the earth's radius based on the latitude. Haversine is used instead of Vincenty’s formula to keep the computation simpler and less processor intensive. This overload allows the user to choose between miles and kilometers (UseMiles param):
Double GetLinearDistance(Double Latitude1,
Double Longitude1,
Double Latitude2,
Double Longitude2,
DistanceUnitsOfMeasureEnum UnitsOfMeasure)
This function uses the Haversine formula to calculate linear distance between two sets of latitude and longitude, but without providing altitude (all calculations assume linear over the curve of the earth at sea level) with an adjustment for the earth's radius based on the latitude. Haversine is used instead of Vincenty’s formula to keep the computation simpler and less processor intensive. This overload allows the user to choose what unit of measure.
Double RadianToDegree(Double Coordinate)
Converts radians to degrees.
Double CelciusToFahrenheit(Double DegC)
Converts Celsius to Fahrenheit.
Double FahrenheitToCelsius(Double DegF)
Converts Fahrenheit to Celsius.
String StringToBase64(String String2Convert)
Convert String to Base64.
String Base64ToString(String ByteString64)
Convert Base64String to String.
List<ManagementObject> GetNetworkPrinters()
Gets a list of network printers using one ManagementObject instance per printer in a List object.
void SetIntBitValue(ref Int32 intValue, Int32 bitPlaceValue, Boolean setBitOn)
Helper method to set bit value of an Int on/off.
Boolean GetIntBitValue(Int32 intValue, Int32 bitPlaceValue)
Helper method to get the state of a bit value of an Int.
String GetStackInfo()
This gets the module, function, line number, and column number info in a String. This is useful when logging and creating exceptions to define exactly where something occurred.
String GetStackInfo(Exception ex)
This gets the module, function, line number, and column number info in a String based on an exception. This is useful when logging and creating exceptions to define exactly where something occurred.
String GetFullDateTimeStampForFileName(DateTime dtmDate)
This returns a String with a consistent datetime format for a filename.
Boolean IsFileText(out Encoding lngEncoding, String strFileName, Int32 lngNumCharactersToRead)
Detect if a file is text and detects the encoding.
Int32 GetTotalHDDFreeSpace(String pDriveName)
Returns MB of free disk space.
Int32 GetTotalHDDSize(String pDriveName)
Returns MB of total space.
Int32 GetMinPasswordLength()
Returns the minimum password length from a domain, if one exists. If no domain exists, -1 is returned.
Boolean IsIPAddress(String pValue, out IPAddress pIPValue)
Checks to see if a string is an IPv4 or IPv6 address, and returns an IPAddress object as an out parameter.
String AssemblyTitle (Get only)
Title of the .NET assembly.
String AssemblyVersion (Get only)
Version of the .NET assembly.
String AssemblyDescription (Get only)
Description of the .NET assembly.
String AssemblyProduct (Get only)
Product description of the .NET assembly.
String AssemblyCopyright (Get only)
Copyright string used by the .NET assembly.
String AssemblyCompany (Get only)
Company that owns the .NET assembly.
Boolean WriteToLog(String logFileName, String mainMessage, String secondMessage)
Method that performs a log write where the file is tab delimited and has a column header line.
modified 6-May-20 20:48pm.
|
|
|
|
|
Why are you posting this again? Your previous thread about this library[^] hasn't even dropped off the bottom of the first page yet.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Sean Ewington suggested using this forum to share about free tools. That is what this post is.
The post you are referring to is about an article that addressed the topic of "build vs buy", using this NuGet package only as an example in discussing the topic. Two completely different things, plus the article in question is kept from the community by a handful of members who, for some unknown reason, think they are the judges of what the rest of us are allowed to read.
|
|
|
|
|
MSBassSinger wrote: a handful of members who, for some unknown reason, think they are the judges of what the rest of us are allowed to read. You really don't get it do you? It is not a question of what others are allowed to read, but whether the article adheres to the guidelines as set down in Submission Guidelines[^]. The approval system here is quite simple and works well in general. Anyone with a high reputation (i.e. people who contribute articles, answer questions etc.) are deemed to be qualified to review newly posted articles and measure them against the guidelines. If they are not considered to adhere to them all, then there are various ways that can be communicated. Either the article would be better as a Tip or Blog, or it really does not match the criteria and should not be published. The people voting may (or may not, it's their choice) leave a message if they feel it just needs some work, or it needs action by a CodeProject editor/administrator. This is not in any way a personal attack (most of us don't know you), nor does it mean any other articles you post will be similarly rejected.
|
|
|
|
|