text:
#ifdef TIME_WITH_SYS_TIME
/* Time with sys/time test */

#include <sys/types.h>
#include <sys/time.h>
#include <time.h>

int
main ()
{
if ((struct tm *) 0)
return 0;
  ;
  return 0;
}

#endif

#ifdef HAVE_FCNTL_O_NONBLOCK

/* headers for FCNTL_O_NONBLOCK test */
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
/* */
#if defined(sun) || defined(__sun__) || \
    defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if defined(__SVR4) || defined(__srv4__)
#  define PLATFORM_SOLARIS
# else
#  define PLATFORM_SUNOS4
# endif
#endif
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
# define PLATFORM_AIX_V3
#endif
/* */
#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__)
#error "O_NONBLOCK does not work on this platform"
#endif

int
main ()
{
      /* O_NONBLOCK source test */
      int flags = 0;
      if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
          return 1;
      return 0;
}
#endif

/* tests for gethostbyaddr_r or gethostbyname_r */
#if defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \
    defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \
    defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \
    defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \
    defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
    defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
#   define _REENTRANT
    /* no idea whether _REENTRANT is always set, just invent a new flag */
#   define TEST_GETHOSTBYFOO_REENTRANT
#endif
#if defined(HAVE_GETHOSTBYADDR_R_5) || \
    defined(HAVE_GETHOSTBYADDR_R_7) || \
    defined(HAVE_GETHOSTBYADDR_R_8) || \
    defined(HAVE_GETHOSTBYNAME_R_3) || \
    defined(HAVE_GETHOSTBYNAME_R_5) || \
    defined(HAVE_GETHOSTBYNAME_R_6) || \
    defined(TEST_GETHOSTBYFOO_REENTRANT)
#include <sys/types.h>
#include <netdb.h>
int main(void)
{
  char *address = "example.com";
  int length = 0;
  int type = 0;
  struct hostent h;
  int rc = 0;
#if defined(HAVE_GETHOSTBYADDR_R_5) || \
    defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \
    \
    defined(HAVE_GETHOSTBYNAME_R_3) || \
    defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
  struct hostent_data hdata;
#elif defined(HAVE_GETHOSTBYADDR_R_7) || \
      defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \
      defined(HAVE_GETHOSTBYADDR_R_8) || \
      defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \
      \
      defined(HAVE_GETHOSTBYNAME_R_5) || \
      defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
      defined(HAVE_GETHOSTBYNAME_R_6) || \
      defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
  char buffer[8192];
  int h_errnop;
  struct hostent *hp;
#endif

#ifndef gethostbyaddr_r
  (void)gethostbyaddr_r;
#endif

#if   defined(HAVE_GETHOSTBYADDR_R_5) || \
      defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT)
  rc = gethostbyaddr_r(address, length, type, &h, &hdata);
#elif defined(HAVE_GETHOSTBYADDR_R_7) || \
      defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT)
  hp = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &h_errnop);
  (void)hp;
#elif defined(HAVE_GETHOSTBYADDR_R_8) || \
      defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT)
  rc = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &hp, &h_errnop);
#endif

#if   defined(HAVE_GETHOSTBYNAME_R_3) || \
      defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
  rc = gethostbyname_r(address, &h, &hdata);
#elif defined(HAVE_GETHOSTBYNAME_R_5) || \
      defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT)
  rc = gethostbyname_r(address, &h, buffer, 8192, &h_errnop);
  (void)hp; /* not used for test */
#elif defined(HAVE_GETHOSTBYNAME_R_6) || \
      defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
  rc = gethostbyname_r(address, &h, buffer, 8192, &hp, &h_errnop);
#endif

  (void)length;
  (void)type;
  (void)rc;
  return 0;
}
#endif

#ifdef HAVE_SOCKLEN_T
#ifdef _WIN32
#include BOSS_FAKEWIN_V_ws2tcpip_h //original-code:<ws2tcpip.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#endif
int
main ()
{
if ((socklen_t *) 0)
  return 0;
if (sizeof (socklen_t))
  return 0;
  ;
  return 0;
}
#endif
#ifdef HAVE_IN_ADDR_T
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>

int
main ()
{
if ((in_addr_t *) 0)
  return 0;
if (sizeof (in_addr_t))
  return 0;
  ;
  return 0;
}
#endif

#ifdef HAVE_BOOL_T
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif
int
main ()
{
if (sizeof (bool *) )
  return 0;
  ;
  return 0;
}
#endif

#ifdef STDC_HEADERS
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
int main() { return 0; }
#endif
#ifdef RETSIGTYPE_TEST
#include <sys/types.h>
#include <signal.h>
#ifdef signal
# undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

int
main ()
{
  return 0;
}
#endif
#ifdef HAVE_INET_NTOA_R_DECL
#include <arpa/inet.h>

typedef void (*func_type)();

int main()
{
#ifndef inet_ntoa_r
  func_type func;
  func = (func_type)inet_ntoa_r;
#endif
  return 0;
}
#endif
#ifdef HAVE_INET_NTOA_R_DECL_REENTRANT
#define _REENTRANT
#include <arpa/inet.h>

typedef void (*func_type)();

int main()
{
#ifndef inet_ntoa_r
  func_type func;
  func = (func_type)&inet_ntoa_r;
#endif
  return 0;
}
#endif
#ifdef HAVE_GETADDRINFO
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>

int main(void) {
    struct addrinfo hints, *ai;
    int error;

    memset(&hints, 0, sizeof(hints));
    hints.ai_family = AF_UNSPEC;
    hints.ai_socktype = SOCK_STREAM;
#ifndef getaddrinfo
    (void)getaddrinfo;
#endif
    error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
    if (error) {
        return 1;
    }
    return 0;
}
#endif
#ifdef HAVE_FILE_OFFSET_BITS
#ifdef _FILE_OFFSET_BITS
#undef _FILE_OFFSET_BITS
#endif
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
                       && LARGE_OFF_T % 2147483647 == 1)
                      ? 1 : -1];
int main () { ; return 0; }
#endif
#ifdef HAVE_IOCTLSOCKET
/* includes start */
#ifdef HAVE_WINDOWS_H
#  ifndef WIN32_LEAN_AND_MEAN
#    define WIN32_LEAN_AND_MEAN
#  endif
#  include BOSS_FAKEWIN_V_windows_h //original-code:<windows.h>
#  ifdef HAVE_WINSOCK2_H
#    include BOSS_FAKEWIN_V_winsock2_h //original-code:<winsock2.h>
#  else
#    ifdef HAVE_WINSOCK_H
#      include BOSS_FAKEWIN_V_winsock_h //original-code:<winsock.h>
#    endif
#  endif
#endif

int
main ()
{

/* ioctlsocket source code */
 int socket;
 unsigned long flags = ioctlsocket(socket, FIONBIO, &flags);

  ;
  return 0;
}

#endif
#ifdef HAVE_IOCTLSOCKET_CAMEL
/* includes start */
#ifdef HAVE_WINDOWS_H
#  ifndef WIN32_LEAN_AND_MEAN
#    define WIN32_LEAN_AND_MEAN
#  endif
#  include BOSS_FAKEWIN_V_windows_h //original-code:<windows.h>
#  ifdef HAVE_WINSOCK2_H
#    include BOSS_FAKEWIN_V_winsock2_h //original-code:<winsock2.h>
#  else
#    ifdef HAVE_WINSOCK_H
#      include BOSS_FAKEWIN_V_winsock_h //original-code:<winsock.h>
#    endif
#  endif
#endif

int
main ()
{

/* IoctlSocket source code */
    if(0 != IoctlSocket(0, 0, 0))
      return 1;
  ;
  return 0;
}
#endif
#ifdef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
/* includes start */
#ifdef HAVE_WINDOWS_H
#  ifndef WIN32_LEAN_AND_MEAN
#    define WIN32_LEAN_AND_MEAN
#  endif
#  include BOSS_FAKEWIN_V_windows_h //original-code:<windows.h>
#  ifdef HAVE_WINSOCK2_H
#    include BOSS_FAKEWIN_V_winsock2_h //original-code:<winsock2.h>
#  else
#    ifdef HAVE_WINSOCK_H
#      include BOSS_FAKEWIN_V_winsock_h //original-code:<winsock.h>
#    endif
#  endif
#endif

int
main ()
{

/* IoctlSocket source code */
        long flags = 0;
        if(0 != ioctlsocket(0, FIONBIO, &flags))
          return 1;
  ;
  return 0;
}
#endif
#ifdef HAVE_IOCTLSOCKET_FIONBIO
/* includes start */
#ifdef HAVE_WINDOWS_H
#  ifndef WIN32_LEAN_AND_MEAN
#    define WIN32_LEAN_AND_MEAN
#  endif
#  include BOSS_FAKEWIN_V_windows_h //original-code:<windows.h>
#  ifdef HAVE_WINSOCK2_H
#    include BOSS_FAKEWIN_V_winsock2_h //original-code:<winsock2.h>
#  else
#    ifdef HAVE_WINSOCK_H
#      include BOSS_FAKEWIN_V_winsock_h //original-code:<winsock.h>
#    endif
#  endif
#endif

int
main ()
{

        int flags = 0;
        if(0 != ioctlsocket(0, FIONBIO, &flags))
          return 1;

  ;
  return 0;
}
#endif
#ifdef HAVE_IOCTL_FIONBIO
/* headers for FIONBIO test */
/* includes start */
#ifdef HAVE_SYS_TYPES_H
#  include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
#  include <unistd.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#  include <sys/socket.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
#  include <sys/ioctl.h>
#endif
#ifdef HAVE_STROPTS_H
#  include <stropts.h>
#endif

int
main ()
{

        int flags = 0;
        if(0 != ioctl(0, FIONBIO, &flags))
          return 1;

  ;
  return 0;
}
#endif
#ifdef HAVE_IOCTL_SIOCGIFADDR
/* headers for FIONBIO test */
/* includes start */
#ifdef HAVE_SYS_TYPES_H
#  include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
#  include <unistd.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#  include <sys/socket.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
#  include <sys/ioctl.h>
#endif
#ifdef HAVE_STROPTS_H
#  include <stropts.h>
#endif
#include <net/if.h>

int
main ()
{
        struct ifreq ifr;
        if(0 != ioctl(0, SIOCGIFADDR, &ifr))
          return 1;

  ;
  return 0;
}
#endif
#ifdef HAVE_SETSOCKOPT_SO_NONBLOCK
/* includes start */
#ifdef HAVE_WINDOWS_H
#  ifndef WIN32_LEAN_AND_MEAN
#    define WIN32_LEAN_AND_MEAN
#  endif
#  include BOSS_FAKEWIN_V_windows_h //original-code:<windows.h>
#  ifdef HAVE_WINSOCK2_H
#    include BOSS_FAKEWIN_V_winsock2_h //original-code:<winsock2.h>
#  else
#    ifdef HAVE_WINSOCK_H
#      include BOSS_FAKEWIN_V_winsock_h //original-code:<winsock.h>
#    endif
#  endif
#endif
/* includes start */
#ifdef HAVE_SYS_TYPES_H
#  include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#  include <sys/socket.h>
#endif
/* includes end */

int
main ()
{
        if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
          return 1;
  ;
  return 0;
}
#endif
#ifdef HAVE_GLIBC_STRERROR_R
#include <string.h>
#include <errno.h>
int
main () {
  char buffer[1024]; /* big enough to play with */
  char *string =
    strerror_r(EACCES, buffer, sizeof(buffer));
    /* this should've returned a string */
    if(!string || !string[0])
      return 99;
    return 0;
}
#endif
#ifdef HAVE_POSIX_STRERROR_R
#include <string.h>
#include <errno.h>
int
main () {
  char buffer[1024]; /* big enough to play with */
  int error =
    strerror_r(EACCES, buffer, sizeof(buffer));
    /* This should've returned zero, and written an error string in the
       buffer.*/
    if(!buffer[0] || error)
      return 99;
    return 0;
}
#endif


text:
package org.python.types;

public class Method extends org.python.types.Object implements org.python.Callable {
    boolean is_static;
    java.lang.reflect.Method value;

    public Method(java.lang.reflect.Method method, boolean is_static) {
        super();
        this.value = method;
        this.is_static = is_static;
    }

    public org.python.Object invoke(org.python.Object[] args, java.util.Hashtable<java.lang.String, org.python.Object> kwargs) {
        try {
            // System.out.println(this.value + " ARGS:");
            // for (org.python.Object arg: args) {
            //     System.out.println("  " + arg);
            // }
            if (this.is_static) {
                return (org.python.Object) this.value.invoke(null, args, kwargs);
            } else {
                return (org.python.Object) this.value.invoke(args[0], args, kwargs);
            }
        } catch (java.lang.IllegalAccessException e) {
            throw new org.python.exceptions.RuntimeError("Illegal access to Java instance method " + this.value);
        } catch (java.lang.reflect.InvocationTargetException e) {
            throw new org.python.exceptions.RuntimeError(e.getCause().toString());
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
Statsd Client - DEPRECATED
==========================

This project is deprecated as of March 4, 2019. There's no official maintainer, and better alternatives exist. Security only related updates will be considered going forward. Currently active versions will remain on NuGet.

We suggest migrating to [JustEat.StatsD](https://github.com/justeat/JustEat.StatsD), which has a very similar API to this project, plenty of additional features, and is actively maintained.

Thanks to all the contributors and your many PRs and reported issues over the years, the numerous developers that have forked or been inspired by this client, and everyone that used it successfully in production!

# THIS PROJECT IS DEPRECATED

Original readme...

---

[![Build status](https://ci.appveyor.com/api/projects/status/fklgn25u3k66qu3v?svg=true)](https://ci.appveyor.com/project/DarrellMozingo/statsd-csharp-client)
[![NuGet Version](http://img.shields.io/nuget/v/StatsdClient.svg?style=flat)](https://www.nuget.org/packages/StatsdClient/)

A .NET Standard compatible C# client to interface with Etsy's excellent [statsd](https://github.com/etsy/statsd) server.

Install the client via NuGet with the [StatsdClient package](http://nuget.org/packages/StatsdClient).

## Usage

At app startup, configure the `Metrics` class:

``` C#
Metrics.Configure(new MetricsConfig
{
  StatsdServerName = "hostname",
  Prefix = "myApp.prod"
});
```

Start measuring all the things!

``` C#
Metrics.Counter("stat-name");
Metrics.Time(() => myMethod(), "timer-name");
var result = Metrics.Time(() => GetResult(), "timer-name");
var result = await Metrics.Time(async () => await myAsyncMethod(), "timer-name");
Metrics.GaugeAbsoluteValue("gauge-name", 35);
Metrics.GaugeDelta("gauge-name", -5);
Metrics.Set("something-special", "3");

using (Metrics.StartTimer("stat-name"))
{
  // Lots of code here
}
```

## Advanced Features

To enable these, see the `MetricsConfig` class discussed above.

* `UseTcpProtocol`: sends metrics to statsd via TCP. While supported, UDP is recommended in most cases. If you need TCP reliability, a relay service running locally on the server which you'd send UDP to, and it would relay via TCP, is advised.

## Contributing

See the [Contributing](CONTRIBUTING.md) guidelines.


text:
var passport = require('passport');
var Account = require('./models/account');

module.exports = function (app) {

    app.get('/', function (req, res) {
        res.render('index', { user: req.user, message: req.flash('info') });
    });

    app.get('/account', ensureAuthenticated, function (req, res) {
        Account.findById(req.session.passport.user, function (err, user) {
            if (err) {
                return res.render("account", {info: "Sorry. Terms must be agreed to"});
            }

            if (user.terms == false) {
                res.render('account', { user: user});
            } else {
                req.flash('info', 'Thank you for using social sign in!');
                res.redirect("/");
            }

        });
    });

    app.post('/account', function (req, res) {
        Account.findById(req.session.passport.user, function (err, user) {
            user.update({"terms": req.body.terms}, function (err, account) {
                if (err) {
                    return res.render("account", {info: "Sorry. Terms must be agreed to"});
                }
                passport.authenticate('facebook')(req, res, function () {
                    req.flash('info', 'Thank you for doing Social registration!');
                    res.render("/");
                });
            });
        });
    });

    app.get('/auth/facebook',
        passport.authenticate('facebook', {scope: ['email']}),
        function (req, res) {
        });
    app.get('/auth/facebook/callback',
        passport.authenticate('facebook', { failureRedirect: '/' }),

        function (req, res) {
            res.redirect('/account');
        });

    app.get('/register', function (req, res) {
        res.render('register', { });
    });

    app.post('/register', function (req, res) {
        Account.register(new Account({ username: req.body.username, first_name: req.body.first_name, last_name: req.body.last_name, terms: req.body.terms }), req.body.password, function (err, account) {
            if (err) {
                return res.render("register", {info: "Sorry. That username already exists. Try again."});
            }
            passport.authenticate('local')(req, res, function () {
                req.flash('info', 'Thank you for doing normal registration!');
                res.redirect("/");
            });
        });
    });

    app.get('/login', function (req, res) {
        res.render('login', { user: req.user, error: req.flash('error')[0] });
    });

    app.post('/login', passport.authenticate('local', { successRedirect: '/', failureRedirect: '/login', failureFlash: 'Invalid email or password. If you haven\'t registered yet, please register'}), function (req, res) {
        res.redirect('/');
    });

    app.get('/logout', function (req, res) {
        req.logout();
        res.redirect('/');
    });

    app.get('/search', ensureAuthenticated, function (req, res) {
        res.render('search', { user: req.user });
    });

    function ensureAuthenticated(req, res, next) {
        if (req.isAuthenticated()) {
            return next();
        }
        res.redirect('/')
    }

};


text:
@interface NSString (EJExtension)

///对字符串进行URL编码和解码
- (NSString*)ej_urlDecode;
- (NSString*)ej_urlEncode;

///根据字符串,生成响应的Controller,View和加载xib的View
- (UIViewController *)ej_controller;
- (UIView *)ej_view;
- (UIView *)ej_xibViewWithOwner:(id)owner;

@end


text:
module Fastbill
  module Automatic
    class Webhook

      attr_reader :type, :customer, :subscription, :payment

      def initialize(attributes = {})
        set_attributes(attributes)
      end

      def self.parse(params)
        self.new(params)
      end

      def set_attributes(attributes)
        attributes.each_pair do |key, value|
          if key == "customer"
            instance_variable_set("@customer", Customer.new(value))
          elsif key == "subscription"
            instance_variable_set("@subscription", Subscription.new(value))
          elsif key == "payment"
            instance_variable_set("@payment", Payment.new(value))
          else
            instance_variable_set("@#{key.downcase}", value)
          end
        end
      end

    end
  end
end


text:
from horizon.test import helpers as test

class HelloTests(test.TestCase):
    # Unit tests for hello.
    def test_me(self):
        self.assertTrue(1 + 1 == 2)


text:
This project allows for you to generate documentation from project source. This project uses a modified groovydoc page to remove the navigation and keep the 'look and feel' the same across pages.

To build the tool, you will need to run `./gradlew shadowJar`.

## Usage

    java -jar dash-<version>-all.jar <options> <src-directories>

### Options

* --output-dir \<dir\>   : Directory to create the docset in
* --name \<name\>        : Name of the docset
* --index \<index\>      : Index to start with
* src-directories        : Directories to search for source files

Simple example:

    java -jar build/dash/libs/dash-0.0.2-SNAPSHOT-all.jar --output-dir build/generated-docs --name foo dash/src/main/java

Running this will generate a file `build/generated-docs/foo.docset`, you can simply add this to Dash.

Detailed example:

    java -jar build/dash/libs/dash-0.0.2-SNAPSHOT-all.jar --output-dir build/generated-docs/gradle3 --name gradle  --index ~/Downloads/gradle-2.5/docs/dsl  `find ~/Downloads/gradle-2.5/src -type d -maxdepth 1 -mindepth 1 -exec echo -n "{} " \;`

This will take about 8 min to run. The find command will get the source root of all the folders, making the dsl links work.

More to come...


text:
package com.keeps.crm.dao.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.keeps.core.dao.AbstractDao;
import com.keeps.crm.dao.GoodsDao;
import com.keeps.model.SzlGoods;
import com.keeps.tools.utils.DateUtils;
import com.keeps.tools.utils.StringUtils;
import com.keeps.tools.utils.page.Page;

@Repository
public class GoodsDaoImpl extends AbstractDao implements GoodsDao {

	@Override
	public Page queryList(SzlGoods goods) {
		StringBuffer sql = new StringBuffer(" select a.*,b.classname as classname from szl_goods a  ");
		sql.append(" inner join szl_goods_class b on a.classid = b.id ");
		List<Object> values = new ArrayList<Object>();
		sql.append(" where isdelete = 1 ");
		if (goods.getClassid()!=null) {
			if (goods.getClassid()!=0) {
				sql.append(" and (a.classid = ? or a.pclassid = ?) ");
				values.add(goods.getClassid());
				values.add(goods.getClassid());
			}
		}
		if (StringUtils.hasText(goods.getGoodsname())) {
			sql.append(" and a.goodsname like ? ");
			values.add("%"+goods.getGoodsname().trim()+"%");
		}
		if (goods.getGoodssource()!=null && goods.getGoodssource() != 0) {
			sql.append(" and a.goodssource = ? ");
			values.add(goods.getGoodssource());
		}
		if (goods.getIshot()!=null && goods.getIshot() != 0) {
			sql.append(" and a.ishot = ? ");
			values.add(goods.getIshot());
		}
		if (goods.getIsrecommend()!=null && goods.getIsrecommend() != 0) {
			sql.append(" and a.isrecommend = ? ");
			values.add(goods.getIsrecommend());
		}
		if (goods.getSearchtype()!=null) {
			if (goods.getSearchtype()==1) {
				sql.append(" and a.endtime >= ? ");
				values.add(DateUtils.getNow("yyyy-MM-dd"));
			}else if(goods.getSearchtype()==2){
				sql.append(" and a.endtime < ? ");
				values.add(DateUtils.getNow("yyyy-MM-dd"));
			}
		}
		sql.append(" order by a.updatetime desc ");
		return super.queryByNameParamSql(sql.toString() ,null, values.toArray(),goods,goods.getClass());

	}

	@Override
	public Integer updateFieidById(String fieid, Integer value, String ids) {
		String sql = "update szl_goods set "+fieid+"= :fieid where id in (:ids)";
		return super.executeSQL(sql, new String[]{"fieid","ids"}, new Object[]{value,ids.split(",")});
	}

	@SuppressWarnings("rawtypes")
	@Override
	public Integer getCountByGoodsClassIds(String classids) {
		String sql = "select count(1) from szl_goods a where a.isdelete = 1 and a.classid in (:classids)";
		List list = super.getByNameParamSql(sql, new String[]{"classids"}, new Object[]{classids});
		return Integer.parseInt(list.get(0).toString());

	}

	@SuppressWarnings("rawtypes")
	public Integer getCountByGoodsname(String goodsname){
		String sql = "select count(1) from szl_goods a where a.isdelete = 1 and a.goodsname = (:goodsname)";
		List list = super.getByNameParamSql(sql, new String[]{"goodsname"}, new Object[]{goodsname});
		return Integer.parseInt(list.get(0).toString());
	}

}


text:
using System.Reflection;
using System.Runtime.CompilerServices;

// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Math.Base")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("andy")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly:AssemblyVersion("0.1")]

// Make internals visible to test project
[assembly: InternalsVisibleTo("Math.Base.Tests")]


text:
module.exports = function scrollLeft () {

  if (window.pageXOffset) return window.pageXOffset;

  return document.documentElement.clientWidth
    ? document.documentElement.scrollLeft
    : document.body.scrollLeft;
};


text:
if [ "$#" -ne 7 ]; then
    echo "Incorrect parameters"
    exit 1
fi

# Grab the arguments
SCRIPT_NAME="$1"
EXPERIMENT_NAME="$2"
EXPERIMENT_NUM="$3"
AGENT_NUM="$4"
NUM_TRIALS="$5"
OUTPUT_DIRECTORY="$6"
OTHER_ARGUMENTS="$7"

# Clean the arguments
FULL_SCRIPT_PATH="$( readlink -f $SCRIPT_NAME)"
OUTPUT_DIR="$( readlink -f $OUTPUT_DIRECTORY )"

# Make a timestamped directory in the out dir that was passed in

TIMESTAMP="$(date +%a-%b-%d-%H-%M)"
OUTPUT_DIR="$OUTPUT_DIR/$EXPERIMENT_NAME-$TIMESTAMP"

mkdir -p "$OUTPUT_DIR/logs"
mkdir -p "$OUTPUT_DIR/out"

UNIQUE_OUTPUT_DIR="$OUTPUT_DIR/\$(Process)"

# Form the final arguments string that we'll give to Python
ARGUMENTS="${FULL_SCRIPT_PATH} ${EXPERIMENT_NUM} ${AGENT_NUM} ${UNIQUE_OUTPUT_DIR} -trials 1 -unique-id \$(Process) ${OTHER_ARGUMENTS}"

# Condor wants the full path to the Python executable
PYTHON_PATH="$( which python3.5)"

# Write condor submission file
cat << EOF > submit.condor
Universe        = vanilla
Executable      = $PYTHON_PATH
Error           = $OUTPUT_DIR/logs/err.\$(cluster)
Output          = $OUTPUT_DIR/logs/out.\$(cluster)
Log             = $OUTPUT_DIR/logs/log.\$(cluster)
Environment     = HOME=tmp/;

Notification    = Complete;

+Group = "UNDER"
+Project = "AI_ROBOTICS"
+ProjectDescription = "Experiments with applying reinforcement learning to counterpoint composition"

Arguments       = $ARGUMENTS
Queue $NUM_TRIALS
EOF

echo "======== Condor Submission ========="
cat submit.condor

condor_submit submit.condor

# Save the submission to the results folder
mv submit.condor $OUTPUT_DIR/arguments.txt


text:
签名:

                  作业首页

                  作业库

                  未提交

                  发布作业

                  已发布

                  我的作业

                  公告

                  返回首页


text:
package com.nuclearfurnace.oscilloscope;

import com.nuclearfurnace.oscilloscope.discovery.DiscoveryManager;
import com.nuclearfurnace.oscilloscope.discovery.ProviderRegistry;
import com.nuclearfurnace.oscilloscope.discovery.providers.ConsulClusterProvider;
import com.nuclearfurnace.oscilloscope.discovery.providers.ElasticLoadBalancerClusterProvider;
import com.nuclearfurnace.oscilloscope.discovery.providers.StaticConfigurationClusterProvider;
import com.nuclearfurnace.oscilloscope.discovery.tasks.RefreshProvidersTask;
import com.nuclearfurnace.oscilloscope.resources.PingResource;
import com.nuclearfurnace.oscilloscope.resources.ClusterResource;
import com.nuclearfurnace.oscilloscope.resources.StreamResource;
import io.dropwizard.Application;
import io.dropwizard.assets.AssetsBundle;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;

public class OscilloscopeApplication extends Application<OscilloscopeConfiguration>
{
    public static void main(String[] args) throws Exception
    {
        new OscilloscopeApplication().run(args);
    }

    @Override
    public String getName()
    {
        return "oscilloscope";
    }

    @Override
    public void initialize(Bootstrap<OscilloscopeConfiguration> bootstrap)
    {
        // Configure our static assets to be served on the root.
        bootstrap.addBundle(new AssetsBundle("/app/", "/", "index.html"));
    }

    @Override
    public void run(OscilloscopeConfiguration configuration, Environment environment)
    {
        // Register our discovery providers.
        ProviderRegistry.registerProvider("static", new StaticConfigurationClusterProvider());
        ProviderRegistry.registerProvider("elb", new ElasticLoadBalancerClusterProvider());
        ProviderRegistry.registerProvider("consul", new ConsulClusterProvider());

        // Set up our discovery manager.
        DiscoveryManager discoveryManager = new DiscoveryManager();
        environment.lifecycle().manage(discoveryManager);

        RefreshProvidersTask refreshProvidersTask = new RefreshProvidersTask(discoveryManager);
        environment.admin().addTask(refreshProvidersTask);

        final PingResource pingResource = new PingResource();
        environment.jersey().register(pingResource);

        // Set up our cluster endpoint for getting cluster information.
        final ClusterResource clusterResource = new ClusterResource(discoveryManager);
        environment.jersey().register(clusterResource);

        final StreamResource streamResource = new StreamResource(discoveryManager);
        environment.jersey().register(streamResource);
    }
}


text:
A NLopt implementation for Go
======

A package to provide functionality of object-oriented C-API of [NLopt](http://ab-initio.mit.edu/wiki/index.php/Main_Page)
for the Go programming language (http://golang.org). This provides a wrapper
using cgo to a c-based implementation.

## Status

[![Build Status](https://travis-ci.org/go-nlopt/nlopt.svg?branch=master)](https://travis-ci.org/go-nlopt/nlopt) [![Coverage Status](https://coveralls.io/repos/github/go-nlopt/nlopt/badge.svg?branch=master)](https://coveralls.io/github/go-nlopt/nlopt?branch=master) [![GoDoc](https://godoc.org/github.com/go-nlopt/nlopt?status.svg)](https://godoc.org/github.com/go-nlopt/nlopt)

## Installation

- On RedHat/CentOS/Fedora

~~~shell script
yum/dnf -y install nlopt-devel
~~~

- On Ubuntu (14.04+)

~~~shell script
apt-get install -y libnlopt-dev
~~~

- or, install NLopt library on any Unix-like system (GNU/Linux is fine) with a
  C compiler, using the standard procedure:

~~~shell script
curl -O https://codeload.github.com/stevengj/nlopt/tar.gz/v2.7.0 && tar xzvf v2.7.0 && cd nlopt-2.7.0
cmake . && make && sudo make install
~~~

- On Windows download binary packages at [NLopt on Windows](http://ab-initio.mit.edu/wiki/index.php/NLopt_on_Windows)

If you use pre-packaged binaries, you might want to either make symlink or a copy of `libnlopt-0.dll` library
file as `libnlopt.dll`, e.g.:

~~~shell script
mklink libnlopt.dll libnlopt-0.dll
~~~

If the C++ library is in a non-standard directory, or you are using Windows,
make sure to export `LIBRARY_PATH` environment variable, e.g.:

~~~shell script
export LIBRARY_PATH=/path/to/NLopt
~~~

or, on Windows:

~~~shell script
set LIBRARY_PATH=C:\path\to\NLopt
~~~

Then install `nlopt` package.

~~~shell script
go get -u github.com/go-nlopt/nlopt
~~~

## Examples

Implementation of nonlinearly constrained problem from [NLopt Tutorial](http://ab-initio.mit.edu/wiki/index.php/NLopt_Tutorial)

~~~go
package main

import (
        "fmt"
        "github.com/go-nlopt/nlopt"
        "math"
)

func main() {
        opt, err := nlopt.NewNLopt(nlopt.LD_MMA, 2)
        if err != nil {
                panic(err)
        }
        defer opt.Destroy()

        opt.SetLowerBounds([]float64{math.Inf(-1), 0.})

        var evals int
        myfunc := func(x, gradient []float64) float64 {
                evals++
                if len(gradient) > 0 {
                        gradient[0] = 0.0
                        gradient[1] = 0.5 / math.Sqrt(x[1])
                }
                return math.Sqrt(x[1])
        }

        myconstraint := func(x, gradient []float64, a, b float64) float64 {
                if len(gradient) > 0 {
                        gradient[0] = 3*a* math.Pow(a*x[0]+b, 2.)
                        gradient[1] = -1.0
                }
                return math.Pow(a*x[0]+b, 3) - x[1]
        }

        opt.SetMinObjective(myfunc)
        opt.AddInequalityConstraint(func(x, gradient []float64) float64 { return myconstraint(x, gradient, 2., 0.)}, 1e-8)
        opt.AddInequalityConstraint(func(x, gradient []float64) float64 { return myconstraint(x, gradient, -1., 1.)}, 1e-8)
        opt.SetXtolRel(1e-4)

        x := []float64{1.234, 5.678}
        xopt, minf, err := opt.Optimize(x)
        if err != nil {
                panic(err)
        }
        fmt.Printf("found minimum after %d evaluations at f(%g,%g) = %0.10g\n", evals, xopt[0], xopt[1], minf)
}
~~~

Implementation of [Nonlinear Least Squares Without Jacobian](https://uk.mathworks.com/help/optim/ug/nonlinear-least-squares-with-full-jacobian.html)

~~~go
package main

import (
        "fmt"
        "github.com/go-nlopt/nlopt"
        "math"
)

func main() {
        opt, err := nlopt.NewNLopt(nlopt.LN_BOBYQA, 2)
        if err != nil {
                panic(err)
        }
        defer opt.Destroy()

        k := []float64{1., 2., 3., 4., 5., 6., 7., 8., 9., 10.}

        var evals int
        myfun := func(x, gradient []float64) float64 {
                evals++
                f := make([]float64, len(k))
                for i := 0; i < len(k); i++ {
                        f[i] = 2 + 2*k[i] - math.Exp(k[i]*x[0]) - math.Exp(k[i]*x[1])
                }
                var chi2 float64
                for i := 0; i < len(f); i++ {
                        chi2 += (f[i] * f[i])
                }
                return chi2
        }

        opt.SetMinObjective(myfun)
        opt.SetXtolRel(1e-8)
        opt.SetFtolRel(1e-8)

        x := []float64{0.3, 0.4}
        xopt, resnorm, err := opt.Optimize(x)
        if err != nil {
                panic(err)
        }
        fmt.Printf("BOBYQA: found minimum after %d evaluations at f(%g,%g) = %0.10g\n", evals, xopt[0], xopt[1], resnorm)
}
~~~

## License

MIT - see LICENSE for more details.


text:
package com.microsoft.azure.management.mixedreality.v2019_02_28_preview.implementation;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.azure.Resource;

/**
 * SpatialAnchorsAccount Response.
 */
@JsonFlatten
public class SpatialAnchorsAccountInner extends Resource {
    /**
     * unique id of certain Spatial Anchors Account data contract.
     */
    @JsonProperty(value = "properties.accountId", access = JsonProperty.Access.WRITE_ONLY)
    private String accountId;

    /**
     * Correspond domain name of certain Spatial Anchors Account.
     */
    @JsonProperty(value = "properties.accountDomain", access = JsonProperty.Access.WRITE_ONLY)
    private String accountDomain;

    /**
     * Get unique id of certain Spatial Anchors Account data contract.
     *
     * @return the accountId value
     */
    public String accountId() {
        return this.accountId;
    }

    /**
     * Get correspond domain name of certain Spatial Anchors Account.
     *
     * @return the accountDomain value
     */
    public String accountDomain() {
        return this.accountDomain;
    }

}


text:
package robot.commands;

import robot.Robot;
import robot.Toggle;
import robot.subsystems.ToteElevatorSubsystem.ToteElevatorLevel;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.Scheduler;

public class DefaultToteElevatorCommand extends Command {

	private Toggle releaseToggle = new Toggle(false);

	public DefaultToteElevatorCommand() {
		requires(Robot.toteElevatorSubsystem);
	}

	@Override
	protected void initialize() {
	}

	private ToteElevatorLevel decrementLevel(ToteElevatorLevel level) {

		if(level == ToteElevatorLevel.FIVE) {
			return ToteElevatorLevel.FOUR;
		} else if(level == ToteElevatorLevel.FOUR) {
			return ToteElevatorLevel.THREE;
		} else if(level == ToteElevatorLevel.THREE) {
			return ToteElevatorLevel.TWO;
		} else if(level == ToteElevatorLevel.TWO) {
			return ToteElevatorLevel.ONE;
		} else if(level == ToteElevatorLevel.ONE) {
			return ToteElevatorLevel.FLOOR;
		}

		return level;
	}

	@Override
	protected void execute() {

		releaseToggle.update(Robot.oi.getElevatorArmReleaseButton());

		if(Robot.oi.getElevatorDecrementButton()) {
			Scheduler.getInstance().add(new DriveToteElevatorCommand(decrementLevel(Robot.toteElevatorSubsystem.getLevel()), false));
		}

		if(Robot.oi.getElevatorArmButton() && Robot.toteElevatorSubsystem.getLevel() == ToteElevatorLevel.ARM_LEVEL) {
			if(Robot.toteIntakeSubsystem.getCurrentCommand() instanceof TeleopPickupCommand) {
				((TeleopPickupCommand)Robot.toteIntakeSubsystem.getCurrentCommand()).overrideDeploy();
			}
			Robot.toteElevatorSubsystem.setArm(true);

		} else if (Robot.oi.getElevatorArmButton() && Robot.toteElevatorSubsystem.getLevel() != ToteElevatorLevel.ARM_LEVEL) {
			if(Robot.toteIntakeSubsystem.getCurrentCommand() instanceof TeleopPickupCommand) {
				((TeleopPickupCommand)Robot.toteIntakeSubsystem.getCurrentCommand()).overrideDeploy();
			}
			Scheduler.getInstance().add(new DriveToteElevatorCommand(ToteElevatorLevel.ARM_LEVEL, false));
		} else if(releaseToggle.getState() && !DriverStation.getInstance().isAutonomous()) {
			Robot.toteElevatorSubsystem.setArm(true);
		} else if(!DriverStation.getInstance().isAutonomous()) {
			Robot.toteElevatorSubsystem.setArm(false);
		}
	}

	@Override
	protected boolean isFinished() {
		return false;
	}

	@Override
	protected void end() {
	}

	@Override
	protected void interrupted() {
		releaseToggle.setState(false);
	}

}


text:
{% if perms.project.add_article or perms.project.change_article %}

Содержание

Описание

Служебное

			<input id="edit-article-id" type="hidden" value="0">

			Заголовок
				<input id="edit-article-title" type="text" value="">

			Содержание
				<textarea id="edit-article-content"></textarea>

			Псевдоним
				<input id="edit-article-alias" type="text" value="">

			Путь
				<input id="edit-article-patch" type="text" value="">

			Предпросмотр
				<input id="edit-article-thumb_src" type="text" value="">

			Вступительный текст
				<textarea id="edit-article-intro"></textarea>

			Описание
				<textarea id="edit-article-description"></textarea>

			Категория
				<select id="edit-article-category">
					<option value="0" selected> - Не определена - </option>
					{% for category in categories %}
					<option value="{{ category.id }}">{{ category.name }}</option>
					{% endfor %}
				</select>

			Язык
				<select id="edit-article-language">
					<option value="0" selected> - Не определён - </option>
					{% for language in languages %}
					<option value="{{ language.id }}">{{ language.name }}</option>
					{% endfor %}
				</select>

			Источник
				<input id="edit-article-source" type="text" value="">
			</lable>

			<lable>Ссылка на источник
				<input id="edit-article-source_url" type="text" value="">
			</lable>

			Статус

					<input id="edit-article-state" type="checkbox">

			На главной

					<input id="edit-article-on_main" type="checkbox">

	<button data-do="edit-article-save" class="primary"> Сохранить</button>
	<button data-do="edit-article-cancel" class="secondary">Отмена</button>
	×

{% endif %}


text:
// Copyright 2007-2017 Chris Patterson, Dru Sellers, Travis Smith, et. al.
//
// 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.
namespace MassTransit.UnityIntegration
{
    using Courier;
    using Courier.Hosts;
    using GreenPipes;
    using Scoping;
    using Scoping.CourierContexts;
    using Unity;
    using Unity.Injection;
    using Unity.Resolution;

    public class UnityExecuteActivityScopeProvider<TActivity, TArguments> :
        IExecuteActivityScopeProvider<TActivity, TArguments>
        where TActivity : class, ExecuteActivity<TArguments>
        where TArguments : class
    {
        readonly IUnityContainer _container;

        public UnityExecuteActivityScopeProvider(IUnityContainer container)
        {
            _container = container;
        }

        public IExecuteActivityScopeContext<TActivity, TArguments> GetScope(ExecuteContext<TArguments> context)
        {
            if (context.TryGetPayload<IUnityContainer>(out var existingContainer))
            {
                var activity = existingContainer.Resolve<TActivity>(new DependencyOverride(typeof(TArguments), InjectionParameterValue.ToParameter(context.Arguments)));

                ExecuteActivityContext<TActivity, TArguments> activityContext = new HostExecuteActivityContext<TActivity, TArguments>(activity, context);

                return new ExistingExecuteActivityScopeContext<TActivity, TArguments>(activityContext);
            }

            var scope = _container.CreateChildContainer();
            try
            {
                var activity = scope.Resolve<TActivity>(new DependencyOverride(typeof(TArguments), InjectionParameterValue.ToParameter(context.Arguments)));

                ExecuteActivityContext<TActivity, TArguments> activityContext = new HostExecuteActivityContext<TActivity, TArguments>(activity, context);

                var contextScope = scope;
                activityContext.GetOrAddPayload(() => contextScope);

                return new CreatedExecuteActivityScopeContext<IUnityContainer, TActivity, TArguments>(contextScope, activityContext);
            }
            catch
            {
                scope.Dispose();

                throw;
            }
        }

        public void Probe(ProbeContext context)
        {
            context.Add("provider", "unity");
        }
    }
}


text:
import jcifs.smb.*;

import java.io.*;
import java.util.*;

public class SidLookup {
  private static final int MAX_TRIES = 5;
  private Map<String, String> sidCache;

  private final String dc;
  private final NtlmPasswordAuthentication creds;

  public SidLookup(String dc, String domain, String username, String password) {
    this.dc = dc;
    this.creds = new NtlmPasswordAuthentication(domain, username, password);
    this.sidCache = new HashMap<>();
  }

  public String resolve(String sid) throws IOException, SmbException {
    String cached = sidCache.get(sid);
    if (cached != null) {
      return cached;
    }

    int tries = 0;
    while (true) {
      try {
        SID sidObject = new SID(sid);
        sidObject.resolve(dc, creds);
        sidCache.put(sid, sidObject.toDisplayString());
        return sidObject.toDisplayString();
      } catch (SmbException e) {
        if (tries == MAX_TRIES) {
          throw e;
        }
      }
      tries++;
    }
  }

  public static void main(String[] argv) throws Exception {
    SidLookup lookup = new SidLookup("172.25.51.36", "gsa-connectors", "Administrator", "p@assword123");
    System.out.println(lookup.resolve("S-1-5-21-3993744865-3521423997-1479072767-513"));
    System.out.println(lookup.resolve("S-1-5-21-3993744865-3521423997-1479072767-513"));
  }
}


text:
<?php
class LoaderOneTimeCodes extends Loader{
	protected function includes(){
		stingleInclude ('Managers/OneTimeCodes.class.php');
		stingleInclude ('Objects/OTCConfig.class.php');
	}

	protected function customInitBeforeObjects(){
		Tbl::registerTableNames('OneTimeCodes');
	}

	protected function loadOneTimeCodes(){
		$this->register(new OneTimeCodes($this->config->AuxConfig));
	}
}


text:
<!DOCTYPE html>
<html>
<title>WebVTT rendering, align:middle, position less than 50%</title>
<style>
html { overflow:hidden }
body { margin:0 }
::cue {
    font-family: Ahem, sans-serif;
    color: green
}
</style>
<script src="support/refTestWait.js"></script>
<video width="1280" height="720" autoplay onplaying="this.onplaying = null; this.pause(); takeScreenshot();">
    <source src="media/white.webm" type="video/webm">
    <source src="media/white.mp4" type="video/mp4">
    <track src="support/align_middle_position_lt_50.vtt">
</video>
<script>
document.getElementsByTagName('track')[0].track.mode = 'showing';
</script>
</html>


text:
package partners;

import applets.etsmtl.ca.partners.Partner;
import applets.etsmtl.ca.partners.PartnersResource;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.junit.Assert;
import org.junit.Test;

import javax.ws.rs.core.Application;
import javax.ws.rs.core.GenericType;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;

public class PartnersResourcesTest extends JerseyTest {

    @Override
    protected Application configure() {
        return new ResourceConfig(PartnersResource.class);
    }

    @Test
    public void testGetPartners() {
        MockWebServer server = new MockWebServer();

        try {
            final String filePath = getClass().getResource("/clubapplets_partners_body.html").getPath();
            String partnersHtml = readFile(filePath, StandardCharsets.UTF_8);

            server.enqueue(new MockResponse().setBody(partnersHtml));
            server.start();
            String url = server.url("/partners").toString();
            PartnersResource.PARTNERS_URL = url;

            List<Partner> response = target("/partners").request().get(new GenericType<List<Partner>>() {
            });

            Assert.assertTrue(response.size() > 0);

            PartnersResource.PARTNERS_URL = "";

            //Test caching
            response = target("/partners").request().get(new GenericType<List<Partner>>() {
            });
            Assert.assertTrue(response.size() > 0);

            server.shutdown();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    String readFile(String path, Charset encoding) throws IOException {
        byte[] encoded = Files.readAllBytes(Paths.get(path));
        return new String(encoded, encoding);
    }

}


text:
namespace cocos2d
{

C3DModel::C3DModel(C3DMesh* mesh) :
    _mesh(mesh), _material(nullptr), _partCount(0), _partMaterials(nullptr), _node(nullptr), _wireframe(false)
{
     mesh->retain();
    _morph = nullptr;
    _partCount = mesh->getPartCount();

}

C3DModel::~C3DModel()
{

    SAFE_RELEASE(_material);

    if (_partMaterials)
    {
        for (unsigned int i = 0; i < _partCount; ++i)
        {
            SAFE_RELEASE(_partMaterials[i]);
        }
        SAFE_DELETE_ARRAY(_partMaterials);
    }

    SAFE_RELEASE(_mesh);

}

C3DModel* C3DModel::create(C3DMesh* mesh)
{
    return new C3DModel(mesh);
}

C3DMesh* C3DModel::getMesh() const
{
    return _mesh;
}

unsigned int C3DModel::getMeshPartCount() const
{
    return _mesh->getPartCount();
}

C3DMaterial* C3DModel::getMaterial(int partIndex)
{
    assert(partIndex == -1 || (partIndex >= 0 && partIndex < (int)getMeshPartCount()));

    C3DMaterial* m = nullptr;

    if (partIndex >= 0 && partIndex < (int)_partCount)
    {
        // Look up explicitly specified part material.
        if (_partMaterials)
        {
            m = _partMaterials[partIndex];
        }
    }

    if (m == nullptr)
    {
        // Return the shared material.
         m = _material;
    }

    return m;
}

void C3DModel::setMaterial(C3DMaterial* material, int partIndex)
{
    assert(partIndex == -1 || (partIndex >= 0 && partIndex < (int)getMeshPartCount()));

    C3DMaterial* oldMaterial = nullptr;

    if (partIndex == -1)
    {
        oldMaterial = _material;

        // Set new shared material.
        if (material)
        {
            _material = material;
            _material->retain();
        }
    }
    else if (partIndex >= 0 && partIndex < (int)getMeshPartCount())
    {
        // Ensure mesh part count is up-to-date.
        validatePartCount();

        // Release existing part material and part binding.
        if (_partMaterials)
        {
            oldMaterial = _partMaterials[partIndex];
        }
        else
        {
            // Allocate part arrays for the first time.
            if (_partMaterials == nullptr)
            {
                _partMaterials = new C3DMaterial*[_partCount];
                memset(_partMaterials, 0, sizeof(C3DMaterial*) * _partCount);
            }
        }

        // Set new part material.
        if (material)
        {
            _partMaterials[partIndex] = material;
            material->retain();
        }
    }

    // Release existing material and binding.
    if (oldMaterial)
    {
       for (unsigned int i = 0, tCount = oldMaterial->getTechniqueCount(); i < tCount; ++i)
        {
            C3DTechnique* t = oldMaterial->getTechnique(i);
            for (unsigned int j = 0, pCount = t->getPassCount(); j < pCount; ++j)
            {
                t->getPass(j)->setVertexAttributeBinding(nullptr);
            }
        }
        SAFE_RELEASE(oldMaterial);
    }

    if (material)
    {
        // Hookup vertex attribute bindings for all passes in the new material.
        for (unsigned int i = 0, tCount = material->getTechniqueCount(); i < tCount; ++i)
        {
            C3DTechnique* t = material->getTechnique(i);
            for (unsigned int j = 0, pCount = t->getPassCount(); j < pCount; ++j)
            {
                C3DPass* p = t->getPass(j);
                C3DVertexDeclaration* b = C3DVertexDeclaration::create(_mesh, p->getEffect());
                p->setVertexAttributeBinding(b);
                SAFE_RELEASE(b);
            }
        }

        // Apply node binding for the new material.
        if (_node)
        {
            setMaterialNodeBinding(material);
        }
    }
}

C3DMaterial* C3DModel::setMaterial(const char* vshPath, const char* fshPath, const char* defines, int partIndex)
{
    // Try to create a C3DMaterial with the given parameters.
    C3DMaterial* material = C3DMaterial::create(vshPath, fshPath, defines);
    if (material == nullptr)
    {
        return nullptr;
    }

    // Assign the material to us.
    setMaterial(material, partIndex);

    // Release the material since we now have a reference to it.
    //material->release();

    return material;
}

C3DMaterial* C3DModel::setMaterial(const char* materialPath, int partIndex)
{
    // Try to create a C3DMaterial from the specified material file.
    C3DMaterial* material = static_cast<C3DMaterial*>(C3DMaterialManager::getInstance()->getResource(materialPath));

    if (material == nullptr)
    {
        return nullptr;
    }

    // Assign the material to us
    setMaterial(material, partIndex);

    // Release the material since we now have a reference to it
    // material->release();

    return material;
}

C3DMaterial* C3DModel::setDefaultMaterial(const std::string& path,int partIndex)
{
    // Try to create a C3DMaterial from the specified material file.
    std::string materialPath = path + "material"+ "/" + _defaultMaterialName;
    C3DMaterial* material = static_cast<C3DMaterial*>(C3DMaterialManager::getInstance()->getResource(materialPath));

    if (material == nullptr)
    {
        return nullptr;
    }

    // Assign the material to us
    setMaterial(material, partIndex);

    // Release the material since we now have a reference to it
    // material->release();

    return material;
}

bool C3DModel::removeMaterial(int partIndex)
{
    assert(partIndex == -1 || (partIndex >= 0 && partIndex < (int)getMeshPartCount()));

    if (partIndex == -1)
    {
        SAFE_RELEASE(_material);
        return true;
    }
    else if (partIndex >= 0 && partIndex < (int)getMeshPartCount())
    {
        validatePartCount();

        if (_partMaterials)
        {
            SAFE_RELEASE(_partMaterials[partIndex]);
            return true;
        }
        else
        {
            return false;
        }
    }
    else
    {
        return false;
    }
}

bool C3DModel::hasMaterial(unsigned int partIndex) const
{
    return (partIndex < _partCount && _partMaterials && _partMaterials[partIndex]);
}

void C3DModel::draw()
{
    unsigned int partCount = _mesh->getPartCount();

    if ( partCount == 0 )
    {
        // No mesh parts (index buffers).
        if (_material)
        {
            C3DTechnique* technique = _material->getTechnique();

            unsigned int passCount = technique->getPassCount();

            for (unsigned int i = 0; i < passCount; ++i)
            {

                C3DPass* pass = technique->getPass(i);

                pass->bind();
                GL_ASSERT( glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0) );
                if (_wireframe && (_mesh->getPrimitiveType() == GL_TRIANGLES || _mesh->getPrimitiveType() == GL_TRIANGLE_STRIP))
                {
                    unsigned int vertexCount = _mesh->getVertexCount();
                    for (unsigned int j = 0; j < vertexCount; j += 3)
                    {
                        GL_ASSERT( glDrawArrays(GL_LINE_LOOP, j, 3) );
                    }
                }
                else
                {
                    GL_ASSERT( glDrawArrays(_mesh->getPrimitiveType(), 0, _mesh->getVertexCount()) );
                }

                pass->unbind();
            }
        }
    }
    else
    {
        for ( int i = 0; i < partCount; ++i )
        {
            //channelDrawPart( i );

            C3DMaterial* material = getMaterial(i);
            MeshPart* meshPart = _mesh->getPart(i);

            if (material)
            {
                C3DTechnique* technique = material->getTechnique();
                unsigned int passCount = technique->getPassCount();

                for (unsigned int j = 0; j < passCount; ++j)
                {
                    C3DPass* pass = technique->getPass(j);

                    pass->bind();
                    GL_ASSERT( glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, meshPart->getIndexBuffer()) );

                    GL_ASSERT( glDrawElements(meshPart->getPrimitiveType(), meshPart->getIndexCount(), meshPart->getIndexFormat(), 0) );

                    pass->unbind();
                }
            }
        }
    }

}

C3DNode* C3DModel::getNode() const
{
    return _node;
}

void C3DModel::setNode(C3DNode* node)
{
    _node = node;

    // Re-bind node related material parameters
    if (node)
    {
        if (_material)
        {
           setMaterialNodeBinding(_material);
        }
        if (_partMaterials)
        {
            for (unsigned int i = 0; i < _partCount; ++i)
            {
                if (_partMaterials[i])
                {
                    setMaterialNodeBinding(_partMaterials[i]);
                }
            }
        }
    }
}

void C3DModel::validatePartCount()
{
    unsigned int partCount = _mesh->getPartCount();

    if (_partCount != partCount)
    {
        // Allocate new arrays and copy old items to them.
        if (_partMaterials)
        {
            C3DMaterial** oldArray = _partMaterials;
            _partMaterials = new C3DMaterial*[partCount];
            memset(_partMaterials, 0, sizeof(C3DMaterial*) * partCount);
            for (unsigned int i = 0; i < _partCount; ++i)
            {
                _partMaterials[i] = oldArray[i];
            }
            SAFE_DELETE_ARRAY(oldArray);
        }

        // Update local part count.
        _partCount = _mesh->getPartCount();
    }
}

void C3DModel::setMaterialNodeBinding(C3DMaterial *material)
{
    if (_node)
    {
        material->setNodeAutoBinding(_node);

        unsigned int techniqueCount = material->getTechniqueCount();
        for (unsigned int i = 0; i < techniqueCount; ++i)
        {
            C3DTechnique* technique = material->getTechnique(i);

            technique->setNodeAutoBinding(_node);

            unsigned int passCount = technique->getPassCount();
            for (unsigned int j = 0; j < passCount; ++j)
            {
                C3DPass* pass = technique->getPass(j);

                pass->setNodeAutoBinding(_node);
            }
        }
    }
}

void C3DModel::copyFrom(const C3DModel* other)
{
    _partCount = other->_partCount;

    C3DMaterial* newMaterial = static_cast<C3DMaterial*>(C3DMaterialManager::getInstance()->getResource(other->_material->getID()));

    setMaterial(newMaterial, -1);

    if (other->_partMaterials)
    {
        for (unsigned int i = 0; i < _partCount; i++)
        {
            newMaterial = other->_partMaterials[i] ? other->_partMaterials[i]->clone() : NULL;
            setMaterial(newMaterial, i);
        }
    }

    setNode(other->_node);

}

C3DModel* C3DModel::clone(C3DNode::CloneContext& context) const
{
    C3DModel* other = new C3DModel(_mesh);
    other->copyFrom(this);
    return other;
}

void C3DModel::setDefaultMaterialName(const std::string& matName)
{
    _defaultMaterialName = matName;
}

}


text:
export default class Route {
  public workID: string;

  constructor(props: any = {}) {
    Object.keys(props).forEach((key: string) => {
      this[key] = props[key];
    });
  }
}


text:
<!DOCTYPE HTML>

<title>Seeking an Job Portal Category Flat Bootstarp Resposive Website Template | Terms :: w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Seeking Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />

<link href="css/bootstrap-3.1.1.min.css" rel='stylesheet' type='text/css' />

<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href='//fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900' rel='stylesheet' type='text/css'>

<link href="css/font-awesome.css" rel="stylesheet">

	        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
		        Toggle navigation

	        </button>

		            Jobs

Contract Jobs

Walkin Jobs

Jobs by Location

Jobs by Function

Jobs by Industry

Jobs by Company

		        	Services

Action

Another action

Something else here

Separated link

One more separated link

Action

Another action

Something else here

Separated link

One more separated link

Action

Another action

Something else here

Separated link

One more separated link

		            Recruiters

Recruiter Updates

Recruiters you are following

Shortcodes

		            More

Walk-ins

Bpo Jobs

Teaching Jobs

Diploma Jobs

Tech Support

Finance Jobs

Part time Jobs

Health Care

Hospitality

Internships

Research Jobs

Defence Jobs

Login

Upload Resume

Start your job search

			 <input type="text" class="text" placeholder=" " value="Enter Keyword(s)" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Enter Keyword(s)';}">
			 <input type="text" class="text" placeholder=" " value="Location" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Location';}">
			 <input type="submit" value="Find Jobs">

Todays Jobs

Department of Health - Western Australia

Australian Nursing Agency currently require experiences

Russia Nursing Agency currently require experiences

The Government of Western Saudi Arbia

Department of Health - Western Australia

Australian Nursing Agency currently require experiences

Russia Nursing Agency currently require experiences

The Scientific Publishing Services in Saudi Arbia

BPO Private Limited in Canada

Executive Tracks Associates in Pakistan

Pyramid IT Consulting Pvt. Ltd. in Pakistan

Jobs by Category

Railway Recruitment

Air Force Jobs

Police Jobs

Intelligence Bureau Jobs

Army Jobs

Navy Jobs

BSNL Jobs

Software Jobs

Research Jobs

Take The Seeking Poll!

		    			   <input class="seeking-radiobutton" type="radio">

		    				Frequently

		    			   <input class="seeking-radiobutton" type="radio">

		    				Interviewing

		    			   <input class="seeking-radiobutton" type="radio">

		    				Leaving a familiar workplace

		    		  Vote

Recruiters

There are many variations of passages of Lorem Ipsum available.

It is a long established fact that a reader.

Nulla rutrum nisi mi, iaculis commodo nibh lobortis sed.

Sed pulvinar, nunc vitae molestie dapibus, lacus dolor dignissim sapien.

Pellentesque ipsum ex, imperdiet quis consequat sed, consectetur ut ante.

Aliquam libero felis, mollis vitae elementum vel, bibendum eu tortor.

Lorem ipsum dolor sit amet.

Job Seekers

There are many variations of passages of Lorem Ipsum available.

It is a long established fact that a reader.

Nulla rutrum nisi mi, iaculis commodo nibh lobortis sed.

Sed pulvinar, nunc vitae molestie dapibus, lacus dolor dignissim sapien.

Pellentesque ipsum ex, imperdiet quis consequat sed, consectetur ut ante.

Aliquam libero felis, mollis vitae elementum vel, bibendum eu tortor.

Lorem ipsum dolor sit amet.

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio.

But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth,

On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain.

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio.

But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth,

On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain.

Navigate

Home

Sign In

Join Now

About

Features

Terms of use

Contact Us

Post a Job

Twitter Widget

consectetuer adipiscing elit web design

consectetuer adipiscing elit web design

consectetuer adipiscing elit web design

Seeking

There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.

Sign up for our newsletter

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam.

			<form>
				<input type="text" class="form-control" placeholder="Enter your email">
				<button type="button" class="btn red">Subscribe now!</button>
		    </form>

Russia Jobs

Australia Jobs

Srilanka Jobs

Poland Jobs

Newzland Jobs

Pakistan Jobs

Srilanka Jobs

Irland Jobs

Canada Jobs

Germany Jobs

China Jobs

Nepal Jobs

"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numqua"

Copyright © 2015 Seeking . All Rights Reserved . Design by W3layouts


text:
namespace base {
template <typename T>
struct DefaultSingletonTraits;
}

namespace content {
class BrowserContext;
}

namespace chrome {

namespace android {

class DataUseUITabModel;

class DataUseUITabModelFactory : public BrowserContextKeyedServiceFactory {
 public:
  // Returns a singleton instance of DataUseUITabModelFactory.
  static DataUseUITabModelFactory* GetInstance();

  // Returns the DataUseUITabModel associated with |context|.
  static DataUseUITabModel* GetForBrowserContext(
      content::BrowserContext* context);

 private:
  friend struct base::DefaultSingletonTraits<DataUseUITabModelFactory>;

  DataUseUITabModelFactory();
  ~DataUseUITabModelFactory() override;

  // BrowserContextKeyedServiceFactory:
  KeyedService* BuildServiceInstanceFor(
      content::BrowserContext* browser_context) const override;

  DISALLOW_COPY_AND_ASSIGN(DataUseUITabModelFactory);
};

}  // namespace android

}  // namespace chrome

#endif  // CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_UI_TAB_MODEL_FACTORY_H_


text:
#import "DBMutatingStatement.h"

@interface DBDelete : DBMutatingStatement

// Delete an object.
- (void) delete: (NSManagedObject *) object;

@end


text:
(function () {
	var socket,
		socketUrl = app.socketUrl || 'http://localhost:8989';
		// socketUrl = marco_settings !== 'undefined' ? marco_settings.socketUrl : 'http://localhost:8989';

	function printModel (map, viewModel) {
		var self = this;
		self.$popover = $('#printing-popover');
		// show print dialog
		self.showPrintDialog = function (vm, event) {
            var width = $("#map-panel").width() + $("#legend:visible").width();

            self.$button = $(event.target).closest('.btn');

            // adjust the width depending on legend visibility
            if ($("#legend").is(":visible")) {
                width = width + 60;
            } else {
                width = width + 40;
            }

            self.isGoogle(/Google/.test(app.map.baseLayer.name));

            // set some default options
            self.shotHeight($(document).height());
            self.shotWidth(width);
            self.mapHeight($(document).height());

            self.mapWidth(width);
            self.thumbnail(false);
            self.showLegend(app.viewModel.showLegend() || false);
            self.ratio = self.shotHeight() / self.shotWidth();

            if (self.$popover.is(":visible")) {
                self.$popover.hide();
            } else {
                // hide the popover if already visible
                self.jobStatus("Waiting for print/export to complete");
                self.showSpinner(true);
                self.thumbnail(false);
                self.$popover.show().draggable().position({
                    "my": "right top",
                    "at": "left middle",
                    "of": self.$button,
                    offset: "-200px"
                });
            }
		};

		// print server is enabled, don't show button without it
		self.enabled = ko.observable(false);

		self.jobStatus = ko.observable();
		self.showSpinner = ko.observable();

		// job options
		self.format = ko.observable(".pdf");
		self.paperSize = ko.observable("letter");

		// final dimensions of image in pixels
		self.shotHeight = ko.observable();
		self.shotWidth = ko.observable();

		// read or write shot height/width in pixels or inches

		// dpi settings for phantomjs
		self.dpiWidth = 101.981;
        self.dpiHeight = 110.007;

		// working dimensions of map for rendering purposes
		self.mapHeight = ko.observable();
		self.mapWidth = ko.observable();

		// output options
		self.showLegend = ko.observable();
		self.borderLess = ko.observable(false);
		self.title = ko.observable();

		// job results
		self.download = ko.observable();
		self.thumbnail = ko.observable(false);

		// warn if baselayer is google
		self.isGoogle = ko.observable(false);
		self.units = ko.observable("inches");

		self.shotHeightDisplay = ko.computed({
			read: function () {
				var value = self.shotHeight();

				if (self.units() === 'inches') {
					value = value / self.dpiHeight;
				} else {
					value = parseInt(value, 10);
				}
				return value;
			},
			write: function (value) {
				if (self.units() === 'inches') {
					value = value * self.dpiHeight;
				}
				self.shotHeight(value);
			}
		});
		self.shotWidthDisplay = ko.computed({
			read: function () {
				var value = self.shotWidth();

				if (self.units() === 'inches') {
					value = value / self.dpiWidth;
				} else {
					value = parseInt(value, 10);
				}
				return value;
			},
			write: function (value) {
				if (self.units() === 'inches') {
					value = value * self.dpiWidth;
				}
				self.shotWidth(value);
			}
		});

		// legend checkbox shows/hides real legend
		// update positon of popover
		self.showLegend.subscribe(function (newValue) {
			app.viewModel.showLegend(newValue);
		});

		self.units.subscribe(function (units) {
			var steps = units === 'inches' ? 0.1 : 1;
			// save the old value and adjust the steps
			$('.ui-spinner-input').each(function (i, input) {
				var $input = $(input), val = $input.val();
				// console.log(val);
				$input.spinner('option', { 'step': steps});
				$input.val(val);
			});
		});

		// lock aspect ratio with these subscriptions
		self.shotHeight.subscribe(function (newVal) {
			var width = newVal / self.ratio;
			if ($.isNumeric(width) && width !== self.shotWidth()) {
				self.shotWidth(width);
			}
		});
		self.shotWidth.subscribe(function (newVal) {
			var height = newVal * self.ratio;
			if ($.isNumeric(height) && height !== self.shotHeight()) {
				self.shotHeight(height);
			}
		});

		// borderless turned on will disable title and legend
		self.borderLess.subscribe(function (newVal) {
			if (newVal === true) {
				self.showLegend(false);
				self.oldTitle = self.title();
				self.title(null);
			} else {
				if (self.oldTitle) {
					self.title(self.oldTitle);
				}
			}
		});

		// print button in result dialog
		self.print = function () {
			var w = window.open(self.download());
			setTimeout(function () {
				w.print();
				w.close();
			}, 500);

		};

		self.downloadFile = function (self,event) {
			var $modal = $(event.target).closest('.modal');
			$modal.modal('hide');
			window.open(self.download());
		};

		// handle export button in print popover
		self.sendJob = function (self, event) {
			var mapHeight, mapWidth;
			event.preventDefault();
			self.$popover.hide();
			$("#print-modal").modal('show');

			if (self.borderLess()) {
				mapHeight = $('#map-panel').height() - 2;
				mapWidth = $("#map-panel").width() + 10;
			} else {
				mapHeight = self.mapHeight();
				mapWidth = self.mapWidth();
			}

			socket.emit('shot', {
				hash: window.location.hash,

				// size of the screen to start rendering
				screenHeight: $(document).height(),
				screenWidth: $(document).width(),

				// finished image size
				shotHeight: self.shotHeight(),
				shotWidth: self.shotWidth(),

				// actual dimensions of the map at this screenHeight/screenWidth
				mapHeight: mapHeight,
				mapWidth: mapWidth,

				// other options
				title: self.title(),
				format: self.format(),
				borderless: self.borderLess(),
				// pass on the useragent
				userAgent: navigator.userAgent,
				// papersize for pdf
				paperSize: self.paperSize(),
				// extent pixel size in meters for world file
				extent:  app.map.getExtent().toArray(),
				pixelSize: app.map.getGeodesicPixelSize().w * 1000,
				session: app.session  || null

			}, function (data) {
				self.jobStatus("Job is Complete");
				self.showSpinner(false);
				self.thumbnail(data.thumb);
				self.download(data.download);
			});
		};

		// handle cancel is popover
		self.cancel = function () {
			self.$popover.hide();
		};

		// make sure we have a socket
		if (typeof io !== 'undefined') {
			socket = io.connect(socketUrl);
			self.enabled(true);
		} else {
			self.enabled(false);
		}

	}
	var shots = {
		$popover: $("#printing-popover")
	};
	app.viewModel.printing = new printModel(app.map, app.viewModel);

	$(document).on('map-ready', function () {
		app.map.events.register('changebaselayer', null, function (event) {
			// console.log('base layer changed');
			app.viewModel.printing.isGoogle(/Google/.test(event.layer.name));
		});

	});
})();


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

<TITLE>
solidbase
</TITLE>

<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">

solidbase

Classes

Console

Main

Progress

Version


text:
package org.araqne.logdb.query.expr;

import java.util.List;

import org.araqne.logdb.QueryContext;
import org.araqne.logdb.Row;

public class Log extends FunctionExpression {
	private Expression valueExpr;

	public Log(QueryContext ctx, List<Expression> exprs) {
		super("log", exprs, 1);
		this.valueExpr = exprs.get(0);
	}

	@Override
	public Object eval(Row row) {
		Object value = valueExpr.eval(row);
		if (value == null)
			return null;

		if (value instanceof Number)
			return Math.log(((Number) value).doubleValue());
		else
			return null;
	}

}


text:
{% block jumbotron %}

{% endblock %}


text:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

const path_1 = require("path");
const ts = require("typescript");
const utils_1 = require("../utils");
// Check if a ts.Symbol is an alias.
const isAlias = (symbol) => symbol.flags & ts.SymbolFlags.Alias;
/**
 * Given this original source code:
 *
 * import { NgModule } from '@angular/core';
 * import { Routes, RouterModule } from '@angular/router';
 *
 * const routes: Routes = [{
 *   path: 'lazy',
 *   loadChildren: () => import('./lazy/lazy.module').then(m => m.LazyModule).
 * }];
 *
 * @NgModule({
 *   imports: [RouterModule.forRoot(routes)],
 *   exports: [RouterModule]
 * })
 * export class AppRoutingModule { }
 *
 * NGC (View Engine) will process it into:
 *
 * import { Routes } from '@angular/router';
 * const ɵ0 = () => import('./lazy/lazy.module').then(m => m.LazyModule);
 * const routes: Routes = [{
 *         path: 'lazy',
 *         loadChildren: ɵ0
 *     }];
 * export class AppRoutingModule {
 * }
 * export { ɵ0 };
 *
 * The importFactory transformation will only see the AST after it is process by NGC.
 * You can confirm this with the code below:
 *
 * const res = ts.createPrinter().printNode(ts.EmitHint.Unspecified, sourceFile, sourceFile);
 * console.log(`### Original source: \n${sourceFile.text}\n###`);
 * console.log(`### Current source: \n${currentText}\n###`);
 *
 * At this point it doesn't yet matter what the target (ES5/ES2015/etc) is, so the original
 * constructs, like `class` and arrow functions, still remain.
 *
 */
function importFactory(warningCb, getTypeChecker) {
    return (context) => {
        // TODO(filipesilva): change the link to https://angular.io/guide/ivy once it is out.
        return (sourceFile) => {
            const warning = `
Found 'loadChildren' with a non-string syntax in ${sourceFile.fileName} but could not transform it.
Make sure it matches the format below:

loadChildren: () => import('IMPORT_STRING').then(M => M.EXPORT_NAME)

Please note that only IMPORT_STRING, M, and EXPORT_NAME can be replaced in this format.

Visit https://v8.angular.io/guide/ivy for more information on using Ivy.
`;
            const emitWarning = () => warningCb(warning);
            const visitVariableStatement = (node) => {
                if (ts.isVariableDeclaration(node)) {
                    return replaceImport(node, context, emitWarning, sourceFile.fileName, getTypeChecker());
                }
                return ts.visitEachChild(node, visitVariableStatement, context);
            };
            const visitToplevelNodes = (node) => {
                // We only care about finding variable declarations, which are found in this structure:
                // VariableStatement -> VariableDeclarationList -> VariableDeclaration
                if (ts.isVariableStatement(node)) {
                    return ts.visitEachChild(node, visitVariableStatement, context);
                }
                // There's no point in recursing into anything but variable statements, so return the node.
                return node;
            };
            return ts.visitEachChild(sourceFile, visitToplevelNodes, context);
        };
    };
}
exports.importFactory = importFactory;
function replaceImport(node, context, emitWarning, fileName, typeChecker) {
    // This ONLY matches the original source code format below:
    // loadChildren: () => import('IMPORT_STRING').then(M => M.EXPORT_NAME)
    // And expects that source code to be transformed by NGC (see comment for importFactory).
    // It will not match nor alter variations, for instance:
    // - not using arrow functions
    // - using `await` instead of `then`
    // - using a default export (https://github.com/angular/angular/issues/11402)
    // The only parts that can change are the ones in caps: IMPORT_STRING, M and EXPORT_NAME.
    // Exit early if the structure is not what we expect.
    // ɵ0 = something
    const name = node.name;
    if (!(ts.isIdentifier(name)
        && /ɵ\d+/.test(name.text))) {
        return node;
    }
    const initializer = node.initializer;
    if (initializer === undefined) {
        return node;
    }
    // ɵ0 = () => something
    if (!(ts.isArrowFunction(initializer)
        && initializer.parameters.length === 0)) {
        return node;
    }
    // ɵ0 = () => something.then(something)
    const topArrowFnBody = initializer.body;
    if (!ts.isCallExpression(topArrowFnBody)) {
        return node;
    }
    const topArrowFnBodyExpr = topArrowFnBody.expression;
    if (!(ts.isPropertyAccessExpression(topArrowFnBodyExpr)
        && ts.isIdentifier(topArrowFnBodyExpr.name))) {
        return node;
    }
    if (topArrowFnBodyExpr.name.text != 'then') {
        return node;
    }
    // ɵ0 = () => import('IMPORT_STRING').then(something)
    const importCall = topArrowFnBodyExpr.expression;
    if (!(ts.isCallExpression(importCall)
        && importCall.expression.kind === ts.SyntaxKind.ImportKeyword
        && importCall.arguments.length === 1
        && ts.isStringLiteral(importCall.arguments[0]))) {
        return node;
    }
    // Now that we know it's both `ɵ0` (generated by NGC) and a `import()`, start emitting a warning
    // if the structure isn't as expected to help users identify unusable syntax.
    const warnAndBail = () => {
        emitWarning();
        return node;
    };
    // ɵ0 = () => import('IMPORT_STRING').then(m => m.EXPORT_NAME)
    if (!(topArrowFnBody.arguments.length === 1
        && ts.isArrowFunction(topArrowFnBody.arguments[0]))) {
        return warnAndBail();
    }
    const thenArrowFn = topArrowFnBody.arguments[0];
    if (!(thenArrowFn.parameters.length === 1
        && ts.isPropertyAccessExpression(thenArrowFn.body)
        && ts.isIdentifier(thenArrowFn.body.name))) {
        return warnAndBail();
    }
    // At this point we know what are the nodes we need to replace.
    const exportNameId = thenArrowFn.body.name;
    const importStringLit = importCall.arguments[0];
    // Try to resolve the import. It might be a reexport from somewhere and the ngfactory will only
    // be present next to the original module.
    let exportedSymbol = typeChecker.getSymbolAtLocation(exportNameId);
    if (!exportedSymbol) {
        return warnAndBail();
    }
    // Named exports are also a declaration in the re-exporting module so we have to follow the
    // re-exports to find the original symbol.
    if (isAlias(exportedSymbol)) {
        exportedSymbol = typeChecker.getAliasedSymbol(exportedSymbol);
        if (!exportedSymbol) {
            return warnAndBail();
        }
    }
    // Find declarations of the original symbol so we can get their source file name.
    const exportedSymbolDecl = exportedSymbol.getDeclarations();
    if (!exportedSymbolDecl || exportedSymbolDecl.length === 0) {
        return warnAndBail();
    }
    // Let's guess the first declaration is the one we want, because we don't have a better criteria.
    // Get the relative path from the containing module to the imported module.
    const relativePath = path_1.relative(path_1.dirname(fileName), exportedSymbolDecl[0].getSourceFile().fileName);
    // node's `relative` call doesn't actually add `./` so we add it here.
    // Also replace the 'ts' extension with just 'ngfactory'.
    const newImportString = `./${utils_1.forwardSlashPath(relativePath)}`.replace(/ts$/, 'ngfactory');
    // The easiest way to alter them is with a simple visitor.
    const replacementVisitor = (node) => {
        if (node === importStringLit) {
            // Transform the import string.
            return ts.createStringLiteral(newImportString);
        }
        else if (node === exportNameId) {
            // Transform the export name.
            return ts.createIdentifier(exportNameId.text + 'NgFactory');
        }
        return ts.visitEachChild(node, replacementVisitor, context);
    };
    return ts.visitEachChild(node, replacementVisitor, context);
}


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>PatternElement (Neo4j Community 2.0.0 API)</title>
<meta name="date" content="2013-12-08">
<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

Neo4j Community

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.neo4j.graphmatching

Class PatternElement

java.lang.Object

org.neo4j.graphmatching.PatternElement

Deprecated.

@Deprecated
public class PatternElement
extends Object

Represents a part of a match. It holds the matching Node, its
 corresponsing PatternNode in the client-supplied pattern as well
 as the last Relationship and PatternRelationship to get
 there.

Method Summary

Methods

Modifier and Type
Method and Description

boolean
equals(Object o)

Deprecated.

PatternRelationship
getFromPatternRelationship()

Deprecated.

Returns the PatternRelationship corresponding to the matching
 Relationship.

Relationship
getFromRelationship()

Deprecated.

Returns the Relationship traversed to get to the Node
 returned from getNode().

Node
getNode()

Deprecated.

Returns the matching Node which is just one part of the whole
 match.

PatternNode
getPatternNode()

Deprecated.

Returns the PatternNode corresponding to the matching
 Node.

int
hashCode()

Deprecated.

String
toString()

Deprecated.

Methods inherited from class java.lang.Object

getClass, notify, notifyAll, wait, wait, wait

Method Detail

getPatternNode

public PatternNode getPatternNode()

Deprecated.

Returns the PatternNode corresponding to the matching
 Node.

Returns:

the PatternNode corresponsing to matching Node.

getNode

public Node getNode()

Deprecated.

Returns the matching Node which is just one part of the whole
 match.

Returns:

the matching Node which is just one part of the whole
 match.

toString

public String toString()

Deprecated.

Overrides:

toString in class Object

getFromPatternRelationship

public PatternRelationship getFromPatternRelationship()

Deprecated.

Returns the PatternRelationship corresponding to the matching
 Relationship.

Returns:

the PatternRelationship corresponsing to matching
 Relationship.

getFromRelationship

public Relationship getFromRelationship()

Deprecated.

Returns the Relationship traversed to get to the Node
 returned from getNode().

Returns:

the Relationship traversed to get to this node.

hashCode

public int hashCode()

Deprecated.

Overrides:

hashCode in class Object

equals

public boolean equals(Object o)

Deprecated.

Overrides:

equals in class Object

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Neo4j Community

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright © 2002–2013 The Neo4j Graph Database Project. All rights reserved.