Skip to content

Instantly share code, notes, and snippets.

View jakirseu's full-sized avatar

Jakir Hossain jakirseu

View GitHub Profile
<?php
global $wpdb;
$result = $wpdb->get_results('SELECT * FROM wp_frm_items LIMIT 10');
foreach( $result as $results ) {
echo ("<li>" . $results->name ."</li>");
}
?>
@jakirseu
jakirseu / genesis-template-category.php
Created February 4, 2017 13:09
Simple genesis page template to show post from a category.
<?php
/**
* Template Name: General Template
* Description: Used as a page template to show page contents, followed by a loop
* through the "General" category
*/
// Add our custom loop
add_action( 'genesis_loop', 'cd_goh_loop' );
function cd_goh_loop() {
$args = array(
// https://premium.wpmudev.org/blog/wordpress-theme-customization-api/
$wp_customize->add_section(
'mytheme_footer_options',
array(
'title' => __( 'Background Video URL', 'zerif-lite' ),
'priority' => 1,
'capability' => 'edit_theme_options',
'description' => __('Change footer options here.', 'zerif-lite'),
)
);
#include <stdio.h>
int main ()
{
FILE * MyFile;
char string[1000];
MyFile = fopen ("F:\\myfile.txt","r+");
while(! feof(MyFile))
{
#include <stdio.h>
int main ()
{
FILE * MyFile;
char string[1000];
MyFile = fopen ("myfile.txt","r+");
while(! feof(MyFile))
{
fscanf(MyFile,"%s",string);
#include <stdio.h>
int main ()
{
FILE * MyFile;
MyFile = fopen ("F:\myfile.txt","a");
if (MyFile!=NULL)
{
fputs ("Writing to a file using 'fopen' example.",MyFile);
fclose (MyFile);
}
#include <stdio.h>
int main ()
{
FILE * MyFile;
char string[10];
MyFile = fopen ("myfile.txt","a");
fputs ("Writing to a file using fopen. \n",MyFile);
fclose (MyFile);
#include <stdio.h>
int main ()
{
FILE * MyFile;
char string[10];
MyFile = fopen ("myfile.txt","w");
fputs ("Writing to a file using fopen.",MyFile);
fclose (MyFile);
typedef struct nodes {
int val;
struct nodes * next;
struct nodes * prev;
} node;
#include<stdlib.h>
#include<stdio.h>
typedef struct nodes {
int val;
struct nodes * next;
} node;
void main() {
node * curr, * head;