This file contains 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
@ECHO OFF | |
REM Use filename as Teams profile name | |
SET MSTEAMS_PROFILE=%~n0 | |
ECHO - Using profile "%MSTEAMS_PROFILE%" | |
SET "OLD_USERPROFILE=%USERPROFILE%" | |
SET "USERPROFILE=%LOCALAPPDATA%\Microsoft\Teams\CustomProfiles\%MSTEAMS_PROFILE%" | |
ECHO - Launching MS Teams with profile %MSTEAMS_PROFILE% |
This file contains 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
namespace PC { | |
// Define an alias for the nested namespace. | |
using Project = PC.MyCompany.Project; | |
class A { | |
void M() { | |
// Use the alias | |
Project.MyClass mc = new Project.MyClass(); | |
} | |
} | |
namespace MyCompany { |
This file contains 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 <DHT.h> | |
#include <DHT_U.h> | |
// Example testing sketch for various DHT humidity/temperature sensors | |
// Written by ladyada, public domain | |
#include "DHT.h" | |
#define DHTPIN A2 // what digital pin we're connected to |
This file contains 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.Windows.Forms; | |
using System.Threading; | |
using System.Threading.Tasks; | |
class Program | |
{ | |
[STAThread] | |
public static void Main() | |
{ |
This file contains 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://github.com/kungfux/xdatabase | |
using System; | |
using XDatabase; | |
namespace Examples | |
{ | |
public class Test | |
{ | |
private const string _connectionString = "Data Source=db.sqlite;"; |
This file contains 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
// Example of extensions for IWebElement | |
using System.Collections.ObjectModel; | |
namespace OpenQA.Selenium.Extensions | |
{ | |
public static class WebElement | |
{ | |
public static void ClearAndSendKeys(this IWebElement webElement, string keys) | |
{ | |
webElement.Clear(); |
This file contains 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
export const smallestDivisor = (a) => { | |
if (a === 1) | |
return 1; | |
const findDivisor = (a, d) => { | |
if (a % d === 0) | |
return d; | |
else | |
return findDivisor(a, d + 1); |
This file contains 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
const biggerCommonDivisor = (a, b) => { | |
const findDivisor = (a, b, z) => { | |
console.log(z); | |
if (a % z === 0 && b % z === 0) | |
return z; | |
else | |
return findDivisor(a, b, z - 1); | |
}; |
This file contains 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
const sum = (n, a, b) => { | |
let result = 0; | |
for (let i = n - 1; i > 0; i--) { | |
if (i % a === 0 || i % b === 0) { | |
result += i; | |
} | |
} |
NewerOlder