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.Linq; | |
namespace Extensions | |
{ | |
public static class StringExtensions | |
{ | |
public static bool IsPalindrome(this string s) | |
{ | |
var x = s.ToCharArray() | |
.AsEnumerable(); |
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
def Spinlock(jump, iterations): | |
buffer = [0] | |
position = 0 | |
for i in range(iterations): | |
position = (position + jump) % buffer.__len__() | |
buffer.insert(position+1, i+1) | |
position += 1 | |
return buffer |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace InertialNavigationSystem | |
{ | |
public class Vector | |
{ |
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
(Preferred) sampling frequency set to 120 Hz. | |
Your device may not support this sampling frequency, so always check your timestamps! | |
ATTITUDE 19.679428 29.673703 0.175603 -9.586614 | |
ACCEL 19.679471 -0.046143 0.468903 0.756302 | |
GYRO 19.679494 -0.381407 -0.411497 0.121990 | |
MAGNETO 19.679516 114.264801 -1.040695 -513.457886 | |
ATTITUDE 19.686156 29.557649 -0.011281 -9.501279 | |
ACCEL 19.686205 -0.076935 0.510986 0.740234 | |
GYRO 19.686226 -0.249177 -0.328551 0.109375 | |
MAGNETO 19.686245 113.561630 -1.040695 -515.828735 |
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.Security.Cryptography; | |
using System.Text; | |
public class PasswordVerificator | |
{ | |
public static void Main() | |
{ | |
string AuthenticationResult = AuthenticateUser("admin", "supersecretpassword","mysalt1f$gO3123qs")?"User authenticated!":"Access denied!"; | |
Console.WriteLine(AuthenticationResult); |
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
USER | PASSWORD | SALT | |
---|---|---|---|
admin | 8d3df449c3ce323176ea8f786060da80b9d86c1f | MnDXdJ1CNS | |
jankowalski | 4cc55fc0736f4b5d73a8d9074350369230becd90 | 3nyJcEItdm |
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
USER | PASSWORD | |
---|---|---|
admin | 18960546905b75c869e7de63961dc185f9a0a7c9 |
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
USER | PASSWORD | |
---|---|---|
admin | supersecretpassword |
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.Security.Cryptography; | |
using System.Text; | |
public class PasswordVerificator | |
{ | |
public static void Main() | |
{ | |
string AuthenticationResult = AuthenticateUser("admin", "supersecretpassword")?"User authenticated!":"Access denied!"; | |
Console.WriteLine(AuthenticationResult); |
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; | |
public class PasswordVerificator | |
{ | |
public static void Main() | |
{ | |
string AuthenticationResult = AuthenticateUser("admin", "supersecretpassword")?"User authenticated!":"Access denied!"; | |
Console.WriteLine(AuthenticationResult); | |
} |
NewerOlder