child pages:
html
page index:
c#
design patterns
LINQ
language properties
misc
Hungarian Notation
scope triangle
software architect vs software developer
stackoverflow and other sites
UML and class diagrams
XML
when a preprocessor directive is needed in multiple .cs files and since there are no .h files in c#, preprocessor directives can be added via
project->[project name] properties->build->general->conditional compilation symbols group box->debug custom symbols (or release custom symbols) then add directive_value
writing to standard error
Console.WriteLine("Standard Error Output Stream: {0}", Console.Error);
// format a string to 11 characters right justified with prepended spaces as necessary
String.Format("{0,11}", "ABCDE")
// FORMAT THE AMOUNT TO 9 CHARACTERS, PREPENDING WITH ZEROS AS NECESSARY (USES > 9 IF NEEDED I THINK)
sReturnString = dSomeDoubleValue.ToString("000000000");
// DETAILS HERE ON STANDARD NUMERIC FORMATS
https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings
HERE FOR CUSTOM NUMERIC FORMATS
https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings
FOR STRINGS
https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings
https://learn.microsoft.com/en-us/dotnet/standard/base-types/formatting-types
https://learn.microsoft.com/en-us/dotnet/standard/base-types/how-to-pad-a-number-with-leading-zeros#to-pad-a-numeric-value-with-leading-zeros-to-a-specific-length
https://learn.microsoft.com/en-us/dotnet/api/system.int32.tostring?view=net-7.0#system-int32-tostring
https://learn.microsoft.com/en-us/dotnet/api/system.double.tostring?view=net-7.0#system-double-tostring(system-string)
https://stackoverflow.com/questions/644017/net-format-a-string-with-fixed-spaces
new style interpolated formatting
old style composite formatting
using System;
using System.Reflection;
class Example
{
static void Main()
{
Type t = typeof(String);
MethodInfo substr = t.GetMethod("Substring",
new Type[] { typeof(int), typeof(int) });
Object result =
substr.Invoke("Hello, World!", new Object[] { 7, 5 });
Console.WriteLine("{0} returned \"{1}\".", substr, result);
}
}
/* This code example produces the following output:
System.String Substring(Int32, Int32) returned "World".
*/
sOutputFilename = DateTime.Now.ToString("hh_mm_ss_") + sOutputFilename;
FileStream fOutputFileNew = File.Open(sOutputPath + "ammended_" + sOutputFilename, FileMode.Create,FileAccess.ReadWrite);
FileStream fsFileToModify;
using (fsFileToModify = new FileStream(sOutputPath + sOutputFilename, FileMode.Open, FileAccess.Read, FileShare.None))
{
using (StreamReader sr = new StreamReader(fsFileToModify))
{
string sOldFirstLine = sr.ReadLine();
byte[] baTheBytes = Encoding.ASCII.GetBytes(sNewFirstline);
fOutputFileNew.Write(baTheBytes);
}
}
fsFileToModify.Close();
fOutputFileNew.Flush();
fOutputFileNew.Close();
sReturnDate = DateTime.Now.ToString("yyyyMMdd");
automatic coverter from vb to c#
references, amongst others, the online, 1 class at a time converter at Telerik.com that worked well and another at developerfusion.com that I didn't try
geeksforgeeks.org post on returning an object shows new in the called function, not sure that .NET does it that way or not
hiding a base class constructor by using new modifier in inherited class
new public void Invoke() { }
returning multiple values from a method and another and another
.net c# help landing page
2023-02-10 getters & setters including history
public struct myStruct
{
public string a;
public string b;
public string c;
public double d;
public DateTime e;
}
public enum enumYearTypes
{
leapyear = 0,
nonleapyear = 1
}
2023-01-17 nullable reference types and a post that I found showing when it was introduced which I found by googling
"when did .net introduce Nullable reference types"
2023-02-16 getting rid of the nullable warnings
double lcik the name of the project in solution explorer to open the .csproj file (or open it manually in a text editor) and add these tags
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;8600;8602;8618;8604;8601;8603;8714</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;8600;8602;8618;8604;8601;8603;8714</NoWarn>
</PropertyGroup>
2023-01-17 populate a Dictionary in declaration
Dictionary<string, string> dSomeIdentifier = new Dictionary<string, string>()
{
{ "key1", "value1"},
{ "key2", "value2"}
};
populate a Dictionary without .Add()
dSomeIdentifier["key3"] = "value3"
seemingly good tutorials on c# design patterns
colon meaning = inheritance, class implements an interface, c# string interpolation, constructor overloading and more
collection of objects with lookup by int use a list
collection of objects with lookup by key use a dictionary
file handlers reading into a string array
Dot Net tutorials on c# design patterns landing page
2023-01-13 factory method design pattern at dotnettutorials.com differs from factory design pattern
mock object "simulated objects that mimic the behaviour of real objects in controlled ways, most often as part of a software testing initiative"
assertions "Several modern programming languages include checked assertions – statements that are checked at runtime or sometimes statically. If an assertion evaluates to false at runtime, an assertion failure results, which typically causes execution to abort. This draws attention to the location at which the logical inconsistency is detected and can be preferable to the behaviour that would otherwise result. The use of assertions helps the programmer design, develop, and reason about a program."
.Net assertions in managed code (c#, vb, f#)
A mutable value is one that can be changed without creating an entirely new value. Immutable object "Strings and other concrete objects are typically expressed as immutable objects to improve readability and runtime efficiency in object-oriented programming. Immutable objects are also useful because they are inherently thread-safe."
2023-02-10 below are the ones i had open in wikipedia and i made entries in keep, the ones above i made links to while reading around
Programming paradigm - "a way to classify programming languages based on their features. Languages can be classified into multiple paradigms"
list of Statically_typed_programming_languages
reflexive - can examine and modify its own structure and behavior. "Reflection is often used as part of software testing, such as for the runtime creation/instantiation of mock objects."
"In some object-oriented programming languages such as C# and Java, reflection can be used to bypass member accessibility rules. For C#-properties this can be achieved by writing directly onto the (usually invisible) backing field of a non-public property [c.f.] . It is also possible to find non-public methods of classes and types and manually invoke them. This works for project-internal files as well as external libraries such as .NET's assemblies and Java's archives."
The Highest-Paying IT Certifications for 2024
Hungarian notation primers
https://www.cse.iitk.ac.in/users/dsrkg/cs245/html/Guide.htm
https://wiki.c2.com/?HungarianNotation
interesting ny times opinion piece (local .pdf) about the man who led development of the 747
"One of Flyvbjerg’s precepts is “Think slow, act fast.” If you plan well, that is, the execution will be swift. The phrase is a deliberate echo of “Thinking, Fast and Slow,” the title of a book by Daniel Kahneman, the psychologist who won a Nobel in economics. The two scholars are full of praise for each other; Kahneman cited Flyvbjerg in his book."
article describing scope triangle aka quality triangle
turning a wag into a swag = scientific wag
2023-01-23 i never mentioned it at work, but this is a super dangerous chainsaw jig that "works" and is "done"
2023-01-27 Software Developers vs Software Architects
According to Indeed, a developer earns an average base pay of $109,066 per year with a $4000 cash bonus. Salary estimates show software architects typically command $139,678 with a $10,000 cash bonus
https://stackoverflow.com/tags
https://stackoverflow.com/tour
https://stackexchange.com/sites
https://softwareengineering.stackexchange.com/
https://scicomp.stackexchange.com/
https://woodworking.stackexchange.com/
https://www.geeksforgeeks.org/ c# doesn't seem to have a category by ther are a lot with c# tag
structural link between two peer classes
Add arrows at either end or both ends to show that the classes are aware (or unaware) of each other.
special type of association
one class might use an object of another class in the code of a method. If the object is not stored in any field, then this is modeled as a dependency relationship.
changes to the definition of class 2 may cause changes to class 1 (but not the other way around).
Class1 depends on Class2
e.g. The Person class might have a hasRead method with a Book parameter that returns true if the person has read the book
Special type of association “part of” e.g. class 2 is part of class 1
Association end gets the unfilled diamond (class 1 in this example)
Aggregate end has no diamond (class 1 in this example)
is a special type of Aggregation where parts are destroyed when the whole is destroyed
class 2 cannot stand by itself
relationship between a more general classifier and a more specific classifier
Represents an "is-a" relationship
abstract class name is shown in italics.
SubClass1 and SubClass2 are specializations of SuperClass
a relationship between the blueprint class and the object containing its respective implementation level details
2022-01-17 XmlAttribute .NET class
Americans Spend Over 11 Hours Per Day Consuming Media
characterization testing software metrics time complexity (measured in big O notation) cyclomatic complexity common excuses for not testing
Process explorer c++ interview questions dos tricks .xls with ip address octect bitmasks MSDN Magazine TechRepublic blog Swebok v3 (2014)
declaration = just the prototype, has semicolon while definition is at the start of the function, has no semicolon and allocates memory for the function
bambauer.com DNS information The EU-funded ReDSeeDS project Code contracts to increase testsability StackOverflow Q& A forum
Programming books to read XP emulation under Windows 7 ("XP mode"= a real WinXP OS running on Virtual PC )
File & Folder Unlocker XP DOS Commands including TREE tech posters windows autohotkey macro scripting Windows File Search Utility "Search_My_Files"
msvc c++ reference:
mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN98\98VSa\1033\vclang.chm::/HTML/LIB_STL.HTM
visual c++ online reference
C++ Reference Guide
c++ Templates
perl debugger: ptkdb making a java package recorder.zip
visio shapes batch files1 2 vb code to calc business hours java applet flicker reduction
findfirstfile windows grep - findstr
sgi standard template libary wav file format eclipse java environment cyclomatic complexity
Ada Lovelace mdsn testing site softtware test and performance magazine
editor and another merge utility computing OS/Browser Stats more
unit testing with UI automation braude web site (code samples from 518 text book)
dos batch string and date handling reading the first line of a text file into a variable in a batch file
windows processes: pulist - later replaced with tlist
PsExec: telnet-replacement that lets you execute processes on other systems
Arbitrary-precision arithmetic 2 .net 4 class Building the name of a function to call based on a string = an example of reflection link to a particular .pdf page (#page=123) at end of href
Visual Basic 6.0 Default Shortcut Keys
Delayed .bat expansion: either 1) open command window wtih cmd /V to get delayed variable expansion (SETLOCAL ENABLEDELAYEDEXPANSION doesn't allow calling process to get environmennt) or 2) call with %%varname%% E.G.
REM BATCH FILE TO SET CORRECT DELIMTERS BETWEEN LIB VARS SINCE IN 2010 IT CHANGED FROM SPACES TO SEMICOLONS
set DELIM=
IF EXIST %PROGRAMFILES%\Microsoft Visual Studio 10.0" (SET DELIM=;)
call set mylibs=lib1.LIB%%DELIM%%lib2.LIB
REM - RETURN NOW AND CALLING PROCESS WILL HAVE CORRECT LIB LIST DELIMETERS IN mylibs ENV VAR.
List of IEEE Software Engineering standards TPS Report
----------------------
top - gives cpu % list [-i won't show idle] [-k brings up kill]
du -hl dirname // show sizes of subdirectories; -hs just gives summary; the h means use human readable format
df -h // shows mounted drives -h is human readable form (largest applicable units are displayed) , others are -k for kb - m for mb
wine
ssh
ls [-t to see sorted by date] [-l show details] [-r reverse order]
/etc/fstab - file where dirves listed to permanently mount
wc [-c bytes] [-l lines] [-m characters] [-w words]
wc -l *.cpp // counts lines in all cpp files in current directory
updatedb - used to rebuild the (file) locate database
&> - redirect both stderr and stdout
2> - redirect stderr only
(ls -l 2>&1) | tee file.txt // redirect with stdout and stderr in correct order details
pushd [newdir] - pushes cwd onto directory stack before changing to newdir. use popd to return
putty // used to connect to linux server - useful to start vncserver
// run right out of download folder with ip address following e.g. ...\downloads\PUTTY.EXE x.x.x.x
vncserver :7 -geometry 1200x935 -depth 16 // starts up vnc client with display 7 - more info here,
// must edit ~/.vnc/xstartup and change the 2 lines listed in the comment; 1200x900 is ideal for 1280x1024 second display so it can be moved back to primary and still fit
// after [uncommenting 2 lines]edit, must log out of putty session and relogin for gnome to start up in vnc window later
// ultravnc won't allow other apps to come to top of z-order when it is maximized
// NOTE: if getting error "X connection to localhost:10.0 broken (explicit kill or shutdown)" YOU ARE PROBABLY TYPING vncconfig INSTEAD OF vncserver!
vncserver -kill :7
vncconfig & - gets clipboard to work between xserver running the VNC extension on a linux box and xclient (i.e. UltraVNC) running on windows; more info
find -size 100[c = bytes] [k = KB] [M = MB] more tips avoid permission denied messages
find -type [d = directory] [f = file]
find -name '*.h'
find . -type f -name '*.h' -exec grep -n -H myStr {} \; // find all .h files in subdirs that contain myStr
// -H shows complete path and -n line number, backslash is to escape shell and curly braces mean concatenate found filenames so grep is called only once with all filenames
// -o would show only part that matches;
-C3 will show 3 lines before each match and 3 after -A before only –B after only;
// -i for case insensitive;
-l as in larryto show filenames only (useful for binary files)
find . -type f -name '*.h' –print0 | xargs -0 grep -n -H myStr
// same results done this way as xargs builds and executes command lines from standard input
grep -n myStr *.h;
grep -n myStr */*.h; grep -n myStr */*/*.h // quick and dirty way - just keep adding */ to go another level deeper
wall // broadcast message to all users (that have mesg permission set to yes)
shutdown -t 0 0 // shutdown now
shutdown -P 0 // shutdown & turn off power now
echo $SHELL //displays name of current shell
ps -def // see all processes and PIDs
netstat -a // see all socket connections
uname -a // see the current kernel version & system architecture
cat /etc/redhat-release // shows the centos / fedora / rhel version number - at some point centos filename changed to /etc/centos-release
/usr/bin/evince // Linux .pdf viewer
man -t ascii | ps2pdf - > ascii.pdf // make a pdf of a man page
ps –p $$ // determine current shell - also see this
echo $? // shows return value of previous process (can also use >echo $status)
tail -f fname //tail file
gdb bin/ic //then choose run stop bt // the (bt = backtrace) generates call stack
gdb $KIBIN/diags; (gdb) run -i OTHER // debugging Jerry's diags
lsof -i tcp:[port#] //check to see if an application is still using socket; returns a pid that can be passed to >ps -def |grep thePID
who // list users logged on for each display
ifconfig /all // see network adapter information [similar to ipconig -a in windows]
ifconfig eth1 down // turn off network adapter eth1
route add gw 10.80.64.1 dev eth0 // add an entry to the route table
route add default gw 10.80.64.1 dev eth0 // add a default entry to the route table
route add -net 10.80.64.0 netmask 255.255.255.0
traceroute [ip address] // shows packet route
localloop // script to loop executables and log results - located at F:\misc\programming\localloop
rm -f -r dirname // delete (remove) recursively, never prompting directory dirname
add entries to /etc/hosts if lan servers are not resolved in dns to specify ip address / name pairs manually
rdesktop [ip address] // remoted desktop into a windows box from linux
kill -l // list all signals in numerical order (to correlate number to constant)
ldd // checks for libraries .exe uses
env var LD_LIBRARY_PATH used in .exe link that requires dynamic libraries not in standard locations
ELF = Executable and Linking Format
information on /etc/sysconfig including the network adapter configuration files
Use shift + page up to page up in a linux console window
Use ctrl + alt +left arrow and ctrl + alt +right arrow to switch between destops in linux.
VNC client: Turn on scroll lock to send key commands to remote computer (e.g alt + tab go to next app in linux workspace)
VNC client: Pressing PrntScrn key requests a full screenupdate (same as selecting "Request Screen Refresh" from the system menu)
VNC client: This page has the new icons (as of ver 1.0.8.2) displayed and what they do
[With remote desktop into Windows box, to swap alt + tab to local apps rather than within remote,
get out of full screen mode (press <ctrl> + <alt> + pause if necessary)]
then alt + tab like normal
list of common Unix utilities determine CentOS / RHOS version Command matching w/Tab at command prompt 2
root password workaround: boot directly into the shell and reset the root password, aka the init=/bin/sh trick 1 2 3
tiling windows in gnome / xwindows
putty client with ssh and starting up gnome desktop
in putty, must turn on x11 forwarding (can only do it from putty.exe without ip address argument)
[ in your putty shortcut, you must remove the ip address argument you are passing. if you don't remove argument, you don't get same configuration settings]
after connected, start gnome in putty window with "/etc/gdm/Xsession default"
Q: Can x11 be enabled in putty by reconfiguring the settings or only form the command line?
A: You can do it in the gui, but not if you are passing an ip address as an argument to putty
Q: Is there a port number for x11?
A: No. In Connection->SSH->X11, check "Enable X11 forwarding" and enter your windows ip in "X disiplay location".
choose XMD... radio button
settings for xming i used are "start no client" & "no access control" - don't know if required or works with other settings too
Jenkins = daemon used to launch linux project rebuilds
To avoid wait after killing app for sockets to close because they are in a TIME_WAIT state. Do the following command on your workstation and this problem goes away.
As 'root' user:
# cd /proc/sys/net/ipv4
# echo 1 > tcp_tw_recycle
1) share the drive/directory in windows
2) check to make sure the share is visible with
>smbclient -L 4200SCS-0983544 -U kiadmin
3) make the mount point
>mkdir /mnt/monte_carlo
4) mount it with cifs
> mount -t cifs -o username=kiadmin,password=[password] //10.80.69.164/monte_carlo /mnt/monte_carlo
on another windows machine, map the drive letter as \\10.80.69.164\monte_carlo
----------------
c++ notes
g++ compiler implementation stops reading chars at a space, so use cin.getline(szString,
iNumCharsToRead) to get strings with spaces.
-s = gcc flag for silent compile (only show errors, not compile command)
to make the package, just follow the procedure in his [Dr. Yoo's] slides. there is one problem though. for some of the compiles, you need to have
.;
before the path. so if you are making edu.gannon.MyPackage and you are going to put in on your c drive, the CLASSPATH environment variable must be
.;c:\edu\gannon\MyPackage;<path of library sub-directory created when you installed java>
and you must create the directory on the c drive before you compile.
when you go to run it, you have to remove the
.;
from the path, so CLASSPATH should be
c:\edu\gannon\MyPackage;<path library sub-directory created when you installed java>
remember that the dos boxes don't update the enviroment variables when you change them in windows 2000, so you have to close them and open them again.
double line:
choose file->stencils->forms & charts->forms shapes
there are double lines on the 5th row
http://support.microsoft.com/default.aspx?scid=kb;en-us;835601 nt file copy error
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/findnextfile.asp
The order in which this function returns the file names is dependent on the file system type. With the NTFS file system and CDFS file systems, the names are returned in alphabetical order. With FAT file systems, the names are returned in the order the files were written to the disk, which may or may not be in alphabetical order.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/by_handle_file_information_str.asp
Not all file systems can record creation and last access time, and not all file systems record them in the same manner. For example, on a Windows NT FAT file system, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day (really, the access date). On the NTFS file system, access time has a resolution of 1 hour. For more information, see
File Times </library/en-us/sysinfo/base/file_times.asp>.example code
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/listing_the_files_in_a_directory.aspfindfirstfileex http://groups-beta.google.com/group/comp.os.ms-windows.programmer.win32/browse_thread/thread/be601d5468a822c0/2065948950b16306?q=Retrive+file+list+in+reverse+date+&rnum=1&hl=en#2065948950b16306
Tip of the week: Easy Thumbnails [from DevSource]
When working with bitmap images it is common to want to create thumbnails, small versions of the images that are easy to display and view. The .Net Framework's Image class, and the derived Bitmap class, provide a method for just this task.
http://ct.eletters.ziffdavis-announces.com/rd/cts?d=180-160-11-116-8081-3076-0-0-0-1
LADY ADA
LOVELACE, daughter
of British poet Lard
Byron |
reading the first line of a text file into a variable in a batch file
To get the first line of a text file into a variable under DOS 6.22 see FAQ #25 at www.batchfiles.co.nr @echo off if "%1"=="GoTo" goto %2 echo `h}aXP5y`P]4nP_XW(F4(F6(F=(FF)FH(FL(Fe(FR0FTs*}`A?+,> %temp%.\pfx.com echo fkOU):G*@Crv,*t$HU[rlf~#IubfRfXf(V#fj}fX4{PY$@fPfZsZ$:KrM$>> %temp%.\pfx.com echo 00rqdO1iI$W?DAj{?_@EuF)1F8b1j$MC?Be.]tI:PAJrff764F0T'}$$5]>> %temp%.\pfx.com echo 7$MG{Fdl$@i*JtSA$$5d80rL@bB=i{A$'FJDbqJ2Djw}D{1~Eu6=?rV+5l>> %temp%.\pfx.com echo YzHw8TKc3O}@A$$$)$#>> %temp%.\pfx.com :: filename.ext is the file to be processed %temp%.\pfx.com < filename.ext > %temp%.\t1.bat set P=call %0 GoTo process :: Set below the variable name where the string should be saved call %temp%.\t1.bat LINE set P= del %temp%.\t1.bat goto eof :process :: On this label, each line from the file to be processed will be :: once represented by a variable (its name is defined above) echo LINE=%LINE% goto eof
“The Pragmatic Programmer: From Journeyman to Master,” Andrew Hunt, David Thomas
“Code Complete: A Practical Handbook of Software Construction,” Steve McConnell
“Dreaming in Code,” Scott Rosenberg
“The Mythical Man-Month: Essays on Software Engineering,” Frederick P. Brooks
“Beautiful Code: Leading Programmers Explain How They Think,” Andy Oram
“The Future of Ideas,” Lawrence Lessig - already downloaded from here
“On Intelligence,” Jeff Hawkins
“A Brief History of Time,” Stephen Hawking
“Hackers and Painters: Big Ideas from the Computer Age,” Paul Graham
“The Evolution of Useful Things,” Henry Petroski ***** SEEMS PARTICULARLY INTERESTING
“Getting Things Done,” David Allen
“In the Beginning Was the Command Line”- already downloaded from here
"Design Patterns: Elements of Reusable Object-Oriented Software" by Erich Gamma, Richard
Helm, Ralph Johnson, John M. Vlissides (the Gang of Four)
The Art of Programming by Knuth
Amazon.com: The Old New Thing: Practical Development Throughout the Evolution of Windows (9780321440303): Raymond Chen: Books
vim cheatsheet local vi cheatsheet vi notes Mastering the VI editor
vi intro vi reference vi cheat sheet
[count] command [where]
a - enter edit mode
i - enter insert mode
d^ - delete from current position to line start
d$ - delete from current position to line end
dw - delete from current position to word end
<del> or x - delete [count] characters under and after the cursor
y - copy
["x]p - put the text [from register x] after the cursor [count] times (paste)
Template classes - used to implement genericity - "type to be determined later" classes (e.g. vectors)
correct name for "getter and setter" methods is "Accessor Methods" and "setters" specificially are "mutators"
coupling (aka dependency) is amount module depends on other modules, so want low; cohesion is how strongly related functionality within a module is, so want high
floating point rounding (e.g. 100 * 1.0e-6 != 100e-6 on x86) info 2 3 4 - very good, c.f. .17 & .18 Printing floating-point numbers in C using "engineering notation" and SI prefixes
C# programming guide C# keywords .Net 4 collections C# Programming Guide C# Keywords
****** READ THIS ONE -> generics left off at Generics and the .NET Framework apx 2012-05-16 ******
MSDN Library cheatsheet MVC missing Brief emulation vs10 common io tasks convert System::String * to char * convert c++ String to System::String Directory.GetFiles trial versions
c# outline tool reading pixels from the screen in C# C# paths Scientific Notation with printf timing in Windows w / millisecond granularity new in 2010
free Microsoft web development tools limit win app to one instance using mutex example use curly braces to tag text for regular expression replacement (codewright uses parens)
parallel programming in .net upgrading visual studio 2010 to use windows 7 sdk MFC Class Library Overview Alphabetical Function Reference
2014-11-12 .Net going open source and cross-platform
c# - when getting error with message box, probably not calling .Show method System.Windows.Forms.MessageBox.Show("x");
tab settings - Options->Text Editor->C/C++->Tabs set to Block for style I prefer with curly brace on line below statement
No intellisense for Visual C++ 2010: when the CLR = Common Language Runtime Support is enabled, Intellisence will not work. This differs from 2008 where it did work and apparently Microsoft has no plans to add it to 2010. You will see at the bottom left of the window “IntelliSense: ‘Unavailable for C++/CLI” (CLI is generic CLR) when this is the case. If you aren’t using .Net stuff and want Intellisense, go to Project->properties->Configuration Properties->C/C++->General and select “No Common Language Runtime Support” for the “Common Language Runtime Support” category. More info (see comment 2) and another
2005 redistributable files for console app are found in this directory: C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\. It appears that only these 2 are needed: Microsoft.VC80.CRT.manifest & msvcr80.dll and they can be located in the same directory as the .exe or in a subdir called Microsoft.VC80.CRT
use Dependency Walker (depends.exe) to see depedent libs - www.dependencywalker.com
to see the symbols in a Win32 import lib or dll
>C:\Program Files\Microsoft Visual Studio 10.0 express\VC\bin\vcvars32.bat
>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\binvcvars32.bat
>DUMPBIN /SYMBOLS libname.lib // for a lib - linux equivalent is ldd
>DUMPBIN /EXPORTS dllname.dll
// for a dll
Adding comments to .rc so not overwritten by resource editor VB6 - pause application with modal dialog into debugger with CTRL + break
2010 hotkeys - full list
CTRL+M,L | toggle all outlining |
CTRL+M,M | toggle current selection outlining |
CTRL+] | brace kiss |
SHIFT + ALT + <ARROW> | column select (also ALT + mouse select) |
CTRL + DEL | delete word to right |
SHIFT + DEL | delete current line |
decent list of guidelines, conventions and debugging tips #pragma warning( disable: 4996 ) /* cheat to bypass annoying warning message */
c# to turn off annoying * at beginning of newline of comment: Text Editor > C# > Advanced > Generate XML documentation comments for ///
turn off unicode in VS2005 Project->Properties->Configuration Properties->General->Character Set select “use Multi_Byte Character Set”
Using VS to open files in Hex viewer: 1. File>>Open>>File 2. On the open file dialog at the bottom there is a down arrow on the "Open" button 3. Click "Open With" 4. Click "Binary Editor" 5. Click OK
to create a directory in the depot, create the directory in the appropriate location in your workspace, then add and submit the files. the depot directory will be automatically created.
Windows 7 & XP User Experience Interaction Guidelines local Progress Bars VERSIONINFO Resource Unload DLL from the another process The covert way to find the Reference Count of DLL Application Verifier to verify unmanaged [c++] code Walkthrough: Creating and Using a Dynamic Link Library (C++) change z-order in mfc at design time how to wait until all process in a job have exited
to get rid of space before or after a page type, use the cascading style sheet tag in the HEAD section of the page
<HEAD>
...
<style>
p{margin-top:0}
p{margin-bottom:0}
</style>
<style>
h1{margin-bottom:0}
</style>
</HEAD>
problem with variable definitions in header files
IEEE 829 and other standards can be found at F:\misc\programming\ieee 829 and other standards
bin files such as addpath and findpath can be found at F:\misc\programming\bin
2022-01-05
https://www.arbourgroup.com/blog/2015/verification-vs-validation-whats-the-difference/
The distinction between the two terms is largely due to the role of specifications. Validation is the process of checking whether the specification captures the customer’s requirements, while verification is the process of checking that the software meets specifications.
Verification includes all the activities associated with the producing high quality software. It is a relatively objective process in that no subjective judgement should be needed in order to verify software.
In contrast, validation is an extremely subjective process. It involves making subjective assessments of how well the (proposed) system addresses a real-world need. Validation includes activities such as requirements modelling, prototyping and user evaluation
----------------------------------------
https://www.linkedin.com/pulse/difference-between-error-fault-defect-failure-ivan-luizio-magalh%C3%A3esSoftware testing has three main purposes:
Verification - The verification process confirms that the software meets its technical specifications. A specification is a description of a function in terms of a measurable output value given a specific input value under specific preconditions. A simple specification may be along the line of a SQL query retrieving data for a single account against the multi-month account-summary table must return these eight fields <list> ordered by month within 3 seconds of submission.
Validation - The validation process confirms that the software meets the business requirements. A simple example of a business requirement is after choosing a branch office name, information about the branch’s customer account managers will appear in a new window. The window will present manager identification and summary information about each manager’s customer base: <list of data elements>. Other requirements provide details on how the data will be summarized, formatted and displayed.
Defect Finding - A defect is a variance between the expected and actual result. The defect’s ultimate source may be traced to a fault introduced in the specification, design, or development (coding) phases.
last updated: Tue 2023-12-12 8:56 AM