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
<?php | |
function listing_post_type() { | |
$labels = array( | |
'name' => _x( 'Listing', 'Post Type studio', 'text_domain' ), | |
'singular_name' => _x( 'Listing', 'Post Type studio', 'text_domain' ), | |
'menu_name' => __( 'Listings', 'text_domain' ), | |
'parent_item_colon' => __( 'Parent Listing:', 'text_domain' ), | |
'all_items' => __( 'All Listings', 'text_domain' ), | |
'view_item' => __( 'View Listing', 'text_domain' ), | |
'add_new_item' => __( 'Add New Listing', 'text_domain' ), |
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
program simple | |
implicit none | |
real a | |
real b | |
write(*,fmt='(a)',advance='no') 'Set a to: ' | |
read*, a | |
write(*,fmt='(a)',advance='no') 'Set b to: ' | |
read*, b | |
write(*,*) 'sq(a)=',sq(a),'sq(b)=',sq(b) | |
write(*,*) 'average(a,b)=',average(a,b) |
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
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
using UnityEngine; | |
public class IniLoader { | |
public string data; | |
public int position; | |
public void load(string path) { |
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 renderPost(post) { | |
// some rendering logic | |
if ( getAdminEmails(users).indexOf(current_user.email) != -1 ) { | |
renderAdminControls(post); | |
} | |
} | |
$.getJSON('/posts',function (posts) { | |
posts.forEach( function (post) { | |
renderPost(post); | |
}); |
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 user_data = { | |
admin_users: [ | |
{ | |
role: 'admin', | |
email: 'fakeadmin1@email.com' | |
}, | |
{ | |
role: 'admin', | |
email: 'fakeadmin2@email.com' | |
}, |
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 users = [ | |
{ | |
role: 'admin', | |
email: 'fakeadmin1@email.com' | |
}, | |
{ | |
role: 'user', | |
email: 'fake2@email.com' | |
}, | |
{ |
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 users = [ | |
{ | |
role: 'admin', | |
email: 'fakeadmin1@email.com' | |
}, | |
{ | |
role: 'user', | |
email: 'fake2@email.com' | |
}, | |
{ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>0_Introduction.md</title> | |
<link rel="stylesheet" href="https://stackedit.io/style.css" /> | |
</head> |
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
class Node | |
attr_accessor :value,:next_node | |
def initialize(val,nxt) | |
@value = val | |
@next_node = nxt | |
end | |
end | |
class Stack | |
attr_accessor :data | |
def initialize(d=nil) |
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
class Image | |
def initialize(data) | |
@data = data | |
end | |
def get_image() | |
return @data.collect {|row| row.join("") }.join("\n") | |
end | |
def blur(dist=1) | |
new_data = @data.map do |r| | |
r.map do |c| |
NewerOlder