Skip to content

Instantly share code, notes, and snippets.

@ofan
ofan / windows_and_office_kms_setup.adoc
Created June 14, 2023 01:17 — forked from jerodg/windows_and_office_kms_setup.adoc
Activate Windows and Office Using KMS Server
View windows_and_office_kms_setup.adoc

Microsoft Windows and Office KMS Setup

View keybase.md

Keybase proof

I hereby claim:

  • I am ofan on github.
  • I am zfeng (https://keybase.io/zfeng) on keybase.
  • I have a public key ASD8WcPiffrknboEg8emKPLfkwaIcssn3saUisuHJ3XTmQo

To claim this, I am signing this object:

View expr.cpp
#include <iostream>
#include <cstdlib>
using namespace std;
int main(int argc, char* argv[]){
string in(argv[1]);
long res=0;
int pn = 0;
for(auto i=in.begin(); i!=in.end(); ++i){
View withdraw.hs
import Control.Monad.State.Lazy
import Control.Monad.Error
import Data.Char
type BalanceT e s m a = ErrorT e (StateT s m) a
type Balance a = BalanceT BalanceError Double IO a
data BalanceError = AmountIsNegative | NotEnoughBalance | InvalidCommand String | BalanceError String deriving Show
instance Error BalanceError where
View barrier.c
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[]){
MPI_Init(&argc, &argv);
int size, rank;
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
int data;
@ofan
ofan / pi.cpp
Last active August 29, 2015 13:56
View pi.cpp
#include <math.h>
#include <mpich-devel-clang/mpi.h>
#include <iostream>
using namespace std;
int main(int argc, char* argv[]){
int n, rank, size, i;
// PI25DT is used for computing error
View haddock.py
import logging
import os
import errno
import shutil
from urlparse import urlparse, urlunparse
from bs4 import BeautifulSoup
from . import types
from .base import _BaseParser
import re
View fp.cpp
#include <iostream>
int doAdd(int (*call)(int,int)) {
return call(1,2);
}
int main() {
struct Add {
static int add(int a, int b) {
return a + b;