This document has now been incorporated into the uWSGI documentation:
http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
Steps with explanations to set up a server using:
public String POST(String addr, String post){ | |
StringBuffer sb = null; | |
String type = "application/x-www-form-urlencoded"; | |
HttpURLConnection urlCon = null; | |
BufferedReader br = null; | |
OutputStreamWriter wr = null; | |
String line = null; | |
try { | |
sb = new StringBuffer(); | |
URL url = new URL(addr); |
from snippets.models import Snippet | |
from snippets.serializers import SnippetSerializer | |
from django.http import Http404 | |
from rest_framework.views import APIView | |
from rest_framework.response import Response | |
from rest_framework import status | |
class SnippetList(APIView): | |
""" |
/* | |
* Copyright © 2013 Yuk SeungChan, All rights reserved. | |
*/ | |
package main.scala | |
import scala.actors.{Channel, OutputChannel, Actor} | |
object Main { | |
def main(args: Array[String]): Unit = { |
import scala.actors.Actor | |
object Main { | |
def main(args: Array[String]): Unit = { | |
val pong = new Pong | |
val ping = new Ping(100000, pong) | |
ping.start | |
pong.start | |
} |
import akka.actor.{Props, ActorSystem, Actor} | |
/* | |
* Copyright © 2013 Yuk SeungChan, All rights reserved. | |
*/ | |
object Main { | |
def main(args: Array[String]): Unit = { | |
println("*" * 20 + " Actor Registry " + "*" * 20) | |
new LogGenerator().run(100) |
import re, urllib, httplib, time | |
class Mining(object): | |
r = re.compile(ur'class="score_reple">\s*<p>(.*?)</p>') | |
def __init__(self, code): | |
positive = [] | |
negative = [] | |
for page in range(1,2): | |
[positive.append(data) for data in self.get_data(code, 'highest', page)] | |
time.sleep(2) |
object Main { | |
def main(args: Array[String]): Unit = { | |
new PatternMatching() | |
} | |
} | |
class PatternMatching{ | |
val methods = List(_match, _match2, guard, patternVar, patternGuardVar, typePattern, arrMatch, lstMatch, pairMatch, caseClass, optionMatch, partialFunction) | |
def _match(): Unit = { |
object Main { | |
def main(args: Array[String]): Unit = { | |
new StreamMethods() | |
} | |
} | |
class StreamMethods{ | |
val methods = List(streamTest) | |
def numsFrom(n : BigInt): Stream[BigInt] = n #:: numsFrom(n + 1) |
import scala.collection.mutable.ArrayBuffer | |
import scala.collection.mutable.LinkedList | |
import scala.collection.mutable.BitSet | |
import java.util.LinkedHashSet | |
object Main { | |
def main(args: Array[String]): Unit = { | |
new FunctionMapping() | |
} | |
} |