Install graphviz
:
brew install graphviz
using FowardDiff | |
# Derivative of f | |
D(f) = x -> FowardDiff.derivative(f, x) | |
# nth Derivative of f | |
D(f, n) = let | |
F = f | |
while n > 0 | |
F = D(F) |
First, try following the instructions on the BigCommerce Theme Docs.
If you encounter an error about Microsoft.Cpp.Default.props
not being found, open the Windows Registry Editor and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\MSBuild\ToolsVersions\4.0
.
Add the string key VCTargetsPath
with the value C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets
.
If you get an error trying to install your Unity build on Android saying App not installed
, then you need to change your project's package name in the Player Settings. To do this, go to File > Build Settings > Player Settings... > Player > Other Settings
and find the Identification section. Make sure Override Default Package Name
is checked and then change the value of Package Name
to something like com.example.mygame
.
Additionally, you may want to change Install Location
to Automatic
.
From adb logcat you might see
def rsm(f, x0, xn, n): | |
"""Approximates integral using Riemann sum of the midpoint. | |
Takes the function f(x), bounds a and b, and number of partitions, n as arguments.""" | |
dx = (xn - x0) / n | |
return [f(x0 + i*dx) for i in range(0,n)] | |
x0 = 0 | |
xn = 2 | |
n = 4 | |
dx = (xn - x0) / n |
The upload-keystore.jks
file should be saved somewhere secure along with the upload_certificate.pem
file.
In your Android app, make sure there is a key.properties
file in the following format:
storePassword=password
keyPassword=password
keyAlias=upload
storeFile=/../upload-keystore.jks
# frozen_string_literal: true | |
# The game engine | |
class Engine | |
def initialize(running) | |
@running = running | |
end | |
def game_loop(&update) | |
update.call while @running |
# frozen_string_literal: true | |
def bubblesort(array) | |
array.each_with_index do |_, i| | |
(0..(array.length - 2 - i)).each_with_index do |_, j| | |
array[j], array[j + 1] = array[j + 1], array[j] if array[j] > array[j + 1] | |
end | |
end | |
end |
# frozen_string_literal: true | |
def stock_picker(prices) | |
curr_buy = curr_sell = best_buy = best_sell = max_profit = 0 | |
(1..(prices.length - 1)).each do |i| | |
diff = prices[i] - prices[curr_buy] | |
curr_sell = i | |
curr_buy = i if diff.negative? |
# frozen_string_literal: true | |
# Counts each | |
def substrings(string, valid_substrings) | |
downcase_string = string.downcase | |
Hash[ | |
valid_substrings | |
.collect { |substring| [substring, downcase_string.scan(substring).length] } | |
.reject { |_substring, substring_length| substring_length.zero? } | |
] |