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.Reflection; | |
using System.Threading; | |
namespace MemoryAppLoader | |
{ | |
public static class MemoryUtils | |
{ | |
public static Thread RunFromMemory(byte[] bytes) | |
{ | |
var thread = new Thread(new ThreadStart(() => |
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.Runtime.InteropServices; | |
/* | |
* Title: CMemoryExecute.cs | |
* Description: Runs an EXE in memory using native WinAPI. Very optimized and tiny. | |
* | |
* Developed by: affixiate | |
* Release date: December 10, 2010 | |
* Released on: http://opensc.ws |
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.Linq; | |
using System.Reflection; | |
using System.Windows.Forms; | |
namespace EmbeddedLibraries | |
{ | |
static class Program | |
{ | |
private static Assembly ExecutingAssembly = Assembly.GetExecutingAssembly(); |
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
var person = new Person() | |
{ | |
FirstName = "John", | |
LastName = "Smith" | |
}; | |
//the same interface is availalbe for MsSqlServerSettings | |
var settings = FileSettings("settings.dat"); | |
settings.WriteProperties(person); //saves only public properties |
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
var person = new Person(); | |
var settings = FileSettings("settings.dat"); | |
settings.ReadProperties(person); | |
settings.ReadStaticProperties(typeof(Settings)); | |
var lastUpdate = settings.ReadValue<DateTime>("LastUpdate"); | |
var counter = settings.ReadValue<int>(SettingsKey.Counter); |
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 <stdio.h> | |
#include <vector> | |
#include <climits> | |
using namespace std; | |
struct Vertex | |
{ | |
long long minCost; | |
}; |
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 <stdio.h> | |
#include <set> | |
#include <vector> | |
#include <algorithm> | |
#include <climits> | |
using namespace std; | |
struct Edge | |
{ |
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
#define INT_MAX 2147483647 | |
#include <stdio.h> | |
#include <vector> | |
#include <list> | |
#include <algorithm> | |
#include <math.h> | |
#include <iostream> | |
#include <string> | |
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 <stdio.h> | |
using namespace std; | |
int * numbers; | |
int * tmp; | |
long long merge(int begin, int middle, int end) | |
{ | |
int pos = begin; |
OlderNewer