Skip to content

Instantly share code, notes, and snippets.

public class MyClass {
public static void main(String[] args) {
BigDecimal[] mathArray2 = mathStuff2();
System.out.println("mathStuff2 func return:");
for (BigDecimal num: mathArray2) {
System.out.println(num);
}
public static BigDecimal[] mathStuff2() {
Collecting cairocffi
Downloading cairocffi-0.7.2.tar.gz (75kB)
100% |████████████████████████████████| 81kB 3.6MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-mxp3zsbs/cairocffi/setup.py", line 65, in <module>
**cffi_args
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
j@j-desktop:~/Documents/_Github-Projects/turbo_palm_tree$ python3 test.py
/usr/local/lib/python3.5/dist-packages/image_match-1.0.2-py3.5.egg/image_match/goldberg.py:402: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
POST http://localhost:9200/images/image [status:N/A request:0.000s]
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 137, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 91, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 81, in create_connection
sock.connect(sa)
/**
* Remove '\n' and '\r' characters from string
*/
private String removeCRLF(String string) {
return string.replace("\n", "").replace("\r", "");
}
/**
* Prints all possible guns the player can pick, gets user input, calls toLowerCase method
* on user input, and returns it if it matches that of a valid gun.
boolean autoTakeStepMode = false;
boolean[] settings = {autoTakeStepMode};
String[] settingsMessages = {"Enable auto-take-step mode (y/n)?"};
String response = "";
for (int i = 0; i < settingsMessages.length; i++) {
response = ui.getYesNoResponse(settingsMessages[i]);
if (response.equals("y"))
settings[i] = true;
// autoTakeStepMode = true;
else if (response.equals("n"))
<annotation>
<folder>wakfu2</folder>
<filename>iron ore4.jpg</filename>
<path>/home/j/_Github-Projects/raccoon-dataset/images/iron ore4.jpg</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>2552</width>
<height>1378</height>
from heapq import *
class A:
def __init__(self, val):
self.val = val
def __lt__(self, cmp):
"""Overwrite this to do the opposite of what's
expected"""
@jtara1
jtara1 / UpdateOSTime.cpp
Created December 23, 2017 05:57
Change system date programmatically (stackoverflow) https://stackoverflow.com/a/652391/3854436 solution doesn't work
// UpdateOSTime.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <windows.h>
#include <iostream>
/* source from: https://stackoverflow.com/a/652391/3854436
* VS 2017 needed some project config changes: https://stackoverflow.com/a/20595744/3854436
*/
sudo su -
wget -O - https://nightly.odoo.com/odoo.key | apt-key add -
echo "deb http://nightly.odoo.com/11.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list
apt update && apt-get install odoo -y
sudo apt install python3-pip -y
sudo pip3 install vobject qrcode
sudo apt install libldap2-dev libsasl2-dev
sudo pip3 install pyldap
sudo pip3 install xlwt
@jtara1
jtara1 / alpha-numeric-list-troubles.js
Last active March 13, 2018 03:49
alpha-numeric-list generation yields empty Array within React Native app but works in chrome console
let alphabet = [...Array(26).keys()]
.map(x => x + 65)
.map(x => String.fromCharCode(x));
console.log(alphabet);
// [0, 1, ..., 9, A, B, C, ..., Z]
// let alphanumericCharacters = _.concat(_.range(10), alphabet);
let alphanumericCharacters = [...Array(10).keys()]
.concat(alphabet);