text:
tags = set([
	'Connected TV', 'Second Screen', 'Multimedia data analysis', 'Speech to Text', 'Social Networks', 'Smart City Services', 'Geo-localization', 'Geographical Information System', 'Point of Interest', 'Recommendation System', 'Open Data', 'App Development Tool', 'Mobile Services', 'User Interface Generator', 'Document Processing', 'Information Mashup', 'Augmented Reality', 'Gaming', 'Pervasive Gaming', 'User interface', '3D User Interface', 'Animated Characters', 'Game development tool', 'Text to Speech',

	'Geospatial', '3D graphics', '3D', 'Text and Speech', 'POI', 'Smart City', 'Recommendation', 'Social',

	'Mobile', 'Android', 'iOS', 'WebUI', 'Unity', 'XML3D',

	'Open software', 'SaaS service', 'Client side', 'Server side'
])

import logging
import urllib.request

def get_url_status(url):
	if url is None:
		return False
	try:
		r = urllib.request.urlopen(url, timeout=10)
		return r.status == 200
	except urllib.error.HTTPError as e:
		logging.info('Error: %s' % e)
	except Exception as e:
		logging.warning('Error: %s' % e)
	return False

def check_remote_resource(url, msg = None):
	logging.info('Checking remote resource at %s' % url)
	if get_url_status(url):
		return True
	if msg is not None:
		logging.warning(msg)
	return False


text:
package org.apache.solr.update;

import java.io.File;
import java.io.IOException;
import java.util.Vector;

import org.apache.solr.core.PluginInfo;
import org.apache.solr.core.SolrCore;
import org.apache.solr.core.SolrEventListener;
import org.apache.solr.core.SolrInfoMBean;
import org.apache.solr.schema.FieldType;
import org.apache.solr.schema.IndexSchema;
import org.apache.solr.schema.SchemaField;
import org.apache.solr.util.plugin.SolrCoreAware;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * UpdateHandler handles requests to change the index
 * (adds, deletes, commits, optimizes, etc).
 *
 *
 * @since solr 0.9
 */

public abstract class UpdateHandler implements SolrInfoMBean {
  protected final static Logger log = LoggerFactory.getLogger(UpdateHandler.class);

  protected final SolrCore core;
  protected final IndexSchema schema;

  protected final SchemaField idField;
  protected final FieldType idFieldType;

  protected Vector<SolrEventListener> commitCallbacks = new Vector<SolrEventListener>();
  protected Vector<SolrEventListener> softCommitCallbacks = new Vector<SolrEventListener>();
  protected Vector<SolrEventListener> optimizeCallbacks = new Vector<SolrEventListener>();

  protected volatile UpdateLog ulog;

  private void parseEventListeners() {
    final Class<SolrEventListener> clazz = SolrEventListener.class;
    final String label = "Event Listener";
    for (PluginInfo info : core.getSolrConfig().getPluginInfos(SolrEventListener.class.getName())) {
      String event = info.attributes.get("event");
      if ("postCommit".equals(event)) {
        SolrEventListener obj = core.createInitInstance(info,clazz,label,null);
        commitCallbacks.add(obj);
        log.info("added SolrEventListener for postCommit: " + obj);
      } else if ("postOptimize".equals(event)) {
        SolrEventListener obj = core.createInitInstance(info,clazz,label,null);
        optimizeCallbacks.add(obj);
        log.info("added SolrEventListener for postOptimize: " + obj);
      }
    }
  }

  private void initLog(PluginInfo ulogPluginInfo) {
    if (ulogPluginInfo != null && ulogPluginInfo.isEnabled()) {
      ulog = new UpdateLog();
      ulog.init(ulogPluginInfo);
      // ulog = core.createInitInstance(ulogPluginInfo, UpdateLog.class, "update log", "solr.NullUpdateLog");
      ulog.init(this, core);
    }
  }

  // not thread safe - for startup
  private void clearLog(PluginInfo ulogPluginInfo) {
    if (ulogPluginInfo == null) return;
    File tlogDir = UpdateLog.getTlogDir(core, ulogPluginInfo);
    log.info("Clearing tlog files, tlogDir=" + tlogDir);
    if (tlogDir.exists()) {
      String[] files = UpdateLog.getLogList(tlogDir);
      for (String file : files) {
        File f = new File(tlogDir, file);
        boolean s = f.delete();
        if (!s) {
          log.error("Could not remove tlog file:" + f.getAbsolutePath());
          //throw new SolrException(ErrorCode.SERVER_ERROR, "Could not remove tlog file:" + f.getAbsolutePath());
        }
      }
    }
  }

  protected void callPostCommitCallbacks() {
    for (SolrEventListener listener : commitCallbacks) {
      listener.postCommit();
    }
  }

  protected void callPostSoftCommitCallbacks() {
    for (SolrEventListener listener : softCommitCallbacks) {
      listener.postSoftCommit();
    }
  }

  protected void callPostOptimizeCallbacks() {
    for (SolrEventListener listener : optimizeCallbacks) {
      listener.postCommit();
    }
  }

  public UpdateHandler(SolrCore core)  {
    this(core, null);
  }

  public UpdateHandler(SolrCore core, UpdateLog updateLog)  {
    this.core=core;
    schema = core.getSchema();
    idField = schema.getUniqueKeyField();
    idFieldType = idField!=null ? idField.getType() : null;
    parseEventListeners();
    PluginInfo ulogPluginInfo = core.getSolrConfig().getPluginInfo(UpdateLog.class.getName());
    if (!core.isReloaded() && !core.getDirectoryFactory().isPersistent()) {
      clearLog(ulogPluginInfo);
    }
    if (updateLog == null) {
      initLog(ulogPluginInfo);
    } else {
      this.ulog = updateLog;
    }
  }

  /**
   * Called when the Writer should be opened again - eg when replication replaces
   * all of the index files.
   *
   * @param rollback IndexWriter if true else close
   *
   * @throws IOException If there is a low-level I/O error.
   */
  public abstract void newIndexWriter(boolean rollback) throws IOException;

  public abstract SolrCoreState getSolrCoreState();

  public abstract int addDoc(AddUpdateCommand cmd) throws IOException;
  public abstract void delete(DeleteUpdateCommand cmd) throws IOException;
  public abstract void deleteByQuery(DeleteUpdateCommand cmd) throws IOException;
  public abstract int mergeIndexes(MergeIndexesCommand cmd) throws IOException;
  public abstract void commit(CommitUpdateCommand cmd) throws IOException;
  public abstract void rollback(RollbackUpdateCommand cmd) throws IOException;
  public abstract void close() throws IOException;
  public abstract UpdateLog getUpdateLog();

  /**
   * NOTE: this function is not thread safe.  However, it is safe to call within the
   * inform( SolrCore core ) function for SolrCoreAware classes.
   * Outside inform, this could potentially throw a ConcurrentModificationException
   *
   * @see SolrCoreAware
   */
  public void registerCommitCallback( SolrEventListener listener )
  {
    commitCallbacks.add( listener );
  }

  /**
   * NOTE: this function is not thread safe.  However, it is safe to call within the
   * inform( SolrCore core ) function for SolrCoreAware classes.
   * Outside inform, this could potentially throw a ConcurrentModificationException
   *
   * @see SolrCoreAware
   */
  public void registerSoftCommitCallback( SolrEventListener listener )
  {
    softCommitCallbacks.add( listener );
  }

  /**
   * NOTE: this function is not thread safe.  However, it is safe to call within the
   * inform( SolrCore core ) function for SolrCoreAware classes.
   * Outside inform, this could potentially throw a ConcurrentModificationException
   *
   * @see SolrCoreAware
   */
  public void registerOptimizeCallback( SolrEventListener listener )
  {
    optimizeCallbacks.add( listener );
  }

  public abstract void split(SplitIndexCommand cmd) throws IOException;
}

redpajama_set_name: RedPajamaGithub


text:
class Profile;

namespace signin {
class IdentityManager;
}

// Watches profiles for changes in their cached info (e.g. the authenticated
// username changes).
class ProfileInfoWatcher : public ProfileAttributesStorage::Observer {
 public:
  ProfileInfoWatcher(Profile* profile, base::RepeatingClosure callback);

  ProfileInfoWatcher(const ProfileInfoWatcher&) = delete;
  ProfileInfoWatcher& operator=(const ProfileInfoWatcher&) = delete;

  ~ProfileInfoWatcher() override;

  // Gets the authenticated username (e.g. username@gmail.com) for |profile_|.
  std::string GetAuthenticatedUsername() const;

 private:
  // ProfileAttributesStorage::Observer:
  void OnProfileAuthInfoChanged(const base::FilePath& profile_path) override;

  // Gets the IdentityManager for |profile_|.
  signin::IdentityManager* GetIdentityManager() const;

  // Runs |callback_| when a profile changes. No-ops if |GetIdentityManager()|
  // returns nullptr.
  void RunCallback();

  // Weak reference to the profile this class observes.
  const raw_ptr<Profile> profile_;

  // Called when the authenticated username changes.
  base::RepeatingClosure callback_;

  BooleanPrefMember signin_allowed_pref_;
};

#endif  // CHROME_BROWSER_UI_WEBUI_PROFILE_INFO_WATCHER_H_


text:
#import <iWorkImport/TSCH3DLens.h>

// Not exported
@interface TSCH3DPerspectiveLens : TSCH3DLens
{
    float mFOV;
    float mAspect;
}

@property(nonatomic) float aspect; // @synthesize aspect=mAspect;
@property(nonatomic) float fov; // @synthesize fov=mFOV;
- (void)calculateCullingPlanes:(vector_a9ee3a08 *)arg1;
- (id)shiftedByPercentage:(tvec2_84d5962d *)arg1;
- (id)narrowedByNormalizedBounds:(box_80622335 *)arg1;
- (id)asFrustumLens;
- (tmat4x4_3074befe)matrix;
- (struct FrustumRect)frustumRectAtDistance:(float)arg1;
- (struct FrustumRect)frustumRect;
@property(readonly, nonatomic) float height;
@property(readonly, nonatomic) float width;
- (id)matrixDescription;
- (id)description;
- (id)copyWithZone:(struct _NSZone *)arg1;
- (id)init;

@end


text:
namespace perspective_square {
    const std::string module_name("perspective_square");

    const char *vertex_shader_source = R"glsl(
#version 100

attribute vec4 position;
attribute vec4 color;

varying vec4 fragment_color;

uniform float y_rotation_sin;
uniform float y_rotation_cos;
uniform float z_rotation_sin;
uniform float z_rotation_cos;

uniform vec3 offset;
uniform float frustum_scale;
uniform float z_mapping_factor;
uniform float z_mapping_offset;

void main() {
    fragment_color = color;

    mat3 y_rotation = mat3(
        vec3(y_rotation_cos, 0.0, -y_rotation_sin),
        vec3(0.0, 1.0, 0.0),
        vec3(y_rotation_sin, 0.0, y_rotation_cos)
    );

    mat3 z_rotation = mat3(
        vec3(z_rotation_cos, z_rotation_sin, 0.0),
        vec3(-z_rotation_sin, z_rotation_cos, 0.0),
        vec3(0.0, 0.0, 1.0)
    );

    vec4 camera_position = vec4(
        (position.xyz * z_rotation * y_rotation) + offset,
        position.w
    );
    gl_Position = vec4(
        camera_position.xy * frustum_scale,
        (camera_position.z * z_mapping_factor) + z_mapping_offset,
        -camera_position.z
    );
}
)glsl";

    const char *fragment_shader_source = R"glsl(
#version 100

precision mediump float;

varying vec4 fragment_color;

void main() {
   gl_FragColor = fragment_color;
}
)glsl";

    const int vertex_depth = 4;
    const int vertex_count = 4;

    const float y_rotation_period = 5.0f;
    const float z_rotation_period = 1.0f;
    const float y_angular_ratio = M_PI * 2.0f / y_rotation_period;
    const float z_angular_ratio = M_PI * 2.0f / z_rotation_period;

    const float frustum_scale = 1.0f;
    const float z_near = 1.0f;
    const float z_far = 3.0f;
    const float z_mapping_factor = (z_near + z_far) / (z_near - z_far);
    const float z_mapping_offset = (2 * z_near * z_far) / (z_near - z_far);

    float get_rotation_angle(float rotation_period, float angular_ratio) {
        float elapsed_time = SDL_GetTicks() / 1000.0f;
        float elapsed_period = fmodf(elapsed_time, rotation_period);
        return angular_ratio * elapsed_period;
    }

    int run(int argc, char **argv) {
        window main_window;

        std::list<shader> shaders;
        shaders.emplace_back(GL_VERTEX_SHADER, vertex_shader_source);
        shaders.emplace_back(GL_FRAGMENT_SHADER, fragment_shader_source);
        shader_program main_program(shaders);

        std::vector<float> square_vertex_vector {
            0.5f, 0.5f, 0.0f, 1.0f,
            -0.5f, 0.5f, 0.0f, 1.0f,
            -0.5f, -0.5f, 0.0f, 1.0f,
            0.5f, -0.5f, 0.0f, 1.0f,
            1.0f, 0.0f, 0.0f, 1.0f,
            1.0f, 1.0f, 0.0f, 1.0f,
            0.0f, 1.0f, 1.0f, 1.0f,
            0.0f, 0.0f, 1.0f, 1.0f
        };
        vertex_buffer square_vertices(square_vertex_vector);

        main_program.use();
        square_vertices.bind();
        uint32_t position_attrib = main_program.get_attrib_location("position");
        glEnableVertexAttribArray(position_attrib);
        glVertexAttribPointer(position_attrib, vertex_depth, GL_FLOAT, GL_FALSE, 0, 0);
        uint32_t color_attrib = main_program.get_attrib_location("color");
        glEnableVertexAttribArray(color_attrib);
        glVertexAttribPointer(
                color_attrib,
                vertex_depth,
                GL_FLOAT,
                GL_FALSE,
                0,
                (GLvoid*) (sizeof(float) * vertex_depth * vertex_count));

        uint32_t y_rotation_sin_uniform = main_program.get_uniform_location("y_rotation_sin");
        uint32_t y_rotation_cos_uniform = main_program.get_uniform_location("y_rotation_cos");
        uint32_t z_rotation_sin_uniform = main_program.get_uniform_location("z_rotation_sin");
        uint32_t z_rotation_cos_uniform = main_program.get_uniform_location("z_rotation_cos");

        uint32_t offset_uniform = main_program.get_uniform_location("offset");
        uint32_t frustum_scale_uniform = main_program.get_uniform_location("frustum_scale");
        uint32_t z_mapping_factor_uniform = main_program.get_uniform_location("z_mapping_factor");
        uint32_t z_mapping_offset_uniform = main_program.get_uniform_location("z_mapping_offset");

        glUniform3f(offset_uniform, 0.0f, 0.0f, -2.0f);
        glUniform1f(frustum_scale_uniform, frustum_scale);
        glUniform1f(z_mapping_factor_uniform, z_mapping_factor);
        glUniform1f(z_mapping_offset_uniform, z_mapping_offset);

        SDL_Event event;
        bool done = false;
        while (!done) {
            glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
            glClear(GL_COLOR_BUFFER_BIT);

            float y_rotation_angle = get_rotation_angle(y_rotation_period, y_angular_ratio);
            float z_rotation_angle = get_rotation_angle(z_rotation_period, z_angular_ratio);
            glUniform1f(y_rotation_sin_uniform, sinf(y_rotation_angle));
            glUniform1f(y_rotation_cos_uniform, cosf(y_rotation_angle));
            glUniform1f(z_rotation_sin_uniform, sinf(z_rotation_angle));
            glUniform1f(z_rotation_cos_uniform, cosf(z_rotation_angle));

            glDrawArrays(GL_TRIANGLE_FAN, 0, vertex_count);

            main_window.swap();

            while (SDL_PollEvent(&event)) {
                if (event.type == SDL_QUIT) {
                    done = true;
                }
            }
        }

        return 0;
    }
}


text:
import json
import os
from tempfile import mkstemp

from airflow.configuration import conf

def tmp_configuration_copy(chmod=0o600, include_env=True, include_cmds=True):
    """
    Returns a path for a temporary file including a full copy of the configuration
    settings.
    :return: a path to a temporary file
    """
    cfg_dict = conf.as_dict(display_sensitive=True, raw=True)
    temp_fd, cfg_path = mkstemp()

    with os.fdopen(temp_fd, 'w') as temp_file:
        # Set the permissions before we write anything to it.
        if chmod is not None:
            os.fchmod(temp_fd, chmod)
        json.dump(cfg_dict, temp_file)

    return cfg_path


text:
var http = require("http");
var sys = require("sys");

var url = require('url');
var path = require('path');
var querystring = require('querystring');

var FeedGenerator = require('./feedgenerator').FeedGenerator;
var ChangeListener = require('./changelistener').ChangeListener;
var ConnectionPool = require('./connectionpool').ConnectionPool;

var util = require('./util');

var CONSTANTS = require('./constants');

/**
 * Enum for database document typing.
 */
var ENTRY = CONSTANTS.ENTRY;

/**
 * Database names.
 */
var DATABASE = CONSTANTS.DATABASE;

var PAGINATION_SIZE = 10;

var FeedHandler = exports.FeedHandler = function(config, server) {
	this.config = config;

	this.server = server;
	this.fg = new FeedGenerator(config.feedserver.templatepath);

	var connections = {
		'entries' : {
			'table' : "entries",
			'connections' : 1,
			'options' : {
				cache : true,
				raw : false
			}
		}
	};

	this.pool = new ConnectionPool(config.couchdb.host, config.couchdb.port, connections);

};

FeedHandler.prototype.getDocumentPage = function(request, response, cursor) {
	var data = {
		title : this.config.deployment.title,
		website : this.config.deployment.website,
		hub : this.config.feedserver.hub,
		server : this.server.alias,
		serverver : this.server.version,
		id : config.feedserver.uri + "feeds/documents",
		entries : []
	};
	var rowHandler = function(row) {
		data.entries.push( {
			date : row.key[0],
			id : row.value.id,
			category : row.doc.mediatype,
			user : row.doc.owner,
			useruri : config.apiserver.uri + "v1/users/" + row.doc.owner,
			docuri : config.apiserver.uri + "v1/documents/" + row.value.id
		});
	};
	this._sendFeedPage("entries/docsByUploadDate", "feeds/documents.xml", "feeds/documents", response, cursor, data, rowHandler, ENTRY.DOCUMENT.PREFIX);
};

FeedHandler.prototype.getAttachmentPage = function(request, response, cursor) {
	var data = {
		title : this.config.deployment.title,
		website : this.config.deployment.website,
		hub : this.config.feedserver.hub,
		server : this.server.alias,
		serverver : this.server.version,
		id : config.feedserver.uri + "feeds/attachments",
		entries : []
	};
	var rowHandler = function(row) {
		data.entries.push( {
			date : (row.key[0] === null ? "" : row.key[0]),
			id : row.value.id,
			mime : row.doc.mime,
			length : row.doc.size,
			location : row.doc.location,
			user : row.doc.uploader,
			useruri : config.apiserver.uri + "v1/users/" + row.doc.uploader,
			docuri : config.apiserver.uri + "v1/documents/" + row.doc.doc_id + "/attachments/" + row.value.id
		});
	};
	this._sendFeedPage("entries/attachmentsByDate", "feeds/attachments.xml", "feeds/attachments", response, cursor, data, rowHandler, ENTRY.ATTACHMENT.PREFIX);
};

FeedHandler.prototype._sendFeedPage = function(viewName, templateName, uriPath, response, cursor, data, rowHandler, prefix) {
	var that = this;

	var b = new (util.Barrier)((!!cursor ? 2 : 1), function() {
		response.writeHead(200, {
			'Content-Type' : 'application/atom+xml'
		});
		that.fg.renderChunked(templateName, data, function() {
			response.end();
		}, function(chunk) {
			response.write(chunk);
		}, function() {
			response.end();
		});
	}, function() {
		response.writeHead(500);
		response.end();
	});

	var fetchPage = function(cursorkey) {
		var view1Param = {
			descending : true,
			limit : PAGINATION_SIZE + 1,
			include_docs : true
		};
		if (cursor) {
			view1Param['startkey'] = cursorkey;
		}
		that.pool.db('entries').view(viewName, view1Param, function(err, dbRes) {
			if (err) {
				b.abort();
			}
			else {
				var i = 0;
				for (; dbRes.rows && i < PAGINATION_SIZE && i < dbRes.rows.length; i++) {
					var row = dbRes.rows[i];
					rowHandler(row);

				}
				if (dbRes.rows && i == PAGINATION_SIZE && dbRes.rows[i]) {
					data['next'] = config.feedserver.uri + uriPath + "/cursor/" + dbRes.rows[i].id.substr(2);
					data['hasNext'] = true;
				}
				if (dbRes.rows[0]) {
					data.updated = dbRes.rows[0].key[0];
					data.self = config.feedserver.uri + uriPath + "/cursor/" + dbRes.rows[0].value.id;
				}
				b.submit();
			}
		});
	};

	if (cursor) {
		that.pool.db('entries').get(prefix + "-" + cursor, function(err, doc) {
			if (err) {
				if (err == 'not_found') {
					response.writeHead(404);
					response.end();
				}
				else {
					response.writeHead(500);
					response.end();
				}
			}
			else {
				fetchPage( [ doc.uploaded, doc._id ]);

				var view2Param = {
					descending : false,
					startkey : [ doc.uploaded, doc._id ],
					limit : PAGINATION_SIZE + 1
				};
				that.pool.db('entries').view(viewName, view2Param, function(err, dbRes) {
					if (err) {
						b.abort();
					}
					else {
						if (dbRes.rows.length > 1) {
							data['previous'] = config.feedserver.uri + uriPath + "/cursor/" + dbRes.rows[dbRes.rows.length - 1].id.substr(2);
							data['hasPrevious'] = true;
						}
						b.submit();
					}

				});
			}
		});

	}
	else {
		fetchPage();
	}
};

FeedHandler.prototype.getKmlFeed = function(request, response) {
	var data = {
		title : this.config.deployment.title,
		website : this.config.deployment.website,
		hub : this.config.feedserver.hub,
		server : this.server.alias,
		serverver : this.server.version,
		id : config.feedserver.uri + "feeds/attachments",
		entries : []
	};

	var that = this;
	this.pool.db('entries').view("entries/spatialdebug", {}, function(err, dbRes) {
		if (err) {
			response.writeHead(500, {});
			response.end();
		}
		else {
			var pre = {};
			for ( var i = 0; dbRes.rows && i < dbRes.rows.length; i++) {
				var row = dbRes.rows[i];
				if (!pre[row.key[0]]) {
					pre[row.key[0]] = {};
					pre[row.key[0]].id = row.key[0];
					pre[row.key[0]].attachments = [];
				}

				if (row.key[1] === 0) {
					pre[row.key[0]].owner = row.value.owner;
					pre[row.key[0]].mediatype = row.value.mediatype;
					pre[row.key[0]].doc_uploaded = row.value.uploaded;
				}
				else if (row.key[1] === 1) {
					if (row.key[0] === row.key[2]) {
						pre[row.key[0]].location = row.value.location;
					}
				}
				else if (row.key[1] === 2) {
					pre[row.key[0]].lat = row.value[0];
					pre[row.key[0]].lon = row.value[1];

				}
			}
			for ( var key in pre) {
				var entryText = "
Document " + pre[key].id + " (mediatype " + pre[key].mediatype + ") uploaded by " + pre[key].owner + " on " + pre[key].doc_uploaded + ".";
				if (pre[key].mediatype === 'image') {
					entryText = entryText + "
";
				}
				data.entries.push( {
					id : pre[key].id,
					lat : pre[key].lat,
					lon : pre[key].lon,
					text : entryText,
					type : (pre[key].mediatype === 'image' ? 'image' : 'other')
				});
			}
			//

Submitted by	{{id}}

Uploaded 	{{doc_uploaded}}

Owner	{{owner}}

Type	{{mediatype}}

Position	{{lat}} - {{lon}}

			response.writeHead(200, {
				'Content-Type' : 'application/vnd.google-earth.kml+xml',
				'ETag' : Math.random() * 100000
			});

			that.fg.renderChunked("geo/kml.xml", data, function() {
				response.end();
			}, function(chunk) {
				response.write(chunk);
			}, function() {
				response.end();
			});
		}
	});

};

FeedHandler.prototype.startChangeHandler = function() {
	var hubUri = url.parse(this.config.feedserver.hub);
	var feedUri = this.config.feedserver.uri + "feeds/documents";
	var body = querystring.stringify( {
		'hub.mode' : "publish",
		"hub.url" : feedUri
	});

	var client = http.createClient(hubUri.port || 80, hubUri.hostname);

	var changeListener = new ChangeListener("http://" + this.config.couchdb.host + ":" + this.config.couchdb.port + "/" + DATABASE.ENTRIES, {
		feed : "continuous",
		filter : "entries/documentUploaded"
	}, function(obj) {
		var client = http.createClient(hubUri.port || 80, hubUri.hostname);
		var request = client.request('POST', "/", {
			'Host' : hubUri.hostname,
			"Content-Length" : body.length,
			"Content-Type" : "application/x-www-form-urlencoded"
		});
		request.write(body);
		request.end();
		sys.log("sending update to hub!");
		request.on('error', function(err) {
			sys.puts('request error: ' + err);
		});
		client.on('error', function(err) {
			sys.puts('client error: ' + err);
			sys.log(sys.inspect(err));
		});

		// sys.log(sys.inspect(request));
		});
};


text:
TODO
====

- SPEC: Changed name BonoBlade to BladeView
- SPEC: Changed BonoBlade construct arguments to options only


text:
package aceim.app.screen.pano;

import java.util.List;

import aceim.app.MainActivity;
import aceim.app.R;
import aceim.app.view.page.Page;
import aceim.app.widgets.pageselector.PageAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.FrameLayout;

class PanoPageAdapter extends PageAdapter {

	private int mPageWidth;

	public PanoPageAdapter(MainActivity activity, OnClickListener tabClickListener, List<Page> pages) {
		super(activity, tabClickListener, activity.getThemesManager().getViewResources().getTabItemLayout(), pages);
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		Page oldPage = (Page) (convertView != null ? convertView.getTag() : null);

		View view;

		if (convertView != null) {
			view = convertView;
		} else {
			view = LayoutInflater.from(getContext()).inflate(R.layout.screen_pano_item, null);
			View tab = super.getView(position, convertView, parent);
			((FrameLayout)view.findViewById(R.id.indicator)).addView(tab, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
			view.setLayoutParams(new LayoutParams(mPageWidth, LayoutParams.MATCH_PARENT));
		}

		Page page = getItem(position);
		view.setTag(page);

		fillWithImageAndTitle(view, page);

		if (oldPage == null || oldPage != page) {
			FrameLayout container = (FrameLayout) view.findViewWithTag(getContext().getString(android.R.string.untitled));
			container.removeAllViews();
			container.addView(page.onCreateView(LayoutInflater.from(getContext()), null, null));
		}

		return view;
	}

	/**
	 * @return the mPageWidth
	 */
	public int getPageWidth() {
		return mPageWidth;
	}

	/**
	 * @param mPageWidth the mPageWidth to set
	 */
	public void setPageWidth(int mPageWidth) {
		this.mPageWidth = mPageWidth;
	}

}


text:
var util = require("util");
var choreography = require("temboo/core/choreography");

/*
    ListActivity
    Returns a list of activities for the authenticating user.
*/

var ListActivity = function(session) {
    /*
        Create a new instance of the ListActivity Choreo. A TembooSession object, containing a valid
        set of Temboo credentials, must be supplied.
	*/
    var location = "/Library/Zendesk/ActivityStream/ListActivity"
    ListActivity.super_.call(this, session, location);

    /*
    Define a callback that will be used to appropriately format the results of this Choreo.
    */
    var newResultSet = function(resultStream) {
        return new ListActivityResultSet(resultStream);
    }

	/*
	Obtain a new InputSet object, used to specify the input values for an execution of this Choreo.
	*/
    this.newInputSet = function() {
        return new ListActivityInputSet();
    }

	/*
	Execute this Choreo with the specified inputs, calling the specified callback upon success,
	and the specified errorCallback upon error.
	*/
    this.execute = function(inputs, callback, errorCallback) {
        this._execute(inputs, newResultSet, callback, errorCallback);
    }
}

/*
An InputSet with methods appropriate for specifying the inputs to the ListActivity
Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
*/

var ListActivityInputSet = function() {
    ListActivityInputSet.super_.call(this);
        /*
        Set the value of the Email input for this Choreo. ((required, string) The email address you use to login to your Zendesk account.)
        */
        this.set_Email = function(value) {
            this.setInput("Email", value);
        }

        /*
        Set the value of the Password input for this Choreo. ((required, password) Your Zendesk password.)
        */
        this.set_Password = function(value) {
            this.setInput("Password", value);
        }

        /*
        Set the value of the Server input for this Choreo. ((required, string) Your Zendesk domain and subdomain (e.g., temboocare.zendesk.com).)
        */
        this.set_Server = function(value) {
            this.setInput("Server", value);
        }

}

/*
A ResultSet with methods tailored to the values returned by the ListActivity Choreo.
The ResultSet object is used to retrieve the results of a Choreo execution.
*/

var ListActivityResultSet = function(resultStream) {
    ListActivityResultSet.super_.call(this, resultStream);
        /*
        Retrieve the value for the "Response" output from this Choreo execution. ((json) The response from Zendesk.)
        */
        this.get_Response = function() {
            return this.getResult("Response");
        }
}

util.inherits(ListActivity, choreography.Choreography);
util.inherits(ListActivityInputSet, choreography.InputSet);
util.inherits(ListActivityResultSet, choreography.ResultSet);
exports.ListActivity = ListActivity;

/*
    ShowActivity
    Returns detailed information about a particular activity.
*/

var ShowActivity = function(session) {
    /*
        Create a new instance of the ShowActivity Choreo. A TembooSession object, containing a valid
        set of Temboo credentials, must be supplied.
	*/
    var location = "/Library/Zendesk/ActivityStream/ShowActivity"
    ShowActivity.super_.call(this, session, location);

    /*
    Define a callback that will be used to appropriately format the results of this Choreo.
    */
    var newResultSet = function(resultStream) {
        return new ShowActivityResultSet(resultStream);
    }

	/*
	Obtain a new InputSet object, used to specify the input values for an execution of this Choreo.
	*/
    this.newInputSet = function() {
        return new ShowActivityInputSet();
    }

	/*
	Execute this Choreo with the specified inputs, calling the specified callback upon success,
	and the specified errorCallback upon error.
	*/
    this.execute = function(inputs, callback, errorCallback) {
        this._execute(inputs, newResultSet, callback, errorCallback);
    }
}

/*
An InputSet with methods appropriate for specifying the inputs to the ShowActivity
Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
*/

var ShowActivityInputSet = function() {
    ShowActivityInputSet.super_.call(this);
        /*
        Set the value of the Email input for this Choreo. ((required, string) The email address you use to login to your Zendesk account.)
        */
        this.set_Email = function(value) {
            this.setInput("Email", value);
        }

        /*
        Set the value of the ID input for this Choreo. ((required, string) The ID of the activity to retrieve.)
        */
        this.set_ID = function(value) {
            this.setInput("ID", value);
        }

        /*
        Set the value of the Password input for this Choreo. ((required, password) Your Zendesk password.)
        */
        this.set_Password = function(value) {
            this.setInput("Password", value);
        }

        /*
        Set the value of the Server input for this Choreo. ((required, string) Your Zendesk domain and subdomain (e.g., temboocare.zendesk.com).)
        */
        this.set_Server = function(value) {
            this.setInput("Server", value);
        }

}

/*
A ResultSet with methods tailored to the values returned by the ShowActivity Choreo.
The ResultSet object is used to retrieve the results of a Choreo execution.
*/

var ShowActivityResultSet = function(resultStream) {
    ShowActivityResultSet.super_.call(this, resultStream);
        /*
        Retrieve the value for the "Response" output from this Choreo execution. ((json) The response from Zendesk.)
        */
        this.get_Response = function() {
            return this.getResult("Response");
        }
}

util.inherits(ShowActivity, choreography.Choreography);
util.inherits(ShowActivityInputSet, choreography.InputSet);
util.inherits(ShowActivityResultSet, choreography.ResultSet);
exports.ShowActivity = ShowActivity;


text:
import { Flex, Sans, Serif, Spinner } from "@artsy/palette"
import React from "react"
import { graphql } from "react-relay"

import {
  PricingTransparencyQuery,
  PricingTransparencyQueryResponse,
  PricingTransparencyQueryVariables,
} from "v2/__generated__/PricingTransparencyQuery.graphql"
import { SystemContextProps, withSystemContext } from "v2/Artsy"
import { SystemQueryRenderer as QueryRenderer } from "v2/Artsy/Relay/SystemQueryRenderer"

const Text = props => <Serif size="3t" color="black100" {...props} />
const Row = props => (
  <Flex flexDirection="row" justifyContent="space-between" pb={1} {...props} />
)

export const PricingTransparency: React.FC<PricingTransparencyQueryResponse> = props => {
  const { calculatedCost } = props.artwork.saleArtwork

  return (
    <Flex pt={3} flexDirection="column">
      <Serif pb={1} size="4t" weight="semibold" color="black100">
        Summary
      </Serif>

      <Row>
        <Text>Your max bid</Text>
        <Text>{calculatedCost.bidAmount.display}</Text>
      </Row>
      <Row pb={2}>
        <Text>Buyer's Premium</Text>
        <Text>{calculatedCost.buyersPremium.display}</Text>
      </Row>
      <Row>
        <Text>Subtotal</Text>
        <Text>{calculatedCost.subtotal.display}</Text>
      </Row>
      <Sans size="2" color="black60">
        Plus any applicable shipping, taxes, and fees.
      </Sans>
    </Flex>
  )
}

export const PricingTransparencyQueryRenderer = withSystemContext(
  ({
    saleId,
    artworkId,
    bidAmountMinor,
    relayEnvironment,
  }: SystemContextProps & PricingTransparencyQueryVariables) => {
    return (
      <QueryRenderer<PricingTransparencyQuery>
        environment={relayEnvironment}
        query={graphql`
          query PricingTransparencyQuery(
            $saleId: String!
            $artworkId: String!
            $bidAmountMinor: Int!
          ) {
            artwork(id: $artworkId) {
              saleArtwork(saleID: $saleId) {
                calculatedCost(bidAmountMinor: $bidAmountMinor) {
                  bidAmount {
                    display
                  }
                  buyersPremium {
                    display
                  }
                  subtotal {
                    display
                  }
                }
              }
            }
          }
        `}
        variables={{ saleId, artworkId, bidAmountMinor }}
        render={({ props }) => {
          if (props) {
            return <PricingTransparency artwork={props.artwork} />
          } else {
            return (
              <Flex position="relative" height="178px">
                <Spinner />
              </Flex>
            )
          }
        }}
      />
    )
  }
)


text:
package org.apache.jena.examples;

public class ExampleScala_01 {

    public static void main(String[] args) {
        // TODO: Install http://www.scala-ide.org/, it requires: Eclipse Classic 3.6.2 or 3.7
        // HelloJena.main(new String[]{});
    }

}


text:
var _arguments2 = typeof arguments === "undefined" ? void 0 : arguments;

function fn() {
  var _arguments = arguments;

  var foo = function () {
    return _arguments;
  };
}

var bar = function () {
  return _arguments2;
};

var baz = function () {
  return function () {
    return _arguments2;
  };
};


text:
call login('dba') on class db_user;
create class test_class(col1 integer, col2 varchar(10));
create class test_class1(col1 integer, col2 varchar(10));

create user test_user;
grant insert on test_class to test_user;
grant insert on test_class1 to test_user;

call login ('test_user') on class db_user;
insert into test_class values(999, 'nhn');
insert into test_class1 values(888, 'nhnchina');

call login('dba') on class db_user;
select grantor_name, grantee_name,
       class_name, auth_type
from   db_auth
where  grantee_name = 'TEST_USER' order by 3;

drop user test_user;
drop class test_class;
drop class test_class1;
--+ holdcas off;


text:
namespace atom {

// Defined in atom_extensions.cc.
node::node_module_struct* GetBuiltinModule(const char *name, bool is_browser);

namespace {

// Async handle to wake up uv loop.
uv_async_t g_next_tick_uv_handle;

// Async handle to execute the stored v8 callback.
uv_async_t g_callback_uv_handle;

// Stored v8 callback, to be called by the async handler.
base::Closure g_v8_callback;

// Dummy class type that used for crashing the program.
struct DummyClass { bool crash; };

// Async handler to call next process.nextTick callbacks.
void UvCallNextTick(uv_async_t* handle, int status) {
  node::Environment* env = node::Environment::GetCurrent(node_isolate);
  node::Environment::TickInfo* tick_info = env->tick_info();

  if (tick_info->in_tick())
    return;

  if (tick_info->length() == 0) {
    tick_info->set_index(0);
    return;
  }

  tick_info->set_in_tick(true);
  env->tick_callback_function()->Call(env->process_object(), 0, NULL);
  tick_info->set_in_tick(false);
}

// Async handler to execute the stored v8 callback.
void UvOnCallback(uv_async_t* handle, int status) {
  g_v8_callback.Run();
}

// Called when there is a fatal error in V8, we just crash the process here so
// we can get the stack trace.
void FatalErrorCallback(const char* location, const char* message) {
  LOG(ERROR) << "Fatal error in V8: " << location << " " << message;
  static_cast<DummyClass*>(NULL)->crash = true;
}

v8::Handle<v8::Value> DumpStackFrame(v8::Isolate* isolate,
                                     v8::Handle<v8::StackFrame> stack_frame) {
  mate::Dictionary frame_dict(isolate);
  frame_dict.Set("line", stack_frame->GetLineNumber());
  frame_dict.Set("column", stack_frame->GetColumn());
  return mate::ConvertToV8(isolate, frame_dict);;
}

v8::Handle<v8::Value> Binding(v8::Handle<v8::String> module) {
  v8::String::Utf8Value module_v(module);
  node::node_module_struct* modp;

  v8::Local<v8::Object> process = v8::Context::GetCurrent()->Global()->
      Get(v8::String::New("process"))->ToObject();
  DCHECK(!process.IsEmpty());

  // is_browser = process.__atom_type == 'browser'.
  bool is_browser = std::string("browser") == *v8::String::Utf8Value(
      process->Get(v8::String::New("__atom_type")));

  // Cached in process.__atom_binding_cache.
  v8::Local<v8::Object> binding_cache;
  v8::Local<v8::String> bc_name = v8::String::New("__atomBindingCache");
  if (process->Has(bc_name)) {
    binding_cache = process->Get(bc_name)->ToObject();
    DCHECK(!binding_cache.IsEmpty());
  } else {
    binding_cache = v8::Object::New();
    process->Set(bc_name, binding_cache);
  }

  if (binding_cache->Has(module))
    return binding_cache->Get(module)->ToObject();

  if ((modp = GetBuiltinModule(*module_v, is_browser)) != NULL) {
    v8::Local<v8::Object> exports = v8::Object::New();
    // Internal bindings don't have a "module" object,
    // only exports.
    modp->register_func(exports, v8::Undefined());
    binding_cache->Set(module, exports);
    return exports;
  }

  node::ThrowError("No such module");
  return v8::Undefined();
}

void Crash() {
  static_cast<DummyClass*>(NULL)->crash = true;
}

void ActivateUVLoop() {
  uv_async_send(&g_next_tick_uv_handle);
}

void Log(const string16& message) {
  logging::LogMessage("CONSOLE", 0, 0).stream() << message;
}

v8::Handle<v8::Value> GetCurrentStackTrace(v8::Isolate* isolate,
                                           int stack_limit) {
  v8::Local<v8::StackTrace> stack_trace = v8::StackTrace::CurrentStackTrace(
      stack_limit, v8::StackTrace::kDetailed);

  int frame_count = stack_trace->GetFrameCount();
  v8::Local<v8::Array> result = v8::Array::New(frame_count);
  for (int i = 0; i < frame_count; ++i)
    result->Set(i, DumpStackFrame(isolate, stack_trace->GetFrame(i)));

  return result;
}

void ScheduleCallback(const base::Closure& callback) {
  g_v8_callback = callback;
  uv_async_send(&g_callback_uv_handle);
}

}  // namespace

AtomBindings::AtomBindings() {
  uv_async_init(uv_default_loop(), &g_next_tick_uv_handle, UvCallNextTick);
  uv_async_init(uv_default_loop(), &g_callback_uv_handle, UvOnCallback);
  v8::V8::SetFatalErrorHandler(FatalErrorCallback);
}

AtomBindings::~AtomBindings() {
}

void AtomBindings::BindTo(v8::Handle<v8::Object> process) {
  v8::Isolate* isolate = v8::Isolate::GetCurrent();
  mate::Dictionary dict(isolate, process);
  dict.SetMethod("atomBinding", &Binding);
  dict.SetMethod("crash", &Crash);
  dict.SetMethod("activateUvLoop", &ActivateUVLoop);
  dict.SetMethod("log", &Log);
  dict.SetMethod("getCurrentStackTrace", &GetCurrentStackTrace);
  dict.SetMethod("scheduleCallback", &ScheduleCallback);

  v8::Handle<v8::Object> versions;
  if (dict.Get("versions", &versions))
    versions->Set(mate::StringToV8(isolate, "atom-shell"),
                  mate::StringToV8(isolate, ATOM_VERSION_STRING));
}

}  // namespace atom


text:
using System;

namespace Alachisoft.NCache.Caching
{
	/// <summary>
	/// Enumeration that defines the different reasons for item eviction.
	/// </summary>
	[Serializable]
	public enum ItemRemoveReason
	{
	    /// <summary>
		/// The item is removed from the cache because it expired.
		/// </summary>
		Expired,

		/// <summary>
		/// The item is removed from the cache by a Remove method call or by an Insert method call that specified the same key.
		/// </summary>
		Removed,

		/// <summary>
		/// The item is removed from the cache because the system removed it to free memory.
		/// </summary>
		Underused
	}
}


text:
class AnimatedSprite {
    public:
        AnimatedSprite(const std::string &fileName, Graphics &graphics, SDL_Rect startLocation, int fps, int numFrames);
        void update(int deltaInMs, SDL_Rect &updatedLocation);
    protected:
    private:
        SDL_Rect currentLocation, locationInSheet;
        SDL_Texture *texture;
        int elapsedTime;
        int tick;
        int totalFrames;
        int currentFrame;

};

#endif


text:
import { DemoPage } from './app.po';

describe('demo App', function () {
  let page: DemoPage;

  beforeEach(() => {
    page = new DemoPage();
  });

  it('should display message saying ngx-datetime-picker', () => {
    page.navigateTo();
    expect(page.getParagraphText()).toEqual('ngx-datetime-picker');
  });
});


text:
* Error Reporting 0.27.0 release.

### 0.9.0 / 2017-08-25

* Debugger 0.28.0 release.

### 0.8.0 / 2017-08-07

* Debugger 0.27.0 release.
* Trace 0.27.0 release.

### 0.7.0 / 2017-07-11

* Debugger 0.26.0 release.
* Error Reporting 0.26.0 release.
* Logging 1.2.0 release.
* Trace 0.26.0 release.

### 0.6.0 / 2017-05-25

* Debugger 0.25.0 release.
* Error Reporting 0.25.0 release.
* Logging 1.1.0 release.
* Trace 0.25.0 release.
* Remove `google-cloud-monitoring` from this umbrella gem.

### 0.5.0 / 2017-03-31

* Logging 1.0 release
* Updated dependencies on all other gems

### 0.4.1 / 2017-02-27

* Set version constraints on the gem dependencies for individual stackdriver services. Current versions are:
  * **google-cloud-logging** `~> 0.24.0`
  * **google-cloud-error_reporting** `~> 0.23.1`
  * **google-cloud-monitoring** `~> 0.23.0`
  * **google-cloud-trace** `~> 0.23.0`

### 0.4.0 / 2016-12-22

* Now provides Stackdriver Trace instrumentation by including google-cloud-trace.

### 0.3.0 / 2016-11-07

This gem is an umbrella gem that serves as the single drop-in gem for users interested in using the Stackdriver services from their Ruby applications.

The initial release of stackdriver gem includes the following Stackdriver gems to be used in Ruby applications:
* google-cloud-logging
* google-cloud-error_reporting


text:
namespace FluentMigrator.Builders.Create.Table
{
    /// <summary>
    /// Defines the column type
    /// </summary>
    public interface ICreateTableColumnAsTypeSyntax : IColumnTypeSyntax<ICreateTableColumnOptionOrWithColumnSyntax>
    {
    }
}


text:
"use strict";
var nodestrum = require("nodestrum");
nodestrum.register_process_catcher();

var formage = require('../../lib/index');
var Schema = require("jugglingdb").Schema;
var schema = new Schema("mssql", {host: "(LocalDB)\\v11.0", database: "maskar"});

schema.on("connected", function () {

        var AppliesTo = schema.define("AppliesTo", {
            AppliesToID: {
                type: Number,
                primaryKey: true
            },
            Title: {
                type: String,
                limit: 100
            },
            Identifier: {
                type: String,
                limit: 100
            },
            Editable: {
                type: Number
            }
        });

        //schema.automigrate();

        var express = require('express'),
            http = require('http'),
            path = require('path'),
            app = express();
        app.use(express.bodyParser());

        try {
            var admin = formage.init(app, express, {AppliesTo: AppliesTo}, {
                title: 'Formage Example',
                default_section: 'Main',
                admin_users_gui: true
            });
        } catch (e) {
            console.log(e.stack);
        }

        http.createServer(app).listen(80, function () {
            console.log('Express server listening on port ' + 80);
        });

        exports.app = app;

    }
)
;


text:
namespace MATH
{
    class cRectf
    {
    public:
        cRectf() : m_Topleft(), m_Dim() {}
        cRectf(float left, float top, float width, float height)
        : m_Topleft(Vec2f(left, top)), m_Dim(Vec2f(width, height)) {}

        //copy ctor
        inline cRectf(const cRectf& r) : m_Topleft(r.Left(), r.Top()), m_Dim(r.Width(), r.Height()) {}

        inline const float Left() const { return m_Topleft.x; }
        inline const float Right() const { return (m_Topleft.x+m_Dim.x); }
        inline const float Bottom() const { return m_Topleft.y+m_Dim.y; }
        inline const float Top() const { return m_Topleft.y; }
        inline const float Width() const { return m_Dim.x; }
        inline const float Height() const { return m_Dim.y; }

        inline void SetTop(float y) { m_Topleft.y = y; }
        inline void SetLeft(float x) { m_Topleft.x = x; }
        inline void SetWidth(float w) { m_Dim.x = w; }
        inline void SetHeight(float h) { m_Dim.y = h; }

        inline bool IsCollidedRect(const cRectf& rect)
        {
            return (!((Right()<rect.Left())
                  ||(Left()>rect.Right())
                  ||(Top()>rect.Bottom())
                  ||(Bottom()<rect.Top())));
        }
        static cRectf GetShiftedRect(const cRectf& r, const Vec2f& v)
        {
            return cRectf(v.x+r.Left(), v.y+r.Top(), r.Width(), r.Height());
        }

    private:
        Vec2f m_Topleft, m_Dim;
    };

}

#endif // PRIMITIVES_H


text:
'use strict';

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

var _objectAssign = require('object-assign');

var _objectAssign2 = _interopRequireDefault(_objectAssign);

var _en_US = require('gregorian-calendar/lib/locale/en_US');

var _en_US2 = _interopRequireDefault(_en_US);

var _en_US3 = require('rc-calendar/lib/locale/en_US');

var _en_US4 = _interopRequireDefault(_en_US3);

var _en_US5 = require('../../time-picker/locale/en_US');

var _en_US6 = _interopRequireDefault(_en_US5);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// 统一合并为完整的 Locale
var locale = (0, _objectAssign2.default)({}, _en_US2.default);
locale.lang = (0, _objectAssign2.default)({
  placeholder: 'Select date'
}, _en_US4.default);

locale.timePickerLocale = (0, _objectAssign2.default)({}, _en_US6.default);

// All settings at:
// https://github.com/ant-design/ant-design/issues/424

exports.default = locale;
module.exports = exports['default'];


text:
<?php

namespace Edu\Cnm\Townhall\Test;

use Edu\Cnm\Townhall\District;

// grab the class under scrutiny
require_once(dirname(__DIR__) . "/autoload.php");

/**
 * Complete PHPUnit test for the District class
 *
 * want to test all mySQL/PDO enabled methods for both invalid and valid inputs
 *
 * - geojson to sql
 * - geocoded address within polygon
 * - match with district name
 * - return district name to profile
 *
 * @author Steven Hebert <shebert2@cnm.edu>
 *
 **/
class DistrictTest extends TownhallTest {
	/**
	 * @var string $VALID_DISTRICT_GEOM
	 *
	 **/
	protected $VALID_DISTRICT_GEOM = '{"type":"Polygon","coordinates":[[[0,0],[10,0],[10,10],[0,10],[0,0]]]}';

	/**
	 * @var string $VALID_DISTRICT_NAME
	 *
	 */
	protected $VALID_DISTRICT_NAME = "district1";

	/**
	 * @var string $VALID_DISTRICT_GEOM_4
	 *
	 **/
	protected $VALID_DISTRICT_GEOM_4 = '{"type":"Polygon","coordinates":[[[0,0],[10,0],[10,-10],[0,-10],[0,0]]]}';

	/**
	 * @var string $VALID_DISTRICT_NAME_4
	 *
	 */
	protected $VALID_DISTRICT_NAME_4 = "district4";

	/**
	 * @var string $INVALID_DISTRICT_GEOM
	 *
	 **/
	protected $INVALID_DISTRICT_GEOM = '{"type":"Polygon","coordinates":[[[181,0],[10,0],[10,-10],[0,-10],[181,0]]]}';

	/**
	 * @var string $VALID_LONG
	 *
	 **/
	protected $VALID_LONG = "5";

	/**
	 * @var string $VALID_LAT
	 *
	 **/
	protected $VALID_LAT = "5";

	/**
	 * create dependent objects before running each test
	 *
	 **/
	public final function setUp() {
		// run the setup method so the test can run properly
		// this is where all dependencies would be squashed so the test could be run properly.
		parent::setUp();
	}

	/**
	 * test valid INSERT district
	 *
	 **/
	public function testValidDistrictInsert(): void {
		// count number of rows for post test comparison
		$numRows = $this->getConnection()->getRowCount("district");

		// create district object
		$district = new District(null, $this->VALID_DISTRICT_GEOM, $this->VALID_DISTRICT_NAME);

		// insert into mySQL
		$district->insert($this->getPDO());

		// grab the data from MySQL and enforce that it meets expectations
		$pdoDistrict = District::getDistrictByDistrictId($this->getPDO(), $district->getDistrictId());
		$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount("district"));
		$this->assertEquals($pdoDistrict->getDistrictId(), $district->getDistrictId());
		$this->assertJsonStringEqualsJsonString($pdoDistrict->getDistrictGeom(), $district->getDistrictGeom());
		$this->assertEquals($pdoDistrict->getDistrictName(), $district->getDistrictName());
	}

	/**
	 * test invalid INSERT district
	 *
	 * @expectedException \PDOException
	 *
	 **/
	public function testInvalidDistrictInsert(): void {
		// create district object with an invalid districtId
		$district = new District(TownhallTest::INVALID_KEY, $this->VALID_DISTRICT_GEOM, $this->VALID_DISTRICT_NAME);

		// try to insert district object with invalid districtId
		$district->insert($this->getPDO());
	}

	/**
	 * test valid UPDATE district
	 *
	 **/
	public function testValidDistrictUpdate(): void {
		// count number of rows for post test comparison
		$numRows = $this->getConnection()->getRowCount("district");

		// create district object
		// used polygon in first quadrant
		$district = new District(null, $this->VALID_DISTRICT_GEOM, $this->VALID_DISTRICT_NAME);

		//insert new object into mySQL
		$district->insert($this->getPDO());

		// set the new district object
		// changed district polygon to 4th quadrant poly
		$district->setDistrictGeom($this->VALID_DISTRICT_GEOM_4);

		// update the database
		$district->update($this->getPDO());

		// grab the district out of the database and enforce the object meets expectations
		$pdoDistrict = District::getDistrictByDistrictId($this->getPDO(), $district->getDistrictId());
		$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount("district"));
		$this->assertEquals($pdoDistrict->getDistrictId(), $district->getDistrictId());
		$this->assertJsonStringEqualsJsonString($pdoDistrict->getDistrictGeom(), $district->getDistrictGeom());
		$this->assertEquals($pdoDistrict->getDistrictName(), $district->getDistrictName());
	}

	/**
	 * test invalid UPDATE district
	 *
	 * @expectedException \PDOException
	 *
	 */
	public function testInvalidDistrictUpdate() {
		// create district object
		// don't insert object into database
		$district = new District(null, $this->VALID_DISTRICT_GEOM, $this->VALID_DISTRICT_NAME);

		//try to update district object that does not exist
		$district->update($this->getPDO());
	}

	/**
	 * test valid DELETE district
	 *
	 **/
	public function testValidDistrictDelete() {
		// count number of rows for post test comparison
		$numRows = $this->getConnection()->getRowCount("district");

		// create district object
		$district = new District(null, $this->VALID_DISTRICT_GEOM, $this->VALID_DISTRICT_NAME);

		//insert new object into mySQL
		$district->insert($this->getPDO());

		//count rows to verify new district added
		$this->assertSame($numRows + 1, $this->getConnection()->getRowCount("district"));

		//delete the district from the database
		$district->delete($this->getPDO());

		//enforce that the deletion was successful
		$pdoDistrict = District::getDistrictByDistrictId($this->getPDO(), $district->getDistrictId());
		$this->assertNull($pdoDistrict);

		//count rows to verify new district was deleted
		$this->assertEquals($numRows, $this->getConnection()->getRowCount("district"));
	}

	/**
	 * test invalid DELETE district
	 *
	 * @expectedException \PDOException
	 *
	 **/
	public function testInvalidDistrictDelete() {
		// create the quote object
		// don't insert the new object into mySQL
		$district = new District(null, $this->VALID_DISTRICT_GEOM, $this->VALID_DISTRICT_NAME);

		// try to delete the object without putting it into the db
		$district->delete($this->getPDO());
	}

	/**
	 * test valid GET district by districtId
	 *
	 **/
	public function testValidGetByDistrictId() {
		// count number of rows for post test comparison
		$numRows = $this->getConnection()->getRowCount("district");

		// create the district object
		$district = new District(null, $this->VALID_DISTRICT_GEOM, $this->VALID_DISTRICT_NAME);

		// insert new object into mySQL
		$district->insert($this->getPDO());

		// grab the district from the database and enforce that the object meets expectations
		$pdoDistrict = District::getDistrictByDistrictId($this->getPDO(), $district->getDistrictId());
		$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount("district"));
		$this->assertEquals($pdoDistrict->getDistrictId(), $district->getDistrictId());
		$this->assertJsonStringEqualsJsonString($pdoDistrict->getDistrictGeom(), $district->getDistrictGeom());
		$this->assertEquals($pdoDistrict->getDistrictName(), $district->getDistrictName());
	}

	/**
	 * test invalid GET district by districtId
	 * try to grab a district that doesn't exist
	 *
	 **/
	public function testInvalidGetByDistrictId() {
		// try to GET a district using an invalid districtId
		$district = District::getDistrictByDistrictId($this->getPDO(), TownhallTest::INVALID_KEY);
		// verify GET returned empty row
		$this->assertNull($district);
	}

	/**
	 * test valid GET by district by long lat
	 * testing to see if lat long exceptions work correctly
	 *
	 **/
	public function testValidGetDistrictByLongLat(): void {
		// create district object
		$district = new District(null, $this->VALID_DISTRICT_GEOM, $this->VALID_DISTRICT_NAME);

		//insert new object into mySQL
		$district->insert($this->getPDO());

		// grab the tweet from the database and see if it matches expectations
		$pdoDistrict = District::getDistrictByLongLat($this->getPDO(), $this->VALID_LONG, $this->VALID_LAT);

		$this->assertEquals($pdoDistrict->getDistrictName(),$district->getDistrictName());

		//enforce that no other objects are bleeding into the test
		//$this->assertContainsOnlyInstancesOf("Edu\Cnm\Townhall\Test", $results);
	}

	/**
	 * test invalid GET by district by long lat
	 *
	 **/
	public function testInvalidGetByLongLat(): void {
		// search for a district without one existing in the table
		$district = District::getDistrictByLongLat($this->getPDO(), "5", "5");
		$this->assertNull($district);
	}

	/**
	 * test grabbing all districts
	 *
	 **/
	public function testGetAllDistricts() : void {
		// count the number of rows and save it for later
		$numRows = $this->getConnection()->getRowCount("district");
		// create a new Post and insert to into mySQL
		$district = new District(null, $this->VALID_DISTRICT_GEOM, $this->VALID_DISTRICT_NAME);
		$district->insert($this->getPDO());
		// grab the data from mySQL and enforce the fields match our expectations
		$results = District::getAllDistricts($this->getPDO());
		$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount("district"));
		$this->assertCount(1, $results);
		$this->assertContainsOnlyInstancesOf("Edu\\Cnm\\Townhall\\District", $results);
		// grab the result from the array and validate it
		$pdoDistrict = $results[0];
		$this->assertEquals($pdoDistrict->getDistrictId(), $district->getDistrictId());
		$this->assertJsonStringEqualsJsonString($pdoDistrict->getDistrictGeom(), $district->getDistrictGeom());
		$this->assertEquals($pdoDistrict->getDistrictName(), $this->VALID_DISTRICT_NAME);
	}
}


text:
<?php

/* @var $this yii\web\View */

use yii\helpers\Html;

$this->title = 'About';
$this->params['breadcrumbs'][] = $this->title;
?>

        This is the About page. You may modify the following file to customize its content:

    <?= __FILE__ ?>


text:
package com.tubb.calendarselector.library;

import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.IntDef;

import com.tubb.calendarselector.custom.DayViewHolder;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * Created by tubingbing on 16/3/1.
 */
public class FullDay implements Parcelable {

    public static final int WEEK_1 = 1;
    public static final int WEEK_2 = 2;
    public static final int WEEK_3 = 3;
    public static final int WEEK_4 = 4;
    public static final int WEEK_5 = 5;
    public static final int WEEK_6 = 6;
    public static final int WEEK_7 = 7;

    protected int year;
    protected int month;
    protected int day;
    protected int weekOf;

    public FullDay(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public void setWeekOf(int weekOf) {
        this.weekOf = weekOf;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        FullDay fullDay = (FullDay) o;

        if (year != fullDay.year) return false;
        if (month != fullDay.month) return false;
        return day == fullDay.day;

    }

    @Override
    public int hashCode() {
        int result = year;
        result = 31 * result + month;
        result = 31 * result + day;
        return result;
    }

    /**
     * get the position of week ([1-7])
     */
    public int getWeekOf() {
        return weekOf;
    }

    @Override
    public String toString() {
        return "FullDay{" +
                "year=" + year +
                ", month=" + month +
                ", day=" + day +
                ", weekOf=" + weekOf +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.year);
        dest.writeInt(this.month);
        dest.writeInt(this.day);
        dest.writeInt(this.weekOf);
    }

    protected FullDay(Parcel in) {
        this.year = in.readInt();
        this.month = in.readInt();
        this.day = in.readInt();
        this.weekOf = in.readInt();
    }

    public static final Parcelable.Creator<FullDay> CREATOR = new Parcelable.Creator<FullDay>() {
        @Override
        public FullDay createFromParcel(Parcel source) {
            return new FullDay(source);
        }

        @Override
        public FullDay[] newArray(int size) {
            return new FullDay[size];
        }
    };
}


text:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Admin extends CI_Controller{
    private $podaci;

     public function __construct() {
        parent::__construct();

        $this->podaci['meta']=array(
            array('name'=>'robots', 'content'=>'no-cache'),
            array('name'=>'description', 'content'=>'Strana registracija'),
            array('name'=>'keywords', 'content'=>'test'),
            array('name'=>'Content-type', 'content'=>'text/html; charset=utf-8', 'type'=>'equiv')
        );
        $this->podaci['title']="Sensei | Admin panel";
        $this->podaci['base_url']=  base_url();
        $this->podaci['links'][]=link_tag('css/admin.css');
        $this->load->database();
        $this->load->library('grocery_CRUD');

    }
    public function index()
    {
        $this->_example_output((object)array('output' => '' , 'js_files' => array() , 'css_files' => array()));

    }
    public function korisnik()
    {
        try{
             $crud = new grocery_CRUD();

            $crud->set_theme('datatables');
            $crud->set_table('korisnik');

            $crud->columns('id_korisnik','username','email','datun_registracije','status','code','sd6d003a2');

            $crud->set_relation('id_uloga','uloga','uloga');
            $crud->display_as('sd6d003a2', 'Uloga');

            $output = $crud->render();
            $this->_example_output($output);

        }
        catch(Exception $e)
        {
            show_error($e->getMessage().' --- '.$e->getTraceAsString());
        }

    }
    public function post()
    {
        try{
            $crud = new grocery_CRUD();

            $crud->set_theme('datatables');
            $crud->set_table('post');
            $crud->columns('naslov','slika_post','kratak_opis','vreme_postavljanja','broj_lajkova','sb8b8b939');

            $crud->set_field_upload('slika_post','../Sajt/');
            $crud->required_fields('naslov','slika_post','tekst','id_oblast','broj_lajkova','vreme_postavljanja');
            $crud->set_relation('id_oblast', 'oblast', 'oblast');

              $crud->display_as('naslov','Naslov')
				 ->display_as('slika_post','Slika')
				 ->display_as('kratak_opis','Opis posta')
                    ->display_as('sb8b8b939','Oblast');
            $output = $crud->render();
            $this->_example_output($output);

        }
        catch(Exception $e)
        {
            show_error($e->getMessage().' --- '.$e->getTraceAsString());
        }
    }
    public function oblast()
    {
        try{
            $crud = new grocery_CRUD();

            $crud->set_theme('datatables');
            $crud->set_table('oblast');
            $crud->set_subject('Oblast');

            $crud->columns('id_oblast','oblast','slika_oblast');
            $crud->display_as('slika_oblast','Slika');
            $crud->set_field_upload('slika_oblast','../Sajt/');
            $output = $crud->render();
            $this->_example_output($output);

        }
        catch(Exception $e)
        {
            show_error($e->getMessage().' --- '.$e->getTraceAsString());
        }
    }
    public function uloge()
    {
         try{
            $crud = new grocery_CRUD();

            $crud->set_theme('datatables');
            $crud->set_table('uloga');
            $crud->set_subject('Uloga');

            $crud->columns('id_uloga','uloga');
            $output = $crud->render();
            $this->_example_output($output);

        }
        catch(Exception $e)
        {
            show_error($e->getMessage().' --- '.$e->getTraceAsString());
        }
    }
     public function anketa()
    {
         try{
            $crud = new grocery_CRUD();

            $crud->set_theme('datatables');
            $crud->set_table('anketa');
            $crud->set_subject('Anketa');

            $crud->columns('id_anketa','tekst');
            $output = $crud->render();
            $this->_example_output($output);

        }
        catch(Exception $e)
        {
            show_error($e->getMessage().' --- '.$e->getTraceAsString());
        }
    }
    public function korisnik_oblast()
    {
        try{
            $crud = new grocery_CRUD();

            $crud->set_theme('datatables');
            $crud->set_table('oblast');
            $crud->set_relation_n_n('Korisnik', 'korisnik_oblast', 'korisnik', 'id_oblast', 'id_korisnik', 'id_korisnik');
            //$crud->set_re

            // $crud->columns('naslov','slika_oblast','kratak_opis','vreme_postavljanja','broj_lajkova','sb8b8b939');
              $crud->display_as('naslov','Naslov')
				 ->display_as('slika_post','Slika')
				 ->display_as('kratak_opis','Opis posta')
                    ->display_as('sb8b8b939','Oblast');
              $crud->set_field_upload('slika_oblast','../Sajt/');
              $crud->unset_edit();
              $crud->unset_add();
              $crud->unset_read();
            $output = $crud->render();
            $this->_example_output($output);

        }
        catch(Exception $e)
        {
            show_error($e->getMessage().' --- '.$e->getTraceAsString());
        }
    }
    public function _example_output($output = null)
    {
        $this->load->view('example.php',$output);
    }

    /*private function ucitajOblastiKorisnika()
    {
        $this->load->model('Oblasti_model');
        $this->Oblasti_model->id_korisnik= $this->session->userdata("id_korisnik");
        $oblasti=$this->Oblasti_model->korisnikoveOblasti();

        return $oblasti;
    }
    public function izbrisiKorisnika($id)
    {
        $this->load->model("Korisnik_model","korisnik");
        $this->korisnik->id_korisnik=$id;
        $this->korisnik->izbrisiKorisnika();
        redirect("Admin");
    }
    public function upisiKorisnika()
    {
        $username=$this->input->post("tbUsername");
        $password=$this->input->post("tbPassword");
        $email=$this->input->post("tbEmail");
        $id_uloga=$this->input->post("ddlUloga");

        $this->load->model("Korisnik_model","korisnik");
        $this->korisnik->username=$username;
        $this->korisnik->password=$password;
        $this->korisnik->email=$email;
        $x=rand(0,20000);
        $this->korisnik->code=$x;
        $this->korisnik->id_uloga=$id_uloga;
        $this->korisnik->unosKorisnika();
        redirect("admin");
    }
    public function izmeniKorisnika($id)
    {
         if($this->session->userdata('uloga')=='admin')
        {
            $this->load->view("header",$this->podaci);
            $this->load->view("fiksiran",$this->podaci);

            $this->load->model('Korisnik_model','korisnik');
            $this->korisnik->id_korisnik=$id;
            $korisnik=$this->korisnik->vratiKorisnikaUpdate();

            $this->podaci['post']=false;
            $this->podaci['anketa']=false;
            $this->podaci['korisnik']=true;

            $this->podaci['username']=$korisnik->username;
            $this->podaci['password']=$korisnik->password;
            $this->podaci['email']=$korisnik->email;
            $this->podaci['status']=$korisnik->status;
            $this->podaci['id_uloga']=$korisnik->id_uloga;
            $this->podaci['uloga']=$korisnik->uloga;

            $this->podaci['idKorisnik']=$id;
            $this->load->view('izmena',  $this->podaci);

            $sveOblasti=$this->ucitajOblastiKorisnika();
            $this->podaci['oblasti']=$sveOblasti;
            $this->load->view("jumping",$this->podaci);
        }

    }
    public function izmeniKorisnikaSubmit()
    {
        $username=$this->input->post("tbUsername");
        $password=$this->input->post("tbPassword");
        $email=$this->input->post("tbEmail");
        $status=$this->input->post("tbStatus");
        $id_uloga=$this->input->post("ddlUloga");

        $this->load->model("Korisnik_model","korisnik");
        $this->korisnik->id_korisnik=$this->input->post("idKorisnik");
        $this->korisnik->username=$username;
        $this->korisnik->password=$password;
        $this->korisnik->email=$email;
        $this->korisnik->status=$status;
        $this->korisnik->code=rand(0,20000);
        $this->korisnik->id_uloga=$id_uloga;
        $this->korisnik->izmeniKorisnika();
    }
    public function sveOblasti()
    {
        $this->load->model("Oblasti_model","oblasti");
        return $this->oblasti->sveOblasti();
    }
    public function izbrisiOblast($id)
    {
        $this->load->model("Oblasti_model","oblasti");
        $this->oblasti->id_oblast=$id;
        $oblast=$this->oblasti->vratiOblast();
        unlink("".$oblast->slika_oblast);
        $this->oblasti->id_oblast=$id;
        $this->oblasti->izbrisiOblast();
        redirect("admin");
    }
    public function upisiOblast()
    {
        $file_name = $_FILES['fileOblastSlika']['name'];
        $file_size =$_FILES['fileOblastSlika']['size'];
        $file_tmp =$_FILES['fileOblastSlika']['tmp_name'];
        $file_type=$_FILES['fileOblastSlika']['type'];
        move_uploaded_file($file_tmp,"images/oblasti/".$file_name);
        $oblast=$this->input->post("tbOblast");

        $this->load->model("Oblasti_model","oblasti");
        $this->oblasti->oblast=$oblast;
        $this->oblasti->slika="images/oblasti/".$file_name;
        $this->oblasti->upisiOblast();

        redirect("admin");
    }
    public function sviPostovi()
    {
        $this->load->model("Post_model");
        return $this->Post_model->sviPostoviAdmin();
    }
    public function izbrisiPost($id)
    {
        $this->load->model("Post_model");
        $this->Post_model->id_post=$id;
        $post=$this->Post_model->vratiPost();
        unlink("".$post->slika_post);
        $this->Post_model->izbrisiPost();
        redirect("admin");
    }
    public function upisiPost()
    {
        $file_name = $_FILES['filePostSlika']['name'];
        $file_size =$_FILES['filePostSlika']['size'];
        $file_tmp =$_FILES['filePostSlika']['tmp_name'];
        $file_type=$_FILES['filePostSlika']['type'];

        move_uploaded_file($file_tmp,"images/post/".$file_name);
        $naslov=$this->input->post("tbNaslov");
        $tekst=$this->input->post("tbTekst");
        $id_oblast=$this->input->post("ddlOblast");

        $this->load->model("Post_model");
        $this->Post_model->naslov=$naslov;
        $this->Post_model->tekst=$tekst;
        $this->Post_model->slika="images/post/".$file_name;
        $this->Post_model->id_oblastt=$id_oblast;
        $this->Post_model->upisiPost();
        redirect("admin");
    }
     public function izmeniPost($id)
    {
        if($this->session->userdata('uloga')=='admin')
        {
            $this->load->view("header",$this->podaci);
            $this->load->view("fiksiran",$this->podaci);

            $this->load->model('Post_model');
            $this->Post_model->id_post=$id;
            $post=$this->Post_model->vratiPost();
            $form_tag_atributi=array(
                'name'=>'formIzmenaAnketa',
                'id'=>'formIzmenaAnketa'
            );
            $this->podaci['post']=true;$this->podaci['anketa']=false;$this->podaci['korisnik']=false;
            $this->podaci['form_tag_atributi']=$form_tag_atributi;

            $naslov_tag=array('name'=>'tbNaslov', 'id'=>'tbNaslov');
            $this->podaci['naslov_tag']=$naslov_tag;

            $tekst_tag_atributi=array('name'=>'tbTekst', 'id'=>'tbTekst');
            $this->podaci['tekst_tag_atributi']=$tekst_tag_atributi;

            $broj_lajkova_tag_atributi=array('name'=>'tbLajkovi', 'id'=>'tbLajkovi');
            $this->podaci['broj_lajkova_tag_atributi']=$broj_lajkova_tag_atributi;

            $slika_tag=array('name'=>'fileSlika', 'id'=>'fileSlika');
            $this->podaci['slika_tag']=$slika_tag;

            $podaci_oblast=  $this->sveOblasti();
            $this->podaci['oblastiSve']=$podaci_oblast;

            $this->podaci['idPost']=$id;
            $this->load->view('izmena',  $this->podaci);

            $sveOblasti=$this->ucitajOblastiKorisnika();
            $this->podaci['oblasti']=$sveOblasti;
            $this->load->view("jumping",$this->podaci);
        }
    }
    public function izmeniPostSubmit()
    {

        $file_name = $_FILES['fileSlika']['name'];
        $file_size =$_FILES['fileSlika']['size'];
        $file_tmp =$_FILES['fileSlika']['tmp_name'];
        $file_type=$_FILES['fileSlika']['type'];

        move_uploaded_file($file_tmp,"images/post/".$file_name);

        $naslov=$this->input->post("tbNaslov");
        $br=$this->input->post("tbLajkovi");
        $tekst=$this->input->post("tbTekst");
        $id_oblast=$this->input->post("ddlOblasti");
        $id=$this->input->post("idPost");

        $this->load->model("Post_model");
        $this->Post_model->id_post=$id;
        $this->Post_model->naslov=$naslov;
        $this->Post_model->tekst=$tekst;
        $this->Post_model->broj_lajkova=$br;
        $this->Post_model->slika="images/post/".$file_name;
        $this->Post_model->id_oblastt=$id_oblast;
        $this->Post_model->izmeniPost();
        redirect("admin");
    }
    public function sveAnkete()
    {
        $this->load->model("Anketa_model","anketa");
        return $this->anketa->sveAnkete();
    }
     public function izbrisiAnketu($id)
    {
        $this->load->model("Anketa_model","anketa");
        $this->anketa->id_anketa=$id;
        $this->anketa->izbrisiAnketu();
        redirect("admin");
    }
    public function upisiAnketu()
    {
        $this->load->model('Anketa_model','anketa');
        $anketa=$this->input->post("tbAnketa");
        $this->anketa->tekst=$anketa;
        $this->anketa->upisiAnketu();
        redirect("admin");
    }
    public function izmeniAnketu($id)
    {
        if($this->session->userdata('uloga')=='admin')
        {
            $this->load->view("header",$this->podaci);
            $this->load->view("fiksiran",$this->podaci);

            $this->load->model('Anketa_model','anketa');
            $this->anketa->id_anketa=$id;
            $anketa=$this->anketa->vratiAnketu();
            $form_tag_atributi=array(
                'name'=>'formIzmenaAnketa',
                'id'=>'formIzmenaAnketa'
            );
            $this->podaci['anketa']=true;$this->podaci['post']=false;$this->podaci['korisnik']=false;
            $this->podaci['form_tag_atributi']=$form_tag_atributi;
            $tekst_tag_atributi=array('name'=>'tbTekst', 'id'=>'tbTekst');
            $this->podaci['tekst_tag_atributi']=$tekst_tag_atributi;
            $this->podaci['idAnketa']=$id;
            $this->load->view('izmena',  $this->podaci);

            $sveOblasti=$this->ucitajOblastiKorisnika();
            $this->podaci['oblasti']=$sveOblasti;
            $this->load->view("jumping",$this->podaci);
        }
    }
    public function izmeniAtributSubmit()
    {
        $tekst=$this->input->post("tbTekst");
        $id=$this->input->post("idAnketa");
        $this->load->model('Anketa_model','anketa');
        $this->anketa->tekst=$tekst;
        $this->anketa->id_anketa=$id;
        $this->anketa->izmeniAnketu();
        redirect("admin");
    }*/
}


text:
'use strict';

const babel = require('babel-core');
const invariant = require('fbjs/lib/invariant');

import type {Ast, SourceMap} from 'babel-core';
const t = babel.types;

const React = {name: 'React'};
const ReactNative = {name: 'ReactNative'};
const platform = {name: 'Platform'};
const os = {name: 'OS'};
const select = {name: 'select'};
const requirePattern = {name: 'require'};

const env = {name: 'env'};
const nodeEnv = {name: 'NODE_ENV'};
const processId = {name: 'process'};

const dev = {name: '__DEV__'};

const importMap = new Map([['ReactNative', 'react-native']]);

const isGlobal = binding => !binding;

const isFlowDeclared = binding =>
  t.isDeclareVariable(binding.path);

const isGlobalOrFlowDeclared = binding =>
  isGlobal(binding) || isFlowDeclared(binding);

const isToplevelBinding = (binding, isWrappedModule) =>
  isGlobal(binding) ||
  !binding.scope.parent ||
  isWrappedModule && !binding.scope.parent.parent;

const isRequireCall = (node, dependencyId, scope) =>
  t.isCallExpression(node) &&
  t.isIdentifier(node.callee, requirePattern) &&
  checkRequireArgs(node.arguments, dependencyId);

const isImport = (node, scope, patterns) =>
  patterns.some(pattern => {
    const importName = importMap.get(pattern.name) || pattern.name;
    return isRequireCall(node, importName, scope);
  });

function isImportOrGlobal(node, scope, patterns, isWrappedModule) {
  const identifier = patterns.find(pattern => t.isIdentifier(node, pattern));
  return (
    identifier &&
    isToplevelBinding(scope.getBinding(identifier.name), isWrappedModule) ||
    isImport(node, scope, patterns)
  );
}

const isPlatformOS = (node, scope, isWrappedModule) =>
  t.isIdentifier(node.property, os) &&
  isImportOrGlobal(node.object, scope, [platform], isWrappedModule);

const isReactPlatformOS = (node, scope, isWrappedModule) =>
  t.isIdentifier(node.property, os) &&
  t.isMemberExpression(node.object) &&
  t.isIdentifier(node.object.property, platform) &&
  isImportOrGlobal(
    node.object.object, scope, [React, ReactNative], isWrappedModule);

const isProcessEnvNodeEnv = (node, scope) =>
  t.isIdentifier(node.property, nodeEnv) &&
  t.isMemberExpression(node.object) &&
  t.isIdentifier(node.object.property, env) &&
  t.isIdentifier(node.object.object, processId) &&
  isGlobal(scope.getBinding(processId.name));

const isPlatformSelect = (node, scope, isWrappedModule) =>
  t.isMemberExpression(node.callee) &&
  t.isIdentifier(node.callee.object, platform) &&
  t.isIdentifier(node.callee.property, select) &&
  isImportOrGlobal(node.callee.object, scope, [platform], isWrappedModule);

const isReactPlatformSelect = (node, scope, isWrappedModule) =>
  t.isMemberExpression(node.callee) &&
  t.isIdentifier(node.callee.property, select) &&
  t.isMemberExpression(node.callee.object) &&
  t.isIdentifier(node.callee.object.property, platform) &&
  isImportOrGlobal(
    node.callee.object.object, scope, [React, ReactNative], isWrappedModule);

const isDev = (node, parent, scope) =>
  t.isIdentifier(node, dev) &&
  isGlobalOrFlowDeclared(scope.getBinding(dev.name)) &&
  !(t.isMemberExpression(parent));

function findProperty(objectExpression, key, fallback) {
  const property = objectExpression.properties.find(p => p.key.name === key);
  return property ? property.value : fallback();
}

const inlinePlugin = {
  visitor: {
    Identifier(path, state) {
      if (isDev(path.node, path.parent, path.scope)) {
        path.replaceWith(t.booleanLiteral(state.opts.dev));
      }
    },
    MemberExpression(path, state) {
      const node = path.node;
      const scope = path.scope;
      const opts = state.opts;

      if (
        isPlatformOS(node, scope, opts.isWrapped) ||
        isReactPlatformOS(node, scope, opts.isWrapped)
      ) {
        path.replaceWith(t.stringLiteral(opts.platform));
      } else if (isProcessEnvNodeEnv(node, scope)) {
        path.replaceWith(
          t.stringLiteral(opts.dev ? 'development' : 'production'));
      }
    },
    CallExpression(path, state) {
      const node = path.node;
      const scope = path.scope;
      const arg = node.arguments[0];
      const opts = state.opts;

      if (
        isPlatformSelect(node, scope, opts.isWrapped) ||
        isReactPlatformSelect(node, scope, opts.isWrapped)
      ) {
        const fallback = () =>
          findProperty(arg, 'default', () => t.identifier('undefined'));
        const replacement = t.isObjectExpression(arg)
          ? findProperty(arg, opts.platform, fallback)
          : node;

        path.replaceWith(replacement);
      }
    },
  },
};

const plugin = () => inlinePlugin;

function checkRequireArgs(args, dependencyId) {
  const pattern = t.stringLiteral(dependencyId);
  return t.isStringLiteral(args[0], pattern) ||
         t.isMemberExpression(args[0]) &&
         t.isNumericLiteral(args[0].property) &&
         t.isStringLiteral(args[1], pattern);
}

type AstResult = {
  ast: Ast,
  code: ?string,
  map: ?SourceMap,
};

function inline(
  filename: string,
  transformResult: {ast?: ?Ast, code: string, map: ?SourceMap},
  options: {},
): AstResult {
  const code = transformResult.code;
  const babelOptions = {
    filename,
    plugins: [[plugin, options]],
    inputSourceMap: transformResult.map,
    sourceMaps: true,
    sourceFileName: filename,
    code: false,
    babelrc: false,
    compact: true,
  };

  const result = transformResult.ast
    ? babel.transformFromAst(transformResult.ast, code, babelOptions)
    : babel.transform(code, babelOptions);
  const {ast} = result;
  invariant(ast != null, 'Missing AST in babel transform results.');
  return {ast, code: result.code, map: result.map};
}

inline.plugin = inlinePlugin;
module.exports = inline;


text:
    _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
    _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"")
#else
#  define CGAL_MESH_3_IGNORE_UNUSED_VARIABLES
#endif
#if __has_warning("-Wunneeded-internal-declaration")
#  define CGAL_MESH_3_IGNORE_UNUSED_INTERNAL_DECLARATION \
     _Pragma("clang diagnostic ignored \"-Wunneeded-internal-declaration\"")
#else
#  define CGAL_MESH_3_IGNORE_UNUSED_INTERNAL_DECLARATION
#endif

#define CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS \
  CGAL_MESH_3_IGNORE_UNUSED_VARIABLES                    \
  CGAL_MESH_3_IGNORE_UNUSED_INTERNAL_DECLARATION

#endif // CGAL_MESH_3_CONFIG_H


text:
package com.android.simone.github.marvelapp.presentation.di;

import android.app.Activity;

import com.android.simone.github.marvelapp.presentation.di.component.ApplicationComponent;
import com.android.simone.github.marvelapp.presentation.di.component.ComicComponent;
import com.android.simone.github.marvelapp.presentation.di.component.DaggerApplicationComponent;
import com.android.simone.github.marvelapp.presentation.di.component.DaggerComicComponent;
import com.android.simone.github.marvelapp.presentation.di.module.ContextModule;

/**
 * @author Simone Bellotti
 */

public final class ComponentProvider {

    private static ApplicationComponent applicationComponent;
    private static ComicComponent comicComponent;

    public static ApplicationComponent provideApplicationComponent(Activity activity) {
//        if (applicationComponent == null) {
//            applicationComponent = DaggerApplicationComponent.builder()
//                    .contextModule(new ContextModule(activity))
//                    .build();
//        }
//        return applicationComponent;
        return DaggerApplicationComponent.builder()
                .contextModule(new ContextModule(activity))
                .build();
    }

    public static ComicComponent provideComicComponent(ApplicationComponent applicationComponent) {
//        if (comicComponent == null) {
//            comicComponent = DaggerComicComponent.builder()
//                    .applicationComponent(applicationComponent)
//                    .build();
//        }
//        return comicComponent;
        return DaggerComicComponent.builder()
                .applicationComponent(applicationComponent)
                .build();
    }
}


text:
require "spec_helper"

describe FactoryGirlProfiling::Initializer do
  context '.initialize_rspec' do
    it "calls RSpec.configure" do
      FactoryGirlProfiling::Initializer::RSpec = rspec_double = double('rspec')
      rspec_double.should_receive(:configure)
      FactoryGirlProfiling::Initializer.initialize_rspec
    end
  end
end


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Whizkid's Entertainment</title>
<link href="default.css" rel="stylesheet" type="text/css" />

<?php include "navigation.php" ?>

<?php include "current.php" ?>

Content here

<?php include "footer.php" ?>


text:
package com.heliosphere.demeter.base.resource.bundle;

import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import com.heliosphere.demeter.base.visitor.IAnnotationVisitor;

import lombok.extern.log4j.Log4j;

/**
 * Class used to visit all annotated classes available on the classpath that are
 * annotated with the {@link BundleEnumRegister} annotation.
 *

 * @author  Resse Christophe - Heliosphere
 * @version 1.0.0
 */
@Log4j
public final class BundleEnumRegisterVisitor implements IAnnotationVisitor
{
	/**
	 * Collection of bundles to auto-register (by priority).
	 */
	private Map<Integer, List<String>> bundles = new TreeMap<>();

	@SuppressWarnings("unchecked")
	@Override
	public Class<? extends Annotation>[] annotations()
	{
		return new Class[] { BundleEnumRegister.class };
	}

	@SuppressWarnings("unchecked")
	@Override
	public void reportTypeAnnotation(Class<? extends Annotation> annotation, String className)
	{
		List<String> classes = null;
		Integer key = null;

		Class<? extends IBundle> bClass;
		try
		{
			bClass = (Class<? extends IBundle>) Class.forName(className);
			BundleEnumRegister a = bClass.getAnnotation(BundleEnumRegister.class);
			key = Integer.valueOf(a.priority());
			classes = (List<String>) (bundles.containsKey(key) ? bundles.get(key) : new ArrayList<>());
			classes.add(className);
			bundles.put(Integer.valueOf(a.priority()), classes);
		}
		catch (ClassNotFoundException e)
		{
			log.error(e.getMessage());
		}
	}

	@Override
	@SuppressWarnings("unchecked")
	public void delegateRegistration() throws ClassNotFoundException
	{
		for (Integer i : bundles.keySet())
		{
			for (String e : bundles.get(i))
			{
				ResourceBundleManager.register((Class<? extends IBundle>) Class.forName(e));
			}
		}
	}
}


text:
/**
 * Creates and manages device scanner object.
 */

var device_scanner;
var driver;

var getListAllScanner = function(scanner) {
    device_scanner = require('./device_scanner').createDeviceScanner(driver);
};
var getOpenAllScanner = function() {
    device_scanner = require('./open_all_device_scanner').createDeviceScanner(driver);
};

var listAllNames = [
    'device_scanner',
    'list_all',
    'list_all_scanner',
    'list_all_device_scanner',
];
var openAllNames = [
    'open_all',
    'open_all_scanner',
    'open_all_device_scanner',
];
var POTENTIALLY_ENABLE_OPEN_ALL_SCANNER = false;

var ENABLE_SELECTION_DEBUGGING = false;
function debug () {
    if(ENABLE_SELECTION_DEBUGGING) {
        console.log.apply(console, arguments);
    }
}

var SAFE_LOAD_ENABLED = true;
function safeGetOpenAllScanner() {
    if(SAFE_LOAD_ENABLED) {
        if(driver.hasOpenAll) {
            // If installed LJM driver has a compatable version of openAll
            // then use the openAll scanner.
            debug('Selecting openAll Scanner...');
            getOpenAllScanner();
        } else {
            // If the installed LJM driver does not have a compatable
            // version of openALl then use the listAll scanner.
            debug('Selecting listAll Scanner...');
            getListAllScanner();
        }
    } else {
        debug('Selecting openAll Scanner...');
        getOpenAllScanner();
    }
}
function innerGetDeviceScanner(whichScanner) {
    if(device_scanner) {
        // Nothing; we already have the device_scanner
    } else {
        // Load the LJM driver functions
        driver = require('labjack-nodejs').driver();

        // Determine which version of the device_scanner to return.
        if(whichScanner) {
            if (listAllNames.indexOf(whichScanner) >= 0) {
                debug('Case B');
                // If the user selected the list_all device scanner...
                getListAllScanner();
            } else if (openAllNames.indexOf(whichScanner) >= 0) {
                debug('Case C');
                // If the user selected the open_all device scanner...
                safeGetOpenAllScanner();
            } else {
                // Default Behavior...
                // getOpenAllScanner();

                // Return the ListAll scanner by default... for now...
                debug('Selecting Default Scanner...');
                getListAllScanner();
            }
        } else {
            debug('Case A');
            safeGetOpenAllScanner();
        }
    }

    // Return the device_scanner.
    return device_scanner;
}
exports.enableSafeLoad = function() {
    SAFE_LOAD_ENABLED = true;
};
exports.disableSafeLoad = function() {
    SAFE_LOAD_ENABLED = false;
};
exports.unload = function() {
    device_scanner = undefined;
};
exports.getDeviceScanner = innerGetDeviceScanner;
exports.deviceScanner = innerGetDeviceScanner;

exports.eventList = require('./event_list').eventList;