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
<?php | |
if ( ! function_exists( 'passim_include_comments_in_templates' ) ) { | |
/** | |
* Function which includes comments templates on pages/posts | |
*/ | |
function passim_include_comments_in_templates() { | |
// Include comments template | |
comments_template(); |
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
class Plugins_Disabler { | |
/** | |
* Maps the plugins to disable in a given URL regex match. | |
* | |
* @var array | |
*/ | |
private static $url_plugin_map = [ | |
'/?wc-ajax=update_order_review' => ['bh-wp-account-and-login-ux/bh-wp-account-and-login-ux.php'], | |
]; |
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
bets.map((bet) => { | |
user.find({_id: bet.owner}, (err,user) => { | |
bet.ownerObj = user | |
}) | |
}) |
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
betSchema.virtual('toWin').get(function() { | |
return Number(this.backing/this.odds + this.backing/this.odds/this.odds).toFixed(2) | |
}) | |
!== | |
betSchema.virtual('toWin').get(() => Number(this.backing/this.odds + this.backing/this.odds/this.odds).toFixed(2)) |
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
console.log(result) | |
/* | |
{ | |
_id: 5f6e2ef1ecc6f0402afbbccb, | |
owner_id: '5f6e2ed8ecc6f0402afbbcca', | |
name: 'Schmid gewinnt gegen Wagner Tischtennis', | |
odds: 3, | |
backing: 200, | |
accepted: false, |
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 users.count > 0 { | |
if friendAttendees.count > 0 { | |
attendeesString.append(getYouOrFriendString(uid: friendAttendees[0].uid!, userName: friendAttendees[0].name)) | |
} | |
if friendAttendees.count > 1 { | |
attendeesString.append(getYouOrFriendString(uid: friendAttendees[1].uid!, userName: friendAttendees[1].name)) | |
} | |
if strangerAttendeeCount > 0 { |
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
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
IQKeyboardManager.shared.enable = true | |
IQKeyboardManager.shared.enableAutoToolbar = false | |
FirebaseApp.configure() | |
Messaging.messaging().delegate = self | |
UNUserNotificationCenter.current().delegate = self | |
let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] | |
UNUserNotificationCenter.current().requestAuthorization(options: authOptions,completionHandler: {_, _ in }) |
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
<?php | |
namespace App\Model; | |
class igUserInfoModel { | |
public $username; | |
public $status; | |
public $following_count; | |
public $follower_count; | |
public $media_count; | |
public $storiesWatched; |
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
class Example { | |
private $date = date('Y-m-d H-i-s', time()); | |
function exampleFunc() { | |
$newDate = $this->date; | |
echo $newDate | |
} | |
} |
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
$form = $this->createFormBuilder() | |
->add('username', TextType::class) | |
->add('password', TextType::class) | |
->add('save', SubmitType::class, ['label' => 'Add Account']) | |
->getForm(); | |
$twoFactorform = $this->createFormBuilder() | |
->add('Code', TextType::class) | |
->getForm(); |