Showing posts with label computers. Show all posts
Showing posts with label computers. Show all posts

Friday, June 5, 2020

Best introductory video about Arduino I have ever seen by far


Arduino is not a microcontroller, it is a microcontroller built onto a single printed circuit board.

Wednesday, July 17, 2019

How to remove cheating Ebay listings with price range


Right-click on Ebay listing's prive range, select: Inspect Element -> Select Console window.
Delete all warnings and type or Paste this text:
$('.DEFAULT').parent().parent().parent().parent().parent().parent().remove();
Press Enter and enjoy.

To enable "pasting" into Console window:
In Firefox, address field type: "about:config" -> Search field: devtools.selfxss.count -> value -> 100.

More info here:
https://webapps.stackexchange.com/questions/73586/how-to-filter-deceptive-bait-switch-price-listings-on-ebay-when-sorted-by-pr

Wednesday, August 17, 2016

How to properly plot graphs in websites

D3 (Data-Driven Documents or D3.js) is a JavaScript library for visualizing data using web standards. D3 helps you bring data to life using SVG, Canvas and HTML

or use this simplified approach:
http://nvd3.org/index.html
This project is an attempt to build re-usable charts and chart components for d3.js without taking away the power that d3.js gives you.

List of free programming books and websites

Functional programming vs Object Oriented Programming


Below is an example of an awesomely simple and clear comparison of FP vs OOP.

You run a company and you just decided to give all your employees a $10,000.00 raise. How would you tackle this situation programmatically?

In OOP:
  1. Create Employee class which initializes with name and salary, has a change salary instance method
  2. Create instances of employees
  3. Use the each method to change salary attribute of employees by +10,000
In FP:
  1. Create employees array, which is an array of arrays with name and corresponding salary
  2. Create a change_salary function which returns a copy of a single employee with the salary field updated
  3. Create a change_salaries function which maps through the employee array and delegates the calculation of the new salary to change_salary
  4. Use both methods to create a new dataset, named ‘happier employees’
We can see that the FP approach uses pure functions and adheres to immutability. Note the use of map instead of each, where map returns a new altered dataset while each alters the attributes/state of the objects.


Functional programming
1.    All of your functions must accept at least one argument.
2.    All of your functions must return data or another function.
3.    No loops!


Functional Programming also means that when you have "code that only does something, not return a value," then you're writing something that isn't purely functional.

If (x > 3) n = 3; else n = x;
Instead of doing that, you use the return statement from the if command:
let n = (if x > 3 then 3 else x)
This hypothetical if is suddenly functional because it has no side effects; it only returns a value.




Some further reading:

http://www.ibm.com/developerworks/library/l-prog/

Tuesday, December 16, 2014

Tools for pre-downloading webpages for offline reading

What is the convenient way to read webpages offline? Simply saving the webpage as PDF is not good enough because often there is a need to follow a link for more information from the main webpage. So, here is a list tools that can be used to pre-download webpages for reading them offline.
http://scraping.pro/what-is-web-scraping/

1. Wget, can be easily automated customized. Here's the wget's man page.
2. Pocket, Instapaper, Readability. They have been compared in online reviews: 1, 2, 3.
3. HTTrack is a tool that can grab a webpage and the links in that page.

Sunday, December 14, 2014

Powering electronics from phone's audio jack


Alternatively to power an external device from micro USB port, it is possible to use audio interface. Read more in this paper.

Tuesday, December 17, 2013

Nice non-install program to check file integrity


When working with computers every now and then I need to check the integrity of downloaded files. This is to make sure that the downloaded file has not been changed or modified, contains no viruses or spyware. Every reliable and self respecting software developer should publish a checksum together with the downloadable file on their websites. A typically checksum might look like something this: L9ThxnotKPzthJ7hu3bnORuT6xI.

http://www.123rf.com/photo_14079093_virus-file-vektor-illustration.htmlDo check the file integrity there is a simple program made by Microsoft, called "Microsoft File Checksum Integrity Verifier". It is a no-install program which runs in command prompt. So, download it, extract to a convenient location (I just use disk D:) and put the file which intergrity you wann check at the same location. Then run the command from cmd:

fciv.exe -sha1 WhateverIsYourFilename.exe.

In this example SHA1 checksum algorithm is used,but there are many other hash functions such as MD5 etc.


Thursday, November 28, 2013

Bitcoin - true vs apparent value


There are plenty of opinions online about the present “value” of Bitcoin in terms of exchange rate to US dollar or to any other currency. What interests me is the “true intrinsic value” of Bitcoin, because I believe that this value will determine the future of Bitcoin in the long run. But what do I mean by that “intrinsic true value”?
http://y--e--s.deviantart.com/art/Clear-Bitcoin-370709022
Through history, human society have developed various tools to exchange goods and services. It all started with Barter exchange but later various mediums of exchange were developed. Chronology of these tools was: Commodity money, Representative money, Fiat money and now cryptocurrency.

Each of these types of money is a tool that has its own true intrinsic value. Barter trade has a value in the goods that are being exchanged. Commodity money have a value in that commodity itself.  Representative money have a value stored in the goods for which the representative money are issued. Fiat currency has a value reflected by the reputation of the country.

For instance, commodities like a hammer or knife have a value in itself. Paper note has a value in the guarantee that the pledged goods such as crops can be returned on demand. Gold coins have a value in gold because of everlasting demand by someone due to its applications in accessories and decorations to represent social status. Fiat money have a value in the government which issued it. Government provides guarantees, necessary centralized control, enforces law, facilitates economic growth.

That true value of money guarantees a demand even in situations when money would not act a medium of exchange for goods and services anymore. In other words, no matter what is market situation, that tool would still be needed by someone. Essentially, owning either of these tools would give a person the possession of a true value.

But what value the cryptocurrency provides? Presently a little, I believe: time-stamping, document certification; decentralized DNS, novel useful methods of contracting. Is that enough to create a significant true intrinsic value to make Bitcoin very successful or very valuable in terms of exchange rates in the future?

I truly would like to believe in the big future for cryptocurrencies. The proof-of-work concept is very powerful, but yet unexplored, it seems to me. Just as a gold coin's value is thought to be underpinned by the value of the raw gold needed to make it, the value of an cryptocoin could be guaranteed by the value of the real-world computer resources required by someone owning the cryptocoin. This would create a true intrinsic value of cryptocurrency and would ensure its successful future in the long run.

Unfortunately, presently I do not see such a demand arising for private people, but for research organizations this is a daily need. This somehow reminds me about the story how the internet has started :)