Skip to content

Instantly share code, notes, and snippets.

Which code do you write if you want to use type inference on a variable x with the value 3? (TypeScript - 30 sec)
a. let x = 3; ***
b. let x: any = 3;
c. let x: dynamic = 3;
d. let x: number = 3;
A function has to return a string. How can you ensure that it does? (TypeScript - 25 seconds)
a. By adding "<string>" behind the return statement
add_filter(frm_setup_new_fields_vars, frm_populate_member, 20, 2);
add_filter(frm_setup_edit_fields_vars, frm_populate_member, 20, 2); //use this function on edit too
function frm_populate_member($values, $field){
if($field->id == 732 || $field->id == 733){ //replace 732 and 733 with the IDs of the fields to populate
global $wpdb;
//the Query
$the_Result = $wpdb->get_results( "SELECT concat_ws(', ', last_name, first_name) as display_name FROM wp_database.wp_wp_eMember_members_tbl where account_state = 'active' order by last_name, first_name;" );
unset($values['options']); //break the binding of any existing content in the values array
/*!
* Bootstrap Reboot v4.1.3 (https://getbootstrap.com/)
* Copyright 2011-2018 The Bootstrap Authors
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
#contact-image-content .thumb-lg {
width: 150px;
}
#contacts-grid-view-model-list .pull-left a {
margin-bottom: 5px;
}
#contacts-grid-view-model-list .thumb-sm {
margin-bottom: 4px;
#contact-image-content .thumb-lg {
width: 150px;
}
#contacts-grid-view-model-list .pull-left a {
margin-bottom: 5px;
}
#contacts-grid-view-model-list .thumb-sm {
margin-bottom: 4px;
{
"_id": "14ef335ea4a0",
"creation_date": "2018-03-23T20:28:21.458Z",
"job": "Senior Integration Specialist",
"job_location": "JLL - Chicago, IL",
"start_date" : "2019-03-23T20:28:27.153Z",
"first_name": "Bob",
"last_name": "Smith",
"email_address": "[email protected]",
"phone_number": "3522176711",
@bryanwillis
bryanwillis / agile-crm.css
Created March 25, 2018 22:00
Enhance agile crm profile cards
#contact-image-content .thumb-lg {
width: 150px;
}
#contacts-grid-view-model-list .pull-left a {
margin-bottom: 5px;
}
#contacts-grid-view-model-list .thumb-sm {
margin-bottom: 4px;
nothing