text:
<html>
<head>
	<title>Polling</title>
	<link rel="stylesheet" type="text/css" href="/styles/main.css">
	<link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
</head>
<body>
	<div id="container" class="container-fluid">
	</div>

	<script type="text/javascript" src="bundle.js"></script>
</body>
</html>

redpajama_set_name: RedPajamaGithub


text:
struct Config {

	char *basedir;
	char *outputFile;
	int flag_fileonly;
	int flag_errmsg;
};
typedef struct Config Config;

Config *setup(char *outputFile, char *inputFile);
char*  prepareFilename(char* filename);
int    validateInputs(char *inputFile, char *outputFile, Config *config);
int    run_indexer(char *outputFile, char *inputFile);

//void dirTraverser(Config *config);
void dirTraverser(PathStack*, Config*);
void fileParser(PathStack *path, Config *config);

void endOfJerb(Config *config);


text:
function Display() {
    that = this;

    this.build = function() {
        window.addEventListener('tick', function(e){
            var time = e.detail;
            that.writeTime(time);
        });
    };

    this.writeTime = function(time) {
        var counter = document.querySelector('#counter');
        time = that.formatTime(time);
        if (time.hours !== '00')
        {
            counter.innerHTML = time.hours + ':' + time.minutes + ':' + time.seconds;
        } else {
            counter.innerHTML = time.minutes + ':' + time.seconds;
        }
    };

    this.formatTime = function(remaining) {
        var seconds = remaining % 60;
        var minutes = Math.floor(remaining % 3600 / 60);
        var hours = Math.floor(remaining / 3600);
        var result = {'hours': hours, 'minutes': minutes, 'seconds': seconds};

        for(var k in result)
        {
            result[k] = parseInt(result[k]);
        }
        for(var key in result)
        {
            if(result[key] < 10 || result[key].length < 2)
            {
                result[key] = '0' + result[key];
            }
        }
        return result;
    };
}


text:
"use strict";
/*jshint eqnull:true */
/*jshint globalstrict:true */
/*jshint node:true */
var Path = require('path');
var winOS = Path.sep==='\\';
var Promises = require('best-promise');

var mysqlPromise = require('./mysql-promise.js');

var params = {
  host       : 'localhost',
  user       : 'node',
  password   : 'edon',
  database   : 'nodepru'
};
if(! winOS) {
    params['socketPath']= '/var/run/mysql/mysql.sock';
}

var done;

var cli;
Promises.start().then(function(){
    return mysqlPromise.connect(params, done);
}).then(function(client){
    console.log("client", client);
    return client.connect();
}).then(function(c) {
    cli = c;
    console.log("cli", cli);
    cli.easy = true;
    return cli.query('SELECT * FROM t1');
}).then(function(q) {
    return q.execute();
}).then(function(res) {
   console.log(res);
    cli.end();
}).catch(function(err){
    console.log("err", err);
    console.log("err.stack", err.stack);
    console.log('Check your MySQL instalation. Then be sure to create the user and db with:');
    console.log("create user test_user password 'test_pass';");
    console.log("create database test_db owner test_user;");
    cli.end();
});


text:
/* @flow */

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { EditorState, convertToRaw, ContentState, Modifier } from 'draft-js';
import draftToHtml from 'draftjs-to-html';
import htmlToDraft from 'html-to-draftjs';
import { Editor } from 'react-draft-wysiwyg';
import Codemirror from 'react-codemirror';
import sampleEditorContent from '../../../util/sampleEditorContent';

const Installation = () => (

Using editor component

Package can be installed from node package manager using npm or yarn commands.

    <Codemirror
      value={
        'npm install -S react-draft-wysiwyg\n' +
        'yarn add react-draft-wysiwyg'
      }
      options={{
        lineNumbers: true,
        readOnly: true,
      }}
    />

Peer dependencies and the required versions.

draft-js: 0.10.x

immutable: 3.x, 4.x

react: 0.13.x, 0.14.x, ^15.0.0-0, 15.x.x

react-dom: 0.13.x, 0.14.x, ^15.0.0-0, 15.x.x

);

export default Installation;


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

	<parent>
		<groupId>com.lundgbg</groupId>
		<artifactId>skrofs-parent</artifactId>
		<version>0.9</version>
	</parent>

	<artifactId>skrofs-integration-tests</artifactId>
	<packaging>jar</packaging>

	<dependencies>
		<!-- Test -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.jayway.restassured</groupId>
			<artifactId>rest-assured</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<version>1.1.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.unitils</groupId>
			<artifactId>unitils-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.lundgbg</groupId>
			<artifactId>skrofs-application</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
		</plugins>
	</build>

</project>


text:
namespace FbTk {
class FbWindow;

/// creates round corners on windows
class Shape {
public:
    enum ShapePlace {
        NONE = 0,
        BOTTOMRIGHT = 0x01,
        TOPRIGHT = 0x02,
        BOTTOMLEFT = 0x04,
        TOPLEFT = 0x08
    };

    Shape(FbWindow &win, int shapeplaces);
    ~Shape();
    /// set new shape places
    void setPlaces(int shapeplaces);
    /// update our shape
    void update();
    /// assign a new window
    void setWindow(FbWindow &win);
    /// Assign a window to merge our shape with.
    /// (note that this is currently specific to frames)
    void setShapeSource(FbWindow *win, int xoff, int yoff, bool always_update);
    void setShapeOffsets(int xoff, int yoff);
    unsigned int width() const;
    unsigned int height() const;
    unsigned int clipWidth() const;
    unsigned int clipHeight() const;
    // sets shape notify mask
    static void setShapeNotify(const FbWindow &win);
    /// @return true if window has shape
    static bool isShaped(const FbWindow &win);
private:
    FbWindow *m_win; ///< window to be shaped
    FbWindow *m_shapesource; ///< window to pull shape from
    int m_shapesource_xoff, m_shapesource_yoff;

    void initCorners(int screen_num);

    int m_shapeplaces; ///< places to shape
};

} // end namespace FbTk

#endif // SHAPE_HH


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Malus dasyphylla Borkh.

### Remarks
null


text:
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web

import pymongo

from tornado.options import define, options
define("port", default=8000, help="run on the given port", type=int)

# put your mongodb username and password
# "mongodb://username:password@staff.mongohq.com:someport/mongodb_name"
# following is obtained from https://app.mongohq.com/username/mongo/mongodbname/admin
MONGOHQ_URL = "mongodb://avi:test@paulo.mongohq.com:10065/testme"

class Application(tornado.web.Application):
	def __init__(self):
		handlers = [(r"/(\w+)", WordHandler)]
		# conn = pymongo.Connection("localhost", 27017)
		# self.db = conn["definitions"]
		conn = pymongo.Connection(MONGOHQ_URL)
		self.db = conn.testme
		tornado.web.Application.__init__(self, handlers, debug=True)

class WordHandler(tornado.web.RequestHandler):
	def get(self, word):
		coll = self.application.db.words
		word_doc = coll.find_one({"word": word})
		if word_doc:
			del word_doc["_id"]
			self.write(word_doc)
		else:
			self.set_status(404)
	def post(self, word):
		definition = self.get_argument("definition")
		coll = self.application.db.words
		word_doc = coll.find_one({"word": word})
		if word_doc:
			word_doc['definition'] = definition
			coll.save(word_doc)
		else:
			word_doc = {'word': word, 'definition': definition}
			coll.insert(word_doc)
		del word_doc["_id"]
		self.write(word_doc)

def main():
	tornado.options.parse_command_line()
	http_server = tornado.httpserver.HTTPServer(Application())
	http_server.listen(options.port)
	tornado.ioloop.IOLoop.instance().start()

if __name__ == "__main__":
	main()


text:
package co.kuntz.sqliteEngine.core;

import httpserver.*;
import com.google.gson.Gson;
import java.net.URLDecoder;

/**
 * A RemoteDataMapperServer is a relatively simple HTTP server which can have
 * requests made of it to use a {@link DataMapper}. With a RemoteDataMapperServer
 * running on a separate machine, one can use a {@link RemoteDataMapper} to
 * access use it's data store.
 */
public class RemoteDataMapperServer extends HttpServer {
    public static final int DEFAULT_PORT = 8081;
    public static final String DEFAULT_NAME = "remote.db";

    private LocalDataMapper dataMapper;
    private Gson gson = new Gson();

    public RemoteDataMapperServer() {
        this(DEFAULT_NAME, DEFAULT_PORT);
    }

    public RemoteDataMapperServer(String name) {
        this(name, DEFAULT_PORT);
    }

    public RemoteDataMapperServer(String name, int port) {
        super(port, "Remote Data Mapper Server", "0.0.1", "");

        dataMapper = new LocalDataMapper(name);

        get(new Route("/get") {
            @Override public void handle(HttpRequest request, HttpResponse response) {
                try {
                    String rawName = URLDecoder.decode(request.getParam("object"), "UTF-8");
                    String itemName = gson.fromJson(rawName, String.class);
                    String item = dataMapper.getString(itemName);
                    if (item == null) {
                        item = "null";
                    }
                    response.setBody(item);
                } catch (Throwable t) {
                    throw new RuntimeException(t);
                }
            }
        });

        post(new Route("/put") {
            @Override public void handle(HttpRequest request, HttpResponse response) {
                try {
                    String rawPair = URLDecoder.decode(request.getParam("object"), "UTF-8");
                    RemoteDataMapper.Pair pair = gson.fromJson(rawPair, RemoteDataMapper.Pair.class);
                    boolean added = dataMapper.putRaw(pair.key, pair.value);

                    response.setBody(gson.toJson(added));
                } catch (Throwable t) {
                    throw new RuntimeException(t);
                }
            }
        });

        delete(new Route("/delete") {
            @Override public void handle(HttpRequest request, HttpResponse response) {
                try {
                    String rawName = URLDecoder.decode(request.getParam("object"), "UTF-8");
                    String itemName = gson.fromJson(rawName, String.class);
                    boolean deleted = dataMapper.delete(itemName);
                    response.setBody(gson.toJson(deleted));
                } catch (Throwable t) {
                    throw new RuntimeException(t);
                }
            }
        });

        get(new Route("/getall") {
            @Override public void handle(HttpRequest request, HttpResponse response) {
                response.setBody(gson.toJson(dataMapper.getAll()));
            }
        });

        get(new Route("/startsWith") {
            @Override public void handle(HttpRequest request, HttpResponse response) {
                try {
                    String obj = URLDecoder.decode(request.getParam("object"), "UTF-8");
                    String prefix = gson.fromJson(obj, String.class);

                    response.setBody(gson.toJson(dataMapper.startsWithRaw(prefix)));
                } catch (Throwable t) {
                    throw new RuntimeException(t);
                }
            }
        });
    }
}


text:
# Parameters
param([String]$Path=".\")

# Initialize
#Set-ExecutionPolicy Unrestricted -Scope Process -Force
[String]$ThisScript = $MyInvocation.MyCommand.Path
[String]$ThisDir = Split-Path $ThisScript
Set-Location $ThisDir # Ensure our location is correct, so we can use relative paths

# Initialize
$Path=$Path.Replace("`"","")

# Relay parameter to output
Write-Output "Path: $Path"

# Add override to allow partial class extension of the EF generated files
$configFiles=get-childitem -Path "$Path\*.cs"
foreach ($file in $configFiles)
{
	(Get-Content $file.PSPath) |
	Foreach-Object {$_-replace "public System.Guid Id", "public override System.Guid Id" `
		-replace "public int Id", "public override int Id" `
		-replace "public System.Guid Key", "public override System.Guid Key" `
		-replace "public byte", "public override byte" `
		-replace "public int RecordStatus", "public override System.Guid RecordStatus" `
		-replace "public int ActivityContextID { get; set; }", "public override int ActivityContextID { get; set; }" `
		-replace "public System.DateTime CreatedDate { get; set; }", "public override System.DateTime CreatedDate { get; set; }" `
		-replace "public System.DateTime ModifiedDate { get; set; }", "public override System.DateTime ModifiedDate { get; set; }"
	} |
	Set-Content $file.PSPath
}