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
add_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' ); | |
function custom_remove_woo_checkout_fields( $fields ) { | |
// remove billing fields | |
unset($fields['billing']['billing_first_name']); | |
unset($fields['billing']['billing_last_name']); | |
unset($fields['billing']['billing_company']); | |
unset($fields['billing']['billing_address_1']); | |
unset($fields['billing']['billing_address_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
# .htaccess main domain to subdirectory redirect | |
# Do not change this line. | |
RewriteEngine on | |
# Change example.com to be your main domain. | |
RewriteCond %{HTTP_HOST} ^(www.)?example.com$ | |
# Change 'subdirectory' to be the directory you will use for your main domain. | |
RewriteCond %{REQUEST_URI} !^/subdirectory/ | |
# Don't change the following two lines. | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d |
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
''' API CALL To SEND Data ''' | |
import requests | |
class Client_Device(object): | |
BASE_URL = 'http://92.168.10.12:8000/api/' #change to your IP address as needed | |
def send_temperature(self, id, temperature): | |
url = self.BASE_URL + 'temperature' # Set destination URL here | |
post_fields = {'patient_id': id, 'temperature': temperature} # Set POST fields here |
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.houseofdoyens.ultrahdplayer20; | |
import android.Manifest; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.pm.PackageManager; | |
import android.graphics.Color; | |
import android.graphics.drawable.ColorDrawable; | |
import android.media.AudioManager; | |
import android.media.MediaPlayer; |
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
# Single Perceptron | |
import decimal | |
import random | |
def randfloat(): | |
decimal.getcontext().prec = 3 # 3decimal points enough | |
return decimal.Decimal(0) + decimal.Decimal(random.uniform(-1, 1)) | |
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
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home'; | |
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
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
body{ | |
} | |
h1{ | |
} | |
h2{ | |
} | |
h3{ |
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
SELECT * FROM wp_posts p, wp_postmeta m1, wp_postmeta m2 | |
WHERE p.ID = m1.post_id and p.ID = m2.post_id | |
AND m1.meta_key = 'key1' AND m1.meta_value = 'value1' | |
AND m2.meta_key = 'key2' AND m2.meta_value = "value2" |
NewerOlder