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
$(document).ready(function(){ | |
$.each($.browser, function(i, val) { | |
if(i=="mozilla") | |
// alert("Ikenna Do stuff for firefox 3 Now now") | |
$('#header').before('<br/><br/>'); | |
}); | |
$("#loading").ajaxStart(function(){ | |
$(this).append("<p><img src='/images/ajax-loader-2.gif' border='0' align='center' /></p>"); |
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
var all_countries = ['---Select a country---','United Kingdom','United States','Canada', 'Austria', 'Belgium', 'Bulgaria', 'Cyprus', 'Czech Republic', 'Denmark', 'Estonia', 'Finland', 'France', 'Germany', 'Greece', 'Hungary', 'Italy', 'Latvia', 'Lithuania', 'Luxembourg', 'Malta', 'Netherlands', 'Poland', 'Portugal', 'Romania', 'Slovakia', 'Slovenia', 'Spain', 'Sweden', 'Honduras','El Salvador','Haiti','Jamaica', 'Guyana','Afghanistan', 'Albania', 'Algeria', 'Andorra', 'Angola', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Australia', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belize', 'Benin', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'Brunei Darussalam', 'Burkina Faso', 'Burma', 'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Central African Republic', 'Chad', 'Chile', 'China', 'Colombia', 'Comoros', 'Congo', 'Democratic Republic of the Congo', 'Costa Rica', 'Côte d\'Ivoire', 'Croatia', 'Cuba', 'Djibouti', 'Dominica', 'Dominican Republ |
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
-- DELIMITER $$ | |
DELIMITER $$ | |
-- DROP PROCEDURE IF EXISTS UPDATE_COL_COUNT $$ | |
DROP PROCEDURE IF EXISTS UPDATE_COL_COUNT $$ | |
CREATE PROCEDURE UPDATE_COL_COUNT(NEW_TAXO_ID INTEGER, NEW_COUNT INTEGER) | |
BEGIN | |
SET @dyn_sql=CONCAT( | |
'UPDATE ' , 'WP_TERM_TAXONOMY', | |
' SET ' , 'COUNT', ' = ? | |
WHERE ' , 'TERM_TAXONOMY_ID', ' = ?'); |
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
require 'rubygems' | |
require 'mysql' | |
mysql = Mysql.real_connect("localhost", "root", "pass", "db") | |
results = mysql.query("select wp_term_taxonomy.term_taxonomy_id as taxo_id, count(*) as count from wp_term_taxonomy | |
left join wp_term_relationships on wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id | |
where (wp_term_taxonomy.parent = 6 or wp_term_taxonomy.term_id = 6) group by term_id;") | |
results.each { |e| | |
mysql.query("UPDATE WP_TERM_TAXONOMY SET COUNT = #{e[1]} WHERE WP_TERM_TAXONOMY.TERM_TAXONOMY_ID = #{e[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
$(function() { | |
// var pathArray = window.location.pathname.split("/") | |
console.log(GetAlbums.getUrlVars()["name"]) | |
// if (typeof GetAlbums.getUrlVars()["name"] === "undefined") | |
// window.location.pathname = "/Stuff" | |
//for(i=0; i<= pathArray.length; i++){ | |
// } | |
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
/* jquery code for Contact form overlay starts here */ | |
var location = window.location; | |
$("#cpage").val(location); | |
// console.log("Current href: "+location); | |
var email = $("a[href^='mailto:']").text(); | |
$("a[href^='mailto:']").attr('id', 'messagewindow'); | |
$("a[href^='mailto:']").attr('href', '#'); | |
if(email == ""){ |
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
// http://localhost:8080/index?id=546&name=kengimel | |
var id = myVars.getUrlVars()["id"]; | |
var name = myVars.getUrlVars()["name"]; | |
console.log("ID is currently this value: "+id); | |
console.log("Name is currently this value: "+name); | |
var myVars= { | |
getUrlVars: function() { |
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
var s = document.createElement('script'); | |
s.setAttribute('src', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'); | |
document.body.appendChild(s); | |
s.onload=function(){ | |
// alert("hello") | |
//Js code | |
}; | |
void(s); |
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
// Taken from the programming in Scala book second edition page 138 | |
// Returns a row as a sequence | |
def makeRowSeq(row: int) = | |
for (col <- 1 to 10) yield { | |
val prod = (row * col).toString | |
val padding = " " *(4 - prod.length) | |
padding + prod | |
} |
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
jQuery.fn.stripTags = function() { | |
return this.replaceWith( this.html().replace(/<\/?[^>]+>/gi, '') ); | |
}; | |
$("#any").stripTags(); |
OlderNewer