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 fetchFilteredRecords(val) | |
{ | |
if(val=="custom") | |
{ | |
$("#custom_filtering").show(); | |
} | |
else | |
{ |
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
Selectively dumping data with mysqldump | |
http://www.electrictoolbox.com/mysqldump-selectively-dump-data/ | |
mysqldump is a command line tool for outputting table structures and data and can be used for backups etc. By default mysqldump will dump all data from a table, but it is possible to select which data to be exported with mysqldump. This post looks at how to do this. | |
The examples in this post have a table called "mytable" in a database called "test". mytable has three columns: mytable_id, category_id and name, and we will be selectively exporting data that matches a specific category_id. | |
Using mysqldump to dump all data from the table would look like this, subsituting [username] for your username (the -t flag suppresses the table creation sql from the dump): |
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
how to add a border to your font. | |
The right answer is: | |
#element { | |
color: yellow; | |
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; | |
} |
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
maxDateType: Date or Number or String | |
Default: null | |
The maximum selectable date. When set to null, there is no maximum. | |
Multiple types supported: | |
• Date: A date object containing the maximum date. | |
• Number: A number of days from today. For example 2 represents two days from today and -1 represents yesterday. | |
• String: A string in the format defined by the dateFormat option, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" represents one month and seven days from today. | |
Code examples: | |
Initialize the datepicker with the maxDate option specified: | |
1 $( ".selector" ).datepicker({ maxDate: "+1m +1w" }); |
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
<script src="js/jquery-1.7.2.min.js"></script> | |
<script> | |
$(document).ready(function() | |
{ | |
$('#password').attr('placeholder','Password'); | |
$('#email').attr('placeholder','E-mail'); | |
}); | |
</script> |
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
Backslash sequences | |
regular expressions backslash sequences | |
A backslash sequence is a sequence of characters, the first one of which is a backslash. Perl ascribes special meaning to many such sequences, and some of these are character classes. That is, they match a single character each, provided that the character belongs to the specific set of characters defined by the sequence. | |
Here's a list of the backslash sequences that are character classes. They are discussed in more detail below. (For the backslash sequences that aren't character classes, see perlrebackslash.) | |
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
Sequence Note Description | |
[...] [1] Match a character according to the rules of the | |
bracketed character class defined by the "...". | |
Example: [a-z] matches "a" or "b" or "c" ... or "z" | |
[[:...:]] [2] Match a character according to the rules of the POSIX | |
character class "..." within the outer bracketed | |
character class. Example: [[:upper:]] matches any | |
uppercase character. | |
(?[...]) [8] Extended bracketed character class | |
\w [3] Match a "word" character (alphanumeric plus "_", plus |
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
get last word in URL and delete what is not necessary | |
if in $last_word you find also -0.htm then delete -0.htm | |
I explain my $last_word now shows test-0.htm | |
But I do not need -0.htm | |
I only need "test". | |
How do I say in PHP to delete -0.html and to grab only "test". | |
$last_word="-0.html"; |
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
ol li have left margin and can't left align | |
Solution: | |
<style type="text/css"> | |
ol, ol li { margin-left:0; padding-left:0; list-style-position:inside;} | |
</style> |
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
Useful HTML Character Entities | |
Result Description Entity Name Entity Number | |
non-breaking space   | |
< less than < < | |
> greater than > > | |
& ampersand & & | |
¢ cent ¢ ¢ | |
£ pound £ £ | |
¥ yen ¥ ¥ |
OlderNewer