Zortrax M200 Plus print examples

I am getting the hang of my new 3D printer. So I’m posting the photos I promised. First is a comparison: The darker green wererat on the left is with the new printer, compared to the neon green on the right with the old printer. So, yes, for my miniatures the new printer is working fine, and better than the old one.

Next is an example of something my old printer frequently refused to do: Print half a dozen miniatures at the same time. The new one did these 6 bandits in one go without problems. I assume it has to do with the ABS printing hotter, so it still sticks to the previous layer even that layer has been printed a while ago.

The other advantage of ABS is that you can treat it with acetone vapors, which makes the surface glossy and hides imperfections. As an example the 3DBenchy model printed twice identically, with the right one being treated with acetone vapors for 1 hour. Note that for miniatures you better just use 15 minutes, after 1 hour fine parts like arms or swords tend to melt.

Finally I used a model of a bard with a lot of detail to see how it comes out. This is with 15 minutes acetone treatment. Looking closely you can still see the layers and imperfections. But remember that this is just 3 cm tall, so for this size this is as good as it gets. You can see the lute, the rapier, and even the jester’s hat is printing out fine.

Robert Reich: American Oligarchs’ Day of Reckoning Is Nigh

The GOP tax bill is a triumph for the 1 percent, but recent election results suggest it won’t last.

 

The Republican tax plan to be voted on this week is likely to pass. “The American people have waited 31 long years to see our broken tax code overhauled,” the leaders of the Koch’s political network insisted in a letter to members of Congress, urging swift approval.

They added that the time had come to put “more money in the pockets of American families.”

Please. The Koch network doesn’t care a fig about the pockets of American families. It cares about the pockets of the Koch network. 

It has poured money into almost every state in an effort to convince Americans that the tax cut will be good for them. Yet most Americans don’t believe it. 

Polls shows only about a third of Americans favor the tax plan. The vast majority feel it’s heavily skewed to the rich and big businesses – which it is.  

In counties that Trump won but Obama carried in 2012, only 17 percent say they expect to pay less in taxes, according to a recent NBC News/Wall Street Journal poll. Another 25 percent say they expected their family would actually pay higher taxes.

Most Americans know that the tax plan is payback for major Republican donors. Gary Cohn, Trump’s lead economic advisor, even conceded in an interview that “the most excited group out there are big CEOs, about our tax plan.”

Republican Rep. Chris Collins admitted “my donors are basically saying, ‘Get it done or don’t ever call me again.’” Senator Lindsey Graham warned that if Republicans failed to pass the tax plan, “the financial contributions will stop.”

By passing it, Republican donors will save billions – paying a lower top tax rate, doubling the amount their heirs can receive tax-free, and treating themselves as “pass-through” businesses able to deduct 20 percent of their income (effectively allowing Trump to cut his tax rate in half, if and when he pays taxes).

They’ll make billions more as their stock portfolios soar because corporate taxes are slashed.

The biggest winners by far will be American oligarchs such as the Koch brothers; Peter Thiel, the Silicon Valley investor; Sheldon Adelson, the Las Vegas casino magnate; Woody Johnson, owner of the New York Jets football team and heir to the Johnson & Johnson fortune; and Carl Icahn, the activist investor.

The oligarchs are the richest of the richest 1 percent. They’ve poured hundreds of millions into the GOP and Trump. Half of all contributions to the first phase of the 2016 election came from just 158 families, along with the companies they own or control.

The giant tax cut has been their core demand from the start. They also want to slash regulations, repeal the Affordable Care Act, and cut everything else government does except for defense – including Medicaid, Medicare, and Social Security.

In return, they have agreed to finance Trump and the GOP, and mount expensive public relations campaigns that magnify their lies.

Trump has fulfilled his end of the bargain. He’s blinded much of his white working-class base to the reality of what’s happening by means of his racist, xenophobic rants and policies. 

The American oligarchs couldn’t care less about what all this will cost America. 

Within their gated estates and private jets, they’re well insulated from the hatefulness and divisiveness, 

They don’t worry about whether Social Security or Medicare will be there for them in their retirement because they’ve put away huge fortunes.

Climate change doesn’t concern them because their estates are fully insured against hurricanes, floods, and wildfires.

They don’t care about public schools because their families don’t attend them. They don’t care about public transportation because they don’t use it. They don’t care about the poor because they don’t see them. 

They don’t worry about the rising budget deficit because they borrow directly from global capital markets. 

Truth to tell, they don’t even care that much about America because their personal and financial interests are global.

They are living in their own separate society, and they want Congress and the President to represent them, not the rest of us.

The Republican Party is their vehicle. Fox News is their voice. Trump is their champion. The new tax plan is their triumph.

But if polls showing most Americans against the tax cut are any guide, that triumph may be short lived. Americans are catching on. 

The recent electoral results in Virginia and Alabama offer further evidence. 

A tidal wave of public loathing is growing across the land – toward Trump, the GOP, and the oligarchs they serve; and to the deception, the wealth, and the power that underlies them.  

That wave could crash in the midterm elections of 2018. If so, the current triumph of the oligarchs will be the start of their undoing.

 

 

 

Related Stories

  • Donald Trump Jr. and Ted Cruz Mock Barack Obama with Bizarre Cookie
  • The One Scenario in Which Trump Would Risk Impeachment and Fire Robert Mueller
  • Sarah Palin’s Son Charged with Burglary and Assault in Domestic Dispute: Report

Elemental Evil: Sessions 5 and 6

It appears I forgot to chronicle the previous session of my D&D home campaign. The last report was from early July, after which we had a summer break, and then resumed mid-August, and then continued yesterday. Both of these sessions were action-centric, with the group clearing out first the abandoned village of Thundertree and then the goblin stronghold of Cragmaw Castle from monsters. A “door-monster-treasure” type of gameplay can be a lot of fun, but the details aren’t always all that interesting in a journal of events. So I will summarize and concentrate on the highlights in this post.

Thundertree is an abandoned village a day’s travel from Neverwinter. The eruption of Mount Hotenow, which caused quite a catastrophe for Neverwinter half a century ago, destroyed the village of Thundertree. Erdan, the druid of the group who is prone to visions and nightmares, dreamed that the eruption of Hotenow was caused by a group of chanting fire cultists, but probably didn’t go as planned, as the cultists were killed in the event. What remained in Thundertree was mostly abandoned houses, with a population of ash zombies and twig blights. The group had gone to Thundertree to meet the druid Reidoth, who was supposed to know the location of Cragmaw Castle. Their “pet goblin” Droop also claimed to be able to find the way from Thundertree to Cragmaw Castle. They met Reidoth, who was able to provide a safe haven in the village, as well as the directions needed.

After clearing out most of the village from monsters, the group came across another group which likewise was engaged in fighting twig blights. That group was wearing blue armor and white robes, beset with feathers. They explained that they were from a club of aerial enthusiasts, and were in Thundertree to try to tame a griffon nesting here, or get eggs from his nest to raise as aerial mounts. The heroes agreed to accompany them to the griffon’s lair in the highest tower of Thundertree. But once there the air cultists tried to becalm the griffon by offering the adventurers up as sacrifice, so the group ended up killing both the cultists and the griffon. They were able to make the link between a symbol the cultists carried and the same symbol they had seen on a letter to Glasstaff in Phandalin.

On the way to Cragmaw Castle the group tried to question Droop for information about the castle. That was somewhat complicated by the fact that Droop could only count to 3, and used “3” as an answer to any question about numbers in which the answer exceeded 2. Not trusting the goblin’s offer to negotiate safe entry into the castle, they knocked him out and attached him to a tree, guarded by the paladin (the player was absent that session). Instead they built a camouflage out of branches and approached the less guarded south side of the castle at night. From there they could see into the banquet hall, but the goblins there didn’t look out the arrow slits. So they managed after a few attempts to unlock the side door. But they didn’t like the idea of advancing with the goblins in the hall behind them, so they decided to attack there.

From there they moved clockwise room by room. That enabled them to eliminate most guards in small groups. However it did move them more towards the entrance of the castle, instead towards the throne room. The toughest fight was against a group of hobgoblins. Popée the sorceress used a web spell on them, but between succeeded saving throws initially and later the web wasn’t all that effective. Then they tried to burn the web, but in 5E that deals only 2d4 damage, and the player rolled double 1s, so the spell wasn’t really a big success. The hobgoblins however had an ability with which they dealt an extra 2d6 damage if next to an ally. And two of them rolled critical hits, which doubles the number of dice on all damage, knocking the druid out of his bear form. After another fight in the central chapel of the castle the group had enough and decided to go back into the woods to take a long rest.

Returning to the castle they found that the bugbear King Grol had obviously noticed that the group had raided his castle and killed most of the goblinoids in there. So King Grol has gathered all the remaining defenders in the chapel, including a priest from the air cult. That ended up being a tough fight, with Theren being knocked down to zero health, but then rescued. The air cultist priest was a real menace, with a dust devil spell that prevented the archers and casters from sniping from the back. But Popée used a scroll of lightning bolt on King Grol and his pet wolf, killing the wolf and seriously damaging the bugbear. Soon after all the bugbears were dead. The priest tried to transform into gaseous form and flee, but didn’t make it out of the arrow slit in one round and concentrated fire killed him before his next round. At this point it had gotten rather late, and we ended the session.

Chrome will begin to block bad ads on February 15

best android browsers featured image

  • Chrome will begin blocking offending ads on February 15.
  • The offending ads include those that flash, play audio unexpectedly, and take up an entire page.
  • Sites will be given 30 days to get in compliances before ads are blocked on Chrome.

Advertisements are everywhere. Every time you leave the house, ads bombard you on the radio and the side of the road, If you stay in, you’re similarly assaulted when you’re watching TV, playing a game, or surfing the web. Ads are so pervasive that it’s the goal of some people to get rid of as many of them as possible. There are web browsers out there that block ads natively, but you might not expect Chrome to be one of them.

Google announced in June that Chrome would begin to block ads early in 2018. It’s not blocking every ad, though. Google joined the Coalition for Better Ads earlier this year and will use its standards for how the industry should improve ads for consumers. If a website doesn’t abide by those rules, Chrome will block ads on the site. This extends to ads from Google’s own advertising network.

See also

So, what kind of ads will be banned? As it turns out, they’re the ones people hate the most. Among them are full-page ad interstitials, ads that play sounds unexpectedly, and ads that flash quickly. While those might be obvious choices, not every ad will be. For that reason, the Coalition for Better Ads launched the Better Ads Experience Program. The program lays out guidelines for sites to display ads in a way that works for both the consumer and the site showing them.

Google will begin to block the offending ads on February 15. After 30 days of failure to adhere to the new standards, ads are removed. If Google does block ads on a site, the offender can submit their site for re-review after it fixes the issues.

What do you think of Google’s new ad blocking policy? Does it go too far? Not far enough? Let us know down in the comments.

Using Street View and Geocoding in your Android app

Today, Google Maps is easily one of the world’s most popular mapping services, allowing millions of users to plan their journeys, discover new places to visit, and get a taste of what it’s really like to walk around places they may have never even visited.

We’ve already looked at how you can use the Google Maps API to retrieve and display the user’s location, but this powerful API isn’t limited to sticking a pin in a map!

In this article, we’ll be looking at some of the additional features that are included in the Google Maps API. By the end of this article, you’ll know how to:

  • Give your users the freedom to switch between all the different Google Maps styles: Normal, Satellite, Terrain and Hybrid.
  • Convert the device’s longitude and latitude coordinates into a more user-friendly street address, and display this information as part of your UI.
  • Display 360-degree, interactive panoramas of locations across the globe, by adding Street View support to your app.

Creating a basic Google Maps app

Before we can implement any of these features, we need to create a project that displays a basic Google Maps fragment.

To get this setup out of the way as quickly as possible, I’ll be using Android Studio’s ‘Google Maps Activity’ template and generating a debug API key, which is required if your project is going to display any Google Maps content. Just be aware that debug API keys aren’t particularly secure, so before publishing an application you must always generate a new API key based on your project’s release certificate.

  • Create a new project using the ‘Google Maps Activity’ template.
  • Open your project’s res/values/google_maps_api.xml file. This file contains a URL with all the information the Google API Console needs to generate an API key. Find this URL, and copy/paste it into your web browser.
  • Make sure ‘Create a project’ is selected in the Console’s dropdown menu, and then click ‘Continue.’
  • Click ‘Create API key.’
  • The API Console will prompt you to restrict the API key. A restricted API will only work on a platform that supports that type of application, which tends to make your key more secure. Unless you have a specific reason not to, you should select ‘Restrict key.’
  • Under ‘Key restriction,’ make sure ‘Android apps’ is selected, and then click ‘Save.’
  • Copy your API key, and then switch back to Android Studio.
  • Open your project’s google_maps_api.xml file and paste your API key into the YOUR_KEY section:

<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">YOUR_KEY</string>
  • Open your module-level build.gradle file and add the Google Maps dependencies:

dependencies {
compile 'com.google.android.gms:play-services-maps:11.6.2'
compile 'com.google.android.gms:play-services-location:11.6.2'

If your project refuses to compile, then make sure your development environment is up to date, by opening the Android SDK Manager and installing any available updates – in particular make sure you have the latest versions of Google Play Services and Google Repository.

This is the bare minimum required to display Google Maps content, so at this point you may want to take this project for a spin by installing it on your physical smartphone or tablet, or an AVD (Android Virtual Device). If you’re testing this project on an AVD, then you’ll need to use a system image that includes the Google APIs.

Currently this project displays a map with a marker permanently set to Sydney, Australia. This isn’t exactly going to wow your users, so let’s look at a few different ways of making this project more interesting.

Displaying the user’s address with reverse geocoding

When you include Google Maps content in your application, you typically display the user’s current location via a marker, but there’s plenty of scenarios where it’s more useful to display location as a street address. For example, if you’re booking a taxi the old-fashioned way (i.e by calling the taxi company) or arranging to meet a friend, then knowing the street you’re currently on is going to be pretty useful!

While your users could work this out for themselves by zooming in on their location marker and looking at the surrounding labels, you can provide a much better experience by presenting this information to them. This process of converting a set of longitude and latitude values into a street address, is known as reverse geocoding.

In this section, we’re going to add a button to our application that, when tapped, retrieves the device’s longitude and latitude, reverse geocodes these coordinates into an approximate street address, and then presents this information to the user.

Update your layout

Let’s start with the easy stuff, and update our user interface. When you create a project using the Google Maps Activity template, the activity_maps.xml file contains a SupportMapFragment that fills the entire screen.

I’m going to expand on this layout to include a ‘Get My Location’ button that, when tapped, updates a TextView with the reverse geocoded data.


<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.jessicathornsby.google_maps.MapsActivity" >

<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:scrollbars="vertical"
class="com.google.android.gms.maps.SupportMapFragment"/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:padding="10dp"
android:layout_alignParentBottom="true"
android:background="#ffffff" >

<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/get_location"
android:gravity="left" />

<TextView
android:id="@+id/textview"
android:layout_width="0dp"
android:layout_height="match_parent"
android:gravity="right"
android:layout_weight="1"/>

</LinearLayout>
</RelativeLayout>

Create your strings

Next, define the string resources that we’ll be using throughout this project:


//Create the button label//

<string name="get_location">Get my location</string>
<string name="address_text">"Address: %1$s"</string>

The second string resource is a placeholder that contains the following:

  • %1. A placeholder for a value. This value will either be a formatted address or a message that an error has occurred.
  • $s. The format of the placeholder value, i.e a String.

You convert latitude and longitude values into a physical address using the getFromLocation() method, which returns a list of Address objects.

The level of detail returned by getFromLocation() will vary depending on the location. Sometimes reverse geocoding may return a full address, right down to the house number; sometimes it’ll return the name of the nearest building – and occasionally it may return no information at all.

While the latter is unlikely, your application shouldn’t crash if it does encounter this scenario. Here, I’m creating a String just in case this app can’t match the coordinates to any known address:


<string name="no_address">Cannot retrieve address at this time</string>

On devices running Android 6.0 (API level 23) and higher, applications need to request permissions at runtime, and the user can then accept or deny each request, on a permission-by-permission basis.

If the user denies a permission request, then you need to communicate the impact this will have on your application. In this project, I’m going to display the following text as part of a toast:


<string name="location_permission_denied">Location permission denied. Current location unavailable.</string>

When working on your own Android projects, you may also want to disable or remove parts of your application that rely on the denied permission, for example removing items from menus, or “greying out” certain UI controls.

Add the Internet permission

Reverse geocoding requires an Internet connection, so open your project’s Manifest and add the Internet permission:


<uses-permission android:name="android.permission.INTERNET" />

Create an AyncTask

Since reverse geocoding uses the network, it has the potential to block Android’s main thread. To avoid Application Not Responding (ANR) errors and application crashes, you must perform the reverse geocoding operation off the main thread. There’s various ways of creating background threads, but I’m going to use an AsyncTask.

Create a new Java class (I’m naming mine ReverseGeo) and implement the AsyncTask:


import android.location.Address;
import java.util.ArrayList;
import android.os.AsyncTask;
import android.content.Context;
import android.location.Location;
import android.location.Geocoder;
import java.util.List;
import java.util.Locale;
import java.io.IOException;
import android.text.TextUtils;

/**
* Created by jessicathornsby on 06/12/2017.
*/

class ReverseGeo extends AsyncTask<Location, Void, String> {

private Context mContext;

//Add a parameter for the onTaskComplete interface that we’ll be creating shortly//

private OnTaskComplete mListener;

ReverseGeo(Context applicationContext, OnTaskComplete listener) {
mListener = listener;
mContext = applicationContext;

}

//Publish the results of our AsyncTask; in this instance that’s the returned address//

@Override

//Override the onPostExecute() method//

protected void onPostExecute(String address) {

//Once the AsyncTask has finished,
//call onTaskComplete and update your UI with the returned address//

mListener.onTaskComplete(address);
super.onPostExecute(address);
}

//Implement AsyncTask’s doInBackground() method,
//where we’ll convert the Location object into an address//

@Override
protected String doInBackground(Location... params) {

//Create a Geocoder object, which is a class that can perform geocoding operations//

Geocoder mGeocoder = new Geocoder(mContext,

//Localize the address//

Locale.getDefault());

//Obtain a Location object//

Location location = params[0];

//Create an empty List of Address objects, which will eventually contain the returned address//

List<Address> addresses = null;

//Create a String to hold the formatted address//

String printAddress = "";

//Obtain the list of addresses for the current location, using getFromLocation//

try {
addresses = mGeocoder.getFromLocation(
location.getLatitude(),
location.getLongitude(),

//Specify the maximum number of addresses that the TextView should display//

1);

//Catch any exceptions, for example if the network is unavailable//

} catch (IOException ioException) {
printAddress = mContext.getString(R.string.no_address);

}

//If the geocoder can't match the coordinates to an address, then return an empty list//

if (addresses.size() == 0) {
if (printAddress.isEmpty()) {

//If the address list is empty, then display the no_address string//

printAddress = mContext.getString(R.string.no_address);

}
} else {

//If the list isn’t empty, then create an ArrayList of strings//

Address address = addresses.get(0);
ArrayList<String> addressList = new ArrayList<>();

//Fetch the address lines, using getMaxAddressLineIndex,
//and then and combine them into a String//

for (int i = 0; i <= address.getMaxAddressLineIndex(); i++) {
addressList.add(address.getAddressLine(i));
}

printAddress = TextUtils.join(
",",
addressList);

}

//Return the printAddress object//

return printAddress;
}

//Create the OnTaskComplete interface, which takes a String as an argument//

interface OnTaskComplete {
void onTaskComplete(String result);
}
}

Implement ReverseGeo in MapsActivity

Next, we need to implement ReverseGeo in our project’s automatically-generated MapsActivity class, and then override the onTaskComplete() method. I’m also implementing the onClickListener so our application can respond to the user tapping the ‘Get My Location’ button.


import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.LocationCallback;
import com.google.android.gms.location.LocationResult;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Button;
import android.Manifest;
import android.content.pm.PackageManager;
import android.widget.TextView;
import android.widget.Toast;
import android.view.View;

public class MapsActivity extends AppCompatActivity implements
ReverseGeo.OnTaskComplete {

private static final int MY_PERMISSIONS_REQUEST_LOCATION = 1;
private Button button;
private TextView textview;
private boolean addressRequest;

//Create a member variable of the FusedLocationProviderClient type//

private FusedLocationProviderClient mFusedLocationClient;
private LocationCallback mLocationCallback;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);

button = findViewById(R.id.button);
textview = findViewById(R.id.textview);

//Initialize mFusedLocationClient//

mFusedLocationClient = LocationServices.getFusedLocationProviderClient(
this);

//Create the onClickListener//

button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

//Call getAddress, in response to onClick events//

if (!addressRequest) {
getAddress();

}
}
});

//Create a LocationCallback object//

mLocationCallback = new LocationCallback() {

@Override

//Override the onLocationResult() method,
//which is where this app receives its location updates//

public void onLocationResult(LocationResult locationResult) {
if (addressRequest) {

//Execute ReverseGeo in response to addressRequest//

new ReverseGeo(MapsActivity.this, MapsActivity.this)

//Obtain the device's last known location from the FusedLocationProviderClient//

.execute(locationResult.getLastLocation());
}
}
};
}

//Implement getAddress//

private void getAddress() {
if (ActivityCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]
{Manifest.permission.ACCESS_FINE_LOCATION},
MY_PERMISSIONS_REQUEST_LOCATION);
} else {
addressRequest = true;

//Request location updates//

mFusedLocationClient.requestLocationUpdates
(getLocationRequest(),
mLocationCallback,
null);

//If the geocoder retrieves an address, then display this address in the TextView//

textview.setText(getString(R.string.address_text));

}
}

//Specify the requirements for your application's location requests//

private LocationRequest getLocationRequest() {
LocationRequest locationRequest = new LocationRequest();

//Specify how often the app should receive location updates, in milliseconds//

locationRequest.setInterval(10000);
return locationRequest;
}

@Override
public void onRequestPermissionsResult(int requestCode,
String permissions[], int[] grantResults) {

switch (requestCode) {
case MY_PERMISSIONS_REQUEST_LOCATION:
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {

//If the permission request has been granted, then call getAddress//

getAddress();
} else {
Toast.makeText(this,
R.string.location_permission_denied,
Toast.LENGTH_SHORT).show();
}
break;
}
}

@Override
public void onTaskComplete(String result) {
if (addressRequest) {

//Update the TextView with the reverse geocoded address//

textview.setText(getString(R.string.address_text,
result));
}
}
}

Testing your reverse geocoding application

Let’s put this application to the test:

  • Install the updated project on your Android device.
  • Make sure you’re connected to the Internet.
  • Tap the ‘Get My Location’ button.
  • Grant the ACCESS_FINE_LOCATION request; the TextView should update to display an estimated street address.

Since we’re requesting the ACCESS_FINE_LOCATION permission at runtime, we need to test how our application handles rejection:

  • Launch your device’s ‘Settings’ application.
  • Tap ‘Apps.’
  • Select the maps application from the list.
  • Select ‘Permissions.’
  • Push the ‘Location’ slider into the ‘Off’ position.
  • Launch your maps application.
  • Tap the ‘Get My Location’ button.
  • When prompted, deny the ACCESS_FINE_LOCATION request; the application should respond by displaying a toast.

You should also test how your application functions when it has access to your location, but can’t match the coordinates to any known address. If you’re using a physical Android device, then you can test this scenario using a third party app:

  • Download an application that can spoof your location, such as the free ‘Fake GPS’ app.
  • Use this application to trick your device into believing you’re somewhere that doesn’t have a street address – the middle of the ocean is usually a safe bet!
  • Switch back to your maps application, and tap ‘Get My Location.’ The TextView should display the no_address string.

If you’re testing this project on an AVD, then you can change the device’s coordinates using the strip of buttons that appear alongside the emulator:

  • Click the three-dotted menu icon (where the cursor is positioned in the following screenshot).

  • Select ‘Location’ from the left-hand menu.
  • Enter a new set of longitude/longitude values, and click ‘Send.’
  • Press the application’s ‘Get My Location’ button; the TextView should update to display the no_address string.

Adding different map types

Any Google Maps content you include in your app will use the “normal” map style by default – but “normal” isn’t the only option!

The Google Maps API supports a few different map styles:

  • MAP_TYPE_SATELLITE. A Google Earth satellite photograph, without road or feature labels.
  • MAP_TYPE_HYBRID. A satellite photograph with road and feature labels.
  • MAP_TYPE_TERRAIN. A topographic map featuring contour lines, labels and perspective shading, with some labels.

To display anything other than a “normal” map, you’ll need to use the setMapType method:


mMap = googleMap;
mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);

Alternatively, why not give your users the freedom to switch between map styles?

In this section, we’re going to add a dropdown menu that allows your users to move between the normal, hybrid, terrain and satellite map styles, with ease.

Start by creating a menu resource:

  • Control-click your project’s ‘res’ directory and select ‘New > Android Resource File.’
  • Give this resource a name; I’m using ‘maps_menu.’
  • Open the ‘Resource type’ dropdown and select ‘Menu.’
  • Click ‘OK.’
  • Copy/paste the following code into this file:

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://ift.tt/nIICcg"
xmlns:app="http://ift.tt/GEGVYd">
<item android:id="@+id/normal"
android:title="@string/normal"
app:showAsAction="never"/>
<item android:id="@+id/hybrid"
android:title="@string/hybrid"
app:showAsAction="never"/>
<item android:id="@+id/satellite"
android:title="@string/satellite"
app:showAsAction="never"/>
<item android:id="@+id/terrain"
android:title="@string/terrain"
app:showAsAction="never"/>
</menu>

Open your project’s strings.xml file and define all the menu labels:


<string name="normal">Normal map</string>
<string name="terrain">Terrain map</string>
<string name="hybrid">Hybrid map</string>
<string name="satellite">Satellite map</string>

Next, you’ll need to implement the menu in your MapsActivity. To make this process clearer, I’ve removed all geocoding-specific code from this Activity.


import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.maps.GoogleMap;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;

public class MapsActivity extends AppCompatActivity implements
OnMapReadyCallback, GoogleApiClient.ConnectionCallbacks {

private GoogleMap mMap;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);

//Obtain the SupportMapFragment//

SupportMapFragment mapFragment = SupportMapFragment.newInstance();
getSupportFragmentManager().beginTransaction()
.add(R.id.map, mapFragment).commit();
mapFragment.getMapAsync(this);
}

//Override the onCreateOptionsMenu() method//

@Override
public boolean onCreateOptionsMenu(Menu menu) {

//Inflate the maps_menu resource//

MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.maps_menu, menu);
return true;
}

//Override the onOptionsItemSelected() method//

@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.normal:

//Use setMapType to change the map style based on the user’s selection//

mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
return true;
case R.id.hybrid:
mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
return true;
case R.id.terrain:
mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);
return true;
case R.id.satellite:
mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
return true;
default:
return super.onOptionsItemSelected(item);
}
}

@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;

if (ContextCompat.checkSelfPermission(this,
android.Manifest.permission.ACCESS_COARSE_LOCATION)
== PackageManager.PERMISSION_GRANTED) {
mMap.setMyLocationEnabled(true);
}
}

public void onConnected(Bundle bundle) {
//To do//
}

@Override
public void onConnectionSuspended(int i) {

}
}

Install the updated application on your physical Android device or AVD, open the menu, and test all the different map styles.

Adding Street View to your project

Even examining the same location across multiple map styles can’t quite compare to the experience of exploring that location from a first-person perspective – which is where Street View comes in.

In this final section, I’ll show you how to provide a tangible sense of what a location is really like, by integrating Street View into our application.

Let’s start by updating our layout:


<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.jessicathornsby.google_maps.MapsActivity" >

<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:scrollbars="vertical"
class="com.google.android.gms.maps.SupportMapFragment"/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:padding="10dp"
android:layout_alignParentBottom="true"
android:background="#ffffff" >

<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Street View"
android:onClick="launchStreetView"
android:gravity="left" />

<TextView
android:id="@+id/textview"
android:layout_width="0dp"
android:layout_height="match_parent"
android:gravity="right"
android:layout_weight="1"/>

</LinearLayout>
</RelativeLayout>

Next, I’m going to create a StreetViewActivity, where I’ll implement the Street View service. When you include a Street View panorama in your application, all the standard Street View actions are included by default, which is why the following code doesn’t contain any manual implementations of panning and zooming gestures, or navigating to adjacent panoramas, as you already get all this functionality for free!

Since I’m displaying the Street View panorama inside an Android View, I’m using StreetViewPanoramaView, which is a subclass of the View class. To display a panorama inside a Fragment, you’d use StreetViewPanoramaFragment instead.


import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.ViewGroup.LayoutParams;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.StreetViewPanoramaOptions;
import com.google.android.gms.maps.StreetViewPanoramaView;

public class StreetViewActivity extends AppCompatActivity {

//Define the LatLng value we’ll be using for the paranorma’s initial camera position//

private static final LatLng LONDON = new LatLng(51.503324, -0.119543);
private StreetViewPanoramaView mStreetViewPanoramaView;
private static final String STREETVIEW_BUNDLE_KEY = "StreetViewBundleKey";

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

//Configure the panorama by passing in a StreetViewPanoramaOptions object//

StreetViewPanoramaOptions options = new StreetViewPanoramaOptions();
if (savedInstanceState == null) {

//Set the panorama’s location//

options.position(LONDON);
}

mStreetViewPanoramaView = new StreetViewPanoramaView(this, options);
addContentView(mStreetViewPanoramaView,
new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));

Bundle mStreetViewBundle = null;
if (savedInstanceState != null) {
mStreetViewBundle = savedInstanceState.getBundle(STREETVIEW_BUNDLE_KEY);
}
mStreetViewPanoramaView.onCreate(mStreetViewBundle);
}

}

Don’t forget to add the StreetViewActivity to your Manifest:


<activity
android:name=".MapsActivity"
android:label="@string/title_activity_maps">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".StreetViewActivity"></activity>
</application>

Finally, we need to implement launchStreetView in our MapsActivity, so that android:onClick=”launchStreetView” triggers the StreetViewActivity class:


import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.maps.GoogleMap;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import android.content.Intent;
import android.view.View;

public class MapsActivity extends AppCompatActivity implements
OnMapReadyCallback, GoogleApiClient.ConnectionCallbacks {

private GoogleMap mMap;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);

SupportMapFragment mapFragment = SupportMapFragment.newInstance();
getSupportFragmentManager().beginTransaction()
.add(R.id.map, mapFragment).commit();
mapFragment.getMapAsync(this);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {

MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.maps_menu, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.normal:
mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
return true;
case R.id.hybrid:
mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
return true;
case R.id.terrain:
mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);
return true;
case R.id.satellite:
mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
return true;
default:
return super.onOptionsItemSelected(item);
}
}

@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;

if (ContextCompat.checkSelfPermission(this,
android.Manifest.permission.ACCESS_COARSE_LOCATION)
== PackageManager.PERMISSION_GRANTED) {
mMap.setMyLocationEnabled(true);
}
}

public void onConnected(Bundle bundle) {
//To do//
}

@Override
public void onConnectionSuspended(int i) {

}

public void launchStreetView(View view) {
Intent intent = new Intent(MapsActivity.this, StreetViewActivity.class);
startActivity(intent);
}
}

Install this project on your Android device, and give the ‘Street View’ button a tap. Your application should respond by launching a new Activity displaying a 360 degree panorama of the London Eye.

Wrapping Up

In this article, we explored a few ways of enhancing your app’s Google Maps content, by adding support for Street View, multiple map styles, and reverse geocoding – but these are still just a few of the features that the Google Maps API has to offer.

What Google Maps features have you used in your own projects? Let us know in the comments below!

Treasury Secretary Steve Mnuchin Seriously Claims Ignorance of CDC Banned Words Report

“It’s the first time I’m hearing of that,” he said.

During a CNN appearance, U.S. Treasury Secretary Steve Mnuchin told host Jake Tapper that he knew nothing about the reported directive from President Donald Trump’s administration for the Centers for Disease Control and Prevention, along with other divisions under the Department of Health and Human Services, to stop using a list of banned words.

“Policy analysts at the Center for Disease Control as well as other divisions at the Department of Health and Human Services were given a list of forbidden words,” Tapper said to the treasury secretary. “Why would the Trump administration tell the CDC not to use a term like ‘science-based’?”

“It’s the first time I’m hearing of that,” Mnucnin said with a straight face. “I’m not aware of the directive at all.

The banned words list reported by the Washington Post includes “vulnerable,” “diversity,” “entitlement,” “transgender,” “fetus,” “evidence-based” and “science-based.” 

Watch Mnuchin claim total ignorance below.

 

Related Stories

  • Former Fox News Analyst Tamara Holder Shares Explicit Details of Sexual Assault
  • Sarah Palin’s Son Track Palin Was Arrested in Alaska on Domestic Violence Charges
  • Watch This Conservative Slam Trump for Ignoring Russia Interference Intel Because It ‘Hurts His Little Feelings’

MSNBC Shows Scary Clip of Trump and Putin Using Exact Same Talking Points

The two appear to be synching their propaganda.

Using footage from President Donald Trump’s recent rally in Florida and Russian President Vladimir Putin’s annual media conference, MSNBC demonstrated how the two world leaders are sharing talking points.

Both leaders insulted Trump’s opposition, made grandiose claims about the stock market and claimed Trump is the victim of fake news.

Putin has spoken on the phone at least twice with the president in the last week as he blatantly vies for power over Trump by boosting his fragile ego.

Watch the clip below.

 

Related Stories

  • There’s an Insidious Strategy Behind Donald Trump’s Retweets
  • Treasury Secretary Steve Mnuchin Seriously Claims Ignorance of CDC Banned Words Report
  • Sarah Palin’s Son Track Palin Was Arrested in Alaska on Domestic Violence Charges

Why companies hiring Interns, build their BRAND faster?

Why should company hire Intern?

Increase productivity: Speaking of additional manpower, setting up an internship program allows you to take advantage of short-term support. The extra sets of hands help your employees be more productive, prevent them from becoming overburdened by side projects, as well as free them up to accomplish more creative tasks or those where higher-level, strategic thinking or expertise is required.

Take advantage of low-cost labor: Interns are an inexpensive resource. Their salaries are significantly lower than staff employees, and you aren’t obligated to pay unemployment or a severance package should you not hire them on full time.Moreover, while their wage requirements are modest, they’re among the most highly motivated members of the workforce.

Benefit your small business: When looking for full time work, the top talent often go for big-name businesses. But when seeking internships, learning is the leading draw. Many candidates feel they’ll get more hands-on training, real experience, and mentoring opportunities with smaller organizations.

Advantages of doing the Internship for a student

Get Real Work Experience
The biggest benefit of internships is that they offer a safe space for students and graduates to gain work experience. This is important because most employers are reluctant to hire someone who’s never worked before, they think that with no experience, you’ll probably be unreliable and not know what to do or how to work. Of course, this creates a vicious circle with no way out which is why lots of graduates end up in completely unrelated fields.

Internships can be a great solution to this problem as they allow students and graduates to experience a real workplace. Apart from the vocational skills that interns gain, they also get lots of soft skills which are crucial to not only finding a job but succeeding at one as well.

Get a Taste of Your Chosen Field
One of the greatest advantages of internships is that they allow people to experience their industry and chosen profession. This usually has one of two effects – makes people more excited and drives them to work hard and build a successful career, or they realize it’s not the right career for them.

Boosts Your CV
Internships can also benefit your CV as they are a foolproof way to demonstrate that you have work experience, as well as other workplace skills. The skills can be relevant to your chosen profession, which is admittedly crucial in a CV, but they could also be other skills, including communication and people skills that employers value.

Helps You Choose a Specialty
An internship can help you identify a particular area in your industry or profession that you’re interested in and help you acquire more knowledge regarding this area.

Following are the major companies across the world always hiring Interns

  1. Facebook
  2. Google
  3. Qualcomm
  4. Microsoft
  5. Morgan Stanley
  6. Apple
  7. HP
  8. CISCO
  9. Deloitte
  10. JP Morgan and Chase
  11. Amazon.com
For any Recruitment related advice and quality human resource , feel free to mail Ms Simran (Head-HR @ http://suvenconsultants.com )

This Visionary Sci-Fi Author Sees the Destruction of Human Civilization: Predatory Capitalism

Ted Chiang examines how Silicon Valley has become its own worst nightmare.

The political theorist Frederic Jameson once observed that “it has become easier to imagine the end of the world than the end of capitalism.” But what if predatory capitalism finally destroys life on earth? That’s the question posed by science fiction writer Ted Chiang, who argues that in “superintelligent AI,” Silicon Valley capitalists have “unconsciously created a devil in their own image, a boogeyman whose excesses are precisely their own.”

In a new essay for Buzzfeed, part of a series about the forces shaping our lives in 2017, the acclaimed author of “Arrival” (Stories of Your Life and Others) deconstructs our fear of artificial intelligence; specifically, that of tech titans like Tesla founder Elon Musk. For Musk, the real threat is not a malevolent computer program rising up against its creator like Skynet in the Terminator films as much as AI destroying humanity by accident. In a recent interview with Vanity Fair, Musk imagines a mechanized strawberry picker wiping out the species simply as a means of maximizing its production.

“This scenario sounds absurd to most people, yet there are a surprising number of technologists who think it illustrates a real danger. Why?” Chiang wonders. “Perhaps it’s because they’re already accustomed to entities that operate this way: Silicon Valley tech companies.”

In Musk’s hypothetical, the destruction of human civilization follows the logic of the free market.

“Consider: Who pursues their goals with monomaniacal focus, oblivious to the possibility of negative consequences? Who adopts a scorched-earth approach to increasing market share?” Chiang continues. “[The] strawberry-picking AI does what every tech startup wishes it could do—grows at an exponential rate and destroys its competitors until it’s achieved an absolute monopoly.”

Ultimately, the catastrophe Musk and others foretell has already arrived in the form of “no-holds-barred capitalism.”

“We are already surrounded by machines that demonstrate a complete lack of insight, we just call them corporations,” Chiang continues. “Corporations don’t operate autonomously, of course, and the humans in charge of them are presumably capable of insight, but capitalism doesn’t reward them for using it. On the contrary, capitalism actively erodes this capacity in people by demanding that they replace their own judgment of what ‘good’ means with ‘whatever the market decides.'”

For Chiang, the operative word is insight. Our capacity for self-reflection, or the “recognition of one’s own condition,” is what separates humans from the Googles, Facebooks and Amazons. And it is this deficiency that makes these monopolies so uniquely dangerous.

“We need for the machines to wake up, not in the sense of computers becoming self-aware, but in the sense of corporations recognizing the consequences of their behavior,” he concludes. “Just as a superintelligent AI ought to realize that covering the planet in strawberry fields isn’t actually in its or anyone else’s best interests, companies in Silicon Valley need to realize that increasing market share isn’t a good reason to ignore all other considerations.”

Read Chiang’s essay at Buzzfeed.

 

Related Stories

  • Are You Suffering from Selfitis?
  • Uber Stole Trade Secrets, Bribed Foreign Officials and Spied on Rivals, Filing Says
  • Dustin Hoffman Faces Disturbing New Allegations of Sexual Misconduct

Skill vs. Gear in Zelda – Breath of the Wild

I have played 120 hours of Zelda – Breath of the Wild now, and my main game character is advancing very nicely; I’m now able to kill boss mobs and tough mini bosses with relative ease or even farm them when required. More because I was interested in the technology than because I needed the boost I bought a couple of amiibo, which are Nintendo’s “toys-to-life” figurines: You can scan them with your controller and have the amiibo appear in your game, or trigger some sort of bonus effect. But because I was relatively advanced in the game already when I got them, they didn’t really change much.

So I was wondering how much of an impact it would make if one had those amiibo right from the start of a game. Now normally you can have only one save game in normal mode and one save game in master mode for Zelda. But that is per “profile”, so you can easily just create another profile and start a new game from scratch without affecting your main game. I did that, and it turned out you can’t use amiibo at the very start. You need to play until finishing the first shrine, and then you can turn the amiibos on in the options. And at that time the treasure chests you get from amiibo contain stuff like rusty or travelers weapons; which are still useful that early in the game compared to tree branches and bokoblin weapons, but certainly not game breaking. You need to finish the whole “tutorial”, that is all four shrines and get the paraglider, before the amiibo result in the “normal” treasures, e.g. the guardian amiibo drops guardian weapons and shields.

So while I was testing that, I had another idea: You can finish the tutorial in well under 1 hour, so how does a new character in an 1-hour old game compare to a character that has been played for 120 hours? If your first character was lost and weak, was that because you were still learning the game, or was that simply that he didn’t have the stats and gear you get from playing a long time?

So I took my new character without even exchanging the first 4 spirit orbs to the toughest place in the game, Hyrule castle; dressed in the starting shirt and trousers, and equipped with nothing more than can be found in the tutorial. And I am happy to report that I was doing quite well there: I basically cleaned out the place, except for the game end boss of course. I got the complete royal guard armor, which involves getting three pieces from the bottom, middle, and top of Hyrule castle. And I didn’t just sneak through the castle, but actually killed even tough mobs like moblins and guardians. Of course then I found lots of awesome weapons, so my new character now has a very impressive armory, much better than anything you can get from the amiibo.

In short, knowing the game helps a lot, and the best way to get great gear early is using that knowledge to loot the toughest places in the game. I probably won’t play that second character much, because doing the same 120 shrines again isn’t going to be all that fun, but it is interesting to know that in Zelda – Breath of the Wild skill beats gear.