text:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.txtInput = New System.Windows.Forms.TextBox()
        Me.txtPassphrase = New System.Windows.Forms.TextBox()
        Me.Label2 = New System.Windows.Forms.Label()
        Me.txtSalt = New System.Windows.Forms.TextBox()
        Me.Label3 = New System.Windows.Forms.Label()
        Me.txtIterations = New System.Windows.Forms.TextBox()
        Me.Label4 = New System.Windows.Forms.Label()
        Me.txtInitVector = New System.Windows.Forms.TextBox()
        Me.Label5 = New System.Windows.Forms.Label()
        Me.txtKeySize = New System.Windows.Forms.TextBox()
        Me.Label6 = New System.Windows.Forms.Label()
        Me.txtOutput = New System.Windows.Forms.TextBox()
        Me.cmdEncrypt = New System.Windows.Forms.Button()
        Me.cmdDecrypt = New System.Windows.Forms.Button()
        Me.Label7 = New System.Windows.Forms.Label()
        Me.Label8 = New System.Windows.Forms.Label()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.SuspendLayout()
        '
        'txtInput
        '
        Me.txtInput.Location = New System.Drawing.Point(20, 36)
        Me.txtInput.Multiline = True
        Me.txtInput.Name = "txtInput"
        Me.txtInput.Size = New System.Drawing.Size(261, 83)
        Me.txtInput.TabIndex = 1
        Me.txtInput.Text = "Hello, World!"
        '
        'txtPassphrase
        '
        Me.txtPassphrase.Location = New System.Drawing.Point(79, 125)
        Me.txtPassphrase.Name = "txtPassphrase"
        Me.txtPassphrase.Size = New System.Drawing.Size(202, 20)
        Me.txtPassphrase.TabIndex = 3
        Me.txtPassphrase.Text = "Pas5pr@se"
        '
        'Label2
        '
        Me.Label2.AutoSize = True
        Me.Label2.Location = New System.Drawing.Point(17, 128)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(62, 13)
        Me.Label2.TabIndex = 2
        Me.Label2.Text = "Passphrase"
        '
        'txtSalt
        '
        Me.txtSalt.Location = New System.Drawing.Point(79, 151)
        Me.txtSalt.Name = "txtSalt"
        Me.txtSalt.Size = New System.Drawing.Size(202, 20)
        Me.txtSalt.TabIndex = 5
        Me.txtSalt.Text = "s@1tValue"
        '
        'Label3
        '
        Me.Label3.AutoSize = True
        Me.Label3.Location = New System.Drawing.Point(17, 154)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(55, 13)
        Me.Label3.TabIndex = 4
        Me.Label3.Text = "Salt Value"
        '
        'txtIterations
        '
        Me.txtIterations.Location = New System.Drawing.Point(79, 203)
        Me.txtIterations.Name = "txtIterations"
        Me.txtIterations.Size = New System.Drawing.Size(83, 20)
        Me.txtIterations.TabIndex = 7
        Me.txtIterations.Text = "2"
        '
        'Label4
        '
        Me.Label4.AutoSize = True
        Me.Label4.Location = New System.Drawing.Point(17, 206)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(50, 13)
        Me.Label4.TabIndex = 6
        Me.Label4.Text = "Iterations"
        '
        'txtInitVector
        '
        Me.txtInitVector.Location = New System.Drawing.Point(79, 177)
        Me.txtInitVector.Name = "txtInitVector"
        Me.txtInitVector.Size = New System.Drawing.Size(132, 20)
        Me.txtInitVector.TabIndex = 9
        Me.txtInitVector.Text = "@1B2c3D4e5F6g7H8"
        '
        'Label5
        '
        Me.Label5.AutoSize = True
        Me.Label5.Location = New System.Drawing.Point(17, 180)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(55, 13)
        Me.Label5.TabIndex = 8
        Me.Label5.Text = "Init Vector"
        '
        'txtKeySize
        '
        Me.txtKeySize.Location = New System.Drawing.Point(79, 229)
        Me.txtKeySize.Name = "txtKeySize"
        Me.txtKeySize.Size = New System.Drawing.Size(83, 20)
        Me.txtKeySize.TabIndex = 11
        Me.txtKeySize.Text = "256"
        '
        'Label6
        '
        Me.Label6.AutoSize = True
        Me.Label6.Location = New System.Drawing.Point(17, 232)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(48, 13)
        Me.Label6.TabIndex = 10
        Me.Label6.Text = "Key Size"
        '
        'txtOutput
        '
        Me.txtOutput.Location = New System.Drawing.Point(20, 279)
        Me.txtOutput.Multiline = True
        Me.txtOutput.Name = "txtOutput"
        Me.txtOutput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
        Me.txtOutput.Size = New System.Drawing.Size(248, 84)
        Me.txtOutput.TabIndex = 12
        '
        'cmdEncrypt
        '
        Me.cmdEncrypt.Location = New System.Drawing.Point(20, 381)
        Me.cmdEncrypt.Name = "cmdEncrypt"
        Me.cmdEncrypt.Size = New System.Drawing.Size(120, 23)
        Me.cmdEncrypt.TabIndex = 13
        Me.cmdEncrypt.Text = "Encrypt"
        Me.cmdEncrypt.UseVisualStyleBackColor = True
        '
        'cmdDecrypt
        '
        Me.cmdDecrypt.Location = New System.Drawing.Point(148, 381)
        Me.cmdDecrypt.Name = "cmdDecrypt"
        Me.cmdDecrypt.Size = New System.Drawing.Size(120, 23)
        Me.cmdDecrypt.TabIndex = 14
        Me.cmdDecrypt.Text = "Decrypt"
        Me.cmdDecrypt.UseVisualStyleBackColor = True
        '
        'Label7
        '
        Me.Label7.AutoSize = True
        Me.Label7.Location = New System.Drawing.Point(17, 257)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(42, 13)
        Me.Label7.TabIndex = 15
        Me.Label7.Text = "Output:"
        '
        'Label8
        '
        Me.Label8.AutoSize = True
        Me.Label8.Location = New System.Drawing.Point(212, 180)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(69, 13)
        Me.Label8.TabIndex = 16
        Me.Label8.Text = "16 bytes only"
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.Location = New System.Drawing.Point(17, 15)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(34, 13)
        Me.Label1.TabIndex = 17
        Me.Label1.Text = "Input:"
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(294, 422)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.Label8)
        Me.Controls.Add(Me.Label7)
        Me.Controls.Add(Me.cmdDecrypt)
        Me.Controls.Add(Me.cmdEncrypt)
        Me.Controls.Add(Me.txtOutput)
        Me.Controls.Add(Me.txtKeySize)
        Me.Controls.Add(Me.Label6)
        Me.Controls.Add(Me.txtInitVector)
        Me.Controls.Add(Me.Label5)
        Me.Controls.Add(Me.txtIterations)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.txtSalt)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.txtPassphrase)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.txtInput)
        Me.Name = "Form1"
        Me.Text = "SHA1 Tool"
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents txtInput As System.Windows.Forms.TextBox
    Friend WithEvents txtPassphrase As System.Windows.Forms.TextBox
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents txtSalt As System.Windows.Forms.TextBox
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents txtIterations As System.Windows.Forms.TextBox
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents txtInitVector As System.Windows.Forms.TextBox
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents txtKeySize As System.Windows.Forms.TextBox
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents txtOutput As System.Windows.Forms.TextBox
    Friend WithEvents cmdEncrypt As System.Windows.Forms.Button
    Friend WithEvents cmdDecrypt As System.Windows.Forms.Button
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents Label1 As System.Windows.Forms.Label

End Class


text:
[Itamae](https://github.com/ryotarai/itamae) resource plugin to manage [firewalld](https://fedorahosted.org/firewalld/).

[![Build Status](https://travis-ci.org/gongo/itamae-plugin-resource-firewalld.svg?branch=master)](https://travis-ci.org/gongo/itamae-plugin-resource-firewalld)
[![Coverage Status](https://coveralls.io/repos/gongo/itamae-plugin-resource-firewalld/badge.png?branch=master)](https://coveralls.io/r/gongo/itamae-plugin-resource-firewalld?branch=master)
[![Code Climate](https://codeclimate.com/github/gongo/itamae-plugin-resource-firewalld/badges/gpa.svg)](https://codeclimate.com/github/gongo/itamae-plugin-resource-firewalld)

## Usage

```ruby
service 'firewalld' do
  action [:start, :enable]
end

firewalld_zone 'external' do
  interfaces %w(enp0s8 enp0s9)
  services   %w(ssh)

  masquerade true

  notifies  :restart, 'service[firewalld]'
end

firewalld_zone 'public' do
  interfaces %w(enp0s3)
  services   %w(ssh https mysql)
  ports      %w(8080/tcp 4243/udp)

  default_zone true

  notifies :restart, 'service[firewalld]'
end
```

After `itamae` execute:

```
$ sudo firewall-cmd --list-all --zone external
external (active)
  interfaces: enp0s8 enp0s9
  sources:
  services: ssh
  ports:
  masquerade: yes
  forward-ports:
  icmp-blocks:
  rich rules:

$ sudo firewall-cmd --list-all --zone public
public (default, active)
  interfaces: enp0s3
  sources:
  services: https mysql ssh
  ports: 4243/udp 8080/tcp
  masquerade: no
  forward-ports:
  icmp-blocks:
  rich rules:
```

### See also

Demonstration environment [examples](./examples)

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'itamae-plugin-resource-firewalld'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install itamae-plugin-resource-firewalld

## Features

### firewalld_zone

Provides a `firewalld_zone` resource that operation of `Zone`:

```ruby
firewalld_zone 'zone_name' do
  name          # [String]

  interfaces    # [Array of string]
  sources       # [Array of string]
  services      # [Array of string]
  ports         # [Array of string]
  forward_ports # [Array of string]
  icmp_blocks   # [Array of string]
  rich_rules    # [Array of string]

  masquerade    # [True / False]
  default_zone  # [True] Ignored other
end
```

### firewalld_service

Provides a `firewalld_service` resource that can create or delete of `Service`:

```ruby
firewalld_service 'my-service' do
  action      # [:create or :delete]

  short       # [String]
  description # [String]
  ports       # [Array of String]
  module_name # [String]
  to_ipv4     # [String]
  to_ipv6     # [String]
end
```

After `itamae` execute, `/etc/firewalld/service/my-service.xml` is created.

## IMPORTANT

`itamae-plugin-resource-firewalld`'s resource performs the processing `firewall-cmd` with [--permanent](http://fedoraproject.org/wiki/FirewallD#Permanent_zone_handling) .

## TODO

Unimplemented:

- Add a new `zone` and `icmptype` resource
- Operation of `Direct`, `Lockdown`
- Etc...

I'll be waiting for your pull request :bow:

## Contributing

1. Fork it ( https://github.com/gongo/itamae-plugin-resource-firewalld/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

redpajama_set_name: RedPajamaGithub


text:
using UnicornHack.Systems.Abilities;
using UnicornHack.Systems.Actors;
using UnicornHack.Systems.Effects;
using UnicornHack.Systems.Time;
using UnicornHack.Utils.MessagingECS;

// ReSharper disable once CheckNamespace
namespace UnicornHack;

public partial class GameManager
{
    public EntityGroup<GameEntity> TemporalEntities
    {
        get;
        private set;
    } = null!;

    public SortedUniqueEntityIndex<GameEntity, (int Tick, int Id)> TemporalEntitiesIndex
    {
        get;
        private set;
    } = null!;

    public TimeSystem TimeSystem
    {
        get;
        private set;
    } = null!;

    private void InitializeTime(SequentialMessageQueue<GameManager> queue)
    {
        TemporalEntities = CreateGroup(nameof(TemporalEntities),
            new EntityMatcher<GameEntity>().AnyOf(
                (int)EntityComponent.AI,
                (int)EntityComponent.Player,
                (int)EntityComponent.Effect,
                (int)EntityComponent.Ability));

        TemporalEntitiesIndex = new SortedUniqueEntityIndex<GameEntity, (int Tick, int Id)>(
            nameof(TemporalEntitiesIndex),
            TemporalEntities,
            new KeyValueGetter<GameEntity, (int Tick, int Id)>(
                (change, matcher, valueType) =>
                {
                    if (matcher.TryGetValue<int?>(
                            change, (int)EntityComponent.Ability, nameof(AbilityComponent.CooldownTick), valueType,
                            out var abilityTick)
                        && abilityTick.HasValue)
                    {
                        return ((abilityTick.Value, change.Entity.Id), true);
                    }

                    if (matcher.TryGetValue<int?>(
                            change, (int)EntityComponent.Effect, nameof(EffectComponent.ExpirationTick), valueType,
                            out var effectTick)
                        && effectTick.HasValue)
                    {
                        return ((effectTick.Value, change.Entity.Id), true);
                    }

                    if (matcher.TryGetValue<int?>(
                            change, (int)EntityComponent.AI, nameof(AIComponent.NextActionTick), valueType,
                            out var aiTick)
                        && aiTick.HasValue)
                    {
                        return ((aiTick.Value, change.Entity.Id), true);
                    }

                    if (matcher.TryGetValue<int?>(
                            change, (int)EntityComponent.Player, nameof(PlayerComponent.NextActionTick), valueType,
                            out var playerTick)
                        && playerTick.HasValue)
                    {
                        return ((playerTick.Value, change.Entity.Id), true);
                    }

                    return ((0, 0), false);
                },
                new PropertyMatcher<GameEntity>()
                    .With(component => ((AIComponent)component).NextActionTick, (int)EntityComponent.AI)
                    .With(component => ((PlayerComponent)component).NextActionTick, (int)EntityComponent.Player)
                    .With(component => ((EffectComponent)component).ExpirationTick, (int)EntityComponent.Effect)
                    .With(component => ((AbilityComponent)component).CooldownTick, (int)EntityComponent.Ability)
            ),
            TickComparer.Instance);

        TimeSystem = new TimeSystem();
        queue.Register(TimeSystem, AdvanceTurnMessage.Name, 0);
    }
}


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

namespace Bitlore
{
    public interface Interpretation
    {
        string AsText();
        string AsText(Func<string,string> formatter);
    }
}


text:
from vyapp.tools import set_status_mode
from vyapp.tools import set_status_line
from vyapp.tools import set_status_col
from vyapp.tools import set_status_msg
from vyapp.tools import get_area_tab_index
from vyapp.app import root
from os.path import basename

TIME = 1000

def update_mode(area):
    """
    It is used to update the mode status bar
    in TIME interval.
    """

    def cave():
        if not cave.keep: return
        set_status_mode(area.id)
        area.after(TIME, cave)

    """
    The cave function is used
    to update the status bar.

    When the AreaVi loses focus it sets cave.keep to False then
    cave no more calls after.
    It may be interesting to call

    area.after_idle.
    """

    cave.keep = True
    cave()
    def stop(): cave.keep = False
    area.hook(-1, '<FocusOut>', lambda event: stop())

def update_cursor_pos(area):
    """
    It is used to update the line and col statusbar
    in TIME interval.
    """

    def cave():
        if not cave.keep: return
        row, col = area.indref('insert')
        set_status_line(row)
        set_status_col(col)
        area.after(TIME, cave)

    """
    The scheme is basically the same as in
    update_mode.
    It may be interesting to call

    area.after_idle.
    """

    cave.keep = True
    cave()
    def stop(): cave.keep = False
    area.hook(-1, '<FocusOut>', lambda event: stop())

def install(area):
    area.install((-1, '<FocusIn>', lambda event: update_mode(event.widget)),
           (-1, '<FocusIn>', lambda event: update_cursor_pos(event.widget)),
           (-1, '<Control-F9>', lambda event: root.status.switch()),
           (-1, '<Escape>', lambda event: set_status_msg('')),

           (-1, '<<SaveData>>', lambda event: root.title('Vy %s' % event.widget.filename)),
           (-1, '<<LoadData>>', lambda event: root.title('Vy %s' % event.widget.filename)),
           (-1, '<<ClearData>>', lambda event: root.title('Vy %s' % event.widget.filename)),
           (-1, '<FocusIn>', lambda event: root.title('Vy %s' % event.widget.filename)),

           (-1, '<<SaveData>>', lambda event: root.note.tab(get_area_tab_index(event.widget), text=basename(event.widget.filename))),
           (-1, '<<LoadData>>', lambda event: root.note.tab(get_area_tab_index(event.widget), text=basename(event.widget.filename))),
           (-1, '<<ClearData>>', lambda event: root.note.tab(get_area_tab_index(event.widget), text=basename(event.widget.filename))),
           (-1, '<FocusIn>', lambda event: root.note.tab(root.note.select(), text=basename(event.widget.filename))))


text:
using System;
using System.Collections.Generic;
using Lucene.Net.Analysis.Tokenattributes;

namespace Lucene.Net.Analysis.Fr
{
    /*
     * Removes elisions from a {@link TokenStream}. For example, "l'avion" (the plane) will be
     * tokenized as "avion" (plane).
     *

     * Note that {@link StandardTokenizer} sees " ' " as a space, and cuts it out.
     *
     * @see Elision in Wikipedia
     */
    public sealed class ElisionFilter : TokenFilter
    {
        private CharArraySet articles = null;
        private ITermAttribute termAtt;

        private static char[] apostrophes = { '\'', ''' };

        public void SetArticles(ISet<string> articles)
        {
            if (articles is CharArraySet)
                this.articles = (CharArraySet)articles;
            else
                this.articles = new CharArraySet(articles, true);
        }

        /*
         * Constructs an elision filter with standard stop words
         */
        internal ElisionFilter(TokenStream input)
            : this(input, new[] { "l", "m", "t", "qu", "n", "s", "j" })
        { }

        /*
         * Constructs an elision filter with a Set of stop words
         */
        public ElisionFilter(TokenStream input, ISet<string> articles)
            : base(input)
        {
            SetArticles(articles);
            termAtt = AddAttribute<ITermAttribute>();
        }

        /*
         * Constructs an elision filter with an array of stop words
         */
        public ElisionFilter(TokenStream input, IEnumerable<string> articles)
            : base(input)
        {
            this.articles = new CharArraySet(articles, true);
            termAtt = AddAttribute<ITermAttribute>();
        }

        /*
         * Increments the {@link TokenStream} with a {@link TermAttribute} without elisioned start
         */
        public override sealed bool IncrementToken()
        {
            if (input.IncrementToken())
            {
                char[] termBuffer = termAtt.TermBuffer();
                int termLength = termAtt.TermLength();

                int minPoz = int.MaxValue;
                for (int i = 0; i < apostrophes.Length; i++)
                {
                    char apos = apostrophes[i];
                    // The equivalent of String.indexOf(ch)
                    for (int poz = 0; poz < termLength; poz++)
                    {
                        if (termBuffer[poz] == apos)
                        {
                            minPoz = Math.Min(poz, minPoz);
                            break;
                        }
                    }
                }

                // An apostrophe has been found. If the prefix is an article strip it off.
                if (minPoz != int.MaxValue
                    && articles.Contains(termAtt.TermBuffer(), 0, minPoz))
                {
                    termAtt.SetTermBuffer(termAtt.TermBuffer(), minPoz + 1, termAtt.TermLength() - (minPoz + 1));
                }

                return true;
            }
            else
            {
                return false;
            }
        }
    }
}


text:
<component name="libraryTable">
  <library name="support-core-ui-24.2.0">
    <ANNOTATIONS>
      <root url="jar://$PROJECT_DIR$/app/build/intermediates/exploded-aar/com.android.support/support-core-ui/24.2.0/annotations.zip!/" />
    </ANNOTATIONS>
    <CLASSES>
      <root url="jar://$PROJECT_DIR$/app/build/intermediates/exploded-aar/com.android.support/support-core-ui/24.2.0/jars/classes.jar!/" />
      <root url="jar://$PROJECT_DIR$/app/build/intermediates/exploded-aar/com.android.support/support-core-ui/24.2.0/jars/libs/internal_impl-24.2.0.jar!/" />
      <root url="file://$PROJECT_DIR$/app/build/intermediates/exploded-aar/com.android.support/support-core-ui/24.2.0/res" />
    </CLASSES>
    <JAVADOC />
    <SOURCES>
      <root url="jar://D:/Programming/Android/android-sdk-windows/extras/android/m2repository/com/android/support/support-core-ui/24.2.0/support-core-ui-24.2.0-sources.jar!/" />
    </SOURCES>
  </library>
</component>


text:
<!DOCTYPE html>

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

    <title>Getting Sassy</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">

    <link href="css/freelancer.css" rel="stylesheet">

    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">

                        Getting Sassy

About

 Just working with some SASS here

                        Copyright © Young Creative Space 2014

Project Title

Use this area of the page to describe your project. The icon above is part of a free icon set by Flat Icons. On their website, you can download their free set with 16 icons, or you can purchase the entire set with 146 icons for only $12!

Client:
                                    Start Bootstrap

Date:
                                    April 2014

Service:
                                    Web Development

                            <button type="button" class="btn btn-default" data-dismiss="modal"> Close</button>

Project Title

Use this area of the page to describe your project. The icon above is part of a free icon set by Flat Icons. On their website, you can download their free set with 16 icons, or you can purchase the entire set with 146 icons for only $12!

Client:
                                    Start Bootstrap

Date:
                                    April 2014

Service:
                                    Web Development

                            <button type="button" class="btn btn-default" data-dismiss="modal"> Close</button>

Project Title

Use this area of the page to describe your project. The icon above is part of a free icon set by Flat Icons. On their website, you can download their free set with 16 icons, or you can purchase the entire set with 146 icons for only $12!

Client:
                                    Start Bootstrap

Date:
                                    April 2014

Service:
                                    Web Development

                            <button type="button" class="btn btn-default" data-dismiss="modal"> Close</button>

Project Title

Use this area of the page to describe your project. The icon above is part of a free icon set by Flat Icons. On their website, you can download their free set with 16 icons, or you can purchase the entire set with 146 icons for only $12!

Client:
                                    Start Bootstrap

Date:
                                    April 2014

Service:
                                    Web Development

                            <button type="button" class="btn btn-default" data-dismiss="modal"> Close</button>

Project Title

Use this area of the page to describe your project. The icon above is part of a free icon set by Flat Icons. On their website, you can download their free set with 16 icons, or you can purchase the entire set with 146 icons for only $12!

Client:
                                    Start Bootstrap

Date:
                                    April 2014

Service:
                                    Web Development

                            <button type="button" class="btn btn-default" data-dismiss="modal"> Close</button>

Project Title

Use this area of the page to describe your project. The icon above is part of a free icon set by Flat Icons. On their website, you can download their free set with 16 icons, or you can purchase the entire set with 146 icons for only $12!

Client:
                                    Start Bootstrap

Date:
                                    April 2014

Service:
                                    Web Development

                            <button type="button" class="btn btn-default" data-dismiss="modal"> Close</button>


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="wrap_content"
    android:layout_gravity="center"
    android:orientation="horizontal">

    <TextView
        android:id="@+id/vp_btn_1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:drawablePadding="3dp"
        android:textColor="#b3b3b3"
        android:textSize="14sp"
        android:gravity="center"/>

    <TextView
        android:id="@+id/vp_btn_2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:drawablePadding="3dp"
        android:textColor="#b3b3b3"
        android:textSize="14sp"
        android:gravity="center" />

    <TextView
        android:id="@+id/vp_btn_3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:drawablePadding="3dp"
        android:textColor="#b3b3b3"
        android:textSize="14sp"
        android:gravity="center" />

    <TextView
        android:id="@+id/vp_btn_4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:drawablePadding="3dp"
        android:layout_weight="1"
        android:textColor="#b3b3b3"
        android:textSize="14sp"
        android:gravity="center" />

</LinearLayout>


text:
import React, { PureComponent } from 'react';
import './App.css';

import HomePage from './components/HomePage';

class App extends PureComponent {
    render() {
        return (
            <div className="App">
                <HomePage />
            </div>
        );
    }
}

export default App;


text:
/** @file */	// Doxygen marker

#define KM_FALSE 0
#define KM_TRUE 1
#define kmScalar float

/** A three-dimensional vector. */
typedef struct kmVec3 {
	kmScalar x;
	kmScalar y;
	kmScalar z;
} kmVec3;

/** A homogeneous four-dimensional vector. */
typedef struct kmVec4 {
	kmScalar x;
	kmScalar y;
	kmScalar z;
	kmScalar w;
} kmVec4;

/** A rotational quaternion */
typedef struct kmQuaternion {
	kmScalar x;
	kmScalar y;
	kmScalar z;
	kmScalar w;
} kmQuaternion;

/** A standard 4x4 matrix */
typedef struct {
	kmScalar mat[16];
} kmMat4;

/** Returns a kmVec3 structure constructed from the vector components. */
kmVec3 kmVec3Make(kmScalar x, kmScalar y, kmScalar z);

/** Returns the length of the vector. */
kmScalar kmVec3Length(const kmVec3* pIn);

/** Normalizes the vector to unit length, stores the result in pOut and returns the result. */
kmVec3* kmVec3Normalize(kmVec3* pOut, const kmVec3* pIn);

/** Multiplies pM1 with pM2, stores the result in pOut, returns pOut. */
kmMat4* kmMat4Multiply(kmMat4* pOut, const kmMat4* pM1, const kmMat4* pM2);

/**
 * Builds a rotation matrix that rotates around all three axes, y (yaw), x (pitch) and z (roll),
 * in that order, stores the result in pOut and returns the result.
 * This algorithm matches up along the positive Y axis, which is the OpenGL ES default.
 */
kmMat4* kmMat4RotationYXZ(kmMat4* pOut, const kmScalar xRadians, const kmScalar yRadians, const kmScalar zRadians);

/**
 * Builds a rotation matrix that rotates around all three axes z (roll), y (yaw), and x (pitch),
 * in that order, stores the result in pOut and returns the result
 * This algorithm matches up along the positive Z axis, which is used by some commercial 3D worlds.
 */
kmMat4* kmMat4RotationZYX(kmMat4* pOut, const kmScalar xRadians, const kmScalar yRadians, const kmScalar zRadians);

/** Builds a rotation matrix around the X-axis, stores the result in pOut and returns the result */
kmMat4* kmMat4RotationX(kmMat4* pOut, const float radians);

/** Builds a rotation matrix around the Y-axis, stores the result in pOut and returns the result */
kmMat4* kmMat4RotationY(kmMat4* pOut, const float radians);

/** Builds a rotation matrix around the Z-axis, stores the result in pOut and returns the result */
kmMat4* kmMat4RotationZ(kmMat4* pOut, const float radians);

/**
 * Build a rotation matrix from an axis and an angle,
 * stores the result in pOut and returns the result.
 */
kmMat4* kmMat4RotationAxisAngle(kmMat4* pOut, const kmVec3* axis, kmScalar radians);

/**
 * Builds a rotation matrix from a quaternion to a rotation matrix,
 * stores the result in pOut and returns the result.
 */
kmMat4* kmMat4RotationQuaternion(kmMat4* pOut, const kmQuaternion* pQ);

/** Extracts a quaternion from a rotation matrix, stores the result in quat and returns the result */
kmQuaternion* kmQuaternionRotationMatrix(kmQuaternion* quat, const kmMat4* pIn);

/**
 * Builds a transformation matrix that translates, rotates and scales according to the specified vectors,
 * stores the result in pOut and returns the result.
 */
kmMat4* kmMat4Transformation(kmMat4* pOut, const kmVec3 translation, const kmVec3 rotation, const kmVec3 scale);

/** Gauss-Jordan matrix inversion function */
int kmGaussJordan(kmMat4 *a, kmMat4 *b);

/** Get the value from the matrix at the specfied row and column. */
float kmMatGet(const kmMat4* pIn, int row, int col);

/** Set the value into the matrix at the specfied row and column. */
void kmMatSet(kmMat4 * pIn, int row, int col, float value);

/** Swap the elements in the matrix at the specfied row and column coordinates. */
void kmMatSwap(kmMat4 * pIn, int r1, int c1, int r2, int c2);


text:
using System;
using System.Runtime.InteropServices;
using NMockito;
using Xunit;

namespace Dargon.Services {
   public class RemoteServiceClientContainerTests : NMockitoInstance {
      private const string kInterfaceGuid = "FD2B6CF5-6385-4956-B17D-3940741749D3";

      [Mock] private readonly RemoteServiceProxyContainer remoteServiceProxyContainer = null;

      [Fact]
      public void GetService_WithGuidlessInterface_DelegatesToRemoteServiceProxyContainerTest() {
         AssertThrows<ArgumentException>(() => remoteServiceProxyContainer.GetService<GuidlessInterface>());

         VerifyNoMoreInteractions();
      }

      [Fact]
      public void GetService_WithGuidfulInterface_DelegatesToRemoteServiceProxyContainerTest() {
         var expectedService = CreatePlaceholder<GuidfulInterface>();

         When(remoteServiceProxyContainer.GetService<GuidfulInterface>(Guid.Parse(kInterfaceGuid))).ThenReturn(expectedService);

         var actualService = remoteServiceProxyContainer.GetService<GuidfulInterface>();

         Verify(remoteServiceProxyContainer).GetService<GuidfulInterface>(Guid.Parse(kInterfaceGuid));
         VerifyNoMoreInteractions();

         AssertEquals(expectedService, actualService);
      }

      public interface GuidlessInterface { }

      [Guid(kInterfaceGuid)]
      public interface GuidfulInterface { }
   }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
	Licensed to the Apache Software Foundation (ASF) under one
	or more contributor license agreements. See the NOTICE file
	distributed with this work for additional information
	regarding copyright ownership. The ASF licenses this file
	to you under the Apache License, Version 2.0 (the
	"License"); you may not use this file except in compliance
	with the License. You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

	Unless required by applicable law or agreed to in writing,
	software distributed under the License is distributed on an
	"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
	KIND, either express or implied. See the License for the
	specific language governing permissions and limitations
	under the License.
-->

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:broker="http://activemq.apache.org/schema/core"
	xsi:schemaLocation="
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
		http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
		http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">

    <!-- Camel Context configuration -->
    <routeContext id="RouteTemplateContext" xmlns="http://camel.apache.org/schema/spring">
    	<route id="RouteTemplate" autoStartup="false">
    	   <from uri="direct:foo"/>
		       <to uri="direct:bar"/>
    	</route>
    </routeContext>

    <bean id="routeMutationProcessor" class="lab.examples.zookeeper.demo.RouteMutationProcessor">
    	<property name="camelContext" ref="demoCamelContext"/>
    	<property name="zookeeperConnector" ref="zookeeperConnector"/>
    </bean>

    <bean id="zookeeperConnector" class="lab.examples.zookeeper.demo.ZooKeeperConnector">
    	<property name="hosts" value="${zookeeperURL}"/>
    </bean>

    <camelContext id="demoCamelContext" xmlns="http://camel.apache.org/schema/spring">
        <route id="zookeeper-route">
    	   <from uri="zookeeper://localhost:2181/DEMO?repeat=true&listChildren=true"/>
		       <process ref="routeMutationProcessor"/>
    	</route>
    </camelContext>

	<!-- Two ActiveMQ Broker Configurations -->
	<bean name="activemq1" class="org.apache.camel.component.jms.JmsComponent">
		<property name="connectionFactory">
			<bean class="org.apache.activemq.ActiveMQConnectionFactory">
				<property name="brokerURL" value="${broker1URL}" />
				<property name="userName" value="admin" />
				<property name="password" value="admin" />
				<property name="copyMessageOnSend" value="false"/>
				<property name="useAsyncSend" value="true"/>
			</bean>
		</property>
	</bean>

	<bean name="activemq2" class="org.apache.camel.component.jms.JmsComponent">
		<property name="connectionFactory">
			<bean class="org.apache.activemq.ActiveMQConnectionFactory">
				<property name="brokerURL" value="${broker2URL}" />
				<property name="userName" value="admin" />
				<property name="password" value="admin" />
				<property name="copyMessageOnSend" value="false"/>
				<property name="useAsyncSend" value="true"/>
			</bean>
		</property>
	</bean>

</beans>


text:
var CHANNELS = 2;
var BUFFER_SIZE = 1024;
function Crusher (ctx, options) {
  var module = this;
  var proc = ctx.createScriptProcessor(BUFFER_SIZE, CHANNELS, CHANNELS);
  this.input = this.output = proc;
  this.depth = 1;
  proc.onaudioprocess = function (e) {
    for (var i = 0; i < CHANNELS; i++) {
      crush(e.inputBuffer.getChannelData(i), e.outputBuffer.getChannelData(i), module.depth);
    }
  };
}

Crusher.prototype.connect = function (node) {
  this.output.connect(node);
};

function round (f) { return f > 0 ? Math.floor(f + 0.5) : Math.ceil(f - 0.5); }

function crush (input, output, depth) {
  var max = Math.pow(2, depth);
  for (var i = 0; i < input.length; i++) {
    output[i] = round((input[i] + 1) * max) / max - 1;
  }
}

module.exports = Crusher;


text:
package com.vipshop.microscope.storage;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.io.hfile.Compression.Algorithm;
import org.apache.hadoop.hbase.util.Bytes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.hadoop.hbase.HbaseTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.io.IOException;
import java.util.NavigableMap;

@Component
public abstract class AbstractRepository implements InitializingBean {

    private static final Logger logger = LoggerFactory.getLogger(AbstractRepository.class);

    public static final int TIME_TO_LIVE = 2 * 7 * 24 * 60 * 60;

    @Resource(name = "hbaseConfiguration")
    protected Configuration config;

    @Autowired
    protected HbaseTemplate hbaseTemplate;

    protected HBaseAdmin admin;

    @Override
    public void afterPropertiesSet() throws Exception {
        admin = new HBaseAdmin(config);
    }

    /**
     * Create HBase table
     *
     * @param table the name of table
     * @param cf    the name of column family
     */
    protected void create(String table, String cf) {
        try {
            if (!admin.tableExists(table)) {
                HTableDescriptor tableDescriptor = new HTableDescriptor(table);
                HColumnDescriptor columnDescriptor = new HColumnDescriptor(cf);
                columnDescriptor.setMaxVersions(1);
                columnDescriptor.setCompressionType(Algorithm.SNAPPY);
                columnDescriptor.setTimeToLive(TIME_TO_LIVE);
                tableDescriptor.addFamily(columnDescriptor);
                admin.createTable(tableDescriptor);

				/*
                 * close auto flush function.
				 */
                hbaseTemplate.setAutoFlush(false);

                logger.info("create HBase table " + table);
            }
        } catch (IOException e) {
            throw new RuntimeException("error happens when create " + table, e);
        }
    }

    /**
     * Create HBase table
     *
     * @param table the name of table
     * @param cf    the name of column family
     */
    protected void create(String table, String[] cf) {
        try {
            if (!admin.tableExists(table)) {
                HTableDescriptor tableDescriptor = new HTableDescriptor(table);
                for (int i = 0; i < cf.length; i++) {
                    HColumnDescriptor columnDescriptor = new HColumnDescriptor(cf[i]);
                    columnDescriptor.setMaxVersions(1);
                    columnDescriptor.setCompressionType(Algorithm.SNAPPY);
                    columnDescriptor.setTimeToLive(TIME_TO_LIVE);
                    tableDescriptor.addFamily(columnDescriptor);
                }
                admin.createTable(tableDescriptor);
                hbaseTemplate.setAutoFlush(false);

                logger.info("create HBase table " + table);
            }
        } catch (IOException e) {
            throw new RuntimeException("error happens when create " + table, e);
        }
    }

    /**
     * Drop HBase table
     *
     * @param table the name of table
     */
    protected void drop(String table) {
        byte[] tableNameAsBytes = Bytes.toBytes(table);
        try {
            if (!admin.isTableDisabled(tableNameAsBytes)) {
                admin.disableTable(tableNameAsBytes);
            }
            admin.deleteTable(tableNameAsBytes);

            logger.info("drop HBase table " + table);
        } catch (IOException e) {
            throw new RuntimeException("error happens when drop " + table, e);
        }
    }

    /**
     * Get all columns by column family
     *
     * @param r            row result
     * @param ColumnFamily the name of column family
     * @return             columns in array format
     */
    protected String[] getColumnsInColumnFamily(Result r, String ColumnFamily) {
        NavigableMap<byte[], byte[]> familyMap = r.getFamilyMap(Bytes.toBytes(ColumnFamily));
        String[] qualifiers = new String[familyMap.size()];
        int counter = 0;
        for (byte[] qualifier : familyMap.keySet()) {
            qualifiers[counter++] = Bytes.toString(qualifier);
        }
        return qualifiers;
    }

    /**
     * Return Configuration
     *
     * @return config
     */
    public Configuration getConfiguration() {
        return config;
    }

}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mycographia seu Icones Fungorum (London), Vol. <b>1</b>. Discomycetes fig. 123 (1876)

#### Original name
Peziza gregaria Rehm

### Remarks
null


text:
<?php

namespace Gettext;

/**
 * Class to manage a translation string.
 */
class Translation
{
    protected $context;
    protected $original;
    protected $translation = '';
    protected $plural;
    protected $pluralTranslation = array();
    protected $references = array();
    protected $comments = array();
    protected $extractedComments = array();
    protected $flags = array();
    protected $translationCount;

    /**
     * Generates the id of a translation (context + glue + original).
     *
     * @param string $context
     * @param string $original
     *
     * @return string
     */
    public static function generateId($context, $original)
    {
        return "{$context}\004{$original}";
    }

    /**
     * Construct.
     *
     * @param string $context  The context of the translation
     * @param string $original The original string
     * @param string $plural   The original plural string
     */
    public function __construct($context, $original, $plural = '')
    {
        $this->context = (string) $context;
        $this->original = (string) $original;

        $this->setPlural($plural);
    }

    /**
     * Clones this translation.
     *
     * @param null|string $context  Optional new context
     * @param null|string $original Optional new original
     */
    public function getClone($context = null, $original = null)
    {
        $new = clone $this;

        if ($context !== null) {
            $new->context = (string) $context;
        }

        if ($original !== null) {
            $new->original = (string) $original;
        }

        return $new;
    }

    /**
     * Returns the id of this translation.
     *
     * @return string
     */
    public function getId()
    {
        return static::generateId($this->context, $this->original);
    }

    /**
     * Checks whether the translation matches with the arguments.
     *
     * @param string $context
     * @param string $original
     *
     * @return bool
     */
    public function is($context, $original = '')
    {
        return (($this->context === $context) && ($this->original === $original)) ? true : false;
    }

    /**
     * Gets the original string.
     *
     * @return string
     */
    public function getOriginal()
    {
        return $this->original;
    }

    /**
     * Checks if the original string is empty or not.
     *
     * @return bool
     */
    public function hasOriginal()
    {
        return ($this->original !== '') ? true : false;
    }

    /**
     * Sets the translation string.
     *
     * @param string $translation
     */
    public function setTranslation($translation)
    {
        $this->translation = (string) $translation;
    }

    /**
     * Gets the translation string.
     *
     * @return string
     */
    public function getTranslation()
    {
        return $this->translation;
    }

    /**
     * Checks if the translation string is empty or not.
     *
     * @return bool
     */
    public function hasTranslation()
    {
        return ($this->translation !== '') ? true : false;
    }

    /**
     * Sets the plural translation string.
     *
     * @param string $plural
     */
    public function setPlural($plural)
    {
        $this->plural = (string) $plural;

        $this->normalizeTranslationCount();
    }

    /**
     * Gets the plural translation string.
     *
     * @return string
     */
    public function getPlural()
    {
        return $this->plural;
    }

    /**
     * Checks if the plural translation string is empty or not.
     *
     * @return bool
     */
    public function hasPlural()
    {
        return ($this->plural !== '') ? true : false;
    }

    /**
     * Set a new plural translation.
     *
     * @param string $plural The plural string to add
     * @param int    $key    The key of the plural translation.
     */
    public function setPluralTranslation($plural, $key = 0)
    {
        $this->pluralTranslation[$key] = $plural;
        $this->normalizeTranslationCount();
    }

    /**
     * Gets one or all plural translations.
     *
     * @param int|null $key The key to return. If is null, return all translations
     *
     * @return string|array
     */
    public function getPluralTranslation($key = null)
    {
        if ($key === null) {
            return $this->pluralTranslation;
        }

        return isset($this->pluralTranslation[$key]) ? (string) $this->pluralTranslation[$key] : '';
    }

    /**
     * Checks if there are any plural translation.
     *
     * @return bool
     */
    public function hasPluralTranslation()
    {
        return implode('', $this->pluralTranslation) !== '';
    }

    /**
     * Removes all plural translations.
     */
    public function deletePluralTranslation()
    {
        $this->pluralTranslation = array();

        $this->normalizeTranslationCount();
    }

    /**
     * Set the number of singular + plural translations allowed.
     *
     * @param int $count
     */
    public function setTranslationCount($count)
    {
        $this->translationCount = is_null($count) ? null : intval($count);

        $this->normalizeTranslationCount();
    }

    /**
     * Returns the number of singular + plural translations
     * Returns null if this Translation is not a plural one.
     *
     * @return int|null
     */
    public function getTranslationCount()
    {
        return $this->hasPlural() ? $this->translationCount : null;
    }

    /**
     * Normalizes the translation count.
     */
    protected function normalizeTranslationCount()
    {
        if ($this->translationCount === null) {
            return;
        }

        if ($this->hasPlural()) {
            $allowed = $this->translationCount - 1;
            $current = count($this->pluralTranslation);

            if ($allowed > $current) {
                $this->pluralTranslation = $this->pluralTranslation + array_fill(0, $allowed, '');
            } elseif ($current > $allowed) {
                $this->pluralTranslation = array_slice($this->pluralTranslation, 0, $allowed);
            }
        } else {
            $this->pluralTranslation = array();
        }
    }

    /**
     * Gets the context of this translation.
     *
     * @return string
     */
    public function getContext()
    {
        return $this->context;
    }

    /**
     * Checks if the context is empty or not.
     *
     * @return bool
     */
    public function hasContext()
    {
        return (isset($this->context) && ($this->context !== '')) ? true : false;
    }

    /**
     * Adds a new reference for this translation.
     *
     * @param string   $filename The file path where the translation has been found
     * @param null|int $line     The line number where the translation has been found
     */
    public function addReference($filename, $line = null)
    {
        $key = "{$filename}:{$line}";
        $this->references[$key] = array($filename, $line);
    }

    /**
     * Checks if the translation has any reference.
     *
     * @return bool
     */
    public function hasReferences()
    {
        return !empty($this->references);
    }

    /**
     * Return all references for this translation.
     *
     * @return array
     */
    public function getReferences()
    {
        return array_values($this->references);
    }

    /**
     * Removes all references.
     */
    public function deleteReferences()
    {
        $this->references = array();
    }

    /**
     * Adds a new comment for this translation.
     *
     * @param string $comment
     */
    public function addComment($comment)
    {
        $this->comments[] = $comment;
    }

    /**
     * Checks if the translation has any comment.
     *
     * @return bool
     */
    public function hasComments()
    {
        return isset($this->comments[0]);
    }

    /**
     * Returns all comments for this translation.
     *
     * @return array
     */
    public function getComments()
    {
        return $this->comments;
    }

    /**
     * Removes all comments.
     */
    public function deleteComments()
    {
        $this->comments = array();
    }

    /**
     * Adds a new extracted comment for this translation.
     *
     * @param string $comment
     */
    public function addExtractedComment($comment)
    {
        $this->extractedComments[] = $comment;
    }

    /**
     * Checks if the translation has any extracted comment.
     *
     * @return bool
     */
    public function hasExtractedComments()
    {
        return isset($this->extractedComments[0]);
    }

    /**
     * Returns all extracted comments for this translation.
     *
     * @return array
     */
    public function getExtractedComments()
    {
        return $this->extractedComments;
    }

    /**
     * Removes all extracted comments.
     */
    public function deleteExtractedComments()
    {
        $this->extractedComments = array();
    }

    /**
     * Adds a new flat for this translation.
     *
     * @param string $flag
     */
    public function addFlag($flag)
    {
        $this->flags[] = $flag;
    }

    /**
     * Checks if the translation has any flag.
     *
     * @return bool
     */
    public function hasFlags()
    {
        return isset($this->flags[0]);
    }

    /**
     * Returns all extracted flags for this translation.
     *
     * @return array
     */
    public function getFlags()
    {
        return $this->flags;
    }

    /**
     * Removes all flags.
     */
    public function deleteFlags()
    {
        $this->flags = array();
    }

    /**
     * Merges this translation with other translation.
     *
     * @param Translation $translation The translation to merge with
     * @param int|null    $method      One or various Translations::MERGE_* constants to define how to merge the translations
     */
    public function mergeWith(Translation $translation, $method = null)
    {
        if ($method === null) {
            $method = Translations::$mergeDefault;
        }

        if (!$this->hasTranslation() || ($translation->hasTranslation() && ($method & Translations::MERGE_OVERRIDE))) {
            $this->setTranslation($translation->getTranslation());
        }

        if (($method & Translations::MERGE_PLURAL) && !$this->hasPlural()) {
            $this->setPlural($translation->getPlural());
        }

        if ($this->hasPlural() && !$this->hasPluralTranslation() && $translation->hasPluralTranslation()) {
            $this->pluralTranslation = $translation->getPluralTranslation();
        }

        if ($method & Translations::MERGE_REFERENCES) {
            foreach ($translation->getReferences() as $reference) {
                $this->addReference($reference[0], $reference[1]);
            }
        }

        if ($method & Translations::MERGE_COMMENTS) {
            $this->comments = array_values(array_unique(array_merge($translation->getComments(), $this->comments)));
            $this->extractedComments = array_values(array_unique(array_merge($translation->getExtractedComments(), $this->extractedComments)));
            $this->flags = array_values(array_unique(array_merge($translation->getFlags(), $this->flags)));
        }
    }
}


text:
<link href="<?php echo base_url(); ?>assets/css/bootstrap-combined.no-icons.min.css" rel="stylesheet" />
    <link href="<?php echo base_url(); ?>assets/css/style1.css" rel="stylesheet" />

    <link href="<?php echo base_url(); ?>assets/playermusic/css/jplayer.blue.monday.min.css" rel="stylesheet" />
    <link href="<?php echo base_url(); ?>assets/css/landing_page/landing_page11.css" rel="stylesheet" />
    <link href="<?php echo base_url(); ?>assets/css/landing_page/style05.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/dist/viewer.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/dist/css/main.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/animate.min.css">

    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/jquery.mCustomScrollbar.css">

                <?php if (!empty($users[0]->banner_image)) {?>
                <img align="left" class="My-image-lg" src="<?php echo base_url(); ?>uploads/<?php echo $users[0]->id; ?>/photo/banner/<?php echo $users[0]->banner_image; ?>" alt="Profile image example" style="width: 100%"/>
                <?php }?>
                <img align="left" class="My-image-profile thumbnail n5style" src="<?php echo $this->M_user->get_avata_flp($users[0]->id); ?>" alt="Profile image example"/>

<?php echo ucfirst($name); ?>

                        <a href="<?php echo $users[0]->facebook_username; ?>">
                        <a href="<?php echo $users[0]->twitter_username; ?>">
                        <a href="<?php echo $users[0]->instagram_username; ?>">
                        <a href="<?php echo $users[0]->youtube_username; ?>">

<img class="icon_part" src="<?php echo base_url(); ?>assets/images/icon/music_note.png" /> AMP

                                <?php echo $this->M_audio_song->get_shortcode_AMP($id); ?>

<a href="<?php echo base_url('artist/allblogs') . '/' . $id; ?>"><img class="icon_part" src="<?php echo base_url(); ?>assets/images/icon/music_note.png" /> RECENT BLOGS

                                <?php foreach ($blogs as $row) {
    ?>

                                         <img class="img-responsive" src="<?php echo base_url('uploads/' . $row['user_id'] . '/photo/blogs/' . $row['image_rep']); ?>"  alt=""/>

                                           <a style="color:rgb(107,101,101);" href="<?php echo base_url('artist/blogs') . '/' . $user_data['id']; ?>">
<?php echo $row['title']; ?>

 <?php echo date('M d, Y', $row['time']); ?>

                                                 <?php echo $this->M_user->get_name($row['user_id']); ?>
                                                 <?php echo $row['blog_comments_count']; ?>

<?php

    $text = strip_tags($row['introduction']);
    $desLength = strlen($text);
    //var_dump($desLength);exit;
    $stringMaxLength = 120;
    if ($desLength > $stringMaxLength) {
        $des = substr($text, 0, $stringMaxLength);
        $text = $des . '...';
        echo $text;
    } else {
        echo $row['introduction'];
    }?>

                                    <?php }?>

<img class="icon_part" src="<?php echo base_url(); ?>assets/images/icon/music_note.png"/>Member

                                <?php if (isset($members) && count($members) > 0) {
    ?>
                                    <?php foreach ($members as $member) {

        ?>

                                          <?=$member['type'];?>

                                        <?php foreach ($member['data'] as $value) {

            ?>

<?php echo $value['name_member']; ?>

<?php echo $value['contribution']; ?>

                                              <img src="<?php echo base_url(); ?>uploads/<?php echo $value['artist_id']; ?>/image_member/<?php echo $value['member_image']; ?>"  height="200" alt="" />

                                          <?php }?>

                                      <?php }} else {?>
                                      No content have been added in this section yet.
                                      <?php }?>

<a href="<?php echo base_url('photos'); ?>"><img class="icon_part"  src="<?php echo base_url(); ?>assets/images/icon/music_note.png"/>PHOTOS

                                <?php $count = count($photos);
if ($count) {
    $i = 0;
    foreach ($photos as $pt) {
        ?>

                                                <img class="img-responsive portfolio-item"  src="<?php echo base_url(); ?>uploads/<?php echo $pt['user_id']; ?>/photo/<?php echo $pt['filename']; ?>" alt="">

                                        <?php

    }} else {
    ?>

                                                <img class="img-responsive portfolio-item" src="<?php echo base_url(); ?>assets/images/default-img.gif" alt="">

                                                <img class="img-responsive portfolio-item" src="<?php echo base_url(); ?>assets/images/default-img.gif" alt="">

                                                <img class="img-responsive portfolio-item" style="min-height:50px;" src="<?php echo base_url(); ?>assets/images/default-img.gif" alt="">

                                        <?php }?>

<img class="icon_part" src="<?php echo base_url(); ?>assets/images/icon/music_note.png"/>STATS

 Song Plays<?php echo $num_songs; ?>

 Video Plays<?php echo $num_videos; ?>

 Total Fans<?php echo $num_fands; ?>

 Total Events<?php echo $num_events; ?>

 Total Blogs<?php echo $num_blogs; ?>

 Total Comments<?php echo $num_comments; ?>

<a href="<?php echo base_url('artist/allvideos') . '/' . $id; ?>"><img class="icon_part" src="<?php echo base_url(); ?>assets/images/icon/music_note.png"/>VIDEOS

                                        <?php foreach ($videos as $video) {
    if ($video['type'] == 'file') {$link_video = base_url() . 'uploads/' . $video['user_id'] . '/video/' . $video['name_file'];} elseif ($video['type'] == 'link') {$link_video = $video['link_video'];} elseif ($video['type'] == 'link-vimeo') {
        $video_vimeo = basename($video['link_video']);
        $get_link = 'http://vimeo.com/api/v2/video/' . $video_vimeo . '.php';

        $hash = unserialize(file_get_contents($get_link));
        $url_id = $hash[0]['id'];
        $link_video = 'https://player.vimeo.com/video/' . $url_id . '?title=0&byline=0&portrait=0';}?>

                                                       <img class="img-responsive portfolio-item" src="<?=$this->M_video->get_image_video($video['id']);?>"  alt="">
                                                       <?php if (($video['type'] == 'file') || ($video['type'] == 'link')) {?>
                                                       <span class="fa fa-play-circle-o vidcle5style" href="#videos" onclick="javascript:playvideo(<?php echo "'" . $link_video . "'"; ?>,$(this))" data-toggle="modal" data-target="#videos" >
                                                       <?php } else {?>
                                                       <span class="fa fa-play-circle-o vidcle5style" href="#vimeo_videos" onclick="javascript:play_vimeo_video(<?php echo "'" . $link_video . "'"; ?>,$(this))" data-toggle="modal" data-target="#vimeo_videos">
                                                       <?php }?>

                                               <?php

}?>

<img class="icon_part" src="<?php echo base_url(); ?>assets/images/icon/music_note.png"/>QUICK ACTIONS

                                                Share

                                                <?php $home_page = $this->uri->segment(1);
if ($home_page == 'amp') {
    $home_page = $this->uri->segment(2);
}
$results = $this->db->where('home_page', $home_page)->get('users')->result_array();
foreach ($results as $result) {$user_i = $result['id'];}
$isset = $this->db->where('user_id', $user_i)->where('fan_id', $user_id)->get('fans')->num_rows();
?>
                                                <a href="<?php if ($isset > 0) {echo '#';} else {echo base_url() . 'artist/comefan/' . $user_id . '/' . $home_page;}?>" class="quickcl" style="<?php if ($isset > 0) {
    echo 'cursor: no-drop;';
}?>"> Become A Fan

                                        <?php
if ($users[0]->id != $user_data['id']) {
    ?>

                                                Add Contact Chat

                                            <?php
}
?>

<img class="icon_part" src="<?php echo base_url(); ?>assets/images/icon/music_note.png"/>COMMENTS

                                    <?php foreach ($comments as $comment) {
    ?>
                                        <?php $role = $this->M_user->get_user_role($comment['client']);
    ?>

<?php echo date('d M Y', strtotime($comment['time'])); ?>

                                          <img class="media-object" src="<?php if ($role == '1') {echo $this->M_user->get_avata($comment['client']);} else {echo $this->M_user->get_avata_flp($comment['client']);}?>" width="40" height="40" alt="">

<a href="<?php echo $this->M_user->get_home_page($comment['client']); ?>"><?php echo $this->M_user->get_name($comment['client']); ?>

                                          <?php echo ucfirst($comment['comment']); ?>

                                  <?php }?>

                                comments

<img class="icon_part" src="<?php echo base_url(); ?>assets/images/icon/music_note.png"/>fan

                           <?php if (isset($fans) && count($fans) > 0) {
    ?>
                                                <?php $i = 0;foreach ($fans as $fan) {
        if ($fan['role'] == 1) {
            $avata = $this->M_user->get_avata($fan['fan_id']);
            $home_page_url = base_url() . $fan['home_page'];
        } else {
            $avata = $this->M_user->get_avata_flp($fan['fan_id']);
            $home_page_url = base_url() . 'amp/' . $fan['home_page'];
        }
        ?>

                                    <img src="<?php echo $avata; ?>" height="100" alt="Image"
                                    class="img-circle img-responsive" />

                                        <a href="<?=$home_page_url;?>"><?php echo $this->M_user->get_name($fan['fan_id']); ?>

                                <?php }}?>

<img class="icon_part" src="<?php echo base_url(); ?>assets/images/icon/music_note.png" />Events

                        <?php if (isset($events) && count($events) > 0) {?>
                        <?php foreach ($events as $event) {?>

                              <img src="<?php if (!empty($event['event_banner'])) {echo base_url() . 'uploads/' . $event['user_id'] . '/photo/banner_events/' . $event['event_banner'];}?>" height="200" style="width: 100%">

<a href="<?=base_url('gigs_events/read/' . strtolower(str_replace(' ', '-', $event['event_title'])) . '-' . $event['event_id']);?>"><?php echo ucfirst($event['event_title']); ?>

<?php custom_echo_html($event['event_desc'], 400);?>

                      <?php }}?>

                    <button type="button" class="close" data-dismiss="modal">×Close</button>

Add Comment

                    Start Date:
                    End Date:

                    Post By:

                    Location:

                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>

                <form class="" action="<?php echo base_url() . 'artist/membercomment'; ?>" method="post">
                    <input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
                    <input type="hidden" name="id_artist" value="<?=$id;?>" />

                        <button type="button" class="close" data-dismiss="modal">×Close</button>

Add Comment

                            Comment

                                <textarea class="form-control" name="comment" rows="6" required="" ></textarea>

                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <button type="submit" class="btn btn-default">Add</button>

                </form>

                    <button type="button" class="close" data-dismiss="modal">×Close</button>

Invite Contact (<?=$this->M_user->get_name($users['0']->id);?>)

                <form class="form form-signup" action="<?php echo base_url(); ?>chat/invite_contact" method="post"  >
                    <input type="hidden" name="<?=$this->security->get_csrf_token_name();?>" value="<?=$this->security->get_csrf_hash();?>" />

                            Messages

                                <input type="hidden" name ="user_invite" value="<?php echo $user_data['id']; ?>" />
                                <input type="hidden" name ="user_to" id="user_id2" value="<?php echo $users['0']->id; ?>" />
                                <textarea class="form-control" rows="5" name="messages_invite">Hi <?=$this->M_user->get_name($users['0']->id);?>, I'd like to add you as a contact.</textarea>

                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <button type="submit" class="btn btn-primary">Add to Contacts</button>

                </form>

            <img src="<?php echo base_url(); ?>assets/images/adaptable.jpg" width="500" height="400"/>


text:
namespace EyeInTheSky.Services
{
    using System.IO;
    using EyeInTheSky.Services.Interfaces;

    public class FileService : IFileService
    {
        public bool FileExists(string path)
        {
            return new FileInfo(path).Exists;
        }

        public Stream GetWritableStream(string path)
        {
            return new FileStream(path, FileMode.Create, FileAccess.ReadWrite);
        }

        public Stream GetReadableStream(string path)
        {
            return new FileStream(path, FileMode.Open, FileAccess.Read);
        }
    }
}


text:
var _foo = new WeakMap();

var Foo = /*#__PURE__*/function () {
  "use strict";

  function Foo() {
    babelHelpers.classCallCheck(this, Foo);

    _foo.set(this, {
      writable: true,
      value: 1
    });
  }

  babelHelpers.createClass(Foo, [{
    key: "test",
    value: function test() {
      var _temp;

      var _babelHelpers$classPr;

      var _foo2 = new WeakMap();

      var Nested = /*#__PURE__*/function (_ref) {
        babelHelpers.inherits(Nested, _ref);

        var _super = babelHelpers.createSuper(Nested);

        function Nested(...args) {
          var _this;

          babelHelpers.classCallCheck(this, Nested);
          _this = _super.call(this, ...args);

          _foo2.set(babelHelpers.assertThisInitialized(_this), {
            writable: true,
            value: 3
          });

          return _this;
        }

        return Nested;
      }((_temp = (_babelHelpers$classPr = babelHelpers.classPrivateFieldGet(this, _foo), /*#__PURE__*/function () {
        function _class2() {
          babelHelpers.classCallCheck(this, _class2);
          babelHelpers.defineProperty(this, _babelHelpers$classPr, 2);
        }

        return _class2;
      }()), _temp));
    }
  }]);
  return Foo;
}();


text:
"""A tff.aggregator for implementing top-k sparsity."""
import collections

import tensorflow as tf
import tensorflow_federated as tff

class TopKFactory(tff.aggregators.UnweightedAggregationFactory):
  """Aggregator that implements top-k sparsity.

  Expects `value_type` to be a `TensorType`.

  Paper: https://arxiv.org/abs/1704.05021
  """

  def __init__(self, fraction_to_select):
    """Initializer for TopKFactory.

    Args:
      fraction_to_select: What fraction of elements to select on each client,
        within range (0.0, 1.0].
    """
    if fraction_to_select <= 0.0 or fraction_to_select > 1.0:
      raise ValueError("Expect 0.0 < fraction_to_select <= 1.0, found "
                       f"{fraction_to_select}.")
    self._fraction_to_select = fraction_to_select

  def create(self, value_type):
    if not tff.types.is_structure_of_floats(
        value_type) or not value_type.is_tensor():
      raise ValueError("Expect value_type to be a float tensor, "
                       f"found {value_type}.")

    @tff.tf_computation
    def decode(encoded_value):
      values, indices = encoded_value
      indices = tf.expand_dims(indices, 1)
      decoded_value = tf.scatter_nd(indices, values, value_type.shape)
      return decoded_value

    @tff.tf_computation(value_type)
    def encode(value):
      value_size = tf.size(value, out_type=tf.float32)
      k_size = tf.cast(tf.math.ceil(self._fraction_to_select * value_size),
                       tf.int32)
      _, topk_indices = tf.math.top_k(tf.abs(value), k=k_size, sorted=False)
      topk_values = tf.gather(value, topk_indices)

      encoded_value = (topk_values, topk_indices)
      index_bits = tf.math.ceil(tf.math.log(value_size) / tf.math.log(2.))
      bitrate = (tf.cast(k_size, tf.float32) * 32. + index_bits) / value_size

      decoded_value = decode(encoded_value)
      distortion = tf.reduce_sum(
          tf.square(value - decoded_value)) / value_size

      return encoded_value, bitrate, distortion

    @tff.federated_computation()
    def init_fn():
      return tff.federated_value((), tff.SERVER)

    def decode_and_sum(value):
      """Encoded client values do not commute with sum: decode then sum."""

      @tff.tf_computation
      def get_accumulator():
        return tf.zeros(shape=value_type.shape, dtype=tf.float32)

      @tff.tf_computation
      def decode_accumulate_values(accumulator, encoded_value):
        decoded_value = decode(encoded_value)
        return accumulator + decoded_value

      @tff.tf_computation
      def merge_decoded_values(decoded_value_1, decoded_value_2):
        return decoded_value_1 + decoded_value_2

      @tff.tf_computation
      def report_decoded_summation(summed_decoded_values):
        return summed_decoded_values

      return tff.federated_aggregate(
          value,
          zero=get_accumulator(),
          accumulate=decode_accumulate_values,
          merge=merge_decoded_values,
          report=report_decoded_summation)

    @tff.federated_computation(init_fn.type_signature.result,
                               tff.type_at_clients(value_type))
    def next_fn(state, value):
      encoded_value, bitrate, distortion = tff.federated_map(encode, value)
      avg_bitrate = tff.federated_mean(bitrate)
      avg_distortion = tff.federated_mean(distortion)

      result = decode_and_sum(encoded_value)

      return tff.templates.MeasuredProcessOutput(
          state=state,
          result=result,
          measurements=tff.federated_zip(
              collections.OrderedDict(avg_bitrate=avg_bitrate,
                                      avg_distortion=avg_distortion)))

    return tff.templates.AggregationProcess(init_fn, next_fn)


text:
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Header from './components/header';
import Config from './config';
import Tab from './components/tab';
import TabsContainer from './containers/TabsContainer';

class App extends Component {

  render() {
    return (
      <div>
        <Header header = {Config.header} body = {Config.body}  />
        <TabsContainer store={this.props.store} />
      </div>

    );
  }
}

export default App;


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Vita.Data.Linq;
using Vita.Data.Model;
using Vita.Entities.Logging;
using Vita.Entities.Model;
using Vita.Entities.Runtime;
using Vita.Entities.Services;
using Vita.Entities.Utilities;

namespace Vita.Entities {

  public static partial class EntitySessionExtensions {

    /// Returns a list of entities.
    /// <typeparam name="TEntity">Entity type.</typeparam>
    /// <param name="session">Entity session.</param>
    /// <param name="skip">Optional. A number of entities to skip.</param>
    /// <param name="take">Maximum number of entities to include in results.</param>
    /// <param name="orderBy">Order by expression.</param>
    /// <param name="descending">Descening order flag.</param>
    /// <returns>A list of entities.</returns>
    public static IList<TEntity> GetEntities<TEntity>(this IEntitySession session,
          Expression<Func<TEntity, object>> orderBy = null, bool descending = false,
          int? skip = null, int? take = null) where TEntity : class {
      var query = session.EntitySet<TEntity>();
      if (orderBy != null)
        query = descending ? query.OrderByDescending(orderBy) : query.OrderBy(orderBy);
      if (skip != null)
        query = query.Skip(skip.Value);
      if (take != null)
        query = query.Take(take.Value);
      return query.ToList();
    }

    public static void LogMessage(this IEntitySession session, string message, params object[] args) {
      var entitySession = (EntitySession)session;
      entitySession.AddLogEntry(new InfoLogEntry(session.Context.LogContext, message, args));
    }

    public static System.Data.IDbCommand GetLastCommand(this IEntitySession session) {
      var entSession = (EntitySession)session;
      return entSession.LastCommand;
    }

    public static long GetNextTransactionId(this IEntitySession session) {
      var entSession = (EntitySession)session;
      return entSession.GetNextTransactionId();
    }

    public static IDisposable WithElevatedRead(this IEntitySession session) {
      var entSession = (EntitySession)session;
      return entSession.ElevateRead();
    }

    /// Enables/disables local log temporarily.
    /// <param name="session">Entity session.</param>
    /// <param name="enable">Optional, boolean flag indicating whether log should enabled or disabled.</param>
    public static void EnableLog(this IEntitySession session, bool enable = true) {
      var ext = (EntitySession)session;
      ext.SetOption(EntitySessionOptions.DisableLog, !enable);
    }

    /// Returns the count of entities with pending changes not yet submitted to data store.
    /// <param name="session">Entity session.</param>
    /// <returns>Change count.</returns>
    public static int GetChangeCount(this IEntitySession session) {
      var entSession = (EntitySession)session;
      return entSession.RecordsChanged.Count;
    }

    //Helper method that can be used to create composite primary keys
    /// Creates a primary key object for an entity identified by type. Use it for entity types with composite primary key, to create a key instance from
    /// column values. The created key may be used in session.GetEntity() method as primary key parameter.
    /// <typeparam name="TEntity">Entity type.</typeparam>
    /// <param name="session">The entity session.</param>
    /// <param name="values">Value(s) of the primary key columns.</param>
    /// <returns>A primary key object.</returns>
    public static object CreatePrimaryKey<TEntity>(this IEntitySession session, params object[] values) {
      Util.CheckParam(values, "values");
      var entInfo = session.Context.App.Model.GetEntityInfo(typeof(TEntity), throwIfNotFound: true);
      var pk = EntityKey.Create(entInfo.PrimaryKey, values);
      return pk;
    }

    // TODO: reimplement with offset stored in Claims
    /*
    /// Returns user local time. The timezone offset value is in the user Principal and must be assigned before calling this method.
    /// <param name="context">Operation context, must have user sesssion established.</param>
    /// <param name="utcDateTime">Optional, UTC date/time to convert. If missing, function converts current UTC time.</param>
    /// <returns>User local time.</returns>
    public static DateTime GetUserLocalTime(this OperationContext context, DateTime? utcDateTime = null) {
      Util.Check(context.UserSession != null, "No user session established, cannot infer user local time.");
      var utc = utcDateTime == null ? context.App.TimeService.UtcNow : utcDateTime.Value;
      var shifted = utc.AddMinutes(context.UserSession.TimeZoneOffsetMinutes);
      var local = new DateTime(shifted.Year, shifted.Month, shifted.Day, shifted.Hour, shifted.Minute, shifted.Second, DateTimeKind.Unspecified);
      return local;
    }
    */

    public static TEntity NewCopyOf<TEntity>(this IEntitySession session, TEntity entity, bool copyPK = false) where TEntity : class {
      var copy = session.NewEntity<TEntity>();
      var entityInfo = EntityHelper.GetRecord(entity).EntityInfo;
      foreach (var member in entityInfo.Members) {
        switch (member.Kind) {
          case EntityMemberKind.Column:
            if (member.Flags.IsSet(EntityMemberFlags.PrimaryKey) && !copyPK)
              continue;
            var value = EntityHelper.GetProperty(entity, member.MemberName);
            EntityHelper.SetProperty(copy, member.MemberName, value);
            break;
            // do not copy entity references or lists
        }
      }
      return copy;
    }

    #region Transaction tags access
    /// Returns a set of tags set for the current/next transaction.
    /// <param name="session">Entity session.</param>
    /// <returns>A set of transaction tags defined.</returns>
    /// <remarks>The tags are free-form strings that can be used by client code to remember certain facts/values associated with SaveChanges operation.
    /// They are NOT used in any database operations directly. The tags are cleared after session.SaveChanges() completes.
    /// Example use: automatic scheduling of update queries in SavingChanges event for particular entity.
    /// To avoid scheduling the same query multiple times, the client code can add a tag after scheduling the query for the first time, for ex:
    /// [UpdateOrderTotalScheduled/orderid]. In consequitive invocations of the event handler the code can if the tag is already defined, so the query is already
    /// scheduled to run.
    /// </remarks>
    public static HashSet<string> GetTransactionTags(this IEntitySession session) {
      var ext = (EntitySession)session;
      return ext.GetTransactionTags();
    }

    /// Returns true if a transaction tag is defined.
    /// <param name="session">Entity session.</param>
    /// <param name="tag">Tag value.</param>
    /// <returns>True if the tag is defined; otherwise, false.</returns>
    public static bool HasTransactionTag(this IEntitySession session, string tag) {
      var tags = GetTransactionTags(session);
      return tags.Contains(tag);
    }

    /// Adds a transaction tag.
    /// <param name="session">Entity session.</param>
    /// <param name="tag">Tag value.</param>
    public static void AddTransactionTag(this IEntitySession session, string tag) {
      var tags = GetTransactionTags(session);
      tags.Add(tag);
    }

    /// Removes a transaction tag.
    /// <param name="session">Entity session.</param>
    /// <param name="tag">Tag value.</param>
    public static void RemoveTransactionTag(this IEntitySession session, string tag) {
      var tags = GetTransactionTags(session);
      if (tags.Contains(tag))
        tags.Remove(tag);
    }
    #endregion

    public static bool IsSet(this EntitySessionOptions options, EntitySessionOptions option) {
      return (options & option) != 0;
    }

    public static TResult Select<TResult>(this IEntitySession session, Expression<Func<TResult>> expr) {
      var entSession = (EntitySession)session;
      var ctxEntSet = entSession.CreateDbContextEntitySet();
      // Create selector expr that can be accepted by Queryable.Select - add parameter for pseudo entity
      var prm = Expression.Parameter(typeof(INullEntity), "@NullTable");
      var selector = Expression.Lambda<Func<INullEntity, TResult>>(expr.Body, prm);
      var result = ctxEntSet.Select(selector).ToList().First();
      return result;
    }

    public static long GetSequenceNextValue(this IEntitySession session, SequenceDefinition sequence) {
      return session.Select(() => sequence.NextValue());
    }

  }//class

}


text:
package jscompiler.ast;

import jscompiler.ast.visitor.ASTVisitor;
import jscompiler.token.TokenType;

public class ASTPostfixExpression extends ASTExpression {

	private TokenType opType;
	private ASTExpression expression;

	public ASTPostfixExpression(TokenType opType, ASTExpression expr) {
		this.setOpType(opType);
		this.expression = expr;
	}

	public TokenType getOpType() {
		return opType;
	}

	public void setOpType(TokenType opType) {
		this.opType = opType;
	}

	public ASTExpression getExpression() {
		return expression;
	}

	public void setExpression(ASTExpression expression) {
		this.expression = expression;
	}

	@Override
	public void accept(ASTVisitor visitor) {
		if (!visitor.visit(this)) {
			return;
		}

		if (expression != null) {
			expression.accept(visitor);
		}
		visitor.endVisit(this);
	}

}


text:
import json
import hashlib

from django.core import serializers
from django.contrib.auth.models import User

import requests

import approver.models
from approver.constants import registry_endpoints, api_username, bridge_key

def load_api_user():
    API_user = None
    def get_api_user():
        nonlocal API_user
        if not API_user:
            API_user = User.objects.get(username=api_username)
        return API_user

    return get_api_user

get_api_user = load_api_user()

def push_model(model):
    if model.last_modified_by_id != 2:
        api_user = get_api_user()
        json_data, req_hash = process_data(model)
        response = None
        url = '/'.join([registry_endpoints.get('add_model'), req_hash])
        try:
            response = requests.post(url, data=json_data)
            if response.status_code == 200 and not model.is_registered():
                model.register()
                model.save(api_user)
        except requests.exceptions.RequestException as e:
            print(e)
        return response

def process_data(model):
    """
    Takes a couple of steps to make the bridge work.

    serializes the model
    adds the model_class_name property for model lookup on the other side
    Adds in a hash with the bridge key for security
    """
    json_data = jsonify(model)
    json_data = add_model_class_name(json_data, model)
    req_hash = get_hash(json_data, bridge_key)
    return json_data, req_hash

def jsonify(model):
    return serializers.serialize('json', [model], use_natural_foreign_keys=True, use_natural_primary_keys=True)

def add_model_class_name(data, model):
    """
    This function adds the model instance's __class__.__name__ property
    to the json before sending it out.

    This is necessary so that the registry knows which module
    from the models package to grab.
    """
    model_dict = json.loads(data)
    model_dict[0]['fields']['model_class_name'] = model.__class__.__name__
    return json.dumps(model_dict)

def get_hash(json_data, bridge_key):
    """
    Adds an md5 hash as hex so the registry can verify add_model validity.
    Meant to be passed as a url parameter
    """
    to_hash = json_data.encode('utf-8') + bridge_key.encode('utf-8')
    return hashlib.md5(to_hash).hexdigest()


text:
define(['jquery'], function (jQuery) {
    (function() {

        /**
         * Catch the keypress event for `enter` when an editable field has focus
         */
        $(document).on('focus', '.jeditable-field', function(ev) {
            $(this).keypress(function(ev) {
                if (ev.which == 13){
                    $(this).trigger('click.editable');
                }
            });
        });

    })();
});


text:
//
// Copyright 2017 Mobile Jazz SL
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import <Foundation/Foundation.h>

@class MJFuture<T>;

/**
 * Batch management of futures.
 **/
@interface MJFutureBatch <T> : NSObject

/**
 * Returns an empty non-serial future batch.
 **/
+ (MJFutureBatch <T> * _Nonnull)emptyBatch;

/**
 * Returns an empty serial future batch.
 **/
+ (MJFutureBatch <T> * _Nonnull)emptySerialBatch;

/**
 * Default initializer.
 **/
- (instancetype _Nonnull)initSerial:(BOOL)serial;

/**
 * Serial delivery of futures (in order of batch).
 **/
@property (nonatomic, assign, readonly) BOOL serial;

/**
 * Batches a future.
 * @param future A future to batch.
 **/
- (void)batchFuture:(MJFuture <T> * _Nonnull)future;

/**
 * Batches a future.
 * @param future A future to batch.
 * @param context A context object.
 **/
- (void)batchFuture:(MJFuture <T> * _Nonnull)future context:(id _Nullable)context;

/**
 * Sets the "then" block. This block will be called for each future.
 * @return The self instance.
 **/
- (MJFutureBatch <T> * _Nonnull)then:(void (^ _Nonnull)(_Nullable T object, NSError *_Nullable error, id _Nullable context))block;

/**
 * A completion block that will be called after all futures end.
 **/
- (void)completion:(void (^_Nonnull)(NSError * _Nullable error, id _Nullable context))completion;

@end