text:
using process::Clock;
using process::Failure;
using process::Future;
using process::Promise;

using std::string;

TEST(FutureTest, Future)
{
  Promise<bool> promise;
  promise.set(true);
  ASSERT_TRUE(promise.future().isReady());
  EXPECT_TRUE(promise.future().get());
}

TEST(FutureTest, Associate)
{
  Promise<bool> promise1;
  Future<bool> future1(true);
  promise1.associate(future1);
  ASSERT_TRUE(promise1.future().isReady());
  EXPECT_TRUE(promise1.future().get());

  Promise<bool> promise2;
  Promise<bool> promise2_;
  Future<bool> future2 = promise2_.future();
  promise2.associate(future2);
  promise2_.discard();
  ASSERT_TRUE(promise2.future().isDiscarded());

  Promise<bool> promise3;
  Promise<bool> promise4;
  promise3.associate(promise4.future());
  promise4.fail("associate");
  ASSERT_TRUE(promise3.future().isFailed());
  EXPECT_EQ("associate", promise3.future().failure());

  // Test 'discard' versus 'discarded' after association.
  Promise<bool> promise5;
  Future<bool> future3;
  promise5.associate(future3);
  EXPECT_FALSE(future3.isDiscarded());
  promise5.future().discard();
  EXPECT_TRUE(future3.hasDiscard());

  Promise<bool> promise6;
  Promise<bool> promise7;
  promise6.associate(promise7.future());
  promise7.discard();
  EXPECT_TRUE(promise6.future().isDiscarded());
}

void onAny(const Future<bool>& future, bool* b)
{
  ASSERT_TRUE(future.isReady());
  *b = future.get();
}

TEST(FutureTest, OnAny)
{
  bool b = false;
  Future<bool>(true)
    .onAny(lambda::bind(&onAny, lambda::_1, &b));
  EXPECT_TRUE(b);
}

static Future<string> itoa1(int* const& i)
{
  std::ostringstream out;
  out << *i;
  return out.str();
}

static string itoa2(int* const& i)
{
  std::ostringstream out;
  out << *i;
  return out.str();
}

TEST(FutureTest, Then)
{
  Promise<int*> promise;

  int i = 42;

  promise.set(&i);

  Future<string> future = promise.future()
    .then(lambda::bind(&itoa1, lambda::_1));

  ASSERT_TRUE(future.isReady());
  EXPECT_EQ("42", future.get());

  future = promise.future()
    .then(lambda::bind(&itoa2, lambda::_1));

  ASSERT_TRUE(future.isReady());
  EXPECT_EQ("42", future.get());
}

Future<int> repair(const Future<int>& future)
{
  EXPECT_TRUE(future.isFailed());
  EXPECT_EQ("Failure", future.failure());
  return 43;
}

// Checks that 'repair' callback gets executed if the future failed
// and not executed if the future is completed successfully.
TEST(FutureTest, Repair)
{
  // Check that the 'repair' callback _does not_ get executed by
  // making sure that when we complete the promise with a value that's
  // the value that we get back.
  Promise<int> promise1;

  Future<int> future1 = promise1.future()
    .repair(lambda::bind(&repair, lambda::_1));

  EXPECT_TRUE(future1.isPending());

  promise1.set(42); // So this means 'repair' should not get executed.

  AWAIT_EXPECT_EQ(42, future1);

  // Check that the 'repair' callback gets executed by failing the
  // promise which should invoke the 'repair' callback.
  Promise<int> promise2;

  Future<int> future2 = promise2.future()
    .repair(lambda::bind(&repair, lambda::_1));

  EXPECT_TRUE(future2.isPending());

  promise2.fail("Failure"); // So 'repair' should get called returning '43'.

  AWAIT_EXPECT_EQ(43, future2);
}

Future<Nothing> after(std::atomic_bool* executed, const Future<Nothing>& future)
{
  EXPECT_TRUE(future.hasDiscard());
  executed->store(true);
  return Failure("Failure");
}

// Checks that the 'after' callback gets executed if the future is not
// completed.
TEST(FutureTest, After1)
{
  Clock::pause();

  std::atomic_bool executed(false);

  Future<Nothing> future = Future<Nothing>()
    .after(Hours(42), lambda::bind(&after, &executed, lambda::_1));

  // A pending future should stay pending until 'after' is executed.
  EXPECT_TRUE(future.isPending());

  // Only advanced halfway, future should remain pending.
  Clock::advance(Hours(21));

  EXPECT_TRUE(future.isPending());

  // Even doing a discard on the future should keep it pending.
  future.discard();

  EXPECT_TRUE(future.isPending());

  // After advancing all the way the future should now fail because
  // the 'after' callback gets executed.
  Clock::advance(Hours(21));

  AWAIT_FAILED(future);

  EXPECT_TRUE(executed.load());

  Clock::resume();
}

// Checks that completing a promise will keep the 'after' callback
// from executing.
TEST(FutureTest, After2)
{
  Clock::pause();

  std::atomic_bool executed(false);

  Promise<Nothing> promise;

  Future<Nothing> future = promise.future()
    .after(Hours(42), lambda::bind(&after, &executed, lambda::_1));

  EXPECT_TRUE(future.isPending());

  // Only advanced halfway, future should remain pending.
  Clock::advance(Hours(21));

  EXPECT_TRUE(future.isPending());

  // Even doing a discard on the future should keep it pending.
  future.discard();

  EXPECT_TRUE(future.isPending());

  // Now set the promise, the 'after' timer should be cancelled and
  // the pending future should be completed.
  promise.set(Nothing());

  AWAIT_READY(future);

  // Advancing time the rest of the way should not cause the 'after'
  // callback to execute.
  Clock::advance(Hours(21));

  EXPECT_FALSE(executed.load());

  Clock::resume();
}

// Verifies that a a future does not leak memory after calling
// `after()`. This behavior ocurred because a future indirectly
// kept a reference counted pointer to itself.
TEST(FutureTest, After3)
{
  Future<Nothing> future;
  process::WeakFuture<Nothing> weak_future(future);

  EXPECT_SOME(weak_future.get());

  {
    Clock::pause();

    // The original future disappears here. After this call the
    // original future goes out of scope and should not be reachable
    // anymore.
    future = future
      .after(Milliseconds(1), [](Future<Nothing> f) {
        f.discard();
        return Nothing();
      });

    Clock::advance(Milliseconds(1));
    Clock::settle();

    AWAIT_READY(future);
  }

  EXPECT_NONE(weak_future.get());
  EXPECT_FALSE(future.hasDiscard());
}

static Future<bool> readyFuture()
{
  return true;
}

static Future<bool> failedFuture()
{
  return Failure("The value is not positive (or zero)");
}

static Future<bool> pendingFuture(const Future<bool>& future)
{
  return future; // Keep it pending.
}

static Future<string> second(const bool& b)
{
  return b ? string("true") : string("false");
}

static Future<string> third(const string& s)
{
  return s;
}

TEST(FutureTest, Chain)
{
  Future<string> s = readyFuture()
    .then(lambda::bind(&second, lambda::_1))
    .then(lambda::bind(&third, lambda::_1));

  s.await();

  ASSERT_TRUE(s.isReady());
  EXPECT_EQ("true", s.get());

  s = failedFuture()
    .then(lambda::bind(&second, lambda::_1))
    .then(lambda::bind(&third, lambda::_1));

  s.await();

  ASSERT_TRUE(s.isFailed());

  Promise<bool> promise;

  s = pendingFuture(promise.future())
    .then(lambda::bind(&second, lambda::_1))
    .then(lambda::bind(&third, lambda::_1));

  ASSERT_TRUE(s.isPending());

  promise.discard();

  AWAIT_DISCARDED(s);
}

static Future<bool> inner1(const Future<bool>& future)
{
  return future;
}

static Future<int> inner2(
    std::atomic_bool* executed, const Future<int>& future)
{
  executed->store(true);
  return future;
}

// Tests that Future::discard does not complete the future unless
// Promise::discard is invoked.
TEST(FutureTest, Discard1)
{
  Promise<bool> promise1;
  Promise<int> promise2;

  std::atomic_bool executed(false);

  Future<int> future = Future<string>("hello world")
    .then(lambda::bind(&inner1, promise1.future()))
    .then(lambda::bind(&inner2, &executed, promise2.future()));

  ASSERT_TRUE(future.isPending());

  future.discard();

  // The future should remain pending, even though we discarded it.
  ASSERT_TRUE(future.hasDiscard());
  ASSERT_TRUE(future.isPending());

  // The future associated with the lambda already executed in the
  // first 'then' should have the discard propagated to it.
  ASSERT_TRUE(promise1.future().hasDiscard());

  // But the future assocaited with the lambda that hasn't yet been
  // executed should not have the discard propagated to it.
  ASSERT_FALSE(promise2.future().hasDiscard());

  // Now discarding the promise should cause the outer future to be
  // discarded also.
  ASSERT_TRUE(promise1.discard());

  AWAIT_DISCARDED(future);

  // And the final lambda should never have executed.
  ASSERT_FALSE(executed.load());
  ASSERT_TRUE(promise2.future().isPending());
}

// Tests that Future::discard does not complete the future and
// Promise::set can still be invoked to complete the future.
TEST(FutureTest, Discard2)
{
  Promise<bool> promise1;
  Promise<int> promise2;

  std::atomic_bool executed(false);

  Future<int> future = Future<string>("hello world")
    .then(lambda::bind(&inner1, promise1.future()))
    .then(lambda::bind(&inner2, &executed, promise2.future()));

  ASSERT_TRUE(future.isPending());

  future.discard();

  // The future should remain pending, even though we discarded it.
  ASSERT_TRUE(future.hasDiscard());
  ASSERT_TRUE(future.isPending());

  // The future associated with the lambda already executed in the
  // first 'then' should have the discard propagated to it.
  ASSERT_TRUE(promise1.future().hasDiscard());

  // But the future assocaited with the lambda that hasn't yet been
  // executed should not have the discard propagated to it.
  ASSERT_FALSE(promise2.future().hasDiscard());

  // Now setting the promise should cause the outer future to be
  // discarded rather than executing the last lambda because the
  // implementation of Future::then does not continue the chain once a
  // discard occurs.
  ASSERT_TRUE(promise1.set(true));

  AWAIT_DISCARDED(future);

  // And the final lambda should never have executed.
  ASSERT_FALSE(executed.load());
  ASSERT_TRUE(promise2.future().isPending());
}

// Tests that Future::discard does not complete the future and
// Promise::fail can still be invoked to complete the future.
TEST(FutureTest, Discard3)
{
  Promise<bool> promise1;
  Promise<int> promise2;

  std::atomic_bool executed(false);

  Future<int> future = Future<string>("hello world")
    .then(lambda::bind(&inner1, promise1.future()))
    .then(lambda::bind(&inner2, &executed, promise2.future()));

  ASSERT_TRUE(future.isPending());

  future.discard();

  // The future should remain pending, even though we discarded it.
  ASSERT_TRUE(future.hasDiscard());
  ASSERT_TRUE(future.isPending());

  // The future associated with the lambda already executed in the
  // first 'then' should have the discard propagated to it.
  ASSERT_TRUE(promise1.future().hasDiscard());

  // But the future assocaited with the lambda that hasn't yet been
  // executed should not have the discard propagated to it.
  ASSERT_FALSE(promise2.future().hasDiscard());

  // Now failing the promise should cause the outer future to be
  // failed also.
  ASSERT_TRUE(promise1.fail("failure message"));

  AWAIT_FAILED(future);

  // And the final lambda should never have executed.
  ASSERT_FALSE(executed.load());
  ASSERT_TRUE(promise2.future().isPending());
}

// GTEST_IS_THREADSAFE is not defined on Windows. See MESOS-5903.
TEST_TEMP_DISABLED_ON_WINDOWS(FutureTest, Select)
{
  ASSERT_TRUE(GTEST_IS_THREADSAFE);

  Promise<int> promise1;
  Promise<int> promise2;
  Promise<int> promise3;
  Promise<int> promise4;

  std::set<Future<int>> futures = {
    promise1.future(),
    promise2.future(),
    promise3.future(),
    promise4.future()
  };

  promise1.set(42);

  Future<Future<int>> future = select(futures);

  AWAIT_READY(future);
  AWAIT_READY(future.get());
  EXPECT_EQ(42, future.get().get());

  futures.erase(promise1.future());

  future = select(futures);
  EXPECT_TRUE(future.isPending());

  future.discard();
  AWAIT_DISCARDED(future);
}

TEST(FutureTest, FromTry)
{
  Try<int> t = 1;
  Future<int> future = t;

  ASSERT_TRUE(future.isReady());
  EXPECT_EQ(1, future.get());

  t = Error("error");
  future = t;

  ASSERT_TRUE(future.isFailed());
}

TEST(FutureTest, ArrowOperator)
{
  Future<string> s = string("hello");
  EXPECT_EQ(5u, s->size());
}


text:
hackathons
==========

general repos for hackathon hacks

redpajama_set_name: RedPajamaGithub


text:
package com.ccoe.build.configweb;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class EmailArrayValidator implements
		ConstraintValidator<EmailArray, String[]> {

	@Override
	public void initialize(EmailArray constraintAnnotation) {
		// TODO Auto-generated method stub

	}

	@Override
	public boolean isValid(String[] emails, ConstraintValidatorContext context) {
		boolean valid = true;
		Pattern pattern;
		Matcher matcher;

		final String EMAIL_PATTERN =
				"^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
				+ "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";

		pattern = Pattern.compile(EMAIL_PATTERN);

		for (String email : emails) {
			matcher = pattern.matcher(email);
			valid = matcher.matches();
			if (!valid) {
				break;
			}
		}
		return valid;
	}

}


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

#include "nsInstantiationNode.h"
#include "nsTemplateRule.h"
#include "nsXULTemplateQueryProcessorRDF.h"

#include "prlog.h"
#ifdef PR_LOGGING
extern PRLogModuleInfo* gXULTemplateLog;
#endif

nsInstantiationNode::nsInstantiationNode(nsXULTemplateQueryProcessorRDF* aProcessor,
                                         nsRDFQuery* aQuery)
        : mProcessor(aProcessor),
          mQuery(aQuery)
{
#ifdef PR_LOGGING
    PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
           ("nsInstantiationNode[%p] query=%p", this, aQuery));
#endif

    MOZ_COUNT_CTOR(nsInstantiationNode);
}

nsInstantiationNode::~nsInstantiationNode()
{
    MOZ_COUNT_DTOR(nsInstantiationNode);
}

nsresult
nsInstantiationNode::Propagate(InstantiationSet& aInstantiations,
                               bool aIsUpdate, bool& aTakenInstantiations)
{
    // In update mode, iterate through the results and call the template
    // builder to update them. In non-update mode, cache them in the processor
    // to be used during processing. The results are cached in the processor
    // so that the simple rules are only computed once. In this situation, all
    // data for all queries are calculated at once.
    nsresult rv = NS_OK;

    aTakenInstantiations = false;

    if (aIsUpdate) {
        // Iterate through newly added keys to determine which rules fired.
        //
        // XXXwaterson Unfortunately, this could also lead to retractions;
        // e.g., (container ?a ^empty false) could become "unmatched". How
        // to track those?
        nsCOMPtr<nsIDOMNode> querynode;
        mQuery->GetQueryNode(getter_AddRefs(querynode));

        InstantiationSet::ConstIterator last = aInstantiations.Last();
        for (InstantiationSet::ConstIterator inst = aInstantiations.First(); inst != last; ++inst) {
            nsAssignmentSet assignments = inst->mAssignments;

            nsCOMPtr<nsIRDFNode> node;
            assignments.GetAssignmentFor(mQuery->mMemberVariable,
                                         getter_AddRefs(node));
            if (node) {
                nsCOMPtr<nsIRDFResource> resource = do_QueryInterface(node);
                if (resource) {
                    nsRefPtr<nsXULTemplateResultRDF> nextresult =
                        new nsXULTemplateResultRDF(mQuery, *inst, resource);
                    if (! nextresult)
                        return NS_ERROR_OUT_OF_MEMORY;

                    rv = mProcessor->AddMemoryElements(*inst, nextresult);
                    if (NS_FAILED(rv))
                        return rv;

                    mProcessor->GetBuilder()->AddResult(nextresult, querynode);
                }
            }
        }
    }
    else {
        nsresult rv = mQuery->SetCachedResults(mProcessor, aInstantiations);
        if (NS_SUCCEEDED(rv))
            aTakenInstantiations = true;
    }

    return rv;
}


text:
package synergynetframework.appsystem.contentsystem.jme.items;

import synergynetframework.appsystem.contentsystem.items.ContentItem;
import synergynetframework.appsystem.contentsystem.items.implementation.interfaces.IRoundContentItemImplementation;

import com.jme.scene.Spatial;

/**
 * The Class JMERoundContentItem.
 */
public class JMERoundContentItem extends JMEOrthoContentItem implements
		IRoundContentItemImplementation {

	/**
	 * Instantiates a new JME round content item.
	 *
	 * @param contentItem
	 *            the content item
	 * @param spatial
	 *            the spatial
	 */
	public JMERoundContentItem(ContentItem contentItem, Spatial spatial) {
		super(contentItem, spatial);
	}

	/*
	 * (non-Javadoc)
	 * @see
	 * synergynetframework.appsystem.contentsystem.items.implementation.interfaces
	 * .IRoundContentItemImplementation#setRadius(float)
	 */
	@Override
	public void setRadius(float radius) {
	}

}


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

namespace Contract
{
    public interface IScreenshotJobRepository
    {
        Guid Add(ScreenshotJobRequest request, ICollection<ScreenshotJob> jobs);
    }
}


text:
<!doctype html>

<meta charset="utf-8">
<title>Example - stopImmediatePropagation</title>

        preventDefault
        stopPropagation
        stopImmediatePropagation


text:
package org.apache.maven.archiva.web.tags;

import org.apache.taglibs.standard.tag.common.core.NullAttributeException;
import org.apache.taglibs.standard.tag.el.core.ExpressionUtil;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.Tag;

/**
 * ExpressionTool
 *
 * @version $Id$
 */
public class ExpressionTool
{
    private PageContext pageContext;

    private Tag tag;

    private String tagName;

    public ExpressionTool( PageContext pageContext, Tag tag, String tagName )
    {
        this.pageContext = pageContext;
        this.tag = tag;
        this.tagName = tagName;
    }

    public boolean optionalBoolean( String propertyName, String expression, boolean defaultValue )
        throws JspException
    {
        try
        {
            Boolean ret = (Boolean) ExpressionUtil.evalNotNull( this.tagName, propertyName, expression, Boolean.class,
                                                                this.tag, this.pageContext );

            if ( ret == null )
            {
                return defaultValue;
            }

            return ret.booleanValue();
        }
        catch ( NullAttributeException e )
        {
            return defaultValue;
        }
    }

    public String optionalString( String propertyName, String expression, String defaultValue )
        throws JspException
    {
        try
        {
            String ret = (String) ExpressionUtil.evalNotNull( this.tagName, propertyName, expression, String.class,
                                                              this.tag, this.pageContext );

            if ( ret == null )
            {
                return defaultValue;
            }

            return ret;
        }
        catch ( NullAttributeException e )
        {
            return defaultValue;
        }
    }

    public String requiredString( String propertyName, String expression )
        throws JspException
    {
        try
        {
            String ret = (String) ExpressionUtil.evalNotNull( this.tagName, propertyName, expression, String.class,
                                                              this.tag, this.pageContext );
            return ret;
        }
        catch ( NullAttributeException e )
        {
            String emsg = "Required " + this.tagName + " property [" + propertyName + "] is null!";

            log( emsg, e );
            throw new JspException( emsg );
        }
    }

    private void log( String msg, Throwable t )
    {
        pageContext.getServletContext().log( msg, t );
    }
}


text:
"use strict";

define('app/firebase/auth', ['app/firebase/host', 'Firebase', 'FirebaseSimpleLogin'], function (host, Firebase, FirebaseSimpleLogin) {

	return function (callback) {
		return new FirebaseSimpleLogin(new Firebase(host), callback || function() {});
	};
});


text:
//
//  UIButton+BKBackgroundColor.h
//  BKFrameworkDemo
//
//  Created by bestkai on 2017/3/16.
//  Copyright © 2017年 bestkai. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIButton (BKBackgroundColor)

/**
 *  @brief  使用颜色设置按钮背景
 *
 *  @param backgroundColor 背景颜色
 *  @param state           按钮状态
 */
- (void)bk_setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state;

@end


text:
Clone the ```symfony-sandbox``` repository into your webroot:

    git clone git@github.com:ymc-devel/symfony-sandbox.git

Install the vendor bundles via composer

    cd symfony-sandbox
    curl -s https://getcomposer.org/installer | php
    php composer.phar install

Install the YMC bundles via Git Submodules:

    git submodule init
    git submodule update

After this installation, they can be found in ```src/Ymc/*Bundle```

## Configuration

Copy and edit ```parameters.yml.dist```

    cp app/config/parameters.yml.dist app/config/parameters.yml
    vi app/config/parameters.yml
    # put your database settings in
    php app/console doctrine:schema:update

Change file-permissions like the following

    chmod -R 777 app/cache
    chmod -R 777 app/log

**your are done now **

Open your browser and go to http://MY.LOCAL.HOST/symfony-standard/web/app_dev.php


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>类 org.jeewx.api.core.exception.WexinReqException的使用</title>
<meta name="date" content="2019-06-04">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

您的浏览器已禁用 JavaScript。

概览

程序包

类

使用

树

已过时

索引

帮助

上一个

下一个

框架

无框架

所有类

类 org.jeewx.api.core.exception.WexinReqException
的使用

使用WexinReqException的程序包

程序包
说明

org.jeewx.api.core.handler

org.jeewx.api.core.handler.impl

org.jeewx.api.core.req

org.jeewx.api.core.test

org.jeewx.api.coupon.location

org.jeewx.api.coupon.qrcode

org.jeewx.api.report.datacube

org.jeewx.api.report.datastatistics

org.jeewx.api.report.datastatistics.graphicanalysis

org.jeewx.api.report.datastatistics.useranalysis

org.jeewx.api.third

org.jeewx.api.wxaccount

org.jeewx.api.wxbase.wxmedia

org.jeewx.api.wxbase.wxserviceip

org.jeewx.api.wxbase.wxtoken

org.jeewx.api.wxmenu

org.jeewx.api.wxsendmsg

org.jeewx.api.wxsendmsg.test

org.jeewx.api.wxuser.group

org.jeewx.api.wxuser.tag

org.jeewx.api.wxuser.user

org.jeewx.api.core.handler中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.core.handler中的方法

限定符和类型
方法和说明

java.lang.String
WeiXinReqHandler.doRequest(WeixinReqParam weixinReqParam)

org.jeewx.api.core.handler.impl中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.core.handler.impl中的方法

限定符和类型
方法和说明

java.lang.String
WeixinReqTemplateMessageHandler.doRequest(WeixinReqParam weixinReqParam)

java.lang.String
WeixinReqMenuCreateHandler.doRequest(WeixinReqParam weixinReqParam)

java.lang.String
WeixinReqMediaUploadHandler.doRequest(WeixinReqParam weixinReqParam)

java.lang.String
WeixinReqMediaDownHandler.doRequest(WeixinReqParam weixinReqParam)

java.lang.String
WeixinReqLogoUploadHandler.doRequest(WeixinReqParam weixinReqParam)

java.lang.String
WeixinReqDefaultHandler.doRequest(WeixinReqParam weixinReqParam)

org.jeewx.api.core.req中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.core.req中的方法

限定符和类型
方法和说明

java.lang.String
WeiXinReqService.doWeinxinReq(WeixinReqParam weixinReqParam)

传入请求的参数,获取对应额接口返回信息

net.sf.json.JSONObject
WeiXinReqService.doWeinxinReqJson(WeixinReqParam weixinReqParam)

返回json对象

org.jeewx.api.core.test中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.core.test中的方法

限定符和类型
方法和说明

java.lang.String
ReqTest.getDownMedia(java.lang.String token)

测试上传文件

java.lang.String
ReqTest.getKfaccountList(java.lang.String access_token)

测试获取token

java.lang.String
ReqTest.getServieIp(java.lang.String token)

测试获取服务器ip

java.lang.String
ReqTest.getToken()

测试获取token

java.lang.String
ReqTest.getUploadMedia(java.lang.String token)

测试上传文件

org.jeewx.api.coupon.location中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.coupon.location中的方法

限定符和类型
方法和说明

CardInfoRtn
JwLocationAPI.doAddCard(java.lang.String accesstoken,
         CardInfo cardInfo)

CreateCard 创建卡

BatchaddRtn
JwLocationAPI.doBatchadd(java.lang.String accesstoken,
          Batchadd batchadd)

批量导入门店信息

BatchgetRtn
JwLocationAPI.doBatchget(java.lang.String accesstoken,
          Batchget batchget)

拉取门店列表

GetcolorsRtn
JwLocationAPI.doGetcolors(java.lang.String accesstoken)

获取颜色列表

org.jeewx.api.coupon.qrcode中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.coupon.qrcode中的方法

限定符和类型
方法和说明

static QrcodeRtnInfo
JwQrcodeAPI.doAddQrcode(java.lang.String accesstoken,
           QrcodeInfo qrcodeInfo)

创建二维码

static GetticketRtn
JwQrcodeAPI.doGetticket(java.lang.String accesstoken)

获取api_ticket

org.jeewx.api.report.datacube中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.report.datacube中的方法

限定符和类型
方法和说明

static java.util.List<WxDataCubeStreamMsgDistInfo>
JwDataCubeAPI.getWxDataCubeStreamMsgDistInfo(java.lang.String accesstoken,
                              java.lang.String bDate,
                              java.lang.String eDate)

获取消息发送分布数据

static java.util.List<WxDataCubeStreamMsgDistMonthInfo>
JwDataCubeAPI.getWxDataCubeStreamMsgDistMonthInfo(java.lang.String accesstoken,
                                   java.lang.String bDate,
                                   java.lang.String eDate)

获取消息发送分布月数据

static java.util.List<WxDataCubeStreamMsgDistWeekInfo>
JwDataCubeAPI.getWxDataCubeStreamMsgDistWeekInfo(java.lang.String accesstoken,
                                  java.lang.String bDate,
                                  java.lang.String eDate)

获取消息发送分布周数据

static java.util.List<WxDataCubeStreamMsgHourInfo>
JwDataCubeAPI.getWxDataCubeStreamMsgHourInfo(java.lang.String accesstoken,
                              java.lang.String bDate,
                              java.lang.String eDate)

获取消息分送分时数据

static java.util.List<WxDataCubeStreamMsgInfo>
JwDataCubeAPI.getWxDataCubeStreamMsgInfo(java.lang.String accesstoken,
                          java.lang.String bDate,
                          java.lang.String eDate)

获取消息发送概况数据

static java.util.List<WxDataCubeStreamMsgMonthInfo>
JwDataCubeAPI.getWxDataCubeStreamMsgMonthInfo(java.lang.String accesstoken,
                               java.lang.String bDate,
                               java.lang.String eDate)

获取消息发送月数据

static java.util.List<WxDataCubeStreamMsgWeekInfo>
JwDataCubeAPI.getWxDataCubeStreamMsgWeekInfo(java.lang.String accesstoken,
                              java.lang.String bDate,
                              java.lang.String eDate)

获取消息发送周数据

org.jeewx.api.report.datastatistics中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.report.datastatistics中的方法

限定符和类型
方法和说明

java.lang.String
Test.getAccessToken()

void
Test.getArticleSummary()

void
Test.getArticleTotal()

void
Test.getUserCumulate()

void
Test.getUserRead()

void
Test.getUserReadHour()

void
Test.getUserShare()

void
Test.getUserShareHour()

void
Test.getUserSummary()

static void
Test.main(java.lang.String[] args)

org.jeewx.api.report.datastatistics.graphicanalysis中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.report.datastatistics.graphicanalysis中的方法

限定符和类型
方法和说明

static java.util.List<GraphicAnalysisRtnInfo>
JwGraphicAnalysisAPI.getArticleSummary(java.lang.String accesstoken,
                 java.lang.String begin_date,
                 java.lang.String end_date)

static java.util.List<GraphicAnalysisRtnInfo>
JwGraphicAnalysisAPI.getArticleTotal(java.lang.String accesstoken,
               java.lang.String begin_date,
               java.lang.String end_date)

static java.util.List<GraphicAnalysisRtnInfo>
JwGraphicAnalysisAPI.getUserRead(java.lang.String accesstoken,
           java.lang.String begin_date,
           java.lang.String end_date)

static java.util.List<GraphicAnalysisRtnInfo>
JwGraphicAnalysisAPI.getUserReadHour(java.lang.String accesstoken,
               java.lang.String begin_date,
               java.lang.String end_date)

static java.util.List<GraphicAnalysisRtnInfo>
JwGraphicAnalysisAPI.getUserShare(java.lang.String accesstoken,
            java.lang.String begin_date,
            java.lang.String end_date)

static java.util.List<GraphicAnalysisRtnInfo>
JwGraphicAnalysisAPI.getUserShareHour(java.lang.String accesstoken,
                java.lang.String begin_date,
                java.lang.String end_date)

org.jeewx.api.report.datastatistics.useranalysis中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.report.datastatistics.useranalysis中的方法

限定符和类型
方法和说明

static java.util.List<UserAnalysisRtnInfo>
JwUserAnalysisAPI.getUserCumulate(java.lang.String accesstoken,
               java.lang.String begin_date,
               java.lang.String end_date)

获取累计用户数据

static java.util.List<UserAnalysisRtnInfo>
JwUserAnalysisAPI.getUserSummary(java.lang.String accesstoken,
              java.lang.String begin_date,
              java.lang.String end_date)

org.jeewx.api.third中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.third中的方法

限定符和类型
方法和说明

static ApiAuthorizerTokenRet
JwThirdAPI.apiAuthorizerToken(ApiAuthorizerToken apiAuthorizerToken,
                  java.lang.String component_access_token)

4、获取(刷新)授权公众号的令牌

static ApiGetAuthorizerRet
JwThirdAPI.apiGetAuthorizerInfo(ApiGetAuthorizer apiGetAuthorizer,
                    java.lang.String component_access_token)

5、获取授权方的账户信息

static AuthorizerOptionRet
JwThirdAPI.apiGetAuthorizerOption(AuthorizerOption authorizerOption,
                      java.lang.String component_access_token)

6、获取授权方的选项设置信息

static AuthorizerSetOptionRet
JwThirdAPI.apiSetAuthorizerOption(AuthorizerSetOption authorizerSetOption,
                      java.lang.String component_access_token)

7、设置授权方的选项信息

static java.lang.String
JwThirdAPI.getAccessToken(ApiComponentToken apiComponentToken)

1、获取第三方平台access_token

static ReOpenAccessToken
JwThirdAPI.getAccessTokenByCode(java.lang.String appid,
                    java.lang.String code,
                    java.lang.String grant_type,
                    java.lang.String component_appid,
                    java.lang.String component_access_token)

获取第三方平台access_token

static net.sf.json.JSONObject
JwThirdAPI.getApiQueryAuthInfo(java.lang.String component_appid,
                   java.lang.String authorization_code,
                   java.lang.String component_access_token)

3、使用授权码换取公众号的授权信息

static java.lang.String
JwThirdAPI.getPreAuthCode(java.lang.String component_appid,
              java.lang.String component_access_token)

2、获取预授权码

org.jeewx.api.wxaccount中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.wxaccount中的方法

限定符和类型
方法和说明

static WxQrcode
JwAccountAPI.createQrcode(java.lang.String accessToken,
            java.lang.String scene_str,
            java.lang.String action_name,
            java.lang.String expire_seconds)

expire_seconds  该二维码有效时间,以秒为单位。

static java.lang.String
JwAccountAPI.getShortUrl(java.lang.String accessToken,
           java.lang.String longUrl)

获取短链接信息

org.jeewx.api.wxbase.wxmedia中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.wxbase.wxmedia中的方法

限定符和类型
方法和说明

static WxMediaForMaterialResponse
JwMediaAPI.addMediaFileByMaterialNews(java.lang.String accesstoken,
                          java.lang.String type,
                          java.lang.String filePath,
                          java.lang.String fileName)

新增其他永久素材

static void
JwMediaAPI.deleteArticlesByMaterial(java.lang.String accesstoken,
                        java.lang.String mediaId)

删除永久素材 (经测试,该方法调用接口地址不对)

static void
JwMediaAPI.deleteArticlesByMaterialNews(java.lang.String accesstoken,
                            java.lang.String mediaId)

删除永久素材

static WxDwonload
JwMediaAPI.downMedia(java.lang.String accessToke,
         java.lang.String media_id,
         java.lang.String filePath)

下载多媒体

static WxArticlesRespponseByMaterial
JwMediaAPI.getArticlesByMaterial(java.lang.String accesstoken,
                     java.lang.String mediaId)

获取永久素材 (经测试,该方法调用接口返回时封装实体对象不可用)

static java.util.List<WxNewsArticle>
JwMediaAPI.getArticlesByMaterialNews(java.lang.String accesstoken,
                         java.lang.String mediaId)

获取永久素材

static WxCountResponse
JwMediaAPI.getMediaCount(java.lang.String accesstoken)

获取素材总数

static java.lang.String
JwMediaAPI.getMediaIdByMaterial(java.lang.String accesstoken,
                    java.util.List<WxArticle> wxArticles)

新增永久图文素材  (经测试,该方法不可用)

static java.lang.String
JwMediaAPI.getMediaIdForMaterial(java.lang.String accesstoken,
                     WxMediaForMaterial wxMediaForMaterial)

永久获取多媒体资源的mediaId

static WxNews
JwMediaAPI.queryArticlesByMaterial(java.lang.String accesstoken,
                       java.lang.String type,
                       int offset,
                       int count)

获取素材列表 (经测试,该方法调用接口后json数据转java对象报错)

static WxNews
JwMediaAPI.queryArticlesByMaterialNews(java.lang.String accesstoken,
                           java.lang.String type,
                           int offset,
                           int count)

获取素材列表

static void
JwMediaAPI.updateArticlesByMaterial(java.lang.String accesstoken,
                        WxUpdateArticle wxUpdateArticle)

修改永久素材

static void
JwMediaAPI.updateArticlesByMaterialNews(java.lang.String accesstoken,
                            WxUpdateArticle wxUpdateArticle)

修改永久素材

static WxArticlesResponse
JwMediaAPI.uploadArticlesByMaterial(java.lang.String accesstoken,
                        java.util.List<WxArticle> wxArticles)

上传新增永久图文素材 (经测试,该方法不可用)

static WxArticlesResponse
JwMediaAPI.uploadArticlesByMaterialNews(java.lang.String accesstoken,
                            java.util.List<WxArticle> wxArticles)

上传新增永久图文素材

static WxUpload
JwMediaAPI.uploadMedia(java.lang.String accessToke,
           java.lang.String type,
           java.lang.String fileNamePath)

static WxMediaForMaterialResponse
JwMediaAPI.uploadMediaFileByMaterial(java.lang.String accesstoken,
                         WxMediaForMaterial wx)

新增其他类型永久素材  (经测试,该方法不能上传永久图片素材)

org.jeewx.api.wxbase.wxserviceip中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.wxbase.wxserviceip中的方法

限定符和类型
方法和说明

static java.util.List<java.lang.String>
JwServiceIpAPI.getServiceIpList(java.lang.String accessToke)

获取服务的ip列表信息

org.jeewx.api.wxbase.wxtoken中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.wxbase.wxtoken中的方法

限定符和类型
方法和说明

static java.lang.String
JwTokenAPI.getAccessToken(java.lang.String appid,
              java.lang.String appscret)

获取权限令牌信息

org.jeewx.api.wxmenu中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.wxmenu中的方法

限定符和类型
方法和说明

static java.lang.String
JwMenuAPI.createMenu(java.lang.String accessToken,
          java.util.List<WeixinButton> button)

创建菜单
  button        是       一级菜单数组,个数应为1~3个
                sub_button      否       二级菜单数组,个数应为1~5个
                type    是       菜单的响应动作类型
                name    是       菜单标题,不超过16个字节,子菜单不超过40个字节
                key     click等点击类型必须    菜单KEY值,用于消息接口推送,不超过128字节
                url     view类型必须        网页链接,用户点击菜单可打开链接,不超过256字节
                appid 小程序appid ,在创建小程序菜单时候用到
                pagepath 小程序的页面路径,在创建小程序菜单时候用到

static java.lang.String
JwMenuAPI.deleteMenu(java.lang.String accessToken)

删除所有的菜单

static java.util.List<WeixinButton>
JwMenuAPI.getAllMenu(java.lang.String accessToken)

获取所有的菜单

static CustomWeixinButtonConfig
JwMenuAPI.getAllMenuConfigure(java.lang.String accessToken)

获取自定义接口配置

org.jeewx.api.wxsendmsg中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.wxsendmsg中的方法

限定符和类型
方法和说明

static java.lang.String
JwKfaccountAPI.addKfacount(java.lang.String accessToken,
           java.lang.String kf_account,
           java.lang.String nickname,
           java.lang.String password)

添加客服
  kf_account    是       完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符。

static java.lang.String
JwTemplateMessageAPI.addTemplate(java.lang.String accessToken,
           java.lang.String template_id_short)

添加模板信息

static net.sf.json.JSONObject
JwMessageCommentAPI.closeComment(java.lang.String accesstoken,
            java.lang.String msg_data_id,
            int index)

static net.sf.json.JSONObject
JwMessageCommentAPI.deleteComment(java.lang.String accesstoken,
             java.lang.String msg_data_id,
             int index,
             java.lang.String user_comment_id)

删除评论

static java.lang.String
JwKfaccountAPI.deleteKfaccount(java.lang.String accessToken,
               java.lang.String kf_account,
               java.lang.String nickname,
               java.lang.String password)

删除客服账号

static net.sf.json.JSONObject
JwMessageCommentAPI.deleteReplyComment(java.lang.String accesstoken,
                  java.lang.String msg_data_id,
                  int index,
                  java.lang.String user_comment_id)

删除回复

static java.lang.String
JwSendMessageAPI.deleteSendMessage(java.lang.String accesstoken,
                 java.lang.String msg_id)

根据群发的msg_id删除群发

 请注意,只有已经发送成功的消息才能删除删除消息只是将消息的图文详情页失效,已经收到的用户,还是能在其本地看到消息卡片。

static java.lang.String
JwSendTemplateMsgAPI.delTemplate(java.lang.String accessToken,
           java.lang.String template_id)

删除模板

static java.util.List<WxKfaccount>
JwKfaccountAPI.getAllKfaccount(java.lang.String accessToken)

获取所有的客服账号信息

static java.util.List<WxKfaccount>
JwKfaccountAPI.getAllOnlineKfaccount(java.lang.String accessToken)

获取在线客服信息
 kf_account     完整客服账号,格式为:账号前缀@公众号微信号
                status  客服在线状态 1:pc在线,2:手机在线。

static AutoReplyInfoRule
JwGetAutoReplyRuleAPI.getAutoReplyInfoRule(java.lang.String accessToken)

获取自动回复规则

static java.lang.String
JwSendMessageAPI.getFileMediaId(java.lang.String accesstoken,
              WxArticle article)

获取文件上传文件的media_id

static java.lang.String
JwSendTemplateMsgAPI.getIndustry(java.lang.String accessToken)

获取行业信息

static java.lang.String
JwSendMessageAPI.getMediaId(java.lang.String accesstoken,
          java.util.List<WxArticle> wxArticles)

static java.lang.String
JwSendMessageAPI.getMediaId(java.lang.String accesstoken,
          WxMedia wxMedia)

获取多媒体资源的mediaId

static SendMessageReport
JwSendMessageAPI.getReportBySendMessageReturnString(java.lang.String xmlString)

根据微信事件推送群发结果获取群发消息的发送报告

static boolean
JwSendMessageAPI.getSendMessageStatus(java.lang.String accesstoken,
                    java.lang.String msg_id)

根据群发的msg_id查询群发消息发送状态

static java.lang.String
JwSendTemplateMsgAPI.getTemplateId(java.lang.String accessToken)

获取模板ID

static java.lang.String
JwSendTemplateMsgAPI.getTemplateList(java.lang.String accessToken)

获取模板列表

static void
JwSendMessageAPI.main(java.lang.String[] args)

static void
JwMessageCommentAPI.main(java.lang.String[] args)

static net.sf.json.JSONObject
JwMessageCommentAPI.markelectComment(java.lang.String accesstoken,
                java.lang.String msg_data_id,
                int index,
                java.lang.String user_comment_id)

将评论标记精选

static void
JwSendMessageAPI.messagePrivate(java.lang.String accesstoken,
              java.lang.String touser,
              java.util.List<WxArticle> wxArticles)

图文消息预览

static java.lang.String
JwSendMessageAPI.messagePrivate(java.lang.String accesstoken,
              java.lang.String touser,
              java.lang.String content)

文本消息预览

static void
JwSendMessageAPI.messagePrivate(java.lang.String accesstoken,
              java.lang.String touser,
              WxMedia wxMedia)

语音,图片,视频消息预览

static java.lang.String
JwKfaccountAPI.modifyKfaccount(java.lang.String accessToken,
               java.lang.String kf_account,
               java.lang.String nickname,
               java.lang.String password)

修改客服账号

static net.sf.json.JSONObject
JwMessageCommentAPI.openComment(java.lang.String accesstoken,
           java.lang.String msg_data_id,
           int index)

开启评论

static net.sf.json.JSONObject
JwMessageCommentAPI.queuryComments(java.lang.String accesstoken,
              net.sf.json.JSONObject params)

查询评论列表

static net.sf.json.JSONObject
JwMessageCommentAPI.replyComment(java.lang.String accesstoken,
            java.lang.String msg_data_id,
            int index,
            java.lang.String user_comment_id,
            java.lang.String content)

回复评论

static java.lang.String
JwKfaccountAPI.sendKfMessage(KfcustomSend kfcustomSend)

发送客服信息
 access_token   是       调用接口凭证
                touser  是       普通用户openid
                msgtype 是       消息类型,文本为text,图片为image,语音为voice,视频消息为video,音乐消息为music,图文消息为news
                content 是       文本消息内容
                media_id        是       发送的图片/语音/视频的媒体ID
                thumb_media_id  是       缩略图的媒体ID
                title   否       图文消息/视频消息/音乐消息的标题
                description     否       图文消息/视频消息/音乐消息的描述
                musicurl        是       音乐链接
                hqmusicurl      是       高品质音乐链接,wifi环境优先使用该链接播放音乐
                url     否       图文消息被点击后跳转的链接
                picurl  否       图文消息的图片链接,支持JPG、PNG格式,较好的效果为大图640*320,小图80*80

static SendMessageResponse
JwSendMessageAPI.sendMessageToGroupOrAllWithArticles(java.lang.String accesstoken,
                                   boolean is_to_all,
                                   Group group,
                                   java.util.List<WxArticle> wxArticles)

群发图文消息到指定的微信分组或所有人

static SendMessageResponse
JwSendMessageAPI.sendMessageToGroupOrAllWithMedia(java.lang.String accesstoken,
                                boolean is_to_all,
                                Group group,
                                WxMedia wxMedia)

使用语音、图片、视频群发消息到指定的微信分组或所有人

static SendMessageResponse
JwSendMessageAPI.sendMessageToGroupOrAllWithText(java.lang.String accesstoken,
                               boolean is_to_all,
                               Group group,
                               java.lang.String content)

群发文本消息到指定的微信分组或所有人

static SendMessageResponse
JwSendMessageAPI.sendMessageToOpenidsWithArticles(java.lang.String accesstoken,
                                Wxuser[] wxusers,
                                java.util.List<WxArticle> wxArticles)

群发图文消息到指定的微信openid数组

static SendMessageResponse
JwSendMessageAPI.sendMessageToOpenidsWithMedia(java.lang.String accesstoken,
                             Wxuser[] wxusers,
                             WxMedia wxMedia)

使用语音、图片、视频群发消息到指定的微信openid数组

static SendMessageResponse
JwSendMessageAPI.sendMessageToOpenidsWithText(java.lang.String accesstoken,
                            Wxuser[] wxusers,
                            java.lang.String content)

群发文本消息到指定的微信openid数组

static java.lang.String
JwTemplateMessageAPI.sendTemplateMsg(IndustryTemplateMessageSend industryTemplateMessageSend)

发送客服模板消息

static java.lang.String
JwSendTemplateMsgAPI.sendTemplateMsg(java.lang.String accessToken,
               TemplateMessageSendResult msgSend)

发送模板消息

static java.lang.String
JwTemplateMessageAPI.setIndustry(java.lang.String accessToken,
           java.lang.String industry_id1,
           java.lang.String industry_id2)

设置行业信息

static java.lang.String
JwSendTemplateMsgAPI.setIndustry(java.lang.String accessToken,
           java.lang.String industry_id1,
           java.lang.String industry_id2)

设置行业信息

static net.sf.json.JSONObject
JwMessageCommentAPI.unmarkelectComment(java.lang.String accesstoken,
                  java.lang.String msg_data_id,
                  int index,
                  java.lang.String user_comment_id)

将评论取消精选

static WxArticlesResponse
JwSendMessageAPI.uploadArticles(java.lang.String accesstoken,
              java.util.List<WxArticle> wxArticles)

上传图文消息素材

static java.lang.String
JwKfaccountAPI.uploadKfaccountHeadimg(java.lang.String accessToken,
                      java.lang.String kf_account,
                      java.lang.String filePathName)

修改客服头像

static WxMediaResponse
JwSendMessageAPI.uploadMediaFile(java.lang.String accesstoken,
               java.lang.String filePath,
               java.lang.String fileName,
               java.lang.String type)

上传媒体资源

org.jeewx.api.wxsendmsg.test中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.wxsendmsg.test中的方法

限定符和类型
方法和说明

void
MessageTest.getToken()

测试获取token

void
JwSendMessageAPITest.getToken()

测试获取token

org.jeewx.api.wxuser.group中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.wxuser.group中的方法

限定符和类型
方法和说明

static java.lang.String
JwGroupAPI.batchGroupMemberMove(java.lang.String accesstoken,
                    java.util.List<java.lang.String> openid_list,
                    java.lang.String to_groupid)

批量更新用户分组

static GroupCreate
JwGroupAPI.createGroup(java.lang.String accesstoken,
           java.lang.String groupName)

创建分组信息

static java.util.List<Group>
JwGroupAPI.getAllGroup(java.lang.String accesstoken)

获取所有的分组信息

static java.lang.String
JwGroupAPI.getUserGroup(java.lang.String accesstoken,
            java.lang.String openid)

获取用户分组id

static java.lang.String
JwGroupAPI.groupDelete(java.lang.String accesstoken,
           java.lang.String deletegGroupid)

删除用户分组

static java.lang.String
JwGroupAPI.groupMemberMove(java.lang.String accesstoken,
               java.lang.String openid,
               java.lang.String to_groupid)

修改用户分组

static java.lang.String
JwGroupAPI.updateGroup(java.lang.String accesstoken,
           java.lang.String groupId,
           java.lang.String groupNewName)

更新分组    正常返回ok

org.jeewx.api.wxuser.tag中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.wxuser.tag中的方法

限定符和类型
方法和说明

static net.sf.json.JSONObject
JwTagAPI.createTag(java.lang.String accessToken,
         java.lang.String tagName)

创建标签

org.jeewx.api.wxuser.user中WexinReqException的使用

抛出WexinReqException的org.jeewx.api.wxuser.user中的方法

限定符和类型
方法和说明

static java.util.List<Wxuser>
JwUserAPI.getAllWxuser(java.lang.String accesstoken,
            java.lang.String next_openid)

获取所有关注用户信息信息

static Wxuser
JwUserAPI.getWxuser(java.lang.String accesstoken,
         java.lang.String user_openid)

根据user_openid 获取关注用户的基本信息

概览

程序包

类

使用

树

已过时

索引

帮助

上一个

下一个

框架

无框架

所有类


text:
const launch = require('@serverless-chrome/lambda')

const handler = 'REPLACE_WITH_HANDLER_REQUIRE'
const options = 'REPLACE_WITH_OPTIONS'

module.exports.REPLACE_WITH_EXPORT_NAME = function ensureHeadlessChrome (
  event,
  context,
  callback
) {
  return (typeof launch === 'function' ? launch : launch.default)(options)
    .then(instance =>
      handler.REPLACE_WITH_EXPORT_NAME(event, context, callback, instance))
    .catch((error) => {
      console.error(
        'Error occured in serverless-plugin-chrome wrapper when trying to ' +
          'ensure Chrome for REPLACE_WITH_EXPORT_NAME() handler.',
        options,
        error
      )

      callback(error)
    })
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<parameterMap>

Table4.2.0.14

  <title>Trace gases</title>
  <source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-14.shtml</source>
  <parameter code="0">
    <shortName>TOZNE</shortName>
    <description>Total Ozone</description>
    <units>DU</units>
  </parameter>
  <parameter code="1">
    <shortName>O3MR</shortName>
    <description>Ozone Mixing Ratio</description>
    <units>kg kg-1</units>
  </parameter>
  <parameter code="2">
    <shortName>TCIOZ</shortName>
    <description>Total Column Integrated Ozone</description>
    <units>DU</units>
  </parameter>
  <parameter code="192">
    <shortName>O3MR</shortName>
    <description>Ozone Mixing Ratio</description>
    <units>kg kg-1</units>
  </parameter>
  <parameter code="193">
    <shortName>OZCON</shortName>
    <description>Ozone Concentration</description>
    <units>ppb</units>
  </parameter>
  <parameter code="194">
    <shortName>OZCAT</shortName>
    <description>Categorical Ozone Concentration</description>
    <units>Non-Dim</units>
  </parameter>
  <parameter code="195">
    <shortName>VDFOZ</shortName>
    <description>Ozone Vertical Diffusion</description>
    <units>kg kg-1 s-1</units>
  </parameter>
  <parameter code="196">
    <shortName>POZ</shortName>
    <description>Ozone Production</description>
    <units>kg kg-1 s-1</units>
  </parameter>
  <parameter code="197">
    <shortName>TOZ</shortName>
    <description>Ozone Tendency</description>
    <units>kg kg-1 s-1</units>
  </parameter>
  <parameter code="198">
    <shortName>POZT</shortName>
    <description>Ozone Production from Temperature Term</description>
    <units>kg kg-1 s-1</units>
  </parameter>
  <parameter code="199">
    <shortName>POZO</shortName>
    <description>Ozone Production from Column Ozone Term</description>
    <units>kg kg-1 s-1</units>
  </parameter>
  <parameter code="200">
    <shortName>OZMAX1</shortName>
    <description>Ozone Daily Max from 1-hour Average</description>
    <units>ppbV</units>
  </parameter>
  <parameter code="201">
    <shortName>OZMAX8</shortName>
    <description>Ozone Daily Max from 8-hour Average</description>
    <units>ppbV</units>
  </parameter>
  <parameter code="202">
    <shortName>PDMAX1</shortName>
    <description>PM 2.5 Daily Max from 1-hour Average</description>
    <units>g m-3</units>
  </parameter>
  <parameter code="203">
    <shortName>PDMAX24</shortName>
    <description>PM 2.5 Daily Max from 24-hour Average</description>
    <units>g m-3</units>
  </parameter>
</parameterMap>


text:
"""scraper/tests/base/abstract_mixins.py
By David J. Thomas, thePortus.com, dave.a.base@gmail.com

Contains mixin classes for the scraper unit tests"""

class AbstractTestMixin:
    """Parent Mixin for all scraper unit tests. Expects children to provide
    .scraper_class and .path for the setUp function to instantiate .scraper."""
    path = None
    scraper_class = None
    scraper = None

    def setUp(self):
        """ Creates an instance of scraper_class using path specified by child
        """
        self.scraper = self.scraper_class(self.path)

    def tearDown(self):
        """
        Frees memory by eliminating scraper
        """
        del self.scraper


text:
(function ()
		{
			// This function is to be called under a "walker" instance scope.
			function iterate(rtl, breakOnFalse)
			{
				// Return null if we have reached the end.
				if (this._.end)
					return null;

				var node,
						range = this.range,
						guard,
						userGuard = this.guard,
						type = this.type,
						getSourceNodeFn = (rtl ? 'getPreviousSourceNode' : 'getNextSourceNode');

				// This is the first call. Initialize it.
				if (!this._.start)
				{
					this._.start = 1;

					// Trim text nodes and optmize the range boundaries. DOM changes
					// may happen at this point.
					range.trim();

					// A collapsed range must return null at first call.
					if (range.collapsed)
					{
						this.end();
						return null;
					}
				}

				// Create the LTR guard function, if necessary.
				if (!rtl && !this._.guardLTR)
				{
					// Gets the node that stops the walker when going LTR.
					var limitLTR = range.endContainer,
							blockerLTR = limitLTR.getChild(range.endOffset);

					this._.guardLTR = function (node, movingOut)
					{
						return ((!movingOut || !limitLTR.equals(node))
								&& (!blockerLTR || !node.equals(blockerLTR))
								&& (node.type != CKEDITOR.NODE_ELEMENT || !movingOut || node.getName() != 'body'));
					};
				}

				// Create the RTL guard function, if necessary.
				if (rtl && !this._.guardRTL)
				{
					// Gets the node that stops the walker when going LTR.
					var limitRTL = range.startContainer,
							blockerRTL = (range.startOffset > 0) && limitRTL.getChild(range.startOffset - 1);

					this._.guardRTL = function (node, movingOut)
					{
						return ((!movingOut || !limitRTL.equals(node))
								&& (!blockerRTL || !node.equals(blockerRTL))
								&& (node.type != CKEDITOR.NODE_ELEMENT || !movingOut || node.getName() != 'body'));
					};
				}

				// Define which guard function to use.
				var stopGuard = rtl ? this._.guardRTL : this._.guardLTR;

				// Make the user defined guard function participate in the process,
				// otherwise simply use the boundary guard.
				if (userGuard)
				{
					guard = function (node, movingOut)
					{
						if (stopGuard(node, movingOut) === false)
							return false;

						return userGuard(node, movingOut);
					};
				} else
					guard = stopGuard;

				if (this.current)
					node = this.current[ getSourceNodeFn ](false, type, guard);
				else
				{
					// Get the first node to be returned.

					if (rtl)
					{
						node = range.endContainer;

						if (range.endOffset > 0)
						{
							node = node.getChild(range.endOffset - 1);
							if (guard(node) === false)
								node = null;
						} else
							node = (guard(node, true) === false) ?
									null : node.getPreviousSourceNode(true, type, guard);
					} else
					{
						node = range.startContainer;
						node = node.getChild(range.startOffset);

						if (node)
						{
							if (guard(node) === false)
								node = null;
						} else
							node = (guard(range.startContainer, true) === false) ?
									null : range.startContainer.getNextSourceNode(true, type, guard);
					}
				}

				while (node && !this._.end)
				{
					this.current = node;

					if (!this.evaluator || this.evaluator(node) !== false)
					{
						if (!breakOnFalse)
							return node;
					} else if (breakOnFalse && this.evaluator)
						return false;

					node = node[ getSourceNodeFn ](false, type, guard);
				}

				this.end();
				return this.current = null;
			}

			function iterateToLast(rtl)
			{
				var node, last = null;

				while ((node = iterate.call(this, rtl)))
					last = node;

				return last;
			}

			CKEDITOR.dom.walker = CKEDITOR.tools.createClass(
					{
						/**
						 * Utility class to "walk" the DOM inside a range boundaries. If
						 * necessary, partially included nodes (text nodes) are broken to
						 * reflect the boundaries limits, so DOM and range changes may happen.
						 * Outside changes to the range may break the walker.
						 *
						 * The walker may return nodes that are not totaly included into the
						 * range boundaires. Let's take the following range representation,
						 * where the square brackets indicate the boundaries:
						 *
						 * [
Some sample] text
						 *
						 * While walking forward into the above range, the following nodes are
						 * returned:
, "Some ",  and "sample". Going
						 * backwards instead we have: "sample" and "Some ". So note that the
						 * walker always returns nodes when "entering" them, but not when
						 * "leaving" them. The guard function is instead called both when
						 * entering and leaving nodes.
						 *
						 * @constructor
						 * @param {CKEDITOR.dom.range} range The range within which walk.
						 */
						$: function (range)
						{
							this.range = range;

							/**
							 * A function executed for every matched node, to check whether
							 * it's to be considered into the walk or not. If not provided, all
							 * matched nodes are considered good.
							 * If the function returns "false" the node is ignored.
							 * @name CKEDITOR.dom.walker.prototype.evaluator
							 * @property
							 * @type Function
							 */
							// this.evaluator = null;

							/**
							 * A function executed for every node the walk pass by to check
							 * whether the walk is to be finished. It's called when both
							 * entering and exiting nodes, as well as for the matched nodes.
							 * If this function returns "false", the walking ends and no more
							 * nodes are evaluated.
							 * @name CKEDITOR.dom.walker.prototype.guard
							 * @property
							 * @type Function
							 */
							// this.guard = null;

							/** @private */
							this._ = {};
						},

//		statics :
//		{
//			/* Creates a CKEDITOR.dom.walker instance to walk inside DOM boundaries set by nodes.
//			 * @param {CKEDITOR.dom.node} startNode The node from wich the walk
//			 *		will start.
//			 * @param {CKEDITOR.dom.node} [endNode] The last node to be considered
//			 *		in the walk. No more nodes are retrieved after touching or
//			 *		passing it. If not provided, the walker stops at the
//			 *		 closing boundary.
//			 * @returns {CKEDITOR.dom.walker} A DOM walker for the nodes between the
//			 *		provided nodes.
//			 */
//			createOnNodes : function( startNode, endNode, startInclusive, endInclusive )
//			{
//				var range = new CKEDITOR.dom.range();
//				if ( startNode )
//					range.setStartAt( startNode, startInclusive ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_END ) ;
//				else
//					range.setStartAt( startNode.getDocument().getBody(), CKEDITOR.POSITION_AFTER_START ) ;
//
//				if ( endNode )
//					range.setEndAt( endNode, endInclusive ? CKEDITOR.POSITION_AFTER_END : CKEDITOR.POSITION_BEFORE_START ) ;
//				else
//					range.setEndAt( startNode.getDocument().getBody(), CKEDITOR.POSITION_BEFORE_END ) ;
//
//				return new CKEDITOR.dom.walker( range );
//			}
//		},
//
						proto:
								{
									/**
									 * Stop walking. No more nodes are retrieved if this function gets
									 * called.
									 */
									end: function ()
									{
										this._.end = 1;
									},

									/**
									 * Retrieves the next node (at right).
									 * @returns {CKEDITOR.dom.node} The next node or null if no more
									 *		nodes are available.
									 */
									next: function ()
									{
										return iterate.call(this);
									},

									/**
									 * Retrieves the previous node (at left).
									 * @returns {CKEDITOR.dom.node} The previous node or null if no more
									 *		nodes are available.
									 */
									previous: function ()
									{
										return iterate.call(this, 1);
									},

									/**
									 * Check all nodes at right, executing the evaluation fuction.
									 * @returns {Boolean} "false" if the evaluator function returned
									 *		"false" for any of the matched nodes. Otherwise "true".
									 */
									checkForward: function ()
									{
										return iterate.call(this, 0, 1) !== false;
									},

									/**
									 * Check all nodes at left, executing the evaluation fuction.
									 * @returns {Boolean} "false" if the evaluator function returned
									 *		"false" for any of the matched nodes. Otherwise "true".
									 */
									checkBackward: function ()
									{
										return iterate.call(this, 1, 1) !== false;
									},

									/**
									 * Executes a full walk forward (to the right), until no more nodes
									 * are available, returning the last valid node.
									 * @returns {CKEDITOR.dom.node} The last node at the right or null
									 *		if no valid nodes are available.
									 */
									lastForward: function ()
									{
										return iterateToLast.call(this);
									},

									/**
									 * Executes a full walk backwards (to the left), until no more nodes
									 * are available, returning the last valid node.
									 * @returns {CKEDITOR.dom.node} The last node at the left or null
									 *		if no valid nodes are available.
									 */
									lastBackward: function ()
									{
										return iterateToLast.call(this, 1);
									},

									reset: function ()
									{
										delete this.current;
										this._ = {};
									}

								}
					});

			/*
			 * Anything whose display computed style is block, list-item, table,
			 * table-row-group, table-header-group, table-footer-group, table-row,
			 * table-column-group, table-column, table-cell, table-caption, or whose node
			 * name is hr, br (when enterMode is br only) is a block boundary.
			 */
			var blockBoundaryDisplayMatch =
					{
						block: 1,
						'list-item': 1,
						table: 1,
						'table-row-group': 1,
						'table-header-group': 1,
						'table-footer-group': 1,
						'table-row': 1,
						'table-column-group': 1,
						'table-column': 1,
						'table-cell': 1,
						'table-caption': 1
					};

			CKEDITOR.dom.element.prototype.isBlockBoundary = function (customNodeNames)
			{
				var nodeNameMatches = CKEDITOR.tools.extend({}, CKEDITOR.dtd.$block, customNodeNames || {});

				// Don't consider floated formatting as block boundary, fall back to dtd check in that case. (#6297)
				return this.getComputedStyle('float') == 'none' && blockBoundaryDisplayMatch[ this.getComputedStyle('display') ]
						|| nodeNameMatches[ this.getName() ];
			};

			CKEDITOR.dom.walker.blockBoundary = function (customNodeNames)
			{
				return function (node, type)
				{
					return !(node.type == CKEDITOR.NODE_ELEMENT
							&& node.isBlockBoundary(customNodeNames));
				};
			};

			CKEDITOR.dom.walker.listItemBoundary = function ()
			{
				return this.blockBoundary({br: 1});
			};

			/**
			 * Whether the to-be-evaluated node is a bookmark node OR bookmark node
			 * inner contents.
			 * @param {Boolean} contentOnly Whether only test againt the text content of
			 * bookmark node instead of the element itself(default).
			 * @param {Boolean} isReject Whether should return 'false' for the bookmark
			 * node instead of 'true'(default).
			 */
			CKEDITOR.dom.walker.bookmark = function (contentOnly, isReject)
			{
				function isBookmarkNode(node)
				{
					return (node && node.getName
							&& node.getName() == 'span'
							&& node.data('cke-bookmark'));
				}

				return function (node)
				{
					var isBookmark, parent;
					// Is bookmark inner text node?
					isBookmark = (node && !node.getName && (parent = node.getParent())
							&& isBookmarkNode(parent));
					// Is bookmark node?
					isBookmark = contentOnly ? isBookmark : isBookmark || isBookmarkNode(node);
					return !!(isReject ^ isBookmark);
				};
			};

			/**
			 * Whether the node is a text node containing only whitespaces characters.
			 * @param isReject
			 */
			CKEDITOR.dom.walker.whitespaces = function (isReject)
			{
				return function (node)
				{
					var isWhitespace = node && (node.type == CKEDITOR.NODE_TEXT)
							&& !CKEDITOR.tools.trim(node.getText());
					return !!(isReject ^ isWhitespace);
				};
			};

			/**
			 * Whether the node is invisible in wysiwyg mode.
			 * @param isReject
			 */
			CKEDITOR.dom.walker.invisible = function (isReject)
			{
				var whitespace = CKEDITOR.dom.walker.whitespaces();
				return function (node)
				{
					// Nodes that take no spaces in wysiwyg:
					// 1. White-spaces but not including NBSP;
					// 2. Empty inline elements, e.g.  we're checking here
					// 'offsetHeight' instead of 'offsetWidth' for properly excluding
					// all sorts of empty paragraph, e.g.
.
					var isInvisible = whitespace(node) || node.is && !node.$.offsetHeight;
					return !!(isReject ^ isInvisible);
				};
			};

			var tailNbspRegex = /^[\t\r\n ]*(?: |\xa0)$/,
					isNotWhitespaces = CKEDITOR.dom.walker.whitespaces(1),
					isNotBookmark = CKEDITOR.dom.walker.bookmark(0, 1),
					fillerEvaluator = function (element)
					{
						return isNotBookmark(element) && isNotWhitespaces(element);
					};

			// Check if there's a filler node at the end of an element, and return it.
			CKEDITOR.dom.element.prototype.getBogus = function ()
			{
				var tail = this.getLast(fillerEvaluator);
				if (tail && (!CKEDITOR.env.ie ? tail.is && tail.is('br')
						: tail.getText && tailNbspRegex.test(tail.getText())))
				{
					return tail;
				}
				return false;
			};

		})();


text:
[![Version](https://img.shields.io/cocoapods/v/Kontena.svg?style=flat)](http://cocoadocs.org/docsets/Kontena)
[![License](https://img.shields.io/cocoapods/l/Kontena.svg?style=flat)](http://cocoadocs.org/docsets/Kontena)
[![Platform](https://img.shields.io/cocoapods/p/Kontena.svg?style=flat)](http://cocoadocs.org/docsets/Kontena)

## IOC container in Swift

A simple Swift implementation of Service Locator / IOC container with limited DI functionality. Works well with Swift and Objective C classes.

Please check Demo project for a very basic example on how to use Kontena.

## Additional notes

- If you want to bind Swift protocol you must add ```@objc``` annotation.
- Your bound object must inherit from ```NSObject``` to let the container automatically resolve dependencies.
- Swift 1.2 is required to use this library.

## Usage

### Create the container

```swift
import Kontena

let container = Container() // init
let sharedContainer = Container.sharedInstance // as singleton
```

### Merge two containers

```swift
// all bound objects from container2
// are merged and added to container1
container1.mergeWithContainer(container2)
```

### Clear the container

```swift
container.clear()
```

### Let the container automatically resolve dependencies of bound objects

```swift
container.resolveDependencies = true
```

### Bind/register the instance/factory

```swift
@objc protocol SomeProtocol {}
class SomeBaseClass: NSObject {}
class SomeClass: SomeBaseClass, SomeProtocol {}

var instance = SomeClass()

// as singleton to the type of the instance
container.bind(instance)
// as singleton to the superclass type
container.bind(instance, toType: SomeBaseClass.self)
// as singleton to the protocol
container.bind(instance, toType: SomeProtocol.self)
// as singleton to the key
container.bind(instance, toKey: "some")

// factory = closure where the object is initialized
let factory = {
  () -> SomeClass in
  let some = SomeClass()
  // basic initialization
  return some
}

// to the type of the instance
container.bindFactory(factory)
// to the type of the instance
container.bindFactory(factory, toType: SomeBaseClass.self)
// to the protocol
container.bindFactory(factory, toType: SomeProtocol.self)
// to the key
container.bindFactory(factory, toKey: "some")

// you can bind factory as singleton as well
container.bindFactory(factory).asSingleton()
```

### Resolve the object
Resolved object or ```nil``` is returned. If the factory was bound then object will be initialized lazily (for factories with the ```singleton``` scope - only at the first resolve call, for the ```prototype``` scope - at every resolve call).

If ```resolveDependencies``` was set to ```true``` then container will try to automatically resolve dependencies of the requested object (if they are already registered in the container and the requested object is a subclass of ```NSObject```).

```swift
var resolvedByType = container.resolveType(SomeClass.self)
var resolvedByKey = container.resolveKey(key)
```

### Using of custom operators
```swift
var instance = SomeClass()
var resolvedInstance: SomeClass?

// should be bound to the shared container
Container.sharedInstance.bind(instance)

// Resolve and inject from the container
-->resolvedInstance // prefix operator
resolvedInstance<-- // postfix operator

```

## Installation

**Kontena** is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'Kontena'
```

## Author

Vadym Markov, impressionwave@gmail.com

## License

**Kontena** is available under the MIT license. See the LICENSE file for more info.


text:
package models

import (
	"context"

	"github.com/projecteru2/core/resources/volume/types"
)

// GetRemapArgs .
func (v *Volume) GetRemapArgs(ctx context.Context, node string, workloadResourceMap *types.WorkloadResourceArgsMap) (map[string]*types.EngineArgs, error) {
	return nil, nil
}


text:
Angular Router Sample

    Crisis Center
   |

    Heroes

<router-outlet></router-outlet>

<app-crisis-list></app-crisis-list>
<app-heroes-list></app-heroes-list>

  Crisis Center |
  Heroes


text:
/* 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.activiti.web.rest.client;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.activiti.domain.ServerConfig;
import com.activiti.service.activiti.FormService;
import com.activiti.service.activiti.exception.ActivitiServiceException;
import com.activiti.web.rest.exception.BadRequestException;
import com.fasterxml.jackson.databind.JsonNode;

/**
 * @author Bassam Al-Sarori
 */
@RestController
public class FormClientResource extends AbstractClientResource {

    @Autowired
    protected FormService clientService;

    @RequestMapping(value = "/rest/activiti/forms/{formId}", method = RequestMethod.GET, produces = "application/json")
    public JsonNode getForm(@PathVariable String formId) throws BadRequestException {

        ServerConfig serverConfig = retrieveServerConfig();
        try {
            return clientService.getForm(serverConfig, formId);
        } catch (ActivitiServiceException e) {
            throw new BadRequestException(e.getMessage());
        }
    }

    @RequestMapping(value = "/rest/activiti/forms/{formId}/editorJson", method = RequestMethod.GET, produces = "application/json")
    public JsonNode getEditorJsonForForm(@PathVariable String formId) throws BadRequestException {

        ServerConfig serverConfig = retrieveServerConfig();
        try {
            return clientService.getEditorJsonForForm(serverConfig, formId);
        } catch (ActivitiServiceException e) {
            throw new BadRequestException(e.getMessage());
        }
    }

    @RequestMapping(value = "/rest/activiti/process-definition-start-form/{processDefinitionId}", method = RequestMethod.GET, produces = "application/json")
    public JsonNode getProcessDefinitionStartForm(@PathVariable String processDefinitionId) throws BadRequestException {

        ServerConfig serverConfig = retrieveServerConfig();
        try {
            return clientService.getProcessDefinitionStartForm(serverConfig, processDefinitionId);
        } catch (ActivitiServiceException e) {
            throw new BadRequestException(e.getMessage());
        }
    }

}


text:
_Altschul, S. F., & Erickson, B. W. (1985). Significance of nucleotide sequence alignments: a method for random sequence permutation that preserves dinucleotide and codon usage. Molecular biology and evolution, 2(6), 526–38. Retrieved from http://www.ncbi.nlm.nih.gov/pubmed/3870875_

    shuffler = Shuffle.new("AGACATAAAGTTCCGTACTGCCGGGAT")
    puts (dishuffled_sequence = shuffler.dishuffle)
    #=> AGAAGTACAATCGGTACGATTGGCCCT
    shuffler.valid?(dishuffled_sequence, 2)
    #=> true (Shuffler preserved the di-token frequency)
    shuffler.valid?(dishuffled_sequence, 3)
    #=> false-ish (Shuffler does not guarantee to preserve the tri-token frequency)
    puts (trishuffled_sequence = shuffler.shuffle(3))
    #=> AGTACTGCCGTTCCGGGATAAAGACAT
    shuffler.valid?(trishuffled_sequence, 3)
    #=> true

[motivation.](http://www.youtube.com/watch?v=xFZYJIwfUbo)


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

<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>OldCar.com :: Muscle Cars, Hot Rods, Sports Cars, Classics, Trucks and Motorcycles</title>
<meta name="keywords" content="Muscle Cars For Sale, Sports Cars For Sale, Old Cars For Sale, Parts For Sale, Parts & Accessories For Sale, Automotive Parts, Mopars For Sale, Chevys For Sale, Mustangs For Sale, Novas For Sale, Corvettes For Sale, Used Corvettes For Sale, Used Sports Cars For Sale, New Muscle Cars For Sale, Hemis For Sale">
<meta name="description" content="America's Most Popular Collector Car website featuring Muscle Cars, Classic Cars, Street Rods and more... All listed for sale!">
<meta name="theme-color" content="#0098D5">
<meta property="og:title" content="OldCar.com :: Muscle Cars, Hot Rods, Sports Cars, Classics, Trucks and Motorcycles">
<meta property="og:description" content="America's Most Popular Collector Car website featuring Muscle Cars, Classic Cars, Street Rods and more... All listed for sale!">
<meta property="og:type" content="article">
<meta property="fb:admins" content="1064840689">
<meta property="fb:app_id" content="115228966133">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="Rating" CONTENT="General">
<meta name="Classification" CONTENT="Automotive">
<meta name="distribution" CONTENT="Global">
<meta name="revisit-after" content="1 Day">
<meta http-equiv="content-language" content="en-us">
<link rel="manifest" href="/manifest.json">
<meta name="viewport" content="width=500, user-scalable=no">
<meta name="google-translate-customization" content="64c4deac18bf2867-c74529110d3ed8cb-gd6b84fec00564447-f"></meta>
<link href="https://plus.google.com/+Autabuy" rel="publisher">
<link rel="stylesheet" href="/common/wow/animate.css">

<link href="/Styles/font.css?v1" rel="stylesheet" type="text/css">
<link href="/Styles/common.css?v11" rel="stylesheet" type="text/css">
<link href="/Styles/Styles_SkyBlue.css?v3" rel="stylesheet" type="text/css">

<link rel="search" type="application/opensearchdescription+xml" title="AutaBuy" href="/AutaBuySearchDescription.xml">

<LINK REL="alternate" TYPE="application/rss+xml" TITLE="AutaBuy's Newest Listings RSS Feed" HREF="http://www.autabuy.com/RSS/Newest_Listings.cfm">
<LINK REL="alternate" TYPE="application/rss+xml" TITLE="AutaBuy's Featured Vehicles RSS Feed" HREF="http://www.autabuy.com/RSS/Featured_Vehicles.cfm">
<LINK REL="alternate" TYPE="application/rss+xml" TITLE="AutaBuy's Vehicles Only RSS Feed" HREF="http://www.autabuy.com/RSS/Vehicle_Only_Listings.cfm">
<LINK REL="alternate" TYPE="application/rss+xml" TITLE="AutaBuy's Memorabilia RSS Feed" HREF="http://www.autabuy.com/RSS/Memorabilia_Listings.cfm">
<LINK REL="alternate" TYPE="application/rss+xml" TITLE="AutaBuy's Repairables RSS Feed" HREF="http://www.autabuy.com/RSS/Repairable_Only_Listings.cfm">

<link href="/Styles/responsive.css?v=7" rel="stylesheet" type="text/css" media="screen">

<link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css">

<link href="/common/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">

<link href="/common/bxslider/jquery.bxslider.css" rel="stylesheet" type="text/css">

<link href="/Styles/print.css?v=3" rel="stylesheet" type="text/css" media="print">
<link rel="canonical" href="http://www.oldcar.com/OldCar/">
<meta property="og:url" content="http://www.oldcar.com/OldCar/">

<link rel="stylesheet" type="text/css" href="/Common/shadowbox-3.0.3/shadowbox.css">

682,933 Cars For Sale!

682,933 Cars For Sale!

Muscle Cars, Hot Rods, Sports Cars, Classics, Trucks and Motorcycles

Home

Domestic

AMC

Buick

Cadillac

Chevrolet

Chrysler

Dodge

Ford

Geo

GMC

Hudson

Hummer

Indian

Jeep

Mercury

Oldsmobile

Packard

Plymouth

Pontiac

Saturn

Schwin

Shelby

Studebaker

Willys

More...

Import

Acura

Alfa Romeo

Aston Martin

Audi

Austin Healey

Bentley

BMW

Buick

Cadillac

Chevrolet

Chrysler

Citroen

Cord

Datsun

Desoto

DeTomaso

DMC

Dodge

Eagle

Edsel

Ferrari

Ford

Honda

Hull

Hyundai

Infiniti

International

Isuzu

Jaguar

Kia

Lamborghini

Land Rover

Lexus

Lincoln

Lotus

Maserati

Maybach

Mazda

Mercedes-Benz

MG

Mini

Mitsubishi

Morgan

Nissan

Opel

Panoz

Pontiac

Porsche

Rambler

Rolls-Royce

Saab

Scion

Smart

Subaru

Sunbeam

Superformance

Suzuki

Tesla

Tiffany

Toyota

Triumph

Volkswagen

Volvo

Zimmer

More...

<FORM method="get" name="QuickSearch" action="/Vehicles/QuickSearch.cfm" onSubmit="">

682,933 Matching Listings

Quick Search <INPUT title="Enter search terms, or leave blank for all listings" name="SearchText" type="text" style="width:180px;" maxlength="100" value="">
<INPUT title="Find your next car!" class="SearchButton" type="Submit" value="Search">

</FORM>

Newest listings

Year old to new

Price low to high

Nearest distance

Updated!

1970 BUICK GS STAGE 1 1970 Buick G.S. Stage 1
ALL numbers matching Driv

$59,500

New Listing!

2003 UBUILT TOY HAULER UBUILT TOY HAULER Do you have a lifted truck? Then this trailer with

$16,000

Updated!

1968 CHEVROLET CAMARO REDUCED PRICE R/S 1968 Chevrolet Camaro
Presented By
Texas Classic

$30,000

Updated!

1955 GMC 150 LONGBED Features:
Manufactured in Oakland, CA
248ci

$22,000

Updated!

1952 CHEVROLET OTHER PICKUPS REGULAR CAB TRUCK FEATURES INCLUDE
216 Stovebolt Six @ 95HP
3-Spe

$35,000

Updated!

1928 FORD MODEL A HOT ROD 1928 Ford Model A Hot Rod Roadster
as presented

$22,000

Updated!

2000 HARLEY DAVIDSON FXSTD DEUCE Very clean scooter. Show room condition. 7,500 ori

$8,500

Updated!

1955 PONTIAC STARCHIEF 2 DR HARDTOP 267 V8 1955 Pontiac Starchief 2 Dr, Hardtop. 267 V8, newe

$39,500

Updated!

2008 FERRARI F430 SPYDER F430 FERRARI SPYDER, SEXIEST ONE AVAILABLE. Compar

$151,900

New Listing!

1956 FORD F100 1956 Ford F100 Custom truck
Keith Craft Racing En

New Listing!

1949 MERCURY 1949 Mercury Custom Show Car
Zero rust Nevada car

New Listing!

1957 MERCURY MONTEREY Beautiful 1957 Mercury Monterey Convertible
- 31

New Listing!

1973 DODGE CHALLANGER 1973 Dodge Challenger Rally
2 door Coupe
Vin # B

New Listing!

1959 CHEVROLET APACHE

New Listing!

1923 CHEVROLET RAT ROD 1923 Chevy Roadster Rat Rod
Right Hand Drive
Reb

New Listing!

1969 CHEVROLET CAMARO 1969 Camaro Custom Resto-mod
Started life as a Ne

New Listing!

1967 CHEVROLET CHEVELLE Real SS 138 VIN
396 cubic inch 350 HP V8 motor
H

New Listing!

1973 AMC JAVELIN AMX ?believed to be 52,700 original miles
bright oran

New Listing!

2010 BMW M6 Horsepower: 500
Torque: 383 lb-ft
Engine: Gas V1

New Listing!

1971 VOLKSWAGEN TYPE 2 BUS 12 volt electrical system, rear suspension with 1/

New Listing!

1963 FORD THUNDERBIRD original California car its entire life with what

New Listing!

1958 EDSEL CITATION

New Listing!

1991 TOYOTA CELICA Classic 1991 Toyota Celica Convertible
Believed w

New Listing!

1965 DODGE SPORT VAN new 318ci V-8 crate engine, rebuilt automatic tran

New Listing!

2004 JAGUAR XJ-8 V-8 and smooth shifting automatic transmission and

New Listing!

1975 VOLKSWAGEN BUG

New Listing!

1955 CHEVROLET BEL AIR - Crate motor
- Automatic transmission
- Red

New Listing!

1987 NISSAN 300ZX T-top coupe, power windows, power brakes, power st

Updated!

1986 CHEVROLET CAMARO IROC Z 26,500 miles, Has back louvered rear window cover.

$17,500

Updated!

1988 ALFA ROMEO SPYDER Has both the softtop and the removable hardtop. Aq

$11,500

Updated!

1926 CHEVROLET ROADSTER CLICK DIRECTLY ABOVE FOR MORE PHOTOS AND A VIDEO O

$22,900

Updated!

1962 PLYMOUTH FURY RESTO MOD CONVERTIBLE! 1962 Plymouth Fury Convertible Resto Mod, 440 Magn

Updated!

1976 JAGUAR XJC COUPE-ORIGINAL 6 CYL 42K MILES Barn Find-Original Rust Free-No Repairs-100% Origi

Updated!

2012 FISKER KARMA ECO-CHIC This 2012 Fisker Karma EcoChic is a range-extended

$44,995

Updated!

1973 FORD MUSTANG MACH 1 1973 Ford Mustang Mach 1 351C V8 engine, automatic

$27,500

Updated!

1956 MERCURY MONTCLAIR CONVERTIBLE Very rare, fully restored, rust free 1956 Mercury

Updated!

1970 CHEVROLET CHEVELLE SS SS 454 Just in this 1970 Chevelle Super Sport is a So Car

$37,900

New Listing!

1962 WILLYS JEEP CJ 3-B NEW ARRIVAL
WILLYS 1962 JEEP CJ 3-B, Restorati

New Listing!

1966 PONTIAC GTO 2 DOOR GTO This vehicle, when sold at the listed price, will

$41,900

New Listing!

1937 FORD CABRIOLET 2 DOOR CONVERTIBLE This vehicle, when sold at the listed price, will

$35,900

New Listing!

1951 CHEVROLET 5 WINDOW HALF TON CLASSIC 1951 Chevrolet 5 Window Half Ton, Bored and Balanc

$32,500

New Listing!

2008 GEORGIE BOY LANDAU CLASS A - GAS 2008 Georgie Boy Landau, 45000 miles, Length: 38'3

$38,000

New Listing!

2011 BMW 5 SERIES This Gorgeous 2011 BMW 535 Gran Turismo has been a

$22,500

New Listing!

1970 BUICK GS 455

$49,900

New Listing!

1966 CHEVROLET CORVETTE Numbers Matching car with a brand new top, fully s

$48,500

New Listing!

1972 CHEVROLET CAMARO Z28 TRIBUTE 2 DOOR Z28 TRIBUTE This vehicle, when sold at the listed price, will

$28,900

New Listing!

1955 CHEVROLET BEL AIR 2 DOOR BEL AIR This vehicle, when sold at the listed price, will

$33,900

New Listing!

1958 CHEVROLET DELRAY 400 V8 This beautiful 1958 Chevy Delray is in great shape

$16,900

New Listing!

1957 GMC 9300 STEPSIDE PICKUP TRUCK This Fully Restored 1957 GMC 9300 Step-Side Pick-U

$39,950

New Listing!

1960 AUSTIN HEALEY SPRITE MKI CONVERTIBLE Restored 1960 Austin Sprite 'Bugeye' in Red with B

New Listing!

2013 MERCEDES-BENZ ML63 AMG P30 PERFORMANCE This 2013 Mercedes-Benz ML63 SUV, with only 23,144

$58,950

New Listing!

2007 PORSCHE BOXSTER S Only 21,983 Miles From New on this 2007 Porsche Bo

$31,950

New Listing!

2011 PORSCHE CAYMAN S Only 17,278 Miles From New on this 2011 Porsche Ca

$49,950

Updated!

1968 FORD MUSTANG SHELBY CLONE CONVERTIBLE Very well done, 302ci engine, a little powerhouse!

$87,000

New Listing!

1961 AUSTIN MINI COOPER CABRIOLET RARE Rover Mini Cooper Cabriolet! Completely rebui

$16,995

Updated!

1931 CHRYSLER CD DELUXE EIGHT ROADSTER Rare, beautiful Series III CD8 roadster. Spectacul

$99,900

New Listing!

2007 CHEVROLET CORVETTE 3 LT F 55 COUPE 2007 Corvette Coupe Victory Red Special Interior C

$31,999

New Listing!

2016 CHEVROLET CORVETTE Z06 3LZ Z07 2016 Chevrolet Corvette Z06 Corvettes Super Car Lo

$84,999

New Listing!

1987 CHEVROLET 1/2 TON PICKUPS

New Listing!

1992 ALFA ROMEO SPIDER VELOCE

New Listing!

1941 AMERICAR

New Listing!

1961 IMPALA

New Listing!

2002 CHRYSLER PROWLER

New Listing!

1933 2DR

New Listing!

1966 442

New Listing!

1969 CORONET

New Listing!

1994 CHEVROLET CORVETTE

New Listing!

1967 CHEVROLET CORVETTE CONVERTIBLE 1967 Corvette Convertible Lyndale Blue White Inter

New Listing!

1967 CHEVROLET CORVETTE CONVERTIBLE 1967 Corvette Convertible Sunfire Yellow 2 NCRS TO

Updated!

2014 FORD MUSTANG GT COUPE PREMIUM 2014 GT COUPE PREMIUM. ONLY 642 MILES!
5.0L 4V TI

$35,000

New Listing!

1971 PONTIAC GTO This 1971 Pontiac GTO FACTORY BLACK ON BLACK, 400C

$49,995

Updated!

2017 TOYOTA TACOMA TRD SPORT

$34,122

Updated!

2007 DODGE NITRO SXT

Updated!

2012 CHEVROLET COLORADO 1LT

Updated!

2010 FORD EXPEDITION EDDIE BAUER

Updated!

2007 BMW Z4 3.0SI

Updated!

2012 DODGE GRAND CARAVAN SXT

Updated!

2007 CADILLAC DTS LUXURY II

$9,470

Updated!

2008 CHRYSLER 300 C HEMI

$10,719

Updated!

2008 GMC ACADIA SLT-1

$10,525

Updated!

1996 HARLEY-DAVIDSON FLSTF

$9,720

Updated!

2007 CHRYSLER 300 C

$10,152

Updated!

2011 CHEVROLET TRAVERSE LT1

$9,974

Updated!

2001 GMC SIERRA 1500 SLT

$6,711

Updated!

1999 HARLEY-DAVIDSON XLH 883

Updated!

2007 TOYOTA CAMRY XLE

$8,236

Updated!

2010 CHRYSLER SEBRING LIMITED

$6,988

Updated!

2003 MITSUBISHI DIAMANTE LS

$5,995

Updated!

2008 HONDA ACCORD EX-L

$6,537

Updated!

1995 GMC SIERRA 1500

$2,997

Updated!

2002 BUICK LESABRE CUSTOM

$2,993

Updated!

2014 HONDA CRF250L

$4,999

Updated!

2015 NISSAN VERSA 1.6 S Low miles, low price! Hard to find manual transmi

$9,550

Updated!

2013 CHEVROLET CRUZE 1LT

$9,976

Updated!

2012 TOYOTA YARIS FLEET

$8,972

Updated!

2014 HYUNDAI ACCENT GLS

$9,105

Updated!

2012 MAZDA 3 I GRAND TOURING

$9,193

Updated!

2013 FORD FIESTA S

$8,760

Updated!

2012 MAZDA 3 I GRAND TOURING

$9,193

Updated!

2013 NISSAN ROGUE SV

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

 Next»

Search |
Featured Ads |
Browse Dealers |
Search Dealers |
Search Parts |
Services |
Home |
Subscribe |
Online Subscription

RSS |
Advertise |
Events |
Success Stories |
Auta Collection |
Ad Manager |
Dealer Login |
Liability |
Contact Us |
Press |
Links

Home

Domestic

AMC

Buick

Cadillac

Chevrolet

Chrysler

Dodge

Ford

Geo

GMC

Hudson

Hummer

Indian

Jeep

Mercury

Oldsmobile

Packard

Plymouth

Pontiac

Saturn

Schwin

Shelby

Studebaker

Willys

More...

Import

Acura

Alfa Romeo

Aston Martin

Audi

Austin Healey

Bentley

BMW

Buick

Cadillac

Chevrolet

Chrysler

Citroen

Cord

Datsun

Desoto

DeTomaso

DMC

Dodge

Eagle

Edsel

Ferrari

Ford

Honda

Hull

Hyundai

Infiniti

International

Isuzu

Jaguar

Kia

Lamborghini

Land Rover

Lexus

Lincoln

Lotus

Maserati

Maybach

Mazda

Mercedes-Benz

MG

Mini

Mitsubishi

Morgan

Nissan

Opel

Panoz

Pontiac

Porsche

Rambler

Rolls-Royce

Saab

Scion

Smart

Subaru

Sunbeam

Superformance

Suzuki

Tesla

Tiffany

Toyota

Triumph

Volkswagen

Volvo

Zimmer

More...

<map name="LogoMap">
<area shape="rect" coords="4,6,376,77" href="/">
<area shape="rect" coords="486,23,545,77" href="/">
<area shape="rect" coords="572,23,631,77" href="/Vehicles/SearchVehicles.cfm">
<area shape="rect" coords="660,23,719,77" href="/Advertise/">
</map>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Demo06
{
    /// <summary>
    /// Window03.xaml 的交互逻辑
    /// </summary>
    public partial class Window03 : Window
    {
        public Window03()
        {
            InitializeComponent();
        }
    }
}