text:
package com.jack.music.service.scanner;

import android.annotation.TargetApi;
import android.media.MediaMetadataRetriever;
import android.os.Build;
import android.os.Environment;
import android.text.TextUtils;
import android.util.Log;

import com.jack.aidl.JCMusic;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by liuyang on 16/9/11.
 */
public class MusicScanner {
    private static final String TAG = "DUG_MusicScanner";
    private static final int DEFAULT_SIZE = 1024;
    private static final String EXTERNAL_ROOT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath();/*"/sdcard/"*/
    private File EXTERNAL_ROOT = null;//Environment.getExternalStorageDirectory();
    private static MusicScanner mInstance;
    private List<JCMusic> allMusicList;
    private MediaMetadataRetriever mediaRetriever;

    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
    private MusicScanner() {
        allMusicList = new ArrayList<JCMusic>();
        Log.d(TAG, "MusicScanner : Root path :" + EXTERNAL_ROOT_PATH);
        EXTERNAL_ROOT = new File(EXTERNAL_ROOT_PATH);
        mediaRetriever = new MediaMetadataRetriever();

    }

    public static MusicScanner getInstance() {
        if (mInstance == null) {
            mInstance = new MusicScanner();
        }
        return mInstance;
    }

    public MusicScanner traverseRoot() {
        if (EXTERNAL_ROOT == null || !EXTERNAL_ROOT.exists() /*|| !EXTERNAL_ROOT.canRead()*/ || !EXTERNAL_ROOT.isDirectory()) {
            return this;
        }
        File[] files = EXTERNAL_ROOT.listFiles();
        if (files == null || files.length <= 0) {
            return this;
        }

        traceParent(EXTERNAL_ROOT);
        return this;
    }

    private synchronized void traceParent(File parent) {
        Log.d(TAG, "traceParent() begin");
        File[] stack = new File[DEFAULT_SIZE];
        int top = 0;
        stack[top] = parent;
        top++;
        File file;

        while (top > 0) {
            file = stack[top - 1];
            top--;
            if (!file.isDirectory()) {
                dealFile(file);
            } else {
                File[] listFile = file.listFiles();
                for (int i = 0; i < listFile.length; i++) {
                    File tmp = listFile[i];
                    if (!tmp.isDirectory()) {
                        dealFile(tmp);
                    } else {
                        stack[top] = listFile[i];
                        top++;
                    }
                }
            }

        }
        Log.d(TAG, "traceParent() end");

    }

    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
    private void dealFile(File file) {
        String path = file.getAbsolutePath();
        if (isFileMediaType(path)) {

            mediaRetriever.setDataSource(path);
            JCMusic music = new JCMusic();
            String album = mediaRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ALBUM);
            music.setAlbumName(album);
            String artist = mediaRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ARTIST);
            music.setArtistName(artist);
            String musicName = mediaRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE);
            music.setMusicName(musicName);
            String totalTime = mediaRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
            long duration = 0;
            if (!TextUtils.isEmpty(totalTime)) {
                duration = Long.parseLong(totalTime);
                music.setDuration(duration);

            }

            Log.d(TAG, path + " accepted as media file .\n name :" + musicName + " \n artist :" + artist + " \n album :" + album + " \n duration :" + duration + " \n totalTime:" + totalTime);

            music.setFilePath(path);
            //由于数据库中歌曲的id非空,故需要对歌曲的id进行取值
            music.setMusicId("music_" + path.hashCode() + "");
            allMusicList.add(music);
        }
    }

    private boolean isFileMediaType(String path) {
        if (TextUtils.isEmpty(path)) {
            return false;
        }

        boolean result = false;
        String dealtPath = path.toLowerCase();
        if (dealtPath.endsWith(MUSIC_TYPE.CDA) ||
                dealtPath.endsWith(MUSIC_TYPE.MP3) ||
                dealtPath.endsWith(MUSIC_TYPE.MIDI) ||
                dealtPath.endsWith(MUSIC_TYPE.APE) ||
                dealtPath.endsWith(MUSIC_TYPE.AAC) ||
                dealtPath.endsWith(MUSIC_TYPE.WAV) ||
                dealtPath.endsWith(MUSIC_TYPE.WMA) ||
                dealtPath.endsWith(MUSIC_TYPE.OGG) ||
                dealtPath.endsWith(MUSIC_TYPE.FLAC) ||
                dealtPath.endsWith(MUSIC_TYPE.MOD)) {
            result = true;
        }

        return result;
    }

    public List<JCMusic> getAllMusic() {
        return allMusicList;
    }

    public interface MUSIC_TYPE {
        public static final String CDA = ".cda";
        public static final String WAV = ".wav";
        public static final String MP3 = ".mp3";
        public static final String WMA = ".wma";
        public static final String MIDI = ".mid";
        public static final String OGG = ".ogg";
        public static final String APE = ".ape";
        public static final String FLAC = ".flac";
        public static final String AAC = ".aac";
        public static final String MOD = ".mod";
    }
}


text:
require 'spec_helper'

describe Locomotive::Steam::Liquid::Drops::Site do

  let(:services)  { Locomotive::Steam::Services.build_instance }
  let(:context)   { ::Liquid::Context.new({}, {}, { services: services }) }
  let(:site)      { instance_double('Site', handle: 'locomotive', name: 'Locomotive', domains: ['acme.org'], seo_title: 'seo title', meta_keywords: 'keywords', meta_description: 'description', localized_attributes: {}, asset_host: 'http://asset.dev') }
  let(:drop)      { described_class.new(site).tap { |d| d.context = context } }

  subject { drop }

  it 'gives access to general attributes' do
    expect(subject.name).to eq 'Locomotive'
    expect(subject.handle).to eq 'locomotive'
    expect(subject.seo_title).to eq 'seo title'
    expect(subject.meta_keywords).to eq 'keywords'
    expect(subject.meta_description).to eq 'description'
    expect(subject.domains).to eq ['acme.org']
    expect(subject.asset_host).to eq 'http://asset.dev'
  end

  describe '#index' do

    let(:index) { instance_double('IndexPage', to_liquid: { 'title' => 'Home page' }) }

    before do
      allow(services.repositories.page).to receive(:root).and_return(index)
    end

    it { expect(subject.index).to eq({ 'title' => 'Home page' }) }

  end

  describe '#pages' do

    let(:pages) do
      [
        instance_double('AboutUsPage', to_liquid: { 'title' => 'About us' }),
        instance_double('ContactPage', to_liquid: { 'title' => 'Contact' })
      ]
    end

    before do
      allow(services.repositories.page).to receive(:all).and_return(pages)
    end

    it { expect(subject.pages).to eq([{ 'title' => 'About us' }, { 'title' => 'Contact' }]) }

    it "doesn't memoize it" do
      subject.pages
      allow(services.repositories.page).to receive(:all).and_return([pages.first])
      expect(subject.pages).to eq([{ 'title' => 'About us' }])
    end

  end

end

redpajama_set_name: RedPajamaGithub


text:
export class Worker {

	connection = null

	constructor(connection) {
		this.connection = connection
	}

	async work(queues, concurrency = 1) {
		await this.connection.willListen()

		return this.connection.listen(queues, concurrency)
	}

}


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="match_parent"
    android:background="#ffffff"
    android:gravity="center"
    android:orientation="vertical">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/rv"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    </android.support.v7.widget.RecyclerView>
</LinearLayout>


text:
import org.apache.spark._

object Main {
  def main(args: Array[String]) {
    val conf = new SparkConf().setAppName("test").setMaster("local[*]")
    val sc = new SparkContext(conf)

    val input = sc.textFile("../input").cache
    val links = input.map(_.split(": ")).map(values => (values(0), values(1).split(", ")))

    var ranks = links.mapValues(v => 1.0)

    for (i <- 1 to 10) {
      val contribs = links.join(ranks).values.flatMap {
        case (links, rank) =>
        links.map(n => (n, rank / links.size))
      }
      val newRanks = contribs.reduceByKey(_ + _).mapValues(0.15 + 0.85 * _)
      ranks = ranks.leftOuterJoin(newRanks).mapValues {
        case (old, newValue) => newValue.getOrElse(0.15)
      }
    }
    ranks.saveAsTextFile("ranks")

  }
}


text:
GiftVoucherCreate

Creates a new gift voucher. Note: This method is not officially supported.

Request

Method: SOAP

Server:  https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the OAuth in Business Catalyst document for more info on how this URL is formed.

Path: /catalystwebservice/catalystcrmwebservice.asmx

The username and password fields:You can make SOAP API calls can be authorized either by using the actual username or password of an Admin username or, if you are making the calls from an app leave the username field empty and use the authorization token as the password.

Parameters

siteId - ID of the site (integer)

username - email address of user account, leave empty if using site token (string)

password - password of user account, or site authentication token for specified site (string)

Code - (string)

CountryCode - (string)

Message - (string)

RecipientName - (string)

ReceipientEmail - (string)

Value - (decimal)

To use a site token instead of username/password, send an empty username field and the site token as the password. See example below.

Response

A GiftVoucherCreateResponse object with the following properties:

GiftVoucherCreateResult - (integer)

Examples

Accepts and returns XML as Content-Type.

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values, please note the data in the request and response is only for explanatory purposes.

Request:

POST /catalystwebservice/catalystecommercewebservice.asmx HTTP/1.1
Host: www.businesscatalyst.com.au
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GiftVoucherCreate xmlns="http://tempuri.org/CatalystDeveloperService/CatalystEcommerceWebservice">
      <Username>jdoe@yourdomain.com</Username>
      <Password>Y0urP@ssw0rdH3re</Password>
      <siteid>12345</siteid>
      <Code>code_here</Code>
      <CountryCode>US</CountryCode>
      <Message>Message here</Message>
      <Message>John Doe</Message>
      <ReceipientEmail>recipient@recipientemail.com</ReceipientEmail>
      <Value>10</Value>
    </GiftVoucherCreate>
  </soap12:Body>
</soap12:Envelope>

Response:

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GiftVoucherCreateResponse xmlns="http://tempuri.org/CatalystDeveloperService/CatalystEcommerceWebservice">
      <GiftVoucherCreateResult>int</GiftVoucherCreateResult>
    </GiftVoucherCreateResponse>
  </soap12:Body>
</soap12:Envelope>


text:
package com.yahoo.labs.samoa.learners;

import com.yahoo.labs.samoa.learners.Learner;

public interface RegressionLearner extends Learner {

}


text:
"""Access T2T Problems.

See problems_test.py for basic usage.
"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

# Dependency imports

from tensor2tensor.data_generators import all_problems  # pylint: disable=unused-import
from tensor2tensor.utils import registry

def problem(name):
  return registry.problem(name)

def available():
  return sorted(registry.list_problems())


text:
package net.sf.jacclog.api.domain.http;

/**
 * Defines the root interface of a Hypertext Transfer Protocol (HTTP) request header field consisting of a type and
 * value.

 *

 * The implementation of this interface may be mutable or immutable. This interface only gives access to retrieve data,
 * never to change it.

 *

 * HTTP header fields are components of the message header of requests and responses in the Hypertext Transfer Protocol
 * (HTTP). They define the operating parameters of an HTTP transaction.

 *

 * The request-header fields allow the client to pass additional information about the request, and about the client
 * itself, to the server. These fields act as request modifiers, with semantics equivalent to the parameters on a
 * programming language method invocation.

 *

 * Example HTTP request (header fields are italic)
 *
 *

 * GET /infotext.html HTTP/1.1
 * Host: jacclog.sf.net
 * Cookie: name1=value1; name2=value2
 *

 *
 * @author André Rouél
 */
public interface ReadableHttpRequestHeaderField {

	/**
	 * Gets the type of the request header which is never null.
	 *
	 * @return the type of the request header
	 */
	public ReadableHttpRequestHeader getType();

	/**
	 * Gets the value of the request header which is never null.
	 *
	 * @return the value of the request header
	 */
	public String getValue();

}


text:
define("view/project/list/subscribe", ["require", "exports", "module", "view/project/list/base", "utils/analytics", "utils/server", "hbs!template/calendar_item"],
function(e, t) {
  var i = e("view/project/list/base").View,
  n = e("utils/analytics"),
  s = e("utils/server");
  t.View = i.extend({
    className: "calendar-item",
    template: e("hbs!template/calendar_item"),
    events: {
      "click a.project-box": "navigateByClick"
    },
    message: function() {
      this.listenTo(Backbone, "showSubscribe", this.showSubscribe),
      this.listenTo(Backbone, "renderCalenderProjectName", this.renderCalenderProjectName),
      this.listenTo(Backbone, "routerNavigate", this.routerNavigate)
    },
    initialize: function(e) {
      this.message(),
      this.render(),
      this.events = _.extend({},
      i.prototype.events, this.events),
      this.constructor.__super__.initialize.apply(this, [e])
    },
    render: function() {
      this.$el.html(this.template({
        name: this.model.get("name")
      })).addClass("hide")
    },
    setUrl: function() {
      var e = this;
      s.getCalendarSubscribe(function(t) {
        e.model.set({
          calIds: t[0] && t[0].id,
          url: t[0] && t[0].url
        })
      })
    },
    showSubscribe: function() {
      this.$el.removeClass("hide"),
      this.setUrl()
    },
    renderCalenderProjectName: function(e) {
      this.model.set("name", e),
      this.$(".l-title").html(e)
    },
    routerNavigate: function(e) {
      e = e || window.event,
      e.preventDefault();
      var t = this.$(".project-box").attr("href").replace("#", "");
      Backbone.history.fragment === t ? Backbone.history.loadUrl(Backbone.history.fragment) : Backbone.trigger("navigateUrl", t, {
        trigger: !0
      })
    },
    navigateByClick: function(e) {
      this.routerNavigate(e),
      n.l_view("subscribe")
    }
  })
})


text:
<script>
var False = false;
var True = true;
var app = {};
app.User = Backbone.Tastypie.Model.extend({
    urlRoot : "/api/v1/user/",
    idAttribute : "id",
    url : function() {
        if(this.get("id") === undefined) {
            return this.urlRoot;
        } else {
            return this.urlRoot + this.get("id") + "/";
        }
    },
});

app.initializeUser = function() {
    var cur_fb_user = app.cur_fb_user;
    if(cur_fb_user === undefined) {
        if(!cur_user_details.id) {
            // $('#login_modal').modal('show');
            return;
        }
        cur_fb_user = new app.User({'id' : cur_user_details.id});
        cur_fb_user = cur_fb_user.fetch({
            success : function(model, response) {
                app.cur_fb_user = response;
            },
        });

        if(cur_user_details.id) {
            user_id = cur_user_details.id;
        } else {
            user_id = -1;
        }
    }
};
app.initializeUser();

app.Article = Backbone.Tastypie.Model.extend({
    urlRoot : '/api/v1/article/',
    idAttribute : 'id',

    url : function() {
        if(this.get('id') === undefined) {
            return this.urlRoot;
        } else {
            return this.urlRoot + this.get('id') + "/";
        }
    },

    initialize : function() {
        this.comments = new app.CommentList();
        this.on("change:comments", function(model, options) {
            this.comments.reset();
            for(var i=0; i<this.get('comments').length; i++) {
                this.comments.add({'resource_uri' : this.get('comments')[i]});
            }
        });
    },
});

app.CommentLike = Backbone.Tastypie.Model.extend({
    urlRoot : '/api/v1/likes/comment/',
    idAttribute : 'id',

    defaults : {
        'added_time' : 'Now',
    },

    url : function() {
        if(this.get('resource_uri') !== undefined) {
            return this.get('resource_uri');
        } else if(this.get('id') !== undefined) {
            return this.urlRoot + this.get('id') + "/";
        } else {
            return this.urlRoot;
        }
    },
});

app.CommentLikeList = Backbone.Tastypie.Collection.extend({
    model : app.CommentLike,
    urlRoot : '/api/v1/likes/comment/',

    url : function() {
        if(cur_user_details.id === undefined)
            return;

        if(this.curUserLikes) {
            return this.urlRoot + "?limit=1&comment=" + this.commentId + "&liker=" + cur_user_details.id;
        }
        return this.urlRoot + "?limit=2&comment=" + this.commentId;
    },

    initialize : function(options) {
        if(cur_user_details.id === undefined) {
            return;
        }

        options || (options = {});

        if(options.commentId) {
            this.commentId = options.commentId;
        }

        if(options.curUserLikes) {
            this.curUserLikes = options.curUserLikes;
        }
    },
});

app.Comment = Backbone.Tastypie.Model.extend({
    urlRoot : '/api/v1/comment/',
    idAttribute : 'id',

    defaults : {
        'added_time' : 'Now',
        'cur_user_likes' : false,
        'like_id' : 0,
    },

    url : function() {
        if(this.get('resource_uri') !== undefined) {
            return this.get('resource_uri');
        } else if(this.get('id') !== undefined) {
            return this.urlRoot + this.get('id') + "/";
        } else {
            return this.urlRoot;
        }
    },

    initialize : function() {
        if(this.get('resource_uri') !== undefined) {
            var commentId = this.get('resource_uri').replace(this.urlRoot,'').replace('/','');
            this.commentId = commentId;

            if(cur_user_details.id !== undefined){
                this.fetchCurUserLikes();
            } else {
                this.fetch({
                    success: function (model, response, options) {
                        model.startTracking();
                    }
                });
            }
        }
    },

    fetchCurUserLikes : function() {
        this.curUserLikes = new app.CommentLikeList({commentId : this.commentId, curUserLikes : true});

        var that = this;
        this.curUserLikes.fetch({
            success : function(collection, response) {
                if(collection.meta.total_count > 0) {
                    that.set({
                        'cur_user_likes' : true,
                        'like_id' : collection.models[0].get('id'),
                    });
                } else {
                    that.set({
                        'cur_user_likes' : false,
                        'like_id' : 0,
                    });
                }
                that.fetch({
                    success: function (model, response, options) {
                        model.startTracking();
                    }
                });
            },
        });
    },
});

app.CommentList = Backbone.Tastypie.Collection.extend({
    model : app.Comment,
    urlRoot : '/api/v1/comment/',

    url : function() {
        return this.urlRoot;
    },
});

app.ArticleCommentsView = Backbone.View.extend({
    el : '#comments',
    template : Handlebars.compile($('#comment_template').html()),
    empty_comments_template : Handlebars.compile($('#comments_empty_template').html()),
    login_template : Handlebars.compile($('#comments_login_template').html()),

    events : {
        'click #create_comment' : 'checkLoginStatus',
        'click #save_new_comment' : 'createNewComment',
        'click #close_new_comment_modal' : 'removeSavedMessage',

        'click .like_comment' : 'likeComment',
    },

    initialize : function() {
        this.listenTo(app.article.comments, 'destroy', this.addAll);
        this.listenTo(app.article.comments, 'change', this.addAll);
        this.listenTo(app.article.comments, 'add', this.addAll);

        this.listenTo(app.article.comments, 'reset', this.resetView);
    },

    removeSavedMessage : function() {
        this.$('#waiting_new_comment').hide();
        this.$('#success_new_comment').hide();
    },

    resetView : function() {
        this.$('#article_comments').html('');
            this.$('#article_comments').append(this.empty_comments_template());
    },

    addAll : function() {
        this.$('#article_comments').html('');
        if(app.article.comments.models.length != 0) {
            app.article.comments.each(this.add, this);
        } else {
            if(cur_user_details.id !== undefined) {
                this.$('#article_comments').append(this.empty_comments_template());
            }
        }

        this.$('#article_comments').find('.tooltips').tooltip();
        $('.comments_no').html(app.article.comments.models.length);
    },

    add : function(model) {
        this.$('#article_comments').append(this.template(model.toJSON()));
        if(app.cur_comment_id) {
            if(model.get('id') == app.cur_comment_id) {
                $('html, body').animate({
                    scrollTop: $("#comment_"+app.cur_comment_id).offset().top
                }, 1500);
            }
        }
    },

    createNewComment : function() {
        var body = this.$('#new_comment_body')[0].value;
        var comment = new app.Comment({
            'body' : body,
        });

        var that = this;
        this.$('#success_new_comment').hide();
        this.$('#waiting_new_comment').show();
        comment.save(null, {
            success : function(model, response) {
                that.$('#waiting_new_comment').hide();
                that.$('#success_new_comment').show();

                app.article.comments.add(model);
                app.article.get('comments').push(model.get('resource_uri'));
                app.article.save({
                    'comments': app.article.get('comments'),
                }, {
                    patch : true,
                    success: function(){
                        for(var i=0; i<app.article.collaborators.length; i++) {
                            var collab = app.article.collaborators.models[i];
                            var mail = new app.SendMail({
                                'to': collab.get('email'),
                                'to_name': collab.get('first_name'),
                                'mail_type': 101,
                                'actor_id': cur_user_details.id,
                                'target_id': model.get('id'),
                            });
                            mail.save();
                        }
                    }
                });

                that.$('#new_comment_body').val('');
                // _cio.track("articleComments",{article_id:'{{article.id}}'});

                // mixpanel.track("articleP: Event", {event_type: "article_comment_added", user_id:cur_user_details.id, article_id:{{article_id}},
                //                                  comment_id: model.get('id')});
            },
        });
    },

    checkLoginStatus : function() {
        if(cur_user_details.id === undefined) {
            $('#login_modal').modal('show');
            return false;
        }
    },

    likeComment : function(event) {
        if(cur_user_details.id === undefined) {
            $('#login_modal').modal('show');
            return;
        }

        var btn_details = event.target.id.split('_');
        var commentId = parseInt(btn_details[1]);
        var likeId = parseInt(btn_details[2]);

        var curComment = app.article.comments.get(commentId);

        if(likeId == 0) {
            var newLike = new app.CommentLike({
                'comment' : curComment.get('resource_uri'),
                'liker' : app.cur_fb_user,
            });
            newLike.save(null, {
                success : function(model, response) {
                    curComment.set({
                        'cur_user_likes' : true,
                        'like_id' : model.get('id'),
                        'likes_count' : parseInt(curComment.get('likes_count'))+1,
                    });
                },
            });
        } else {
            var newLike = new app.CommentLike({
                'id' : likeId,
            });
            newLike.destroy();
            curComment.set({
                'cur_user_likes' : false,
                'like_id' : 0,
                'likes_count' : parseInt(curComment.get('likes_count'))-1,
            });
        }
    },

});

app.ArticleLike = Backbone.Tastypie.Model.extend({
    urlRoot : '/api/v1/likes/article/',
    idAttribute : 'id',

    defaults : {
        'added_time' : 'Now',
    },

    initialize: function(options) {
        this.article_id = this.article_id || options.article_id;
        this.set('article', '/api/v1/article/'+ this.article_id +'/');
    }
});

app.ArticleLikeList = Backbone.Tastypie.Collection.extend({
    model : app.ArticleLike,
    idAttribute : 'id',
    urlRoot : '/api/v1/likes/article/',

    url : function() {
        if(this.getUserLikes)
            return this.urlRoot + "?limit=2&article=" + this.article_id + "&liker=" + cur_user_details.id;

        return this.urlRoot + "?article=" + this.article_id;
    },

    initialize : function(options) {
        options = options || {};
        this.article_id = options.article_id;
        this.getUserLikes = options.getUserLikes || false;
    },
});

app.ArticleLikesView = Backbone.View.extend({
    template : Handlebars.compile($('#like_template').html()),
    liker_template : Handlebars.compile($('#liker_template').html()),

    events : {
        'click .like_article' : 'clickLike',
        'click .likes_string' : 'showAllLikers',
    },

    initialize : function(options) {

        this.setElement("#article-" + options.article_id + "-likes");
        this.article_id = options.article_id;

        this.allLikes = new app.ArticleLikeList({
            article_id: this.article_id
        });

        this.userLikes = new app.ArticleLikeList({
            article_id: this.article_id,
            getUserLikes: true
        });

        this.loadLikes();

    },

    loadLikes: function() {
        var that = this;
        if(cur_user_details.id) {
            $.when(this.userLikes.fetch(), this.allLikes.fetch())
                .done(function(){
                    that.refreshLikeStatus();
            });
        } else {
            this.allLikes.fetch({
                reset:true,
                success: function() {
                    that.refreshLikeStatus();
                }
            });
        }
    },

    checkUserLikes: function() {

        this.userLike = undefined;

        if(cur_user_details.id === undefined)
            return;

        if(this.userLikes.models.length === 1 &&
            this.userLikes.models[0].get('liker').id === cur_user_details.id) {
            this.userLike = this.userLikes.models[0];
        }
    },

    refreshLikeStatus : function() {

        this.checkUserLikes();
        this.updateLikesString();

        this.$('.likes').html('');

        var like_btn_cls = "btn-info";
        var like_status = "Like";
        if(this.userLike) {
            like_btn_cls = "btn-success";
            like_status = "Liked";
        }

        this.$('.likes').append(
            this.template({
                'like_btn_cls' : like_btn_cls,
                'like_status' : like_status,
                'likes_string' : this.likesString,
            })
        );
    },

    updateLikesString : function() {

        this.likesString = "Be the first one to like this!";

        var totalLikes = this.allLikes.meta.total_count;
        if(totalLikes == 0)
            return;

        if(cur_user_details.id !== undefined && this.userLike) {
            tempLikeString = "You ";

            if(totalLikes === 1) {
            }
            else if(totalLikes === 2) {
                tempLikeString += "and ";
                if(this.allLikes.models[0].get('liker').id == cur_user_details.id) {
                    tempLikeString += this.allLikes.models[1].get('liker').first_name + " ";
                } else {
                    tempLikeString += this.allLikes.models[0].get('liker').first_name + " ";
                }
            } else {
                tempLikeString += ", "
                if(this.allLikes.models[0].get('liker').id == cur_user_details.id) {
                    tempLikeString += this.allLikes.models[1].get('liker').first_name + " ";
                } else {
                    tempLikeString += this.allLikes.models[0].get('liker').first_name + " ";
                }
                tempLikeString += "and " + (totalLikes-2) + " others "
            }

            tempLikeString +=  "like this!";
        } else {
            tempLikeString = "";

            if(totalLikes === 1) {
                tempLikeString += this.allLikes.models[0].get('liker').first_name + " ";
                tempLikeString += "likes this!";
            } else if(totalLikes === 2) {
                tempLikeString += this.allLikes.models[1].get('liker').first_name + " ";
                tempLikeString += "and ";
                tempLikeString += this.allLikes.models[0].get('liker').first_name + " ";
                tempLikeString +=  "like this!";
            } else {
                tempLikeString += this.allLikes.models[1].get('liker').first_name + " ";
                tempLikeString += ", ";
                tempLikeString += this.allLikes.models[0].get('liker').first_name + " ";
                tempLikeString += "and " + (totalLikes-2) + " others "
                tempLikeString +=  "like this!";
            }
        }
        this.likesString = tempLikeString;
    },

    clickLike : function(event) {
        mixpanel.track("ArticleP: Event", {
            event_type: "like_clicked",
            article_id: this.article_id,
            tag_id: {% ifequal current_tag "all" %} "all" {% else %} {{current_tag.id}} {% endifequal %},
            user_id: global_user_id,
        });

        if(cur_user_details.id === undefined) {
            $('#login_modal').modal('show');
            return;
        }
        this.$('.btn').attr("disabled", true);

        if(this.userLike) {
            var that = this;
            this.userLike.destroy({
                success : function() {
                    that.loadLikes();
                },
            });

        } else {
            var newLike = new app.ArticleLike({
                'liker' : app.cur_fb_user,
                'article_id': this.article_id
            });

            var that = this;
            newLike.save(null, {
                success : function(model, response) {
                    that.loadLikes();
                },
            });
        }
    },

    showAllLikers : function() {
        mixpanel.track("ArticleP: Event", {
            event_type: "all_likes_clicked",
            article_id: this.article_id,
            tag_id: {% ifequal current_tag "all" %} "all" {% else %} {{current_tag.id}} {% endifequal %},
            user_id: global_user_id,
        });

        if(this.allLikes.models.length === 0)
            return;

        var json = {'likes' : this.allLikes.toJSON()};
        this.$('.modal-body')[0].innerHTML = this.liker_template(json);
        this.$('#all_likes_modal').modal('show');
    },
});

app.ChannelLike = Backbone.Tastypie.Model.extend({
    urlRoot : '/api/v1/likes/channel/',
    idAttribute : 'id',

    defaults : {
        'added_time' : 'Now',
    },

    initialize: function(options) {
        this.channelId = this.channelId || options.channelId;
        this.set('channel', '/api/v1/tags/'+ this.channelId +'/');
    }
});

app.ChannelLikeList = Backbone.Tastypie.Collection.extend({
    model : app.ChannelLike,
    idAttribute : 'id',
    urlRoot : '/api/v1/likes/channel/',

    url : function() {
        if(this.getUserLikes && cur_user_details.id !== undefined)
            return this.urlRoot + "?limit=2&channel=" + this.channelId + "&liker=" + cur_user_details.id;

        return this.urlRoot + "?limit=2&channel=" + this.channelId;
    },

    initialize : function(options) {
        options = options || {};
        this.channelId = options.channelId;
        this.getUserLikes = options.getUserLikes || false;
    },
});

app.ChannelLikesView = Backbone.View.extend({
    template : Handlebars.compile($('#like_template').html()),

    events : {
        'click .like_article' : 'clickLike',
    },

    initialize : function(options) {

        this.setElement("#channel-" + options.channelId + "-likes");
        this.channelId = options.channelId;

        this.userLikes = new app.ChannelLikeList({
            channelId: this.channelId,
            getUserLikes: true
        });

        this.loadLikes();

    },

    loadLikes: function() {
        var that = this;
        this.userLikes.fetch({
            success: function(){
                that.refreshLikeStatus();
            }
        });
    },

    checkUserLikes: function() {

        this.userLike = undefined;

        if(cur_user_details.id === undefined)
            return;

        if(this.userLikes.models.length === 1 &&
            this.userLikes.models[0].get('liker').id === cur_user_details.id) {
            this.userLike = this.userLikes.models[0];
        }
    },

    refreshLikeStatus : function() {

        this.checkUserLikes();

        this.$('.likes').html('');

        var like_btn_cls = "btn-info";
        var like_status = "Follow this channel";
        if(this.userLike) {
            like_btn_cls = "btn-success";
            like_status = "Following this channel";
        }

        this.$('.likes').append(
            this.template({
                'like_btn_cls' : like_btn_cls,
                'like_status' : like_status
            })
        );
    },

    clickLike : function(event) {
        if(cur_user_details.id === undefined) {
            mixpanel.track("ArticleP: Event", {
                event_type: "tag_follow_clicked",
                tag_id: {% ifequal current_tag "all" %} "all" {% else %} {{current_tag.id}} {% endifequal %},
                user_id: global_user_id,
            });

            $('#login_modal').modal('show');
            return;
        }
        this.$('.btn').attr("disabled", true);

        if(this.userLike) {
            var that = this;
            this.userLike.destroy({
                success : function() {
                    that.loadLikes();
                    mixpanel.track("ArticleP: Event", {
                        event_type: "tag_unfollowed",
                        tag_id: {% ifequal current_tag "all" %} "all" {% else %} {{current_tag.id}} {% endifequal %},
                        user_id: global_user_id,
                    });
                },
            });

        } else {
            var newLike = new app.ChannelLike({
                'liker' : app.cur_fb_user,
                'channelId': this.channelId
            });

            var that = this;
            newLike.save(null, {
                success : function(model, response) {
                    mixpanel.track("ArticleP: Event", {
                        event_type: "tag_followed",
                        tag_id: {% ifequal current_tag "all" %} "all" {% else %} {{current_tag.id}} {% endifequal %},
                        user_id: global_user_id,
                    });

                    that.loadLikes();
                },
            });
        }
    },
});

app.ArticleView = Backbone.View.extend({

    initialize: function(options) {
        this.article_id = options.article_id;
        this.setElement("#article-" + this.article_id);
        this.likesView = new app.ArticleLikesView({
            article_id: this.article_id
        });
    }
});

//--------------
// Initializers
//--------------

app.articles = [];
app.$articles = $('.article .article-data');

for(var i=0; i<app.$articles.length; ++i) {
    var article_data = app.$articles[i];
    var article_id = $(article_data).data('article-id');
    app.articles.push(new app.ArticleView({article_id: article_id}));
}

app.channelsLikes = [];
app.$channels = $('.channel-data');
for(var i=0; i<app.$channels.length; ++i) {
    var channel_data = app.$channels[i];
    var channelId = $(channel_data).data('channel-id');
    app.channelsLikes.push(new app.ChannelLikesView({channelId: channelId}));
}

var searchTags = new Bloodhound({
    datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'),
    queryTokenizer: Bloodhound.tokenizers.whitespace,
    limit: 10,
    prefetch: {
        url: '/api/v1/tags/?limit=0',
        filter: function(list) {
            return $.map(list.objects, function(tag) {
                return { name: tag.name, url: "/recommendation/tags/" + tag.url_snippet, article_count: tag.article_count };
            });
        }
    },
    // remote: {
    //     url: '/api/v1/tags/search/?q=%QUERY',
    //     filter: function(list) {
    //         return $.map(list.tags, function(tag) {
    //             return { name: tag.name, url: "/article/tags/" + tag.url_snippet, article_count: tag.article_count };
    //         });
    //     }
    // }
});
searchTags.initialize();

$('.search-tags .typeahead').typeahead({
    hint: true,
    highlight: true,
    minLength: 1
},
{
    name: 'tags',
    displayKey: 'name',
    source: searchTags.ttAdapter(),
    templates: {
        empty: Handlebars.compile($('#tt-tag-suggestion-empty-template').html()),
        suggestion: Handlebars.compile($('#tt-tag-suggestion-template').html())
    }
});

$('.search-tags .typeahead').on("typeahead:selected", function(event, selected, dataset){
    window.open(selected.url, "_self");
});

{% load static %}
function showUserSearchLoading() {
    this.$('.search-users .tt-hint').css('background-image', 'url("{% static 'images/ajax-loader.gif' %}")');
    this.$('.search-users .tt-hint').css('background-position', 'right center');
    this.$('.search-users .tt-hint').css('background-repeat', 'no-repeat');
}

function hideUserSearchLoading() {
    this.$('.search-users .tt-hint').css('background-image', '');
}

var searchUsers = new Bloodhound({
    datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'),
    queryTokenizer: Bloodhound.tokenizers.whitespace,
    limit: 10,
    remote: {
        url: '/api/v1/user/search/?q=%QUERY',
        filter: function(list) {
            return $.map(list.users, function(user) {
                return {
                    name: user.first_name + " " + user.last_name,
                    url: "/recommendation/by/" + user.username
                };
            });
        },
        ajax: {
            beforeSend: function() {
                showUserSearchLoading();
            },
            complete: function() {
                hideUserSearchLoading();
            }
        }
    }
});
searchUsers.initialize();

$('.search-users .typeahead').typeahead({
    hint: true,
    highlight: true,
    minLength: 1
},
{
    name: 'tags',
    displayKey: 'name',
    source: searchUsers.ttAdapter(),
    templates: {
        empty: Handlebars.compile($('#tt-user-suggestion-empty-template').html()),
        suggestion: Handlebars.compile($('#tt-user-suggestion-template').html())
    }
});

$('.search-users .typeahead').on("typeahead:selected", function(event, selected, dataset){
    window.open(selected.url, "_self");
});

</script>


text:
package org.murinrad.android.musicmultiply.receiver;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.util.Log;

import java.lang.ref.WeakReference;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by Radovan Murin on 24.5.2015.
 */
public class TweakerActivity extends PreferenceActivity implements SharedPreferences.OnSharedPreferenceChangeListener {

    public static final String USE_TIMEKEEPER_PREF = "pref_key_use_timekeeper";

    public static final String TIME_LIMIT_PREF = "pref_key_time_limit";
    public static final String ENABLE_PERIODIC_RESET = "pref_key_enable_reset";
    public static final String PERIODIC_RESET_MILLIS = "pref_key_reset_millis";
    public static final String DEFAULTS_LOADED = "pref_key_defaults_loaded";

    private static Set<WeakReference<SharedPreferences.OnSharedPreferenceChangeListener>> listeners = new HashSet<>();

    public static void registerSharedPreferenceListener(SharedPreferences.OnSharedPreferenceChangeListener l) {
        listeners.add(new WeakReference<SharedPreferences.OnSharedPreferenceChangeListener>(l));
    }

    public static void deregisterSharedPreferenceListener(SharedPreferences.OnSharedPreferenceChangeListener l) {
        WeakReference<SharedPreferences.OnSharedPreferenceChangeListener> toRemove = null;
        for (WeakReference<SharedPreferences.OnSharedPreferenceChangeListener> listener : listeners) {
            if (listener.get() != null && listener.get() == l) {
                toRemove = listener;
            }
        }
        if (toRemove != null) {
            listeners.remove(toRemove);
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.pref_general);
    }

    @Override
    protected void onResume() {
        super.onResume();
        registerListeners();
    }

    @Override
    protected void onPause() {
        super.onPause();
        deregisterListeners();

    }

    private void registerListeners() {
        getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
        for (WeakReference<SharedPreferences.OnSharedPreferenceChangeListener> listener : listeners) {
            if (listener.get() != null) {
                getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(listener.get());
            }
        }
    }

    private void deregisterListeners() {
        getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
        for (WeakReference<SharedPreferences.OnSharedPreferenceChangeListener> listener : listeners) {
            if (listener.get() != null) {
                getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(listener.get());
            }
        }
    }

    @Override
    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
        Log.i("TweakerActivity", "Preference changed " + key);
    }
}


text:
<?php

// Check to ensure this file is included in Nawala!RDK environment
defined('_NRDKRA') or die;

/**
 * Nawala Framework NCompilerLess Class
 *
 * @package       Framework
 * @subpackage    FormatterNawala
 * @since         1.0
 *
 * This class allows to compile less files and add ability to store file informations for simple and
 * secure caching and is taken verbatim from:
 *
 * lessphp v0.4.0
 * http://leafo.net/lessphp
 *
 * LESS CSS compiler, adapted from http://lesscss.org
 *
 * Copyright 2013, Leaf Corcoran <leafot@gmail.com>
 * Licensed under MIT or GPLv3, see LICENSE
 *
 */
class NCompilerLessFormatterNawala extends NCompilerLessFormatterClassic
{
	public $disableSingle = true;

	public $breakSelectors = true;

	public $assignSeparator = ": ";

	public $selectorSeparator = ",";

	public $indentChar = "\t";
}


text:
FactoryBot.define do
  sequence(:name) { |n| "name-#{n}" }
  factory :content_category, class: 'Cms::ContentCategory' do
    name
    trait :with_node do
      content_nodes { [create(:content_node)] }
    end
  end
end


text:
module Blazer
  class CheckMailer < ActionMailer::Base
    include ActionView::Helpers::TextHelper

    default from: Blazer.from_email if Blazer.from_email
    layout false

    def state_change(check, state, state_was, rows_count, error, columns, rows, column_types, check_type)
      @check = check
      @state = state
      @state_was = state_was
      @rows_count = rows_count
      @error = error
      @columns = columns
      @rows = rows
      @column_types = column_types
      @check_type = check_type
      mail to: check.emails, reply_to: check.emails, subject: "Check #{state.titleize}: #{check.query.name}"
    end

    def failing_checks(email, checks)
      @checks = checks
      # add reply_to for mailing lists
      mail to: email, reply_to: email, subject: "#{pluralize(checks.size, "Check")} Failing"
    end
  end
end


text:
Dash Core version 0.14.0.2
==========================

Release is now available from:

  <https://www.dash.org/downloads/#wallets>

This is a new minor version release, bringing various bugfixes.

Please report bugs using the issue tracker at github:

  <https://github.com/dashpay/dash/issues>

Upgrading and downgrading
=========================

How to Upgrade
--------------

If you are running an older version, shut it down. Wait until it has completely
shut down (which might take a few minutes for older versions), then run the
installer (on Windows) or just copy over /Applications/Dash-Qt (on Mac) or
dashd/dash-qt (on Linux). If you upgrade after DIP0003 activation and you were
using version < 0.13 you will have to reindex (start with -reindex-chainstate
or -reindex) to make sure your wallet has all the new data synced. Upgrading from
version 0.13 should not require any additional actions.

Downgrade warning
-----------------

### Downgrade to a version < 0.14.0.0

Downgrading to a version smaller than 0.14 is not supported anymore as DIP8 has
activated on mainnet and testnet.

### Downgrade to versions 0.14.0.0 - 0.14.0.1

Downgrading to older 0.14 releases is fully supported but is not
recommended unless you have some serious issues with version 0.14.0.2.

Notable changes
===============

Performance improvements
------------------------
Slow startup times were observed in older versions. This was due to sub-optimal handling of old
deterministic masternode lists which caused the loading of too many lists into memory. This should be
fixed now.

Fixed excessive memory use
--------------------------
Multiple issues were found which caused excessive use of memory in some situations, especially when
a full reindex was performed, causing the node to crash even when enough RAM was available. This should
be fixed now.

Fixed out-of-sync masternode list UI
------------------------------------
The masternode tab, which shows the masternode list, was not always up-to-date as it missed some internal
updates. This should be fixed now.

0.14.0.2 Change log
===================

See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.14.0.1...dashpay:v0.14.0.2).

- [`d2ff63e8d`](https://github.com/dashpay/dash/commit/d2ff63e8d) Use std::unique_ptr for mnList in CSimplifiedMNList (#3014)
- [`321bbf5af`](https://github.com/dashpay/dash/commit/321bbf5af) Fix excessive memory use when flushing chainstate and EvoDB (#3008)
- [`0410259dd`](https://github.com/dashpay/dash/commit/0410259dd) Fix 2 common Travis failures which happen when Travis has network issues (#3003)
- [`8d763c144`](https://github.com/dashpay/dash/commit/8d763c144) Only load signingActiveQuorumCount + 1 quorums into cache (#3002)
- [`2dc1b06ec`](https://github.com/dashpay/dash/commit/2dc1b06ec) Remove skipped denom from the list on tx commit (#2997)
- [`dff2c851d`](https://github.com/dashpay/dash/commit/dff2c851d) Update manpages for 0.14.0.2 (#2999)
- [`46c4f5844`](https://github.com/dashpay/dash/commit/46c4f5844) Use Travis stages instead of custom timeouts (#2948)
- [`49c37b82a`](https://github.com/dashpay/dash/commit/49c37b82a) Back off for 1m when connecting to quorum masternodes (#2975)
- [`c1f756fd9`](https://github.com/dashpay/dash/commit/c1f756fd9) Multiple speed optimizations for deterministic MN list handling (#2972)
- [`11699f540`](https://github.com/dashpay/dash/commit/11699f540) Process/keep messages/connections from PoSe-banned MNs (#2967)
- [`c5415e746`](https://github.com/dashpay/dash/commit/c5415e746) Fix UI masternode list (#2966)
- [`fb6f0e04d`](https://github.com/dashpay/dash/commit/fb6f0e04d) Bump version to 0.14.0.2 and copy release notes (#2991)

Credits
=======

Thanks to everyone who directly contributed to this release:

- Alexander Block (codablock)
- UdjinM6

As well as everyone that submitted issues and reviewed pull requests.

Older releases
==============

Dash was previously known as Darkcoin.

Darkcoin tree 0.8.x was a fork of Litecoin tree 0.8, original name was XCoin
which was first released on Jan/18/2014.

Darkcoin tree 0.9.x was the open source implementation of masternodes based on
the 0.8.x tree and was first released on Mar/13/2014.

Darkcoin tree 0.10.x used to be the closed source implementation of Darksend
which was released open source on Sep/25/2014.

Dash Core tree 0.11.x was a fork of Bitcoin Core tree 0.9,
Darkcoin was rebranded to Dash.

Dash Core tree 0.12.0.x was a fork of Bitcoin Core tree 0.10.

Dash Core tree 0.12.1.x was a fork of Bitcoin Core tree 0.12.

These release are considered obsolete. Old release notes can be found here:

- [v0.14.0.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.14.0.1.md) released May/31/2019
- [v0.14.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.14.0.md) released May/22/2019
- [v0.13.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.13.3.md) released Apr/04/2019
- [v0.13.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.13.2.md) released Mar/15/2019
- [v0.13.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.13.1.md) released Feb/9/2019
- [v0.13.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.13.0.md) released Jan/14/2019
- [v0.12.3.4](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.4.md) released Dec/14/2018
- [v0.12.3.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.3.md) released Sep/19/2018
- [v0.12.3.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.2.md) released Jul/09/2018
- [v0.12.3.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.1.md) released Jul/03/2018
- [v0.12.2.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.3.md) released Jan/12/2018
- [v0.12.2.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.2.md) released Dec/17/2017
- [v0.12.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.md) released Nov/08/2017
- [v0.12.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.1.md) released Feb/06/2017
- [v0.12.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.0.md) released Aug/15/2015
- [v0.11.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.11.2.md) released Mar/04/2015
- [v0.11.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.11.1.md) released Feb/10/2015
- [v0.11.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.11.0.md) released Jan/15/2015
- [v0.10.x](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.10.0.md) released Sep/25/2014
- [v0.9.x](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.9.0.md) released Mar/13/2014


text:
package uk.co.jemos.maven.plugins.protoc;

import java.io.BufferedReader;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.apache.commons.io.IOUtils;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;

import uk.co.jemos.maven.plugins.utils.JemosProtocPluginUtils;

/**
 * Goal which triggers the generation of proto files from an XSD file
 *
 * @goal generatePojos
 *
 * @phase process-sources
 *
 * @requiresDependencyResolution compile
 */
public class GeneratePojosMojo extends AbstractMojo {

	/**
	 * The current Maven project.
	 *
	 * @parameter default-value="${project}"
	 * @readonly
	 * @required
	 */
	protected MavenProject project;

	/**
	 * A helper used to add resources to the project.
	 *
	 * @component
	 * @required
	 */
	protected MavenProjectHelper projectHelper;

	/**
	 * Location of the file.
	 *
	 * @parameter expression="${inputFolder}"
	 * @required
	 */
	private File inputFolder;

	/**
	 * The location where the generated files will be placed.
	 *
	 * @parameter expression="${outputFolder}"
	 * @required
	 */
	private File outputFolder;

	/**
	 * The full path to the protoc compiler executable
	 *
	 * @parameter expression="${protocExecutable}"
	 *
	 */
	private String protocExecutable;

	public void execute() throws MojoExecutionException {

		if (protocExecutable == null) {
			protocExecutable = JemosProtocPluginUtils.PROTOC_EXECUTABLE;
		}

		if (!outputFolder.exists() || !outputFolder.isDirectory()) {
			getLog().info("Folder: " + outputFolder + " does not exist. Creating one...");
			outputFolder.mkdirs();
			getLog().info("Folder: " + outputFolder + " created.");
		}

		String outputFolderPath = outputFolder.getAbsolutePath().replace('\\', '/');

		String inputFolderPath = inputFolder.getAbsolutePath().replace('\\', '/');
		if (!inputFolderPath.endsWith("/")) {
			inputFolderPath += "/";
		}

		StringBuilder buff = new StringBuilder();
		buff.append("Protoc executable: " + protocExecutable + "\n");
		buff.append("Input Folder: " + inputFolderPath + "\n");
		buff.append("Output folder: " + outputFolderPath + "\n");

		getLog().info(buff.toString());

		List<String> cmdList = new ArrayList<String>();
		cmdList.add(protocExecutable);
		cmdList.add("--proto_path="+inputFolderPath);
		cmdList.add("--java_out="+outputFolderPath);
		File[] protoFiles = new File(inputFolderPath).listFiles(new FilenameFilter() {

			public boolean accept(File dir, String name) {
				return name.toLowerCase().endsWith(".proto");
			}
		});
		for (File protoFile : protoFiles) {
			cmdList.add(protoFile.getPath());
		}

		getLog().debug("Will execute: " + cmdList);

		BufferedReader reader = null;

		try {

			Process p = Runtime.getRuntime().exec(cmdList.toArray(new String[]{}));
			int exitValue = p.waitFor();
			reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
			String line = null;
			while ((line = reader.readLine()) != null) {
				getLog().info(line);
			}

			if (exitValue != 0) {
				throw new MojoExecutionException("Executing "+cmdList.get(0)+" failed with exit value "+exitValue);
			}

			getLog().info("Command: " + cmdList.get(0) + " executed sucsessfully");

			project.addCompileSourceRoot(outputFolder.getAbsolutePath());
			getLog().info("Folder: " + outputFolderPath + " added to the compile source root");

			List<String> excludes = null;
			List<String> includes = Collections.singletonList("**/*.proto");
			projectHelper.addResource(project, inputFolderPath, includes, excludes);
			getLog().info("Added .proto files as resources...");

		} catch (IOException e) {
			throw new MojoExecutionException(
					"An error occurred while executing the protoc command", e);

		} catch (InterruptedException e) {
			throw new MojoExecutionException(
					"An error occurred while executing the protoc command", e);
		} finally {
			IOUtils.closeQuietly(reader);
		}

	}

}


text:
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

package org.mozilla.gecko;

import org.mozilla.gecko.db.BrowserDB;

import android.content.ContentResolver;
import android.database.Cursor;
import android.net.Uri;
import android.os.Handler;
import android.util.Log;

import java.lang.ref.SoftReference;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Set;

class GlobalHistory {
    private static final String LOGTAG = "GeckoGlobalHistory";

    private static GlobalHistory sInstance = new GlobalHistory();

    static GlobalHistory getInstance() {
        return sInstance;
    }

    // this is the delay between receiving a URI check request and processing it.
    // this allows batching together multiple requests and processing them together,
    // which is more efficient.
    private static final long BATCHING_DELAY_MS = 100;

    private final Handler mHandler;                     // a background thread on which we can process requests
    private final Queue<String> mPendingUris;           // URIs that need to be checked
    private SoftReference<Set<String>> mVisitedCache;   // cache of the visited URI list
    private final Runnable mNotifierRunnable;           // off-thread runnable used to check URIs
    private boolean mProcessing; // = false             // whether or not the runnable is queued/working

    private GlobalHistory() {
        mHandler = GeckoAppShell.getHandler();
        mPendingUris = new LinkedList<String>();
        mVisitedCache = new SoftReference<Set<String>>(null);
        mNotifierRunnable = new Runnable() {
            public void run() {
                Set<String> visitedSet = mVisitedCache.get();
                if (visitedSet == null) {
                    // the cache was wiped away, repopulate it
                    Log.w(LOGTAG, "Rebuilding visited link set...");
                    visitedSet = new HashSet<String>();
                    Cursor c = BrowserDB.getAllVisitedHistory(GeckoApp.mAppContext.getContentResolver());
                    if (c.moveToFirst()) {
                        do {
                            visitedSet.add(c.getString(0));
                        } while (c.moveToNext());
                    }
                    mVisitedCache = new SoftReference<Set<String>>(visitedSet);
                    c.close();
                }

                // this runs on the same handler thread as the checkUriVisited code,
                // so no synchronization needed
                while (true) {
                    String uri = mPendingUris.poll();
                    if (uri == null) {
                        break;
                    }
                    if (visitedSet.contains(uri)) {
                        GeckoAppShell.notifyUriVisited(uri);
                    }
                }
                mProcessing = false;
            }
        };
    }

    public void addToGeckoOnly(String uri) {
        Set<String> visitedSet = mVisitedCache.get();
        if (visitedSet != null) {
            visitedSet.add(uri);
        }
        GeckoAppShell.notifyUriVisited(uri);
    }

    // Logic ported from nsNavHistory::CanAddURI.
    // http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/nsNavHistory.cpp#1272
    private boolean canAddURI(String uri) {
        if (uri == null || uri.length() == 0)
            return false;

        // First, heck the most common cases (HTTP, HTTPS) to avoid most of the work.
        if (uri.startsWith("http:") || uri.startsWith("https:"))
            return true;

        String scheme = Uri.parse(uri).getScheme();
        if (scheme == null)
            return false;

        // Now check for all bad things.
        if (scheme.equals("about") ||
            scheme.equals("imap") ||
            scheme.equals("news") ||
            scheme.equals("mailbox") ||
            scheme.equals("moz-anno") ||
            scheme.equals("view-source") ||
            scheme.equals("chrome") ||
            scheme.equals("resource") ||
            scheme.equals("data") ||
            scheme.equals("wyciwyg") ||
            scheme.equals("javascript"))
            return false;

        return true;
    }

    public void add(String uri) {
        if (!canAddURI(uri))
            return;

        BrowserDB.updateVisitedHistory(GeckoApp.mAppContext.getContentResolver(), uri);
        addToGeckoOnly(uri);
    }

    public void update(String uri, String title) {
        if (!canAddURI(uri))
            return;

        ContentResolver resolver = GeckoApp.mAppContext.getContentResolver();
        BrowserDB.updateHistoryTitle(resolver, uri, title);
    }

    public void checkUriVisited(final String uri) {
        mHandler.post(new Runnable() {
            public void run() {
                // this runs on the same handler thread as the processing loop,
                // so no synchronization needed
                mPendingUris.add(uri);
                if (mProcessing) {
                    // there's already a runnable queued up or working away, so
                    // no need to post another
                    return;
                }
                mProcessing = true;
                mHandler.postDelayed(mNotifierRunnable, BATCHING_DELAY_MS);
            }
        });
    }
}


text:
package br.com.wagnersoft.esculapio.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="tiss_tabela")
public class TissTabela implements Comparable<TissTabela>, Serializable {

  private static final long serialVersionUID = 1L;

	@Id
	private String codigo;

	private String descricao;

	@OneToMany(mappedBy="tissTabela")
	private List<TissProcedimento> tissProcedimentos;

	public TissTabela() {
	}

  @Override
  public String toString() {
    return this.getDescricao() == null ? "TABELA" : new StringBuilder(this.getCodigo()).append(" - ").append(this.getDescricao()).toString();
  }

	@Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((codigo == null) ? 0 : codigo.hashCode());
    return result;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    TissTabela other = (TissTabela) obj;
    if (codigo == null) {
      if (other.codigo != null)
        return false;
    } else if (!codigo.equals(other.codigo))
      return false;
    return true;
  }

  @Override
  public int compareTo(TissTabela o) {
    return this.getDescricao().compareTo(o.getDescricao());
  }

  public String getCodigo() {
		return this.codigo;
	}

	public void setCodigo(String codigo) {
		this.codigo = codigo;
	}

	public String getDescricao() {
		return this.descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	public List<TissProcedimento> getTissProcedimentos() {
		return this.tissProcedimentos;
	}

	public void setTissProcedimentos(List<TissProcedimento> tissProcedimentos) {
		this.tissProcedimentos = tissProcedimentos;
	}

	public TissProcedimento addTissProcedimento(TissProcedimento tissProcedimento) {
		getTissProcedimentos().add(tissProcedimento);
		tissProcedimento.setTissTabela(this);

		return tissProcedimento;
	}

	public TissProcedimento removeTissProcedimento(TissProcedimento tissProcedimento) {
		getTissProcedimentos().remove(tissProcedimento);
		tissProcedimento.setTissTabela(null);

		return tissProcedimento;
	}

}


text:
MailStorageBundle
=================

[![SensioLabsInsight](https://insight.sensiolabs.com/projects/d1034f39-d780-426c-b64c-67c1c1a1e0bb/big.png)](https://insight.sensiolabs.com/projects/d1034f39-d780-426c-b64c-67c1c1a1e0bb)

Bundle to store your sent mail

##  Installation:

### Step 1 : composer

```
composer require nuxia/mail-storage-bundle: "dev-master"
```

### Step 2 : MailEntry entity

```yml
# MailEntry.orm.yml
MyApp\Entity\MailEntry:
    type: "entity"
    table: "your__mail_storage_table"
    id:
        id:
            type: "string"
            length: "32"
            generator:
                strategy: "NONE"
    indexes:
        mle_id_i:
            columns: "id"
        mle_object_i:
            columns: "object"
        mle_object_id_i:
            columns: "object_id"
        mle_reference_i:
            columns: "reference"
        mle_language_i:
            columns: "language"
        mle_subject_i:
            columns: "subject"
        mle_status_i:
            columns: "status"
        mle_created_att_i:
            columns: "created_at"
        mle_sent_at_i:
            columns: "sent_at"
```

```php
<?php

//MyApp\Entity\MailEntry.php
class MailEntry extends \Nuxia\MailStorageBundle\Entity\AbstractMailEntry {
    //Some application logic
}
```

Override the container parameter nuxia.mail_storage.mail_entry.class using à compiler pass or a service file.

```yml
# myapp/service.yml
parameters:
    nuxia.mail_storage.mail_entry.class: MyApp\Entity\MailEntry


text:
<?php

return [
    'name'        => 'Bootswatch Journal',
    'description' => 'A (Bootswatch) Bootswatch Journal theme for PyroCMS v3.'
];


text:
namespace SharpVk
{
    /// <summary>
    /// Indicate which dynamic state is taken from dynamic state commands.
    /// </summary>
    public enum DynamicState
    {
        /// <summary>
        /// Indicates that the pViewports state in
        /// PipelineViewportStateCreateInfo will be ignored and must be set
        /// dynamically with flink:vkCmdSetViewport before any draw commands.
        /// The number of viewports used by a pipeline is still specified by
        /// the viewportCount member of PipelineViewportStateCreateInfo.
        /// </summary>
        Viewport = 0,

        /// <summary>
        /// Indicates that the pScissors state in
        /// PipelineViewportStateCreateInfo will be ignored and must be set
        /// dynamically with flink:vkCmdSetScissor before any draw commands.
        /// The number of scissor rectangles used by a pipeline is still
        /// specified by the scissorCount member of
        /// PipelineViewportStateCreateInfo.
        /// </summary>
        Scissor = 1,

        /// <summary>
        /// Indicates that the lineWidth state in
        /// PipelineRasterizationStateCreateInfo will be ignored and must be
        /// set dynamically with flink:vkCmdSetLineWidth before any draw
        /// commands that generate line primitives for the rasterizer.
        /// </summary>
        LineWidth = 2,

        /// <summary>
        /// Indicates that the depthBiasConstantFactor, depthBiasClamp and
        /// depthBiasSlopeFactor states in PipelineRasterizationStateCreateInfo
        /// will be ignored and must be set dynamically with
        /// flink:vkCmdSetDepthBias before any draws are performed with
        /// depthBiasEnable in PipelineRasterizationStateCreateInfo set to
        /// VK_TRUE.
        /// </summary>
        DepthBias = 3,

        /// <summary>
        /// Indicates that the blendConstants state in
        /// PipelineColorBlendStateCreateInfo will be ignored and must be set
        /// dynamically with flink:vkCmdSetBlendConstants before any draws are
        /// performed with a pipeline state with
        /// PipelineColorBlendAttachmentState member blendEnable set to VK_TRUE
        /// and any of the blend functions using a constant blend color.
        /// </summary>
        BlendConstants = 4,

        /// <summary>
        /// Indicates that the minDepthBounds and maxDepthBounds states of
        /// PipelineDepthStencilStateCreateInfo will be ignored and must be set
        /// dynamically with flink:vkCmdSetDepthBounds before any draws are
        /// performed with a pipeline state with
        /// PipelineDepthStencilStateCreateInfo member depthBoundsTestEnable
        /// set to VK_TRUE.
        /// </summary>
        DepthBounds = 5,

        /// <summary>
        /// Indicates that the compareMask state in
        /// PipelineDepthStencilStateCreateInfo for both front and back will be
        /// ignored and must be set dynamically with
        /// flink:vkCmdSetStencilCompareMask before any draws are performed
        /// with a pipeline state with PipelineDepthStencilStateCreateInfo
        /// member stencilTestEnable set to VK_TRUE
        /// </summary>
        StencilCompareMask = 6,

        /// <summary>
        /// Indicates that the writeMask state in
        /// PipelineDepthStencilStateCreateInfo for both front and back will be
        /// ignored and must be set dynamically with
        /// flink:vkCmdSetStencilWriteMask before any draws are performed with
        /// a pipeline state with PipelineDepthStencilStateCreateInfo member
        /// stencilTestEnable set to VK_TRUE
        /// </summary>
        StencilWriteMask = 7,

        /// <summary>
        /// Indicates that the reference state in
        /// PipelineDepthStencilStateCreateInfo for both front and back will be
        /// ignored and must be set dynamically with
        /// flink:vkCmdSetStencilReference before any draws are performed with
        /// a pipeline state with PipelineDepthStencilStateCreateInfo member
        /// stencilTestEnable set to VK_TRUE
        /// </summary>
        StencilReference = 8,

        /// <summary>
        ///
        /// </summary>
        ViewportWScaling = 1000087000,

        /// <summary>
        ///
        /// </summary>
        DiscardRectangle = 1000099000,

        /// <summary>
        ///
        /// </summary>
        SampleLocations = 1000143000,

        /// <summary>
        ///
        /// </summary>
        ViewportShadingRatePalette = 1000164004,

        /// <summary>
        ///
        /// </summary>
        ViewportCoarseSampleOrder = 1000164006,

        /// <summary>
        ///
        /// </summary>
        ExclusiveScissor = 1000205001,

        /// <summary>
        ///
        /// </summary>
        LineStipple = 1000259000,
    }
}


text:
require 'azure_mgmt_advisor'

module Azure::Advisor::Profiles::Latest
  module Mgmt
    RecommendationMetadata = Azure::Advisor::Mgmt::V2020_01_01::RecommendationMetadata
    Configurations = Azure::Advisor::Mgmt::V2020_01_01::Configurations
    Recommendations = Azure::Advisor::Mgmt::V2020_01_01::Recommendations
    Operations = Azure::Advisor::Mgmt::V2020_01_01::Operations
    Suppressions = Azure::Advisor::Mgmt::V2020_01_01::Suppressions

    module Models
      ResourceMetadata = Azure::Advisor::Mgmt::V2020_01_01::Models::ResourceMetadata
      MetadataSupportedValueDetail = Azure::Advisor::Mgmt::V2020_01_01::Models::MetadataSupportedValueDetail
      MetadataEntity = Azure::Advisor::Mgmt::V2020_01_01::Models::MetadataEntity
      MetadataEntityListResult = Azure::Advisor::Mgmt::V2020_01_01::Models::MetadataEntityListResult
      SuppressionContractListResult = Azure::Advisor::Mgmt::V2020_01_01::Models::SuppressionContractListResult
      ConfigurationListResult = Azure::Advisor::Mgmt::V2020_01_01::Models::ConfigurationListResult
      ResourceRecommendationBaseListResult = Azure::Advisor::Mgmt::V2020_01_01::Models::ResourceRecommendationBaseListResult
      ArmErrorResponse = Azure::Advisor::Mgmt::V2020_01_01::Models::ArmErrorResponse
      Resource = Azure::Advisor::Mgmt::V2020_01_01::Models::Resource
      DigestConfig = Azure::Advisor::Mgmt::V2020_01_01::Models::DigestConfig
      OperationDisplayInfo = Azure::Advisor::Mgmt::V2020_01_01::Models::OperationDisplayInfo
      ShortDescription = Azure::Advisor::Mgmt::V2020_01_01::Models::ShortDescription
      OperationEntity = Azure::Advisor::Mgmt::V2020_01_01::Models::OperationEntity
      ARMErrorResponseBody = Azure::Advisor::Mgmt::V2020_01_01::Models::ARMErrorResponseBody
      OperationEntityListResult = Azure::Advisor::Mgmt::V2020_01_01::Models::OperationEntityListResult
      ConfigData = Azure::Advisor::Mgmt::V2020_01_01::Models::ConfigData
      ResourceRecommendationBase = Azure::Advisor::Mgmt::V2020_01_01::Models::ResourceRecommendationBase
      SuppressionContract = Azure::Advisor::Mgmt::V2020_01_01::Models::SuppressionContract
      Scenario = Azure::Advisor::Mgmt::V2020_01_01::Models::Scenario
      CpuThreshold = Azure::Advisor::Mgmt::V2020_01_01::Models::CpuThreshold
      Category = Azure::Advisor::Mgmt::V2020_01_01::Models::Category
      DigestConfigState = Azure::Advisor::Mgmt::V2020_01_01::Models::DigestConfigState
      Impact = Azure::Advisor::Mgmt::V2020_01_01::Models::Impact
      Risk = Azure::Advisor::Mgmt::V2020_01_01::Models::Risk
    end

    #
    # AdvisorManagementClass
    #
    class AdvisorManagementClass
      attr_reader :recommendation_metadata, :configurations, :recommendations, :operations, :suppressions, :configurable, :base_url, :options, :model_classes

      def initialize(options = {})
        if options.is_a?(Hash) && options.length == 0
          @options = setup_default_options
        else
          @options = options
        end

        reset!(options)

        @configurable = self
        @base_url = options[:base_url].nil? ? nil:options[:base_url]
        @options = options[:options].nil? ? nil:options[:options]

        @client_0 = Azure::Advisor::Mgmt::V2020_01_01::AdvisorManagementClient.new(configurable.credentials, base_url, options)
        if(@client_0.respond_to?(:subscription_id))
          @client_0.subscription_id = configurable.subscription_id
        end
        add_telemetry(@client_0)
        @recommendation_metadata = @client_0.recommendation_metadata
        @configurations = @client_0.configurations
        @recommendations = @client_0.recommendations
        @operations = @client_0.operations
        @suppressions = @client_0.suppressions

        @model_classes = ModelClasses.new
      end

      def add_telemetry(client)
        profile_information = 'Profiles/Latest/Advisor/Mgmt'
        client.add_user_agent_information(profile_information)
      end

      def method_missing(method, *args)
        if @client_0.respond_to?method
          @client_0.send(method, *args)
        else
          super
        end
      end

    end

    class ModelClasses
      def resource_metadata
        Azure::Advisor::Mgmt::V2020_01_01::Models::ResourceMetadata
      end
      def metadata_supported_value_detail
        Azure::Advisor::Mgmt::V2020_01_01::Models::MetadataSupportedValueDetail
      end
      def metadata_entity
        Azure::Advisor::Mgmt::V2020_01_01::Models::MetadataEntity
      end
      def metadata_entity_list_result
        Azure::Advisor::Mgmt::V2020_01_01::Models::MetadataEntityListResult
      end
      def suppression_contract_list_result
        Azure::Advisor::Mgmt::V2020_01_01::Models::SuppressionContractListResult
      end
      def configuration_list_result
        Azure::Advisor::Mgmt::V2020_01_01::Models::ConfigurationListResult
      end
      def resource_recommendation_base_list_result
        Azure::Advisor::Mgmt::V2020_01_01::Models::ResourceRecommendationBaseListResult
      end
      def arm_error_response
        Azure::Advisor::Mgmt::V2020_01_01::Models::ArmErrorResponse
      end
      def resource
        Azure::Advisor::Mgmt::V2020_01_01::Models::Resource
      end
      def digest_config
        Azure::Advisor::Mgmt::V2020_01_01::Models::DigestConfig
      end
      def operation_display_info
        Azure::Advisor::Mgmt::V2020_01_01::Models::OperationDisplayInfo
      end
      def short_description
        Azure::Advisor::Mgmt::V2020_01_01::Models::ShortDescription
      end
      def operation_entity
        Azure::Advisor::Mgmt::V2020_01_01::Models::OperationEntity
      end
      def armerror_response_body
        Azure::Advisor::Mgmt::V2020_01_01::Models::ARMErrorResponseBody
      end
      def operation_entity_list_result
        Azure::Advisor::Mgmt::V2020_01_01::Models::OperationEntityListResult
      end
      def config_data
        Azure::Advisor::Mgmt::V2020_01_01::Models::ConfigData
      end
      def resource_recommendation_base
        Azure::Advisor::Mgmt::V2020_01_01::Models::ResourceRecommendationBase
      end
      def suppression_contract
        Azure::Advisor::Mgmt::V2020_01_01::Models::SuppressionContract
      end
      def scenario
        Azure::Advisor::Mgmt::V2020_01_01::Models::Scenario
      end
      def cpu_threshold
        Azure::Advisor::Mgmt::V2020_01_01::Models::CpuThreshold
      end
      def category
        Azure::Advisor::Mgmt::V2020_01_01::Models::Category
      end
      def digest_config_state
        Azure::Advisor::Mgmt::V2020_01_01::Models::DigestConfigState
      end
      def impact
        Azure::Advisor::Mgmt::V2020_01_01::Models::Impact
      end
      def risk
        Azure::Advisor::Mgmt::V2020_01_01::Models::Risk
      end
    end
  end
end


text:
let codeCache = {};

export default function warning(message, code) {
  // This ensures that each warning type is only logged out one time
  if (code) {
    if (codeCache[code]) {
      return;
    }

    codeCache[code] = true;
  }

  if (typeof console !== 'undefined' && typeof console.error === 'function') {
    console.error(message);
  }

  try {
    // This error was thrown as a convenience so that if you enable
    // "break on all exceptions" in your console,
    // it would pause the execution at this line.
    throw new Error(message);
  } catch (e) {
    // Intentionally blank
  }
}

export function resetCodeCache() {
  codeCache = {};
}


text:
layout: post
title: Set Photo with Hot Baby
titleinfo: pornvd
desc: Watch Set Photo with Hot Baby. Pornhub is the ultimate xxx porn and sex site.
---

Set Photo with Hot Baby

Watch Set Photo with Hot Baby. Pornhub is the ultimate xxx porn and sex site.


text:
package salesMarketBehaviours;

import common.AgentDataStore;
import communication.MessageObject;
import interactors.ResponderBehaviour;
import jade.core.behaviours.OneShotBehaviour;

public class TakeFromWarehouseBehaviour extends OneShotBehaviour {

	private static final long serialVersionUID = 4233055394916376580L;

	private String orderText;

	private AgentDataStore dataStore;

	private ResponderBehaviour interactionBehaviour;

	private MessageObject msgObj;

	public TakeFromWarehouseBehaviour(ResponderBehaviour interactionBehaviour, AgentDataStore dataStore) {
		super(interactionBehaviour.getAgent());
		this.dataStore = dataStore;
		this.interactionBehaviour = interactionBehaviour;
	}

	@Override
	public void action() {
		orderText = dataStore.getOrder().getTextOfOrder();

		msgObj = new MessageObject("AgentSalesMarket", orderText);
		dataStore.getAgentPlatform().sendMessageToWebClient(msgObj);
		myAgent.addBehaviour(new TakeFromWarehouseInitiatorBehaviour(interactionBehaviour, dataStore));
	}
}


text:
'use strict';

var EventManager = function () {

  var _eventHandlers = {};

  this.version = "0.0.1";

  /**
   * Register event handler function for a given event name.
   *
   * @param String name Event name.
   * @param Function handler Event handler function.
   */
  this.on = function (name, handler) {

    if (typeof handler !== 'function') {
      throw new Error('handler needs to be a function');
    }

    if (!_eventHandlers[name]) {
      _eventHandlers[name] = [handler];
    } else {
      _eventHandlers[name].push(handler);
    }
  };

  /**
   * Remove handler function registered to named events.
   *
   * @param String name Event name.
   * @param Function handler Event handler function.
   */
  this.off = function (name, handler) {

    if (typeof handler !== 'function') {
      throw new Error('handler needs to be a function');
    }

    var idx;
    if (!_eventHandlers[name] || (idx = _eventHandlers[name].indexOf(handler)) < 0) {
      throw new Error('handler not registered');
    }

    _eventHandlers[name].splice(idx, 1);
  };

  /**
   * Trigger an event with name and an event object. Each handler function registered with
   * the event name will be called with the event object as first parameter.
   *
   * @param String name Event name.
   * @param {} event Event object.
   */
  this.trigger = function (name, event) {
    var _this = this;

    var handlers = _eventHandlers[name];
    if (handlers) {
      handlers.forEach(function (handler) {
        handler.call(_this, event);
      });
    }
  };

  return this;
}.call({});

/**
 * Once the webstrate loaded, receive the WebstratesEventManager object from
 * the parent window. Thereby all windows in the webstrate have access to
 * the same WebstratesEventManager object.
 */
webstrate.on('loaded', function () {
  if (window.parent === window) {
    webstrate.eventManager = EventManager;
  } else {
    var parentWindow = window.parent;
    while (parentWindow && parentWindow.parent !== parentWindow) {
      parentWindow = parentWindow.parent;
    }
    webstrate.eventManager = parentWindow.webstrate.eventManager;
  }
});


text:
namespace PlaylistCopy.Services.Impl
{
    using System.Diagnostics;
    using CuttingEdge.Conditions;
    using PlaylistCopy.Components;
    using System.Collections.Generic;
    using System.Linq;
    using PlaylistCopy.Contract;

    internal class PlaylistService : IPlaylistService
    {
        private readonly IPlaylistImporter playlistImporter;

        private readonly IFileService fileService;

        public PlaylistService(IPlaylistImporter playlistImporter, IFileService fileService)
        {
            this.playlistImporter = playlistImporter;
            this.fileService = fileService;
        }

        public IEnumerable<string> GetAllExtensions()
        {
            return this.playlistImporter.Query().Select(playlist => playlist.PlaylistExtension).ToList();
        }

        public IPlaylist GetPlaylistForFilePath(string filePath)
        {
            Condition.Requires(filePath, "filePath").IsNotNullOrWhiteSpace();

            Debug.Assert(filePath != null, "filePath != null");
            var fileExt = this.fileService.FileExtension(filePath).TrimStart('.');

            return this.playlistImporter.Query().FirstOrDefault(playlist => playlist.PlaylistExtension == fileExt);
        }
    }
}


text: <!-- empty page, it'll be replaced by AngularJS Ctrl. -->


text:
{% from 'util.jinja2.html' import link_tag, script_tag, tracked_link %}
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>dSIPRouter {% block title %}{% endblock %}</title>

  {{ link_tag('bootstrap') }}

  {% block custom_css %}
  {% endblock %}

</head>
<body>

<div class="container">

  {% block body %}
  {% endblock %}

</div>

{% block custom_js %}
{% endblock %}

</body>
</html>


text:
namespace Accidis.WebServices.Models
{
	public sealed class BookingResult
	{
		public string Reference { get; set; }
		public string Password { get; set; }
	}
}


text:
sort_order: 129
tei_id: p.idm239140424848
annotation_count: 0
images:
  small-thumbnail: http://example.com/books/emory:7st9j/pages/readux-rsk:pgcfk/mini-thumbnail/
  json: http://example.com/books/emory:7st9j/pages/readux-rsk:pgcfk/info/
  full: http://example.com/books/emory:7st9j/pages/readux-rsk:pgcfk/fs/
  page: http://example.com/books/emory:7st9j/pages/readux-rsk:pgcfk/single-page/
  thumbnail: http://example.com/books/emory:7st9j/pages/readux-rsk:pgcfk/thumbnail/
title: Page 129
number: 129
permalink: /pages/129/

---

  {% raw %}THE GRIMGRIBBER RIFLE CORPS. 125{% endraw %}

  {% raw %}member walked in, in a white Avaistcoat and a rage ; and Ave{% endraw %}

  {% raw %}had to begin all over again. But still we had a very great{% endraw %}

  {% raw %}success. I had draAvn up a set of rules, based on those of{% endraw %}

  {% raw %}Jack Heatly's former corps, and these met with great{% endraw %}

  {% raw %}approval; an enemy had obtained admission, and he caused{% endraw %}

  {% raw %}some disturbance by uttering a very loud and sarcastic{% endraw %}

  {% raw %}" Hear, hear !" after one of them Avhich inflicted a fine of{% endraw %}

  {% raw %}five shillings for discharging the rifle by accident; and when{% endraw %}

  {% raw %}I sat doAvn, he rose and proceeded to comment on this{% endraw %}

  {% raw %}rule, declaring it absurd to punish a person for an offence{% endraw %}

  {% raw %}committed accidentally. But Jack got up, and in an oration{% endraw %}

  {% raw %}of unexampled eloquence completely demolished our adver¬{% endraw %}

  {% raw %}sary, by proving to him Avhat a consolation it Avould be to{% endraw %}

  {% raw %}the surviving relations of any unfortunate person Avho might{% endraw %}

  {% raw %}be thus killed, to think that the cause of the accident had{% endraw %}

  {% raw %}been made to pay for his carelessness. And then an old{% endraw %}

  {% raw %}gentleman, long resident in the village, and reputed to have{% endraw %}

  {% raw %}been the author of some very spirited verses on the Prince{% endraw %}

  {% raw %}Regent's coronation, Avhich actually found their Avay into{% endraw %}

  {% raw %}print, rose, and recited som.e poetry Avhich he had forged for{% endraw %}

  {% raw %}the occasion, in Avhich Britannia Avas represented as bestOAv-{% endraw %}

  {% raw %}ing croAvns of laurel on each of her " commercial sons ;"{% endraw %}

  {% raw %}and this brought the meeting to a close with a storm of{% endraw %}

  {% raw %}triumph.{% endraw %}

  {% raw %}our council and ITS FUNCTIONS.{% endraw %}

  {% raw %}On a convenient desk outside the meeting-room we had{% endraw %}

  {% raw %}placed a large broadsheet, to Avhich each intending " effec¬{% endraw %}

  {% raw %}tive " member was to sign his name, and before the lecture-{% endraw %}

  {% raw %}hall Avas closed Ave had seventy signatures. The seventy{% endraw %}

  {% raw %}pledged ones met the next day and elected their officers—{% endraw %}

  {% raw %}Jack Heatly, of course, being chosen captain; his brother,{% endraw %}

  {% raw %}lieutenant; and I myself receiving the distinguished post of{% endraw %}

  {% raw %}ensign. To any gentleman content Avith moderate exercise{% endraw %}

  {% raw %}and a good position, I recommend the ensign's berth; his{% endraw %}


text:
/**
 * Simple filter operation handler.
 *
 * @package strainer
 * @author Andrew Sliwinski <andrew@diy.org>
 */

/**
 * Dependencies
 */
var fetch   = require('./fetch');

/**
 * Export
 *
 * @param {Array} Input array.
 * @param {String} Key in string format
 * @param {String, Number, Function} Value for evaluation
 *
 * @return {Array}
 */
module.exports = function (input, key, value, callback) {
    var list = [];
    for (var i = 0; i < input.length; i++) {
        var check = false;
        if (typeof value === 'function') {
            check = value(fetch(input[i], key));
        } else {
            check = fetch(input[i], key) === value;
        }
        if (check) list.push(input[i]);
    }

    if (list.length === 0) return callback(null);
    callback(null, list);
};


text:
/**
 * Admin Stylesheet.
 */

/* === Radio Image Control (Post Layout) === */

#hybrid-post-layout .has-img input[type="radio"] {
	clip:     rect(1px, 1px, 1px, 1px);
	height:   1px;
	overflow: hidden;
	position: absolute !important;
	width:    1px;
}

#hybrid-post-layout img {
	box-sizing: border-box;
	max-width:  100%;
	height:     auto;
	padding:    1px;
	border:     4px solid transparent;
}

	#hybrid-post-layout img:hover,
	#hybrid-post-layout img:focus {
		border-color: #ddd;
	}

	#hybrid-post-layout input:checked + span + img {
		border-color: #00a0d2;
	}


text:
package org.apache.commons.collections4.functors;

import java.io.Serializable;

import org.apache.commons.collections4.Predicate;

/**
 * Abstract base class for quantification predicates, e.g. All, Any, None.
 *
 * @since 4.0
 * @version $Id: AbstractQuantifierPredicate.java 1543167 2013-11-18 21:21:32Z ggregory $
 */
public abstract class AbstractQuantifierPredicate<T> implements PredicateDecorator<T>, Serializable {

    /** Serial version UID */
    private static final long serialVersionUID = -3094696765038308799L;

    /** The array of predicates to call */
    protected final Predicate<? super T>[] iPredicates;

    /**
     * Constructor that performs no validation.
     *
     * @param predicates  the predicates to check, not cloned, not null
     */
    public AbstractQuantifierPredicate(final Predicate<? super T>... predicates) {
        iPredicates = predicates;
    }

    /**
     * Gets the predicates.
     *
     * @return a copy of the predicates
     * @since 3.1
     */
    public Predicate<? super T>[] getPredicates() {
        return FunctorUtils.<T>copy(iPredicates);
    }

}