text:
package org.clinical3po.backendservices.rule.rule;

import org.clinical3po.backendservices.rule.Rule;
import org.clinical3po.backendservices.util.ServiceLocator;
import com.tinkerpop.blueprints.impls.orient.OrientGraph;

import java.util.Map;

/**
 * Created by w.ding on 08/10/14.
 */
public class UpdRuleEvRule extends AbstractRuleRule implements Rule {
    public boolean execute (Object ...objects) throws Exception {
        Map<String, Object> eventMap = (Map<String, Object>) objects[0];
        Map<String, Object> data = (Map<String, Object>) eventMap.get("data");
        updRule(data);
        return true;
    }
}


text:
layout: post
title:  "NUnit 3.13.2 Hotfix Release"
date:   2021-04-27 12:00:00 -0000
categories: news update nunit
---

This release fixes a new issue with the `FixtureLifeCycle` attribute where `IDisposable` test fixtures were not being disposed properly. As always, [@gleb-osokin](https://github.com/gleb-osokin) has been a great help with this new feature.

It also fixes a long-standing performance issue with `CollectionAssert.AreEquivalent` and the `CollectionEquivalentConstraint` when comparing large collections. The deep comparison that NUnit performs on the two collections will always have a worst case bound of O(n^2) but we have optimized it so that the majority of use cases will be closer to O(n).

We've also made significant optimizations to the OR filters for selecting tests using their full name. This dramatically improves test performance for large code bases that use `dotnet test`. Thanks to [@pakrym](https://github.com/pakrym) for his help with this.

See the [release notes](https://docs.nunit.org/articles/nunit/release-notes/framework.html) for more information.

redpajama_set_name: RedPajamaGithub


text:
$(function(){
  new Vue({
      el: '#tienda',

      data: {
          tienda: $data || []
      },

      methods: {
          save: function(){
              this.$http.post('admin/snipcart/save', {tienda_name: this.tienda_name, tienda_descripcion: this.tienda_name},
                function(){
                  UIkit.notify('Tienda have been saved.');
                }).error(function(){
                  UIkit.notify("Oops, something went wrong.");
                })
          }
      }
  });
});


text:
package main

import (
	"os"
	"runtime"

	"github.com/opencontainers/runtime-tools/validation/util"
)

func main() {
	if "windows" == runtime.GOOS {
		util.Skip("non-Windows root.readonly test", map[string]string{"OS": runtime.GOOS})
		os.Exit(0)
	}

	g, err := util.GetDefaultGenerator()
	if err != nil {
		util.Fatal(err)
	}
	g.SetRootReadonly(true)
	err = util.RuntimeInsideValidate(g, nil, nil)
	if err != nil {
		util.Fatal(err)
	}
}


text:
frappe.provide('frappe.request');
frappe.provide('frappe.request.error_handlers');
frappe.request.url = '/';
frappe.request.ajax_count = 0;
frappe.request.waiting_for_ajax = [];

frappe.xcall = function(method, params) {
	return new Promise((resolve, reject) => {
		frappe.call({
			method: method,
			args: params,
			callback: (r) => {
				resolve(r.message);
			},
			error: (r) => {
				reject(r.message);
			}
		});
	});
};

// generic server call (call page, object)
frappe.call = function(opts) {
	if (!frappe.is_online()) {
		frappe.show_alert({
			indicator: 'orange',
			message: __('You are not connected to Internet. Retry after sometime.')
		}, 3);
		opts.always && opts.always();
		return $.ajax();
	}
	if (typeof arguments[0]==='string') {
		opts = {
			method: arguments[0],
			args: arguments[1],
			callback: arguments[2],
			headers: arguments[3]
		}
	}

	if(opts.quiet) {
		opts.no_spinner = true;
	}
	var args = $.extend({}, opts.args);

	// cmd
	if(opts.module && opts.page) {
		args.cmd = opts.module+'.page.'+opts.page+'.'+opts.page+'.'+opts.method;
	} else if(opts.doc) {
		$.extend(args, {
			cmd: "runserverobj",
			docs: frappe.get_doc(opts.doc.doctype, opts.doc.name),
			method: opts.method,
			args: opts.args,
		});
	} else if(opts.method) {
		args.cmd = opts.method;
	}

	var callback = function(data, response_text) {
		if(data.task_id) {
			// async call, subscribe
			frappe.socketio.subscribe(data.task_id, opts);

			if(opts.queued) {
				opts.queued(data);
			}
		}
		else if (opts.callback) {
			// ajax
			return opts.callback(data, response_text);
		}
	}

	let url = opts.url;
	if (!url) {
		url = '/api/method/' + args.cmd;
		if (window.cordova) {
			let host = frappe.request.url;
			host = host.slice(0, host.length - 1);
			url = host + url;
		}
		delete args.cmd;
	}

	return frappe.request.call({
		type: opts.type || "POST",
		args: args,
		success: callback,
		error: opts.error,
		always: opts.always,
		btn: opts.btn,
		freeze: opts.freeze,
		freeze_message: opts.freeze_message,
		headers: opts.headers || {},
		error_handlers: opts.error_handlers || {},
		// show_spinner: !opts.no_spinner,
		async: opts.async,
		url,
	});
}

frappe.request.call = function(opts) {
	frappe.request.prepare(opts);

	var statusCode = {
		200: function(data, xhr) {
			opts.success_callback && opts.success_callback(data, xhr.responseText);
		},
		401: function(xhr) {
			if(frappe.app.session_expired_dialog && frappe.app.session_expired_dialog.display) {
				frappe.app.redirect_to_login();
			} else {
				frappe.app.handle_session_expired();
			}
		},
		404: function(xhr) {
			frappe.msgprint({title:__("Not found"), indicator:'red',
				message: __('The resource you are looking for is not available')});
		},
		403: function(xhr) {
			if (frappe.get_cookie('sid')==='Guest') {
				// session expired
				frappe.app.handle_session_expired();
			}
			else if(xhr.responseJSON && xhr.responseJSON._error_message) {
				frappe.msgprint({
					title:__("Not permitted"), indicator:'red',
					message: xhr.responseJSON._error_message
				});

				xhr.responseJSON._server_messages = null;
			}
			else if (xhr.responseJSON && xhr.responseJSON._server_messages) {
				var _server_messages = JSON.parse(xhr.responseJSON._server_messages);

				// avoid double messages
				if (_server_messages.indexOf(__("Not permitted"))!==-1) {
					return;
				}
			}
			else {
				frappe.msgprint({
					title:__("Not permitted"), indicator:'red',
					message: __('You do not have enough permissions to access this resource. Please contact your manager to get access.')});
			}

		},
		508: function(xhr) {
			frappe.utils.play_sound("error");
			frappe.msgprint({title:__('Please try again'), indicator:'red',
				message:__("Another transaction is blocking this one. Please try again in a few seconds.")});
		},
		413: function(data, xhr) {
			frappe.msgprint({indicator:'red', title:__('File too big'), message:__("File size exceeded the maximum allowed size of {0} MB",
				[(frappe.boot.max_file_size || 5242880) / 1048576])});
		},
		417: function(xhr) {
			var r = xhr.responseJSON;
			if (!r) {
				try {
					r = JSON.parse(xhr.responseText);
				} catch (e) {
					r = xhr.responseText;
				}
			}

			opts.error_callback && opts.error_callback(r);
		},
		501: function(data, xhr) {
			if(typeof data === "string") data = JSON.parse(data);
			opts.error_callback && opts.error_callback(data, xhr.responseText);
		},
		500: function(xhr) {
			frappe.utils.play_sound("error");
			try {
				opts.error_callback && opts.error_callback();
				frappe.request.report_error(xhr, opts);
			} catch (e) {
				frappe.request.report_error(xhr, opts);
			}
		},
		504: function(xhr) {
			frappe.msgprint(__("Request Timed Out"))
			opts.error_callback && opts.error_callback();
		},
		502: function(xhr) {
			frappe.msgprint(__("Internal Server Error"));
		}
	};

	var ajax_args = {
		url: opts.url || frappe.request.url,
		data: opts.args,
		type: opts.type,
		dataType: opts.dataType || 'json',
		async: opts.async,
		headers: Object.assign({
			"X-Frappe-CSRF-Token": frappe.csrf_token,
			"Accept": "application/json",
 			"X-Frappe-CMD": (opts.args && opts.args.cmd  || '') || ''
		}, opts.headers),
		cache: false
	};

	if (opts.args && opts.args.doctype) {
		ajax_args.headers["X-Frappe-Doctype"] = opts.args.doctype;
	}

	frappe.last_request = ajax_args.data;

	return $.ajax(ajax_args)
		.done(function(data, textStatus, xhr) {
			try {
				if(typeof data === "string") data = JSON.parse(data);

				// sync attached docs
				if(data.docs || data.docinfo) {
					frappe.model.sync(data);
				}

				// sync translated messages
				if(data.__messages) {
					$.extend(frappe._messages, data.__messages);
				}

				// callbacks
				var status_code_handler = statusCode[xhr.statusCode().status];
				if (status_code_handler) {
					status_code_handler(data, xhr);
				}
			} catch(e) {
				console.log("Unable to handle success response"); // eslint-disable-line
				console.trace(e); // eslint-disable-line
			}

		})
		.always(function(data, textStatus, xhr) {
			try {
				if(typeof data==="string") {
					data = JSON.parse(data);
				}
				if(data.responseText) {
					var xhr = data;
					data = JSON.parse(data.responseText);
				}
			} catch(e) {
				data = null;
				// pass
			}
			frappe.request.cleanup(opts, data);
			if(opts.always) {
				opts.always(data);
			}
		})
		.fail(function(xhr, textStatus) {
			try {
				var status_code_handler = statusCode[xhr.statusCode().status];
				if (status_code_handler) {
					status_code_handler(xhr);
				} else {
					// if not handled by error handler!
					opts.error_callback && opts.error_callback(xhr);
				}
			} catch(e) {
				console.log("Unable to handle failed response"); // eslint-disable-line
				console.trace(e); // eslint-disable-line
			}
		});
}

// call execute serverside request
frappe.request.prepare = function(opts) {
	$("body").attr("data-ajax-state", "triggered");

	// btn indicator
	if(opts.btn) $(opts.btn).prop("disabled", true);

	// freeze page
	if(opts.freeze) frappe.dom.freeze(opts.freeze_message);

	// stringify args if required
	for(var key in opts.args) {
		if(opts.args[key] && ($.isPlainObject(opts.args[key]) || $.isArray(opts.args[key]))) {
			opts.args[key] = JSON.stringify(opts.args[key]);
		}
	}

	// no cmd?
	if(!opts.args.cmd && !opts.url) {
		console.log(opts)
		throw "Incomplete Request";
	}

	opts.success_callback = opts.success;
	opts.error_callback = opts.error;
	delete opts.success;
	delete opts.error;

}

frappe.request.cleanup = function(opts, r) {
	// stop button indicator
	if(opts.btn) {
		$(opts.btn).prop("disabled", false);
	}

	$("body").attr("data-ajax-state", "complete");

	// un-freeze page
	if(opts.freeze) frappe.dom.unfreeze();

	if(r) {

		// session expired? - Guest has no business here!
		if(r.session_expired || frappe.get_cookie("sid")==="Guest") {
			frappe.app.handle_session_expired();
			return;
		}

		// error handlers
		let global_handlers = frappe.request.error_handlers[r.exc_type] || [];
		let request_handler = opts.error_handlers ? opts.error_handlers[r.exc_type] : null;
		let handlers = [].concat(global_handlers, request_handler).filter(Boolean);

		if (r.exc_type) {
			handlers.forEach(handler => {
				handler(r);
			});
		}

		// show messages
		if(r._server_messages && !opts.silent) {
			// show server messages if no handlers exist
			if (handlers.length === 0) {
				r._server_messages = JSON.parse(r._server_messages);
				frappe.hide_msgprint();
				frappe.msgprint(r._server_messages);
			}
		}

		// show errors
		if(r.exc) {
			r.exc = JSON.parse(r.exc);
			if(r.exc instanceof Array) {
				$.each(r.exc, function(i, v) {
					if(v) {
						console.log(v);
					}
				})
			} else {
				console.log(r.exc);
			}
		}

		// debug messages
		if(r._debug_messages) {
			if(opts.args) {
				console.log("======== arguments ========");
				console.log(opts.args);
				console.log("========")
			}
			$.each(JSON.parse(r._debug_messages), function(i, v) { console.log(v); });
			console.log("======== response ========");
			delete r._debug_messages;
			console.log(r);
			console.log("========");
		}
	}

	frappe.last_response = r;
}

frappe.after_server_call = () => {
	if(frappe.request.ajax_count) {
		return new Promise(resolve => {
			frappe.request.waiting_for_ajax.push(() => {
				resolve();
			});
		});
	} else {
		return null;
	}
};

frappe.after_ajax = function(fn) {
	return new Promise(resolve => {
		if(frappe.request.ajax_count) {
			frappe.request.waiting_for_ajax.push(() => {
				if(fn) fn();
				resolve();
			});
		} else {
			if(fn) fn();
			resolve();
		}
	});
};

frappe.request.report_error = function(xhr, request_opts) {
	var data = JSON.parse(xhr.responseText);
	var exc;
	if (data.exc) {
		try {
			exc = (JSON.parse(data.exc) || []).join("\n");
		} catch (e) {
			exc = data.exc;
		}
		delete data.exc;
	} else {
		exc = "";
	}

	var show_communication = function() {
		var error_report_message = [
			'
Please type some additional information that could help us reproduce this issue:
',
			'

',
			'
',
			'
App Versions
',
			'
' + JSON.stringify(frappe.boot.versions, null, "\t") + '
',
			'
Route
',
			'
' + frappe.get_route_str() + '
',
			'
',
			'
Error Report
',
			'
' + exc + '
',
			'
',
			'
Request Data
',
			'
' + JSON.stringify(request_opts, null, "\t") + '
',
			'
',
			'
Response JSON
',
			'
' + JSON.stringify(data, null, '\t')+ '
'
		].join("\n");

		var communication_composer = new frappe.views.CommunicationComposer({
			subject: 'Error Report [' + frappe.datetime.nowdate() + ']',
			recipients: error_report_email,
			message: error_report_message,
			doc: {
				doctype: "User",
				name: frappe.session.user
			}
		});
		communication_composer.dialog.$wrapper.css("z-index", cint(frappe.msg_dialog.$wrapper.css("z-index")) + 1);
	}

	if (exc) {
		var error_report_email = frappe.boot.error_report_email;

		request_opts = frappe.request.cleanup_request_opts(request_opts);

		// window.msg_dialog = frappe.msgprint({message:error_message, indicator:'red', big: true});

		if (!frappe.error_dialog) {
			frappe.error_dialog = new frappe.ui.Dialog({
				title: 'Server Error',
				primary_action_label: __('Report'),
				primary_action: () => {
					if (error_report_email) {
						show_communication();
					} else {
						frappe.msgprint(__('Support Email Address Not Specified'));
					}
					frappe.error_dialog.hide();
				}
			});
			frappe.error_dialog.wrapper.classList.add('msgprint-dialog');

		}

		let parts = strip(exc).split('\n');

		frappe.error_dialog.$body.html(parts[parts.length - 1]);
		frappe.error_dialog.show();

	}
};

frappe.request.cleanup_request_opts = function(request_opts) {
	var doc = (request_opts.args || {}).doc;
	if (doc) {
		doc = JSON.parse(doc);
		$.each(Object.keys(doc), function(i, key) {
			if (key.indexOf("password")!==-1 && doc[key]) {
				// mask the password
				doc[key] = "*****";
			}
		});
		request_opts.args.doc = JSON.stringify(doc);
	}
	return request_opts;
};

frappe.request.on_error = function(error_type, handler) {
	frappe.request.error_handlers[error_type] = frappe.request.error_handlers[error_type] || [];
	frappe.request.error_handlers[error_type].push(handler);
}

$(document).ajaxSend(function() {
	frappe.request.ajax_count++;
});

$(document).ajaxComplete(function() {
	frappe.request.ajax_count--;
	if(!frappe.request.ajax_count) {
		$.each(frappe.request.waiting_for_ajax || [], function(i, fn) {
			fn();
		});
		frappe.request.waiting_for_ajax = [];
	}
});


text:
module Sinatra
  module SampleApp
    module Helpers

      def enable_global_headers
        content_type :json
        response.headers['Access-Control-Allow-Origin'] = '*'
      end

      def require_logged_in
        redirect('/sessions/new') unless is_authenticated?
      end

      def is_authenticated?
        return !!session[:user_id]
      end

    end
  end
end


text:
package backend

import (
	"fmt"
	"hash/crc32"
	"io"
	"io/ioutil"
	"log"
	"os"
	"path"
	"sync/atomic"
	"time"

	"github.com/boltdb/bolt"
)

var (
	defaultBatchLimit    = 10000
	defaultBatchInterval = 100 * time.Millisecond

	// InitialMmapSize is the initial size of the mmapped region. Setting this larger than
	// the potential max db size can prevent writer from blocking reader.
	// This only works for linux.
	InitialMmapSize = 10 * 1024 * 1024 * 1024
)

type Backend interface {
	BatchTx() BatchTx
	Snapshot() Snapshot
	Hash() (uint32, error)
	// Size returns the current size of the backend.
	Size() int64
	ForceCommit()
	Close() error
}

type Snapshot interface {
	// Size gets the size of the snapshot.
	Size() int64
	// WriteTo writes the snapshot into the given writer.
	WriteTo(w io.Writer) (n int64, err error)
	// Close closes the snapshot.
	Close() error
}

type backend struct {
	db *bolt.DB

	batchInterval time.Duration
	batchLimit    int
	batchTx       *batchTx
	size          int64

	// number of commits since start
	commits int64

	stopc chan struct{}
	donec chan struct{}
}

func New(path string, d time.Duration, limit int) Backend {
	return newBackend(path, d, limit)
}

func NewDefaultBackend(path string) Backend {
	return newBackend(path, defaultBatchInterval, defaultBatchLimit)
}

func newBackend(path string, d time.Duration, limit int) *backend {
	db, err := bolt.Open(path, 0600, boltOpenOptions)
	if err != nil {
		log.Panicf("backend: cannot open database at %s (%v)", path, err)
	}

	b := &backend{
		db: db,

		batchInterval: d,
		batchLimit:    limit,

		stopc: make(chan struct{}),
		donec: make(chan struct{}),
	}
	b.batchTx = newBatchTx(b)
	go b.run()
	return b
}

// BatchTx returns the current batch tx in coalescer. The tx can be used for read and
// write operations. The write result can be retrieved within the same tx immediately.
// The write result is isolated with other txs until the current one get committed.
func (b *backend) BatchTx() BatchTx {
	return b.batchTx
}

// ForceCommit forces the current batching tx to commit.
func (b *backend) ForceCommit() {
	b.batchTx.Commit()
}

func (b *backend) Snapshot() Snapshot {
	b.batchTx.Commit()
	tx, err := b.db.Begin(false)
	if err != nil {
		log.Fatalf("storage: cannot begin tx (%s)", err)
	}
	return &snapshot{tx}
}

func (b *backend) Hash() (uint32, error) {
	h := crc32.New(crc32.MakeTable(crc32.Castagnoli))

	err := b.db.View(func(tx *bolt.Tx) error {
		c := tx.Cursor()
		for next, _ := c.First(); next != nil; next, _ = c.Next() {
			b := tx.Bucket(next)
			if b == nil {
				return fmt.Errorf("cannot get hash of bucket %s", string(next))
			}
			h.Write(next)
			b.ForEach(func(k, v []byte) error {
				h.Write(k)
				h.Write(v)
				return nil
			})
		}
		return nil
	})

	if err != nil {
		return 0, err
	}

	return h.Sum32(), nil
}

func (b *backend) Size() int64 {
	return atomic.LoadInt64(&b.size)
}

func (b *backend) run() {
	defer close(b.donec)

	for {
		select {
		case <-time.After(b.batchInterval):
		case <-b.stopc:
			b.batchTx.CommitAndStop()
			return
		}
		b.batchTx.Commit()
	}
}

func (b *backend) Close() error {
	close(b.stopc)
	<-b.donec
	return b.db.Close()
}

// Commits returns total number of commits since start
func (b *backend) Commits() int64 {
	return atomic.LoadInt64(&b.commits)
}

// NewTmpBackend creates a backend implementation for testing.
func NewTmpBackend(batchInterval time.Duration, batchLimit int) (*backend, string) {
	dir, err := ioutil.TempDir(os.TempDir(), "etcd_backend_test")
	if err != nil {
		log.Fatal(err)
	}
	tmpPath := path.Join(dir, "database")
	return newBackend(tmpPath, batchInterval, batchLimit), tmpPath
}

func NewDefaultTmpBackend() (*backend, string) {
	return NewTmpBackend(defaultBatchInterval, defaultBatchLimit)
}

type snapshot struct {
	*bolt.Tx
}

func (s *snapshot) Close() error { return s.Tx.Rollback() }


text:
const Message = require("../app/db/model").Message;
const MessageStatus = require('../app/db/model').MessageStatus;
const User = require('../app/db/model').User;
const Friend = require('../app/db/model').Friend;

module.exports = function (server) {
    var io = require('socket.io').listen(server);
    var user = {};
    io.sockets.on('connection', function (socket) {
        socket.on("ONLINE", function (data) {
            User.findById(data.userId).then(function (result) {
                result.check = true;
                result.save();

                user[socket.id] = result.id;

            })
        });
        socket.on("JOIN", function (data) {
            socket.join(data.id);
            socket.broadcast.to(data.id).emit('UPDATE_USER_ONLINE');
        });
        socket.on("NEW_MESSAGE", function (data) {
            var message = Message.build({});
            message.userId = parseInt(data.userId);
            message.text = data.text;
            message.messageRoomId = data.id;
            message.save()
                .then(function () {
                    return MessageStatus.findOne({
                        where: {
                            userId: data.friend,
                            fromUserId: parseInt(data.userId)
                        }
                    });

                })
                .then(function (messageStatus) {
                    if (messageStatus) {
                        messageStatus.number += 1;
                    } else {
                        messageStatus = MessageStatus.build({
                            number: 1,
                            userId: data.friend,
                            inMessageRoomId: data.id,
                            fromUserId: parseInt(data.userId)
                        });
                    }
                    return messageStatus.save()
                })
                .then(function () {
                    io.to(data.id.toString()).emit("CREATED_MESSAGE", {
                        name: data.name,
                        avatar: data.avatar,
                        createdAt: message.createdAt,
                        text: message.text,
                        id: data.id,
                        fromUserId: parseInt(data.userId)
                    });
                    socket.broadcast.to(data.id.toString()).emit("CREATED_MESSAGE_STATUS")
                })

        });
        socket.on("LOAD_CHAT_ROOM", function (data) {
            MessageStatus.findOne({
                where: {
                    userId: data.user,
                    fromUserId: data.friend
                }
            }).then(function (messageStatus) {
                if (messageStatus) {
                    messageStatus.number = 0;
                    messageStatus.save().then(function () {
                        io.to(data.room.toString()).emit("STATUS_CHANGE", {
                            room: data.room
                        })
                    })
                }
            })
        });
        socket.on('OFFLINE', function (data) {
            User.findById(data.userId).then(function (user) {
                user.check = false;
                user.save().then(function () {
                    data.rooms.map(function (room) {
                        socket.broadcast.to(room).emit('UPDATE_USER_ONLINE');
                    })
                });
            })

        });
        socket.on('disconnect', function () {
            var id = user[socket.id];
            delete user[socket.id];

            User.findOne({
                where: {
                    id: id
                },
                include: [{
                    model: Friend,
                    as: "friends",
                    foreignKey: "userId"
                }]
            }).then(function (user) {
                if (user) {
                    user.check = false;
                    user.save().then(function () {
                        user.friends.map(function (friend) {
                            if (friend.check) {
                                socket.broadcast.to(friend.messageRoomId.toString()).emit('UPDATE_USER_ONLINE');
                            }
                        })
                    });
                }
            })
        })

    })
};


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>io.logz.log4j2</groupId>
    <artifactId>logzio-log4j2-appender</artifactId>
    <version>0-SNAPSHOT</version>

    <packaging>jar</packaging>
    <name>Logz.io Log4j2 Appender</name>
    <description>Send your logs to your logz.io account in an encrypted, non-blocking manner.</description>
    <url>https://github.com/logzio/logzio-lo4j2-appender</url>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Marina Razumovsky</name>
            <email>marina@logz.io</email>
            <organization>Logz.io</organization>
            <organizationUrl>http://logz.io</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:logzio/logzio-log4j2-appender.git</connection>
        <developerConnection>scm:git:git@github.com:logzio/logzio-log4j2-appender.git</developerConnection>
        <url>https://github.com/logzio/logzio-log4j2-appender</url>
    </scm>

    <properties>
        <logzio-sender-version>1.1.5</logzio-sender-version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.3</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh-nexus</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <minimizeJar>true</minimizeJar>
                    <artifactSet>
                        <includes>
                            <include>io.logz.sender:logzio-sender</include>
                            <include>com.google.guava:guava</include>
                        </includes>
                    </artifactSet>
                    <createDependencyReducedPom>true</createDependencyReducedPom>
                    <relocations>
                        <relocation>
                            <pattern>com.google.common</pattern>
                            <shadedPattern>io.logz.log4j2appender.com.google.common</shadedPattern>
                        </relocation>
                    </relocations>
                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>LICENSE</exclude>
                            </excludes>
                        </filter>
                    </filters>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>io.logz.sender</groupId>
            <artifactId>logzio-sender</artifactId>
            <version>${logzio-sender-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.15.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.17.1</version>
        </dependency>
        <dependency>
            <groupId>io.logz.sender</groupId>
            <artifactId>logzio-sender-test</artifactId>
            <version>${logzio-sender-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>30.0-jre</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
        </dependency>
    </dependencies>
</project>


text:
package org.elasticsearch.mapping;

import org.elasticsearch.index.query.QueryBuilder;

/**
 * Interface used to allow modification of the Query Builder when using QueryHelper to generate the search query.
 */
public interface QueryBuilderAdapter {
    /**
     * Adapt a query.
     *
     * @param queryBuilder A query builder to adapt before adding filters, sort and other post-processing elements to the query.
     * @return The query builder with adaptations.
     */
    QueryBuilder adapt(QueryBuilder queryBuilder);
}


text:
<html>
    <head>
        <title>Kairos</title>
        <?php
        include "../include/include_css.php";
        include "../header/header.php";
        include "../../classes/model/validaOperario.php";
        include "../../classes/model/validaLider.php";
        ?>
        <meta charset="UTF-8">
    </head>
    <body >
        <main class="mdl-layout__content">
            <div id="chartFunc">
            </div>
        </main>
    </body>
    <?php include_once '../include/include_js.php'; ?>
    <script src="../../js/populaCombo.js"></script>
    <script src="../../js/jquery-1.12.0.min.js"></script>
    <script src="../../js/highcharts.js"></script>
    <script src="../../js/exporting.js"></script>
    <script src="../../js/dataGrafico/dataFuncGrafico.js"></script>
</html>


text:
{{--
 * @author      Archie Disono (webmonsph@gmail.com)
 * @link        https://github.com/disono/Laravel-Template
 * @license     https://github.com/disono/Laravel-Template/blob/master/LICENSE
 * @copyright   Webmons Development Studio
--}}

@extends('admin.layouts.master')

@section('content')

{{ $view_title }}

                @include('admin.page.menu')

                        <form action="{{ route('admin.page.update') }}" method="post"
                              v-on:submit.prevent="onFormUpload">
                            {{ csrf_field() }}
                            <input type="hidden" name="id" value="{{ $page->id }}">

                                        Content *
                                        <textarea name="content" id="content"
                                                  class="form-control tiny-editor-content tiny"
                                                  rows="32" placeholder="Content"
                                                  data-validate="required">{!! old('content', $page->content) !!}</textarea>

                                        @if ($errors->has('content'))

{{ $errors->first('content') }}

                                        @endif

                                        Summary
                                        <textarea name="summary" id="summary"
                                                  class="form-control"
                                                  rows="3" data-validate="max:220">{!! old('summary', $page->summary) !!}</textarea>

                                        @if ($errors->has('summary'))

{{ $errors->first('summary') }}

                                        @endif

Page Attributes

                                        Page Name/Title *

                                        <input id="name" type="text"
                                               class="form-control{{ hasInputError($errors, 'name') }}"
                                               name="name" value="{{ old('name', $page->name) }}"
                                               v-model="frmAdminPage.name" @change="adminPageOnNameChange"
                                               data-value="{{ old('name', $page->name) }}"
                                               data-validate="required">

                                        @if ($errors->has('name'))

{{ $errors->first('name') }}

                                        @endif

                                        Slug (Friendly URL Name) *

                                        <input id="slug" type="text"
                                               class="form-control{{ hasInputError($errors, 'slug') }}"
                                               name="slug" value="{{ old('slug', $page->slug) }}"
                                               data-value="{{ old('slug', $page->slug) }}"
                                               v-model="frmAdminPage.slug"
                                               data-validate="required">

                                        @if ($errors->has('slug'))

{{ $errors->first('slug') }}

                                        @endif

                                            Category *

                                        @foreach($categories as $category)

                                                <input type="checkbox" class="material-control-input"
                                                       name="page_category_id[]"
                                                       value="{{ $category->id }}"
                                                       data-parent-id="{{ $category->parent_id }}"
                                                        {{ in_array($category->id, $classifications) ? 'checked' : '' }}>

                                                tab }}px;">
                                                tab }}px;">
                                                    {{ $category->name }}

                                        @endforeach

                                        @if ($errors->has('page_category_id'))

{{ $errors->first('page_category_id') }}

                                        @endif

                                        Tags

                                        <input id="tags" type="text"
                                               class="form-control selectize{{ hasInputError($errors, 'tags') }}"
                                               name="tags" value="{{ old('tags', $page->tags) }}">

                                        @if ($errors->has('tags'))

{{ $errors->first('tags') }}

                                        @endif

                                        Template (Custom Page Design)

                                        <input id="template" type="text"
                                               class="form-control{{ hasInputError($errors, 'template') }}"
                                               name="template" value="{{ old('template', $page->template) }}">

                                        @if ($errors->has('template'))

{{ $errors->first('template') }}

                                        @endif

                                        Cover Photo

                                        cover_photo->primary }}" alt="Cover Photo"
                                             id="_cover_photo"
                                             class="rounded shadow-sm img-fluid"
                                             v-on:click="onImageSelect('#cover_photo', '#_cover_photo')">
                                        <input type="file" name="cover_photo"
                                               accept="image/*"
                                               id="cover_photo" class="form-control is-invalid d-none">

                                            Recommended cover photo size (640px x 360px).

                                        @if ($errors->has('cover_photo'))

{{ $errors->first('cover_photo') }}

                                        @endif

Publishing

                                        Post At

                                        <input id="post_at" type="text"
                                               class="form-control date-picker-no-pass{{ hasInputError($errors, 'post_at') }}"
                                               name="post_at" value="{{ old('post_at', $page->formatted_post_at) }}">

                                        @if ($errors->has('post_at'))

{{ $errors->first('post_at') }}

                                        @endif

                                        Expired At

                                        <input id="expired_at" type="text"
                                               class="form-control date-picker-no-pass{{ hasInputError($errors, 'expired_at') }}"
                                               name="expired_at" value="{{ old('expired_at', $page->formatted_expired_at) }}">

                                        @if ($errors->has('expired_at'))

{{ $errors->first('expired_at') }}

                                        @endif

                                            <input type="checkbox" class="material-control-input"
                                                   value="1"
                                                   name="is_draft" {{ frmIsChecked('is_draft', 1, $page->is_draft) }}>

                                            Save as draft

                                        @if ($errors->has('is_draft'))

{{ $errors->first('is_draft') }}

                                        @endif

                                            <input type="checkbox" class="material-control-input"
                                                   value="1"
                                                   name="is_email_to_subscriber" {{ frmIsChecked('is_email_to_subscriber', 1, $page->is_email_to_subscriber) }}>

                                            Email to subscribers

                                        @if ($errors->has('is_email_to_subscriber'))

{{ $errors->first('is_email_to_subscriber') }}

                                        @endif

                                        SEO Attributes

                                            Description
                                            <textarea name="seo_description" id="seo_description"
                                                      class="form-control"
                                                      rows="3"
                                                      data-validate="max:300">{!! old('seo_description', $page->seo_description) !!}</textarea>

                                            @if ($errors->has('seo_description'))

{{ $errors->first('seo_description') }}

                                            @endif

                                            Keywords

                                            <input id="seo_keywords" type="text"
                                                   class="form-control{{ hasInputError($errors, 'seo_keywords') }}"
                                                   name="seo_keywords"
                                                   value="{{ old('seo_keywords', $page->seo_keywords) }}">

                                            @if ($errors->has('seo_keywords'))

{{ $errors->first('seo_keywords') }}

                                            @endif

                                            Robots

                                            <input id="seo_robots" type="text"
                                                   class="form-control{{ hasInputError($errors, 'seo_robots') }}"
                                                   name="seo_robots" value="{{ old('seo_robots', $page->seo_robots) }}"
                                                   aria-describedby="ogImageHelp">

                                                A robots tag is an element in the HTML of a page that
                                                informs search engines which pages on your site should be
                                                indexed and which should not. e.g. index, follow

                                            @if ($errors->has('seo_robots'))

{{ $errors->first('seo_robots') }}

                                            @endif

                                            og:url

                                            <input id="og_url" type="text"
                                                   class="form-control{{ hasInputError($errors, 'og_url') }}"
                                                   name="og_url" value="{{ old('og_url', $page->og_url) }}">

                                            @if ($errors->has('og_url'))

{{ $errors->first('og_url') }}

                                            @endif

                                            og:type

                                            <input id="og_type" type="text"
                                                   class="form-control{{ hasInputError($errors, 'og_type') }}"
                                                   name="og_type" value="{{ old('og_type', $page->og_type) }}">

                                            @if ($errors->has('og_type'))

{{ $errors->first('og_type') }}

                                            @endif

                                            og:title

                                            <input id="og_title" type="text"
                                                   class="form-control{{ hasInputError($errors, 'og_title') }}"
                                                   name="og_title" value="{{ old('og_title', $page->og_title) }}">

                                            @if ($errors->has('og_title'))

{{ $errors->first('og_title') }}

                                            @endif

                                            og:description
                                            <textarea name="og_description" id="og_description"
                                                      class="form-control"
                                                      rows="3"
                                                      data-validate="max:300">{!! old('og_description', $page->og_description) !!}</textarea>

                                            @if ($errors->has('og_description'))

{{ $errors->first('og_description') }}

                                            @endif

                                            og:image

                                            og_image->primary }}" alt="og:image"
                                                 id="_og_image"
                                                 class="rounded shadow-sm img-fluid"
                                                 v-on:click="onImageSelect('#og_image', '#_og_image')">
                                            <input type="file" name="og_image"
                                                   accept="image/*"
                                                   id="og_image" class="form-control is-invalid d-none">

                                                Recommended cover photo size (1200 x 627) and not more than
                                                5mb.

                                            @if ($errors->has('og_image'))

{{ $errors->first('og_image') }}

                                            @endif

                                    <button type="submit" class="btn btn-raised btn-primary">Save Changes</button>

                        </form>

@endsection


text:
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
define(["require", "exports", "react", "office-ui-fabric-react/lib/Utilities", "office-ui-fabric-react/lib/Dropdown", "office-ui-fabric-react/lib/Toggle", "office-ui-fabric-react/lib/Pickers", "./PeoplePickerExampleData", "es6-promise", "./PeoplePicker.Types.Example.scss"], function (require, exports, React, Utilities_1, Dropdown_1, Toggle_1, Pickers_1, PeoplePickerExampleData_1, es6_promise_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var suggestionProps = {
        suggestionsHeaderText: 'Suggested People',
        noResultsFoundText: 'No results found',
        loadingText: 'Loading'
    };
    var PeoplePickerTypesExample = (function (_super) {
        __extends(PeoplePickerTypesExample, _super);
        function PeoplePickerTypesExample() {
            var _this = _super.call(this) || this;
            _this.contextualMenuItems = [
                {
                    key: 'newItem',
                    icon: 'circlePlus',
                    name: 'New'
                },
                {
                    key: 'upload',
                    icon: 'upload',
                    name: 'Upload'
                },
                {
                    key: 'divider_1',
                    name: '-',
                },
                {
                    key: 'rename',
                    name: 'Rename'
                },
                {
                    key: 'properties',
                    name: 'Properties'
                },
                {
                    key: 'disabled',
                    name: 'Disabled item',
                    disabled: true
                }
            ];
            _this._peopleList = [];
            PeoplePickerExampleData_1.people.forEach(function (persona) {
                var target = {};
                Utilities_1.assign(target, persona, { menuItems: _this.contextualMenuItems });
                _this._peopleList.push(target);
            });
            _this.state = {
                currentPicker: 1,
                delayResults: false
            };
            return _this;
        }
        PeoplePickerTypesExample.prototype.render = function () {
            var currentPicker;
            switch (this.state.currentPicker) {
                case 1:
                    currentPicker = this._renderNormalPicker();
                    break;
                case 2:
                    currentPicker = this._renderCompactPicker();
                    break;
                case 3:
                    currentPicker = this._renderListPicker();
                    break;
                case 4:
                    currentPicker = this._renderPreselectedItemsPicker();
                    break;
                case 5:
                    currentPicker = this._renderLimitedSearch();
                    break;
            }
            return (React.createElement("div", null,
                currentPicker,
                React.createElement("div", { className: 'dropdown-div' },
                    React.createElement(Dropdown_1.Dropdown, { label: 'Select People Picker Type', options: [
                            { key: 1, text: 'Normal' },
                            { key: 2, text: 'Compact' },
                            { key: 3, text: 'Members List' },
                            { key: 4, text: 'Preselected Items' },
                            { key: 5, text: 'Limit Search' }
                        ], selectedKey: this.state.currentPicker, onChanged: this._dropDownSelected }),
                    React.createElement(Toggle_1.Toggle, { label: 'Delay Suggestion Results', defaultChecked: false, onChanged: this._toggleChange }))));
        };
        PeoplePickerTypesExample.prototype._renderListPicker = function () {
            return (React.createElement(Pickers_1.ListPeoplePicker, { onResolveSuggestions: this._onFilterChanged, getTextFromItem: function (persona) { return persona.primaryText; }, className: 'ms-PeoplePicker', pickerSuggestionsProps: suggestionProps, key: 'list' }));
        };
        PeoplePickerTypesExample.prototype._renderNormalPicker = function () {
            return (React.createElement(Pickers_1.NormalPeoplePicker, { onResolveSuggestions: this._onFilterChanged, getTextFromItem: function (persona) { return persona.primaryText; }, pickerSuggestionsProps: suggestionProps, className: 'ms-PeoplePicker', key: 'normal' }));
        };
        PeoplePickerTypesExample.prototype._renderCompactPicker = function () {
            return (React.createElement(Pickers_1.CompactPeoplePicker, { onResolveSuggestions: this._onFilterChanged, getTextFromItem: function (persona) { return persona.primaryText; }, pickerSuggestionsProps: suggestionProps, className: 'ms-PeoplePicker' }));
        };
        PeoplePickerTypesExample.prototype._renderPreselectedItemsPicker = function () {
            return (React.createElement(Pickers_1.CompactPeoplePicker, { onResolveSuggestions: this._onFilterChanged, getTextFromItem: function (persona) { return persona.primaryText; }, className: 'ms-PeoplePicker', defaultSelectedItems: PeoplePickerExampleData_1.people.splice(0, 3), key: 'list', pickerSuggestionsProps: suggestionProps }));
        };
        PeoplePickerTypesExample.prototype._renderLimitedSearch = function () {
            var limitedSearchSuggestionProps = suggestionProps;
            limitedSearchSuggestionProps.searchForMoreText = 'Load all Results';
            return (React.createElement(Pickers_1.CompactPeoplePicker, { onResolveSuggestions: this._onFilterChangedWithLimit, getTextFromItem: function (persona) { return persona.primaryText; }, className: 'ms-PeoplePicker', onGetMoreResults: this._onFilterChanged, pickerSuggestionsProps: limitedSearchSuggestionProps }));
        };
        PeoplePickerTypesExample.prototype._onFilterChanged = function (filterText, currentPersonas, limitResults) {
            if (filterText) {
                var filteredPersonas = this._filterPersonasByText(filterText);
                filteredPersonas = this._removeDuplicates(filteredPersonas, currentPersonas);
                filteredPersonas = limitResults ? filteredPersonas.splice(0, limitResults) : filteredPersonas;
                return this._filterPromise(filteredPersonas);
            }
            else {
                return [];
            }
        };
        PeoplePickerTypesExample.prototype._onFilterChangedWithLimit = function (filterText, currentPersonas) {
            return this._onFilterChanged(filterText, currentPersonas, 3);
        };
        PeoplePickerTypesExample.prototype._filterPromise = function (personasToReturn) {
            if (this.state.delayResults) {
                return this._convertResultsToPromise(personasToReturn);
            }
            else {
                return personasToReturn;
            }
        };
        PeoplePickerTypesExample.prototype._listContainsPersona = function (persona, personas) {
            if (!personas || !personas.length || personas.length === 0) {
                return false;
            }
            return personas.filter(function (item) { return item.primaryText === persona.primaryText; }).length > 0;
        };
        PeoplePickerTypesExample.prototype._filterPersonasByText = function (filterText) {
            var _this = this;
            return this._peopleList.filter(function (item) { return _this._doesTextStartWith(item.primaryText, filterText); });
        };
        PeoplePickerTypesExample.prototype._doesTextStartWith = function (text, filterText) {
            return text.toLowerCase().indexOf(filterText.toLowerCase()) === 0;
        };
        PeoplePickerTypesExample.prototype._convertResultsToPromise = function (results) {
            return new es6_promise_1.Promise(function (resolve, reject) { return setTimeout(function () { return resolve(results); }, 2000); });
        };
        PeoplePickerTypesExample.prototype._removeDuplicates = function (personas, possibleDupes) {
            var _this = this;
            return personas.filter(function (persona) { return !_this._listContainsPersona(persona, possibleDupes); });
        };
        PeoplePickerTypesExample.prototype._toggleChange = function (toggleState) {
            this.setState({ delayResults: toggleState });
        };
        PeoplePickerTypesExample.prototype._dropDownSelected = function (option) {
            this.setState({ currentPicker: option.key });
        };
        return PeoplePickerTypesExample;
    }(Utilities_1.BaseComponent));
    __decorate([
        Utilities_1.autobind
    ], PeoplePickerTypesExample.prototype, "_onFilterChanged", null);
    __decorate([
        Utilities_1.autobind
    ], PeoplePickerTypesExample.prototype, "_onFilterChangedWithLimit", null);
    __decorate([
        Utilities_1.autobind
    ], PeoplePickerTypesExample.prototype, "_toggleChange", null);
    __decorate([
        Utilities_1.autobind
    ], PeoplePickerTypesExample.prototype, "_dropDownSelected", null);
    exports.PeoplePickerTypesExample = PeoplePickerTypesExample;
});

//# sourceMappingURL=PeoplePicker.Types.Example.js.map


text: sap.ui.define(['sap/m/semantic/SemanticButton'],function(S){"use strict";var D=S.extend("sap.m.semantic.DeleteAction",{metadata:{library:"sap.m"}});return D;},true);


text:
<!DOCTYPE HTML>

<title>Uses of Package io.ebean.event.readaudit (ebean api 12.8.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2021-03-18">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

All Classes

SEARCH:
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">

JavaScript is disabled on your browser.

Uses of Package
io.ebean.event.readaudit

Packages that use io.ebean.event.readaudit

Package
Description

io.ebean.config

Configuration settings for Database construction

io.ebean.event.readaudit

Provides Auditing of read events including queries and L2 cache.

Classes in io.ebean.event.readaudit used by io.ebean.config

Class
Description

ReadAuditLogger

Log that the query was executed

ReadAuditPrepare

Set user context information into the read event prior to it being logged.

Classes in io.ebean.event.readaudit used by io.ebean.event.readaudit

Class
Description

ReadAuditQueryPlan

A SQL query and associated keys.

ReadEvent

Read event sent to the ReadEventLogger.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

All Classes

JavaScript is disabled on your browser.

Copyright © 2021. All rights reserved.


text:
namespace base {
class DictionaryValue;
class ListValue;
}

namespace content {
class BlobHandle;
class BrowserContext;
}

namespace extensions {
class Extension;
}

namespace extensions {

// Internal API instance. Primarily used to enable observers to watch for when
// printerProviderInternal API functions are called.
class PrinterProviderInternalAPI : public BrowserContextKeyedAPI {
 public:
  static BrowserContextKeyedAPIFactory<PrinterProviderInternalAPI>*
  GetFactoryInstance();

  explicit PrinterProviderInternalAPI(content::BrowserContext* browser_context);
  ~PrinterProviderInternalAPI() override;

  void AddObserver(PrinterProviderInternalAPIObserver* observer);
  void RemoveObserver(PrinterProviderInternalAPIObserver* observer);

 private:
  friend class BrowserContextKeyedAPIFactory<PrinterProviderInternalAPI>;
  friend class PrinterProviderInternalReportPrintersFunction;
  friend class PrinterProviderInternalReportPrinterCapabilityFunction;
  friend class PrinterProviderInternalReportPrintResultFunction;

  // BrowserContextKeyedAPI implementation.
  static const bool kServiceRedirectedInIncognito = true;
  static const char* service_name() { return "PrinterProviderInternal"; }

  // Notifies observers that a printerProvider.onGetPrintersRequested callback
  // has been called. Called from
  // |PrinterProviderInternalReportPrintersFunction|.
  void NotifyGetPrintersResult(
      const Extension* extension,
      int request_id,
      const PrinterProviderInternalAPIObserver::PrinterInfoVector& printers);

  // Notifies observers that a printerProvider.onGetCapabilityRequested callback
  // has been called. Called from
  // |PrinterProviderInternalReportPrinterCapabilityFunction|.
  void NotifyGetCapabilityResult(const Extension* extension,
                                 int request_id,
                                 const base::DictionaryValue& capability);

  // Notifies observers that a printerProvider.onPrintRequested callback has
  // been called. Called from
  // |PrinterProviderInternalReportPrintResultFunction|.
  void NotifyPrintResult(const Extension* extension,
                         int request_id,
                         core_api::printer_provider_internal::PrintError error);

  ObserverList<PrinterProviderInternalAPIObserver> observers_;

  DISALLOW_COPY_AND_ASSIGN(PrinterProviderInternalAPI);
};

class PrinterProviderInternalReportPrintResultFunction
    : public UIThreadExtensionFunction {
 public:
  PrinterProviderInternalReportPrintResultFunction();

 protected:
  ~PrinterProviderInternalReportPrintResultFunction() override;

  ExtensionFunction::ResponseAction Run() override;

 private:
  DECLARE_EXTENSION_FUNCTION("printerProviderInternal.reportPrintResult",
                             PRINTERPROVIDERINTERNAL_REPORTPRINTRESULT)

  DISALLOW_COPY_AND_ASSIGN(PrinterProviderInternalReportPrintResultFunction);
};

class PrinterProviderInternalReportPrinterCapabilityFunction
    : public UIThreadExtensionFunction {
 public:
  PrinterProviderInternalReportPrinterCapabilityFunction();

 protected:
  ~PrinterProviderInternalReportPrinterCapabilityFunction() override;

  ExtensionFunction::ResponseAction Run() override;

 private:
  DECLARE_EXTENSION_FUNCTION("printerProviderInternal.reportPrinterCapability",
                             PRINTERPROVIDERINTERNAL_REPORTPRINTERCAPABILITY)

  DISALLOW_COPY_AND_ASSIGN(
      PrinterProviderInternalReportPrinterCapabilityFunction);
};

class PrinterProviderInternalReportPrintersFunction
    : public UIThreadExtensionFunction {
 public:
  PrinterProviderInternalReportPrintersFunction();

 protected:
  ~PrinterProviderInternalReportPrintersFunction() override;
  ExtensionFunction::ResponseAction Run() override;

 private:
  DECLARE_EXTENSION_FUNCTION("printerProviderInternal.reportPrinters",
                             PRINTERPROVIDERINTERNAL_REPORTPRINTERS)

  DISALLOW_COPY_AND_ASSIGN(PrinterProviderInternalReportPrintersFunction);
};

class PrinterProviderInternalGetPrintDataFunction
    : public UIThreadExtensionFunction {
 public:
  PrinterProviderInternalGetPrintDataFunction();

 protected:
  ~PrinterProviderInternalGetPrintDataFunction() override;
  ExtensionFunction::ResponseAction Run() override;

 private:
  void OnBlob(const std::string& type,
              int size,
              const scoped_refptr<base::RefCountedMemory>& data,
              scoped_ptr<content::BlobHandle> blob);
  DECLARE_EXTENSION_FUNCTION("printerProviderInternal.getPrintData",
                             PRINTERPROVIDERINTERNAL_GETPRINTDATA)

  DISALLOW_COPY_AND_ASSIGN(PrinterProviderInternalGetPrintDataFunction);
};

}  // namespace extensions

#endif  // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_INTERNAL_PRINTER_PROVIDER_INTERNAL_API_H_


text:
require "rubygems"
require "rails"
require "comfortable_mexican_sofa"
require "comfy_blog"

module ComfyBlog

  module CmsSiteExtensions

    extend ActiveSupport::Concern
    included do
      has_many :blog_posts,
        class_name: "Blog::Post",
        dependent:  :destroy
    end

  end

  class Engine < ::Rails::Engine

    initializer "comfy_blog.configuration" do
      ComfortableMexicanSofa::ViewHooks.add(:navigation, "/comfy/admin/blog/partials/navigation")
      config.to_prepare do
        Comfy::Cms::Site.send :include, ComfyBlog::CmsSiteExtensions
      end
    end

  end

end


text:
package com.github.edipermadi.bcdocs.asn1.string.t61;

import com.github.edipermadi.bcdocs.AbstractTest;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.lang3.RandomStringUtils;
import org.bouncycastle.asn1.DERT61String;
import org.testng.annotations.Test;

import java.io.IOException;

/**
 * ASN.1 Teletex String DER encoding
 *
 * @author Edi Permadi
 */
public class DerEncoding extends AbstractTest {
    @Test
    public void encode() throws IOException {
        final String value = RandomStringUtils.randomAlphanumeric(8);
        final DERT61String obj = new DERT61String(value);
        final byte[] encoded = encodeDer(obj);
        log("t61-string (%s), DER encoded : %s", value, Hex.encodeHexString(encoded));
    }
}


text:
> Not compatible with Vue 2.0, looking for a maintainer for this project.

# vue-smart-table

[![Join the chat at https://gitter.im/gurghet/vue-smart-table](https://badges.gitter.im/gurghet/vue-smart-table.svg)](https://gitter.im/gurghet/vue-smart-table?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![npm](https://img.shields.io/npm/dt/vue-smart-table.svg?maxAge=2592000)](https://www.npmjs.com/package/vue-smart-table)

> Vue Smart Table is a simple but powerful table framework. Every column is a component.

## Usage

Basically you write this

```html
<smart-table
    :auto-load="true"
    body-path="results"
    id-col="id.value"
    endpoint="http://api.randomuser.me/?results=20"
    :header="[
    {key: 'name.first', label: 'name'},
    {key: 'name.last', label: 'surname'},
    {key: 'gender'},
    {key: 'phone+cell', label: 'contacts'},
    {key: 'picture.thumbnail', label: 'avatar'}
    {key: 'nat', label: 'nationality'}
    ]"
    :order-by="['name.first', 'name.last']"
    >
   <src2img col="picture.thumbnail"></src2img><!-- renders pictures -->
   <contacts col="phone+cell"></contacts><!-- custom formatting -->
   <nationality col="nat"></nationality><!-- queries a remote server for country code to country name conversion -->
   <fontawesome col="gender"></fontawesome><!-- font awesome! -->
  </smart-table>
```

and you get this

![vue smart table](https://s32.postimg.org/55yu3qcb9/Schermata_2016_06_26_alle_02_56_51.png)

[Demo](http://codepen.io/gurghet/pen/qNZprz)

## Installation

#### If you use Webpack/Browserify

``` bash
npm install vue-smart-table --save
```

In your app then you write:

``` javascript
import SmartTable from "vue-smart-table"
Vue.component('smart-table', SmartTable)
```
Alternatively you can add it to your components options

``` javascript
import SmartTable from "vue-smart-table"
// ...
components: {
    'smart-table': SmartTable
  }
// ...
```
In Webpack you will have to transpile some `.js` files inside the vue-smart-table, since the `node_modules` directory it's excluded by default in the `vue-cli` template, remember to enable it. This means that if your js loader is like this:

``` javascript
{
  test: /\.js$/,
  loader: 'babel',
  include: projectRoot,
  exclude: /node_modules/ // <-- this needs to be changed
}
```
You will have to spare the folder `node_modules/vue-smart-table/src/components` from exclusion. Just turn the `exclude` property to:

`exclude: /node_modules(?!\/vue-smart-table\/src\/components)/`

#### If you use the <script> tag inside your page

This is ideal if you are using Smart Table as a drop-in component in a bigger project that is *not* based on Vue.js

The `vue-smart-table.js` does not contain `vue` and `vue-resource` dependencies, those will also need to be on the page.

``` html
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-smart-table/2.5.0/vue-smart-table.js"></script>
<!-- or -->
<script src="https://unpkg.com/vue-smart-table@2.5.0/dist/static/vue-smart-table.js"></script>
```

That's it! The component will register itself! Remember do add a `min.js` when going in production.

 ---

After that you can freely use it in your templates:

``` html
<smart-table :body="[{hello:'world'}]"></smart-table>
```

![Smart Table Tutorial in under 20 seconds](http://i.imgur.com/iDhq0MJ.gif)

## Documentation

You will find documentation at the wiki page (although there is no versioning there, so heads up)

[Documentation](https://github.com/gurghet/vue-smart-table/wiki)

For more information visit: http://forum.vuejs.org/topic/4140/vue-smart-table

The format of the `body` prop is like the following:

```
[ { _id: 3 , name: 'John'  , surname: 'Smith' },
  { _id: 92, name: 'Fulano', surname: 'Perro' } ]
```

## Pokédex table

![Smart Table for pokeapi.co](http://i.imgur.com/NonKEgZ.gif)
[____________________________LIVE DEMO](https://jsfiddle.net/gurghet/xpp80yx0/8/)

## Contribute

``` bash
# install dependencies
npm install

# serve demo app with hot reload at localhost:8080
npm run dev

# build standalone with minification
npm run build

# run unit tests
# always run unit tests! D:<
npm run ~unit
# for the body parsing run
npm run ~funit
```

## Roadmap

* [x] Bootsrap/Semantic compatibility
* [x] Derived columns
* [ ] Sorting
  * [x] Client side
  * [ ] Server side
* [ ] Pagination
  * [ ] Client side
  * [ ] Server side
* [x] Inline editing
  * [ ] Inline adding
  * [ ] Inline validation
* [ ] Drag row to reorder
* [ ] Filtering
  * [x] Client side
  * [ ] Server side

## Similar Components

Here is a list of similar components that also display a table:

- [vue-table](https://github.com/ratiw/vue-table)

## Changelog

### 2.5.0

- Complete engine rewrite!
  - Core logic was ~100 lines, now only ~15
  - Such maintainance
  - Many development speed
  - wow!
- [Feature] Client filtering is now supported through the `filter` event

### 2.4.3

- [Fix] Polyfill for find added for Chrome for Android

### 2.4.2

- [Fix] As a workaround for Safari, use explicitly CSS polyfill

### 2.4.1

- [Fix] Added polyfill for CSS.escape
- [Fix] Removed instances of HTMLNodelist.forEach

### 2.4.0

- [Feature] Inline edit capabilities with more advanced components
- Breaking change: format of the `header` prop is changed (`:header="[{key: 'key1', label: 'label'}, {key: 'keyEqualsToLabel'}]"`
- Breaking change: `body-field` => `body-path`
- Bootstrap/Semantic compatibility

### 2.3.1

- [Fix] Shows `_id` column if explicitly set in the header

### 2.3.0

- click column headers to order by that column

### 2.2.1

- again forgot about the dist files -.-

### 2.2.0

- can set body-field to empty string if data is already in an array

### 2.1.1

- forgot to rebuild the dist files -.-

### 2.1.0

- derived columns (`:header="{'home+office+mobile':'contacts'}"`)

### 2.0.0

- completely new body format (see docs)
- auto loading data on startup using the "auto-load" prop
- header can read from nested attributes with dot notation (eg. "name.last")
- ids can now include letters, some signs (._-) and can be null
- body and id fields can be changed through "body-field" and "id-col" props

### 1.0.5

- stains the global scope with SmartTable constructor

### 1.0.4

Working on break dependencies on other modules
- build now yields only two files
- external dependencies now needs to be available in global namespace
    - Ramda
    - jQuery
    - Vue
    - VueResource


text:
package rosa.scanvas.model.client;

import java.util.List;

/**
 * A labeled collection of references to manifests.
 */
public interface ManifestCollection extends ResourceMap {
    String label();

    List<Reference<Manifest>> manifests();
}


text:
// Copyright (c) 2016/17/18/19/20/21/22 Leandro T. C. Melo <ltcmelo@gmail.com>
// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#ifndef PSYCHE_TEXT_SPAN_H__
#define PSYCHE_TEXT_SPAN_H__

#include "../API.h"

#include <ostream>

namespace psy {

/**
 * \brief The TextSpan class.
 *
 * An abstraction representation of an immutable span of text.
 *
 * \attention
 * The memory under which a piece of text is stored is unknown to this class;
 * it is reponsibility of the user to employ this abstraction in consistent manner.
 *
 * \note
 * This API is inspired by that of \c Microsoft.CodeAnalysis.Text.TextSpan
 * from Roslyn, the .NET Compiler Platform.
 */
class PSY_API TextSpan
{
public:
    TextSpan(unsigned int start, unsigned int  end)
        : start_(start)
        , end_(end)
    {}

    /**
     * The start of \c this span.
     */
    unsigned int start() const { return start_; }

    /**
     * The end of \c this span.
     */
    unsigned int end() const { return end_; }

private:
    unsigned int start_;
    unsigned int end_;
};

bool operator==(const TextSpan& a, const TextSpan& b);

std::ostream& operator<<(std::ostream& os, const TextSpan& span);

} // psy

#endif


text:
package gateway

import (
	"net"
	"net/http"
	"os"
	"strconv"
	"sync"
	"sync/atomic"
	"time"

	"github.com/funkygao/gafka/cmd/kateway/meta"
	"github.com/funkygao/golib/ratelimiter"
	"github.com/funkygao/golib/sync2"
	"github.com/funkygao/golib/timewheel"
	log "github.com/funkygao/log4go"
	"github.com/samuel/go-zookeeper/zk"
)

type subServer struct {
	*webServer

	idleConnsWg   sync2.WaitGroupTimeout // wait for all inflight http connections done
	closedConnCh  chan string            // channel of remote addr
	idleConns     map[net.Conn]struct{}
	idleConnsLock sync.Mutex

	auditor log.Logger

	timer *timewheel.TimeWheel

	// websocket heartbeat configuration
	wsReadLimit int64
	wsPongWait  time.Duration

	shutdownOnce sync.Once
	ackShutdown  int32                                          // sync shutdown with ack handlers goroutines
	ackCh        chan ackOffsets                                // client ack'ed offsets
	ackedOffsets map[string]map[string]map[string]map[int]int64 // [cluster][topic][group][partition]: offset

	subMetrics *subMetrics

	badGroupBudget   *ratelimiter.LeakyBuckets
	goodGroupClients map[string]struct{} // key is remote addr(port inclusive)
	goodGroupLock    sync.RWMutex
}

func newSubServer(httpAddr, httpsAddr string, maxClients int, gw *Gateway) *subServer {
	this := &subServer{
		webServer:        newWebServer("sub_server", httpAddr, httpsAddr, maxClients, Options.HttpReadTimeout, gw),
		closedConnCh:     make(chan string, 1<<10),
		idleConns:        make(map[net.Conn]struct{}, 200),
		wsReadLimit:      8 << 10,
		wsPongWait:       time.Minute,
		timer:            timewheel.NewTimeWheel(time.Second, 120),
		badGroupBudget:   ratelimiter.NewLeakyBuckets(3, time.Minute),
		goodGroupClients: make(map[string]struct{}, 100),
		ackShutdown:      0,
		ackCh:            make(chan ackOffsets, 100),
		ackedOffsets:     make(map[string]map[string]map[string]map[int]int64),
	}
	this.subMetrics = NewSubMetrics(this.gw)
	this.waitExitFunc = this.waitExit
	this.connStateFunc = this.connStateHandler

	if this.httpsServer != nil {
		this.httpsServer.ConnState = this.connStateFunc
	}

	if this.httpServer != nil {
		this.httpServer.ConnState = this.connStateFunc
	}

	this.auditor = log.NewDefaultLogger(log.TRACE)
	this.auditor.DeleteFilter("stdout")

	_ = os.Mkdir("audit", os.ModePerm)
	rotateEnabled, discardWhenDiskFull := true, false
	filer := log.NewFileLogWriter("audit/sub_audit.log", rotateEnabled, discardWhenDiskFull, 0644)
	if filer == nil {
		panic("failed to open sub audit log")
	}
	filer.SetFormat("[%d %T] [%L] (%S) %M")
	if Options.LogRotateSize > 0 {
		filer.SetRotateSize(Options.LogRotateSize)
	}
	filer.SetRotateLines(0)
	filer.SetRotateDaily(true)
	this.auditor.AddFilter("file", logLevel, filer)

	return this
}

func (this *subServer) Start() {
	this.gw.wg.Add(1)
	go this.ackCommitter()

	this.subMetrics.Load()
	this.webServer.Start()
}

func (this *subServer) connStateHandler(c net.Conn, cs http.ConnState) {
	switch cs {
	case http.StateNew:
		// Connections begin at StateNew and then
		// transition to either StateActive or StateClosed
		this.idleConnsWg.Add(1)
		atomic.AddInt32(&this.activeConnN, 1)

		if this.gw != nil && !Options.DisableMetrics {
			this.gw.svrMetrics.ConcurrentSub.Inc(1)
		}

	case http.StateActive:
		// StateActive fires before the request has entered a handler
		// and doesn't fire again until the request has been
		// handled.
		// After the request is handled, the state
		// transitions to StateClosed, StateHijacked, or StateIdle.
		this.idleConnsLock.Lock()
		delete(this.idleConns, c)
		this.idleConnsLock.Unlock()

	case http.StateIdle:
		// StateIdle represents a connection that has finished
		// handling a request and is in the keep-alive state, waiting
		// for a new request. Connections transition from StateIdle
		// to either StateActive or StateClosed.
		select {
		case <-this.gw.shutdownCh:
			// actively close the client safely because IO is all done
			c.Close()

			this.idleConnsLock.Lock()
			delete(this.idleConns, c)
			this.idleConnsLock.Unlock()

		default:
			this.idleConnsLock.Lock()
			this.idleConns[c] = struct{}{}
			this.idleConnsLock.Unlock()
		}

	case http.StateHijacked:
		// websocket steals the socket
		this.idleConnsLock.Lock()
		delete(this.idleConns, c)
		this.idleConnsLock.Unlock()

		atomic.AddInt32(&this.activeConnN, -1)

		if this.gw != nil && !Options.DisableMetrics {
			this.gw.svrMetrics.ConcurrentSub.Dec(1)

			this.gw.svrMetrics.ConcurrentSubWs.Inc(1)
		}

	case http.StateClosed:
		if this.gw != nil && !Options.DisableMetrics {
			this.gw.svrMetrics.ConcurrentSub.Dec(1)
		}

		remoteAddr := c.RemoteAddr().String()
		log.Debug("closed from %s", remoteAddr)

		this.goodGroupLock.Lock()
		delete(this.goodGroupClients, remoteAddr)
		this.goodGroupLock.Unlock()

		this.closedConnCh <- remoteAddr

		this.idleConnsWg.Done()
		atomic.AddInt32(&this.activeConnN, -1)

		this.idleConnsLock.Lock()
		delete(this.idleConns, c)
		this.idleConnsLock.Unlock()
	}
}

func (this *subServer) waitExit(exit <-chan struct{}) {
	<-exit

	if this.httpServer != nil {
		// HTTP response will have "Connection: close"
		this.httpServer.SetKeepAlivesEnabled(false)

		// avoid new connections
		if err := this.httpListener.Close(); err != nil {
			log.Error(err.Error())
		}

		log.Trace("%s on %s listener closed", this.name, this.httpServer.Addr)
	}

	if this.httpsServer != nil {
		// HTTP response will have "Connection: close"
		this.httpsServer.SetKeepAlivesEnabled(false)

		// avoid new connections
		if err := this.httpsListener.Close(); err != nil {
			log.Error(err.Error())
		}

		log.Trace("%s on %s listener closed", this.name, this.httpsServer.Addr)
	}

	this.idleConnsLock.Lock()
	t := time.Now().Add(Options.MaxWaitBeforeForceClose)
	for c := range this.idleConns {
		c.SetReadDeadline(t)
	}
	this.idleConnsLock.Unlock()

	if this.idleConnsWg.WaitTimeout(Options.MaxWaitBeforeForceClose) {
		log.Warn("%s waiting for all connected client close timeout: %s",
			this.name, Options.MaxWaitBeforeForceClose)
	} else {
		// perfect shutdown
		log.Trace("%s all connections closed", this.name)
	}

	this.subMetrics.Flush()
	this.timer.Stop()

	this.gw.wg.Done()
	close(this.closed)
}

func (this *subServer) ackCommitter() {
	ticker := time.NewTicker(time.Second * 30)
	defer func() {
		ticker.Stop()
		log.Debug("ack committer done")
		this.gw.wg.Done()
	}()

	var n int64
	const flushPerN int64 = 4000
	for {
		select {
		case <-this.gw.shutdownCh:
			this.shutdownOnce.Do(func() {
				atomic.AddInt32(&this.ackShutdown, -1)

				for {
					// waiting for all ack handlers finish
					if atomic.LoadInt32(&this.ackShutdown) <= -1 {
						break
					}

					time.Sleep(time.Millisecond * 10)
				}
				close(this.ackCh)
			})

		case acks, ok := <-this.ackCh:
			if ok {
				for _, ack := range acks {
					if _, present := this.ackedOffsets[ack.cluster]; !present {
						this.ackedOffsets[ack.cluster] = make(map[string]map[string]map[int]int64)
					}
					if _, present := this.ackedOffsets[ack.cluster][ack.topic]; !present {
						this.ackedOffsets[ack.cluster][ack.topic] = make(map[string]map[int]int64)
					}
					if _, present := this.ackedOffsets[ack.topic][ack.group]; !present {
						this.ackedOffsets[ack.cluster][ack.topic][ack.group] = make(map[int]int64)
					}

					// TODO validation
					this.ackedOffsets[ack.cluster][ack.topic][ack.group][ack.Partition] = ack.Offset
				}

				n++
				if n%flushPerN == 0 {
					// TODO reset the tick timer?
					this.commitOffsets()
				}
			} else {
				// channel buffer drained, flush all offsets
				// zk is still alive, safe to commit offsets
				this.commitOffsets()
				return
			}

		case <-ticker.C:
			this.commitOffsets()
		}
	}

}

func (this *subServer) commitOffsets() {
	for cluster, clusterTopic := range this.ackedOffsets {
		zkcluster := meta.Default.ZkCluster(cluster)

		for topic, groupPartition := range clusterTopic {
			for group, partitionOffset := range groupPartition {
				for partition, offset := range partitionOffset {
					if offset == -1 {
						// this slot is empty
						continue
					}

					log.Debug("cluster[%s] group[%s] commit offset {T:%s/%d O:%d}", cluster, group, topic, partition, offset)

					if err := zkcluster.ResetConsumerGroupOffset(topic, group, strconv.Itoa(partition), offset); err != nil {
						log.Error("cluster[%s] group[%s] commit offset {T:%s/%d O:%d} %v", cluster, group, topic, partition, offset, err)

						if err == zk.ErrNoNode {
							// invalid offset commit request, will not retry
							this.ackedOffsets[cluster][topic][group][partition] = -1
						}
					} else {
						// mark this slot empty
						this.ackedOffsets[cluster][topic][group][partition] = -1
					}
				}
			}
		}
	}

}


text:
static void ExchangedMethod(SEL originalSelector, SEL swizzledSelector, Class class) {
    Method originalMethod = class_getInstanceMethod(class, originalSelector);
    Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
    BOOL didAddMethod =
    class_addMethod(class,
                    originalSelector,
                    method_getImplementation(swizzledMethod),
                    method_getTypeEncoding(swizzledMethod));

    if (didAddMethod) {
        class_replaceMethod(class,
                            swizzledSelector,
                            method_getImplementation(originalMethod),
                            method_getTypeEncoding(originalMethod));
    }
    else {
        method_exchangeImplementations(originalMethod, swizzledMethod);
    }
}

@implementation UIView (HLJIntrinsicContentSize)

+ (void)load{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        Class class = [self class];
        if (@available(iOS 11.0, *)) {
            ExchangedMethod(@selector(intrinsicContentSize), @selector(hlj_HLJIntrinsicContentSize_intrinsicContentSize), class);
        }
    });
}

//UILayoutFittingCompressedSize: 返回合适的最小大小。
//UILayoutFittingExpandedSize: 返回合适的最大大小。
- (CGSize)hlj_HLJIntrinsicContentSize_intrinsicContentSize {
    if (!CGSizeEqualToSize(self.hlj_intrinsicContentSize, CGSizeZero)) {
        return self.hlj_intrinsicContentSize; //UILayoutFittingExpandedSize
    }
    return [self hlj_HLJIntrinsicContentSize_intrinsicContentSize];
}

- (CGSize)hlj_intrinsicContentSize {
    return [objc_getAssociatedObject(self, @selector(hlj_intrinsicContentSize)) CGSizeValue];
}

- (void)setHlj_intrinsicContentSize:(CGSize)hlj_intrinsicContentSize {
    objc_setAssociatedObject(self, @selector(hlj_intrinsicContentSize), @(hlj_intrinsicContentSize), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

@end


text:
package com.intellij.psi.formatter.java;

import com.intellij.formatting.Alignment;
import com.intellij.formatting.Block;
import com.intellij.formatting.Indent;
import com.intellij.formatting.Wrap;
import com.intellij.lang.ASTNode;
import com.intellij.psi.JavaTokenType;
import com.intellij.psi.PsiElement;
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
import com.intellij.psi.util.PsiTreeUtil;

import java.util.List;

import static com.intellij.psi.formatter.java.JavaFormatterUtil.getWrapType;

public class ArrayInitializerBlocksBuilder {
  private final ASTNode myNode;
  private final BlockFactory myBlockFactory;
  private final CommonCodeStyleSettings mySettings;

  public ArrayInitializerBlocksBuilder(ASTNode node, BlockFactory blockFactory) {
    myNode = node;
    myBlockFactory = blockFactory;
    mySettings = myBlockFactory.getSettings();
  }

  public List<Block> buildBlocks() {
    Wrap wrap = Wrap.createWrap(getWrapType(mySettings.ARRAY_INITIALIZER_WRAP), false);
    Alignment alignment = mySettings.ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION ? Alignment.createAlignment() : null;

    ChildrenBlocksBuilder.Config config = new ChildrenBlocksBuilder.Config()
      .setDefaultIndent(Indent.getContinuationWithoutFirstIndent())
      .setIndent(JavaTokenType.RBRACE, Indent.getNoneIndent())
      .setIndent(JavaTokenType.LBRACE, Indent.getNoneIndent())

      .setDefaultWrap(wrap)
      .setNoWrap(JavaTokenType.COMMA)
      .setNoWrap(JavaTokenType.RBRACE)
      .setNoWrap(JavaTokenType.LBRACE)

      .setDefaultAlignment(alignment)
      .setNoAlignment(JavaTokenType.COMMA)
      .setNoAlignment(JavaTokenType.LBRACE)
      .setNoAlignmentIf(JavaTokenType.RBRACE, node -> {
        PsiElement prev = PsiTreeUtil.skipWhitespacesBackward(node.getPsi());
        if (prev == null) return false;
        return prev.getNode().getElementType() != JavaTokenType.COMMA;
      });

    return config.createBuilder().buildNodeChildBlocks(myNode, myBlockFactory);
  }
}


text:
Ext.apply(Ext, {
    /**
     * Returns the current document body as an {@link Ext.Element}.
     * @ignore
     * @member Ext
     * @return Ext.Element The document body
     */
    getHead : function() {
        var head;

        return function() {
            if (head == undefined) {
                head = Ext.get(document.getElementsByTagName("head")[0]);
            }

            return head;
        };
    }()
});

/**
 * @author Ed Spencer
 * @class Ext.data.ScriptTagProxy
 * @extends Ext.data.ServerProxy
 *
 *
ScriptTagProxy is useful when you need to load data from a domain other than the one your application is running
 * on. If your application is running on http://domainA.com it cannot use {@link Ext.data.AjaxProxy Ajax} to load its
 * data from http://domainB.com because cross-domain ajax requests are prohibited by the browser.

 *
 *
We can get around this using a ScriptTagProxy. ScriptTagProxy injects a <script> tag into the DOM whenever
 * an AJAX request would usually be made. Let's say we want to load data from http://domainB.com/users - the script tag
 * that would be injected might look like this:

 *

<script src="http://domainB.com/users?callback=someCallback"></script>

 *
 *
When we inject the tag above, the browser makes a request to that url and includes the response as if it was any
 * other type of JavaScript include. By passing a callback in the url above, we're telling domainB's server that we
 * want to be notified when the result comes in and that it should call our callback function with the data it sends
 * back. So long as the server formats the response to look like this, everything will work:

 *

someCallback({
    users: [
        {
            id: 1,
            name: "Ed Spencer",
            email: "ed@sencha.com"
        }
    ]
});

 *
 *
As soon as the script finishes loading, the 'someCallback' function that we passed in the url is called with the
 * JSON object that the server returned.

 *
 *
ScriptTagProxy takes care of all of this automatically. It formats the url you pass, adding the callback
 * parameter automatically. It even creates a temporary callback function, waits for it to be called and then puts
 * the data into the Proxy making it look just like you loaded it through a normal {@link Ext.data.AjaxProxy AjaxProxy}.
 * Here's how we might set that up:

 *

Ext.regModel('User', {
    fields: ['id', 'name', 'email']
});

var store = new Ext.data.Store({
    model: 'User',
    proxy: {
        type: 'scripttag',
        url : 'http://domainB.com/users'
    }
});

store.load();

 *
 *
That's all we need to do - ScriptTagProxy takes care of the rest. In this case the Proxy will have injected a
 * script tag like this:
 *

<script src="http://domainB.com/users?callback=stcCallback001" id="stcScript001"></script>

 *
 *
Customization

 *
 *
Most parts of this script tag can be customized using the {@link #callbackParam}, {@link #callbackPrefix} and
 * {@link #scriptIdPrefix} configurations. For example:
 *

var store = new Ext.data.Store({
    model: 'User',
    proxy: {
        type: 'scripttag',
        url : 'http://domainB.com/users',
        callbackParam: 'theCallbackFunction',
        callbackPrefix: 'ABC',
        scriptIdPrefix: 'injectedScript'
    }
});

store.load();

 *
 *
Would inject a script tag like this:

 *

<script src="http://domainB.com/users?theCallbackFunction=ABC001" id="injectedScript001"></script>

 *
 *
Implementing on the server side

 *
 *
The remote server side needs to be configured to return data in this format. Here are suggestions for how you
 * might achieve this using Java, PHP and ASP.net:

 *
 *
Java:

 *

boolean scriptTag = false;
String cb = request.getParameter("callback");
if (cb != null) {
    scriptTag = true;
    response.setContentType("text/javascript");
} else {
    response.setContentType("application/x-json");
}
Writer out = response.getWriter();
if (scriptTag) {
    out.write(cb + "(");
}
out.print(dataBlock.toJsonString());
if (scriptTag) {
    out.write(");");
}

 *
 *
PHP:

 *

$callback = $_REQUEST['callback'];

// Create the output object.
$output = array('a' => 'Apple', 'b' => 'Banana');

//start output
if ($callback) {
    header('Content-Type: text/javascript');
    echo $callback . '(' . json_encode($output) . ');';
} else {
    header('Content-Type: application/x-json');
    echo json_encode($output);
}

 *
 *
ASP.net:

 *

String jsonString = "{success: true}";
String cb = Request.Params.Get("callback");
String responseString = "";
if (!String.IsNullOrEmpty(cb)) {
    responseString = cb + "(" + jsonString + ")";
} else {
    responseString = jsonString;
}
Response.Write(responseString);

 *
 */
Ext.data.ScriptTagProxy = Ext.extend(Ext.data.ServerProxy, {
    defaultWriterType: 'base',

    /**
     * @cfg {String} callbackParam (Optional) The name of the parameter to pass to the server which tells
     * the server the name of the callback function set up by the load call to process the returned data object.
     * Defaults to "callback".
The server-side processing must read this parameter value, and generate
     * javascript output which calls this named function passing the data object as its only parameter.
     */
    callbackParam : "callback",

    /**
     * @cfg {String} scriptIdPrefix
     * The prefix string that is used to create a unique ID for the injected script tag element (defaults to 'stcScript')
     */
    scriptIdPrefix: 'stcScript',

    /**
     * @cfg {String} callbackPrefix
     * The prefix string that is used to create a unique callback function name in the global scope. This can optionally
     * be modified to give control over how the callback string passed to the remote server is generated. Defaults to 'stcCallback'
     */
    callbackPrefix: 'stcCallback',

    /**
     * @cfg {String} recordParam
     * The param name to use when passing records to the server (e.g. 'records=someEncodedRecordString').
     * Defaults to 'records'
     */
    recordParam: 'records',

    /**
     * Reference to the most recent request made through this Proxy. Used internally to clean up when the Proxy is destroyed
     * @property lastRequest
     * @type Ext.data.Request
     */
    lastRequest: undefined,

    /**
     * @cfg {Boolean} autoAppendParams True to automatically append the request's params to the generated url. Defaults to true
     */
    autoAppendParams: true,

    constructor: function(){
        this.addEvents(
            /**
             * @event exception
             * Fires when the server returns an exception
             * @param {Ext.data.Proxy} this
             * @param {Ext.data.Request} request The request that was sent
             * @param {Ext.data.Operation} operation The operation that triggered the request
             */
            'exception'
        );

        Ext.data.ScriptTagProxy.superclass.constructor.apply(this, arguments);
    },

    /**
     * @private
     * Performs the read request to the remote domain. ScriptTagProxy does not actually create an Ajax request,
     * instead we write out a


text:
#ifndef _VM_MEMGUARD_H_
#define	_VM_MEMGUARD_H_

#include "opt_vm.h"

struct malloc_type;
struct vm_map;

#ifdef DEBUG_MEMGUARD
unsigned long	memguard_fudge(unsigned long, const struct vm_map *);
void	memguard_init(struct vm_map *);
void 	*memguard_alloc(unsigned long, int);
void	*memguard_realloc(void *, unsigned long, struct malloc_type *, int);
void	memguard_free(void *);
int	memguard_cmp_mtp(struct malloc_type *, unsigned long);
int	memguard_cmp_zone(uma_zone_t);
int	is_memguard_addr(void *);
#else
#define	memguard_fudge(size, xxx)	(size)
#define	memguard_init(map)		do { } while (0)
#define	memguard_alloc(size, flags)	NULL
#define	memguard_realloc(a, s, mtp, f)	NULL
#define	memguard_free(addr)		do { } while (0)
#define	memguard_cmp_mtp(mtp, size)	0
#define	memguard_cmp_zone(zone)		0
#define	is_memguard_addr(addr)		0
#endif

#endif /* _VM_MEMGUARD_H_ */


text:
diff between today and yesterday

#### python
* [facebookresearch/nevergrad](https://github.com/facebookresearch/nevergrad): A Python toolbox for performing gradient-free optimization
* [521xueweihan/HelloGitHub](https://github.com/521xueweihan/HelloGitHub): GitHub
* [samuel-code/faceTracking](https://github.com/samuel-code/faceTracking): this is my blog pages
* [zalandoresearch/flair](https://github.com/zalandoresearch/flair): A very simple framework for state-of-the-art Natural Language Processing (NLP)
* [rg3/youtube-dl](https://github.com/rg3/youtube-dl): Command-line program to download videos from YouTube.com and other video sites
* [harelba/q](https://github.com/harelba/q): q - Run SQL directly on CSV or TSV files

#### go
* [alash3al/redix](https://github.com/alash3al/redix): a very fast persistent pure key - value store, that uses the same redis protocol
* [tsenart/vegeta](https://github.com/tsenart/vegeta): HTTP load testing tool and library. It's over 9000!

#### cpp
* [NVIDIAGameWorks/PhysX](https://github.com/NVIDIAGameWorks/PhysX): NVIDIA PhysX SDK
* [grpc/grpc](https://github.com/grpc/grpc): The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
* [Angelo1211/HybridRenderingEngine](https://github.com/Angelo1211/HybridRenderingEngine): Clustered Forward/Deferred renderer with Physically Based Shading, Image Based Lighting and a whole lot of OpenGL.
* [dnbaker/dashing](https://github.com/dnbaker/dashing): Fast and accurate genomic distances using HyperLoglog
* [cmderdev/cmder](https://github.com/cmderdev/cmder): Lovely console emulator package for Windows
* [BVLC/caffe](https://github.com/BVLC/caffe): Caffe: a fast open framework for deep learning.

#### javascript
* [developit/htm](https://github.com/developit/htm): Hyperscript Tagged Markup: JSX alternative using standard tagged templates, with compiler support.
* [strapi/strapi](https://github.com/strapi/strapi):  Open source Node.js Headless CMS to easily build customisable APIs
* [statsbotco/cubejs-client](https://github.com/statsbotco/cubejs-client):  Serverless Analytics Framework
* [djyde/Picas](https://github.com/djyde/Picas): Generate Project Logo with Google Fonts
* [ljianshu/Blog](https://github.com/ljianshu/Blog):  star watch
* [alibaba/ice](https://github.com/alibaba/ice):   -  100%

#### coffeescript
* [akonwi/git-plus](https://github.com/akonwi/git-plus): vim-fugitive like package for atom. make commits and other git things without the terminal
* [littlebee/git-time-machine](https://github.com/littlebee/git-time-machine): Atom package that allows you to travel back in commit history
* [cloudfoundry-community/node-cfenv](https://github.com/cloudfoundry-community/node-cfenv): easy access to your Cloud Foundry application environment for node
* [artsy/force](https://github.com/artsy/force): The Artsy.net website:
* [fczbkk/css-selector-generator](https://github.com/fczbkk/css-selector-generator): JavaScript object that creates unique CSS selector for given object.
* [slackapi/hubot-slack](https://github.com/slackapi/hubot-slack): Slack Developer Kit for Hubot