$blocks = parse_blocks( get_the_content(null, null, $id));
$output = ”;
foreach ( $blocks as $block ) {
$output .= render_block( $block );
}
echo $output;
Map: Convert the shapefile
We can convert our shapefiles to GeoJSON using following software:
MySQL SP With Cursor
CREATE PROCEDURE `sp_test`( in id int, in ofset int, in lmt int, out result int ) BEGIN DECLARE ch_done INT DEFAULT 0; declare program int; declare cur cursor for select name from users where ancestor = id LIMIT ofset, lmt; DECLARE CONTINUE HANDLER FOR NOT FOUND SET ch_done = 1; SET result = 0; open cur; start_loop: loop fetch cur into val; IF ch_done = 1 THEN LEAVE start_loop; END IF; SET result = 1; // SQL Queryies with val end loop; close cur; select result; END
Git Commands
- Caching your GitHub Credentials
- git config –global credential.helper ‘cache –timeout=300’
- Clean untracked file and directory
-
git clean -fdx
-
MySQL : Create a function to compare the two conman separated values
CREATE FUNCTION `FIND_IN_TWO_SET`(val TEXT, val2 TEXT) RETURNS int(11)
BEGIN
DECLARE output TEXT;
DECLARE inc INT;
DECLARE mach INT;
SET inc = 0;
SET mach = 0;
label1: LOOP
SET inc = inc + 1;
SET output = REPLACE(SUBSTRING(SUBSTRING_INDEX(val, ',', inc), CHAR_LENGTH(SUBSTRING_INDEX(val, ',', inc - 1)) + 1), ',', '');
IF output = '' THEN
SET output = null;
LEAVE label1;
END IF;
if find_in_set(output, val2) > 0 THEN
SET mach = 1;
LEAVE label1;
END IF;
ITERATE label1;
END LOOP label1;
RETURN mach;
END