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
[DllImport("kernel32.dll")] | |
static extern int GetCurrentProcessorNumber(); | |
static void Main(string[] args) | |
{ | |
DataTable dt = new DataTable(); | |
dt.Columns.Add("n", typeof(int)); | |
var numbers = Enumerable.Range(0, 1000); | |
Stopwatch sw = new Stopwatch(); | |
sw.Start(); |
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
System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch(); | |
watch.Start(); | |
// something doing | |
watch.Stop(); | |
Response.Write(watch.Elapsed.ToString()); |
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
# https://www.khanacademy.org/math/linear-algebra/vectors_and_spaces/vectors/e/adding-vectors-in-magnitude-and-direction-form | |
def findComponent(v,vR,w,wR): | |
l = v*math.cos(math.radians(vR))+w*math.cos(math.radians(wR)) | |
r = v*math.sin(math.radians(vR))+w*math.sin(math.radians(wR)) | |
return (l,r) |
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
#include <iostream> | |
#include <string> | |
using namespace std; | |
void Exercise_While_Break() | |
{ | |
string password; | |
while (true) |
OlderNewer