This is a very simple HTTP server for Unix, using fork(). It's very easy to use
- include header
httpd.h
- write your route method, handling requests.
- call
serve_forever("12913")
to start serving on port 12913
/* This is the original elf.h file from the GNU C Library; I only removed | |
the inclusion of feature.h and added definitions of __BEGIN_DECLS and | |
__END_DECLS as documented in | |
https://cmd.inp.nsk.su/old/cmd2/manuals/gnudocs/gnudocs/libtool/libtool_36.html | |
On macOS, simply copy the file to /usr/local/include/. | |
Mathias Lafeldt <[email protected]> */ | |
/* This file defines standard ELF types, structures, and macros. |
/* | |
http://benjithian.sg/2012/12/load-image-from-memoryweb-using-opencv-and-libcurl/ | |
I just started playing around with OpenCV and wanted it to display images directly from memory loaded from a website URL. | |
Below is the C++ codes to load an image directly from a website without it being written to the hard disk. | |
Library used were OpenCV and Libcurl. Do tell me if there is a more efficient way to do it. | |
*/ | |
#include <stdio.h> | |
#include <curl/curl.h> | |
#include <sstream> | |
#include <iostream> |
# | |
# Acts as a nginx HTTPS proxy server | |
# enabling CORS only to domains matched by regex | |
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/ | |
# | |
# Based on: | |
# * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html | |
# * http://enable-cors.org/server_nginx.html | |
# | |
server { |
var ffmpeg = require('ffmpeg'); | |
try { | |
var process = new ffmpeg('example.mp4'); | |
process.then(function (video) { | |
console.log('The video is ready to be processed'); | |
var watermarkPath = 'watermark-suissa.png', | |
newFilepath = './video-com-watermark.mp4', | |
settings = { | |
position : "SE" // Position: NE NC NW SE SC SW C CE CW |
/** | |
* This are a collection of examples for C 201. | |
* These combine concepts you may or may not be | |
* familiar with and are especially useful for | |
* students new to C. There is a lot of really | |
* cool stuff you can do in C without any cool | |
* languages. | |
* | |
* This is file in particular is an introduction | |
* to fun function usage in C. |
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |
import matplotlib | |
matplotlib.use('TkAgg') | |
from numpy import arange, sin, pi | |
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg | |
from matplotlib.figure import Figure | |
import tkinter as Tk | |
import tkinter.ttk as ttk | |
class Plot2D(Tk.Frame): | |
def __init__(self,parent,**kwargs): |
If you'd like to use a .jar file in your project, but it's not available in any Maven repository, | |
you can get around this by creating your own local repository. This is done as follows: | |
1 - To configure the local repository, add the following section to your pom.xml (inside the <project> tag): | |
<repositories> | |
<repository> | |
<id>in-project</id> | |
<name>In Project Repo</name> | |
<url>file://${project.basedir}/libs</url> |
# QEmu | |
brew install qemu | |
# Home for out tests | |
mkdir ~/arm-emu | |
cd ~/arm-emu | |
# Download initrd and kernel | |
wget http://ftp.de.debian.org/debian/dists/jessie/main/installer-armel/current/images/versatile/netboot/initrd.gz |