Data Stream F17.3

Page 1

FALL 2017.3 Communique of the Department of Computer and Information Sciences

Facebook is using AI to spot users with suicidal thoughts and send them help Facebook is using artificial intelligence to scan users’ posts for signs they’re having suicidal thoughts. When it finds someone that could be in danger, the company flags the post to human moderators who respond by sending the user resources on mental health, or, in more urgent cases, contacting first-responders who can try to find the individual.

for their family and friends, that's an important and positive step forward,” wrote Zuckerberg.

The social network has been testing the tool for months in the US, but is now rolling out the program to other countries. The tool won’t be active in any European Union nations, where data protection laws prevent companies from profiling users in this way. In a Facebook post, company CEO Mark Zuckerberg said he hoped the tool would remind people that AI is “helping save peoples’ lives today.” He added that in the last month alone, the software had helped Facebook flag cases to first responders more than 100 times. “If we can use AI to help people be there

WHAT’S INSIDE 5 Web Development Frameworks

2

Binary Search

3

Despite this emphasis on the power of AI, Facebook isn’t providing many details on how the tool actually judges who is in danger. The company says the program has been trained on posts and messages flagged by human users in the past, and looks for telltale signs, like comments asking users “are you ok?” or “can I help?” The technology also examines live streams, identifying parts of a video that have more than the usual number of comments, reactions, or user reports. It’s the human moderators that will do the crucial work of assessing each case the AI flags and responding. Although this human element should not be overlooked, research suggests AI can be a useful tool in identifying mental health problems. One recent study used machine learning to predict whether or not individuals would attempt suicide within the next two years with an 80 to 90 percent accuracy. However, the research only examined data from people who had been admitted to a hospital after self-harming, and wide-scale studies on individuals more representative of the general population are yet to be published. Some may also be worried about the privacy implications of Facebook — a company that has previously worked with surveillance agencies like the NSA — examining user data to make such sensitive judgements. The company’s chief security officer Alex Stamos addressed these concerns on Twitter, saying that the “creepy/scary/malicious use of AI will be a risk forever,” which was why it was important to weigh “data use versus utility.”

UEFI, BIOS, CMOS - What’s the Difference?

4

Internet Security Tips & Tricks

5

JavaScript Tips

5

How to Move Android Apps to an SD Card

6 Source: The Verge 1


5 Web Development Frameworks 1) AngularJS

in the near future called, React Fibre. It is an ongoing reimplementation of React's core algorithm. It is the culmination of over two years of research by the React team. It could be a big headline for developers this year. Hence, you can count on this library and should consider hiring React developers for your next project.

If you are familiar with the latest web development 4) Node.js technologies, then AngularJS is a familiar name to you. Angular is a JavaScript open-source framework which was designed particularly for single-page web applications using an MVC architectural pattern. It is not a full-stack, but a front-end framework dealing basically with your web pages. After the release of Angular 2, a complete revamp of the first version, this framework created a lot of hype. Now, they have come up with Angular 4 (skipping 3) and that's even better. Due to these constant upgrades, this Google product deserves to stay in the top web development framework's list and should be considered as a crucial part of your next web development project.

2) Laravel

The main idea of Node.js is to use non-blocking and eventdriven I/O so that they remain lightweight and efficient against real-time applications with a large amount of data running on distributed devices. Simply put, Node.JS is used for specific reasons to fill particular needs. Node.js is not just a framework, it is a complete environment. It has been a favorite among developer’s for a long time and is expected to retain this status for quite a while. It helps to create scalable and fast network applications since it is capable of handling a large number of simultaneous connections with high performance, which provides high scalability. If you want a complete JavaScript environment with all the tools, development using Node.js or to hire nodejs developersmay be ideal for you.

When we talk about backend web development frameworks, Laravel comes up to mind. Released in 2011, Laravel is a free, open-source PHP web framework, intended for building state-of-the-art web applications following the model– 5) Ruby on Rails view–controller (MVC) architectural pattern. Some of the features of Laravel are a modular packaging system with a dedicated dependency manager, utilities that aid in application deployment and maintenance, multiple ways to access relational databases, and its orientation toward syntactic sugar.

3) React.js

React.js is an open-source, JavaScript library maintained by Facebook along with a large developer community. This library (also convertible to a web development framework) is used extensively in developing the user interface for web applications. This particular framework was invented for the purpose of building large applications with data that changes constantly over time.

Ruby on Rails (RoR) is considered to be one of the favorite frameworks for web developers. Ruby is a fun programming language that many developers enjoy using. Some of the big brands like Hulu, Airbnb, and Basecamp developed their websites with RoR. From 2005, RoR has been completely free of cost and runs on Linux, which is also open-source. It’s also easy and fun to work with from a developer’s perspective. Not only does this framework allow you to move from the planning stages to the actual development very fast, but it's also easy to handle when compared to other technologies. Hence, you can certainly consider RoR as a useful framework for your next web development project.

Moreover, React is coming out with something really interesting Source: DZone 2


Binary Search Given a sorted array arr[] of n elements, write a function to search a given element x in arr[]. A simple approach is to do linear search. The time complexity of above algorithm is O(n). Another approach to perform the same task is using Binary Search.

// present, otherwise -1 int binarySearch(int arr[], int l, int r, int x) { if (r >= l) { int mid = l + (r - l)/2;

Binary Search: Search a sorted array by repeatedly dividing the search interval in half. Begin with an interval covering the whole array. If the value of the search key is less than the item in the itself middle of the interval, narrow the interval to the lower half. Otherwise narrow it to the upper half. Repeatedly check until the value is found or the interval is empty. Example:

// If the element is present at the middle if (arr[mid] == x)

return mid;

// If element is smaller than mid, then it can only be present // in left subarray if (arr[mid] > x) return binarySearch(arr, l, mid-1, x); // Else the element can only be present in right subarray return binarySearch(arr, mid+1, r, x); }

The idea of binary search is to use the information that the array is sorted and reduce the time complexity to O(Logn).

// We reach here when element is not present in array return -1; }

We basically ignore half of the elements just after one int main(void) comparison. { 1. Compare x with the middle element. int arr[] = {2, 3, 4, 10, 40}; 2. If x matches with middle element, we return the mid index. int n = sizeof(arr)/ sizeof(arr[0]); 3. Else If x is greater than the mid element, then x can only lie int x = 10; in right half subarray after the mid element. So we recur for int result = binarySearch(arr, 0, n-1, x); right half. (result == -1)? printf("Element is not present 4. Else (x is smaller) recur for the left half. in array") Recursive implementation of Binary Search implementation of : printf("Element is present at Binary Search index %d", result); return 0; #include <stdio.h> } // A recursive binary search function. It returns // location of x in given array arr[l..r] is

Source: GeeksforGeeks

3


UEFI, BIOS, CMOS - What’s the Difference? Unified Extensible Firmware Interface (UEFI)

 

 

The BIOS is firmware. You should check for BIOS updates from manufacturers frequently. Updating the BIOS (called flashing the BIOS) makes new features available, such as allowing the BIOS to recognize newer hardware devices. Most BIOS chips vary from 265 KB to 1 MB in size. Video cards include a BIOS chip on the device. These devices have their own ROM chip called an optionROM (OpROM).

Complementary Metal-Oxide Semiconductor (CMOS)

The UEFI was designed to replace the BIOS. Important things about UEFI are:  The UEFI is firmware.  The UEFI program controls the startup process and loads the operating system into memory.  The UEFI design improves the software interoperability and the address limitations of BIOS.  The UEFI provides better security to protect against bootkit (malware attacks on the boot process) attacks.  The UEFI provides faster startup times.  The UEFI supports drives larger than 2.2 terabytes.  The UEFI supports 64-bit firmware device drivers.  The UEFI is compatible with both BIOS and UEFI hardware.  You should check for UEFI updates from manufacturers frequently. Updating the UEFI (called flashing the UEFI) makes new features available. Basic Input Output System (BIOS)

CMOS is legacy computer chip technology that has become a general term used for the program that stores important system information related to the starting of a computer. It is often used synonymously with BIOS. Data held in CMOS includes the hard disk type and configuration, the order of boot devices, and other configurable settings related to the system hardware. The following are important things to know about CMOS:  Changing the data stored in CMOS required the use of a CMOS editor program that was part of the BIOS.  CMOS used to refer to the real-time clock and the CMOS chip that stored system information. Both were powered by a CMOS battery. Now, the EEPROM chip stores the system information that used to be stored on the CMOS chip. EEPROM requires no power to maintain data storage.  The CMOS battery is still used to keep the real-time system clock running when the computer is powered off. It can be a low-voltage dry cell, lithium mounted on the motherboard, or even AA batteries in a housing clipped on a wall inside of the case. The electric current is about 1 millionth of an amp and can provide effective power for years.

The BIOS is a legacy program stored in a read-only memory (ROM) chip that the CPU automatically loads and executes when it receives power. Important things to know about the BIOS are:  The BIOS program controls the startup process and loads the operating system into memory. 4


Internet Security Tips & Tricks    

   

Use a strong, unique password for every website. Yes, that  means you’ll have to install and use a password manager. Set your smartphone to lock after a short idle time, and set it to require authentication for unlocking. If at all possible, use something stronger than a simple-minded four-digit PIN. Never click links in emails or texts that seem to come from  your bank, the IRS, or any other institution. If you think the message might be valid, log into your account directly, without using the supplied link. Verify your privacy settings on mobile devices and social media. Make sure you’re not over-sharing information with  the world that could potentially be used against you. Install software, application and operating system updates as early and as often as possible.

Nothing is free. This is particularly true for apps or software. Free often means if you give us access to your personal data. Third party data collectors are as great a threat to privacy as government surveillance. Learn who’s collecting your personal data, how they intend to use it, for how long, and whether they will share what they collect from you. Password manager for everything! Randomly generate them all (bar the ones you actually need to remember) and use a good password manager like 1Password, LastPass, or KeePass. Use multi-step or 2 factor everywhere. It’s increasingly common on large services and is enormously effective. You can’t lose what you don’t have. Think twice before creating anything digital you wouldn’t want exposed including malicious email and nude pics. Install an antivirus solution. Make sure you download antivirus software from vendors that you trust and never run more than one AV tool on your PC at the same time. If you can’t afford to buy a license there are plenty of free options for home users such as AVIRA, AVG, AVAST and Microsoft etc. Use a VPN connection, whether you’re on a corporate network or a public wired or WiFi network. Most corporations obviously have VPN clients for their users, but employ VPN connections even outside of work—including on mobile devices. Keep all applications up-to-date with the latest patches, and use a less-targeted browser such as Chrome or Firefox.

JavaScript Tips Get a random item from an array var items = [12, 548 , 'a' , 2 , 5478 , 'foo' , 8852, , 'Doe' , 2145 , 119]; var

randomItem = items[Math.floor(Math.random() * items.length)];

Get a random number in a specific range var x = Math.floor(Math.random() * (max - min + 1)) + min;

Generate an array of numbers with numbers from 0 to max var numbersArray = [] , max = 100; for( var i=1; numbersArray.push(i++) < max;);

// numbers = [1,2,3 ... 100]

Use logical AND/ OR for conditions var foo = 10; foo == 10 && doSomething(); // is the same thing as if (foo == 10) doSomething(); foo == 5 || doSomething(); // is the same thing as if (foo != 5) doSomething(); 5


How to Move Android Apps to an SD Card Flagship Android phones are getting more storage space these days. But capacity is still at a premium on older phones and budget models. Consider that three of our favorite budget phones this year — the Honor 6X, the ZTE Blade V8 Pro and the Moto G5 Plus — all ship with 32GB capacities. (In the case of the G5 Plus, you can pay up for a 64GB model, at least.) A large chunk of that storage is already taken up by the operating system and preloaded software. After you start adding your own apps, shooting photos and videos and downloading podcasts, you risk running out space. Fortunately, a number of Android devices sport microSD card slots that allow you to expand your storage capacity by inserting an inexpensive memory card. You can grab a 32GB card for around $12, while a 64GB card runs you $25 or so. Prices get a little steep ($50 to $60) if you want 128GB of storage, but those 32GB and 64GB cards can buy you a little extra room for storing Android apps.

5. Tap Change if it’s there. If you don’t see the Change option, the app cannot be moved. If you are unable to find any apps with this option, it is likely that your device does not support the feature.

Here's how to move apps to the microSD card using Android's built-in application management features. What to Know about Adding Storage First, not all Android devices allow you to install portions of an installed app to the microSD card, but for those that do, it’s just a quick trip to the application manager and a button press away. Most flagship phones have moved away from support for this feature, with the LG G4 and Samsung Galaxy S5 among the last to support it; it is more commonly found in mid-range to low-end hardware, but these are often devices that could use the extra storage.

Unfortunately, even if your smartphone supports the feature, not all apps do. Large apps such as games leave most of their data on the internal storage. For example, Asphalt 8 puts just 64MB of data on the microSD card while leaving the remaining 1.4GB to fill up your phone or tablet. That said, you can save some space this way, particularly if you have a lot of apps installed and move as many as possible to a microSD card.

6. Tap Move.

Move Apps to SD Card Using Application Manager 1. Navigate to Settings on your phone. You can find the settings menu in the app drawer.

If you wish to move an app back to the internal memory, hit the Change button again and select Internal Storage.

2. Tap Apps. 3. Select an app you want to move to the microSD card. 4. Tap Storage.

6


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.