This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JNIEXPORT jint JNICALL Java_ShortWeight_matrixWeight | |
(JNIEnv * env, jobject jobj, jintArray matrix_values, jint rows, jint columns) | |
{ | |
jint *matrix_ptr; | |
matrix_ptr = (*env)->GetIntArrayElements(env, matrix_values, NULL); | |
(*env)->ReleaseIntArrayElements(env, matrix_values, matrix_ptr, 0); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct jintArray | |
{ | |
int size; | |
int *elements; | |
}; | |
struct env_type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FileReaderTest { | |
public static void main(String[] args) { | |
String filename = "./public/non_existent.file"; | |
try { | |
List<String> allLines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset()); | |
for ( String i : allLines ) { | |
System.out.println(i); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.nio.charset.Charset; | |
import java.nio.file.Files; | |
import java.util.List; | |
import java.nio.file.Paths; | |
public class FileReaderTest { | |
public static void main(String[] args) { | |
String filename = "./public/index.html"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FileReaderTest { | |
public static void main(String[] args) { | |
String filename = "./public/index.html"; | |
try { | |
List<String> allLines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset()); | |
for ( String i : allLines ) { | |
System.out.println(i); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileInputStream; | |
import java.io.File; | |
public class FileReaderTest { | |
public static void main(String[] args) { | |
File newFile = new File("./public/sample_file.text"); | |
FileInputStream fileStream = new FileInputStream(newFile); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileInputStream; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
public class FileReaderTest { | |
public static void main(String[] args) { | |
File newFile = new File("./public/sample_file.text"); | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 ::: Feature/commit bounding - Adding time-windowed commit methods ::: Added the commits_since, commits_before, commits_on and commits_between methods to specify windows on the commits retrieved. Also tidied up a couple of YARD failures in client/commits and client/repositories. | |
As these methods take parseable arguments, I've set them all to raise ArgumentError if the dates passed in are invalid (have pulled in 'date' in the commits.rb so I can use the DateTime.parse). Also had to switch to stub_http_method as the '+' in the iso8601 was giving the stub_get method some gyp. | |
1 ::: adding commit doc to readme ::: The commit method was very helpful for me and it would be awesome for it to be included in the README2 ::: Use new, more secure, gist comment uris pattern. ::: as described in the [recent changes blog](http://developer.github.com/changes/2012-10-31-gist-comment-uris/)3 ::: Language/Languages confusing behavior ::: Hey Guys, | |
Love the gem (I'm using 1.18.0), but running into some confusing behavior |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'uri' | |
require 'net/http' | |
require 'net/https' | |
require 'json' | |
require 'tf_idf' | |
def get_access_token | |
request, http = set_connection_parameters("https://api.github.com/repos/pengwynn/octokit/issues?state=closed", 443) | |
response = http.request(request) | |
parsed = JSON.parse(response.body) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MusicService::Application.routes.draw do | |
resources :albums | |
resources :artists | |
resources :songs | |
match ':artist_name' => 'artists#search_by_artist' | |
end |