// Copyright 2012-present Oliver Eilhard. All rights reserved.
// Use of this source code is governed by a MIT-license.
// See http://olivere.mit-license.org/license.txt for details.

package elastic

// TopHitsAggregation keeps track of the most relevant document
// being aggregated. This aggregator is intended to be used as a
// sub aggregator, so that the top matching documents
// can be aggregated per bucket.
//
// It can effectively be used to group result sets by certain fields via
// a bucket aggregator. One or more bucket aggregators determines by
// which properties a result set get sliced into.
//
// See: https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-aggregations-metrics-top-hits-aggregation.html
type TopHitsAggregation struct {
	searchSource *SearchSource
}

func NewTopHitsAggregation() *TopHitsAggregation {
	return &TopHitsAggregation{
		searchSource: NewSearchSource(),
	}
}

func (a *TopHitsAggregation) From(from int) *TopHitsAggregation {
	a.searchSource = a.searchSource.From(from)
	return a
}

func (a *TopHitsAggregation) Size(size int) *TopHitsAggregation {
	a.searchSource = a.searchSource.Size(size)
	return a
}

func (a *TopHitsAggregation) TrackScores(trackScores bool) *TopHitsAggregation {
	a.searchSource = a.searchSource.TrackScores(trackScores)
	return a
}

func (a *TopHitsAggregation) Explain(explain bool) *TopHitsAggregation {
	a.searchSource = a.searchSource.Explain(explain)
	return a
}

func (a *TopHitsAggregation) Version(version bool) *TopHitsAggregation {
	a.searchSource = a.searchSource.Version(version)
	return a
}

func (a *TopHitsAggregation) NoStoredFields() *TopHitsAggregation {
	a.searchSource = a.searchSource.NoStoredFields()
	return a
}

func (a *TopHitsAggregation) FetchSource(fetchSource bool) *TopHitsAggregation {
	a.searchSource = a.searchSource.FetchSource(fetchSource)
	return a
}

func (a *TopHitsAggregation) FetchSourceContext(fetchSourceContext *FetchSourceContext) *TopHitsAggregation {
	a.searchSource = a.searchSource.FetchSourceContext(fetchSourceContext)
	return a
}

func (a *TopHitsAggregation) DocvalueFields(docvalueFields ...string) *TopHitsAggregation {
	a.searchSource = a.searchSource.DocvalueFields(docvalueFields...)
	return a
}

func (a *TopHitsAggregation) DocvalueField(docvalueField string) *TopHitsAggregation {
	a.searchSource = a.searchSource.DocvalueField(docvalueField)
	return a
}

func (a *TopHitsAggregation) ScriptFields(scriptFields ...*ScriptField) *TopHitsAggregation {
	a.searchSource = a.searchSource.ScriptFields(scriptFields...)
	return a
}

func (a *TopHitsAggregation) ScriptField(scriptField *ScriptField) *TopHitsAggregation {
	a.searchSource = a.searchSource.ScriptField(scriptField)
	return a
}

func (a *TopHitsAggregation) Sort(field string, ascending bool) *TopHitsAggregation {
	a.searchSource = a.searchSource.Sort(field, ascending)
	return a
}

func (a *TopHitsAggregation) SortWithInfo(info SortInfo) *TopHitsAggregation {
	a.searchSource = a.searchSource.SortWithInfo(info)
	return a
}

func (a *TopHitsAggregation) SortBy(sorter ...Sorter) *TopHitsAggregation {
	a.searchSource = a.searchSource.SortBy(sorter...)
	return a
}

func (a *TopHitsAggregation) Highlight(highlight *Highlight) *TopHitsAggregation {
	a.searchSource = a.searchSource.Highlight(highlight)
	return a
}

func (a *TopHitsAggregation) Highlighter() *Highlight {
	return a.searchSource.Highlighter()
}

func (a *TopHitsAggregation) Source() (interface{}, error) {
	// Example:
	// {
	//   "aggs": {
	//       "top_tag_hits": {
	//           "top_hits": {
	//               "sort": [
	//                   {
	//                       "last_activity_date": {
	//                           "order": "desc"
	//                       }
	//                   }
	//               ],
	//               "_source": {
	//                   "include": [
	//                       "title"
	//                   ]
	//               },
	//               "size" : 1
	//           }
	//       }
	//   }
	// }
	// This method returns only the { "top_hits" : { ... } } part.

	source := make(map[string]interface{})
	src, err := a.searchSource.Source()
	if err != nil {
		return nil, err
	}
	source["top_hits"] = src
	return source, nil
}


#/*******************************************************************************
# * Copyright (c) 2018 IBM Corporation and others.
# * All rights reserved. This program and the accompanying materials
# * are made available under the terms of the Eclipse Public License v1.0
# * which accompanies this distribution, and is available at
# * http://www.eclipse.org/legal/epl-v10.html
# *
# * Contributors:
# *     IBM Corporation - initial API and implementation
# *******************************************************************************/
# -------------------------------------------------------------------------------------------------
#
#ISMESSAGEFILE FALSE
#NLS_ENCODING=UNICODE
#NLS_MESSAGEFORMAT_NONE
#

description=A MicroProfile Rest \u00fcgyf\u00e9l specifik\u00e1ci\u00f3 t\u00edpusbiztos mechanizmust biztos\u00edt a RESTful szolg\u00e1ltat\u00e1sok felh\u00edv\u00e1s\u00e1hoz.


Brightness Temperature (Channel 08)

amsua/AMSUA_NOAA17_Brightness_Temp_Channel_8


/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.flink.table.sinks;

import org.apache.flink.annotation.Experimental;
import org.apache.flink.api.common.io.OutputFormat;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.datastream.DataStreamSink;
import org.apache.flink.table.api.Table;

/**
 * Defines an external {@link TableSink} to emit a bounded {@link Table}.
 *
 * @param <T> Type of the bounded {@link OutputFormat} that this {@link TableSink} expects and supports.
 */
@Experimental
public abstract class OutputFormatTableSink<T> implements StreamTableSink<T> {

	/**
	 * Returns an {@link OutputFormat} for writing the data of the table.
	 */
	public abstract OutputFormat<T> getOutputFormat();

	@Override
	public final DataStreamSink<T> consumeDataStream(DataStream<T> dataStream) {
		return dataStream
			.writeUsingOutputFormat(getOutputFormat())
			.setParallelism(dataStream.getParallelism());
	}
}


<?php
/**
 * Standard checkbox field.
 *
 * @since 1.0.0
 *
 * @extends CMB_Field
 *
 * @package WordPress
 * @subpackage Custom Meta Boxes
 */

class CMB_Checkbox extends CMB_Field {

	/**
	 * Print out field HTML - in this case intentionally empty.
	 */
	public function title() {}

	/**
	 * Print out field HTML.
	 */
	public function html() {
		?>

		<input <?php $this->id_attr(); ?> <?php $this->boolean_attr(); ?> <?php $this->class_attr(); ?> type="checkbox" <?php $this->name_attr(); ?>  value="1" <?php checked( $this->get_value() ); ?> />
		<label <?php $this->for_attr(); ?>><?php echo esc_html( $this->title ); ?></label>

		<?php
	}
}


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

class Google_Service_FirebaseRules_FirebaserulesEmpty extends Google_Model
{
}


package me.saket.dank.utils;

import com.ryanharter.auto.value.moshi.MoshiAdapterFactory;
import com.squareup.moshi.JsonAdapter;

@MoshiAdapterFactory
public abstract class AutoValueMoshiAdapterFactory implements JsonAdapter.Factory {

  public static JsonAdapter.Factory create() {
    return new AutoValueMoshi_AutoValueMoshiAdapterFactory();
  }
}


precision highp float;
uniform sampler2D velocity;
uniform float dt;
uniform vec2 px;
varying vec2 uv;

void main(){
    float x0 = texture2D(velocity, uv-vec2(px.x, 0)).x;
    float x1 = texture2D(velocity, uv+vec2(px.x, 0)).x;
    float y0 = texture2D(velocity, uv-vec2(0, px.y)).y;
    float y1 = texture2D(velocity, uv+vec2(0, px.y)).y;
    float divergence = (x1-x0 + y1-y0)*0.5;
    gl_FragColor = vec4(divergence);
}


// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE

(function(mod) {
  if (typeof exports == "object" && typeof module == "object") // CommonJS
    mod(require("../../lib/codemirror"));
  else if (typeof define == "function" && define.amd) // AMD
    define(["../../lib/codemirror"], mod);
  else // Plain browser env
    mod(CodeMirror);
})(function(CodeMirror) {
"use strict";

CodeMirror.defineMode("gas", function(_config, parserConfig) {
  'use strict';

  // If an architecture is specified, its initialization function may
  // populate this array with custom parsing functions which will be
  // tried in the event that the standard functions do not find a match.
  var custom = [];

  // The symbol used to start a line comment changes based on the target
  // architecture.
  // If no architecture is pased in "parserConfig" then only multiline
  // comments will have syntax support.
  var lineCommentStartSymbol = "";

  // These directives are architecture independent.
  // Machine specific directives should go in their respective
  // architecture initialization function.
  // Reference:
  // http://sourceware.org/binutils/docs/as/Pseudo-Ops.html#Pseudo-Ops
  var directives = {
    ".abort" : "builtin",
    ".align" : "builtin",
    ".altmacro" : "builtin",
    ".ascii" : "builtin",
    ".asciz" : "builtin",
    ".balign" : "builtin",
    ".balignw" : "builtin",
    ".balignl" : "builtin",
    ".bundle_align_mode" : "builtin",
    ".bundle_lock" : "builtin",
    ".bundle_unlock" : "builtin",
    ".byte" : "builtin",
    ".cfi_startproc" : "builtin",
    ".comm" : "builtin",
    ".data" : "builtin",
    ".def" : "builtin",
    ".desc" : "builtin",
    ".dim" : "builtin",
    ".double" : "builtin",
    ".eject" : "builtin",
    ".else" : "builtin",
    ".elseif" : "builtin",
    ".end" : "builtin",
    ".endef" : "builtin",
    ".endfunc" : "builtin",
    ".endif" : "builtin",
    ".equ" : "builtin",
    ".equiv" : "builtin",
    ".eqv" : "builtin",
    ".err" : "builtin",
    ".error" : "builtin",
    ".exitm" : "builtin",
    ".extern" : "builtin",
    ".fail" : "builtin",
    ".file" : "builtin",
    ".fill" : "builtin",
    ".float" : "builtin",
    ".func" : "builtin",
    ".global" : "builtin",
    ".gnu_attribute" : "builtin",
    ".hidden" : "builtin",
    ".hword" : "builtin",
    ".ident" : "builtin",
    ".if" : "builtin",
    ".incbin" : "builtin",
    ".include" : "builtin",
    ".int" : "builtin",
    ".internal" : "builtin",
    ".irp" : "builtin",
    ".irpc" : "builtin",
    ".lcomm" : "builtin",
    ".lflags" : "builtin",
    ".line" : "builtin",
    ".linkonce" : "builtin",
    ".list" : "builtin",
    ".ln" : "builtin",
    ".loc" : "builtin",
    ".loc_mark_labels" : "builtin",
    ".local" : "builtin",
    ".long" : "builtin",
    ".macro" : "builtin",
    ".mri" : "builtin",
    ".noaltmacro" : "builtin",
    ".nolist" : "builtin",
    ".octa" : "builtin",
    ".offset" : "builtin",
    ".org" : "builtin",
    ".p2align" : "builtin",
    ".popsection" : "builtin",
    ".previous" : "builtin",
    ".print" : "builtin",
    ".protected" : "builtin",
    ".psize" : "builtin",
    ".purgem" : "builtin",
    ".pushsection" : "builtin",
    ".quad" : "builtin",
    ".reloc" : "builtin",
    ".rept" : "builtin",
    ".sbttl" : "builtin",
    ".scl" : "builtin",
    ".section" : "builtin",
    ".set" : "builtin",
    ".short" : "builtin",
    ".single" : "builtin",
    ".size" : "builtin",
    ".skip" : "builtin",
    ".sleb128" : "builtin",
    ".space" : "builtin",
    ".stab" : "builtin",
    ".string" : "builtin",
    ".struct" : "builtin",
    ".subsection" : "builtin",
    ".symver" : "builtin",
    ".tag" : "builtin",
    ".text" : "builtin",
    ".title" : "builtin",
    ".type" : "builtin",
    ".uleb128" : "builtin",
    ".val" : "builtin",
    ".version" : "builtin",
    ".vtable_entry" : "builtin",
    ".vtable_inherit" : "builtin",
    ".warning" : "builtin",
    ".weak" : "builtin",
    ".weakref" : "builtin",
    ".word" : "builtin"
  };

  var registers = {};

  function x86(_parserConfig) {
    lineCommentStartSymbol = "#";

    registers.ax  = "variable";
    registers.eax = "variable-2";
    registers.rax = "variable-3";

    registers.bx  = "variable";
    registers.ebx = "variable-2";
    registers.rbx = "variable-3";

    registers.cx  = "variable";
    registers.ecx = "variable-2";
    registers.rcx = "variable-3";

    registers.dx  = "variable";
    registers.edx = "variable-2";
    registers.rdx = "variable-3";

    registers.si  = "variable";
    registers.esi = "variable-2";
    registers.rsi = "variable-3";

    registers.di  = "variable";
    registers.edi = "variable-2";
    registers.rdi = "variable-3";

    registers.sp  = "variable";
    registers.esp = "variable-2";
    registers.rsp = "variable-3";

    registers.bp  = "variable";
    registers.ebp = "variable-2";
    registers.rbp = "variable-3";

    registers.ip  = "variable";
    registers.eip = "variable-2";
    registers.rip = "variable-3";

    registers.cs  = "keyword";
    registers.ds  = "keyword";
    registers.ss  = "keyword";
    registers.es  = "keyword";
    registers.fs  = "keyword";
    registers.gs  = "keyword";
  }

  function armv6(_parserConfig) {
    // Reference:
    // http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf
    // http://infocenter.arm.com/help/topic/com.arm.doc.ddi0301h/DDI0301H_arm1176jzfs_r0p7_trm.pdf
    lineCommentStartSymbol = "@";
    directives.syntax = "builtin";

    registers.r0  = "variable";
    registers.r1  = "variable";
    registers.r2  = "variable";
    registers.r3  = "variable";
    registers.r4  = "variable";
    registers.r5  = "variable";
    registers.r6  = "variable";
    registers.r7  = "variable";
    registers.r8  = "variable";
    registers.r9  = "variable";
    registers.r10 = "variable";
    registers.r11 = "variable";
    registers.r12 = "variable";

    registers.sp  = "variable-2";
    registers.lr  = "variable-2";
    registers.pc  = "variable-2";
    registers.r13 = registers.sp;
    registers.r14 = registers.lr;
    registers.r15 = registers.pc;

    custom.push(function(ch, stream) {
      if (ch === '#') {
        stream.eatWhile(/\w/);
        return "number";
      }
    });
  }

  var arch = (parserConfig.architecture || "x86").toLowerCase();
  if (arch === "x86") {
    x86(parserConfig);
  } else if (arch === "arm" || arch === "armv6") {
    armv6(parserConfig);
  }

  function nextUntilUnescaped(stream, end) {
    var escaped = false, next;
    while ((next = stream.next()) != null) {
      if (next === end && !escaped) {
        return false;
      }
      escaped = !escaped && next === "\\";
    }
    return escaped;
  }

  function clikeComment(stream, state) {
    var maybeEnd = false, ch;
    while ((ch = stream.next()) != null) {
      if (ch === "/" && maybeEnd) {
        state.tokenize = null;
        break;
      }
      maybeEnd = (ch === "*");
    }
    return "comment";
  }

  return {
    startState: function() {
      return {
        tokenize: null
      };
    },

    token: function(stream, state) {
      if (state.tokenize) {
        return state.tokenize(stream, state);
      }

      if (stream.eatSpace()) {
        return null;
      }

      var style, cur, ch = stream.next();

      if (ch === "/") {
        if (stream.eat("*")) {
          state.tokenize = clikeComment;
          return clikeComment(stream, state);
        }
      }

      if (ch === lineCommentStartSymbol) {
        stream.skipToEnd();
        return "comment";
      }

      if (ch === '"') {
        nextUntilUnescaped(stream, '"');
        return "string";
      }

      if (ch === '.') {
        stream.eatWhile(/\w/);
        cur = stream.current().toLowerCase();
        style = directives[cur];
        return style || null;
      }

      if (ch === '=') {
        stream.eatWhile(/\w/);
        return "tag";
      }

      if (ch === '{') {
        return "braket";
      }

      if (ch === '}') {
        return "braket";
      }

      if (/\d/.test(ch)) {
        if (ch === "0" && stream.eat("x")) {
          stream.eatWhile(/[0-9a-fA-F]/);
          return "number";
        }
        stream.eatWhile(/\d/);
        return "number";
      }

      if (/\w/.test(ch)) {
        stream.eatWhile(/\w/);
        if (stream.eat(":")) {
          return 'tag';
        }
        cur = stream.current().toLowerCase();
        style = registers[cur];
        return style || null;
      }

      for (var i = 0; i < custom.length; i++) {
        style = custom[i](ch, stream, state);
        if (style) {
          return style;
        }
      }
    },

    lineComment: lineCommentStartSymbol,
    blockCommentStart: "/*",
    blockCommentEnd: "*/"
  };
});

});


#import "GPUImageMaskFilter.h"

#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
NSString *const kGPUImageMaskShaderString = SHADER_STRING
(
 varying highp vec2 textureCoordinate;
 varying highp vec2 textureCoordinate2;

 uniform sampler2D inputImageTexture;
 uniform sampler2D inputImageTexture2;

 void main()
 {
	 lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate);
	 lowp vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2);

	 //Averages mask's the RGB values, and scales that value by the mask's alpha
	 //
	 //The dot product should take fewer cycles than doing an average normally
	 //
	 //Typical/ideal case, R,G, and B will be the same, and Alpha will be 1.0
	 lowp float newAlpha = dot(textureColor2.rgb, vec3(.33333334, .33333334, .33333334)) * textureColor2.a;

	 gl_FragColor = vec4(textureColor.xyz, newAlpha);
//	 gl_FragColor = vec4(textureColor2);
 }
);
#else
NSString *const kGPUImageMaskShaderString = SHADER_STRING
(
 varying vec2 textureCoordinate;
 varying vec2 textureCoordinate2;

 uniform sampler2D inputImageTexture;
 uniform sampler2D inputImageTexture2;

 void main()
 {
	 vec4 textureColor = texture2D(inputImageTexture, textureCoordinate);
	 vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2);

	 //Averages mask's the RGB values, and scales that value by the mask's alpha
	 //
	 //The dot product should take fewer cycles than doing an average normally
	 //
	 //Typical/ideal case, R,G, and B will be the same, and Alpha will be 1.0
	 float newAlpha = dot(textureColor2.rgb, vec3(.33333334, .33333334, .33333334)) * textureColor2.a;

	 gl_FragColor = vec4(textureColor.xyz, newAlpha);
     //	 gl_FragColor = vec4(textureColor2);
 }
);
#endif

@implementation GPUImageMaskFilter

- (id)init;
{
    if (!(self = [super initWithFragmentShaderFromString:kGPUImageMaskShaderString]))
    {
		return nil;
    }

    return self;
}

- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates;
{
    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    [super renderToTextureWithVertices:vertices textureCoordinates:textureCoordinates];
    glDisable(GL_BLEND);
}

@end


# The mpn functions need a #define for asm syntax flavor.
# Every i386 port in use uses gas syntax (I think).
asm-CPPFLAGS += -DGAS_SYNTAX

# The i386 `long double' is a distinct type we support.
long-double-fcts = yes

ifeq ($(subdir),math)
# These functions change the rounding mode internally and need to
# update both the SSE2 rounding mode and the 387 rounding mode.  See
# the handling of MATH_SET_BOTH_ROUNDING_MODES in
# sysdeps/i386/fpu/fenv_private.h.
CFLAGS-e_gamma_r.c += -DMATH_SET_BOTH_ROUNDING_MODES
endif

ifeq ($(subdir),string)
sysdep_routines += cacheinfo
endif

ifeq ($(subdir),gmon)
sysdep_routines += i386-mcount
endif

ifeq ($(subdir),elf)
CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
CFLAGS-dl-load.c += -Wno-unused
CFLAGS-dl-reloc.c += -Wno-unused
endif

ifeq ($(subdir),csu)
gen-as-const-headers += link-defines.sym
else
stack-align-test-flags += -malign-double
endif

ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS)))
defines += -DNO_TLS_DIRECT_SEG_REFS
endif

ifeq ($(subdir),elf)
sysdep-dl-routines += tlsdesc dl-tlsdesc

tests += tst-audit3
modules-names += tst-auditmod3a tst-auditmod3b

$(objpfx)tst-audit3: $(objpfx)tst-auditmod3a.so
$(objpfx)tst-audit3.out: $(objpfx)tst-auditmod3b.so
tst-audit3-ENV = LD_AUDIT=$(objpfx)tst-auditmod3b.so
endif

ifeq ($(subdir),csu)
gen-as-const-headers += tlsdesc.sym
endif

# Make sure no code in ld.so uses mm/xmm/ymm/zmm registers on i386 since
# the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters
# which must be preserved.
# With SSE disabled, ensure -fpmath is not set to use sse either.
rtld-CFLAGS += -mno-sse -mno-mmx -mfpmath=387
ifeq ($(subdir),elf)
CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
		   $(rtld-CFLAGS))

tests-special += $(objpfx)tst-ld-sse-use.out
$(objpfx)tst-ld-sse-use.out: ../sysdeps/i386/tst-ld-sse-use.sh $(objpfx)ld.so
	@echo "Checking ld.so for SSE register use.  This will take a few seconds..."
	$(BASH) $< $(objpfx) '$(NM)' '$(OBJDUMP)' '$(READELF)' > $@; \
	$(evaluate-test)
else
CFLAGS-.os += $(if $(filter rtld-%.os,$(@F)), $(rtld-CFLAGS))
endif


<?php
/**
 * Sastrawi (https://github.com/sastrawi/sastrawi)
 *
 * @link      http://github.com/sastrawi/sastrawi for the canonical source repository
 * @license   https://github.com/sastrawi/sastrawi/blob/master/LICENSE The MIT License (MIT)
 */

namespace SastrawiTest\Morphology\Disambiguator;

/**
 * Disambiguate Prefix Rule 34
 * Rule 34 : peCP -> pe-CP where C != {r|w|y|l|m|n} and P != 'er'
 */

class DisambiguatorPrefixRule34Test extends \PHPUnit_Framework_TestCase
{
    public function setUp()
    {
        $this->subject = new \Sastrawi\Morphology\Disambiguator\DisambiguatorPrefixRule34();
    }

    public function testDisambiguate()
    {
        $this->assertEquals('tarung', $this->subject->disambiguate('petarung'));
    }
}


# $NetBSD: buildlink3.mk,v 1.3 2009/03/20 19:24:09 joerg Exp $
#

.include "../../editors/emacs/modules.mk"
.if ${EMACS_FLAVOR} == "emacs"

BUILDLINK_TREE+=	apel

.if !defined(APEL_BUILDLINK3_MK)
APEL_BUILDLINK3_MK:=

BUILDLINK_API_DEPENDS.apel+=	${EMACS_PKGNAME_PREFIX}apel>=10
BUILDLINK_PKGSRCDIR.apel?=	../../devel/apel

BUILDLINK_CONTENTS_FILTER.apel=	${EGREP} '.*\.el$$|.*\.elc$$'

.else

# XEmacs has apel in xemacs-packages
EMACS_MODULES+=		base

.endif
.endif # APEL_BUILDLINK3_MK

BUILDLINK_TREE+=	-apel


// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build go1.8

package http2

import (
	"crypto/tls"
	"io"
	"net/http"
)

func cloneTLSConfig(c *tls.Config) *tls.Config { return c.Clone() }

var _ http.Pusher = (*responseWriter)(nil)

// Push implements http.Pusher.
func (w *responseWriter) Push(target string, opts *http.PushOptions) error {
	internalOpts := pushOptions{}
	if opts != nil {
		internalOpts.Method = opts.Method
		internalOpts.Header = opts.Header
	}
	return w.push(target, internalOpts)
}

func configureServer18(h1 *http.Server, h2 *Server) error {
	if h2.IdleTimeout == 0 {
		if h1.IdleTimeout != 0 {
			h2.IdleTimeout = h1.IdleTimeout
		} else {
			h2.IdleTimeout = h1.ReadTimeout
		}
	}
	return nil
}

func shouldLogPanic(panicValue interface{}) bool {
	return panicValue != nil && panicValue != http.ErrAbortHandler
}

func reqGetBody(req *http.Request) func() (io.ReadCloser, error) {
	return req.GetBody
}

func reqBodyIsNoBody(body io.ReadCloser) bool {
	return body == http.NoBody
}


Basic usage
===========

## Install Fenom

### Composer

Add package Fenom in your require-list in `composer.json`:
```json
{
    "require": {
        "fenom/fenom": "2.*"
    }
}
```
and update project's dependencies: `composer update`.

### Custom loader

Clone Fenom to any directory: `git clone https://github.com/bzick/fenom.git`. Recommended use latest tag.
Fenom use [psr-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md#autoloading-standard) autoloading standard. Therefore you can
* use `psr-0` format in your project loader for loading Fenom's classes
* or register Fenom's autoloader: `Fenom::registerAutoload();` for loading itself.

Also you can use this autoloader for loading any library with `psr-0` file naming:
```php
Fenom::registerAutoload(PROJECT_DIR."/src");
```

## Setup Fenom

Create an object via factory method
```php
$fenom = Fenom::factory('/path/to/templates', '/path/to/compiled/template', $options);
```

Create an object via `new` operator
```php
$fenom = new Fenom(new Provider('/path/to/templates'));
$fenom->setCompileDir('/path/to/template/cache');
$fenom->setOptions($options);
```

* `/path/to/templates` — directory, where stores your templates.
* `/path/to/template/cache` — directory, where stores compiled templates in PHP files.
* `$options` - bit-mask or array of [Fenom settings](./configuration.md#template-settings).

### Use Fenom

Output template
```php
$fenom->display("template/name.tpl", $vars);
```

Get the result of rendering the template
```php
$result = $fenom->fetch("template/name.tpl", $vars);
```

Create the pipeline of rendering into callback
```php
$fenom->pipe(
    "template/sitemap.tpl",
    $vars,
    $callback = [new SplFileObject("/tmp/sitemap.xml", "w"), "fwrite"], // pipe to file /tmp/sitemap.xml
    $chunk_size = 1e6 // chunk size for callback
);
```


> ## **本文件最后更新于2020-09-07 10:20**

-----

####  rescue_kar
##### 1#       楼主       发表于 2020-9-4 10:51

我跟我老婆年纪都比较大了，因为一些原因一直没机会要小孩，长久来看我们俩工作的稳定性都不好（现在这个形势，除了那些吃皇粮的，没什么工作能干到退休的），有一些积蓄，两人过日子生活质量还可以，但如果要小孩的话大人小孩的生活质量都不会高。我自己小时候家里条件也不好，老爸挺早就下岗了，一直到自己工作前日子都过的紧巴巴的，很多时候宁可自己吃苦，也不愿意向家里开口要钱。因为这种经历，所以动了不要小孩的念头，现在社会竞争这么激烈，自己也就混成这样，自己经常考虑被裁后的出路，生小孩出来大人小孩都受罪没什么意思。

-----

####  bka
##### 2#       发表于 2020-9-4 10:52

[https://bbs.saraba1st.com/2b/thread-1957023-1-1.html](https://bbs.saraba1st.com/2b/thread-1957023-1-1.html)

-----

####  南极磷
##### 3#       发表于 2020-9-4 10:54

不要小孩的话要早做不要小孩的打算，你现在这情况我觉得要不要小孩都不是好出路

-----

####  derceres
##### 4#       发表于 2020-9-4 10:54

混吃等死，，，

-----

####  Labborn
##### 5#       发表于 2020-9-4 10:55

你心里不是有个答案吗，那就是你会选的

-----

####  一千君
##### 6#       发表于 2020-9-4 10:56

有，自己过得不怎么样，心态也不好，不打算要

-----

####  yzj134100
##### 7#       发表于 2020-9-4 10:56

还以为是想领养

-----

####  Gal3ahad
##### 8#       发表于 2020-9-4 11:09

现在确实尴尬。说要小孩吧，成本太高养不起，孩子大人都遭罪。不要吧，现在养老也没有什么保底的方案..看了一些独自一人孤独老去的新闻，真不是晚景凄凉四个字能概括的

-----

####  禹火
##### 9#       发表于 2020-9-4 11:14

我想要小孩，但又不想结婚，准备年纪到了，领养一个算了。

-----

####  LuLuMuMu
##### 10#       发表于 2020-9-4 11:23

不想自己吃苦就直说咯~何必担心一个还未出现的人吃不吃苦？

-----

####  wohaihao
##### 11#       发表于 2020-9-4 11:32

有，正在考虑十年后如何苟且偷生还是一了百了

-----

####  CR2
##### 12#       发表于 2020-9-4 11:35

又不是不孕不育，干嘛不要

-----

####  ouba
##### 13#       发表于 2020-9-4 11:37

我，身体原因不敢要小孩了。

-----

####  朝仓和美
##### 14#       发表于 2020-9-4 11:46

两种选择都有可能后悔，那就看哪种更可能不后悔或者后悔轻一点咯

—— 来自 samsung SM-G9500, Android 7.0上的 [S1Next-鹅版](https://github.com/ykrank/S1-Next/releases) v2.4.1

-----

####  朝仓和美
##### 15#       发表于 2020-9-4 11:46

两种选择都有可能后悔，那就看哪种更可能不后悔或者后悔轻一点咯

—— 来自 samsung SM-G9500, Android 7.0上的 [S1Next-鹅版](https://github.com/ykrank/S1-Next/releases) v2.4.1

-----

####  蓝鲸
##### 16#       发表于 2020-9-4 11:48

其他原因比如身体不好啊，工作996没时间照顾啊，没人带也没钱请保姆啊或者单纯就是不想生小孩之类的原因不要小孩我还能理解，你又不是贫困户、生了小孩大家都没饭吃，因为经济原因、不想降低生活质量而不生小孩，还来论坛找认同我是不能理解的。

-----

####  蔡赴朝
##### 17#       发表于 2020-9-4 12:10

小孩2岁   不打算要了

﹍﹍﹍

评分

 参与人数 2战斗力 +2

|昵称|战斗力|理由|
|----|---|---|
| 临汾牛肉丸| + 1|来都来了|
| aw627| + 1|欢乐多|

查看全部评分

-----

####  黑萤030
##### 18#       发表于 2020-9-4 12:16

你们父母会不会拿老了死后没人管来恐吓你，反正我要是说什么不结婚不生孩子的话是会被教育的。

—— 来自 Sony H8166, Android 9上的 [S1Next-鹅版](https://github.com/ykrank/S1-Next/releases) v2.4.1

-----

####  KENN
##### 19#       发表于 2020-9-4 12:17

多大

-----

####  nianiania
##### 20#       发表于 2020-9-4 12:25

黑萤030 发表于 2020-9-4 12:16
你们父母会不会拿老了死后没人管来恐吓你，反正我要是说什么不结婚不生孩子的话是会被教育的。

—— 来自  ...

当然会了，不过我都是一句老了找个楼一跳一了百了怼回去

—— 来自 HUAWEI LYA-AL00, Android 10上的 [S1Next-鹅版](https://github.com/ykrank/S1-Next/releases) v2.4.1

-----

####  xvid
##### 21#       发表于 2020-9-4 12:34

如果没生之前就想养儿防老的话还是算了吧，孩子是自己的延续，没有希望的人会找到生活的动力

-----

####  emmer
##### 22#       发表于 2020-9-4 12:36

大龄处男穷且丑，找不到女人，也没有要小孩的计划，赌一手70以前安乐死步入社会，赌输了就烧炭吧

-----

####  wwdzcjsmxx
##### 23#       发表于 2020-9-4 12:41

Gal3ahad 发表于 2020-9-4 11:09
现在确实尴尬。说要小孩吧，成本太高养不起，孩子大人都遭罪。不要吧，现在养老也没有什么保底的方案..看了 ...

是啊，其实不要的多是生活压力大或者不希望生活的压力变大，还是很无奈的

-----

####  飞灾
##### 24#       发表于 2020-9-4 12:59

那就别要呗

现在开始健身+基金定投，学个啥手艺，比如扑克牌花切、唢呐、视频编辑之类的

以及想好活腻了的时候怎么自我了断

-----

####  wuxan94
##### 25#       发表于 2020-9-4 14:56

nianiania 发表于 2020-9-4 12:25
当然会了，不过我都是一句老了找个楼一跳一了百了怼回去

—— 来自 HUAWEI LYA-AL00, Android 10上的 S1 ...

更大几率为了追下周新番去居委会滚钉板吃五保～

-----

####  wuxan94
##### 26#       发表于 2020-9-4 15:03

蓝鲸 发表于 2020-9-4 11:48
其他原因比如身体不好啊，工作996没时间照顾啊，没人带也没钱请保姆啊或者单纯就是不想生小孩之类的原因不 ...

不完全统计丁克夫妇到了中年大部分过不下去了……

回到家孤苦伶仃两个人干瞪眼总会有一方撑不住～

-----

####  你可以试试
##### 27#       发表于 2020-9-4 15:08

别说你坛，整个社会过个十几二十年的连不结婚都是常态了

-----

####  yuzik1
##### 28#       发表于 2020-9-4 15:16

从没想过要小孩

-----

####  口口子_
##### 29#       发表于 2020-9-4 15:16

跟楼主情况一样，双方年纪大+双方互联网民工，明年房贷还还不还得起都不知道，还催着要娃，不知道父母对我们哪来的信心……

-----

####  鏡鑑星影
##### 30#       发表于 2020-9-4 15:18

有啊，但是老婆下不了决心
我就听她意见吧

—— 来自 vivo V1955A, Android 10上的 [S1Next-鹅版](https://github.com/ykrank/S1-Next/releases) v2.4.1

-----

####  escape
##### 31#       发表于 2020-9-4 15:23

 本帖最后由 escape 于 2020-9-4 15:28 编辑

楼主，你最多可以说有了小孩经济上会紧张，但不要觉得留够钱了生活质量就会高。没孩子大概率你生活质量也不会高。反之，有孩子经济紧张，生活质量并不低才是普通大众的生活。除非确实天生讨厌小孩，否则你就想象不出你自己的孩子能多大程度提高生活质量。凡事都是有两面性，不能只考虑负面的消极的。实际上大多数人选择的积极地大过消极的事情有很多。孩子也罢婚姻也罢都是如此。

-----

####  sharp_star
##### 32#       发表于 2020-9-4 15:24

生不出，不喜欢小孩

-----

####  fireship
##### 33#       发表于 2020-9-4 15:24

 本帖最后由 fireship 于 2020-9-4 15:28 编辑

   楼上有人说了，小孩是感情的延续。若夫妻两个都同意丁克的话那也未尝是种出路。

不过既然决定丁克了就早做打算，另外最关键的是以后不能后悔且不能以此事为由制造争端。不然很容易出感情问题。

尤其是男人即使到四五十岁还有生小孩的可能性，女人却没有办法。别到头来男方上了年纪想要小孩了，把原配踢掉另找一个能生的，女方却只能孤独终老。

忘了一点，丁不丁克是自己选择走哪条路，这个决定要你自己下。通过网上寻求理由和认同感是对自己极端不负责，毕竟网民都带着面具。

说不定那些嘴上说说单身到老年就寻短见的人，过几天突然天降姻缘就改变想法了呢。

-----

####  jellyfis
##### 34#       发表于 2020-9-4 15:27

fireship 发表于 2020-9-4 15:24
楼上有人说了，小孩是感情的延续。若夫妻两个都同意丁克的话那也未尝是种出路。

不过既然 ...

到时候想要了领养一个就行了

-----

####  拉沃契金
##### 35#       发表于 2020-9-4 15:28

25岁：单身浪的多开心

28岁：结婚了，老婆想丁克，我也不喜欢小孩，一拍即合

now -> 30岁：老婆想要小孩，我拼命拖

-----

####  escape
##### 36#       发表于 2020-9-4 15:31

 本帖最后由 escape 于 2020-9-4 15:32 编辑

fireship 发表于 2020-9-4 15:24

楼上有人说了，小孩是感情的延续。若夫妻两个都同意丁克的话那也未尝是种出路。

不过既然 ...

我给你说吧，世上没有不后悔的事。

没要孩子老了后悔。

要了孩子后悔没早要没要两个。

这种情况多得是。不后悔的不是人类。

-----

####  Sanguine
##### 37#       发表于 2020-9-4 15:33

有啊，婚都不知道能不能结还要啥小孩，现在二十多岁对小孩还是烦的一比，肯定养不了。等三十多四十了看有无心力领养吧

-----

####  talesof213
##### 38#       发表于 2020-9-4 15:34

结婚第八年了，没打算过，没打算，不会打算。厌孩，自私，好吃懒做，混吃等死，一点点时间和金钱都不想花在小孩身上。老无所依换来的十几甚至几十年的逍遥日子，我愿意。老了绝症了总有办法自我了断。

-----

####  fireship
##### 39#       发表于 2020-9-4 15:40

jellyfis 发表于 2020-9-4 15:27

到时候想要了领养一个就行了

  领养的话我建议可以到当地孤儿院去看看了解下领养的实际情况。

各项发育正常的幼儿都早早被人领走了（更何况外国人也喜欢来TG领养小孩），剩下的都是有残疾或有缺陷的小孩。而且现代社会尤其是像TG这样监控遍地的时代，无主弃婴非常少见，而且除非是全家不幸就剩个孤苗的那种，家庭变故造成的孤儿都会让亲戚家养。

更何况对于领养，TG有严格的一套标准，不是说谁都能去领养的。

还是那句话，夫妻丁克的话就下定决心丁克到底，会考虑中途退出选项（夫妻有一方反悔离婚或双方都反悔但已过生育年龄去领养）只能说明夫妻俩的丁克决心还不足。

-----

####  圣堂刺客
##### 40#       发表于 2020-9-4 15:42

其他原因比如身体不好啊，工作996没时间照顾啊，没人带也没钱请保姆啊或者单纯就是不想生小孩之类的原因不要小孩我还能理解，你又不是贫困户、生了小孩大家都没饭吃，因为经济原因、不想降低生活质量而不生小孩，还来论坛找认同我是不能理解的。

-----

####  fireship
##### 41#       发表于 2020-9-4 15:42

 本帖最后由 fireship 于 2020-9-4 15:44 编辑

escape 发表于 2020-9-4 15:31

我给你说吧，世上没有不后悔的事。

没要孩子老了后悔。

要了孩子后悔没早要没要两个。

是的，但既然决定走上丁克这条路，就要有觉悟。另一个帖子里那两位 [“我丁克一辈子，不害人不害己，不害下一代](https://bbs.saraba1st.com/2b/thread-1957023-1-2.html)”，他们就有这种觉悟，活出了自己的精彩，旁人没法指责。

像楼主这样自己犹豫不觉还要上网来寻求网民认同，我只能认为他还没做好丁克的觉悟

-----

####  water
##### 42#       发表于 2020-9-4 15:46

等你到四十岁的时候就知道了。

爽死了，别人接小孩上辅导班，你大鱼大肉看电影玩音乐剧时不时的出去旅游。

﹍﹍﹍

评分

 参与人数 2战斗力 +2

|昵称|战斗力|理由|
|----|---|---|
| escape| + 1|原来是说反话|
| Faerire| + 1||

查看全部评分

-----

####  escape
##### 43#       发表于 2020-9-4 15:47

 本帖最后由 escape 于 2020-9-4 15:52 编辑

fireship 发表于 2020-9-4 15:42

是的，但既然决定走上丁克这条路，就要有觉悟。

像楼主这样自己犹豫不觉还要上网来寻求网民认同，我只能 ...

我只能说，每个人个人生活的决定，他人没有干涉的权力。

但是一个论坛的，中年人不少，介绍一下过来人经验罢了。这事一旦后悔，有心无力的时候，相当之痛苦。最多40岁，再迟就真的没法解决。

回楼上，我41要的小孩，医院说我要是能要上小孩，那是奇迹。我**了两句，最后还是要上了。现在我娃上幼儿园，我看什么狗屁剧打什么游戏。我天天看幼儿园监控乐死了....旅游不带娃我都不想去。有小孩之后人生观早重塑了，还钱？自由时间？想多了。我都给孩子，我高兴死了。

-----

####  劲霸男
##### 44#       发表于 2020-9-4 16:03

water 发表于 2020-9-4 15:46

等你到四十岁的时候就知道了。

爽死了，别人接小孩上辅导班，你大鱼大肉看电影玩音乐剧时不时的出去旅游。 ...

等你到八十岁的时候就知道了。

别人儿子女儿给他病床上送饭送菜接屎尿，你天天被护工殴打

-----

####  签收通知
##### 45#       发表于 2020-9-4 16:07

点开之前以为是问坛友有打算不生孩子的吗，点开看前两个逗号内的内容还以为是问谁家不要了送给楼主

-----

####  第三类
##### 46#       发表于 2020-9-4 16:10

本能这个东西太可怕了，你觉得你做好了丁克的准备，真到了年龄，看着别人家跟小孩子那种幸福的样子，能真的不羡慕我是做不到。

[  -- 来自 能看大图的 Stage1官方 iOS客户端](https://itunes.apple.com/fi/app/saraba1st/id1221237470?mt=8)

-----

####  jiklp88
##### 47#       发表于 2020-9-4 16:23

让有些人去爱别人比让他死更难受，人哪。

-----

####  竹月2
##### 48#       发表于 2020-9-4 16:34

学谁都好别学小资，死都不知道怎么死的。如果一个人智商，情商，毅力都不够，那就随大流，个人条件差，就把标准降低

-----

####  wuxan94
##### 49#       发表于 2020-9-4 20:34

water 发表于 2020-9-4 15:46
等你到四十岁的时候就知道了。

爽死了，别人接小孩上辅导班，你大鱼大肉看电影玩音乐剧时不时的出去旅游。 ...

然后六十岁别人天伦之乐自己江河日下八十岁别人儿孙满堂自己躺敬老院给护工当沙包摔？

-----

####  Sanguine
##### 50#       发表于 2020-9-4 20:37

坛友能不能给我们丁克族乐观点的未来，未来变数太多，比如活不到60岁不就不用操心了

-----

####  叶夜青
##### 51#       发表于 2020-9-4 20:44

 本帖最后由 叶夜青 于 2020-9-4 20:57 编辑

（虽然我舍友都考比我好）

我打算也不给孩子怎么花钱，老子自己买游戏呢）

—— 来自 HUAWEI DUK-AL20, Android 9上的 [S1Next-鹅版](https://github.com/ykrank/S1-Next/releases) v2.4.1

-----

####  apres
##### 52#       发表于 2020-9-4 21:58

楼主 说句你不爱听的 铁打丁克从来不问别人意见 不管现实还是网上

自己生活自己做主

繁殖事情和伴侣有关 是你们俩才能协商讨论的事情 除此以外 任何人都没有资格来发表意见

你们不生 谁也不认识谁

你们生了 谁也不认识谁  也没人会送钱给你们抚养小孩

-----

####  笑面如风我惊涛
##### 53#       发表于 2020-9-5 15:05

我连婚都不想结

-----

####  seki_m
##### 54#       发表于 2020-9-5 15:12

 本帖最后由 seki_m 于 2020-9-5 15:14 编辑

有考虑过领养么？

-----

####  武装野狼
##### 55#       发表于 2020-9-5 15:50

jellyfis 发表于 2020-9-4 15:27

到时候想要了领养一个就行了

国内对于领养要求很高的，然后可挑选的又很少。所以曾经讨论说过国内小说里面经常出现的孤儿主角是扯淡，因为国内身体健康的孤儿女孩都很少，男的基本都是要跑关系抢了，根本轮不到在里面长大。

-----

####  rescue_kar
##### 56#         楼主| 发表于 2020-9-5 16:15

劲霸男 发表于 2020-9-4 16:03

等你到八十岁的时候就知道了。

别人儿子女儿给他病床上送饭送菜接屎尿，你天天被护工殴打 ...

首先得掂量一下自己能不能活到80，还得想想自己在爸妈不能动时给爸妈接屎尿能坚持几个月，久病床前无孝子不是说着玩的。假如自己年纪大了失去自理能力，自行了断算了，不会等到被护工殴打。

-----

####  zongrumk2
##### 57#       发表于 2020-9-5 16:33

劲霸男 发表于 2020-9-4 16:03
 等你到八十岁的时候就知道了。  别人儿子女儿给他病床上送饭送菜接屎尿，你天天被护工殴打 ...

不觉得自己能活到八十岁领养老金，且不觉得养老金能保持现在的质量撑到那个时候。

-----

####  蕾咪莉亚
##### 58#       发表于 2020-9-5 16:43

连婚都不想结+1

泥潭就是想得远，六十岁后身体机能下降，各种大小毛病都来了，可以说生活质量必然大幅度降低，居然还想着活到八九十岁，宁可瘫在床上让子女一把屎一把尿也不肯让子女活的轻松一点，养儿防老养儿防老，当然你要说等着熬到脑后插管我还能理解....

-----

####  不入流美术
##### 59#       发表于 2020-9-5 16:47

无论你做什么都会有后悔的时候，所以根本无所谓选哪条路，还是掷骰子吧

-----

####  zongrumk2
##### 60#       发表于 2020-9-5 16:49

蕾咪莉亚 发表于 2020-9-5 16:43
 连婚都不想结+1  泥潭就是想得远，六十岁后身体机能下降，各种大小毛病都来了，可以说生活质量必然大幅度降 ...

然后这帮人还会骂别人自私

-----

####  不入流美术
##### 61#       发表于 2020-9-5 16:57

劲霸男 发表于 2020-9-4 16:03

等你到八十岁的时候就知道了。

别人儿子女儿给他病床上送饭送菜接屎尿，你天天被护工殴打 ...

其实是这样的，我去养老院看望我奶奶见到的老人基本都是有儿有女的，所以不管你有没有生孩子，以后多半会被护工照顾而不是家人，话说我奶奶爷爷外公外婆其实算幸运了，都生了5-6个子女，我大姑姑照顾我奶奶照顾了几十年，从40多岁一直照顾到60多岁我奶奶90岁的时候去世，中间也就送过几个月的养老院，没办法的事情，我姑丈还中风瘫痪了，你说怎么办，各自的子女也有一堆烦心的事，其他子女给钱给大姑姑专门照顾，我外婆也是一样由我二姨专门照顾，现在一般1-2胎，所谓6个钱包买房好像很爽，时间一久就变成了6个坑，我看一对夫妻两个人怎么去填，还不是得掏钱请护工

-----

####  DEMOxN
##### 62#       发表于 2020-9-5 17:14

大神经养小神经吗，不了吧，活到要人照顾的时候建议自我放生

-----

####  你可以试试
##### 63#       发表于 2020-9-5 17:57

泥潭迫真低龄啊，自己父母八十住院不用请护工自己看护？是不用上班的吗

-----

####  奶绷子
##### 64#       发表于 2020-9-5 18:21

还是要小孩吧，不然老了的时候就太孤单了

-----

####  魔铁潜水艇
##### 65#       发表于 2020-9-5 18:23

我们穷人一般问题在找不到老婆。

-----

####  宗汝
##### 66#       发表于 2020-9-5 18:23

你可以试试 发表于 2020-9-5 17:57

泥潭迫真低龄啊，自己父母八十住院不用请护工自己看护？是不用上班的吗

心理年龄低而已，网上口嗨需要考虑实际情况吗

-----

####  diohanmilton
##### 67#       发表于 2020-9-5 18:26

反正我觉得丁克的话 一个是好好调养心态 一个是在身体健康上早做准备 锻炼 定期体检排除隐患。

我有个北京的姑姑，儿子自杀的，现在不还是过的好好。

虽然说北京退休社保在全国范围内都不错，但是也还是算底层，也不容易。

—— 来自 HUAWEI TNY-AL00, Android 10上的 [S1Next-鹅版](https://github.com/ykrank/S1-Next/releases) v2.4.1

-----

####  爱尔米娜
##### 68#       发表于 2020-9-5 18:29

快进到监狱养老

-----

####  藤香樱雪
##### 69#       发表于 2020-9-5 18:36

首先，你要考虑到自己父母和她父母的意见和态度，如果双方哪一方父母特别想要孙子孙女，你们坚持不要可能会轻则争执数年最后老人妥协，重则断绝关系甚至父母要死要活哭天喊地。你们能够面对或者能够依然坚持，那么就遵从自己的内心。不能坚持或者无法直面这些，早点妥协。

其次，要或者不要，都要做好计划，要的话，双方父母是否能帮忙带孩子，如果不能，孩子生出来父母一方总要有一个牺牲工作多一些。自己如果有明确的工作目标和计划，建议也和另一半聊聊。两个人都是否绝对无法退让，如果出现了上述父母的压力，两个人是否能携手面对。避免因此两个人出现矛盾。早点说清楚，不是那种只是个想法或者顺其自然的态度，而是有目标有未来有几种方案的认真沟通。

最后，要或者不要，都要大把大把赚钱，要，的确可以穷养，但孩子的三观如何树立，必定会煞费苦心，不止你们两个，你们父母和你们，三个家庭的生活都可能会降低一个甚至多个层次。提前做好心理准备。规划一下未来孩子每年必要的开销，提前和家人算清楚。去了解一下奶粉尿不湿各种自费疫苗和保险的价格，每年基础的开销提前算清楚。

如果不要，那么就要想想自己有多少种保险，自己接下来每5年的规划，自己50-60岁没有孩子怎么生活，出现大病怎么处理，是否有人可以寄托，两个人的身体情况，每年全面检查等等。多做考虑多做打算。

最后说说，我自己真的特别想丁克，我觉得丁克真的挺好的。但必须要有钱。至少不能很穷。未来至少要有稳定的经济来源，不然要不要孩子丁不丁克都不会过得很开心。钱比任何东西都实际。

以及，我现在也在无法继续丁克的边缘，主要就是第一条说的，我的母亲为了逼我要孩子已经要疯了。动不动哭天喊地要死要活绝食出走样样精通。虽然我一直觉得这样的母亲，我生了孩子也不会交给她。毕竟偏激狭隘。但又实在不太敢真的丁克，的确怕她做出过激的事情。如果真的为此离家出走或者自杀，我的确承担不起这个结果。

所以也劝你提前和家人认认真真的沟通好。我当初结婚前和结婚后初期，都跟父母说过我丁克。但是的确是我的错我逃避了应该认真面对的问题，每次就是聊到生孩子话题时候，我就随口说了：“我们不要小孩子”。最初家人都觉得我们年轻没玩儿够也都没多催我们，而我们以为这样的一句话家长就已经可以理解我们的决心。

结果到现在就变成了这样。从一开始就坐下来一切说清楚，我总觉得或许现在就没这么多事情了……等到结婚多年，30出头还坚持不要，又没有认认真真的坐下来说清楚的过程。就变成了根深蒂固的无法相互理解了……（但80%的可能性是，即便早说，父母也不会同意子女丁克。但终归早点说明白，早点有一方退让，之后的日子就有更多余地改变计划。）

-----

####  藤香樱雪
##### 70#       发表于 2020-9-5 18:38

禹火 发表于 2020-9-4 11:14

我想要小孩，但又不想结婚，准备年纪到了，领养一个算了。

国内的领养政策几乎很难领养成功吧……如果有什么路子我也想了解一下~

-----

####  藤香樱雪
##### 71#       发表于 2020-9-5 18:40

nianiania 发表于 2020-9-4 12:25

当然会了，不过我都是一句老了找个楼一跳一了百了怼回去

—— 来自 HUAWEI LYA-AL00, Android 10上的 S1 ...

我当初这么说的时候，我妈当场就拍桌子，当晚就离家出走……

-----

####  藤香樱雪
##### 72#       发表于 2020-9-5 18:48

叶夜青 发表于 2020-9-4 20:44

铪？养小孩很难吗？我爸妈从小到大几乎没管过我，纯放养，偶尔和我一起打打小霸王游戏机，他们俩还 ...

 = =我同事孩子刚出生时候也是这样说的……“报班干嘛啊，没用的都是骗钱的，除非孩子特别感兴趣不然不报班，浪费钱，有时间我跟孩子多互动多一起玩儿玩儿比什么不强！”

现在……报了4个班不说……疫情期间动不动就朋友圈抱怨在家太难了，不想带孩子，带娃要疯了，辅导作业要疯了，神兽怎么还不开学……

-----

####  coldhot3
##### 73#       发表于 2020-9-5 18:51

不要小孩也不是自己放松的借口。要孩子有要孩子的辛苦，不要孩子有不要孩子的辛苦，要准备自己退休后的金钱，关系等等。你得有靠得住的下一代朋友吧，经营这个就不容易。

-----

####  藤香樱雪
##### 74#       发表于 2020-9-5 18:52

rescue_kar 发表于 2020-9-5 16:15

首先得掂量一下自己能不能活到80，还得想想自己在爸妈不能动时给爸妈接屎尿能坚持几个月，久病床前无孝子 ...

这点没错，有没有孩子，老了必定都是痛苦的，有孩子，爱孩子，也不希望孩子为自己受累，被自己牵连的又要上班又要看护自己。

没孩子，就早点想好怎么死的就行了……

我最初就像多去跳伞，蹦极这种活动，这样老了觉得自己身体快不行了，找个山跳了也不会太恐惧。

而且了解了各种自杀方式，比较实际除了跳x的也就是烧炭，烧炭其实也不是完全不痛苦，只是相对来说可能稍微好一点点。

未来不管要不要孩子都希望能安乐死。即便让我用北京一套房子换去外国安乐我也乐意。

-----

####  为啥
##### 75#       发表于 2020-9-5 18:54

看来看去总觉得标题是“坛友有不打算的小孩吗”

还纳闷赵小姐广告怎么改行干人贩子了

-----

####  藤香樱雪
##### 76#       发表于 2020-9-5 18:58

coldhot3 发表于 2020-9-5 18:51

不要小孩也不是自己放松的借口。要孩子有要孩子的辛苦，不要孩子有不要孩子的辛苦，要准备自己退休后的金钱 ...

同意，要孩子或者不要，其实都会有辛苦和幸福的地方，只是顺序和持续时间不一样而已。

真的每个人家庭情况都不一样，做决定没那么容易，想要坚持自己的想法也没那么容易。

自己多想想，家人之间（6口人）多谈谈。

-----

####  sadakawa
##### 77#       发表于 2020-9-5 19:11

你看很多贫困山区的穷人都生五六个孩子，都能养的好好的，可见根本不是什么问题，你们只是不想小孩降低你们的生活质量= =

-----

####  evooil
##### 78#       发表于 2020-9-5 19:34

一直觉得小孩太麻烦 不想要 但是
抖音上看看别人小孩很可爱
不想降低生活质量有错吗？
老婆为了怀孕动了一次手术 好不容易怀上还停止发育  也不是想生就生的
来自: iPhone客户端

-----

####  water
##### 79#       发表于 2020-9-5 22:42

 本帖最后由 water 于 2020-9-5 22:43 编辑

太太的想法简直和我一模一样。

我现在工资就完全当零花钱用，同事都要寄回去养家，在这方面我比他们至少爽了2个位面。

-----

####  宗汝
##### 80#       发表于 2020-9-5 22:46

 本帖最后由 宗汝 于 2020-9-5 22:47 编辑

sadakawa 发表于 2020-9-5 19:11

你看很多贫困山区的穷人都生五六个孩子，都能养的好好的，可见根本不是什么问题，你们只是不想小孩降低你们 ...

以前还想反驳一下说一个人一种活法

现在只想说：对，啊，dei，我就是这么想的，你咬我啊

就像76楼说的那样，这有错吗？什么时候法律规定这是错的什么时候再说。

-----

####  不容易注册上
##### 81#       发表于 2020-9-5 23:43

几句话啊，第一想着不行就领养的，你以为是超市挑大白菜啊，还随便你选，事实上中国等待合法领养的家庭排成队，不乏条件好的家庭等的眼睛发绿都没有机会，福利院大把没人要领养的脑瘫唐氏儿。。第二，丁克未必生活质量高，你舒服快活轻松的时候必须要顶住父母和外界压力，那些未必比带孩子容易。不要以为父母仅仅是吓唬人的，哭闹逼迫的背后，是他们的精神压力，没有什么不付出代价的，更不要说有人后悔，白丁一场，早知如此，何必当初，年纪大了万一生孩子质量不好更要吐血第三孩子是碎钞机，没孩子也不一定能攒钱，人都是贱皮子，没压力谁都想要松快，到头来，大家还得看运气，即使是养老院，还看三六九等，有孩子经常来好点，有孩子不来的次点，最差的是没孩子的，就像没有主的地。。。

-----

####  烈火烹油
##### 82#       发表于 2020-9-5 23:44

我原来也觉得老了自我了断挺好的，但是我觉得我可能高估了自己的勇气，低估了人本能的求生欲望。台湾有个名嘴去的瑞士安乐死，好像花了一百多万吧，这辈子攒攒应该能攒出来。

-----

####  zongrumk2
##### 83#       发表于 2020-9-6 00:24

烈火烹油 发表于 2020-9-5 23:44
 我原来也觉得老了自我了断挺好的，但是我觉得我可能高估了自己的勇气，低估了人本能的求生欲望。台湾有个名 ...

兄弟，一百多万新台币，那才多少钱啊

-----

####  烈火烹油
##### 84#       发表于 2020-9-6 01:24

 本帖最后由 烈火烹油 于 2020-9-6 01:25 编辑

zongrumk2 发表于 2020-9-6 00:24

兄弟，一百多万新台币，那才多少钱啊

几年前的事了，记不清了，刚去查了一下，是300万台币。而且不算安乐死，是辅助自杀。

-----

####  wlee
##### 85#       发表于 2020-9-6 01:50

sadakawa 发表于 2020-9-5 19:11
你看很多贫困山区的穷人都生五六个孩子，都能养的好好的，可见根本不是什么问题，你们只是不想小孩降低你们 ...

问题是你敢在城市里像贫困山区的穷人一样养孩子吗？先不说有没有人告你虐待，光是邻居同事的口水就能把你淹死。

-----

####  zcddzh2002
##### 86#       发表于 2020-9-6 01:56

老婆因为身体不好辞职备孕，现在生了个女儿。半个月了每次看到都觉得好可爱。然后老婆一年多美工作，我一个月5000多，自己基本不怎么用钱。双方父母现在还能帮忙一下，等后面老婆工作了。应该经济稍微好点。这两年就买过两个游戏，只狼，仁王。

-----

####  宇宙常量
##### 87#       发表于 2020-9-6 12:38

我也说一下，我父亲去年脑瘤住院，医生直接要求放弃，字都让我母亲签了。我算是扛住了压力，转院找医生手术一条龙。现在老爹天天外边旅游风声水起，就这一点我觉得还是有后代好一些。。。。

-----

####  Monkeyone
##### 88#       发表于 2020-9-6 12:43

物质条件不行，别到时孩子反而埋怨你们就行

-----

####  尛掱亂摸
##### 89#       发表于 2020-9-6 13:13

最近接触一个养老相关的业务

从中间那个接触到各种各样的老年人

其中就有 一直没要孩子的 和孩子后来去世 老伴也去世的

总的来说 没有孩子的老年人真的活得不如 有子女的

哪怕见过一些经济条件还不错的失独老人 和没要孩子的老人 他们虽然活得还行 但是没有孩子这个事 稍微提起来要么就是很难过 要么就是很后悔

至于为什么不去养老院，我只能说 有些条件还算可以就是 你觉得可以进去住的地方 不是你有钱就能进的 床位就那么多，排队等着进去的一堆人

那些给钱就让你进的养老院真的不如不去 环境相当糟糕

说上面这些不是说 反对丁克 不要孩子什么的 只是把见到的情况 说出来而已 别介意

我觉得能要还是要一个

-----

####  zcrptx
##### 90#       发表于 2020-9-6 13:27

你没有财富自由丁什么克，多去接触下那些无后的老年人就知道晚景凄凉不是说着玩的……这时候有人要说有些子女的也是不管老人的，那就是教育问题了，你确定自己一定可以教出白眼狼来吗

-----

####  潜水艇君
##### 91#       发表于 2020-9-6 14:14

 本帖最后由 潜水艇君 于 2020-9-6 14:16 编辑

=。=这楼里的想想自己父母到岁数了进医院自己会不会一把屎一把尿一天睡4个小时伺候再说吧

换位思考想想你生个小孩就为了等自己老了让小孩中年危机，一边通宵上班还一边请假伺候你？忍心吗？

好好健身，早睡早起，搬砖撸铁理财存钱，保持身体健康，当80岁还可以为了网速去居委会滚铁板的老大爷，孩子是无辜的放过他们

-----

####  zongrumk2
##### 92#       发表于 2020-9-6 14:21

潜水艇君 发表于 2020-9-6 14:14
 =。=这楼里的想想自己父母到岁数了进医院自己会不会一把屎一把尿一天睡4个小时伺候再说吧 换位思考想想你生 ...

无非是为了自己的养老金骂别人自私罢了
何其讽刺


var cull = (function (global) {
    "use strict";

    var slice = Array.prototype.slice;
    var toString = Object.prototype.toString;

    function _assert(pred, msg) {
        if (!pred) { throw new TypeError(msg); }
    }

    function _refute(pred, msg) {
        _assert(!pred, msg);
    }

    /** Is `list` an object with a numeric length, but not a DOM element? */
    function isList(list) {
        return !!list &&
            typeof list === "object" &&
            typeof list.length === "number" &&
            !list.tagName;
    }

    /** Returns a version of `value` that is an actual Array. */
    function toList(value) {
        if (toString.call(value) === "[object Array]") { return value; }
        if (toString.call(value) === "[object Arguments]") { return slice.call(value); }
        if (typeof value === "undefined" || value === null) { return []; }
        return slice.call(arguments);
    }

    /** Calls `fn` on every item in `list`, presumably for side-effects. */
    function doall(fn, list) {
        var i, l;
        for (i = 0, l = list.length; i < l; ++i) {
            fn(list[i], i, list);
        }
    }

    /** Is `fn` a function? */
    function isFunction(fn) {
        return typeof fn === "function";
    }

    /**
     * Returns the result of applying `fn` to `initial` and the first
     * item in `list`, then applying `fn` to that result and the 2nd
     * item, etc.
     *
     * Can also be called without `initial`, in which case the first
     * invocation of `fn` will be with the first two items in `list`.
     */
    function reduce(fn, initial, items) {
        _assert(typeof fn === "function", "reducer should be a function");
        var i = 0, l, list = items, accumulator = initial;

        if (arguments.length === 2) {
            list = initial;
            accumulator = list[0];
            i = 1;
        }

        if (typeof list === "string") { list = list.split(""); }
        _assert(isList(list), "reduce needs to work on a list");

        for (l = list.length; i < l; ++i) {
            accumulator = fn(accumulator, list[i]);
        }

        return accumulator;
    }

    /** Is `pred` truthy for all items in `list`? */
    function all(pred, list) {
        var i, l;
        for (i = 0, l = list.length; i < l; ++i) {
            if (!pred(list[i])) { return false; }
        }
        return true;
    }

    /** Is `pred` truthy for any items in `list`? */
    function some(pred, list) {
        var i, l;
        for (i = 0, l = list.length; i < l; ++i) {
            if (pred(list[i])) { return true; }
        }
        return false;
    }

    /**
     * Is `pred` truthy for at least one item in `list`, and also falsy
     * for at least one item in `list`?
     */
    function onlySome(pred, list) {
        var i, l, t, f;
        for (i = 0, l = list.length; i < l; ++i) {
            if (pred(list[i])) {
                t = true;
            } else {
                f = true;
            }
            if (t && f) { return true; }
        }
        return false;
    }

    /** Returns `string` with white space at either end removed. */
    function trim(string) {
        return (string.trim && string.trim()) ||
            string.replace(/^\s+|\s+$/, "");
    }

    /** Returns `arg` unchanged. */
    function identity(arg) { return arg; }

    /** Is `o` neither undefined nor null? */
    function defined(o) { return typeof o !== "undefined" && o !== null; }

    /** Returns a version of `fn` that only accepts one argument. */
    function unary(fn) {
        return function (arg) {
            return fn.call(this, arg);
        };
    }

    /**
     * Returns a function that takes one argument and returns its
     * `name`-property.
     */
    function prop(name) {
        return function (object) {
            return object[name];
        };
    }

    /**
     * Returns a function that takes one argument and calls its
     * `name`-function with `args` (optional).
     */
    function func(name, args) {
        return function (object) {
            return object[name].apply(object, toList(args));
        };
    }

    /**
     * Returns a function that takes one argument and returns true if
     * it is equal to `x`.
     */
    function eq(x) {
        return function (y) { return x === y; };
    }

    var composeSignature = "compose takes func|[funcs] " +
            "and optional thisp object";

    /**
     * Returns a function that calls the last function in `fns`, then
     * calls the second to last function in `fns` with the result of
     * the first, and so on, with an optional this-binding in `thisp`.
     */
    function compose(fns, thisp) {
        _refute(isFunction(thisp) || arguments.length > 2, composeSignature);

        var _fns = toList(fns);

        _assert(all(isFunction, _fns), composeSignature);

        return function () {
            var i = _fns.length;
            var result = arguments;
            while (i--) {
                result = [_fns[i].apply(thisp || this, result)];
            }
            return result[0];
        };
    }

    /**
     * Takes any number of arguments, and returns a function that
     * takes one function and calls it with the arguments.
     */
    function callWith() {
        var args = arguments;
        return function (fn) {
            return fn.apply(this, args);
        };
    }

    /**
     * Takes a function `fn` and any number of additional arguments,
     * fewer than the normal arguments to `fn`, and returns a
     * function. When called, the returned function calls `fn` with
     * the given arguments first and then additional args.
     */
    function partial(fn) {
        var args = slice.call(arguments, 1);
        return function () {
            return fn.apply(this, args.concat(slice.call(arguments)));
        };
    }

    /**
     * Returns a function that calls `callee` with `obj` as this.
     * `callee` can be a function, or it can be a string - in which
     * case it will be used to look up a method on `obj`.
     *
     * Optionally takes additional arguments that are partially
     * applied.
     */
    function bind(obj, callee) {
        var fn = typeof callee === "string" ? obj[callee] : callee;
        var args = slice.call(arguments, 2);
        return function () {
            return fn.apply(obj, args.concat(slice.call(arguments)));
        };
    }

    /** Flatten `list` recursively and return a list of non-list values */
    function flatten(list) {
        _assert(isList(list), "flatten expects a list");
        var res = [], i, l;

        for (i = 0, l = list.length; i < l; i++) {
            res = res.concat(isList(list[i]) ? flatten(list[i]) : list[i]);
        }

        return res;
    }

    /** Return the first index of `needle` in `list`, otherwise < 0 */
    function indexOf(needle, list) {
        _assert(isList(list), "indexOf expects a needle and a list");
        var i, l;
        for (i = 0, l = list.length; i < l; ++i) {
            if (needle === list[i]) { return i; }
        }
        return -1;
    }

    /** Return a list with only the unique values in `list` */
    function uniq(list) {
        _assert(isList(list), "uniq expects a list");
        var result = [], i, l;

        for (i = 0, l = list.length; i < l; ++i) {
            if (indexOf(list[i], result) < 0) {
                result.push(list[i]);
            }
        }

        return result;
    }

    /** Return the first item in `list` for which `fn` returns `true` */
    function first(fn, list) {
        _assert(isFunction(fn) && isList(list),
                "first expects a function and a list");

        var i, l;
        for (i = 0, l = list.length; i < l; ++i) {
            if (fn(list[i])) {
                return list[i];
            }
        }
    }

    /** Return a new list containing the items from `list` for which
        `fn` is `true` */
    function select(fn, list) {
        _assert(isFunction(fn) && isList(list),
                "select expects a function and a list");
        var result = [], i, l;
        for (i = 0, l = list.length; i < l; ++i) {
            if (fn(list[i])) {
                result.push(list[i]);
            }
        }
        return result;
    }

    /** Return a list of properties present in `list` but not in `other` */
    function difference(list, other) {
        _assert(isList(list) && isList(other), "difference expects two lists");
        return select(function (value) {
            return indexOf(value, other) < 0;
        }, list);
    }

    /** Return a list of enumerable own property keys in `object` */
    function keys(object) {
        var prop, result = [];
        for (prop in object) {
            if (object.hasOwnProperty(prop)) {
                result.push(prop);
            }
        }
        return result;
    }

    /** Return a list of enumerable own property values in `object` */
    function values(object) {
        var prop, result = [];
        for (prop in object) {
            if (object.hasOwnProperty(prop)) {
                result.push(object[prop]);
            }
        }
        return result;
    }

    /** Return a list of non-{null, undefined} items in `list` */
    var seldef = partial(select, defined);

    /**
     * Returns a new list consisting of the result of applying `fn` to
     * the items in `list`.
     */
    function map(fn, list) {
        var result = [], i, l;
        for (i = 0, l = list.length; i < l; i++) {
            result.push(fn(list[i]));
        }
        return result;
    }

    /**
     * Returns the complement of `pred`, ie a function that returns true
     * when `pred` would be falsy, and false when `pred` would be truthy.
     */
    function negate(pred) {
        return function () {
            return !pred.apply(this, arguments);
        };
    }

    /**
     * Returns a new list of the items in `list` for which `pred`
     * returns nil.
     */
    function reject(pred, list) {
        return select(negate(pred), list);
    }

    /**
     * Returns a new list with the concatenation of the elements in
     * `list1` and `list2`.
     */
    function concat(list1, list2) {
        return toList(list1).concat(toList(list2));
    }

    /**
     * Returns a new list with the items in `list` grouped into
     * `n-`sized sublists.
     *
     * The last group may contain less than `n` items.
     */
    function partition(n, list) {
        var result = [], i, l;
        for (i = 0, l = list.length; i < l; i += n) {
            result.push(list.slice(i, i + n));
        }
        return result;
    }

    /**
     * Returns a new list consisting of the result of applying `fn` to
     * the items in `list`, but filtering out all null or undefined
     * values from both `list` and the resulting list.
     */
    function mapdef(fn, list) {
        return seldef(map(fn, seldef(list)));
    }

    /**
     * Returns the result of applying concat to the result of applying
     * map to `fn` and `list`. Thus function `fn` should return a
     * collection.
     */
    function mapcat(fn, list) {
        return reduce(concat, map(fn, list));
    }

    /**
     * Returns a new list of all elements in `list` separated by
     * `sep`.
     */
    function interpose(sep, list) {
        var result = [], i, l;
        for (i = 0, l = list.length; i < l; i += 1) {
            result.push(list[i]);
            if (i < l - 1) {
                result.push(sep);
            }
        }
        return result;
    }

    // cull.advice

    /**
     * Advices the method `name` on `obj`, calling `fn` after the
     * method is called. `fn` is called with the return value of the
     * method as its first argument, then the methods original
     * arguments. If `fn` returns anything, it will override the
     * return value of the method.
     */
    function after(obj, name, fn) {
        var originalFn = obj[name];
        obj[name] = function () {
            var ret1 = originalFn.apply(this, arguments);
            var ret2 = fn.apply(this, [ret1].concat(slice.call(arguments)));
            return typeof ret2 !== "undefined" ? ret2 : ret1;
        };
    }

    /**
     * Advices the method `name` on `obj`, calling `fn` before the
     * method is called. `fn` is called with the same arguments as the
     * method.
     */
    function before(obj, name, fn) {
        var originalFn = obj[name];
        obj[name] = function () {
            fn.apply(this, arguments);
            return originalFn.apply(this, arguments);
        };
    }

    /**
     * Advices the method `name` on `obj`, calling `fn` instead of the
     * method. `fn` receives the original method as its first
     * argument, and then the methods original arguments. It is up to
     * the advicing function if and how the original method is called.
     */
    function around(obj, name, fn) {
        var f = partial(fn, obj[name]);
        obj[name] = function () {
            return f.apply(this, arguments);
        };
    }

    /** docs:function-list */
    return {
        _assert: _assert,
        _refute: _refute,
        trim: trim,
        doall: doall,
        reduce: reduce,
        all: all,
        some: some,
        onlySome: onlySome,
        isFunction: isFunction,
        isList: isList,
        toList: toList,
        identity: identity,
        defined: defined,
        unary: unary,
        prop: prop,
        func: func,
        eq: eq,
        compose: compose,
        callWith: callWith,
        partial: partial,
        bind: bind,
        keys: keys,
        values: values,
        concat: concat,
        flatten: flatten,
        uniq: uniq,
        first: first,
        select: select,
        negate: negate,
        reject: reject,
        seldef: seldef,
        map: map,
        mapdef: mapdef,
        mapcat: mapcat,
        partition: partition,
        difference: difference,
        interpose: interpose,
        indexOf: indexOf,
        after: after,
        before: before,
        around: around
    };
}(this));

if (typeof require === "function" && typeof module !== "undefined") {
    module.exports = cull;
}


### 泰国代表狠批世卫亲共 各国代表偷笑后热烈鼓掌(视频)
------------------------

#### [首页](https://github.com/gfw-breaker/banned-news/blob/master/README.md)   |   [手把手翻墙教程](https://github.com/gfw-breaker/guides/wiki)   |   [禁闻聚合安卓版](https://github.com/gfw-breaker/bn-android)   |   [网门安卓版](https://github.com/oGate2/oGate)   |   [神州正道安卓版](https://github.com/SzzdOgate/update)

   泰国代表发言狠酸世卫主席与干事长谭德塞亲共，让在场各国代表忍不住笑出声来。（图片来源：视频截图）

---

  【看中国2020年3月9日讯】

   武汉肺炎

  （COVID-19）疫情爆发以来，世界卫生组织（WHO）多次亲共言论引来外界批评，有网友发现，

   泰国

  代表于WHO第146次执行委员会会议时，发言狠酸

   世卫

  主席与干事长谭德塞，让在场各国代表忍不住笑出声来。

  这名网友转发影片且翻译

   泰国

  代表发言内容：“主席，全球COVID-19的旅行禁令都没人理会，例如WHO总干事长谭德塞，他才刚去过北京，现在又来这里开会，我们大家有被传染的风险，尤其是主席你最危险，因为你一直坐在干事长旁边，我个人倒是很安全，因为过去这几天，干事长都不跟我握手。”

   Thailand’s Proposal to WHO

    pic.twitter.com/sLDJ2s3joU

  — YFC (@YFC94373222)

   March 8, 2020

  泰国代表提到，“我们要阻止世人产生无谓的恐慌，重建大家对WHO的信心，有监于此，主席我建议WHO应该马上到中国开会，尤其是武汉，现在正是造访两千年历史的黄鹤楼最佳时机，或者去北京也行，可以到长城、紫禁城，现在不但人少空旷、价格也便宜！”此外，“如果我太太同意的话，我愿意捐出半年退休金来赞助WHO在中国举办会议，我也会自掏腰包去参加。”

  有趣的是，坐在前排的印度代表听到一半忍不住偷笑，中间也不时传来其它代表的笑声，等到泰国代表发言结束时，现场响起热烈掌声。

  影片曝光引来大批网友按赞留言：“这是在讽刺总干事的哈巴狗风格。很幽默有才。”“讲完大家还拍手叫好。”“

   世卫

  早被中共腐败了。”“共产党确实很坏，祸害中国还不够，有点钱就祸害国际组织了，这样的组织还是解散了吧。”

   忙着感谢中共捐款 世卫拒称武汉肺炎大流行

  3月6日，武汉病毒攻势达到一个进展，全世界有100,000多人感染，远远超过2002至2003年的SARS、MERS或近几年的埃博拉病毒感染人数。而中共和伊朗被指隐瞒本国武汉肺炎疫情。

  明尼苏达大学传染病研究与政策中心主任迈克尔・奥斯特霍尔姆（Michael Osterholm）说：“很明显，我们正处身‘大流行’，我不知道世卫组织为什么要拒绝接受这一事实。”

  据《中央社》报导，谭德塞对疫情评估保守，对中共捐款却是不吝言谢。他在周日的推特上写道：“来自中国（中共）的好消息，他们要捐给世卫组织2千万美元，协助全球对抗2019年COVID-19病毒疾病疫情。我诚挚感谢代表

   习近平

  主席传达这个好消息的（中共驻联合国日内瓦办事处）陈旭大使，也诚挚感谢中国（中共）政府与人民。”

  专家们表示，宣布“大流行”有望促使各国为病毒的最终到来做好准备。现在的情况是，在短短几周内，伊朗、意大利，和韩国病例报告从单个猛增到几千。不但如此，伊朗和意大利还向多国输出COVID-19病毒，包括来自中东和欧洲、非洲的几十个国家。

  爱丁堡大学全球公共卫生教授德维・斯里达（Devi Sridhar）共同主持了世卫组织对2014至2016年西非埃博拉疫情应对措施的回顾，她说，早就该宣布“大流行”。“这次暴发符合我们在COVID-19病毒之前对‘大流行’所有的定义。”斯里达说。

  对于大流行，美国疾病控制和预防中心（CDC）的定义是，“一种已蔓延到多个国家或大洲，通常会影响许多人的流行病。”

手机上长按并复制下列链接或二维码分享本文章：

https://github.com/gfw-breaker/banned-news/blob/master/pages/p3/925566.md

原文地址（需翻墙访问）：https://www.secretchina.com/news/gb/2020/03/09/925566.html

------------------------
#### [首页](https://github.com/gfw-breaker/banned-news/blob/master/README.md)  |  [一键翻墙软件](https://github.com/gfw-breaker/nogfw/blob/master/README.md)  | [《九评共产党》](https://github.com/gfw-breaker/9ping.md/blob/master/README.md#九评之一评共产党是什么) | [《解体党文化》](https://github.com/gfw-breaker/jtdwh.md/blob/master/README.md) | [《共产主义的终极目的》](https://github.com/gfw-breaker/gczydzjmd.md/blob/master/README.md)


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

"""Tools for working with MongoDB `ObjectIds
<http://dochub.mongodb.org/core/objectids>`_.
"""

import binascii
import calendar
import datetime
import hashlib
import os
import random
import socket
import struct
import threading
import time

from bson.errors import InvalidId
from bson.py3compat import PY3, bytes_from_hex, string_type, text_type
from bson.tz_util import utc

def _machine_bytes():
    """Get the machine portion of an ObjectId.
    """
    machine_hash = hashlib.md5()
    if PY3:
        # gethostname() returns a unicode string in python 3.x
        # while update() requires a byte string.
        machine_hash.update(socket.gethostname().encode())
    else:
        # Calling encode() here will fail with non-ascii hostnames
        machine_hash.update(socket.gethostname())
    return machine_hash.digest()[0:3]

def _raise_invalid_id(oid):
    raise InvalidId(
        "%r is not a valid ObjectId, it must be a 12-byte input"
        " or a 24-character hex string" % oid)

class ObjectId(object):
    """A MongoDB ObjectId.
    """

    _inc = random.randint(0, 0xFFFFFF)
    _inc_lock = threading.Lock()

    _machine_bytes = _machine_bytes()

    __slots__ = ('__id')

    _type_marker = 7

    def __init__(self, oid=None):
        """Initialize a new ObjectId.

        An ObjectId is a 12-byte unique identifier consisting of:

          - a 4-byte value representing the seconds since the Unix epoch,
          - a 3-byte machine identifier,
          - a 2-byte process id, and
          - a 3-byte counter, starting with a random value.

        By default, ``ObjectId()`` creates a new unique identifier. The
        optional parameter `oid` can be an :class:`ObjectId`, or any 12
        :class:`bytes` or, in Python 2, any 12-character :class:`str`.

        For example, the 12 bytes b'foo-bar-quux' do not follow the ObjectId
        specification but they are acceptable input::

          >>> ObjectId(b'foo-bar-quux')
          ObjectId('666f6f2d6261722d71757578')

        `oid` can also be a :class:`unicode` or :class:`str` of 24 hex digits::

          >>> ObjectId('0123456789ab0123456789ab')
          ObjectId('0123456789ab0123456789ab')
          >>>
          >>> # A u-prefixed unicode literal:
          >>> ObjectId(u'0123456789ab0123456789ab')
          ObjectId('0123456789ab0123456789ab')

        Raises :class:`~bson.errors.InvalidId` if `oid` is not 12 bytes nor
        24 hex digits, or :class:`TypeError` if `oid` is not an accepted type.

        :Parameters:
          - `oid` (optional): a valid ObjectId.

        .. mongodoc:: objectids
        """
        if oid is None:
            self.__generate()
        elif isinstance(oid, bytes) and len(oid) == 12:
            self.__id = oid
        else:
            self.__validate(oid)

    @classmethod
    def from_datetime(cls, generation_time):
        """Create a dummy ObjectId instance with a specific generation time.

        This method is useful for doing range queries on a field
        containing :class:`ObjectId` instances.

        .. warning::
           It is not safe to insert a document containing an ObjectId
           generated using this method. This method deliberately
           eliminates the uniqueness guarantee that ObjectIds
           generally provide. ObjectIds generated with this method
           should be used exclusively in queries.

        `generation_time` will be converted to UTC. Naive datetime
        instances will be treated as though they already contain UTC.

        An example using this helper to get documents where ``"_id"``
        was generated before January 1, 2010 would be:

        >>> gen_time = datetime.datetime(2010, 1, 1)
        >>> dummy_id = ObjectId.from_datetime(gen_time)
        >>> result = collection.find({"_id": {"$lt": dummy_id}})

        :Parameters:
          - `generation_time`: :class:`~datetime.datetime` to be used
            as the generation time for the resulting ObjectId.
        """
        if generation_time.utcoffset() is not None:
            generation_time = generation_time - generation_time.utcoffset()
        timestamp = calendar.timegm(generation_time.timetuple())
        oid = struct.pack(
            ">i", int(timestamp)) + b"\x00\x00\x00\x00\x00\x00\x00\x00"
        return cls(oid)

    @classmethod
    def is_valid(cls, oid):
        """Checks if a `oid` string is valid or not.

        :Parameters:
          - `oid`: the object id to validate

        .. versionadded:: 2.3
        """
        if not oid:
            return False

        try:
            ObjectId(oid)
            return True
        except (InvalidId, TypeError):
            return False

    def __generate(self):
        """Generate a new value for this ObjectId.
        """

        # 4 bytes current time
        oid = struct.pack(">i", int(time.time()))

        # 3 bytes machine
        oid += ObjectId._machine_bytes

        # 2 bytes pid
        oid += struct.pack(">H", os.getpid() % 0xFFFF)

        # 3 bytes inc
        with ObjectId._inc_lock:
            oid += struct.pack(">i", ObjectId._inc)[1:4]
            ObjectId._inc = (ObjectId._inc + 1) % 0xFFFFFF

        self.__id = oid

    def __validate(self, oid):
        """Validate and use the given id for this ObjectId.

        Raises TypeError if id is not an instance of
        (:class:`basestring` (:class:`str` or :class:`bytes`
        in python 3), ObjectId) and InvalidId if it is not a
        valid ObjectId.

        :Parameters:
          - `oid`: a valid ObjectId
        """
        if isinstance(oid, ObjectId):
            self.__id = oid.binary
        # bytes or unicode in python 2, str in python 3
        elif isinstance(oid, string_type):
            if len(oid) == 24:
                try:
                    self.__id = bytes_from_hex(oid)
                except (TypeError, ValueError):
                    _raise_invalid_id(oid)
            else:
                _raise_invalid_id(oid)
        else:
            raise TypeError("id must be an instance of (bytes, %s, ObjectId), "
                            "not %s" % (text_type.__name__, type(oid)))

    @property
    def binary(self):
        """12-byte binary representation of this ObjectId.
        """
        return self.__id

    @property
    def generation_time(self):
        """A :class:`datetime.datetime` instance representing the time of
        generation for this :class:`ObjectId`.

        The :class:`datetime.datetime` is timezone aware, and
        represents the generation time in UTC. It is precise to the
        second.
        """
        timestamp = struct.unpack(">i", self.__id[0:4])[0]
        return datetime.datetime.fromtimestamp(timestamp, utc)

    def __getstate__(self):
        """return value of object for pickling.
        needed explicitly because __slots__() defined.
        """
        return self.__id

    def __setstate__(self, value):
        """explicit state set from pickling
        """
        # Provide backwards compatability with OIDs
        # pickled with pymongo-1.9 or older.
        if isinstance(value, dict):
            oid = value["_ObjectId__id"]
        else:
            oid = value
        # ObjectIds pickled in python 2.x used `str` for __id.
        # In python 3.x this has to be converted to `bytes`
        # by encoding latin-1.
        if PY3 and isinstance(oid, text_type):
            self.__id = oid.encode('latin-1')
        else:
            self.__id = oid

    def __str__(self):
        if PY3:
            return binascii.hexlify(self.__id).decode()
        return binascii.hexlify(self.__id)

    def __repr__(self):
        return "ObjectId('%s')" % (str(self),)

    def __eq__(self, other):
        if isinstance(other, ObjectId):
            return self.__id == other.binary
        return NotImplemented

    def __ne__(self, other):
        if isinstance(other, ObjectId):
            return self.__id != other.binary
        return NotImplemented

    def __lt__(self, other):
        if isinstance(other, ObjectId):
            return self.__id < other.binary
        return NotImplemented

    def __le__(self, other):
        if isinstance(other, ObjectId):
            return self.__id <= other.binary
        return NotImplemented

    def __gt__(self, other):
        if isinstance(other, ObjectId):
            return self.__id > other.binary
        return NotImplemented

    def __ge__(self, other):
        if isinstance(other, ObjectId):
            return self.__id >= other.binary
        return NotImplemented

    def __hash__(self):
        """Get a hash value for this :class:`ObjectId`."""
        return hash(self.__id)


# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.

#[=======================================================================[.rst:
FindPNG
-------

Find libpng, the official reference library for the PNG image format.

Imported targets
^^^^^^^^^^^^^^^^

This module defines the following :prop_tgt:`IMPORTED` target:

``PNG::PNG``
  The libpng library, if found.

Result variables
^^^^^^^^^^^^^^^^

This module will set the following variables in your project:

``PNG_INCLUDE_DIRS``
  where to find png.h, etc.
``PNG_LIBRARIES``
  the libraries to link against to use PNG.
``PNG_DEFINITIONS``
  You should add_definitions(${PNG_DEFINITIONS}) before compiling code
  that includes png library files.
``PNG_FOUND``
  If false, do not try to use PNG.
``PNG_VERSION_STRING``
  the version of the PNG library found (since CMake 2.8.8)

Obsolete variables
^^^^^^^^^^^^^^^^^^

The following variables may also be set, for backwards compatibility:

``PNG_LIBRARY``
  where to find the PNG library.
``PNG_INCLUDE_DIR``
  where to find the PNG headers (same as PNG_INCLUDE_DIRS)

Since PNG depends on the ZLib compression library, none of the above
will be defined unless ZLib can be found.
#]=======================================================================]

if(PNG_FIND_QUIETLY)
  set(_FIND_ZLIB_ARG QUIET)
endif()
find_package(ZLIB ${_FIND_ZLIB_ARG})

if(ZLIB_FOUND)
  find_path(PNG_PNG_INCLUDE_DIR png.h PATH_SUFFIXES include/libpng)

  list(APPEND PNG_NAMES png libpng)
  unset(PNG_NAMES_DEBUG)
  set(_PNG_VERSION_SUFFIXES 17 16 15 14 12)
  if (PNG_FIND_VERSION MATCHES "^([0-9]+)\\.([0-9]+)(\\..*)?$")
    set(_PNG_VERSION_SUFFIX_MIN "${CMAKE_MATCH_1}${CMAKE_MATCH_2}")
    if (PNG_FIND_VERSION_EXACT)
      set(_PNG_VERSION_SUFFIXES ${_PNG_VERSION_SUFFIX_MIN})
    else ()
      string(REGEX REPLACE
          "${_PNG_VERSION_SUFFIX_MIN}.*" "${_PNG_VERSION_SUFFIX_MIN}"
          _PNG_VERSION_SUFFIXES "${_PNG_VERSION_SUFFIXES}")
    endif ()
    unset(_PNG_VERSION_SUFFIX_MIN)
  endif ()
  foreach(v IN LISTS _PNG_VERSION_SUFFIXES)
    list(APPEND PNG_NAMES png${v} libpng${v})
    list(APPEND PNG_NAMES_DEBUG png${v}d libpng${v}d)
  endforeach()
  unset(_PNG_VERSION_SUFFIXES)
  # For compatibility with versions prior to this multi-config search, honor
  # any PNG_LIBRARY that is already specified and skip the search.
  if(NOT PNG_LIBRARY)
    find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES})
    find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG})
    include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
    select_library_configurations(PNG)
    mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG)
  endif()
  unset(PNG_NAMES)
  unset(PNG_NAMES_DEBUG)

  # Set by select_library_configurations(), but we want the one from
  # find_package_handle_standard_args() below.
  unset(PNG_FOUND)

  if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
      # png.h includes zlib.h. Sigh.
      set(PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
      set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatibility
      set(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})

      if (CYGWIN)
        if(BUILD_SHARED_LIBS)
           # No need to define PNG_USE_DLL here, because it's default for Cygwin.
        else()
          set (PNG_DEFINITIONS -DPNG_STATIC)
        endif()
      endif ()

      if(NOT TARGET PNG::PNG)
        add_library(PNG::PNG UNKNOWN IMPORTED)
        set_target_properties(PNG::PNG PROPERTIES
          INTERFACE_COMPILE_DEFINITIONS "${PNG_DEFINITIONS}"
          INTERFACE_INCLUDE_DIRECTORIES "${PNG_INCLUDE_DIRS}"
          INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
        if(EXISTS "${PNG_LIBRARY}")
          set_target_properties(PNG::PNG PROPERTIES
            IMPORTED_LINK_INTERFACE_LANGUAGES "C"
            IMPORTED_LOCATION "${PNG_LIBRARY}")
        endif()
        if(EXISTS "${PNG_LIBRARY_RELEASE}")
          set_property(TARGET PNG::PNG APPEND PROPERTY
            IMPORTED_CONFIGURATIONS RELEASE)
          set_target_properties(PNG::PNG PROPERTIES
            IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
            IMPORTED_LOCATION_RELEASE "${PNG_LIBRARY_RELEASE}")
        endif()
        if(EXISTS "${PNG_LIBRARY_DEBUG}")
          set_property(TARGET PNG::PNG APPEND PROPERTY
            IMPORTED_CONFIGURATIONS DEBUG)
          set_target_properties(PNG::PNG PROPERTIES
            IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
            IMPORTED_LOCATION_DEBUG "${PNG_LIBRARY_DEBUG}")
        endif()
      endif()
  endif ()

  if (PNG_PNG_INCLUDE_DIR AND EXISTS "${PNG_PNG_INCLUDE_DIR}/png.h")
      file(STRINGS "${PNG_PNG_INCLUDE_DIR}/png.h" png_version_str REGEX "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\".+\"")

      string(REGEX REPLACE "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\"([^\"]+)\".*" "\\1" PNG_VERSION_STRING "${png_version_str}")
      unset(png_version_str)
  endif ()
endif()

include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(PNG
                                  REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR
                                  VERSION_VAR PNG_VERSION_STRING)

mark_as_advanced(PNG_PNG_INCLUDE_DIR PNG_LIBRARY )


module EmailerHelper

  include UploadsHelper
  include TasksHelper

  def email_global
    'font-size: 14px; color: rgb(50,50,50); font-family: Helvetica, Arial; margin: 20px 0'
  end

  def email_box(target = nil)
    case target
    when Task
      case target.status
      when 0 # new
        'background-color: #f5f5f5; border-bottom: 2px #cccccc solid;'
      when 2 # hold
        'background-color: #ffddff; border-bottom: 2px #bb99bb solid;'
      when 3 # resolved
        'background-color: #ddffdd; border-bottom: 2px #66aa66 solid;'
      when 4 # rejected
        'background-color: #ffdddd; border-bottom: 2px #aa6666 solid;'
      else # assigned and default
        'background-color: rgb(255,255,200); border-bottom: 2px rgb(220,220,150) solid;'
      end
    when Conversation
      'background-color: rgb(245,245,245); border-bottom: 2px rgb(200,200,200) solid;'
    when Activity
      'background-color: rgb(255,255,220); border-bottom: 2px rgb(200,200,200) solid;'
    else
      'background-color: rgb(255,255,220); border: 1px rgb(220,220,150) solid;'
    end + 'padding: 5px 10px; margin: 20px 0;'
  end

  def email_button
    "border-top: 1px solid #96D1F8; background: #65A9D7; background: -webkit-gradient(linear, left top, left bottom, from(#3E779D), to(#65A9D7)); background: -moz-linear-gradient(top, #3E779D, #65A9D7); padding: 4px 10px; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: rgba(0, 0, 0, 1) 0 1px 0; -moz-box-shadow: rgba(0, 0, 0, 1) 0 1px 0; box-shadow: rgba(0, 0, 0, 1) 0 1px 0; text-shadow: rgba(0, 0, 0, .4) 0 1px 0; color: white; font-size: 14px; font-family: Helvetica, serif; text-decoration: none; vertical-align: middle; margin: 5px 10px;"
  end

  def email_text(size)
    case size
    when :small then 'font-size: 10px; color: rgb(100,100,100);'
    when :normal then 'font-size: 14px; color: rgb(50,50,50);'
    when :big   then 'font-size: 18px; color: rgb(0,0,0);'
    end
  end

  def email_answer_line
    Emailer::ANSWER_LINE
  end

  def answer_instructions
    render 'emailer/answer'
  end

  def dont_answer
    render 'emailer/dont_answer'
  end

  def emailer_list_comments(comments, unread = nil )
    unread ||= comments.first
    render :partial => 'emailer/comment', :collection => comments, :locals => { :unread => unread }
  end

  def emailer_recent_tasks(project, user)
    recent_tasks = project.tasks.unarchived.
                    assigned_to(user).
                    sort { |a,b| (a.due_on || 1.year.ago) <=> (a.due_on || 1.year.ago)}
    render 'emailer/recent_tasks', :project => project, :recent_tasks => recent_tasks
  end

  def emailer_answer_to_this_email
    content_tag(:p,I18n.t('emailer.notify.reply')) if Teambox.config.allow_incoming_email
  end

  def emailer_commands_for_tasks(user)
    if Teambox.config.allow_incoming_email
      content_tag(:p,I18n.t('emailer.notify.task_commands', :username => user.login))
    end
  end

  def tasks_for_daily_reminder(tasks, user, header)
    if tasks && tasks.any?
      render 'emailer/tasks_for_daily_reminder', :tasks => tasks, :user => user, :header_text => header
    end
  end

  def task_status_style(task)
    styles = []
    styles << "display: inline"
    styles << "border-radius: 4px"
    styles << "font-size: 11px"
    styles << "color: white"
    styles << "width: 23px"
    styles << "text-align: center"
    bg_color = case task.status_name
      when "new"
        "rgb(170,170,170)"
      when "open"
        "rgb(50,50,250)"
      when "hold"
        "rgb(130,0,193)"
      when "resolved"
        "rgb(0,200,0)"
      when "rejected"
        "rgb(200,0,0)"
      end
    styles << "background-color:#{bg_color}"
    styles.join(";")
  end

  def task_due_on_style(task, options={})
    styles = []
    styles << "font-size: 12px"
    styles << "display: table-cell"
    styles << "color: rgb(200,0,0)" if options[:late]
    styles.join(";")
  end

  def task_style
    "font-size: 14px; font-weight: bold; color: #005; text-decoration: none;"
  end

  def task_project_style
    "font-size: 12px; color: #777; text-decoration: none;"
  end

  def email_navigation
    "order-bottom-left-radius: 5px 5px; border-bottom-right-radius: 5px 5px; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px;padding: 4px 10px;"
  end

end


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

<title>Uses of Class org.apache.nutch.tools.Benchmark.BenchmarkResults (apache-nutch 1.9 API)</title>
<meta name="date" content="2014-08-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
org.apache.nutch.tools.Benchmark.BenchmarkResults

Packages that use Benchmark.BenchmarkResults

Package
Description

org.apache.nutch.tools

Miscellaneous tools.

Uses of Benchmark.BenchmarkResults in org.apache.nutch.tools

Methods in org.apache.nutch.tools that return Benchmark.BenchmarkResults

Modifier and Type
Method and Description

Benchmark.BenchmarkResults
Benchmark.benchmark(int seeds,
         int depth,
         int threads,
         int maxPerHost,
         long topN,
         boolean delete,
         String plugins)

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2014 The Apache Software Foundation


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

package com.android.server.integrity.model;

import java.io.IOException;
import java.io.OutputStream;

/**
 * An output stream that tracks the total number written bytes since construction and allows
 * querying this value any time during the execution.
 *
 * <p>This class is used for constructing the rule indexing.
 */
public class ByteTrackedOutputStream extends OutputStream {

    private int mWrittenBytesCount;
    private final OutputStream mOutputStream;

    public ByteTrackedOutputStream(OutputStream outputStream) {
        mWrittenBytesCount = 0;
        mOutputStream = outputStream;
    }

    @Override
    public void write(int b) throws IOException {
        mWrittenBytesCount++;
        mOutputStream.write(b);
    }

    /**
     * Writes the given bytes into the output stream provided in constructor and updates the total
     * number of written bytes.
     */
    @Override
    public void write(byte[] bytes) throws IOException {
        write(bytes, 0, bytes.length);
    }

    @Override
    public void write(byte[] b, int off, int len) throws IOException {
        mWrittenBytesCount += len;
        mOutputStream.write(b, off, len);
    }

    /** Returns the total number of bytes written into the output stream at the requested time. */
    public int getWrittenBytesCount() {
        return mWrittenBytesCount;
    }
}


/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.spark.sql.sources

import java.io.File
import java.net.URI

import org.apache.spark.SparkException
import org.apache.spark.sql.{AnalysisException, QueryTest}
import org.apache.spark.sql.catalyst.expressions.UnsafeProjection
import org.apache.spark.sql.catalyst.plans.physical.HashPartitioning
import org.apache.spark.sql.execution.datasources.BucketingUtils
import org.apache.spark.sql.functions._
import org.apache.spark.sql.hive.test.TestHiveSingleton
import org.apache.spark.sql.internal.SQLConf
import org.apache.spark.sql.test.SQLTestUtils

class BucketedWriteSuite extends QueryTest with SQLTestUtils with TestHiveSingleton {
  import testImplicits._

  test("bucketed by non-existing column") {
    val df = Seq(1 -> "a", 2 -> "b").toDF("i", "j")
    intercept[AnalysisException](df.write.bucketBy(2, "k").saveAsTable("tt"))
  }

  test("numBuckets not greater than 0 or less than 100000") {
    val df = Seq(1 -> "a", 2 -> "b").toDF("i", "j")
    intercept[IllegalArgumentException](df.write.bucketBy(0, "i").saveAsTable("tt"))
    intercept[IllegalArgumentException](df.write.bucketBy(100000, "i").saveAsTable("tt"))
  }

  test("specify sorting columns without bucketing columns") {
    val df = Seq(1 -> "a", 2 -> "b").toDF("i", "j")
    intercept[IllegalArgumentException](df.write.sortBy("j").saveAsTable("tt"))
  }

  test("sorting by non-orderable column") {
    val df = Seq("a" -> Map(1 -> 1), "b" -> Map(2 -> 2)).toDF("i", "j")
    intercept[AnalysisException](df.write.bucketBy(2, "i").sortBy("j").saveAsTable("tt"))
  }

  test("write bucketed data using save()") {
    val df = Seq(1 -> "a", 2 -> "b").toDF("i", "j")

    val e = intercept[AnalysisException] {
      df.write.bucketBy(2, "i").parquet("/tmp/path")
    }
    assert(e.getMessage == "'save' does not support bucketing right now;")
  }

  test("write bucketed data using insertInto()") {
    val df = Seq(1 -> "a", 2 -> "b").toDF("i", "j")

    val e = intercept[AnalysisException] {
      df.write.bucketBy(2, "i").insertInto("tt")
    }
    assert(e.getMessage == "'insertInto' does not support bucketing right now;")
  }

  private val df = (0 until 50).map(i => (i % 5, i % 13, i.toString)).toDF("i", "j", "k")

  def tableDir: File = {
    val identifier = spark.sessionState.sqlParser.parseTableIdentifier("bucketed_table")
    new File(URI.create(hiveContext.sessionState.catalog.hiveDefaultTableFilePath(identifier)))
  }

  /**
   * A helper method to check the bucket write functionality in low level, i.e. check the written
   * bucket files to see if the data are correct.  User should pass in a data dir that these bucket
   * files are written to, and the format of data(parquet, json, etc.), and the bucketing
   * information.
   */
  private def testBucketing(
      dataDir: File,
      source: String,
      numBuckets: Int,
      bucketCols: Seq[String],
      sortCols: Seq[String] = Nil): Unit = {
    val allBucketFiles = dataDir.listFiles().filterNot(f =>
      f.getName.startsWith(".") || f.getName.startsWith("_")
    )

    for (bucketFile <- allBucketFiles) {
      val bucketId = BucketingUtils.getBucketId(bucketFile.getName).getOrElse {
        fail(s"Unable to find the related bucket files.")
      }

      // Remove the duplicate columns in bucketCols and sortCols;
      // Otherwise, we got analysis errors due to duplicate names
      val selectedColumns = (bucketCols ++ sortCols).distinct
      // We may lose the type information after write(e.g. json format doesn't keep schema
      // information), here we get the types from the original dataframe.
      val types = df.select(selectedColumns.map(col): _*).schema.map(_.dataType)
      val columns = selectedColumns.zip(types).map {
        case (colName, dt) => col(colName).cast(dt)
      }

      // Read the bucket file into a dataframe, so that it's easier to test.
      val readBack = spark.read.format(source)
        .load(bucketFile.getAbsolutePath)
        .select(columns: _*)

      // If we specified sort columns while writing bucket table, make sure the data in this
      // bucket file is already sorted.
      if (sortCols.nonEmpty) {
        checkAnswer(readBack.sort(sortCols.map(col): _*), readBack.collect())
      }

      // Go through all rows in this bucket file, calculate bucket id according to bucket column
      // values, and make sure it equals to the expected bucket id that inferred from file name.
      val qe = readBack.select(bucketCols.map(col): _*).queryExecution
      val rows = qe.toRdd.map(_.copy()).collect()
      val getBucketId = UnsafeProjection.create(
        HashPartitioning(qe.analyzed.output, numBuckets).partitionIdExpression :: Nil,
        qe.analyzed.output)

      for (row <- rows) {
        val actualBucketId = getBucketId(row).getInt(0)
        assert(actualBucketId == bucketId)
      }
    }
  }

  test("write bucketed data") {
    for (source <- Seq("parquet", "json", "orc")) {
      withTable("bucketed_table") {
        df.write
          .format(source)
          .partitionBy("i")
          .bucketBy(8, "j", "k")
          .saveAsTable("bucketed_table")

        for (i <- 0 until 5) {
          testBucketing(new File(tableDir, s"i=$i"), source, 8, Seq("j", "k"))
        }
      }
    }
  }

  test("write bucketed data with sortBy") {
    for (source <- Seq("parquet", "json", "orc")) {
      withTable("bucketed_table") {
        df.write
          .format(source)
          .partitionBy("i")
          .bucketBy(8, "j")
          .sortBy("k")
          .saveAsTable("bucketed_table")

        for (i <- 0 until 5) {
          testBucketing(new File(tableDir, s"i=$i"), source, 8, Seq("j"), Seq("k"))
        }
      }
    }
  }

  test("write bucketed data with the overlapping bucketBy and partitionBy columns") {
    intercept[AnalysisException](df.write
      .partitionBy("i", "j")
      .bucketBy(8, "j", "k")
      .sortBy("k")
      .saveAsTable("bucketed_table"))
  }

  test("write bucketed data with the identical bucketBy and partitionBy columns") {
    intercept[AnalysisException](df.write
      .partitionBy("i")
      .bucketBy(8, "i")
      .saveAsTable("bucketed_table"))
  }

  test("write bucketed data without partitionBy") {
    for (source <- Seq("parquet", "json", "orc")) {
      withTable("bucketed_table") {
        df.write
          .format(source)
          .bucketBy(8, "i", "j")
          .saveAsTable("bucketed_table")

        testBucketing(tableDir, source, 8, Seq("i", "j"))
      }
    }
  }

  test("write bucketed data without partitionBy with sortBy") {
    for (source <- Seq("parquet", "json", "orc")) {
      withTable("bucketed_table") {
        df.write
          .format(source)
          .bucketBy(8, "i", "j")
          .sortBy("k")
          .saveAsTable("bucketed_table")

        testBucketing(tableDir, source, 8, Seq("i", "j"), Seq("k"))
      }
    }
  }

  test("write bucketed data with bucketing disabled") {
    // The configuration BUCKETING_ENABLED does not affect the writing path
    withSQLConf(SQLConf.BUCKETING_ENABLED.key -> "false") {
      for (source <- Seq("parquet", "json", "orc")) {
        withTable("bucketed_table") {
          df.write
            .format(source)
            .partitionBy("i")
            .bucketBy(8, "j", "k")
            .saveAsTable("bucketed_table")

          for (i <- 0 until 5) {
            testBucketing(new File(tableDir, s"i=$i"), source, 8, Seq("j", "k"))
          }
        }
      }
    }
  }
}


/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.liferay.knowledgebase.hook.upgrade.v1_3_4;

import com.liferay.knowledgebase.util.ActionKeys;
import com.liferay.portal.kernel.dao.jdbc.DataAccess;
import com.liferay.portal.kernel.upgrade.UpgradeProcess;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author Adolfo Pérez
 */
public class UpgradeResourceAction extends UpgradeProcess {

	@Override
	protected void doUpgrade() throws Exception {
		if (_hasViewFeedbackResourceAction()) {
			runSQL(
				"delete from ResourceAction where actionId = '" +
					ActionKeys.VIEW_SUGGESTIONS + "'");

			runSQL(
				"update ResourceAction set actionId = '" +
					ActionKeys.VIEW_SUGGESTIONS + "' where actionId = '" +
						_ACTION_ID_VIEW_KB_FEEDBACK + "'");
		}
	}

	private boolean _hasViewFeedbackResourceAction() throws SQLException {
		Connection con = null;
		PreparedStatement ps = null;
		ResultSet rs = null;

		try {
			con = DataAccess.getUpgradeOptimizedConnection();

			ps = con.prepareStatement(
				"select count(*) from ResourceAction where actionId = ?");

			ps.setString(1, _ACTION_ID_VIEW_KB_FEEDBACK);

			rs = ps.executeQuery();

			if (rs.next()) {
				return rs.getInt(1) > 0;
			}

			return false;
		}
		finally {
			DataAccess.cleanUp(con, ps, rs);
		}
	}

	private static final String _ACTION_ID_VIEW_KB_FEEDBACK =
		"VIEW_KB_FEEDBACK";

}


// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP
#define BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP

#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/angular_momentum.hpp>

namespace boost {

namespace units {

namespace si {

typedef unit<angular_momentum_dimension,si::system>      angular_momentum;

} // namespace si

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP


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

//! Helper module for multisignature transactions.

use byteorder::{ByteOrder, LittleEndian, WriteBytesExt};
use exonum::{
    crypto::{self, Hash, PublicKey},
    merkledb::{
        access::{Access, RawAccessMut},
        BinaryKey, BinaryValue, Error as MerkledbError, ObjectHash, ProofMapIndex,
    },
};
use exonum_derive::FromAccess;

use std::{
    borrow::Cow,
    collections::BTreeSet,
    io::{Cursor, Write},
    mem,
};

/// Wrapper over a `ProofMapIndex` representing a set of values with 0 or more
/// votes for every value.
///
/// Votes are represented as public keys of authors and no verification for
/// ownership is performed within this index.
#[derive(Debug, FromAccess)]
#[from_access(transparent)]
pub struct MultisigIndex<T: Access, V>
where
    V: BinaryKey + ObjectHash,
{
    index: ProofMapIndex<T::Base, V, BinarySet<PublicKey>>,
}

impl<T, V> MultisigIndex<T, V>
where
    T: Access,
    V: BinaryKey + ObjectHash,
{
    pub fn confirmed_by(&self, id: &V, author: &PublicKey) -> bool {
        self.index
            .get(id)
            .and_then(|set| {
                if set.0.contains(author) {
                    Some(())
                } else {
                    None
                }
            })
            .is_some()
    }

    pub fn confirmations(&self, id: &V) -> usize {
        self.index.get(id).map_or(0, |confirms| confirms.0.len())
    }
}

impl<T, V> MultisigIndex<T, V>
where
    T: Access,
    T::Base: RawAccessMut,
    V: BinaryKey + ObjectHash,
{
    pub fn confirm(&mut self, id: &V, author: PublicKey) -> usize {
        let mut confirmations = self.index.get(id).unwrap_or_default();
        confirmations.0.insert(author);
        let len = confirmations.0.len();
        self.index.put(id, confirmations);
        len
    }

    /// Updates the stored confirmations to be an intersection of the set
    /// with current confirmations, and set of the actual validator keys.
    ///
    /// This method is intended to be called before comparing the amount of
    /// confirmations and amount of validators, so confirmations of nodes which
    /// are not validators anymore won't be taken into account.
    ///
    /// Returns the amount of confirmations in the updated set.
    fn intersect(&mut self, id: &V, validator_keys: &BTreeSet<PublicKey>) -> usize {
        let mut confirmations = self.index.get(id).unwrap_or_default();
        confirmations.0 = confirmations
            .0
            .intersection(validator_keys)
            .copied()
            .collect();
        let confirmations_amount = confirmations.0.len();
        self.index.put(id, confirmations);

        confirmations_amount
    }

    /// Calculates the intersection of current confirmations and actual list of
    /// validators.
    ///
    /// Returns `true` if all validators confirmed the item, and `false` otherwise.
    ///
    /// This method updates the list of confirmation, leaving confirmations only from
    /// the actual validators.
    pub fn intersect_with_validators(
        &mut self,
        id: &V,
        validator_keys: impl IntoIterator<Item = PublicKey>,
    ) -> bool {
        let validator_keys: BTreeSet<PublicKey> = validator_keys.into_iter().collect();
        let validators_amount = validator_keys.len();
        self.intersect(id, &validator_keys) == validators_amount
    }
}

impl<T, V> ObjectHash for MultisigIndex<T, V>
where
    T: Access,
    V: BinaryKey + ObjectHash,
{
    fn object_hash(&self) -> Hash {
        self.index.object_hash()
    }
}

/// A set of binary values.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct BinarySet<T: Ord>(pub BTreeSet<T>);

impl<T: Ord> BinarySet<T> {
    pub fn new() -> Self {
        Self(BTreeSet::default())
    }
}

impl<T: Ord> Default for BinarySet<T> {
    fn default() -> Self {
        Self::new()
    }
}

impl<T: Ord + BinaryValue> BinaryValue for BinarySet<T> {
    fn to_bytes(&self) -> Vec<u8> {
        let mut buf = Cursor::new(Vec::new());
        for value in &self.0 {
            let bytes = value.to_bytes();
            buf.write_u64::<LittleEndian>(bytes.len() as u64).unwrap();
            buf.write_all(&bytes).unwrap();
        }
        buf.into_inner()
    }

    fn from_bytes(bytes: Cow<'_, [u8]>) -> anyhow::Result<Self> {
        let mut values = BTreeSet::new();

        // Read the sequence of the (byte size, value bytes) pairs and deserialize them.
        let mut reader = bytes.as_ref();
        while !reader.is_empty() {
            // Verify that buffer size is enough and read the bytes length of the value.
            if reader.len() < mem::size_of::<u64>() {
                return Err(MerkledbError::new("Insufficient buffer size").into());
            }
            let bytes_len = LittleEndian::read_u64(reader) as usize;
            reader = &reader[mem::size_of::<u64>()..];

            // Verify remaining size and read the value.
            if reader.len() < bytes_len {
                return Err(MerkledbError::new("Insufficient buffer size").into());
            }
            let value = T::from_bytes(Cow::Borrowed(&reader[0..bytes_len]))?;
            values.insert(value);
            reader = &reader[bytes_len..];
        }

        Ok(Self(values))
    }
}

impl<T: Ord + BinaryValue> ObjectHash for BinarySet<T> {
    fn object_hash(&self) -> Hash {
        crypto::hash(&self.to_bytes())
    }
}

#[cfg(test)]
mod tests {
    use super::{BinarySet, BinaryValue};

    #[test]
    fn test_multisig_values_binary_value() {
        let mut set = BinarySet::default();
        let data = vec![
            b"abacaba1224634abcfdfdfca353".to_vec(),
            b"abacaba1224634abcfdfdfca353ee2224774".to_vec(),
        ];
        set.0.insert(data[1].clone());
        set.0.insert(data[0].clone());
        assert_eq!(set.0.len(), 2);

        let bytes = set.clone().into_bytes();
        let set2 = BinarySet::from_bytes(bytes.into()).unwrap();
        assert_eq!(set, set2);
    }
}