20 March, 2020

DISM online health check

DISM. Chkdsk. SFC. In my work of maintaining computers, I would sometimes come across computers, mostly laptops, that seem to have their Windows not behaving right, or that their Windows Update utility don’t get things right.

I would usually try many times, check a few more things here and there, and one of the checks I do, or the utilities I run, aside from chkdsk and sfc is DISM.

I will dive right in.

DISM has 3 options, which I run in sequence:
1. CheckHealth
2. ScanHealth
3. RestoreHealth

Cmd Window

By the way, the DISM commands are run via the cmd window, or the command prompt, that small text-based normally black background window that is invoked by pressing the Windows key, then typing cmd right away, and it shows in the search bar, which you open with a combination of CTRL + SHIFT + ENTER keys so it opens in elevated mode, having Administrator privilege.

The other way is by clicking on Start, looking for Command Prompt, doing a right-click on your mouse, then selecting Run as administrator. If you don’t see it, then you search for it, then do the right-click thingy, then choose Run as administrator. That is why I save myself the trouble by going the first method of pressing the Windows key, typing cmd, then doing a CTRL-SHIFT-ENTER.

Let’s proceed with DISM commands now.

CheckHealth

The command is DISM /Online /Cleanup-Image /CheckHealth. Type it at the command prompt then press Enter.

You will be notified if there is any data corruption that the utility finds. You then proceed to the next steps.

ScanHealth

At the command prompt, you type DISM /Online /Cleanup-Image /ScanHealth and press Enter. The check runs for a short while in most cases, showing the image version and the progress of the check being done. Once done, you will be notified of corruptions, if any, that the utility finds.

RestoreHealth

Finally, you do a DISM /Online /Cleanup-Image /RestoreHealth, and this is what will attempt to fix any errors that CheckHealth and ScanHealth may have found.

Type DISM /Online /Cleanup-Image /RestoreHealth at the command prompt, press Enter, and you will see the image version and the counter indicating the progress of the operation, and when it finishes, the fixes done, if any.

It doesn’t get much harder than that, supposedly.

DISM. Chkdsk. SFC. These are simple but helpful Windows utilities that I use every now and then, and they help a lot. Hope you find them useful, too!

Till then.


For more info, you can look here:
How to use DISM command tool to repair Windows 10 image

16 March, 2020

Ultimate Power Plan in Windows 10


Windows 10 Ultimate Power Plan.

I came across a few articles in the web about this new feature when Windows Update 1909 was released. I became curious, as I continue to explore new ways to speed up laptop and desktop performance, even after a massive upgrade to SSD was carried out in the company where I work in.

And it was easy.

Just open up a command prompt with Administrative privilege, or what others would call an elevated user privilege, and type in below, and hit enter.

powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61

If you have Control Panel opened up at Power Options, you need to close it first.

When you open up Power Options after this, you would see Ultimate Performance as a new option in the list of power plans. So if Power Options was open when this command is executed, close it, then open it again. That's when you will see it.

Right after the plan was selected, my laptop's screen brightness was set to maximum. I have to quickly turn it down.

Adjust and tweak to your liking, and you are set to experience the Ultimate Performance power plan.

Till then!

13 March, 2020

How To Get The Value of Textarea Using jQuery, Javascript, Set Maxlength, Width, Height

Textarea Get Value using jQuery or Javascript, Set Char Limit, Set Width and Height


Last week I needed to use a textarea instead of a textbox, or an input control. Very simple indeed to change the html control type, then the problem of capturing the value arose.

Thankfully, there are many forums or articles in the web that addresses exactly this question.

As an aside, we include the setting of width and height, and the maximum number of chars typed in.

Say for example, you have this basic definition:

"<"textarea id="usercomment" name="usercomment" rows="15" cols="100" wrap="soft" maxlength="200" style="overflow: hidden; resize: none; font-family: 'Segoe UI'">""<"/textarea">"

N.B.: Make sure you use id tag, and not just name tag. If you forget the id tag, and you don't get the value, check your definition again. There must be the id tag. And do take note that the double-quote chars  enclosing the opening and closing tags "<" and ">" should not be there at all.

This will create a textarea in your page that is 15px x 100px, and it will accept only until up to 200 chars. Continue typing and it will stop accepting input. If you test the limit by copying and pasting a char set more than 200, only up until the 200th char is shown. Want to test it, go ahead by all means!

Now, to get the value, I basically use jQuery. Here's how it is done:

var userinput = $("#usercomment").val();

If you want to trim the input, this is how it's done:

var userinput = $.trim($("#usercomment").val());

Sometimes you will see examples like this; they also work:

var userinput = $.trim($("textarea#usercomment").val());

Or sometimes, when the rows are created dynamically, as when the rows are created from a dB result set:

var userinput = $('#usercomment').val(); 
/* single quote instead of double quote */

Sometimes you will see some examples or answers in forums, as below:

var userinput = $("#usercomment").value();
/* this will be undefined */

var userinput = $("#usercomment").text();
/* this will give you a '' (empty) value */

Sometimes, the width and height is defined in the css style section this way:

textarea {  width: 200px;  height: 15px;}

This will be most useful when you have many textarea controls in your page.

Now, to get the value using plain vanilla javascript, it is done this way:

var userinput = document.getElementById("usercomment").value;

So there you have it! Now you know:

Textarea Get Value using jQuery or Javascript, Set Char Limit, Set Width and Height

Hopefully this short explanation is of use to you today.


Till then!

09 March, 2020

Why contactless payment is safer than swiping credit cards when you're travelling

Thanks to “contactless” payment systems, there’s a revolutionary change going on in how credit cards are used. And the technology is a huge improvement for overseas travellers. But what is contactless technology and why is it good for travel? Read on.

KEEP THAT WALLET HIDDEN, OR BETTER YET, IN YOUR ROOM SAFE

Instead of swiping your credit card or inserting its chip to complete the payment process, contactless technology lets you make a purchase by placing or hovering your card or phone near a payment terminal, aka the credit card machine.

Some recently issued credit cards also have the same contactless ability found in your mobile phone's digital wallet.

While some recently issued credit cards have this ability built in, the real improvement, particularly while travelling, is using contactless payments on your mobile phone. A digital wallet like Apple Pay, Google Pay or Samsung Pay securely stores your credit card details, and to purchase something, you merely unlock your phone and tap it to the pay terminal. Often getting your phone close is enough: In most cases, you don’t even need to open an app.

Most Apple and Android phones from the last few years have the ability to make contactless payments. Smartwatches and many new fitness trackers can also be used. Your credit cards will function exactly as they would normally; the digital wallet is merely card storage and a facilitator of payments. (And using a digital wallet is free.)

IN THE STORE

Ask the seller if they take contactless or look on the terminal for the contactless symbol, which appears like a sideways Wi-Fi logo, sometimes with a hand holding a card next to it. Once you start looking for this logo, you’ll see it just about everywhere.

Visa estimates that 50 per cent of its in-person credit card sales outside the US are now contactless, while Mastercard says 25 per cent worldwide. Both companies say those numbers are increasing each year.

The technology is not reliant on a specific brand of phone or type of mobile wallet app. For example, if it has the contactless logo and the Apple Pay logo, your Android phone with Google Pay should work fine.

Conveniently, many airline and other tickets can be stored in the digital wallet, too. Some metro systems, like London’s Underground, also accept payment this way.

WHY BOTHER?

Not only is contactless easier, it’s actually safer. Your credit cards are encrypted and hidden behind your phone’s lock screen. This makes it nearly impossible for a nefarious shopkeeper to copy your credit card number. Your name and three-digit security code are not transmitted, nor even seen, so even in the unlikely event they get your number, they can’t make online purchases.

If you get a new credit card with the contactless ability built in, this is still more secure than the magnetic swipe. Visa says more than 100 million of these cards have already been issued in the United States and estimates there will be 300 million by the end of 2020.

If you don’t have cellular data when you travel, contactless should still work – the technology only requires the connection between your phone and the payment terminal. You just won’t get purchase notifications in the app until you log into Wi-Fi. If your phone gets stolen, logging into your account from a secure place will let you deactivate any cards in your digital wallet.

Visa, Mastercard and most big compatible banks like Chase, Bank of America and Citibank offer more details about contactless payments. Check your bank or card issuer to be sure, then give it a try at a local store before your next trip. You might end up using contactless when you’re not traveling, too.

THE KEY WORD: 'SHOULD'

You should be able to use your phone or card anywhere you see the contactless payment logo. Annoyingly, even if you’re in a country with widespread contactless adoption and are standing over a payment terminal with the logo … it still might not work. During four months of travel last year across Asia and Europe, this happened to me a few times. But thankfully, getting out and inserting or swiping the card, then signing the receipt, did the trick. This felt surprisingly archaic after months of the seeming magic of contactless. Depending on the country and the amount of your purchase, you might still need to do this, but not usually.

By Geoffrey Morrison © The New York Times


Taken from this article:
https://cnalifestyle.channelnewsasia.com/travel/why-contactless-payment-is-safer-than-swiping-credit-cards-12418914

05 March, 2020

Panicking about your kids and their phones? New research says you don’t have to

Panicking about your kids and their phones? New research says you don’t have to

It has become common wisdom that too much time spent on smartphones and social media is responsible for a recent spike in anxiety, depression and other mental health problems, especially among teenagers.

But a growing number of academic researchers have produced studies that suggest the common wisdom is wrong.

The latest research, published Friday (Jan 17) by two psychology professors, combs through about 40 studies that have examined the link between social media use and both depression and anxiety among adolescents. That link, according to the professors, is small and inconsistent.

“There doesn’t seem to be an evidence base that would explain the level of panic and consternation around these issues,” said Candice L Odgers, a professor at the University of California, Irvine, and the lead author of the paper, which was published in the Journal of Child Psychology and Psychiatry.

DO PHONES POSE A SIGNIFICANT RISK TO MENTAL HEALTH?

The debate over the harm we – and especially our children – are doing to ourselves by staring into phones is generally predicated on the assumption that the machines we carry in our pockets pose a significant risk to our mental health.

Worries about smartphones have led the US Congress to pass legislation to examine the impact of heavy smartphone use and pushed investors to pressure big tech companies to change the way they approach young customers.

The World Health Organization said last year that infants under a year old should not be exposed to electronic screens and that children between the ages of two and four should not have more than an hour of “sedentary screen time” each day.

Even in Silicon Valley, technology executives have made a point of keeping the devices and the software they develop away from their own children.

But some researchers question whether those fears are justified. They are not arguing that intensive use of phones does not matter. Children who are on their phones too much can miss out on other valuable activities, like exercise. And research has shown that excessive phone use can exacerbate the problems of certain vulnerable groups, like children with mental health issues.

They are, however, challenging the widespread belief that screens are responsible for broad societal problems like the rising rates of anxiety and sleep deprivation among teenagers. In most cases, they say, the phone is just a mirror that reveals the problems a child would have even without the phone.

The researchers worry that the focus on keeping children away from screens is making it hard to have more productive conversations about topics like how to make phones more useful for low-income people, who tend to use them more, or how to protect the privacy of teenagers who share their lives online.

“Many of the people who are terrifying kids about screens, they have hit a vein of attention from society and they are going to ride that. But that is super bad for society,” said Andrew Przybylski, director of research at the Oxford Internet Institute, who has published several studies on the topic.

'A LOT OF HYPE AND A LOT OF FEAR'

The new article by Odgers and Michaeline R Jensen, of the University of North Carolina at Greensboro, comes just a few weeks after the publication of an analysis by Amy Orben, a researcher at the University of Cambridge, and shortly before the planned publication of similar work from Jeff Hancock, the founder of the Stanford Social Media Lab. Both reached similar conclusions.

“The current dominant discourse around phones and well-being is a lot of hype and a lot of fear,” Hancock said. “But if you compare the effects of your phone to eating properly or sleeping or smoking, it’s not even close.”

Hancock’s analysis of about 226 studies on the well-being of phone users concluded that “when you look at all these different kinds of well-being, the net effect size is essentially zero.”

The debate about screen time and mental health goes back to the early days of the iPhone.

The debate about screen time and mental health goes back to the early days of the iPhone. In 2011, the American Academy of Pediatrics published a widely cited paper that warned doctors about “Facebook depression.”

But by 2016, as more research came out, the academy revised that statement, deleting any mention of Facebook depression and emphasising the conflicting evidence and the potential positive benefits of using social media.

Megan Moreno, one of the lead authors of the revised statement, said the original statement had been a problem “because it created panic without a strong basis of evidence.”

Moreno, a professor of paediatrics at the University of Wisconsin, said that in her own medical practice, she tends to be struck by the number of children with mental health problems who are helped by social media because of the resources and connections it provides.

Concern about the connection between smartphones and mental health has also been fed by high-profile works like a 2017 article in The Atlantic – and a related book – by psychologist Jean Twenge, who argued that a recent rise in suicide and depression among teenagers was linked to the arrival of smartphones.

CORRELATION, NOT CAUSATION

In her article, “Have Smartphones Ruined a Generation?,” Twenge attributed the sudden rise in reports of anxiety, depression and suicide from teens after 2012 to the spread of smartphones and social media.

Twenge’s critics argue that her work found a correlation between the appearance of smartphones and a real rise in reports of mental health issues, but that it did not establish that phones were the cause.

It could, researchers argue, just as easily be that the rise in depression led teenagers to excessive phone use at a time when there were many other potential explanations for depression and anxiety. What’s more, anxiety and suicide rates appear not to have risen in large parts of Europe, where phones have also become more prevalent.

“Why else might American kids be anxious other than telephones?” Hancock said. “How about climate change? How about income inequality? How about more student debt? There are so many big giant structural issues that have a huge impact on us but are invisible and that we aren’t looking at.”

Twenge remains committed to her position, and she points to several more recent studies by other academics who have found a specific link between social media use and poor mental health. One paper found that when a group of college students gave up social media for three weeks, their sense of loneliness and depression declined.

Odgers, Hancock and Przybylski said they had not taken any funding from the tech industry, and all have been outspoken critics of the industry on issues other than mental health, such as privacy and the companies’ lack of transparency.

Odgers added that she was not surprised that people had a hard time accepting her findings. Her own mother questioned her research after one of her grandsons stopped talking to her during the long drives she used to enjoy. But children tuning out their elders when they become teenagers is hardly a new trend, she said.

She also reminded her mother that their conversation was taking place during a video chat with Odgers’ son – the kind of intergenerational connection that was impossible before smartphones.

Odgers acknowledged that she was reluctant to give her two children more time on their iPads. But she recently tried playing the video game Fortnite with her son and found it an unexpectedly positive experience.

“It’s hard work because it’s not the environment we were raised in,” she said. “It can be a little scary at times. I have those moments, too.”

By Nathaniel Popper © 2020 The New York Times



Taken from this article:
https://cnalifestyle.channelnewsasia.com/wellness/new-research-phone-usage-mental-health-12308294