Blessing Mashoko mashcom
-
Midlands State University
- Gweru, Zimbabwe
- Sign in to view email
- https://bmashoko.wordpress.com
View .htaccess
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
View wp_get_children.php
<?php | |
$id = the_ID(); | |
while ( have_posts() ) : the_post(); | |
$gp_args = array( | |
'post_type' => 'page', | |
'post_parent' => $id, | |
'order' => 'ASC', | |
'orderby' => 'menu_order', | |
'posts_per_page' => -1 | |
); |
View pointer.c
#include <stdio.h> | |
int main(int argc, char * argv[]){ | |
int ages[]={12,56,23,34,51}; | |
char *name[]={"blessing","tawanda","prosper","simba","titi"}; | |
int count=sizeof(ages)/sizeof(int); | |
int i=0; |
View forloop.c
# include <stdio.h> | |
int main(int argc, char * argv[]){ | |
int i=0; | |
// go through each string in argv | |
// why am I skipping argv[0]? | |
for(i = 1; i < argc; i++) { | |
printf("arg %d: %s\n", i, argv[i]); |
View arrays.c
#import <stdio.h> | |
int main(int argc, char * argv[]){ | |
int areas[]={10,67,7,90,89}; | |
printf("the size of ints id %ld",sizeof(int)); | |
printf("the first character of array is %d",areas[0]); | |
return 0; | |
}; |
View files.py
#read file | |
# calculate trajetory | |
# @author: Mashoko Blessing | |
# @ http://www.facebook.com/blessing.mashcom | |
# @mashcom digimedia http://www.hookd-up.com | |
import os | |
def isFileAvailable(myfile): | |
if(os.path.isfile(myfile)): |
View factorial.py
# calculate factorial | |
# @author: Mashoko Blessing | |
# @http://www.facebook.com/blessing.mashcom | |
# @mashcom digimedia http://www.hookd-up.com | |
#email: bmashcom@hotmail.com | |
def factorial(x): | |
if(x==0): | |
return 1 | |
else: |
View trajectory.py
# calculate trajetory | |
# @author: Mashoko Blessing | |
# @ http://www.facebook.com/blessing.mashcom | |
# @mashcom digimedia http://www.hookd-up.com | |
from math import sin,cos,pi | |
def calculateTraf(angle, velocity ): | |
#defining gravity |