Sunday, March 19, 2017

get the new list final q

this test old list is provided: adpt,anth,arlz,cdna,cerc,cnxr,gman,nwbo,rubi,vrx
this test new list is provided:
1,"ADPT","Adeptus Health Inc.","Healthcare","Hospitals","USA",34.90,0.28,1.59,-7.56%,1627041 2,"ANTH","Anthera Pharmaceuticals, Inc.","Healthcare","Biotechnology","USA",18.81,,0.43,5.85%,5432000 3,"ARLZ","Aralez Pharmaceuticals Inc.","Healthcare","Biotechnology","Canada",147.62,,2.25,2.27%,1750752 4,"ATLS","Atlas Energy Group, LLC","Basic Materials","Independent Oil & Gas","USA",5.07,,0.19,-25.04%,1576616 5,"BGMD","BG Medicine, Inc.","Healthcare","Medical Laboratories & Research","USA",0.68,,0.06,0.00%,332 6,"BLPH","Bellerophon Therapeutics, Inc.","Healthcare","Biotechnology","USA",30.90,,1.03,-30.41%,2325329 7,"CDNA","CareDx, Inc","Services","Research Services","USA",33.00,,1.55,-3.13%,148535 8,"CERC","Cerecor Inc.","Healthcare","Biotechnology","USA",4.72,,0.79,-0.39%,292854 9,"CNXR","Connecture, Inc.","Healthcare","Health Care Plans","USA",30.61,,1.37,-1.44%,27900 10,"GLF","Gulfmark Offshore, Inc.","Basic Materials","Oil & Gas Equipment & Services","USA",14.87,,0.40,10.47%,2088864 11,"GMAN","Gordmans Stores, Inc.","Services","Apparel Stores","USA",1.47,,0.07,-3.57%,1420948 12,"NWBO","Northwest Biotherapeutics, Inc.","Healthcare","Biotechnology","USA",36.53,,0.24,-33.68%,11054798 13,"OSIR","Osiris Therapeutics, Inc.","Healthcare","Biotechnology","USA",110.59,76.43,3.21,0.94%,686060 14,"PN","Patriot National, Inc.","Financial","Insurance Brokers","USA",57.44,5.20,2.25,-11.07%,421201 15,"PTSX","Point.360","Services","Movie Production, Theaters","USA",1.55,,0.12,0.00%,0 16,"RITT","RiT Technologies Ltd.","Technology","Communication Equipment","Israel",0.25,,0.02,0.00%,0 17,"RUBI","the Rubicon Project, Inc.","Technology","Application Software","USA",280.20,14.72,5.80,0.69%,3478951 18,"SKBI","Skystar Bio Pharmaceutical Company","Healthcare","Drug Manufacturers - Major","China",0.55,0.05,0.06,17.83%,2096 19,"WAC","Walter Investment Management Corp.","Financial","Mortgage Investment","USA",40.66,,1.10,-8.33%,1493559 20,"ZSAN","Zosano Pharma Corporation","Healthcare","Biotechnology","USA",30.67,,1.55,-9.88%,11578419
get the old list    get the new list
click get the old list then click get the new list
*

<div style="color: pink; font-size: .5em;">
this test old list is provided: <span id="sns20170318sa1022ol">adpt,anth,arlz,cdna,cerc,cnxr,gman,nwbo,rubi,vrx</span></div>
<div style="color: greenyellow; font-size: .5em;">
this test new list is provided:<br />
<span id="sns20170318sa1022nl">1,"ADPT","Adeptus Health Inc.","Healthcare","Hospitals","USA",34.90,0.28,1.59,-7.56%,1627041
2,"ANTH","Anthera Pharmaceuticals, Inc.","Healthcare","Biotechnology","USA",18.81,,0.43,5.85%,5432000
3,"ARLZ","Aralez Pharmaceuticals Inc.","Healthcare","Biotechnology","Canada",147.62,,2.25,2.27%,1750752
4,"ATLS","Atlas Energy Group, LLC","Basic Materials","Independent Oil &amp; Gas","USA",5.07,,0.19,-25.04%,1576616
5,"BGMD","BG Medicine, Inc.","Healthcare","Medical Laboratories &amp; Research","USA",0.68,,0.06,0.00%,332
6,"BLPH","Bellerophon Therapeutics, Inc.","Healthcare","Biotechnology","USA",30.90,,1.03,-30.41%,2325329
7,"CDNA","CareDx, Inc","Services","Research Services","USA",33.00,,1.55,-3.13%,148535
8,"CERC","Cerecor Inc.","Healthcare","Biotechnology","USA",4.72,,0.79,-0.39%,292854
9,"CNXR","Connecture, Inc.","Healthcare","Health Care Plans","USA",30.61,,1.37,-1.44%,27900
10,"GLF","Gulfmark Offshore, Inc.","Basic Materials","Oil &amp; Gas Equipment &amp; Services","USA",14.87,,0.40,10.47%,2088864
11,"GMAN","Gordmans Stores, Inc.","Services","Apparel Stores","USA",1.47,,0.07,-3.57%,1420948
12,"NWBO","Northwest Biotherapeutics, Inc.","Healthcare","Biotechnology","USA",36.53,,0.24,-33.68%,11054798
13,"OSIR","Osiris Therapeutics, Inc.","Healthcare","Biotechnology","USA",110.59,76.43,3.21,0.94%,686060
14,"PN","Patriot National, Inc.","Financial","Insurance Brokers","USA",57.44,5.20,2.25,-11.07%,421201
15,"PTSX","Point.360","Services","Movie Production, Theaters","USA",1.55,,0.12,0.00%,0
16,"RITT","RiT Technologies Ltd.","Technology","Communication Equipment","Israel",0.25,,0.02,0.00%,0
17,"RUBI","the Rubicon Project, Inc.","Technology","Application Software","USA",280.20,14.72,5.80,0.69%,3478951
18,"SKBI","Skystar Bio Pharmaceutical Company","Healthcare","Drug Manufacturers - Major","China",0.55,0.05,0.06,17.83%,2096
19,"WAC","Walter Investment Management Corp.","Financial","Mortgage Investment","USA",40.66,,1.10,-8.33%,1493559
20,"ZSAN","Zosano Pharma Corporation","Healthcare","Biotechnology","USA",30.67,,1.55,-9.88%,11578419</span></div>
<div id="sns20170318sa1022o" style="color: goldenrod; font-size: 1.5em;">
</div>
<textarea id="sns20170318sa1022i"></textarea>

<a href="javascript:sns20170318sa1022('get the old list')" style="color: greenyellow; font-size: 1.5em;">get the old list</a>&nbsp;&nbsp;&nbsp;

<a href="javascript:sns20170318sa1022('get the new list')" style="color: greenyellow; font-size: 1.5em;">get the new list</a>

<br />
<div style="color: burlywood; font-size: .75em;">
click get the old list then click get the new list</div>
<div id="sns20170318sa1022n" style="color: violet; font-size: 1.5em;">
</div>
<script>

function sns20170318sa1022(therequest) {

function gettheoldlist() {
var theoldlist = document.getElementById("sns20170318sa1022i")
var theoldliststore = document.getElementById("sns20170318sa1022o")
theoldliststore.innerHTML = theoldlist.value}

if (therequest === "get the old list") {gettheoldlist()}



function getthenewlist() {
var theoldlist = document.getElementById("sns20170318sa1022o")
var thenewlist = document.getElementById("sns20170318sa1022i")
var thenewlistdisplay = document.getElementById("sns20170318sa1022n")

var theoldlistarray = theoldlist.innerHTML.split(",")
var thenewlistarray = thenewlist.innerHTML.split("\n")

function symbol(listing) {return listing.split('","')[0].split('"')[1].toLowerCase()}

function isitonthelist(it,thelist) {
var isit = "no it is not on the list"
for (var i = 0; i < thelist.length; i = i + 1) {
if (thelist[i] === it) {isit = "yes it is on the list";i = thelist.length}}
return isit}

var thenewsymbols = []
for (var i = 0; i < thenewlistarray.length; i = i + 1) {
thesymbol = symbol(thenewlistarray[i])
if (isitonthelist(thesymbol,theoldlistarray) === "no it is not on the list") {
thenewsymbols.push(thesymbol)} // if
} // for

if (thenewsymbols.length === 0) {thenewlistdisplay.innerHTML = "there are no new symbols"}
else {thenewlistdisplay.innerHTML = "there are new symbols: " + thenewsymbols.toString()}


} // get the new list


if (therequest === "get the new list") {getthenewlist()}




} // sns20170318sa1022


</script>





<span id="sns20170318sa1022c" style="color: pink; display: none;">**</span>


*

No comments:

Post a Comment