text:
require "abstract_unit"

class LoggingTest < ActionController::TestCase
  class TestController < ActionController::Base
    log_at :debug, if: -> { params[:level] == "debug" }
    log_at :warn,  if: -> { params[:level] == "warn" }

    def show
      render plain: logger.level
    end
  end

  tests TestController

  setup do
    @logger = @controller.logger = ActiveSupport::Logger.new(nil, level: Logger::INFO)
  end

  test "logging at the default level" do
    get :show
    assert_equal Logger::INFO.to_s, response.body
  end

  test "logging at a noisier level per request" do
    assert_no_changes -> { @logger.level } do
      get :show, params: { level: "debug" }
      assert_equal Logger::DEBUG.to_s, response.body
    end
  end

  test "logging at a quieter level per request" do
    assert_no_changes -> { @logger.level } do
      get :show, params: { level: "warn" }
      assert_equal Logger::WARN.to_s, response.body
    end
  end
end


text:
package com.google.cloud.compute.deprecated;

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

import org.junit.Test;

public class SubnetworkInfoTest {

  private static final String GENERATED_ID = "42";
  private static final Long CREATION_TIMESTAMP = 1453293540000L;
  private static final String DESCRIPTION = "description";
  private static final SubnetworkId SUBNETWORK_ID =
      SubnetworkId.of("project", "region", "subnetwork");
  private static final String GATEWAY_ADDRESS = "192.168.1.1";
  private static final NetworkId NETWORK_ID = NetworkId.of("project", "network");
  private static final String IP_RANGE = "192.168.0.0/16";
  private static final SubnetworkInfo SUBNETWORK_INFO =
      SubnetworkInfo.newBuilder(SUBNETWORK_ID, NETWORK_ID, IP_RANGE)
          .setGeneratedId(GENERATED_ID)
          .setCreationTimestamp(CREATION_TIMESTAMP)
          .setDescription(DESCRIPTION)
          .setGatewayAddress(GATEWAY_ADDRESS)
          .build();

  @Test
  public void testToBuilder() {
    compareSubnetworkInfo(SUBNETWORK_INFO, SUBNETWORK_INFO.toBuilder().build());
    SubnetworkInfo subnetworkInfo =
        SUBNETWORK_INFO.toBuilder().setDescription("newDescription").build();
    assertEquals("newDescription", subnetworkInfo.getDescription());
    subnetworkInfo = subnetworkInfo.toBuilder().setDescription("description").build();
    compareSubnetworkInfo(SUBNETWORK_INFO, subnetworkInfo);
  }

  @Test
  public void testToBuilderIncomplete() {
    SubnetworkInfo subnetworkInfo = SubnetworkInfo.of(SUBNETWORK_ID, NETWORK_ID, IP_RANGE);
    assertEquals(subnetworkInfo, subnetworkInfo.toBuilder().build());
  }

  @Test
  public void testBuilder() {
    assertEquals(GENERATED_ID, SUBNETWORK_INFO.getGeneratedId());
    assertEquals(SUBNETWORK_ID, SUBNETWORK_INFO.getSubnetworkId());
    assertEquals(CREATION_TIMESTAMP, SUBNETWORK_INFO.getCreationTimestamp());
    assertEquals(DESCRIPTION, SUBNETWORK_INFO.getDescription());
    assertEquals(GATEWAY_ADDRESS, SUBNETWORK_INFO.getGatewayAddress());
    assertEquals(NETWORK_ID, SUBNETWORK_INFO.getNetwork());
    assertEquals(IP_RANGE, SUBNETWORK_INFO.getIpRange());
  }

  @Test
  public void testOf() {
    SubnetworkInfo subnetworkInfo = SubnetworkInfo.of(SUBNETWORK_ID, NETWORK_ID, IP_RANGE);
    assertNull(subnetworkInfo.getGeneratedId());
    assertEquals(SUBNETWORK_ID, subnetworkInfo.getSubnetworkId());
    assertNull(subnetworkInfo.getCreationTimestamp());
    assertNull(subnetworkInfo.getDescription());
    assertNull(subnetworkInfo.getGatewayAddress());
    assertEquals(NETWORK_ID, subnetworkInfo.getNetwork());
    assertEquals(IP_RANGE, subnetworkInfo.getIpRange());
  }

  @Test
  public void testToAndFromPb() {
    compareSubnetworkInfo(SUBNETWORK_INFO, SubnetworkInfo.fromPb(SUBNETWORK_INFO.toPb()));
    SubnetworkInfo subnetworkInfo = SubnetworkInfo.of(SUBNETWORK_ID, NETWORK_ID, IP_RANGE);
    compareSubnetworkInfo(subnetworkInfo, SubnetworkInfo.fromPb(subnetworkInfo.toPb()));
  }

  @Test
  public void testSetProjectId() {
    SubnetworkInfo subnetworkInfo = SUBNETWORK_INFO.toBuilder()
        .setSubnetworkId(SubnetworkId.of("region", "subnetwork"))
        .setNetwork(NetworkId.of("network"))
        .build();
    compareSubnetworkInfo(SUBNETWORK_INFO, subnetworkInfo.setProjectId("project"));
  }

  public void compareSubnetworkInfo(SubnetworkInfo expected, SubnetworkInfo value) {
    assertEquals(expected, value);
    assertEquals(expected.getGeneratedId(), value.getGeneratedId());
    assertEquals(expected.getSubnetworkId(), value.getSubnetworkId());
    assertEquals(expected.getCreationTimestamp(), value.getCreationTimestamp());
    assertEquals(expected.getDescription(), value.getDescription());
    assertEquals(expected.getGatewayAddress(), value.getGatewayAddress());
    assertEquals(expected.getNetwork(), value.getNetwork());
    assertEquals(expected.getIpRange(), value.getIpRange());
    assertEquals(expected.hashCode(), value.hashCode());
  }
}

redpajama_set_name: RedPajamaGithub


text:
import {
  switchModel,
  cleanObject,
  MapTree
} from "./common.model";

describe('Unit Test :: Common model', () => {
  it('should execute the canary test', () => {
    return expect(true).toBe(true)
  });

  it('should correctly convert to UI model - 1', () => {
    interface InputModel {
      user: {
        name: string;
      }
    }

    interface OutputModel {
      name: {
        firstName: string;
      }
    }

    const mapTree: MapTree = [{
      toPath: ['name', 'firstName'],
      fromPath: ['user', 'name']
    }];

    const input = {
      user: {
        name: 'Sanborn'
      }
    };

    const expectedOutput = {
      name: {
        firstName: 'Sanborn'
      }
    };

    return expect(expectedOutput)
      .toEqual(
        switchModel<InputModel, OutputModel>(input, mapTree)
      );
  });

  it('should correctly convert to UI model - 2', () => {
    interface ServiceModel {
      attributes: {
        relationships: {
          user: {
            detail: {
              name: string;
            }
          }
        }
      }
    }

    interface UIModel {
      name: {
        firstName: string;
      };
      selected: boolean;
    }

    const input = {
      attributes: {
        relationships: {
          user: {
            detail: {
              name: 'Sanborn'
            }
          }
        }
      }
    };

    const expectedOutput = {
      name: {
        firstName: 'Sanborn'
      },
      selected: false
    };

    const mapTree: MapTree = [{
      fromPath: ['attributes', 'relationships', 'user', 'detail', 'name'],
      toPath: ['name', 'firstName']
    }, {
      toPath: ['selected'],
      toValue: false
    }];

    return expect(expectedOutput)
      .toEqual(
        switchModel<ServiceModel, UIModel>(input, mapTree)
      );
  });

})

describe('Unit Test :: Common model :: Object cleaner', () => {
  it('Should correctly clean up an objectm - 1', () => {
    const input = {
      name: 'Sudipta'
    };
    return expect(input).toEqual(cleanObject(input));
  })

  it('Should correctly clean up an objectm - 2', () => {
    const input = {
      name: 'Sudipta',
      address: null
    };
    const expOutput = {
      name: 'Sudipta'
    };
    const output = cleanObject(input);
    return expect(output).toEqual(expOutput);
  })

  it('Should correctly clean up an objectm - 3', () => {
    const input = {
      name: 'Sudipta',
      address: {
        city: 'Bangalore',
        country: 'India',
        pin: null
      }
    };
    const expOutput = {
      name: 'Sudipta',
      address: {
        city: 'Bangalore',
        country: 'India',
      }
    };
    const output = cleanObject(input);
    return expect(output).toEqual(expOutput);
  })

  it('Should correctly clean up an objectm - 3', () => {
    const input = {
      name: 'Sudipta',
      address: {
        city: 'Bangalore',
        country: 'India',
        pin: {
          code: null,
          random: {
            one: ['one'],
            two: null
          }
        }
      }
    };
    const expOutput = {
      name: 'Sudipta',
      address: {
        city: 'Bangalore',
        country: 'India',
        pin: {
          random: {
            one: ['one']
          }
        }
      }
    };
    const output = cleanObject(input);
    return expect(output).toEqual(expOutput);
  })

  it('Should correctly clean up an objectm - 4', () => {
    const input = {
      name: 'Sudipta',
      address: {
        city: 'Bangalore',
        country: 'India',
        pin: {
          code: null,
          random: {
            one: ['one'],
            two: null
          },
          relationships: {
            rel1: 'rel1'
          }
        }
      }
    };
    const expOutput = {
      name: 'Sudipta',
      address: {
        city: 'Bangalore',
        country: 'India',
        pin: {
          random: {
            one: ['one']
          }
        }
      }
    };
    const output = cleanObject(input, ['relationships']);
    return expect(output).toEqual(expOutput);
  })
})


text:
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#ifndef URLENCODE_H
#define URLENCODE_H

#include "azure_c_shared_utility/strings.h"

#include "azure_c_shared_utility/umock_c_prod.h"

#ifdef __cplusplus
extern "C" {
#endif

    MOCKABLE_FUNCTION(, STRING_HANDLE, URL_EncodeString, const char*, textEncode);
    MOCKABLE_FUNCTION(, STRING_HANDLE, URL_Encode, STRING_HANDLE, input);

#ifdef __cplusplus
}
#endif

#endif /* URLENCODE_H */


text:
<?php
namespace Sooh\Base\Interfaces;
interface SessionStorage
{
	/**
	 * @param string $sessionId
	 * @param array $arrConfig
	 * @return \Sooh\Base\Interfaces\SessionStorage
	 */
	public static function getInstance($sessionId,$arrConfig);
	/**
	 * 获取sessionData
	 */
	public function getSessionData();
	/**
	 * 设置设置会话数据
	 * @param string $strValue
	 * @param int $dtExpired 过期的时间点
	 */
	public function setSessionData($strValue,$dtExpired);
	/**
	 * 额外设置用户信息,可用于实时分析在线用户
	 * @param type $userid
	 * @param type $ip
	 * @param type $camefrom
	 */
	public function tellMeUser($userid,$ip,$camefrom=null);
	/**
	 * 更新存储
	 */
	public function update();
	/**
	 * 程序执行结束后释放相关资源
	 */
	public function freeOnShutdown();
	/**
	 * 如果使用的是系统默认的session机制,调用此函数更改系统的存储机制
	 */
	public static function hookSessionHandle();
}


text:
package org.springframework.security.oauth.consumer.client;

import org.springframework.http.HttpMethod;
import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.security.oauth.consumer.OAuthConsumerSupport;
import org.springframework.security.oauth.consumer.OAuthConsumerToken;
import org.springframework.security.oauth.consumer.OAuthSecurityContext;
import org.springframework.security.oauth.consumer.OAuthSecurityContextHolder;
import org.springframework.security.oauth.consumer.OAuthSecurityContextImpl;
import org.springframework.security.oauth.consumer.ProtectedResourceDetails;
import org.springframework.util.CollectionUtils;

import java.io.IOException;
import java.net.URI;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * Request factory that extends all http requests with the OAuth credentials for a specific protected resource.
 *
 * @author Ryan Heaton
 */
public class OAuthClientHttpRequestFactory implements ClientHttpRequestFactory {

  private final ClientHttpRequestFactory delegate;
  private final ProtectedResourceDetails resource;
  private final OAuthConsumerSupport support;
  private Map<String, String> additionalOAuthParameters;

  public OAuthClientHttpRequestFactory(ClientHttpRequestFactory delegate, ProtectedResourceDetails resource, OAuthConsumerSupport support) {
    this.delegate = delegate;
    this.resource = resource;
    this.support = support;

    if (delegate == null) {
      throw new IllegalArgumentException("A delegate must be supplied for an OAuth2ClientHttpRequestFactory.");
    }
    if (resource == null) {
      throw new IllegalArgumentException("A resource must be supplied for an OAuth2ClientHttpRequestFactory.");
    }
    this.additionalOAuthParameters = !CollectionUtils.isEmpty(resource.getAdditionalParameters()) ?
            new HashMap<String, String>(resource.getAdditionalParameters()) :
            Collections.<String, String>emptyMap();
  }

  public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IOException {
    OAuthSecurityContext context = OAuthSecurityContextHolder.getContext();
    if (context == null) {
    	context = new OAuthSecurityContextImpl();
    }

    Map<String, OAuthConsumerToken> accessTokens = context.getAccessTokens();
    OAuthConsumerToken accessToken = accessTokens == null ? null : accessTokens.get(this.resource.getId());

    boolean useAuthHeader = this.resource.isAcceptsAuthorizationHeader();
    if (!useAuthHeader) {
      String queryString = this.support.getOAuthQueryString(this.resource, accessToken, uri.toURL(), httpMethod.name(), this.additionalOAuthParameters);
      String uriValue = String.valueOf(uri);
      uri = URI.create((uriValue.contains("?") ? uriValue.substring(0, uriValue.indexOf('?')) : uriValue) + "?" + queryString);
    }

    ClientHttpRequest req = delegate.createRequest(uri, httpMethod);
    if (useAuthHeader) {
      String authHeader = this.support.getAuthorizationHeader(this.resource, accessToken, uri.toURL(), httpMethod.name(), this.additionalOAuthParameters);
      req.getHeaders().add("Authorization", authHeader);
    }

    Map<String, String> additionalHeaders = this.resource.getAdditionalRequestHeaders();
    if (additionalHeaders != null) {
      for (Map.Entry<String, String> header : additionalHeaders.entrySet()) {
        req.getHeaders().add(header.getKey(), header.getValue());
      }
    }
    return req;
  }

  /**
   * Any additional OAuth parameters to send with the OAuth request.
   *
   * @return Any additional OAuth parameters to send with the OAuth request.
   */
  public Map<String, String> getAdditionalOAuthParameters() {
    return additionalOAuthParameters;
  }

  /**
   * Any additional OAuth parameters to send with the OAuth request.
   *
   * @param additionalOAuthParameters Any additional OAuth parameters to send with the OAuth request.
   */
  public void setAdditionalOAuthParameters(Map<String, String> additionalOAuthParameters) {
    this.additionalOAuthParameters = additionalOAuthParameters;
  }
}


text:
<ui>
    <menubar name="MainMenu" action="MainMenuAction">
        <menu name="EditMenu" action="EditMenuAction">
            <menu name="SelectedTracks" action="SelectedTracksAction">
                <placeholder name="BelowAddToPlaylist">
                    <menuitem name="BurnDisc" action="BurnDiscAction"></menuitem>
                </placeholder>
            </menu>
        </menu>
    </menubar>
    <popup name="TrackContextMenu" action="TrackContextMenuAction">
        <placeholder name="BelowAddToPlaylist">
            <menuitem name="BurnDisc" action="BurnDiscAction"></menuitem>
        </placeholder>
    </popup>
</ui>


text:
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
// Information about GXF files
// SMPTE 360M - General Exchange Format
// SMPTE RDD 14-2007 - General Exchange Format-2
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

//---------------------------------------------------------------------------
#ifndef MediaInfo_File_GxfH
#define MediaInfo_File_GxfH
//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
#include "MediaInfo/File__Analyze.h"
#if defined(MEDIAINFO_ANCILLARY_YES)
    #include <MediaInfo/Multiple/File_Ancillary.h>
#endif //defined(MEDIAINFO_ANCILLARY_YES)
//---------------------------------------------------------------------------

namespace MediaInfoLib
{

//***************************************************************************
// Class File_Gxf
//***************************************************************************

class File_Gxf : public File__Analyze
{
public :
    //Constructor/Destructor
    File_Gxf();
    ~File_Gxf();

private :
    //Streams management
    void Streams_Finish();

    //Buffer - Synchro
    bool Synchronize();
    bool Synched_Test();

    //Buffer - Global
    void Read_Buffer_Unsynched();
    #if MEDIAINFO_SEEK
    size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
    #endif //MEDIAINFO_SEEK
    void Read_Buffer_AfterParsing();

    //Buffer - Per element
    bool Header_Begin();
    void Header_Parse();
    void Data_Parse();

    //Packets
    void map();
    void media();
    void end_of_stream();
    void field_locator_table();
    void UMF_file();

    //Temp - Global
    #if defined(MEDIAINFO_ANCILLARY_YES)
        File_Ancillary* Ancillary;
    #endif //defined(MEDIAINFO_ANCILLARY_YES)
    int32u Material_Fields_First;
    int32u Material_Fields_Last;
    int32u Material_File_Size;
    int32u Material_Fields_FieldsPerFrame;
    int8u  Parsers_Count;
    int8u  AncillaryData_StreamID;
    struct tc
    {
        int64u Milliseconds;
        string String;

        tc()
        {
            Milliseconds=(int64u)-1;
        }
    };
    std::map<int8u, tc> TimeCodes; //Key is StreamID
    bool   Material_Fields_First_IsValid;
    bool   Material_Fields_Last_IsValid;
    bool   Material_File_Size_IsValid;

    //Temp - Stream
    struct stream
    {
        std::vector<File__Analyze*> Parsers;
        int64u FirstFrameDuration; //In case of audio, indicates the duration of the first frame
        stream_t StreamKind;
        size_t StreamPos;
        int32u TimeStamp_Start;
        int32u TimeStamp_End;
        int32u FrameRate_Code;
        int32u LinesPerFrame_Code;
        int32u FieldsPerFrame_Code;
        int8u  MediaType;
        int8u  TrackID;
        bool   Searching_Payload;
        bool   Searching_TimeStamp_Start;
        bool   Searching_TimeStamp_End;
        bool   IsChannelGrouping;
        bool   DisplayInfo; //In case of channel grouping, info is about the complete (2*half) stream, so second stream info must not be used
        Ztring MediaName;
        std::map<std::string, Ztring> Infos;
        #if MEDIAINFO_DEMUX
            bool            Demux_EventWasSent;
        #endif //MEDIAINFO_DEMUX

        stream()
        {
            FirstFrameDuration=0;
            StreamKind=Stream_Max;
            StreamPos=(size_t)-1;
            TimeStamp_Start = (int32u)-1;
            TimeStamp_End = (int32u)-1;
            Searching_Payload = false;
            Searching_TimeStamp_Start=false;
            Searching_TimeStamp_End=false;
            FrameRate_Code=(int32u)-1;
            LinesPerFrame_Code=(int32u)-1;
            FieldsPerFrame_Code=(int32u)-1;
            MediaType=(int8u)-1;
            TrackID=(int8u)-1;
            IsChannelGrouping=false;
            DisplayInfo=true;
            #if MEDIAINFO_DEMUX
                Demux_EventWasSent=false;
            #endif //MEDIAINFO_DEMUX
        }
        ~stream()
        {
            for (size_t Pos=0; Pos<Parsers.size(); Pos++)
                delete Parsers[Pos];
        }
    };
    std::vector<stream> Streams;
    File__Analyze*      UMF_File;
    int64u              SizeToAnalyze; //Total size of a chunk to analyse, it may be changed by the parser
    int64u              IsParsingMiddle_MaxOffset;
    int8u               Audio_Count;
    int8u               TrackNumber;

    //File__Analyze helpers
    void Streams_Finish_PerStream(size_t StreamID, stream &Temp);
    void Detect_EOF();
    File__Analyze* ChooseParser_ChannelGrouping(int8u TrackID);
    void TryToFinish();

    #if MEDIAINFO_DEMUX
        bool Demux_HeaderParsed;
    #endif //MEDIAINFO_DEMUX

    #if MEDIAINFO_SEEK
        int32u Flt_FieldPerEntry;
        std::vector<int32u> Flt_Offsets; //In 1024-byte
        struct seek
        {
            int64u FrameNumber;
            int32u StreamOffset; //In 1024-byte
        };
        std::vector<seek> Seeks;
        bool IFrame_IsParsed;
    #endif //MEDIAINFO_SEEK
};

} //NameSpace

#endif


text:
package v1

import (
	"testing"

	"k8s.io/apimachinery/pkg/runtime"

	"github.com/openshift/origin/pkg/api/apihelpers/apitesting"
	userapi "github.com/openshift/origin/pkg/user/apis/user"
)

func TestFieldSelectorConversions(t *testing.T) {
	apitesting.FieldKeyCheck{
		SchemeBuilder: []func(*runtime.Scheme) error{LegacySchemeBuilder.AddToScheme, userapi.LegacySchemeBuilder.AddToScheme},
		Kind:          LegacySchemeGroupVersion.WithKind("Identity"),
		// Ensure previously supported labels have conversions. DO NOT REMOVE THINGS FROM THIS LIST
		AllowedExternalFieldKeys: []string{"providerName", "providerUserName", "user.name", "user.uid"},
		FieldKeyEvaluatorFn:      userapi.IdentityFieldSelector,
	}.Check(t)

	apitesting.FieldKeyCheck{
		SchemeBuilder: []func(*runtime.Scheme) error{SchemeBuilder.AddToScheme, userapi.SchemeBuilder.AddToScheme},
		Kind:          SchemeGroupVersion.WithKind("Identity"),
		// Ensure previously supported labels have conversions. DO NOT REMOVE THINGS FROM THIS LIST
		AllowedExternalFieldKeys: []string{"providerName", "providerUserName", "user.name", "user.uid"},
		FieldKeyEvaluatorFn:      userapi.IdentityFieldSelector,
	}.Check(t)
}


text:
require "test_helper"

class ArticlesControllerTest < ActionController::TestCase

  before do
    @article = create(:article)
  end

  def test_index
    get :index
    assert_response :success
    assert_not_nil assigns(:articles)
  end

  def test_new
    get :new
    assert_response :success
  end

  def test_create
    assert_difference('Article.count') do
      post :create, article: { title: "Hello", text: "World", importance_cb: "low" }
    end

    assert_redirected_to article_path(assigns(:article))
  end

  def test_show
    get :show, id: @article
    assert_response :success
  end

  def test_edit
    get :edit, id: @article
    assert_response :success
  end

  def test_update
    put :update, id: @article, article: { title: "Hi", text: "There", importance_cb: "high" }
    assert_redirected_to article_path(assigns(:article))
  end

  def test_destroy
    assert_difference('Article.count', -1) do
      delete :destroy, id: @article
    end

    assert_redirected_to articles_path
  end
end


text:
'''
Created on Mar 6, 2014

@author: rgettys
'''

"""
    1 Jan 1900 was a Monday.
    Thirty days has September,
    April, June and November.
    All the rest have thirty-one,
    Saving February alone,
    Which has twenty-eight, rain or shine.
    And on leap years, twenty-nine.
    A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400.

    How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?
"""

# More interestingly, how many firsts of the month fell on a Sunday?

daysPerMonth = [31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
currentModulo = 2 # jan 1 1901 is a tuesday
firstOfMonthSundays = 0
for year in range(1901, 2001):
    for month in range(1, 13):
        currentModulo += (29 if year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) else 28) if month == 2 else daysPerMonth[month-1]
        currentModulo %= 7
        if currentModulo == 0:
            firstOfMonthSundays += 1
print(firstOfMonthSundays)

if __name__ == '__main__':
    pass


text:
import { Component } from '@angular/core';

@Component({
  //moduleId: module.id,
  selector: 'story-404',
  template: `

Inconceivable!

I do not think this page is where you think it is.

  `
})
export class PageNotFoundComponent {

}


text:
package org.pentaho.big.data.kettle.plugins.sqoop;

import org.eclipse.swt.widgets.Shell;
import org.pentaho.big.data.kettle.plugins.sqoop.ui.AbstractSqoopJobEntryDialog;
import org.pentaho.big.data.kettle.plugins.sqoop.ui.SqoopExportJobEntryController;
import org.pentaho.di.job.JobMeta;
import org.pentaho.di.job.entry.JobEntryInterface;
import org.pentaho.di.repository.Repository;
import org.pentaho.ui.xul.XulDomContainer;
import org.pentaho.ui.xul.XulException;
import org.pentaho.ui.xul.binding.BindingFactory;

import java.lang.reflect.InvocationTargetException;

/**
 * Dialog for the Sqoop Export job entry.
 *
 * @see SqoopExportJobEntry
 */
public class SqoopExportJobEntryDialog extends AbstractSqoopJobEntryDialog<SqoopExportConfig, SqoopExportJobEntry> {

  public SqoopExportJobEntryDialog( Shell parent, JobEntryInterface jobEntry, Repository rep, JobMeta jobMeta )
    throws XulException, InvocationTargetException {
    super( parent, jobEntry, rep, jobMeta );
  }

  @Override
  protected String getXulFile() {
    return "org/pentaho/big/data/kettle/plugins/sqoop/xul/SqoopExportJobEntry.xul";
  }

  @Override
  protected Class<?> getMessagesClass() {
    return SqoopExportJobEntry.class;
  }

  @Override
  protected SqoopExportJobEntryController createController( XulDomContainer container, SqoopExportJobEntry jobEntry,
                                                            BindingFactory bindingFactory ) {
    return new SqoopExportJobEntryController( jobMeta, container, jobEntry, bindingFactory );
  }
}


text:
@log.trace("Started executing 'fb-cloud:aws-ec2:operation:delete_classic_load_balancer.rb' flintbit...")
begin
    # Flintbit Input Parameters
    # Mandatory
    connector_name = @input.get('connector_name') # Name of the Amazon EC2 Connector
    name = @input.get('name') #Specifies name of load balancer to be deleted
    action = "delete-classic-load-balancer" # Specifies the name of the operation:delete-subnet
    # Optional
    region = @input.get('region') # Amazon EC2 region (default region is "us-east-1")
    request_timeout = @input.get('timeout')	# Execution time of the Flintbit in milliseconds (default timeout is 60000 milloseconds)
    @access_key = @input.get('access-key')	# access key of aws-ec2 account
    @secret_key = @input.get('security-key')	# secret key aws-ec2 account

    @log.info("Flintbit input parameters are, connector_name:#{connector_name}
                                                                                | action : #{action}
                                                                                | name: #{name}")

    # checking the connector name is provided or not,if not then provide error messsage to user
    if connector_name.nil? || connector_name.empty?
        raise 'Please provide "Amazon EC2 connector name (connector_name)" to delete subnet'
    end
    if name.nil? || name.empty?
        raise 'Please provide "Name of load balancer" to delete subnet'
    end

    # Initialising connector with the provided parameters
    connector_call = @call.connector(connector_name)
                          .set('action', action)
                          .set('access-key', @access_key)
                          .set('security-key', @secret_key)
                          .set('name', name)

    #Cheking the region is not provided or not,if not then use default region as us-east-1
    if !region.nil? && !region.empty?
        connector_call.set('region', region)
    else
        @log.trace("region is not provided so using default region 'us-east-1'")
    end

    # if the request_timeout is not provided then call connector with default time-out otherwise call connector with given request time-out
    if request_timeout.nil? || request_timeout.is_a?(String)
        @log.trace("Calling #{connector_name} with default timeout...")
        response = connector_call.sync
    else
        @log.trace("Calling #{connector_name} with given timeout #{request_timeout}...")
        response = connector_call.timeout(request_timeout).sync
    end

    # Amazon EC2 Connector Response Meta Parameters
    response_exitcode = response.exitcode	# Exit status code
    response_message = response.message	# Execution status messages

    # Cheking the response_exitcode,if it zero then show details and response_message otherwise show error_message to user
    if response_exitcode == 0
        @log.info("SUCCESS in executing #{connector_name} where, exitcode : #{response_exitcode} | message : #{response_message}")
        @output.set('exit-code', 0).set('message', 'success')
    else
        @log.error("ERROR in executing #{connector_name} where, exitcode : #{response_exitcode} | message : #{response_message}")
        response=response.to_s
        if !response.empty?
        @output.set('message', response_message).set('exit-code', 1).setraw('error-details',response.to_s)
        else
        @output.set('message', response_message).set('exit-code', 1)
        end
    end

# if exception occured during execution then it will catch by rescue and it will show exception message to user
rescue Exception => e
    @log.error(e.message)
    @output.set('exit-code', 1).set('message', e.message)
end
@log.trace("Finished executing 'fb-cloud:aws-ec2:operation:delete_classic_load_balancer.rb' flintbit")
# end


text:
<?php

namespace AppBundle\Service\Client\TokenStorage;

interface TokenStorageInterface
{
    public function get($id);

    public function set($id, $value);

    public function remove($id);
}


text:
@extends('layout.new-app-full')
@section('css')
<!-- css part here -->
@endsection
@section('content')
<!-- html part here -->
@endsection
@section('js')
<!-- js part here -->
@endsection


text:
> Pure Python WSGI HTTP Server.

- Run a Python web app:

`waitress-serve {{import.path:wsgi_func}}`

- Listen on port 8080 on localhost:

`waitress-serve --listen={{localhost}}:{{8080}} {{import.path:wsgi_func}}`

- Start waitress on a Unix socket:

`waitress-serve --unix-socket={{path/to/socket}} {{import.path:wsgi_func}}`

- Use 4 threads to process requests:

`waitress-serve --threads={{4}} {{import.path:wsgifunc}}`

- Call a factory method that returns a WSGI object:

`waitress-serve --call {{import.path.wsgi_factory}}`

- Set the URL scheme to https:

`waitress-serve --url-scheme={{https}} {{import.path:wsgi_func}}`


text:
using System;
using System.Collections.Generic;

using JetBrains.Annotations;

namespace DiffLib
{
    /// <summary>
    /// Static API class for the merge portion of DiffLib.
    /// </summary>
    [PublicAPI]
    public static class Merge
    {
        /// <summary>
        /// Performs a merge using a 3-way merge, returning the final merged output.
        /// </summary>
        /// <typeparam name="T">
        /// The type of elements in the collections being merged.
        /// </typeparam>
        /// <param name="commonBase">
        /// The common base/ancestor of both <paramref name="left"/> and <paramref name="right"/>.
        /// </param>
        /// <param name="left">
        /// The left side being merged with the <paramref name="right"/>.
        /// </param>
        /// <param name="right">
        /// The right side being merged with the <paramref name="left"/>.
        /// </param>
        /// <param name="aligner">
        /// A <see cref="IDiffElementAligner{T}"/> implementation that will be responsible for lining up common vs. left and common vs. right as well as left vs. right
        /// during the merge.
        /// </param>
        /// <param name="conflictResolver">
        /// A <see cref="IMergeConflictResolver{T}"/> implementation that will be used to resolve conflicting modifications between left and right.
        /// </param>
        /// <param name="comparer">
        /// A <see cref="IEqualityComparer{T}"/> implementation that will be used to compare elements of all the collections. If <c>null</c> is specified then
        /// <see cref="EqualityComparer{T}.Default"/> will be used.
        /// </param>
        /// <returns>
        /// The final merged collection of elements from <paramref name="left"/> and <paramref name="right"/>.
        /// </returns>
        /// <exception cref="MergeConflictException">
        /// The <paramref name="conflictResolver"/> threw a <see cref="MergeConflictException"/> to indicate a failure to resolve a conflict.
        /// </exception>
        [NotNull, ItemCanBeNull]
        public static IEnumerable<T> Perform<T>([NotNull] IList<T> commonBase, [NotNull] IList<T> left, [NotNull] IList<T> right, [NotNull] IDiffElementAligner<T> aligner, [NotNull] IMergeConflictResolver<T> conflictResolver, [CanBeNull] IEqualityComparer<T> comparer = null)
        {
            return Perform(commonBase, left, right, new DiffOptions(), aligner, conflictResolver, comparer);
        }

        /// <summary>
        /// Performs a merge using a 3-way merge, returning the final merged output.
        /// </summary>
        /// <typeparam name="T">
        /// The type of elements in the collections being merged.
        /// </typeparam>
        /// <param name="commonBase">
        /// The common base/ancestor of both <paramref name="left"/> and <paramref name="right"/>.
        /// </param>
        /// <param name="left">
        /// The left side being merged with the <paramref name="right"/>.
        /// </param>
        /// <param name="right">
        /// The right side being merged with the <paramref name="left"/>.
        /// </param>
        /// <param name="diffOptions">
        /// A <see cref="DiffOptions"/> object specifying options to the diff algorithm, or <c>null</c> if defaults should be used.
        /// </param>
        /// <param name="aligner">
        /// A <see cref="IDiffElementAligner{T}"/> implementation that will be responsible for lining up common vs. left and common vs. right as well as left vs. right
        /// during the merge.
        /// </param>
        /// <param name="conflictResolver">
        /// A <see cref="IMergeConflictResolver{T}"/> implementation that will be used to resolve conflicting modifications between left and right.
        /// </param>
        /// <param name="comparer">
        /// A <see cref="IEqualityComparer{T}"/> implementation that will be used to compare elements of all the collections. If <c>null</c> is specified then
        /// <see cref="EqualityComparer{T}.Default"/> will be used.
        /// </param>
        /// <returns>
        /// The final merged collection of elements from <paramref name="left"/> and <paramref name="right"/>.
        /// </returns>
        /// <exception cref="MergeConflictException">
        /// The <paramref name="conflictResolver"/> threw a <see cref="MergeConflictException"/> to indicate a failure to resolve a conflict.
        /// </exception>
        [NotNull, ItemCanBeNull]
        public static IEnumerable<T> Perform<T>([NotNull] IList<T> commonBase, [NotNull] IList<T> left, [NotNull] IList<T> right, [CanBeNull] DiffOptions diffOptions, [NotNull] IDiffElementAligner<T> aligner, [NotNull] IMergeConflictResolver<T> conflictResolver, [CanBeNull] IEqualityComparer<T> comparer = null)
        {
            if (commonBase == null)
                throw new ArgumentNullException(nameof(commonBase));
            if (left == null)
                throw new ArgumentNullException(nameof(left));
            if (right == null)
                throw new ArgumentNullException(nameof(right));
            if (aligner == null)
                throw new ArgumentNullException(nameof(aligner));
            if (conflictResolver == null)
                throw new ArgumentNullException(nameof(conflictResolver));

            diffOptions = diffOptions ?? new DiffOptions();
            comparer = comparer ?? EqualityComparer<T>.Default;
            Assume.That(comparer != null);

            return new Merge<T>(commonBase, left, right, aligner, conflictResolver, comparer, diffOptions);

        }
    }
}


text:
/**
 * To-do List REST web service
 */

const http = require('http');
const url = require('url');
const items = [];                       // the data store is a regular JS array in memory.

const server = http.createServer(function (req, res) {
    switch (req.method) {               // req.method is the HTTP methode requested
        case 'POST':
            let item = '';              // set up string buffer fo the incoming item

            req.setEncoding('utf8');            // a chunk is now a utf8 string instead of a buffer
            req.on('data', (chunk) => {         // data events are fired whenever a new chunk (default Buffer object) of data has been read.
                console.log('parsed', chunk);   // a chunk, by default, is a Buffer object(a byte array).
                item += chunk;                  // concatenate data chunk onto the buffer
            });
            req.on('end', () => {               // the end event is fired when everything has been read.
                console.log('done parsing');
                items.push(item);               // push complete new item onto the items array
                res.end('OK\n');
            });
            console.log(items);
            break;
        case 'GET':
            /*items.forEach((item, i) => {
                res.write(i + ') ' + item + '\n'); */     // write the header with the default field
            /*});*/                                         // run server.js and type POST item using curl -d 'blablba' http://localhost:3000'

            /* Optimized version of GET */
            let body = items.map((item, i) => {
                return i + ') ' + item;
            }).join('\n');
            res.setHeader('Content-Length', Buffer.byteLength(body));       // Content-Length val shoul represent the by length not char length(body.length)
            res.setHeader('Content-Type', 'text/plain; charset="utf-8"');
            res.end(body);
            console.log(items);
            break;
        case 'PUT':
            let param = url.parse(req.url).pathname;                     // pathname would be PUT url:3000/item_index
            let id = parseInt(param.slice(1), 10);
            let temp = '';

            req.setEncoding('utf8');
            req.on('data', (chunk) => {
                console.log('new data parsed: ', chunk);
                temp += chunk;
            });
            req.on('end', () => {
                if (isNaN(id)) {             // check that number is valid
                    res.setStatusCode = 400;
                    res.end('Invalid item id\n');
                } else if (!items[id]) {
                    res.setStatusCode = 404;
                    res.end('item not found\n');
                } else {
                    console.log('done parsing new data');
                    items.map((item, i) => {
                        if (id === i) {             // if items array index equals to PUT parameter (path/id) change founded array index to new array
                             items[i] = temp;
                        }
                    });
                }
                res.end('OK\n');
            });
            break;
        case 'DELETE':
            let path = url.parse(req.url).pathname;                     // pathname would be DELETE url:3000/item_index
            let i = parseInt(path.slice(1), 10);

            if (isNaN(i)) {             // check that number is valid
                res.setStatusCode = 400;
                res.end('Invalid item id\n');
            } else if(!items[i]) {      // ensure requested index exists
                res.setStatusCode = 404;
                res.end('item not found\n');
            } else {
                items.splice(i, 1);         // delete requested item
                res.end('OK\n');
            }
            break;
        default:
    }
});
server.listen(3000);


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Text;
using LBi.Cli.Arguments.Globalization;

namespace LBi.Cli.Arguments
{
    public class ParameterSet : IEnumerable<Parameter>
    {
        public static ParameterSet FromType(Type type)
        {
            ParameterSetAttribute setAttr = (ParameterSetAttribute) Attribute.GetCustomAttribute(type, typeof(ParameterSetAttribute), true);

            PropertyInfo[] publicProps = type.GetProperties(BindingFlags.Instance | BindingFlags.Public);

            List<Parameter> allParams = new List<Parameter>();

            Func<string> helpMessage;
            string name;

            for (int i = 0; i < publicProps.Length; i++)
            {
                var propInfo = publicProps[i];
                ParameterAttribute attr = (ParameterAttribute)Attribute.GetCustomAttribute(propInfo, typeof(ParameterAttribute), true);
                if (attr == null)
                    continue;

                name = string.IsNullOrWhiteSpace(attr.Name) ? propInfo.Name : attr.Name;

                try
                {
                    helpMessage = attr.GetHelpMessageSelector();
                }
                catch (InvalidOperationException ex)
                {
                    throw new ParameterDefinitionException(propInfo,
                                                           ex.Message);
                }

                var validators = Attribute.GetCustomAttributes(propInfo, true).OfType<ValidationAttribute>();

                allParams.Add(new Parameter(propInfo, name,attr.Position, helpMessage, validators));
            }

            // sanity check input parameters
            Parameter[] positionalParams = allParams.Where(p => p.Position.HasValue).OrderBy(p => p.Position.Value).ToArray();
            IEnumerable<IGrouping<int, Parameter>> ppGroups = positionalParams.GroupBy(p => p.Position.Value);
            IGrouping<int, Parameter>[] dupGroups = ppGroups.Where(g => g.Count() > 1).ToArray();

            // check for duplicate positions
            if (dupGroups.Length > 0)
            {
                StringBuilder errMsg = new StringBuilder("Duplicate parameter positions: ");
                for (int i = 0; i < dupGroups.Length; i++)
                {
                    errMsg.Append("Position: ").Append(dupGroups[i].Key).AppendLine();

                    foreach (Parameter dupParam in dupGroups[i])
                        errMsg.AppendLine(dupParam.Name);
                }
                throw new ParameterSetDefinitionException(type, dupGroups.SelectMany(g => g), errMsg.ToString());
            }

            // check for missing positions
            for (int i = 0; i < positionalParams.Length; i++)
            {
                if (i != positionalParams[i].Position.Value)
                    throw new ParameterSetDefinitionException(type, positionalParams, "Missing parameter position: " +
                                                                                i.ToString(CultureInfo.InvariantCulture));
            }
            try
            {
                helpMessage = setAttr.GetHelpMessageSelector();
            }
            catch (Exception ex)
            {
                throw new ParameterSetDefinitionException(type, positionalParams, ex.Message);
            }
            name = string.IsNullOrWhiteSpace(setAttr.Name) ? type.Name : setAttr.Name;

            // validate command name
            if (setAttr.Command != null && setAttr.Command.Any(char.IsWhiteSpace))
                throw new ParameterSetDefinitionException(type,
                                                          Enumerable.Empty<Parameter>(),
                                                          "Command cannot contain whitespace: '{0}'.",
                                                          setAttr.Command);

            return new ParameterSet(type, name, setAttr.Command, allParams.ToArray(), helpMessage);
        }

        protected Parameter[] Parameters;

        private ParameterSet(Type type, string name, string command, Parameter[] parameters, Func<string> helpMessage)
        {
            this.UnderlyingType = type;
            this.Command = command;
            this.Parameters = parameters;
            this.HelpMessage = helpMessage;
            this.Name = name;
        }

        public Func<string> HelpMessage { get; protected set; }

        public string Name { get; protected set; }

        public Type UnderlyingType { get; protected set; }

        public string Command { get; protected set; }

        public T GetAttribute<T>(bool inherit = true) where T : Attribute
        {
            return (T)Attribute.GetCustomAttribute(this.UnderlyingType, typeof(T), inherit);
        }

        public int Count { get { return this.Parameters.Length; } }

        /// <summary>
        /// Returns an ordered list of positional parameters.
        /// </summary>
        public IEnumerable<Parameter> PositionalParameters
        {
            get {
                return this.Parameters.Where(p => p.Position.HasValue).OrderBy(p => p.Position.Value);
            }
        }

        public Parameter this[int index]
        {
            get
            {
                if (index < 0 || index >= this.Parameters.Length)
                    throw new ArgumentOutOfRangeException("index");

                return this.Parameters[index];
            }
        }

        public Parameter this[string name]
        {
            get
            {
                if (string.IsNullOrEmpty(name))
                    throw new ArgumentNullException("name");

                Parameter ret = null;
                for (int paramNum = 0; paramNum < this.Parameters.Length; paramNum++)
                {
                    Parameter curParam = this.Parameters[paramNum];
                    string namePrefix = curParam.Name.Substring(0, Math.Min(name.Length, curParam.Name.Length));
                    if (StringComparer.InvariantCultureIgnoreCase.Equals(name, namePrefix))
                        if (ret == null)
                            ret = curParam;
                        else
                            throw new AmbiguousMatchException("More than one match.");
                }
                return ret;
            }
        }

        public IEnumerator<Parameter> GetEnumerator()
        {
            return this.Parameters.AsEnumerable().GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        public bool TryGetParameter(string name, out Parameter[] parameters)
        {
            parameters =
                this.Parameters
                    .Where(p => p.Name.StartsWith(name, StringComparison.InvariantCultureIgnoreCase))
                    .ToArray();

            return parameters.Length == 1;
        }
    }
}


text:
static JSValueRef PKTokenAssembly_toString(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef *ex) {
    PKPreconditionInstaceOf(PKTokenAssembly_class, "toString");
    PKTokenAssembly *data = JSObjectGetPrivate(this);
    return PKNSStringToJSValue(ctx, [data description], ex);
}

static JSValueRef PKTokenAssembly_pop(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef *ex) {
    PKPreconditionInstaceOf(PKTokenAssembly_class, "pop");
    PKTokenAssembly *data = JSObjectGetPrivate(this);
    PKToken *tok = [data pop];
    return PKToken_new(ctx, tok);
}

static JSValueRef PKTokenAssembly_push(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef *ex) {
    PKPreconditionInstaceOf(PKTokenAssembly_class, "push");
    PKPreconditionMethodArgc(1, "PKTokenAssembly.push");

    JSValueRef v = argv[0];

    PKTokenAssembly *data = JSObjectGetPrivate(this);
    id obj = PKJSValueGetId(ctx, v, ex);
    [data push:obj];

    return JSValueMakeUndefined(ctx);
}

static JSValueRef PKTokenAssembly_objectsAbove(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef *ex) {
    PKPreconditionInstaceOf(PKTokenAssembly_class, "objectsAbove");
    PKPreconditionMethodArgc(1, "PKTokenAssembly.objectsAbove");

    JSValueRef v = argv[0];

    PKTokenAssembly *data = JSObjectGetPrivate(this);
    id obj = PKJSValueGetId(ctx, v, ex);
    id array = [data objectsAbove:obj];

    return PKNSArrayToJSObject(ctx, array, ex);
}

#pragma mark -
#pragma mark Properties

static JSValueRef PKTokenAssembly_getLength(JSContextRef ctx, JSObjectRef this, JSStringRef propName, JSValueRef *ex) {
    PKTokenAssembly *data = JSObjectGetPrivate(this);
    return JSValueMakeNumber(ctx, data.length);
}

#pragma mark -
#pragma mark Initializer/Finalizer

static void PKTokenAssembly_initialize(JSContextRef ctx, JSObjectRef this) {

}

static void PKTokenAssembly_finalize(JSObjectRef this) {
    // released in PKAssembly_finalize
}

static JSStaticFunction PKTokenAssembly_staticFunctions[] = {
{ "toString", PKTokenAssembly_toString, kJSPropertyAttributeDontDelete },
{ "pop", PKTokenAssembly_pop, kJSPropertyAttributeDontDelete },
{ "push", PKTokenAssembly_push, kJSPropertyAttributeDontDelete },
{ "objectsAbove", PKTokenAssembly_objectsAbove, kJSPropertyAttributeDontDelete },
{ 0, 0, 0 }
};

static JSStaticValue PKTokenAssembly_staticValues[] = {
{ "length", PKTokenAssembly_getLength, NULL, kJSPropertyAttributeDontDelete|kJSPropertyAttributeReadOnly }, // Number
{ 0, 0, 0, 0 }
};

#pragma mark -
#pragma mark ClassMethods

#pragma mark -
#pragma mark Public

JSClassRef PKTokenAssembly_class(JSContextRef ctx) {
    static JSClassRef jsClass = NULL;
    if (!jsClass) {
        JSClassDefinition def = kJSClassDefinitionEmpty;
        def.parentClass = PKAssembly_class(ctx);
        def.staticFunctions = PKTokenAssembly_staticFunctions;
        def.staticValues = PKTokenAssembly_staticValues;
        def.initialize = PKTokenAssembly_initialize;
        def.finalize = PKTokenAssembly_finalize;
        jsClass = JSClassCreate(&def);
    }
    return jsClass;
}

JSObjectRef PKTokenAssembly_new(JSContextRef ctx, void *data) {
    return JSObjectMake(ctx, PKTokenAssembly_class(ctx), data);
}

JSObjectRef PKTokenAssembly_construct(JSContextRef ctx, JSObjectRef constructor, size_t argc, const JSValueRef argv[], JSValueRef *ex) {
    PKPreconditionConstructorArgc(1, "PKTokenAssembly");

    NSString *s = PKJSValueGetNSString(ctx, argv[0], ex);

    PKTokenAssembly *data = [[PKTokenAssembly alloc] initWithString:s];
    return PKTokenAssembly_new(ctx, data);
}


text:
/*
 *	https://systembash.com/a-simple-java-tcp-server-and-tcp-client/
 * */
import java.io.*;
import java.net.*;

class TcpServer{
	public static void main(String argv []) throws Exception{
		String clientSentence;
		String capitalizedSentence;
		ServerSocket welcomeSocket = new ServerSocket(6789);
		while(true){
			Socket connectionSocket = welcomeSocket.accept();
			BufferedReader inFromClient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));
			DataOutputStream outToClient = new DataOutputStream(connectionSocket.getOutputStream());
			clientSentence = inFromClient.readLine();
			System.out.println("Received: " + clientSentence);
			capitalizedSentence = clientSentence.toUpperCase() + '\n';
			outToClient.writeBytes(capitalizedSentence);
		}
	}
}