Skip to content

Instantly share code, notes, and snippets.

View mh-github's full-sized avatar

Mahboob Hussain mh-github

View GitHub Profile
<html>
<head>
<meta name="robots" content="noindex,follow,nosnippet,noodp,noarchive,notranslate,noimageindex">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<title>Sample Code: Combobox - Editable Dropdown Listbox - HTML JavaScript</title>
34.62365962451697,78.0246928153624,0
30.28671076822607,43.89499752400101,0
35.84740876993872,72.90219802708364,0
60.18259938620976,86.30855209546826,1
79.0327360507101,75.3443764369103,1
45.08327747668339,56.3163717815305,0
61.10666453684766,96.51142588489624,1
75.02474556738889,46.55401354116538,1
76.09878670226257,87.42056971926803,1
84.43281996120035,43.53339331072109,1
def scalefeatures(data, m, n)
mean = [0]
1.upto n do |j|
sum = 0.0
0.upto m-1 do |i|
sum += data[i][j]
end
mean << sum / m
end
require 'csv'
# y = mx + b
# m is slope, b is y-intercept
def compute_error_for_line_given_points(b, m, points)
totalError = 0
0.upto points.length-1 do |i|
x = points[i][0]
y = points[i][1]
totalError += (y - (m * x + b)) ** 2
#!/usr/bin/ruby
require "rubygems"
require "twitter"
require "koala"
client = Twitter::REST::Client.new do |config|
config.consumer_key = "my_consumer_key"
config.consumer_secret = "my_consumer_secret"
config.access_token = "my_access_token"
import java.util.Scanner;
import java.util.PriorityQueue;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;
import java.io.FileInputStream;
import java.io.IOException;
public class DistrictTopAccounts {
public class Pair implements Comparable<Pair> {
private final int key;
private final float value;
public Pair(int key, float value) {
this.key = key;
this.value = value;
}
package com.mh.project.service;
import java.io.ByteArrayOutputStream;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.List;
import java.util.logging.Logger;
import javax.annotation.Resource;
import javax.xml.parsers.DocumentBuilder;
package com.mh.project.service;
import java.io.ByteArrayOutputStream;
import java.io.StringReader;
import java.util.logging.Logger;
import javax.annotation.Resource;
import javax.jws.HandlerChain;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
package com.mh.project.service;
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.MessageContext;