Video: 20 Google Assistant Apps

20 Google Assistant Apps You Did Not Know About!

If you have an android device, you can use these Google Assistant actions for free.
Try out the “Today I learned” Google home action game.

Ask Google assistant: “Ok Google, talk to Today I learned”

You can find a complete list on Google Assistant search page.

Larry Battle

I love to program, and discover new tech. Check out my stackoverflow and github accounts.

More Posts - Website

Follow Me:
TwitterLinkedInYouTube

Links Teach Me Startup

Hey you all,
I’m offering an service call “Links Teach Me”.
Basically it’s where you give a topic for school or an certication and I’ll provide you a list of resources to make speed up your learning.
If you’re looking for the best review material, audio or video tutorials, online flash cards, online communities for a topic then contact me.
You can purchase the service on fiverr.com for $5.
There are only 8 slots available to reserve your spot today!

Request Service

I will provide best resources for learning a topic for $5

Larry Battle

I love to program, and discover new tech. Check out my stackoverflow and github accounts.

More Posts - Website

Follow Me:
TwitterLinkedInYouTube

Code of the day – FizzBuzz in Javascript

FizzBuzz Test

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

c2.com

Here’s my solution:
Test Driven Development Approach

// TDD Readable
var getFizzBuzzStatements = function (len) {
	var arr = [],
	str = "";
	for (var i = 1; i <= len; i++) {
		str = (i % 3) ? "" : "Fizz";
		str += (i % 5) ? "" : "Buzz";
		arr.push(str||i);
	}
	return arr;
};
var fizzBuzz = function () {
	console.log(getFizzBuzzStatements(100).join("\n"));
};
fizzBuzz();

Alternative: One liner

// One liner
for (i = 1; i <= 100; i++)
	console.log((((i % 3) ? "" : "Fizz") + (i % 5 ? "" : "Buzz")||i) + "\n")

Alternative: Switches

var getFizzBuzzStatements = function (len) {
	var j,
	arr = [];
	for (var i = 1; i <= len; i++) {
		switch (i % 15) {
		case 0:
			arr.push("FizzBuzz");
			break;
		case 3:	case 6:	case 9:	case 12:
			arr.push("Fizz");
			break;
		case 5:	case 10:
			arr.push("Buzz");
			break;
		default:
			arr.push(i);
		}
	}
	return arr;
};
var fizzBuzz = function () {
	console.log(getFizzBuzzStatements(100).join("\n"));
};

Demo

Larry Battle

I love to program, and discover new tech. Check out my stackoverflow and github accounts.

More Posts - Website

Follow Me:
TwitterLinkedInYouTube