Assuming you llvm installed (comes as standard on Mac OS Mavrick xtools)
Create a helloworld.c file:
#include<stdio.h>
int main()
{
int x=3;
@echo off | |
if "%1"=="" goto blank | |
echo Squashing %1 commits... | |
git reset --soft HEAD~%1 | |
git log --format=%%B%%n --reverse "HEAD@{1}" -n %1 > _msg.txt | |
git commit -t _msg.txt | |
del _msg.txt | |
echo Done! |
Assuming you llvm installed (comes as standard on Mac OS Mavrick xtools)
Create a helloworld.c file:
#include<stdio.h>
int main()
{
int x=3;
In this tutorial we are going to build a Twitter clone using Django and GetStream.io, a hosted API for newsfeed development.
We will show you how easy is to power your newsfeeds with GetStream.io. For brevity we leave out some basic Django-specific code and recommend you refer you to the Github project for the complete runnable source code. At the end of this tutorial we will have a Django app with a profile feed, a timeline feed, support for following users, hashtags and mentions.
I assume that you are familiar with Django. If you're new to Django the [official tutorial] (https://docs.djangoproject.com/en/2.0/intro/) explains it very well.
# This is a powershell commandlet equivalent of build_ui.sh for installation on Windows | |
# Generate python files based on the designer ui files. pyrcc4 should be on the path. | |
# If you need to modify the python location or pyuic path, just change the 2 variables below | |
$pythonPath = "C:\Python27\" | |
$pyuicPath = "C:\Python27\Lib\site-packages\PyQt4\uic\pyuic.py" | |
If (!(Test-Path "designer")) { | |
Write-Host "Please run this from the project root" | |
Exit |
{{FrontSide}} | |
<div class="outside"> Answer</div> | |
<div class="card-back shadow"> | |
<div class="back">{{Back}}</div> | |
{{#BackOpt}} | |
<hr /> | |
<div class="backopt">{{BackOpt}}</div> |
========================== | |
How Software Companies Die | |
========================== | |
- Orson Scott Card | |
The environment that nurtures creative programmers kills management and | |
marketing types - and vice versa. | |
Programming is the Great Game. It consumes you, body and soul. When | |
you're caught up in it, nothing else matters. When you emerge into |
#!/usr/bin/env escript | |
% -*- mode: erlang -*- | |
main([BeamFile]) -> | |
{ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(BeamFile,[abstract_code]), | |
io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]). |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import math | |
from PyQt4 import QtGui, QtCore | |
def binomial(i, n): |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real
use std::str; | |
fn main() { | |
// -- FROM: vec of chars -- | |
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}']; | |
// to String | |
let string1: String = src1.iter().collect::<String>(); | |
// to str | |
let str1: &str = &src1.iter().collect::<String>(); | |
// to vec of byte |