Skip to content

Instantly share code, notes, and snippets.

View NickCarneiro's full-sized avatar
🔨
Building

Nick Carneiro NickCarneiro

🔨
Building
View GitHub Profile
Range("B4").Select
Do While (IsEmpty(ActiveCell) = False Or IsEmpty(ActiveCell.Offset(1, 0)) = False)
If ActiveCell.Value = ActiveCell.Offset(0, 1) Or ActiveCell.Offset(1, 0).Value = ActiveCell.Offset(1, 1) Then
ActiveCell.Offset(1, 0).Select
If ActiveCell.Offset(1, 0).Value = ActiveCell.Offset(0, 1) Then
ActiveCell.Range("B1:C1").Select
Selection.Insert Shift:=xlDown
Else
ActiveCell.Range("B1:C1").Select
Selection.Delete Shift:=xlUp
//convert web to mobile
int web_width = 1279;
int web_height = 1795;
int x_mid = web_width / 2;
int y_mid = web_height / 2;
Integer x_in = X_INPUT_FROM_ROHAN;
Integer y_in = Y_INPUT_FROM_ROHAN;
float minDot = Float.MAX_VALUE;
//apply logic from above else loop here also
for (PointWithRSSI p : compare) {
float currDot = 0;
Set<String> c = p.getAccessPoints().keySet();
for (String s: keys) {
if (c.contains(s)) {
currDot += p.getAccessPoints().get(s)*p.getAccessPoints().get(s) ;
currDot -= (Math.abs(temp.getCurrentPoint().getWeightedaccessPoints().get(s).getRssi()) * Math.abs(p.getAccessPoints().get(s))); //add to the dot product
}
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Devcomm Extraction Automation</display-name>
<context-param>
<description>
The location where state information is saved.
Valid values are 'server' (typically saved in HttpSession) and 'client' (typically
saved as a hidden field in the form.
Default is server.</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
#include <stdio.h>
int main(){
/*Declare Variables*/
float yrly_income, mthly_exp, savings, percent_savings, vacation, tracker;
FILE *vacationptr;
/*Create and verify output file*/
public class Main {
/**
* @param args
*
*/
public static void main(String[] args) {
// prints "hello world"
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Temperature{
public static void main(String[] args){
//the data that will be entered by the user
String farenheit1;
@NickCarneiro
NickCarneiro / gist:1831120
Created February 14, 2012 22:35
Demonstration of ArrayList
import java.io.*;
import java.util.ArrayList;
public class ArrayListDemo {
//program for storing an arbitrary number of strings in a list and then printing them out.
public static void main(String[] args){
ArrayList<String> list = new ArrayList<String>();
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class InfAddMathEquation {
public static void main( String args[]) throws IOException {
System.out.println("Enter Numbers, Type eq to add");
double[] anArray= new double[99];
@NickCarneiro
NickCarneiro / gist:1967598
Created March 3, 2012 19:17
Theater Class
package server;
import java.util.ArrayList;
import java.util.HashMap;
/*
* Thread safe representation of a movie theatre
*/
public class Theater {
//ArrayList of seat numbers