text:
package com.dremio.exec.server.options;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import com.dremio.options.OptionValue;
import com.dremio.options.OptionValueProto;

/**
 * Tests for {@link OptionValueProtoUtils}
 */
public class TestOptionValueProtoUtils {

  @Test
  public void testBoolOptionToProto() {
    final OptionValue option = OptionValue.createBoolean(OptionValue.OptionType.SYSTEM, "test.option", true);
    final OptionValueProto optionProto = OptionValueProtoUtils.toOptionValueProto(option);
    assertTrue(verifyEquivalent(option, optionProto));
  }

  @Test
  public void testLongOptionToProto() {
    final OptionValue option = OptionValue.createLong(OptionValue.OptionType.SYSTEM, "test.option", 1234);
    final OptionValueProto optionProto = OptionValueProtoUtils.toOptionValueProto(option);
    assertTrue(verifyEquivalent(option, optionProto));
  }

  @Test
  public void testStringOptionToProto() {
    final OptionValue option = OptionValue.createString(OptionValue.OptionType.SYSTEM, "test.option", "test-option");
    final OptionValueProto optionProto = OptionValueProtoUtils.toOptionValueProto(option);
    assertTrue(verifyEquivalent(option, optionProto));
  }

  @Test
  public void testDoubleOptionToProto() {
    final OptionValue option = OptionValue.createDouble(OptionValue.OptionType.SYSTEM, "test.option", 1234.1234);
    final OptionValueProto optionProto = OptionValueProtoUtils.toOptionValueProto(option);
    assertTrue(verifyEquivalent(option, optionProto));
  }

  @Test
  public void testBoolOptionFromProto() {
    final OptionValueProto optionProto = OptionValueProto.newBuilder()
      .setName("test.option")
      .setBoolVal(true)
      .build();
    final OptionValue option = OptionValueProtoUtils.toOptionValue(optionProto);
    assertTrue(verifyEquivalent(option, optionProto));
  }

  @Test
  public void testLongOptionFromProto() {
    final OptionValueProto optionProto = OptionValueProto.newBuilder()
      .setName("test.option")
      .setNumVal(1234)
      .build();
    final OptionValue option = OptionValueProtoUtils.toOptionValue(optionProto);
    assertTrue(verifyEquivalent(option, optionProto));
  }

  @Test
  public void testStringOptionFromProto() {
    final OptionValueProto optionProto = OptionValueProto.newBuilder()
      .setName("test.option")
      .setStringVal("test-option")
      .build();
    final OptionValue option = OptionValueProtoUtils.toOptionValue(optionProto);
    assertTrue(verifyEquivalent(option, optionProto));
  }

  @Test
  public void testFloatOptionFromProto() {
    final OptionValueProto optionProto = OptionValueProto.newBuilder()
      .setName("test.option")
      .setFloatVal(1234.1234)
      .build();
    final OptionValue option = OptionValueProtoUtils.toOptionValue(optionProto);
    assertTrue(verifyEquivalent(option, optionProto));
  }

  private boolean verifyEquivalent(OptionValue optionValue, OptionValueProto optionValueProto) {
    checkName(optionValue, optionValueProto);

    switch(optionValue.getKind()) {
      case BOOLEAN:
        return optionValue.getBoolVal().equals(optionValueProto.getBoolVal());
      case LONG:
        return optionValue.getNumVal().equals(optionValueProto.getNumVal());
      case STRING:
        return optionValue.getStringVal().equals(optionValueProto.getStringVal());
      case DOUBLE:
        return optionValue.getFloatVal().equals(optionValueProto.getFloatVal());
      default:
        throw new AssertionError();
    }
  }

  private void checkName(OptionValue optionValue, OptionValueProto optionValueProto) {
    assertEquals(optionValue.getName(), optionValueProto.getName());
  }
}


text:
"""
Copyright (c) 2015, The Regents of the University of California (Regents).
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

   1. Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.

   2. Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the following
      disclaimer in the documentation and/or other materials provided
      with the distribution.

   3. Neither the name of the copyright holder nor the names of its
      contributors may be used to endorse or promote products derived
      from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

Please contact the author(s) of this library if you have any questions.
Author: David Fridovich-Keil   ( dfk@eecs.berkeley.edu )
"""

###########################################################################
#
# 2D/3D point classes.
#
###########################################################################

import numpy as np

class Point3D:
    def __init__(self):
        self.x_ = 0
        self.y_ = 0
        self.z_ = 0

    def __init__(self, x, y, z):
        self.x_ = x
        self.y_ = y
        self.z_ = z

    def SquaredDistanceTo(self, other):
        dx = self.x_ - other.x_
        dy = self.y_ - other.y_
        dz = self.z_ - other.z_
        return dx*dx + dy*dy + dz*dz

class Point2D:
    def __init__(self):
        self.x_ = 0
        self.y_ = 0

    def __init__(self, x, y):
        self.x_ = x
        self.y_ = y

    def SquaredDistanceTo(self, other):
        dx = self.x_ - other.x_
        dy = self.y_ - other.y_
        return dx*dx + dy*dy

redpajama_set_name: RedPajamaGithub


text:
package alien4cloud.topology.task;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 *
 * Represent one task to do to have a deployable topology
 *
 * @author 'Igor Ngouagna'
 *
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor(suppressConstructorProperties = true)
public abstract class AbstractTask {
    // task code
    private TaskCode code;
}


text:
http://www.w3schools.com/sql/
https://rubygems.org/gems/activerecord
http://code.tutsplus.com/tutorials/active-record-the-rails-database-bridge--net-30489
https://rubygems.org/gems/datamapper
http://datamapper.org/docs/

## SQLite3
http://www.sqlite.org/docs.html
https://github.com/sparklemotion/sqlite3-ruby
https://rubygems.org/gems/sqlite3
http://rubydoc.info/gems/sqlite3/1.3.9/frames

## MySQL
http://dev.mysql.com/doc/
https://rubygems.org/gems/mysql2

## Postgres
http://www.postgresql.org/docs/
https://rubygems.org/gems/pg
http://rubydoc.info/gems/pg/PG/Connection


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    android:id="@+id/activity_sign_in2"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorPrimary"
    tools:context="com.beanu.l3_login.SignIn2Activity">

    <View
        android:id="@+id/virtual_line"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_centerInParent="true"
        />

    <Button
        android:id="@+id/btn_to_login"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/virtual_line"
        android:layout_centerHorizontal="true"
        android:layout_marginLeft="64dp"
        android:layout_marginRight="64dp"
        android:layout_marginTop="32dp"
        android:text="登录"/>

    <Button
        android:id="@+id/btn_to_register"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/btn_to_login"
        android:layout_centerHorizontal="true"
        android:layout_marginLeft="64dp"
        android:layout_marginRight="64dp"
        android:layout_marginTop="4dp"
        android:text="注册"/>

</RelativeLayout>


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>../src/connection.js - Monobrow</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">

            API Docs for: 0.4.0

APIs

Classes

Modules

            <input type="search" id="api-filter" placeholder="Type to filter APIs">

Client

Connection

ConnectionManager

Logger

Server

        Show:

            <input type="checkbox" id="api-show-inherited" checked>
            Inherited

            <input type="checkbox" id="api-show-protected">
            Protected

            <input type="checkbox" id="api-show-private">
            Private

            <input type="checkbox" id="api-show-deprecated">
            Deprecated

File: ../src/connection.js

var _ = require("underscore");
var EventEmitter = require("events").EventEmitter;
var Crypto = require("crypto");

var Logger = require("./logger");
var ConnectionConstants = require("./constants").ConnectionConstants;
var OpCodes = require("./constants").WebSocketOpCodes;

/**
 * @class Connection
 * @constructor
 */
var Connection = module.exports = function($options) {

	this.cid = "cid" + Connection._cidCounter++;
	_.extend(this, $options);
	this.__initialize();
};

Connection.prototype = Object.create(EventEmitter.prototype, {

	// ============================================================
	// === Public Properties ======================================
	// ============================================================

	/**
	 * @property cid
	 * @type String
	 */
	cid: {
		value: undefined,
		writable: true
	},

	/**
	 * @property socket
	 * @type {net.Socket}
	 */
	socket: {
		value: undefined,
		writable: true
	},

	/**
	 * @property type
	 * @type {String}
	 * @default SOCKET
	 */
	type: {
		value: Connection.TYPE_SOCKET,
		writable: true
	},

	// ============================================================
	// === Getters/Setters ========================================
	// ============================================================

	remotePort:{
		get:function(){
			return this.socket.remotePort;
		}
	},

	// ============================================================
	// === Public Methods =========================================
	// ============================================================

	/**
	 * @method sendMessage
	 * @param {String} $msg
	 */
	sendMessage: {
		value: function($msg) {
			if (this.type !== Connection.TYPE_WEB_SOCKET) {
				try {
					this.socket.write($msg);
				} catch (e) {
					console.log("could not send message to client");
				}
			} else {
				var payload = new Buffer($msg, "utf8");
				this.socket.write(this.__encodeMessage(payload));
			}
		}
	},

	/**
	 *
	 */
	close: {
		value: function() {
			this.socket.close();
		}
	},

	// ============================================================
	// === Private Methods ========================================
	// ============================================================

	/**
	 * @method __initialize
	 * @private
	 */
	__initialize: {
		value: function() {

			if(_.isUndefined(this.socket)){
				Logger.error("No socket found. Could not initialize the connection object.");
				return;
			}

			var delegate = this;

			this.socket.on("data", function($buffer) {
				var data = String($buffer);
				if (data.search("WebSocket") !== -1) {
					delegate.type = Connection.TYPE_WEB_SOCKET;
					delegate.__completeWebSocketHandshake(data);
				} else {
					var buffer = $buffer;
					// send out the content to all the clients
					if (delegate.type === Connection.TYPE_WEB_SOCKET) {
						buffer = delegate.__processWebSocketBuffer($buffer);
					}
					delegate.emit(Connection.EVENT_DATA, buffer);
				}
			});

			this.socket.on("error", function(error) {
				console.log("socket error");
				delegate.emit(Connection.EVENT_ERROR, error);
			});

			// connection closed
			this.socket.on("close", function(hadError) {
				delegate.emit(Connection.EVENT_CLOSE, hadError);
			});

		}
	},

	/**
	 * @method __completeWebSocketHandshake
	 * @param {String} $data
	 * @private
	 */
	__completeWebSocketHandshake: {
		value: function($data) {

			var clean = $data.replace(/\s+/gm, "");
			var pattern = /Sec-WebSocket-Key(.*)(?=Sec-WebSocket-Version)/g;
			var secWsKey = clean.match(pattern)[0].split(":")[1];
			var magicString = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
			var hash = Crypto.createHash('SHA1').update(secWsKey + magicString).digest('base64');
			var handshake = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n" +
				"Upgrade: WebSocket\r\n" +
				"Connection: Upgrade\r\n" +
				"Sec-WebSocket-Accept: " + hash + "\r\n" +
				"\r\n";

			this.socket.write(handshake);
		}
	},

	/**
	 * @method __encodeMessage
	 * @param {String} $msg
	 * @private
	 */
	__encodeMessage: {
		value: function($msg) {
			var payload = $msg;
			var buf;
			// first byte: fin and opcode
			var b1 = 0x80 | 1;
			// always send message as one frame (fin)

			// Second byte: mask and length part 1
			// Followed by 0, 2, or 8 additional bytes of continued length
			var b2 = 0; // server does not mask frames
			var length = payload.length;
			if (length < 126) {
				buf = new Buffer(payload.length + 2 + 0);
				// zero extra bytes
				b2 |= length;
				buf.writeUInt8(b1, 0);
				buf.writeUInt8(b2, 1);
				payload.copy(buf, 2);
			} else if (length < (1 << 16)) {
				buf = new Buffer(payload.length + 2 + 2);
				// two bytes extra
				b2 |= 126;
				buf.writeUInt8(b1, 0);
				buf.writeUInt8(b2, 1);
				// add two byte length
				buf.writeUInt16BE(length, 2);
				payload.copy(buf, 4);
			} else {
				buf = new Buffer(payload.length + 2 + 8);
				// eight bytes extra
				b2 |= 127;
				buf.writeUInt8(b1, 0);
				buf.writeUInt8(b2, 1);
				// add eight byte length
				// note: this implementation cannot handle lengths greater than 2^32
				// the 32 bit length is prefixed with 0x0000
				buf.writeUInt32BE(0, 2);
				buf.writeUInt32BE(length, 6);
				payload.copy(buf, 10);
			}
			return buf;
		}
	},

	/**
	 * @method __processWebSocketBuffer
	 * @param {Buffer} $buffer
	 * @private
	 */
	__processWebSocketBuffer: {
		value: function($buffer) {

			var buf = $buffer;

			if (buf.length < 2) {
				// insufficient data read
				Logger.warn("Could not process web socket buffer, insufficient data read.");
				return null;
			}

			var idx = 2;

			var b1 = buf.readUInt8(0);
			var fin = b1 & 0x80;
			var opcode = b1 & 0x0f; // low four bits
			var b2 = buf.readUInt8(1);
			var mask = b2 & 0x80;
			var length = b2 & 0x7f; // low 7 bits

			if (length > 125) {
				if (buf.length < 8) {
					// insufficient data read
					Logger.warn("Could not process web socket buffer, insufficient data read.");
					return null;
				}

				if (length === 126) {
					length = buf.readUInt16BE(2);
					idx += 2;
				} else if (length === 127) {
					// discard high 4 bits because this server cannot handle huge lengths
					var highBits = buf.readUInt32BE(2);
					if (highBits !== 0) {
						console.log("close the server?");
						// this.close(1009, "");
					}
					length = buf.readUInt32BE(6);
					idx += 8;
				}
			}

			if (buf.length < idx + 4 + length) {
				// insufficient data read
				Logger.warn("Could not process web socket buffer, insufficient data read.");
				return null;
			}

			var maskBytes = buf.slice(idx, idx + 4);
			idx += 4;
			var payload = buf.slice(idx, idx + length);
			payload = this.__unmaskPayload(maskBytes, payload);

			return payload;
		}
	},

	/**
	 * @method __unmaskPayload
	 * @param {Array} $maskBytes
	 * @param {String} $data
	 * @private
	 */
	__unmaskPayload: {
		value: function($maskBytes, $data) {
			var payload = new Buffer($data.length);
			for (var i = 0; i < $data.length; i++) {
				payload[i] = $maskBytes[i % 4] ^ $data[i];
			}
			return payload;
		}
	},

	/**
	 * @method __handleFrame
	 * @param (Number} $opcode
	 * @private
	 */
	__handleFrame: {
		value: function($opcode, $buffer) {
			var payload;
			switch ($opcode) {
				case OpCodes.TEXT:
					payload = $buffer.toString("utf8");
					this.emit("data", $opcode, payload);
					break;
				case OpCodes.BINARY:
					payload = $buffer;
					this.emit("data", $opcode, payload);
					break;
				case OpCodes.PING:
					// Respond to pings with pongs
					this._doSend(OpCodes.PONG, $buffer);
					break;
				case OpCodes.PONG:
					// Ignore pongs
					break;
				case OpCodes.CLOSE:
					// Parse close and reason
					var code, reason;
					if ($buffer.length >= 2) {
						code = $buffer.readUInt16BE(0);
						reason = $buffer.toString("utf8", 2);
					}
					this.close(code, reason);
					this.emit("close", code, reason);
					break;
				default:
					this.close(1002, "unknown opcode");
			}
		}
	}
});

/**
 * @property _cidCounter
 * @for Connection
 * @private
 */
Connection._cidCounter = 0;

/**
 * @property WEB_SOCKET
 * @for Connection
 * @static
 */
Connection.TYPE_WEB_SOCKET = "websocket";

/**
 * @property SOCKET
 * @for Connection
 * @static
 */
Connection.TYPE_SOCKET = "socket";

Connection.EVENT_ERROR = "errorEvent";
Connection.EVENT_DATA = "dataEvent";
Connection.EVENT_CLOSE = "closeEvent";
Connection.EVENT_FLAGGED_FOR_REMOVAL = "flaggedForRemovalEvent";


text:
/**
 * Main controller for frontend
 */

var _ = require('lodash');

var api = require('../api');
var config = require('../config');

var frontendControllers;

frontendControllers = {

    index: function(req, res, next) {
        var types = null;

        api.types.getWithJobs().then(function(t) {
            types = t;
            return api.members.findAll();
        }).then(function(m) {
            var random = [];
            var members = [];
            var len = m.length;
            var maxLen = config().flash.number;

            if (len > maxLen) {
                for (; random.length < maxLen;) {
                    random.push(parseInt(Math.random() * len));
                    random = _.uniq(random);
                }

                random.forEach(function(rand) {
                    members.push(m[rand]);
                });
            } else {
                members = m;
            }

            var data = {
                title: 'Bigertech',
                meta_title: '笔戈招聘',
                types: types,
                members: members
            }

            res.render('index', data);
        });
    },

    job: function(req, res, next) {
        api.jobs.findById(req.params.id).then(function(job) {
            res.jsonp(job);
        }).otherwise(function(err) {
            res.jsonp(null);
        });
    }
};

module.exports = frontendControllers;


text:
//
//  FriendPickerViewController.m
//  speakEasy
//
//  Created by Rick Sullivan on 5/26/14.
//
//

#import "FriendPickerViewController.h"
#import "User.h"
#import "Guess.h"
#include <Firebase/Firebase.h>
#include "Constants.h"

@implementation FriendPickerViewController

@synthesize messageLabel, message;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor colorWithWhite:1 alpha:0.5];
    if (message) {
        messageLabel.text = message.text;
    }
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/* Called when the user selects a cell in the table. Updates scores accordingly */
- (void)handleFriendSelection:(User *)friend
{
    Guess *guess = [[Guess alloc] initWithMessage:message];
    [[User currentUser].guesses addObject:guess];

    if ([message.authorID isEqualToString:friend.userID]) {
        NSLog(@"Correct");

        /* Animate to show that the User was correct */
        UIImageView *imageToMove =[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"right.png"]];
        UIImageView *imageView =[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"right1.png"]];

        UIImageView *secondImageToMove = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"right.png"]];
        UIImageView *correctImageToMove = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"right1.png"]];
        correctImageToMove.frame = CGRectMake(0,0,100,100);

        secondImageToMove.frame = CGRectMake(700,700,100,100);
        imageToMove.frame = CGRectMake(0, 0, 100, 100);
        imageView.frame = CGRectMake(0, 0, 100, 100);
        [self.view addSubview:imageView];

        [self.view addSubview:imageToMove];
        [self.view addSubview:secondImageToMove];
        [self.view addSubview:correctImageToMove];

        // Move the image
        [UIView animateWithDuration:3.0 animations:^{
            imageToMove.frame = CGRectMake(700, 700.0, imageToMove.frame.size.width, imageToMove.frame.size.width);
            secondImageToMove.frame = CGRectMake(0.0, 700.0, secondImageToMove.frame.size.width, secondImageToMove.frame.size.width);
            imageView.frame = CGRectMake(700, 700.0, imageToMove.frame.size.width, imageView.frame.size.width);
            correctImageToMove.frame = CGRectMake(0.0, 700.0, correctImageToMove.frame.size.width, correctImageToMove.frame.size.width);

            } completion:^(BOOL finished){
                [self.navigationController popViewControllerAnimated:YES];
            }
         ];

        /* Update Firebase score */
        NSString *scoreURL = [NSString stringWithFormat:@"%@/users/%@/score", FIREBASE_PREFIX, [[User currentUser] userID]];
        Firebase *scoreFirebase = [[Firebase alloc] initWithUrl:scoreURL];

        __block FirebaseHandle handle = [scoreFirebase observeEventType:FEventTypeValue withBlock:^(FDataSnapshot *snapshot) {
            [scoreFirebase removeObserverWithHandle:handle];
            if(snapshot.value == [NSNull null]) {
                NSLog(@"this user has no score");
                [scoreFirebase setValue:@(0.05)];
            } else {
                NSNumber* data = snapshot.value;
                [scoreFirebase setValue:@(data.doubleValue + 0.05)];
            }
        }];

    } else {
        NSLog(@"Wrong");

        /* Animate to show that the User was incorrect */
        UIImageView *imageToMove =
        [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"wrong.png"]];
        UIImageView *secondImageToMove = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"wrong.png"]];
        secondImageToMove.frame = CGRectMake(100,100,100,100);
        imageToMove.frame = CGRectMake(0, 0, 100, 100);
        [self.view addSubview:imageToMove];
        [self.view addSubview:secondImageToMove];

        // Move the image
        [UIView animateWithDuration:3.0 animations:^{
            imageToMove.frame = CGRectMake(0, 700.0, imageToMove.frame.size.width, imageToMove.frame.size.width);
            secondImageToMove.frame = CGRectMake(0.0, 700.0, secondImageToMove.frame.size.width, secondImageToMove.frame.size.width);
        } completion:^(BOOL finished){
            [self.navigationController popViewControllerAnimated:YES];
        }
         ];

    }

    /* Persist Guess to DB */
    NSString *guessURL = [NSString stringWithFormat:@"%@/users/%@/guesses", FIREBASE_PREFIX, [[User currentUser] userID]];
    Firebase *guessFirebase = [[Firebase alloc] initWithUrl:guessURL];
    [[guessFirebase childByAutoId] setValue:@{@"authorID":guess.message.authorID, @"messageID":guess.message.messageID}];

    [[NSNotificationCenter defaultCenter] postNotificationName:USER_INFO_UPDATE object:nil];
}

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    /* Set delegate of FriendTableViewController when it is embedded in this VC */
    if ([segue.identifier isEqualToString:@"Embed"])
    {
        FriendTableViewController *vc = segue.destinationViewController;
        vc.delegate = self;
    }
}

@end


text:
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) > [puppeteer](./puppeteer.md) > [Protocol](./puppeteer.protocol.md) > [ApplicationCache](./puppeteer.protocol.applicationcache.md) > [ApplicationCache](./puppeteer.protocol.applicationcache.applicationcache.md) > [updateTime](./puppeteer.protocol.applicationcache.applicationcache.updatetime.md)

## Protocol.ApplicationCache.ApplicationCache.updateTime property

Application cache update time.

<b>Signature:</b>

```typescript
updateTime: number;
```


text:
<?
View::show_header('Manage Permissions');
?>

			Create a new permission set
			Back to tools

<?
$DB->query("
	SELECT
		p.ID,
		p.Name,
		p.Level,
		p.Secondary,
		COUNT(u.ID) + COUNT(DISTINCT l.UserID)
	FROM permissions AS p
		LEFT JOIN users_main AS u ON u.PermissionID = p.ID
		LEFT JOIN users_levels AS l ON l.PermissionID = p.ID
	GROUP BY p.ID
	ORDER BY p.Secondary ASC, p.Level ASC");
if ($DB->has_results()) {
?>

			Name
			Level
			User count
			Actions

<?	while (list($ID, $Name, $Level, $Secondary, $UserCount) = $DB->next_record()) { ?>

			<?=display_str($Name); ?>
			<?=($Secondary ? 'Secondary' : $Level) ?>
			<?=number_format($UserCount); ?>

				<a href="tools.php?action=permissions&id=<?=$ID ?>" class="brackets">Edit
				<a href="#" onclick="return confirmDelete(<?=$ID?>);" class="brackets">Remove

<?	} ?>

<?
} else { ?>

There are no permission classes.

<?
} ?>

<?
View::show_footer();
?>


text:
'use strict'

const express = require('express')

function capitalizeFirstLetter (string) {
  return string.charAt(0).toUpperCase() + string.slice(1)
}

/**
 * Construct the router to access models and operate on them
 * @function module:routes~getModelRoutes
 * @param  {DatabaseObject} db
 * @return {Express.Router}
 */
module.exports = function getModelRoutes (db) {
  const router = express.Router()

  let modelList = Object.keys(db.connection.models)
  .map((e) => {
    return e.toLowerCase()
  })
  .filter((e) => {
    return e !== 'user' // private models
  })

  router.route('/') // list of models available
  .get((req, res, next) => {
    res.status(200).json(modelList)
  })

  // param middleware to get the name of the model or 404 error
  function extractModelName (req, res, next, modelName) {
    if (modelList.indexOf(modelName) === -1) {
      let err = new Error(`No model ${modelName} found`)
      err.status = 404
      return next(err)
    }
    req['modelName'] = capitalizeFirstLetter(modelName)
    next()
  }

  // param middleware to retrieve the document
  function extractModelId (req, res, next, id) {
    db[req['modelName']].findById(id).exec()
    .then((obj) => {
      if (!obj) {
        let err = new Error(`No document with id ${id} in ${req['modelName']}`)
        err.status = 404
        return next(err)
      }
      req['model'] = obj
      next()
    })
    .catch((err) => {
      console.log(err)
      next(err)
    })
  }

  router.param('model', extractModelName)
  router.param('id', extractModelId)

  router.route('/:model') // list of documents for this model
  .get((req, res, next) => {
    db[req['modelName']].find({}).exec()
    .then((objList) => {
      res.status(200).json(objList)
    })
    .catch(err => {
      console.log(err)
      next(err)
    })
  })
  .post((req, res, next) => { // create a document
    let obj = new db[req['modelName']](req.body)
    obj.save()
    .then((dbObj) => {
      let uri =
        `http://${req.headers['host']}/model/${req['modelName']}/${dbObj.id}`
      console.log(`created: ${dbObj}`)
      res.status(201).location(uri).json(dbObj)
    })
    .catch(err => {
      console.log(err)
      next(err)
    })
  })

  // search on collection :model
  router.route('/:model/search')
  .post((req, res, next) => {
    db[req['modelName']].find(req['body']).exec()
    .then((objList) => {
      res.status(200).json(objList)
    })
    .catch(err => {
      console.log(err)
      next(err)
    })
  })

  router.route('/:model/:id')
  .get((req, res, next) => { // get a specific document
    res.status(200).json(req['model'])
  })
  .put((req, res, next) => { // update the model (all model)
    let updatedObj = req.body // accepts only json

    for (let prop in req['model']._doc) {
      if (prop !== '__v' && prop !== '_id') {
        req['model'][prop] = updatedObj[prop]
      }
    }

    req['model'].save()
    .then((newObj) => {
      console.log(`update: ${newObj}`)
      res.status(200).json(newObj)
    })
    .catch(err => {
      console.log(err)
      next(err)
    })
  })
  .patch((req, res, next) => { // user password case
    // if it's a user patch we set the password with the method
    if (req['modelName'] === 'User' && req['body'].password) {
      req['model'].setPassword(req['body'].password, () => {
        req['body'].password = undefined
        next()
      })
    } else {
      next()
    }
  })
  .patch((req, res, next) => { // update the model (just the parameters found)
    let updatedObj = req['body'] // accepts only json

    // update object
    for (let prop in updatedObj) {
      req['model'][prop] = updatedObj[prop]
    }

    // save the new object in the database and send it in the response
    req['model'].save()
    .then((newObj) => {
      console.log(`update: ${newObj}`)
      res.status(200).json(newObj)
    })
    .catch(err => {
      console.log(err)
      next(err)
    })
  })
  .delete((req, res, next) => { // delete the model
    req['model'].remove((err) => {
      if (err) {
        console.log(err)
        return next(err)
      }
      console.log(`remove: ${req['model']}`)
      res.status(200).json(req['model'])
    })
  })

  return router
}


text:
package org.apache.camel.component.sjms;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;

import javax.jms.Connection;
import javax.jms.MessageProducer;
import javax.jms.Session;

import org.apache.camel.AsyncCallback;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.RuntimeCamelException;
import org.apache.camel.component.sjms.jms.ConnectionResource;
import org.apache.camel.component.sjms.tx.SessionTransactionSynchronization;
import org.apache.camel.support.DefaultAsyncProducer;
import org.apache.commons.pool.BasePoolableObjectFactory;
import org.apache.commons.pool.impl.GenericObjectPool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Base SjmsProducer class.
 */
public abstract class SjmsProducer extends DefaultAsyncProducer {

    private static final Logger LOG = LoggerFactory.getLogger(SjmsProducer.class);

    /**
     * The {@link MessageProducerResources} pool for all {@link SjmsProducer}
     * classes.
     */
    protected class MessageProducerResourcesFactory extends BasePoolableObjectFactory<MessageProducerResources> {

        @Override
        public MessageProducerResources makeObject() throws Exception {
            return doCreateProducerModel(createSession());
        }

        @Override
        public void destroyObject(MessageProducerResources model) throws Exception {
            if (model.getMessageProducer() != null) {
                model.getMessageProducer().close();
            }

            if (model.getSession() != null) {
                try {
                    if (model.getSession().getTransacted()) {
                        try {
                            model.getSession().rollback();
                        } catch (Exception e) {
                            // Do nothing. Just make sure we are cleaned up
                        }
                    }
                    model.getSession().close();
                } catch (Exception e) {
                    // TODO why is the session closed already?
                }
            }
        }
    }

    private GenericObjectPool<MessageProducerResources> producers;
    private ExecutorService executor;
    private Future<?> asyncStart;

    public SjmsProducer(Endpoint endpoint) {
        super(endpoint);
    }

    @Override
    protected void doStart() throws Exception {
        super.doStart();

        this.executor = getEndpoint().getCamelContext().getExecutorServiceManager().newDefaultThreadPool(this, "SjmsProducer");
        if (getProducers() == null) {
            setProducers(new GenericObjectPool<>(new MessageProducerResourcesFactory()));
            getProducers().setMaxActive(getProducerCount());
            getProducers().setMaxIdle(getProducerCount());
            getProducers().setLifo(false);
            if (getEndpoint().isPrefillPool()) {
                if (getEndpoint().isAsyncStartListener()) {
                    asyncStart = getEndpoint().getComponent().getAsyncStartStopExecutorService().submit(new Runnable() {
                        @Override
                        public void run() {
                            try {
                                fillProducersPool();
                            } catch (Throwable e) {
                                LOG.warn("Error filling producer pool for destination: " + getDestinationName() + ". This exception will be ignored.", e);
                            }
                        }

                        @Override
                        public String toString() {
                            return "AsyncStartListenerTask[" + getDestinationName() + "]";
                        }
                    });
                } else {
                    fillProducersPool();
                }
            }
        }
    }

    private void fillProducersPool() throws Exception {
        while (producers.getNumIdle() < producers.getMaxIdle()) {
            producers.addObject();
        }
    }

    @Override
    protected void doStop() throws Exception {
        super.doStop();
        if (asyncStart != null && !asyncStart.isDone()) {
            asyncStart.cancel(true);
        }
        if (getProducers() != null) {
            if (getEndpoint().isAsyncStopListener()) {
                getEndpoint().getComponent().getAsyncStartStopExecutorService().submit(new Runnable() {
                    @Override
                    public void run() {
                        try {
                            getProducers().close();
                            setProducers(null);
                        } catch (Throwable e) {
                            LOG.warn("Error closing producers on destination: " + getDestinationName() + ". This exception will be ignored.", e);
                        }
                    }

                    @Override
                    public String toString() {
                        return "AsyncStopListenerTask[" + getDestinationName() + "]";
                    }
                });
            } else {
                getProducers().close();
                setProducers(null);
            }
        }
        if (this.executor != null) {
            getEndpoint().getCamelContext().getExecutorServiceManager().shutdownGraceful(this.executor);
        }
    }

    @Override
    public SjmsEndpoint getEndpoint() {
        return (SjmsEndpoint) super.getEndpoint();
    }

    protected MessageProducerResources doCreateProducerModel(Session session) throws Exception {
        MessageProducerResources answer;
        try {
            MessageProducer messageProducer = getEndpoint().getJmsObjectFactory().createMessageProducer(session, getEndpoint());

            answer = new MessageProducerResources(session, messageProducer, getCommitStrategy());

        } catch (Exception e) {
            LOG.error("Unable to create the MessageProducer", e);
            throw e;
        }
        return answer;
    }

    protected Session createSession() throws Exception {
        ConnectionResource connectionResource = getOrCreateConnectionResource();
        Connection conn = connectionResource.borrowConnection();
        try {
            return conn.createSession(isEndpointTransacted(), getAcknowledgeMode());
        } catch (Exception e) {
            LOG.error("Unable to create the Session", e);
            throw e;
        } finally {
            connectionResource.returnConnection(conn);
        }
    }

    protected interface ReleaseProducerCallback {
        void release(MessageProducerResources producer) throws Exception;
    }

    protected class CloseProducerCallback implements ReleaseProducerCallback {
        @Override
        public void release(MessageProducerResources producer) throws Exception {
            producer.getMessageProducer().close();
        }
    }

    protected class ReturnProducerCallback implements ReleaseProducerCallback {
        @Override
        public void release(MessageProducerResources producer) throws Exception {
            getProducers().returnObject(producer);
        }
    }

    public abstract void sendMessage(Exchange exchange, AsyncCallback callback, MessageProducerResources producer, ReleaseProducerCallback releaseProducerCallback) throws Exception;

    @Override
    public boolean process(final Exchange exchange, final AsyncCallback callback) {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Processing Exchange.id:{}", exchange.getExchangeId());
        }

        try {
            final MessageProducerResources producer;
            final ReleaseProducerCallback releaseProducerCallback;
            if (isEndpointTransacted() && isSharedJMSSession()) {
                Session session = exchange.getIn().getHeader(SjmsConstants.JMS_SESSION, Session.class);
                if (session != null && session.getTransacted()) {
                    // Join existing transacted session - Synchronization must have been added
                    // by the session initiator
                    producer = doCreateProducerModel(session);
                    releaseProducerCallback = new CloseProducerCallback();
                } else {
                    // Propagate JMS session and register Synchronization as an initiator
                    producer = getProducers().borrowObject();
                    releaseProducerCallback = new ReturnProducerCallback();
                    exchange.getIn().setHeader(SjmsConstants.JMS_SESSION, producer.getSession());
                    exchange.getUnitOfWork().addSynchronization(new SessionTransactionSynchronization(producer.getSession(), producer.getCommitStrategy()));
                }
            } else {
                producer = getProducers().borrowObject();
                releaseProducerCallback = new ReturnProducerCallback();
                if (isEndpointTransacted()) {
                    exchange.getUnitOfWork().addSynchronization(new SessionTransactionSynchronization(producer.getSession(), producer.getCommitStrategy()));
                }
            }

            if (producer == null) {
                exchange.setException(new Exception("Unable to send message: connection not available"));
            } else {
                if (!isSynchronous()) {
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("  Sending message asynchronously: {}", exchange.getIn().getBody());
                    }
                    getExecutor().execute(new Runnable() {
                        @Override
                        public void run() {
                            try {
                                sendMessage(exchange, callback, producer, releaseProducerCallback);
                            } catch (Exception e) {
                                RuntimeCamelException.wrapRuntimeCamelException(e);
                            }
                        }
                    });
                } else {
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("  Sending message synchronously: {}", exchange.getIn().getBody());
                    }
                    sendMessage(exchange, callback, producer, releaseProducerCallback);
                }
            }
        } catch (Exception e) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Processing Exchange.id:{}", exchange.getExchangeId() + " - FAILED");
            }
            if (LOG.isDebugEnabled()) {
                LOG.trace("Exception: {}", e.getLocalizedMessage(), e);
            }
            exchange.setException(e);
        }
        LOG.debug("Processing Exchange.id:{}", exchange.getExchangeId() + " - SUCCESS");

        return isSynchronous();
    }

    /**
     * @deprecated use {@link #getOrCreateConnectionResource()}
     */
    @Deprecated
    protected ConnectionResource getConnectionResource() {
        return getEndpoint().getConnectionResource();
    }

    protected ConnectionResource getOrCreateConnectionResource() {
        ConnectionResource answer = getEndpoint().getConnectionResource();
        if (answer == null) {
            answer = getEndpoint().createConnectionResource(this);
        }
        return answer;
    }

    /**
     * Gets the acknowledgment mode for this instance of DestinationProducer.
     *
     * @return int
     */
    public int getAcknowledgeMode() {
        return getEndpoint().getAcknowledgementMode().intValue();
    }

    /**
     * Gets the synchronous value for this instance of DestinationProducer.
     *
     * @return true if synchronous, otherwise false
     */
    public boolean isSynchronous() {
        return getEndpoint().isSynchronous();
    }

    /**
     * Gets the replyTo for this instance of DestinationProducer.
     *
     * @return String
     */
    public String getReplyTo() {
        return getEndpoint().getNamedReplyTo();
    }

    /**
     * Gets the destinationName for this instance of DestinationProducer.
     *
     * @return String
     */
    public String getDestinationName() {
        return getEndpoint().getDestinationName();
    }

    /**
     * Sets the producer pool for this instance of SjmsProducer.
     *
     * @param producers A MessageProducerPool
     */
    public void setProducers(GenericObjectPool<MessageProducerResources> producers) {
        this.producers = producers;
    }

    /**
     * Gets the MessageProducerPool value of producers for this instance of
     * SjmsProducer.
     *
     * @return the producers
     */
    public GenericObjectPool<MessageProducerResources> getProducers() {
        return producers;
    }

    /**
     * Test to verify if this endpoint is a JMS Topic or Queue.
     *
     * @return true if it is a Topic, otherwise it is a Queue
     */
    public boolean isTopic() {
        return getEndpoint().isTopic();
    }

    /**
     * Test to determine if this endpoint should use a JMS Transaction.
     *
     * @return true if transacted, otherwise false
     */
    public boolean isEndpointTransacted() {
        return getEndpoint().isTransacted();
    }

    /**
     * Test to determine if this endpoint should share a JMS Session with other SJMS endpoints.
     *
     * @return true if shared, otherwise false
     */
    public boolean isSharedJMSSession() {
        return getEndpoint().isSharedJMSSession();
    }

    /**
     * Returns the named reply to value for this producer
     *
     * @return true if it is a Topic, otherwise it is a Queue
     */
    public String getNamedReplyTo() {
        return getEndpoint().getNamedReplyTo();
    }

    /**
     * Gets the producerCount for this instance of SjmsProducer.
     *
     * @return int
     */
    public int getProducerCount() {
        return getEndpoint().getProducerCount();
    }

    /**
     * Gets consumerCount for this instance of SjmsProducer.
     *
     * @return int
     */
    public int getConsumerCount() {
        return getEndpoint().getConsumerCount();
    }

    /**
     * Gets the executor for this instance of SjmsProducer.
     *
     * @return ExecutorService
     */
    public ExecutorService getExecutor() {
        return executor;
    }

    /**
     * Gets the ttl for this instance of SjmsProducer.
     *
     * @return long
     */
    public long getTtl() {
        return getEndpoint().getTtl();
    }

    /**
     * Gets the boolean value of persistent for this instance of SjmsProducer.
     *
     * @return true if persistent, otherwise false
     */
    public boolean isPersistent() {
        return getEndpoint().isPersistent();
    }

    /**
     * Gets responseTimeOut for this instance of SjmsProducer.
     *
     * @return long
     */
    public long getResponseTimeOut() {
        return getEndpoint().getResponseTimeOut();
    }

    /**
     * Gets commitStrategy for this instance of SjmsProducer.
     *
     * @return TransactionCommitStrategy
     */
    protected TransactionCommitStrategy getCommitStrategy() {
        if (isEndpointTransacted()) {
            return getEndpoint().getTransactionCommitStrategy();
        }
        return null;
    }

}


text:
// Copyright (c) MOSA Project. Licensed under the New BSD License.

namespace Mosa.Utility.DebugEngine
{
	public static class DebugCode
	{
		public const int Connecting = 10;
		public const int Connected = 11;
		public const int Disconnected = 12;

		public const int UnknownData = 99;

		public const int Alive = 1000;
		public const int Ready = 1001;
		public const int Ping = 1002;
		public const int InformationalMessage = 1003;
		public const int WarningMessage = 1004;
		public const int ErrorMessage = 1005;
		public const int SendNumber = 1006;
		public const int ReadMemory = 1010;
		public const int WriteMemory = 1011;
		public const int ReadCR3 = 1012;
		public const int Scattered32BitReadMemory = 1013;
		public const int ClearMemory = 1014;

		public const int CompressedWriteMemory = 1021;

		public const int HardJump = 1111;

		public const int ExecuteUnitTest = 2000;
		public const int AbortUnitTest = 2001;
	}
}


text:
layout: study--newsletter
title: 'Thanksgiving break'
number: '57'
date: '2018-10-07 09:00:00'
published: true
---

Hia! Taking today off to drive in the countryside and visit with family and friends. Hope you get a chance to relax and reflect this weekend. All the best for the week ahead!

Lucas


text:
* Avoids using deprecated DartType.element2.

## 1.0.14

* Bumps go_router version in example folder to v5.0.0.
* Bumps flutter version to 3.3.0.

## 1.0.13

* Supports the latest `package:analyzer`.

## 1.0.12

* Adds support for enhanced enums. [#105876](https://github.com/flutter/flutter/issues/105876).

## 1.0.11

* Replace mentions of the deprecated `GoRouteData.buildPage` with `GoRouteData.buildPageWithState`.

## 1.0.10

* Adds a lint ignore for deprecated member in the example.

## 1.0.9

* Fixes lint warnings.

## 1.0.8

* Updates `analyzer` to 4.4.0.
* Removes the usage of deprecated API in `analyzer`.

## 1.0.7

* Supports newer versions of `analyzer`.

## 1.0.6

* Uses path-based deps in example.

## 1.0.5

* Update example to avoid using `push()` to push the same page since is not supported. [#105150](https://github.com/flutter/flutter/issues/105150)

## 1.0.4

* Adds `push` method to generated GoRouteData's extension. [#103025](https://github.com/flutter/flutter/issues/103025)

## 1.0.3

* Fixes incorrect separator at location path on Windows. [#102710](https://github.com/flutter/flutter/issues/102710)

## 1.0.2

* Changes the parameter name of the auto-generated `go` method from `buildContext` to `context`.

## 1.0.1

* Documentation fixes. [#102713](https://github.com/flutter/flutter/issues/102713).

## 1.0.0

* First release.


text:
package echo.engineer.oneactivity.app.fragments;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import echo.engineer.oneactivity.R;
import engineer.echo.oneactivity.core.MasterFragment;

/**
 * CameraFragment
 * Created by Plucky<plucky@echo.engineer> on 7/13/17 2017 15:48.
 */

public class CameraFragment extends MasterFragment {

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_camera, container, false);
    }
}


text:
require "zlib"
require "reflexive/variables_scope"

module Reflexive
  class ParseTreeTopDownWalker
    def initialize(events_tree)
      @events_tree = events_tree
      @local_variables = []
      @dynamic_variables = []
      @variables_scope_id = 1
      VariablesScope.reset_guid
      # empty - top level
      # ["Module", "Class"] - class Class in module Module, class dev level
      # ["Module", "Class", :instance] - class Class in module Module, instance level
      @scope = [] # @scope.last - is basically "implicit self"
      # also used for constant lookup
    end

    def push_namespace_scope(namespace_name)
      @scope << namespace_name
    end

    def push_namespace_instance_scope
      @scope << :instance
    end

    def pop_namespace_scope
      @scope.pop
    end

    def current_variables_scope
      (@dynamic_variables.size > 0 ? @dynamic_variables : @local_variables).last
    end

    def add_local_variable(scanner_event)
      current_variables_scope.merge!(scanner_event[:ident] => scanner_event)
      local_variable_assignment(scanner_event)
    end

    def variables_scope
      merged_scope = @dynamic_variables.dup.reverse
      merged_scope << @local_variables.last if @local_variables.size > 0
      merged_scope
    end

    # TODO crazy, replace that with something more appropriate
    def variables_scope_id
      current_variables_scope.guid
    end

    def local_variable_defined?(name)
      variables_scope.any? { |variables| variables.has_key?(name) }
    end

    def local_variable_scope_id(name)
      variables_scope.detect { |variables| variables.has_key?(name) }.guid
    end

    def add_local_variables_from_lhs(lhs_event)
      # [:var_field, {:ident=>"v1"}]
      if lhs_event[0] == :var_field
        if (scanner_event = lhs_event[1]).is_a?(Hash)
          if scanner_event[:ident]
            add_local_variable(scanner_event)
          end
        end
      end
      # raise "don't know how to add local variables from lhs_event : #{ lhs_event }"
    end

    def add_local_variables_from_mlhs(mlhs_event)
      # [{:ident=>"a"}, {:ident=>"b"}],
      if mlhs_event.is_a?(Array)
        if mlhs_event[0] == :mlhs_add_star
          add_local_variables_from_mlhs(mlhs_event[1])
          add_local_variable(mlhs_event[2]) if mlhs_event[2][:ident]
          add_local_variables_from_mlhs(mlhs_event[3]) if mlhs_event[3].is_a?(Array)
        else
          mlhs_event.each do |event|
            next unless scanner_event?(event)
            if event[:ident]
              add_local_variable(event)
            end
          end
        end
      end
      # raise "don't know how to add local variables from lhs_event : #{ lhs_event }"
    end

    def add_local_variables_from_params_event(params_event)
      return unless params_event
      params_event = params_event[1] if params_event[0] == :paren # ?
      found = false

      if options_arguments = params_event[2]
        options_arguments.each do |optional_argument|
          if scanner_event?(event = optional_argument[0])
            add_local_variable(event)
            keep_walking(optional_argument[1..-1])
          end
        end
      end

      for scanner_event in extract_scanner_events_from_tree(params_event.values_at(1,3,4,5))
        if scanner_event[:ident]
          found = true
          add_local_variable(scanner_event)
        end
      end
      # raise "don't know how to add local variables from params_event: #{ params_event }" unless found
    end

    def extract_scanner_events_from_tree(tree)
      tree.flatten.select { |e| scanner_event?(e) }
    end

    def push_local_variables_context
      @local_variables << VariablesScope.new
    end

    def pop_local_variables_context
      @local_variables.pop
    end

    def push_dynamic_variables_context
      @dynamic_variables << VariablesScope.new
    end

    def pop_dynamic_variables_context
      @dynamic_variables.pop
    end

    def walk(event = @events_tree)
      type, *args = event
      if respond_to?("on_#{ type }")
        send("on_#{ type }", *args) #rescue r($!, event)
      else
        on_default(type, args)
      end
    end

    def on_default(type, event_args)
      return unless event_args # no-args event
      event_args.each do |arg|
        if arg == nil
          # empty arg - pass

          # why the following isn't reported with scanner events?
        elsif type == :call && [:".", :"::"].include?(arg)
        elsif type == :var_ref && [:".", :"::"].include?(arg)
        elsif type == :field && [:".", :"::"].include?(arg)
        elsif type == :command_call && ([:".", :"::"].include?(arg) || arg == false)
        elsif type == :args_add_block && arg == false
        elsif type == :unary && arg.is_a?(Symbol)
        elsif type == :binary && arg.is_a?(Symbol)
        elsif scanner_event?(arg)
          # scanner event - pass
        elsif (parser_events?(arg) rescue r(type, event_args))
          arg.each do |event|
            walk(event)
          end
        elsif parser_event?(arg)
          walk(arg)
        end
      end
    end

    def keep_walking(*args)
      on_default(nil, args)
    end

    def on_program(body)
      push_local_variables_context
      keep_walking(body)
      pop_local_variables_context
    end

    def on_def(name, params, body)
      push_local_variables_context
      # TODO this is hack :(
      push_namespace_instance_scope unless @in_singleton_class_defition
      add_local_variables_from_params_event(params)
      keep_walking(body)
      pop_namespace_scope unless @in_singleton_class_defition
      pop_local_variables_context
    end

    def on_defs(target, period, name, params, body)
      push_local_variables_context
      add_local_variables_from_params_event(params)
      keep_walking(body)
      pop_local_variables_context
    end

    def on_class(name, ancestor, body)
      keep_walking(name, ancestor)
      push_local_variables_context
      push_namespace_scope(resolve_constant_ref(name))
      keep_walking(body)
      pop_namespace_scope
      pop_local_variables_context
    end

    def on_sclass(target, body)
      push_local_variables_context
      @in_singleton_class_defition = true
      keep_walking(body)
      @in_singleton_class_defition = false
      pop_local_variables_context
    end

    def on_module(name, body)
      keep_walking(name)
      push_local_variables_context
      push_namespace_scope(resolve_constant_ref(name))
      keep_walking(body)
      pop_namespace_scope
      pop_local_variables_context
    end

    def on_do_block(params, body)
      push_dynamic_variables_context
      add_local_variables_from_params_event(params)
      keep_walking(body)
      pop_dynamic_variables_context
    end

    def on_brace_block(params, body)
      push_dynamic_variables_context
      add_local_variables_from_params_event(params)
      keep_walking(body)
      pop_dynamic_variables_context
    end

    def on_assign(lhs, rhs)
      add_local_variables_from_lhs(lhs)
      keep_walking(rhs)
    end

    def on_massign(mlhs, mrhs)
      add_local_variables_from_mlhs(mlhs)
      keep_walking(mrhs)
    end

    def on_command(operation, command_args)
      method_call(operation, nil) if is_ident?(operation)
      if operation[:ident] == "autoload" &&
              (arguments = resolve_arguments(command_args))

        if [:const, :tstring_content].include?(arguments[0].keys.first)
          constant_access(arguments[0], arguments[0].values.first)
        end
      end
      keep_walking(command_args)
    end

    def resolve_arguments(arguments)
      arguments = arguments[1] if arguments[0] == :arg_paren
      if arguments[0] == :args_add_block
        if arguments[1].is_a?(Array)
          arguments[1].map { |a| resolve_argument(a) }
        end
      end
    end

    def resolve_argument(argument)
      if argument[0] == :symbol_literal
        # [:symbol_literal, [:symbol, {:const=>"C"}]]
        if argument[1].is_a?(Array)
          if argument[1][0] == :symbol
            argument[1][1] # {:const=>"C"}
          end
        end
      elsif argument[0] == :string_literal
        # [:string_literal, [:string_content, {:tstring_content=>"C"}]]
        if argument[1].is_a?(Array)
          if argument[1][0] == :string_content
            argument[1][1] # {:tstring_content=>"C"}
          end
        end
      end
    end

    def on_fcall(operation)
      method_call(operation, nil) if is_ident?(operation)
    end

    def on_method_add_arg(method, arguments)

      if method[0] == :fcall &&
              scanner_event?(method[1]) &&
              method[1][:ident] == "autoload"
        if arguments = resolve_arguments(arguments)
          if [:const, :tstring_content].include?(arguments[0].keys.first)
            constant_access(arguments[0], arguments[0].values.first)
          end
        end
      end
      keep_walking(method, arguments)
    end

    # primary_value => anything
    # operation2	: tIDENTIFIER
    #		| tCONSTANT
    #		| tFID
    #		| op
    #		;
    # command_args => anything
    def on_command_call(receiver, dot, method, args)
      if is_ident?(method) &&
              (constant = resolve_constant_ref(receiver))
        method_call(method, [constant])
      end
      keep_walking(receiver, args)
    end

    def resolve_constant_ref(events)
      if events[0] == :var_ref || events[0] == :const_ref &&
              scanner_event?(events[1]) &&
              events[1][:const]
        events[1][:const]
      elsif events[0] == :top_const_ref &&
              scanner_event?(events[1]) &&
              events[1][:const]
        "::" + events[1][:const]
      elsif events[0] == :const_path_ref &&
              (constant = resolve_constant_ref(events[1]))
        "#{ constant }::#{ events[2][:const] }"
      end
    end

    def resolve_receiver(receiver)
      resolve_constant_ref(receiver)
    end

    #  [:call,
    #             [:var_ref, {:ident=>"subclasses"}]
    def on_call(receiver, dot, method)
      if rcv = resolve_receiver(receiver)
        method_call(method, [rcv])
      end

      keep_walking(receiver)
    end

    def on_var_ref(ref_event)
      # [:var_ref, {:kw=>"false"}]
      # [:var_ref, {:cvar=>"@@subclasses"}]
      # [:var_ref, {:ident=>"child"}] (sic!)
      #   [:binary,
#                 [:var_ref, {:ident=>"nonreloadables"}],
#                 :<<,
#                 [:var_ref, {:ident=>"klass"}]
      #
      #[:call,
#                 [:var_ref, {:ident=>"klass"}],
#                 :".",
#                 {:ident=>"instance_variables"}],
      #
      #
      if scanner_event?(ref_event)
        if ref_event[:ident]
          if local_variable_defined?(ref_event[:ident])
            local_variable_access(ref_event)
          else
            method_call(ref_event, nil)
          end
        elsif ref_event[:const]
          constant_access(ref_event)
        end
      end
    end

    def on_const_ref(const_ref_event)
      if scanner_event?(const_ref_event)
        if const_ref_event[:const]
          constant_access(const_ref_event)
        end
      end
    end

    def on_const_path_ref(primary_value, name)
      keep_walking(primary_value)
      if (constant = resolve_constant_ref(primary_value)) &&
              scanner_event?(name) && name[:const]
        constant_access(name, "#{ constant }::#{ name[:const] }")
      end
    end

    def method_call(scanner_event, receiver, *args)
      unless receiver
        # implict self concept (will be fetched from constant_access_scope)
        receiver = @scope.last == :instance ? :instance : :class
      end
      merge_tags(scanner_event,
                 {:method_call =>
                         {:name => scanner_event[:ident],
                          :receiver => receiver,
                          :scope => constant_access_scope}})
    end

    def local_variable_access(scanner_event)
      existing_variable_id = "#{ local_variable_scope_id(scanner_event[:ident]) }:#{ scanner_event[:ident] }"
      merge_tags(scanner_event,
                 :local_variable_access => existing_variable_id )
    end

    def constant_access_scope
      scope = @scope.dup
      scope.pop if scope.last == :instance # class/instance doesn't matter for constant lookup
      scope
    end

    def constant_access(scanner_event, name = nil)
      unless name
        name = scanner_event[:const]
      end
      merge_tags(scanner_event,
                 :constant_access => { :name => name,
                                       :scope => constant_access_scope })
    end

    def local_variable_assignment(scanner_event)
      merge_tags(scanner_event,
                 :local_variable_assignment => variable_id(scanner_event))
    end

    def variable_id(scanner_event)
      "#{ variables_scope_id }:#{ scanner_event[:ident] }"
    end

    def merge_tags(scanner_event, tags)
      scanner_event[:tags] ||= {}
      scanner_event[:tags].merge!(tags)
    end

    def scanner_event?(event)
      event.is_a?(Hash)
    end

    def parser_event?(event)
      event.is_a?(Array) && event[0].is_a?(Symbol)
    end

    def parser_events?(events)
      events.all? { |event| parser_event?(event) }
    end

    def is_ident?(event)
      scanner_event?(event) && event[:ident]
    end
  end
end


text:
angular.module('ac.controllers', ['ngMaterial'])
    .controller('ContentController', ['$scope', '$rootScope', '$q', 'ACFSServices', '$mdDialog', '$mdMedia', 'ACSockets', 'ACZip',
      function($scope, $rootScope, $q, ACFSServices, $mdDialog, $mdMedia, ACSockets, ACZip) {

      var totalDefer,
          deferreds = {},
          promises = [];

      $scope.methods = {
        analyze: function() {
          // asumo que si no hay errores está todo ok
          $scope.data.projectOK = true;
          // reseteo la lista de items
          $scope.data.items = [];
          // reseteo la lista de archivos
          $scope.data.files = [];
          // Genero un listado de TODOS los archivos del proyecto
          ACFSServices.listFiles(ACFSServices.root());
          // proceso SOLO los archivos necesarios
          ACFSServices.processFiles(ACFSServices.root(), (/\.(xml|java)$/i), function(item) {
            var _item = item;
            ACFSServices.readFileContent(item.fullPath, 'text', function(content) {
              var parts = _item.name.split('.');
              ACSockets.analyze({
                file: content,
                name: _item.name,
                fullPath: _item.fullPath,
                extension: parts[parts.length-1],
                platform: $scope.data.platform.type,
                profile: $scope.data.profile.id
              });
            });
          });
          $scope.data.running = true;
        },
        generateZip: function() {
          var promises = [];
          var totalDefer = $q.defer();
          var count = 0;
          ACFSServices.processFiles(ACFSServices.root(), (/(.+)/i), function(item) {
            var _item = item;
            var defer = $q.defer();
            promises.push(defer.promise);
            ACFSServices.readFileContent(item.fullPath, 'binary', function(content) {
              ACZip.addFile(_item.fullPath, content);
              defer.resolve();
              count = count + 1;
              if(count == $scope.data.files.length) {
                totalDefer.resolve(promises);
              }
            });
          });
          return totalDefer.promise;
        },
        process: function() {
          totalDefer = $q.defer();
          deferreds = {};
          promises = [];
          // solo me quedo con los errores que modifican el código
          var blockGroups = _.chain($scope.data.items).filter(function(item) { return !item.onlyHint; }).groupBy('fullPath').value();
          // aplicar los cambios seleccionados
          var index = 0,
              length = Object.keys(blockGroups).length;
          _.each(blockGroups, function(blocks) {
            var _blocks = blocks;
            ACFSServices.readFileContent(_blocks[0].fullPath, 'text', function(content) {
              var response = ACSockets.process({
                blocks: _blocks,
                code: content
              });
              // guardo los deferreds para resolver más adelante cuando se procese el archivo
              deferreds[response.id] = response.defer;
              // guardo las promesas para descargar el zip cuando se resuelvan todas
              promises.push(response.promise);
              // si ya se procesaron todos los archivos, resolver la promesa
              if(index == length - 1) {
                totalDefer.resolve(promises);
              }
              index = index + 1;
            });
          });
          // cuando todos los archivos fueron procesados, genero el zip
          totalDefer.promise.then(function(promises) {
            $q.when.apply(null, promises).then(function() {
              $scope.methods.generateZip().then(function(promises) {
                $q.when.apply(null, promises).then(function() {
                  ACZip.getZip();
                  $scope.data.items = [];
                });
              });
            });
          });
        },
        pickProject: function() {
          $rootScope.$broadcast('ac:pick-project');
          $scope.data.running = false;
          $scope.data.projectOK = false;
        },
        countSelected: function() {
          var count = 0;
          angular.forEach($scope.data.items, function(item) {
            if(item.selected || item.onlyHint) {
              count = count + 1;
            }
          });
          $scope.data.itemsSelectedCount = count;
        },
        selectAll: function() {
          angular.forEach($scope.data.items, function(item) {
            item.selected = true;
          });
          $scope.data.itemsSelectedCount = $scope.data.items.length;
        },
        selectNone: function() {
          angular.forEach($scope.data.items, function(item) {
            item.selected = false;
          });
          $scope.data.itemsSelectedCount = 0;
        },
        showCode: function(event, item) {
          event.preventDefault();
          event.stopPropagation();

          var _item = item;

          ACFSServices.readFileContent(item.fullPath, 'text', function(content) {

            var useFullScreen = ($mdMedia('sm') || $mdMedia('xs'))  && $scope.customFullscreen;
            $mdDialog.show({
              controller: function DialogController($scope, $mdDialog) {

                $scope.data = {
                  name: _item.name,
                  content: content,
                  extension: _item.extension,
                  start: _item.startLine,
                  stop: _item.stopLine
                };

                $scope.close = function() {
                  $mdDialog.cancel();
                };
              },
              templateUrl: 'partials/dialog.code.tmpl.html',
              parent: angular.element(document.body),
              targetEvent: event,
              clickOutsideToClose:true,
              fullscreen: useFullScreen
            });

            $scope.$watch(function() {
              return $mdMedia('xs') || $mdMedia('sm');
            }, function(wantsFullScreen) {
              $scope.customFullscreen = (wantsFullScreen === true);
            });
          });
        },
        onTabSelected: function($event) {
          $event.preventDefault();
          $event.stopPropagation();
          $event.stopImmediatePropagation();
        }
      };

      $scope.data = {
          project: '',
          analyzable: false,
          files: [],
          items: [],
          itemsSelectedCount: 0,
          platform: null,
          profile: null,
          running: false,
          projectOK: false,
          platforms: [
            {type: 'android', name: 'Android'},
            {type: 'ios', name: 'iOS'},
            {type: 'windows', name: 'Windows'}
          ],
          profiles: []
      };

      var listeners = [
            $scope.$on('ac:select-project', function(event, data) {
              $scope.data.project = data.name;
              $scope.data.files = [];
              $scope.data.analyzable = true;
            }),
            $scope.$on('ac:file-item', function(event, data) {
              $scope.data.files.push(data);
             }),
            $scope.$on('ac:reset-list', function(event, data) {
              $scope.data.items = [];
            }),
            $scope.$watch('data.items.length', function(newValue, oldValue) {
              $scope.data.running = false;
            }),
            /*------------------------------------------------------------------------*/
            /* Eliminar cuando se implemente otra plataforma                          */
            /*------------------------------------------------------------------------*/
            $scope.$watch('data.platform', function(newValue, oldValue) {
              if(newValue && newValue.name !== 'Android') {
                alert('Por el momento solamente funciona con plataforma Android');
                $scope.data.platform = oldValue;
              }
            }, true)
            /*------------------------------------------------------------------------*/
          ];

      ACSockets.addListener('ac:socket:analyze_response', function(data) {
        // agregar a la lista de problemas encontrados
        $scope.data.items = _.union($scope.data.items, data);
        $scope.data.projectOK = false;
      });
      ACSockets.addListener('ac:socket:analyze_response_file_ok', function(data) {
        $scope.data.running = false;

      });
      ACSockets.addListener('ac:socket:process_response', function(data) {
        // sobreescribir en el filesystem el archivo recibido
        var _data = data;
        ACFSServices.writeFileContent(data.blocks[0].fullPath, data.code, function(e) {
          //console.log(e);
          deferreds[_data.blocks[0].fullPath].resolve();
        });
      });
      ACSockets.addListener('ac:socket:profiles', function(data) {
        $scope.data.profiles = _.clone(data);
        $scope.data.profile = $scope.data.profiles[0];
        $scope.data.platform = $scope.data.platforms[0];
      });

      $scope.$on('$destroy', function() {
        listeners.forEach(function(listener) {
          listener.call();
        });
      });

      ACSockets.getProfiles();
    }]);


text:
@interface HomeViewController ()<MJPopupDelegate>
{

}
@end

@implementation HomeViewController

@synthesize recommandBgView;

@synthesize firstPanelView, secondPanelView, thirdPanelView;

extern DBUtils *db;
extern FileUtils *fileUtils;
extern PopupDetailViewController* detailViewController;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    self.screenName = @"推荐文章界面";

    [[GAI sharedInstance].defaultTracker set:self.screenName
                                       value:@"HomeViewController Screen"];

    // Send the screen view.
    [[GAI sharedInstance].defaultTracker send:[[GAIDictionaryBuilder createAppView] build]];

    [recommandBgView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"headline_lv2_bg.png"]]];

    [firstPanelView addTarget:self action:@selector(panelClick:) forControlEvents:UIControlEventTouchUpInside];
    [secondPanelView addTarget:self action:@selector(panelClick:) forControlEvents:UIControlEventTouchUpInside];
    [thirdPanelView addTarget:self action:@selector(panelClick:) forControlEvents:UIControlEventTouchUpInside];

    db = [[DBUtils alloc] init];
    NSMutableArray *muArray = [db queryHeadline];

    UIImageView *firstPanelImg = (UIImageView *)[self.view viewWithTag:203];
    UILabel *firstPanelTitleLabel = (UILabel *)[self.view viewWithTag:204];
    UILabel *firstPanelTimeLabel = (UILabel *)[self.view viewWithTag:205];

    if ([muArray count] >= 2)
    {
        NSMutableDictionary *muDict = [muArray objectAtIndex:1];
        [self loadingImage:muDict andImageView:firstPanelImg];
        [firstPanelTitleLabel setText:[muDict objectForKey:@"title"]];
        [firstPanelTitleLabel alignTop];
        firstPanelTitleLabel.textAlignment = NSTextAlignmentCenter;
        [firstPanelTimeLabel setText:[TimeUtil convertTimeFormat:[muDict objectForKey:@"timestamp"]]];
        firstPanelView.accessibilityLabel = [muDict objectForKey:@"serverID"];

        if ([[muDict objectForKey:@"hasVideo"] intValue] == 1)
        {
            [self addVideoImage:firstPanelView];
        }
    }
    else
    {
        firstPanelView.hidden = YES;
    }

    UIImageView *secondPanelImg = (UIImageView *)[self.view viewWithTag:206];
    UILabel *secondPanelTitleLabel = (UILabel *)[self.view viewWithTag:207];
    UILabel *secondPanelTimeLabel = (UILabel *)[self.view viewWithTag:208];
    if ([muArray count] >= 3)
    {
        NSMutableDictionary *muDict = [muArray objectAtIndex:2];
        [self loadingImage:muDict andImageView:secondPanelImg];
        [secondPanelTitleLabel setText:[muDict objectForKey:@"title"]];
        [secondPanelTitleLabel alignTop];
        secondPanelTitleLabel.textAlignment = NSTextAlignmentCenter;
        [secondPanelTimeLabel setText:[TimeUtil convertTimeFormat:[muDict objectForKey:@"timestamp"]]];
        secondPanelView.accessibilityLabel = [muDict objectForKey:@"serverID"];
        if ([[muDict objectForKey:@"hasVideo"] intValue] == 1)
        {
            [self addVideoImage:secondPanelView];
        }
    }
    else
    {
        secondPanelView.hidden = YES;
    }

    UIImageView *threePanelImg = (UIImageView *)[self.view viewWithTag:209];
    UILabel *thirdPanelTitleLabel = (UILabel *)[self.view viewWithTag:210];
    UILabel *thirdPanelTimeLabel = (UILabel *)[self.view viewWithTag:211];
    if ([muArray count] >= 4)
    {
        NSMutableDictionary *muDict = [muArray objectAtIndex:3];
        [self loadingImage:muDict andImageView:threePanelImg];
        [thirdPanelTitleLabel setText:[muDict objectForKey:@"title"]];
        [thirdPanelTitleLabel alignTop];
        thirdPanelTitleLabel.textAlignment = NSTextAlignmentCenter;
        [thirdPanelTimeLabel setText:[TimeUtil convertTimeFormat:[muDict objectForKey:@"timestamp"]]];
        thirdPanelView.accessibilityLabel = [muDict objectForKey:@"serverID"];
        if ([[muDict objectForKey:@"hasVideo"] intValue] == 1)
        {
            [self addVideoImage:thirdPanelView];
        }
    }
    else
    {
        thirdPanelView.hidden = YES;
    }
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)panelClick:(id)sender
{
    if (detailViewController == nil)
    {
        detailViewController = [[PopupDetailViewController alloc] initWithNibName:@"PopupView_iPad" bundle:nil andParams:[sender accessibilityLabel]];
        detailViewController.delegate = self;

        [self presentPopupViewController:detailViewController animationType:MJPopupViewAnimationSlideRightLeft];
    }
}

- (void) closeButtonClicked
{
    detailViewController = nil;
    [self dismissPopupViewControllerWithanimationType:MJPopupViewAnimationSlideLeftRight];

}

-(void) loadingImage:(NSMutableDictionary*) muDict andImageView:(UIImageView*) uiImg
{
    NSString *path = [[[PATH_OF_DOCUMENT stringByAppendingPathComponent:@"thumb"] stringByAppendingPathComponent:[muDict objectForKey:@"serverID"]] stringByAppendingString:@".jpg"];
    if ([fileUtils fileISExist:path])
    {
        //加载本地文件
        //[uiImg setImage:[UIImage imageWithContentsOfFile:path]];
        [uiImg setImageWithURL:[NSURL fileURLWithPath:path]];
    }
    else //加载网络文件,并下载到本地
    {

        NSMutableString *muString = [muDict objectForKey:@"profile_path"];

        NSString *suffixString;
        if ([muString hasSuffix:@".png"])
        {
            suffixString = [[muString substringToIndex:[muString length] - 4] stringByAppendingString:@"-300x300.png"];
        }
        else
        {
            suffixString = [[muString substringToIndex:[muString length] - 4] stringByAppendingString:@"-300x300.jpg"];
        }

        NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[suffixString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];

        AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
        operation.outputStream = [NSOutputStream outputStreamToFileAtPath:path append:NO];
        [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
            //NSLog(@"loading image is success");
            //[uiImg setImage:[UIImage imageWithContentsOfFile:path]];
            [uiImg setImageWithURL:[NSURL fileURLWithPath:path]];
        } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
            NSLog(@"loading image is failure %@",[error description]);
        }];
        [operation start];
    }
}

-(void) addVideoImage:(UIView *)view
{
    UIImage *videoImage = [UIImage imageNamed:@"hasvideo"];
    UIImageView *videoImgView = [[UIImageView alloc] initWithImage:videoImage];
    videoImgView.contentMode = UIViewContentModeScaleAspectFit;
    videoImgView.frame = CGRectMake(0, 0, 80, 80);
    [view addSubview:videoImgView];
}

@end


text:
apt-get -y update ; apt-get -y dist-upgrade
apt-get -y install htop fail2ban tmux screen vim ntp sudo dnsutils software-properties-common
systemctl enable fail2ban
systemctl start fail2ban
systemctl enable ntp
systemctl start ntp

# Configure ssh and restart
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
sed -i 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config
echo "
# Added on Startup Script
AllowTcpForwarding no
ClientAliveCountMax 2
Compression no
MaxAuthTries 5
MaxSessions 2
UsePrivilegeSeparation sandbox
AllowAgentForwarding no" >> /etc/ssh/sshd_config
systemctl restart sshd


text:
Our Collaborators and Clients

Domain and Application Gateways

              Title
              Field of Science

              SEAGrid Gateway
              Chemistry & Engineering

              Ultrascan Gateway
              Biophysics

              TestDrive Portal
              Computer & Information Science & Engineering

              dREG Gateway
              Genetics & Nucleic Acids

              Phasta Gateway
              Mechanical Engineering

              SimCCS Gateway
              Geology Survey

              Computational Systems Biology Group(CSBG) Gateway
              Biological Science

              SimVascular Gateway
              Cardiovascular Simulation

              IU Nano Confinement Gateway
              Materials Research

              Searching-SRA Gateway
              Bio-informatics and Biology

              InterACTWEL Science Gateway
              Natural Resources Management Decisions Support

              NextGen Thermodynamics Database Gateway
              Geochemistry & Environmental Science

              Atomic and Molecular Physic Gateway
              Atomic, Molecular, and Optical Physics

              Distant Reader Gateway
              Library Science

              Electron-Phonon-Wannier (EPW) Gateway
              Material Science

              Single Cell RNA Sequencing Gateway
              Genetic Science

              Indiana Future Water Gateway
              Hydrology

              Colorado School of Mines QUSP Gateway
              Quantum Simulation

              Data Discovery Studio
              Geoscience

              DELTA Gateway
              Applied Topology in Chemistry

              SMALTR Gateway
              Chemistry

              TopPIC Gateway
              Medicine

              Geo Gateway
              Geo Science

              BCB Gateway
              Medicine

              RegSNPs Gateway
              Medicine

              Immune Portal
              Medicine

Campus Gateways

              Title
              Field of Science

              South Dakota Gateway
              Chemistry & Bio

              Sonoma State College
              Chemistry

              Indiana University Gateway
              Generic Applications

              Oklahoma University
              Chemistry & Engineering

              Georgia State University
              Generic Applications

              University of Alabama Birmingham
              Generic Applications

              New Mexico State University
              Generic Applications

              Virginia ACCORD Gateway
              Generic Applications

              West Virginia State University
              Generic Applications

              NCSA Industry Gateway
              Generic Applications

              University of Kentucky Science Gateway
              Generic Applications

              Georgia Institute of Technology Science Gateway
              Generic Applications


text:
package com.knight.arch.events;

/**
 * @author andyiac
 * @date 15-10-19
 * @web http://blog.andyiac.com
 * @github https://github.com/andyiac
 */
public class TrendingReposTimeSpanTextMsg {
    String timeSpan;

    public String getTimeSpan() {
        return timeSpan;
    }

    public void setTimeSpan(String timeSpan) {
        this.timeSpan = timeSpan;
    }
}