text:
package java.rmi.server;

import java.io.IOException;
import java.net.ServerSocket;

public interface RMIServerSocketFactory
{
  ServerSocket createServerSocket(int port) throws IOException;
}

redpajama_set_name: RedPajamaGithub


text:
package org.apache.camel.converter.jaxp;

import java.io.InputStream;
import java.io.Reader;

import javax.xml.transform.stream.StreamSource;

import org.apache.camel.ContextTestSupport;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

public class StreamSourceConverterTest extends ContextTestSupport {

    @Test
    public void testToInputStream() throws Exception {
        StreamSource source = context.getTypeConverter().convertTo(StreamSource.class, "<foo>bar</foo>");

        InputStream out = new XmlConverter().toInputStream(source);
        assertNotNull(out);
        assertEquals("<foo>bar</foo>", context.getTypeConverter().convertTo(String.class, out));
    }

    @Test
    public void testToReader() throws Exception {
        StreamSource source = context.getTypeConverter().convertTo(StreamSource.class, "<foo>bar</foo>");

        Reader out = new XmlConverter().toReader(source);
        assertNotNull(out);
        assertEquals("<foo>bar</foo>", context.getTypeConverter().convertTo(String.class, out));
    }
}


text:
"""Tests for Skill models."""

from core.domain import rights_manager
from core.platform import models
from core.tests import test_utils

(skill_models,) = models.Registry.import_models(
    [models.NAMES.skill])

class SkillRightsModelUnitTest(test_utils.GenericTestBase):
    """Test the SkillRightsModel class."""

    def setUp(self):
        super(SkillRightsModelUnitTest, self).setUp()

        skill_models.SkillRightsModel(
            id='id_1',
            creator_id='janet',
            skill_is_private=True
        ).commit(
            'janet', 'Created new skill rights',
            [{'cmd': rights_manager.CMD_CREATE_NEW}])
        skill_models.SkillRightsModel(
            id='id_2',
            creator_id='janet',
            skill_is_private=True
        ).commit(
            'janet', 'Edited skill rights',
            [{'cmd': rights_manager.CMD_CHANGE_ROLE}])
        skill_models.SkillRightsModel(
            id='id_3',
            creator_id='joe',
            skill_is_private=False
        ).commit(
            'joe', 'Created new skill rights',
            [{'cmd': rights_manager.CMD_CREATE_NEW}])
        skill_models.SkillRightsModel(
            id='id_4',
            creator_id='joe',
            skill_is_private=True
        ).commit(
            'joe', 'Created new skill rights',
            [{'cmd': rights_manager.CMD_CREATE_NEW}])

    def test_get_unpublished_by_creator_id(self):
        results = (
            skill_models.SkillRightsModel
            .get_unpublished_by_creator_id('janet').fetch(2))
        self.assertEqual(len(results), 2)

    def test_get_unpublished_by_creator_id_should_ignore_public_skills(self):
        results = (
            skill_models.SkillRightsModel
            .get_unpublished_by_creator_id('joe').fetch(2))
        self.assertEqual(len(results), 1)

    def test_get_unpublished_fetches_all_unpublished_skills(self):
        self.assertEqual(
            len(skill_models.SkillRightsModel.get_unpublished().fetch(4)), 3)


text:
import { Component, OnInit } from '@angular/core';
import {DoctorloginService} from "./doctor-login.service";
import {MemoryService} from "../memory.service";
import {Router} from "@angular/router";

@Component({
  selector: 'app-doctor-login',
  templateUrl: './doctor-login.component.html',
  moduleId: module.id,
})
export class DoctorLoginComponent implements OnInit {
  result:string;
  constructor(private doctorlogin:DoctorloginService, private memory:MemoryService, private route:Router) { }

  ngOnInit() {
  }

  loginSubmit(license:string,pwd:string){
    this.doctorlogin.login(license, pwd).subscribe((data)=>{
      this.result=data;
      console.log("Result"+this.result);
      if(this.result!=="0"){
        this.memory.current_doctor=this.result;
        this.memory.current_doctor2=this.result;
        console.log("doctor in memory1"+this.memory.current_doctor);
        console.log("doctor in memory2"+this.memory.current_doctor2);
        this.route.navigate(["/doctors"])
      }else{

      }
    });
  }

}