Shared posts

18 Jan 14:06

For sharing:Long-ways | Box-ways









For sharing:

Long-ways | Box-ways

18 Jan 14:05

Albert Einstein

"You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat."

18 Jan 13:31

Drumforg



Drumforg

18 Jan 13:31

Wifi

Further out to the right, it works correctly, but the reason it works still involves the word 'firmware.'
17 Jan 15:42

Amazon to accept food stamps in Md., other states

by wtopstaff

(NEW YORK) — Amazon.com is now one of seven online food retailers that will soon accept food stamps, according to the U.S. Department of Agriculture (USDA).

The retail firms will be involved in a two-year pilot program allowing participants of the Supplemental Nutrition Assistance Program (SNAP) to purchase their groceries online.

“Online purchasing is a potential lifeline for SNAP participants living in urban neighborhoods and rural communities where access to healthy food choices can be limited,” USDA Secretary Tom Vilsack said in a statement. “We’re looking forward to being able to bring the benefits of the online market to low-income Americans participating in SNAP.”

The program so far only includes Amazon customers in Maryland, New Jersey, and New York, but USDA said it anctipates additional retailers to be included in the future when the pilot phase is successfully completed.

The selected firms for the pilot program include:

  • Amazon – Maryland, New Jersey, New York
  • FreshDirect – New York
  • Safeway – Maryland, Oregon, Washington,
  • ShopRite – Maryland, New Jersey, Pennsylvania
  • Hy-Vee, Inc. – Iowa
  • Hart’s Local Grocers – New York (based in Rochester)
  • Dash’s Market – New York (based in Buffalo)

Copyright © 2017, ABC Radio. All rights reserved.

The post Amazon to accept food stamps in Md., other states appeared first on WTOP.

17 Jan 15:19

Tell Me About Your D&D Character

Tell Me About Your D&D Character I have the ability to realize when people do not give a crap about what I am talking about. That doesn't necessarily mean I will stop talking, I just know the exact moment they quit caring.



See more: Tell Me About Your D&D Character
17 Jan 15:09

Kitchen Tool That Turns Radishes into Mario Power-Up Mushrooms

Kitchen Tool That Turns Radishes into Mario Power-Up Mushrooms

 

Avichai Tadmor designed this genius kitchen tool called the Ravanello that creates mushroom shapes from radishes that looks just like Mario Power-Up Mushrooms! Add some fantasy to your finger foods and surprise your guests with these...

Kitchen Tool That Turns Radishes into Mario Power-Up Mushrooms

Kitchen Tool That Turns Radishes into Mario Power-Up Mushrooms

Kitchen Tool That Turns Radishes into Mario Power-Up Mushrooms

Kitchen Tool That Turns Radishes into Mario Power-Up Mushrooms

Kitchen Tool That Turns Radishes into Mario Power-Up Mushrooms

Kitchen Tool That Turns Radishes into Mario Power-Up Mushrooms

17 Jan 15:09

Photo



17 Jan 14:53

Rad Dent

by Justin Boyd
Dan Jones

I need to find this dentist

Rad Dent

That sure is one radical dentist. I bet he skateboards.



bonus panel
17 Jan 14:01

NVIDIA SHIELD TV (2017) is launching today

by Alex Wagner

Less than two weeks after making its debut at CES in Las Vegas, the new NVIDIA SHIELD TV is now available.

The NVIDIA SHIELD TV (2017) is officially launching today, with NVIDIA and several other retailers offering the 16GB for $199.99. A Pro model with 500GB of built-in storage is expected to launch later this month for $299.99.

In exchange for your hard-earned dollars, you’ll get a new NVIDIA SHIELD TV (2017), complete with Google Assistant, support for 4K HDR in Amazon Video, and more. Also included is a redesigned controller for your gaming needs and a voice remote.

You can order the new SHIELD TV (2017) directly from NVIDIA, and you can also snag an extra controller ($59.99), remote ($49.99), or a vertical stand ($19.99) for the device. Several other retailers are offering the new SHIELD TV, too, including Amazon, Fry’s, Best Buy, B&H Photo Video, and Newegg.

The original NVIDIA SHIELD TV (2015) is widely regarded as one of the best Android TV boxes on the market, and the new model looks like another solid offering. If you’ve got the original SHIELD TV, NVIDIA has announced that it’s pushing an update to that device that’ll include some features of the new model, but if you want to upgrade to the new hardware or just want a new Android TV box, you can now get a SHIELD TV (2017) of your very own.

17 Jan 14:00

Introduction to Android Things

by Paul Trebilcox-Ruiz

For over a year, Google worked with the Project Brillo operating system (which was built on the lower levels of Android) for Internet of Things (IoT) connected devices, even going so far as to have lessons and talks on it during the Ubiquity Dev Summit in January of 2016. 

In December of 2016, Google released an updated version of this operating system with another tier that allows Android application developers to use a stripped-down version of Android when creating connected devices. Although Android Things is currently in an early developer preview state, it looks promising as an IoT platform for quickly creating prototypes and supporting users at scale.

In this article, I'll give you an introduction to how Android Things works and look briefly at some examples of how you could use it.

What Is Android Things?

Android Things is a lightweight version of Android that can be flashed onto different hardware prototyping boards, in order to easily create connected Internet of Things (IoT) devices. This makes embedded coding accessible to developers who might not have previous experience. With Android Things, Google has also provided a library that you can use to build apps that read from and write to different pins on the boards, allowing you to hook up different sensors and actuators to interact with the world.

So what makes Android Things different than other IoT prototyping solutions? Google has done a lot of the legwork to make specific hardware prototyping boards work, and will continue to provide updates to support built-in Bluetooth, wireless, software updates, and other functionality. 

This means that you, as a developer and creator, can start by prototyping your IoT device using a development board such as Raspberry Pi. Then, when you're ready to take your product to market, you can design a stripped-down version of the hardware to save hardware production costs.

Current Device and Feature Support

At the time of this article, Android Things supports three prototyping boards: the Raspberry Pi 3 Model B, the Intel Edison with Arduino breakout board, and the NXP Pico i.MX6UL

While this may seem limited, a restricted supported hardware list allows Google to fully support these common prototyping boards and provides developers with a sturdy platform that has been tested and certified. 

Intel Edison with Arduino Breakout Prototyping Board

In addition to the previously mentioned three boards, Android Things will soon support the Intel Joule 570x and the NXP Argon i.MX6UL, giving you more hardware options for development.

Raspberry Pi 3 Model B Prototyping Board

Once you have a prototyping board, you will want to know what you can build with it. 

While we will go over the process of flashing a board and building connected projects in later tutorials, you can find a list of sample projects using drivers provided by Google for various sensors and actuators on their Android Things Driver Samples GitHub page

Some driver examples include servo motors, Pulse Width Modulation (PWM) speakers, buttons, GPS sensors, and HT16K33 supported alphanumeric segment display.  

7-segment and 14-segment HT16K33 backpack displays

In addition, you can read the source for these drivers on GitHub to create your own drivers for digital sensors or digital/PWM actuators, such as this quick example that I have written for the HC SR501 motion detector sensor.

HC SR501 Motion Detector Sensor

One thing to remember is that, at the time of this writing, Android Things is in the first iteration of its developer preview. This means that, because it's an early release for testing and feedback, some features are currently unavailable or may be buggy as the platform is tested and built out. 

Currently Bluetooth communication is not enabled with the boards, and support for simple analog sensors is not included in the Android Things general-purpose input/output (GPIO) classes—though there is a technical reasoning for this, and you can still use SPI and I2C, as mentioned in this AOSP issue

As this platform is still new, there are not many drivers for sensors or other hardware, so developers using the platform will need to either create their own drivers or make do with what is currently available or open sourced by other developers in the Android Things community

Limitless Possibilities

One of the best things about building Internet of Things devices is that you aren't limited to the hardware that ships with a phone, but are able to build out complex devices that fit the needs of your project. 

Although you may need to write the drivers for your own actuators and sensors, this process is still relatively straightforward given that the platform uses Java and an Android base, so you don't need to dig into low-level languages to make your product work. This means if you decide to make an animated skeleton that uses motion detection and servo motors to move, you can!

 

In addition to being able to support new hardware, you get valuable portions of the Android ecosystem to work with. Using already supported features from Android, such as the Camera API, Play Services and Firebase, you can easily build a device that takes a picture through an Internet-connected device and attach it to your back-end service, such as Firebase Storage, or analyze the image through Google Play Service's vision API.

Raspberry Pi with Camera Module

Conclusion

Given the ability to create your own devices and easily interact with Google Play Services and other back-end services (Firebase, machine learning services, etc.), Android Things promises to provide an easy-to-use platform for quickly creating new connected devices that can be brought to market or used for your own personal projects.

Stay tuned for some in-depth tutorials on getting set up and building projects with Android Things. To learn more about some of these related technologies, check out our other tutorials here on Envato Tuts+!

16 Jan 15:33

Clean Code JavaScript

by Sarah Drasner

Inspired by Robert C. Martin's book Clean Code, Ryan McDermott put together a repo with some software engineering best practices as they apply to JavaScript in particular. The repo has tons of great guidelines for beginning programmers, and good reminders for seasoned maintainers.

I'm a particular fan of this style of teaching because it focuses on legibility as much as writing. This ensures that our codebases are friendly to the next developer who comes along, even if it's ourselves.

Direct Link to ArticlePermalink

Clean Code JavaScript is a post from CSS-Tricks

12 Jan 12:34

TIL The Riot Act was an actual law

by Dan Jones

In 1714, the Riot Act was passed in England. This act allowed local authorities to decide that any gathered group of twelve or more people constituted a “riotous assembly”. At that point, the official would read them the Riot Act, and if they failed to disperse within an hour, they could be arrested.

12 Jan 12:34

Hipster dog

by Dan Jones

12 Jan 12:34

You Mean Me?

by Dan Jones

11 Jan 12:52

Free Speech

by Dan Jones

What this country needs is more free speech worth listening to.

Hansell B. Duckett

11 Jan 12:52

Meryl Streeps 2017 Golden Globe Acceptance Speech

by Dan Jones
10 Jan 14:16

Death Tattoo

10 Jan 14:16

1955 Lamborghini DL25 Tractor

by Erin Carstens

Hey John Deere, wanna race? Lamborghini's DL25 Tractor can go from 0 to 60 in...never...but any dude who owns one can consider himself the proud possesser of a rare collector's piece, and an icon of Ferruccio Lamborghini's less flashy beginnings in the auto industry.

The story goes that a feud with Enzo Ferrari fueled Lamborghini's transition from farm equipment to sports cars. Lamborghini complained to Ferrari about the quality of a car he'd gotten from him. Ferrari responded with a Psssh! and told Lambo he didn't know what he was talking about. Better stick to his chunky, pokey little tractors and leave the racing beasts to the experts. Then came the Lamborghini 400 GT and Miura.

Well played, Ferruccio.

While Lamborghini tractors never went out of production--Lamborghini Trattori still builds specialized equipment for orchards and vineyards--it's rare that one makes it to the US, even as a piece up for auction. A fully restored model DL25 sold in August 2016 through Bonhams in Carmel, CA for $110,000.

The example has a 2-cylinder Diesel engine and 4-speed manual transmission. It also has a belt-driven PTO for running various pieces of farm equipment, and is said to be in fine functioning condition. Good news for the buyer, who almost certainly bought a Lamborghini tractor to haul crops, wood, and grandchildren around his property, not to tuck away in a garage until it's time to show off to his friends and the dudes at the auto show. Yeah. Right.

Muchas danke to Uncrate.

10 Jan 14:16

That little problem with Agile…

by CommitStrip

10 Jan 14:16

LDN FoundationSupport me on Patreon for more comics!...



LDN Foundation
Support me on Patreon for more comics! www.patreon.com/Sephko

10 Jan 14:16

Cleanup

by The Awkward Yeti

120516_cleanup

10 Jan 14:16

Firebase Security Rules

by Chike Mgbemena

Firebase Realtime Database security rules are how you secure your data from unauthorised users and protect your data structure.  

In this quick tip tutorial, I will explain how to configure your database security rules properly so that only authorised users have read or write access to data. I'll also show you how to structure your data to make it easy to secure.

The Problem

Let's assume we have JSON data in our Firebase database, as in the example below:

{
  "users" : {
    "user1" : {
      "firstName" : "Chike",
      "lastName" : "Mgbemena",
      "age": "89"
      "phoneNumber" : "07012345678"
    },
    "user2" : {
      "firstName" : "Godswill",
      "lastName" : "Okwara",
      "age": "12"
      "phoneNumber" : "0701234"
    },
    "user3" : {
      "firstName" : "Onu",
      "lastName" : 543,
      "age": 90
      "phoneNumber" : "07012345678"
    },
    ...
  }
}

Looking at the database, you can see that there are some issues with our data:

  1. Two users (user1 and user3) have the same phone numbers. We'd like these to be unique.
  2. user3 has a number for last name, instead of a string.
  3. user2 has only seven digits in their phone number, instead of 11. 
  4. The age value for user1 and user2 is a string, while that of user3 is a number.

With all these flaws highlighted in our data, we have lost data integrity. In the following steps, I will show you how to prevent these from occurring. 

Permissive Rules

The Firebase realtime database has the following rule types:

Type Function
.read Describes if and when data is allowed to be read by users.
.write Describe if and when data is allowed to be written.
.validate Defines what a correctly formatted value will look like, whether it has child attributes, and the data type.
.indexOn Specifies a child to index to support ordering and querying.

Read more about them in the Firebase docs.

Here is a very permissive rule for the users key in our database. 

{
  "rules": {
    "users": {
        // users is readable by anyone
        ".read": true,
        
        // users is writable by anyone
        ".write": true
    }
  }
}

This is bad, because it gives anyone the ability to read or write data to the database. Anyone can access the path /users/ as well as deeper paths. Not only that, but no structure is imposed on the users' data.

Access Control Rules

{
  "rules": {
    "users": {
      "$uid": {
        ".read": "auth.uid == $uid",
        ".write": "auth.uid == $uid",
      }
    }
  }
}

With these rules, we control access to the user records to logged-in users. Not only that, but users can only read or write their own data. We do this with a wildcard: $uid. This is a variable that represents the child key (variable names start with $). For example, accessing the path /users/user1, $uid is "user1"

Next, we make use of the auth variable, which represents the currently authenticated user. This is a predefined server variable supplied by Firebase. In lines 5 and 6, we're enforcing an accessibility constraint that only the authenticated user with the same id as the user record can read or write its data. In other words, for each user, read and write access is granted to /users/<uid>/, where <uid> represents the currently authenticated user id.

Other Firebase server variables are:  

now The current time in milliseconds since Linux epoch.
root A RuleDataSnapshot representing the root path in the Firebase database as it exists before the attempted operation. 
newData A RuleDataSnapshot representing the data as it would exist after the attempted operation. It includes the new data being written and existing data. 
data A RuleDataSnapshot representing the data as it existed before the attempted operation.
auth Represents an authenticated user's token payload.

Read more about these and other server variables in the Firebase docs.

Enforcing Data Structure

We can also use Firebase rules to enforce constraints on the data in our database. 

For example, in the follow rules, in lines 8 and 11, we are ensuring rules that any new value for the first name and last name must be a string. In line 14, we make sure that age is a number. Finally, in lines 17 and 18, we're enforcing that the phone number value must be a string and of length 11.

{
  "rules": {
    "users": {
      "$uid": {
        ".read": "auth.uid == $uid",
        ".write": "auth.uid == $uid",
        "firstName": {
          ".validate": "newData.isString()"
        },
        "lastName": {
          ".validate": "newData.isString()"
        },
        "age": {
            ".validate": "newData.isNumber()"
        },
        "phoneNumber": { 
          ".validate": "newData.isString() && 
             newData.val().length == 11"
        }, 
      }
    }
  }
}

But how do we prevent duplicate phone numbers?

Preventing Duplicates

Next, I'll show you how to prevent duplicate phone numbers.

Step 1: Normalize the Data Structure

The first thing we need to do is to modifying the root path to include a top-level /phoneNumbers/ node. So, when creating a new user, we will also add the user's phone number to this node when validation is successful. Our new data structure will look like the following:

{
  "users" : {
    "user1" : {
      "firstName" : "Chike",
      "lastName" : "Mgbemena",
      "age": 89,
      "phoneNumber" : "07012345678"
    },
    "user2" : {
      "firstName" : "Godswill",
      "lastName" : "Okwara",
      "age": 12,
      "phoneNumber" : "06034345453"
    },
    "user3" : {
      "firstName" : "Onu",
      "lastName" : "Emeka",
      "age": 90,
      "phoneNumber" : "09034564543"
    },
    ...
  },
  "phoneNumbers" : {
    "07012345678": "user1",
    "06034345453": "user2",
    "09034564543": "user3",
    ...
  }
}

Step 2: Enforce New Data Structure

We need to modify the security rules to enforce the data structure: 

{
  "rules": {
    "users": {
      "$uid": {
        ...
        "phoneNumber": { 
          ".validate": "newData.isString() && 
            newData.val().length == 11 &&
            !root.child('phoneNumbers').child(newData.val()).exists()"
        },
      }
    }
  }
}

Here, we're making sure the phone number is unique by checking if it is already a child of the /phoneNumbers/ node with the given phone number as key. In other words, we're checking that the phone number has not been registered by a user already. If it has not, then validation is successful and the write operation will be accepted—otherwise it will be rejected. 

Your app will need to add the phone number to the phone numbers list when creating a new user, and it will need to delete a user's phone number if that user is deleted.

Simulating Validation and Security Rules

You can simulate your security rules in the Firebase console by clicking the Simulator button. Add your security rules, select the type of simulation (either read or write), input some data with a path, and click the Run button: 

Firebase Simulator

If the value of the first name is a number instead of a string, validation will fail and write access is denied:

Write Access Denied

Conclusion

In this quick tip tutorial, you learned about Firebase Database security rules: how to prevent unauthorised access to data and how to make sure that data in the database are structured.

To learn more about Firebase Database security rules, refer to the official documentation. And check out some of our other Firebase tutorials and courses here on Envato Tuts+!

10 Jan 02:40

Beef Jerky Flower Bouquets

by Erin Carstens

Men, say it with diamonds. With chocolate truffles. With roses. Ladies, say it with beef. Jerky. In the shape of flowers for good measure. Because even though nothing will tell your man's belly how you feel more than 8 ounces of 100% pure dried beef, if you really want him to know how much you love him / how awesome he is / how bad you F'd up, nothing will will speak more passionately to his heart than molding that beef into a Broquet of roses displayed in a beer mug.

Say It with Beef makes jerky flower arrangements for the dudes (and meat-craving ladies) out there who would be way more likely to stop and smell the roses if they could devour them as a high-protein snack afterwards. Jerky Broquets come with your choice of original, peppered, teriyaki, or mixed jerky flavors lovingly shaped into in bunch o' roses or daisies. You can also opt for either a pint glass or beer mug display "vase."

If you're having visions of Valentine's Day gifts, or need a delightfully apropos way of apologizing for behaving like such a jerk(y) last night, go ahead and Say It with Beef. Broquet orders ship from Tulsa, OK, and due to the delicate nature of the flcowers will require arrangement in the glass post-arrival.

10 Jan 02:40

Emails

Hey Rob, sorry it took me a while to get back to you! Sure, I'd love to see WALL-E opening weekend! Are you still doing that, or...?
10 Jan 02:40

How Technology Will Change According to Science Fiction

How Technology Will Change According to Science Fiction

 

The future remains perhaps the most continuous field of interest in the history of humanity, with the obsession with guessing the unknown remaining a hugely popular topic in society. Films such as Star Wars or Star Trek have captivated the imaginations of the world by providing a glimpse into the future of how things could be. Society now dreams of flying their own S.S. Enterprise, having a lightsabre duel or experiencing "death by snu-snu"... Obviously however, there is a long way to go before those dreams become reality.

Different tales of science fiction are set at different periods in Earth?s future, with different futuristic tales outlining the history of the human race throughout the present millennium. Some were highly overambitious, whereas others predicted that we?d have modern technology far later. Have a look for yourself and let us know how excited you are for society?s future if science fiction is anything to go by!

How Technology Will Change According to Science Fiction

Source: The Solar Centre

Follow us on:
 

January 09 2017
10 Jan 02:40

Popular TV Shows Reimagined as Sunday Comics

Popular TV Shows Reimagined as Sunday Comics

 

Direct Deals took popular scenes from TV shows like Game of Thrones and The Walking Dead and reimagined them as our favorite Sunday comic strips...

The Walking Dead

Popular TV Shows Reimagined as Sunday Comics

The Walking Dead meets War of the Buttons and maybe just a little Lord of the Flies in this mash-up. The survivalists led by Rick Grimes in The Walking Dead perfectly match the rag tag Peanuts under their protagonist, Charlie Brown. Snoopy and Co don?t have the apocalypse to battle, but Pigpen is clearly ready for the hygienic sacrifices necessary in a zombie apocalypse.


Game of Thrones

Popular TV Shows Reimagined as Sunday Comics

Worlds collide with Game of Thrones and Calvin and Hobbes! Even though the famed strip is finished, you can experience the wonder of adventure and the thrill of discovery in this mash-up?without any of the horrifying bleakness of George Martin?s signature series. Hodor?s friendly demeanor and his journey with the warging Bran and sidekick Summer match the imagined friendship Hobbes provides to Calvin.


Mr. Robot

Popular TV Shows Reimagined as Sunday Comics

Entire memes have been devoted to the unspoken psychosis of Garfield?s Jon Arbuckle. Who else could portray the introverted, detached persona of Elliot better than the fat cat?s iconic owner? Without going into spoiler territory, the ?Garfield minus Garfield? meme suddenly takes on a whole new meaning in this context.


Empire

Popular TV Shows Reimagined as Sunday Comics

How can you find any comic loud enough to match the personality of Cookie? While Sunday favorite Baby Blues doesn?t deal in the realm of hip hop stardom, it is a depiction of two parents struggles raising three bodacious children.


Silicon Valley

Popular TV Shows Reimagined as Sunday Comics

Set a decade apart, the world of micromanagement, payroll, meetings and buzzwords reign strong in both Silicon Valley and Dilbert. Dilbert would?ve surely rolled his eyes at the Conjoined Triangle of Success, while we only wish the Pied Piper team had a Pointy-Haired Boss to report to.


VEEP

Popular TV Shows Reimagined as Sunday Comics

As you can see, there are a surprising amount of similarities between some of the most famous comic strips and todays hit TV shows. Veep?s Selina Meyer is just as career-focused and prone to outbursts as Cathy Guisewite?s Cathy. There are also humorous differences and juxtaposition between the schoolyard nonsense of Charles Shulz?s Peanuts and the life-and-death struggles in The Walking Dead.

Source: Direct Deals

Follow us on:
 

January 09 2017
08 Jan 23:16

Bacon Lanyard

by Erin Carstens

How is it that I haven't seen every dude in my office walking around with their ID tag hanging off a bacon lanyard yet? This strip of polyester cured pork fat will make every mouth in the meeting water, and I'd probably recommend taking it off before your next one-on-one to avoid awkward gawking and your boss / employee making a move to chow down on your chest.

The bacon lanyard has its deliciously marbled meat print on both sides. It's a bacon standard 1" wide, and an enviously long 36" in total length. The end of the lanyard has a J-swivel hook attachment.

08 Jan 21:23

AirWave Wireless OTA & OTT Device

by Erin Carstens
Dan Jones

Looks pretty cool.

Mohu first began catering to cable cutters with the Leaf, a paper-thin HD antenna that's black on one side, white on the other, and adheres close to invisibly to your wall or ceiling. In spring of 2017 they'll officially launch the AirWave, a wireless combo device geared more towards streaming systems, such as Apple TV, Roku, Fire TV, Android, and iOS.

AirWave serves as both an over-the-air (OTA) antenna that grabs local networks and broadcasts and an over-the-top (OTT) conduit of streaming video content. It has a built-in TV tuner that communicates via WiFi to an AirWave app, installed on the device of your choice to retrieve and display channels. Since the AirWave is wireless, you'll also be able to position it where you get the best reception, not just where you get the best reception within the length of wire to the TV.

Mohu envisions AirWave providing consumers with "complete access to free live broadcast networks, which are available through an OTA antenna, and as well as the over-the-top video content they crave." The app will also include a cable-like program guide with program descriptions, favorite channel settings, and the ability to view up to 14 days of upcoming content.

08 Jan 21:23

Weirdo

by Lunarbaboon