This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoginScreen extends Activity { | |
Button createButton = (Button) findViewById(R.id.uButton); | |
EditText uField = (EditText) findViewById(R.id.uField); | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_login_screen); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DataReadResult step_result = getStepData(mFitClient,buildStepRequest(date)); | |
public static DataReadResult getStepData (GoogleApiClient mClient, DataReadRequest request){ | |
PendingResult <DataReadResult> pendingResult = | |
Fitness.HistoryApi.readData(mClient,request); | |
DataReadResult dataReadResult = pendingResult.await(); | |
printStepResult(dataReadResult); | |
return dataReadResult; | |
} | |
private static void printStepResult (DataReadResult dataReadResult){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Object.keys(args).length === 1) { | |
for (let key in args) { | |
if (args.hasOwnProperty(key)) { | |
queryString += `${key}=${args[key]}`; | |
} | |
} | |
} else if (Object.keys(args).length > 1) { | |
// else if keys length is larger than one key concat the querystring | |
// like so | |
for (let key in args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* TodoTextInput.react | |
A react component that handles text input. It updates on | |
enter being pressed | |
*/ | |
import React from 'react' | |
const ENTER_KEY_CODE = 13 | |
class TodoTextInput extends React.Component { | |
constructor(props) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function plotData(x, y) | |
%PLOTDATA Plots the data points x and y into a new figure | |
% PLOTDATA(x,y) plots the data points and gives the figure axes labels of | |
% population and profit. | |
plot(x,y,'rx', 'MarkerSize', 10); | |
ylabel('Profit in $10,000s'); | |
xlabel('Population of city in 10,000s'); | |
% ====================== YOUR CODE HERE ====================== | |
% Instructions: Plot the training data into a figure using the | |
% "figure" and "plot" commands. Set the axes labels using |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* TodoTextInput.react | |
A react component that handles text input. It updates on | |
enter being pressed | |
*/ | |
import React from 'react' | |
const ENTER_KEY_CODE = 13 | |
class TodoTextInput extends React.Component { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import TodoTextInput from './TodoTextInput.react' | |
class Header extends React.Component { | |
constructor(props) { | |
super(props) | |
} | |
onSave(text) { | |
console.log(text) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ReactDOM from 'react-dom' | |
import React from 'react' | |
import Header from './components/Header.react' | |
ReactDOM.render(<Header />, document.getElementById('todo-input')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.murraycole.impressiontutorial; | |
import android.app.Activity; | |
import android.util.Log; | |
import android.view.View; | |
import android.view.ViewTreeObserver; | |
import java.util.List; | |
import java.util.WeakHashMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.murraycole.impressiontutorial; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import java.util.List; | |
public class ImpressionAdapter extends RecyclerView.Adapter<ProductViewHolder> { |
OlderNewer