Skip to content

Instantly share code, notes, and snippets.

@ErikZhou
ErikZhou / Flyweight2.cpp
Created August 7, 2013 11:20
Structural Patterns - Flyweight
#include <iostream>
#include <string>
using namespace std;
class Icon
{
public:
Icon(char *fileName)
{
strcpy(_name, fileName);
@ErikZhou
ErikZhou / Flyweight.cs
Created August 7, 2013 11:28
Structural Patterns - Flyweight
using System;
using System.Collections;
class MainApp
{
static void Main()
{
// Arbitrary extrinsic state
int extrinsicstate = 22;
@ErikZhou
ErikZhou / For Mac 4.2.6 unlimited trial.md
Created March 24, 2022 05:29 — forked from rise-worlds/For Mac 4.2.6 unlimited trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher,4.2.5,4.2.6,4.3.7,it's works , this is the way which makes Always in evaluation mode 。

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+u BCompare : touch BCompare && chmod a+u BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@