text:
package bolianeducation.bolianchild.view.task;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.google.gson.reflect.TypeToken;
import com.squareup.picasso.Picasso;

import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

import java.util.ArrayList;
import java.util.List;

import bolianeducation.bolianchild.KeyList;
import bolianeducation.bolianchild.R;
import bolianeducation.bolianchild.api.BLService;
import bolianeducation.bolianchild.custom.Kanner;
import bolianeducation.bolianchild.custom.OnItemClickListener;
import bolianeducation.bolianchild.manager.InfoManager;
import bolianeducation.bolianchild.modle.Banner;
import bolianeducation.bolianchild.modle.CommentResponse;
import bolianeducation.bolianchild.modle.Label;
import bolianeducation.bolianchild.modle.ResponseEntity;
import bolianeducation.bolianchild.modle.TaskExtra;
import bolianeducation.bolianchild.modle.TaskType;
import bolianeducation.bolianchild.modle.WebInfo;
import bolianeducation.bolianchild.modle.event.AwardEvent;
import bolianeducation.bolianchild.utils.GsonUtils;
import bolianeducation.bolianchild.utils.LogManager;
import bolianeducation.bolianchild.utils.ToastUtil;
import bolianeducation.bolianchild.view.BaseFragment;
import bolianeducation.bolianchild.view.TaskListActivity;
import bolianeducation.bolianchild.view.base.BaseWebActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import sumimakito.android.advtextswitcher.AdvTextSwitcher;
import sumimakito.android.advtextswitcher.Switcher;

import static bolianeducation.bolianchild.KeyList.IKEY_EXTRA_BUNDLE;

/**
 * Created by admin on 2017/11/10.
 * 任务秀头部fragment
 */

public class TaskShowHeaderFragment extends BaseFragment {
    @BindView(R.id.giv_main)
    Kanner givMain;
    @BindView(R.id.tv_news)
    AdvTextSwitcher tvNews;
    @BindView(R.id.tv_communityWelfare)
    TextView tvCommunityWelfare;
    @BindView(R.id.tv_studentHelp)
    TextView tvStudentHelp;
    @BindView(R.id.tv_teacherComing)
    TextView tvTeacherComing;

    private Unbinder unbinder;
    private String[] news = {"wryyyyyyyyyyyyyyyyyyy", "オラオラオラオラオラオラオラオラオラオラオラ", "無駄無駄無駄無駄無駄無駄無駄無駄無駄無駄無駄無駄無駄"};

    /**
     * 轮播图
     */
    private List<Banner> banners = new ArrayList<>();

    /**
     * 轮播图片地址
     */
    private List<String> imageList = new ArrayList<>();

    /**
     * 轮播图跳转的H5地址
     */
    private List<String> h5List = new ArrayList<>();

    private WebInfo webInfo = new WebInfo();
    private int bannerCount = 4;

    /**
     * 滚动文案
     */
    List<String> bannerText = new ArrayList<>();

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.home_head, container, false);
        unbinder = ButterKnife.bind(this, view);
        return view;
    }

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

    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onEvent(AwardEvent event) {
        requestBannerText();
    }

    /**
     * 请求滚动文案
     */
    private void requestBannerText() {
        Call<ResponseEntity> call = BLService.getHeaderService().getBannerText(10);
        call.enqueue(new Callback<ResponseEntity>() {
            @Override
            public void onResponse(Call<ResponseEntity> call, Response<ResponseEntity> response) {
                ResponseEntity body = response.body();
                LogManager.e("tag", GsonUtils.toJson(body));
                final ResponseEntity comments = GsonUtils.fromJson(GsonUtils.toJson(body), new TypeToken<ResponseEntity<CommentResponse.Comment>>() {
                }.getType());

                if (comments == null || comments.getReturnData() == null || comments.getReturnData().size() == 0)
                    return;

                context.runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        for (int i = 0; i < comments.getReturnData().size(); i++) {
                            CommentResponse.Comment comment = (CommentResponse.Comment) comments.getReturnData().get(i);

                            if (Label.answer.toString().equals(comment.getLabel())) {
                                StringBuffer sb = new StringBuffer();
                                sb.append(comment.getUsername());
                                sb.append(" 回答了 ");
                                if (!TextUtils.isEmpty(comment.getTaskLabel())) {
                                    sb.append("#" + comment.getTaskLabel() + "# ");
                                }
                                sb.append(comment.getTaskTitle());
                                bannerText.add(sb.toString());
                            } else {
                                StringBuffer sb = new StringBuffer();
                                sb.append(comment.getUsername());
                                sb.append(" 评论了 ");
                                if (!TextUtils.isEmpty(comment.getTaskLabel())) {
                                    sb.append("#" + comment.getTaskLabel() + "# ");
                                }
                                sb.append(comment.getTaskTitle());
                                bannerText.add(sb.toString());
                            }
                        }
                        if (tvNews == null) return;
                        tvNews.setTexts(bannerText.toArray(new String[bannerText.size()]));
                        new Switcher().attach(tvNews).setDuration(5000).start();
                    }
                });
            }

            @Override
            public void onFailure(Call<ResponseEntity> call, Throwable t) {
                ToastUtil.showToast(context, t.getMessage());
            }
        });
    }

    /**
     * 请求轮播图
     */
    private void requestBanners() {
        Call<ResponseEntity> call = BLService.getHeaderService().getBanners(bannerCount);
        call.enqueue(new Callback<ResponseEntity>() {
            @Override
            public void onResponse(Call<ResponseEntity> call, Response<ResponseEntity> response) {
                LogManager.e("tag", GsonUtils.toJson(response.body()));
                final ResponseEntity body = GsonUtils.fromJson(GsonUtils.toJson(response.body()), new TypeToken<ResponseEntity<Banner>>() {
                }.getType());
                if (body != null && body.getReturnData() != null) {
                    updateBanner(body.getReturnData());
                }
            }

            @Override
            public void onFailure(Call<ResponseEntity> call, Throwable t) {
                ToastUtil.showToast(context, t.getMessage());
            }
        });
    }

    /**
     * 更新轮播主图
     */
    private void updateBanner(final List<Banner> data) {
        context.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                banners.addAll(data);
                for (int i = 0; i < banners.size(); i++) {
                    Banner banner = banners.get(i);
                    if (banner != null) {
                        h5List.add(InfoManager.getBannerH5Url(banner.getId()));
                        String imageUrl = "";
                        if (banner.getList() != null && banner.getList().size() > 0) {
                            imageUrl = banner.getList().get(0).getRelativePath();
                            //预加载图片
                            Picasso.with(context).load(imageUrl).fetch();
                        }
                        imageList.add(i, imageUrl);
                    }
                }
                if (givMain != null) {
                    givMain.setImagesUrl(imageList);
                    givMain.mKannerPagerAdapter.setOnItemClickListener(new OnItemClickListener() {
                        @Override
                        public void onItemClickListener(View view, int position) {
                            String url = h5List.get(position - 1);
                            webInfo.setUrl(url);
                            startActivity(new Intent(context, BaseWebActivity.class).putExtra(KeyList.IKEY_WEB_INFO, webInfo));
                        }
                    });
                }
            }
        });
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

    @OnClick({R.id.tv_communityWelfare, R.id.tv_studentHelp, R.id.tv_teacherComing})
    void onClick(View v) {
        Intent intent = new Intent(context, TaskListActivity.class);
        TaskExtra intentBundle = new TaskExtra();
        intentBundle.setPersonal("self");

        switch (v.getId()) {
            case R.id.tv_studentHelp: //学生互助
                intentBundle.setTaskType(TaskType.STUDENT.toString());
                intentBundle.setTitle("学生互助");
                intent.putExtra(IKEY_EXTRA_BUNDLE, intentBundle);
                context.startActivity(intent);
                break;
            case R.id.tv_communityWelfare: //家长问答
                intentBundle.setTaskType(TaskType.PARENT.toString());
                intentBundle.setTitle("家长问答");
                intent.putExtra(IKEY_EXTRA_BUNDLE, intentBundle);
                context.startActivity(intent);
//                context.startActivity(new Intent(context, CommunityWelfareActivity.class));
                break;
            case R.id.tv_teacherComing: //教师来也
                intentBundle.setTaskType(TaskType.TEACHER.toString());
                intentBundle.setTitle("教师来也");
                intent.putExtra(IKEY_EXTRA_BUNDLE, intentBundle);
                context.startActivity(intent);
                break;
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        if (givMain != null) {
            givMain.stop();
        }
    }
}


text:
module.exports = function(pricesArray, query) {

  // Set the size of the D3 price chart
  var width = 500;
  var height = 275;

  // Used to color bubbles
  // i & 1 --> two colors, i & 2 --> three colors, etc.
  var fill = d3.scale.category10();

  // Used to find the minimum and maximum price for d3.scale.linear
  var pricesOnlyArray = pricesArray.map(function(item) {
    return item.salePrice;
  });

  // Find the minimum and maximum price for all products listed in the query results
  var min = d3.min(pricesOnlyArray);
  var max = d3.max(pricesOnlyArray);

  // Scale for circle radii. Size ranges from 15px to 45px
  var radiusScale = d3.scale.linear()
                            .domain([min, max])
                            .range([15, 45]);

  // Scale for font-size in circles. Size ranges from 7px to 20px
  var textScale = d3.scale.linear()
                          .domain([min, max])
                          .range([7, 20]);

  // Initializes D3 "force", which provides animation for the bubbles
  var force = d3.layout.force()
      .nodes(pricesArray)
      .size([width, height])
      // "charge" is how strong the attraction between bubbles are
      // We use radiusScale for greater repulsion for larger bubbles
      .charge(function(d) { return radiusScale(d.salePrice) * -3.5; })
      .on("tick", tick)
      .start();

  // Select the SVG element in the ".d3-price-container"
  var svg = d3.select(".price-chart")
      .attr("width", width)
      .attr("height", height);

  // Appends "Walmart" and "Best Buy" key to the chart
  // Text color represents the bubbles the store is associated with
  var storesLegend = svg.selectAll("g.stores")
      .data(['Walmart', 'Best Buy'])
      .enter().append("text")
      .attr("x", "400")
      .attr("y", function(d,i) { return (i+1) * 30; })
      .attr("font-size", "17px")
      .attr("font-weight", "bold")
      .attr("fill", function(d,i) { return fill(i & 1); })
      .text(function(d) { return d; });

  // Create a node for each product in pricesArray
  // Use "g" to group things appended to each node
  var node = svg.selectAll("g.node")
      .data(pricesArray)
      .enter().append("g")
      .classed("node", true)
      // Allows bubbles to be dragged
      .call(force.drag)
      // Prevents bubbles from scattering on drag event
      .on("mousedown", function() { d3.event.stopPropagation(); });

  // Create a circle/bubble for each product/node
  // Size and color are used for data visualization
  node.append("circle")
      .attr("class", "node")
      .attr("cx", 0)
      .attr("cy", 0)
      // The higher a product's price, the larger the bubble
      .attr("r", function(d) { return radiusScale(d.salePrice); })
      // Creates two colors for the two halves of pricesArray
      .style("fill", function(d, i) { return fill(i & 1); })
      .style("stroke", function(d, i) { return d3.rgb(fill(i & 1)).darker(2); });

  // Appends the price to each bubble
  node.append("text")
    // Adjust the x and y position of the price to be close to the middle
    .attr("x", function(d) { return -radiusScale(d.salePrice) * 0.8; })
    .attr("y", function(d) { return radiusScale(d.salePrice) * 0.17; })
    // Adjust the font size based on the size of the bubble
    .attr("font-size", function(d) { return textScale(d.salePrice) + "px"; })
    .attr("fill", "white")
    .text(function(d) { return "$" + d.salePrice; });

  svg.style("opacity", 1e-6)
    .transition()
      .duration(1000)
      .style("opacity", 1);

  // Scatters bubbles on click
  d3.select(".d3-price-container")
      .on("mousedown", mousedown);

  // Initialize the tooltip popup
  tooltipSetup();

  // D3 "force" uses this to animate the bubbles
  function tick(e) {

    // Push different nodes in different directions for clustering.
    var k = 1.5 * e.alpha;
    pricesArray.forEach(function(o, i) {
      o.y += i & 1 ? k : -k;
      o.x += i & 1 ? k : -k;
    });

    // Sets the x and y attributes of the "g" node for D3's "force"
    svg.selectAll("g.node")
      .attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });
  }

  // Function that scatters bubbles on click event
  function mousedown() {
    pricesArray.forEach(function(o, i) {
      o.x += (Math.random() - 0.5) * 40;
      o.y += (Math.random() - 0.5) * 40;

    });
    force.resume();
  }

  function tooltipSetup() {
    // tooltip vars
    tooltipOffset = 10;
    tooltipWidth = 220;
    tooltipHeight = 105;

    // Append tooltip popup div to container
    var tooltip = d3.select(".d3-price-container")
      .append("div")
      .style("width", tooltipWidth)
      .style("height", tooltipHeight)
      .classed("hoverbox", true);

    // Append "product-name" div to tooltip div
    tooltip.append('div')
      .classed("product-name", true);

    // Select all products in the array
    var nodes = svg.selectAll("g.node");

    // On mouseover event over a bubble, display the tooltip popup that displays the product name
    nodes.on('mouseover', function(d) {
      var mouseLoc = d3.mouse(this.parentNode);

      // Set position and styling of tooltip div
      tooltip
            .style("display", "block")
            .style("left", (mouseLoc[0]-170)+"px")
            .style("top", (mouseLoc[1]-80)+"px")
            .style("font-size", "13px")
            .transition()
            .duration(200)
            .style('opacity', 1);

      // Set the text in the tooltip popup to be the product name associated with the price in the bubble
      tooltip.select(".product-name")
        .text(d.name);
    });

    // On mouseout event, tooltip div disappears
    nodes.on('mouseout', function(d) {
      tooltip.transition()
        .duration(200)
        .style('opacity', 0)
        .each('end', function () {
          tooltip.style("display", "none");
        });
    });
  }

};

redpajama_set_name: RedPajamaGithub


text:
package org.wso2.carbon.apimgt.rest.api.publisher.v1;

import org.wso2.carbon.apimgt.rest.api.publisher.v1.*;
import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.*;

import org.apache.cxf.jaxrs.ext.MessageContext;
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;

import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.APIProductDTO;
import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.APIProductListDTO;
import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.DocumentDTO;
import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.DocumentListDTO;
import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.ErrorDTO;
import java.io.File;
import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.FileInfoDTO;

import java.util.List;

import java.io.InputStream;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;

public interface ApiProductsApiService {
      public Response apiProductsApiProductIdDelete(String apiProductId, String ifMatch, MessageContext messageContext);
      public Response apiProductsApiProductIdDocumentsDocumentIdContentGet(String apiProductId, String documentId, String accept, String ifNoneMatch, MessageContext messageContext);
      public Response apiProductsApiProductIdDocumentsDocumentIdContentPost(String apiProductId, String documentId, InputStream fileInputStream, Attachment fileDetail, String inlineContent, String ifMatch, MessageContext messageContext);
      public Response apiProductsApiProductIdDocumentsDocumentIdDelete(String apiProductId, String documentId, String ifMatch, MessageContext messageContext);
      public Response apiProductsApiProductIdDocumentsDocumentIdGet(String apiProductId, String documentId, String accept, String ifNoneMatch, MessageContext messageContext);
      public Response apiProductsApiProductIdDocumentsDocumentIdPut(String apiProductId, String documentId, DocumentDTO body, String ifMatch, MessageContext messageContext);
      public Response apiProductsApiProductIdDocumentsGet(String apiProductId, Integer limit, Integer offset, String accept, String ifNoneMatch, MessageContext messageContext);
      public Response apiProductsApiProductIdDocumentsPost(String apiProductId, DocumentDTO body, MessageContext messageContext);
      public Response apiProductsApiProductIdGet(String apiProductId, String accept, String ifNoneMatch, MessageContext messageContext);
      public Response apiProductsApiProductIdPut(String apiProductId, APIProductDTO body, String ifMatch, MessageContext messageContext);
      public Response apiProductsApiProductIdSwaggerGet(String apiProductId, String accept, String ifNoneMatch, MessageContext messageContext);
      public Response apiProductsApiProductIdSwaggerPut(String apiProductId, String apiDefinition, String ifMatch, MessageContext messageContext);
      public Response apiProductsApiProductIdThumbnailGet(String apiProductId, String accept, String ifNoneMatch, MessageContext messageContext);
      public Response apiProductsApiProductIdThumbnailPut(String apiProductId, InputStream fileInputStream, Attachment fileDetail, String ifMatch, MessageContext messageContext);
      public Response apiProductsGet(Integer limit, Integer offset, String query, String accept, String ifNoneMatch, MessageContext messageContext);
      public Response apiProductsPost(APIProductDTO body, MessageContext messageContext);
}


text:
classdef OrthogonalizingNetworkTest < AbstractTest
    methods (Test)
        function testBuildNetwork(testCase)
            network = OrthogonalizingNetwork(10,100);
            % constructor equivalent to:
%             network.nNeurons = 100;
%             network.nSynapses = 10;
            network.buildNetwork();
            testCase.assertEqual(network.network, zeros(10,100));
            testCase.assertEqual(network.nNeurons, 100);
            testCase.assertEqual(network.nSynapses, 10);
        end
        function testInputsPropagatedToInternalNetwork(testCase)
            network = createOrthogonalizingNetwork(10,100);
            network.rebuildConnections = true;
            network.buildNetwork();
            input = [1 1 1 1 1 0 0 0 0 0];
            fired = network.step(input);
            testCase.assertEqual(fired, [1 0 1 0 0 0 0 1 1 1]);
            fired2 = network.step(input);
            testCase.assertEqual(fired2, [1 0 1 0 0 0 0 1 1 1]);
            fired3 = network.step(input);
            testCase.assertEqual(fired3, [1 0 1 0 0 0 0 1 1 1]);
        end
        function testSimilarInputsActivateSimilarRandomOutputs(testCase)
            network = createOrthogonalizingNetwork(10,100);
            input = [1 1 1 1 1 0 0 0 0 0];
            input2 = [1 0 1 1 1 0 0 0 0 0];
            input3 = [1 1 1 1 1 0 0 0 0 1];
            inputDifferent = [0 0 0 0 0 1 1 1 1 1];
            fired = network.step(input);
            testCase.assertEqual(fired, [1 0 0 0 0 0 1 0 1 1]);
            fired2 = network.step(input2);
            testCase.assertEqual(fired2, [1 0 0 0 0 0 1 0 1 1], ...
                'some inputs may not be transmitted');
            fired3 = network.step(input3);
            testCase.assertEqual(fired3, [1 0 0 0 0 1 1 0 1 1], ...
                'additional input bit just adds to previous input');
            firedDifferent = network.step(inputDifferent);
            testCase.assertEqual(firedDifferent , [0 1 0 1 0 1 0 0 0 1], ...
                'different inputs produce different outputs');
        end
        function testSimilarInputsActivateSparseRandomOutputs(testCase)
            network = createOrthogonalizingNetwork(10,100);
            network.sparse = true;
            input =  [1 1 1 1 0 0 0 0 0 0];
            input2 = [1 0 1 1 0 0 0 0 0 0];
            input3 = [1 1 1 1 0 0 0 0 0 1];
            inputDifferent = [0 0 0 0 0 1 1 1 1 0];
            fired = network.step(input);
            testCase.assertEqual(fired, [0 0 0 0 0 0 0 0 1 0]);
            fired2 = network.step(input2);
            testCase.assertEqual(fired2, [0 0 0 0 0 0 0 0 1 0]);
            fired3 = network.step(input3);
            testCase.assertEqual(fired3, [0 0 0 0 0 0 1 0 0 0]);
            firedDifferent = network.step(inputDifferent);
            testCase.assertEqual(firedDifferent, [0 0 0 0 1 0 0 0 0 0]);
        end
%         buildSparseVector(obj, sparseInput)
        function testBuildSparseVectorFromOneOrTwoInputs(testCase)
            network = createOrthogonalizingNetwork(10,100);
            sparseVector = network.buildSparseVector([3]);
            testCase.assertEqual(sparseVector, [0 0 0 1 0 0 0 0 0 0]);
            sparseVector = network.buildSparseVector([3 8]);
            testCase.assertEqual(sparseVector, [0 0 0 1 0 0 0 0 1 0]);
            sparseVector = network.buildSparseVector([3 3]);
            testCase.assertEqual(sparseVector, [0 0 0 1 0 0 0 0 0 0]);
        end
        function testIfLecIsZerosOnlyBuildOneDigitPlace(testCase)
            network = createOrthogonalizingNetwork(10,100);
            network.nMEC = 5;
            network.separateMecLec = true;
            sparseInput = network.buildSparseInput([0 0 0 1 0 0 0 0 0 1]);
%             disp(['size: ',mat2str(size(sparseInput)),mat2str(sparseInput)]);
            testCase.assertEqual(sparseInput, [9 7], ...
                'both parts of input non-zero, so two digits');
            sparseInput = network.buildSparseInput([0 0 0 1 0 0 0 0 0 0]);
            testCase.assertEqual(sparseInput, [9], ...
                'LEC part of input is zero, so only one digit');
        end
        function testSimilarInputsForMecOrLecActivateTwoSparseRandomOutputs(testCase)
            network = createOrthogonalizingNetwork(10,100);
            network.sparse = true;
            network.nMEC = 5;
            network.separateMecLec = true;
            input =  [1 0 1 1 0 1 0 0 0 0];
            input2 = [1 0 1 1 0 0 1 0 0 0];
            input3 = [1 0 1 1 0 1 0 0 0 1];
            input4 = [0 0 0 0 1 1 0 0 0 1];
            fired = network.step(input);
            testCase.assertEqual(fired, [0 0 0 0 0 0 0 1 1 0]);
            fired2 = network.step(input2);
            testCase.assertEqual(fired2, [0 0 0 0 0 0 0 0 1 1], ...
                'MEC same (9), LEC different, so one digit same');
            fired3 = network.step(input3);
            testCase.assertEqual(fired3, [0 0 0 0 1 0 0 0 1 0], ...
                'MEC still same (9), LEC different');
            fired4 = network.step(input4);
            testCase.assertEqual(fired4, [0 0 0 0 1 0 0 1 0 0], ...
                'MEC different, LEC same as previous');
        end
        function testCreateSparseOutputUsingLowDigitsOfSin(testCase)
            network = OrthogonalizingNetwork(10, 100);
            network.sparse = true;
            network.buildNetwork();
            input = [1 1 1 1 0 0 0 0 1 0];
            sparseInput = network.buildSparseInput(input);
            testCase.assertEqual(sparseInput, 0);
            testCase.assertEqual(network.buildSparseVector(sparseInput) , [1 0 0 0 0 0 0 0 0 0]);
            input = [1 1 1 1 1 0 0 0 1 0];
            sparseInput = network.buildSparseInput(input);
            testCase.assertEqual(sparseInput, 8);
            testCase.assertEqual(network.buildSparseVector(sparseInput) , [0 0 0 0 0 0 0 0 1 0], ...
            '1-based indexing so 0 is 1');
            input = [0 0 0 0 0 0 0 0 1 0];
            sparseInput = network.buildSparseInput(input);
            testCase.assertEqual(sparseInput, 1);
            testCase.assertEqual(network.buildSparseVector(sparseInput) , [0 1 0 0 0 0 0 0 0 0]);
            input = [0 0 0 0 0 0 0 0 0 1];
            sparseInput = network.buildSparseInput(input);
            testCase.assertEqual(sparseInput, 7);
            testCase.assertEqual(network.buildSparseVector(sparseInput) , [0 0 0 0 0 0 0 1 0 0]);
            input = [0 0 0 0 0 0 0 0 0 0];
            sparseInput = network.buildSparseInput(input);
            testCase.assertEqual(sparseInput, 0);
            testCase.assertEqual(network.buildSparseVector(sparseInput) , [1 0 0 0 0 0 0 0 0 0]);
        end

    end
end
function network = createOrthogonalizingNetwork(synapses, neurons)
    network = OrthogonalizingNetwork(synapses, neurons);
    network.buildNetwork();
end


text:
<?php

namespace Application\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration,
    Doctrine\DBAL\Schema\Schema;

/**
 * Auto-generated Migration: Please modify to your need!
 */
class Version20121111140311 extends AbstractMigration
{
    public function up(Schema $schema)
    {
        // this up() migration is autogenerated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");

        $this->addSql("CREATE TABLE texts (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, text_ca LONGTEXT NOT NULL, text_es LONGTEXT NOT NULL, text_en LONGTEXT NOT NULL, UNIQUE INDEX UNIQ_1E3513BF5E237E06 (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
        $this->addSql("INSERT INTO texts SET name='biografia', text_ca='bio catala', text_es='bio castellano', text_en='bio english'");
        $this->addSql("INSERT INTO texts SET name='home', text_ca='home catala', text_es='home castellano', text_en='home english'");
    }

    public function down(Schema $schema)
    {
        // this down() migration is autogenerated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");

        $this->addSql("DROP TABLE texts");
    }
}


text:
{%- include 'header.html' %}

{% autoescape false %}
{{ text }}
{% endautoescape %}

{%- include 'footer.html' %}


text:
import sys
import os
import platform
import numpy as np

# -- add development version of flopy to system path
flopypath = os.path.join('..', '..')
if flopypath not in sys.path:
    print 'Adding to sys.path: ', flopypath
    sys.path.append(flopypath)

import flopy
import flopy.utils as fputl

spth = os.getcwd()

mname = 'twrip.nam'
#mname = 'Oahu_01.nam'

model_ws = os.path.join('..', 'data', 'parameters')
omodel_ws = os.path.join('..', 'basic', 'data')

#mname = 'freyberg'
#bpth = os.path.join('/Users/jdhughes/Documents/Training/GW1774Materials/GitRepository/GW1774/ClassMaterials/Exercises/Data/FreybergModel')
#os.chdir(bpth)

#model_ws = os.path.join('.')
#omodel_ws = os.path.join('..', '17_streamcapture')

exe_name = 'mf2005'
version = 'mf2005'

# -- load the model
ml = flopy.modflow.Modflow.load(mname, version=version, exe_name=exe_name,
                                verbose=False, model_ws=model_ws)

# -- change model workspace
ml.change_model_ws(new_pth=omodel_ws)

# -- add pcg package
if mname == 'twrip.nam':
    ml.remove_package('SIP')
    pcg = flopy.modflow.ModflowPcg(ml)

# wel = ml.get_package('WEL')
# wd = wel.stress_period_data[0]
# wel.stress_period_data[0] = [[0, 8,  7, -5.],
#                              [0, 8,  9, -5.],
#                              [0, 8, 11, -5.]]

# -- save the model
ml.write_input()

os.chdir(spth)

print 'finished...'


text:
//
// Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 generiert
// Siehe http://java.sun.com/xml/jaxb
// Änderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren.
// Generiert: 2014.10.07 um 04:55:05 PM CEST
//

package com.v2gclarity.risev2g.shared.v2gMessages.msgDef;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java-Klasse für ServiceListType complex type.
 *
 *
Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
 *
 *

 * <complexType name="ServiceListType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="Service" type="{urn:iso:15118:2:2013:MsgDataTypes}ServiceType" maxOccurs="8"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ServiceListType", propOrder = {
    "service"
})
public class ServiceListType {

    @XmlElement(name = "Service", required = true)
    protected List<ServiceType> service;

    /**
     * Gets the value of the service property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the service property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getService().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link ServiceType }
     *
     *
     */
    public List<ServiceType> getService() {
        if (service == null) {
            service = new ArrayList<ServiceType>();
        }
        return this.service;
    }

}


text:
class TestMiddleware():
    def __init__(self,request):
        print "TestMiddleware loaded"

    def request_hook(self):
        print "TestMiddleware.request_hook called"

    def response_hook(self):
        print "TestMiddleware.response_hook called"

    def view_hook(self,view):
        print "TestMiddleware.view_hook called"


text:
namespace DirtyMagic.Pointers
{
    public class ValuePointer<T> : ModulePointer where T : struct
    {
        public ValuePointer(string moduleName, int offset) : base(moduleName, offset) { }

        public T Read(MemoryHandler memory) => memory.Read<T>(this);

        public void Write(MemoryHandler memory, T malue) => memory.Write<T>(this, malue);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
    <class name="com.jsh.model.po.DepotHead" table="jsh_depothead">
        <id name="Id" type="java.lang.Long">
            <column name="Id"/>
            <generator class="native"/>
        </id>
        <property generated="never" lazy="false" name="Type" type="java.lang.String">
            <column length="50" name="Type">
                <comment>类型(出库/入库)</comment>
            </column>
        </property>
        <property generated="never" lazy="false" name="SubType" type="java.lang.String">
            <column length="50" name="SubType">
                <comment>出入库分类</comment>
            </column>
        </property>
        <many-to-one name="ProjectId" class="com.jsh.model.po.Depot" lazy="false">
            <column name="ProjectId" not-null="true">
                <comment>项目Id</comment>
            </column>
        </many-to-one>
        <property generated="never" lazy="false" name="Number" type="java.lang.String">
            <column length="50" name="Number">
                <comment>票据号</comment>
            </column>
        </property>
        <property generated="never" lazy="false" name="OperPersonName" type="java.lang.String">
            <column length="50" name="OperPersonName">
                <comment>操作员名字</comment>
            </column>
        </property>
        <property name="CreateTime" type="java.sql.Timestamp">
            <column length="19" name="CreateTime">
                <comment>创建时间</comment>
            </column>
        </property>
        <property name="OperTime" type="java.sql.Timestamp">
            <column length="19" name="OperTime">
                <comment>出入库时间</comment>
            </column>
        </property>
        <many-to-one name="OrganId" class="com.jsh.model.po.Supplier" lazy="false">
            <column name="OrganId">
                <comment>供应商Id</comment>
            </column>
        </many-to-one>
        <many-to-one name="HandsPersonId" class="com.jsh.model.po.Person" lazy="false">
            <column name="HandsPersonId">
                <comment>经手人Id</comment>
            </column>
        </many-to-one>
        <many-to-one name="AccountId" class="com.jsh.model.po.Account" lazy="false">
            <column name="AccountId">
                <comment>账户Id</comment>
            </column>
        </many-to-one>
        <property generated="never" lazy="false" name="ChangeAmount" type="java.lang.Double">
            <column name="ChangeAmount" precision="22" scale="3">
                <comment>变动金额(收款/付款)</comment>
            </column>
        </property>
        <many-to-one name="AllocationProjectId" class="com.jsh.model.po.Depot" lazy="false">
            <column name="AllocationProjectId">
                <comment>调拨时,对方项目Id</comment>
            </column>
        </many-to-one>
        <property generated="never" lazy="false" name="TotalPrice" type="java.lang.Double">
            <column name="TotalPrice" precision="22" scale="3">
                <comment>合计金额</comment>
            </column>
        </property>
        <property generated="never" lazy="false" name="PayType" type="java.lang.String">
            <column length="50" name="PayType">
                <comment>付款类型</comment>
            </column>
        </property>
        <property generated="never" lazy="false" name="Remark" type="java.lang.String">
            <column length="1000" name="Remark">
                <comment>备注</comment>
            </column>
        </property>
    </class>
</hibernate-mapping>


text:
package com.opengamma.core.position.impl;

import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertSame;

import java.math.BigDecimal;
import java.net.URI;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.threeten.bp.Instant;

import com.opengamma.core.position.PositionSource;
import com.opengamma.id.ExternalId;
import com.opengamma.id.ObjectId;
import com.opengamma.id.UniqueId;
import com.opengamma.id.VersionCorrection;
import com.opengamma.transport.jaxrs.FudgeResponse;
import com.opengamma.util.test.TestGroup;
import com.sun.jersey.api.client.ClientResponse.Status;

/**
 * Tests DataPositionSourceResource.
 */
@Test(groups = TestGroup.UNIT)
public class DataPositionSourceResourceTest {

  private static final ObjectId OID = ObjectId.of("Test", "A");
  private static final UniqueId UID = OID.atVersion("B");
  private static final VersionCorrection VC = VersionCorrection.LATEST.withLatestFixed(Instant.now());
  private static final ExternalId EID = ExternalId.of("A", "B");
  private PositionSource _underlying;
  private UriInfo _uriInfo;
  private DataPositionSourceResource _resource;

  @BeforeMethod
  public void setUp() {
    _underlying = mock(PositionSource.class);
    _uriInfo = mock(UriInfo.class);
    when(_uriInfo.getBaseUri()).thenReturn(URI.create("testhost"));
    _resource = new DataPositionSourceResource(_underlying);
  }

  //-------------------------------------------------------------------------
  @Test
  public void testGetPortfolioByUid() {
    final SimplePortfolio target = new SimplePortfolio("Test");

    when(_underlying.getPortfolio(eq(UID), eq(VersionCorrection.LATEST))).thenReturn(target);

    final Response test = _resource.getPortfolio(OID.toString(), UID.getVersion(), null, null);
    assertEquals(Status.OK.getStatusCode(), test.getStatus());
    assertSame(target, test.getEntity());
  }

  @Test
  public void testGetPortfolioByOid() {
    final SimplePortfolio target = new SimplePortfolio("Test");

    when(_underlying.getPortfolio(eq(OID), eq(VC))).thenReturn(target);

    final Response test = _resource.getPortfolio(OID.toString(), null, VC.getVersionAsOfString(), VC.getCorrectedToString());
    assertEquals(Status.OK.getStatusCode(), test.getStatus());
    assertSame(target, test.getEntity());
  }

  @Test
  public void testGetNodeByUid() {
    final SimplePortfolioNode target = new SimplePortfolioNode("Test");

    when(_underlying.getPortfolioNode(eq(UID), eq(VersionCorrection.LATEST))).thenReturn(target);

    final Response test = _resource.getNode(OID.toString(), UID.getVersion(), null, null);
    assertEquals(Status.OK.getStatusCode(), test.getStatus());
    assertSame(target, FudgeResponse.unwrap(test.getEntity()));
  }

  @Test
  public void testGetPositionByUid() {
    final SimplePosition target = new SimplePosition(BigDecimal.ONE, EID);

    when(_underlying.getPosition(eq(UID))).thenReturn(target);

    final Response test = _resource.getPosition(OID.toString(), UID.getVersion(), null, null);
    assertEquals(Status.OK.getStatusCode(), test.getStatus());
    assertSame(target, test.getEntity());
  }

  @Test
  public void testGetPositionByOid() {
    final SimplePosition target = new SimplePosition(BigDecimal.ONE, EID);
    when(_underlying.getPosition(eq(OID), eq(VC))).thenReturn(target);
    final Response test = _resource.getPosition(OID.toString(), null, VC.getVersionAsOfString(), VC.getCorrectedToString());
    assertEquals(Status.OK.getStatusCode(), test.getStatus());
    assertSame(target, test.getEntity());
  }

  @Test
  public void testGetTradeByUid() {
    final SimpleTrade target = new SimpleTrade();
    target.setQuantity(BigDecimal.ONE);

    when(_underlying.getTrade(eq(UID))).thenReturn(target);

    final Response test = _resource.getTrade(OID.toString(), UID.getVersion());
    assertEquals(Status.OK.getStatusCode(), test.getStatus());
    assertSame(target, test.getEntity());
  }

}


text:
(function() {
  'use strict';

  angular
    .module('gohd')
    .controller('LoginController', LoginController);

  /* @ngInject */
  function LoginController(AuthService) {

    var vm = this;
    vm.loading = false;

    vm.efetuarLogin = efetuarLogin;

    function efetuarLogin(credenciais) {
      vm.loading = true;
      AuthService.login(credenciais, function() {
        vm.loading = false;
      });
    }
  }
})();


text: angular.module('tictactoeApp', []);


text:
FROM golang
MAINTAINER Octoblu, Inc. <docker@octoblu.com>

RUN go get -u github.com/jteeuwen/go-bindata/...
ADD https://raw.githubusercontent.com/pote/gpm/v1.3.2/bin/gpm /go/bin/
RUN chmod +x /go/bin/gpm

COPY Godeps /go/src/github.com/octoblu/go-go/
WORKDIR /go/src/github.com/octoblu/go-go
RUN gpm install

COPY . /go/src/github.com/octoblu/go-go

RUN go-bindata -prefix templates templates/...
RUN env CGO_ENABLED=0 go build -a -ldflags '-s' .

CMD ["./go-go"]


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="TopMenu">
        <attr name="leftImg" format="reference"></attr>
        <attr name="centerText" format="string"></attr>
        <attr name="rightImg" format="reference"></attr>
    </declare-styleable>
</resources>


text:
//
//  AppDelegate.m
//  suishouji
//
//  Created by 张帆 on 16/5/10.
//  Copyright © 2016年 fanstudio. All rights reserved.
//

#import "AppDelegate.h"
#import "WelComeViewController.h"

#import <ShareSDK/ShareSDK.h>
#import <ShareSDKConnector/ShareSDKConnector.h>
#import "WeiboSDK.h"

@interface AppDelegate ()

@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    [self setDefaultWindowAndController];
    [self registerOtherLoginSdk];

    return YES;
}

#pragma mark - 程序启动入口

- (void)setDefaultWindowAndController {
    /*
     程序结构介绍
     AppDelegate ->WelComeViewController(欢迎界面)
     ->SSJBaseController(主体结构控制器,左右菜单分栏,它继承于自定义的FZMenuController)
     ==>SSJSettingMenuController(左侧菜单内容)
     ==>SSJBaseNavController + SSJBaseContentViewController (右侧实际内容)
     ===》SSJBaseNavController,内容控制器通常使用自定义的导航控制器来包裹,为方便统一设置,定义此类
     ===》SSJBaseContentViewController,具体的内容控制器父类,有时候可能需要统一设置导航栏,以及禁止滑出菜单

     注意,右侧内容这里提供的是一个模板,实际可以不是这个组合,具体可参见SSJSettingMenuController内容的切换。
     */

    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    self.window.backgroundColor = [UIColor whiteColor];
    self.window.rootViewController = [WelComeViewController new];
    [self.window makeKeyAndVisible];
}

#pragma mark - 第三方登录

- (void)registerOtherLoginSdk {
    /**
     *  设置ShareSDK的appKey,如果尚未在ShareSDK官网注册过App,请移步到http://mob.com/login 登录后台进行应用注册,
     *  在将生成的AppKey传入到此方法中。
     *  方法中的第二个第三个参数为需要连接社交平台SDK时触发,
     *  在此事件中写入连接代码。第四个参数则为配置本地社交平台时触发,根据返回的平台类型来配置平台信息。
     *  如果您使用的时服务端托管平台信息时,第二、四项参数可以传入nil,第三项参数则根据服务端托管平台来决定要连接的社交SDK。
     */

    NSString *appKey = @"12c9d0501f2f3";
    NSArray *ativePlatorms = @[@(SSDKPlatformTypeSinaWeibo)];

    __weak typeof(self) weakSelf = self;
    [ShareSDK registerApp:appKey activePlatforms:ativePlatorms onImport:^(SSDKPlatformType platformType) {
        [weakSelf doOtherLoginImport:platformType];
     } onConfiguration:^(SSDKPlatformType platformType, NSMutableDictionary *appInfo) {
         [weakSelf doOtherLoginConfigure:platformType appInfo:appInfo];
     }];

}

- (void)doOtherLoginImport:(SSDKPlatformType) platformType {
    switch (platformType) {
        case SSDKPlatformTypeSinaWeibo:
            [ShareSDKConnector connectWeibo:[WeiboSDK class]];
            break;
        default:
            break;
    }
}

- (void)doOtherLoginConfigure:(SSDKPlatformType)platformType appInfo:(NSMutableDictionary *)appInfo {
    switch (platformType) {
        case SSDKPlatformTypeSinaWeibo:
            //设置新浪微博应用信息,其中authType设置为使用SSO+Web形式授权
            [appInfo SSDKSetupSinaWeiboByAppKey:@"568898243"
                                      appSecret:@"38a4f8204cc784f81f9f0daaf31e02e3"
                                    redirectUri:@"http://www.sharesdk.cn"
                                       authType:SSDKAuthTypeBoth];
            break;

        default:
            break;
    }
}

@end


text:
/* global define */

define(['sulfur/schema/value/simple'], function (SimpleValue) {

  'use strict';

  /**
   * @abstract
   *
   * @implement {boolean} #cmp({sulfur/schema/value/simple/numeric})
   */
  return SimpleValue.derive({

    /**
     * Check if this value is equal to the other value.
     *
     * @return {true} when equal
     * @return {false} when not equal
     */
    eq: function (other) { return this.cmp(other) === 0 },

    /**
     * Check if this value is less than the other value.
     *
     * @return {true} when less
     * @return {false} when not less
     */
    lt: function (other) { return this.cmp(other) < 0 },

    /**
     * Check if this value is greater than the other value.
     *
     * @return {true} when greater
     * @return {false} when not greater
     */
    gt: function (other) { return this.cmp(other) > 0 },

    /**
     * Check if this value is less than or equal to the other value.
     *
     * @return {true} when less or equal
     * @return {false} when not less
     */
    lteq: function (other) { return !this.gt(other) },

    /**
     * Check if this value is greater than or equal to the other value.
     *
     * @return {true} when greater or equal
     * @return {false} when not greater
     */
    gteq: function (other) { return !this.lt(other) }

  });

});


text:
package com.oculusinfo.tilegen.datasets

import java.text.SimpleDateFormat

import scala.reflect.ClassTag

import com.oculusinfo.binning.TileData

import com.oculusinfo.tilegen.tiling.AnalysisDescription
import com.oculusinfo.tilegen.tiling.CartesianIndexScheme
import com.oculusinfo.tilegen.tiling.IndexScheme
import com.oculusinfo.tilegen.tiling.IPv4Analytics
import com.oculusinfo.tilegen.tiling.IPv4ZCurveIndexScheme
import com.oculusinfo.tilegen.tiling.TimeRangeCartesianIndexScheme
import com.oculusinfo.tilegen.tiling.TimeIndexScheme
import com.oculusinfo.tilegen.tiling.LineSegmentIndexScheme
import com.oculusinfo.tilegen.util.PropertiesWrapper

object CSVIndexExtractor {
	def fromProperties (properties: PropertiesWrapper): CSVIndexExtractor[_] = {
		var indexType = properties.getString(
			"oculus.binning.index.type",
			"The type of index to use in the data.  Currently supported options "+
				"are cartesian (the default), graph, timerange, and ipv4.",
			Some("cartesian"))

		if ("graph" == indexType) {
			val graphDataType = properties.getString(
				"oculus.binning.graph.data",
				"The type of graph data to tile (nodes or edges). Default is nodes.",
				Some("nodes"))
			if ("nodes" == graphDataType)
				indexType = "cartesian"
		}

		indexType match {
			case "cartesian" => {
				val xVar = properties.getString("oculus.binning.xField",
				                                "The field to use for the X axis of tiles produced",
				                                Some(CSVDatasetBase.ZERO_STR))
				val yVar = properties.getString("oculus.binning.yField",
				                                "The field to use for the Y axis of tiles produced",
				                                Some(CSVDatasetBase.ZERO_STR))
				new CartesianIndexExtractor(xVar, yVar)
			}
			case "graph" => {
				// edges require two cartesian endpoints
				val xVar1 = properties.getString("oculus.binning.xField",
				                                 "The field to use for the X axis for edge start pt",
				                                 Some(CSVDatasetBase.ZERO_STR))
				val yVar1 = properties.getString("oculus.binning.yField",
				                                 "The field to use for the Y axis for edge start pt",
				                                 Some(CSVDatasetBase.ZERO_STR))
				val xVar2 = properties.getString("oculus.binning.xField2",
				                                 "The field to use for the X axis for edge end pt",
				                                 Some(CSVDatasetBase.ZERO_STR))
				val yVar2 = properties.getString("oculus.binning.yField2",
				                                 "The field to use for the Y axis for edge end pt",
				                                 Some(CSVDatasetBase.ZERO_STR))
				new LineSegmentIndexExtractor(xVar1, yVar1, xVar2, yVar2)
			}
			case "timerange" => {
				val xVar = properties.getString("oculus.binning.xField",
				                                "The field to use for the X axis of tiles produced",
				                                Some(CSVDatasetBase.ZERO_STR))
				val yVar = properties.getString("oculus.binning.yField",
				                                "The field to use for the Y axis of tiles produced",
				                                Some(CSVDatasetBase.ZERO_STR))
				val timeVar = properties.getString("oculus.binning.timeField",
				                                   "The field to use for the time axis of tiles produced",
				                                   Some(CSVDatasetBase.ZERO_STR))

				val startDateFormat = new SimpleDateFormat(
					properties.getString("oculus.binning.timeRange.dateFormat",
					                     "The parsing format to use for 'oculus.binning.timeRange.startDate'",
					                     Some("yyMMddHHmm")))

				val startDate = startDateFormat.parse(
					properties.getString("oculus.binning.timeRange.startDate",
					                     "The initial date to base the time ranges on.",
					                     Some(""))).getTime()

				val secsPerRange = properties.getDouble("oculus.binning.timeRange.secondsPerRange",
				                                        "The number of seconds each range should represent",
				                                        Some(60 * 60 * 24))
				new TimeRangeCartesianIndexExtractor(timeVar, xVar, yVar, startDate, secsPerRange)
			}
			case "ipv4" => {
				val ipVar = properties.getString("oculus.binning.ipv4Field",
				                                 "The field from which to get the ipv4 address.  "+
					                                 "Field type must be \"ipv4\".",
				                                 None)
				new IPv4IndexExtractor(ipVar)
			}
		}
	}
}
abstract class CSVIndexExtractor[IT: ClassTag] extends Serializable {
	val indexTypeTag = implicitly[ClassTag[IT]]

	// The fields this extractor needs
	def fields: Array[String]

	// The name of the indexing scheme - usually refering to the fields it
	// uses - for use in table naming.
	def name: String

	// A description of the data set axes
	def description: String

	// The index scheme the binner needs to know what to do with the index
	// values we generate
	def indexScheme: IndexScheme[IT]

	// Get the index value from the field values
	def calculateIndex (fieldValues: Map[String, Any]): IT

	// Indicate if the index implies a density strip
	def isDensityStrip: Boolean

	// List any tile analytics automatically associated with this index extractor
	def getTileAnalytics[BT]: Seq[AnalysisDescription[TileData[BT], _]]

	// List any data analytics automatically associated with this index extractor
	def getDataAnalytics: Seq[AnalysisDescription[(IT, _), _]]
}

abstract class TimeRangeCSVIndexExtractor[IT: ClassTag] extends CSVIndexExtractor[IT] {
	// The time based index scheme the binner needs to know what to do with the index
	// values we generate
	def timeIndexScheme: TimeIndexScheme[IT]

	def msPerTimeRange: Double
}

class CartesianIndexExtractor(xVar: String, yVar: String)
		extends CSVIndexExtractor[(Double, Double)]
{
	private val scheme = new CartesianIndexScheme

	def fields = Array(xVar, yVar)
	def name = xVar + "." + yVar
	def description = xVar + " vs. " + yVar
	def indexScheme = scheme
	def calculateIndex (fieldValues: Map[String, Any]): (Double, Double) =
		(fieldValues(xVar).asInstanceOf[Double], fieldValues(yVar).asInstanceOf[Double])
	def isDensityStrip = yVar == CSVDatasetBase.ZERO_STR
	def getTileAnalytics[BT]: Seq[AnalysisDescription[TileData[BT], _]] = Seq()
	def getDataAnalytics: Seq[AnalysisDescription[((Double, Double), _), _]] = Seq()
}

class LineSegmentIndexExtractor
	(xVar: String, yVar: String, xVar2: String, yVar2: String)
		extends CSVIndexExtractor[(Double, Double, Double, Double)]
{
	private val scheme = new LineSegmentIndexScheme

	def fields = Array(xVar, yVar, xVar2, yVar2)
	def name =  xVar + "." + yVar  //xVar + "." + yVar + "." + xVar2 + "." + yVar2
	def description = xVar + " vs. " + yVar  //xVar + " vs. " + yVar + "and" + xVar2 + "vs" + yVar2
	def indexScheme = scheme
	def calculateIndex(fieldValues: Map[String, Any]): (Double, Double, Double, Double) =
		(fieldValues(xVar).asInstanceOf[Double],
		 fieldValues(yVar).asInstanceOf[Double],
		 fieldValues(xVar2).asInstanceOf[Double],
		 fieldValues(yVar2).asInstanceOf[Double])
	def isDensityStrip = yVar == CSVDatasetBase.ZERO_STR
	def getTileAnalytics[BT]: Seq[AnalysisDescription[TileData[BT], _]] = Seq()
	def getDataAnalytics: Seq[AnalysisDescription[((Double, Double, Double, Double), _), _]] = Seq()
}

class IPv4IndexExtractor (ipField: String) extends CSVIndexExtractor[Array[Byte]] {
	private val scheme = new IPv4ZCurveIndexScheme

	def fields = Array(ipField)
	def name = ipField
	def description = ipField
	def indexScheme = scheme
	def calculateIndex (fieldValues: Map[String, Any]): Array[Byte] = {
		val address = fieldValues(ipField) match {
			case value: Long => value
			case value: Int => value.toLong
			case value: Double => value.round.toLong
			case _ => 0L
		}
		Array(((address & 0xff000000L) >> 24).toByte,
		      ((address & 0xff0000L) >> 16).toByte,
		      ((address & 0xff00L) >> 8).toByte,
		      ((address & 0xff)).toByte)
	}
	val isDensityStrip = false
	def getTileAnalytics[BT]: Seq[AnalysisDescription[TileData[BT], _]] =
		Seq(IPv4Analytics.getCIDRBlockAnalysis[BT](),
		    IPv4Analytics.getMinIPAddressAnalysis[BT](),
		    IPv4Analytics.getMaxIPAddressAnalysis[BT]())
	def getDataAnalytics: Seq[AnalysisDescription[(Array[Byte], _), _]] = Seq()
}

class TimeRangeCartesianIndexExtractor
	(timeVar: String, xVar: String, yVar: String,
	 startDate: Double, secsPerPeriod: Double)
		extends TimeRangeCSVIndexExtractor[(Double, Double, Double)]
{
	private val scheme = new TimeRangeCartesianIndexScheme

	def msPerTimeRange = secsPerPeriod * 1000

	/**
	 * Floors the date value to the last time period
	 */
	def floorDate(d: Double) = Math.floor((d - startDate) / msPerTimeRange) * msPerTimeRange + startDate

	def fields = Array(timeVar, xVar, yVar)
	def name = xVar + "." + yVar
	def description = xVar + " vs. " + yVar
	def indexScheme = scheme
	def timeIndexScheme = scheme
	def calculateIndex (fieldValues: Map[String, Any]): (Double, Double, Double) =
		(floorDate(fieldValues(timeVar).asInstanceOf[Double]),
		 fieldValues(xVar).asInstanceOf[Double],
		 fieldValues(yVar).asInstanceOf[Double])
	def isDensityStrip = yVar == CSVDatasetBase.ZERO_STR
	def getTileAnalytics[BT]: Seq[AnalysisDescription[TileData[BT], _]] = Seq()
	def getDataAnalytics: Seq[AnalysisDescription[((Double, Double, Double), _), _]] = Seq()
}


text:
<?xml version = '1.0' encoding = 'UTF-8'?>
<Relation class="oracle.dbtools.crest.model.design.logical.Relation" name="TestResultMessages" id="7DA9DD83-A52E-CA1E-FCBF-FC9CE71AF635" directorySegmentName="seg_0">
<createdBy>bird</createdBy>
<createdTime>2012-08-21 09:17:23 UTC</createdTime>
<ownerDesignName>TestManagerDatabase</ownerDesignName>
<engineerTo>
<item key="B082B14A-BEA8-D8A7-D661-197F34766ED3" value="true"/>
</engineerTo>
<identifying>false</identifying>
<optionalSource>true</optionalSource>
<optionalTarget>true</optionalTarget>
<sourceCardinality>1</sourceCardinality>
<sourceEntity>16464F5A-64BE-D2ED-91E0-BCBD0AA34680</sourceEntity>
<targetCardinalityString>*</targetCardinalityString>
<targetEntity>4579B792-2F35-D72A-1A3B-C7E53C41A766</targetEntity>
<transferable>true</transferable>
</Relation>


text:
package com.ohmdb.dsl;

import com.ohmdb.abstracts.JokerCreator;
import com.ohmdb.api.Criteria;
import com.ohmdb.api.CustomIndex;
import com.ohmdb.api.Table;
import com.ohmdb.dsl.criteria.impl.ComplexCriteriaImpl;
import com.ohmdb.dsl.criteria.impl.CriteriaImpl;
import com.ohmdb.joker.JokerCreatorImpl;

public abstract class TableDSL<E> implements Table<E> {

	protected final JokerCreator jokerator = new JokerCreatorImpl();

	public <T> Criteria<E, T> where(T property) {
		return new CriteriaImpl<E, T>(this, jokerator.decode(property));
	}

	public <T> Criteria<E, T> where(String propertyName, Class<T> type) {
		return new CriteriaImpl<E, T>(this, propertyName);
	}

	public <T> Criteria<E, T> where(CustomIndex<E, T> indexer) {
		return new ComplexCriteriaImpl<E, T>(this, indexer);
	}

}


text:
using System;
using Gwen.Control;

namespace Gwen.Control.Internal
{
    /// <summary>
    /// Tree node label.
    /// </summary>
    public class TreeNodeLabel : Button
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TreeNodeLabel"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public TreeNodeLabel(ControlBase parent)
            : base(parent)
        {
            Alignment = Alignment.Left | Alignment.CenterV;
            ShouldDrawBackground = false;
            TextPadding = new Padding(3, 0, 5, 0);
        }

		/// <summary>
		/// Updates control colors.
		/// </summary>
		public override void UpdateColors()
        {
            if (IsDisabled)
            {
                TextColor = Skin.Colors.Button.Disabled;
                return;
            }

			if (ToggleState)
            {
                TextColor = Skin.Colors.Tree.Selected;
                return;
            }

            if (IsHovered)
            {
                TextColor = Skin.Colors.Tree.Hover;
                return;
            }

            TextColor = Skin.Colors.Tree.Normal;
        }
    }
}


text:
/**
 * @license
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://raw.githubusercontent.com/l-lin/angular-datatables/master/LICENSE
 */
import { ModuleWithProviders } from '@angular/core';
export declare class DataTablesModule {
    static forRoot(): ModuleWithProviders;
}


text:
package eu.hyvar.context.contextValidity.resource.hyvalidityformula.grammar;

public enum HyvalidityformulaCardinality {

	ONE, PLUS, QUESTIONMARK, STAR;

}


text:
package edu.umdearborn.astronomyapp.config;

import static edu.umdearborn.astronomyapp.util.constants.UrlConstants.ADMIN_PATH;
import static edu.umdearborn.astronomyapp.util.constants.UrlConstants.INSTRUCTOR_PATH;
import static edu.umdearborn.astronomyapp.util.constants.UrlConstants.LOGOUT_PATH;
import static edu.umdearborn.astronomyapp.util.constants.UrlConstants.LOGOUT_SUCCESS_PATH;
import static edu.umdearborn.astronomyapp.util.constants.UrlConstants.REST_PATH_PREFIX;
import static edu.umdearborn.astronomyapp.util.constants.UrlConstants.STUDENT_PATH;

import javax.servlet.http.HttpServletResponse;

import org.springframework.boot.autoconfigure.security.Http401AuthenticationEntryPoint;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.NoOpPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.csrf.CookieCsrfTokenRepository;

import edu.umdearborn.astronomyapp.config.annotation.Dev;
import edu.umdearborn.astronomyapp.config.annotation.Prod;

@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {

  @Prod
  @Bean("passwordEncoder")
  public PasswordEncoder bCryptPasswordEncoder() {
    return new BCryptPasswordEncoder();
  }

  @Override
  protected void configure(HttpSecurity http) throws Exception {
    // @formatter:off
    http
      .httpBasic()
        .authenticationEntryPoint(new Http401AuthenticationEntryPoint("Newauth realm=\"astro-app\""))
        .and()
      .csrf()//.disable()
        .csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
        .and()
      .logout()
        .logoutUrl(LOGOUT_PATH)
        .logoutSuccessUrl(LOGOUT_SUCCESS_PATH)
        .deleteCookies("XSRF-TOKEN")
        .clearAuthentication(true)
        .invalidateHttpSession(true)
        .and()
      .authorizeRequests()//.antMatchers("*").permitAll()
        .filterSecurityInterceptorOncePerRequest(true)
        .antMatchers("/rest/self/password/reset").anonymous()
        .antMatchers(REST_PATH_PREFIX).fullyAuthenticated()
        .antMatchers(REST_PATH_PREFIX + ADMIN_PATH + "/**").hasRole("ADMIN")
        .antMatchers(REST_PATH_PREFIX + INSTRUCTOR_PATH + "/**").hasRole("INSTRUCTOR")
        .antMatchers(REST_PATH_PREFIX + STUDENT_PATH + "/**").hasRole("USER")
        .and()
      .sessionManagement()
        .invalidSessionStrategy((request, response) -> {
          response.setHeader("session", "invalid");
          response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "session is not valid");
        })
        .sessionFixation().changeSessionId()
        .maximumSessions(1);
    // @formatter:on
  }

  @Dev
  @Bean("passwordEncoder")
  public PasswordEncoder noOpPasswordEncoder() {
    return NoOpPasswordEncoder.getInstance();
  }

}


text:
@interface NSArray(NSArray_Extensions)
- (BOOL)writeToFile:(NSString *)path;
+(NSArray*)readFile:(NSString*)path;
@end

@interface NSDictionary(NSDictionary_Extensions)
- (BOOL)writeToFile:(NSString *)path;
+(NSDictionary*)readFile:(NSString*)path;
@end


text:
package org.apache.wss4j.common.saml.bean;

import java.time.Instant;
import java.util.Date;

import org.joda.time.DateTime;

/**
 * Class DelegateBean represents a SAML 2.0 Delegate object. Only NameIDs are supported for now, not
 * BaseID or EncryptedIDs.
 *
 * See:
 * http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-delegation-cs-01.pdf
 */
public class DelegateBean {
    private DateTime delegationInstant;
    private String confirmationMethod;
    private NameIDBean nameIDBean;

    public DateTime getDelegationInstant() {
        return delegationInstant;
    }

    public void setDelegationInstant(DateTime delegationInstant) {
        this.delegationInstant = delegationInstant;
    }

    public void setDelegationInstant(Instant delegationInstant) {
        if (delegationInstant != null) {
            this.delegationInstant = new DateTime(Date.from(delegationInstant));
        } else {
            this.delegationInstant = null;
        }
    }

    public String getConfirmationMethod() {
        return confirmationMethod;
    }

    public void setConfirmationMethod(String confirmationMethod) {
        this.confirmationMethod = confirmationMethod;
    }

    public NameIDBean getNameIDBean() {
        return nameIDBean;
    }

    public void setNameIDBean(NameIDBean nameIDBean) {
        this.nameIDBean = nameIDBean;
    }

    /**
     * Method equals ...
     *
     * @param o of type Object
     * @return boolean
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof DelegateBean)) {
            return false;
        }

        DelegateBean that = (DelegateBean) o;

        if (delegationInstant == null && that.delegationInstant != null) {
            return false;
        } else if (delegationInstant != null && !delegationInstant.equals(that.delegationInstant)) {
            return false;
        }

        if (confirmationMethod == null && that.confirmationMethod != null) {
            return false;
        } else if (confirmationMethod != null && !confirmationMethod.equals(that.confirmationMethod)) {
            return false;
        }

        if (nameIDBean == null && that.nameIDBean != null) {
            return false;
        } else if (nameIDBean != null && !nameIDBean.equals(that.nameIDBean)) {
            return false;
        }

        return true;
    }

    /**
     * @return the hashcode of this object
     */
    @Override
    public int hashCode() {
        int result = 0;
        if (delegationInstant != null) {
            result = 31 * result + delegationInstant.hashCode();
        }
        if (confirmationMethod != null) {
            result = 31 * result + confirmationMethod.hashCode();
        }
        if (nameIDBean != null) {
            result = 31 * result + nameIDBean.hashCode();
        }
        return result;
    }

}


text:
namespace The.Rules.Operators.T1T2
{
    public class XorRule<T1, T2>: ARuleAbout<T1, T2>
    {
        public ARuleAbout<T1, T2> Left { get; private set; }
        public ARuleAbout<T1, T2> Right { get; private set; }

        public XorRule(ARuleAbout<T1, T2> left, ARuleAbout<T1, T2> right)
        {
            Left = left;
            Right = right;
        }

        public override bool IsTrueFor(T1 first, T2 second)
        {
            return Left.IsTrueFor(first, second) ^ Right.IsTrueFor(first, second);
        }
    }
}


text:
#import "UIScrollView.h"

@class NSView, UINSClipView;

@interface UIViewAdapter : UIScrollView
- (id)initWithNSView:(NSView *)aNSView;
@property (nonatomic, strong) NSView *NSView;
@end


text:
var fetch = require('../fetch');
var cache = require('../cache');
var _ = require('underscore');

module.exports = function (req, res) {
    var query = {
        part: 'snippet,contentDetails,id',
        maxResults: 30,
        channelId: req.query.channelId,
        pageToken: req.query.pageToken
    };

    var config = new fetch.Config({
        response: res,
        endpoint: 'activities',
        query: query,
        cacheConfig: new cache.Config(
            cache.rk('activities', query.channelId, query.pageToken, query.maxResults),
            60 * 15 // 5 mins
        )
    });

    fetch(config).then(function (result) {
        result.data.items = _.filter(result.data.items, item => item.snippet.type === 'upload');

        fetch.end(res, result.data);
    });
};


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="tr">
<context>
    <name>ColorDialog</name>
    <message>
        <location filename="../ColorDialog.ui" line="14"/>
        <source>Customize Colors</source>
        <translation>Renkleri Özelleştir</translation>
    </message>
    <message>
        <location filename="../ColorDialog.ui" line="24"/>
        <source>Item Type</source>
        <translation>Öğe Türü</translation>
    </message>
    <message>
        <location filename="../ColorDialog.ui" line="29"/>
        <source>Color</source>
        <translation>Renk</translation>
    </message>
    <message>
        <location filename="../ColorDialog.ui" line="34"/>
        <source>Sample</source>
        <translation>Örnek</translation>
    </message>
    <message>
        <location filename="../ColorDialog.ui" line="44"/>
        <location filename="../ColorDialog.cpp" line="55"/>
        <source>Select Color</source>
        <translation>Renk Seç</translation>
    </message>
    <message>
        <location filename="../ColorDialog.ui" line="64"/>
        <source>Cancel</source>
        <translation>İptal</translation>
    </message>
    <message>
        <location filename="../ColorDialog.ui" line="71"/>
        <source>Apply</source>
        <translation>Uygula</translation>
    </message>
</context>
<context>
    <name>DnDTabBar</name>
    <message>
        <location filename="../DnDTabBar.h" line="43"/>
        <source>Detach Tab</source>
        <translation type="unfinished"></translation>
    </message>
</context>
<context>
    <name>MainUI</name>
    <message>
        <location filename="../MainUI.ui" line="63"/>
        <source>Find the previous match</source>
        <translation>Önceki eşleşmeyi bul</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="66"/>
        <location filename="../MainUI.ui" line="79"/>
        <location filename="../MainUI.ui" line="130"/>
        <location filename="../MainUI.ui" line="143"/>
        <location filename="../MainUI.ui" line="155"/>
        <source>...</source>
        <translation>...</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="165"/>
        <source>Find:</source>
        <translation>Bul:</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="76"/>
        <source>Find the next match</source>
        <translation>Sonraki eşleşmeyi bul</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="86"/>
        <source>Replace:</source>
        <translation>Değiştir:</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="105"/>
        <source>Match case</source>
        <translation>Büyük/küçük harf eşleştir</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="127"/>
        <source>Replace next match</source>
        <translation>Sonraki eşleşmeyi değiştir</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="140"/>
        <source>Replace all matches (to end of document)</source>
        <translation>Tüm eşleşmeleri değiştir (belgenin sonuna kadar)</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="152"/>
        <source>Hide the find/replace options</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="211"/>
        <source>Syntax Highlighting</source>
        <translation>Sözdizimi Vurgulama</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="218"/>
        <source>Tabs Location</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="193"/>
        <source>&File</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="207"/>
        <source>&View</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="236"/>
        <source>&Edit</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="274"/>
        <source>Show Line Numbers</source>
        <translation>Satır Numaralarını Göster</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="279"/>
        <source>None</source>
        <translation>Yok</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="284"/>
        <location filename="../MainUI.cpp" line="219"/>
        <source>New File</source>
        <translation>Yeni Dosya</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="287"/>
        <source>Ctrl+N</source>
        <translation>Ctrl+N</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="295"/>
        <source>Open File</source>
        <translation>Dosya Aç</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="298"/>
        <source>Ctrl+O</source>
        <translation>Ctrl+O</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="306"/>
        <source>Save File</source>
        <translation>Dosyayı Kaydet</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="309"/>
        <source>Ctrl+S</source>
        <translation>Ctrl+S</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="317"/>
        <source>Save File As</source>
        <translation>Dosyayı Farklı Kaydet</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="322"/>
        <source>Close</source>
        <translation>Kapat</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="325"/>
        <source>Ctrl+Q</source>
        <translation>Ctrl+Q</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="333"/>
        <source>Close File</source>
        <translation>Dosyayı Kapat</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="336"/>
        <source>Ctrl+W</source>
        <translation>Ctrl+W</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="344"/>
        <source>Customize Colors</source>
        <translation>Renkleri Özelleştir</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="355"/>
        <source>Wrap Lines</source>
        <translation>Satırları Kaydır</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="360"/>
        <source>Find</source>
        <translation>Bul</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="363"/>
        <source>Ctrl+F</source>
        <translation>Ctrl+F</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="371"/>
        <source>Replace</source>
        <translation>Değiştir</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="374"/>
        <source>Ctrl+R</source>
        <translation>Ctrl+R</translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="388"/>
        <source>Show Popup Warnings</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="391"/>
        <location filename="../MainUI.ui" line="394"/>
        <source>Show warnings about unsaved changes</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="405"/>
        <source>Top</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="413"/>
        <source>Bottom</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="421"/>
        <source>Left</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="429"/>
        <source>Right</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="434"/>
        <source>Print</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="437"/>
        <source>Ctrl+P</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.ui" line="448"/>
        <source>Show Toolbar</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.cpp" line="34"/>
        <source>Read-Only File</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.cpp" line="75"/>
        <source>Text Editor</source>
        <translation>Metin Düzenleyici</translation>
    </message>
    <message>
        <location filename="../MainUI.cpp" line="226"/>
        <source>Open File(s)</source>
        <translation>Dosya(ları) Aç</translation>
    </message>
    <message>
        <location filename="../MainUI.cpp" line="226"/>
        <source>Text Files (*)</source>
        <translation>Metin Dosyaları (*)</translation>
    </message>
    <message>
        <location filename="../MainUI.cpp" line="290"/>
        <source>Print Content</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.cpp" line="428"/>
        <location filename="../MainUI.cpp" line="439"/>
        <source>Lose Unsaved Changes?</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.cpp" line="428"/>
        <location filename="../MainUI.cpp" line="439"/>
        <source>This file has unsaved changes.
Do you want to close it anyway?

%1</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.cpp" line="546"/>
        <source>Save Changes before closing?</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../MainUI.cpp" line="547"/>
        <source>There are unsaved changes.
Do you want save them before you close the editor?

%1</source>
        <translation type="unfinished"></translation>
    </message>
</context>
<context>
    <name>PlainTextEditor</name>
    <message>
        <location filename="../PlainTextEditor.cpp" line="127"/>
        <source>Save File</source>
        <translation>Dosyayı Kaydet</translation>
    </message>
    <message>
        <location filename="../PlainTextEditor.cpp" line="127"/>
        <source>Text File (*)</source>
        <translation>Metin Dosyası (*)</translation>
    </message>
    <message>
        <location filename="../PlainTextEditor.cpp" line="346"/>
        <source>Row Number: %1, Column Number: %2</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../PlainTextEditor.cpp" line="355"/>
        <source>The following file has been changed by some other utility. Do you want to re-load it?</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../PlainTextEditor.cpp" line="357"/>
        <source>(Note: You will lose all currently-unsaved changes)</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../PlainTextEditor.cpp" line="361"/>
        <source>File Modified</source>
        <translation type="unfinished"></translation>
    </message>
</context>
<context>
    <name>XDGDesktopList</name>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="608"/>
        <source>Multimedia</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="609"/>
        <source>Development</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="610"/>
        <source>Education</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="611"/>
        <source>Games</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="612"/>
        <source>Graphics</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="613"/>
        <source>Network</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="614"/>
        <source>Office</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="615"/>
        <source>Science</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="616"/>
        <source>Settings</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="617"/>
        <source>System</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="618"/>
        <source>Utility</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="619"/>
        <source>Wine</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../../../core/libLumina/LuminaXDG.cpp" line="620"/>
        <source>Unsorted</source>
        <translation type="unfinished"></translation>
    </message>
</context>
</TS>


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

    <string name="app_name">Fitness Band</string>
    <string name="action_settings">Settings</string>
    <string name="Rssi">RSSI</string>
    <string name="rssiValue">---</string>
    <string name="digitalOut">Digital Out</string>
    <string name="digitalIn">Digital In</string>
    <string name="Pin">Pin</string>
    <string name="pinValue4">[ 2 ]</string>
    <string name="pinValue5">[ A4 ]</string>
    <string name="pinValue6">[ 3 ]</string>
    <string name="pinValue7">[ 5 ]</string>
    <string name="pinValueA5">[ A5 ]</string>
    <string name="write">write</string>
    <string name="read">read</string>
    <string name="PWM">PWM</string>
    <string name="Servo">Servo</string>
    <string name="AnalogIn">Analog In</string>
    <string name="AIText">----</string>
    <string name="connect">连接</string>
    <string name="connecting">正在连接.....</string>
    <string name="loading">刷新中......</string>
    <string name="title_activity_select_login">SelectLoginActivity</string>
    <string name="dummy_button">Dummy Button</string>
    <string name="dummy_content">DUMMY\nCONTENT</string>
    <string name="facebook">facebook</string>
    <string name="toast_auth_success">授权成功</string>
    <string name="toast_auth_failed">授权失败</string>
    <string name="toast_auth_canceled">取消授权</string>
    <string name="app_id">497906953566757</string>
    <string name="title_activity_main_tabs">MainTabsActivity</string>
    <string name="hello_world">Hello world!</string>
    <string name="title_activity_bleconnect">BLEConnectActivity</string>
    <string name="title_activity_document">DocumentActivity</string>
    <string name="error_device_address">无效设备</string>
    <string name="scanning">搜索中......</string>
    <string name="connect_device">连接设备</string>
    <string name="couldnot_search_ble_device">未能搜索到蓝牙手镯</string>
    <string name="today">今天</string>
    <string name="yesterday">昨天</string>
    <string name="year">年</string>
    <string name="month">月</string>
    <string name="day">日</string>
    <string name="hours">小时</string>
    <string name="minutes">分钟</string>
    <string name="day_string_of_user_login">于%1$s使用</string>
    <string name="cycle1_text">连续达标</string>
    <string name="cycle2_text">最高分</string>
    <string name="cycle3_text">达标次数</string>
    <string name="friends">朋友</string>
    <string name="activity">活动</string>
    <string name="now_use">马上体验</string>
    <string name="positive">是</string>
    <string name="negative">否</string>
    <string name="OK">好</string>
    <string name="activity_record">运动记录</string>
    <string name="sleep_record">睡眠记录</string>
    <string name="light_sport">轻微运动</string>
    <string name="right_sport">适量运动</string>
    <string name="overdose_sport">剧烈运动</string>
    <string name="title_activity_welcome">WelcomeActivity</string>
    <string name="title_activity_loading">LoadingActivity</string>
    <string name="title_activity_forgot_password">ForgotPasswordActivity</string>

    <!-- Activity Activity strings -->
    <string name="no_activity_tips">目前还没有任何活动,试试去"设置"界面连接Fitness Band吧。</string>
    <string name="activity_steps_goal">目标 </string>
    <string name="activity_steps_finished">完成 </string>
    <string name="n_km_activity_distance"> 千米</string>
    <string name="n_calorie_activity"> 卡路里</string>
    <string name="activity_step"> 步</string>
    <string name="not_sync">尚未同步</string>
    <string name="last_sync_time_just_now">刚刚同步</string>
    <string name="last_sync_time_string">上次同步在</string>
    <string name="mooth_ago">%1$d个月前</string>
    <string name="week_ago">%1$d个星期前</string>
    <string name="day_ago">%1$d天前</string>
    <string name="hour_ago">%1$d小时前</string>
    <string name="minute_ago">%1$d分钟前</string>
    <!-- Sleep Activity strings -->
    <string name="sleep_deep">深度睡眠</string>
    <string name="sleep_shallow">浅度睡眠</string>
    <string name="sleep_no">无睡眠</string>
    <string name="sleep_total">总睡眠</string>
    <string name="sleep_wake_times">醒次数</string>
    <string name="sleep_wake_times_unit">次</string>
    <string name="n_hour_sleep_goal">%1$s小时睡眠目标</string>
    <string name="sleep_good">睡眠质量好</string>
    <string name="sleep_normal">睡眠质量一般</string>
    <string name="sleep_bad">睡眠质量差</string>

    <!-- Settings Activitys strings -->
    <string name="hour">时</string>
    <string name="minute">分</string>
    <string name="start">开始</string>
    <string name="end">结束</string>

    <!-- RegisterUserInfoActivity strings -->
    <string name="profile_picture">设置头像</string>
    <string name="select_picture">选择本地照片</string>
    <string name="take_picture">拍照</string>
    <string name="can_not_find_sd_card">未找到存储卡,无法存储照片!</string>

</resources>


text:
(function( $ ){
  $.fn.imageSelector = function(settings) {
    var defaults = {
      multipleSel: false,
      images: null
    }

    var core = {
      targetElementId: '',
      elementsToAppend: null,
      imagesJSON: null,
      totalPages: 0,
      currentPage: 1,
      size: null,
      placeholderImage: $('#' + settings.selector).css('backgroundImage'),

      CreateImages: function() {
        var totalImages = core.elementsToAppend.length;

        for ( var i=0; i<totalImages; i++ ) {
          if ( core.imagesJSON.images[i] ) {
            var elem = document.createElement('IMG');
            elem.src = settings.imagePath + '/' + core.imagesJSON.images[i];
            elem.imageName = core.imagesJSON.images[i];
            elem.alt = elem.title = elem.imageName;

            $(elem).click(function() {
              if ( $('#' + settings.selector + ' img:first').attr('src') == this.src ) {
                $('#' + settings.selector + ' img:first').remove();

                if ( settings.images != null ) {
                  $('#' + settings.selector).css('backgroundImage', 'none');
                  $('#' + settings.selector).html('');
                } else {
                  $('#' + settings.selector).css('backgroundImage', core.placeholderImage);
                }
              } else {
                $('#' + settings.selector).css('backgroundImage', 'none');
                $('#' + settings.selector).html('<input type="hidden" name="' + settings.selector + 'Selected" value="' + this.alt + '" />');
              }
            });

            $(core.elementsToAppend[i]).append(elem);
          }
        }

        core.size = core.elementsToAppend.length;

        core.CreatePagination();
      },

      Pager: function() {
        var newImages = new Array();

        for ( var i=core.size-core.elementsToAppend.length; i<core.size; i++ ) {
          newImages.push(core.imagesJSON.images[i]);
        }

        for ( var x=0; x<newImages.length; x++ ) {
          $(core.elementsToAppend[x]).children().hide();

          if ( newImages[x] ) {
            $(core.elementsToAppend[x]).children().attr('imageName', newImages[x]);
            $(core.elementsToAppend[x]).children().attr('src', settings.imagePath + '/' + newImages[x]);
            $(core.elementsToAppend[x]).children().attr('alt', newImages[x]);
            $(core.elementsToAppend[x]).children().attr('title', newImages[x]);

            $(core.elementsToAppend[x]).children().show();
          }
        }

        delete newImages;

        $('#igReload').remove();
        $('#igPBack').remove();
        $('#igPForward').remove();

        core.CreatePagination();
      },

      CreatePagination: function() {
        var igReload = '
' + batchIconNavigationReload + '
';

        $('#' + core.targetElementId).before(igReload);

        var igPBack = '
';

        if ( core.currentPage > 1 ) {
          igPBack += batchIconNavigationBack;
        } else {
          igPBack += batchIconNavigationBackGrey;
        }

        igPBack += '
';

        var igPForward = '
';

        if ( core.currentPage >= core.totalPages) {
          igPForward += batchIconNavigationForwardGrey;
        } else {
          igPForward += batchIconNavigationForward;
        }

        igPForward += '
';

        $('#' + core.targetElementId).after(igPBack + igPForward);

        $('#igReload img').click(function() {
          core.Init();
        });

        $('#igPBack img').click(function() {
          core.PreviousPage();
        });

        $('#igPForward img').click(function() {
          core.NextPage();
        });
      },

      NextPage: function() {
        if ( core.currentPage >= core.totalPages) {
          return false;
        };

        core.currentPage++;
        core.size = core.size + core.elementsToAppend.length;
        core.Pager();
      },

      PreviousPage: function() {
        if ( core.currentPage <= 1 ) {
          return false;
        };

        core.currentPage--;
        core.size = core.size - core.elementsToAppend.length;
        core.Pager();
      },

      Init: function() {
        $.getJSON(settings.json, function(jsonObject) {
          core.imagesJSON = jsonObject;

          $('#igReload, #igPBack, #' + core.targetElementId + ' li, #igPForward').remove();

          for (var i=0; i<settings.show; i++) {
            $('#' + core.targetElementId).append('

');
          }

          core.elementsToAppend = $('#' + core.targetElementId + ' li');

          core.currentPage = 1;

          core.totalPages = Math.ceil(parseInt(core.imagesJSON.images.length) / (parseInt(core.elementsToAppend.length)));

          core.CreateImages();
        });
      }
    }

    settings = $.extend(defaults, settings);

    return this.each(function() {
      core.targetElementId = $(this).attr('id');

      if ( settings.images != null ) {
        $('#' + settings.selector).css('backgroundImage', 'none');
        $('#' + settings.selector).html('');
      }

      core.Init();
    });
  }
})( jQuery );


text:
<!doctype html>
<meta charset="utf-8" />

  Position:
  1
  <input type="range" name="pos" value="1" min="1" id="pos">

  Speed: 1 <input type="range" name="gap" value="100" min="1" max="1000" id="gap"> 1000


text:
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="genemu.form.recaptcha.public_key" />
        <parameter key="genemu.form.recaptcha.private_key" />
        <parameter key="genemu.form.recaptcha.server_url" />
        <parameter key="genemu.form.recaptcha.options" type="collection" />

        <parameter key="genemu.form.captcha.options" type="collection" />
        <parameter key="genemu.form.tinymce.configs" type="collection" />
    </parameters>

    <services>
        <service id="genemu.form.type_recaptcha.validator" class="Genemu\Bundle\FormBundle\Form\Core\Validator\ReCaptchaValidator">
            <argument type="service" id="request" strict="false" />
            <argument>%genemu.form.recaptcha.private_key%</argument>
        </service>

        <service id="genemu.form.core.type.recaptcha" class="Genemu\Bundle\FormBundle\Form\Core\Type\ReCaptchaType">
            <tag name="form.type" alias="genemu_recaptcha" />
            <argument type="service" id="genemu.form.type_recaptcha.validator" />
            <argument>%genemu.form.recaptcha.public_key%</argument>
            <argument>%genemu.form.recaptcha.server_url%</argument>
            <argument>%genemu.form.recaptcha.options%</argument>
        </service>
        <service id="genemu.form.core.type.captcha" class="Genemu\Bundle\FormBundle\Form\Core\Type\CaptchaType">
            <tag name="form.type" alias="genemu_captcha" />
            <argument type="service" id="genemu.gd.captcha" />
            <argument>%genemu.form.captcha.options%</argument>
        </service>
        <service id="genemu.form.core.type.plain" class="Genemu\Bundle\FormBundle\Form\Core\Type\PlainType">
            <tag name="form.type" alias="genemu_plain" />
        </service>
        <service id="genemu.form.core.type.tinymce" class="Genemu\Bundle\FormBundle\Form\Core\Type\TinymceType">
            <tag name="form.type" alias="genemu_tinymce" />
            <argument>%genemu.form.tinymce.configs%</argument>
        </service>
    </services>

</container>