Skip to content

Instantly share code, notes, and snippets.

View benwilson512's full-sized avatar

Ben Wilson benwilson512

  • CargoSense
  • Fairfax, VA
View GitHub Profile
public void holdYaw(double target,double factor) throws FgException
{
// get current Heading degree
// calculate the deviation in degree
double aircraftHdg = a.getHeadingDeg();
double degreeToTurn = calcDegreeToTurn();
// Limit the potential for an integrator to accumulate ridicuously high values when
// we cannot reach its target yaw for a period of time.
require 'rubygems'
require 'json'
SITE = "http://www.righttofoodindia.org/"
links = JSON.parse(File.open("map.json").read)
# links.each do |link|
# filename = link["name"].downcase.gsub(" ", "_").gsub("'", "").gsub("/", "")
# category = link["uri"].split("/").first
package com.button.radio;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Toast;
last_file = Dir.open('.').select{|d| d.include?("output")}.sort.last
current_session = last_file ? last_file.match(/[0-9]{1,}/).to_s.to_i + 1 : 0
File.open("output#{current_session}.txt", 'a') do |f|
puts "Session: #{current_session}"
while thought = gets != "that's all for now\n"
print "\e[2J\e[f" # clear the screen.
f.write(thought)
end
end
class Device
attr_accessor :measurements
def initialize
@measurements = []
end
end
class Measurement
attr_accessor :frequency, :points, :magnitudes
x = 1...5
y = x.map {|n| n**2 }
int[] x = [1,2,3,4,5]
int[] y;
for(int i = 0; i < x.length; i++) {
y[i] = Math.exp(x[i], 2);
}
@Kroll.method
public void getWirelessNetworks(KrollInvocation invocation) {
if (Util.gEmulatorMode == false) {
wifiMgr = (WifiManager) invocation.getTiContext().getActivity().getSystemService(Context.WIFI_SERVICE);
receiver = new WifiReceiver();
invocation.getTiContext().getActivity().registerReceiver(receiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
wifiMgr.startScan();
}
}
Categories below - after internal discussion we reduced the reparations as follows:
Severe - sacrifice captial or other major city:
Diablito (Swinging London)
LauraChristine (Complete)
Xandrosch
Keeves (Almost complete)
Sooner
Wuzzel/Wuzzy