Examples of Paste


Examples of it.unimi.dsi.mg4j.tool.Paste

    indexTitle = DiskBasedIndex.getInstance( titleBasename + "-text", true, true );
    indexFBody = DiskBasedIndex.getInstance( bodyFBasename + "-text", true, true );
    indexFTitle = DiskBasedIndex.getInstance( titleFBasename + "-text", true, true );
    indexBodyBis = DiskBasedIndex.getInstance( bodyBasenameBis + "-text", true, true );

    new Paste( basenameFComb, new String[] { bodyFBasename + "-text", titleFBasename + "-text" }, true, true, 1024, null, 1024, CompressionFlags.DEFAULT_STANDARD_INDEX, true, false, -1, -1, -1, 10 ).run();
    immutableExternalPrefixMap = new ImmutableExternalPrefixMap( new FileLinesCollection( basenameFComb + ".terms", "UTF-8" ) );
    simpleParser = new SimpleParser( index0.termProcessor );
  }
View Full Code Here

Examples of models.Paste

            final String actualLang = Languages.forRequestParameter(lang);
            final String sha1 = Hash.of(body, actualLang);

            Logger.debug("Got some code, sha1 is " + sha1);

            final Paste paste = Paste.findByHash(sha1);
            if (paste != null)
            {
                Logger.info("Found id " + paste.key + " for code with sha1 " + sha1);
                return ok(pastebinMacro.render(paste.key, body));
            }

            Logger.debug("Need to generate an id for code with sha1 " + sha1);

            return Api.post(body, actualLang, new Api.Call<Result>()
            {
                public Result call(String url, ImmutableMap<String, String> parameters)
                {
                    return async(WsUtils.post(url, parameters)
                            .map(new F.Function<WS.Response, Result>()
                            {
                                public Result apply(WS.Response response) throws Throwable
                                {
                                    final String responseBody = response.getBody();
                                    if (PastebinUrl.isUrl(responseBody))
                                    {
                                        final String pasteId = PastebinUrl.id(responseBody);

                                        final Paste p = new Paste();
                                        p.key = pasteId;
                                        p.hash = sha1;
                                        Paste.create(p);

                                        Logger.info("Created id " + pasteId + " for code with sha1 " + sha1);
View Full Code Here

Examples of palmed.edit.selection.Paste

    /**
     * {@inheritDoc}
     */
    public void paste( final InputStream stream )
    {
        execute( new Paste( selection_, stream ) );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.