XSLT Basics For Transforming One Specific XML Structure To Another XML Structure

I was messing around with R (i.e., a free program that can organize and transform data), and I told R to transform the data into CSV format.  I converted this CSV format file into XML file using one of those CSV to XML free tools on the Internet.  The problem is that the XML file I got from the whole process contains structure in which is radically different from the XML structure that I need to use with a software.  Luckily, XSLT comes to the rescue.  With XSLT, I discover that it’s possible to transform one XML structure to another XML structure.  The problem is that I have no knowledge of how to use XSLT just yet.  Once again, YouTube is a treasure trove of free information, and the YouTube video right after the break introduces me to XSLT basics.  Of course, I may have to do more study and research on XSLT before I would know how to properly transform one XML structure to another XML structure.

Advertisements

Vidxr, New To Go Place For Music Videos

I’m just releasing Vidxr.com, and this will be the to go personal music video playlist weblog for me.  Of course, while adding more awesome music videos to Vidxr, I hope you can check Vidxr out for some enjoyable music video time.

We’re living in a digital age where most things can be shared digitally.  Vidxr is made possible by content sharing features provided by various online services such as YouTube.  Thanks to these web services, I’m able to form Vidxr.

As time goes on, I hope that I will be able to make Vidxr a very likable music video weblog.  If you like what you’re seeing with Vidxr, please let everyone knows about it.  Thank you very much!

How Real Is Cyber Threat?

Technology is like anything else that can be used for good or for evil purposes.  Many things have dual purposes or even more than just dual purposes, and technology is no exception to this fact.  Perhaps, there is an exception to the rule, but my small brain cannot think up one for the moment.  Anyhow, there are forces in the world that are trying to use technology for evil purposes.  For an example, from nuclear to cyber threats.  Nuclear threat has existed for many decades already, and by now most people know what MAD means.  In this blog post I’m not going to bother with voicing my opinion on nuclear threat.  Instead, I’m going to focus on voicing my opinion on cyber threat.

Lately, we have seen big powers like USA and China accuse each other of cyber warfare.  It’s obvious that it’s hard to know who is doing what in term of hacking one another in the cyberspace.  Nonetheless, I think I know why cyber threat is a growing concern.

On the surface, before we unravel all the layers of onion, we truly cannot see why there are fusses about cyber security.  For some people, they think that cyber threat can be dealt with best cyber security practices and no more than that.  Of course, it’s true that cyber security measures such as installing well known antivirus software and firewall are definitely going to help counter most cyber vulnerabilities.  Nonetheless, there are other cyber vulnerabilities out there that won’t be eliminated by even the most powerful firewall and antivirus programs.  Why?  I think there are some well kept or new cyber vulnerabilities that have not been dealt with, because these cyber vulnerabilities are well kept secrets or too new.  By using these cyber vulnerabilities and better hacking tools, hackers are able to wreck havocs on the cyber networks of the world.

When we peel more layers of the onion off, we can see that cyber security is very important.  How come?  In my opinion, it’s about a digital future where money mainly get create in digital form.  This is the future trend that our present (the world) is heading for.  Of course, if we just rely on cyber networks for communication and not for banking and monetization, then cyber security can only be boiled down to privacy and few other things but not of money matters.  Nonetheless, cyber networks as in the Internet can be used for electronic commerce, banking, and the whole nine yards.  This means cyber security is needing to be taken seriously, otherwise hackers can just waltz in and erase, steal, change, and do whatever else to the digital money that belong to various money matter institutions such as banking, electronic commerce giants, and whatnot.

I can imagine a scenario that a group of powerful hackers that is sponsored by a powerful organization hacks a cyber system of a country to a point that they erase all of the digital money from this country, leaving this country as a bankrupted nation.  Nonetheless, this country can totally create new digital money out of thin air if she wants to, but will this be ethically, legally, and sensibly?  Can such an incident be covered up easily?  After all, we’re living in a globalized world, and transactions are having been done globally all the time; something like this if to rain upon a country will not be easily covered up.

This is why I think cyber security issues are so important nowadays.  Without proper measures to protect cyber networks, the vulnerable Internet can gradually weaken the trust of digital money transactions, leaving countries and everyday people seek out the traditional means of doing transactions.  Perhaps, this is why we’re seeing the prevalence of traditional transactions today.  Cash is one good example of traditional transactions.

When I’m hearing how one country is having difficulty in protecting a state secret from being leaked out through the cyber networks, I think it’s absurd that such a country is connecting her secret networks to the Internet in the first place.  I think each country should keep her state secrets on an Intranet that won’t be connected to the regular Internet.  Furthermore, such a country needs to provide physical protections to her Intranet, because when hacking cannot be done remotely someone ought to waltz into such a network physically so the hacking can be done eventually.  For an example, stealing state secrets with the usage of a thumb drive (USB devices or similar devices).

In summary, I think the fusses about cyber security threat are real.  This is why we are hearing countries complain about being victims to hack attacks and whatnot.  Corporations are also experiencing cyber security issues, because corporate espionage can be done through cyber networks with ease.  Whenever an entity is connecting to the Internet and it doesn’t matter what type of entity that is, cyber security issues become real just like any other important issue that matters.  Of course, if there is a day that we do not rely on the Internet anymore and money transactions do not take place in the Internet, then cyber threat will not be a threat of anything but only a historical fact.

Personal Note:  The advance of encryption is also important, because encryption can be incorporated into various network tools to secure the Internet transactions.  With strong encryption, it’s harder for hackers to decrypt the Internet transactions into plain text, thus preventing important information from being leaked.

A Fiat Standard Hell May As Well Revive Gold And Silver As Unit Of Account

Not ever before that our world is so connected, because technology allows us all to trade and travel in seconds.  Just imagine this, before the Internet age, we were pretty fast, because we could travel the world in hours and very few days through flying on airplanes.  Nonetheless, age before the Internet is pretty slow comparing to now, because traveling around the world is no longer requiring us to be physically there.  Instead of just flying around the world, we can simply utilize the Internet to interact with various parts of the world in seconds.  Why traveling in the first place?  Sight seeings and trading and get to meet people and tasting different cultures and foods are probably on the todo list for many people, but the Internet allows us to do most of the stuffs I mentioned in seconds.  Of course, without physically traveling, we cannot use the Internet to have firsthand experience.  Nonetheless, with technology improves we might just as well be able to use virtual reality to somewhat attain the firsthand experience of physical traveling.  Trading is obviously done in seconds in the Internet age, and this has let the physical retail stores and what not to become almost obsoleted.  Fortunately, it’s that, nothing has yet to beat the firsthand experience of whatever, thus the physical retail stores might be able to retain the customers who prefer to have the physical feel and touch of things.  Too bad though, the trend is that many people rather go to physical stores for showroom experience, and then they go home to purchase the products they want on the Internet.

With being so connected as how we are now, it does seems that a small hiccup in the market would not be able to stir any storm and damage the wealths of many people.  Unfortunately, since we are so connected, a huge hiccup might churn out a firestorm that is huge enough to bring down the world market.  If this happens, the whole world will be in depression.  This almost happened in 2007-08, but China was holding up really good and stopped the whole world’s market from collapsing even more.  Nonetheless, I feel that, it is possible for a scenario such as a whole world’s market to really collapse and destroy all economies at once.  This is possible since we’re so connected and using only fiat currencies.  Never ever before in our human history that we have all countries using fiat currencies.  Some wise homo sapiens once said, the strongest link could also be the weakest link.  By being so connected, our economies could affect each other fast and furious, and so this would allow change to happen fast and furious.  When positive things are happening in the world market, this contributes as the strongest link.  The opposite could happen, and this would be the weakest link for the world market.  At the strongest link, positive effects would echo throughout the world at fast and furious speed.  At the weakest link, negative effects would also echo throughout the world at fast and furious speed.

Nowadays, we are using several main currencies that are known as reserve currencies.  The Dollar is the prominent of them all at this very point in time, but we never know how long can the Dollar hold this prominent reserve currency status.  If the world isn’t so connected, the multiple reserve currencies might be a panacea for world economic structural problems, because one economy can always spread foreign reserve wealth into multiple reserve currencies for diversifying.  Unfortunately, our world is so connected in a way that all reserve currencies’ hosts can be taken down, consequently rendering the reserve currencies themselves to be on the fringe of uselessness.  This has me thinking that perhaps gold and silver and other valuable metals are still very much the sort of wealth that us people may need to turn to if a perfect storm does hit the world market and bring down the world market in one fell swoop.

Just like fiat currency, gold and other valuable metals are backed by nothing.  Intrinsically though, gold is being used practically.  This means gold does have industrial applications.  Let me list a few gold’s industrial applications here.

  • Dentists can plant new gold teeth for patients.
  • Gold can be used to prevent rust and corrosion of important components within electronic devices.
  • In the medical field, gold can be used for various purposes such as treating patients with arthritis (gold salts reduce swelling, bone damage, joint pain, and stiffness).
  • Architects and builders can use gold to design beautiful structures.
  • Space devices can use gold to reflect radiation and cool temperature.

Besides gold’s few industrial applications, people like gold for its shininess and immune to rust qualities.  Before the well known use of gold in several modern industries, gold was being used as money since the early period of the entire human history.  Gold was minted into coins and so forth.  Since the dawn of human history, gold was used as money then was replaced by whatever and then it made a comeback, rinse and repeat kind of event really.  In our modern history, president Nixon of the United States abandoned the gold standard, thus he was effectively allowing the Dollar to not be redeemable by gold.  Since the Dollar was the most prominent (and still is at the moment) reserve currency in the world, Nixon’s gold standard abandonment was effectively put the world on fiat based standard, only.

With the knowledge of how humans tend to turn back to gold in hard time to hedge against paper currencies, it’s not too hard to see how people like us nowadays see gold might play the role of hedging against the possible collapsing of the fiat based standard.  Silver is considered to be a lesser quality metal than gold, but silver does have practical industrial applications too.  Nonetheless, I won’t elaborate on silver in this blog post.  With gold and silver and other valuable metals around, I think people and governments alike will use these metals in hard time as money.

To summarize everything up, what makes fiat currencies valuable is that people around the world see them as valuable.  Regardless fiat currencies are backed by anything, as long people of the world think fiat currencies are good enough as a unit of account, the fiat currencies can go on being the monies.  Unfortunately, people are usually illogical.  This is why if the so connected world market like ours stops functioning somehow, people aren’t going to wait around for the consensus that the fiat currencies will be OK.  Instead of waiting around, people may have a run on the fiat currencies and hoard golds and silvers.  This is when people will see golds and silvers as monies.  Perhaps, some people may argue that if the dollar collapses, the market will turn to IMF’s SDR (Special Drawing Right) or China’s Yuan as the reserve currency.  Since nobody knows the future, they maybe right, but I argue that none of those so called possible reserve currency replacements can hold water to gold and silver.  After all, gold and silver do have industrial application values and these metals have been used as unit of account over and over again in our past histories.  Moreover, I question the ability of IMF’s SDR or any other single fiat currency can be confident enough to rescue the fiat standard from hell.  By this I meant if the fiat standard does go to hell, by then it’s way too tough for any other fiat currency to be able to rescue the fiat standard system.  People may just as well turn to gold and silver as a change!

Sources:

Manage Multiple Cloud Services With Jolicloud Drive Google Chrome Extension

Do you use online cloud storage service?  Do you have multiple accounts with multiple cloud storage services?  Do you use Google Chrome browser?  If you say yes to all of these questions, then Jolicloud Drive Extension for Google Chrome can help you manage multiple online cloud storage services at once with ease.  In the video right after the break, I briefly introduce you to Jolicloud Drive Chrome Extension.  Enjoy!!!

Adding .htaccess File To QNAP’s /share/Web/ To Secure All Web Applications Within

Legal Disclaimer:  Following the tip within this blog post at your own risk.  You have been warned, thus you know that you are going to do something dangerous here to your web server or QNAP server.  With this knowledge of yours and by having reading this warning or skipping this clear warning, you cannot hold me for your stupidity or dangerous action against your very own QNAP server or web server or against anyone’s web server that you’re responsible for its administrative duties and procurements.

Are you running a web server on QNAP NAS?  NAS stands for Network Attached Storage server.  If you are for whatever purpose, whether this web server is for production purpose or testing purpose, you might want to know that .htaccess file can help secure QNAP’s web applications such as WordPress, Drupal, and the rest.  Here’s how to create proper .htaccess file that controls all web applications at once on your QNAP server.

  1. You need to change into directory of /share/Web by using this Linux command [cd /share/Web].  Of course, please do ignore the square brackets as these are only for clarifying the command line.
  2. Quickly do [ls -la] to figure out if you have an .htaccess file already.  If you do, please make a backup of this file in case you need this original file again for whatever purpose.  To make a backup of this .htaccess file that you already have had in the QNAP’s /share/Web directory, use this command [cp -p -a /share/Web/.htaccess /share/Web/.htaccess-old].
  3. Once you had followed the step #2 herein, then you can try to remove the original .htaccess file (Not the backup one you just made OK?) by using this command [rm -rf /share/Web/.htaccess].  Be very careful with [rm -rf] command line, because if you misspell a file or a directory you’re trying to remove, you will definitely lose such directory or file forever and won’t be able to recover it.
  4. Now let us create the .htaccess file again, but this time we’re creating it the way we like it.  Of course, .htaccess is a complex file, thus regular Joe like us needs not to worry about making this file too complex.  Instead, let a regular Joe like us to just create simple .htaccess file that denies all IP addresses but only allows a specific IP addresses.  This means, if you want to allow one or two specific IP addresses to access QNAP’s web applications, this .htaccess file should satisfy your command.  So here we go…
    1. Creating .htaccess file by using this command [touch /share/Web/.htaccess].
    2. Now, let’s edit the .htaccess file we just created by using this command [vim /share/Web/.htaccess].
    3. Let’s enter the lines below for our new .htaccess file shall we?  These lines must be in the order as follow…
      1. order deny,allow
      2. allow from 192.168.0.x (please use your very own IP address here)
      3. allow from 192.168.0.x (please use your very own IP address here)
      4. deny from all
    4. What we had done was adding 2 IP addresses to the allow list in .htaccess file so these 2 IP addresses will be able to interact/access the web applications that reside in QNAP’s /share/Web directory.  You can add more IP addresses or remove most IP addresses but allowing only one according to your desire by simply adding more [allow from…] or remove [allow from…] lines.  Of course all [allow from…] lines must be written or typed out above the line which said [deny from all] and below the line which said [order deny,allow].  Now, we must save our newly edited .htaccess file by doing this while you’re still in the vim editor.
      1. Hit escape key on the keyboard to exit the editing mode.
      2. Type in [:wq] and hit enter key on the keyboard.  Of course, please do ignore the square brackets as these are only for clarifying the command line.
  5. The last step is to secure our new .htaccess file by doing two things.
    1. First thing to secure is to make sure the owner and the group owner of the .htaccess file are indeed the right owner and group owner.  For me personally, I prefer to not use admin user and administrators group for any web application files and directories, because I don’t want the evil doers to be able to use one of these files with high privilege access to escalate the privilege and execute malicious commands.  This is why on my QNAP server I rather make most of my web applications’ files and directories in the name of user httpdusr and group owner everyone.  So let’s do this command to make this happens OK?  Type in [chown httpdusr:everyone /share/Web/.htaccess].  Afterward, just do [ls -la /share/Web/.htaccess] to see if .htaccess file indeed is using user httpdusr and group owner everyone.
    2. Second thing to secure is to make sure the .htaccess file has the right permission.  So we need to use this command [chmod 400 /share/Web/.htaccess].  What this command does is change the permission of .htaccess file in /share/Web directory to read only for user (owner of the .htaccess file) and no other permission is allowable for anyone else, hint the two zeros after #4.  These two zeros stand for no permission for group user (whoever has the group authorization of whichever group) and no permission for everyone else (this is the last 0 for).  Finally, you can do [ls -la /share/Web/.htaccess] to confirm that the permission for .htaccess file is indeed 400 or not.  If it’s so, it means only the QNAP web server user httpdusr will be able to read the file, but even this user cannot write to or execute whatever within this .htaccess file.

Now, with this .htaccess file configuration for your QNAP’s /share/Web directory, the web applications that are residing within this specific Web directory will not be accessible to anyone with any IP address unless somebody is using the IP address that is being allowed by this very .htaccess file.

Do you know that by following the tip herein, you can also use this very tip for non-QNAP web server?  Just create a similar .htaccess file within whatever web server’s directory to prevent snooping to most IP addresses and allow only the IP addresses that are being allowed within.