When you heat a metal bar, it starts glowing infrared light (emitting electromagnetic radiations which are not visible by human eye), and the more hot it gets the higher the frequency of the emitted radiation is. However, when its red, it then become a little yellow, and then white. Why it doesn't glow blue in its spectrum of thermal radiation? Where does ultra-violet radiations go, if we have a circular spectrum of light, which is centered around violet color of light? Why sunlight has ...
get current user in csharp
To OS, your code is just like a user. It should access resources and OS under specific credentials. Each process in OS runs under a known security context. To get the current user under which the current process (your code probably) is running, use: System.Security.Principal.WindowsIdentity.GetCurrent();
why test is good a practical sample
This scenario really happened to us. We were converting a large projects data from an old system into the new system. We had to change the encoding of the system. To apply system-wide encoding conversion, we created an extension method, which would be used on every string value to be converted. We thought that this method would work just fine. However, a team member, has accidentally changed it, and notified nobody about that change. The reason for change is important of course, but what matte ...
pas present future for ethics
If you found this familiar, then keep reading to understand a secret of ethics. You think of your past, and some of your actions that you've done seem to be be really bad. You're like "Oh God, how could I do such a horrible thing?", or "I'm really ashamed of what I did in that moment and the worse was that I thought I was right". If it happens to you, then a good technique to stop doing bad things is to imagine yourself in future, and try to assess your current action. If it sounds to be right ...
AMAIK, Windows had many copy solutions like copy and xcopy. But each of them had problems. Robocopy was a newer and better version. Its simplest syntax is: robocopy d:\source-folder c:\target-folder file-name.file-extension For example, to copy a pdf file you write: robocopy d:\books d:\other-books psychology.pdf To use robocopy in post-build events of your .NET projects in Visual Studio, consider adding these two lines after robocopy: robocopy $(TargetDir) D:\Assemblies $(Tar ...
sustainability and healthy society
A good criterion to consider a society as a healthy society - is to see if the people of that society feel good or not. People of a healthy society feel good, and feeling good is an intuition that needs no proof. The only thing that remains is sustainability. If that society can make people of next generations also feel good then it's much more healthy. For example while people of Iran felt good during & after revolution they don't feel the same now. Even new generation doesn't feel good ...
my business thoughts
Creating Patogh suite, a set of sites for professionals in each field to get together. I started nefkanto.com, and then I quit. I wanted to go to Australia, to become a first-level developer I created a comprehensive method for learning foreign languages based on my experiences, and I called it phis. I created a worthy web application for it. I also spent a lot of time collecting resources and created many applications to analyze a worthy corpus. I and some of my friends, wanted to create a s ...
inter stellar language
Language is a set of rules we have defined to convey what we have in mind. But the problem is that how can we guarantee that the receiver knows these rules and protocols? International language is a language that has been agreed upon to be learned and spoken by NATIONS, thus inter + national Inter-stellar language should be defined as a language that can be understood by citizens from both stars. Since we don't know what might exist in this universe (or even multi-verse), we'd better use unive ...
sql server table value constructor
Instead of: declare @table table ( Id int not null, Name nvarchar(100) ); insert into @table values (1, 'saeed'); insert into @table values (2, 'hamid'); select * from @table; You can write: declare @table table ( Id int not null, Name nvarchar(100) ); insert into @table values (1, 'saeed'), (2, 'hamid'); -- This is called table-value-constructor select * from @table; Even better than that: select * from ( values (1, 'saeed'), (2, 'h ...
change management two dimensions
I do believe that any change management has these two dimensions, alongside other dimensions it might have: Cost of change + impact of change That is, a change might be very cheap (like changing the name of a table in database), but its impact can propagate to many code files, even affect the name of methods in classes to reflect the new name of the table, which in turn initiate another change wave. This can be called change-chain. In the other extreme, a change might be very expensive a ...