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, { Component, PropTypes } from 'react'; | |
export default class GoogleAd extends Component { | |
static propTypes = { | |
client: PropTypes.string, | |
slot: PropTypes.string, | |
format: PropTypes.string, | |
wrapperDivStyle: PropTypes.object | |
} |
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
passport.use(new GoogleStrategy({ | |
clientID: configAuth.googleAuth.clientID, | |
clientSecret: configAuth.googleAuth.clientSecret, | |
callbackURL: configAuth.googleAuth.callbackURL, | |
passReqToCallback: true | |
}, | |
function(req, accessToken, refreshToken, params, profile, done) { | |
/* | |
params = { | |
access_token: 'Long_string', |
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
const User = require("../models/users.js"); | |
const google = require("googleapis"); | |
const OAuth2 = google.auth.OAuth2; | |
const auth = require("./auth"); | |
const moment = require("moment"); | |
// create auth client | |
const oauth2Client = new OAuth2( | |
auth.googleAuth.clientID, | |
auth.googleAuth.clientSecret, |
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
const { checkToken } = require("../services/token-validator"); | |
// create the router | |
const apiRouter = express.Router(); | |
// tell the router to use checkToken function | |
apiRouter.use(checkToken); | |
// create routes | |
const routes = () => { |
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
license: mit |
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, { Component } from 'react'; | |
import DatePicker from 'react-datepicker'; | |
import moment from 'moment'; | |
import 'react-datepicker/dist/react-datepicker.css'; | |
import DatePickerCustomInput from './datepicker_custom_input'; | |
class RenderDatePicker extends 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
import React, { Component } from 'react'; | |
import moment from 'moment'; | |
// import { formatDateInputs } from '../../utils/helper_functions'; | |
const formatDateInputs = (value) => { | |
let input = value || ''; | |
input = input.replace(/\D/g, ''); | |
input = input.substring(0, 8); | |
const size = input.length; |
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 MyFragment extends Fragment { | |
EditText dateOfBirthET; | |
String selectedDate; | |
public static final int REQUEST_CODE = 11; // Used to identify the result | |
private OnFragmentInteractionListener mListener; | |
public MyFragment() { | |
// Required empty public constructor |
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 DatePickerFragment extends AppCompatDialogFragment implements DatePickerDialog.OnDateSetListener { | |
private static final String TAG = "DatePickerFragment"; | |
final Calendar c = Calendar.getInstance(); | |
@Override | |
public Dialog onCreateDialog(Bundle savedInstanceState) { | |
// Set the current date as the default date | |
final Calendar c = Calendar.getInstance(); | |
int year = c.get(Calendar.YEAR); |
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.blehr.datepickerexample; | |
import android.text.Editable; | |
import android.text.TextWatcher; | |
import java.util.Locale; | |
public class SsnMask implements TextWatcher { | |
private static final int MAX_LENGTH = 9; |
OlderNewer