text:
/*
 * File: Nature.cs
 * Author: Michael Johannes
 * Desc: Contains attributes for the surrounding environment
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Urho;

namespace CC_X.Model
{
    //Class for harmless objects that populate the scenery
    class Nature : GameObj, Serializer
    {
        public enum NatureType { Plane, Tree, Rock, Grass, None } // Lists the possible entities for environment. This includes the ground the character runs on
        public NatureType SelectedNatureType { get; set; } // Retrieves & sets the kind of nature selected
        public Nature(NatureType natureObj, Vector3 position) { } // Empty instantiator.

        // Store information concerning the environment
        public string Serialize()
        {
            string info = string.Format("{0}, {1}, {2}, {3}, {4}", this.Position.X, this.Position.Y, this.Position.Z, this.ID, this.SelectedNatureType);
            return info;
        }

        // Load information concerning each piece of environment
        public void DeSerialize(string fileinfo)
        {
            string[] info = fileinfo.Split(',');
            this.Position = new Vector3(Convert.ToInt32(info[0]), Convert.ToInt32(info[1]), Convert.ToInt32(info[2]));
            this.ID = Convert.ToUInt32(info[3]);
            string tempType = info[4];
            switch (tempType)
            {
                case " Plane":
                    this.SelectedNatureType = NatureType.Plane;
                    break;
                case " Tree":
                    this.SelectedNatureType = NatureType.Tree;
                    break;
                case " Rock":
                    this.SelectedNatureType = NatureType.Rock;
                    break;
                case " Grass":
                    this.SelectedNatureType = NatureType.Grass;
                    break;
                case " None":
                    this.SelectedNatureType = NatureType.None;
                    break;
                default:
                    this.SelectedNatureType = NatureType.Plane;
                    break;
            }
        }
    }
}


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <title>Module: Logger::Ansicolor</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />

  Module
Logger::Ansicolor

        In:

lib/lore/facets/logger.rb

For adding ansicolor output.

Methods

debug

debug_with_color

error

error_with_color

fatal

fatal_with_color

info

info_with_color

warn

warn_with_color

Public Instance methods

    debug(str)

[ show source ]

# File lib/lore/facets/logger.rb, line 192
    def debug(str)
      return unless debug?
      @logdev.ansicolor? ? debug_with_color{ super } : super
    end

    debug_with_color( {|| ...}

[ show source ]

# File lib/lore/facets/logger.rb, line 225
    def debug_with_color #:yield:
      self << ANSICode.yellow
      yield
      self << ANSICode.clear
    end

    error(str)

[ show source ]

# File lib/lore/facets/logger.rb, line 197
    def error(str)
      return unless error?
      @logdev.ansicolor? ? error_with_color{ super } : super
    end

    error_with_color( {|| ...}

[ show source ]

# File lib/lore/facets/logger.rb, line 219
    def error_with_color #:yield:
      self << ANSICode.red
      yield
      self << ANSICode.clear
    end

    fatal(str)

[ show source ]

# File lib/lore/facets/logger.rb, line 202
    def fatal(str)
      return unless error?
      @logdev.ansicolor? ? fatal_with_color{ super } : super
    end

    fatal_with_color( {|| ...}

[ show source ]

# File lib/lore/facets/logger.rb, line 231
    def fatal_with_color #:yield:
      self << ANSICode.bold + ANSICode.red
      yield
      self << ANSICode.clear
    end

    info(str)

[ show source ]

# File lib/lore/facets/logger.rb, line 182
    def info(str)
      return unless info?
      @logdev.ansicolor? ? info_with_color{ super } : super
    end

    info_with_color( {|| ...}

[ show source ]

# File lib/lore/facets/logger.rb, line 207
    def info_with_color #:yield:
      self << ANSICode.green
      yield
      self << ANSICode.clear
    end

    warn(str)

[ show source ]

# File lib/lore/facets/logger.rb, line 187
    def warn(str)
      return unless warn?
      @logdev.ansicolor? ? warn_with_color{ super } : super
    end

    warn_with_color( {|| ...}

[ show source ]

# File lib/lore/facets/logger.rb, line 213
    def warn_with_color #:yield:
      self << ANSICode.cyan
      yield
      self << ANSICode.clear
    end

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <style name="None" parent="Theme.AppCompat">
    </style>

    <style name="Widget.DebugDrawer.Base.Header" parent="None">
        <item name="android:paddingBottom">2dp</item>
        <item name="android:textColor">?colorAccent</item>
        <item name="android:textAllCaps">true</item>
        <item name="android:textSize">14sp</item>
        <item name="android:textStyle">bold</item>
        <item name="android:fontFamily">sans-serif-condensed</item>
        <item name="android:layout_marginTop">8dp</item>
    </style>

    <style name="Widget.DebugDrawer.Base.RowWidget" parent="None">
        <item name="android:minHeight">42dp</item>
    </style>

    <style name="Widget.DebugDrawer.Base.RowTitle" parent="Widget.DebugDrawer.Base.RowWidget">
        <item name="android:textColor">?android:textColorPrimary</item>
        <item name="android:layout_marginRight">16dp</item>
        <item name="android:textSize">16sp</item>
        <item name="android:gravity">center_vertical</item>
    </style>

    <style name="Widget.DebugDrawer.Base.RowValue" parent="Widget.DebugDrawer.Base.RowWidget">
        <item name="android:textColor">?android:textColorSecondary</item>
        <item name="android:textSize">16sp</item>
        <item name="android:gravity">center_vertical</item>
    </style>
</resources>


text:
import java.util.Scanner;

public class SquareOfStars {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine());

        for (int i = 0; i < n; i++) {
            System.out.println(printSymbols("* ",n).trim());
        }
    }

    public static String printSymbols(String text, int count) {
        String output = "";

        for (int i = 0; i < count; i++) {
            output = output + text;
        }
        return  output;
    }
}


text:
plugin.SocialQQWeibo = cc.Class.extend({
    _shareInfo: null,

    /**
     methods of protocol : InterfaceSocial
     */
    init: function () {
        this._shareInfo = {
            'appkey': 12345678,
            'title': "Hello, Cocos2d-html5!",
            'url': window.location.href,
            'pic': null
        };
    },
    configDeveloperInfo: function (cpInfo) {
        this._shareInfo.appkey = cpInfo["QQWeiboAppKey"];
    },
    share: function (shareInfo) {
        this._shareInfo.title = shareInfo["SharedText"];
        this._shareInfo.pic = shareInfo["SharedImagePath"];

        var urlstring = "", value;
        for (var key in this._shareInfo) {
            value = this._shareInfo[key];
            if (value !== null) {
                urlstring += encodeURI(key + "=" + value) + "&";
            }
        }
        urlstring = urlstring.substr(0, urlstring.length - 1);
        cc.openURL("http://share.v.t.qq.com/index.php?c=share&a=index&" + urlstring);

    },
    setDebugMode: function (debug) {
        //invalid on html5
    },
    getSDKVersion: function () {
        return "unkown";
    },
    getPluginVersion: function () {
        return plugin.Version;
    }
});


text:
package org.infinispan.spring.support.remote;

import java.util.Properties;

import org.infinispan.client.hotrod.RemoteCacheManager;
import org.infinispan.spring.AbstractRemoteCacheManagerFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;

/**
 *

 * A {@link org.springframework.beans.factory.FactoryBean FactoryBean} for creating an
 * {@link org.infinispan.client.hotrod.RemoteCacheManager
 * Infinispan RemoteCacheManager} instance.
 *

 * Configuration

 *

 * A RemoteCacheManager is configured through a {@link java.util.Properties
 * Properties} object. For an exhaustive list of valid properties to be used see
 * RemoteCacheManager's {@link org.infinispan.client.hotrod.RemoteCacheManager
 * javadocs}. This FactoryBean provides means to either
 * {@link #setConfigurationProperties(Properties) inject} a user-defined Properties
 * instance or to
 * {@link #setConfigurationPropertiesFileLocation(org.springframework.core.io.Resource) set} the
 * location of a properties file to load those properties from. Note that it is illegal to
 * use both mechanisms simultaneously.
 *

 *

 * Alternatively or in combination with
 * {@link #setConfigurationPropertiesFileLocation(org.springframework.core.io.Resource) setting} the
 * location of a Properties file to load the configuration from, this
 * FactoryBean provides (typed) setters for all configuration settings. Settings thus
 * defined take precedence over those defined in the injected Properties instance. This
 * flexibility enables users to use e.g. a company-wide Properties file containing
 * default settings while simultaneously overriding select settings whenever special requirements
 * warrant this.

 * Note that it is illegal to use setters in conjunction with
 * {@link #setConfigurationProperties(Properties) injecting} a Properties instance.
 *

 *

 * In addition to creating a RemoteCacheManager this FactoryBean does also
 * control that RemoteCacheManagers's lifecycle by shutting it down when the enclosing
 * Spring application context is closed. It is therefore advisable to always use this
 * FactoryBean when creating a RemoteCacheManager.
 *

 *
 * @author Olaf Bergner
 *
 * @see org.infinispan.client.hotrod.RemoteCacheManager
 * @see #destroy()
 */
public class InfinispanRemoteCacheManagerFactoryBean extends AbstractRemoteCacheManagerFactory
         implements FactoryBean<RemoteCacheManager>, InitializingBean, DisposableBean {

   private RemoteCacheManager nativeRemoteCacheManager;

   // ------------------------------------------------------------------------
   // org.springframework.beans.factory.InitializingBean
   // ------------------------------------------------------------------------

   /**
    * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
    */
   @Override
   public void afterPropertiesSet() throws Exception {
      assertCorrectlyConfigured();
      this.logger.info("Creating new instance of RemoteCacheManager ...");
      final Properties configurationPropertiesToUse = configurationProperties();
      this.nativeRemoteCacheManager = new RemoteCacheManager(configurationPropertiesToUse,
               this.startAutomatically);
      this.logger.info("Finished creating new instance of RemoteCacheManager");
   }

   // ------------------------------------------------------------------------
   // org.springframework.beans.factory.FactoryBean
   // ------------------------------------------------------------------------

   /**
    * @see org.springframework.beans.factory.FactoryBean#getObject()
    */
   @Override
   public RemoteCacheManager getObject() throws Exception {
      return this.nativeRemoteCacheManager;
   }

   /**
    * @see org.springframework.beans.factory.FactoryBean#getObjectType()
    */
   @Override
   public Class<? extends RemoteCacheManager> getObjectType() {
      return this.nativeRemoteCacheManager != null ? this.nativeRemoteCacheManager.getClass()
               : RemoteCacheManager.class;
   }

   /**
    * Always return true.
    *
    * @see org.springframework.beans.factory.FactoryBean#isSingleton()
    */
   @Override
   public boolean isSingleton() {
      return true;
   }

   // ------------------------------------------------------------------------
   // org.springframework.beans.factory.DisposableBean
   // ------------------------------------------------------------------------

   /**
    * {@link org.infinispan.client.hotrod.RemoteCacheManager#stop() stop} the
    * RemoteCacheManager created by this factory.
    *
    * @see org.springframework.beans.factory.DisposableBean#destroy()
    */
   @Override
   public void destroy() throws Exception {
      // Being paranoid
      if (this.nativeRemoteCacheManager != null) {
         this.nativeRemoteCacheManager.stop();
      }
   }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CocosSharp;

namespace tests
{
    public class TouchesMainScene : PerformBasicLayer
    {

        public TouchesMainScene(bool bControlMenuVisible, int nMaxCases, int nCurCase)
            : base(bControlMenuVisible, nMaxCases, nCurCase)
        {
        }

        public override void showCurrentTest()
        {
            CCLayer pLayer = null;
            switch (m_nCurCase)
            {
                case 0:
                    pLayer = new TouchesPerformTest1(true, PerformanceTouchesTest.TEST_COUNT, m_nCurCase);
                    break;
                case 1:
                    pLayer = new TouchesPerformTest2(true, PerformanceTouchesTest.TEST_COUNT, m_nCurCase);
                    break;
            }
            PerformanceTouchesTest.s_nTouchCurCase = m_nCurCase;

            if (pLayer != null)
            {
                CCScene pScene = new CCScene(Scene);
                pScene.AddChild(pLayer);

                Scene.Director.ReplaceScene(pScene);
            }
        }

        public override void OnEnter()
        {
            base.OnEnter();

            CCSize s = Layer.VisibleBoundsWorldspace.Size;

            // add title
            CCLabelTtf label = new CCLabelTtf(title(), "arial", 32);
            AddChild(label, 1);
            label.Position = new CCPoint(s.Width / 2, s.Height - 50);

			Schedule ();

            m_plabel = new CCLabelBMFont("00.0", "fonts/arial16.fnt");
            m_plabel.Position = new CCPoint(s.Width / 2, s.Height / 2);
            AddChild(m_plabel);

            elapsedTime = 0;
            numberOfTouchesB = numberOfTouchesM = numberOfTouchesE = numberOfTouchesC = 0;
        }

        public virtual string title()
        {
            return "No title";
        }

        public override void Update(float dt)
        {
            elapsedTime += dt;

            if (elapsedTime > 1.0f)
            {
                float frameRateB = numberOfTouchesB / elapsedTime;
                float frameRateM = numberOfTouchesM / elapsedTime;
                float frameRateE = numberOfTouchesE / elapsedTime;
                float frameRateC = numberOfTouchesC / elapsedTime;
                elapsedTime = 0;
                numberOfTouchesB = numberOfTouchesM = numberOfTouchesE = numberOfTouchesC = 0;

                //char str[32] = {0};
                string str;
				str = string.Format("{0:f1},{1:f1},{2:f1},{3:f1}", frameRateB, frameRateM, frameRateE, frameRateC);
                m_plabel.Text = (str);
            }
        }

        protected CCLabelBMFont m_plabel;
        protected int numberOfTouchesB;
        protected int numberOfTouchesM;
        protected int numberOfTouchesE;
        protected int numberOfTouchesC;
        protected float elapsedTime;
    }
}


text:
using System;
using System.Linq;
using AcademyPopcorn;

/// <summary>
/// Task 10
/// </summary>
class Explode : MovingObject
{
    public const char Symbol = '+';

    public Explode(MatrixCoords topLeft, MatrixCoords speed)
        : base(topLeft, new char[,] { { Explode.Symbol } }, speed)
    {
    }

    public override void Update()
    {
        base.Update();
        this.IsDestroyed = true;
    }

    public override void RespondToCollision(CollisionData collisionData)
    {
        this.IsDestroyed = true;
    }

    public override bool CanCollideWith(string otherCollisionGroupString)
    {
        return otherCollisionGroupString.Equals(Ball.CollisionGroupString);
    }

    public override string GetCollisionGroupString()
    {
        return Ball.CollisionGroupString;
    }
}


text:
import { NotificationsHandlerModule } from './NotificationsHandlerModule.types';
declare const _default: NotificationsHandlerModule;
export default _default;
//# sourceMappingURL=NotificationsHandlerModule.d.ts.map


text:
package com.hzg.tools;

public class ErpConstant {

    public final static Integer purchase_state_apply = 0;
    public final static Integer purchase_state_close = 1;
    public final static Integer purchase_state_cancel = 2;

    public final static Integer purchase_type_normal = 0;
    public final static Integer purchase_type_temp = 1;
    public final static Integer purchase_type_emergency = 2;
    public final static Integer purchase_type_cash = 3;
    public final static Integer purchase_type_deposit = 4;

    public final static Integer purchase_type_temp_payKind_totalPayment = 0;
    public final static Integer purchase_type_temp_payKind_deposit = 1;

    public final static Integer purchase_type_temp_deposit_uppay = 0;
    public final static Integer purchase_type_temp_deposit_paid = 1;
    public final static Integer purchase_type_temp_deposit_cancel = 2;

    public final static Integer product_state_purchase = 0;
    public final static Integer product_state_purchase_pass = 10;
    public final static Integer product_state_purchase_close = 11;
    public final static Integer product_state_stockIn = 1;
    public final static Integer product_state_stockIn_part = 12;
    public final static Integer product_state_stockOut = 2;
    public final static Integer product_state_stockOut_part = 21;
    public final static Integer product_state_onSale = 3;
    public final static Integer product_state_sold = 4;
    public final static Integer product_state_sold_part = 41;
    public final static Integer product_state_invalid = 5;
    public final static Integer product_state_edit = 6;
    public final static Integer product_state_mediaFiles_uploaded = 7;
    public final static Integer product_state_shipped = 8;
    public final static Integer product_state_shipped_part = 81;
    public final static Integer product_state_purchase_onReturnProduct = 82;
    public final static Integer product_state_purchase_returnedProduct = 83;
    public final static Integer product_state_purchase_onReturnProduct_part = 84;
    public final static Integer product_state_purchase_returnedProduct_part = 85;
    public final static Integer product_state_onReturnProduct = 9;
    public final static Integer product_state_onReturnProduct_part = 94;
    public final static Integer product_state_returnedProduct = 91;
    public final static Integer product_state_returnedProduct_part = 95;
    public final static Integer product_state_onChangeProduct = 92;
    public final static Integer product_state_onChangeProduct_part = 96;
    public final static Integer product_state_onChangeOnReturnProduct = 98;
    public final static Integer product_state_onChangeOnReturnProduct_part = 99;
    public final static Integer product_state_changedProduct = 93;
    public final static Integer product_state_changedProduct_part = 97;

    public final static String no_purchase_perfix = "CG";
    public final static String no_stockInOut_perfix = "RC";
    public final static String no_stock_perfix = "KC";
    public final static String no_warehouse_perfix = "CK";
    public final static String no_expressDelivery_perfix = "ED";
    public final static String no_productCheck_perfix = "PD";

    public final static Integer stockInOut_type_cash = 0;
    public final static Integer stockInOut_type_consignment = 1;
    public final static Integer stockInOut_type_increment = 2;
    public final static Integer stockInOut_type_process = 3;
    public final static Integer stockInOut_type_deposit = 4;
    public final static Integer stockInOut_type_repair = 5;
    public final static Integer stockInOut_type_changeWarehouse = 6;
    public final static Integer stockInOut_type_returnProduct = 7;
    public final static Integer stockInOut_type_virtual_outWarehouse = 10;
    public final static Integer stockInOut_type_normal_outWarehouse = 11;
    public final static Integer stockInOut_type_breakage_outWarehouse = 12;
    public final static Integer stockInOut_type_changeWarehouse_outWarehouse = 13;
    public final static Integer stockInOut_type_innerBuy_outWarehouse = 14;
    public final static Integer stockInOut_type_normal_outWarehouse_manual = 15;

    public final static Integer stockInOut_state_apply = 0;
    public final static Integer stockInOut_state_finished = 1;
    public final static Integer stockInOut_state_cancel = 2;

    public final static Integer stockInOut_detail_state_apply = 0;
    public final static Integer stockInOut_detail_state_finished = 1;
    public final static Integer stockInOut_detail_state_backup = 2;

    public final static Integer stockInOut_state_changeWarehouse_unfinished = 0;
    public final static Integer stockInOut_state_changeWarehouse_finished = 1;

    public final static Integer stock_state_valid = 0;
    public final static Integer stock_state_invalid = 1;

    public final static String return_purchase = "purchase";
    public final static String return_purchase_deposit = "purchaseDeposit";

    public final static String no = "no";
    public final static String stock = "stock";
    public final static String stock_quantity = "stockQuantity";
    public final static String product_onSale_quantity = "productOnSaleQuantity";
    public final static String product_sold_quantity = "productSoldQuantity";
    public final static String product_onReturn_quantity = "productOnReturnQuantity";
    public final static String product_returned_quantity = "productReturnedQuantity";
    public final static String product_onChange_quantity = "productOnChangeQuantity";
    public final static String product_changed_quantity = "productChangedQuantity";

    public final static String stockIn = "stockIn";
    public final static String stockOut = "stockOut";
    public final static String stockInOut = "stockInOut";

    public final static String purchase = "purchase";

    public final static String product = "product";
    public final static String product_property_name_weight = "重量";

    // 商品计量单位
    public final static String productUnit = "productUnit";
    // 商品盘点录入
    public final static String productCheckInput = "productCheckInput";

    public final static String price = "price";
    public final static String price_change = "price_change";

    public final static Integer product_price_change_state_apply = 0;
    public final static Integer product_price_change_state_use = 1;
    public final static Integer product_price_change_state_save = 2;

    public final static float price_1000 = 1000f;
    public final static float price_3000 = 3000f;
    public final static float price_10000 = 10000f;
    public final static float price_30000 = 30000f;
    public final static float price_100000 = 100000f;

    public final static float subtract_price_0 = 0f;
    public final static float subtract_price_100 = 100f;
    public final static float subtract_price_300 = 300f;
    public final static float subtract_price_500 = 500f;
    public final static float subtract_price_1000 = 1000f;

    public final static float price_percent_85 = 0.85f;
    public final static float price_percent_90 = 0.90f;
    public final static float price_percent_95 = 0.95f;

    public final static String privilege_resource_uri_price_change_saler = "/sys/audit/priceChange/saler";
    public final static String privilege_resource_uri_price_change_charger = "/sys/audit/priceChange/charger";
    public final static String privilege_resource_uri_price_change_manager = "/sys/audit/priceChange/manager";
    public final static String privilege_resource_uri_price_change_director = "/sys/audit/priceChange/director";

    public final static String privilege_resource_uri_print_expressWaybill = "/erp/print/expressWaybill";

    public final static String sf_response_code_success = "EX_CODE_OPENAPI_0200";
    public final static String sf_response_code_refresh_token_unExist = "EX_CODE_OPENAPI_0104";
    public final static String sf_response_code_refresh_token_timeout = "EX_CODE_OPENAPI_0106";
    public final static String sf_access_token_key = "sf_access_token_key";
    public final static String sf_refresh_token_key = "sf_refresh_token_key";
    public final static int sf_token_time = 60 * 60;
    public final static int sf_refresh_token_time = 60 * 60 * 24;

    public final static String sf_added_service_name_insure = "SINSURE";

    public final static String deliver_sfExpress = "顺丰快递";
    public final static String deliver_sfExpress_type = "顺丰标快";

    public final static Integer sf_action_code_order = 200;
    public final static Integer sf_action_code_query_order = 203;
    public final static Integer sf_action_code_access_token = 301;
    public final static Integer sf_action_code_refresh_Token = 302;
    public final static Integer sf_action_code_download_waybill = 205;

    public static final String sf_bsp_param_name_xml = "xml";
    public static final String sf_bsp_param_name_verifyCode = "verifyCode";
    public static final String sf_bsp_orderService = "OrderService";
    public static final String sf_bsp_orderConfirmService = "OrderConfirmService";
    public static final String sf_bsp_OrderSearchService = "OrderSearchService";

    public static final String sf_bsp_payMethod = "1";
    public static final String sf_bsp_payMethod_name = "寄方付";

    public final static Integer express_state_sending = 0;
    public final static Integer express_state_sended = 1;
    public final static Integer express_state_send_fail = 2;

    public final static Integer express_detail_state_unSend = 0;
    public final static Integer express_detail_state_sended = 1;
    public final static Integer express_detail_state_received = 2;
    public final static Integer express_detail_state_receive_fail = 3;

    public final static String unit_g = "克";
    public final static String unit_kg = "千克";
    public final static String unit_ct = "克拉";
    public final static String unit_oz = "盎司";

    public final static String unit_piece = "件";
    public final static String unit_other = "其他";

    public final static String stockInOut_action_name_print_barcode = "barcode";
    public final static String stockInOut_action_name_print_stockOutBills = "stockOutBills";
    public final static String stockInOut_action_name_print_expressWaybill = "expressWaybill";
    public final static String stockInOut_action_name_inProduct = "stockInProduct";
    public final static String stockInOut_action_name_outProduct = "stockOutProduct";

    public final static Integer stockInOut_action_print_barcode = 0;
    public final static Integer stockInOut_action_print_stockOutBills = 1;
    public final static Integer stockInOut_action_print_expressWaybill = 2;
    public final static Integer stockInOut_action_print_stockInBills = 3;
    public final static Integer stockInOut_action_inProduct = 4;
    public final static Integer stockInOut_action_outProduct = 5;
    public final static Integer stockInOut_action_generateSfExpressOrderByReceiverAndStockOut = 21;

    public final static Integer product_action_upShelf = 0;
    public final static Integer product_action_downShelf = 1;

    public final static String product_action_name_updateUploadMediaFilesInfo = "updateUploadMediaFilesInfo";
    public final static String product_action_name_setProductsSold = "setProductsSold";
    public final static String product_action_name_setProductsOnReturn = "setProductsOnReturn";
    public final static String product_action_name_setProductsReturned = "setProductsReturned";
    public final static String product_action_name_setPurchaseProductsOnReturn = "setPurchaseProductsOnReturn";
    public final static String product_action_name_setPurchaseProductsReturned = "setPurchaseProductsReturned";
    public final static String product_action_name_setProductsOnChange = "setProductsOnChange";
    public final static String product_action_name_setProductsOnChangeOnReturn = "setProductsOnChangeOnReturn";
    public final static String product_action_name_setProductsChanged = "setProductsChanged";
    public final static String product_action_name_upShelf = "upShelfProduct";
    public final static String product_action_name_downShelf = "downShelfProduct";
    public final static String product_action_name_generateSfExpressOrderByReceiverAndStockOut = "generateSfExpressOrderByReceiverAndStockOut";
    public final static String product_action_name_setProductEdit = "setProductEdit";

    public final static Integer purchase_action_purchaseBookPaid = 0;
    public final static String purchase_action_name_purchaseBookPaid = "purchaseBookPaid";
    public final static String product_action_name_recoverState = "recoverState";
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>net.tascalate.javaflow</groupId>
		<artifactId>net.tascalate.javaflow.parent</artifactId>
		<version>2.7.3</version>
		<relativePath>../</relativePath>
	</parent>

	<artifactId>net.tascalate.javaflow.tools.runtime</artifactId>
	<packaging>jar</packaging>

	<name>Tascalate JavaFlow / Tools / Bytecode ClassLoader</name>

	<properties>
		<license.header>../HEADER-DERRIVED.txt</license.header>
	</properties>

	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>${project.groupId}.spi</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.moditect</groupId>
				<artifactId>moditect-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>
</project>


text:
package jetbrains.jetpad.values;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class ColorTest {

  @Test
  public void parseHex() {
    assertEquals(Color.RED, Color.parseHex(Color.RED.toHexColor()));
  }
}


text:
package cdn

//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

// PushErrorsModelList is a nested struct in cdn response
type PushErrorsModelList struct {
	PushErrorsModel []PushErrorsModel `json:"PushErrorsModel" xml:"PushErrorsModel"`
}


text:
<?php
# This function reads your DATABASE_URL configuration automatically set by Heroku
# the return value is a string that will work with pg_connect
function pg_connection_string() {
  // we will fill this out next
}

# Establish db connection
$db = pg_connect(pg_connection_string());
if (!$db) {
   echo "Database connection error."
   exit;
}

$result = pg_query($db, "SELECT statement goes here");
?>


text:
#region Using

using System;

#endregion

namespace PureMVC.Interfaces
{
    /// <summary>
    /// The interface definition for a PureMVC Facade
    /// </summary>
    /// <remarks>
    ///     <para>The Facade Pattern suggests providing a single class to act as a certal point of communication for subsystems</para>
    ///     <para>In PureMVC, the Facade acts as an interface between the core MVC actors (Model, View, Controller) and the rest of your application</para>
    /// </remarks>
    /// <see cref="PureMVC.Interfaces.IModel"/>
    /// <see cref="PureMVC.Interfaces.IView"/>
    /// <see cref="PureMVC.Interfaces.IController"/>
    /// <see cref="PureMVC.Interfaces.ICommand"/>
    /// <see cref="PureMVC.Interfaces.INotification"/>
    public interface IFacade : InheriteIDispoable,INotifier
    {
        #region Proxy

        /// <summary>
        /// Register an <c>IProxy</c> with the <c>Model</c> by name
        /// </summary>
        /// <param name="proxy">The <c>IProxy</c> to be registered with the <c>Model</c></param>
        void RegisterProxy(IProxy proxy);

        /// <summary>
        /// Retrieve a <c>IProxy</c> from the <c>Model</c> by name
        /// </summary>
        /// <param name="proxyName">The name of the <c>IProxy</c> instance to be retrieved</param>
        /// <returns>The <c>IProxy</c> previously regisetered by <c>proxyName</c> with the <c>Model</c></returns>
        IProxy RetrieveProxy(string proxyName);

        /// <summary>
        /// Remove an <c>IProxy</c> instance from the <c>Model</c> by name
        /// </summary>
        /// <param name="proxyName">The <c>IProxy</c> to remove from the <c>Model</c></param>
        IProxy RemoveProxy(string proxyName);

        /// <summary>
        /// Check if a Proxy is registered
        /// </summary>
        /// <param name="proxyName">The name of the <c>IProxy</c> instance to check</param>
        /// <returns>whether a Proxy is currently registered with the given <c>proxyName</c>.</returns>
        bool HasProxy(string proxyName);

        #endregion

        #region Command

        /// <summary>
        /// Register an <c>ICommand</c> with the <c>Controller</c>
        /// </summary>
        /// <param name="notificationName">The name of the <c>INotification</c> to associate the <c>ICommand</c> with.</param>
        /// <param name="command">A reference to the <c>ICommand</c></param>
        void RegisterCommand(string notificationName, ICommand command);

        /// <summary>
        /// Register an <c>ICommand</c> with the <c>Controller</c>
        /// </summary>
        /// <param name="notificationName">The name of the <c>INotification</c> to associate the <c>ICommand</c> with.</param>
        /// <param name="commandType">A reference to the <c>Type</c> of the <c>ICommand</c></param>
        void RegisterCommand(string notificationName, Type commandType);

        /// <summary>
        /// Remove a previously registered <c>ICommand</c> to <c>INotification</c> mapping from the Controller.
        /// </summary>
        /// <param name="notificationName">TRemove a previously registered <c>ICommand</c> to <c>INotification</c> mapping from the Controller.</param>
        object RemoveCommand(string notificationName);

        /// <summary>
        /// Check if a Command is registered for a given Notification
        /// </summary>
        /// <param name="notificationName">The name of the <c>INotification</c> to check.</param>
        /// <returns>whether a Command is currently registered for the given <c>notificationName</c>.</returns>
        bool HasCommand(string notificationName);

        #endregion

        #region Mediator

        /// <summary>
        /// Register an <c>IMediator</c> instance with the <c>View</c>
        /// </summary>
        /// <param name="mediator">A reference to the <c>IMediator</c> instance</param>
        void RegisterMediator(IMediator mediator);

        /// <summary>
        /// Retrieve an <c>IMediator</c> instance from the <c>View</c>
        /// </summary>
        /// <param name="mediatorName">The name of the <c>IMediator</c> instance to retrieve</param>
        /// <returns>The <c>IMediator</c> previously registered with the given <c>mediatorName</c></returns>
        IMediator RetrieveMediator(string mediatorName);

        /// <summary>
        /// Remove a <c>IMediator</c> instance from the <c>View</c>
        /// </summary>
        /// <param name="mediatorName">The name of the <c>IMediator</c> instance to be removed</param>
        IMediator RemoveMediator(string mediatorName);

        /// <summary>
        /// Check if a Mediator is registered or not
        /// </summary>
        /// <param name="mediatorName">The name of the <c>IMediator</c> instance to check</param>
        /// <returns>whether a Mediator is registered with the given <c>mediatorName</c>.</returns>
        bool HasMediator(string mediatorName);

        #endregion

        #region Observer

        /// <summary>
        /// Notify the <c>IObservers</c> for a particular <c>INotification</c>.
        /// <para>All previously attached <c>IObservers</c> for this <c>INotification</c>'s list are notified and are passed a reference to the <c>INotification</c> in the order in which they were registered.</para>
        /// <para>Use this method only if you are sending custom Notifications. Otherwise use the sendNotification method which does not require you to create the Notification instance.</para>
        /// </summary>
        /// <param name="notification">the <c>INotification</c> to notify <c>IObservers</c> of.</param>
        void NotifyObservers(INotification notification);

        #endregion
    }
}


text:
// $Id $

package net.ontopia.topicmaps.webed.impl.actions;

import java.util.Collections;
import java.util.Iterator;
import net.ontopia.topicmaps.core.TopicIF;
import net.ontopia.topicmaps.core.TopicNameIF;
import net.ontopia.topicmaps.webed.core.ActionIF;
import net.ontopia.topicmaps.webed.core.ActionParametersIF;
import net.ontopia.topicmaps.webed.core.ActionResponseIF;
import net.ontopia.topicmaps.webed.core.ActionRuntimeException;
import net.ontopia.topicmaps.webed.impl.actions.basename.AddBasename;

public class TestAddBasename extends AbstractWebedTestCase {

  public TestAddBasename(String name) {
    super(name);
  }

  /*
    1. Good, Normal use
    2. Good, Normal use, with scope

  */

  public void testNormalOperation() throws java.io.IOException{

    TopicIF topic = makeTopic(tm, "snus");
    int numBN = topic.getTopicNames().size();

    //make action
    ActionIF action = new AddBasename();

    //build parms
    ActionParametersIF params = makeParameters(topic, "general");
    ActionResponseIF response = makeResponse();

    //execute
    action.perform(params, response);
    //test
    assertFalse("No new basename added", topic.getTopicNames().size() == numBN);
    Iterator<TopicNameIF> baseIT = topic.getTopicNames().iterator();
    boolean hasit = false;
    while (baseIT.hasNext()){
      TopicNameIF base = baseIT.next();
      if (base.getValue().equals("general"))
	hasit = true;
    }

    assertFalse("The basename is not correct", !(hasit));

  }

  public void testNormalOperation2() throws java.io.IOException{

    TopicIF topic = makeTopic(tm, "snus");
    TopicIF bntype = makeTopic(tm, "bntype");
    TopicIF scope = getTopicById(tm, "gamst");
    int numBN = topic.getTopicNames().size();

    //make action
    ActionIF action = new AddBasename();

    //build parms
    ActionParametersIF params = makeParameters(makeList(topic, scope, bntype), "general");
    ActionResponseIF response = makeResponse();

    //execute
    action.perform(params, response);
    //test
    assertFalse("No new basename added", topic.getTopicNames().size() == numBN);

    Iterator<TopicNameIF> baseIT = topic.getTopicNames().iterator();
    boolean hasit = false;
    boolean hastype = false;
    boolean hascope = false;

    while (baseIT.hasNext()){
      TopicNameIF base = baseIT.next();
      if (base.getValue().equals("general")){
	hasit = true;
	hastype = (base.getType() == bntype);
	Iterator<TopicIF> ix = base.getScope().iterator();
	while (ix.hasNext()){
	  if (ix.next() == scope)
	    hascope = true;
	}
      }
    }
    assertFalse("The basename is not correct", !(hasit));
    assertFalse("The type is not correct", !(hastype));
    assertFalse("The scope is not correct", !(hascope));
  }

  public void testBadEmptyParams() throws java.io.IOException{
    //make action
    ActionIF action = new AddBasename();

    //build parms
    ActionParametersIF params = makeParameters(Collections.EMPTY_LIST, "general");
    ActionResponseIF response = makeResponse();
    try{
      //execute
      action.perform(params, response);
      fail("Bad params");
    }catch (ActionRuntimeException e){
    }
  }

  public void testBadParamsEmptyString() throws java.io.IOException{
    TopicIF topic = makeTopic(tm, "snus");
    int numBN = topic.getTopicNames().size();

    //make action
    ActionIF action = new AddBasename();

    //build parms
    ActionParametersIF params = makeParameters(topic, "");
    ActionResponseIF response = makeResponse();
    try{
      //execute
      action.perform(params, response);
    } catch (ActionRuntimeException e) {
    }

    // verify no new base names added
    assertFalse("New base name added", numBN != topic.getTopicNames().size());
  }

  public void testBadParams2() throws java.io.IOException{
    TopicIF topic = makeTopic(tm, "snus");
    int numBN = topic.getTopicNames().size();

    //make action
    ActionIF action = new AddBasename();

    //build parms
    ActionParametersIF params = makeParameters("", "");
    ActionResponseIF response = makeResponse();
    try{
      //execute
      action.perform(params, response);
      fail("Bad params, Basename string empty, topic String");
    }catch (ActionRuntimeException e){
    }
  }

}


text:
namespace mozc {

class DictionaryFile;
struct Token;

namespace dictionary {

class SystemDictionaryCodecInterface;
class ReverseLookupIndex;

class SystemDictionary : public DictionaryInterface {
 public:
  // System dictionary options represented as bitwise enum.
  enum Options {
    NONE = 0,
    // If ENABLE_REVERSE_LOOKUP_INDEX is set, we will have the index in heap
    // from the id in value trie to the id in key trie.
    // That consumes more memory but we can perform reverse lookup more quickly.
    ENABLE_REVERSE_LOOKUP_INDEX = 1,
  };

  // Builder class for system dictionary
  // Usage:
  //   SystemDictionary::Builder builder(filename);
  //   builder.SetOptions(SystemDictionary::NONE);
  //   builder.SetCodec(NULL);
  //   SystemDictionary *dictionry = builder.Build();
  class Builder {
   public:
    // Creates Builder from filename
    explicit Builder(const string &filename);
    // Creates Builder from image
    Builder(const char *ptr, int len);
    ~Builder();

    // Sets options (default: NONE)
    void SetOptions(Options options);

    // Sets codec (default: NULL)
    // Uses default codec if this is NULL
    void SetCodec(const SystemDictionaryCodecInterface *codec);

    // Builds and returns system dictionary.
    SystemDictionary *Build();

   private:
    enum InputType {
      FILENAME,
      IMAGE,
    };

    InputType type_;

    // For InputType::FILENAME
    const string filename_;

    // For InputTYpe::IMAGE
    const char *ptr_;
    const int len_;

    Options options_;
    const SystemDictionaryCodecInterface *codec_;

    DISALLOW_COPY_AND_ASSIGN(Builder);
  };

  struct ReverseLookupResult {
    ReverseLookupResult() : tokens_offset(-1), id_in_key_trie(-1) {}
    // Offset from the tokens section beginning.
    // (token_array_->Get(id_in_key_trie) ==
    //  token_array_->Get(0) + tokens_offset)
    int tokens_offset;
    // Id in key trie
    int id_in_key_trie;
  };

  virtual ~SystemDictionary();

  // TODO(team): Use builder instead of following static methods.
  static SystemDictionary *CreateSystemDictionaryFromFile(
      const string &filename);

  static SystemDictionary *CreateSystemDictionaryFromFileWithOptions(
      const string &filename, Options options);

  static SystemDictionary *CreateSystemDictionaryFromImage(
      const char *ptr, int len);

  static SystemDictionary *CreateSystemDictionaryFromImageWithOptions(
      const char *ptr, int len, Options options);

  // Implementation of DictionaryInterface.
  virtual bool HasValue(StringPiece value) const;

  // Predictive lookup
  virtual void LookupPredictive(
      StringPiece key, bool use_kana_modifier_insensitive_lookup,
      Callback *callback) const;

  // Prefix lookup
  virtual void LookupPrefix(
      StringPiece key, bool use_kana_modifier_insensitive_lookup,
      Callback *callback) const;

  // Exact lookup
  virtual void LookupExact(StringPiece key, Callback *callback) const;

  // Value to key prefix lookup
  virtual void LookupReverse(StringPiece str, NodeAllocatorInterface *allocator,
                             Callback *callback) const;
  virtual void PopulateReverseLookupCache(
      StringPiece str, NodeAllocatorInterface *allocator) const;
  virtual void ClearReverseLookupCache(
      NodeAllocatorInterface *allocator) const;

 private:
  FRIEND_TEST(SystemDictionaryTest, TokenAfterSpellningToken);

  struct FilterInfo {
    enum Condition {
      NONE = 0,
      VALUE_ID = 1,
      NO_SPELLING_CORRECTION = 2,
      ONLY_T13N = 4,
    };
    int conditions;
    // Return results only for tokens with given |value_id|.
    // If VALUE_ID is specified
    int value_id;
    FilterInfo() : conditions(NONE), value_id(-1) {}
  };

  explicit SystemDictionary(const SystemDictionaryCodecInterface *codec);

  bool OpenDictionaryFile(bool enable_reverse_lookup_index);

  // Calls |callback| with token info, which is filled using |tokens_key|,
  // |actual_key| and |encoded_tokens_ptr|.
  // |tokens_key| is a key used for look up.
  // |actual_key| is a token's key.
  // They may be different when we perform ambiguous search.
  void RegisterTokens(
      const FilterInfo &filter,
      const string &tokens_key,
      const string &actual_key,
      const uint8 *encoded_tokens_ptr,
      Callback *callback) const;

  bool IsBadToken(const FilterInfo &filter, const TokenInfo &token_info) const;

  void RegisterReverseLookupTokensForT13N(StringPiece value,
                                          Callback *callback) const;

  void RegisterReverseLookupTokensForValue(StringPiece value,
                                           NodeAllocatorInterface *allocator,
                                           Callback *callback) const;

  void ScanTokens(const set<int> &id_set,
                  multimap<int, ReverseLookupResult> *reverse_results) const;

  void RegisterReverseLookupResults(
      const set<int> &id_set,
      const multimap<int, ReverseLookupResult> &reverse_results,
      Callback *callback) const;

  void InitReverseLookupIndex();

  scoped_ptr<storage::louds::LoudsTrie> key_trie_;
  scoped_ptr<storage::louds::LoudsTrie> value_trie_;
  scoped_ptr<storage::louds::BitVectorBasedArray> token_array_;
  scoped_ptr<DictionaryFile> dictionary_file_;

  scoped_ptr<ReverseLookupIndex> reverse_lookup_index_;

  const uint32 *frequent_pos_;
  const SystemDictionaryCodecInterface *codec_;
  storage::louds::KeyExpansionTable hiragana_expansion_table_;

  DISALLOW_COPY_AND_ASSIGN(SystemDictionary);
};

}  // namespace dictionary
}  // namespace mozc

#endif  // MOZC_DICTIONARY_SYSTEM_SYSTEM_DICTIONARY_H_


text:
        offCourse

      <form class="form-horizontal login" role="form" name="loginForm">

            <input type="text" class="form-control" placeholder="Oncourse Username" ng-minlength="1" ng-model="formInfo.username" required>

              <input type="password" class="form-control" placeholder="Oncourse Password" ng-minlength="1" ng-model="formInfo.password" required>

            <button type="submit" class="btn btn-default pull-right" ng-disabled="loginForm.$invalid" ng-click="login()">{{formInfo.buttonText}}</button>

      </form>


text:
package test.w2d.question;

import org.junit.Before;
import org.junit.Test;
import w2d.antlr.ExceptionErrorStrategy;
import org.junit.Test;
import w2d.parser.W2D;
import w2d.parser.question.QuestionParser;

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

public class CheckboxTest {

    @Before
    public void cleanErrors() {
        ExceptionErrorStrategy.cleanErrors();
        W2D.resetParsers();
    }

    @Test
	public void oneLineCheckbox() {
		new W2D("#c = new Checkbox {label:\"You cool?\"};").readTheScript();

		assertEquals(1, QuestionParser.questions.size());
		assertNotNull(QuestionParser.questions.get("#c"));
		assertEquals("You cool?", QuestionParser.questions.get("#c").label);
	}

    @Test
    public void multiLineCheckbox() {
        new W2D("#c = new Checkbox {\n\tlabel: \"You cool?\"\n};").readTheScript();

        assertEquals(1, QuestionParser.questions.size());
        assertNotNull(QuestionParser.questions.get("#c"));
        assertEquals("You cool?", QuestionParser.questions.get("#c").label);
    }

    @Test
    public void noWhitespaceCheckbox() {
        new W2D("#c=new CheckBox{label:\"You cool?\"};").readTheScript();

        assertEquals(1, QuestionParser.questions.size());
        assertNotNull(QuestionParser.questions.get("#c"));
        assertEquals("You cool?", QuestionParser.questions.get("#c").label);
    }

    @Test
    public void noSemicolonCheckbox() {
        new W2D("#c = new Checkbox {label: \"Hi!\"}").readTheScript();

        assertFalse(ExceptionErrorStrategy.errors.isEmpty());
    }

}


text:
.treeview ul { /*CSS for Simple Tree Menu*/

}

.treeview li { /*Style for LI elements in general (excludes an LI that contains sub lists)*/

}

.treeview li.submenu { /* Style for LI that contains sub lists (other ULs). */
cursor: hand !important;
cursor: pointer !important;
padding: 4px 0 4px 0;
background: url('../images/nav-off.gif');
background-repeat: no-repeat;
}

.treeview li.submenu ul { /*Style for ULs that are children of LIs (submenu) */
display: none; /*Hide them by default. Don't delete. */
color: #000;
padding: 0 0 0 15px;
}

.treeview .submenu ul li { /*Style for LIs of ULs that are children of LIs (submenu) */
cursor: default;
border: none;
}

.treeview .submenu ul li a { /*Style for LIs of ULs that are children of LIs (submenu) */
display: block;
color: #555;
}

.treeview .submenu ul li a:hover { /*Style for LIs of ULs that are children of LIs (submenu) */
color: #000;
}

		.left-nav li.off {
			background: url('../images/nav-off.gif');
		}


text:
from lxml import etree

from jacket.api.storage.storage import common
from jacket.tests.storage.functional import functional_helpers

class XmlTests(functional_helpers._FunctionalTestBase):
    """Some basic XML sanity checks."""

    # FIXME(ja): does storage need limits?
    # def test_namespace_limits(self):
    #     headers = {}
    #     headers['Accept'] = 'application/xml'

    #     response = self.api.api_request('/limits', headers=headers)
    #     data = response.read()
    #     LOG.debug("data: %s" % data)
    #     root = etree.XML(data)
    #     self.assertEqual(root.nsmap.get(None), xmlutil.XMLNS_COMMON_V10)

    def test_namespace_volumes(self):
        headers = {}
        headers['Accept'] = 'application/xml'

        response = self.api.api_request('/volumes', headers=headers,
                                        stream=True)
        data = response.raw
        root = etree.parse(data).getroot()
        self.assertEqual(common.XML_NS_V2, root.nsmap.get(None))


text:
#ifndef __BSD_API__
#define __BSD_API__

#include "rt_clock_def.h"
#include "Roya_Version.h"
#define _MAX_HOST_NAME_GET_STRING_  128
#define _MAX_STRLEN_IP_ADDRESS_      16
// Function to get host name, and upto 10 IP addresses
// maximum of ten IP addresses
short get_local_network_info(char strHostName[_MAX_HOST_NAME_GET_STRING_], char astrIPAddresses[10][_MAX_STRLEN_IP_ADDRESS_]);

// Initialize communication
short roya_6412_init_eth_socket(char *strLocalIP, char *strRemoteIP);

#define BSD_OKEY   0
///////////////   Error Code for BSD and Communication
#define BSD_PARA_ERR_EXCEED_BUFFER_LEN  1
#define BSD_PARA_ERR_DAC_OUT_RANGE      2
#define BSD_PARA_ERR_EXCEED_MAX_NUM_DAC 4
#define BSD_PARA_ERR_EXCEED_MAX_NUM_ADC 8
#define BSD_PARA_ERR_EXCEED_MAX_NUM_BLK 16

#define MTN_ROYA_WSA_STARTUP_ERR          64
#define MTN_ROYA_GET_SOCKET_ERR           65
#define MTN_ROYA_COMM_PRE_CHECK_ERROR     66
#define MTN_ROYA_COMM_REPLY_LEN_ERROR     67
#define MTN_ROYA_GET_WRONG_DATA           68
#define MTN_ROYA_COMM_SENT_LEN_ERROR      69
#define MTN_ROYA_ETH_UDP_BIND_ERROR       70
#define MTN_ROYA_ETH_WRITE_FLASH_ERR      71

// 20111010 Threshold in ms, For cheching the communication error
#define BSD_COMMUNICATION_ERROR_TH_MS     300

// Communication related, time-out around 20 seconds
short bsd_api_get_version_roya_6412(VERSION_INFO *stpVersionRoya6412);
short roya_api_get_rt_clock(RTC_TM *stpRealTimeClock);
short roya_api_set_rt_clock(RTC_TM *stpRealTimeClock);

unsigned int roya_firmware_get_size();
short roya_firmware_download_eth();

/////////
/// EFO related
/////////
short efo_api_init();
short efo_api_get_good_counter(unsigned int *uiEFOCounter);
short efo_api_check_good_once(BOOL *bEfoIsGood);
short bsd_api_get_efo_good_counter(unsigned int *pEfoGoodFlag); // The same as efo_api_get_good_counter

//////////
/// Wire Spool Rotation Detection
//////////
short bsd_api_check_wire_spool_motor_init();
short bsd_api_check_wire_spool_motor_once(BOOL *bWireSpoolMotorIsMoved);

// Calling sequence must be in pair
// efo_api_init()
// ... Trigger EFO once, wait around 10ms
// efo_api_check_good_once(BOOL *bEfoIsGood);
// possible reasons for error
// (1) successfully trigger more than once, but called efo_api_check_good_once only once;
// (2) triggered but not successful
// (3) triggered but too short (i.e. <= 5 ms)

////////////////////////////////////////////////////////
// Non-Stick Related Functions and Macro-Define
////////////////////////////////////////////////////////
#include "BSD_DEF.h"

// Basic IO Unit parameters
#define _OUT_VOLT_VIA_DAC_FACTOR_     (20.0/1024)
#define _OUT_VOLT_VIA_DAC_OFFSET_     (-10.0)

#define _OUT_VOLT_VIA_DAC_FACTOR_12b     (20.0/4096)
#define _OUT_VOLT_VIA_DAC_OFFSET_12b     (-10.0)

#define _IN_VOLT_VIA_ADC_FACTOR_      (25.0/65536)
#define _IN_VOLT_VIA_ADC_OFFSET_       0.0

#define _IN_VOLT_VIA_ADC_FACTOR_BI_16b      (12.0/32767.0)
#define _IN_VOLT_VIA_ADC_OFFSET_BI_16b       -12.0

#define ROYA_MAX_NUM_ADC    4
#define ROYA_MAX_NUM_DAC    4
#define ROYA_MAX_DAC_VALUE  1023
#define ROYA_MAX_ADC_VALUE  65535

// 1. BSD Parameter related, Non-Stick Detection
typedef struct
{
Uint8 cDetectFactorIsr;
Uint16 usDetectSampleLength;
Uint8 cAdcIdx;
Uint8 cDacIdx;
float fDacValue_v;
}BSD_API_PARAMETER;

short bsd_api_set_parameter(BSD_API_PARAMETER *stpParaBlkBSD, unsigned char ucBlkBSD);
short bsd_api_get_parameter(BSD_API_PARAMETER *stpParaBlkBSD, unsigned char ucBlkBSD);
short bsd_api_start_detect(unsigned char ucBlkIdx);
short bsd_api_warm_reset();
short bsd_api_get_status(BSD_STATUS *pstStatusBSD);
short bsd_api_get_adc_volt(unsigned int idxAdc, double *dAdcVolt);

short bsd_debug_save_data_file(char *strFilename);

// set and get the BSD-ISR Freq Factor based on 10KHz
short bsd_api_set_isr_freqency_factor_10KHz(unsigned short usFreqFactor_10KHz);
unsigned short bsd_api_get_isr_freq_factor_base_10KHz();
short roya_api_get_timer_period_clock_cnt(char cTimerId, unsigned int *uiTimerPeriod);

typedef struct
{
	double dMax;
	double dMin;
	double dMean;
	double dStandDevia;
	double dVoltOut;
	double dVoltReadMean;

}BSD_DATA_ANALYSIS;
short bsd_api_analyze_data(unsigned int uiBlkIdx, unsigned int uiSampleCnt, BSD_DATA_ANALYSIS *stpAnalyDataBSD);

// 2. Non-Stick Analyze Stickness after Detection

typedef struct
{
	unsigned char  ucParaBlk1stBSD;
	unsigned char  ucParaBlk2ndBSD;

	unsigned short us1stBondSkipSamples;
	float fBSD1stBondStickDieThAdc_v;  // first bond, when AdcFeedback is lower than this value, it means successful sticking to die
	unsigned short us1stBondNumSamplesConsecGreaterDieThAdc;
	unsigned short us1stBondNumSamplesConsecLowerLeadThAdc; // Not used for checking stickness, only for monitoring

	float fBSD2ndBondStickLeadThAdc_v;  // 2nd bond, when AdcFeedback is lower than this value, it means successful sticking to lead
	unsigned short us2ndBondSkipSamples;
	unsigned short us2ndBondNumSamplesConsecLowerLeadThAdc;
	float fBSD2ndBondNonStickThAdc_v;  // 2nd bond, when AdcFeedback is higher than this value, it means successful non-stickness
	unsigned short us2ndBondNumSampleConsecHigher;
}BSD_ANALYZE_STICKNESS_INPUT;

// Bond Stickness Detection Logic:
// (1) First bond, detection nons, tickness xor stickness,
//       NonStickness: error
//			whenever AdcFeedback is consecutively >= fBSD1stBondStickDieThAdc_v for us1stBondNumSamplesConsecGreaterDieThAdc samples
//       Stickness: OK
// (2) Second bond, only if first-bond is OK, detection of following cases
//      (2.1) StickingLead: once AdcFeedback is consecutively <= fBSD2ndBondStickLeadThAdc_v for us2ndBondNumSamplesConsecLowerLeadThAdc samples,
//		(2.2) Above condition never satisfied:error BSD_ERR_2ND_BOND_NON_STICK_LEAD
//		(2.3) detection of first rising edge,
//				us2ndBondOpenSticknessFirstRiseCount = ii,
//					s.t. {AdcFeedback[ii] >= fBSD2ndBondStickLeadThAdc_v and  AdcFeedback[ii-1] < fBSD2ndBondStickLeadThAdc_v}
//		(2.4) monitoring total number of above rising edges
//				us2ndBondOpenStickCount

// 20090728, initialize for maximum 10KHz sampling rate.
// Only return the Counter_SampleNo of the first rising edge,
//  (2.1) after us2ndBondSkipSamples
//  (2.2) initialize us2ndBondOpenSticknessFirstRiseCount = 0;
typedef struct
{
	unsigned short us1stBondStickStatus;         // 0: OK; Non-zero: Not OK, above error code, BSD_ERR_*
	unsigned short us1stBondEndCheckStickness;

	unsigned short us2ndBondStickStatus;         // 0: OK; Non-zero: Not OK, above error code, BSD_ERR_*
	unsigned short us2ndBondOpenSticknessFirstRiseCount;
	unsigned short us2ndBondStartSampleStickness;
	unsigned short us2ndBondOpenStickCount;      // number of times, when open stickness condition satisfied
}BSD_ANALYZE_STICKNESS_OUTPUT;
short bsd_api_analyze_stickness(BSD_ANALYZE_STICKNESS_INPUT *stpInputAnalyzeBSD,
									 BSD_ANALYZE_STICKNESS_OUTPUT *stpOutputAnalyzeBSD);

short bsd_api_firmware_analyze_stickness(unsigned char ucBSD1stBlk, unsigned char ucBSD2ndBlk,
									 BSD_FIRMWARE_ANALYZE_STICKNESS_OUTPUT *stpOutputAnalyzeBSD);
short bsd_api_set_parameter_firmware_analyze_stickness(BSD_ANALYZE_STICKNESS_INPUT *stpInputAnalyzeBSD);
short bsd_api_get_parameter_firmware_analyze_stickness(BSD_ANALYZE_STICKNESS_INPUT *stpInputAnalyzeBSD);
short bsd_api_get_firmware_analyze_stickness_output(BSD_FIRMWARE_ANALYZE_STICKNESS_OUTPUT *stpOutput);

#endif  // __BSD_API__


text:
import json
import urllib

x = urllib.urlopen("http://course.us.to/school.json")
y = x.read()
#print(y)
z = json.loads(y)
longList = []

for eachClass in z:
    url = "http://course.us.to/school/"+eachClass['name']+".json"
    print url
    lists = urllib.urlopen(url)
    result = json.loads(lists.read())
    for eachThing in result:
        school = eachClass['name']
        name = eachThing["name"]
        longList.append(school+" "+name)

f = open("listfile.txt",'w')
#print(longList)
for eachitem in longList:
    f.write(eachitem)
    f.write("\r\n")
f.close()


text:
<component name="libraryTable">
  <library name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.0">
    <CLASSES>
      <root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.10.0/jackson-annotations-2.10.0.jar!/" />
    </CLASSES>
    <JAVADOC>
      <root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.10.0/jackson-annotations-2.10.0-javadoc.jar!/" />
    </JAVADOC>
    <SOURCES>
      <root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.10.0/jackson-annotations-2.10.0-sources.jar!/" />
    </SOURCES>
  </library>
</component>


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="io.branch.referral">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />

    <application>
        <activity android:name=".mock.MockActivity" />

        <!-- The Branch Key for testing.  Do not use these keys for production applications. -->
        <meta-data android:name="io.branch.sdk.TestMode" android:value="false" />
        <meta-data android:name="io.branch.sdk.BranchKey" android:value="key_live_testing_only" />
        <meta-data android:name="io.branch.sdk.BranchKey.test" android:value="key_test_testing_only" />
    </application>
</manifest>


text:
<?xml version="1.0" encoding="GB2312"?>
<rss version="2.0">
<channel>
<title><![CDATA[dddd]]></title>
<link>http://www.myhomestay.com.cn/2007/dddd/index.html</link>
<description><![CDATA[dddd]]></description>

</channel>
</rss>


text:
package org.wso2.developerstudio.eclipse.esb.synapse.unit.test.wizard.runtest;

import java.io.File;
import java.nio.file.Paths;
import java.util.Locale;

import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

/**
 * Class responsible for creation of wizard page for mock service resource
 * headers.
 */
public class UnitTestConfigurationDetailPage extends WizardPage {

    private static final String DIALOG_TITLE = "Unit Test - Run Configuration";
    private static final String WIZARD_DIALOG_TITLE = "Unit Test - Run Configuration";
    private static final String CONFIGURATION_DESCRIPTION = "Choose an option to run the unit tests";
    private static final String LOCAL_SERVER_LABLE = "Local Server Configuration";
    private static final String REMOTE_SERVER_LABLE = "Remote Server Configuration";
    private static final String SERVER_HOST = "Server Remote Host:";
    private static final String SERVER_PORT = "Server Test Port:";
    private static final String SERVER_PATH = "Executable Path:";
    private static final String BROWSE_LABEL_TEXT = "Browse";
    private static final String EMPTY_STRING = "";

    boolean isLocalServerChecked = true;
    boolean isRemoteServerChecked = false;
    private String serverPath;
    private String localServerPort = "9008";
    private String remoteServerPort = "9008";
    private String serverHosth = "127.0.0.1";

    private Text txtServerPath;
    private Text txtLocalServerPort;
    private Text txtRemoteServerPort;
    private Text txtServerHost;
    private Button findServerBtnBrowse;
    private boolean isPageDirty;

    /**
     * Class constructor.
     */
    protected UnitTestConfigurationDetailPage() {
        super(DIALOG_TITLE);
        setTitle(WIZARD_DIALOG_TITLE);
        setDescription(CONFIGURATION_DESCRIPTION);
    }

    @Override
    public void createControl(Composite parent) {
        Composite container = new Composite(parent, SWT.NULL);

        setControl(container);
        container.setLayout(new FormLayout());
        FormData data;

        // Local server configuration group
        Button localServerBtn = new Button(container, SWT.RADIO);
        localServerBtn.setSelection(true);
        data = new FormData();
        data.top = new FormAttachment(5);
        data.left = new FormAttachment(3);
        localServerBtn.setLayoutData(data);
        localServerBtn.setText(LOCAL_SERVER_LABLE);

        localServerBtn.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                Button source = (Button) e.getSource();
                if (source.getSelection()) {
                    setLocalServerChecked(true);
                    setRemoteServerChecked(false);
                    disableEnableConfigurationGroupType();
                    validate();
                }
            }
        });

        Group grpLocalServerData = new Group(container, SWT.NONE);
        data = new FormData();
        data.top = new FormAttachment(localServerBtn, 5);
        data.left = new FormAttachment(1);
        data.right = new FormAttachment(99);
        grpLocalServerData.setLayoutData(data);
        grpLocalServerData.setLayout(new FormLayout());

        Label lblServerPath = new Label(grpLocalServerData, SWT.NONE);
        data = new FormData();
        data.top = new FormAttachment(grpLocalServerData, 10);
        data.left = new FormAttachment(3);
        data.width = 230;
        lblServerPath.setLayoutData(data);
        lblServerPath.setText(SERVER_PATH);

        txtServerPath = new Text(grpLocalServerData, SWT.BORDER | SWT.READ_ONLY | SWT.MULTI);
        data = new FormData();
        data.top = new FormAttachment(grpLocalServerData, 10);
        data.left = new FormAttachment(lblServerPath, 0);
        data.width = 350;
        data.height = 19;
        txtServerPath.setLayoutData(data);
        txtServerPath.setText(getLocalServerDefaultPath());
        txtServerPath.setSelection(txtServerPath.getText().length());
        setServerPath(txtServerPath.getText());

        txtServerPath.addModifyListener(new ModifyListener() {
            public void modifyText(ModifyEvent arg0) {
                setServerPath(txtServerPath.getText());
                validate();
            }
        });

        findServerBtnBrowse = new Button(grpLocalServerData, SWT.NONE);
        data = new FormData();
        data.top = new FormAttachment(grpLocalServerData, 7);
        data.left = new FormAttachment(txtServerPath, 2);
        data.right = new FormAttachment(97);
        findServerBtnBrowse.setLayoutData(data);
        findServerBtnBrowse.setText(BROWSE_LABEL_TEXT);

        findServerBtnBrowse.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                FileDialog fileDlg = new FileDialog(getShell());
                String[] filterExt = { "*.sh;*.SH;*.bat;*.BAT" };
                fileDlg.setFilterExtensions(filterExt);
                String importFile = fileDlg.open();
                if (importFile != null) {
                    txtServerPath.setText(importFile);
                }
                validate();
            }
        });

        Label lblServerPort = new Label(grpLocalServerData, SWT.NONE);
        data = new FormData();
        data.top = new FormAttachment(lblServerPath, 15);
        data.left = new FormAttachment(3);
        data.width = 230;
        lblServerPort.setLayoutData(data);
        lblServerPort.setText(SERVER_PORT);

        txtLocalServerPort = new Text(grpLocalServerData, SWT.BORDER);
        data = new FormData();
        data.top = new FormAttachment(lblServerPath, 15);
        data.left = new FormAttachment(lblServerPort, 0);
        data.bottom = new FormAttachment(90);
        data.right = new FormAttachment(97);
        txtLocalServerPort.setLayoutData(data);
        txtLocalServerPort.setText(getLocalServerPort());

        txtLocalServerPort.addModifyListener(new ModifyListener() {
            public void modifyText(ModifyEvent arg0) {
                setLocalServerPort(txtLocalServerPort.getText());
                validate();
            }
        });

        // Remote server configuration group
        Button remoteServerBtn = new Button(container, SWT.RADIO);
        data = new FormData();
        data.top = new FormAttachment(grpLocalServerData, 15);
        data.left = new FormAttachment(3);
        remoteServerBtn.setLayoutData(data);
        remoteServerBtn.setText(REMOTE_SERVER_LABLE);

        remoteServerBtn.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                Button source = (Button) e.getSource();
                if (source.getSelection()) {
                    setLocalServerChecked(false);
                    setRemoteServerChecked(true);
                    disableEnableConfigurationGroupType();
                    validate();
                }
            }
        });

        Group grpRemoteServerData = new Group(container, SWT.NONE);
        data = new FormData();
        data.top = new FormAttachment(remoteServerBtn, 5);
        data.left = new FormAttachment(1);
        data.bottom = new FormAttachment(90);
        data.right = new FormAttachment(99);
        grpRemoteServerData.setLayoutData(data);
        grpRemoteServerData.setLayout(new FormLayout());

        Label lblServerHost = new Label(grpRemoteServerData, SWT.NONE);
        data = new FormData();
        data.top = new FormAttachment(grpRemoteServerData, 10);
        data.left = new FormAttachment(3);
        data.width = 230;
        lblServerHost.setLayoutData(data);
        lblServerHost.setText(SERVER_HOST);

        txtServerHost = new Text(grpRemoteServerData, SWT.BORDER);
        data = new FormData();
        data.top = new FormAttachment(grpRemoteServerData, 10);
        data.left = new FormAttachment(lblServerHost, 0);
        data.right = new FormAttachment(97);
        txtServerHost.setLayoutData(data);
        txtServerHost.setText(getServerHosth());

        txtServerHost.addModifyListener(new ModifyListener() {
            public void modifyText(ModifyEvent arg0) {
                setServerHosth(txtServerHost.getText());
                validate();
            }
        });

        Label lblRemoteServerPort = new Label(grpRemoteServerData, SWT.NONE);
        data = new FormData();
        data.top = new FormAttachment(lblServerHost, 15);
        data.left = new FormAttachment(3);
        data.width = 230;
        lblRemoteServerPort.setLayoutData(data);
        lblRemoteServerPort.setText(SERVER_PORT);

        txtRemoteServerPort = new Text(grpRemoteServerData, SWT.BORDER);
        data = new FormData();
        data.top = new FormAttachment(lblServerHost, 15);
        data.left = new FormAttachment(lblRemoteServerPort, 0);
        data.bottom = new FormAttachment(90);
        data.right = new FormAttachment(97);
        txtRemoteServerPort.setLayoutData(data);
        txtRemoteServerPort.setText(getRemoteServerPort());

        txtRemoteServerPort.addModifyListener(new ModifyListener() {
            public void modifyText(ModifyEvent arg0) {
                setRemoteServerPort(txtRemoteServerPort.getText());
                validate();
            }
        });

        setPageComplete(false);
        disableEnableConfigurationGroupType();
        validate();
    }

    /**
     * Method of disable/enable local or remote server configuration layouts.
     */
    private void disableEnableConfigurationGroupType() {
        if (isLocalServerChecked) {
            txtServerPath.setEnabled(true);
            txtLocalServerPort.setEnabled(true);
            txtServerHost.setEnabled(false);
            txtRemoteServerPort.setEnabled(false);
            findServerBtnBrowse.setEnabled(true);
        } else {
            txtServerPath.setEnabled(false);
            txtLocalServerPort.setEnabled(false);
            txtServerHost.setEnabled(true);
            txtRemoteServerPort.setEnabled(true);
            findServerBtnBrowse.setEnabled(false);
        }
    }

    /**
     * Method for validations of wizard page. If validation fails set page as dirty
     * and not complete
     */
    private void validate() {
        if (isLocalServerChecked() && getServerPath().equals(EMPTY_STRING)) {
            setErrorMessage("Please specify an executable server path");
            setPageComplete(false);
            setPageDirty(true);
            return;
        } else if (isLocalServerChecked() && getLocalServerPort().equals(EMPTY_STRING)) {
            setErrorMessage("Please specify a port for run unit test server");
            setPageComplete(false);
            setPageDirty(true);
            return;
        } else if (isLocalServerChecked() && !getLocalServerPort().matches("-?\\d+(\\.\\d+)?")) {
            setErrorMessage("Please specify a port valid testing port");
            setPageComplete(false);
            setPageDirty(true);
            return;
        } else if (isLocalServerChecked() && getLocalServerPort().matches("-?\\d+(\\.\\d+)?")
                && Integer.parseInt(getLocalServerPort()) > 65535) {
            setErrorMessage("Please specify a valid testing port less than or equal to 65535");
            setPageComplete(false);
            setPageDirty(true);
            return;
        } else if (isRemoteServerChecked() && getServerHosth().equals(EMPTY_STRING)) {
            setErrorMessage("Please specify the remote server IP address");
            setPageComplete(false);
            setPageDirty(true);
            return;
        } else if (isRemoteServerChecked() && !isValidServerIP(getServerHosth())) {
            setErrorMessage("Please specify a valid IP address of remote server");
            setPageComplete(false);
            setPageDirty(true);
            return;
        } else if (isRemoteServerChecked() && getRemoteServerPort().equals(EMPTY_STRING)) {
            setErrorMessage("Please specify a valid valid testing port");
            setPageComplete(false);
            setPageDirty(true);
            return;
        } else if (isRemoteServerChecked() && !getRemoteServerPort().matches("-?\\d+(\\.\\d+)?")) {
            setErrorMessage("Please specify a port valid testing port");
            setPageComplete(false);
            setPageDirty(true);
            return;
        } else if (isRemoteServerChecked() && getRemoteServerPort().matches("-?\\d+(\\.\\d+)?")
                && Integer.parseInt(getRemoteServerPort()) > 65535) {
            setErrorMessage("Please specify a valid testing port less than or equal to 65535");
            setPageComplete(false);
            setPageDirty(true);
            return;
        }

        setPageDirty(false);
        setErrorMessage(null);
        setPageComplete(true);
    }

    private String getLocalServerDefaultPath() {

        String microesbPath = "runtime" + File.separator + "microesb";
        // static path for DeveloperStudio for MAC when it is on Application folder
        String eiToolingHomeForMac = "/Applications/IntegrationStudio.app/Contents/Eclipse";

        String windowsPack = File.separator + "bin" + File.separator + "micro-integrator.bat";
        String LinuxMacPack = File.separator + "bin" + File.separator + "micro-integrator.sh";

        String OS = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH);
        String microInteratorPath;

        if (OS.indexOf("windows") >= 0) {
            java.nio.file.Path path = Paths.get("");
            microInteratorPath = (path).toAbsolutePath().toString() + File.separator + microesbPath + windowsPack;
        } else {
            // check if EI Tooling is in Application folder for MAC
            File macOSEIToolingAppFile = new File(eiToolingHomeForMac);
            if (macOSEIToolingAppFile.exists()) {
                microInteratorPath = eiToolingHomeForMac + File.separator + microesbPath + LinuxMacPack;
            } else {
                java.nio.file.Path path = Paths.get("");
                microInteratorPath = (path).toAbsolutePath().toString() + File.separator + microesbPath + LinuxMacPack;
            }
        }

        return microInteratorPath;
    }

    private boolean isValidServerIP(String ip) {
        String PATTERN = "^((0|1\\d?\\d?|2[0-4]?\\d?|25[0-5]?|[3-9]\\d?)\\.){3}(0|1\\d?\\d?|2[0-4]?\\d?|25[0-5]?|[3-9]\\d?)$";
        return ip.matches(PATTERN);
    }

    public boolean isLocalServerChecked() {
        return isLocalServerChecked;
    }

    public void setLocalServerChecked(boolean isLocalServerChecked) {
        this.isLocalServerChecked = isLocalServerChecked;
    }

    public boolean isRemoteServerChecked() {
        return isRemoteServerChecked;
    }

    public void setRemoteServerChecked(boolean isRemoteServerChecked) {
        this.isRemoteServerChecked = isRemoteServerChecked;
    }

    public boolean isPageDirty() {
        return isPageDirty;
    }

    public void setPageDirty(boolean isPageDirty) {
        this.isPageDirty = isPageDirty;
    }

    public String getServerPath() {
        return serverPath;
    }

    public void setServerPath(String serverPath) {
        this.serverPath = serverPath;
    }

    public String getLocalServerPort() {
        return localServerPort;
    }

    public void setLocalServerPort(String serverPort) {
        this.localServerPort = serverPort;
    }

    public String getRemoteServerPort() {
        return remoteServerPort;
    }

    public void setRemoteServerPort(String serverPort) {
        this.remoteServerPort = serverPort;
    }

    public String getServerHosth() {
        return serverHosth;
    }

    public void setServerHosth(String serverHosth) {
        this.serverHosth = serverHosth;
    }
}


text:
ObjDetParameters::ObjDetParameters(QSettings * settings,
                                   const QString & group)
     : VariableSettings(settings, group)
{
}


text:
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe "Planets" do
  let(:planets) do
    Galcon::Planets.new(:planets => raw_planets.clone.reverse)
  end
  let(:raw_planets) do
    res = []
    res << Galcon::Planet.new(:loc => [0,0].to_cord, :player => :red)
    res << Galcon::Planet.new(:loc => [3,0].to_cord, :player => :blue)
    res << Galcon::Planet.new(:loc => [4,0].to_cord)
    res << Galcon::Planet.new(:loc => [6,2].to_cord)

    res << Galcon::Planet.new(:loc => [5,0].to_cord, :player => :green)
    res << Galcon::Planet.new(:loc => [7,0].to_cord, :player => :green)
    res
  end
  let(:source) { raw_planets.first }

  describe 'closest' do
    it 'closest any' do
      planets.closest(source).should == raw_planets[1]
    end

    it 'closest unowned' do
      planets.closest(source, :player => nil).should == raw_planets[2]
    end

    it 'closest blue' do
      planets.closest(source, :player => :blue).should == raw_planets[1]
    end
    it 'closest green' do
      planets.closest(source, :player => :green).should == raw_planets[4]
    end

    it 'closest enemy' do
      planets.closest(source, :player => :enemy).should == raw_planets[1]
    end
    it 'closest enemy 2' do
      planets.closest(raw_planets[1], :player => :enemy).should == raw_planets[4]
    end
    it 'closest unknown by me' do
      planets.closest(raw_planets[1], :player => :not_mine).should == raw_planets[2]
    end
  end

  describe 'list' do
    it 'by player - red' do
      planets.list(:player => :red).should == raw_planets[0..0]
    end
    it 'by player - green' do
      planets.list(:player => :green).sort.should == raw_planets.select { |x| x.player == :green }.sort
    end
    it 'by player - unowned' do
      planets.list(:player => nil).tap { |x| x.size.should == 2 }.sort.should == raw_planets.select { |x| x.player == nil }.sort
    end

    it 'by player - enemy' do
      planets.list(:player => [:enemy, :red]).sort.size.should == raw_planets.select { |x| x.player && x.player != :red }.sort.size
      planets.list(:player => [:enemy, :red]).sort.should == raw_planets.select { |x| x.player && x.player != :red }.sort
    end
    it 'by player - not mine' do
      planets.list(:player => [:not_mine, :red]).sort.size.should == raw_planets.select { |x| x.player != :red }.sort.size
      planets.list(:player => [:not_mine, :red]).sort.should == raw_planets.select { |x| x.player != :red }.sort
    end

    it 'errors on bad player' do
      lambda { planets.list(:player => [:fancy, :red]) }.should raise_error(Galcon::Planets::UnknownPlayerTypeError)
    end
  end

end


text:
    my $uuid = UUID.new;
    say ~$uuid;

    my $uuid = UUID.new(:version(4));

Currently supports version 4 (random) UUID generation.


text:
#if !defined(BOOST_FUSION_DEQUE_LIMITS_26112006_1737)
#define BOOST_FUSION_DEQUE_LIMITS_26112006_1737

#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#error "C++03 only! This file should not have been included"
#endif

#include <boost/fusion/container/vector/detail/cpp03/limits.hpp>

#if !defined(FUSION_MAX_DEQUE_SIZE)
# define FUSION_MAX_DEQUE_SIZE FUSION_MAX_VECTOR_SIZE
#else
# if FUSION_MAX_DEQUE_SIZE < 3
#   undef FUSION_MAX_DEQUE_SIZE
#   if (FUSION_MAX_VECTOR_SIZE > 10)
#       define FUSION_MAX_DEQUE_SIZE 10
#   else
#       define FUSION_MAX_DEQUE_SIZE FUSION_MAX_VECTOR_SIZE
#   endif
# endif
#endif

#define FUSION_MAX_DEQUE_SIZE_STR BOOST_PP_STRINGIZE(BOOST_FUSION_PP_ROUND_UP(FUSION_MAX_DEQUE_SIZE))

#endif


text:
<?php

namespace Gear\DependencyInjection\Compiler\Factory;

use Symfony\Component\DependencyInjection\Reference;

class ReferenceFactory
{
    public function create($id)
    {
        return new Reference($id);
    }
}