text:
Configuration
=============

- Add social_auth to ``PYTHONPATH`` and installed applications::

    INSTALLED_APPS = (
        ...
        'social_auth'
    )

- Add desired authentication backends to Django's AUTHENTICATION_BACKENDS_ setting::

    AUTHENTICATION_BACKENDS = (
        'social_auth.backends.twitter.TwitterBackend',
        'social_auth.backends.facebook.FacebookBackend',
        'social_auth.backends.google.GoogleOAuthBackend',
        'social_auth.backends.google.GoogleOAuth2Backend',
        'social_auth.backends.google.GoogleBackend',
        'social_auth.backends.yahoo.YahooBackend',
        'social_auth.backends.browserid.BrowserIDBackend',
        'social_auth.backends.contrib.linkedin.LinkedinBackend',
        'social_auth.backends.contrib.livejournal.LiveJournalBackend',
        'social_auth.backends.contrib.orkut.OrkutBackend',
        'social_auth.backends.contrib.foursquare.FoursquareBackend',
        'social_auth.backends.contrib.github.GithubBackend',
        'social_auth.backends.contrib.vkontakte.VKontakteBackend',
        'social_auth.backends.contrib.live.LiveBackend',
        'social_auth.backends.contrib.skyrock.SkyrockBackend',
        'social_auth.backends.contrib.yahoo.YahooOAuthBackend',
        'social_auth.backends.OpenIDBackend',
        'django.contrib.auth.backends.ModelBackend',
    )

  Take into account that backends **must** be defined in AUTHENTICATION_BACKENDS_
  or Django won't pick them when trying to authenticate the user.

  Don't miss ``django.contrib.auth.backends.ModelBackend`` if using ``django.auth``
  user model or users won't be able to login.

- Setup needed OAuth keys (see OAuth_ section for details)::

    TWITTER_CONSUMER_KEY         = ''
    TWITTER_CONSUMER_SECRET      = ''
    FACEBOOK_APP_ID              = ''
    FACEBOOK_API_SECRET          = ''
    LINKEDIN_CONSUMER_KEY        = ''
    LINKEDIN_CONSUMER_SECRET     = ''
    ORKUT_CONSUMER_KEY           = ''
    ORKUT_CONSUMER_SECRET        = ''
    GOOGLE_CONSUMER_KEY          = ''
    GOOGLE_CONSUMER_SECRET       = ''
    GOOGLE_OAUTH2_CLIENT_ID      = ''
    GOOGLE_OAUTH2_CLIENT_SECRET  = ''
    FOURSQUARE_CONSUMER_KEY      = ''
    FOURSQUARE_CONSUMER_SECRET   = ''
    VK_APP_ID                    = ''
    VK_API_SECRET                = ''
    LIVE_CLIENT_ID = ''
    LIVE_CLIENT_SECRET = ''
    SKYROCK_CONSUMER_KEY      = ''
    SKYROCK_CONSUMER_SECRET   = ''
    YAHOO_CONSUMER_KEY        = ''
    YAHOO_CONSUMER_SECRET     = ''

- Setup login URLs::

    LOGIN_URL          = '/login-form/'
    LOGIN_REDIRECT_URL = '/logged-in/'
    LOGIN_ERROR_URL    = '/login-error/'

  Check Django documentation at `Login URL`_ and `Login redirect URL`_

  If a custom redirect URL is needed that must be different to ``LOGIN_URL``,
  define the setting::

    SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/another-login-url/'

  A different URL could be defined for newly registered users::

    SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/new-users-redirect-url/'

  or for newly associated accounts::

    SOCIAL_AUTH_NEW_ASSOCIATION_REDIRECT_URL = '/new-association-redirect-url/'

  or for account disconnections::

    SOCIAL_AUTH_DISCONNECT_REDIRECT_URL = '/account-disconnected-redirect-url/'

  Users will be redirected to ``LOGIN_ERROR_URL`` in case of error or user
  cancellation on some backends. This URL can be override by this setting::

    SOCIAL_AUTH_BACKEND_ERROR_URL = '/new-error-url/'

- Configure authentication and association complete URL names to avoid
  possible clashes::

    SOCIAL_AUTH_COMPLETE_URL_NAME  = 'socialauth_complete'
    SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'socialauth_associate_complete'

- Add URLs entries::

    urlpatterns = patterns('',
        ...
        url(r'', include('social_auth.urls')),
        ...
    )

  All ``django-social-auth`` URLs names have ``socialauth_`` prefix.

- Define context processors if needed::

    TEMPLATE_CONTEXT_PROCESSORS = (
        ...
        'social_auth.context_processors.social_auth_by_name_backends',
        'social_auth.context_processors.social_auth_backends',
        'social_auth.context_processors.social_auth_by_type_backends',
        'social_auth.context_processors.social_auth_login_redirect',
    )

  * ``social_auth_by_name_backends``:
    Adds a ``social_auth`` dict where each key is a provider name and its value
    is a UserSocialAuth instance if user has associated an account with that
    provider, otherwise ``None``.

  * ``social_auth_backends``:
    Adds a ``social_auth`` dict with keys are ``associated``, ``not_associated`` and
    ``backends``. ``associated`` key is a list of ``UserSocialAuth`` instances
    associated with current user. ``not_associated`` is a list of providers names
    that the current user doesn't have any association yet. ``backends`` holds
    the list of backend names supported.

  * ``social_auth_by_type_backends``:
    Simiar to ``social_auth_backends`` but each value is grouped by backend type
    ``openid``, ``oauth2`` and ``oauth``.

  * ``social_auth_login_redirect``:
    For man in the middle redirects (ie authenticating via a login
    required decorator), a convenince query string can be added to your context
    for templates. On your login options page::

        ...

    allows for a continuous login. Useful if multiple login options are
    presented.

  Check ``social_auth.context_processors`` for details.

  **Note**:
  ``social_auth_backends`` and ``social_auth_by_type_backends`` don't play nice
  together.

- Sync database to create needed models::

    ./manage.py syncdb

- Not mandatory, but recommended::

    SOCIAL_AUTH_DEFAULT_USERNAME = 'new_social_auth_user'

  or::

    import random
    SOCIAL_AUTH_DEFAULT_USERNAME = lambda: random.choice(['Darth Vader', 'Obi-Wan Kenobi', 'R2-D2', 'C-3PO', 'Yoda'])

  in case your user layout needs to purify username on some weird way.

  Final user name will have a random UUID-generated suffix in case it's already
  taken. The UUID token max length can be changed with the setting::

    SOCIAL_AUTH_UUID_LENGTH = 16

- Backends will store extra values from response by default, set this to False
  to avoid such behavior::

    SOCIAL_AUTH_EXTRA_DATA = False

- The update_user_details pipeline processor will set certain fields on user
  objects, such as ``email``. Set this to a list of fields you only want to
  set for newly created users:

    SOCIAL_AUTH_PROTECTED_USER_FIELDS = ['email',]

  Also more extra values will be stored if defined, details about this setting
  are listed below on OpenId and OAuth sections.

  Session expiration time is an special value, it's recommended to define::

    SOCIAL_AUTH_EXPIRATION = 'expires'

  and use such setting name where expiration times are returned. View that
  completes login process will set session expiration time using this name if
  it's present or ``expires`` by default. Expiration configuration can be disabled
  with setting::

    SOCIAL_AUTH_SESSION_EXPIRATION = False

- It's possible to override the used ``User`` model if needed::

    SOCIAL_AUTH_USER_MODEL = 'myapp.CustomUser'

  This class **must** have a custom `Model Manager`_ with a ``create_user`` method
  that resembles the one on `auth.UserManager`_.

  Also, it's highly recommended that this class define the following fields::

    username   = CharField(...)
    last_login = DateTimeField(blank=True)
    is_active  = BooleanField(...)

  and the method::

    is_authenticated():
        ...

  These are needed to ensure a better ``django-auth`` integration, in other case
  `login_required`_ won't be usable. A warning is displayed if any of these are
  missing. By default `auth.User`_ is used.

  Check example application for implementation details, but first, please take
  a look to `User Profiles`_, it might be what you were looking for.

  It's possible to disable user creations by ``django-social-auth`` with::

      SOCIAL_AUTH_CREATE_USERS = False

- You can send extra parameters on auth process by defining settings per
  provider, example to request Facebook to show Mobile authorization page,
  define::

      FACEBOOK_AUTH_EXTRA_ARGUMENTS = {'display': 'touch'}

  For other providers, just define settings in the form::

      <uppercase backend name>_AUTH_EXTRA_ARGUMENTS = {...}

  You can override the arguments defined in the settings with GET parameters.

- Also, you can send extra parameters on request token process by defining
  settings per provider in the same way explained above but with this other
  suffix::

      <uppercase backend name>_REQUEST_TOKEN_EXTRA_ARGUMENTS = {...}

- By default the application doesn't make redirects to different domains, to
  disable this behavior::

      SOCIAL_AUTH_SANITIZE_REDIRECTS = False

- Inactive users can be redirected to a different page if this setting is
  defined::

      SOCIAL_AUTH_INACTIVE_USER_URL = '...'

  Defaults to ``LOGIN_ERROR_URL``.

- The application catches any exception and logs errors to ``logger`` or
  ``django.contrib.messages`` application by default. But it's possible to
  override the default behavior by defining a function to process the
  exceptions using this setting::

    SOCIAL_AUTH_PROCESS_EXCEPTIONS = 'social_auth.utils.log_exceptions_to_messages'

  The function parameters are ``request`` holding the current request object,
  ``backend`` with the current backend and ``err`` which is the exception
  instance. If the function returns a URL, the user will be redirected to it.
  Otherwise, they will be redirected to the backend's error URL, or
  ``LOGIN_ERROR_URL``.

  Recently this set of exceptions was introduced to describe the situations
  a bit more than the old ``ValueError`` usually raised::

    AuthException           - Base exception class
    AuthFailed              - Authentication failed for some reason
    AuthCanceled            - Authentication was canceled by the user
    AuthUnknownError        - An unknown error stoped the authentication
                              process
    AuthTokenError          - Unauthorized or access token error, it was
                              invalid, impossible to authenticate or user
                              removed permissions to it.
    AuthMissingParameter    - A needed parameter to continue the process was
                              missing, usually raised by the services that
                              need some POST data like myOpenID
    AuthAlreadyAssociated   - A different user has already associated
                              the social account that the current user
                              is trying to associate.

  These are a subclass of ``ValueError`` to keep backward compatibility.

  Having tracebacks is really useful when debugging, for that purpose this
  setting was defined::

    SOCIAL_AUTH_RAISE_EXCEPTIONS = DEBUG

  It's default value is ``DEBUG``, so you need to set it to ``False`` to avoid
  tracebacks when ``DEBUG = True``.

- When your project is behind a reverse proxy that uses HTTPS the redirect URIs
  can became with the wrong schema (``http://`` instead of ``https://``), and
  might cause errors with the auth process, to force HTTPS in the final URIs
  define this setting::

    SOCIAL_AUTH_REDIRECT_IS_HTTPS = True

- The name of the last backend used to login is stored as a string in the
  session under the key ``social_auth_last_login_backend``, the key can be
  customized by defining this setting::

    SOCIAL_AUTH_LAST_LOGIN = 'social_auth_last_login_backend'

- Any ``urllib2.urlopen`` call will be performed with the default timeout
  value, to change it without affecting the global socket timeout define this
  setting (the value specifies timeout seconds)::

    SOCIAL_AUTH_URLOPEN_TIMEOUT = 30

  ``urllib2.urlopen`` uses ``socket.getdefaulttimeout()`` value by default, so
  setting ``socket.setdefaulttimeout(...)`` will affect ``urlopen`` when this
  setting is not defined, otherwise this setting takes precedence. Also this
  might affect other places in Django.

  ``timeout`` argument was introduced in python 2.6 according to `urllib2
  documentation`_

- `OpenID PAPE`_ extension support by defining::

    SOCIAL_AUTH_OPENID_PAPE_MAX_AUTH_AGE = <int value>

  Otherwise the extension is not used.

Some settings can be tweak by backend by adding the backend name prefix (all
uppercase and replace ``-`` with ``_``), here's the supported settings so far::

        LOGIN_ERROR_URL
        SOCIAL_AUTH_BACKEND_ERROR_URL
        SOCIAL_AUTH_NEW_ASSOCIATION_REDIRECT_URL
        SOCIAL_AUTH_DISCONNECT_REDIRECT_URL
        SOCIAL_AUTH_NEW_USER_REDIRECT_URL
        SOCIAL_AUTH_LOGIN_REDIRECT_URL
        SOCIAL_AUTH_INACTIVE_USER_URL

- The ORM models can be replaced by providing the name of an alternate module
  for the ``SOCIAL_AUTH_MODELS`` setting. The default is
  ``'social_auth.db.django_models'``, which defines the Django ORM models that
  were originally defined to implement Social Auth's storage. The app provides
  an example alternate based on `MongoEngine`_. You can use it by setting::

    SOCIAL_AUTH_MODELS = 'social_auth.db.mongoengine_models'

  Make sure you've followed the instructions for `MongoEngine Django
  integration`_, as you're now utilizing that user model.

  The `MongoEngine_` backend was developed and tested with version 0.6.10 of
  `MongoEngine_`.

  Alternate storage models implementations currently follow a tight pattern of
  models that behave near or identical to Django ORM models. It is currently
  not decoupled from this pattern by any abstraction layer. If you would like
  to implement your own alternate, please see the
  ``social_auth.db.django_models`` and ``social_auth.db.mongoengine_models``
  modules for guidance.

- A base middleware is provided that handles social ``AuthExceptions`` by
  providing a message to the user via the Django messages framework, and then
  responding with a redirect to a URL defined by one of the middleware methods.
  The base middleware is
  ``social_auth.middleware.SocialAuthExceptionMiddleware``. The two methods to
  override when subclassing are ``get_message(request, exception)`` and
  ``get_redirect_uri(request, exception)``. By default, the message is the
  exception message and the URL for the redirect is the location specified by
  the ``LOGIN_ERROR_URL`` configuration setting.

Notes
-----

Since Django 1.3 the URL templatetag ``{% url socialauth_begin ... %}`` syntax
is deprecated in favor the new format where the URL name is quoted (using
single quotes). See the `release notes`_ for details.

The new syntax is not enforced yet but will be on Django 1.5 (current trunk),
and it's also available by importing ``url`` tag from ``future`` module doing::

    {% load url from future %}

In case of experiencing issues similar to `#303`_, check the tag being used and
its syntax.

.. _Model Manager: http://docs.djangoproject.com/en/dev/topics/db/managers/#managers
.. _Login URL: http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#login-url
.. _Login redirect URL: http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#login-redirect-url
.. _AUTHENTICATION_BACKENDS: http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#authentication-backends
.. _auth.User: http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/models.py#L186
.. _auth.UserManager: http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/models.py#L114
.. _login_required: http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/decorators.py#L39
.. _User Profiles: http://www.djangobook.com/en/1.0/chapter12/#cn222
.. _OAuth: http://oauth.net/
.. _MongoEngine: http://mongoengine.org
.. _MongoEngine Django integration: http://mongoengine-odm.readthedocs.org/en/latest/django.html
.. _urllib2 documentation: http://docs.python.org/library/urllib2.html#urllib2.urlopen
.. _release notes: https://docs.djangoproject.com/en/1.3/releases/1.3/#changes-to-url-and-ssi
.. _#303: https://github.com/omab/django-social-auth/issues/303
.. _OpenID PAPE: http://openid.net/specs/openid-provider-authentication-policy-extension-1_0.html


text:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
//session_start();
class Area extends MX_Controller
{

    public function __construct()
    {
        parent::__construct();
        $this->load->library('template');
		$this->load->library('menu');
		$this->load->model('area_model');
		//$this->load->model('grl/general_model');
    }

	public function index()
    {
		if($this->session->userdata('id')):
     		$session_data = $this->session->userdata();
     		$data['usuario'] = $session_data['username'];
	 		$data['iduser'] = $session_data['id'];
			$data['idperfil'] = $session_data['idperfil'];
			$data["menu"] = $this->menu->crea_menu($data['idperfil']);
			$data['css'] = '<link href="'.base_url('assets/css/infragistics.theme.css').'" rel="stylesheet" />';
			$data['css'] .= '<link href="'.base_url('assets/css/infragistics.css').'" rel="stylesheet" />';
			$data['js'] = '<script src="'.base_url('assets/js/jquery-ui.min.js').'"></script> ';
			$data['js'] .= '<script src="'.base_url('assets/js/modernizr.min.js').'"></script> ';
			$data['js'] .='<script src="'.base_url('assets/js/infragistics.core.js').'"></script>';
			$data['js'] .='<script src="'.base_url('assets/js/infragistics.lob.js').'"></script>';

			$data['js'] .= '<script src="'.base_url('assets/js/doc-area.js').'"></script>';
			$this->template->load('template','area',$data);
		else:
			redirect('login/index', 'refresh');
		endif;
    }

	public function agregar()
	{
		if($this->session->userdata('id')):
     		$session_data = $this->session->userdata();
     		$data['usuario'] = $session_data['username'];
	 		$data['iduser'] = $session_data['id'];
			$data['idperfil'] = $session_data['idperfil'];
			$area = ($this->input->get('area'));
			$result = $this->area_model->agregar_area($area,$data["usuario"]);
			echo '{"msg":'.$result[0]["mensaje"].'}';
		else:
			redirect('login/index', 'refresh');
		endif;
	}

	public function agregar_usuario()
	{
		if($this->session->userdata('id')):
     		$session_data = $this->session->userdata();
     		$data['usuario'] = $session_data['username'];
	 		$data['iduser'] = $session_data['id'];
			$data['idperfil'] = $session_data['idperfil'];
			$partes = explode('/',$this->input->get('usuario'));
			$idarea = $this->input->get('idarea');
			$idnivel = $this->input->get('nivel');
			$usuario = $partes[0];
			$correo = $partes[1];
			$result = $this->area_model->agregar_usuario($idarea,$idnivel,$usuario,$correo,$data['usuario']);
			echo '{"msg":'.$result[0]["mensaje"].'}';
		else:
			redirect('login/index', 'refresh');
		endif;
	}

	public function buscar()
	{
		if($this->session->userdata('id')):
     		$session_data = $this->session->userdata();
     		$data['usuario'] = $session_data['username'];
	 		$data['iduser'] = $session_data['id'];
			$data['idperfil'] = $session_data['idperfil'];
			$idarea_involucrada = $this->input->get('idarea');
			$areas = $this->area_model->desplegar_area($idarea_involucrada);
			$datasource = array();
			foreach ($areas as $resultado):
				//$datasource[]=array_map('utf8_encode', $resultado);
				$datasource[]=($resultado);
			endforeach;
			echo json_encode($datasource);
		else:
			redirect('login/index', 'refresh');
		endif;
	}

	public function cancelar()
	{
		$estado = $this->input->get('estado');
		$idarea = $this->input->get('idarea');
		$result = $this->area_model->cambiar_estado($idarea,$estado);
		echo '{"msg":'.$result[0]["mensaje"].'}';
	}

	public function cancelar_usuario()
	{
		$idnivel_area_usuario = $this->input->get('idnivel_area_usuario');
		$result = $this->area_model->cambiar_estado_usuario($idnivel_area_usuario);
		echo '{"msg":'.$result[0]["mensaje"].'}';
	}

	public function desplegar()
	{
		if($this->session->userdata('id')):
     		$session_data = $this->session->userdata();
     		$data['usuario'] = $session_data['username'];
	 		$data['iduser'] = $session_data['id'];
			$data['idperfil'] = $session_data['idperfil'];
			$areas = $this->area_model->desplegar_areas();
			$datasource = array();
			foreach ($areas as $resultado):
				//$datasource[]=array_map('utf8_encode', $resultado);
				$datasource[]=($resultado);
			endforeach;
			echo json_encode($datasource);
		else:
			redirect('login/index', 'refresh');
		endif;
	}

	public function desplegar_activas()
	{
		if($this->session->userdata('id')):
     		$session_data = $this->session->userdata();
     		$data['usuario'] = $session_data['username'];
	 		$data['iduser'] = $session_data['id'];
			$data['idperfil'] = $session_data['idperfil'];
			$areas = $this->area_model->desplegar_areas_activas();
			$datasource = array();
			foreach ($areas as $resultado):
				//$datasource[]=array_map('utf8_encode', $resultado);
				$datasource[]=($resultado);
			endforeach;
			echo json_encode($datasource);
		else:
			redirect('login/index', 'refresh');
		endif;
	}

	public function desplegar_usuarios_intranet()
	{
		//CONEXION A INTRANET
			$connect = mysqli_connect('172.20.74.92', 'intranet_ghi','Int_GHi14','igh');
			if ($connect)
			{
				$result=mysqli_query($connect,"SELECT idusuario,concat_ws(' ',nombre,apaterno,amaterno)as nombre,correo FROM usuario where usuario_estado = 2 and correo<>'' order by nombre,apaterno,amaterno ASC");
				$row=mysqli_num_rows($result);
				$datasource = array();
				for($j=0;$j<$row;$j++)
				{
					//$datasource[]=mysqli_fetch_array($result);
					//$datasource[]=array_map('utf8_encode', mysqli_fetch_array($result));
					$datasource[]=(mysqli_fetch_array($result));

				}
				echo json_encode($datasource);
			}
			else{exit;}
	}

	public function desplegar_usuarios_agregados()
	{
		if($this->session->userdata('id')):
     		$session_data = $this->session->userdata();
     		$data['usuario'] = $session_data['username'];
	 		$data['iduser'] = $session_data['id'];
			$data['idperfil'] = $session_data['idperfil'];
			$idarea=$this->input->get('idarea');
			$usuarios_agregados = $this->area_model->desplegar_usuarios_agregados($idarea);
			$datasource = array();
			foreach ($usuarios_agregados as $resultado):
				//$datasource[]=array_map('utf8_encode', $resultado);
				$datasource[]=($resultado);
			endforeach;
			echo json_encode($datasource);
		else:
			redirect('login/index', 'refresh');
		endif;
	}

	public function desplegar_niveles()
	{
		$niveles = $this->area_model->desplegar_niveles();
		$datasource = array();
		foreach ($niveles as $resultado):
			//$datasource[]=array_map('utf8_encode', $resultado);
			$datasource[]=($resultado);
		endforeach;
		echo json_encode($datasource);
	}

	public function editar()
	{
		if($this->session->userdata('id')):
     		$session_data = $this->session->userdata();
     		$data['usuario'] = $session_data['username'];
	 		$data['iduser'] = $session_data['id'];
			$data['idperfil'] = $session_data['idperfil'];
			$area = ($this->input->get('area'));
			$idarea = $this->input->get('idarea');
			$result = $this->area_model->editar_area($idarea,$area);
			echo '{"msg":'.$result[0]["mensaje"].'}';
		else:
			redirect('login/index', 'refresh');
		endif;
	}
}

redpajama_set_name: RedPajamaGithub


text:
Pages

h1 Lorem ipsum dolor sit amet

h2 Consectetur adipiscing elit

h3 Sed fringilla, dui vitae iaculis blandit

h4 Eros diam venenatis tortor

h5 Et molestie quam metus nec elit

h6 Nullam viverra volutpat erat, molestie

    Feugiat nibh mollis in. Ut id commodo leo. Praesent malesuada mi ut turpis blandit rutrum. Curabitur vitae augue sit amet ante tincidunt tristique. Donec arcu arcu, malesuada nec venenatis quis, suscipit nec diam. Phasellus scelerisque dignissim nunc nec condimentum. Duis accumsan consequat magna nec aliquam. Mauris tincidunt dictum nulla, eget semper enim ultrices vitae.

Donec arcu arcu, malesuada nec venenatis quis

Duis accumsan consequat magna nec aliquam

Vestibulum dui diam risus

mollis varius et rhoncus metus quis scelerisque

    Vestibulum dui diam, egestas nec quam ac, maximus consequat justo. In mollis varius lacus. Cras dolor dolor, bibendum aliquet sem sit amet, ullamcorper consectetur lorem. Mollis varius et rhoncus metus. Nunc quis risus scelerisque, imperdiet turpis quis, tincidunt quam.


text:
package net.ichigotake.android.yancha.app.chat;

public interface SocketIoEventListener {

    void onResponse(SocketIoEvent event, String response);
}


text:
/*
 * \oddbot_boot_module.h
 *
 * \author Chris Dunkers, CMU - cmdunkers@cmu.edu
 * \date October 13, 2014
 */

#ifndef ODDBOT_BOOT_MODULE_H_
#define ODDBOT_BOOT_MODULE_H_

#include "ros/ros.h"
#include "oddbot_msgs/OddbotBoot.h"
#include "oddbot_msgs/OddbotBootStop.h"
#include "oddbot_lib/get_subnet.h"

class oddbot_boot_module{
	public:
		oddbot_boot_module();
		bool get_subnet_msg_stop();
		void send_info();
	private:
		bool subnet_msg_stop;
		oddbot_msgs::OddbotBoot module_info_msg;
		ros::Publisher boot_pub;
		ros::Subscriber stop_sub;
		void get_info(const oddbot_msgs::OddbotBootStop::ConstPtr& stop_msg);
		int subnet;
};

int main(int argc, char** argv);

#endif


text:
<?php

if (!file_exists(__DIR__ . '/../vendor')) {
    die('run "composer install" first' . PHP_EOL);
}

defined('TEST') or define('TEST', true);
define('TEST_DIR', __DIR__);

require __DIR__ . '/../vendor/autoload.php';


text:
usage:
	@echo "See README file for more instructions"
	@echo "make all     Build all example files"
	@echo "make clean   Remove all built and intermediary files"
	@echo "make start   Start CONFD daemon and example agent"
	@echo "make stop    Stop any CONFD daemon and example agent"
	@echo "make restart Stop and restart the CONFD daemon only"
	@echo "make cli     Start the CONFD Command Line Interface, J-style"
	@echo "make cli-c   Start the CONFD Command Line Interface, C-style"

######################################################################
# Where is ConfD installed? Make sure CONFD_DIR points it out
CONFD_DIR ?= ../../..

# Include standard ConfD build definitions and rules
include $(CONFD_DIR)/src/confd/build/include.mk

# In case CONFD_DIR is not set (correctly), this rule will trigger
$(CONFD_DIR)/src/confd/build/include.mk:
	@echo 'Where is ConfD installed? Set $$CONFD_DIR to point it out!'
	@echo ''

######################################################################
# Example specific definitions and rules

CONFD_FLAGS = --addloadpath $(CONFD_DIR)/etc/confd
START_FLAGS ?=

OSTYPE	= $(shell uname -s)
SRC	= thr_daemon.c
OBJS	= $(SRC:.c=.o)

all:	model.fxs thr_daemon $(CDB_DIR) ssh-keydir
	@echo "Build complete"

thr_daemon: $(OBJS)
	$(CC) -o $@ $(OBJS) $(LIBS)

$(OBJS): model.h

######################################################################
clean:	iclean
	-rm -rf model.h thr_daemon 2> /dev/null || true
	-rm -rf *log *trace cli-history 2> /dev/null || true

start:  stop
	$(CONFD) -c confd.conf $(CONFD_FLAGS)
	### * In another terminal window, run the CLI (e.g. 'make cli')
	### * In this window, the data provider daemon now starts:
	./thr_daemon $(START_FLAGS)

######################################################################
stop:
	### Killing any confd daemon and data provider daemons
	$(CONFD) --stop || true
	$(KILLALL) thr_daemon || true

######################################################################
restart:
	### Restarting the confd daemon
	$(CONFD) --stop || true
	sleep 3
	$(CONFD) -c confd.conf $(CONFD_FLAGS)

######################################################################
cli:
	$(CONFD_DIR)/bin/confd_cli --user=admin --groups=admin \
		--interactive || echo Exit

cli-c:
	$(CONFD_DIR)/bin/confd_cli -C --user=admin --groups=admin \
		--interactive || echo Exit

######################################################################


text:
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, AlertController, Loading, LoadingController} from 'ionic-angular';
import { AuthProvider } from '../../providers/auth/auth';
import { FormBuilder, FormGroup, Validators} from '@angular/forms';

/**
 * Generated class for the ResetPasswordPage page.
 *
 * See http://ionicframework.com/docs/components/#navigation for more info
 * on Ionic pages and navigation.
 */

@IonicPage({
    name: 'reset-password'
})
@Component({
  selector: 'page-reset-password',
  templateUrl: 'reset-password.html',
})
export class ResetPasswordPage {
  public resetPasswordForm: FormGroup;
  public loading: Loading;
  constructor(public navCtrl: NavController,
              public navParams: NavParams,
              public formBuilder: FormBuilder,
              public loadingCtrl: LoadingController,
              public authProvider: AuthProvider,
              public alertCtrl: AlertController
  )
  {
    this.resetPasswordForm = formBuilder.group({
      email: ['',Validators.compose([Validators.email,Validators.required])]
    });
  }

  resetPassword() {
    if (!this.resetPasswordForm.valid) {
      console.log(this.resetPasswordForm.value);
    } else {
    this.authProvider.resetPassword(this.resetPasswordForm.value.email)
    .then( (user) =>{
        let alert = this.alertCtrl.create({
          message: "instruction sent to your email",
          buttons:[{
            text: "Ok",
            role: "cancel",
            handler: ()=> {this.navCtrl.pop();}
          }]
        });
        alert.present();
      }, error => {
        var errorMessage: string = error.message;
        let errorAlert = this.alertCtrl.create({
          message: errorMessage,
          buttons: [{text: "Ok", role: "cancel"}]
        });
        errorAlert.present();
      });
    }
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad ResetPasswordPage');
  }

}


text:
import math
import random

required_states = ['age','position','direction']
required_matrices = ['trace']

def run(name, world, matrices, states):
    # Breed a new agent
    c, = world.add_new_agents(name, 1)
    # Inherit some state from the parent
    y,x = states['position']
    c.states['position'] = (y,x)
    c.states['direction'] = math.pi/12*(random.random()*2-1) + states['direction']


text:
"""
Demo of the histogram (hist) function used to plot a cumulative distribution.

"""
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import mlab

mu = 200
sigma = 25
n_bins = 50
x = mu + sigma*np.random.randn(10000)

n, bins, patches = plt.hist(x, n_bins, normed=1,
                            histtype='step', cumulative=True)

# Add a line showing the expected distribution.
y = mlab.normpdf(bins, mu, sigma).cumsum()
y /= y[-1]
plt.plot(bins, y, 'k--', linewidth=1.5)

# Overlay a reversed cumulative histogram.
plt.hist(x, bins=bins, normed=1, histtype='step', cumulative=-1)

plt.grid(True)
plt.ylim(0, 1.05)
plt.title('cumulative step')

plt.show()


text:
1. ``` git branch ``` // checks what current branch you are on.

2. ```git checkout -b fencing ``` // creates new branch fencing

3. ```git checkout fencing ``` // switches to branch fencing

4. ```git merge <branch-name> ``` // merges branch into current branch

5. ```git merge fencing-- ERR ``` // this merge gives error which needs to be fixed

6. ``` git branch -d <branch-name> ``` // this will delete the branch


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/tk_button_shape_pressed"
          android:state_pressed="true"
          android:state_enabled="true" />

    <item android:drawable="@drawable/tk_button_shape"
          android:state_pressed="false"
          android:state_enabled="false" />

    <item android:drawable="@drawable/tk_button_shape"
          android:state_pressed="false"
          android:state_enabled="true" />

</selector>


text:
<?php

require_once 'post_request.php';

/// A request for questions.
class QuestionRequest extends PostRequest
{
    /// Constructor for a question request.
    /**
      * \param $url the domain name of the site or a URL object
      * \param $method the method being called
      */
    function __construct($url, $method=null)
    {
        // Pass this information along to the parent constructor
        parent::__construct($url, 'question', 'questions', $method);
    }

    /// Retrieves the answers to the current set of questions.
    /**
      * \return a PostRequest object
      */
    public function Answers()
    {
        $url_copy = clone $this->url;
        return new PostRequest($url_copy, 'answer', null, 'answers');
    }

    /// Returns questions that are linked to the current set of questions.
    /**
      * \return the current instance
      */
    public function Linked()
    {
        $this->url->SetMethod('linked');
        return $this;
    }

    /// Restricts the questions returned to those that have no answers.
    /**
      * \return the current instance
      */
    public function NoAnswers()
    {
        $this->url->SetParameter('no-answers');
        return $this;
    }

    /// Returns questions that are related to the current set of questions.
    /**
      * \return the current instance
      */
    public function Related()
    {
        $this->url->SetMethod('related');
        return $this;
    }

    /// Retrieves the revisions for the current set of questions.
    /**
      * \return a TimelineRequest object
      */
    public function Timeline()
    {
        $url_copy = clone $this->url;
        return new PagedRequest($url_copy, 'question_timeline', null, 'timeline');
    }

    /// Restricts the questions returned to those that have no accepted answers.
    /**
      * \return the current instance
      */
    public function Unaccepted()
    {
        $this->url->SetParameter('unaccepted');
        return $this;
    }

    /// Restricts the questions returned to those that are unanswered.
    /**
      * \return the current instance
      */
    public function Unanswered()
    {
        $this->url->SetParameter('unanswered');
        return $this;
    }

    /// Returns questions that match the specified search terms.
    /**
      * \param $search_text text to search for in question titles
      * \return the current instance
      */
    public function Search($search_text=null)
    {
        // the /search method does not have the '/questions' prefix
        // so we need to reset the category
        $this->url->SetCategory('search');

        if($search_text !== null)
            $this->InTitle($search_text);

        return $this;
    }

    /// Returns questions that are similar to the current set of questions.
    /**
      * \param $title a title to test for
      * \return the current instance
      */
    public function Similar($title=null)
    {
        // the /similar method does not have the '/questions' prefix
        // so we need to reset the category
        $this->url->SetCategory('similar');

        if($title !== null)
            $this->Title($title);

        return $this;
    }

    /// Causes questions to be sorted according to when they were added to a user's favorites.
    /**
      * \return the current instance
      */
    public function SortByAdded()
    {
        $this->SortBy('added');
        return $this;
    }

    /// Causes questions to be sorted according to the 'hot' tab on the site.
    /**
      * \return the current instance
      */
    public function SortByHot()
    {
        $this->SortBy('hot');
        return $this;
    }

    /// Causes hot questions for the current month to be returned.
    /**
      * \return the current instance
      */
    public function SortByMonth()
    {
        $this->SortBy('month');
        return $this;
    }

    /// Causes hot questions for the current week to be returned.
    /**
      * \return the current instance
      */
    public function SortByWeek()
    {
        $this->SortBy('week');
        return $this;
    }

    /// Returns only questions with the specified tags.
    /**
      * \param $tags either a single tag or an array of tags
      * \return the current instance
      */
    public function Tagged($tags)
    {
        if(is_array($tags))
            $this->url->SetQueryStringParameter('tagged', implode(';', $tags));
        else
            $this->url->SetQueryStringParameter('tagged', $tags);

        return $this;
    }

    /// Returns only questions without the specified tags.
    /**
      * \param $tags either a single tag or an array of tags
      * \return the current instance
      */
    public function NotTagged($tags)
    {
        if(is_array($tags))
            $this->url->SetQueryStringParameter('nottagged', implode(';', $tags));
        else
            $this->url->SetQueryStringParameter('nottagged', $tags);

        return $this;
    }

    /// Returns only questions that contain the specified text in the title.
    /**
      * \param $title the text to match in the title
      * \return the current instance
      */
    public function InTitle($title)
    {
        $this->url->SetQueryStringParameter('intitle', $title);
        return $this;
    }

    /// Returns questions that contain a similar title.
    /**
      * \param $title the title to match
      * \return the current instance
      */
    public function Title($title)
    {
        $this->url->SetQueryStringParameter('title', $title);
        return $this;
    }
}

?>


text:
using System;
using System.Reflection;
using NUnit.Framework;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common;

namespace OpenSim.Region.Framework.Scenes.Tests
{
    /// <summary>
    /// Basic scene object resize tests
    /// </summary>
    [TestFixture]
    public class SceneObjectResizeTests : OpenSimTestCase
    {
        /// <summary>
        /// Test resizing an object
        /// </summary>
        [Test]
        public void TestResizeSceneObject()
        {
            TestHelpers.InMethod();
//            log4net.Config.XmlConfigurator.Configure();

            Scene scene = new SceneHelpers().SetupScene();
            SceneObjectGroup g1 = SceneHelpers.AddSceneObject(scene);

            g1.GroupResize(new Vector3(2, 3, 4));

            SceneObjectGroup g1Post = scene.GetSceneObjectGroup(g1.UUID);

            Assert.That(g1Post.RootPart.Scale.X, Is.EqualTo(2));
            Assert.That(g1Post.RootPart.Scale.Y, Is.EqualTo(3));
            Assert.That(g1Post.RootPart.Scale.Z, Is.EqualTo(4));

//            Assert.That(g1Post.RootPart.UndoCount, Is.EqualTo(1));
        }

        /// <summary>
        /// Test resizing an individual part in a scene object.
        /// </summary>
        [Test]
        public void TestResizeSceneObjectPart()
        {
            TestHelpers.InMethod();
            //log4net.Config.XmlConfigurator.Configure();

            Scene scene = new SceneHelpers().SetupScene();
            UUID owner = UUID.Random();
            SceneObjectGroup g1 = SceneHelpers.CreateSceneObject(2, owner);
            g1.RootPart.Scale = new Vector3(2, 3, 4);
            g1.Parts[1].Scale = new Vector3(5, 6, 7);

            scene.AddSceneObject(g1);

            SceneObjectGroup g1Post = scene.GetSceneObjectGroup(g1.UUID);

            g1Post.Parts[1].Resize(new Vector3(8, 9, 10));

            SceneObjectGroup g1PostPost = scene.GetSceneObjectGroup(g1.UUID);

            SceneObjectPart g1RootPart = g1PostPost.RootPart;
            SceneObjectPart g1ChildPart = g1PostPost.Parts[1];

            Assert.That(g1RootPart.Scale.X, Is.EqualTo(2));
            Assert.That(g1RootPart.Scale.Y, Is.EqualTo(3));
            Assert.That(g1RootPart.Scale.Z, Is.EqualTo(4));

            Assert.That(g1ChildPart.Scale.X, Is.EqualTo(8));
            Assert.That(g1ChildPart.Scale.Y, Is.EqualTo(9));
            Assert.That(g1ChildPart.Scale.Z, Is.EqualTo(10));
        }
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>Damien Retinger | Developer</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

Hi! I'm Damien Retzinger

              I'm a
              Full Stack Software Engineer.

              Currently, I like to work with Angular, Magento, Docker, Kubernetes, and Tensorflow.

            <meta itemprop="birthDate" content="1992-08-07">

Sometimes I write articles about things that interest me.

            <app>Loading...</app>

                  Github

                  LinkedIn

                  Medium

                  MacOS

                  Windows

                  Ubuntu


text:
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
    <meta name="viewport" content="width=device-width">
    <meta name="description" content="{{ site.description }}">
    <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">

    <!-- Custom CSS & Bootstrap Core CSS - Uses Bootswatch Flatly Theme: http://bootswatch.com/flatly/ -->
    <link rel="stylesheet" href="{{ "/style.css" | prepend: site.baseurl }}">
    <link rel="shortcut icon" href="/img/faavicon.ico" />
    <!-- Custom Fonts -->

    <link rel="stylesheet" href="{{ "/css/font-awesome/css/font-awesome.min.css" | prepend: site.baseurl }}">
   <!-- <link rel="stylesheet" href="{{ "/css/font-awesome/css/slide_show.css" | prepend: site.baseurl }}"> -->
   <link href="https://fonts.googleapis.com/css?family=Baloo+Bhaijaan" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
    <link href='https://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'>
    <link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">
    <link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700' rel='stylesheet' type='text/css'>
    <link href="https://fonts.googleapis.com/css?family=Courgette" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Caveat+Brush" rel="stylesheet">
   <!-- <link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"> -->

    <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
    <!-- <script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> -->
    <!-- link href="https://fonts.googleapis.com/css?family=Caveat+Brush" rel="stylesheet"> -->

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
   <!-- <script src="//load.sumome.com/" data-sumo-site-id="f35b49577e5ebfd6989c25ee8b62a0dbeb41722e37d29e726e162a48c82b6f1f" async="async"></script> -->
   <script type="text/javascript" src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
   <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.js"></script>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script>
    jQuery(window).load(function(){
        jQuery(".hameid-loader-overlay").fadeOut(700);
    });
</script>
    <meta name="theme-color" content="#000000" />
    </head>


text:
/*
 * charge_layer_mori_implicit.hh
 *
 *  Created on: Dec 3, 2014
 *      Author: jpods
 */

#ifndef DUNE_AX1_CHARGE_LAYER_MORI_IMPLICIT_HH
#define DUNE_AX1_CHARGE_LAYER_MORI_IMPLICIT_HH

template<typename DGF_CON, typename DGF_POT, typename PHYSICS, typename SolutionContainer>
class ChargeLayerMoriImplicit
  : public Dune::PDELab::IntersectionGridFunctionBase<
      Dune::PDELab::IntersectionGridFunctionTraits<typename DGF_CON::Traits::GridViewType,
                                       typename DGF_CON::Traits::RangeFieldType,
                                       DGF_CON::Traits::RangeType::dimension,
                                       typename DGF_CON::Traits::RangeType>,
     ChargeLayerMori<DGF_CON,DGF_POT,PHYSICS,SolutionContainer> >
{
public:
  typedef Dune::PDELab::IntersectionGridFunctionTraits<typename DGF_CON::Traits::GridViewType,   // grid view type
                                           typename DGF_CON::Traits::RangeFieldType, // image field type (double)
                                           DGF_CON::Traits::RangeType::dimension,  // number of components of image
                                           typename DGF_CON::Traits::RangeType // image type (Dune::FieldVector<double, 1>)
                                           > Traits;
    typedef typename PHYSICS::FieldType T;
    typedef std::vector<T> VPOT;
    typedef Dune::FieldVector<T, NUMBER_OF_SPECIES> VCON;
    typedef std::vector<VCON> V;

  public:

    enum MembraneInterface { INTERNAL = 1, EXTERNAL = 2};

    //! constructor
    ChargeLayerMoriImplicit (DGF_CON& dgfCon_, DGF_POT& dgfPot_, PHYSICS& physics_,
        SolutionContainer& solutionContainer_, double tEquilibrium_ = 20000)
    : physics(physics_),
      solutionContainer(solutionContainer_),
      tEquilibrium(tEquilibrium_),
      gridView(dgfCon_.getGridView()),
      isActive(physics.getParams().useMori()),
      useMoriCorrection(physics.getParams().useMoriCorrection()),
      isInitialized(false),
      partiallyInitialized(false),
      timeStepAccepted(true),
      membraneIndices(physics.getChannelSet().getMembraneIndices()),
      dMemb(physics.getParams().dMemb() * physics.getLengthScale()),
      temp(physics.getElectrolyte().getTemperature()),
      stdCon(physics.getElectrolyte().getStdCon()),
      epsElec(physics.getElectrolyte().getPermittivity()),
      time(0.0),
      dt(1.0),
      tau(1e-9), // Time is measured in units [s] => 1 ns
      gamma_ext_old(physics.getChannelSet().getMembraneIndices().size(), VCON(0.0)),
      gamma_ext_new(physics.getChannelSet().getMembraneIndices().size(), VCON(0.0)),
      gamma_int_old(physics.getChannelSet().getMembraneIndices().size(), VCON(0.0)),
      gamma_int_new(physics.getChannelSet().getMembraneIndices().size(), VCON(0.0)),
      useMoriOperatorSplit(physics.getParams().general.get("useMoriOperatorSplit",false)),
      iterateMembraneFlux(physics.getParams().boundary.get("fullyImplicitMembraneFlux",false)
          || useMoriOperatorSplit),
      surfaceChargeScale((physics.getTimeScale() / physics.getLengthScale()) / (con_e * con_mol)),
      verboseMembraneFluxClasses(physics.getParams().boundary.get("verboseMembraneFluxClasses",false))
    {
      assert(DGF_CON::Traits::RangeType::dimension == NUMBER_OF_SPECIES);
      if(!iterateMembraneFlux)
        DUNE_THROW(Dune::Exception, "This application uses the implicit version of membrane flux classes, but the "
            << "corresponding flag 'fullyImplicitMembraneFlux' in config file is not set correctly!");
    }

    template<typename I>
    inline void evaluate (const I &is,
                          const typename Traits::DomainType &x,
                          typename Traits::RangeType &y) const
    {
      evaluate(is, x, y, -1, false);
    }

    template<typename I>
    inline void evaluate (const I &is,
                          const typename Traits::DomainType &x,
                          typename Traits::RangeType &y,
                          int ionSpecies,
                          bool implicit,
                          const typename DGF_POT::Traits::RangeType& uPot = typename DGF_POT::Traits::RangeType(-1.0),
                          const typename DGF_CON::Traits::RangeType& uCon = typename DGF_CON::Traits::RangeType(-1.0)) const
    {
      y = 0.0;

      if(isActive)
      {
        if(implicit)
          assert(uCon[0] > -1.0);

        assert(time >= 0.0 && dt > 0.0);

        // Deactivate output
        if(! implicit || !verboseMembraneFluxClasses)
          debug_verb.push(false);

        const std::vector<bool> membraneActive = physics.getParams().isMembraneActive();

//        debug_verb << "membraneActive: [ ";
//        for(int i=0; i<membraneActive.size(); ++i)
//        {
//          debug_verb << membraneActive[i] << " ";
//        }
//        debug_verb << "]" << std::endl;

        const double real_dt = dt * physics.getTimeScale();

        // We can now use the newtonSolution's pointer to the current solution vector
        // instead of the solution from the last time step.
        DGF_POT dgfPotNew(solutionContainer.getGfsPot(), *solutionContainer.getSolutionPotNew());
        // We also need the old (last time step) potential to calculate the time derivative
        DGF_POT dgfPotOld(solutionContainer.getGfsPot(), *solutionContainer.getSolutionPotOld());

        //typename DGF_CON::BASE_DGF dgfConElecNew(solutionContainer.getGfsCon(), *solutionContainer.getSolutionCon());
        //DGF_CON dgfConNew(gridView, dgfConElecNew, physics);

        if(physics.isMembraneInterface(is))
        {
          // Determine on which side of a membrane interface we are!
          int membraneInterface = 0;
          // Now we need to distinguish between cytosol and extracellular elements!
          switch(physics.getSubdomainIndex(*is.inside()))
          {
            case CYTOSOL:
            {
              membraneInterface = MembraneInterface::INTERNAL;
              break;
            }
            case ES:
            {
              membraneInterface = MembraneInterface::EXTERNAL;
              break;
            }
            default:
              // We come from an inside membrane element; check outside element to determine if this is and interior
              // (cytosol) or exterioi (ES) interface!
              switch(physics.getSubdomainIndex(*is.outside()))
              {
                case CYTOSOL:
                {
                  membraneInterface = MembraneInterface::INTERNAL;
                  break;
                }
                case ES:
                {
                  membraneInterface = MembraneInterface::EXTERNAL;
                  break;
                }
                default:
                  DUNE_THROW(Dune::Exception, "Membrane flux can only be evaluated on a real membrane interface, not on"
                      << " membrane-membrane intersections!");
              }
          }

          int mIndex = physics.getMembraneIndex(is);
          int membNumber = physics.getMembraneNumber(is);

//          // TODO Debug, remove
          if(implicit && mIndex != 0)
            debug_verb.push(false);

          // Do nothing when membrane is passive
          if(membraneActive[membNumber])
          {
            // Attention! We are coming from a non-primary (not even normal-oriented) intersection;
            // get the primary intersection in order to get the correct indices!
            typename PHYSICS::ElementIntersectionIterator miit = physics.getPrimaryMembraneIntersection(is);
            int iIndex = physics.getIntersectionIndex(*miit);
            assert(checkIndex(iIndex));

            int mIndex = membraneIndices.at(iIndex);

            // Open channels in middle membrane element only
            if(true /*mIndex == (membGV.size(0)/2 - 1)*/)
            {
              debug_verb << std::endl << "====================";
              debug_verb << "Calculating Mori flux for membrane element #" << iIndex << "[" << mIndex << "]"
                    << " (memb #" << membNumber << ") ====================" << std::endl;

              // get membrane permittivity
              typename PHYSICS::FieldType perm = physics.getMembranePermittivity(is);

              // We need the membrane potential for calculation of Mori flux
              typename DGF_POT::Traits::RangeType potJump;
              // Now check if current unknown values have been handed over by operator; if not, we use the old values
              // from the solution container
              if(implicit && uCon[0] == -1)
                  DUNE_THROW(Dune::Exception, "When using the implicit version of evaluate, you must provide current values "
                      << "for both potential and concentrations, even though concentrations are not being used!");

              if(implicit)
              {
                // Implicit case: Use special version of method handing over current value of unknown
                physics.getMembranePotentialJump(is, dgfPotNew, potJump, uPot);
              } else {
                physics.getMembranePotentialJump(is, dgfPotNew, potJump);
              }
              typename DGF_POT::Traits::RangeType potJump_mV = physics.convertTo_mV(potJump);

              typename DGF_POT::Traits::RangeType potJumpOld;
              physics.getMembranePotentialJump(is, dgfPotOld, potJumpOld);
              typename DGF_POT::Traits::RangeType potJumpOld_mV = physics.convertTo_mV(potJumpOld);

              // Update flux
              typename Traits::RangeType totalMoriFlux_ext(0.0);
              typename Traits::RangeType totalMoriFlux_int(0.0);

              int jLow = ionSpecies;
              int jUp = ionSpecies;
              if(ionSpecies == -1)
              {
                jLow = 0;
                jUp = NUMBER_OF_SPECIES-1;
              }
              for(int j=jLow; j<=jUp; j++)
              {
                debug_verb << "-------------------------------------" << std::endl;

                if(useMoriCorrection)
                {
                  DUNE_THROW(Dune::NotImplemented, "Mori concentration profile correction not implemented for the implicit case!");
                }

                /* The surface charge density returned by charge layer class has units [C / m^2],
                 * the (approximated) time derivative has units [C / (s * m^2)]. To match our membrane flux
                 * units [(TS/LS) * mol / (m^2 * s)], we need to multiply by scaling factor
                 * surfaceChargeScale = (TS/LS) / (e*N_A)!
                 */
                debug_verb << " Calculating Mori flux for perm = " << perm
                    << ", real_dt = " << real_dt << " [implicit=" << implicit << "]" << std::endl;

                // capacitance per unit area (F / m^2)
                const T C_m = con_eps0 * perm / dMemb;
                const T membPotOld = 1e-3 * potJumpOld_mV;
                const T membPotNew = 1e-3 * potJump_mV;

                T sigma_old = 0.0;
                T sigma_new = 0.0;
                if(membraneInterface == MembraneInterface::INTERNAL)
                {
                  sigma_old = gamma_int_old[mIndex][j] * C_m * membPotOld;
                  sigma_new = gamma_int_new[mIndex][j] * C_m * membPotNew;

                  Dune::ios_base_all_saver haselnussSchnaps(std::cout);
                  debug_verb << "  [int] old sigma = " << gamma_int_old[mIndex][j] << " * " << C_m
                      << " * " << membPotOld <<" = " << sigma_old << std::endl;
                  debug_verb << "  [int] new sigma = " << gamma_int_new[mIndex][j] << " * " << C_m
                      << " * " << membPotNew <<" = " << sigma_new << std::endl;
                  debug_verb << std::scientific << "  gamma diff: "  << (gamma_int_new[mIndex][j] - gamma_int_old[mIndex][j])
                      << ", pot diff: " << std::scientific << (membPotNew - membPotOld) << std::endl;

                } else {
                  sigma_old = gamma_ext_old[mIndex][j] * C_m * membPotOld;
                  sigma_new = gamma_ext_new[mIndex][j] * C_m * membPotNew;

                  Dune::ios_base_all_saver haselnussSchnaps(std::cout);
                  debug_verb << "  [ext] old sigma = " << gamma_ext_old[mIndex][j] << " * " << C_m
                      << " * " << membPotOld <<" = " << sigma_old << std::endl;
                  debug_verb << "  [ext] new sigma = " << gamma_ext_new[mIndex][j] << " * " << C_m
                      << " * " << membPotNew <<" = " << sigma_new << std::endl;
                  debug_verb << std::scientific << "  gamma diff: "  << (gamma_ext_new[mIndex][j] - gamma_ext_old[mIndex][j])
                      << ", pot diff: " << std::scientific << (membPotNew - membPotOld) << std::endl;
                }

                /* Important: My implementation of membrane fluxes represents the ion-centric view, i.e. the sign
                 * tells whether ions of this species are flowing in or out of the membrane (in global coordinates).
                 * Therefore, as in the ionic fluxes case, the capacitive current (density), (sigma_new-sigma_old)/real_dt,
                 * must be scaled by 1/(e*N_A*z_j); 1/(e*N_A) is already contained in 'surfaceChargeScale', but z_j must
                 * be included manually here!
                */
                const int z_j = physics.getValence(j);
                const T moriFlux = (surfaceChargeScale / z_j) * (sigma_new - sigma_old) / real_dt;

                debug_verb << " => Mori [" << ION_NAMES[j] << "] flux = " << moriFlux
                    << (membraneInterface == MembraneInterface::INTERNAL ? " (CY)" : " (ES)") << std::endl;

                y[j] = moriFlux;

                debug_verb << "-------------------------------------" << std::endl;
              }
              debug_verb << "-------------------------------------" << std::endl;
            }
          }

//          // TODO Debug, remove
          if(implicit && mIndex != 0)
            debug_verb.pop();

          // 2D: Multiply by y-component of outer normal, as the membrane is oriented horizontally
          y *= is.centerUnitOuterNormal()[Traits::GridViewType::Grid::dimension - 1];
        }

        // Reactivate output
        if(! implicit || !verboseMembraneFluxClasses)
          debug_verb.pop();
      }
    }

    inline const typename Traits::GridViewType& getGridView () const
    {
      return gridView;
    }

    inline void updateState(double time_, double dt_)
    {
      time = time_;
      dt = dt_;

      updateState();
    }

    inline void updateState(const typename SolutionContainer::U& u)
    {
      DUNE_THROW(Dune::NotImplemented, "updateState(u) currently not supported. Use updateState() instead and make"
        << " sure that solutionContainer contains the desired solution vector(s)!");
      assert(u == *solutionContainer.getSolutionConNew());
      updateState();
    }

    // TODO Revamp output of this method (membrane info, make output optional, etc.)
    inline void updateState()
    {
      if(isActive)
      {
        assert(time >= 0.0 && dt > 0.0);

        // Prevent multiple channel initializations within one timestep!
        if(! isInitialized && partiallyInitialized)
          return;

        // Deactivate output
        if(!verboseMembraneFluxClasses)
          debug_verb.push(false);

        timeStepAccepted = false;

        // We can now use the newtonSolution's pointer to the current solution vector
        // instead of the solution from the last time step.
        typename DGF_CON::BASE_DGF dgfConElecNew(solutionContainer.getGfsCon(), *solutionContainer.getSolutionConNew());
        DGF_CON dgfConNew(gridView, dgfConElecNew, physics);

        const std::vector<bool> membraneActive = physics.getParams().isMembraneActive();
        for(typename PHYSICS::MIterator mit = physics.mBegin(); mit != physics.mEnd(); ++mit)
        {
          int membNumber = physics.getMembraneNumber(*mit);
          if(membraneActive[membNumber])
          {
            int iIndex = physics.getIntersectionIndex(*mit);

            assert(checkIndex(iIndex));
            int mIndex = membraneIndices.at(iIndex);

            debug_verb << std::endl << "====================";
            debug_verb << " Updating Mori states for membrane element #" << iIndex << "[" << mIndex << "]"
                  << " (memb #" << membNumber << ") ====================" << std::endl;

            typename DGF_CON::Traits::RangeType conCytosol, conExtra;
            physics.getMembraneConcentrationJump(*mit, dgfConNew, conCytosol, conExtra);

            // Update channels (i.e., gating particles)
            if(not isInitialized)
            {
              // Init active channels once at time == tEquilibrium
              if(not physics.getParams().doEquilibration() ||
                  (std::abs(time-tEquilibrium) < 1e-6 || time > tEquilibrium)) // time >= tEquilibrium
              {
                // Init channels
                debug_info << "Initializing charge layer to CY/ES concentrations of " << conCytosol
                    << " / " << conExtra << std::endl;
                init(mIndex, conCytosol, conExtra);

                partiallyInitialized = true;
              }
            } else {
              // Do one time step for charge layer
              double real_dt = dt * physics.getTimeScale();

              timeStep(mIndex, real_dt, conCytosol, conExtra);
            }
            debug_verb << "-------------------------------------" << std::endl;
          }
        }
        // Reactivate output
        if(!verboseMembraneFluxClasses)
          debug_verb.pop();
      }
    }

    inline void updateFlux(double time_, double dt_)
    {
      DUNE_THROW(Dune::NotImplemented, "Method updateFlux() should never be called in implicit flux calculation!");
    }

    inline void updateFlux(const typename SolutionContainer::U& u)
    {
      DUNE_THROW(Dune::NotImplemented, "Method updateFlux() should never be called in implicit flux calculation!");
    }

    inline void updateFlux()
    {
      DUNE_THROW(Dune::NotImplemented, "Method updateFlux() should never be called in implicit flux calculation!");
    }

    bool isPartiallyInitialized() const
    {
      return partiallyInitialized;
    }

    bool isCompletelyInitialized() const
    {
      return isInitialized;
    }

    inline void acceptTimeStep()
    {
      timeStepAccepted = true;

      if(partiallyInitialized)
      {
        isInitialized = true;

        debug_info << std::endl;
        debug_info << "============================" << std::endl;
        debug_info << "^^ Mori charge layer initialized ^^" << std::endl;
        debug_info << "============================" << std::endl;
        debug_info << std::endl;

        partiallyInitialized = false;
      }

      // Assign current values of state variables to be used as the old state
      gamma_ext_old = gamma_ext_new;
      gamma_int_old = gamma_int_new;
    }

    inline void discardTimeStep()
    {
      timeStepAccepted = false;

      // Set time, dt to default values
      time = -1;
      dt = -1;
    }

    void setActive(bool active)
    {
      isActive = active;
    }

    bool active() const
    {
      return isActive;
    }

    //! \brief return exterior surface charge density with units [C / m^2]
    template<typename IS>
    T getNewSurfaceChargeDensity_Ext(const IS& is, const int j, const T perm, const T memb_pot) const
    {
      int m = physics.getMembraneIndex(is);

//      typename PHYSICS::FieldType perm = 0.0;
//      if(physics.isMembrane(*is.inside()))
//      {
//        perm = physics.getPermittivity(*is.inside());
//      } else {
//        perm = physics.getPermittivity(*is.outside());
//      }

      // capacitance per unit area (F / m^2) (Mori 2006: C*_m)
      T C_m = con_eps0 * perm / dMemb;

      // Bring membrane potential to units of [V]
      return (gamma_ext_new[m][j] * C_m * 1e-3 * memb_pot);
    }

    //! \brief return interior surface charge density with units [C / m^2]
    template<typename IS>
    T getNewSurfaceChargeDensity_Int(const IS& is, const int j, const T perm, const T memb_pot) const
    {
      int m = physics.getMembraneIndex(is);

//      typename PHYSICS::FieldType perm = 0.0;
//      if(physics.isMembrane(*is.inside()))
//      {
//        perm = physics.getPermittivity(*is.inside());
//      } else {
//        perm = physics.getPermittivity(*is.outside());
//      }

      // capacitance per unit area (F / m^2)
      T C_m = con_eps0 * perm / dMemb;
      // Bring membrane potential to units of [V]
      return (gamma_int_new[m][j] * C_m * 1e-3 * memb_pot);
    }

  private:
    // Calculate gamma_snake values and use as initial values
    void init(int m, const VCON& conCytosol, const VCON& conExtra)
    {
      // Calculate new gamma_snake values
      T sum_ext(0.0);
      T sum_int(0.0);

      for(int j=0; j<conCytosol.size(); j++)
      {
        const T z2 = physics.getValence(j)*physics.getValence(j);
        sum_ext += z2*conExtra[j];
        sum_int += z2*conCytosol[j];
      }

      VCON gamma_sum_ext(0.0);
      VCON gamma_sum_int(0.0);

      debug_info << "Initializing charge layer fractions to: " << std::endl;
      for(int j=0; j<conCytosol.size(); j++)
      {
        const T z2 = physics.getValence(j)*physics.getValence(j);
        gamma_ext_old[m][j] = z2 * conExtra[j] / sum_ext;
        gamma_int_old[m][j] = z2 * conCytosol[j] / sum_int;
        gamma_ext_new[m][j] = gamma_ext_old[m][j];
        gamma_int_new[m][j] = gamma_int_old[m][j];

        gamma_sum_ext += gamma_ext_old[m][j];
        gamma_sum_int += gamma_int_old[m][j];

        debug_info << "gamma_ext[" << j << "] = " << gamma_ext_old[m][j] << " / "
          << "gamma_int[" << j << "] = " << gamma_int_old[m][j] << std::endl;
      }
      debug_info << "SUM: " << gamma_sum_ext << " / " << gamma_sum_int << std::endl;
    }

    //! \brief Do one (BE) time step for membrane element i
    //! \param dt Real dt [s]
    //! \param v Potential [mV]
    void timeStep(int m, const T dt_, const VCON& conCytosol, const VCON& conExtra)
    {
      // Calculate new gamma_snake values
      VCON gamma_ext_snake(0.0);
      VCON gamma_int_snake(0.0);

      T sum_ext(0.0);
      T sum_int(0.0);

      for(int j=0; j<conCytosol.size(); j++)
      {
        const T z2 = physics.getValence(j)*physics.getValence(j);
        sum_ext += z2*conExtra[j];
        sum_int += z2*conCytosol[j];
      }

      for(int j=0; j<conCytosol.size(); j++)
      {
        const T z2 = physics.getValence(j)*physics.getValence(j);
        gamma_ext_snake[j] = z2 * conExtra[j] / sum_ext;
        gamma_int_snake[j] = z2 * conCytosol[j] / sum_int;
      }

      debug_verb << "  Charge layer timestep (dt =" << dt_ << ")" << std::endl;
      // Update gamma values
      for(int j=0; j<conCytosol.size(); j++)
      {
        gamma_ext_new[m][j] = (tau * gamma_ext_old[m][j] + dt_ * gamma_ext_snake[j]) / (tau + dt_);
        gamma_int_new[m][j] = (tau * gamma_int_old[m][j] + dt_ * gamma_int_snake[j]) / (tau + dt_);

        debug_verb << "   " << gamma_ext_old[m][j] << " -> " << gamma_ext_new[m][j] << std::endl;
        debug_verb << "   " << gamma_int_old[m][j] << " -> " << gamma_int_new[m][j] << std::endl;
      }

      // Check if sum equals one
      T gamma_sum_ext(0.0);
      T gamma_sum_int(0.0);
      for(int j=0; j<conCytosol.size(); j++)
      {
        gamma_sum_ext += gamma_ext_new[m][j];
        gamma_sum_int += gamma_int_new[m][j];
      }
      if(std::abs(gamma_sum_ext-1.0) > 1e-6 || std::abs(gamma_sum_int-1.0) > 1e-6)
      {
        DUNE_THROW(Dune::Exception, "ChargeLayerMori::timeStep(): Sum of new gamma's is not equal to 1.0! "
            << " (ES: " << gamma_sum_ext << " / CY: " << gamma_sum_int << ")");
      }
    }

    bool checkIndex(const int i) const
    {
      if(membraneIndices.find(i) == membraneIndices.end())
      {
        DUNE_THROW(Dune::Exception, "Given element #" << i << " is not a membrane element!");
      }
      return true;
    }

    PHYSICS& physics;
    SolutionContainer& solutionContainer;
    double tEquilibrium;

    const typename Traits::GridViewType& gridView;
    bool isActive;
    bool useMoriCorrection;

    bool isInitialized;
    bool partiallyInitialized;
    bool timeStepAccepted;

    const std::map<int, int>& membraneIndices;

    const T dMemb;
    const T temp;
    const T stdCon;
    const T epsElec;
    T time;
    T dt;
    const T tau;

    V gamma_ext_old;
    V gamma_ext_new;
    V gamma_int_old;
    V gamma_int_new;

    const bool useMoriOperatorSplit;
    const bool iterateMembraneFlux;

    const T surfaceChargeScale;

    const bool verboseMembraneFluxClasses;
};

#endif /* DUNE_AX1_CHARGE_LAYER_MORI_IMPLICIT_HH */


text:
<?php

namespace phpDocumentor\Renderer\Action;

use phpDocumentor\Descriptor\Analyzer;
use phpDocumentor\Descriptor\FileDescriptor;
use phpDocumentor\Renderer\Action;

/**
 * Sourcecode transformation writer; generates syntax highlighted source files in a destination's subfolder.
 */
class SourcecodeHandler
{
    /**
     * @var Analyzer
     */
    private $analyzer;

    /**
     * Sourcecode constructor.
     */
    public function __construct(Analyzer $analyzer)
    {
        $this->analyzer = $analyzer;
    }

    /**
     * This method writes every source code entry in the structure file to a highlighted file.
     *
     * @param Sourcecode $action
     *
     * @return void
     */
    public function __invoke(Action $action)
    {
        $artifact = $action->getRenderPass()->getDestination() . '/' . ltrim($action->getDestination(), '\\/');
        $project = $this->analyzer->getProjectDescriptor();

        /** @var FileDescriptor $file */
        foreach ($project->getFiles() as $file) {
            $filename = $file->getPath();
            $source   = $file->getSource();

            $root = str_repeat('../', count(explode(DIRECTORY_SEPARATOR, $filename)));
            $path = $artifact . DIRECTORY_SEPARATOR . $filename;
            if (!file_exists(dirname($path))) {
                mkdir(dirname($path), 0755, true);
            }
            $source = htmlentities($source);

            $fs = $action->getRenderPass()->getFilesystem();
            $fs->put(
                $path.'.html',
                <<<HTML

        <link
            href="{$root}syntax_highlighter/styles/shCore.css" rel="stylesheet"
            type="text/css"
        />
        <link
            href="{$root}syntax_highlighter/styles/shCoreEclipse.css"
            rel="stylesheet" type="text/css"
        />
        <link
            href="{$root}syntax_highlighter/styles/shThemeWordpress.css"
            rel="stylesheet" type="text/css"
        />

$source

HTML
            );

        }
    }
}


text:
layout: default
---

And finally there's No Sidebar

Where that in the center faces the nameless horrors alone.

Dolore Amet Consequat

Aliquam massa urna, imperdiet sit amet mi non, bibendum euismod est. Curabitur mi justo, tincidunt vel eros ullamcorper, porta cursus justo. Cras vel neque eros. Vestibulum diam quam, mollis at consectetur non, malesuada quis augue. Morbi tincidunt pretium interdum. Morbi mattis elementum orci, nec dictum massa. Morbi eu faucibus massa. Aliquam massa urna, imperdiet sit amet mi non, bibendum euismod est. Curabitur mi justo, tincidunt vel eros ullamcorper, porta cursus justo. Cras vel neque eros. Vestibulum diam.

Vestibulum diam quam, mollis at consectetur non, malesuada quis augue. Morbi tincidunt pretium interdum. Morbi mattis elementum orci, nec dictum porta cursus justo. Quisque ultricies lorem in ligula condimentum, et egestas turpis sagittis. Cras ac nunc urna. Nullam eget lobortis purus. Phasellus vitae tortor non est placerat tristique. Sed id sem et massa ornare pellentesque. Maecenas pharetra porta accumsan.

In vestibulum massa quis arcu lobortis tempus. Nam pretium arcu in odio vulputate luctus. Suspendisse euismod lorem eget lacinia fringilla. Sed sed felis justo. Nunc sodales elit in laoreet aliquam. Nam gravida, nisl sit amet iaculis porttitor, risus nisi rutrum metus, non hendrerit ipsum arcu tristique est.

This is Something

Sed tristique purus vitae volutpat ultrices. Aliquam eu elit eget arcu commodo suscipit dolor nec nibh. Proin a ullamcorper elit, et sagittis turpis. Integer ut fermentum.

Learn More

Also Something

Sed tristique purus vitae volutpat ultrices. Aliquam eu elit eget arcu commodo suscipit dolor nec nibh. Proin a ullamcorper elit, et sagittis turpis. Integer ut fermentum.

Learn More

Probably Something

Sed tristique purus vitae volutpat ultrices. Aliquam eu elit eget arcu commodo suscipit dolor nec nibh. Proin a ullamcorper elit, et sagittis turpis. Integer ut fermentum.

Learn More


text:
<?php
session_start();

include ('include.php');
include ('functies.php');

// Controleer of het email adres al bestaat in de database
function valid_email($str){
	global $db;
    $query = "SELECT email FROM tbl_user WHERE email = '".$str."'";
	// Hier wordt het emailadress ingevoerd
    $result = mysqli_query($db,$query) or die(mysqli_error());
    $record = mysqli_fetch_array($result);
    if (!empty($record[0])){
		return false;
	}
    else {
		return true;
	}
}

// Controleer of de 2 keer ingevoerde wachtwoorden hetzelfde zijn
function valid_passwd($ww1, $ww2){
	if ($ww1 === $ww2 && $ww1 !=""){
		return true;
	}
	else {
		return false;
	}
}

//	omzetten invoervelden
// 	hier worden de gegevens verzonden
// 	hier worden ook de letters van klein naar groot omgezet
// 	Isset wordt gebruikt om te controleren of een variabele een waarde heeft.

if (isset($_POST['geslacht'])){
    $geslacht = veilig($_POST['geslacht']);
}
else {$geslacht = 0;}

if (isset($_POST['email'])){
    $email = veilig($_POST['email']);
	$email = mailOk($_POST['email']);
    $email = strtolower($email);
}
if (isset($_POST['wachtwoord1'])){
    $wachtwoord1 = veilig($_POST['wachtwoord1']);
}
if (isset($_POST['wachtwoord2'])){
    $wachtwoord2 = veilig($_POST['wachtwoord2']);
}
if (isset($_POST['verzenden'])){
    $verzendknop = $_POST['verzenden'];
}

// kijken of alles geldig is ingevoerd.
// De functie Valid checkt nog of alles naar behoren is ingevuld

if ( empty($verzendknop) || !validate_email($email) || !validate_wachtwoord ($wachtwoord1) ||!valid_email($email) || !valid_passwd($wachtwoord1, $wachtwoord2 )){

 ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Registreren</title>

Registreren

<form method="POST" action="">

            Geslacht
            Man <input type="radio" value="M" maxlength="10" name="geslacht" <?php if (!empty($geslacht) && $geslacht == 'M') echo 'checked' ?>></input>
                Vrouw <input type="radio" value="V" maxlength="10" name="geslacht" <?php if (!empty($geslacht) && $geslacht == 'V') echo 'checked' ?>></input>

            Email
            <input type="text" name="email" maxlength="30" <?php if (!empty($email)) echo 'value = "'.$email.'"'; ?>></input>
            <?php if (!empty($verzendknop) && !valid_email($email)) echo "Dit emailadres bestaat al, vul een nieuwe in"; if (!empty($verzendknop) && !validate_email($email)) echo "Dit emailadres is niet goed ingevuld";?>

            Wachtwoord
            <input type="password" name="wachtwoord1" maxlength="15" <?php if (!empty($wachtwoord1)) echo 'value = "'.$wachtwoord1.'"' ?>></input>
            <?php if (!empty($verzendknop) && !valid_passwd($wachtwoord1, $wachtwoord2)) echo "Wachtwoord komt niet overeen of er is geen wachtwoord ingevuld"; if (!empty($verzendknop) && !validate_wachtwoord ($wachtwoord1)) echo  "Dit wachtwoord voldoet niet aan de eisen!"; ?>

            Herhaal wachtwoord
            <input type="password" name="wachtwoord2" maxlength="15" <?php if (!empty($wachtwoord2)) echo 'value = "'.$wachtwoord2.'"'?>></input>

            <input type="submit" value="Opnieuw" name="opnieuw"></input>
            <input type="submit" value="Verzenden" name="verzenden"></input>

</form>

<?php
}
else{ ?>

Invulgegevens akkoord

                Geslacht
                <?php echo $geslacht ?>

                Email
                <?php echo $email ?>

                <form method="post" action ="account.php"><input type="submit" value="Opnieuw" name="opnieuw"></input></form>
                <form method="post" action="registreer.php">
                        <input type="hidden" name="voorletters" value="<?php echo $voorletters;?>"></input>
                        <input type="hidden" name="tussenvoegsel" value="<?php echo $tussenvoegsel; ?>"></input>
                        <input type="hidden" name="naam" value="<?php echo $naam; ?>"></input>
                        <input type="hidden" name="adres" value="<?php echo $adres;?>"></input>
                        <input type="hidden" name="huisnummer" value="<?php echo $huisnummer;?>"></input>
                        <input type="hidden" name="telefoon" value="<?php echo $telefoon;?>"></input>
                        <input type="hidden" name="postcode" value="<?php echo $postcode;?>"></input>
                        <input type="hidden" name="woonplaats" value="<?php echo $woonplaats;?>"></input>
                        <input type="hidden" name="geslacht" value="<?php echo $geslacht;?>"></input>
                        <input type="hidden" name="email" value="<?php echo $email;?>"></input>
                        <input type="hidden" name="wachtwoord" value="<?php echo $wachtwoord1;?>"></input>
                        <input type="submit" value="Verzenden" name="verzenden"></input>
                    </form>

<?php

}
?>


text:
"""Track named groups of cells in a worksheet"""

# Python stdlib imports
import re

# package imports
from openpyxl.shared.exc import NamedRangeException

# constants
NAMED_RANGE_RE = re.compile("'?([^']*)'?!((\$([A-Za-z]+))?\$([0-9]+)(:(\$([A-Za-z]+))?(\$([0-9]+)))?)$")

class NamedRange(object):
    """A named group of cells"""
    __slots__ = ('name', 'destinations', 'local_only')

    def __init__(self, name, destinations):
        self.name = name
        self.destinations = destinations
        self.local_only = False

    def __str__(self):
        return  ','.join([u'%s!%s' % (sheet, name) for sheet, name in self.destinations])

    def __repr__(self):

        return '<%s "%s">' % (self.__class__.__name__, str(self))

def split_named_range(range_string):
    """Separate a named range into its component parts"""

    destinations = []

    for range_string in range_string.split(','):

        match = NAMED_RANGE_RE.match(range_string)
        if not match:
            raise NamedRangeException('Invalid named range string: "%s"' % range_string)
        else:
            sheet_name, xlrange = match.groups()[:2]
            destinations.append((sheet_name, xlrange))

    return destinations


text:
<?php
	namespace Ejercicio26OOBD\Modelo\BD;

	require_once __DIR__.'/GenericoBD.php';
    require_once __DIR__.'/../Base/AlumnoClass.php';
    require_once __DIR__.'/../Base/ProfesorClass.php';

    use Ejercicio26OOBD\Modelo\Base\Alumno;
    use Ejercicio26OOBD\Modelo\Base\Profesor;

	abstract class UsuarioBD extends GenericoBD{

			public static function login($user,$password){
            $usuario = null;
			$conn = parent::conectar();
			$query = "SELECT * FROM alumnos WHERE user='".$user."' AND password='".$password."'";

			$rs = mysqli_query($conn,$query);
            $usuario = parent::mapear($rs,"Alumno");

                if (is_null($usuario))
                {
                    $query = "SELECT * FROM profesores WHERE user='".$user."' AND password='".$password."'";
                    $rs = mysqli_query($conn,$query);
                    $usuario = parent::mapear($rs,"Profesor");
                }
			if (is_null($usuario))
                {
                    parent::desconectar($conn);
                    return "Ese usuario no existe...";
                }
                else
                {
                    parent::desconectar($conn);

                    return $usuario;
                }

		}

	}

?>


text:
<!doctype html>

		<meta charset="utf-8">

		<title>Summer research project</title>

		<meta name="description" content="Research project presentation to give a short talk at Bioinformatics Institute">
		<meta name="author" content="Peter Leontev">

		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">

		<link rel="stylesheet" href="css/reveal.css">
		<link rel="stylesheet" href="css/theme/simple.css" id="theme">

		<link rel="stylesheet" href="lib/css/zenburn.css">

Metagenomic assembly and annotation of 16S ribosomal RNA genes by SPAdes

						<h7>Created by Peter Leontev

                        Scientific advisor:
Sergey Nurk, Algorithmic biology lab</h7>

Purpose

						Extract 16S rRNA genes and corresponding information from metagenomic assembly

Why?

16S rRNA genes are very important in molecular phylogeny due to slow evolution rates of their regions

One great example [deprecated]

                            <img height="450" data-src="img/woese_tree_of_life_16s.png"

Woese et al. (1990)

Contemporary view

							<img width="600" height="450" data-src="img/tree_of_life_new.jpg"

Christopher et al. (2015)

Metagenomics in a nutshell

                        <img width="800" height="540" data-src="img/metagenomics_intro.png"

                    https://en.wikipedia.org/wiki/Metagenomics

SPAdes 16S rRNA assembly for isolates

                                    Organism
                                    16S rRNA copies in genome
                                    Assembled

                                    Some bacteria
                                    2-15
                                    1+*

                            *This number depends on available sequencing information (mate-pair, PacBio reads, etc.)

How to detect 16S rRNA?

Easy: align known 16S rRNA to assembled contigs;

Much better: use discriminative model (like HMM) including both 1° and 2° structures.

Source of problems [exclude, probably]

					<img height="500" width="950" data-src="img/msa_by_evol_distance.png"

                        The same
1-3: order, 4-11: class, 12: phylum

Correspondence between 16S rRNA in genome and in assembly graph

				        <img data-src="img/correspondence.png" width="1000" height="500"

Bioinformatics reality

                        https://github.com/rrwick/Bandage

Results

Simulated dataset metagenomic assembly

                                    Number of bacteria
                                    16S rRNA expected/found
                                    Long contigs expected/found

                                    45
                                    45/39
                                    320/118

Comparison of 16S rRNA from targeted assembly and from SPAdes contigs

                                    Expected number of 16S rRNA
                                    Found in contigs

                                    1679
                                    1368

                        *311 missed 16S rRNA may be due to introns in some 16S or simply misassemblies.

THANK YOU!


text:
<?php
	define( 'WP_USE_THEMES', false );
	require( '../wp-load.php' );

	include( '../assets/lang.php' );

	load_textdomain( 'quan', get_theme_root() . '/sailor-quan/languages/' . $lang . '.mo' );
?>
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js fail"> <!--<![endif]-->

	<head>
		<meta charset="utf-8" />
	    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
		<title>Quan Digital GmbH</title>

		<link rel="canonical" href="http://oppstett.dyndns.org/alex/quan/wordpress/tour/" />

		<link rel="stylesheet" href="./styles/normalize.css" />
		<link rel="stylesheet" href="./styles/styles.css" />

		<script type="text/javascript" src="./js/modernizr.js"></script>

	</head>

	<body>

	<div id="main-container">


text:
var chai = require('chai');
var expect = chai.expect;
var precision = 1e-10;
var utils = require('../panthrMath/utils');
var series = utils.series;

describe('series function', function() {
   it('passes correct arguments to callback', function() { // n is an integer
      var index, val;
      index = 0;
      function callback(i, v) {
         expect(i).to.equal(index);
         if (i > 0) {
            expect(v).to.equal(val);
         }
         index += 1;
         val = Math.random();
         return val;
      }
      series(callback, 50);

   });
   it('adds terms', function() { // n is an integer
      expect(series(function(i) { return i + 1; }, 50)).to.equal(50 * 51 / 2);
   });
   it('doesn\'t stop too early', function() { // n is missing
      // calculate exp(1) as sum of 1 / n!
      expect(utils.relativelyCloseTo(
         series(function(i, v) { return i === 0 ? 1 : v / i; }),
         Math.exp(1), precision)).to.be.ok;
   });
   it('works when given a function for stopping condition', function() {
      var count;
      count = 0;
      function stop() { return count === 5; }
      series(function() { count += 1; return count; }, function() { return count === 5; });
      expect(count).to.equal(5);
   });
});


text:
<?xml version="1.0" encoding="UTF-8"?>

<!--

 This file is part of the Sylius package.

 (c) Paweł Jędrzejewski

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

-->

<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://symfony.com/schema/dic/services
                               http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="sylius.authentication.success_handler.class">Sylius\Bundle\UserBundle\Authentication\AuthenticationSuccessHandler</parameter>
        <parameter key="sylius.authentication.failure_handler.class">Sylius\Bundle\UserBundle\Authentication\AuthenticationFailureHandler</parameter>

        <parameter key="sylius.user.canonicalizer.class">Sylius\Component\User\Canonicalizer\Canonicalizer</parameter>
        <parameter key="sylius.user.password_encoder.class">Sylius\Bundle\UserBundle\Security\UserPasswordEncoder</parameter>
        <parameter key="sylius.user.password_updater.class">Sylius\Component\User\Security\PasswordUpdater</parameter>

        <parameter key="sylius.user.user_reloader.class">Sylius\Bundle\UserBundle\Reloader\UserReloader</parameter>

        <parameter key="sylius.security.user_login.class">Sylius\Bundle\UserBundle\Security\UserLogin</parameter>

        <parameter key="sylius.user.checker.token_uniqueness">Sylius\Component\User\Security\Checker\TokenUniquenessChecker</parameter>
        <parameter key="sylius.user.generator.unique_pin.class">Sylius\Component\User\Security\Generator\UniquePinGenerator</parameter>
        <parameter key="sylius.user.generator.unique_token.class">Sylius\Component\User\Security\Generator\UniqueTokenGenerator</parameter>

        <parameter key="sylius.user_provider.name.class">Sylius\Bundle\UserBundle\Provider\UsernameProvider</parameter>
        <parameter key="sylius.user_provider.name_or_email.class">Sylius\Bundle\UserBundle\Provider\UsernameOrEmailProvider</parameter>
        <parameter key="sylius.user_provider.email.class">Sylius\Bundle\UserBundle\Provider\EmailProvider</parameter>

        <parameter key="sylius.form.type.user_login.class">Sylius\Bundle\UserBundle\Form\Type\UserLoginType</parameter>
        <parameter key="sylius.form.type.user_request_password_reset.class">Sylius\Bundle\UserBundle\Form\Type\UserRequestPasswordResetType</parameter>
        <parameter key="sylius.form.type.user_reset_password.class">Sylius\Bundle\UserBundle\Form\Type\UserResetPasswordType</parameter>
        <parameter key="sylius.form.type.user_change_password.class">Sylius\Bundle\UserBundle\Form\Type\UserChangePasswordType</parameter>

        <parameter key="sylius.listener.user_delete.class">Sylius\Bundle\UserBundle\EventListener\UserDeleteListener</parameter>
        <parameter key="sylius.listener.password_updater.class">Sylius\Bundle\UserBundle\EventListener\PasswordUpdaterListener</parameter>
        <parameter key="sylius.listener.user_last_login.class">Sylius\Bundle\UserBundle\EventListener\UserLastLoginSubscriber</parameter>
        <parameter key="sylius.listener.user_reloader.class">Sylius\Bundle\UserBundle\EventListener\UserReloaderListener</parameter>
        <parameter key="sylius.listener.user_mailer_listener.class">Sylius\Bundle\UserBundle\EventListener\MailerListener</parameter>

        <parameter key="sylius.controller.user_security.class">Sylius\Bundle\UserBundle\Controller\SecurityController</parameter>

        <parameter key="sylius.form.model.change_password.class">Sylius\Bundle\UserBundle\Form\Model\ChangePassword</parameter>

        <parameter key="sylius.form.event_subscriber.add_user_type.class">Sylius\Bundle\UserBundle\Form\EventSubscriber\AddUserFormSubscriber</parameter>
    </parameters>

    <services>
        <service id="sylius.authenticaiton.success_handler" class="%sylius.authentication.success_handler.class%" parent="security.authentication.success_handler" public="false" />
        <service id="sylius.authentication.failure_handler" class="%sylius.authentication.failure_handler.class%" parent="security.authentication.failure_handler" public="false" />

        <!-- Controllers -->
        <service id="sylius.controller.user_security" class="%sylius.controller.user_security.class%">
            <call method="setContainer">
                <argument type="service" id="service_container" />
            </call>
        </service>

        <!-- Utils -->
        <service id="sylius.user.canonicalizer" class="%sylius.user.canonicalizer.class%" />
        <service id="sylius.user.password_encoder" class="%sylius.user.password_encoder.class%">
            <argument type="service" id="security.encoder_factory" />
        </service>
        <service id="sylius.user.password_updater" class="%sylius.user.password_updater.class%">
            <argument type="service" id="sylius.user.password_encoder" />
        </service>

        <service id="sylius.user.checker.token_uniqueness.password_reset" class="%sylius.user.checker.token_uniqueness%">
            <argument type="service" id="sylius.repository.user" />
            <argument type="string">passwordResetToken</argument>
        </service>
        <service id="sylius.user.checker.token_uniqueness.email_verification" class="%sylius.user.checker.token_uniqueness%">
            <argument type="service" id="sylius.repository.user" />
            <argument type="string">emailVerificationToken</argument>
        </service>

        <service id="sylius.user.generator.password_reset_token" class="%sylius.user.generator.unique_token.class%">
            <argument type="service" id="sylius.user.checker.token_uniqueness.password_reset" />
            <argument>%sylius.user.resetting.token_length%</argument>
        </service>
        <service id="sylius.user.generator.password_reset_pin" class="%sylius.user.generator.unique_pin.class%">
            <argument type="service" id="sylius.user.checker.token_uniqueness.password_reset" />
            <argument>%sylius.user.resetting.pin_length%</argument>
        </service>
        <service id="sylius.user.generator.email_verification_token" class="%sylius.user.generator.unique_token.class%">
            <argument type="service" id="sylius.user.checker.token_uniqueness.email_verification" />
            <argument>%sylius.user.verification.token_length%</argument>
        </service>

        <service id="sylius.security.user_login" class="%sylius.security.user_login.class%">
            <argument type="service" id="security.token_storage" />
            <argument type="service" id="security.user_checker" />
            <argument type="service" id="event_dispatcher" />
        </service>
        <service id="sylius.user.user_reloader" class="%sylius.user.user_reloader.class%">
            <argument type="service" id="sylius.manager.user" />
        </service>

        <!-- Listeners -->
        <service id="sylius.listener.user_last_login" class="%sylius.listener.user_last_login.class%">
            <argument type="service" id="sylius.manager.user" />
            <tag name="kernel.event_subscriber" />
        </service>
        <service id="sylius.listener.user_reloader" class="%sylius.listener.user_reloader.class%">
            <argument type="service" id="sylius.user.user_reloader" />
            <tag name="kernel.event_listener" event="sylius.user.post_create" method="reloadUser" />
            <tag name="kernel.event_listener" event="sylius.user.post_update" method="reloadUser" />
        </service>
        <service id="sylius.listener.password_updater" class="%sylius.listener.password_updater.class%">
            <argument type="service" id="sylius.user.password_updater" />
            <tag name="kernel.event_listener" event="sylius.user.pre_password_reset" method="genericEventUpdater" />
            <tag name="kernel.event_listener" event="sylius.user.pre_password_change" method="genericEventUpdater" />
            <tag name="kernel.event_listener" event="sylius.customer.pre_update" method="customerUpdateEvent" />
            <tag name="doctrine.event_listener" event="prePersist" />
            <tag name="doctrine.event_listener" event="preUpdate" />
        </service>
        <service id="sylius.listener.user_mailer_listener" class="%sylius.listener.user_mailer_listener.class%">
            <argument type="service" id="sylius.email_sender" />
            <tag name="kernel.event_listener" event="sylius.user.password_reset.request.pin" method="sendResetPasswordPinEmail" />
            <tag name="kernel.event_listener" event="sylius.user.password_reset.request.token" method="sendResetPasswordTokenEmail" />
            <tag name="kernel.event_listener" event="sylius.user.email_verification.token" method="sendVerificationTokenEmail" />
        </service>
        <service id="sylius.listener.user_delete" class="%sylius.listener.user_delete.class%">
            <argument type="service" id="security.token_storage" />
            <argument type="service" id="session" />
            <tag name="kernel.event_listener" event="sylius.user.pre_delete" method="deleteUser" />
        </service>

        <!-- Event Subscribers -->
        <service id="sylius.form.event_subscriber.add_user_type" class="%sylius.form.event_subscriber.add_user_type.class%" />

        <!-- User Providers -->
        <service id="sylius.user_provider.email" class="%sylius.user_provider.email.class%">
            <argument type="service" id="sylius.repository.user" />
            <argument type="service" id="sylius.user.canonicalizer" />
        </service>
        <service id="sylius.user_provider.name_or_email" class="%sylius.user_provider.name_or_email.class%" lazy="true">
            <argument type="service" id="sylius.repository.user" />
            <argument type="service" id="sylius.user.canonicalizer" />
        </service>
        <service id="sylius.user_provider.name" class="%sylius.user_provider.name.class%">
            <argument type="service" id="sylius.repository.user" />
            <argument type="service" id="sylius.user.canonicalizer" />
        </service>

        <!-- Forms -->
        <service id="sylius.form.type.user_login" class="%sylius.form.type.user_login.class%">
            <tag name="form.type" alias="sylius_user_security_login" />
        </service>
        <service id="sylius.form.type.user_request_password_reset" class="%sylius.form.type.user_request_password_reset.class%">
            <tag name="form.type" alias="sylius_user_request_password_reset" />
        </service>
        <service id="sylius.form.type.user_reset_password" class="%sylius.form.type.user_reset_password.class%">
            <tag name="form.type" alias="sylius_user_reset_password" />
        </service>
        <service id="sylius.form.type.user_change_password" class="%sylius.form.type.user_change_password.class%">
            <argument type="string">%sylius.form.model.change_password.class%</argument>
            <argument type="collection">
                <argument>sylius</argument>
            </argument>
            <tag name="form.type" alias="sylius_user_change_password" />
        </service>
    </services>

</container>