text:
This is a basic setup of dotfiles forked from
[Zach Holman's dotfiles](https://github.com/holman/dotfiles).

Biased towards Ruby/Rails development on OS X.  I added configuration for
[GNU Screen](http://www.gnu.org/software/screen/), my preferred screen manager.
Since vim plugins are being managed by vundle, I am only tracking vimrc in this
project.  [Go here](https://github.com/gmarik/vundle) for more info on vundle.

## dotfiles

Your dotfiles are how you personalize your system. These are mine. The very
prejudiced mix: OS X, zsh, Ruby, Rails, git, homebrew, rvm, vim. If you
match up along most of those lines, you may dig my dotfiles.

I was a little tired of having long alias files and everything strewn about
(which is extremely common on other dotfiles projects, too). That led to this
project being much more topic-centric. I realized I could split a lot of things
up into the main areas I used (Ruby, git, system libraries, and so on), so I
structured the project accordingly.

If you're interested in the philosophy behind why projects like these are
awesome, you might want to [read my post on the
subject](http://zachholman.com/2010/08/dotfiles-are-meant-to-be-forked/).

## install

### Prereqs

* zsh as current shell
  *  I used the one installed with macOS and made it my default by running `chsh -s /bin/zsh`
     http://scottlab.ucsc.edu/xtal/shells.html
  *  vundle is really angry until it is setup
  *  need to commit an empty vim/vim.symlink directory

* Had to set git's global gitignore file `git config --global core.excludesfile
  ~/.gitignore`

- `git clone git://github.com/alimi/dotfiles ~/.dotfiles`
- `cd ~/.dotfiles`
- `rake install`

The install rake task will symlink the appropriate files in `.dotfiles` to your
home directory. Everything is configured and tweaked within `~/.dotfiles`,
though.

The main file you'll want to change right off the bat is `zsh/zshrc.symlink`,
which sets up a few paths that'll be different on your particular machine.

## topical

Everything's built around topic areas. If you're adding a new area to your
forked dotfiles — say, "Java" — you can simply add a `java` directory and put
files in there. Anything with an extension of `.zsh` will get automatically
included into your shell. Anything with an extension of `.symlink` will get
symlinked without extension into `$HOME` when you run `rake install`.

## what's inside

A lot of stuff. Seriously, a lot of stuff. Check them out in the file browser
above and see what components may mesh up with you. Fork it, remove what you
don't use, and build on what you do use.

## components

There's a few special files in the hierarchy.

- **bin/**: Anything in `bin/` will get added to your `$PATH` and be made
  available everywhere.
- **topic/\*.zsh**: Any files ending in `.zsh` get loaded into your
  environment.
- **topic/\*.symlink**: Any files ending in `*.symlink` get symlinked into
  your `$HOME`. This is so you can keep all of those versioned in your dotfiles
  but still keep those autoloaded files in your home directory. These get
  symlinked in when you run `rake install`.
- **topic/\*.completion.sh**: Any files ending in `completion.sh` get loaded
  last so that they get loaded after we set up zsh autocomplete functions.

## add-ons

There are a few things I use to make my life awesome. They're not a required
dependency, but if you install them they'll make your life a bit more like a
bubble bath.

- If you want some more colors for things like `ls`, install grc: `brew install
  grc`.
- If you install the excellent [rvm](http://rvm.beginrescueend.com) to manage
  multiple rubies, your current branch will show up in the prompt. Bonus.

## bugs

I want this to work for everyone; that means when you clone it down it should
work for you even though you may not have `rvm` installed, for example. That
said, I do use this as *my* dotfiles, so there's a good chance I may break
something if I forget to make a check for a dependency.

If you're brand-new to the project and run into any blockers, please
[open an issue](https://github.com/holman/dotfiles/issues) on this repository
and I'd love to get it fixed for you!

## thanks

I forked [Ryan Bates](http://github.com/ryanb)' excellent
[dotfiles](http://github.com/ryanb/dotfiles) for a couple years before the
weight of my changes and tweaks inspired me to finally roll my own. But Ryan's
dotfiles were an easy way to get into bash customization, and then to jump ship
to zsh a bit later. A decent amount of the code in these dotfiles stem or are
inspired from Ryan's original project.


text:
int a;
int &b = a;
int *c;
void f1(int a);
void f2(int *b);
void f3(const int &c);
void f4(int const &d);

// Don't warn on implicit operator= in c++11 mode.
class A {
  virtual void f() {}
};
// Don't warn on rvalue-references.
struct A2 {
  A2(A2&&) = default;
  void f(A2&&) {}
};

// Don't warn on iostream parameters.
namespace xxx {
class istream { };
class ostringstream { };
}
void g1(xxx::istream &istr);
void g1(xxx::ostringstream &istr);

void g1(int &a);
// CHECK-MESSAGES: [[@LINE-1]]:14: warning: non-const reference parameter 'a', make it const or use a pointer [google-runtime-references]

struct s {};
void g2(int a, int b, s c, s &d);
// CHECK-MESSAGES: [[@LINE-1]]:31: warning: non-const reference parameter 'd', {{.*}}

typedef int &ref;
void g3(ref a);
// CHECK-MESSAGES: [[@LINE-1]]:13: warning: non-const reference {{.*}}

void g4(int &a, int &b, int &);
// CHECK-MESSAGES: [[@LINE-1]]:14: warning: non-const reference parameter 'a', {{.*}}
// CHECK-MESSAGES: [[@LINE-2]]:22: warning: non-const reference parameter 'b', {{.*}}
// CHECK-MESSAGES: [[@LINE-3]]:30: warning: non-const reference parameter at index 2, {{.*}}

class B {
  B(B& a) {}
// CHECK-MESSAGES: [[@LINE-1]]:8: warning: non-const reference {{.*}}
  virtual void f(int &a) {}
// CHECK-MESSAGES: [[@LINE-1]]:23: warning: non-const reference {{.*}}
  void g(int &b);
// CHECK-MESSAGES: [[@LINE-1]]:15: warning: non-const reference {{.*}}

  // Don't warn on the parameter of stream extractors defined as members.
  B& operator>>(int& val) { return *this; }
};

// Only warn on the first declaration of each function to reduce duplicate
// warnings.
void B::g(int &b) {}

// Don't warn on the first parameter of stream inserters.
A& operator<<(A& s, int&) { return s; }
// CHECK-MESSAGES: [[@LINE-1]]:25: warning: non-const reference parameter at index 1, {{.*}}

// Don't warn on either parameter of stream extractors. Both need to be
// non-const references by convention.
A& operator>>(A& input, int& val) { return input; }

// Don't warn on lambdas.
auto lambda = [] (int&) {};

// Don't warn on typedefs, as we'll warn on the function itself.
typedef int (*fp)(int &);

// Don't warn on function references.
typedef void F();
void g5(const F& func) {}
void g6(F& func) {}

template<typename T>
void g7(const T& t) {}

template<typename T>
void g8(T t) {}

void f5() {
  g5(f5);
  g6(f5);
  g7(f5);
  g7<F&>(f5);
  g8(f5);
  g8<F&>(f5);
}

// Don't warn on dependent types.
template<typename T>
void g9(T& t) {}
template<typename T>
void g10(T t) {}

void f6() {
  int i;
  float f;
  g9<int>(i);
  g9<const int>(i);
  g9<int&>(i);
  g10<int&>(i);
  g10<float&>(f);
}

// Warn only on the overridden methods from the base class, as the child class
// only implements the interface.
class C : public B {
  C();
  virtual void f(int &a) {}
};

// Don't warn on operator<< with streams-like interface.
A& operator<<(A& s, int) { return s; }

// Don't warn on swap().
void swap(C& c1, C& c2) {}

// Don't warn on standalone operator++, operator--, operator+=, operator-=,
// operator*=, etc. that all need non-const references to be functional.
A& operator++(A& a) { return a; }
A operator++(A& a, int) { return a; }
A& operator--(A& a) { return a; }
A operator--(A& a, int) { return a; }
A& operator+=(A& a, const A& b) { return a; }
A& operator-=(A& a, const A& b) { return a; }
A& operator*=(A& a, const A& b) { return a; }
A& operator/=(A& a, const A& b) { return a; }
A& operator%=(A& a, const A& b) { return a; }
A& operator<<=(A& a, const A& b) { return a; }
A& operator>>=(A& a, const A& b) { return a; }
A& operator|=(A& a, const A& b) { return a; }
A& operator^=(A& a, const A& b) { return a; }
A& operator&=(A& a, const A& b) { return a; }

namespace whitelist {
class A {};
class B {};
void f7(A &);
void f8(B &);
}
void f9(whitelist::A &);
void f10(whitelist::B &);

redpajama_set_name: RedPajamaGithub


text:
import tensorflow as tf

def weight_variable(shape):
  initial = tf.truncated_normal(shape, stddev=0.1)
  return tf.Variable(initial)

def bias_variable(shape):
  initial = tf.constant(0.1, shape=shape)
  return tf.Variable(initial)

def conv2d(x, W):
  return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME')

def conv3d(x, W):
  return tf.nn.conv3d(x, W, strides=[1, 1, 1, 1, 1], padding='SAME')

def max_pool_2x2(x):
  return tf.nn.max_pool(x, ksize=[1, 2, 2, 1],
                        strides=[1, 2, 2, 1], padding='SAME')

def max_pool3d_2x2x2(x):
  return tf.nn.max_pool3d(x, ksize=[1, 2, 2, 2, 1],
                          strides=[1, 2, 2, 2, 1], padding='SAME')

def bn(x, training):
  return tf.layers.batch_normalization(x, axis=-1, training=training
                                       )
def gaussian_noise_layer(input_layer, std):
  noise = tf.random_normal(shape=tf.shape(input_layer), mean=0.0, stddev=std, dtype=tf.float32)
  return input_layer + noise

if __name__ == '__main__':
  import numpy as np
  inp = tf.placeholder(tf.float32, shape=[None, 8], name='input')
  noise_level = tf.placeholder(tf.float32)
  noise = gaussian_noise_layer(inp, noise_level)
  noise.eval(session=tf.Session(), feed_dict={inp: np.zeros((4, 8)), noise_level:0.1})


text:
<?php
namespace dash\db;

/** options managing **/
class options
{
	/**
	 * this library work with options table
	 * v1.0
	 */

	/**
	 * insert new recrod in options table
	 * @param array $_args fields data
	 * @return mysql result
	 */
	public static function insert()
	{
		\dash\db\config::public_insert('options', ...func_get_args());
		return \dash\db::insert_id();
	}

	/**
	 * insert multi record in one query
	 *
	 * @param      <type>   $_args  The arguments
	 *
	 * @return     boolean  ( description_of_the_return_value )
	 */
	public static function insert_multi()
	{
		return \dash\db\config::public_multi_insert('options', ...func_get_args());
	}

	/**
	 * update record in options table if we have error in insert
	 * get fields and value to update  WHERE fields = $value
	 * @param array $_args fields data
	 * @return mysql result
	 */
	public static function update_on_error($_args, $_where)
	{
		// ready fields and values to update syntax query [update table set field = 'value' , field = 'value' , .....]
		$set_fields = \dash\db\config::make_set($_args);
		$where      = \dash\db\config::make_where($_where);
		if(!$_args || !$_where)
		{
			return false;
		}

		// make update fields
		$query = "UPDATE options SET $set_fields	WHERE $where ";
		return \dash\db::query($query);
	}

	/**
	 * update field from options table
	 * get fields and value to update
	 * @param array $_args fields data
	 * @param string || int $_id record id
	 * @return mysql result
	 */
	public static function update()
	{
		return \dash\db\config::public_update('options', ...func_get_args());
	}

	public static function get_count()
	{
		return \dash\db\config::public_get_count('options', ...func_get_args());
	}

	/**
	 * we can not delete a record from database
	 * we just update field status to 'deleted' or 'disable' or set this record to black list
	 * @param string || int $_id record id
	 * @return mysql result
	 */
	public static function delete($_where_or_id)
	{

		if(is_numeric($_where_or_id))
		{
			$where = " options.id = $_where_or_id ";
		}
		elseif(is_array($_where_or_id))
		{
			$where = \dash\db\config::make_where($_where_or_id);
		}
		else
		{
			return false;
		}

		$query = " UPDATE options  SET options.status = 'disable' WHERE $where ";
		return \dash\db::query($query);
	}

	/**
	 * real delete record from database
	 *
	 * @param      <type>  $_where_or_id  The where or identifier
	 *
	 * @return     <type>  ( description_of_the_return_value )
	 */
	public static function hard_delete($_where_or_id)
	{
		if(is_numeric($_where_or_id))
		{
			$where = " options.id = $_where_or_id ";
		}
		elseif(is_array($_where_or_id))
		{
			$where = \dash\db\config::make_where($_where_or_id);
		}
		else
		{
			return false;
		}

		$query = " DELETE FROM	options	WHERE $where ";
		return \dash\db::query($query);
	}

	/**
	 * get the record of option table
	 *
	 * @param      <type>   $_args  The arguments
	 *
	 * @return     boolean  ( description_of_the_return_value )
	 */
	public static function get()
	{
		$result = \dash\db\config::public_get('options', ...func_get_args());
		if(isset($result['meta']) && substr($result['meta'], 0, 1) == '{')
		{
			$result['meta'] = json_decode($result['meta'], true);
		}
		return $result;
	}

	/**
	 * update the option record  value++
	 *
	 * @param      <type>  $_where  The where
	 * @param      string  $_field  The field
	 */
	private static function plus_value($_where, $_plus_minue = 1, $_type = 'plus')
	{
		$where = \dash\db\config::make_where($_where);
		$set = \dash\db\config::make_set($_where);
		if(!$where || !$set)
		{
			return false;
		}

		$update_value_query = "IF(options.value IS NULL OR options.value = '', $_plus_minue, options.value + $_plus_minue)";
		if($_type === 'minus')
		{
			$update_value_query = "IF(options.value IS NULL OR options.value = '' OR options.value = 0, $_plus_minue, options.value - $_plus_minue)";
		}

		$query =
		"
			INSERT INTO options
			SET
				$set,
				options.value   = $_plus_minue,
				options.status = 'enable'
			ON DUPLICATE KEY UPDATE
				$set,
				options.value   = $update_value_query,
				options.status = 'enable'

		";
		$result = \dash\db::query($query);
		return $result;
	}

	/**
	 * plus options meta
	 *
	 * @param      <type>  $_where  The where
	 * @param      <type>  $_plus   The plus
	 *
	 * @return     <type>  ( description_of_the_return_value )
	 */
	public static function plus($_where, $_plus = 1)
	{
		return self::plus_value($_where, $_plus, 'plus');
	}

	/**
	 * minus the option meta
	 *
	 * @param      <type>  $_where  The where
	 * @param      <type>  $_minus  The minus
	 *
	 * @return     <type>  ( description_of_the_return_value )
	 */
	public static function minus($_where, $_minus = 1)
	{
		return self::plus_value($_where, $_minus, 'minus');
	}
}
?>


text:
import { CommandData, CommandLineInputs, CommandLineOptions, ICommand, IonicEnvironment } from '../definitions';
export declare function CommandMetadata(metadata: CommandData): (target: Function) => void;
export declare class Command implements ICommand {
    env: IonicEnvironment;
    metadata: CommandData;
    run(inputs: CommandLineInputs, options: CommandLineOptions): Promise<void | number>;
    runwrap(fn: () => Promise<void | number>, opts?: {
        exit0?: boolean;
    }): Promise<void>;
    runcmd(pargv: string[], opts?: {
        showExecution?: boolean;
    }): Promise<void>;
    validate(inputs: CommandLineInputs): Promise<void>;
    execute(inputs: CommandLineInputs, options: CommandLineOptions): Promise<void>;
    getCleanInputsForTelemetry(inputs: CommandLineInputs, options: CommandLineOptions): Promise<string[]>;
}


text:
<!DOCTYPE html>

       <title>FGC DESIGNS — | Portfolio — | Idyllic </title>

        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">

        <link rel="stylesheet" href="assets/css/bootstrap.min.css">
        <link rel="stylesheet" href="assets/css/font-awesome.min.css">
        <link rel="stylesheet" href="assets/css/animate.css">
        <link rel="stylesheet" href="assets/css/owl.carousel.css">
        <link rel="stylesheet" href="assets/css/owl.theme.css">
        <link rel="stylesheet" href="assets/css/style.css">

                        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-nav-collapse">
                            Toggle navigation

                        </button>

                            FGC Designs

                                Home

                                Portfolio

                                Services

                                        Graphic Design

                                        Web Design

                                        Social Media Management

                                        Tutoring

                                About

                                Contact

Portolfio

Idyllic

Idyllic | Tea Company

                                    Dic,2018
                                    Branding, Packaging, Concept Design.

                                   Idyllic is a tea company that targets mostly millennial. I created thermocromatic cups in order to attract their target audience especially through social media since this technique is very innovative and appealing to cause a good impression in the cyber world.

Idyllic's Collaterals

Simple and serene

FGC's NEWS

Popular Post

Recent Post

Image Post Title here

                                                may 24,2015

                                                    Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Image Post Title here

                                                may 24,2015

                                                    Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Image Post Title here

                                                may 24,2015

                                                    Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Image Post Title here

                                                may 24,2015

                                                    Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Useful Links

Resume

Instagram

Contact Me

Resume

Profolio

Media

Recent News

                                                a clear website gives more experience to the visitors

Dec 12,2015

E-News-Letter

Sign up for our mailing list to get latest updates and offers

                                <input class="form-control" type="text" placeholder="Email address">

We respect your privacy

FGC Designs

                                Graphic Design, Web Design, Social Media Management and more.

                                    @fgcdesigns

                                    fagautiercuenca@gmail.com.com

                            ©FGC Desings

                                ©FGC Designs | By: Fabiana Gautier Cuenca


text:
import type { State } from './entities/state';
import { Map as map } from 'immutable';

import * as AddComment from './actions/add-comment';
import * as OpenModal from './actions/open-modal';
import * as CloseModal from './actions/close-modal';
import * as LoginUser from './actions/login-user';
import * as MinimizeComment from './actions/minimize-comment';
import * as MaximizeComment from './actions/maximize-comment';
import * as SocketConnect from './actions/socket-connect';

type Action = AddComment.Action | OpenModal.Action | CloseModal.Action | LoginUser.Action
  | MinimizeComment.Action | MaximizeComment.Action | SocketConnect.Action;

export default (state : State = map(), action: Action) => {
  switch (action.type) {
    case AddComment.TYPE:
      return AddComment.reduce(state, ((action: any): AddComment.Action));
    case OpenModal.TYPE:
      return OpenModal.reduce(state, ((action: any): OpenModal.Action));
    case CloseModal.TYPE:
      return CloseModal.reduce(state, ((action: any): CloseModal.Action));
    case LoginUser.TYPE:
      return LoginUser.reduce(state, ((action: any): LoginUser.Action));
    case SocketConnect.TYPE:
      return SocketConnect.reduce(state, ((action: any): SocketConnect.Action));
    case MinimizeComment.TYPE:
      return MinimizeComment.reduce(state, ((action: any): MinimizeComment.Action));
    case MaximizeComment.TYPE:
      return MaximizeComment.reduce(state, ((action: any): MaximizeComment.Action));
    default:
      return state;
  }
};


text:
package com.demo.mummyding.apitest.sax;

import android.util.Log;

import com.demo.mummyding.apitest.model.PolicyBean;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

import java.util.LinkedList;
import java.util.List;

/**
 * Created by mummyding on 15-11-7.
 */
public class SAXHandler extends DefaultHandler{
    private List<PolicyBean> items = new LinkedList<>();
    private PolicyBean tmpBean = new PolicyBean();
    private StringBuffer tmpVal = new StringBuffer();
    private boolean isStart = false;
    private boolean isFirst = true;
    public List<PolicyBean> getItems(){
        return  this.items;
    }

    @Override
    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
        super.startElement(uri, localName, qName, attributes);
        if(isStart == false) return;
        if(qName.equalsIgnoreCase("item")){
            tmpBean = new PolicyBean();
            items.add(tmpBean);
            if(isFirst){
                tmpVal = new StringBuffer();
                isFirst = false;
            }
        }else if(qName.equalsIgnoreCase("description")){
            tmpBean.setPubTime(tmpVal.toString(),false);
            tmpVal = new StringBuffer();
        }
    }

    @Override
    public void characters(char[] ch, int start, int length) throws SAXException {
        tmpVal.append(ch,start,length);
        super.characters(ch, start, length);
    }

    @Override
    public void endElement(String uri, String localName, String qName) throws SAXException {
        super.endElement(uri, localName, qName);
        if(isStart == false) {
            if (qName.equalsIgnoreCase("copyright")) {
                isStart = true;
            }
            tmpVal = new StringBuffer();
            return;
        }
        if (qName.equalsIgnoreCase("title")){
            tmpBean.setTitle(tmpVal.toString().trim());
            tmpVal = new StringBuffer();
        }else if(qName.equalsIgnoreCase("link")){
            tmpBean.setLink(tmpVal.toString().trim());
            tmpVal = new StringBuffer();
        }else if(qName.equalsIgnoreCase("description")){
            tmpBean.setDescription(tmpVal.toString().trim());
            tmpVal = new StringBuffer();
        }else if(qName.equalsIgnoreCase("author")){
            tmpBean.setAuthor(tmpVal.toString().trim());
            tmpVal = new StringBuffer();
        }
    }
}


text:
class TCPConnection;

class TCPServer {
public:
	TCPServer(int port) : _port(port) {}

	void start();

private:
	int _port = 0;
	int _sockd = 0;

	void _init();
	std::unique_ptr<TCPConnection> _accept();
};


text:
$(document).ready(function() {

    /* Houston, we have javascript */
    $('html').addClass('js');

    $('.genieNav').genieMenu();

    $(document).intraPageLoad({
    	pagesCompatible:function(current_url, target_url){
            var current_domain = getDomain(current_url);
            var target_domain = getDomain(target_url);
            var domainsMatch = current_domain == target_domain;
            var isBlog = target_url.toLowerCase().indexOf('blog') >= 0 || current_url.toLowerCase().indexOf('blog') >= 0;
            var isAdmin = target_url.toLowerCase().indexOf('wp-admin') >= 0;
            var isFile = getPath(target_url).indexOf('.') >= 0;
            var isHash = target_url.replace(current_url, '') == '#' || target_url.replace(current_url, '') == '';

            // console.log("getPath(target_url): "+getPath(target_url))
            // console.log("current_domain: "+current_domain+" target_domain: "+target_domain)

            // console.log("target_url: "+target_url+" domainsMatch: "+domainsMatch+" getDomain(target_url): "+getDomain(target_url))
            if(domainsMatch==true && isBlog==false && isAdmin==false && isFile==false && isHash==false){
            	return true;
            }
            return false;
    	},
        loadContainerSelector:function(){
        	return '#main';
        },
        targetContainerSelector:function(){
        	return '#main';
        }
    });

    function getDomain(url){
    	var urlParts = url.replace('http://','').replace('https://','').split(/[/?#]/);
        return urlParts[0];
    }
    function getPath(url){
        var urlParts = url.replace('http://','').replace('https://','').split(/[/?#]/);
        urlParts.shift();
        return urlParts.join('/');
    }

    $(document).bind('INTRAPAGELOAD.beginLoading', function(event){
       clearPageContent();
    });
    $(document).bind('INTRAPAGELOAD.loadingComplete', function(event){
       newPageContent();
    });
    $(window).bind('resize', function(event){
       updateScrollPane();
    });

    $(".mobile-toggle").bind("click", function(event){
        event.preventDefault();
        $('.genieNav').toggleClass("open");
    });
    function clearPageContent(){
        //TODO
        $('.genieNav').removeClass("open");
    }
    function newPageContent(){
        $(".entry-content").fitVids({ customSelector: "iframe"});

        $('.genieNav').removeClass("open");

        addGalleryListeners();

        updateScrollPane();

        setTimeout(function(){
            updateScrollPane();
        }, 100);

    }

    var jScrollPaneApi = null;
    function updateScrollPane(){

        if($('.gte-ie9').length == 0){
            return;
        }

        var mobileBreakpoint = 768;
        if($('.format-image-and-text').length > 0){

            if(jScrollPaneApi!=null){
                jScrollPaneApi.destroy();
                jScrollPaneApi = null;
            }

            var text_height = $('.format-image-and-text .text > div').height();
            var image_height = $('.format-image-and-text .image img').height();

            // console.log("image_height: "+image_height)

            var longEnough = text_height > (image_height+10);
            var wideEnough = $(window).width() >= mobileBreakpoint;
            if(longEnough && wideEnough){
                $('.format-image-and-text .text').height(image_height);
                jScrollPaneApi = $('.format-image-and-text .text').jScrollPane().data().jsp

                $('.format-image-and-text .text .jspContainer').height(image_height);

            }else{
                $('.format-image-and-text .text').height("auto");
            }

            $('.format-image-and-text .text').addClass('inited');

        }
    }

    function addGalleryListeners(){
        $('.format-image-gallery .thumbnails a').bind("click", function(event){
            event.preventDefault();
            var href = $(this).attr("href");
            var target = $(this).attr("data-target");
            $(target).find('img').attr("src", href);
        });
        $('.format-video-gallery .thumbnails a').bind("click", function(event){
            event.preventDefault();
            var href = $(this).attr("href");
            var target = $(this).attr("data-target");
            var width = $(this).attr("data-width");
            var height = $(this).attr("data-height");
            $(target).find('iframe').attr("src", href);
            $(target).find('iframe').attr("width", width);
            $(target).find('iframe').attr("height", height);

            // $(target).find(".fluid-width-video-wrapper").show();
            $(".entry-content").fitVids({ customSelector: "iframe"});
        });
    }

    //TEMP REDIRECTS:
    if(window.location.hash != ""){
        var new_url = window.location.hash.replace("#", "")+"/";
        window.location.href = new_url;
    }

    newPageContent();

});


text:
#include "OnlineSubSystemHeader.h"

#include "GetRecentPlayersCallbackProxy.generated.h"

DECLARE_LOG_CATEGORY_EXTERN(AdvancedGetRecentPlayersLog, Log, All);

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FBlueprintGetRecentPlayersDelegate, const TArray<FBPOnlineRecentPlayer>&, Results);

UCLASS(MinimalAPI)
class UGetRecentPlayersCallbackProxy : public UOnlineBlueprintCallProxyBase
{
	GENERATED_UCLASS_BODY()

	// Called when the friends list successfully was retrieved
	UPROPERTY(BlueprintAssignable)
	FBlueprintGetRecentPlayersDelegate OnSuccess;

	// Called when there was an error retrieving the friends list
	UPROPERTY(BlueprintAssignable)
	FBlueprintGetRecentPlayersDelegate OnFailure;

	// Gets the list of recent players from the OnlineSubsystem and returns it, can be retrieved later with GetStoredRecentPlayersList, can fail if no recent players are found
	UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject"), Category = "Online|AdvancedFriends")
	static UGetRecentPlayersCallbackProxy* GetAndStoreRecentPlayersList(UObject* WorldContextObject, const FBPUniqueNetId &UniqueNetId);

	virtual void Activate() override;

private:
	// Internal callback when the friends list is retrieved
	void OnQueryRecentPlayersCompleted(const FUniqueNetId &UserID, const FString &Namespace, bool bWasSuccessful, const FString& ErrorString);
	// Handle to the registered OnFindSessionsComplete delegate
	FDelegateHandle DelegateHandle;

	// The player controller triggering things
	//TWeakObjectPtr<APlayerController> PlayerControllerWeakPtr;

	// The UniqueNetID of the person to get recent players for
	FBPUniqueNetId cUniqueNetId;

	// The delegate executed
	FOnQueryRecentPlayersCompleteDelegate QueryRecentPlayersCompleteDelegate;

	// The world context object in which this call is taking place
	UObject* WorldContextObject;
};


text:
let cpx = require('cpx');
cpx.copy(
    './src/common/**/*.json',
    './dist/common/',
    { clean: true },
    () => console.log('json files copied')
);
cpx.copy(
    './src/resources/images/**/*.png',
    './dist/resources/images/',
    { clean: true },
    () => console.log('image resource files copied')
);


text:
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>

好友列表

宋江

张飞

小倩


text:
package br.com.compdevbooks.alphacosmetics.entity;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class ClienteEntityTest {

	ClienteEntity entity;

	@Before
	public final void initialize(){
		entity = new ClienteEntity(1L,"Maria Cristina da Silta","mariacris@gmail.com","6512345678");
	}

	@Test
	public final void testValidarInstantiated() {
		entity = new ClienteEntity();
		assertNotNull(entity.validar());
	}

	@Test
	public final void testValidarNome() {
		entity.setNome(null);
		assertNotNull(entity.validar());

		entity.setNome("");
		assertNotNull(entity.validar());

		entity.setNome("     ");
		assertNotNull(entity.validar());

		//Menos de 5 caracteres
		entity.setNome("Jose");
		assertNotNull(entity.validar());

		//Mais de 60 caracteres
		entity.setNome("1111111111222222222233333333334444444444555555555566666666667");
		assertNotNull(entity.validar());
	}

	@Test
	public final void testValidarEmail() {
		entity.setEmail(null);
		assertNotNull(entity.validar());

		entity.setEmail("");
		assertNotNull(entity.validar());

		entity.setEmail("     ");
		assertNotNull(entity.validar());

		entity.setEmail("emailinvalido");
		assertNotNull(entity.validar());
	}

	@Test
	public final void testValidarTelefone() {
		entity.setTelefone(null);
		assertNull(entity.validar());

		entity.setTelefone("");
		assertNull(entity.validar());

		entity.setTelefone("     ");
		assertNull(entity.validar());

		entity.setTelefone("651234567");
		assertNotNull(entity.validar());

		entity.setTelefone("6512345678");
		assertNull(entity.validar());
	}

}


text:
class op_mean
  {
  public:

  template<typename T1>
  inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_mean>& in);

  template<typename T1>
  inline static void apply_noalias(Mat<typename T1::elem_type>& out, const Proxy<T1>& P, const uword dim);

  template<typename T1>
  inline static void apply_noalias_unwrap(Mat<typename T1::elem_type>& out, const Proxy<T1>& P, const uword dim);

  template<typename T1>
  inline static void apply_noalias_proxy(Mat<typename T1::elem_type>& out, const Proxy<T1>& P, const uword dim);

  //

  template<typename eT>
  inline static eT direct_mean(const eT* const X, const uword N);

  template<typename eT>
  inline static eT direct_mean_robust(const eT* const X, const uword N);

  //

  template<typename eT>
  inline static eT direct_mean(const Mat<eT>& X, const uword row);

  template<typename eT>
  inline static eT direct_mean_robust(const Mat<eT>& X, const uword row);

  //

  template<typename eT>
  inline static eT mean_all(const subview<eT>& X);

  template<typename eT>
  inline static eT mean_all_robust(const subview<eT>& X);

  //

  template<typename eT>
  inline static eT mean_all(const diagview<eT>& X);

  template<typename eT>
  inline static eT mean_all_robust(const diagview<eT>& X);

  //

  template<typename T1>
  inline static typename T1::elem_type mean_all(const Base<typename T1::elem_type, T1>& X);

  //

  template<typename eT>
  arma_inline static eT robust_mean(const eT A, const eT B);

  template<typename T>
  arma_inline static std::complex<T> robust_mean(const std::complex<T>& A, const std::complex<T>& B);
  };

//! @}


text:
'use strict';

export class LoadingAnimationComponent implements angular.IComponentOptions {
    static $name = 'loadingAnimation';
    bindToController = true;
    controller = 'LoadingAnimationController';
    controllerAs = 'loadingAnimationCtrl';
    templateUrl = 'modules/core/loadingAnimation/LoadingAnimationView.html';

    bindings = {
        condition: '<'
    }
}


text:
import simplejson as json
from sqlalchemy import Column, Integer, Float, String, DateTime, Boolean
from sqlalchemy.ext.declarative import DeclarativeMeta
from sqlalchemy.dialects import postgresql
from flask.ext.sqlalchemy import SQLAlchemy

db = SQLAlchemy()

class AlchemyEncoder(json.JSONEncoder):
    def default(self, obj):
        if isinstance(obj.__class__, DeclarativeMeta):
            # an SQLAlchemy class
            fields = {}
            for field in [x for x in dir(obj) if not x.startswith('_') and x != 'metadata']:
                data = obj.__getattribute__(field)
                try:
                    json.dumps(data) # this will fail on non-encodable values, like other classes
                    fields[field] = data
                except TypeError:
                    fields[field] = None
            # a json-encodable dict
            return fields

        return json.JSONEncoder.default(self, obj)

class CoReads(db.Model):
    __tablename__='coreads'
    id = Column(Integer,primary_key=True)
    bibcode = Column(String,nullable=False,index=True)
    coreads = Column(postgresql.JSON)

class Clustering(db.Model):
    __tablename__='clustering'
    id = Column(Integer,primary_key=True)
    bibcode = Column(String,nullable=False,index=True)
    cluster = Column(Integer)
    vector  = Column(postgresql.ARRAY(Float))
    vector_low = Column(postgresql.ARRAY(Float))

class Clusters(db.Model):
    __tablename__='clusters'
    id = Column(Integer,primary_key=True)
    cluster = Column(Integer,index=True)
    members  = Column(postgresql.ARRAY(String))
    centroid = Column(postgresql.ARRAY(Float))


text:
package observability

import (
	"context"
	"fmt"
	"os"
	"regexp"

	gcplogging "cloud.google.com/go/logging"
	"golang.org/x/oauth2/google"
	configpb "google.golang.org/grpc/gcp/observability/internal/config"
	"google.golang.org/protobuf/encoding/protojson"
)

const (
	envObservabilityConfig    = "GRPC_CONFIG_OBSERVABILITY"
	envProjectID              = "GOOGLE_CLOUD_PROJECT"
	logFilterPatternRegexpStr = `^([\w./]+)/((?:\w+)|[*])$`
)

var logFilterPatternRegexp = regexp.MustCompile(logFilterPatternRegexpStr)

// fetchDefaultProjectID fetches the default GCP project id from environment.
func fetchDefaultProjectID(ctx context.Context) string {
	// Step 1: Check ENV var
	if s := os.Getenv(envProjectID); s != "" {
		logger.Infof("Found project ID from env %v: %v", envProjectID, s)
		return s
	}
	// Step 2: Check default credential
	credentials, err := google.FindDefaultCredentials(ctx, gcplogging.WriteScope)
	if err != nil {
		logger.Infof("Failed to locate Google Default Credential: %v", err)
		return ""
	}
	if credentials.ProjectID == "" {
		logger.Infof("Failed to find project ID in default credential: %v", err)
		return ""
	}
	logger.Infof("Found project ID from Google Default Credential: %v", credentials.ProjectID)
	return credentials.ProjectID
}

func validateFilters(config *configpb.ObservabilityConfig) error {
	for _, filter := range config.GetLogFilters() {
		if filter.Pattern == "*" {
			continue
		}
		match := logFilterPatternRegexp.FindStringSubmatch(filter.Pattern)
		if match == nil {
			return fmt.Errorf("invalid log filter pattern: %v", filter.Pattern)
		}
	}
	return nil
}

func parseObservabilityConfig() (*configpb.ObservabilityConfig, error) {
	// Parse the config from ENV var
	if content := os.Getenv(envObservabilityConfig); content != "" {
		var config configpb.ObservabilityConfig
		if err := protojson.Unmarshal([]byte(content), &config); err != nil {
			return nil, fmt.Errorf("error parsing observability config from env %v: %v", envObservabilityConfig, err)
		}
		if err := validateFilters(&config); err != nil {
			return nil, fmt.Errorf("error parsing observability config: %v", err)
		}
		logger.Infof("Parsed ObservabilityConfig: %+v", &config)
		return &config, nil
	}
	// If the ENV var doesn't exist, do nothing
	return nil, nil
}

func ensureProjectIDInObservabilityConfig(ctx context.Context, config *configpb.ObservabilityConfig) error {
	if config.GetDestinationProjectId() == "" {
		// Try to fetch the GCP project id
		projectID := fetchDefaultProjectID(ctx)
		if projectID == "" {
			return fmt.Errorf("empty destination project ID")
		}
		config.DestinationProjectId = projectID
	}
	return nil
}


text:
FOUNDATION_EXPORT double Pods_SPSwiftExtensions_ExampleVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_SPSwiftExtensions_ExampleVersionString[];


text:
// .NAME vtkBoneEnvelopeRepresentation - a class defining and envelope
// representation for a bone widget
// .SECTION Description
// \todo
// .SECTION See Also
// vtkBoneWidget

#ifndef __vtkBoneenvelopeRepresentation_h
#define __vtkBoneenvelopeRepresentation_h

// Bender includes
#include "vtkBenderWidgetsExport.h"

// VTK includes
#include "vtkWidgetRepresentation.h"

class vtkActor;

class vtkBooleanOperationPolyDataFilter;
class vtkAppendPolyData;

class vtkCapsuleSource;
class vtkPolyDataMapper;
class vtkProperty;
class vtkPolyData;
class vtkTransform;

class VTK_BENDER_WIDGETS_EXPORT vtkBoneEnvelopeRepresentation
  : public vtkWidgetRepresentation
{
public:
  // Description:
  // Instantiate the class.
  static vtkBoneEnvelopeRepresentation *New();

  // Description:
  // Standard methods for the class.
  vtkTypeMacro(vtkBoneEnvelopeRepresentation,vtkWidgetRepresentation);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Get the envelope properties.
  vtkGetObjectMacro(Property,vtkProperty);

  // Description:
  // Set/Get the resolution of the envelope.
  // The corresponds to the theta and phi resolution of the capsule.
  // \sa vtkCapsuleSource::SetThetaResolution()
  // \sa vtkCapsuleSource::SetPhiResolution()
  void SetResolution(int res);
  int GetResolution();

  // Description:
  // Retrieve the polydata that defines the envellope.
  // To use this method, the user provides the vtkPolyData
  // as an input argument, and the points and
  // polyline are copied into it.
  void GetPolyData(vtkPolyData *pd);

  // Description:
  // These are methods that satisfy vtkWidgetRepresentation's API.
  virtual void BuildRepresentation();

  // Description:
  // Methods supporting the rendering process.
  virtual void GetActors(vtkPropCollection *pc);
  virtual void ReleaseGraphicsResources(vtkWindow*);
  virtual int RenderOpaqueGeometry(vtkViewport*);
  virtual int RenderTranslucentPolygonalGeometry(vtkViewport*);
  virtual int HasTranslucentPolygonalGeometry();

  // Description:
  // Overload the superclasses' GetMTime() because internal classes
  // are used to keep the state of the representation.
  virtual unsigned long GetMTime();

  // Description:
  // Set/Get the envelope head or tail.
  vtkSetVector3Macro(Head, double);
  vtkGetVector3Macro(Head, double);
  vtkSetVector3Macro(Tail, double);
  vtkGetVector3Macro(Tail, double);

  // Description:
  // Set/Get the envelope radius.
  vtkSetMacro(Radius, double);
  vtkGetMacro(Radius, double);

  // Description:
  // DeepCopy the properties of the other envelop.
  void DeepCopy(vtkProp* other);

  // Description:
  // Set the world to bone rotation so the capsule is rotated to its
  // correct orientation. (Just like the bone).
  void SetWorldToBoneRotation(vtkTransform* worldToBoneRotation);

protected:
  vtkBoneEnvelopeRepresentation();
  ~vtkBoneEnvelopeRepresentation();

  // Governing variables.
  double Head[3];
  double Tail[3];
  double Radius;
  vtkTransform* Rotation;

  // Representation
  vtkActor* EnvelopeActor;
  vtkPolyDataMapper*  EnvelopeMapper;
  vtkCapsuleSource* CapsuleSource;

  // Properties
  vtkProperty* Property;
  void CreateDefaultProperties();

  void RebuildEnvelope();

private:
  vtkBoneEnvelopeRepresentation(const vtkBoneEnvelopeRepresentation&);  //Not implemented
  void operator=(const vtkBoneEnvelopeRepresentation&);  //Not implemented
};

#endif


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.Graphics;
using Android.OS;
using Android.Runtime;
using Android.Support.V4.App;
using Android.Views;
using Android.Widget;
using Java.Lang;
using DrHandy.Droid.Activities;
using DrHandy.Model;
using DrHandy.DataBase;

namespace DrHandy.Droid.Receivers {

    /*
     * NotificationReceiver - BroadcastReceiver that will retrieve and display a NotificationItem when a notification is received
     */
    [BroadcastReceiver]
    public class NotificationReceiver : BroadcastReceiver {

        public override void OnReceive(Context context, Intent intent) {
            var moduleShortName = intent.GetStringExtra("ShortName");
            var requestCode = intent.GetIntExtra("requestCode", -1);

            var healthModule = DBHelper.Instance.GetHealthModuleByShortName(moduleShortName);

            var notificationItem = healthModule.GetNotificationItem(context, healthModule);

            if (notificationItem != null) {
                var clickIntent = new Intent(context, typeof(ModuleDetailActivity));
                clickIntent.PutExtra("ShortName", moduleShortName);
                var contentIntent = PendingIntent.GetActivity(context, requestCode, clickIntent,
                    PendingIntentFlags.CancelCurrent);

                var manager = NotificationManagerCompat.From(context);

                var style = new NotificationCompat.BigTextStyle();
                style.BigText(notificationItem.Description);

                var wearableExtender = new NotificationCompat.WearableExtender()
                    .SetBackground(BitmapFactory.DecodeResource(context.Resources, Resource.Drawable.Icon));

                var builder = new NotificationCompat.Builder(context)
                    .SetContentIntent(contentIntent)
                    .SetAutoCancel(true)
                    .SetContentTitle(notificationItem.Title)
                    .SetContentText(notificationItem.Description)
                    .SetStyle(style)
                    .SetWhen(JavaSystem.CurrentTimeMillis())
                    .Extend(wearableExtender)
                    .SetSmallIcon(Resource.Drawable.Icon);

                if (notificationItem.Audio) {
                    builder.SetSound(Android.Media.RingtoneManager.GetDefaultUri(Android.Media.RingtoneType.Notification));
                }

                var notification = builder.Build();
                manager.Notify(0, notification);
            }
        }
    }
}


text:
import prefix from '../prefix'

// Support text-orientation prop syntax.
// https://caniuse.com/#search=user-select
export default {
  noPrefill: ['user-select'],
  supportedProperty: prop => {
    if (prop !== 'user-select') return false
    if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') {
      return prefix.css + prop
    }
    return prop
  }
}


text:
/* ----------------------------------------------------------------
	Custom CSS

	Add all your Custom Styled CSS here for New Styles or
	Overwriting Default Theme Styles for Better Hanlding Updates
-----------------------------------------------------------------*/

/* Signup Page CSS */
#member-type-select input:not(:checked) + label {
	background-color:#FFF;
	color:#333;
}

#member-type-select > div {
	margin-bottom:30px !important;
}

#member-type-select:parent {
	margin-left:3%;
}


text:
package dynaml

import (
	"github.com/cloudfoundry-incubator/spiff/yaml"
)

type MergeExpr struct {
	Path []string
}

func (e MergeExpr) Evaluate(binding Binding) (yaml.Node, bool) {
	return binding.FindInStubs(e.Path)
}

func (e MergeExpr) String() string {
	return "merge"
}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.contentwarehouse.v1.model;

/**
 * Model definition for GoogleCloudContentwarehouseV1UserInfo.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the contentwarehouse API. For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GoogleCloudContentwarehouseV1UserInfo extends com.google.api.client.json.GenericJson {

  /**
   * The unique group identifications which the user is belong to. The format is
   * "group:yyyy@example.com";
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> groupIds;

  /**
   * A unique user identification string, as determined by the client. The maximum number of allowed
   * characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters,
   * and restricted special symbols (:, @, +, -, _, ~) The format is "user:xxxx@example.com";
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String id;

  /**
   * The unique group identifications which the user is belong to. The format is
   * "group:yyyy@example.com";
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getGroupIds() {
    return groupIds;
  }

  /**
   * The unique group identifications which the user is belong to. The format is
   * "group:yyyy@example.com";
   * @param groupIds groupIds or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1UserInfo setGroupIds(java.util.List<java.lang.String> groupIds) {
    this.groupIds = groupIds;
    return this;
  }

  /**
   * A unique user identification string, as determined by the client. The maximum number of allowed
   * characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters,
   * and restricted special symbols (:, @, +, -, _, ~) The format is "user:xxxx@example.com";
   * @return value or {@code null} for none
   */
  public java.lang.String getId() {
    return id;
  }

  /**
   * A unique user identification string, as determined by the client. The maximum number of allowed
   * characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters,
   * and restricted special symbols (:, @, +, -, _, ~) The format is "user:xxxx@example.com";
   * @param id id or {@code null} for none
   */
  public GoogleCloudContentwarehouseV1UserInfo setId(java.lang.String id) {
    this.id = id;
    return this;
  }

  @Override
  public GoogleCloudContentwarehouseV1UserInfo set(String fieldName, Object value) {
    return (GoogleCloudContentwarehouseV1UserInfo) super.set(fieldName, value);
  }

  @Override
  public GoogleCloudContentwarehouseV1UserInfo clone() {
    return (GoogleCloudContentwarehouseV1UserInfo) super.clone();
  }

}


text:
		<a href="<?php echo base_url(); ?>" class="flex__item">
			<img alt="logo" src="<?php echo base_url('/assets/img/logo-white.png'); ?>" class="logo">

			<form method="get" class="flex" action="<?php echo base_url('home/search'); ?>">
				<button type="submit" class="search-bar__submit-btn">
					<img src="<?php echo base_url('/assets/img/icons/magnifying-glass.png'); ?>" alt="search-icon" class="icoen icon--sm">
				</button>
				<input type="hidden" name="<?php echo $csrf_token_name; ?>" value="<?php echo $csrf_token; ?>">
				<input type="search" name="query" id="inputSearch" placeholder="Search" class="form-control">
			</form>

						<img src="<?php echo base_url('/assets/img/icons/home.png'); ?>" alt="home" class="icon">

            <img src="<?php echo base_url('/assets/img/icons/envelope.png'); ?>" alt="envelope" class="icon">

Messages

                <?php if(empty($messages)) {?>

No Messages Found.

<a href="<?= base_url('messages#composeMessage')?>">Click Here to compose a new message.

					<?php }else{
                foreach($messages as $text) {
                	$cls = '';
					if ($text['read'] != 1 && $_SESSION['userData']['userID'] !== $text['sender'] )
						$cls = 'unread';
					?>
                  <a class="flex media notification <?= $cls?>" href="<?= base_url('messages/chats/'.$text['chatter_id']) ?>">
                    <img src="<?=$text['profile_image']?>" alt="user" class="media-figure notification__feature-img">

                      <?= $text['chatter']?>
                      	<?php if($text['chatter_id'] !== $text['sender']) {?>
							<?php echo $text['message'];?>
						<?php } else { ?>
							 <?php echo $text['message']; ?>
						<?php	}	?>

                        <?= $text['timestamp']?>

                  <?php }?>
                  <a class="flex media notification" href="<?php echo base_url('messages'); ?>" style="font-size: 13px;font-weight: 600">See All
                  <?php }?>

						<img src="<?php echo base_url('/assets/img/icons/world.png'); ?>" alt="world" class="icon">

Notifications

								<?php if(empty($notification)) { ?>

 No Notifications Found.

								<?php }else{
								foreach($notification as $new) {?>
									<a class="flex media notification" href="<?=$new['link']?>">
										<img src="<?= $new['image']?>" alt="user" class="media-figure notification__feature-img">

											<?= $new['notification']?>

												<?= $new['timestamp']?>

									<?php }?>
									<a class="flex media notification" href="<?php echo base_url('notifications'); ?>" style="font-size: 13px; font-weight: 600">See All
									<?php }?>

						<img src="<?php echo $_SESSION['profileImage']; ?>" alt="user" class="media-figure img-30">
						<?php echo $_SESSION['userData']['name']; ?>

My Account

							<a href="<?php echo base_url('user-profile/').$_SESSION['userData']['userID']; ?>" class="user-settings__link"> User Profile
							<a href="<?php echo base_url('change-password'); ?>" class="user-settings__link"> Change Password
							<a href="<?php echo base_url('web/logout'); ?>" class="user-settings__link"> Sign Out


text:
package vpn

/**
* Configuration for VPN url action resource.
*/
type Vpnurlaction struct {
	/**
	* Name of the bookmark link.
	*/
	Name string `json:"name,omitempty"`
	/**
	* Description of the bookmark link. The description appears in the Access Interface.
	*/
	Linkname string `json:"linkname,omitempty"`
	/**
	* Web address for the bookmark link.
	*/
	Actualurl string `json:"actualurl,omitempty"`
	/**
	* Name of the associated vserver to handle selfAuth SSO
	*/
	Vservername string `json:"vservername,omitempty"`
	/**
	* If clientless access to the resource hosting the link is allowed, also use clientless access for the bookmarked web address in the Secure Client Access based session. Allows single sign-on and other HTTP processing on NetScaler Gateway for HTTPS resources.
	*/
	Clientlessaccess string `json:"clientlessaccess,omitempty"`
	/**
	* Any comments associated with the bookmark link.
	*/
	Comment string `json:"comment,omitempty"`
	/**
	* URL to fetch icon file for displaying this resource.
	*/
	Iconurl string `json:"iconurl,omitempty"`
	/**
	* Single sign on type for unified gateway
	*/
	Ssotype string `json:"ssotype,omitempty"`
	/**
	* The type of application this VPN URL represents. Possible values are CVPN/SaaS/VPN
	*/
	Applicationtype string `json:"applicationtype,omitempty"`
	/**
	* Profile to be used for doing SAML SSO
	*/
	Samlssoprofile string `json:"samlssoprofile,omitempty"`
	/**
	* New name for the vpn urlAction.
		Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) hash (#), space ( ), at (@), equals (=), colon (:), and underscore characters.
		The following requirement applies only to the NetScaler CLI:
		If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my vpnurl action" or 'my vpnurl action').
	*/
	Newname string `json:"newname,omitempty"`

}


text:
module LLMH_TypeEnvironments where
import LLMH_ExpType
import LLMH_Evaluator

--------------------------------------------------------------------------

--
-- Functions manipulating types and type variables
--

typeVars :: Type -> [String]
typeVars (TypeConst _) = []
typeVars (TypeVar a) = [a]
typeVars (Arrow (t, t')) = (typeVars t) ++ (typeVars t')
typeVars (Myb t) = typeVars t
typeVars (List t) = typeVars t

freshtvar :: [String] -> String

freshtvar as = findfreshtvar as 0

findfreshtvar as n =
  let a = "a" ++ (show n)
    in if notElem a as then a
       else findfreshtvar as (n+1)

----------------------------------------------------------------------------

-- Parallel type substitutions

type TypeSubst = [(String,Type)]

typeSubst :: Type -> TypeSubst -> Type

typeSubst (TypeVar a) s =
  let mt = lookup a s
    in case mt of
         (Just t) -> t
         Nothing -> (TypeVar a)

typeSubst (TypeConst tc) s = (TypeConst tc)

typeSubst (Arrow (t, t')) s =
  Arrow (typeSubst t s, typeSubst t' s)

typeSubst (Myb t) s = Myb (typeSubst t s)

typeSubst (List t) s = List (typeSubst t s)

domain :: TypeSubst -> [String]

domain s = [a | (a, _) <- s]

restrict :: TypeSubst -> [String] -> TypeSubst

restrict s as = [(a, t) | (a, t) <- s, elem a as]

composeSubst :: TypeSubst -> TypeSubst -> TypeSubst

-- composeSubst s1 s2
--
---- constructs the composite substitution s1 followed by s2

composeSubst s1 s2 =
  [(a, typeSubst (typeSubst (TypeVar a) s1) s2) | a <- domain s1] ++
    [(a, typeSubst (TypeVar a) s2) | a <- domain s2, notElem a (domain s1)]

composeSubstList :: [TypeSubst] -> TypeSubst

-- composeSubstList [s1,..., sn]
--
---- constructs the composite substitution s1 followed by ... followed by sn.

composeSubstList [] = []
composeSubstList (s:ss) = composeSubst s (composeSubstList ss)

---------------------------------------------------------------------------

--
-- Unification
--

-- mgu t1 t2
--
----- Returns most general unifier of t1 and t2 if one exists. Otherwise raises error.

mgu :: Type -> Type -> TypeSubst

mgu t1 t2 = mguFind [] t1 t2

mguFind s (TypeConst tc1) (TypeConst tc2) | tc1 == tc2   = s

mguFind s (Arrow (t1, t1')) (Arrow (t2, t2')) =
  let s' = mguFind s t1 t2
    in mguFind s' (typeSubst t1' s') (typeSubst t2' s')

mguFind s (TypeVar a1) (TypeVar a2) =
  if a1 == a2 then s else composeSubst s [(a1, (TypeVar a2))]

mguFind s (TypeVar a1) t2 =
  if notElem a1 (typeVars t2) then composeSubst s [(a1, t2)]
  else error "Occurs check failure."

mguFind s t1 (TypeVar a2) =
  if notElem a2 (typeVars t1) then composeSubst s [(a2, t1)]
  else error "Occurs check failure."

mguFind s (List t1) (List t2) = mguFind s t1 t2

mguFind s (Myb t1) (Myb t2) = mguFind s t1 t2

mguFind s t1 t2 = error "Unification failure."

-----------------------------------------------------------------------------

-- Type environments

type TypeEnv = [(String,Type)]

updateTEnv :: TypeEnv -> String -> Type -> TypeEnv

updateTEnv xts x t =
  (x,t) : [(x',t') | (x',t') <- xts, x' /= x]

varsTEnv tenv = [x | (x,_) <- tenv]

tvarsTEnv tenv = concat [typeVars t | (_,t) <- tenv]

typeSubstTEnv :: TypeEnv -> TypeSubst -> TypeEnv

typeSubstTEnv tenv s =
  [(x, typeSubst t s) | (x,t) <- tenv]

initialiseTEnv vars = countedTEnv vars 0

countedTEnv :: [String] -> Int -> TypeEnv

countedTEnv [] n = []
countedTEnv (x:xs) n = (x, (TypeVar ("a" ++ (show n)))):(countedTEnv xs (n+1))


text:
from selenium import webdriver
from selenium.webdriver.support.ui import Select
import time
import getpass

# prompt W2W username/password
input_w2w_username = input("Enter W2W username: ")
input_w2w_password = getpass.getpass("Enter W2W password: ")

# prompt date
validDate = 0;
while not validDate:
    try:
        input_date = input("Enter date (eg May 9 2016 = \"5/9/2016\"): ")
        # input_date = "5/23/2016"

        # parse date
        date_list = input_date.split("/")
        input_month = date_list[0]
        input_day = date_list[1]
        input_year = date_list[2];
        if int(input_month) < 1 or int(input_month) > 12:
            raise Exception("Invalid month: " + input_month)
        elif int(input_day) < 1 or int(input_day) > 31:
            raise Exception("Invalid day: " + input_day)
        elif int(input_year) < 0 or int(input_year) > 2099 or (int(input_year) < 2000 and int(input_year) > 99):
            raise Exception("Invalid year: " + input_year)

        validDate = 1
    except Exception:
        print("Invalid date entry")

# if two digit year, convert to 4 digit year.
if int(input_year) < 2000:
    input_year += 2000

if input_month == "1":
    name_month = "Jan"
elif input_month == "2":
    name_month = "Feb"
elif input_month == "3":
    name_month = "Mar"
elif input_month == "4":
    name_month = "Apr"
elif input_month == "5":
    name_month = "May"
elif input_month == "6":
    name_month = "Jun"
elif input_month == "7":
    name_month = "Jul"
elif input_month == "8":
    name_month = "Aug"
elif input_month == "9":
    name_month = "Sep"
elif input_month == "10":
    name_month = "Oct"
elif input_month == "11":
    name_month = "Nov"
else:
    name_month = "Dec"

name_date = name_month + "-" + input_day

# start Chrome and navigate to W2W
driver = webdriver.Chrome()
driver.get('https://whentowork.com/logins.htm')

# if not logged in, log in.
if driver.title == "W2W Sign In - WhenToWork Online Employee Scheduling Program":
    inputUser = driver.find_element_by_name("UserId1")
    inputUser.send_keys(input_w2w_username)

    inputPass = driver.find_element_by_name("Password1")
    inputPass.send_keys(input_w2w_password)
    inputPass.submit()

if driver.title == "Sign In - WhenToWork Online Employee Scheduling Program":
    raise RuntimeError("Invalid W2W credentials")

# navigate to Everyone's Schedule
driver.execute_script("ReplWin('empfullschedule','')")

# save current window handle
current_window = driver.current_window_handle

# open date picker and select date
click = driver.find_element_by_xpath("//*[@id=\"calbtn\"]/nobr/a[4]").click()
driver.switch_to.window(driver.window_handles[-1])
driver.execute_script("var y = " + input_year + "; var m = " + input_month + "; var d = " + input_day + ";if (window.opener.top) {window.opener.top.location=window.opener.top.location+\"&Date=\"+m + \"/\" + d + \"/\" + y;}self.close();")
driver.switch_to.window(current_window)

# Filter by My Positions (ASSUMES I HAVE MANAGER AND SHIFT LEAD)
select = Select(driver.find_element_by_name("EmpListSkill"))
select.select_by_visible_text("My Positions")

# Get correct column number by date
dateRow = driver.find_element_by_xpath("/html/body/div[4]/table[2]/tbody/tr[2]/td/table/tbody/tr/td/table[1]/tbody/tr")
tds = dateRow.find_elements_by_tag_name("td")
i = 0;
colNum = 0;
for x in tds:
    try:
        a = x.find_element_by_partial_link_text(name_date)
        colNum = i
        i += 1
    except Exception:
        i += 1

print(colNum)

time.sleep(30)

driver.quit()


text:
package org.multibit.viewsystem;

/**
 * A hint as to what caused the change in display.
 * This is used to minimise unnecessary redrawing.
 *
 * @author jim
 *
 */
public enum DisplayHint {
    COMPLETE_REDRAW,
    WALLET_TRANSACTIONS_HAVE_CHANGED
}


text:
from __future__ import annotations

from typing import TYPE_CHECKING, Dict, List, Optional, Union

import great_expectations.exceptions as ge_exceptions
from great_expectations.core.metric_domain_types import MetricDomainTypes
from great_expectations.rule_based_profiler.domain import (
    INFERRED_SEMANTIC_TYPE_KEY,
    Domain,
    SemanticDomainTypes,
)
from great_expectations.rule_based_profiler.domain_builder import ColumnDomainBuilder
from great_expectations.rule_based_profiler.parameter_container import (
    ParameterContainer,
)

if TYPE_CHECKING:
    from great_expectations.data_context.data_context.abstract_data_context import (
        AbstractDataContext,
    )
    from great_expectations.validator.validator import Validator

class ColumnPairDomainBuilder(ColumnDomainBuilder):
    """
    This DomainBuilder uses relative tolerance of specified map metric to identify domains.
    """

    def __init__(
        self,
        include_column_names: Optional[Union[str, Optional[List[str]]]] = None,
        data_context: Optional[AbstractDataContext] = None,
    ) -> None:
        """
        Args:
            include_column_names: Explicitly specified exactly two desired columns
            data_context: AbstractDataContext associated with this DomainBuilder
        """
        super().__init__(
            include_column_names=include_column_names,
            exclude_column_names=None,
            include_column_name_suffixes=None,
            exclude_column_name_suffixes=None,
            semantic_type_filter_module_name=None,
            semantic_type_filter_class_name=None,
            include_semantic_types=None,
            exclude_semantic_types=None,
            data_context=data_context,
        )

    @property
    def domain_type(self) -> MetricDomainTypes:
        return MetricDomainTypes.COLUMN_PAIR

    def _get_domains(
        self,
        rule_name: str,
        variables: Optional[ParameterContainer] = None,
    ) -> List[Domain]:
        """Return domains matching the specified tolerance limits.

        Args:
            rule_name: name of Rule object, for which "Domain" objects are obtained.
            variables: Optional variables to substitute when evaluating.

        Returns:
            List of domains that match the desired tolerance limits.
        """
        batch_ids: List[str] = self.get_batch_ids(variables=variables)

        validator: Validator = self.get_validator(variables=variables)

        effective_column_names: List[str] = self.get_effective_column_names(
            batch_ids=batch_ids,
            validator=validator,
            variables=variables,
        )

        if not (effective_column_names and (len(effective_column_names) == 2)):
            raise ge_exceptions.ProfilerExecutionError(
                message=f"""Error: Columns specified for {self.__class__.__name__} in sorted order must correspond to \
"column_A" and "column_B" (in this exact order).
"""
            )

        effective_column_names = sorted(effective_column_names)

        domain_kwargs: Dict[str, str] = dict(
            zip(
                [
                    "column_A",
                    "column_B",
                ],
                effective_column_names,
            )
        )

        column_name: str
        semantic_types_by_column_name: Dict[str, SemanticDomainTypes] = {
            column_name: self.semantic_type_filter.table_column_name_to_inferred_semantic_domain_type_map[
                column_name
            ]
            for column_name in effective_column_names
        }

        domains: List[Domain] = [
            Domain(
                domain_type=self.domain_type,
                domain_kwargs=domain_kwargs,
                details={
                    INFERRED_SEMANTIC_TYPE_KEY: semantic_types_by_column_name,
                },
                rule_name=rule_name,
            ),
        ]

        return domains


text:
{% extends "html/_layouts/index.html" %}

{% block jumbotron %}

Bubblegum

    This is a starter template with a jumbotron

        Button

        Another Button

{% endblock %}


text:
/**
 * @author Luciano Graziani @lgraziani2712
 * @license {@link http://www.opensource.org/licenses/mit-license.php|MIT License}
 *
 */
import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';
// import 'storybook-addon-specifications/register';


text:
module Feature.InsertSpec where

import Test.Hspec hiding (pendingWith)
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import Network.Wai.Test (SResponse(simpleBody,simpleHeaders,simpleStatus))

import SpecHelper

import qualified Data.Aeson as JSON
import Data.List (lookup)
import Data.Maybe (fromJust)
import Text.Heredoc
import Network.HTTP.Types.Header
import Network.HTTP.Types
import Control.Monad (replicateM_, void)

import TestTypes(IncPK(..), CompoundPK(..))
import Network.Wai (Application)

import Protolude hiding (get)

spec :: SpecWith Application
spec = do
  describe "Posting new record" $ do
    context "disparate json types" $ do
      it "accepts disparate json types" $ do
        p <- post "/menagerie"
          [json| {
            "integer": 13, "double": 3.14159, "varchar": "testing!"
          , "boolean": false, "date": "1900-01-01", "money": "$3.99"
          , "enum": "foo"
          } |]
        liftIO $ do
          simpleBody p `shouldBe` ""
          simpleStatus p `shouldBe` created201
          -- should not have content type set when body is empty
          lookup hContentType (simpleHeaders p) `shouldBe` Nothing

      it "filters columns in result using &select" $
        request methodPost "/menagerie?select=integer,varchar" [("Prefer", "return=representation")]
          [json| {
            "integer": 14, "double": 3.14159, "varchar": "testing!"
          , "boolean": false, "date": "1900-01-01", "money": "$3.99"
          , "enum": "foo"
          } |] `shouldRespondWith` ResponseMatcher {
            matchBody    = Just [str|{"integer":14,"varchar":"testing!"}|]
          , matchStatus  = 201
          , matchHeaders = ["Content-Type" <:> "application/json; charset=utf-8"]
          }

      it "includes related data after insert" $
        request methodPost "/projects?select=id,name,clients{id,name}"
                [("Prefer", "return=representation"), ("Prefer", "count=exact")]
          [str|{"id":6,"name":"New Project","client_id":2}|] `shouldRespondWith` ResponseMatcher {
            matchBody    = Just [str|{"id":6,"name":"New Project","clients":{"id":2,"name":"Apple"}}|]
          , matchStatus  = 201
          , matchHeaders = [ "Content-Type" <:> "application/json; charset=utf-8"
                           , "Location" <:> "/projects?id=eq.6"
                           , "Content-Range" <:> "*/1" ]
          }

    context "from an html form" $
      it "accepts disparate json types" $ do
        p <- request methodPost "/menagerie"
               [("Content-Type", "application/x-www-form-urlencoded")]
               ("integer=7&double=2.71828&varchar=forms+are+fun&" <>
                "boolean=false&date=1900-01-01&money=$3.99&enum=foo")
        liftIO $ do
          simpleBody p `shouldBe` ""
          simpleStatus p `shouldBe` created201

    context "with no pk supplied" $ do
      context "into a table with auto-incrementing pk" $
        it "succeeds with 201 and link" $ do
          p <- post "/auto_incrementing_pk" [json| { "non_nullable_string":"not null"} |]
          liftIO $ do
            simpleBody p `shouldBe` ""
            simpleHeaders p `shouldSatisfy` matchHeader hLocation "/auto_incrementing_pk\\?id=eq\\.[0-9]+"
            simpleStatus p `shouldBe` created201
          let Just location = lookup hLocation $ simpleHeaders p
          r <- get location
          let [record] = fromJust (JSON.decode $ simpleBody r :: Maybe [IncPK])
          liftIO $ do
            incStr record `shouldBe` "not null"
            incNullableStr record `shouldBe` Nothing

      context "into a table with simple pk" $
        it "fails with 400 and error" $
          post "/simple_pk" [json| { "extra":"foo"} |]
            `shouldRespondWith` 400

      context "into a table with no pk" $ do
        it "succeeds with 201 and a link including all fields" $ do
          p <- post "/no_pk" [json| { "a":"foo", "b":"bar" } |]
          liftIO $ do
            simpleBody p `shouldBe` ""
            simpleHeaders p `shouldSatisfy` matchHeader hLocation "/no_pk\\?a=eq.foo&b=eq.bar"
            simpleStatus p `shouldBe` created201

        it "returns full details of inserted record if asked" $ do
          p <- request methodPost "/no_pk"
                       [("Prefer", "return=representation")]
                       [json| { "a":"bar", "b":"baz" } |]
          liftIO $ do
            simpleBody p `shouldBe` [json| { "a":"bar", "b":"baz" } |]
            simpleHeaders p `shouldSatisfy` matchHeader hLocation "/no_pk\\?a=eq.bar&b=eq.baz"
            simpleStatus p `shouldBe` created201

        it "can insert in tables with no select privileges" $ do
          p <- request methodPost "/insertonly"
                       [("Prefer", "return=minimal")]
                       [json| { "v":"some value" } |]
          liftIO $ do
            simpleBody p `shouldBe` ""
            simpleStatus p `shouldBe` created201

        it "can post nulls" $ do
          p <- request methodPost "/no_pk"
                       [("Prefer", "return=representation")]
                       [json| { "a":null, "b":"foo" } |]
          liftIO $ do
            simpleBody p `shouldBe` [json| { "a":null, "b":"foo" } |]
            simpleHeaders p `shouldSatisfy` matchHeader hLocation "/no_pk\\?a=is.null&b=eq.foo"
            simpleStatus p `shouldBe` created201

    context "with compound pk supplied" $
      it "builds response location header appropriately" $ do
        let inserted    = [json| { "k1":12, "k2":"Rock & R+ll" } |]
            expectedObj = CompoundPK 12 "Rock & R+ll" Nothing
            expectedLoc = "/compound_pk?k1=eq.12&k2=eq.Rock%20%26%20R%2Bll"
        p <- request methodPost "/compound_pk"
                     [("Prefer", "return=representation")]
                     inserted
        liftIO $ do
          JSON.decode (simpleBody p) `shouldBe` Just expectedObj
          simpleStatus p `shouldBe` created201
          lookup hLocation (simpleHeaders p) `shouldBe` Just expectedLoc

        r <- get expectedLoc
        liftIO $ do
          JSON.decode (simpleBody r) `shouldBe` Just [expectedObj]
          simpleStatus r `shouldBe` ok200

    context "with bulk insert" $
      it "returns 201 but no location header" $ do
        let bulkData = [json| [ {"k1":21, "k2":"hello world"}
                              , {"k1":22, "k2":"bye for now"}]
                            |]
        p <- request methodPost "/compound_pk" [] bulkData
        liftIO $ do
          simpleStatus p `shouldBe` created201
          lookup hLocation (simpleHeaders p) `shouldBe` Nothing

    context "with invalid json payload" $
      it "fails with 400 and error" $
        post "/simple_pk" "}{ x = 2" `shouldRespondWith` 400

    context "with valid json payload" $
      it "succeeds and returns 201 created" $
        post "/simple_pk" [json| { "k":"k1", "extra":"e1" } |] `shouldRespondWith` 201

    context "attempting to insert a row with the same primary key" $
      it "fails returning a 409 Conflict" $
        post "/simple_pk" [json| { "k":"k1", "extra":"e1" } |] `shouldRespondWith` 409

    context "attempting to insert a row with conflicting unique constraint" $
      it "fails returning a 409 Conflict" $
        post "/withUnique"  [json| { "uni":"nodup", "extra":"e2" } |] `shouldRespondWith` 409

    context "jsonb" $ do
      it "serializes nested object" $ do
        let inserted = [json| { "data": { "foo":"bar" } } |]
            location = "/json?data=eq.%7B%22foo%22%3A%22bar%22%7D"
        request methodPost "/json"
                     [("Prefer", "return=representation")]
                     inserted
          `shouldRespondWith` ResponseMatcher {
            matchBody    = Just inserted
          , matchStatus  = 201
          , matchHeaders = ["Location" <:> location]
          }

      it "serializes nested array" $ do
        let inserted = [json| { "data": [1,2,3] } |]
            location = "/json?data=eq.%5B1%2C2%2C3%5D"
        request methodPost "/json"
                     [("Prefer", "return=representation")]
                     inserted
          `shouldRespondWith` ResponseMatcher {
            matchBody    = Just inserted
          , matchStatus  = 201
          , matchHeaders = ["Location" <:> location]
          }

    context "empty object" $
      it "successfully populates table with all-default columns" $
        post "/items" "{}" `shouldRespondWith` ResponseMatcher {
            matchBody    = Just ""
          , matchStatus  = 201
          , matchHeaders = []
          }

  describe "CSV insert" $ do

    context "disparate csv types" $
      it "succeeds with multipart response" $ do
        pendingWith "Decide on what to do with CSV insert"
        let inserted = [str|integer,double,varchar,boolean,date,money,enum
            |13,3.14159,testing!,false,1900-01-01,$3.99,foo
            |12,0.1,a string,true,1929-10-01,12,bar
            |]
        request methodPost "/menagerie" [("Content-Type", "text/csv"), ("Accept", "text/csv"), ("Prefer", "return=representation")] inserted

           `shouldRespondWith` ResponseMatcher {
             matchBody    = Just inserted
           , matchStatus  = 201
           , matchHeaders = ["Content-Type" <:> "text/csv; charset=utf-8"]
           }

    context "requesting full representation" $ do
      it "returns full details of inserted record" $
        request methodPost "/no_pk"
                     [("Content-Type", "text/csv"), ("Accept", "text/csv"),  ("Prefer", "return=representation")]
                     "a,b\nbar,baz"
          `shouldRespondWith` ResponseMatcher {
            matchBody    = Just "a,b\nbar,baz"
          , matchStatus  = 201
          , matchHeaders = ["Content-Type" <:> "text/csv; charset=utf-8",
                            "Location" <:> "/no_pk?a=eq.bar&b=eq.baz"]
          }

      it "can post nulls" $
        request methodPost "/no_pk"
                     [("Content-Type", "text/csv"), ("Accept", "text/csv"), ("Prefer", "return=representation")]
                     "a,b\nNULL,foo"
          `shouldRespondWith` ResponseMatcher {
            matchBody    = Just "a,b\n,foo"
          , matchStatus  = 201
          , matchHeaders = ["Content-Type" <:> "text/csv; charset=utf-8",
                            "Location" <:> "/no_pk?a=is.null&b=eq.foo"]
          }

    context "with wrong number of columns" $
      it "fails for too few" $ do
        p <- request methodPost "/no_pk" [("Content-Type", "text/csv")] "a,b\nfoo,bar\nbaz"
        liftIO $ simpleStatus p `shouldBe` badRequest400

    context "with unicode values" $
      it "succeeds and returns usable location header" $ do
        let payload = [json| { "a":"圍棋", "b":"¥" } |]
        p <- request methodPost "/no_pk"
                     [("Prefer", "return=representation")]
                     payload
        liftIO $ do
          simpleBody p `shouldBe` payload
          simpleStatus p `shouldBe` created201

        let Just location = lookup hLocation $ simpleHeaders p
        r <- get location
        liftIO $ simpleBody r `shouldBe` "["<>payload<>"]"

  describe "Patching record" $ do

    context "to unknown uri" $
      it "gives a 404" $
        request methodPatch "/fake" []
          [json| { "real": false } |]
            `shouldRespondWith` 404

    context "on an empty table" $
      it "indicates no records found to update" $
        request methodPatch "/empty_table" []
          [json| { "extra":20 } |]
            `shouldRespondWith` 404

    context "in a nonempty table" $ do
      it "can update a single item" $ do
        g <- get "/items?id=eq.42"
        liftIO $ simpleHeaders g
          `shouldSatisfy` matchHeader "Content-Range" "\\*/\\*"
        p <- request methodPatch "/items?id=eq.2" [] [json| { "id":42 } |]
        pure p `shouldRespondWith` ResponseMatcher {
            matchBody    = Nothing,
            matchStatus  = 204,
            matchHeaders = ["Content-Range" <:> "0-0/*"]
          }
        liftIO $
          lookup hContentType (simpleHeaders p) `shouldBe` Nothing

        g' <- get "/items?id=eq.42"
        liftIO $ simpleHeaders g'
          `shouldSatisfy` matchHeader "Content-Range" "0-0/\\*"

      it "can update multiple items" $ do
        replicateM_ 10 $ post "/auto_incrementing_pk"
          [json| { non_nullable_string: "a" } |]
        replicateM_ 10 $ post "/auto_incrementing_pk"
          [json| { non_nullable_string: "b" } |]
        _ <- request methodPatch
          "/auto_incrementing_pk?non_nullable_string=eq.a" []
          [json| { non_nullable_string: "c" } |]
        g <- get "/auto_incrementing_pk?non_nullable_string=eq.c"
        liftIO $ simpleHeaders g
          `shouldSatisfy` matchHeader "Content-Range" "0-9/\\*"

      it "can set a column to NULL" $ do
        _ <- post "/no_pk" [json| { a: "keepme", b: "nullme" } |]
        _ <- request methodPatch "/no_pk?b=eq.nullme" [] [json| { b: null } |]
        get "/no_pk?a=eq.keepme" `shouldRespondWith`
          [json| [{ a: "keepme", b: null }] |]

      it "can update based on a computed column" $
        request methodPatch
          "/items?always_true=eq.false"
          [("Prefer", "return=representation")]
          [json| { id: 100 } |]
          `shouldRespondWith` 404
      it "can provide a representation" $ do
        _ <- post "/items"
          [json| { id: 1 } |]
        request methodPatch
          "/items?id=eq.1"
          [("Prefer", "return=representation")]
          [json| { id: 99 } |]
          `shouldRespondWith` [json| [{id:99}] |]

    context "in a table" $ do
      it "can provide a singular representation when updating one entity" $ do
        _ <- post "/addresses" [json| { id: 97, address: "A Street" } |]
        p <- request methodPatch
          "/addresses?id=eq.97"
          [("Prefer", "return=representation,plurality=singular")]
          [json| { address: "B Street" } |]
        liftIO $ simpleBody p `shouldBe` [str|{"id":97,"address":"B Street"}|]
      it "raises an error when attempting to update multiple entities with plurality=singular" $ do
        _ <- post "/addresses" [json| { id: 98, address: "xxx" } |]
        _ <- post "/addresses" [json| { id: 99, address: "yyy" } |]
        p <- request methodPatch
          "/addresses?id=gt.0"
          [("Prefer", "return=representation,plurality=singular")]
          [json| { address: "zzz" } |]
        liftIO $ simpleStatus p `shouldBe` status400
      it "can provide a singular representation when creating one entity" $ do
        p <- request methodPost
          "/addresses"
          [("Prefer", "return=representation,plurality=singular")]
          [json| [ { id: 100, address: "xxx" } ] |]
        liftIO $ simpleBody p `shouldBe` [str|{"id":100,"address":"xxx"}|]
      it "raises an error when attempting to create multiple entities with plurality=singular" $ do
        p <- request methodPost
          "/addresses"
          [("Prefer", "return=representation,plurality=singular")]
          [json| [ { id: 100, address: "xxx" }, { id: 101, address: "xxx" } ] |]
        liftIO $ simpleStatus p `shouldBe` status400

      it "can set a json column to escaped value" $ do
        _ <- post "/json" [json| { data: {"escaped":"bar"} } |]
        request methodPatch "/json?data->>escaped=eq.bar"
                     [("Prefer", "return=representation")]
                     [json| { "data": { "escaped":" \"bar" } } |]
          `shouldRespondWith` ResponseMatcher {
            matchBody    = Just [json| [{ "data": { "escaped":" \"bar" } }] |]
          , matchStatus  = 200
          , matchHeaders = []
          }

    context "with unicode values" $
      it "succeeds and returns values intact" $ do
        void $ request methodPost "/no_pk" []
          [json| { "a":"patchme", "b":"patchme" } |]
        let payload = [json| { "a":"圍棋", "b":"¥" } |]
        p <- request methodPatch "/no_pk?a=eq.patchme&b=eq.patchme"
          [("Prefer", "return=representation")] payload
        liftIO $ do
          simpleBody p `shouldBe` "["<>payload<>"]"
          simpleStatus p `shouldBe` ok200

  describe "Row level permission" $
    it "set user_id when inserting rows" $ do
      let auth = authHeaderJWT "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoicG9zdGdyZXN0X3Rlc3RfYXV0aG9yIiwiaWQiOiJqZG9lIn0.y4vZuu1dDdwAl0-S00MCRWRYMlJ5YAMSir6Es6WtWx0"
      _ <- post "/postgrest/users" [json| { "id":"jdoe", "pass": "1234", "role": "postgrest_test_author" } |]
      _ <- post "/postgrest/users" [json| { "id":"jroe", "pass": "1234", "role": "postgrest_test_author" } |]

      p1 <- request methodPost "/authors_only"
        [ auth, ("Prefer", "return=representation") ]
        [json| { "secret": "nyancat" } |]
      liftIO $ do
          simpleBody p1 `shouldBe` [str|{"owner":"jdoe","secret":"nyancat"}|]
          simpleStatus p1 `shouldBe` created201

      p2 <- request methodPost "/authors_only"
        -- jwt token for jroe
        [ authHeaderJWT "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoicG9zdGdyZXN0X3Rlc3RfYXV0aG9yIiwiaWQiOiJqcm9lIn0.YuF_VfmyIxWyuceT7crnNKEprIYXsJAyXid3rjPjIow", ("Prefer", "return=representation") ]
        [json| { "secret": "lolcat", "owner": "hacker" } |]
      liftIO $ do
          simpleBody p2 `shouldBe` [str|{"owner":"jroe","secret":"lolcat"}|]
          simpleStatus p2 `shouldBe` created201


text:
using UnityEngine;
using System.Collections.Generic;

namespace Fungus
{
    /// <summary>
    /// Type of audio effect to play.
    /// </summary>
    public enum AudioMode
    {
        /// <summary> Use short beep sound effects. </summary>
        Beeps,
        /// <summary> Use long looping sound effect. </summary>
        SoundEffect,
    }

    /// <summary>
    /// Manages audio effects for Dialogs.
    /// </summary>
    public class WriterAudio : MonoBehaviour, IWriterListener
    {
        [Tooltip("Volume level of writing sound effects")]
        [Range(0,1)]
        [SerializeField] protected float volume = 1f;

        [Tooltip("Loop the audio when in Sound Effect mode. Has no effect in Beeps mode.")]
        [SerializeField] protected bool loop = true;

        // If none is specifed then we use any AudioSource on the gameobject, and if that doesn't exist we create one.
        [Tooltip("AudioSource to use for playing sound effects. If none is selected then one will be created.")]
        [SerializeField] protected AudioSource targetAudioSource;

        [Tooltip("Type of sound effect to play when writing text")]
        [SerializeField] protected AudioMode audioMode = AudioMode.Beeps;

        [Tooltip("List of beeps to randomly select when playing beep sound effects. Will play maximum of one beep per character, with only one beep playing at a time.")]
        [SerializeField] protected List<AudioClip> beepSounds = new List<AudioClip>();

        [Tooltip("Long playing sound effect to play when writing text")]
        [SerializeField] protected AudioClip soundEffect;

        [Tooltip("Sound effect to play on user input (e.g. a click)")]
        [SerializeField] protected AudioClip inputSound;

        protected float targetVolume = 0f;

        // When true, a beep will be played on every written character glyph
        protected bool playBeeps;

        // True when a voiceover clip is playing
        protected bool playingVoiceover = false;

        public bool IsPlayingVoiceOver { get { return playingVoiceover; } }

        // Time when current beep will have finished playing
        protected float nextBeepTime;

        public float GetSecondsRemaining()
        {
            if (IsPlayingVoiceOver)
            {
                return targetAudioSource.isPlaying ? targetAudioSource.clip.length - targetAudioSource.time : 0f;
            }
            else
            {
                return 0F;
            }
        }

        protected virtual void SetAudioMode(AudioMode mode)
        {
            audioMode = mode;
        }

        protected virtual void Awake()
        {
            // Need to do this in Awake rather than Start due to init order issues
            if (targetAudioSource == null)
            {
                targetAudioSource = GetComponent<AudioSource>();
                if (targetAudioSource == null)
                {
                    targetAudioSource = gameObject.AddComponent<AudioSource>();
                }
            }

            targetAudioSource.volume = 0f;
        }

        protected virtual void Play(AudioClip audioClip)
        {
            if (targetAudioSource == null ||
                (audioMode == AudioMode.SoundEffect && soundEffect == null && audioClip == null) ||
                (audioMode == AudioMode.Beeps && beepSounds.Count == 0))
            {
                return;
            }

            playingVoiceover = false;
            targetAudioSource.volume = 0f;
            targetVolume = volume;

            if (audioClip != null)
            {
                // Voice over clip provided
                targetAudioSource.clip = audioClip;
                targetAudioSource.loop = loop;
                targetAudioSource.Play();
            }
            else if (audioMode == AudioMode.SoundEffect &&
                     soundEffect != null)
            {
                // Use sound effects defined in WriterAudio
                targetAudioSource.clip = soundEffect;
                targetAudioSource.loop = loop;
                targetAudioSource.Play();
            }
            else if (audioMode == AudioMode.Beeps)
            {
                // Use beeps defined in WriterAudio
                targetAudioSource.clip = null;
                targetAudioSource.loop = false;
                playBeeps = true;
            }
        }

        protected virtual void Pause()
        {
            if (targetAudioSource == null)
            {
                return;
            }

            // There's an audible click if you call audioSource.Pause() so instead just drop the volume to 0.
            targetVolume = 0f;
        }

        protected virtual void Stop()
        {
            if (targetAudioSource == null)
            {
                return;
            }

            // There's an audible click if you call audioSource.Stop() so instead we just switch off
            // looping and let the audio stop automatically at the end of the clip
            targetVolume = 0f;
            targetAudioSource.loop = false;
            playBeeps = false;
            playingVoiceover = false;
        }

        protected virtual void Resume()
        {
            if (targetAudioSource == null)
            {
                return;
            }

            targetVolume = volume;
        }

        protected virtual void Update()
        {
            targetAudioSource.volume = Mathf.MoveTowards(targetAudioSource.volume, targetVolume, Time.deltaTime * 5f);
        }

        #region IWriterListener implementation

        public virtual void OnInput()
        {
            if (inputSound != null)
            {
                // Assumes we're playing a 2D sound
                AudioSource.PlayClipAtPoint(inputSound, Vector3.zero);
            }
        }

        public virtual void OnStart(AudioClip audioClip)
        {
            if (playingVoiceover)
            {
                return;
            }
            Play(audioClip);
        }

        public virtual void OnPause()
        {
            if (playingVoiceover)
            {
                return;
            }
            Pause();
        }

        public virtual void OnResume()
        {
            if (playingVoiceover)
            {
                return;
            }
            Resume();
        }

        public virtual void OnEnd(bool stopAudio)
        {
            if (stopAudio)
            {
                Stop();
            }
        }

        public virtual void OnGlyph()
        {
            if (playingVoiceover)
            {
                return;
            }

            if (playBeeps && beepSounds.Count > 0)
            {
                if (!targetAudioSource.isPlaying)
                {
                    if (nextBeepTime < Time.realtimeSinceStartup)
                    {
                        targetAudioSource.clip = beepSounds[Random.Range(0, beepSounds.Count)];

                        if (targetAudioSource.clip != null)
                        {
                            targetAudioSource.loop = false;
                            targetVolume = volume;
                            targetAudioSource.Play();

                            float extend = targetAudioSource.clip.length;
                            nextBeepTime = Time.realtimeSinceStartup + extend;
                        }
                    }
                }
            }
        }

        public virtual void OnVoiceover(AudioClip voiceOverClip)
        {
            if (targetAudioSource == null)
            {
                return;
            }

            playingVoiceover = true;

            targetAudioSource.volume = volume;
            targetVolume = volume;
            targetAudioSource.loop = false;
            targetAudioSource.clip = voiceOverClip;
            targetAudioSource.Play();
        }

        public void OnAllWordsWritten()
        {
        }

        #endregion
    }
}


text:
<?php require_once('Connections/MyHomeStay_System.php'); ?>
<?php

if (!isset($_SESSION)) {
  session_start();
}

$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
  $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){

  $_SESSION['MM_Username'] = NULL;
  $_SESSION['MM_UserGroup'] = NULL;
  $_SESSION['PrevUrl'] = NULL;
  unset($_SESSION['MM_Username']);
  unset($_SESSION['MM_UserGroup']);
  unset($_SESSION['PrevUrl']);

  $logoutGoTo = "Guest_Index.php";
  if ($logoutGoTo) {
    header("Location: $logoutGoTo");
    exit;
  }
}
?>
<?php
if (!isset($_SESSION)) {
  session_start();
}
$MM_authorizedUsers = "BLOCK";
$MM_donotCheckaccess = "false";

function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {

  $isValid = False;

  if (!empty($UserName)) {

    $arrUsers = Explode(",", $strUsers);
    $arrGroups = Explode(",", $strGroups);
    if (in_array($UserName, $arrUsers)) {
      $isValid = true;
    }

    if (in_array($UserGroup, $arrGroups)) {
      $isValid = true;
    }
    if (($strUsers == "") && false) {
      $isValid = true;
    }
  }
  return $isValid;
}

$MM_restrictGoTo = "Guest_Index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
  $MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo);
  exit;
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$colname_Recordset2 = "-1";
if (isset($_SESSION['MM_Username'])) {
  $colname_Recordset2 = $_SESSION['MM_Username'];
}
mysql_select_db($database_MyHomeStay_System, $MyHomeStay_System);
$query_Recordset2 = sprintf("SELECT * FROM guest WHERE Guest_Email = %s", GetSQLValueString($colname_Recordset2, "text"));
$Recordset2 = mysql_query($query_Recordset2, $MyHomeStay_System) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
?>
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <title>WELCOME TO SUNFLOWER HOUSE MALACCA</title>
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
	<link href="assets/css/font-awesome.min.css" rel="stylesheet" />
	<link href="assets/css/flexslider.css" rel="stylesheet" />
    <link href="assets/css/style.css" rel="stylesheet" />
	<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,300' rel='stylesheet' type='text/css' />
    <link href="Style/homepage.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">

Hi, <?php echo $row_Recordset2['Guest_Name']; ?>

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">

</button>

HOME

PROFILE

ABOUT US

<a onclick="return confirm('Press OK to logout.')" href="<?php echo $logoutAction ?>">LOGOUT

ACCOUNT BLOCKED

Your account has been blocked. Please contact +606-282-1500 for more information.

          MOHAMED YUSSUF BIN JAHUBAR SATHIK | © 2016 SUNFLOWER HOUSE MALACCA| All Rights Reserved |

<?php
mysql_free_result($Recordset2);
?>