This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using ByteSizeLib; | |
using CommandLine; | |
using Microsoft.Diagnostics.Runtime; | |
namespace MemStat | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
var obj = new object(); | |
HasNullPropertyOrFields(obj).Dump(); | |
} | |
const BindingFlags flags = BindingFlags.Instance | BindingFlags.Public; | |
bool HasNullPropertyOrFields(object obj) | |
{ | |
var visited = new HashSet<object>(ReferenceEqualityComparer.Instance); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Nemerle; | |
using Nemerle.Collections; | |
using Nemerle.Peg; | |
using Nemerle.Utility; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
В .NET в инструментах типа Typemock Isolator имеется написан- | |
ный на C++ код, который подключается к COM-интерфейсу API про- | |
филирования в CLR и подписывается на обратные вызовы, относя- | |
щиеся к различным специальным событиям. Typemock даже владеет | |
патентом на эту технологию (см. http://bit.ly/typemockpatent), Прав- | |
да, компания, похоже, не требует его неукоснительного соблюдения, | |
иначе не было бы конкурентов в лице JustMock и Moles. | |
События JitCompilationStarted и SetILFunctionBody, являю- | |
щиеся членами COM-интерфейса ICorProї lerCallback2, позволяют | |
во время выполнения получать и изменять подлежащий исполнению |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Откуда форкаемся | |
/// </summary> | |
public enum ForkOrigin | |
{ | |
/// <summary> | |
/// C начала потока | |
/// </summary> | |
Begin, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
//пускает цикл | |
Thread.Start(ReceiveLoop) | |
} | |
async void ReceiveLoop() | |
{ | |
while(true) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using StreamExtensions; | |
module Program | |
{ | |
Main() : void | |
{ | |
def stream = MemoryStream(); | |
ignore(stream << 108 << 111 << 108); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestFixture, Category(TestCategory.Fz44Grab)] | |
public class NotificationTests : TransformBaseTests | |
{ | |
[TestCase("0131200001016003623.xml")] | |
public void Notification_TransformResultState_ShouldBeCompleted(string @group) | |
{ | |
Transform_ShouldBeCompleted_AndHash_ShouldBeRepeatable(@group); | |
} | |
#region Тендеры |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Triangle_well() | |
clear all, clc; | |
%https://ru.wikipedia.org/wiki/%D0%90%D1%82%D0%BE%D0%BC%D0%BD%D0%B0%D1%8F_%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D0%B0_%D0%B5%D0%B4%D0%B8%D0%BD%D0%B8%D1%86 | |
h = 1; | |
e = 1; | |
m = 1; | |
EH = 4.3597441775*10^-18; %Хартри | |
E = 100000 / (5.1422065211.*10.^11); | |
warning('off', 'MATLAB:integral:NonFiniteValue'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
m_e = 9.10938356 * 10 .^-31; | |
E = 10; | |
alpha = 1; | |
from = 0; | |
to = 1000; | |
v0 = 0.5 .* 299792458; | |
p = m_e * v0; | |
w = @(x) { x .* exp(-alpha .* x) }; | |
N2 = @(x) { integral(w, from, to) }; |