Skip to content

Instantly share code, notes, and snippets.

@bryantp
bryantp / gist:5232765
Created March 24, 2013 17:36
Java Implementation of Kleinrock's Independence Assumption
package com.gmail.kleinrock;
//Implementation of Kleinrock's Independence Assumption
public class KleinrockIA {
private int n; // number of lines in the network
private int[] r; // list of offered loads
private int[] d; // list of edge distances
private double W0; // Target delay in bps
package com.gmail.kleinrock;
//Implementation of Kleinrock's Independence Assumption
public class KleinrockIA {
//private int n; // number of lines in the network
//private int[] r; // list of offered loads
//private int[] d; // list of edge distances
//private double W0; // Target delay in bps
@bryantp
bryantp / kleinrock.cpp
Last active December 15, 2015 11:49
Kleinrock CPP
//#include "stdafx.h"
#include "KleinrockAI.h"
#include <iostream>
#include <vector>
#include "loaddistancepair.h"
int main()
{
@bryantp
bryantp / bio.cpp
Last active December 15, 2015 16:19
Fixed so that it compiles.
#define LIGHTHOUSE
#define GIRL
#define MAN
#define CITY
#define GUARDIAN
#define REBEL
#define FOUNDER
#include <iostream>
@bryantp
bryantp / gist:5431797
Created April 22, 2013 00:58
SSL Error Log
[Sun Apr 21 20:49:09 2013] [info] Loading certificate & private key of SSL-aware server
[Sun Apr 21 20:49:09 2013] [debug] ssl_engine_pphrase.c(470): unencrypted RSA private key - pass phrase not required
[Sun Apr 21 20:49:09 2013] [info] Configuring server for SSL protocol
[Sun Apr 21 20:49:09 2013] [debug] ssl_engine_init.c(465): Creating new SSL context (protocols: SSLv3, TLSv1)
[Sun Apr 21 20:49:09 2013] [debug] ssl_engine_init.c(676): Configuring permitted SSL ciphers [HIGH:MEDIUM:!ADH:!MD5]
[Sun Apr 21 20:49:09 2013] [debug] ssl_engine_init.c(760): Configuring server certificate chain (4 CA certificates)
[Sun Apr 21 20:49:09 2013] [debug] ssl_engine_init.c(420): Configuring TLS extension handling
[Sun Apr 21 20:49:09 2013] [debug] ssl_engine_init.c(807): Configuring RSA server certificate
[Sun Apr 21 20:49:09 2013] [info] RSA server certificate enables Server Gated Cryptography (SGC)
[Sun Apr 21 20:49:09 2013] [debug] ssl_engine_init.c(846): Configuring RSA server private key
@bryantp
bryantp / gist:5431825
Created April 22, 2013 01:11
Site Virtual Host
<VirtualHost 192.73.236.37:80>
ServerName www.uglounge.com
ServerAlias uglounge.com
DocumentRoot "/var/www/ugloungeforums/"
<IfModule mod_ssl.c>
ErrorLog /var/log/apache2/ssl_engine.log
LogLevel debug
</IfModule>
OpenSSH_5.9p1, OpenSSL 0.9.8x 10 May 2012
debug1: Reading configuration data /Users/Person/.ssh/config
debug1: /Users/Person/.ssh/config line 13: Applying options for mcroot
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 53: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to bukkit.host.com [xxx.xxx.xxx.xxx] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
@bryantp
bryantp / gist:6187582
Created August 8, 2013 18:57
Network Class Description
Network Class
-Handle connection to servers (Reddit and others)
-Handle the download of JSON data from Reddit
-Generate a signal upon completion of a given task
-Handle the logins for Reddit's servers
-Send requests (http://www.reddit.com/dev/api) to Reddit
@bryantp
bryantp / gist:6233403
Created August 14, 2013 17:35
Compile Error
networkrequest.cpp:25:40: error: expected a class or namespace
request.setHeader(QNetworkRequest::KnownHeaders::ContentTypeHeader,...
~~~~~~~~~~~~~~~~~^
1 error generated.
make: *** [networkrequest.o] Error 1
@bryantp
bryantp / gist:6252018
Created August 16, 2013 17:54
api.reddit.com/r/learnprogramming
{"kind": "Listing", "data": {"modhash": "n4a0dpx8yo65e7ed871aae57d3431fd7b9c9e1dda32f2d8122", "children": [{"kind": "t3", "data": {"domain": "self.learnprogramming", "banned_by": null, "media_embed": {}, "subreddit": "learnprogramming", "selftext_html": "&lt;!-- SC_OFF --&gt;&lt;div class=\"md\"&gt;&lt;p&gt;The website in question pulls information from our SAP system and brings it to a searchable format everyone on the network can access. We are a project based company so every morning I would like to run a report telling me where each project stands. This is my first project so I KNOW I sound like a noob, I&amp;#39;m just looking to be pointed in the right direction. Below is a screen shot of the UI &lt;a href=\"http://i.imgur.com/uA42mDH.png\"&gt;http://i.imgur.com/uA42mDH.png&lt;/a&gt;&lt;/p&gt;\n&lt;/div&gt;&lt;!-- SC_ON --&gt;", "selftext": "The website in question pulls information from our SAP system and brings it to a searchable format everyone on the network can access. We are a project based compan