Skip to content

Instantly share code, notes, and snippets.

View coffeejay's full-sized avatar
🤡
clowning around

Jay Deuskar coffeejay

🤡
clowning around
View GitHub Profile
public int[] radixsort(int[] arr)
{
int exp = 1;
for(int i =0; i < maxDigits; i++){
ArrayList bucketList[] = new ArrayList[arr.length];
for(int k=0; k < 10; k++)
public int[] radixsort(int[] arr)
{
int i, m = arr[0], exp = 1, n = arr.length;
int[] b = new int[10];
for (i = 1; i < n; i++)
if (arr[i] > m)
m = arr[i];
<!DOCTYPE html>
<html lang="en" style="overflow: hidden;">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Cappio</title>
<!-- Bootstrap -->
<link href="bootstrap.css" rel="stylesheet">
@interface UIImage (Resize)
+ (UIImage *) imageWithImage: (UIImage *) image scaledToSize: (CGSize)newSize;
- (UIImage *)fixOrientation;
@end
animationArray=[NSArray arrayWithObjects:
[UIImage imageNamed:@"blur1.png"],
[UIImage imageNamed:@"blur2.png"],
[UIImage imageNamed:@"blur3.png"],
[UIImage imageNamed:@"blur4.png"],
[UIImage imageNamed:@"blur5.png"],
[UIImage imageNamed:@"blur6.png"],
[UIImage imageNamed:@"blur7.png"],
[UIImage imageNamed:@"blur8.png"],
[UIImage imageNamed:@"blur5.png"],
var portfolio_data = {};
for(var i = 0; i < portfolio_companies.length; i += 1) {
portfolio_data[ portfolio_companies[i] ] = portfolio_allocations[i];
}
console.log (portfolio_data);
$.ajax({
url: "<%= portfolios_calculate_path %>", // Route to the Script Controller method
type: "GET",
$.ajax({
url: "<%= portfolios_calculate_path %>", // Route to the Script Controller method
type: "GET",
dataType: "json",
data: portfolio_data, // This goes to Controller in params hash, i.e. params[:file_name]
complete: function() {},
success: function(data, textStatus, xhr) {
// Do something with the response here
alert("it worked!"); // Show the file contents in our editor.
},
// Chart will take a metric and list
// and generate a chart
window.Chart = React.createClass({
getDefaultProps: function() {
return {
metric: '',
initialList: null,
url: '',
id: ''
window.FlotBar = React.createClass({
getDefaultProps: function() {
return {
data: [],
id: "",
}
},
drawGraph: function() {
window.FlotBar = React.createClass({
getDefaultProps: function() {
return {
data: [],
id: "",
}
},
drawGraph: function() {