Skip to content

Instantly share code, notes, and snippets.

View sailfish009's full-sized avatar

sailfish009

  • freelancer
  • South Korea
View GitHub Profile
using System.Diagnostics;
namespace Server
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
https://stackoverflow.com/questions/2839390/how-do-i-convert-a-double-into-a-string-in-cwithout-scientific-notation
std::string doubleToStr(double d)
{
std::stringstream ss;
ss << fixed << setprecision(400) << d;
return ss.str();
}
https://superuser.com/questions/106917/remote-desktop-without-a-password?answertab=active#tab-top
Yes, this is possible.
By default, Windows will not allow the logon over a network with a blank password. There is a KB article that details how to allow blank passwords for network logons.
https://stackoverflow.com/questions/2203159/is-there-a-c-equivalent-to-getcwd
std::string's constructor can safely take a char* as a parameter. Surprisingly there's a windows version too.
Edit: actually it's a little more complicated:
https://www.jeti.com/cms/index.php/general/radiant-intensity-calculation
Application of JETI Spectroradiometers specbos 1211
Radiant Intensity Calculation Using Irradiance Measurement
The Radiant intensity (I) of a (point like) source can be obtained by measuring the Irradiance (E)
in a certain distance. Afterwards the inverse square law has to be used
mingw, maven, clojure-git works fine.
REGEDIT4
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions]
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]
"Colour0"="175,194,194"
"Colour1"="255,255,255"
"Colour2"="48,48,48"
REGEDIT4
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions]
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]
"Colour0"="185,188,186"
"Colour1"="254,255,178"
"Colour2"="31,31,31"
@sailfish009
sailfish009 / putty_moonfly.txt
Last active January 8, 2019 03:14
save as "putty-xterm-256color.reg" for PuTTY, currently this moonfly theme reg is not good for putty. see: https://github.com/AlexAkulov/putty-color-themes
REGEDIT4
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions]
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]
"Colour0"="55,60,64"
"Colour1"="255,84,84"
"Colour2"="140,200,95"
https://stackoverflow.com/questions/8613187/an-elegant-way-to-consume-all-bytes-of-a-binaryreader
public byte[] ReadAllBytes(Stream stream)
{
using (var ms = new MemoryStream())
{
stream.CopyTo(ms);
return ms.ToArray();
}
}