This file contains hidden or 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
$xpath = new DOMXpath($doc); | |
$elements = $xpath->query("//*[@style]");//things with a style | |
$withBadStyles=Array(); | |
foreach($elements as $element){ | |
echo $element->getAttribute("style"); | |
echo "\n"; | |
$elementStyle=$element->getAttribute("style"); | |
if(strpos($elementStyle,"position")!==False){ | |
$withBadStyles[]=$element; | |
} |
This file contains hidden or 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 | |
$myhtml= <<< HTML | |
<HTML> | |
<p><br><iframe scrolling="no" src="https://w.soundcloud.com/player/?AAA=https%3A//api.soundcloud.com/tracks/147305734&color=ff5500&&hide_related=false&show_comments=true&show_user=true&show_reposts=false" frameborder="no" height="166" width="100%">fsdgds</iframe></p><p>This is the first audio post on the site<br></p> | |
<a href="exumple.com">Zoo</a> | |
<iframe scrolling="no" src="https://w.soundcloud.com/player/?BBB=https%3A//api.soundcloud.com/tracks/147305734&color=ff5500&&hide_related=false&show_comments=true&show_user=true&show_reposts=false" frameborder="no" height="166" width="100%">fsdgds</iframe> | |
<a href="example.com">moo</a> | |
<iframe scrolling="no" src="http://www.yeutube.com/embedr/?CCC=https%3A//api.soundcloud.com/tracks/147305734&color=ff5500&&hide_related=false&show_comments=true&show_user=true&show_reposts=false" frameborder="no" height="166" width="100%">fsdgds</iframe> |
This file contains hidden or 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
kids = c("john","jade","dave","rose","jane","jake","dirk","roxy") | |
gender = c(1,0,1,0,0,1,1,0) | |
moon = c(1,1,0,0,1,1,0,0) | |
#1 codes for male, 0 codes for female | |
#1 codes for prospit, 0 codes for derse | |
#the pairs of kids are ordered in the same order as in http://pastebin.com/QCpBgTxD |
This file contains hidden or 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 re | |
import operator | |
import math | |
removeApostr=re.compile(r"'")#to remove apostrophes. | |
removeDigits=re.compile(r"[0-9]")#to remove digits | |
removeNonAlpha=re.compile(r"[^\w]")#to remove digits | |
removeNull=re.compile(r"\x00") | |
This file contains hidden or 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
(most of the stuff before paragraph 8 might not be neccesary. Maybe just skip to paragraph 8 or 7? This is paragraph 0.) | |
Ok, so, this document is meant to be a general description of what sort of things each post will need to store in order | |
for it to be compatible with tumblr's theme system. (note to you: maybe double check the legality of using their system? I suspect it is legal to support their theme system, but you should probably check) | |
There are a fair number of things on here, and some of them aren't things you probably need to store per post, because I got a little carried away when making this list. | |
Due to the large number of things on here, it might be a bit daunting to try to implement them all when making themes render. However, it so happens that much of it is set up such that if you roll out some features later than others, it shouldn't make parts of the theme that are not supported yet have problems! | |
This is because of the {block:<something>}{/block:<something>} system. |
This file contains hidden or 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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |