text:
/*********************************************************************/
/* Copyright (c) 2011 - 2012, The University of Texas at Austin.     */
/* All rights reserved.                                              */
/*                                                                   */
/* Redistribution and use in source and binary forms, with or        */
/* without modification, are permitted provided that the following   */
/* conditions are met:                                               */
/*                                                                   */
/*   1. Redistributions of source code must retain the above         */
/*      copyright notice, this list of conditions and the following  */
/*      disclaimer.                                                  */
/*                                                                   */
/*   2. Redistributions in binary form must reproduce the above      */
/*      copyright notice, this list of conditions and the following  */
/*      disclaimer in the documentation and/or other materials       */
/*      provided with the distribution.                              */
/*                                                                   */
/*    THIS  SOFTWARE IS PROVIDED  BY THE  UNIVERSITY OF  TEXAS AT    */
/*    AUSTIN  ``AS IS''  AND ANY  EXPRESS OR  IMPLIED WARRANTIES,    */
/*    INCLUDING, BUT  NOT LIMITED  TO, THE IMPLIED  WARRANTIES OF    */
/*    MERCHANTABILITY  AND FITNESS FOR  A PARTICULAR  PURPOSE ARE    */
/*    DISCLAIMED.  IN  NO EVENT SHALL THE UNIVERSITY  OF TEXAS AT    */
/*    AUSTIN OR CONTRIBUTORS BE  LIABLE FOR ANY DIRECT, INDIRECT,    */
/*    INCIDENTAL,  SPECIAL, EXEMPLARY,  OR  CONSEQUENTIAL DAMAGES    */
/*    (INCLUDING, BUT  NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE    */
/*    GOODS  OR  SERVICES; LOSS  OF  USE,  DATA,  OR PROFITS;  OR    */
/*    BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF    */
/*    LIABILITY, WHETHER  IN CONTRACT, STRICT  LIABILITY, OR TORT    */
/*    (INCLUDING NEGLIGENCE OR OTHERWISE)  ARISING IN ANY WAY OUT    */
/*    OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF ADVISED  OF  THE    */
/*    POSSIBILITY OF SUCH DAMAGE.                                    */
/*                                                                   */
/* The views and conclusions contained in the software and           */
/* documentation are those of the authors and should not be          */
/* interpreted as representing official policies, either expressed   */
/* or implied, of The University of Texas at Austin.                 */
/*********************************************************************/

#include "Movie.h"
#include "globals.h"
#include "DisplayGroupManager.h"
#include "MainWindow.h"
#include "GLWindow.h"
#include "log.h"

Movie::Movie(QString uri)
    : uri_(uri)
    , textureId_(0)
    // FFMPEG
    , avFormatContext_(NULL)
    , avCodecContext_(NULL)
    , swsContext_(NULL)
    , avFrame_(NULL)
    , avFrameRGB_(NULL)
    , streamIdx_(-1)
    , videostream_(NULL)
    // Internal
    , start_time_(0)
    , duration_(0)
    , num_frames_(0)
    , frameDuration_(0)
    , frame_index_(0)
    , skipped_frames_(false)
    , paused_(false)
    , loop_(true)
{
    Movie::initFFMPEGGlobalState();

    // open movie file
    if(avformat_open_input(&avFormatContext_, uri.toAscii(), NULL, NULL) != 0)
    {
        put_flog(LOG_ERROR, "could not open movie file %s", uri.toLocal8Bit().constData());
        return;
    }

    // get stream information
    if(avformat_find_stream_info(avFormatContext_, NULL) < 0)
    {
        put_flog(LOG_ERROR, "could not find stream information");
        return;
    }

    // dump format information to stderr
    av_dump_format(avFormatContext_, 0, uri.toAscii(), 0);

    // find the first video stream
    streamIdx_ = -1;

    for(unsigned int i=0; i<avFormatContext_->nb_streams; i++)
    {
        if(avFormatContext_->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
        {
            streamIdx_ = i;
            break;
        }
    }

    if(streamIdx_ == -1)
    {
        put_flog(LOG_ERROR, "could not find video stream");
        return;
    }

    videostream_ = avFormatContext_->streams[streamIdx_];

    // get a pointer to the codec context for the video stream
    avCodecContext_ = videostream_->codec;

    // find the decoder for the video stream
    AVCodec * codec = avcodec_find_decoder(avCodecContext_->codec_id);

    if(codec == NULL)
    {
        put_flog(LOG_ERROR, "unsupported codec");
        return;
    }

    // open codec
    int ret = avcodec_open2(avCodecContext_, codec, NULL);

    if(ret < 0)
    {
        char errbuf[256];
        av_strerror(ret, errbuf, 256);

        put_flog(LOG_ERROR, "could not open codec, error code %i: %s", ret, errbuf);
        return;
    }

    // allocate video frame for video decoding
    avFrame_ = avcodec_alloc_frame();

    // allocate video frame for RGB conversion
    avFrameRGB_ = avcodec_alloc_frame();

    if( !avFrame_ || !avFrameRGB_ )
    {
        put_flog(LOG_ERROR, "error allocating frames");
        return;
    }

    den2_ = videostream_->time_base.den * videostream_->r_frame_rate.den;
    num2_ = videostream_->time_base.num * videostream_->r_frame_rate.num;

    // generate seeking parameters
    start_time_ = videostream_->start_time;
    duration_ = videostream_->duration;
    num_frames_ = av_rescale(duration_, num2_, den2_);
    frameDuration_ = (double)videostream_->r_frame_rate.den / (double)videostream_->r_frame_rate.num;

    put_flog(LOG_DEBUG, "seeking parameters: start_time = %i, duration_ = %i, num frames = %i", start_time_, duration_, num_frames_);

    // create texture for movie
    QImage image(avCodecContext_->width, avCodecContext_->height, QImage::Format_RGB32);
    image.fill(0);

    textureId_ = g_mainWindow->getGLWindow()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, QGLContext::LinearFilteringBindOption);

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

    // assign buffer to pFrameRGB
    avpicture_alloc( (AVPicture *)avFrameRGB_, PIX_FMT_RGBA, avCodecContext_->width, avCodecContext_->height);

    // create sws scaler context
    swsContext_ = sws_getContext(avCodecContext_->width, avCodecContext_->height, avCodecContext_->pix_fmt, avCodecContext_->width, avCodecContext_->height, PIX_FMT_RGBA, SWS_FAST_BILINEAR, NULL, NULL, NULL);
}

Movie::~Movie()
{
    if(textureId_)
        g_mainWindow->getGLWindow()->deleteTexture(textureId_);

    avcodec_close( avCodecContext_ );

    // close the format context
    avformat_close_input(&avFormatContext_);

    // free scaler context
    sws_freeContext(swsContext_);

    // free frames
    avpicture_free( (AVPicture *)avFrameRGB_ );
    av_free(avFrame_);
    av_free(avFrameRGB_);
}

void Movie::initFFMPEGGlobalState()
{
    static bool initialized = false;

    if (!initialized)
    {
        av_register_all();
        initialized = true;
    }
}

void Movie::getDimensions(int &width, int &height)
{
    width = avCodecContext_->width;
    height = avCodecContext_->height;
}

void Movie::render(float tX, float tY, float tW, float tH)
{
    updateRenderedFrameIndex();

    if(!textureId_)
        return;

    // draw the texture
    glPushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT);

    glEnable(GL_TEXTURE_2D);
    glBindTexture(GL_TEXTURE_2D, textureId_);

    glBegin(GL_QUADS);

    glTexCoord2f(tX,tY);
    glVertex2f(0.,0.);

    glTexCoord2f(tX+tW,tY);
    glVertex2f(1.,0.);

    glTexCoord2f(tX+tW,tY+tH);
    glVertex2f(1.,1.);

    glTexCoord2f(tX,tY+tH);
    glVertex2f(0.,1.);

    glEnd();

    glPopAttrib();
}

void Movie::nextFrame(bool skip)
{
    if( !textureId_ || (paused_ && !skipped_frames_) )
        return;

    // rate limiting
    double elapsedSeconds = 999999.;
    if( !nextTimestamp_.is_not_a_date_time( ))
        elapsedSeconds = (g_displayGroupManager->getTimestamp() -
                           nextTimestamp_).total_microseconds() / 1000000.;

    if( elapsedSeconds < frameDuration_ )
        return;

    // update timestamp of last frame
    nextTimestamp_ = g_displayGroupManager->getTimestamp();

    // seeking

    // where we should be after we read a frame in this function
    if( !paused_ )
        ++frame_index_;

    // if we're skipping this frame, increment the skipped frame counter and return
    // otherwise, make sure we're in the correct position in the stream and decode
    if( skip )
    {
        skipped_frames_ = true;
        return;
    }

    // keep track of a desired timestamp if we seek in this frame
    int64_t desiredTimestamp = 0;
    if( skipped_frames_ )
    {
        // need to seek

        // frame number we want
        const int64_t index = (frame_index_-1) % (num_frames_+1);

        // timestamp we want
        desiredTimestamp = start_time_ + av_rescale(index, den2_, num2_);

        // seek to the nearest keyframe before desiredTimestamp and flush buffers
        if(avformat_seek_file(avFormatContext_, streamIdx_, 0, desiredTimestamp, desiredTimestamp, 0) != 0)
        {
            put_flog(LOG_ERROR, "seeking error");
            return;
        }

        avcodec_flush_buffers(avCodecContext_);

        skipped_frames_ = false;
    }

    int avReadStatus = 0;

    AVPacket packet;
    av_init_packet(&packet);
    int frameFinished;

    while((avReadStatus = av_read_frame(avFormatContext_, &packet)) >= 0)
    {
        // make sure packet is from video stream
        if(packet.stream_index == streamIdx_)
        {
            // decode video frame
            avcodec_decode_video2(avCodecContext_, avFrame_, &frameFinished, &packet);

            // make sure we got a full video frame
            if(frameFinished)
            {
                // note that the last packet decoded will have a DTS corresponding to this frame's PTS
                // hence the use of avFrame_->pkt_dts as the timestamp. also, we'll keep reading frames
                // until we get to the desired timestamp (in the case that we seeked)
                if(desiredTimestamp == 0 || (avFrame_->pkt_dts >= desiredTimestamp))
                {
                    // convert the frame from its native format to RGB
                    sws_scale(swsContext_, avFrame_->data, avFrame_->linesize, 0, avCodecContext_->height, avFrameRGB_->data, avFrameRGB_->linesize);

                    // put the RGB image to the already-created texture
                    // glTexSubImage2D uses the existing texture and is more efficient than other means
                    glBindTexture(GL_TEXTURE_2D, textureId_);
                    glTexSubImage2D(GL_TEXTURE_2D, 0, 0,0, avCodecContext_->width, avCodecContext_->height, GL_RGBA, GL_UNSIGNED_BYTE, avFrameRGB_->data[0]);

                    // free the packet that was allocated by av_read_frame
                    av_free_packet(&packet);

                    break;
                }
            }
        }

        // free the packet that was allocated by av_read_frame
        av_free_packet(&packet);
    }

    // see if we need to loop
    if(avReadStatus < 0 && loop_)
    {
        av_seek_frame(avFormatContext_, streamIdx_, 0, AVSEEK_FLAG_BACKWARD);
        frame_index_ = 0;
    }
}

void Movie::setPause(const bool pause)
{
    paused_ = pause;
}

void Movie::setLoop(const bool loop)
{
    loop_ = loop;
}


text:
	<wicket:panel>

			<form id="login_form" wicket:id="loginForm" class="form-horizontal">
				<fieldset class="form-content">
					<legend>Login</legend>

						<wicket:message
								key="username">Benutzername</wicket:message>:

							<input type="text" wicket:id="username" id="login_form_username"
								placeholder="Benutzername" />

						<wicket:message
								key="Password">Password</wicket:message>:

							<input class="error" type="password" wicket:id="password"
								id="login_form_password" />

							<input wicket:message="value:Login" class="btn btn-primary"
								type="submit" value="Login" />

							Registrieren

				</fieldset>
			</form>

	</wicket:panel>

redpajama_set_name: RedPajamaGithub


text:
package shield.actors.config.upstream

import akka.actor.Actor
import shield.config.Settings

trait UpstreamWatcher { self: Actor =>
  val settings = Settings(context.system)
}


text:
using System.Configuration;

namespace Gar.Client.Configuration.Themes
{
    [ConfigurationCollection(typeof(Theme))]
    public class Themes : ConfigurationElementCollection
    {
        #region methods

        protected override ConfigurationElement CreateNewElement() => new Theme();
        protected override object GetElementKey(ConfigurationElement element) => ((Theme)element).Value;

        #endregion
    }
}


text:
import scala.quoted._

object scalatest {
  def f(x: Int): Int = x
  def f(x: String): String = x

  inline def assert(condition: => Boolean): Unit = ${assertImpl('condition)}

  def assertImpl(condition: Expr[Boolean])(using qctx: QuoteContext) : Expr[Unit] = {
    import qctx.tasty._
    val tree = condition.unseal
    def exprStr: String = condition.show

    tree.underlyingArgument match {
      case Apply(Select(lhs, op), rhs :: Nil) =>
        val left = lhs.seal
        val right = rhs.seal
        op match {
          case "==" =>
        '{
          val _left   = $left
          val _right  = $right
          val _result = _left == _right
          println(_left)
          println(_right)
          scala.Predef.assert(_result)
        }
      }
    }
  }
}


text:
cask 'mailplane' do
  version '4.0.6,4565'
  sha256 'e08021f097ef9972eb92ed5629f7791531cd175e9eb73a459f5bc60a69d01e8d'

  url "https://update.mailplaneapp.com/builds/Mailplane_#{version.major}_#{version.after_comma}.tbz"
  appcast "https://update.mailplaneapp.com/appcast.php?rqsr=1&osVersion=10.14.1&appVersion=#{version.after_comma}&shortVersionString=#{version.before_comma}"
  name 'Mailplane'
  homepage 'https://mailplaneapp.com/'

  auto_updates true
  depends_on macos: '>= :sierra'

  app 'Mailplane.app'

  zap trash: '~/Library/Preferences/com.mailplaneapp.Mailplane.plist'
end


text:
class AddInStockToShipmentItems < ActiveRecord::Migration
  def self.up
    add_column :shipment_items, :in_stock, :boolean, :default => false
  end

  def self.down
    remove_column :shipment_items, :in_stock
  end
end


text:
/*The following code implements the depth-first search(DFS) graph traversal technique using an adjacency list data structure.*/
#include <stdio.h>
#include <stdlib.h>
#include "stack.h"

#define TRUE 1
#define FALSE 0

struct graphNode
{
	char nodeID;
	int visited;
	int discovered;
	struct graphNode *next;
};

typedef struct graphNode* GPTR;

void dfs(GPTR*, int, int);
GPTR createNode();
void displayList(GPTR*, int);
int findNode(GPTR*, int, char);
// void delGraph(GPTR*, int) // releases allocated heap memory

int main()
{
	int order = 0, i = 0, j = 0, rootIndex = 0;
	char root; // frontier of the search
	printf("Please enter the number of vertices in the graph.\n\n");
	scanf("%d", &order);
	GPTR adj[order];
	printf("Please enter the information for the adjacency list representation of the graph.\n\n");
	for(i = 0; i < order; i++)
	{
		printf("Please enter a character node ID for vertex %d.\n\n", i + 1);
		adj[i] = createNode();
	}
	printf("The created adjacency list is as follows:\n\n");
	displayList(adj, order);
	printf("Please enter the node ID of the frontier of the search.\n\n");
	scanf(" %c", &root);
	printf("Searching for node...\n\n");
	rootIndex = findNode(adj, order, root);
	if(rootIndex == -1)
		printf("Node with given node ID not found in the graph. Operation aborted!\n\n");
	else
	{
		printf("Node found! The depth-first traversal is as follows:\n\n");
		dfs(adj, order, rootIndex);
		printf("\n");
	}
	return 0;
}

GPTR createNode()
{
	GPTR newNode;
	char id, choice;
	newNode = malloc(sizeof(struct graphNode));
	if(newNode == NULL)
	{
		perror("Error allocating memory.\n");
		exit(EXIT_FAILURE);
	}
	newNode->visited = 0; // initialize the vertices
	newNode->discovered = 0;
	scanf(" %c", &id);
	newNode->nodeID = id;
	newNode->next = NULL;
	printf("Would you like to link more nodes to the current node? (Y/N)\n\n");
	scanf(" %c", &choice);
	if(choice == 'Y' || choice == 'y')
		newNode->next = createNode();
	return newNode;
}

void displayList(GPTR *list, int size)
{
	int i = 0;
	GPTR bak;
	for(i = 0; i < size; i++)
	{
		bak = list[i]; // backs up the pointer to the list
		while(list[i] != NULL)
		{
			printf("%c ", list[i]->nodeID);
			list[i] = list[i]->next;
		}
		printf("\n");
		list[i] = bak; // restores the backed up pointer
	}
}

int findNode(GPTR* list, int size, char frontier) // finds the index of a node in the adjacency list
{
	int i = 0;
	GPTR bak;
	for(i = 0; i < size; i++)
	{
		if(list[i] == NULL)
			break;
		if(list[i]->nodeID == frontier)
			return i;
	}
	return -1;
}

void dfs(GPTR *list, int size, int frontier)
{
	NODEPTR stack = NULL;
	GPTR bak;
	int i = frontier, out = 0;
	push(&stack, list[i]->nodeID);
	while(!isEmpty(stack))
	{
		out = pop(&stack); // result of the traversal
		i = findNode(list, size, out); // finds out the index of the visited node in the adjacency list
		if(list[i]->visited != 1)
		{
			printf("%c ", out);
			list[i]->visited = 1; // marks the vertex as visited to avoid duplicates
		}
		bak = list[i];
		while(list[i] != NULL)
		{
			if(list[i]->visited != 1 && list[i]->discovered != 1)
			{
				push(&stack, list[i]->nodeID);
				list[i]->discovered = 1; // marks adjacent vertices as discovered
			}
			list[i] = list[i]->next;
		}
		list[i] = bak;
	}
}

/*void delGraph(GPTR *list, int order)
{

}*/


text:
class BamReader;
class BamWriter;
class Datagram;
class DatagramIterator;
class TypedWritable;

////////////////////////////////////////////////////////////////////
//       Class : RecorderBase
// Description : This is the base class to a number of objects that
//               record particular kinds of user input (like a
//               MouseRecorder) to use in conjunction with a
//               RecorderController to record the user's inputs
//               for a session.
//
//               Note that RecorderBase does not actually inherit from
//               TypedObject, even though it defines get_type().  The
//               assumption is that the classes that derive from
//               RecorderBase might also inherit independently from
//               TypedObject.
//
//               It also does not inherit from TypedWritable, but it
//               defines a method called write_recorder() which is
//               very similar to a TypedWritable's write_datagram().
//               Classes that derive from RecorderBase and also
//               inherit from TypedWritable may choose to remap
//               write_recorder() to do exactly the same thing as
//               write_datagram(), or they may choose to write
//               something slightly different.
////////////////////////////////////////////////////////////////////
class EXPCL_PANDA_RECORDER RecorderBase : virtual public ReferenceCount {
protected:
  RecorderBase();

PUBLISHED:
  virtual ~RecorderBase();

  INLINE bool is_recording() const;
  INLINE bool is_playing() const;

public:
  virtual void record_frame(BamWriter *manager, Datagram &dg);
  virtual void play_frame(DatagramIterator &scan, BamReader *manager);

  virtual void write_recorder(BamWriter *manager, Datagram &dg);

protected:
  void fillin_recorder(DatagramIterator &scan, BamReader *manager);

private:
  enum Flags {
    F_recording = 0x0001,
    F_playing   = 0x0002,
  };
  short _flags;

public:
  static TypeHandle get_class_type() {
    return _type_handle;
  }
  static void init_type() {
    ReferenceCount::init_type();
    register_type(_type_handle, "RecorderBase",
                  ReferenceCount::get_class_type());
  }
  virtual TypeHandle get_type() const {
    return get_class_type();
  }

private:
  static TypeHandle _type_handle;

  friend class RecorderController;
};

#include "recorderBase.I"

#endif


text:
/*
 * Auto generated Run-Time-Environment Component Configuration File
 *      *** Do not modify ! ***
 *
 * Project: 'interrupt'
 * Target:  'NXP LPC4088'
 */

#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H

#endif /* RTE_COMPONENTS_H */


text: A ZIP encoder


text:
package net.johnewart.gearman.common.packets.request;

import net.johnewart.gearman.constants.PacketType;

public class ResetAbilities extends RequestPacket {

    public ResetAbilities()
    {
        this.type = PacketType.RESET_ABILITIES;
    }

    public ResetAbilities(byte[] pktdata)
    {
        super(pktdata);
    }

    @Override
    public byte[] toByteArray()
    {
        return getHeader();
    }

    @Override
    public int getPayloadSize()
    {
        return 0;
    }
}


text:
This is a hardware implemetation of [Fibonacci number](https://en.wikipedia.org/wiki/Fibonacci_number) calculator written in Verilog-HDL.
It supports req/ack handshake protocol.
I've tested on MU500-RX and DE1-SoC fpga board.

## Required Tools

- [Icarus Verilog(>=10.0)](http://iverilog.wikia.com/wiki/Installation_Guide)
- [Altera Quartus Prime(>=15.0)](https://www.altera.co.jp/downloads/download-center.html)

## Timing chart

![](docs/timing_chart.png)

66th Fibonacci number is `27777890035288`.

## Source Code Organization

The source code is organized as follows:

```text
docs/       documentation
fpga/       fpga related files
rtl/        RTL files for Motion Estimation Processor
testbench/  test suites
```

## Port declaration
| Port name | IO     | Description               |
| :-------  | :----: | :-----------------------  |
| rst\_n    | input  | low active reset          |
| clk       | input  | clock signal              |
| req       | input  | request for handshake     |
| n         | input  | N'th fibonacci number     |
| ack       | output | acknowledge for handshake |
| result    | output | fibonacci number          |

## Parameters

| Name   | Description                |
| :----- | :------------------------  |
| N\_IN  | bit width of input number  |
| N\_OUT | bit width of output number |


text:
package sc2toolkit.common.version.impl;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import sc2toolkit.common.version.model.IVersionBean;

/**
 * Version bean.
 *

 *

 * Defines the version of an entity (which can be an application, a module
 * etc.).
 *

 *

 *

 * Also see the VersionView class (which is part of the app).
 *

 *
 * @author Andras Belicza
 *
 * @see hu.belicza.andras.util.VersionView
 */
@XmlAccessorType(XmlAccessType.FIELD)
public class VersionBean extends Bean implements IVersionBean {

  /**
   * Current bean version.
   */
  public static final int BEAN_VER = 1;

  /**
   * Major version number.
   */
  @XmlAttribute
  private int major;

  /**
   * Minor version number.
   */
  @XmlAttribute
  private int minor;

  /**
   * Revision version number.
   */
  @XmlAttribute
  private int revision;

  /**
   * Creates a new {@link VersionBean}.
   */
  public VersionBean() {
    super(BEAN_VER);
  }

  /**
   * Creates a new {@link VersionBean}.
   *
   * @param major major version number
   * @param minor minor version number
   */
  public VersionBean(final int major, final int minor) {
    this(major, minor, 0);
  }

  /**
   * Creates a new {@link VersionBean}.
   *
   * @param major    major version number
   * @param minor    minor version number
   * @param revision revision version number
   */
  public VersionBean(final int major, final int minor, final int revision) {
    super(BEAN_VER);

    setMajor(major);
    setMinor(minor);
    setRevision(revision);
  }

  /**
   * Creates a {@link VersionBean} from its string representation.
   *
   * @param s string representation of the version bean
   * @return the version bean parsed from the specified string, or
   *         null if the specified string is not a valid version
   *         string
   */
  public static VersionBean fromString(final String s) {
    try {

      final int i = s.indexOf('.');
      if (i <= 0) {
        return null; // No dot, surely not a version
      }
      final int major = Integer.parseInt(s.substring(0, i));

      // Minor part follows, but is there a revision part too?
      final int j = s.indexOf('.', i + 1);
      if (j < 0) {
        // No revision, rest is all the minor part
        return new VersionBean(major, Integer.parseInt(s.substring(i + 1)));
      }

      // Full version: major, minor, revision parts
      return new VersionBean(major, Integer.parseInt(s.substring(i + 1, j)), Integer.parseInt(s.substring(j + 1)));

    } catch (final Exception e) {
      return null;
    }
  }

  @Override
  public int compareTo(final IVersionBean v2) {
    if (major > v2.getMajor()) {
      return 1;
    }
    if (major < v2.getMajor()) {
      return -1;
    }

    if (minor > v2.getMinor()) {
      return 1;
    }
    if (minor < v2.getMinor()) {
      return -1;
    }

    if (revision > v2.getRevision()) {
      return 1;
    }
    if (revision < v2.getRevision()) {
      return -1;
    }

    return 0;
  }

  @Override
  public boolean equals(final Object obj) {
    if (this == obj) {
      return true;
    }

    return obj instanceof VersionBean && compareTo((VersionBean) obj) == 0;
  }

  @Override
  public int hashCode() {
    return 31 * (31 * major + minor) + revision;
  }

  @Override
  public String toString() {
    return toString(false);
  }

  @Override
  public String toString(final boolean full) {
    final StringBuilder sb = new StringBuilder();

    sb.append(major).append('.').append(minor);
    if (full || revision > 0) {
      sb.append('.').append(revision);
    }

    return sb.toString();
  }

  @Override
  public int getMajor() {
    return major;
  }

  /**
   * Sets the major version number.
   *
   * @param major major version number to be set
   */
  public void setMajor(int major) {
    this.major = major;
  }

  @Override
  public int getMinor() {
    return minor;
  }

  /**
   * Sets the minor version number.
   *
   * @param minor minor version number to be set
   */
  public void setMinor(int minor) {
    this.minor = minor;
  }

  @Override
  public int getRevision() {
    return revision;
  }

  /**
   * Sets the revision version number.
   *
   * @param revision revision version number to be set
   */
  public void setRevision(int revision) {
    this.revision = revision;
  }

}


text:
package org.revenj.database.postgres;

import java.sql.PreparedStatement;
import java.util.function.Consumer;

public interface BulkReaderQuery {
	PostgresWriter getWriter();

	PostgresReader getReader();

	StringBuilder getBuilder();

	int getArgumentIndex();

	void addArgument(Consumer<PreparedStatement> statement);
}


text:
<?php

/**
 * ObjectHelper for doctrine admin generator.
 *
 * @package    sfDoctrinePlugin
 * @subpackage helper
 * @author     Olivier Verdier <Olivier.Verdier@gmail.com>
 * @author     Jonathan H. Wage <jonwage@gmail.com>
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id$
 */

sfLoader::loadHelpers(array('ObjectAdmin'));

/**
 * object_doctrine_admin_double_list
 *
 * @param string $object
 * @param string $method
 * @param string $options
 * @return void
 */
function object_doctrine_admin_double_list($object, $method, $options = array())
{
  return object_admin_double_list($object, $method, $options, '_get_doctrine_object_list');
}

/**
 * object_doctrine_admin_select_list
 *
 * @param string $object
 * @param string $method
 * @param string $options
 * @return void
 */
function object_doctrine_admin_select_list($object, $method, $options = array())
{
  return object_admin_select_list($object, $method, $options, '_get_doctrine_object_list');
}

/**
 * object_doctrine_admin_check_list
 *
 * @param string $object
 * @param string $method
 * @param string $options
 * @return void
 */
function object_doctrine_admin_check_list($object, $method, $options = array())
{
  return object_admin_check_list($object, $method, $options, '_get_doctrine_object_list');
}

/**
 * _get_doctrine_object_list
 *
 * @param string $object
 * @param string $method
 * @param string $options
 * @return void
 */
function _get_doctrine_object_list($object, $method, $options)
{
  $foreignTable = $object->getTable()->getRelation($method[1][0])->getTable();
  $foreignClass = $foreignTable->getComponentName();

  if (isset($options['dql']))
  {
    $dql = $options['dql'];
    unset($options['dql']); # Otherwise it will show up in the html

    $allObjects = $foreignTable->findByDQL($dql);
  } else if (isset($options['table_method'])) {
    $throughTable = $object->getTable()->getRelation($options['through_class'])->getTable();
    $peerMethod = $options['table_method'];
    $allObjects = $throughTable->$peerMethod();
  } else {
    $allObjects = $foreignTable->findAll();
  }

  $associatedObjects = $object->get($method[1][0]);

  $ids = array();
  foreach ($associatedObjects as $associatedObject)
  {
    $ids[] = $associatedObject->identifier();
  }

  if ($associatedObjects instanceof Doctrine_Collection && $associatedObjects->count() === 0)
  {
    $associatedObjects = null;
  }

  return array($allObjects, $associatedObjects, $ids);
}

/**
 * object_enum_tag
 *
 * @param string $object
 * @param string $method
 * @param string $options
 * @return void
 */
function object_enum_tag($object, $method, $options)
{
  $enumValues = _get_option($options, 'enumValues', array());
  $currentValue = _get_object_value($object, $method);
  $enumValues = array_combine($enumValues, $enumValues);

  return select_tag(_convert_method_to_name($method, $options), options_for_select($enumValues, $currentValue), $options);
}


text:
// -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2; -*-

// THIS FILE IS FOR DOCUMENTATION PURPOSES ONLY.

/*!
  \mainpage

  Mainpage for libvincenty. This documentation is merly made as a test for
  in-source doxygen documentation.

  \section Algoritms

  See the \ref p_notation page for a list of notations. The algorithm itself
  can be found on the internet.

  \section CoordinateGrid

  \section Examples
*/

/*!
  \page p_notation Notation

  \li \f$\sigma\f$ - Geodetic latitude, positive north
  \li \f$U\f$ - Reduced latitude. Def: \f$tan U = (1-f) / tan \Sigma\f$
  \li \f$L\f$ - Difference in longitude, positive east
  \li \f$\alpha_{1,2}\f$ - Azimuthz of geodesic clockwise north,
  \f$\alpha_{2}: P_{1} \rightarrow P_{2}\f$
  \li \f$\alpha\f$ - Azimuth of geodesic at equator
  \li \f$u_{2}\f$ - Def: \f$cos^2 \alpha ( a^2 - b^2 ) / b^2 \f$
  \li \f$\lambda\f$ - Difference in longitude (spherical earth)
  \li \f$\sigma\f$ - Angular distance \f$P_1 \rightarrow P_2\f$ (spherical)
  \li \f$\sigma_1\f$ - Angular distance equator \f$ \rightarrow P_1\f$ (spherical)
  \li \f$\sigma_m\f$ - Angular distance equator \f$\rightarrow\f$ midpoint
  of line (spherical)
*/


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

namespace ChatSharp
{
    public partial class IrcClient
    {
        public void Nick(string newNick)
        {
            SendRawMessage("NICK {0}", newNick);
            User.Nick = newNick;
        }

        public void SendMessage(string message, params string[] destinations)
        {
            const string illegalCharacters = "\r\n\0";
            if (!destinations.Any()) throw new InvalidOperationException("Message must have at least one target.");
            if (illegalCharacters.Any(message.Contains)) throw new ArgumentException("Illegal characters are present in message.", "message");
            string to = string.Join(",", destinations);
            SendRawMessage("PRIVMSG {0} :{1}", to, message);
        }

        public void SendAction(string message, params string[] destinations)
        {
            const string illegalCharacters = "\r\n\0";
            if (!destinations.Any()) throw new InvalidOperationException("Message must have at least one target.");
            if (illegalCharacters.Any(message.Contains)) throw new ArgumentException("Illegal characters are present in message.", "message");
            string to = string.Join(",", destinations);
            SendRawMessage("PRIVMSG {0} :\x0001ACTION {1}\x0001", to, message);
        }

        public void PartChannel(string channel)
        {
            if (!Channels.Contains(channel))
                throw new InvalidOperationException("Client is not present in channel.");
            SendRawMessage("PART {0}", channel);
            Channels.Remove(Channels[channel]);
        }

        public void PartChannel(string channel, string reason)
        {
            if (!Channels.Contains(channel))
                throw new InvalidOperationException("Client is not present in channel.");
            SendRawMessage("PART {0} :{1}", channel, reason);
            Channels.Remove(Channels[channel]);
        }

        public void JoinChannel(string channel)
        {
            if (Channels.Contains(channel))
                throw new InvalidOperationException("Client is not already present in channel.");
            SendRawMessage("JOIN {0}", channel);
        }

        public void SetTopic(string channel, string topic)
        {
            if (!Channels.Contains(channel))
                throw new InvalidOperationException("Client is not present in channel.");
            SendRawMessage("TOPIC {0} :{1}", channel, topic);
        }

        public void KickUser(string channel, string user)
        {
            SendRawMessage("KICK {0} {1} :{1}", channel, user);
        }

        public void KickUser(string channel, string user, string reason)
        {
            SendRawMessage("KICK {0} {1} :{2}", channel, user, reason);
        }

        public void InviteUser(string channel, string user)
        {
            SendRawMessage("INVITE {1} {0}", channel, user);
        }

        public void WhoIs(string nick)
        {
            WhoIs(nick, null);
        }

        public void WhoIs(string nick, Action<WhoIs> callback)
        {
            var whois = new WhoIs();
            RequestManager.QueueOperation("WHOIS " + nick, new RequestOperation(whois, ro =>
                {
                    if (callback != null)
                        callback((WhoIs)ro.State);
                }));
            SendRawMessage("WHOIS {0}", nick);
        }

        public void GetMode(string channel)
        {
            GetMode(channel, null);
        }

        public void GetMode(string channel, Action<IrcChannel> callback)
        {
            RequestManager.QueueOperation("MODE " + channel, new RequestOperation(channel, ro =>
                {
                    var c = Channels[(string)ro.State];
                    if (callback != null)
                        callback(c);
                }));
            SendRawMessage("MODE {0}", channel);
        }

        public void ChangeMode(string channel, string change)
        {
            SendRawMessage("MODE {0} {1}", channel, change);
        }

        public void GetModeList(string channel, char mode, Action<MaskCollection> callback)
        {
            RequestManager.QueueOperation("GETMODE " + mode + " " + channel, new RequestOperation(new MaskCollection(), ro =>
                {
                    var c = (MaskCollection)ro.State;
                    if (callback != null)
                        callback(c);
                }));
            SendRawMessage("MODE {0} {1}", channel, mode);
        }
    }
}


text:
//
//  rbnode.hpp
//  rbtree
//
//  Created by Sunil on 3/22/17.
//  Copyright © 2017 Sunil. All rights reserved.
//

#ifndef rbnode_hpp
#define rbnode_hpp

enum rbcolor {
    red,
    black
};

class rbnode {
public:
    int key;
    rbnode *left;
    rbnode *right;
    rbnode *parent;
    rbcolor color;

    // ctor and dtor
    rbnode(int key, rbcolor color = rbcolor::red, rbnode *parent = nullptr, \
           rbnode *left = nullptr, rbnode *right = nullptr);
    ~rbnode();

    bool is_red_node();
    bool is_black_node();
};

#endif /* rbnode_hpp */


text:
module ZK
  module Group
    class MembershipSubscription < ZK::Subscription::Base
      include ZK::Logging

      attr_reader :opts

      alias group parent

      def initialize(group, opts, block)
        super(group, block)
        @opts = opts
      end

      def notify(last_members, current_members)
        # XXX: implement this in here for now, but for very large membership lists
        #      it would likely be more efficient to implement this in the caller
        if absolute_paths?
          group_path = group.path

          last_members    = last_members.map { |m| File.join(group_path, m) }
          current_members = current_members.map { |m| File.join(group_path, m) }
        end

        call(last_members, current_members)
      end

      def absolute_paths?
        opts[:absolute]
      end

      protected :call
    end
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:layout_marginLeft="10dp"
    android:layout_marginStart="10dp"
    android:orientation="vertical">

    <TextView
        android:id="@+id/day_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="5dp"
        android:layout_marginTop="5dp"
        android:gravity="start"
        android:textSize="14sp" />

</LinearLayout>


text:
// This class has been generated, DO NOT EDIT!

package org.tensorflow.op.image;

import java.util.Arrays;
import org.tensorflow.GraphOperation;
import org.tensorflow.Operand;
import org.tensorflow.Operation;
import org.tensorflow.OperationBuilder;
import org.tensorflow.Output;
import org.tensorflow.op.RawOp;
import org.tensorflow.op.RawOpInputs;
import org.tensorflow.op.Scope;
import org.tensorflow.op.annotation.Endpoint;
import org.tensorflow.op.annotation.OpInputsMetadata;
import org.tensorflow.op.annotation.OpMetadata;
import org.tensorflow.proto.framework.DataType;
import org.tensorflow.types.TFloat32;
import org.tensorflow.types.family.TNumber;

/**
 * Computes the gradient of bicubic interpolation.
 *
 * @param <T> data type for {@code output} output
 */
@OpMetadata(
    opType = ResizeBicubicGrad.OP_NAME,
    inputsClass = ResizeBicubicGrad.Inputs.class
)
public final class ResizeBicubicGrad<T extends TNumber> extends RawOp implements Operand<T> {
  /**
   * The name of this op, as known by TensorFlow core engine
   */
  public static final String OP_NAME = "ResizeBicubicGrad";

  private Output<T> output;

  public ResizeBicubicGrad(Operation operation) {
    super(operation, OP_NAME);
    int outputIdx = 0;
    output = operation.output(outputIdx++);
  }

  /**
   * Factory method to create a class wrapping a new ResizeBicubicGrad operation.
   *
   * @param scope current scope
   * @param grads 4-D with shape {@code [batch, height, width, channels]}.
   * @param originalImage 4-D with shape {@code [batch, orig_height, orig_width, channels]},
   * The image tensor that was resized.
   * @param options carries optional attribute values
   * @param <T> data type for {@code ResizeBicubicGrad} output and operands
   * @return a new instance of ResizeBicubicGrad
   */
  @Endpoint(
      describeByClass = true
  )
  public static <T extends TNumber> ResizeBicubicGrad<T> create(Scope scope,
      Operand<TFloat32> grads, Operand<T> originalImage, Options... options) {
    OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "ResizeBicubicGrad");
    opBuilder.addInput(grads.asOutput());
    opBuilder.addInput(originalImage.asOutput());
    if (options != null) {
      for (Options opts : options) {
        if (opts.alignCorners != null) {
          opBuilder.setAttr("align_corners", opts.alignCorners);
        }
        if (opts.halfPixelCenters != null) {
          opBuilder.setAttr("half_pixel_centers", opts.halfPixelCenters);
        }
      }
    }
    return new ResizeBicubicGrad<>(opBuilder.build());
  }

  /**
   * Sets the alignCorners option.
   *
   * @param alignCorners If true, the centers of the 4 corner pixels of the input and grad tensors are
   * aligned. Defaults to false.
   * @return this Options instance.
   */
  public static Options alignCorners(Boolean alignCorners) {
    return new Options().alignCorners(alignCorners);
  }

  /**
   * Sets the halfPixelCenters option.
   *
   * @param halfPixelCenters the halfPixelCenters option
   * @return this Options instance.
   */
  public static Options halfPixelCenters(Boolean halfPixelCenters) {
    return new Options().halfPixelCenters(halfPixelCenters);
  }

  /**
   * Gets output.
   * 4-D with shape {@code [batch, orig_height, orig_width, channels]}.
   * Gradients with respect to the input image. Input image must have been
   * float or double.
   * @return output.
   */
  public Output<T> output() {
    return output;
  }

  @Override
  public Output<T> asOutput() {
    return output;
  }

  /**
   * Optional attributes for {@link org.tensorflow.op.image.ResizeBicubicGrad}
   */
  public static class Options {
    private Boolean alignCorners;

    private Boolean halfPixelCenters;

    private Options() {
    }

    /**
     * Sets the alignCorners option.
     *
     * @param alignCorners If true, the centers of the 4 corner pixels of the input and grad tensors are
     * aligned. Defaults to false.
     * @return this Options instance.
     */
    public Options alignCorners(Boolean alignCorners) {
      this.alignCorners = alignCorners;
      return this;
    }

    /**
     * Sets the halfPixelCenters option.
     *
     * @param halfPixelCenters the halfPixelCenters option
     * @return this Options instance.
     */
    public Options halfPixelCenters(Boolean halfPixelCenters) {
      this.halfPixelCenters = halfPixelCenters;
      return this;
    }
  }

  @OpInputsMetadata(
      outputsClass = ResizeBicubicGrad.class
  )
  public static class Inputs<T extends TNumber> extends RawOpInputs<ResizeBicubicGrad<T>> {
    /**
     * 4-D with shape {@code [batch, height, width, channels]}.
     */
    public final Operand<TFloat32> grads;

    /**
     * 4-D with shape {@code [batch, orig_height, orig_width, channels]},
     * The image tensor that was resized.
     */
    public final Operand<T> originalImage;

    /**
     * The T attribute
     */
    public final DataType T;

    /**
     * If true, the centers of the 4 corner pixels of the input and grad tensors are
     * aligned. Defaults to false.
     */
    public final boolean alignCorners;

    /**
     * The halfPixelCenters attribute
     */
    public final boolean halfPixelCenters;

    public Inputs(GraphOperation op) {
      super(new ResizeBicubicGrad<>(op), op, Arrays.asList("T", "align_corners", "half_pixel_centers"));
      int inputIndex = 0;
      grads = (Operand<TFloat32>) op.input(inputIndex++);
      originalImage = (Operand<T>) op.input(inputIndex++);
      T = op.attributes().getAttrType("T");
      alignCorners = op.attributes().getAttrBool("align_corners");
      halfPixelCenters = op.attributes().getAttrBool("half_pixel_centers");
    }
  }
}


text:
<!DOCTYPE html>

		<title>Site de Nabil Ghedjati</title>
		<link href='https://fonts.googleapis.com/css?family=Raleway:300' rel='stylesheet' type='text/css'>
		<link href='https://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css?family=Satisfy" rel="stylesheet" type="text/css">
		<link rel="icon" type="image/png" href="pict/favicon.png">
		<link type="text/css" rel="stylesheet" href="style.css">

		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1", user-scalable=no>
		<meta name="description" content="Je présente ici mon CV">
		<meta name="keywords" content="developer,web,dev,développeur,CSS,HTML,JS,PHP,simplon,coda,codeur,internet,informatique">

403

Ici c'est interdit !

< Retour


text:
from google.cloud import monitoring_v3

async def sample_get_monitored_resource_descriptor():
    # Create a client
    client = monitoring_v3.MetricServiceAsyncClient()

    # Initialize request argument(s)
    request = monitoring_v3.GetMonitoredResourceDescriptorRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_monitored_resource_descriptor(request=request)

    # Handle the response
    print(response)

# [END monitoring_v3_generated_MetricService_GetMonitoredResourceDescriptor_async]


text:
package org.vaadin.viritin.it;

import java.util.List;

import org.vaadin.addonhelpers.AbstractTest;
import org.vaadin.viritin.grid.LazyGrid;
import org.vaadin.viritin.testdomain.Person;
import org.vaadin.viritin.testdomain.Service;

import com.vaadin.data.provider.QuerySortOrder;
import com.vaadin.shared.data.sort.SortDirection;
import com.vaadin.ui.Component;

/**
 *
 * @author mstahv
 */
public class SizelessGridTest extends AbstractTest {

    @Override
    public Component getTestComponent() {
        LazyGrid<Person> grid = new LazyGrid<>(Person.class);
        grid.setColumns("firstName", "lastName", "age");

        grid.setItems((List<QuerySortOrder> sortOrder, int offset,
                int limit) -> {

            if(sortOrder.size() > 0) {
            	System.err.println("Getting sorted data...");
            	QuerySortOrder querySortOrder = sortOrder.get(0);
            	boolean asc = querySortOrder.getDirection() == SortDirection.ASCENDING;
            	String prop = querySortOrder.getSorted();
            	return Service.findAll(offset, limit, prop, asc).stream();
            }
            return Service.findAll(offset, limit).stream();
        });

        return grid;
    }

}


text:
package com.zhang.shakeImage.repository;

import com.zhang.shakeImage.entity.User;
import org.springframework.data.repository.CrudRepository;

/**
 * Created by zhangsl on 2017/2/10.
 */
public interface UserRepository  extends CrudRepository<User,Long>{

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>S-Index</title>
<meta name="date" content="2015-02-13">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

A C D E F G H I L M N O P Q R S T U

S

SaleNotFoundDbException - Exception in gameshop.advance.exceptions.db

SaleNotFoundDbException() - Constructor for exception gameshop.advance.exceptions.db.SaleNotFoundDbException

setAlertColor(Color) - Method in class gameshop.advance.ui.swing.factory.UIStyleSingleton

setBigFont(Font) - Method in class gameshop.advance.ui.swing.factory.UIStyleSingleton

setBoldFont(Font) - Method in class gameshop.advance.ui.swing.factory.UIStyleSingleton

setButtonSize(JButton) - Method in class gameshop.advance.ui.swing.factory.UIFactory

setCents(long) - Method in class gameshop.advance.utility.Money

setCodice(String) - Method in class gameshop.advance.utility.IDProdotto

setCodiceTessera(int) - Method in exception gameshop.advance.exceptions.sales.ClientNotFoundException

setConfiguration(String, int) - Method in class gameshop.advance.config.ConfigurationControllerSingleton

setErrorColor(Color) - Method in class gameshop.advance.ui.swing.factory.UIStyleSingleton

setFornitureList(IListPanel) - Method in class gameshop.advance.controller.FornitureControllerSingleton

setInformazioniProdotto(IIteratorWrapperRemote<IInformazioniProdottoRemote>) - Method in class gameshop.advance.controller.FornitureControllerSingleton

setInformazioniProdotto(IIteratorWrapperRemote<IInformazioniProdottoRemote>) - Method in interface gameshop.advance.interfaces.remote.forniture.IRemoteFornitureClient

setList(ListModel, ListCellRenderer) - Method in interface gameshop.advance.interfaces.IListPanel

setList(ListModel, ListCellRenderer) - Method in class gameshop.advance.ui.swing.manager.FornitureMenu

setNormalFont(Font) - Method in class gameshop.advance.ui.swing.factory.UIStyleSingleton

setPanel(JComponent) - Method in class gameshop.advance.ui.swing.UIWindowSingleton

setServerAddress(String) - Method in class gameshop.advance.config.Configuration

setServerAddress(String) - Method in class gameshop.advance.config.ConfigurationControllerSingleton

setServerPort(int) - Method in class gameshop.advance.config.Configuration

setServerPort(int) - Method in class gameshop.advance.config.ConfigurationControllerSingleton

setSuccessColor(Color) - Method in class gameshop.advance.ui.swing.factory.UIStyleSingleton

store(Configuration) - Method in class gameshop.advance.config.DbConfigurationSingleton

storeConfiguration() - Method in class gameshop.advance.config.ConfigurationControllerSingleton

Salva sul db l'oggetto cinfiguration.

subtract(Money) - Method in class gameshop.advance.utility.Money

A C D E F G H I L M N O P Q R S T U

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes


text:
{% extends "_v2/base.html" %}

{% set active_nav = "community" %}

{% block body_class %}tmpl-landing{% endblock %}

{% set page_title_lead = "Code" %}

{% block page_title %}Code Index{% if tags %} entries tagged: {% for tag in tags %}{{ tag.name }}{% if not loop.last %}, {% endif %}{% endfor %}{% endif %} - {{ super() }}{% endblock %}


text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>SUPERSCROLLORAMA</title>

	<link href='http://fonts.googleapis.com/css?family=Luckiest+Guy' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" href="css/normalize.css" type="text/css">
	<link rel="stylesheet" href="css/style.css" type="text/css">
	<link rel="author" href="https://plus.google.com/107766061849006545830"/>

New Version

		Click here to find out more!

			Super
			scroll
			orama

The jQuery plugin for supercool scroll animation

powered by Greensock

			created by John Polacek

			with help from Jan Paepke

			Follow @johnpolacek

NOTE: SuperScrollorama is no longer under active development. ScrollMagic is the new hotness!
Get ScrollMagic

★ DOWNLOAD ★

			zip
			tar

Showcase

Check out these great websites to see SuperScrollorama in action

Ikea, Life of One Kitchen

					Smashing Award Winner

Alpina - Life Is Vertical

					CSS Design Award Winner

New Škoda Octavia

					CSS Awards Site of the Day

Target Exclusive Brands

Zipper Galleria

					Awwwards Site of the Day Winner

Inception Explained

					Featured on TAXI

Finn's Journey

Orsi & Jan's Wedding

Kenmore Innovations

Scrollorama For Hire

Need help building your website? Contact us.

Get Skills

Fade It

Fly It

Spin It

Scale It

Smush It

Pin It

Slide It

Wipe It

Bounce It

Color It

Unpin It

Fling It

Move It

Parallax It

Parallax It

Parallax It

Bring It

How To Use

Please note, this is a powerful tool, and with great power comes great responsibility.
Use wisely. A little subtlety can go a long way.

★ ★ ★

SuperScrollorama is powered by TweenMax and the Greensock Tweening Engine. Go to greensock.com for documentation on how to use it. Why Greensock/TweenMax? Great performance, ease-of-use, expandibility and basically because it is awesome.

First, link to the jQuery CDN and then embed TweenMax.js and SuperScrollorama. Next, start up SuperScrollorama. Think of it as a controller for animation. You add tweens and timelines to it, targeting when an element appears in the viewport or at a specific scroll point.

When initializing SuperScrollorama there are several options you might want to change.

					$.superscrollorama({options})

vars: optional properties for the pin method (object):

isVertical Are we scrolling vertically (true) or horizontally (false)? - default: true

triggerAtCenter: The animation triggers when the respective Element's origin is in the center of the scrollarea (true). This can be changed here to be at the top/left edge (false) - default: true

playoutAnimations: When scrolling past the animation should they be played out (true) or just be jumped to the respective last frame (false)?
(Does not affect animations where duration = 0) - default: true

reverse: Global flag do set if animations should be reversed (true) when scrolling back or not (false) - default: true

Example

	$(document).ready(function() {
		var controller = $.superscrollorama({
			triggerAtCenter: false,
			playoutAnimations: true
		});
	});

★ ★ ★

Use the addTween method to build your scroll animations.

					.addTween(target, tween, duration, offset, reverse)

target: scroll position (number) or element (string or object)

tween: a Greensock animation tween object

duration: scroll duration of tween in pixels (0 means autoplay)

offset: adjust the animation start point

reverse: disable reverse animation on up scrolling (optional)

In the example below, the animation fades in when scrolled into view.

	controller.addTween('#fade',
	    TweenMax.from($('#fade'), .5, {css:{opacity:0}}));

★ ★ ★

The default duration is 0, which means the tween plays through completely when its scroll point is reached. You can add a duration which will instead sync the tween progress to the scrollbar position. Instead of one tween, you can create a timeline of multiple tweens.
If you use the TweenMax or TimelineMax option {repeat: -1} the animation will loop indefinetly for the set duration.

	// parallax example
	controller.addTween(
	  '#examples-parallax',
	  (new TimelineLite())
	    .append([
	      TweenMax.fromTo($('#parallax-it-left'), 1,
	        {css:{top: 200}, immediateRender:true},
	        {css:{top: -600}}),
	      TweenMax.fromTo($('#parallax-it-right'), 1,
	        {css:{top: 500}, immediateRender:true},
	        {css:{top: -1250}})
	    ]),
	  1000 // scroll duration of tween
	);

★ ★ ★

The 4th parameter is offset, which you can use to adjust the scroll point at which the animation is triggered.

controller.addTween('#fade',
  TweenMax.from($('#fade'),.5,{
    css:{opacity:0}}),
    0, // scroll duration of tween (0 means autoplay)
    200); // offset the start of the tween by 200 pixels

★ ★ ★

The 5th parameter is reverse, which you can use to disable reverse animation.

controller.addTween('#fade',
  TweenMax.from($('#fade'),.5,{
    css:{opacity:0}}),
    200,
    false); // prevent backwards animation of the element

★ ★ ★

Pass in a function to the tween for when the animation is complete.

controller.addTween('#fade',
  TweenMax.from($('#fade'),.5,{
    css:{opacity:0},
    onComplete: function(){alert('test')}
  }));

★ ★ ★

You can remove any previously added Tweens using the removeTween method.

					.removeTween(target, tween, reset)

target: scroll position (number) or element (string or object)

tween: a Greensock animation tween object; if not set, all Tweens for the target will be removed. (optional, default: null)

reset: if true the tween will be reset to the starting position. (optional, default: true)

In the example below, all tweens from the "#fade" element are removed and reset.

	controller.removeTween('#fade');

★ ★ ★

You can use the pin method to pin an element, do a series of animations and then unpin it.

The callback functions will be called with a boolean parameter, true if triggered at end (bottom) of pin, false, if triggered at the beginning (top point).

					.pin(el, dur, vars)

el: element being pinned (string or object)

dur: scroll duration of pin (in pixels)

vars: optional properties for the pin method (object):

anim: tween animation object that occurs during the pin

offset: adjust the pin start point

onPin: callback function for start of pin

onUnpin: callback function for end of pin

pushFollowers: Decide if following elements should be pushed down (true) or scrolled past (false), default: true

Example:

	controller.pin($('#examples-2'), 3000, {
	  anim: (new TimelineLite())
	    .append(
	      TweenMax.fromTo($('#move-it'), .5,
	        {css:{left: -200, top: 500}, immediateRender:true},
	        {css:{top: -400}})
	    )
	    .append(
	      TweenMax.to($('#move-it'), .5,
	        {css:{left: 200}})
	    )
	    .append(
	      TweenMax.to($('#move-it'), .5,
	        {css:{top: -200}})
	    )
	    .append(
	      TweenMax.to($('#move-it'), .5,
	        {css:{left: 0}})
	    )
	});

★ ★ ★

You can use the updatePin method if you want to change options for pinned elements at runtime. For example when the window size or the size of your pin Item have changed. It Expects the same parameters as the .pin method, except all but the element is optional.

					.updatePin(el, dur, vars)

el: element being pinned(string or object)

dur: scroll duration of pin (in pixels) (optional, default: 0)

vars: optional properties for the pin method (object):

anim: tween animation object that occurs during the pin

offset: adjust the pin start point

onPin: callback function for start of pin

onUnpin: callback function for end of pin

pushFollowers: Decide if following elements should be pushed down (true) or scrolled past (false), default: true

Example:

	controller.updatePin($('#examples-2'), null, {
		offset: 200
	});

★ ★ ★

You can remove any previously added Pins using the removePin method.

					.removePin(el, reset)

el: element being pinned(string or object)

reset: if true the element will be unpinned and the tween will be reset to the starting position. (optional, default: true)

In the example below, the pin is removed, but not reset.

					reset=false will also mean that if you call it during pin, the element will stay pinned.

	controller.removePin('#examples-2', false);

★ ★ ★

Sometimes you might want to tell SuperScrollorama to update all elements, for example when the window is resized. Here the method triggerCheckAnim comes in handy.

					.triggerCheckAnim(immediately)

immediately: if true the update will be done immediately, if false it will wait for the next tickEvent of TweenMax (to save performance)
(optional, default: false)

Example:

	$(window).resize(function () {
		controller.triggerCheckAnim();
	});

★ ★ ★

If you go the extra mile to make your SuperScrollorama application accessible to mobile users you'll need the method setScrollContainerOffset. For more details see simpledemo_mobile.html

					.setScrollContainerOffset(x, y)

x: the x offset of the scrollcontainer

y: the x offset of the scrollcontainer

Example:

	controller.setScrollContainerOffset(0, 200);

Credits

SuperScrollorama by Chicago Web Developer John Polacek
with Jan Paepke

Greensock Tweening Engine & TweenMax by Greensock

Lettering.js by Dave Rupert

Luckiest Guy Font by Astigmatic Fonts

John Polacek works at Gesture, a mobile bidding and fundraising technology company that helps charities raise more money.


text:
package org.giweet.converter;

import static org.junit.Assert.*;

import java.lang.annotation.Annotation;

import org.junit.Test;

public class EnumConverterTest {

	private Annotation[] dummyAnnotations = {};

	private static enum TestEnum {
		TEST1, TEST2;

		@Override
		public String toString() {
			return "test enum with ordinal " + this.ordinal();
		}
	}

	@Test
	public void canGetSupportedClasses() {
		EnumConverter underTest = new EnumConverter();

		Class<?>[] result = underTest.getSupportedClasses();

		assertArrayEquals(new Class<?>[]{Enum.class} , result);
	}

	@Test(expected=CannotConvertException.class)
	public void cannotConvertWhenTargetClassIsNotAnEnum() throws Exception {
		EnumConverter underTest = new EnumConverter();

		underTest.convert(Integer.class, dummyAnnotations, "");
	}

	@Test(expected=CannotConvertException.class)
	public void cannotConvertWhenValueIsInvalid() throws Exception {
		EnumConverter underTest = new EnumConverter();

		underTest.convert(TestEnum.class, dummyAnnotations, "INVALID VALUE");
	}

	@Test(expected=CannotConvertException.class)
	public void cannotConvertWhenExpectedClassIsEnum() throws Exception {
		EnumConverter underTest = new EnumConverter();

		underTest.convert(Enum.class, dummyAnnotations, "TEST1");
	}

	@Test
	public void canConvert() throws Exception {
		EnumConverter underTest = new EnumConverter();

		Object result = underTest.convert(TestEnum.class, dummyAnnotations, "test enum with ordinal 0");
		assertEquals(TestEnum.TEST1, result);

		result = underTest.convert(TestEnum.class, dummyAnnotations, "TEST2");
		assertEquals(TestEnum.TEST2, result);
	}
}


text:
var dir_fa2078657a877c4798b15c86fa7a1a3a =
[
    [ "ControllerInfoTest.java", "ControllerInfoTest_8java.html", [
      [ "ControllerInfoTest", "classorg_1_1onosproject_1_1net_1_1behaviour_1_1ControllerInfoTest.html", "classorg_1_1onosproject_1_1net_1_1behaviour_1_1ControllerInfoTest" ]
    ] ]
];


text:
#supersized-loader {
	position:absolute;
	top:50%;
	left:50%;
	z-index:0;
	width:60px;
	height:60px;
	margin:-30px 0 0 -30px;
	text-indent:-999em;
	background:url(../images/progress.gif) no-repeat center center;
}
#supersized {
	display:block;
	position:fixed;
	left:0;
	top:0;
	overflow:hidden;
	z-index:-999;
	height:100%;
	width:100%;
}

.slider-overlay {
	background: url(../images/slider-overlay.png);
	position: fixed;
	z-index: 1;
	width:100%;
	height:100%;
	display:block;
	top:0px;
}

#supersized img {
	width:auto;
	height:auto;
	position:relative;
	display:none;
	outline:none;
	border:none;
}
#supersized.speed img {
	-ms-interpolation-mode:nearest-neighbor;
	image-rendering: -moz-crisp-edges;
}	/*Speed*/
#supersized.quality img {
	-ms-interpolation-mode:bicubic;
	image-rendering: optimizeQuality;
}			/*Quality*/
#supersized li {
	display:block;
	list-style:none;
	z-index:-30;
	position:fixed;
	overflow:hidden;
	top:0;
	left:0;
	width:100%;
	height:100%;
	background:#111;
	margin-left:0px !important;
}
#supersized a {
	width:100%;
	height:100%;
	display:block;
}
#supersized li.prevslide {
	z-index:-20;
}
#supersized li.activeslide {
	z-index:-10;
}
#supersized li.image-loading {
	background:#111 url(../images/progress.gif) no-repeat center center;
	width:100%;
	height:100%;
}
#supersized li.image-loading img {
	visibility:hidden;
}
#supersized li.prevslide img,
#supersized li.activeslide img {
	display:inline;
}


text:
use std::cmp::Ordering;
use std::default::Default;
use std::fmt::{Display, Formatter};
use std::fmt::Error;

use progress::{Timestamp, PathSummary};
use progress::nested::product::Product;
use progress::nested::summary::Summary::{Local, Outer};

#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub enum Summary<S, T> {
    Local(T),    // reachable within inner scope.
    Outer(S, T), // unreachable within scope, reachable through outer scope and then inner.
}

impl<S, T: Default> Default for Summary<S, T> {
    fn default() -> Summary<S, T> { Local(Default::default()) }
}

impl<S:PartialOrd+Copy, T:PartialOrd+Copy> PartialOrd for Summary<S, T> {
    fn partial_cmp(&self, other: &Summary<S, T>) -> Option<Ordering> {
        match (*self, *other) {
            (Local(t1),    Local(t2))    => t1.partial_cmp(&t2),
            (Local(t1),    Outer(_,t2))  => match t1.partial_cmp(&t2) {
                Some(Ordering::Less)    => Some(Ordering::Less),
                Some(Ordering::Equal)   => Some(Ordering::Less), // might not be strict if s2~=0, but lets break ties
                Some(Ordering::Greater) => None,                 // if s2 = 0 we could be leaving something else out
                None                    => None,
            },
            (Outer(s1,t1), Outer(s2,t2)) => (s1,t1).partial_cmp(&(s2,t2)),
            (Outer(_,t1),   Local(t2))   => match t1.partial_cmp(&t2) {
                Some(Ordering::Less)    => None,
                Some(Ordering::Equal)   => Some(Ordering::Greater), // might not be strict if s2~=0, but lets break ties
                Some(Ordering::Greater) => Some(Ordering::Greater), // if s2 = 0 we could be leaving something else out
                None                    => None,
            },
        }
    }
}

impl<TOuter, SOuter, TInner, SInner> PathSummary<Product<TOuter, TInner>> for Summary<SOuter, SInner>
where TOuter: Timestamp,
      TInner: Timestamp,
      SOuter: PathSummary<TOuter>,
      SInner: PathSummary<TInner>,
{
    // this makes sense for a total order, but less clear for a partial order.
    fn results_in(&self, product: &Product<TOuter, TInner>) -> Product<TOuter, TInner> {
        match *self {
            Local(ref iters)              => Product::new(product.outer.clone(), iters.results_in(&product.inner)),
            Outer(ref summary, ref iters) => Product::new(summary.results_in(&product.outer), iters.results_in(&Default::default())),
        }
    }
    fn followed_by(&self, other: &Summary<SOuter, SInner>) -> Summary<SOuter, SInner> {
        match (*self, *other) {
            (Local(inner1), Local(inner2))             => Local(inner1.followed_by(&inner2)),
            (Local(_), Outer(_, _))                    => *other,
            (Outer(outer1, inner1), Local(inner2))     => Outer(outer1, inner1.followed_by(&inner2)),
            (Outer(outer1, _), Outer(outer2, inner2))  => Outer(outer1.followed_by(&outer2), inner2),
        }
    }
}

impl<SOuter: Display, SInner: Display> Display for Summary<SOuter, SInner> {
    fn fmt(&self, f: &mut Formatter) -> Result<(), Error> {
        match self {
            &Local(ref s) => f.write_str(&format!("Local({})", s)),
            &Outer(ref s, ref t) => f.write_str(&format!("Outer({}, {})", s, t))
        }
    }
}


text:
using System;
using System.Runtime.Serialization;

namespace Renci.SshNet.Common
{
    /// <summary>
    /// The exception that is thrown when pass phrase for key file is empty or null
    /// </summary>
    [Serializable]
    public partial class SshPassPhraseNullOrEmptyException : SshException
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="SshPassPhraseNullOrEmptyException"/> class.
        /// </summary>
        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
        /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
        /// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null. </exception>
        /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0). </exception>
        protected SshPassPhraseNullOrEmptyException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}


text:
#pragma once

#include "reserved/reserved.h"

constexpr const char RESERVED_GEO_LATITUDE[]                = RESERVED__ "latitude";
constexpr const char RESERVED_GEO_LAT[]                     = RESERVED__ "lat";
constexpr const char RESERVED_GEO_LONGITUDE[]               = RESERVED__ "longitude";
constexpr const char RESERVED_GEO_LON[]                     = RESERVED__ "lon";
constexpr const char RESERVED_GEO_ALTITUDE[]                = RESERVED__ "altitude";
constexpr const char RESERVED_GEO_ALT[]                     = RESERVED__ "alt";
constexpr const char RESERVED_GEO_RADIUS[]                  = RESERVED__ "radius";
constexpr const char RESERVED_GEO_UNITS[]                   = RESERVED__ "units";
constexpr const char RESERVED_GEO_SRID[]                    = RESERVED__ "srid";


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Beziehung</title>
<meta name="date" content="2015-08-09">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

beziehungsrechner

Class Beziehung

java.lang.Object

beziehungsrechner.Beziehung

public class Beziehung
extends java.lang.Object

Dies ist die Berechnungsklasse des Dabendorfer Beziehungsrechners. Diese fuegt die Namen zusammen und setzt ihre mathematischen Werte solange zusammen,
 bis eine Zahl zwischen 0 und 100 herauskommt. Selbige wird als Prozentwert, wie gut zwei Menschen zusammenpassen ausgegeben.

Version:

1.1

Author:

Lukas Schramm und Miriam Fischer

Field Summary

Fields

Modifier and Type
Field and Description

private int
laenge

Diese Variable gibt die Laenge der restlichen Zahlenkette aus.

private java.lang.String[]
namen

Dieser String-Array enthaelt die urspruenglichen Namen zur Ausgabe des Ergebnisses.

private int
rechenrunde

Diese Variable zaehlt intern die wievielte Runde der Ergebnisfindung es ist.

private int
temp

Dieser int zaehlt, welche Stelle der Index der letzten verfuegbaren Zahl hat.

private int
zaehler

Der Zaehler zaehlt die Vorkommen einzelner Buchstaben.

private java.util.ArrayList<java.lang.Integer>
zahlen

Diese Liste enthaelt die urspruenglich berechneten Startzahlen und wird bis zum Ende hin modifiziert, bis sie die Endwerte enthaelt.

Constructor Summary

Constructors

Constructor and Description

Beziehung()

Method Summary

All Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

private void
berechne()

Diese Methode repraesentiert einen Rechenschritt des Beziehungsrechners.

private void
neustart()

Diese Methode fragt ab, ob der Nutzer eine neue Berechnung starten moechte.

void
ordne(java.lang.String[] ursprungsname)

Diese Methode nimmt die Namen der Spieler entgegen, sortiert sie alphabetisch, fuegt sie zusammen
 und macht aus ihr die erste Zahlenreihe, die an die Berechnungsmethode weitergegeben wird.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

zahlen

private java.util.ArrayList<java.lang.Integer> zahlen

Diese Liste enthaelt die urspruenglich berechneten Startzahlen und wird bis zum Ende hin modifiziert, bis sie die Endwerte enthaelt.

zaehler

private int zaehler

Der Zaehler zaehlt die Vorkommen einzelner Buchstaben.

laenge

private int laenge

Diese Variable gibt die Laenge der restlichen Zahlenkette aus. Wenn sie kleiner als 3 ist, ist das Endergebnis berechnet.

temp

private int temp

Dieser int zaehlt, welche Stelle der Index der letzten verfuegbaren Zahl hat. Der Wert ist invers zur Zaehlvariable i in der Methode berechne().

rechenrunde

private int rechenrunde

Diese Variable zaehlt intern die wievielte Runde der Ergebnisfindung es ist.

namen

private java.lang.String[] namen

Dieser String-Array enthaelt die urspruenglichen Namen zur Ausgabe des Ergebnisses.

Constructor Detail

Beziehung

public Beziehung()

Method Detail

ordne

public void ordne(java.lang.String[] ursprungsname)

Diese Methode nimmt die Namen der Spieler entgegen, sortiert sie alphabetisch, fuegt sie zusammen
 und macht aus ihr die erste Zahlenreihe, die an die Berechnungsmethode weitergegeben wird.
 Hierbei wird die Liste an Einzelbuchstaben in einer doppelten for-Schleife selbst iteriert und durchgezaehlt, wie oft ein Buchstabe vorkommt.

Parameters:

ursprungsname - Nimmt ein Array der beiden urspruenglichen Namen entgegen.

berechne

private void berechne()

Diese Methode repraesentiert einen Rechenschritt des Beziehungsrechners. Sie ruft sich solange rekursiv auf, bis ein logischer Prozentwert erreicht wird.
 Es werden jede Runde die erste und die letzte Zahl aufgerufen und zusammen addiert. Bei Ergebnissen groesser als 9 greift eine Zusatzmethode die das Problem doppelter Ziffern loest.
 Wenn die Endbedingung erreicht ist, wird das Ergebnis ausgeworfen, ansonsten startet eine neue Berechnung.

neustart

private void neustart()

Diese Methode fragt ab, ob der Nutzer eine neue Berechnung starten moechte.

 Wenn der Nutzer auf Ja klickt, wird eine neue Berechnung gestartet, bei Nein schliesst sich das Programm komplett.

Skip navigation links

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
<?php

if ('á' != "\xc3\xa1") {
    // the language files must be saved as UTF-8 (without BOM)
    throw new \Exception('The language file ' . __FILE__ . ' is damaged, it must be saved UTF-8 encoded!');
}

return array(
  'Allowed values for the parameter limit are 2,3,4,6,8,9 and 12 but not %limit%!'
    => 'Erlaubte Werte für den Parameter limit sind 2,3,4,6,8,9 und 12 jedoch nicht %limit%!',
  'Available galleries'
    => 'Verfügbare Galerien',
  'Copy to clipboard'
    => 'In die Zwischenablage kopieren',
  'Copy to clipboard: <CTRL>+C, Enter'
    => 'Kopieren mit: <STRG>+C, Eingabetaste',
  'Created at'
    => 'Erstellt am',
  'FacebookGallery - Full Page Image Gallery Example'
    => 'FacebookGallery - Beispiel für eine Bildergalerie',
  'GALLERY_TYPE_MOBILE'
    => 'Mobile Uploads',
  'GALLERY_TYPE_NORMAL'
    => 'Allgemein',
  'GALLERY_TYPE_PROFILE'
    => 'Profilbilder',
  'GALLERY_TYPE_WALL'
    => 'Chronik',
  'Hint: This error occur if you try to access protected Facebook galleries, which belong to private account. The kitFramework FacebookGallery does only support galleries which belong to fanpages and public pages.'
    => 'Hinweis: Dieser Fehler tritt auf, wenn Sie versuchen auf geschützte Facebook Galerien zuzugreifen, die zu privaten Zugängen gehören. Die kitFramework FacebookGallery unterstützt ausschließlich Galerien, die zu Fanpages bzw. öffentlichen Seiten gehören.',
  'kitFramework FacebookGallery is using the Full Page Image Gallery'
    => 'kitFramework FacebookGallery verwendet die Full Page Image Gallery',
  'The facebook ID %facebook_id% provide the following galleries'
    => 'Die Facebook ID %facebook_id% stellt die folgenden Galerien zur Verfügung',
  'This image is not available in size %size%, try another size value!'
    => 'Diese Abbildung ist in der Größe %size% nicht verfügbar, versuchen Sie einen anderen Größenwert!',
  'View Thumbs'
    => 'Vorschaubilder zeigen',

);


text:
/* automatically generated by rust-bindgen */

#![allow(non_snake_case)]

#[repr(C)]
pub struct nsSlots__bindgen_vtable {
}
#[repr(C)]
#[derive(Debug)]
pub struct nsSlots {
    pub vtable_: *const nsSlots__bindgen_vtable,
}
#[test]
fn bindgen_test_layout_nsSlots() {
    assert_eq!(::std::mem::size_of::<nsSlots>() , 8usize);
    assert_eq!(::std::mem::align_of::<nsSlots>() , 8usize);
}


text:
{% extends "../docshell.html" %}
{% block title %}iGoogle{% endblock %}
{% block navigation %}{% include 'navigation.html' %}{% endblock %}
{% block content %}

Use with iGoogle

This page describes how you can use Rhizosphere gadgets inside your
  iGoogle homepage.

  To use Rhizosphere in your iGoogle page, first you identify a Google
  Spreadsheet that contains the data you want to display. Once you have it,
  follow these instructions to setup the
  gadget inside the spreadsheet.

  From within the spreadsheet, open the gadget menu from the top-right corner
  of the Rhizosphere Gadget, and choose the Add Gadget to iGoogle
  option. That's it. Really easy (thanks Google)!

  Tip. By clicking the maximize icon in the top-right corner
  of the Rhizosphere gadget, you can switch to fullscreen mode, exactly in the
  same way as described for the
  spreadsheet case.

{% endblock %}


text:
//
//  XmlParsedController.m
//  KMXmlParserDemo
//
//  Created by Konstantin Medynsky on 14/06/2015.
//  Copyright (c) 2015 Konstm. All rights reserved.
//

#import "XmlParsedController.h"

@interface XmlParsedController ()
@property (weak, nonatomic) IBOutlet UITextView *textviewParsed;
@end

@implementation XmlParsedController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.textviewParsed.text = self.parsedDescription;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end


text:
<!DOCTYPE html>

<meta charset='utf-8'>
<link href='../../../exports.css' rel='stylesheet'>
<link href='../../../exports.css' rel='stylesheet'>

xdamman's posterous

This is an archived post
This is an archived post

Previous

Index

Next

Toilettes japonaises

October  9 2006,  2:24 AM
 by Xavier Damman

Décidément, ces japonais ils sont sacrément ingénieux!
Voyez cela;
En Europe, nous avons habituellement dans nos toilettes un petit lavabo sur le côté pour se laver les mains.
Ca prend de la place, et ça utilise de l'eau. Normal me direz-vous!

Les Japonais eux ont trouvé l'idée géniale: ils mettent le lavabo juste au dessus du réservoir de la toilette.
Ainsi, une fois que vous tirez la chasse, hop le réservoir se rempli en passant par le robinet et vous avez largement le temps de vous laver les mains!
Gain de place, et économie d'eau! Fallait y penser!

Autre astuce, mais cette fois plus technologique; le mini jet qui vous nettoie le cul.
Un simple petit bouton et hop, un petit jet vise juste au bon endroit (pour autant que vous soyez normalement constitué).
Le gros bouton rond permet de régler la pression. Au maximum, ça arrache; faites gaffe!

Sur les modèles de luxe, il y a même un bouton "sèche cheveux" pour terminer le travail en beauté.
C'est pas beau tout ça?
En tout cas, je vous jure que c'est très agréable et que l'essayer, c'est l'adopter.

Si la première idée pourrait facilement se développer en Europe, la seconde paraît plus difficile à mettre en oeuvre dans la mesure où aucune de nos toilettes ne dispose d'une prise de courant.
Mais si vous construisez une nouvelle maison, pensez à demander à l'électricien d'en installer une!
Vous ne le regretterez pas :-)

19 views and 0 responses


text:
using System.Collections.Generic;
using imperative.schema;
using runic.parser;

namespace imperative.expressions
{
    public class Declare_Variable : Expression
    {
        public Symbol symbol;
        public Expression expression;

        public Declare_Variable(Symbol symbol, Expression expression, Legend legend = null)
            : base(Expression_Type.declare_variable, legend)
        {
            this.symbol = symbol;
            this.expression = expression;
        }

        public override Expression clone()
        {
            return new Declare_Variable(symbol, expression, legend);
        }

        public override IEnumerable<Expression> children
        {
            get
            {
                return expression != null
                    ? new[] {expression}
                    : new Expression[] {};
            }
        }
    }

}


text:
package de.ganskef.shortcircuit.utils;

import static org.junit.Assert.assertEquals;

import java.net.InetSocketAddress;

import org.junit.Test;

import io.netty.handler.codec.http.DefaultFullHttpRequest;
import io.netty.handler.codec.http.HttpMethod;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpVersion;

public class HttpRequestUtilTest {

    private HttpRequest createRequest(String uri) {
        HttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, uri);
        return request;
    }

    @Test
    public void testHttpSimpleUri() {
        HttpRequest request = createRequest("http://localhost/");
        InetSocketAddress address = HttpRequestUtil.getInetSocketAddress(request);
        assertEquals("localhost", address.getHostName());
        assertEquals(80, address.getPort());
    }

    @Test
    public void testHttpMoreSlashes() {
        HttpRequest request = createRequest("http://localhost/dir/");
        InetSocketAddress address = HttpRequestUtil.getInetSocketAddress(request);
        assertEquals("localhost", address.getHostName());
        assertEquals(80, address.getPort());
    }

    @Test
    public void testHttpWithPort() {
        HttpRequest request = createRequest("http://localhost:8080/");
        InetSocketAddress address = HttpRequestUtil.getInetSocketAddress(request);
        assertEquals("localhost", address.getHostName());
        assertEquals(8080, address.getPort());
    }

    @Test
    public void testHttpSchemeMustNotCaseSensitive() {
        HttpRequest request = createRequest("HTTP://localhost/");
        InetSocketAddress address = HttpRequestUtil.getInetSocketAddress(request);
        assertEquals("localhost", address.getHostName());
        assertEquals(80, address.getPort());
    }

    @Test
    public void testDirectRequestUri() {
        HttpRequest request = createRequest("/");
        InetSocketAddress address = HttpRequestUtil.getInetSocketAddress(request);
        assertEquals(null, address);
    }

    @Test(expected = NullPointerException.class)
    public void testNull() {
        HttpRequestUtil.getInetSocketAddress(null);
    }

    @Test
    public void testSecureSimpleUri() {
        HttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.CONNECT, "localhost:443");
        InetSocketAddress address = HttpRequestUtil.getInetSocketAddress(request);
        assertEquals("localhost", address.getHostName());
        assertEquals(443, address.getPort());
    }

}


text:
The following plot (figure \ref{fig plot matrix both}) is a comparison of the base values taken as a reference for the  test battery concerning the matrix multiplication on a vanilla Java code.

On the graph is plotted the base values used to compute the speedup and a measure based on the average of 5 executions. This plot demonstrates that no edge cases happened while taking the base values. The two plots show a similar behavior and even sometimes the same values.

It is worth noting that the second measure took place 2 weeks after the first one.

\begin{figure}[h!]
\centering
\includegraphics[width=1\textwidth]{vanilla_matrix_both.pdf}
\caption{Comparison of the base value with a measure performing an average on 5 executions.}
\label{fig plot matrix both}
\end{figure}