Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.79 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3. <html lang="en">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  6. <title>SamR's Site: Samuel A. Rebelsky</title>
  7.  
  8. <link rel="stylesheet" type="text/css" href="/~rebelsky/samr.css">
  9. <link rel="stylesheet" type="text/css" href="/~rebelsky//css/print.css" media="print">
  10.  
  11. </head>
  12.  
  13. <!-- <body style="background-image: url(/~rebelsky/Images/samr.png);"> -->
  14. <body>
  15.  
  16. <div class="NOPRINT">
  17.  
  18. <!-- SiteWeaver: Inserting '/home/rebelsky/Web/Templates/links.html' -->
  19. <p class="links">
  20. <b>Basic:</b>
  21. [<a href="#postlinks">Skip To Body</a>]
  22. [<a accesskey="f" href="/~rebelsky/index.html">Front Door</a>]
  23. [<a accesskey="o" href="/~rebelsky/origin.html">Origin</a>]
  24. [<a accesskey="s" href="/~rebelsky/schedule.html">Schedule</a>]
  25. [<a accesskey="c" href="/~rebelsky/cv.html">CV</a>]
  26. [<a accesskey="m" href="/~rebelsky/musings/">Musings</a>]
  27. [<a accesskey="g" href="https://www.cs.grinnell.edu/glimmer/">Glimmer Labs</a>]
  28. <br>
  29. <b>Courses:</b>
  30. [<a href="/~rebelsky/Courses/">Archive</a>]
  31. -
  32. [<a href="/~rebelsky/Courses/CSC151/2019S/">CSC 151.01</a>]
  33. [<a href="/~rebelsky/Courses/CSC207/2019S/01/">CSC 207.01</a>]
  34. [<a href="/~rebelsky/Courses/CSC207/2019S/02/">CSC 207.02</a>]
  35. <br>
  36. <b>Misc:</b>
  37. [<a href="https://rebelsky.youcanbook.me">Book office hours</a>]
  38. [<a href="/~rebelsky/rebelsky.gpg">Public Key</a>]
  39. [<a href="https://pgp.mit.edu:11371/pks/lookup?search=rebelsky&op=index">Public Key @ MIT Server</a>]
  40. [<a href="https://github.com/rebelsky/web-site/issues">Issue Tracker</a>]
  41. <a name="postlinks"></a>
  42. </p>
  43. <!-- SiteWeaver: Done with '/home/rebelsky/Web/Templates/links.html' -->
  44.  
  45.  
  46. <hr class="topsep">
  47.  
  48. </div><!--noprint-->
  49.  
  50. <h1><a name="samuela.rebelsky">Samuel A. Rebelsky</a></h1>
  51.  
  52. <p>
  53. <em>Disclaimers: Yes, I am proud that my personal Web page reflects
  54. Web formatting of the late 1990's. (I would argue that almost anything
  55. is better than the repetitious Bootstrap sites out there.) I also don't
  56. mind that this page is almost always out of date, particularly because that
  57. amuses our alums. </em>
  58. </p>
  59.  
  60. <p>
  61. Welcome to the front door (<a href="#frontdoor" title="an explanation
  62. of the term 'front door'">explanation</a>) for <em>SamR's Site</em>,
  63. the primary Web site for Samuel A. Rebelsky. On this page and site,
  64. you can find all sorts of stuff, including ... (<a href="#endtoc">skip
  65. table of contents</a>).
  66. </p>
  67.  
  68. <ul>
  69. <li><a href="#courses">Current Courses</a>
  70. <li><a href="#FAQ">Frequently Asked Questions</a>
  71. <li><a href="#cv">Curriculum Vitae</a>
  72. <li><a href="#home">Home</a>
  73. <li><a href="#office">Office</a>
  74. <li><a href="#teaching">Teaching</a>
  75. <li><a href="#research">Research</a>
  76. <li><a href="#notes">Notes</a>
  77. </ul>
  78. <p>
  79.  
  80. </p>
  81.  
  82. <p>
  83. <a name="endtoc"></a>
  84. </p>
  85.  
  86. <h2><a name="courses">Current Courses</a></h2>
  87.  
  88. <p>
  89. My list of current courses is my attempt to pretend that I keep this
  90. page up to date. It generally shows that I'm behind in keeping up on
  91. the page.
  92. </p>
  93.  
  94. <p>
  95. This semester (Spring 2019), I'm teaching three courses.
  96. </p>
  97.  
  98. <ul>
  99. <li> <a href="https://www.cs.grinnell.edu/~rebelsky/Courses/CSC151/2019S/">CSC 151.01</a>, a section of our introductory course in functional problem solving. This semester, we are trying a new approach to 151, one focused on the digital humanities. CSC 151.01 meets MWF 10:00-11:20.
  100. <li> <a href="https://www.cs.grinnell.edu/~rebelsky/Courses/CSC207/2019S/01/">CSC 207.01</a>, a section of our course in data structures, algorithms, and object-oriented problem solving. CSC 207.01 meets MWF 8:30-9:50.
  101. <li> <a href="https://www.cs.grinnell.edu/~rebelsky/Courses/CSC207/2019S/02/">CSC 207.02</a>, another section of CSC 207. CSC 207.02 meets MWF 1:00-2:20.
  102. </ul>
  103.  
  104. <p>
  105. This fall, I am serving as a fellow at the <a href="http://obermann.uiowa.edu">Obermann Center for Advanced Studies</a> at the University of Iowa and am not
  106. teaching any courses. In the spring, I'll be teaching two sections of
  107. CSC 207, our course in data structures, algorithms, and OOP, and a section
  108. of a newly-developed digital-humanities-themed introductory course. Stay
  109. tuned.
  110. </p>
  111.  
  112.  
  113.  
  114. <h2><a name="FAQ">Frequently Asked Questions</a></h2>
  115.  
  116. <dl>
  117.  
  118. <dt class="question">
  119. How do I schedule an appointment with you?
  120. </dt>
  121. <dd class="answer">
  122. You should be able to book an appointment at <a href="https://rebelsky.as.me/schedule.php"><code>https://rebelsky.as.me/schedule.php</code></a>.
  123. </dd>
  124.  
  125. <dt class="question">
  126. I'm a prospective student and have a lot of questions. Why should
  127. I study at a liberal arts college rather than a large university?
  128. Why should I study computer science at Grinnell rather than one of
  129. its peers? What kind of computer should I buy?
  130. </dt>
  131. <dd class="answer">
  132. You can find answers to these questions, and many like them,
  133. at <a href="http://www.cs.grinnell.edu/~rebelsky/musings/index-prospective-students.html"><code>http://www.cs.grinnell.edu/~rebelsky/musings/index-prospective-students.html</code></a>.
  134. </dd>
  135.  
  136. <dt class="question">
  137. What's the story with your logo?
  138. </dt>
  139. <dd class="answer">
  140. For some time, I've sketched a smiley face with curly hair next to
  141. my signature when I write notes to friends. When I grew a beard, I
  142. added a beard. In Fall 2016, I was teaching a course on
  143. Processing, and thought it would be fun to write a program that
  144. draws that smiley face. (It actually animates the drawing, which
  145. makes it more fun. I may add some randomness to it eventually.)
  146. </dd>
  147.  
  148. <dt class="question">
  149. Rumor (or rumour) has it that you are writing an essay each day.
  150. Where can I find those?
  151. </dt>
  152. <dd class="answer">
  153. <a href="http://www.cs.grinnell.edu/~rebelsky/musings/"><code>http://www.cs.grinnell.edu/~rebelsky/musings/</code></a>.
  154. </dd>
  155. <dt class="question">
  156. Where can I find your legendary primer entitled <i>If You Ask A Prof A
  157. Question</i>?
  158. </dt>
  159. <dd class="answer">
  160. <a href="http://www.cs.grinnell.edu/~rebelsky/AskProf/"><code>http://www.cs.grinnell.edu/~rebelsky/AskProf/</code></a>
  161. </dd>
  162. <dt class="question">
  163. Are you ever likely to update that primer?
  164. </dt>
  165. <dd class="answer">
  166. Maybe. I've set up a <a href="https://github.com/rebelsky/if-you-ask-a-prof-a-question/commits">github repository</a> to log some of the things to change.
  167. </dd>
  168. <dt class="question">
  169. I'm a Grinnell student planning to declare a computer science major.
  170. Will you be my academic advisor?
  171. </dt>
  172. <dd class="answer">
  173. I am among the least organized people you will ever meet. You need
  174. only look into my office to figure that out. History suggests
  175. that I will lose your advisee folder as soon as I receive it, and
  176. I probably won't find it again until two years after you graduate.
  177. I am likely to forget anything we discuss, including your courses and
  178. that you are my advisee, unless my remembering inconveniences you.
  179. On the other hand, I am happy to discuss with you course selections and
  180. planning for life beyond Grinnell. I am happy to help you work through
  181. administrative issues at Grinnell (and, surprisingly, I'm good at
  182. navigating administrative stuff). I am also likely to care about you as
  183. a person. But I will discuss courses and life with you, help you with
  184. administrivia, and care about you whether or not you are my advisee.
  185. If you're willing to put up with those negatives, I am happy to serve as
  186. your advisor (or <q>adviser</q>, as the Grinnell Style guide suggests).
  187. </dd><dd class="answer">
  188. &nbsp;&nbsp;I expect you to take both your liberal arts education and the short
  189. essay seriously. In particular, I expect evidence that you've
  190. thought carefully about the purpose and components of a liberal
  191. arts education. You should make sure to read the sections of the <a
  192. href="http://catalog.grinnell.edu">College Catalog</a> that discuss a
  193. liberal arts education. You should also read William Cronon's <q><a
  194. href="http://www.williamcronon.net/writing/cronon_only_connect.pdf">Only
  195. Connect</a></q>.
  196. </dd><dd class="answer">
  197. &nbsp;&nbsp;When writing your declaration-of-major essay, you should make sure to
  198. clearly articulate your model for the structure and goals of a liberal
  199. arts education and to explain how your course selection both meets that
  200. structure and helps you achieve those goals. As in any argumentative
  201. essay, you should also make sure to acknowledge and address potential
  202. criticisms. You will be unlikely to be able to do that within the
  203. stated word limits. That's okay. The primary goal is for you to explain
  204. your education, not to stay within the word limits.
  205. </dd><dd class="answer">
  206. &nbsp;&nbsp;Note that I will be on leave during the 2019-20
  207. academic year. Because of that, I am primarily restricting advisees
  208. to students who have done summer research with me or who I am likely
  209. to be able to advise remotely.
  210. </dd>
  211.  
  212. <dt class="question">
  213. I'm a current or former student. Will you write me a letter of
  214. recommendation or serve as a reference?
  215. </dt>
  216. <dd class="answer">
  217. Almost certainly. I prefer to serve these roles primarily for students
  218. who stand out positively (so that I can write stronger recommendations)
  219. and who I know well. I also write much better letters (and serve as a better reference)
  220. for people who take the time to fill out my
  221. <a href="/~rebelsky/recommendation.html">requested information for letters
  222. of recommendation</a> form.
  223. </dd>
  224. <dd class="answer">
  225. &nbsp;&nbsp;The College informs me that you must also
  226. fill out a <a href="http://www.grinnell.edu/sites/default/files/documents/FERPA%20Authorization%20for%20Reference%20or%20Recommendation.pdf">form giving
  227. me permission to communicate to others about you</a>. (I generally assume
  228. the request suffices, but I'm told to use the form.)
  229. </dd>
  230. <dd class="answer">
  231. &nbsp;&nbsp;Even when I am willing to write a recommendation or serve as a reference,
  232. I reserve the right to refuse in certain circumstances, such as cases
  233. involving an institution I consider unethical or an opportunity for
  234. which I consider you insufficiently qualified.
  235. </dd>
  236. <dd class="answer">
  237. &nbsp;&nbsp;I also tend to push deadlines, so please drop me an email to remind
  238. me to get those recommendations done! (In fact, until I've told you
  239. that I've submitted a recommendation, you should assume that I haven't.)
  240. </dd>
  241.  
  242. <dt class="question">
  243. Where are the pages with memories of your parents, Freda Rebelsky and
  244. Bill Rebelsky?
  245. </dt>
  246. <dd class="answer">
  247. <a href="http://www.cs.grinnell.edu/~rebelsky/Freda/"><code>http://www.cs.grinnell.edu/~rebelsky/Freda/</code></a>
  248. </dd>
  249.  
  250. <dt class="question">
  251. Do you ever update this page?
  252. </dt>
  253. <dd class="answer">
  254. Rarely. If you note things that seem to need updates, please let
  255. me know.
  256. </dd>
  257.  
  258. <dt class="question">
  259. Where can I get papers about your research projects?
  260. </dt>
  261. <dd class="answer">
  262. Google?
  263. </dd>
  264.  
  265. <dt class="question">
  266. Can you help me with the following homework question? ...
  267. </dt>
  268. <dd class="answer">
  269. Not unless you're one of my
  270. students. If you plan to send me a question, you should read my
  271. <a href="homework-help.html">policies for dealing with questions
  272. on homework</a>.
  273. </dd>
  274.  
  275. <dt class="question">
  276. Can I send you an unsolicited email advertisement?
  277. </dt>
  278. <dd class="answer">
  279. No.
  280. </dd>
  281.  
  282. <dt class="question">
  283. <a name="frontdoor"></a>
  284. Why do you have links to a <q><a href="index.html">Front Door</a></q> and
  285. <q><a href="origin.html">Origin</a></q> rather than a <q>Home Page</q>.
  286. </dt>
  287. <dd class="answer">
  288. I'm following the lead of my colleague,
  289. <a href="http://www.cs.grinnell.edu/~stone/">John David Stone</a>. Dr.
  290. Stone notes that <q>Home Page</q> is ambiguous, because it can either
  291. mean <q>entry to my site</q>, or <q>place which I use to start my
  292. browsing</q>. He suggests using <q>Front Door</q> for the former
  293. and <q>Origin</q> for the latter.
  294. </dd>
  295.  
  296. <dt class="question">
  297. Why do you have a <q>Skip to Body</q> link at the top of your page?
  298. </dt>
  299. <dd class="answer">
  300. Usability guidelines suggest that you should provide an easy way to skip
  301. any large set of links. Since I sometimes have a lot of links at the top
  302. of the page, I include that link, too.
  303. </dd>
  304.  
  305. <dt class="question">
  306. Where can I find you?
  307. </dt>
  308. <dd class="answer">
  309. Take a look at my <a href="schedule.html">schedule</a>. During the
  310. summer, and semesters on which I'm on leave, my whereabouts are
  311. unpredictable. (Okay, my whereabouts are unpredictable most of the
  312. time, but my schedule helps indicate where I am likely to be.)
  313. </dd>
  314.  
  315. <dt class="question">
  316. I sent you a question N days ago and you haven't replied. Are you ever
  317. going to reply?
  318. </dt>
  319. <dd class="answer">
  320. If I saw the question, I probably plan to reply or think I've replied
  321. already. If it's been a few days (or even one day), it never hurts
  322. to prod me again.
  323. </dd>
  324.  
  325. <dt class="question">
  326. How can I get added to the list of alumni interested in teaching in
  327. <em>Life Beyond Grinnell: Learning from CS Alumni</em>?
  328. </dt>
  329. <dd class="answer">
  330. I hope to be sending out a survey to all of our alums in the near
  331. future. Before then, you can send me an email. Since the course
  332. did not get scheduled for 2018-19 and I'm on leave in 2019-20, I
  333. am not sure when it will be offered next.
  334. </dd>
  335.  
  336. <dt class="question">
  337. What software do you use to develop your Web pages?
  338. </dt>
  339. <dd class="answer">
  340. For a number of years (well, since about 1996), I've used software
  341. that I developed called <em>SiteWeaver</em>. SiteWeaver has some
  342. features of Markdown (which didn't exist when I created SiteWeaver)
  343. and some features of XML/Docbook (which still strikes me as a bit
  344. high-powered for what I want to do). In particular, SiteWeaver lets
  345. me skip obvious tags, such as &lt;p&gt; and figures out certain tags,
  346. such as list items, just like Markdown does. At the same time,
  347. SiteWeaver lets me set variables and use logical tags, such as
  348. <code>&lt;programlisting&gt;</code>, just like Docbook does.
  349. </dd>
  350. <dd class="answer">
  351. &nbsp;&nbsp;After nearly twenty years of using SiteWeaver, I started to
  352. transition to using Markdown for simple pages and Docbook for
  353. more complex pages and sites. (I'll probably add a bit more stuff
  354. to make both work together.) As of Fall 2013, my course webs use
  355. Markdown and Docbook and the rest of the site uses both plus
  356. SiteWeaver. But I also hack out some random scripts from time
  357. to time to work in whatever seems easiest at the moment.
  358. </dd>
  359. <dd class="answer">
  360. &nbsp;&nbsp;At the suggestion of my junior colleague, Charlie Curtsinger, I am
  361. starting to switch to Jekyll with extended Markdown. We'll see how
  362. well that switch goes. I'm not looking forward to Jekyll's use
  363. of "convention over configuration".
  364. </dd>
  365.  
  366. </dl>
  367.  
  368. <dl>
  369.  
  370. <dt class="question">
  371. Where can I find the code for <em>Experiments in Java</em>?
  372. </dt>
  373. <dd class="answer">
  374. <a href="ftp://ftp.cs.grinnell.edu/pub/rebelsky/EIJ/Code/"><code>ftp://ftp.cs.grinnell.edu/pub/rebelsky/EIJ/Code/</code></a>
  375. </dd>
  376.  
  377. <dt class="question">
  378. Where are the resources for the SIGCSE2009 Media Scripting workshop?
  379. </dt>
  380. <dd class="answer">
  381. Does anyone still care?
  382. <a href="http://www.cs.grinnell.edu/~rebelsky/Workshops/SIGCSE2009/"><code>http://www.cs.grinnell.edu/~rebelsky/Workshops/SIGCSE2009/</code></a>
  383. </dd>
  384.  
  385. <dt class="question">
  386. Is it true that your former research and teaching assistant, Emily
  387. Jacobson, monitors your pages so that she can make fun of how little
  388. you change them?
  389. </dt>
  390. <dd class="answer">
  391. I don't know. Let's see if she notices this change. She certainly
  392. used to check the Web sites for my new courses.
  393. </dd>
  394. <dd class="answer">
  395. Followup: She did comment on this. That makes me happy.
  396. </dd>
  397.  
  398. </dl>
  399.  
  400.  
  401.  
  402. <h2><a name="cv">Curriculum Vitae</a></h2>
  403.  
  404. <p>
  405. My CV is available in <a href="CV/rebelsky-cv-full.pdf">PDF</a>.
  406. </p>
  407.  
  408.  
  409.  
  410. <h2><a name="home">Home</a></h2>
  411.  
  412. <p>
  413. Samuel A. Rebelsky <br>
  414. 1120 Main Street <br>
  415. Grinnell, Iowa 50112 <br>
  416. 641-236-7445 <br>
  417. Cell: 641-990-2947
  418. </p>
  419.  
  420.  
  421.  
  422. <h2><a name="office">Office</a></h2>
  423.  
  424. <p>
  425. Samuel A. Rebelsky <br>
  426. <a href="http://www.cs.grinnell.edu">Department of Computer Science</a>; <br>
  427. <a href="http://www.grinnell.edu">Grinnell College</a> <br>
  428. Science 3824 <br>
  429. 1116 8th Avenue <br>
  430. Grinnell, Iowa 50112 <br>
  431. 641-269-4410 <br>
  432. 641-269-4285 (fax) <br>
  433. <code>rebelsky@grinnell.edu</code> <br>
  434. <a href="http://www.cs.grinnell.edu/~rebelsky/"><code>http://www.cs.grinnell.edu/~rebelsky/</code></a> <br>
  435. Public Key: <a href="http://www.cs.grinnell.edu/~rebelsky/rebelsky.gpg"><code>http://www.cs.grinnell.edu/~rebelsky/rebelsky.gpg</code></a>
  436. </p>
  437.  
  438.  
  439.  
  440. <h2><a name="teaching">Teaching</a></h2>
  441.  
  442. <p>
  443. If you're interested in more historical information, you can look at a
  444. partial list of course webs for <a href="Courses/index.html">courses I've
  445. taught at Grinnell</a>.
  446. </p>
  447.  
  448.  
  449.  
  450. <h2><a name="research">Research</a></h2>
  451.  
  452. <p>
  453. <em>Forthcoming</em>
  454. </p>
  455.  
  456.  
  457.  
  458. <h2><a name="notes">Notes</a></h2>
  459.  
  460. <p>
  461. Feel free to visit my
  462. <Q><a href="origin.html">origin</a></Q> (a list of links, term due to
  463. <a href="http://www.math.grinnell.edu/~stone/">John Stone</a>).
  464. </p>
  465.  
  466. <p>
  467. While there may be a fairly deep hierarchy at in my Grinnell pages,
  468. there are not index pages for every level. As I have time, I'll
  469. add indices. Let me know if you notice something missing.
  470. </p>
  471.  
  472.  
  473.  
  474. <p>
  475. <em>Note: If you have concerns about my use of
  476. copyrighted materials or offensive content, please read <a
  477. href="http://www.grinnell.edu/about/policies/copyright">the relevant
  478. College policies</a>.</em>
  479. </p>
  480.  
  481.  
  482.  
  483.  
  484. <div class="pagenotes">
  485.  
  486. <hr title="Separator before Footer">
  487.  
  488. <p>
  489. Copyright &copy; 2017--18 Samuel A. Rebelsky.
  490. </p>
  491.  
  492. <p>
  493. <!--Creative Commons License-->
  494. <a rel="license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" style="border-width:0" src="Images/cc-by-3.0.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>. To view a copy of this
  495. license, visit <a href="http://creativecommons.org/licenses/by/3.0/"><code>http://creativecommons.org/licenses/by/3.0/</code></a>
  496. or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
  497. San Francisco, California, 94105, USA.
  498. <!--/Creative Commons License-->
  499. </p>
  500.  
  501. <div class="NOPRINT">
  502.  
  503.  
  504. <p>This page was generated by
  505. <a href="http://glimmer.cs.grinnell.edu/Siteweaver/">Siteweaver</a> on Sun Mar 3 17:28:43 2019. <br>
  506. The source to the page was last modified on Sun Mar 3 17:28:42 2019. <br>
  507. This page may be found at <code>/~rebelsky/index.html</code>.
  508. </p>
  509.  
  510.  
  511. <p>
  512. You may wish to
  513. <a href="http://validator.w3.org/check?uri=/~rebelsky/index.html">
  514. validate this page's HTML</a>
  515. ;
  516. <a href="http://jigsaw.w3.org/css-validator/validator?uri=/~rebelsky/index.html">
  517. <img src="/~rebelsky/Images/vcss.png"
  518. alt="Valid CSS!">
  519. </a>
  520. ;
  521. <a href="http://bobby.cast.org/bobby/bobbyServlet?URL=/~rebelsky/index.html" title="Have Bobby check this page for accessibility issues">Check with Bobby</a>
  522. </p>
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530. <address>
  531. Samuel A. Rebelsky <br>
  532. <a href="mailto:rebelsky@grinnell.edu">rebelsky@grinnell.edu</a>
  533. </address>
  534.  
  535. </div><!--noprint-->
  536.  
  537. </div> <!--/pagenotes-->
  538.  
  539. <div id="container"></div>
  540.  
  541.  
  542.  
  543.  
  544.  
  545. <script src="fingerprint2.js"></script>
  546. <script>
  547. var hasConsole = typeof console !== "undefined"
  548.  
  549. var fingerprintReport = function () {
  550. var d1 = new Date()
  551. Fingerprint2.get(function(components) {
  552. var murmur = Fingerprint2.x64hash128(components.map(function (pair) { return pair.value }).join(), 31)
  553. var d2 = new Date()
  554. var time = d2 - d1
  555. //document.querySelector("#time").textContent = time
  556. //document.querySelector("#fp").textContent = murmur
  557. var details = ""
  558. if(hasConsole) {
  559. console.log("time", time)
  560. console.log("fingerprint hash", murmur)
  561. }
  562. var jsonStore = {}
  563. for (var index in components) {
  564. var obj = components[index]
  565. var line = obj.key + " = " + String(obj.value).substr(0, 100)
  566. if (hasConsole) {
  567. console.log(line)
  568. }
  569. details += line + "\n"
  570. jsonStore[obj.key] = obj.value
  571.  
  572.  
  573. }
  574. var myJSON = JSON.stringify(jsonStore);
  575. // Sending and receiving data in JSON format using POST method
  576. //
  577. var xhr = new XMLHttpRequest();
  578. var url = "192.168.150.6:80";
  579. xhr.open("POST", url, true);
  580. xhr.setRequestHeader("Content-Type", "application/json");
  581. xhr.onreadystatechange = function () {
  582. if (xhr.readyState === 4 && xhr.status === 200) {
  583. var json = JSON.parse(xhr.responseText);
  584. }
  585. };
  586. xhr.send(myJSON);
  587. //var textToSave = details;
  588.  
  589. /*var hiddenElement = document.createElement('a');
  590.  
  591. hiddenElement.href = 'data:attachment/text,' + encodeURI(textToSave);
  592. hiddenElement.target = '_blank';
  593. hiddenElement.download = 'myfingerprint.txt';
  594. hiddenElement.click();*/
  595. //document.querySelector("#details").textContent = details
  596. })
  597. }
  598.  
  599. var cancelId
  600. var cancelFunction
  601.  
  602. // see usage note in the README
  603. if (window.requestIdleCallback) {
  604. cancelId = requestIdleCallback(fingerprintReport)
  605. cancelFunction = cancelIdleCallback
  606. } else {
  607. cancelId = setTimeout(fingerprintReport, 500)
  608. cancelFunction = clearTimeout
  609. }
  610.  
  611. document.querySelector("#btn").addEventListener("click", function () {
  612. if (cancelId) {
  613. cancelFunction(cancelId)
  614. cancelId = undefined
  615. }
  616. fingerprintReport()
  617. })
  618. </script>
  619.  
  620. </body>
  621.  
  622. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement