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 flattenArray (arr) { | |
return arr.reduce(function (a, b) { | |
return Array.isArray(b) ? a.concat(flattenArray(b)) : a.concat(b) | |
}, []) | |
} |
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 self-hosted embeds (images, iframes, scripts, etc.) | |
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://yoursite.com', 'https://yoursite.com'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://www.yoursite.com', 'https://www.yoursite.com'); | |
# Update internal pingbacks | |
UPDATE wp_comments SET comment_author_url = REPLACE(comment_author_url, 'http://yoursite.com', 'https://yoursite.com'); | |
UPDATE wp_comments SET comment_author_url = REPLACE(comment_author_url, 'http://www.yoursite.com', 'https://www.yoursite.com'); | |
# Update YouTube embeds | |
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://www.youtube.com', 'https://www.youtube.com'); |
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
#include <bits/stdc++.h> | |
using namespace std; | |
int ack(int m, int n){ | |
int ans; | |
if( m == 0 ) ans = n + 1; | |
else if( n == 0 ) ans = ack(m - 1, 1); | |
else ans = ack(m - 1, ack(m, n-1)); | |
return (ans); | |
} | |
int main(){ |