blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 410 | content_id stringlengths 40 40 | detected_licenses listlengths 0 51 | license_type stringclasses 2
values | repo_name stringlengths 5 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 80 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 132
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 9.45M | extension stringclasses 28
values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 352 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e6053659a791cb756b1a5b89aa180a47ddc0407c | 6e3493c0f567be1ebf7257d9d19301f6abf48b10 | /src/ex21jdbc/prepared/DeleteSQL.java | 47eb31bb9fb1992692bd42ecb322a0d35a34cf15 | [] | no_license | aeviview/K01Java | 1175b91dd0d6941b81c23a18271ecc641382fc4f | f7b2dda928646a1a8d4b01cccad93eca7ebd5db4 | refs/heads/master | 2023-02-09T01:23:24.567801 | 2021-01-06T00:19:00 | 2021-01-06T00:19:00 | 309,952,657 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 808 | java | package ex21jdbc.prepared;
import ex21jdbc.connect.IConnectImpl;
public class DeleteSQL extends IConnectImpl
{
public DeleteSQL()
{
super("kosmo", "1234");
}
@Override
public void execute()
{
try
{
//1.쿼리문준비
String query = "DELETE FROM member WHERE id = ?";
//2.prepared 객체생성
psmt = con.prepareStatement(query);
//3.사용자로부터 입력받은 값을 인파라미터로 설정
psmt.setString(1, scanValue("삭제할아이디"));
//4.쿼리실행
System.out.println(psmt.executeUpdate() + "행이 삭제되었습니다");
//4줄로 코드가 엄청 간단해졌다!
}
catch(Exception e)
{
e.printStackTrace();
}
finally
{
close();
}
}
public static void main(String[] args)
{
new DeleteSQL().execute();
}
}
| [
"aeviview2@gmail.com"
] | aeviview2@gmail.com |
82723ce5cfa3e881294de4086782225c52d9bd4b | ac2b9a9e583152580194900265abcd6268c96715 | /src/test/java/com/TennisExpress/utilities/BrowserFactory.java | 751a783de738d96174776196466e2dd751f8c6e4 | [] | no_license | bradselcuk/TE_WEB_PROJECT | a814124235c1432f7c7d7185f172a40750af017d | a2b15d3554d0ed92e128d1623a46b12f12c6a76a | refs/heads/master | 2023-06-24T13:33:30.498787 | 2021-07-28T16:43:36 | 2021-07-28T16:43:36 | 390,032,071 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,021 | java | package com.TennisExpress.utilities;
import io.github.bonigarcia.wdm.WebDriverManager;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class BrowserFactory {
//we gonna create a method
//that will return a webdriver object
//this method will take one parameter - String browser
//based on the value of the browser parameter
//method will return corresponded webdriver object
// if browser = chrome, then return chromedriver object
public static WebDriver getDriver(String browser) {
if (browser.equalsIgnoreCase("chrome")) {
WebDriverManager.chromedriver().setup();
return new ChromeDriver();
} else if (browser.equalsIgnoreCase("firefox")) {
WebDriverManager.firefoxdriver().setup();
return new FirefoxDriver();
}
WebDriverManager.chromedriver().setup();
return new ChromeDriver();
}
}
| [
"bulentselcuk@gmail.com"
] | bulentselcuk@gmail.com |
ee4ee0e39100bc4dbeb89c47fae0842656f809da | cd79d98cb3c9735d1ef612cec379186d7bb1180a | /import_demo/app/src/androidTest/java/com/example/dy/import_demo/ExampleInstrumentedTest.java | 48f39810f158299e8964e25d678ab9f5dcc5756a | [] | no_license | wherego/streaming_media_player | 731ee9f098df79a93d89961925c7039362f27f61 | d0beb989617a9dd7bf262e6c66d5788b93762e75 | refs/heads/master | 2021-03-13T00:39:11.771960 | 2017-05-03T08:37:17 | 2017-05-03T08:37:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 756 | java | package com.example.dy.import_demo;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.dy.import_demo", appContext.getPackageName());
}
}
| [
"068089dy@gmail.com"
] | 068089dy@gmail.com |
0360a44132aebfb91901dc3b7f3eb8ecf96f5410 | 1acc5422f950554f0a4f660c0f47a797ec658942 | /app/src/main/java/com/example/android/crimen/MainActivity.java | 590277c55bbfb6bcfa969eddeb44d751f92e768c | [] | no_license | jmcoder1/Crimen | 177be21bb9e0d0f601aa71e22b9528857978ddae | ab67657c2defacd2bfc65a876a2c3c18626dae91 | refs/heads/master | 2020-03-26T17:31:23.775075 | 2018-09-04T19:59:47 | 2018-09-04T19:59:47 | 145,154,875 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 16,248 | java | package com.example.android.crimen;
import android.Manifest;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.support.annotation.NonNull;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.location.places.AutocompleteFilter;
import com.google.android.gms.location.places.GeoDataClient;
import com.google.android.gms.location.places.Place;
import com.google.android.gms.location.places.PlaceDetectionClient;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;
import com.google.android.gms.location.places.ui.PlaceAutocompleteFragment;
import com.google.android.gms.location.places.ui.PlaceSelectionListener;
import com.google.android.gms.maps.CameraUpdate;
import com.google.android.gms.maps.LocationSource;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import java.text.DecimalFormat;
public class MainActivity extends AppCompatActivity implements OnMapReadyCallback {
// The Google Place API request code
private static final int PLACE_AUTOCOMPLETE_REQUEST_CODE = 1;
// The Log Tag for debugging and writing log messages
private static final String LOG_TAG = MainActivity.class.getSimpleName();
// The error to handle if the user does not have the correct version of Google Play services
private static final int EROOR_DIALOG_REQUEST = 9001;
// The Android Manifest location permission request code
private static final int LOCATION_PERMISSION_REQUEST_CODE = 1234;
// The country code to restrict the bounds of the autocomplete fragment
private static final String COUNTRY_BOUND = "GB";
// Shorthand for the android manifest location permissions
private static final String FINE_LOCATION = Manifest.permission.ACCESS_FINE_LOCATION;
private static final String COARSE_LOCATION = Manifest.permission.ACCESS_COARSE_LOCATION;
// The number of decimal places to the latitude and longitude values to
private static final int ROUND_LATLNG_TO = 6;
// The lat/lng values the Google Map camera should open on
// TODO: If you are not in the UK then it should go to somewhere in the UK
private static final LatLng OPENING_LOCATION_LATLNG = new LatLng(51.507351, -0.127758);
// The placeholder date for the specific month of the crimes
// TODO: Note this has to be changed later to be dynamic
private static final String DATE = "2018-02";
// The string for the URL request
private String mRequestUrl;
// The floating search bar that remains at the top
private PlaceAutocompleteFragment mAutocompleteFragment;
// The 'my location' gps button that centres the user to their device location
private FloatingActionButton mMyLocationFab;
// The GoogleMap provided map fragment
private GoogleMap mMap;
// This variables tracks if location permissions have been granted
private boolean mLocationPermissionGranted = false;
//
private FusedLocationProviderClient mFusedLocatonProviderClient;
// The default initial zoom of the map
private static final float DEFAULT_ZOOM = 15f;
/**
* Manipulates the map once available. This callback is triggered when the map is ready to be used.
* This is where we can add markers or lines, add listeners or move the camera.
* If Google Play services is not installed on the device, the user will be prompted to install
* it inside the SupportMapFragment. This method will only be triggered once the user has
* installed Google Play services and returned to the app.
*/
@Override
public void onMapReady(GoogleMap googleMap) {
Log.d(LOG_TAG, "onMapReady: map is ready");
mMap = googleMap;
if (mLocationPermissionGranted) {
getDeviceLocation();
if (ActivityCompat.checkSelfPermission(this, FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission
(this, COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
Log.d(LOG_TAG, "onMapReady: no location permission granted");
return;
}
mMap.setMyLocationEnabled(true);
mMap.setIndoorEnabled(false);
// Hide the default button that centres map to the current user location
mMap.getUiSettings().setMyLocationButtonEnabled(false);
// Sets the min zoom preference - landmass/continent and max zoom preference - buildings
mMap.setMinZoomPreference(5f);
mMap.setMaxZoomPreference(20f);
init();
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
// Splash screen style change
// Must be set before super.onCreate()
setTheme(R.style.AppTheme);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Get the autocomplete search bar view
mAutocompleteFragment = (PlaceAutocompleteFragment)
getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);
// Get the my location FAB
mMyLocationFab = (FloatingActionButton) findViewById(R.id.ic_my_location);
getLocationPermission();
//if(isServicesValid()) {}
}
/**
* This method initialises widgets and fragment on the map view.
*
*/
private void init() {
initMyLocationFAB();
initSearchBar();
}
/**
* This method initialises the my_location gps widget that centres tha map to the
* user device location.
*/
private void initMyLocationFAB() {
// Sets the colour of the FAB
setFloatingActionButtonColors(mMyLocationFab,
getResources().getColor(R.color.lightWidgetBakground),
getResources().getColor(R.color.lightWidgetBakground));
// Controls what happens when the my location widget is pressed
mMyLocationFab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.d(LOG_TAG, "mMyLocationFab: clicked my location FAB widget");
getDeviceLocation();
}
});
}
/**
* This method initialises the search bar that uses Google Places API (autocomplete fragment).
* It handles the activity that happens around the search bar and what is pressed when a Place
* is selected from the search bar.
*/
private void initSearchBar() {
// Sets the filter to restrict to the bound of the London (UK) region
AutocompleteFilter autocompleteFilter = new AutocompleteFilter.Builder()
.setTypeFilter(Place.TYPE_COUNTRY)
.setCountry(COUNTRY_BOUND)
.build();
// Filter the autocomplete fragment to the specific bounds (UK)
mAutocompleteFragment.setFilter(autocompleteFilter);
// Activity for when a place is selected from the search bar
mAutocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {
@Override
public void onPlaceSelected(Place place) {
LatLng placeLatLng = place.getLatLng();
mRequestUrl = getUrlFromPlace(place, DATE);
// Moves the camera to the place selected
moveCamera(placeLatLng, DEFAULT_ZOOM);
// Gets information about crime at the chosen Place
// Passes the Place specific information onto the next activity
Intent crimesIntent = new Intent(MainActivity.this, CrimeActivity.class);
Bundle b = new Bundle();
b.putString("url", mRequestUrl);
crimesIntent.putExtra("urlDataBundle", b);
startActivity(crimesIntent);
Log.i(LOG_TAG, "mAutocompleteFragment: Place - " + place.getName());
}
@Override
public void onError(Status status) {
// TODO: Handle the error.
Log.i(LOG_TAG, "initSearchBar:onError: An error occurred: " + status);
}
});
}
/**
* This method sets the colours of the floating action button.
*
* @param fab The floating action button widget.
* @param primaryColor The colour of the button when it is not pressed.
* @param rippleColor The colour of the button when the button is pressed.
*/
private void setFloatingActionButtonColors(FloatingActionButton fab, int primaryColor, int rippleColor) {
int[][] states = {
{android.R.attr.state_enabled},
{android.R.attr.state_pressed},
};
int[] colors = {
primaryColor,
rippleColor,
};
ColorStateList colorStateList = new ColorStateList(states, colors);
fab.setBackgroundTintList(colorStateList);
}
/**
* This method gets the permission from the use location services from Google.
*/
private void getLocationPermission() {
Log.d(LOG_TAG, "getLocationPermission: Getting location permissions");
String[] permissions = {FINE_LOCATION, COARSE_LOCATION};
if (ContextCompat.checkSelfPermission(this.getApplicationContext(),
FINE_LOCATION) == PackageManager.PERMISSION_GRANTED &&
ContextCompat.checkSelfPermission(this.getApplicationContext(),
COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
mLocationPermissionGranted = true;
initMap();
} else {
ActivityCompat.requestPermissions(this, permissions,
LOCATION_PERMISSION_REQUEST_CODE);
}
}
/**
* This method gets the device location from the user and moves the map camera to the user
* device location.
*/
private void getDeviceLocation() {
Log.d(LOG_TAG, "getDeviceLocation: getting the device's current location");
mFusedLocatonProviderClient = LocationServices.getFusedLocationProviderClient(this);
try {
if (mLocationPermissionGranted) {
Task location = mFusedLocatonProviderClient.getLastLocation();
location.addOnCompleteListener(new OnCompleteListener() {
@Override
public void onComplete(@NonNull Task task) {
if (task.isSuccessful()) {
Log.d(LOG_TAG, "onComplete: found location");
Location currentLocation = (Location) task.getResult();
moveCamera(new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude()), DEFAULT_ZOOM);
} else {
Log.d(LOG_TAG, "onComplete: current location is location");
Toast.makeText(MainActivity.this, "Unable to get current location", Toast.LENGTH_SHORT).show();
}
}
});
}
} catch (SecurityException e) {
Log.d(LOG_TAG, "getDeviceLocation: SecurityException " + e.getMessage());
}
}
/**
*
*/
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
Log.d(LOG_TAG, "onRequestPermissionsResult: called");
mLocationPermissionGranted = false;
switch(requestCode) {
case LOCATION_PERMISSION_REQUEST_CODE:
if(grantResults.length > 0) {
for(int i = 0; i < grantResults.length; i++) {
if(grantResults[i] != PackageManager.PERMISSION_GRANTED) {
mLocationPermissionGranted = false;
Log.d(LOG_TAG, "onRequestPermissionsResult: false");
return;
}
}
Log.d(LOG_TAG, "onRequestPermissionsResult: granted");
mLocationPermissionGranted = true;
initMap();
}
}
}
/**
* This method initialises the GoogleMap map.
*/
private void initMap() {
Log.d(LOG_TAG, "initMap: initialising Google map...");
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(MainActivity.this);
}
/**
* This method moves the Google Map camera based on LatLng and the camera zoom.
*
* @param latLng The location to move the camera to.
* @param zoom The zoom the camera should focus up to.
*/
private void moveCamera(LatLng latLng, float zoom) {
Log.d(LOG_TAG, "Moving camera to latitude: " + latLng.latitude + "and longitude: "
+ latLng.longitude + " with camera zoom: " + zoom);
mMap.clear();
// Zoom in, animating the camera.
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, zoom));
MarkerOptions options = new MarkerOptions()
.position(latLng);
mMap.addMarker(options);
}
/**
* This method gets the URL for the HTTP request respective to the place selected by the user.
*
* Note: this method only returns data for crime_at_location urls
*
* @param place The place the user has selected
* @param month The month the data is being observed from.
* @return The url for the crime HTTP request.
*/
private String getUrlFromPlace(Place place, String month) {
LatLng placeLatLng = place.getLatLng();
double latitude = roundDecimalNumber(placeLatLng.latitude, ROUND_LATLNG_TO);
double longitude = roundDecimalNumber(placeLatLng.longitude, ROUND_LATLNG_TO);
Log.e(LOG_TAG, "Place longitude: " + longitude);
Log.e(LOG_TAG, "Place latitude: " + latitude);
String url = getString(R.string.crime_at_location_url, DATE, latitude, longitude);
Log.e(LOG_TAG, "Request url: " + url);
return url;
}
/**
* This method rounds a decimal number to a certain decimal number.
*
* @param num The decimal number to round.
* @param nDecimalPoints The number of decimal points to round to.
*/
private double roundDecimalNumber(double num, int nDecimalPoints) {
StringBuilder decimalStringBuilder = new StringBuilder("0.");
for(int i = 0; i < nDecimalPoints; i++) {
decimalStringBuilder.append("0");
}
DecimalFormat df = new DecimalFormat(decimalStringBuilder.toString());
return Double.parseDouble(df.format(num));
}
} | [
"jojomasala@protonmail.com"
] | jojomasala@protonmail.com |
c5177533af88693dc6e674af65766ea0cd0b9444 | 99a3cd6e98998d8c2e2d21ad887c62c27c4d0c4e | /app/src/main/java/com/himanshu/nautiyal/studyguru/Database/EachDayDatabase.java | af26df1d1040048804b1d8234d269c8c7960dd55 | [] | no_license | boffin311/StudyGuru | aad817c5267e540a70f588063f759b68bfd7cf78 | db1da6e25751ea42aae80b69a1223dafcf0849f9 | refs/heads/master | 2021-04-09T07:12:34.037592 | 2020-03-21T20:14:08 | 2020-03-21T20:14:08 | 248,849,868 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,324 | java | package com.himanshu.nautiyal.studyguru.Database;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import com.himanshu.nautiyal.studyguru.Constants;
import org.w3c.dom.Text;
import java.util.ArrayList;
public class EachDayDatabase implements Constants {
public static final String TABLE_NAME="SingleDay";
public static final String TABLE_B_NAME="TeamB";
public static final String CommonTableName="Common";
public static String ID="ID";
public interface ColumnCommon
{
String DAY="Day ";
String DATE="Date ";
String RATING="Rating ";
String TOTAL_TIME="TotalTime ";
}
int Sum=0;
// public final static String Foul="Fouls ";
// public static final String Player="Player ";
// public static final String ThemeTableName="Theme";
// public static final String[] All_Column={ID,Column.Name,Column.Sum,Foul,Player};
// public static final String[] AllTheme={ ThemeColumn.Theme};
public static final String[] All={ID,ColumnCommon.DAY, ColumnCommon.DATE,ColumnCommon.RATING,ColumnCommon.TOTAL_TIME};
// public interface Column{ String Name="Name ";String Sum="Sum ";}
// public interface ThemeColumn { String Theme="Theme";}
public static final String CMD_CREATE_SINGLE_TABLE=
Create+TABLE_NAME+LBR+
ID +INT+"PRIMARY KEY "+
COMMA+
ColumnCommon.DAY+TEXT+
COMMA+
ColumnCommon.DATE+TEXT+
COMMA+
ColumnCommon.RATING+TEXT+
COMMA+
ColumnCommon.TOTAL_TIME+ TEXT +
RBR+SEMI;
// public static final String CMD_CREATE_THEME= Create+ThemeTableName+LBR+ ThemeColumn.Theme+INT+ RBR+SEMI;
// public static final String insert="insert into "+ThemeTableName+" values(2);";
public static void insertPlayer(SQLiteDatabase db, DataList team){
ContentValues row=new ContentValues();
row.put(ColumnCommon.DAY,team.getDay());
row.put(ColumnCommon.DATE,team.getDate());
row.put(ColumnCommon.RATING,team.getRatings());
row.put(ColumnCommon.TOTAL_TIME,team.getTotolTime());
db.insert(TABLE_NAME,null,row);
}
public static ArrayList<DataList> readAll(SQLiteDatabase db)
{
ArrayList<DataList> arrayList=new ArrayList<>();
Cursor c=db.query(TABLE_NAME,All,null,null,
null,null,null);
while(c.moveToNext())
{
DataList teamAList=new DataList();
teamAList.setDay(c.getString(1));
teamAList.setDate(c.getString(2));
teamAList.setRatings(c.getString(3));
teamAList.setTotolTime(c.getString(4));
arrayList.add(teamAList);
}
return arrayList;
}
//
//
// public static void DeleteTable(SQLiteDatabase db,int position)
// {
// db.delete(TABLE_NAME,ID+"="+(position+1),null);
// }
// public static void UpdateScore(SQLiteDatabase db,TeamAList teamA,int position){
// ContentValues values=new ContentValues();
// values.put(Column.Sum,teamA.getSum());
// db.update(TABLE_NAME,values,ID+"="+(position+1),null);
//
// }
//
}
| [
"himanshu31198@gmail.com"
] | himanshu31198@gmail.com |
599011e4f035d7918d9084287952b3806499c30c | e20929b5d76602adc7b0728470542991f13fbfe4 | /sshop-admin/src/main/java/com/fzh/sshop/biz/stock/entity/TBizGoodsPicture.java | 071cb6c048bf2e920b0e738a692af6106dbfc50e | [] | no_license | fangzehua911/sshop | a764d25f39c76e3c11f9014f504d8571576b3705 | 30590a6f900e1fe1e45215f04ed6d0d37ea11d8b | refs/heads/master | 2022-11-12T18:09:26.182903 | 2020-06-24T09:24:50 | 2020-06-24T09:24:50 | 265,816,852 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,238 | java | package com.fzh.sshop.biz.stock.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author fang
* @since 2020-06-23
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="TBizGoodsPicture对象", description="")
public class TBizGoodsPicture implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty(value = "商品编号")
private String goodsNo;
@ApiModelProperty(value = "图片地址")
private String goodsImg;
@ApiModelProperty(value = "百度图片标识")
private String goodsImgCode;
@ApiModelProperty(value = "排序")
private Integer sort;
@TableField(fill = FieldFill.INSERT)
private Date createTime;
}
| [
"jika001"
] | jika001 |
8224bcca2cd8463d6b05622d483e648a4eadd5ad | 46e31343d72e6f0173d0a5a6959353e730222c2d | /A_Spital_2020/src/ex16_Chain/clase/Pacient.java | 36b49c558eea5c77191e8616b27c4c987978eee0 | [] | no_license | AlexandraIosif7/CTS-2021- | 1ebcd3a6c68f7b4230760292a420f8d74979b684 | ca4daf8eb9074bbe666684580f231266b4c8abdc | refs/heads/master | 2023-05-07T14:24:21.096254 | 2021-06-03T16:00:04 | 2021-06-03T16:00:04 | 343,418,337 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 719 | java | package ex16_Chain.clase;
import ex8_Composite.clase.Sectie;
public class Pacient {
private String name;
private String nrtel;
private String email;
public Pacient(String name, String nrtel, String email) {
this.name = name;
this.nrtel = nrtel;
this.email = email;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNrtel() {
return nrtel;
}
public void setNrtel(String nrtel) {
this.nrtel = nrtel;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}
| [
"iosifalexandra7@yahoo.com"
] | iosifalexandra7@yahoo.com |
61d7e71e68c5eb9f1fa802ea4d5d4dfd686d683e | ca3497abe8c93d39eb91e55de364fb7e5f8723f9 | /src/main/java/za/co/mach/liveconsult/security/social/CustomSignInAdapter.java | 11e78b2ec25166c4bbf6124a913e6888e442a868 | [] | no_license | lukaszmac/liveconsult | 24883f3b5aedcf24aebf4b7e176fff4b2d8bc836 | 9bdcfffd152b0909d12a535ca72737e2aa22e60d | refs/heads/master | 2021-08-23T11:28:51.098313 | 2017-12-04T18:07:48 | 2017-12-04T18:07:48 | 113,077,229 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,826 | java | package za.co.mach.liveconsult.security.social;
import za.co.mach.liveconsult.security.jwt.TokenProvider;
import io.github.jhipster.config.JHipsterProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.social.connect.Connection;
import org.springframework.social.connect.web.SignInAdapter;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.security.core.AuthenticationException;
import org.springframework.web.context.request.ServletWebRequest;
import javax.servlet.http.Cookie;
public class CustomSignInAdapter implements SignInAdapter {
@SuppressWarnings("unused")
private final Logger log = LoggerFactory.getLogger(CustomSignInAdapter.class);
private final UserDetailsService userDetailsService;
private final JHipsterProperties jHipsterProperties;
private final TokenProvider tokenProvider;
public CustomSignInAdapter(UserDetailsService userDetailsService, JHipsterProperties jHipsterProperties,
TokenProvider tokenProvider) {
this.userDetailsService = userDetailsService;
this.jHipsterProperties = jHipsterProperties;
this.tokenProvider = tokenProvider;
}
@Override
public String signIn(String userId, Connection<?> connection, NativeWebRequest request){
try {
UserDetails user = userDetailsService.loadUserByUsername(userId);
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(
user,
null,
user.getAuthorities());
SecurityContextHolder.getContext().setAuthentication(authenticationToken);
String jwt = tokenProvider.createToken(authenticationToken, false);
ServletWebRequest servletWebRequest = (ServletWebRequest) request;
servletWebRequest.getResponse().addCookie(getSocialAuthenticationCookie(jwt));
} catch (AuthenticationException ae) {
log.error("Social authentication error");
log.trace("Authentication exception trace: {}", ae);
}
return jHipsterProperties.getSocial().getRedirectAfterSignIn();
}
private Cookie getSocialAuthenticationCookie(String token) {
Cookie socialAuthCookie = new Cookie("social-authentication", token);
socialAuthCookie.setPath("/");
socialAuthCookie.setMaxAge(10);
return socialAuthCookie;
}
}
| [
"jhipster-bot@users.noreply.github.com"
] | jhipster-bot@users.noreply.github.com |
c41742979f93752b7054ca5ee32bdf3c1c796e5f | 0b4ffd0a0f2013126eaa7deb47888c10e56b848a | /dailySales/src/com/daily/svc/Main.java | 62f4ff86be072143c2188b17d46158a4487a1d4f | [] | no_license | kr1914/kr1914 | f6dea543bab058e08f5eb0d9f230e0fd05c9b96c | 62b2a62c71548643ce2a51be1347d638ea59c565 | refs/heads/master | 2023-07-18T03:09:32.839959 | 2021-09-03T02:49:32 | 2021-09-03T02:49:32 | 401,203,606 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 246 | java | package com.daily.svc;
import java.io.IOException;
import java.util.List;
import com.daily.dao.DbAcesse;
public class Main {
public static void main(String[] args) throws IOException {
DbAcesse da = new DbAcesse();
}
}
| [
"kre1241@naver.com"
] | kre1241@naver.com |
9fed8fb08246f052d6b835d9673c133033d13bf2 | 042d2646ba414e3abb23232f9fa017fb2d8163c7 | /workspace_ftbc_spring/spring_ftbc/src/main/java/exe/util/Path.java | 4d0e189468e20235b2cf3e840eedbfb5d6ca6e0f | [] | no_license | bum12ark/funding-throgh-blockchain | 90224d7080707f73d4ab66413764888dcb8dd6b7 | e8564b6b1359d46b704d67bd6ab4c377b36d27e3 | refs/heads/master | 2023-03-15T05:38:16.567681 | 2021-03-17T09:03:22 | 2021-03-17T09:03:22 | 346,294,583 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 788 | java | package exe.util;
public class Path {
public static final String SERVER_IP = "192.168.0.211";
public static final int FILE_SERVER_PORT = 9010;
public static final int MSG_SERVER_PORT = 9020;
public static final String SERVER_CHAIN_PATH = "C:\\FTBC_server\\chain\\";
public static final String CLIENT_CHAIN_PATH = "C:\\FTBC_server\\chain\\client\\";
public static final String MAJORITY_CHAINS = "C:\\FTBC_server\\chain\\majoirty_chains\\";
public static final String SERVER_ABSOLUTE_PATH = "C:\\FTBC_server\\chain\\FTBC_Chain.ftbc";
public static final String MANAGER_WALLET_PATH = "C:\\FTBC_server\\keys\\manager\\";
public static final String PROEJCT_WALLET_PATH = "C:\\FTBC_server\\keys\\project\\";
// public static final String SERVER_CHAIN_PATH = "C:\\FTBC_server\\";
}
| [
"bum12ark@gmail.com"
] | bum12ark@gmail.com |
819bd7bbd760ebfb23a4f7b9d07d6a79e56a2a46 | a7e989c3432fde1afd5c43765fc5f31c28dea511 | /AICTSLServicesIntegration/src/java/edu/com/AddUser.java | fe90b91c4cf6d56daf3387617a19faf86262e2e2 | [] | no_license | anitab15/AICTSL-Services-Integration | ba67d5e734b6175b3d1d6d98065ab50d102ec8bc | 12b9a912cf62c627b8d4baf5ed6606a10907392b | refs/heads/master | 2021-01-16T18:49:21.535696 | 2017-08-12T16:24:01 | 2017-08-12T16:24:01 | 100,120,660 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,924 | java | package edu.com;
import edu.db.com.*;
import edu.db.com.SLQController;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.sql.Blob;
import java.sql.Connection;
import java.sql.Date;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.LocalDate;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.http.Part;
@MultipartConfig(maxFileSize = 16177215)
@WebServlet(name = "AddUser", urlPatterns = {"/AddUser"})
// upload file's size up to 16MB
public class AddUser extends HttpServlet {
private static final int BUFFER_SIZE = 4096;
private Connection con;
private SLQController sqlController;
private ResultSet rs;
private PreparedStatement ps;
SLQController controller=new SLQController();
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//get values of text fields
PrintWriter out = response.getWriter();
String tagid = request.getParameter("tagid");
String uname = request.getParameter("uname");
String dofValid = request.getParameter("dov");
String message = null;
double amnt = Double.parseDouble(request.getParameter("amount"));
InputStream inputStream = null; // input stream of the upload file
out.print(tagid);
// obtains the upload file part in this multipart request
Part filePart = request.getPart("photo");
out.print(filePart);
if (filePart != null) {
inputStream = filePart.getInputStream();
}
// message will be sent back to client
sqlController=new SLQController();
out.println("Tagid id"+tagid);
out.println("User Name "+uname);
out.println("amount"+amnt);
out.println("Photo "+inputStream);
int i=0;
try{
i=sqlController.addUser(tagid, uname, amnt,dofValid,inputStream);
if(i>0){
HttpSession session=request.getSession();
session.setAttribute("total_user",controller.getTotalUser());
getServletContext().getRequestDispatcher("/welcome.jsp").forward(request, response);
}else
getServletContext().getRequestDispatcher("/c_panal.jsp").forward(request, response);
}catch(Exception e){}
}
} | [
"anitabhadouria121@gmail.com"
] | anitabhadouria121@gmail.com |
e479d76f018127514b15d8c0a26f646a824934b3 | e617f4ae796f16eeb4705200935a90dfd31955b2 | /com/google/android/gms/games/request/GameRequestRef.java | 9be38d634d6ea0f8fb02fe3c01ee7016b9e7b803 | [] | no_license | mascot6699/Go-Jek.Android | 98dfb73b1c52a7c2100c7cf8baebc0a95d5d511d | 051649d0622bcdc7872cb962a0e1c4f6c0f2a113 | refs/heads/master | 2021-01-20T00:24:46.431341 | 2016-01-11T05:59:34 | 2016-01-11T05:59:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,759 | java | package com.google.android.gms.games.request;
import android.os.Parcel;
import com.google.android.gms.common.data.DataHolder;
import com.google.android.gms.common.data.d;
import com.google.android.gms.games.Game;
import com.google.android.gms.games.GameRef;
import com.google.android.gms.games.Player;
import com.google.android.gms.games.PlayerRef;
import java.util.ArrayList;
import java.util.List;
public final class GameRequestRef
extends d
implements GameRequest
{
private final int aaK;
public GameRequestRef(DataHolder paramDataHolder, int paramInt1, int paramInt2)
{
super(paramDataHolder, paramInt1);
this.aaK = paramInt2;
}
public int describeContents()
{
return 0;
}
public boolean equals(Object paramObject)
{
return GameRequestEntity.a(this, paramObject);
}
public GameRequest freeze()
{
return new GameRequestEntity(this);
}
public long getCreationTimestamp()
{
return getLong("creation_timestamp");
}
public byte[] getData()
{
return getByteArray("data");
}
public long getExpirationTimestamp()
{
return getLong("expiration_timestamp");
}
public Game getGame()
{
return new GameRef(this.II, this.JX);
}
public int getRecipientStatus(String paramString)
{
int i = this.JX;
while (i < this.JX + this.aaK)
{
int j = this.II.ar(i);
if (this.II.c("recipient_external_player_id", i, j).equals(paramString)) {
return this.II.b("recipient_status", i, j);
}
i += 1;
}
return -1;
}
public List<Player> getRecipients()
{
ArrayList localArrayList = new ArrayList(this.aaK);
int i = 0;
while (i < this.aaK)
{
localArrayList.add(new PlayerRef(this.II, this.JX + i, "recipient_"));
i += 1;
}
return localArrayList;
}
public String getRequestId()
{
return getString("external_request_id");
}
public Player getSender()
{
return new PlayerRef(this.II, gz(), "sender_");
}
public int getStatus()
{
return getInteger("status");
}
public int getType()
{
return getInteger("type");
}
public int hashCode()
{
return GameRequestEntity.a(this);
}
public boolean isConsumed(String paramString)
{
return getRecipientStatus(paramString) == 1;
}
public String toString()
{
return GameRequestEntity.c(this);
}
public void writeToParcel(Parcel paramParcel, int paramInt)
{
((GameRequestEntity)freeze()).writeToParcel(paramParcel, paramInt);
}
}
/* Location: /Users/michael/Downloads/dex2jar-2.0/GO_JEK.jar!/com/google/android/gms/games/request/GameRequestRef.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"michael@MJSTONE-MACBOOK.local"
] | michael@MJSTONE-MACBOOK.local |
cd813909a3cf015e43c222c687e56fed9b92df4e | df4c1b4e832889bfbed604b7b3fa1dc87010bb20 | /app/src/main/java/com/shobhit/pooltool/activity/MyBalanceSheet.java | 36eaa9acbc1ae1dacc74106f9bf8135d8d83b8f4 | [] | no_license | shobhitgarg9536/pooltool | 1313761444703f80bda6c2bd95fe0998a701de10 | b9a2295fa4f9ef6a35999510650c25aac8148734 | refs/heads/master | 2021-06-12T13:36:36.568779 | 2017-04-12T20:13:27 | 2017-04-12T20:13:28 | 82,454,613 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,200 | java | package com.shobhit.pooltool.activity;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import com.shobhit.pooltool.R;
import com.shobhit.pooltool.database.ContactDatabase;
import com.shobhit.pooltool.listeners.BalanceInterface;
import com.shobhit.pooltool.network.MyBalance;
import com.shobhit.pooltool.utils.CheckInternetConnectivity;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
public class MyBalanceSheet extends AppCompatActivity {
Toolbar tbBalanceSheet;
SharedPreferences sharedPreferences;
public static final String MyGroupId = "UserDetail";
public static final String MYCONTACT = "UserContact" ;
String groupid , myContact;
ListView lvBalanceSheet;
ContactDatabase contactDb;
HashMap<String, String> queryValues;
ArrayList<HashMap<String, String>> itemDetails;
CheckInternetConnectivity checkInternetConnectivity;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mybalancesheet);
tbBalanceSheet = (Toolbar) findViewById(R.id.tbbalancesheet);
lvBalanceSheet = (ListView) findViewById(R.id.lvbalancesheet);
setSupportActionBar(tbBalanceSheet);
getSupportActionBar().setTitle("My Balance Sheet");
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
checkInternetConnectivity = new CheckInternetConnectivity();
contactDb = new ContactDatabase(this);
sharedPreferences = getSharedPreferences(MyGroupId, MODE_PRIVATE);
groupid = (sharedPreferences.getString("groupid", ""));
sharedPreferences = getSharedPreferences(MYCONTACT, MODE_PRIVATE);
myContact = (sharedPreferences.getString("UserContact", ""));
if(checkInternetConnectivity.isNetConnected(MyBalanceSheet.this)){
MyBalance myBalance = new MyBalance(new BalanceInterface() {
@Override
public void money(String output) {
if (output.equals("Something went wrong.Try Again") || output.equals("None of the transaction take place")) {
android.app.AlertDialog.Builder alertDialog = new android.app.AlertDialog.Builder(MyBalanceSheet.this);
alertDialog.setTitle("Status");
alertDialog.setMessage(output);
alertDialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
finish();
}
});
alertDialog.create();
alertDialog.show();
alertDialog.setCancelable(false);
} else {
try {
// Extract JSON array from the response
JSONArray arr = new JSONArray(output);
// If no of array elements is not zero
if (arr.length() != 0) {
itemDetails = new ArrayList<HashMap<String, String>>();
// Loop through each array element, get JSON object which has userid and username
for (int i = 0; i < arr.length(); i++) {
// Get JSON object
JSONObject obj = (JSONObject) arr.get(i);
System.out.println(obj.get("amount"));
System.out.println(obj.get("item"));
System.out.println(obj.get("money"));
System.out.println(obj.get("date"));
System.out.println(obj.get("time"));
// DB QueryValues Object to insert into SQLite
queryValues = new HashMap<String, String>();
// Add values extracted from Object
queryValues.put("amount", obj.get("amount").toString());
queryValues.put("item", obj.get("item").toString());
queryValues.put("money", obj.get("money").toString());
// queryValues.put("date", obj.get("date").toString());
queryValues.put("time", obj.get("time").toString());
queryValues.put("groupMember", getContactName(obj.get("groupMember").toString()));
// Insert User into SQLite DB
itemDetails.add(queryValues);
}
}
ListAdapter adapter = new SimpleAdapter(MyBalanceSheet.this, itemDetails, R.layout.mybalancesheetview, new String[]{
"item", "money", "amount", "time", "groupMember"}, new int[]{R.id.tvItemName, R.id.tvTotalMoney,
R.id.tvMySharing, R.id.tvTime, R.id.tvSharedBy});
lvBalanceSheet.setAdapter(adapter);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}, MyBalanceSheet.this);
myBalance.execute("myBalanceSheet", myContact, groupid);
}
}
private void jsontoarray(String response) {
try {
// Extract JSON array from the response
JSONArray arr = new JSONArray(response);
// If no of array elements is not zero
if(arr.length() != 0){
itemDetails = new ArrayList<HashMap<String, String>>();
// Loop through each array element, get JSON object which has userid and username
for (int i = 0; i < arr.length(); i++) {
// Get JSON object
JSONObject obj = (JSONObject) arr.get(i);
System.out.println(obj.get("amount"));
System.out.println(obj.get("item"));
System.out.println(obj.get("money"));
System.out.println(obj.get("date"));
System.out.println(obj.get("time"));
// DB QueryValues Object to insert into SQLite
queryValues = new HashMap<String, String>();
// Add values extracted from Object
queryValues.put("amount", obj.get("amount").toString());
queryValues.put("item", obj.get("item").toString());
queryValues.put("money", obj.get("money").toString());
queryValues.put("date", obj.get("date").toString());
queryValues.put("time", obj.get("time").toString());
// Insert User into SQLite DB
itemDetails.add(queryValues);
}
}
ListAdapter adapter = new SimpleAdapter(MyBalanceSheet.this , itemDetails , R.layout.mybalancesheetview , new String[] {
"item" ,"money","amount","date","time" }, new int[] { R.id.tvItemName , R.id.tvTotalMoney ,
R.id.tvMySharing , R.id.tvTime });
lvBalanceSheet.setAdapter(adapter);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public String getContactName(String contact){
String name;
name = contactDb.getContact(contact);
if(name.isEmpty())
return contact;
else
return name;
}
}
| [
"shobhitgarg9536@gmail.com"
] | shobhitgarg9536@gmail.com |
aaf244339e45cee89b5ed9c427a0b4286257591d | b7fb06bf8dcd329b8ef3acf511060bf4de63ccf8 | /app/src/main/java/com/key/doltool/event/app/Version.java | aac063da8a146a74746024440a5776d4e5510ccf | [] | no_license | zzxxasp/DolTool | 6c9de3d93c4519fed3a9cac07f1e108d71b55447 | 88610f4e7bfa484d05c16a2cb8f252b3d082bece | refs/heads/master | 2021-06-11T01:44:47.939687 | 2021-02-18T01:59:18 | 2021-02-18T01:59:18 | 37,501,154 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 852 | java | package com.key.doltool.event.app;
public class Version {
private String appname;
private String verionCode;
private String updataMsg;
private String updataUrl;
private String app_size;
public String getAppname() {
return appname;
}
public void setAppname(String appname) {
this.appname = appname;
}
public String getVerionCode() {
return verionCode;
}
public void setVerionCode(String verionCode) {
this.verionCode = verionCode;
}
public String getUpdataMsg() {
return updataMsg;
}
public void setUpdataMsg(String updataMsg) {
this.updataMsg = updataMsg;
}
public String getUpdataUrl() {
return updataUrl;
}
public void setUpdataUrl(String updataUrl) {
this.updataUrl = updataUrl;
}
public String getApp_size() {
return app_size;
}
public void setApp_size(String app_size) {
this.app_size = app_size;
}
}
| [
"zzxxasp@163.com"
] | zzxxasp@163.com |
8b9ba37a4948a718f0f7338371103d151aa576ca | e69e5d899856b185e23b6ca0ed50df38b2aff5d1 | /ElasticDataServices/src/main/java/com/tip/assetimage/repository/AssetImageAccRepository.java | e3a6a3e3315a40b4f86623664210bca762ac07fe | [] | no_license | shuvankar999/git_backup | 10edee9a3db6e4dcb6b67df2a712ebce10c33f31 | b39e126e45df1c6147aace22aabbcc75b3d65322 | refs/heads/main | 2023-06-14T17:12:55.874523 | 2021-07-09T16:16:14 | 2021-07-09T16:16:14 | 384,487,809 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 236 | java | package com.tip.assetimage.repository;
import com.tip.assetimage.model.AssetImageAccRequest;
@FunctionalInterface
public interface AssetImageAccRepository {
public boolean updateImageLoc(AssetImageAccRequest assetImageAccRequest);
} | [
"shuvankar999@gmail.com"
] | shuvankar999@gmail.com |
105bfaa7f97660711dc0235d60202628916dec21 | fa8666387662190086611fd08c44bfcbf2e59506 | /src/com/csw/Service/impls/TransformSensorMLToebRIMService.java | bf82495da945a99132207f8801907ae2bf62d84f | [] | no_license | xlinliu/CxfMyCsw | 45464cc7b76ff91351767cf96fd3098eb3c86f97 | 6447dd6f7a81fa84e4ed0281be6140e27db95b71 | refs/heads/master | 2021-06-27T03:53:06.809286 | 2017-09-18T07:35:37 | 2017-09-18T07:35:37 | 103,904,357 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 3,892 | java | package com.csw.Service.impls;
import java.io.File;
import java.io.FileInputStream;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import com.csw.Service.interfaces.TransformSensorMLToebRIMServiceInterface;
import com.csw.exceptions.ServiceException;
import com.csw.utils.GetRealPathUtil;
import com.csw.utils.StringUtil;
import com.csw.utils.FileUtil.FileOperationUtil;
import com.csw.utils.TransactionsUtil.TransactionOperation;
import com.csw.utils.Userutils.UserInfoUtil;
import com.googlecode.jsonplugin.JSONResult;
public class TransformSensorMLToebRIMService implements
TransformSensorMLToebRIMServiceInterface {
/**
* 将system,component和processModel的SensorML转换为EbRIM格式内容
*
* @param sensorml
* system,component,processModel的SensorML内容
* @return 返回转换好的EbRIM格式内容
* @throws Exception
*/
public String TransformNonProcessChainToEbRIMMethod(String sensorml)
throws Exception {
String basepath = new GetRealPathUtil().getWebInfPath();
if (basepath.endsWith("\\") || basepath.endsWith("/")) {
} else {
basepath += "\\";
}
String sensormlfilepath = FileOperationUtil.CreateFilePathOperation(
basepath, "sensorml");
String processmodelxsltpath = basepath + "transformxsls\\Process.xsl";
String xslfilepath = basepath + "transformxsls\\SensorMLToEbRIM.xsl";
String ebrimfilepath = FileOperationUtil.CreateFilePathOperation(
basepath, "ebrim");
String ebrimcontent = "";
basepath = new GetRealPathUtil().getWebInfPath();
// System.out.println(sensormlfilepath);
FileOperationUtil.WriteToFileContent(sensorml.trim(), sensormlfilepath,
"UTF-8");
TransformerFactory tf = TransformerFactory.newInstance();
Source source = null;
if (sensorml.toLowerCase().contains("ProcessModel>".toLowerCase())) {
source = new StreamSource(new File(processmodelxsltpath));
} else if (sensorml.toLowerCase().contains("System>".toLowerCase())) {
source = new StreamSource(new File(xslfilepath));
}
@SuppressWarnings("unused")
Transformer tfomerTransformer = tf.newTransformer(source);
Source smlsources = new StreamSource(new FileInputStream(
sensormlfilepath));
StreamResult result = new StreamResult(new File(ebrimfilepath));
@SuppressWarnings("unused")
JSONResult jsonResult = new JSONResult();
tf.newTransformer(source).transform(smlsources, result);
ebrimcontent = FileOperationUtil
.ReadFileContent(ebrimfilepath, "UTF-8");
return ebrimcontent;
}
/**
* 将sensorml转换为ebrim个格式的文档
*/
public String TransactionSensorMLToeEbRIMMethod(String username,
String password, String sensorml) throws ServiceException {
// 核实用户信息
UserInfoUtil.CheckUserLogin(username, password);
if (StringUtil.checkStringIsNotNULLAndEmptyMethod(sensorml) == null) {
throw new ServiceException("参数sensorml不能为空!");
}
String basepath = new GetRealPathUtil().getWebInfPath();
String sensormlfilepath = FileOperationUtil.CreateFilePathOperation(
basepath, "sensorml");
String ebrimfilepath = FileOperationUtil.CreateFilePathOperation(
basepath, "ebrim1");
String processmodelxsltpath = basepath + "transformxsls\\Process.xsl";
String xslfilepath = basepath + "transformxsls\\SensorMLToEbRIM.xsl";
String ebrim = TransactionOperation.ParseAndSaveAllTypesProcessMethod(
sensorml, sensormlfilepath, processmodelxsltpath, xslfilepath,
ebrimfilepath, null, null, null, false, username);
if (ebrim.equals("")) {
throw new ServiceException("参数ebrim内容错误,请输入规范文档内容");
}
FileOperationUtil.DeleteFile(sensormlfilepath);
FileOperationUtil.DeleteFile(ebrimfilepath);
return ebrim;
}
}
| [
"kexuetou@163.com"
] | kexuetou@163.com |
6128d46fc0f3009a427f892bd0af576d974d189a | 05116bc6239236b70e7f6ce2e86fbb3d68f84e5a | /app/src/main/java/com/aaufolks/android/retrofit/Network/RetrofitClientInstance.java | 5b23cab98aded231884d733819d6651d4b5173cc | [] | no_license | MichaelAAU/NewsAppMVC | a6b4450c597225c2bbd41e4795a53cc9678c7756 | d79715d3c8cf7ae110aab65c00904e13a6f89a33 | refs/heads/master | 2020-04-12T21:29:28.580272 | 2018-12-21T22:40:06 | 2018-12-21T22:40:06 | 162,763,335 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 862 | java | package com.aaufolks.android.retrofit.Network;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* Created by michalisgratsias on 23/11/18.
*/
public class RetrofitClientInstance { // HTTP-REST Client for Java/Android
private static Retrofit retrofit;
private static final String BASE_URL = "https://newsapi.org";
public static Retrofit getRetrofitInstance() { //uses Builder and Interface to define
if (retrofit == null) { //the URL endpoint for HTTP operations
retrofit = new retrofit2.Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create()) //gson converter
.build(); //for parsing JSON data to Java objects and vise versa
}
return retrofit;
}
}
| [
"michalisgratsias@gmail.com"
] | michalisgratsias@gmail.com |
830039ffff000a2179cb960879c44de499d984c5 | b4ded54eb14f2355e43fdfff461981bd93b71d74 | /src/be/vdab/servlets/PizzasTussenPrijzenServlet.java | ab222b4b4a850514362d17e7bafdb1f55f283269 | [] | no_license | filiphamakers/pizzaluigi | 01d9d5357330c1a1e0113c341e7a8b9f80135b30 | e1dbeeebb5f0a93fc36cd2459334080dc4ea82f0 | refs/heads/master | 2021-07-13T06:07:35.006528 | 2017-10-17T13:18:35 | 2017-10-17T13:18:35 | 105,623,408 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,719 | java | package be.vdab.servlets;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import be.vdab.repositories.PizzaRepository;
import be.vdab.utils.StringUtils;
@WebServlet(urlPatterns = "/pizzas/tussenprijzen.htm")
public class PizzasTussenPrijzenServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
private static final String VIEW = "/WEB-INF/JSP/pizzastussenprijzen.jsp";
private final transient PizzaRepository pizzaRepository = new PizzaRepository();
@Resource(name = PizzaRepository.JNDI_NAME)
void setDataSource(DataSource datasource) {
pizzaRepository.setDataSource(datasource);
}
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
if (request.getQueryString() != null) {
Map<String, String> fouten = new HashMap<>();
String van = request.getParameter("van");
if (!StringUtils.isBigDecimal(van)) {
fouten.put("van", "tik een getal");
}
String tot = request.getParameter("tot");
if (!StringUtils.isBigDecimal(tot)) {
fouten.put("tot", "tik een getal");
}
if (fouten.isEmpty()) {
request.setAttribute("pizzas",
pizzaRepository.findByPrijsBetween(new BigDecimal(van), new BigDecimal(tot)));
} else
request.setAttribute("fouten", fouten);
}
request.getRequestDispatcher(VIEW).forward(request, response);
}
}
| [
"filiphamakers@hotmail.com"
] | filiphamakers@hotmail.com |
358013b7234530f13bd0902cd66875b31ca5c0dd | a8d90f2876fefc0206adbd28a312e4530410361a | /core/src/com/nopalsoft/donttap/handlers/FloatFormatter.java | 51c5dc0ae08f813a57aacb3b5ad9df53459b50c7 | [] | no_license | Yayo-Arellano/libgdx_do_not_tap | d3ca38f1ef07aab23fa248cf6527baba387fdc80 | 13698f849078c6481fb38cfa4a10ba5a1da6fc3d | refs/heads/master | 2023-03-09T10:52:39.078790 | 2021-02-27T01:44:18 | 2021-02-27T01:44:18 | 342,452,677 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 125 | java | package com.nopalsoft.donttap.handlers;
public interface FloatFormatter {
String format(String format, float number);
}
| [
"geramail28@gmail.com"
] | geramail28@gmail.com |
6cb03c747688429a4115acd5476ab6d44c903f5d | 7e4f92e3d05514d949f75c37f471e1c5baef7e03 | /src/main/java/minerapp/classes/UserLogic.java | 708e2ea860d4ee022b200596e7d3b10ed895104f | [] | no_license | Komkim/Miner | a14995ffabb4b19e17e189cf013cf46343cccadf | 0ae4097d3daf146d3636b733087dbd4e6e5e659c | refs/heads/master | 2021-01-17T20:55:49.729746 | 2016-06-03T09:12:57 | 2016-06-03T09:12:57 | 59,950,735 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 969 | java | package main.java.minerapp.classes;
import main.java.minerapp.interfaces.ICell;
//Возможные действия пользователя
public class UserLogic {
private ICell[][] arrCell;
private InteractionMyCanvas interactionMyCanvas;
public UserLogic(ICell[][] arrCell, InteractionMyCanvas interactionMyCanvas) {
this.arrCell = arrCell;
this.interactionMyCanvas = interactionMyCanvas;
}
//открыть клетку
public void openCell(int x, int y) {
if (!arrCell[y][x].isUnknownCell() && !arrCell[y][x].isThinkMine()) {
interactionMyCanvas.resetCheckCell();
interactionMyCanvas.checkZeroCell(x, y);
}
}
//клик правой кнопкой мыши
public void rightClickMouse(int x, int y) {
interactionMyCanvas.rightClickMouse(x, y);
}
public void openDistrict(int x, int y)
{
interactionMyCanvas.openDistrict(x, y);
}
}
| [
"komkim@mail.ru"
] | komkim@mail.ru |
fb93a03112a445af5fe78eaa3d7aac23371ec463 | cd3c994bfa5b8d505d6024517e2c3b4d53011c51 | /app/src/androidTest/java/com/snqng/bluetoothutil/ExampleInstrumentedTest.java | 855b051593a7b1eb8bb18a58623717cd739847f0 | [] | no_license | MarvelSQ/Android-BluetoothUtil | 7109336f7bff3707478b49cf0becff5ee2b16d78 | da7a0ca8f26ec2a8e0b1afd3f4e59d1619e8f85a | refs/heads/master | 2021-01-23T05:09:47.259956 | 2017-03-27T02:25:32 | 2017-03-27T02:25:32 | 86,282,279 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 758 | java | package com.snqng.bluetoothutil;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.snqng.android_bluetoothutil", appContext.getPackageName());
}
}
| [
"sun1993hlj@hotmail.com"
] | sun1993hlj@hotmail.com |
5394f5208bca12b64d6328d26e67088f67c58432 | 7dbe1304706cdaad0faff36d96749542bce82aa4 | /src/main/java/com/agility/ddp/view/web/DdpRuleController.java | 895dff4c11e24f8275f690474e9213115396f471 | [] | no_license | chaitanyaKunda/DDP-view | 6b4effa886bb76efbcdfe2f1cb173bd79b27573e | b147771683b748e6eb5e6845d74259856f4620a5 | refs/heads/master | 2021-04-27T11:45:29.261927 | 2018-02-23T03:10:06 | 2018-02-23T03:10:06 | 122,566,854 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 613 | java | package com.agility.ddp.view.web;
import com.agility.ddp.data.domain.DdpRule;
import org.springframework.roo.addon.web.mvc.controller.json.RooWebJson;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.roo.addon.web.mvc.controller.scaffold.RooWebScaffold;
@Transactional
@RooWebJson(jsonObject = DdpRule.class)
@Controller
@RequestMapping("/ddprules")
@RooWebScaffold(path = "ddprules", formBackingObject = DdpRule.class)
public class DdpRuleController {
}
| [
"Chaitanya@6215"
] | Chaitanya@6215 |
2ba207dc81f8a27d679826d81d996f12f809af27 | 26f21c96ddb28a9776eff5f09882f61125130788 | /meetup-server-dao/src/main/java/com/openteach/meetup/server/dao/MessageDAO.java | 5e2aaa3888c06e21e8d1b6a57178a99f2cf6d16b | [] | no_license | sihai/meetup-server | 1ecdaebaff7a647f55b6e18ff8db71f7233ba7df | 4aaa22738c3a166477ad315434302320d6b76f38 | refs/heads/master | 2020-04-22T22:07:31.843063 | 2013-12-04T09:11:04 | 2013-12-04T09:11:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 703 | java | /**
* galaxy inc.
* meetup server
*/
package com.openteach.meetup.server.dao;
import java.util.List;
import com.openteach.meetup.server.client.entity.Message;
/**
*
* @author sihai
*
*/
public interface MessageDAO {
/**
*
* @param message
*/
void insert(Message message);
/**
*
* @param sender
* @param receiver
* @param currentPage
* @param pageSize
* @return
*/
List<Message> query(String sender, String receiver, int currentPage, int pageSize);
/**
*
* @param sender
* @param receiver
* @return
*/
long count(String sender, String receiver);
/**
*
* @param sender
* @param receiver
*/
void delete(String sender, String receiver);
}
| [
"iac-rq@live.cn"
] | iac-rq@live.cn |
a6d2149e960b2561d6d73f80aeec7203634d1184 | 2ee9b1c4acdf670676c99ae40bce91a198b8998d | /test/maven/src/main/java/com/songshui/util/ResponseUtil.java | 345a2563c820b9bee69300a449ca1fd2a23dd786 | [] | no_license | iversonliang/test | 9a77f85d05fe5d8a04c479523fcdf57bead285c1 | 10237b8273fe6e339687e1326aee13aa06a07916 | refs/heads/master | 2020-04-05T23:24:35.928317 | 2014-02-22T12:18:53 | 2014-02-22T12:18:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,499 | java | package com.songshui.util;
import java.util.Date;
import java.util.Map;
import com.songshui.model.TextMessage;
public class ResponseUtil {
public static String processRequest(Map<String, String> requestMap) {
String respMessage = null;
// xml�������
try {
// Ĭ�Ϸ��ص��ı���Ϣ����
String respContent = "出现错误,修改中";
// = MessageUtil.parseXml(request);
// ���ͷ��ʺţ�open_id��
String fromUserName=requestMap.get("FromUserName");
// �����ʺ�
String toUserName = requestMap.get("ToUserName");
// ��Ϣ����
String msgType = requestMap.get("MsgType");
// �ظ��ı���Ϣ
TextMessage textMessage = new TextMessage();
textMessage.setToUserName(fromUserName);
textMessage.setFromUserName(toUserName);
textMessage.setCreateTime(new Date().getTime());
textMessage.setMsgType(MessageUtil.RESP_MESSAGE_TYPE_TEXT);
textMessage.setFuncFlag(0);
// �ı���Ϣ
if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_TEXT)) {
respContent = "欢迎使用送水业务,买水送帅哥,曾伟龙亲自为你服务";
}
// ͼƬ��Ϣ
else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_IMAGE)) {
respContent = "图片很美,美丽不过我们的曾伟龙";
}
// ����λ����Ϣ
else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_LOCATION)) {
respContent = "地址收到,我们的曾伟龙很快就到";
}
// ������Ϣ
else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_LINK)) {
respContent = "梁超建十分的帅";
}
// ��Ƶ��Ϣ
else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_VOICE)) {
respContent = "语音请联系梁超建";
}
// �¼�����
else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_EVENT)) {
// �¼�����
String eventType = requestMap.get("Event");
// ����
if (eventType.equals(MessageUtil.EVENT_TYPE_SUBSCRIBE)) {
respContent = "亲,谢谢你的关注噢,我们将推出最信业务";
}
// ȡ����
else if (eventType.equals(MessageUtil.EVENT_TYPE_UNSUBSCRIBE)) {
// TODO ȡ���ĺ��û����ղ������ںŷ��͵���Ϣ����˲���Ҫ�ظ���Ϣ
}
// �Զ���˵�����¼�
else if (eventType.equals(MessageUtil.EVENT_TYPE_CLICK)) {
// TODO �Զ���˵�Ȩû�п��ţ��ݲ����������Ϣ
}
}
textMessage.setContent(respContent);
respMessage = MessageUtil.textMessageToXml(textMessage);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return respMessage;
}
}
| [
"fgq@fgq-Compaq-Presario-CQ45-Notebook-PC.(none)"
] | fgq@fgq-Compaq-Presario-CQ45-Notebook-PC.(none) |
3d8d706ce6e1b7ea61cefef2dd3957a73c9b8c80 | 034ca30a160f6a2607bdf4e613860bf2e735e8b1 | /src/main/java/ua/epam/spring/hometask/controller/rest/TicketRestController.java | d8941d4f0c6cc7f7a0d3bbfa631a731dd6fac49a | [] | no_license | Mellifaro/movie-theatre | 295aa7326df40345c129497f8d4fcb975cde6789 | 7be969694e457483d08fcc21a4ca3479b05e49a1 | refs/heads/master | 2020-03-08T04:22:28.165036 | 2018-05-16T14:49:40 | 2018-05-16T14:49:40 | 127,919,262 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,322 | java | package ua.epam.spring.hometask.controller.rest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import ua.epam.spring.hometask.domain.Ticket;
import ua.epam.spring.hometask.dto.TicketDTO;
import ua.epam.spring.hometask.service.ticket.TicketConverter;
import ua.epam.spring.hometask.service.user.UserService;
import java.util.Set;
@RestController
@RequestMapping(value = "/rest/tickets")
public class TicketRestController {
private UserService userService;
private TicketConverter ticketConverter;
@Autowired
public TicketRestController(UserService userService, TicketConverter ticketConverter) {
this.userService = userService;
this.ticketConverter = ticketConverter;
}
@GetMapping(value = "/{userId}", produces = MediaType.APPLICATION_PDF_VALUE)
public Set<TicketDTO> getAllTicketsForUser(@PathVariable("userId") Long userId){
Set<Ticket> tickets = userService.getById(userId).getTickets();
return ticketConverter.getSetOfTicketDTO(tickets);
}
}
| [
"viktor_skapoushchenko@epam.com"
] | viktor_skapoushchenko@epam.com |
228938b0e94dc6505c64319b24d4779da78dcb28 | 3d9922556ed3c1a18bd6ebfbcc56bc32f306fc8c | /src/com/dsalgo/recursion/PatternOfStar.java | ea6378a539b691a8a281644f5e1fd5cfef2ce1dd | [] | no_license | frontend-frameworkk/algorithms | a88e3e17bfdad8f29a803905cba6472680eb2629 | e55b728f91d0bc20b13c0501e08b5aa6147b7330 | refs/heads/master | 2022-12-10T16:20:41.351972 | 2020-07-17T23:00:49 | 2020-07-17T23:00:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 512 | java | package com.dsalgo.recursion;
public class PatternOfStar {
private int count = 0;
public static void main(String[] args) {
PatternOfStar paOfS = new PatternOfStar();
int countOfStars = 5;
paOfS.setCount(countOfStars);
paOfS.starPattern(countOfStars);
}
private void setCount(int count) {
this.count = count;
}
private void starPattern(int n) {
if(n<=0) {
count = count -1;
return;
}
System.out.print("*");
starPattern(n-1);
System.out.println();
starPattern(count);
}
}
| [
"lakshmiangular45@gmail.com"
] | lakshmiangular45@gmail.com |
aab3b9526241b0c3962429154a8f4ef35407d3ea | 03ce520a8deecefbe03051a2905a99ce8ad42350 | /Cantool/Cantool/app/src/main/java/com/example/administrator/canol/parse/ReverseParse.java | 1b725752559cb93207e7de0ed455c3d6014a3379 | [] | no_license | 3013218123/MSE_Project1 | f81b1c3292a5394d848a986f3b67fce914e23732 | 28e0fccb090cc835d93e939a27a7318185eac15f | refs/heads/master | 2021-07-24T22:43:36.640513 | 2017-11-06T07:55:30 | 2017-11-06T07:55:30 | 104,619,049 | 0 | 1 | null | 2017-10-09T16:22:17 | 2017-09-24T04:37:26 | null | UTF-8 | Java | false | false | 6,287 | java | package com.example.administrator.canol.parse;
import android.util.Log;
import java.util.ArrayList;
import java.util.Iterator;
import com.example.administrator.canol.dataRead.SGRead;
import com.example.administrator.canol.entity.Signal;
/**
* Created by wenhao on 2017/10/18.
*/
//王而川发送信息函数,
public class ReverseParse {
public static String reverseParse(String BO_id,double[] userInputPhy,String fileName){
ArrayList<Signal> Signals= SGRead.readSG(BO_id,fileName);
int index=0;
//初始化一个全0的data数组,用来保存数据
String data[] = new String [] {"00000000","00000000","00000000","00000000",
"00000000","00000000","00000000","00000000"};
//全局最大行数
int maxRow=0;
for(Iterator it = Signals.iterator(); it.hasNext(); )
{
//声明一个临时最大行数,找使用的最大行
int tempMaxRow=0;
Signal signal= (Signal) it.next();
//填充数据矩阵,从而得到DD
//1.计算信号量x,int型,x2表示2进制信号量
int x=(int)((userInputPhy[index]-signal.getB())/signal.getA());
String x2=Integer.toBinaryString(x);
int m=signal.getDataLength()-x2.length();
for(int i=0;i<m;i++) {//补足位数
x2="0"+x2;
}
int startRow=signal.getStartBit()/8;
int startColumn=signal.getStartBit()%8;
String strRight="",strLeft="";
if(signal.getArrangeType().equals("1+")) {//intel型
int emptyBit=8-startColumn;
if(startColumn>0) strRight=data[startRow].substring(8-startColumn,8);
if(emptyBit>=signal.getDataLength()) { //只需要在该行显示
if(emptyBit>signal.getDataLength()) strLeft=data[startRow].substring(0, emptyBit-signal.getDataLength());
x2=strLeft+x2+strRight;
data[startRow]=x2;
tempMaxRow=startRow;
}else{
int row=(signal.getDataLength()-emptyBit)/8;//剩余行数
int c=(signal.getDataLength()-emptyBit)%8;//最后一行的个数
tempMaxRow=startRow+row;
//if(startColumn>0) strRight=data[startRow].substring(8-startColumn,8);
data[startRow]=x2.substring(x2.length()-emptyBit, x2.length())+strRight;
x2=x2.substring(0,x2.length()-emptyBit);
for(int i=1;i<=row;i++) {
data[startRow+i]=x2.substring(x2.length()-8, x2.length());
x2=x2.substring(0,x2.length()-8);
}
if(c!=0) {
data[startRow+row+1]=data[startRow+row+1].substring(0, 8-c)+x2;
tempMaxRow++;
}
}
}else if(signal.getArrangeType().equals("0+")) {//motorola型
int emptyBit=startColumn+1;
strLeft=data[startRow].substring(0,8-emptyBit);
if(emptyBit>=signal.getDataLength()) { //只需要在该行显示
if(emptyBit>signal.getDataLength()) strRight=data[startRow].substring(7-startColumn+signal.getDataLength(), 8);
x2=strLeft+x2+strRight;
data[startRow]=x2;
tempMaxRow=startRow;
}else{
int row=(signal.getDataLength()-emptyBit)/8;//剩余行数
int c=(signal.getDataLength()-emptyBit)%8;//最后一行的个数
tempMaxRow=startRow+row;
data[startRow]=strLeft+x2.substring(0, emptyBit);
x2=x2.substring(emptyBit,x2.length());
for(int i=1;i<=row;i++) {
data[startRow+i]=x2.substring(0, 8);
x2=x2.substring(8,x2.length());
}
if(c!=0) {
data[startRow+row+1]=x2+data[startRow+row+1].substring(c, 8);
tempMaxRow++;
}
}
}
if(tempMaxRow>maxRow) maxRow=tempMaxRow;
index++;
}
//需要知道使用了前多少字节,如果小于8,后面的字节不要了
//使用了0-maxRow行
String DD="";
int numDD=maxRow+1;
for(int j=0;j<numDD;j++) {
DD=DD+binaryString2hexString(data[j]);
}
Log.i("tag",DD);
String T_type="t";
String id="";
if(Long.parseLong(BO_id)>Integer.MAX_VALUE) {
T_type="T";
id=""+decimalToHex(Long.parseLong(BO_id));
}else{
id=""+decimalToHex(Integer.parseInt(BO_id));
while(id.length()<3){
id="0"+id;
}
}
//这里需要进行转换
//T_type的判断也需要重写
String str=T_type+id+numDD+DD;
return str;
}
public static String binaryString2hexString(String bString)
{
while(bString.length()%8!=0) {
bString="0"+bString;
}
if (bString == null || bString.equals("") || bString.length() % 8 != 0)
return null;
StringBuffer tmp = new StringBuffer();
int iTmp = 0;
for (int i = 0; i < bString.length(); i += 4)
{
iTmp = 0;
for (int j = 0; j < 4; j++)
{
iTmp += Integer.parseInt(bString.substring(i + j, i + j + 1)) << (4 - j - 1);
}
tmp.append(decimalToHex(iTmp));
}
return tmp.toString();
}
public static String decimalToHex(long decimal) {
String hex = "";
while(decimal != 0) {
long hexValue = decimal % 16;
hex = toHexChar(hexValue) + hex;
decimal = decimal / 16;
}
return hex;
}
//将0~15的十进制数转换成0~F的十六进制数
public static char toHexChar(long hexValue) {
if(hexValue <= 9 && hexValue >= 0)
return (char)(hexValue + '0');
else
return (char)(hexValue - 10 + 'A');
}
}
| [
"Gkllmon@163.com"
] | Gkllmon@163.com |
70bdb904ded6e3cdb298d8f602c4c4698525922d | 55ea7adc31eb36b9a4dc1fa39c2aa0ce922dd210 | /micromanager2/plugins/Magellan/src/org/micromanager/plugins/magellan/coordinates/AffineUtils.java | 10abc785b9a5647351b4b322ac6ce49b4d3efff5 | [] | no_license | skn123/micromanager2 | 85aa30a46b5d900ffb6bf95b3716738caba28fe2 | 1f5b7effee26aa9e039d4e3dd511cd20c7042fce | refs/heads/master | 2021-01-21T05:00:59.054267 | 2016-07-22T04:22:25 | 2016-07-22T04:22:25 | 31,940,844 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,696 | java | ///////////////////////////////////////////////////////////////////////////////
// AUTHOR: Henry Pinkard, henry.pinkard@gmail.com
//
// COPYRIGHT: University of California, San Francisco, 2015
//
// LICENSE: This file is distributed under the BSD license.
// License text is included with the source distribution.
//
// This file is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES.
//
package org.micromanager.plugins.magellan.coordinates;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.awt.geom.AffineTransform;
import java.util.TreeMap;
import java.util.prefs.Preferences;
import org.micromanager.plugins.magellan.misc.JavaUtils;
import org.micromanager.MMStudio;
import org.micromanager.plugins.magellan.main.Magellan;
import org.micromanager.plugins.magellan.misc.GlobalSettings;
public class AffineUtils {
private static TreeMap<String, AffineTransform> affineTransforms_ = new TreeMap<String, AffineTransform>();
public static String transformToString(AffineTransform transform) {
double[] matrix = new double[4];
transform.getMatrix(matrix);
return matrix[0] + "_" + matrix[1] + "_" + matrix[2] + "_" + matrix[3];
}
public static AffineTransform stringToTransform(String s) {
double[] mat = new double[4];
String[] vals = s.split("_");
for (int i = 0; i < 4; i++) {
mat[i] = Double.parseDouble(vals[i]);
}
return new AffineTransform(mat);
}
//called when an affine transform is updated
public static void transformUpdated(String pixelSizeConfig, AffineTransform transform) {
if (transform != null) {
affineTransforms_.put(pixelSizeConfig, transform);
}
}
//Only read from preferences one time, so that an inordinate amount of time isn't spent in native system calls
public static AffineTransform getAffineTransform(String pixelSizeConfig, double xCenter, double yCenter) {
AffineTransform transform = null;
if (affineTransforms_.containsKey(pixelSizeConfig)) {
transform = affineTransforms_.get(pixelSizeConfig);
//copy transform so multiple referneces with different translations cause problems
double[] newMat = new double[6];
transform.getMatrix(newMat);
transform = new AffineTransform(newMat);
} else {
//Get affine transform from prefs
Preferences prefs = Preferences.userNodeForPackage(MMStudio.class);
transform = GlobalSettings.getObjectFromPrefs(prefs, "affine_transform_" + pixelSizeConfig, (AffineTransform) null);
//create transform
if (transform == null) {
return null;
}
affineTransforms_.put(pixelSizeConfig, transform);
}
//set map origin to current stage position
double[] matrix = new double[6];
transform.getMatrix(matrix);
matrix[4] = xCenter;
matrix[5] = yCenter;
return new AffineTransform(matrix);
}
public static void storeAffineTransform(String pixelSizeConfig, AffineTransform transform) {
Preferences prefs = Preferences.userNodeForPackage(MMStudio.class);
GlobalSettings.putObjectInPrefs(prefs, "affine_transform_" +
pixelSizeConfig, transform);
}
}
| [
"skn123@gmail.com"
] | skn123@gmail.com |
ee360f3e65f2cfae2fce4f1ce23cc7cbfae886c6 | a2eee2a87ad068494321bcdab1c5bb8b6d587380 | /src/main/java/mrjake/aunis/tileentity/StargateMemberTile.java | feff3e9f9db376b73b48db9b179258b35328bfcb | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | x26nexus/AUNIS | 90c912d68b642e23ace8ba6f8af6893f4d7e7010 | 5712e514e08cb662a4b054237451f98f5d8c7d6d | refs/heads/master | 2020-08-12T06:14:48.912558 | 2019-09-28T14:13:13 | 2019-09-28T14:13:13 | 214,704,824 | 0 | 1 | NOASSERTION | 2019-10-12T19:39:12 | 2019-10-12T19:39:11 | null | UTF-8 | Java | false | false | 7,055 | java | package mrjake.aunis.tileentity;
import mrjake.aunis.Aunis;
import mrjake.aunis.AunisProps;
import mrjake.aunis.packet.AunisPacketHandler;
import mrjake.aunis.packet.state.StateUpdatePacketToClient;
import mrjake.aunis.packet.state.StateUpdateRequestToServer;
import mrjake.aunis.stargate.EnumMemberVariant;
import mrjake.aunis.state.CamoState;
import mrjake.aunis.state.EnumStateType;
import mrjake.aunis.state.ITileEntityStateProvider;
import mrjake.aunis.state.LightState;
import mrjake.aunis.state.State;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSlab;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ITickable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.items.ItemStackHandler;
/**
* TileEntity for ring blocks and chevron blocks
*
* Holds the camouflage block in {@link ItemStackHandler}, providing it into {@link Block#getExtendedState()}
*
* @author MrJake
*/
public class StargateMemberTile extends TileEntity implements ITickable, ITileEntityStateProvider {
boolean firstTick = true;
private boolean waitForClear = false;
private long clearWaitStarted;
@Override
public void update() {
if (firstTick) {
firstTick = false;
if (world.isRemote) {
AunisPacketHandler.INSTANCE.sendToServer(new StateUpdateRequestToServer(pos, Aunis.proxy.getPlayerClientSide(), EnumStateType.CAMO_STATE));
AunisPacketHandler.INSTANCE.sendToServer(new StateUpdateRequestToServer(pos, Aunis.proxy.getPlayerClientSide(), EnumStateType.LIGHT_STATE));
}
}
if (!world.isRemote) {
if (waitForClear) {
if (world.getTotalWorldTime() - clearWaitStarted >= 40) {
waitForClear = false;
syncLightUp();
}
}
}
}
// ---------------------------------------------------------------------------------
/**
* Is chevron block emitting light
*/
private boolean isLitUp;
public void syncLightUp() {
TargetPoint point = new TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 512);
AunisPacketHandler.INSTANCE.sendToAllTracking(new StateUpdatePacketToClient(pos, EnumStateType.LIGHT_STATE, getState(EnumStateType.LIGHT_STATE)), point);
}
public void setLitUp(boolean isLitUp) {
this.isLitUp = isLitUp;
if (isLitUp)
syncLightUp();
else {
clearWaitStarted = world.getTotalWorldTime();
waitForClear = true;
}
// world.notifyLightSet(pos);
// world.setBlockState(pos, world.getBlockState(pos).withProperty(AunisProps.LIT_UP, isLitUp), 3);
markDirty();
}
public boolean isLitUp(IBlockState state) {
return state.getValue(AunisProps.MEMBER_VARIANT) == EnumMemberVariant.CHEVRON && isLitUp;
}
// ---------------------------------------------------------------------------------
private IBlockState camoBlockState;
public void setCamoState(IBlockState doubleSlabState) {
this.camoBlockState = doubleSlabState;
markDirty();
}
public IBlockState getCamoState() {
return camoBlockState;
}
public ItemStack getCamoItemStack() {
if (camoBlockState != null) {
Block block = camoBlockState.getBlock();
int quantity = 1;
int meta;
if (block instanceof BlockSlab && ((BlockSlab) block).isDouble()) {
quantity = 2;
meta = block.getMetaFromState(camoBlockState);
if (block == Blocks.DOUBLE_STONE_SLAB)
block = Blocks.STONE_SLAB;
else if (block == Blocks.DOUBLE_STONE_SLAB2)
block = Blocks.STONE_SLAB2;
else if (block == Blocks.DOUBLE_WOODEN_SLAB)
block = Blocks.WOODEN_SLAB;
else if (block == Blocks.PURPUR_DOUBLE_SLAB)
block = Blocks.PURPUR_SLAB;
}
else {
meta = block.getMetaFromState(camoBlockState);
}
return new ItemStack(block, quantity, meta);
}
else {
return null;
}
}
// ---------------------------------------------------------------------------------
private BlockPos basePos;
public boolean isMerged() {
return basePos != null;
}
public BlockPos getBasePos() {
return basePos;
}
public StargateBaseTile getBaseTile(World world) {
if (basePos != null)
return (StargateBaseTile) world.getTileEntity(basePos);
return null;
}
public void setBasePos(BlockPos basePos) {
this.basePos = basePos;
markDirty();
}
// ---------------------------------------------------------------------------------
// NBT
@Override
public NBTTagCompound writeToNBT(NBTTagCompound compound) {
compound.setBoolean("isLitUp", isLitUp);
if (basePos != null)
compound.setLong("basePos", basePos.toLong());
if (camoBlockState != null) {
compound.setString("doubleSlabBlock", camoBlockState.getBlock().getRegistryName().toString());
compound.setInteger("doubleSlabMeta", camoBlockState.getBlock().getMetaFromState(camoBlockState));
}
return super.writeToNBT(compound);
}
@SuppressWarnings("deprecation")
@Override
public void readFromNBT(NBTTagCompound compound) {
isLitUp = compound.getBoolean("isLitUp");
if (compound.hasKey("basePos"))
basePos = BlockPos.fromLong(compound.getLong("basePos"));
if (compound.hasKey("doubleSlabBlock")) {
Block dblSlabBlock = Block.getBlockFromName(compound.getString("doubleSlabBlock"));
camoBlockState = dblSlabBlock.getStateFromMeta(compound.getInteger("doubleSlabMeta"));
}
super.readFromNBT(compound);
}
// ---------------------------------------------------------------------------------
// States
@Override
public State getState(EnumStateType stateType) {
switch (stateType) {
case CAMO_STATE:
return new CamoState(camoBlockState);
case LIGHT_STATE:
return new LightState(isLitUp);
default:
return null;
}
}
@Override
public State createState(EnumStateType stateType) {
switch (stateType) {
case CAMO_STATE:
return new CamoState();
case LIGHT_STATE:
return new LightState();
default:
return null;
}
}
@Override
@SideOnly(Side.CLIENT)
public void setState(EnumStateType stateType, State state) {
switch (stateType) {
case CAMO_STATE:
CamoState memberState = (CamoState) state;
camoBlockState = memberState.getState();
world.markBlockRangeForRenderUpdate(pos, pos);
break;
case LIGHT_STATE:
isLitUp = ((LightState) state).isLitUp();
world.notifyLightSet(pos);
world.checkLightFor(EnumSkyBlock.BLOCK, pos);
break;
default:
break;
}
}
@Override
public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) {
return oldState.getBlock() != newState.getBlock();
}
}
| [
"norbertzpilicy@gmail.com"
] | norbertzpilicy@gmail.com |
1c2d1f183dc007d2c6b64a5bfe98614cd462f006 | 0756e9bbc386aa802d8141fb9e7a77e005378399 | /src/ProblemsIn_Java/Uva/BlowingFuses.java | 338ed26872e5d0580facf5ad69ae7744478d85dc | [] | no_license | dayepesb/OnlineJudges | 85eae4de8a5c6c74cd7419bc314410b478dcbb6b | 0069c8aa644e6952348b7bf903ddd50f19b4e8e7 | refs/heads/master | 2021-07-15T06:49:35.228759 | 2020-05-10T07:33:46 | 2020-05-10T07:33:46 | 133,302,544 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,442 | java | package ProblemsIn_Java.Uva;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class BlowingFuses {
public static void main(String[] args) throws IOException {
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
long caso=1;
while(true){
StringTokenizer st=new StringTokenizer(in.readLine());
int n=Integer.parseInt(st.nextToken());
long m=Long.parseLong(st.nextToken());
long c=Long.parseLong(st.nextToken());
if(n==0&&m==0&&c==0)
break;
long act=0,max=0;
boolean[]vis=new boolean[n];
long[]arr=new long[n];
for (int i = 0; i < arr.length; i++)
arr[i]=Long.parseLong(in.readLine().trim());
boolean estallado=false;
for (long i = 0; i < m; i++) {
int a=Integer.parseInt(in.readLine().trim())-1;
if(vis[a]){
vis[a]=false;
act-=arr[a];
}else{
vis[a]=true;
act+=arr[a];
max=Math.max(max, act);
if(max>c){
estallado=true;
}
}
}
out.println("Sequence "+caso);
if(estallado){
out.println("Fuse was blown.");
}else{
out.println("Fuse was not blown.");
out.println("Maximal power consumption was "+max+" amperes.");
}
out.println();
caso++;
}
out.close();
}
} | [
"lion17-07@hotmail.com"
] | lion17-07@hotmail.com |
3c486a8c0583ba1c60106ff1678d366d1d047acd | 795d498129996dc85eeb6a9c02aeaccbc7f15b4b | /app/src/test/java/com/example/lihan/day_01_oschina/ExampleUnitTest.java | 2a9f377efc35defa59fd09b764a2a1bb2b14dd7e | [] | no_license | lihan1121/Day_01_OSChina | 107f58ff16fcc4c987b8cc24d67eff6e8657d0af | 7113671fc06236ec513666bf973a17a9f7e587a1 | refs/heads/master | 2020-12-02T07:53:55.870657 | 2017-07-10T12:07:32 | 2017-07-10T12:07:32 | 96,744,524 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 410 | java | package com.example.lihan.day_01_oschina;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"文化人"
] | 文化人 |
6a62c17b7dd253671667130cc783004a81580627 | f082156cc2d106a2c50f582159e0f3018298ee63 | /src/main/java/com/heymoose/domain/accounting/WithdrawalPayment.java | 90605acff688c7c40d0899a5f6a951f8838cec08 | [] | no_license | kshilov/restapi | 3cb3046db1e7f8e2d208acacd5238c577faf7026 | 1366f046eeb2521990d5913ef9933f494eb1a986 | refs/heads/master | 2021-01-10T07:59:52.237252 | 2012-12-10T10:56:39 | 2012-12-10T10:56:39 | 1,982,661 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,388 | java | package com.heymoose.domain.accounting;
import com.heymoose.domain.base.BaseEntity;
import org.joda.time.DateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.math.BigDecimal;
@Entity
@Table(name = "withdrawal_payment")
public final class WithdrawalPayment extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "withdrawal-payment-seq")
@SequenceGenerator(name = "withdrawal-payment-seq", sequenceName = "withdrawal_payment_seq", allocationSize = 1)
private Long id;
@Column(name = "withdrawal_id", nullable = false)
private Long withdrawalId;
@Column(nullable = false)
private BigDecimal amount;
@Override
public Long id() {
return id;
}
public Long withdrawalId() {
return withdrawalId;
}
public BigDecimal amount() {
return amount;
}
public WithdrawalPayment setWithdrawalId(Long withdrawalId) {
this.withdrawalId = withdrawalId;
return this;
}
public WithdrawalPayment setAmount(BigDecimal amount) {
this.amount = amount;
return this;
}
public WithdrawalPayment setCreationTime(DateTime date) {
this.creationTime = date;
return this;
}
}
| [
"filipovskii.off@gmail.com"
] | filipovskii.off@gmail.com |
0b9854784da8b1147ca27483790b1c55136f531b | 568c9ae3c18181caf11e33754f109f9fcbcf913b | /MultipleScreens/src/com/hys/multiplescreens/TitleFragment.java | b911e44ab61d13b2369ce6dd5179ebed74c99142 | [] | no_license | hysheng/android | 5a96617a4cecb3057e598baa6c7869dfaa385192 | 465397e5a76261248fba32af147827483aa54737 | refs/heads/master | 2021-01-11T08:48:29.999635 | 2016-12-18T03:09:08 | 2016-12-18T03:09:08 | 76,727,705 | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 1,133 | java | package com.hys.multiplescreens;
import java.util.ArrayList;
import java.util.List;
import android.app.ListFragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
public class TitleFragment extends ListFragment {
private ArrayAdapter<String> adapter;
public List<String> getData() {
List<String> list = new ArrayList<String>();
for (int i = 1; i < 16; i++) {
list.add("µÚ" + i + "ÕÂ");
}
return list;
}
@Override
public void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
adapter = new ArrayAdapter<String>(getActivity(),
android.R.layout.simple_list_item_1, getData());
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// TODO Auto-generated method stub
setListAdapter(adapter);
return super.onCreateView(inflater, container, savedInstanceState);
}
@Override
public void onPause() {
// TODO Auto-generated method stub
super.onPause();
}
}
| [
"hys0529hugh@163.com"
] | hys0529hugh@163.com |
1ac6e799e9a7df0459a0e3675888f39d0eb5fdc6 | 76ee23e816f4262715a68de417e3d9fb48590453 | /EqualSumChecker/src/com/rsupak/Main.java | 6e6784f87d0c674078a7bf439b1dcd0fecb75361 | [] | no_license | rsupak/JavaMasterClass | ca0c6f9c4a088d4708e5e51d455d7b9ada32ac97 | 29cb2db30f460af237a253746a7d7ea2a1021d2a | refs/heads/master | 2022-12-22T19:49:50.942603 | 2020-10-03T00:41:43 | 2020-10-03T00:41:43 | 297,677,770 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 158 | java | package com.rsupak;
public class Main {
public static void main(String[] args) {
System.out.println(EqualSumChecker.hasEqualSum(1,1,2));
}
}
| [
"richard.supak@icloud.com"
] | richard.supak@icloud.com |
62b7d03d5b08988c265fc9c5c31638156a13182f | 6f2db02b4f36cd127feae15f9c31e889a7e8f125 | /TechizantClientSearch/src/main/java/com/iiht/model/SearchTrainers.java | bd263c09fa53ddc60953acc0866603d7da370ec1 | [] | no_license | vrushali7/techizants-spring | d9f75cb2365a619dd259fdbd1ec4f90b76c4dcd4 | d48761e1c7358ce8536b1742f11d4f0f82a721f5 | refs/heads/master | 2022-12-05T20:41:29.957257 | 2019-10-11T05:53:10 | 2019-10-11T05:53:10 | 214,354,560 | 0 | 0 | null | 2022-11-24T07:19:41 | 2019-10-11T05:55:50 | Java | UTF-8 | Java | false | false | 2,996 | java | package com.iiht.model;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "search")
public class SearchTrainers {
@Id
private Long id;
private Long mentor_id;
private String mentor_name;
private float mentor_rating;
private int technology_id;
private String technologyname;
private String toc;
private String prerequisites;
private int fees;
private String startTime;
private String endTime;
private String availFrom;
private String availTill;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getMentor_id() {
return mentor_id;
}
public void setMentor_id(Long mentor_id) {
this.mentor_id = mentor_id;
}
public String getMentor_name() {
return mentor_name;
}
public void setMentor_name(String mentor_name) {
this.mentor_name = mentor_name;
}
public float getMentor_rating() {
return mentor_rating;
}
public void setMentor_rating(float mentor_rating) {
this.mentor_rating = mentor_rating;
}
public int getTechnology_id() {
return technology_id;
}
public void setTechnology_id(int technology_id) {
this.technology_id = technology_id;
}
public String getTechnologyname() {
return technologyname;
}
public void setTechnologyname(String technologyname) {
this.technologyname = technologyname;
}
public String getToc() {
return toc;
}
public void setToc(String toc) {
this.toc = toc;
}
public String getPrerequisites() {
return prerequisites;
}
public void setPrerequisites(String prerequisites) {
this.prerequisites = prerequisites;
}
public int getFees() {
return fees;
}
public void setFees(int fees) {
this.fees = fees;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getAvailFrom() {
return availFrom;
}
public void setAvailFrom(String availFrom) {
this.availFrom = availFrom;
}
public String getAvailTill() {
return availTill;
}
public void setAvailTill(String availTill) {
this.availTill = availTill;
}
public SearchTrainers(Long id, Long mentor_id, String mentor_name, float mentor_rating, int technology_id,
String technologyname, String toc, String prerequisites, int fees, String startTime, String endTime,
String availFrom, String availTill) {
super();
this.id=id;
this.mentor_id = mentor_id;
this.mentor_name = mentor_name;
this.mentor_rating = mentor_rating;
this.technology_id = technology_id;
this.technologyname = technologyname;
this.toc = toc;
this.prerequisites = prerequisites;
this.fees = fees;
this.startTime = startTime;
this.endTime = endTime;
this.availFrom = availFrom;
this.availTill = availTill;
}
public SearchTrainers() {
super();
// TODO Auto-generated constructor stub
}
}
| [
"cogvilt39@iiht.tech"
] | cogvilt39@iiht.tech |
5eeab065c740e71ba465762dd296e56a2f3e5620 | 080b46b7f11799f602c011fe6189fc73fb2322d8 | /Non_yorpg/src/nl/max/non_yorpg/stages/GameStage.java | eb3ed779eccb416a4e52efca4e4d40293275b665 | [] | no_license | Paardustaart/Non_Yorpg | 7465797297a537bf110ed9d582648089625a1bbc | aa76143d3ee686034f573410700699cb11ab5dff | refs/heads/master | 2016-08-12T15:05:51.350374 | 2015-06-02T07:33:53 | 2015-06-02T07:33:53 | 36,574,803 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 123 | java | package nl.max.non_yorpg.stages;
import com.badlogic.gdx.scenes.scene2d.Stage;
public class GameStage extends Stage {
}
| [
"Rooler1893@hotmail.com"
] | Rooler1893@hotmail.com |
e0f3215dba314babd89d6e9956761d7968431562 | 29bf5a32323ee0ad50fc3ea729b5e2867853ab28 | /app/src/main/java/com/garrar/user/app/ui/activity/splash/SplashIPresenter.java | f7a7fbfea4cf2faa264f6c928f19c8d5e136465c | [] | no_license | infitac/Garrar-Android-User | 94878da1c76da43a3981ee24a84cd38beab7fe08 | 9650192d0ad9de7bc191004b7c54c5030df5e69f | refs/heads/main | 2023-02-21T19:51:49.580302 | 2021-01-27T10:19:00 | 2021-01-27T10:19:00 | 333,373,863 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 304 | java | package com.garrar.user.app.ui.activity.splash;
import com.garrar.user.app.base.MvpPresenter;
import java.util.HashMap;
public interface SplashIPresenter<V extends SplashIView> extends MvpPresenter<V> {
void services();
void profile();
void checkVersion(HashMap<String, Object> map);
}
| [
"asterisminfosoft@gmail.com"
] | asterisminfosoft@gmail.com |
c882128fe9b5f8a930950318cc53c38e536023d8 | 23b6d6971a66cf057d1846e3b9523f2ad4e05f61 | /MLMN-Statistics/src/vn/com/vhc/vmsc2/statistics/dao/MnHBscSdcchQosDAOImpl.java | 6e6e2928cbc0cf1787322c7a7942e53827fb2bb2 | [] | no_license | vhctrungnq/mlmn | 943f5a44f24625cfac0edc06a0d1b114f808dfb8 | d3ba1f6eebe2e38cdc8053f470f0b99931085629 | refs/heads/master | 2020-03-22T13:48:30.767393 | 2018-07-08T05:14:12 | 2018-07-08T05:14:12 | 140,132,808 | 0 | 1 | null | 2018-07-08T05:29:27 | 2018-07-08T02:57:06 | Java | UTF-8 | Java | false | false | 3,375 | java | package vn.com.vhc.vmsc2.statistics.dao;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import vn.com.vhc.vmsc2.statistics.domain.MnHBscSdcchQos;
public class MnHBscSdcchQosDAOImpl extends SqlMapClientDaoSupport implements MnHBscSdcchQosDAO {
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table MN_H_BSC_SDCCH_QOS
*
* @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010
*/
public MnHBscSdcchQosDAOImpl() {
super();
}
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table MN_H_BSC_SDCCH_QOS
*
* @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010
*/
public int deleteByPrimaryKey(String bscid, Integer month, Integer year) {
MnHBscSdcchQos key = new MnHBscSdcchQos();
key.setBscid(bscid);
key.setMonth(month);
key.setYear(year);
int rows = getSqlMapClientTemplate().delete("MN_H_BSC_SDCCH_QOS.ibatorgenerated_deleteByPrimaryKey", key);
return rows;
}
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table MN_H_BSC_SDCCH_QOS
*
* @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010
*/
public void insert(MnHBscSdcchQos record) {
getSqlMapClientTemplate().insert("MN_H_BSC_SDCCH_QOS.ibatorgenerated_insert", record);
}
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table MN_H_BSC_SDCCH_QOS
*
* @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010
*/
public void insertSelective(MnHBscSdcchQos record) {
getSqlMapClientTemplate().insert("MN_H_BSC_SDCCH_QOS.ibatorgenerated_insertSelective", record);
}
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table MN_H_BSC_SDCCH_QOS
*
* @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010
*/
public MnHBscSdcchQos selectByPrimaryKey(String bscid, Integer month, Integer year) {
MnHBscSdcchQos key = new MnHBscSdcchQos();
key.setBscid(bscid);
key.setMonth(month);
key.setYear(year);
MnHBscSdcchQos record = (MnHBscSdcchQos) getSqlMapClientTemplate().queryForObject("MN_H_BSC_SDCCH_QOS.ibatorgenerated_selectByPrimaryKey", key);
return record;
}
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table MN_H_BSC_SDCCH_QOS
*
* @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010
*/
public int updateByPrimaryKeySelective(MnHBscSdcchQos record) {
int rows = getSqlMapClientTemplate().update("MN_H_BSC_SDCCH_QOS.ibatorgenerated_updateByPrimaryKeySelective", record);
return rows;
}
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table MN_H_BSC_SDCCH_QOS
*
* @ibatorgenerated Wed Nov 10 10:03:01 ICT 2010
*/
public int updateByPrimaryKey(MnHBscSdcchQos record) {
int rows = getSqlMapClientTemplate().update("MN_H_BSC_SDCCH_QOS.ibatorgenerated_updateByPrimaryKey", record);
return rows;
}
} | [
"trungnq@vhc.com.vn"
] | trungnq@vhc.com.vn |
eacd4d86b01045f10e0388d2d4ba4718a9a9fc07 | 315d215b4ef661c3335982bfa6871947a5150cc3 | /src/test/java/basicTests/PostTest.java | 664e1a5e004da55515b3561a35766d0af3bbbb61 | [] | no_license | shubhi011/Rest-Assured | c409b01af3fe7a7e0862103b6e9a26dbee05533b | 7ad30d1eb5f4c119fcea05d8b49426a61c2dda42 | refs/heads/master | 2023-08-03T12:36:28.911915 | 2020-02-04T12:44:43 | 2020-02-04T12:44:43 | 238,198,912 | 0 | 0 | null | 2023-07-23T04:35:46 | 2020-02-04T12:19:11 | HTML | UTF-8 | Java | false | false | 1,074 | java | package basicTests;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.equalTo;
import org.testng.annotations.Test;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
public class PostTest {
//Google Maps Add Api
//This test is to add a place
@Test
public void test1()
{
//http://216.10.245.166/maps/api/place/add/json?key= qaclick123
RestAssured.baseURI="http://216.10.245.166";
given().
queryParam("key","qaclick123").
body("{"+
"\"location\": {"+
"\"lat\": -33.8669710,"+
"\"lng\": 151.1958750"+
"},"+
"\"accuracy\": 50,"+
"\"name\": \"Google Shoes!\","+
"\"phone_number\": \"(02) 9374 4000\","+
"\"address\": \"48 Pirrama Road, Pyrmont, NSW 2009, Australia\","+
"\"types\": [\"shoe_store\"],"+
"\"website\": \"http://www.google.com.au/\","+
"\"language\": \"en-AU\""+
"}").
when().
post("/maps/api/place/add/json").
then().assertThat().statusCode(200).and().contentType(ContentType.JSON).and().
body("status",equalTo("OK"));
}
}
| [
"ssrivastava6937@altimetrik.com"
] | ssrivastava6937@altimetrik.com |
fbb17d0c6c4b4c3a7a6c6b35ce47f0964b211922 | 32be24df62aa66834bd75fc9e86b25937b728e02 | /src/view/cell/CellHistory.java | 03a3c7910572b79e838a0a75244e165f2be9e958 | [] | no_license | TCT2001/DictionaryMain1 | b77bb105b7aa90bed8d031cb6f8daa3d0a3ab272 | 54256fdc53c86a7e56966b7281895621fe41a30d | refs/heads/master | 2023-01-01T08:13:26.057360 | 2020-10-14T13:57:43 | 2020-10-14T13:57:43 | 303,863,139 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 758 | java | package view.cell;
import helper.DictionaryDAO;
import helper.ShowText;
import helper.UpdateListview;
import view.SearchingPane;
public class CellHistory extends Cell {
public CellHistory() {
button.setStyle("-fx-background-image: url('/view/image/delete.png');");
}
@Override
protected void actionHBoxClick() {
ShowText showText = new SearchingPane();
showText.showTarget(lastItem);
}
@Override
protected void actionButtonClick() {
super.actionButtonClick();
DictionaryDAO dictionaryDAO = new DictionaryDAO();
dictionaryDAO.deleteWord(lastItem, false);
UpdateListview updateListview = new SearchingPane();
updateListview.removeItemInListView(lastItem);
}
}
| [
"thanh1908.xx@gmail.com"
] | thanh1908.xx@gmail.com |
7998c8636d1c2f023a669f757c79548e38902f36 | ab45a65d2191b892349288d4d37cda5b3f7268f3 | /2_Code/Candidate_Selection/remove_missingContext.java | 0dbdd4b4f99ac729fed7ce545862cdc0f49efc62 | [] | no_license | coizioc/WikipediaTriviaMiner_SharedResources | 249e9974accd4a8089c318b2ddadb53df7f92aa2 | 24b8523b60e47e3f8163a3ed8c56d01b09d4699a | refs/heads/master | 2020-12-29T04:39:20.556465 | 2015-08-06T20:55:09 | 2015-08-06T20:55:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,266 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package candidateGeneration;
import edu.stanford.nlp.dcoref.CorefChain;
import edu.stanford.nlp.dcoref.CorefCoreAnnotations;
import edu.stanford.nlp.pipeline.Annotation;
import edu.stanford.nlp.pipeline.StanfordCoreNLP;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.util.AbstractSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import opennlp.tools.sentdetect.SentenceDetectorME;
import opennlp.tools.sentdetect.SentenceModel;
/**
*
* @author Anonymous_for_IJCAI
*/
public class remove_missingContext {
public static String sentence_detect_model="C:\\Users\\Anonymous_for_IJCAI\\Workspace\\trivia\\Code\\knowledgeExtraction\\src\\models\\en-sent.zip";
public static void main(String[] args) throws FileNotFoundException, IOException {
InputStream is = new FileInputStream(sentence_detect_model);
SentenceModel model = new SentenceModel(is);
SentenceDetectorME sdetector = new SentenceDetectorME(model);
Properties props = new Properties();
props.put("annotators", "tokenize,ssplit,pos,lemma,ner,parse,dcoref");
StanfordCoreNLP pi = new StanfordCoreNLP(props);
File writeFile = new File("C:\\Users\\Anonymous_for_IJCAI\\Workspace\\trivia\\Data\\Candidate_Generation\\good_sentences_new.txt");
writeFile.createNewFile();
FileWriter writer = new FileWriter(writeFile);
File writeFile2 = new File("C:\\Users\\Anonymous_for_IJCAI\\Workspace\\trivia\\Data\\Candidate_Generation\\bad_sentences_new.txt");
writeFile2.createNewFile();
FileWriter writer2 = new FileWriter(writeFile2);
String folderPath = "C:\\Users\\Anonymous_for_IJCAI\\Workspace\\trivia\\Data\\movieTest\\indivFiles\\";
File[] files = new File(folderPath).listFiles();
for (File file : files) {
if(file.isFile()){
String name = file.getName();
name = name.replace("_", " ");
name = name.replace("%28", "(");
name = name.replace("%29", ")");
name = name.replace(".txt", "");
System.out.println("File: " + name);
FileReader inputFile = new FileReader(folderPath + file.getName());
BufferedReader bufferReader = new BufferedReader(inputFile);
String input;
while((input = bufferReader.readLine()) != null)
{
//System.out.println("Line: " + input);
String sentences[] = sdetector.sentDetect(input);
HashMap<Integer, Integer> toRemove = new HashMap<>();
Annotation doc = new Annotation(input);
pi.annotate(doc);
Map<Integer, CorefChain> graph = doc.get(CorefCoreAnnotations.CorefChainAnnotation.class);
for (Map.Entry<Integer, CorefChain> entry : graph.entrySet()) {
CorefChain c = entry.getValue();
if (c.getMentionsInTextualOrder().size() <= 1) {
continue;
}
//System.out.println("Mentions: " + c.toString());
String[] sentenceOccurence = c.toString().split(" ");
int firstOccurence = -1;
for(int i = 0; i < sentenceOccurence.length; i++)
{
if(firstOccurence == -1 && sentenceOccurence[i].equals("sentence"))
{
//System.out.println("first occurence : " + sentenceOccurence[i+1]);
firstOccurence = Integer.parseInt(sentenceOccurence[i+1].replace(",", "").replace("]", ""));
continue;
}
if(sentenceOccurence[i].equals("sentence"))
{
//System.out.println("further occurence : "+sentenceOccurence[i+1]);
if(Integer.parseInt(sentenceOccurence[i+1].replace(",", "").replace("]", "")) != firstOccurence)
{
//System.out.println("Added " + sentenceOccurence[i+1].replace(",", "").replace("]", "") + " for removal");
toRemove.put(Integer.parseInt(sentenceOccurence[i+1].replace(",", "").replace("]", "")), 1);
}
}
}
//System.out.println(c.toString());
}
int cand_i = 1;
for(String candidate_sentence : sentences)
{
if(toRemove.containsKey(cand_i))
{
//System.out.println("REMOVING: " + candidate_sentence + "\n");
writer2.write(name + "\t" + candidate_sentence + "\n");
continue;
}
//System.out.println("TAKING: " + candidate_sentence + "\n");
writer.write(name + "\t" + candidate_sentence + "\n");
cand_i++;
}
//System.in.read();
}
//System.out.println("Line done");
bufferReader.close();
//System.in.read();
}
writer.flush();
writer2.flush();
}
writer.close();
writer2.close();
}
}
| [
"abhay.prakash1@gmail.com"
] | abhay.prakash1@gmail.com |
ecafc4bfec8b037996a81e7afb3bd9301ebf0003 | 39183977accdc77c3443402c294386322a20b814 | /src/test/java/com/epam/framework/collectors/report/classes/Match.java | 4312d9f072ba57e96151fbc24258dfa2ea4c6a79 | [] | no_license | mamax/parallel_test | 9fa440b606fb1d150144c68fe1242e6811d70cf0 | 69af6af1c3f20b26d693b257dbdd53dddf90f498 | refs/heads/master | 2023-06-12T09:53:34.708797 | 2019-01-08T09:37:49 | 2019-01-08T09:37:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 506 | java | package com.epam.framework.collectors.report.classes;
import java.util.List;
public class Match {
private List<Argument> arguments;
private String location = null;
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public List<Argument> getArguments() {
return arguments;
}
public void setArguments(List<Argument> arguments) {
this.arguments = arguments;
}
}
| [
"marchenkoandy@gmail.com"
] | marchenkoandy@gmail.com |
be79b386fe81981431ea73c2842593454265032c | 16639ae737d30c81e50faa2ac9d3f2741c6f83c3 | /New folder/Sample-JUnit/src/test/java/com/evry/testcases/TestEvenOddProgram.java | dfbeda422c27cc9c07bb7cfaa3208266f3ef139c | [] | no_license | evrytrainingbatch01/evryPrograms | 96f5d27af18e614b2cb145b10854d4c2600fe6f1 | bbee5101b17a0730286b2910e11010f949022c34 | refs/heads/master | 2023-01-11T03:38:39.038571 | 2019-05-27T11:27:05 | 2019-05-27T11:27:05 | 186,281,354 | 0 | 0 | null | 2023-01-07T05:50:00 | 2019-05-12T17:00:05 | JavaScript | UTF-8 | Java | false | false | 316 | java | package com.evry.testcases;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class TestEvenOddProgram {
@Test
public void testEvenOddNumber(){
EvenOddProgram program = new EvenOddProgram();
assertEquals("10 is a even number", true, program.isEvenNumber(10));
}
}
| [
"renukaprasada24@github.com"
] | renukaprasada24@github.com |
ad057d57afefa282dd504a685e741af058f78903 | ff17a1376bdad92b12c91992c5413b42e991d33c | /src/BOJ/BOJ1991.java | cf79f72a997ab4d426fa5c92d41ffdbef511fa1f | [] | no_license | seonahHwang/Algorithm-problem-solving | e2f9dee814c06c6712bc6c25b33fc79239356356 | 5099f6e06bc1d28c6b52e93a1cef4e96c100d828 | refs/heads/master | 2023-04-18T11:13:13.974936 | 2021-04-24T03:15:50 | 2021-04-24T03:15:50 | 131,688,675 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,275 | java | package BOJ;
import java.util.*;
public class BOJ1991 {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.nextLine(); // 엔터제거
int a[][] = new int[26][2];
for(int i=0;i<n;i++) {
String l = sc.nextLine();
int x = l.charAt(0) - 'A'; //부모 알파벳 인덱
char y = l.charAt(2);
char z = l.charAt(4);
if(y == '.') {
a[x][0] = -1;//자식이 없는경우 -1
}
else {
a[x][0] = y-'A';
}
if(z == '.') {
a[x][1] = -1;
}
else {
a[x][1] = z -'A';
}
}
preorder(a,0); //2번째 인자는 시작할 루트
System.out.println();
inorder(a,0);
System.out.println();
postorder(a,0);
System.out.println();
}
private static void preorder(int a[][], int x) {
if(x == -1) return;
System.out.print((char)(x+'A'));
preorder(a, a[x][0]);
preorder(a, a[x][1]);
}
private static void inorder(int a[][], int x) {
if(x == -1) return;
inorder(a, a[x][0]);
System.out.print((char)(x+'A'));
inorder(a, a[x][1]);
}
private static void postorder(int a[][], int x) {
if(x == -1) return;
postorder(a, a[x][0]);
postorder(a, a[x][1]);
System.out.print((char)(x+'A'));
}
}
| [
"tjsdk2769@gmail.com"
] | tjsdk2769@gmail.com |
8461d4d44725576b1d0e6ed4298dcd1baf4f35f0 | be20563e25b9ca440c325a438884d739559e9b53 | /src/main/java/ecma/ai/transferapp/security/JwtFilter.java | 2516fea78950ef48275179b786c4952a6036afb1 | [] | no_license | Vakhobiddin/transfer-app | 35f50fa60941a63192a5c9cf9f2ebec497a6f9fa | 06c3a331d7ca3576135d9d49c567cbbc95eff98d | refs/heads/master | 2023-05-02T13:58:46.994306 | 2021-05-21T12:38:51 | 2021-05-21T12:38:51 | 369,530,402 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,935 | java | package ecma.ai.transferapp.security;
import ecma.ai.transferapp.service.MyAuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@Component
public class JwtFilter extends OncePerRequestFilter {
@Autowired
JwtProvider jwtProvider;
@Autowired
MyAuthService myAuthService;
@Override
protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException {
String token = httpServletRequest.getHeader("Authorization");
if (token != null && token.startsWith("Bearer")) {
token = token.substring(7); //xaqiqiy token
boolean validateToken = jwtProvider.validateToken(token);
if (validateToken) {
String username = jwtProvider.getUsernameFromToken(token);
UserDetails userDetails = myAuthService.loadUserByUsername(username);
UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities());
SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);
}
}
filterChain.doFilter(httpServletRequest, httpServletResponse);
}
}
| [
"vboboqulov@mail.ru"
] | vboboqulov@mail.ru |
3f066ecad252c494c67fa403ccb5b1c6c7ee7094 | ecad019a854b9fac8085e482e8f80a83d92b01d2 | /src/main/java/org/atlasapi/remotesite/youview/YouViewFortnightUpdater.java | 64d9136dbbffec8531e4029dcb10ca184cb30445 | [
"Apache-2.0",
"LicenseRef-scancode-rsa-md4",
"HPND-sell-variant",
"metamail",
"LicenseRef-scancode-rsa-1990",
"LicenseRef-scancode-zeusbench",
"Beerware",
"Spencer-94",
"MIT",
"LicenseRef-scancode-pcre",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"NTP",
"RSA-MD"
] | permissive | eleggua/atlas | 6dc8a14ff90a68a6990ae0f4b4bfc64c2a195663 | bbd75c0eebe76b958f53bb4e0e2b5057dc9dc686 | refs/heads/master | 2021-01-18T03:59:47.781453 | 2013-08-09T16:21:59 | 2013-08-09T16:21:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 394 | java | package org.atlasapi.remotesite.youview;
import org.joda.time.Duration;
public class YouViewFortnightUpdater extends YouViewUpdater {
public YouViewFortnightUpdater(YouViewChannelResolver channelResolver, YouViewScheduleFetcher fetcher, YouViewChannelProcessor processor) {
super(channelResolver, fetcher, processor, Duration.standardDays(7), Duration.standardDays(7));
}
}
| [
"oli@metabradcast.com"
] | oli@metabradcast.com |
3240fad7e7bb37409484da581398d999376f2f0f | 51cc9acab04946897d50844c2a5d93b7e5e743eb | /Components/FrameworkLearning/Test/gov/sandia/cognition/framework/learning/StatefulEvaluatorBasedCognitiveModuleTest.java | 5068c018c71b8fd8577e95bae1bfdde178f18b4d | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | Markoy8/Foundry | c9da8bb224cf6fd089a7e5d700631e4c12280380 | c3ec00a8efe08a25dd5eae7150b788e4486c0e6e | refs/heads/master | 2021-06-28T09:40:51.709574 | 2020-12-10T08:20:26 | 2020-12-10T08:20:26 | 151,100,445 | 0 | 0 | NOASSERTION | 2018-10-01T14:16:01 | 2018-10-01T14:16:01 | null | UTF-8 | Java | false | false | 10,832 | java | /*
* File: StatefulEvaluatorBasedCognitiveModuleTest.java
* Authors: Justin Basilico
* Company: Sandia National Laboratories
* Project: Cognitive Foundry
*
* Copyright June 27, 2007, Sandia Corporation. Under the terms of Contract
* DE-AC04-94AL85000, there is a non-exclusive license for use of this work by
* or on behalf of the U.S. Government. Export of this program may require a
* license from the United States Government. See CopyrightHistory.txt for
* complete details.
*
*/
package gov.sandia.cognition.framework.learning;
import gov.sandia.cognition.framework.learning.converter.CogxelVectorConverter;
import gov.sandia.cognition.framework.CognitiveModel;
import gov.sandia.cognition.framework.CognitiveModelFactory;
import gov.sandia.cognition.framework.CognitiveModuleState;
import gov.sandia.cognition.framework.CogxelState;
import gov.sandia.cognition.framework.DefaultSemanticLabel;
import gov.sandia.cognition.framework.SemanticIdentifier;
import gov.sandia.cognition.framework.SemanticIdentifierMap;
import gov.sandia.cognition.framework.SemanticLabel;
import gov.sandia.cognition.framework.lite.ArrayBasedCognitiveModelInput;
import gov.sandia.cognition.framework.lite.ArrayBasedPerceptionModuleFactory;
import gov.sandia.cognition.framework.lite.CognitiveModelLiteFactory;
import gov.sandia.cognition.framework.lite.CognitiveModuleStateWrapper;
import gov.sandia.cognition.math.matrix.MatrixFactory;
import gov.sandia.cognition.math.matrix.Vector;
import gov.sandia.cognition.math.matrix.mtj.Vector3;
import gov.sandia.cognition.math.signals.LinearDynamicalSystem;
import java.util.Random;
import junit.framework.TestCase;
/**
* This class implements JUnit tests for the following classes:
*
* StatefulEvaluatorBasedCognitiveModule
*
* @author Justin Basilico
* @since 2.0
*/
public class StatefulEvaluatorBasedCognitiveModuleTest
extends TestCase
{
/** The random number generator for the tests. */
protected Random random = new Random();
public StatefulEvaluatorBasedCognitiveModuleTest(
String testName)
{
super(testName);
}
/**
* Test of initializeState method, of class gov.sandia.cognition.framework.learning.StatefulEvaluatorBasedCognitiveModule.
*/
@SuppressWarnings("unchecked")
public void testInitializeState()
{
DefaultSemanticLabel in1 = new DefaultSemanticLabel("in1");
DefaultSemanticLabel in2 = new DefaultSemanticLabel("in2");
DefaultSemanticLabel in3 = new DefaultSemanticLabel("in3");
DefaultSemanticLabel out1 = new DefaultSemanticLabel("out1");
DefaultSemanticLabel out2 = new DefaultSemanticLabel("out2");
DefaultSemanticLabel out3 = new DefaultSemanticLabel("out3");
LinearDynamicalSystem evaluator = new LinearDynamicalSystem(
MatrixFactory.getDefault().copyColumnVectors(
new Vector3(2.0, 0.0, 0.0),
new Vector3(0.0, 2.0, 0.0),
new Vector3(0.0, 0.0, 2.0)),
MatrixFactory.getDefault().copyColumnVectors(
new Vector3(1.0, 0.0, 0.0),
new Vector3(0.0, 1.0, 0.0),
new Vector3(0.0, 0.0, 1.0)));
CogxelVectorConverter inputConverter = new CogxelVectorConverter(
new SemanticLabel[]{in1, in2, in3});
CogxelVectorConverter outputConverter = new CogxelVectorConverter(
new SemanticLabel[]{out1, out2, out3});
EvaluatorBasedCognitiveModuleSettings<Vector, Vector> settings =
new EvaluatorBasedCognitiveModuleSettings<Vector, Vector>(
evaluator, inputConverter, outputConverter);
EvaluatorBasedCognitiveModuleFactory<Vector, Vector> moduleFactory =
new EvaluatorBasedCognitiveModuleFactory<Vector, Vector>(
settings, "Module Name");
CognitiveModelLiteFactory modelFactory =
new CognitiveModelLiteFactory();
modelFactory.addModuleFactory(new ArrayBasedPerceptionModuleFactory());
modelFactory.addModuleFactory(moduleFactory);
CognitiveModel model = modelFactory.createModel();
StatefulEvaluatorBasedCognitiveModule<Vector, Vector> module =
(StatefulEvaluatorBasedCognitiveModule<Vector, Vector>) model.getModules().get(1);
CognitiveModuleState state1 = module.initializeState(model.getCurrentState());
CognitiveModuleState state2 = module.initializeState(model.getCurrentState());
assertNotNull(state1);
assertNotNull(state2);
assertNotSame(state1, state2);
assertTrue(state1 instanceof CognitiveModuleStateWrapper);
Object internalState = ((CognitiveModuleStateWrapper) state1).getInternalState();
assertNotNull(internalState);
assertEquals(evaluator.createDefaultState(), internalState);
}
/**
* Test of update method, of class gov.sandia.cognition.framework.learning.StatefulEvaluatorBasedCognitiveModule.
*/
public void testUpdate()
{
DefaultSemanticLabel in1 = new DefaultSemanticLabel("in1");
DefaultSemanticLabel in2 = new DefaultSemanticLabel("in2");
DefaultSemanticLabel in3 = new DefaultSemanticLabel("in3");
DefaultSemanticLabel out1 = new DefaultSemanticLabel("out1");
DefaultSemanticLabel out2 = new DefaultSemanticLabel("out2");
DefaultSemanticLabel out3 = new DefaultSemanticLabel("out3");
LinearDynamicalSystem evaluator = new LinearDynamicalSystem(
MatrixFactory.getDefault().copyColumnVectors(
new Vector3(2.0, 0.0, 0.0),
new Vector3(0.0, 2.0, 0.0),
new Vector3(0.0, 0.0, 2.0)),
MatrixFactory.getDefault().copyColumnVectors(
new Vector3(1.0, 0.0, 0.0),
new Vector3(0.0, 1.0, 0.0),
new Vector3(0.0, 0.0, 1.0)));
CogxelVectorConverter inputConverter = new CogxelVectorConverter(
new SemanticLabel[]{in1, in2, in3});
CogxelVectorConverter outputConverter = new CogxelVectorConverter(
new SemanticLabel[]{out1, out2, out3});
EvaluatorBasedCognitiveModuleSettings<Vector, Vector> settings =
new EvaluatorBasedCognitiveModuleSettings<Vector, Vector>(
evaluator, inputConverter, outputConverter);
EvaluatorBasedCognitiveModuleFactory<Vector, Vector> moduleFactory =
new EvaluatorBasedCognitiveModuleFactory<Vector, Vector>(
settings, "Module Name");
CognitiveModelLiteFactory modelFactory =
new CognitiveModelLiteFactory();
modelFactory.addModuleFactory(new ArrayBasedPerceptionModuleFactory());
modelFactory.addModuleFactory(moduleFactory);
CognitiveModel model = modelFactory.createModel();
SemanticIdentifierMap map = model.getSemanticIdentifierMap();
SemanticIdentifier in1ID = map.addLabel(in1);
SemanticIdentifier in2ID = map.addLabel(in2);
SemanticIdentifier in3ID = map.addLabel(in3);
SemanticIdentifier out1ID = map.addLabel(out1);
SemanticIdentifier out2ID = map.addLabel(out2);
SemanticIdentifier out3ID = map.addLabel(out3);
SemanticIdentifier[] inIDs =
new SemanticIdentifier[]{in1ID, in2ID, in3ID};
double[] inData = new double[]{1.0, -2.0, 0.0};
ArrayBasedCognitiveModelInput input = new ArrayBasedCognitiveModelInput(
inIDs, inData, false);
model.update(input);
CogxelState cogxels = model.getCurrentState().getCogxels();
assertEquals(1.0, cogxels.getCogxelActivation(out1ID));
assertEquals(-2.0, cogxels.getCogxelActivation(out2ID));
assertEquals(0.0, cogxels.getCogxelActivation(out3ID));
model.update(input);
cogxels = model.getCurrentState().getCogxels();
assertEquals(3.0, cogxels.getCogxelActivation(out1ID));
assertEquals(-6.0, cogxels.getCogxelActivation(out2ID));
assertEquals(0.0, cogxels.getCogxelActivation(out3ID));
model.resetCognitiveState();
inData[0] = -4.0;
inData[1] = 7.0;
inData[2] = 0.5;
model.update(input);
cogxels = model.getCurrentState().getCogxels();
assertEquals(-4.0, cogxels.getCogxelActivation(out1ID));
assertEquals(7.0, cogxels.getCogxelActivation(out2ID));
assertEquals(0.5, cogxels.getCogxelActivation(out3ID));
model.update(input);
cogxels = model.getCurrentState().getCogxels();
assertEquals(-12.0, cogxels.getCogxelActivation(out1ID));
assertEquals(21.0, cogxels.getCogxelActivation(out2ID));
assertEquals(1.5, cogxels.getCogxelActivation(out3ID));
}
/**
* Test of getName method, of class gov.sandia.cognition.framework.learning.StatefulEvaluatorBasedCognitiveModule.
*/
public void testGetName()
{
LinearDynamicalSystem evaluator = new LinearDynamicalSystem(
MatrixFactory.getDefault().createUniformRandom(2, 2, 0.0, 1.0, random),
MatrixFactory.getDefault().createUniformRandom(2, 2, 0.0, 1.0, random));
EvaluatorBasedCognitiveModuleSettings<Vector, Vector> settings =
new EvaluatorBasedCognitiveModuleSettings<Vector, Vector>(
evaluator,
new CogxelVectorConverter(), new CogxelVectorConverter());
CognitiveModelFactory modelFactory = new CognitiveModelLiteFactory();
String name = "Module Name";
StatefulEvaluatorBasedCognitiveModule<Vector, Vector> instance =
new StatefulEvaluatorBasedCognitiveModule<Vector, Vector>(
modelFactory.createModel(), settings, name);
assertEquals(name, instance.getName());
}
/**
* Test of getStatefulEvaluator method, of class gov.sandia.cognition.framework.learning.StatefulEvaluatorBasedCognitiveModule.
*/
public void testGetStatefulEvaluator()
{
LinearDynamicalSystem evaluator = new LinearDynamicalSystem(
MatrixFactory.getDefault().createUniformRandom(2, 2, 0.0, 1.0, random),
MatrixFactory.getDefault().createUniformRandom(2, 2, 0.0, 1.0, random));
EvaluatorBasedCognitiveModuleSettings<Vector, Vector> settings =
new EvaluatorBasedCognitiveModuleSettings<Vector, Vector>(
evaluator,
new CogxelVectorConverter(), new CogxelVectorConverter());
CognitiveModelFactory modelFactory = new CognitiveModelLiteFactory();
StatefulEvaluatorBasedCognitiveModule<Vector, Vector> instance =
new StatefulEvaluatorBasedCognitiveModule<Vector, Vector>(
modelFactory.createModel(), settings, "Module Name");
assertSame(evaluator, instance.getStatefulEvaluator());
}
}
| [
"jbasilico@cognitivefoundry.org"
] | jbasilico@cognitivefoundry.org |
830d60f862d85d43c187c199b0a21182403674e3 | ad086e25eaf230027d02239fd713badc5b68df25 | /app/src/main/java/br/com/tercomfuncionario/Entity/Category.java | fec7c962b1a4133f43a210b5d5965583bbe1c265 | [] | no_license | Driw/tercom-android | 3f0a6fe3fb5ad31530a9f9aae6f5289bdb787808 | 61eb9ed8c7b564090dccb14f80537532c6129568 | refs/heads/master | 2021-10-27T18:37:46.746108 | 2019-04-18T17:46:16 | 2019-04-18T17:46:16 | 138,503,129 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 629 | java | package br.com.tercomfuncionario.Entity;
import br.com.tercomfuncionario.Annotation.BindObject;
public class Category extends GenericEntity {
@BindObject
private ProductFamily family;
@BindObject
private ProductGroup group;
@BindObject
private ProductSubGroup subgroup;
@BindObject
private ProductSector sector;
public ProductFamily getFamily() {
return family;
}
public ProductGroup getGroup() {
return group;
}
public ProductSubGroup getSubgroup() {
return subgroup;
}
public ProductSector getSector() {
return sector;
}
}
| [
"31046813+FelipeAmalfi@users.noreply.github.com"
] | 31046813+FelipeAmalfi@users.noreply.github.com |
e2aeb9235cdac2626ff9cf5e12a08cea3d72a9c4 | 8ea3569cfdbec46218cd9c63480fa6d12bf44b64 | /pr1Compilarodores2/src/gramatica_usu/grausuTokenManager.java | 9b70755205164624b6a85e3e68844aaf24dd885e | [] | no_license | JamesMelgar/compi2javaccpr1 | b77d71687bd5397204080d52a68c3e882472243f | 4bc7935b5eaa70c9e8a97170a0585563b0a3ea44 | refs/heads/master | 2021-07-01T08:49:32.212487 | 2017-09-17T04:56:23 | 2017-09-17T04:56:23 | 100,440,267 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 82,324 | java | /* grausuTokenManager.java */
/* Generated By:JavaCC: Do not edit this line. grausuTokenManager.java */
package gramatica_usu;
import pr1compilarodores2.Nodo;
import java.io.*;
import java.util.*;
/** Token Manager. */
@SuppressWarnings("unused")public class grausuTokenManager implements grausuConstants {
Token tok;
/** Debug output. */
public java.io.PrintStream debugStream = System.out;
/** Set debug output. */
public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1){
switch (pos)
{
case 0:
if ((active0 & 0xfff77fbfddffe000L) != 0L || (active1 & 0xffL) != 0L)
{
jjmatchedKind = 72;
return 118;
}
if ((active1 & 0x8000000000000L) != 0L)
return 52;
if ((active0 & 0x8804022001000L) != 0L)
{
jjmatchedKind = 72;
return 0;
}
if ((active1 & 0x2000000000000L) != 0L)
return 79;
return -1;
case 1:
if ((active0 & 0xfbeffffbb79ff000L) != 0L || (active1 & 0xffL) != 0L)
{
if (jjmatchedPos != 1)
{
jjmatchedKind = 72;
jjmatchedPos = 1;
}
return 118;
}
if ((active0 & 0x410000448600000L) != 0L)
return 118;
return -1;
case 2:
if ((active0 & 0xfaeffffff7fff000L) != 0L || (active1 & 0xfbL) != 0L)
{
jjmatchedKind = 72;
jjmatchedPos = 2;
return 118;
}
if ((active0 & 0x100000000000000L) != 0L)
return 118;
if ((active1 & 0x4L) != 0L)
{
if (jjmatchedPos < 1)
{
jjmatchedKind = 72;
jjmatchedPos = 1;
}
return -1;
}
return -1;
case 3:
if ((active0 & 0x68efbffe57ffd000L) != 0L || (active1 & 0xf0L) != 0L)
{
if (jjmatchedPos != 3)
{
jjmatchedKind = 72;
jjmatchedPos = 3;
}
return 118;
}
if ((active0 & 0x92004001a0002000L) != 0L || (active1 & 0xbL) != 0L)
return 118;
if ((active1 & 0x4L) != 0L)
{
if (jjmatchedPos < 1)
{
jjmatchedKind = 72;
jjmatchedPos = 1;
}
return -1;
}
return -1;
case 4:
if ((active0 & 0x686faffe57ffc000L) != 0L || (active1 & 0x72L) != 0L)
{
jjmatchedKind = 72;
jjmatchedPos = 4;
return 118;
}
if ((active0 & 0x80100000001000L) != 0L || (active1 & 0x80L) != 0L)
return 118;
if ((active1 & 0x4L) != 0L)
{
if (jjmatchedPos < 1)
{
jjmatchedKind = 72;
jjmatchedPos = 1;
}
return -1;
}
return -1;
case 5:
if ((active0 & 0x286badae577bc000L) != 0L || (active1 & 0x72L) != 0L)
{
jjmatchedKind = 72;
jjmatchedPos = 5;
return 118;
}
if ((active0 & 0x4004024000840000L) != 0L)
return 118;
if ((active1 & 0x4L) != 0L)
{
if (jjmatchedPos < 1)
{
jjmatchedKind = 72;
jjmatchedPos = 1;
}
return -1;
}
if ((active0 & 0x1000000000L) != 0L)
{
if (jjmatchedPos < 4)
{
jjmatchedKind = 72;
jjmatchedPos = 4;
}
return -1;
}
return -1;
case 6:
if ((active0 & 0x80105aa177b8000L) != 0L || (active1 & 0x72L) != 0L)
{
jjmatchedKind = 72;
jjmatchedPos = 6;
return 118;
}
if ((active0 & 0x206aa80440004000L) != 0L)
return 118;
if ((active1 & 0x4L) != 0L)
{
if (jjmatchedPos < 1)
{
jjmatchedKind = 72;
jjmatchedPos = 1;
}
return -1;
}
if ((active0 & 0x1000000000L) != 0L)
{
if (jjmatchedPos < 4)
{
jjmatchedKind = 72;
jjmatchedPos = 4;
}
return -1;
}
return -1;
case 7:
if ((active0 & 0x5a0140a0000L) != 0L || (active1 & 0x70L) != 0L)
{
jjmatchedKind = 72;
jjmatchedPos = 7;
return 118;
}
if ((active0 & 0x1000a03418000L) != 0L || (active1 & 0x2L) != 0L)
return 118;
if ((active0 & 0x800000000300000L) != 0L)
{
if (jjmatchedPos < 6)
{
jjmatchedKind = 72;
jjmatchedPos = 6;
}
return -1;
}
return -1;
case 8:
if ((active0 & 0x5a0100a0000L) != 0L || (active1 & 0x70L) != 0L)
{
jjmatchedKind = 72;
jjmatchedPos = 8;
return 118;
}
if ((active0 & 0x4000000L) != 0L)
return 118;
if ((active0 & 0x800000000300000L) != 0L)
{
if (jjmatchedPos < 6)
{
jjmatchedKind = 72;
jjmatchedPos = 6;
}
return -1;
}
return -1;
case 9:
if ((active0 & 0x52000080000L) != 0L || (active1 & 0x70L) != 0L)
{
if (jjmatchedPos != 9)
{
jjmatchedKind = 72;
jjmatchedPos = 9;
}
return 118;
}
if ((active0 & 0x8010020000L) != 0L)
return 118;
if ((active0 & 0x800000000300000L) != 0L)
{
if (jjmatchedPos < 6)
{
jjmatchedKind = 72;
jjmatchedPos = 6;
}
return -1;
}
return -1;
case 10:
if ((active0 & 0x80000L) != 0L)
return 118;
if ((active0 & 0x2000000000L) != 0L)
{
if (jjmatchedPos < 9)
{
jjmatchedKind = 72;
jjmatchedPos = 9;
}
return -1;
}
if ((active0 & 0x800000000300000L) != 0L)
{
if (jjmatchedPos < 6)
{
jjmatchedKind = 72;
jjmatchedPos = 6;
}
return -1;
}
if ((active0 & 0x50000000000L) != 0L || (active1 & 0x70L) != 0L)
{
jjmatchedKind = 72;
jjmatchedPos = 10;
return 118;
}
return -1;
case 11:
if ((active0 & 0x10000000000L) != 0L)
return 118;
if ((active0 & 0x2000000000L) != 0L)
{
if (jjmatchedPos < 9)
{
jjmatchedKind = 72;
jjmatchedPos = 9;
}
return -1;
}
if ((active0 & 0x300000L) != 0L)
{
if (jjmatchedPos < 6)
{
jjmatchedKind = 72;
jjmatchedPos = 6;
}
return -1;
}
if ((active0 & 0x40000000000L) != 0L || (active1 & 0x70L) != 0L)
{
jjmatchedKind = 72;
jjmatchedPos = 11;
return 118;
}
return -1;
case 12:
if ((active0 & 0x40000000000L) != 0L || (active1 & 0x40L) != 0L)
return 118;
if ((active0 & 0x300000L) != 0L)
{
if (jjmatchedPos < 6)
{
jjmatchedKind = 72;
jjmatchedPos = 6;
}
return -1;
}
if ((active1 & 0x30L) != 0L)
{
jjmatchedKind = 72;
jjmatchedPos = 12;
return 118;
}
return -1;
case 13:
if ((active1 & 0x20L) != 0L)
return 118;
if ((active0 & 0x300000L) != 0L)
{
if (jjmatchedPos < 6)
{
jjmatchedKind = 72;
jjmatchedPos = 6;
}
return -1;
}
if ((active1 & 0x10L) != 0L)
{
jjmatchedKind = 72;
jjmatchedPos = 13;
return 118;
}
return -1;
case 14:
if ((active0 & 0x300000L) != 0L)
{
if (jjmatchedPos < 6)
{
jjmatchedKind = 72;
jjmatchedPos = 6;
}
return -1;
}
if ((active1 & 0x10L) != 0L)
{
jjmatchedKind = 72;
jjmatchedPos = 14;
return 118;
}
return -1;
case 15:
if ((active0 & 0x300000L) != 0L)
{
if (jjmatchedPos < 6)
{
jjmatchedKind = 72;
jjmatchedPos = 6;
}
return -1;
}
if ((active1 & 0x10L) != 0L)
{
jjmatchedKind = 72;
jjmatchedPos = 15;
return 118;
}
return -1;
default :
return -1;
}
}
private final int jjStartNfa_0(int pos, long active0, long active1){
return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1);
}
private int jjStopAtPos(int pos, int kind)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
return pos + 1;
}
private int jjMoveStringLiteralDfa0_0(){
switch(curChar)
{
case 13:
jjmatchedKind = 3;
return jjMoveStringLiteralDfa1_0(0x10L, 0x0L);
case 33:
jjmatchedKind = 99;
return jjMoveStringLiteralDfa1_0(0x0L, 0x10000000L);
case 34:
return jjStartNfaWithStates_0(0, 115, 52);
case 35:
jjmatchedKind = 7;
return jjMoveStringLiteralDfa1_0(0x100L, 0x0L);
case 36:
return jjStopAtPos(0, 101);
case 37:
return jjStopAtPos(0, 100);
case 38:
return jjMoveStringLiteralDfa1_0(0x0L, 0x200000000L);
case 39:
return jjStartNfaWithStates_0(0, 113, 79);
case 40:
return jjStopAtPos(0, 102);
case 41:
return jjStopAtPos(0, 103);
case 42:
return jjStopAtPos(0, 89);
case 43:
return jjStopAtPos(0, 86);
case 44:
return jjStopAtPos(0, 105);
case 45:
return jjStopAtPos(0, 87);
case 46:
return jjStopAtPos(0, 112);
case 47:
return jjStopAtPos(0, 88);
case 58:
return jjStopAtPos(0, 109);
case 59:
return jjStopAtPos(0, 104);
case 60:
jjmatchedKind = 94;
return jjMoveStringLiteralDfa1_0(0x0L, 0x400080000000L);
case 61:
jjmatchedKind = 108;
return jjMoveStringLiteralDfa1_0(0x0L, 0x8000000L);
case 62:
jjmatchedKind = 93;
return jjMoveStringLiteralDfa1_0(0x0L, 0x800100000000L);
case 94:
return jjStopAtPos(0, 90);
case 65:
case 97:
return jjMoveStringLiteralDfa1_0(0x102000000024000L, 0x10L);
case 66:
case 98:
return jjMoveStringLiteralDfa1_0(0x8000008000840000L, 0x0L);
case 67:
case 99:
return jjMoveStringLiteralDfa1_0(0x8804022001000L, 0x0L);
case 68:
case 100:
return jjMoveStringLiteralDfa1_0(0x4680000440600000L, 0x3L);
case 69:
case 101:
return jjMoveStringLiteralDfa1_0(0x10000000008000L, 0x0L);
case 70:
case 102:
return jjMoveStringLiteralDfa1_0(0x83000000000L, 0x0L);
case 73:
case 105:
return jjMoveStringLiteralDfa1_0(0x2000000800010000L, 0x0L);
case 76:
case 108:
return jjMoveStringLiteralDfa1_0(0x0L, 0x60L);
case 77:
case 109:
return jjMoveStringLiteralDfa1_0(0x200000000L, 0x0L);
case 78:
case 110:
return jjMoveStringLiteralDfa1_0(0x10000000000L, 0xcL);
case 79:
case 111:
return jjMoveStringLiteralDfa1_0(0x800020000100000L, 0x0L);
case 80:
case 112:
return jjMoveStringLiteralDfa1_0(0x1040100000000L, 0x0L);
case 81:
case 113:
return jjMoveStringLiteralDfa1_0(0x4000000000000L, 0x0L);
case 82:
case 114:
return jjMoveStringLiteralDfa1_0(0x40000004000000L, 0x0L);
case 83:
case 115:
return jjMoveStringLiteralDfa1_0(0x98080000L, 0x0L);
case 84:
case 116:
return jjMoveStringLiteralDfa1_0(0x1000100000000000L, 0x0L);
case 85:
case 117:
return jjMoveStringLiteralDfa1_0(0x600001002000L, 0x80L);
case 86:
case 118:
return jjMoveStringLiteralDfa1_0(0x20000000000000L, 0x0L);
case 123:
return jjStopAtPos(0, 106);
case 124:
return jjMoveStringLiteralDfa1_0(0x0L, 0x400000000L);
case 125:
return jjStopAtPos(0, 107);
case 8220:
return jjStopAtPos(0, 6);
default :
return jjMoveNfa_0(10, 0);
}
}
private int jjMoveStringLiteralDfa1_0(long active0, long active1){
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(0, active0, active1);
return 1;
}
switch(curChar)
{
case 10:
if ((active0 & 0x10L) != 0L)
return jjStopAtPos(1, 4);
break;
case 38:
if ((active1 & 0x200000000L) != 0L)
return jjStopAtPos(1, 97);
break;
case 42:
if ((active0 & 0x100L) != 0L)
return jjStopAtPos(1, 8);
break;
case 60:
if ((active1 & 0x400000000000L) != 0L)
return jjStopAtPos(1, 110);
break;
case 61:
if ((active1 & 0x8000000L) != 0L)
return jjStopAtPos(1, 91);
else if ((active1 & 0x10000000L) != 0L)
return jjStopAtPos(1, 92);
else if ((active1 & 0x80000000L) != 0L)
return jjStopAtPos(1, 95);
else if ((active1 & 0x100000000L) != 0L)
return jjStopAtPos(1, 96);
break;
case 62:
if ((active1 & 0x800000000000L) != 0L)
return jjStopAtPos(1, 111);
break;
case 65:
case 97:
return jjMoveStringLiteralDfa2_0(active0, 0x29108120800000L, active1, 0x3L);
case 66:
case 98:
return jjMoveStringLiteralDfa2_0(active0, 0x20000000000L, active1, 0L);
case 67:
case 99:
return jjMoveStringLiteralDfa2_0(active0, 0x20000L, active1, 0L);
case 69:
case 101:
if ((active0 & 0x400000000000000L) != 0L)
{
jjmatchedKind = 58;
jjmatchedPos = 1;
}
return jjMoveStringLiteralDfa2_0(active0, 0x1240003454680000L, active1, 0L);
case 71:
case 103:
return jjMoveStringLiteralDfa2_0(active0, 0x2000000000000L, active1, 0L);
case 73:
case 105:
if ((active0 & 0x8000000L) != 0L)
{
jjmatchedKind = 27;
jjmatchedPos = 1;
}
return jjMoveStringLiteralDfa2_0(active0, 0x280000000L, active1, 0L);
case 76:
case 108:
return jjMoveStringLiteralDfa2_0(active0, 0xc000L, active1, 0x60L);
case 77:
case 109:
return jjMoveStringLiteralDfa2_0(active0, 0x800000000L, active1, 0L);
case 78:
case 110:
if ((active0 & 0x10000000000000L) != 0L)
return jjStartNfaWithStates_0(1, 52, 118);
return jjMoveStringLiteralDfa2_0(active0, 0x2000000000010000L, active1, 0x80L);
case 79:
case 111:
return jjMoveStringLiteralDfa2_0(active0, 0xc080814002040000L, active1, 0x4L);
case 82:
case 114:
return jjMoveStringLiteralDfa2_0(active0, 0x800040000001000L, active1, 0L);
case 83:
case 115:
return jjMoveStringLiteralDfa2_0(active0, 0x100600001002000L, active1, 0L);
case 84:
case 116:
return jjMoveStringLiteralDfa2_0(active0, 0x100000L, active1, 0L);
case 85:
case 117:
return jjMoveStringLiteralDfa2_0(active0, 0x4080000000000L, active1, 0x18L);
case 124:
if ((active1 & 0x400000000L) != 0L)
return jjStopAtPos(1, 98);
break;
default :
break;
}
return jjStartNfa_0(0, active0, active1);
}
private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(0, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(1, active0, active1);
return 2;
}
switch(curChar)
{
case 32:
return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x4L);
case 65:
case 97:
return jjMoveStringLiteralDfa3_0(active0, 0x2000L, active1, 0x60L);
case 66:
case 98:
return jjMoveStringLiteralDfa3_0(active0, 0x100000000000L, active1, 0L);
case 67:
case 99:
if ((active0 & 0x100000000000000L) != 0L)
return jjStartNfaWithStates_0(2, 56, 118);
return jjMoveStringLiteralDfa3_0(active0, 0x3000c00000L, active1, 0L);
case 68:
case 100:
return jjMoveStringLiteralDfa3_0(active0, 0x800000000000000L, active1, 0L);
case 69:
case 101:
return jjMoveStringLiteralDfa3_0(active0, 0x400200001000L, active1, 0L);
case 70:
case 102:
return jjMoveStringLiteralDfa3_0(active0, 0x40000000L, active1, 0L);
case 73:
case 105:
return jjMoveStringLiteralDfa3_0(active0, 0x4000000008000L, active1, 0x80L);
case 74:
case 106:
return jjMoveStringLiteralDfa3_0(active0, 0x20000000000L, active1, 0L);
case 76:
case 108:
return jjMoveStringLiteralDfa3_0(active0, 0x20800010080000L, active1, 0x8L);
case 77:
case 109:
return jjMoveStringLiteralDfa3_0(active0, 0x8010002000000L, active1, 0L);
case 78:
case 110:
return jjMoveStringLiteralDfa3_0(active0, 0x80084080200000L, active1, 0L);
case 79:
case 111:
return jjMoveStringLiteralDfa3_0(active0, 0x8000040000100000L, active1, 0L);
case 80:
case 112:
return jjMoveStringLiteralDfa3_0(active0, 0x800000000L, active1, 0L);
case 81:
case 113:
return jjMoveStringLiteralDfa3_0(active0, 0x1000000L, active1, 0L);
case 82:
case 114:
return jjMoveStringLiteralDfa3_0(active0, 0x2000100040000L, active1, 0L);
case 83:
case 115:
return jjMoveStringLiteralDfa3_0(active0, 0x201008024010000L, active1, 0L);
case 84:
case 116:
return jjMoveStringLiteralDfa3_0(active0, 0x2040000400024000L, active1, 0x13L);
case 85:
case 117:
return jjMoveStringLiteralDfa3_0(active0, 0x4000200000000000L, active1, 0L);
case 88:
case 120:
return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000000L, active1, 0L);
default :
break;
}
return jjStartNfa_0(1, active0, active1);
}
private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(1, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(2, active0, active1);
return 3;
}
switch(curChar)
{
case 65:
case 97:
if ((active0 & 0x100000000L) != 0L)
return jjStartNfaWithStates_0(3, 32, 118);
return jjMoveStringLiteralDfa4_0(active0, 0x200000001000L, active1, 0L);
case 66:
case 98:
return jjMoveStringLiteralDfa4_0(active0, 0x4008010000000000L, active1, 0L);
case 67:
case 99:
if ((active0 & 0x200000000000000L) != 0L)
return jjStartNfaWithStates_0(3, 57, 118);
return jjMoveStringLiteralDfa4_0(active0, 0xc0000000000L, active1, 0x80L);
case 68:
case 100:
return jjMoveStringLiteralDfa4_0(active0, 0x80000000000000L, active1, 0L);
case 69:
case 101:
if ((active1 & 0x1L) != 0L)
{
jjmatchedKind = 64;
jjmatchedPos = 3;
}
return jjMoveStringLiteralDfa4_0(active0, 0x2802028450294000L, active1, 0x2L);
case 72:
case 104:
return jjMoveStringLiteralDfa4_0(active0, 0x3000000000L, active1, 0L);
case 75:
case 107:
return jjMoveStringLiteralDfa4_0(active0, 0x800000L, active1, 0L);
case 76:
case 108:
if ((active0 & 0x8000000000000000L) != 0L)
return jjStartNfaWithStates_0(3, 63, 118);
return jjMoveStringLiteralDfa4_0(active0, 0x100001400000L, active1, 0L);
case 77:
case 109:
return jjMoveStringLiteralDfa4_0(active0, 0x8000L, active1, 0L);
case 78:
case 110:
return jjMoveStringLiteralDfa4_0(active0, 0x200000000L, active1, 0x4L);
case 79:
case 111:
if ((active0 & 0x20000000L) != 0L)
return jjStartNfaWithStates_0(3, 29, 118);
else if ((active0 & 0x80000000L) != 0L)
return jjStartNfaWithStates_0(3, 31, 118);
else if ((active1 & 0x8L) != 0L)
return jjStartNfaWithStates_0(3, 67, 118);
return jjMoveStringLiteralDfa4_0(active0, 0x60800000000000L, active1, 0x10L);
case 80:
case 112:
return jjMoveStringLiteralDfa4_0(active0, 0x2000000L, active1, 0L);
case 82:
case 114:
if ((active0 & 0x2000L) != 0L)
return jjStartNfaWithStates_0(3, 13, 118);
else if ((active0 & 0x400000000000L) != 0L)
return jjStartNfaWithStates_0(3, 46, 118);
return jjMoveStringLiteralDfa4_0(active0, 0x800140000L, active1, 0L);
case 83:
case 115:
return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000L, active1, 0L);
case 84:
case 116:
if ((active0 & 0x1000000000000000L) != 0L)
return jjStartNfaWithStates_0(3, 60, 118);
return jjMoveStringLiteralDfa4_0(active0, 0x4004004000000L, active1, 0L);
case 85:
case 117:
return jjMoveStringLiteralDfa4_0(active0, 0x20000L, active1, 0L);
case 86:
case 118:
return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x60L);
default :
break;
}
return jjStartNfa_0(2, active0, active1);
}
private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(2, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(3, active0, active1);
return 4;
}
switch(curChar)
{
case 95:
return jjMoveStringLiteralDfa5_0(active0, 0x8000000000L, active1, 0L);
case 65:
case 97:
if ((active0 & 0x100000000000L) != 0L)
return jjStartNfaWithStates_0(4, 44, 118);
return jjMoveStringLiteralDfa5_0(active0, 0x4007004460000L, active1, 0L);
case 67:
case 99:
return jjMoveStringLiteralDfa5_0(active0, 0x800050080000L, active1, 0L);
case 68:
case 100:
return jjMoveStringLiteralDfa5_0(active0, 0x1000000L, active1, 0L);
case 69:
case 101:
if ((active0 & 0x80000000000000L) != 0L)
return jjStartNfaWithStates_0(4, 55, 118);
return jjMoveStringLiteralDfa5_0(active0, 0x40000000000L, active1, 0x60L);
case 71:
case 103:
return jjMoveStringLiteralDfa5_0(active0, 0x2002000000300000L, active1, 0L);
case 73:
case 105:
return jjMoveStringLiteralDfa5_0(active0, 0x8080800008000L, active1, 0x10L);
case 76:
case 108:
return jjMoveStringLiteralDfa5_0(active0, 0x4000000002000000L, active1, 0L);
case 78:
case 110:
return jjMoveStringLiteralDfa5_0(active0, 0x800000400000000L, active1, 0L);
case 79:
case 111:
if ((active1 & 0x80L) != 0L)
return jjStartNfaWithStates_0(4, 71, 118);
break;
case 82:
case 114:
if ((active0 & 0x1000L) != 0L)
return jjStartNfaWithStates_0(4, 12, 118);
return jjMoveStringLiteralDfa5_0(active0, 0x60210000014000L, active1, 0L);
case 84:
case 116:
return jjMoveStringLiteralDfa5_0(active0, 0x20200000000L, active1, 0x2L);
case 85:
case 117:
return jjMoveStringLiteralDfa5_0(active0, 0x800000L, active1, 0x4L);
case 87:
case 119:
return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000L, active1, 0L);
default :
break;
}
return jjStartNfa_0(3, active0, active1);
}
private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(3, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(4, active0, active1);
return 5;
}
switch(curChar)
{
case 40:
return jjMoveStringLiteralDfa6_0(active0, 0x1000000000L, active1, 0L);
case 95:
return jjMoveStringLiteralDfa6_0(active0, 0x2000000000L, active1, 0x60L);
case 65:
case 97:
return jjMoveStringLiteralDfa6_0(active0, 0x80a800000304000L, active1, 0L);
case 67:
case 99:
return jjMoveStringLiteralDfa6_0(active0, 0x10080000L, active1, 0L);
case 68:
case 100:
return jjMoveStringLiteralDfa6_0(active0, 0x48000000000L, active1, 0L);
case 69:
case 101:
if ((active0 & 0x4000000000000000L) != 0L)
return jjStartNfaWithStates_0(5, 62, 118);
return jjMoveStringLiteralDfa6_0(active0, 0x2020010402000000L, active1, 0L);
case 73:
case 105:
return jjMoveStringLiteralDfa6_0(active0, 0x200000000000L, active1, 0x2L);
case 76:
case 108:
return jjMoveStringLiteralDfa6_0(active0, 0x20000L, active1, 0x4L);
case 77:
case 109:
return jjMoveStringLiteralDfa6_0(active0, 0x800000000L, active1, 0L);
case 78:
case 110:
return jjMoveStringLiteralDfa6_0(active0, 0x40000000008000L, active1, 0x10L);
case 79:
case 111:
if ((active0 & 0x20000000000L) != 0L)
return jjStartNfaWithStates_0(5, 41, 118);
return jjMoveStringLiteralDfa6_0(active0, 0x1080000000000L, active1, 0L);
case 80:
case 112:
if ((active0 & 0x800000L) != 0L)
return jjStartNfaWithStates_0(5, 23, 118);
break;
case 82:
case 114:
if ((active0 & 0x40000L) != 0L)
return jjStartNfaWithStates_0(5, 18, 118);
else if ((active0 & 0x4000000000L) != 0L)
return jjStartNfaWithStates_0(5, 38, 118);
else if ((active0 & 0x4000000000000L) != 0L)
return jjStartNfaWithStates_0(5, 50, 118);
return jjMoveStringLiteralDfa6_0(active0, 0x200400000L, active1, 0L);
case 84:
case 116:
return jjMoveStringLiteralDfa6_0(active0, 0x40010000L, active1, 0L);
case 85:
case 117:
return jjMoveStringLiteralDfa6_0(active0, 0x5000000L, active1, 0L);
default :
break;
}
return jjStartNfa_0(4, active0, active1);
}
private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(4, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(5, active0, active1);
return 6;
}
switch(curChar)
{
case 41:
if ((active0 & 0x1000000000L) != 0L)
return jjStopAtPos(6, 36);
break;
case 95:
return jjMoveStringLiteralDfa7_0(active0, 0x10000000000L, active1, 0L);
case 65:
case 97:
return jjMoveStringLiteralDfa7_0(active0, 0x8200418000L, active1, 0L);
case 67:
case 99:
return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x10L);
case 70:
case 102:
return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x40L);
case 72:
case 104:
return jjMoveStringLiteralDfa7_0(active0, 0x2000000000L, active1, 0L);
case 73:
case 105:
return jjMoveStringLiteralDfa7_0(active0, 0x408100a0000L, active1, 0L);
case 77:
case 109:
return jjMoveStringLiteralDfa7_0(active0, 0x1000000L, active1, 0x2L);
case 78:
case 110:
if ((active0 & 0x80000000000L) != 0L)
return jjStartNfaWithStates_0(6, 43, 118);
break;
case 79:
case 111:
if ((active0 & 0x40000000L) != 0L)
return jjStartNfaWithStates_0(6, 30, 118);
else if ((active0 & 0x200000000000L) != 0L)
return jjStartNfaWithStates_0(6, 45, 118);
else if ((active0 & 0x40000000000000L) != 0L)
return jjStartNfaWithStates_0(6, 54, 118);
else if ((active1 & 0x4L) != 0L)
return jjStopAtPos(6, 66);
break;
case 80:
case 112:
return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x20L);
case 82:
case 114:
if ((active0 & 0x4000L) != 0L)
return jjStartNfaWithStates_0(6, 14, 118);
else if ((active0 & 0x400000000L) != 0L)
return jjStartNfaWithStates_0(6, 34, 118);
else if ((active0 & 0x800000000000L) != 0L)
return jjStartNfaWithStates_0(6, 47, 118);
else if ((active0 & 0x2000000000000L) != 0L)
return jjStartNfaWithStates_0(6, 49, 118);
else if ((active0 & 0x8000000000000L) != 0L)
return jjStartNfaWithStates_0(6, 51, 118);
else if ((active0 & 0x2000000000000000L) != 0L)
return jjStartNfaWithStates_0(6, 61, 118);
return jjMoveStringLiteralDfa7_0(active0, 0x801000004300000L, active1, 0L);
case 83:
case 115:
if ((active0 & 0x20000000000000L) != 0L)
return jjStartNfaWithStates_0(6, 53, 118);
break;
case 84:
case 116:
return jjMoveStringLiteralDfa7_0(active0, 0x2000000L, active1, 0L);
default :
break;
}
return jjStartNfa_0(5, active0, active1);
}
private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(5, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(6, active0, active1);
return 7;
}
switch(curChar)
{
case 32:
return jjMoveStringLiteralDfa8_0(active0, 0x800000000300000L, active1, 0L);
case 65:
case 97:
return jjMoveStringLiteralDfa8_0(active0, 0x4000000L, active1, 0L);
case 68:
case 100:
if ((active0 & 0x1000000000000L) != 0L)
return jjStartNfaWithStates_0(7, 48, 118);
break;
case 69:
case 101:
if ((active1 & 0x2L) != 0L)
return jjStartNfaWithStates_0(7, 65, 118);
break;
case 77:
case 109:
return jjMoveStringLiteralDfa8_0(active0, 0x40000000000L, active1, 0L);
case 79:
case 111:
if ((active0 & 0x2000000L) != 0L)
return jjStartNfaWithStates_0(7, 25, 118);
return jjMoveStringLiteralDfa8_0(active0, 0x2010080000L, active1, 0x40L);
case 80:
case 112:
if ((active0 & 0x1000000L) != 0L)
return jjStartNfaWithStates_0(7, 24, 118);
break;
case 82:
case 114:
if ((active0 & 0x8000L) != 0L)
return jjStartNfaWithStates_0(7, 15, 118);
else if ((active0 & 0x10000L) != 0L)
return jjStartNfaWithStates_0(7, 16, 118);
else if ((active0 & 0x400000L) != 0L)
return jjStartNfaWithStates_0(7, 22, 118);
else if ((active0 & 0x800000000L) != 0L)
return jjStartNfaWithStates_0(7, 35, 118);
return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x30L);
case 83:
case 115:
if ((active0 & 0x200000000L) != 0L)
return jjStartNfaWithStates_0(7, 33, 118);
break;
case 84:
case 116:
return jjMoveStringLiteralDfa8_0(active0, 0x18000000000L, active1, 0L);
case 90:
case 122:
return jjMoveStringLiteralDfa8_0(active0, 0x20000L, active1, 0L);
default :
break;
}
return jjStartNfa_0(6, active0, active1);
}
private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(6, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(7, active0, active1);
return 8;
}
switch(curChar)
{
case 65:
case 97:
return jjMoveStringLiteralDfa9_0(active0, 0x10000020000L, active1, 0L);
case 69:
case 101:
return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x10L);
case 73:
case 105:
return jjMoveStringLiteralDfa9_0(active0, 0x40000000000L, active1, 0x20L);
case 78:
case 110:
return jjMoveStringLiteralDfa9_0(active0, 0x10080000L, active1, 0L);
case 79:
case 111:
return jjMoveStringLiteralDfa9_0(active0, 0x8000000000L, active1, 0L);
case 80:
case 112:
return jjMoveStringLiteralDfa9_0(active0, 0x800000000300000L, active1, 0L);
case 82:
case 114:
if ((active0 & 0x4000000L) != 0L)
return jjStartNfaWithStates_0(8, 26, 118);
return jjMoveStringLiteralDfa9_0(active0, 0x2000000000L, active1, 0x40L);
default :
break;
}
return jjStartNfa_0(7, active0, active1);
}
private int jjMoveStringLiteralDfa9_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(7, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(8, active0, active1);
return 9;
}
switch(curChar)
{
case 65:
case 97:
if ((active0 & 0x10000000L) != 0L)
{
jjmatchedKind = 28;
jjmatchedPos = 9;
}
return jjMoveStringLiteralDfa10_0(active0, 0x2000080000L, active1, 0x40L);
case 66:
case 98:
return jjMoveStringLiteralDfa10_0(active0, 0x10000000000L, active1, 0L);
case 69:
case 101:
return jjMoveStringLiteralDfa10_0(active0, 0x40000300000L, active1, 0L);
case 77:
case 109:
return jjMoveStringLiteralDfa10_0(active0, 0L, active1, 0x30L);
case 79:
case 111:
return jjMoveStringLiteralDfa10_0(active0, 0x800000000000000L, active1, 0L);
case 82:
case 114:
if ((active0 & 0x20000L) != 0L)
return jjStartNfaWithStates_0(9, 17, 118);
break;
case 83:
case 115:
if ((active0 & 0x8000000000L) != 0L)
return jjStartNfaWithStates_0(9, 39, 118);
break;
default :
break;
}
return jjStartNfa_0(8, active0, active1);
}
private int jjMoveStringLiteralDfa10_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(8, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(9, active0, active1);
return 10;
}
switch(curChar)
{
case 40:
return jjMoveStringLiteralDfa11_0(active0, 0x2000000000L, active1, 0L);
case 65:
case 97:
return jjMoveStringLiteralDfa11_0(active0, 0L, active1, 0x20L);
case 69:
case 101:
return jjMoveStringLiteralDfa11_0(active0, 0L, active1, 0x10L);
case 76:
case 108:
return jjMoveStringLiteralDfa11_0(active0, 0x10000000000L, active1, 0L);
case 78:
case 110:
return jjMoveStringLiteralDfa11_0(active0, 0x40000000000L, active1, 0x40L);
case 82:
case 114:
if ((active0 & 0x80000L) != 0L)
return jjStartNfaWithStates_0(10, 19, 118);
else if ((active0 & 0x800000000000000L) != 0L)
return jjStopAtPos(10, 59);
return jjMoveStringLiteralDfa11_0(active0, 0x300000L, active1, 0L);
default :
break;
}
return jjStartNfa_0(9, active0, active1);
}
private int jjMoveStringLiteralDfa11_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(9, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(10, active0, active1);
return 11;
}
switch(curChar)
{
case 41:
if ((active0 & 0x2000000000L) != 0L)
return jjStopAtPos(11, 37);
break;
case 65:
case 97:
if ((active0 & 0x10000000000L) != 0L)
return jjStartNfaWithStates_0(11, 40, 118);
break;
case 69:
case 101:
return jjMoveStringLiteralDfa12_0(active0, 0L, active1, 0x40L);
case 77:
case 109:
return jjMoveStringLiteralDfa12_0(active0, 0x300000L, active1, 0L);
case 78:
case 110:
return jjMoveStringLiteralDfa12_0(active0, 0L, active1, 0x10L);
case 82:
case 114:
return jjMoveStringLiteralDfa12_0(active0, 0L, active1, 0x20L);
case 84:
case 116:
return jjMoveStringLiteralDfa12_0(active0, 0x40000000000L, active1, 0L);
default :
break;
}
return jjStartNfa_0(10, active0, active1);
}
private int jjMoveStringLiteralDfa12_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(10, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(11, active0, active1);
return 12;
}
switch(curChar)
{
case 65:
case 97:
if ((active1 & 0x40L) != 0L)
return jjStartNfaWithStates_0(12, 70, 118);
break;
case 73:
case 105:
return jjMoveStringLiteralDfa13_0(active0, 0x300000L, active1, 0x20L);
case 79:
case 111:
if ((active0 & 0x40000000000L) != 0L)
return jjStartNfaWithStates_0(12, 42, 118);
break;
case 84:
case 116:
return jjMoveStringLiteralDfa13_0(active0, 0L, active1, 0x10L);
default :
break;
}
return jjStartNfa_0(11, active0, active1);
}
private int jjMoveStringLiteralDfa13_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(11, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(12, active0, active1);
return 13;
}
switch(curChar)
{
case 65:
case 97:
if ((active1 & 0x20L) != 0L)
return jjStartNfaWithStates_0(13, 69, 118);
return jjMoveStringLiteralDfa14_0(active0, 0L, active1, 0x10L);
case 83:
case 115:
return jjMoveStringLiteralDfa14_0(active0, 0x300000L, active1, 0L);
default :
break;
}
return jjStartNfa_0(12, active0, active1);
}
private int jjMoveStringLiteralDfa14_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(12, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(13, active0, active1);
return 14;
}
switch(curChar)
{
case 66:
case 98:
return jjMoveStringLiteralDfa15_0(active0, 0L, active1, 0x10L);
case 79:
case 111:
return jjMoveStringLiteralDfa15_0(active0, 0x300000L, active1, 0L);
default :
break;
}
return jjStartNfa_0(13, active0, active1);
}
private int jjMoveStringLiteralDfa15_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(13, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(14, active0, active1);
return 15;
}
switch(curChar)
{
case 76:
case 108:
return jjMoveStringLiteralDfa16_0(active0, 0L, active1, 0x10L);
case 83:
case 115:
if ((active0 & 0x100000L) != 0L)
return jjStopAtPos(15, 20);
else if ((active0 & 0x200000L) != 0L)
return jjStopAtPos(15, 21);
break;
default :
break;
}
return jjStartNfa_0(14, active0, active1);
}
private int jjMoveStringLiteralDfa16_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(14, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(15, 0L, active1);
return 16;
}
switch(curChar)
{
case 69:
case 101:
if ((active1 & 0x10L) != 0L)
return jjStartNfaWithStates_0(16, 68, 118);
break;
default :
break;
}
return jjStartNfa_0(15, 0L, active1);
}
private int jjStartNfaWithStates_0(int pos, int kind, int state)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { return pos + 1; }
return jjMoveNfa_0(state, pos + 1);
}
static final long[] jjbitVec0 = {
0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
};
static final long[] jjbitVec2 = {
0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
};
private int jjMoveNfa_0(int startState, int curPos)
{
int startsAt = 0;
jjnewStateCnt = 118;
int i = 1;
jjstateSet[0] = startState;
int kind = 0x7fffffff;
for (;;)
{
if (++jjround == 0x7fffffff)
ReInitRounds();
if (curChar < 64)
{
long l = 1L << curChar;
do
{
switch(jjstateSet[--i])
{
case 10:
if ((0x3ff000000000000L & l) != 0L)
{
if (kind > 82)
kind = 82;
{ jjCheckNAddStates(0, 2); }
}
else if (curChar == 39)
{ jjCheckNAddStates(3, 8); }
else if (curChar == 34)
{ jjCheckNAddStates(9, 13); }
if ((0x3000000000000L & l) != 0L)
{
if (kind > 81)
kind = 81;
}
break;
case 118:
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAddTwoStates(18, 19); }
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 20;
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAddTwoStates(14, 15); }
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 16;
if ((0x3ff000000000000L & l) != 0L)
{
if (kind > 72)
kind = 72;
{ jjCheckNAdd(13); }
}
break;
case 52:
if ((0xfffffffbffffdbffL & l) != 0L)
{ jjCheckNAddStates(14, 16); }
else if (curChar == 34)
{
if (kind > 114)
kind = 114;
}
break;
case 0:
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAddTwoStates(18, 19); }
else if (curChar == 58)
{ jjCheckNAddTwoStates(3, 9); }
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 20;
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAddTwoStates(14, 15); }
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 16;
if ((0x3ff000000000000L & l) != 0L)
{
if (kind > 72)
kind = 72;
{ jjCheckNAdd(13); }
}
break;
case 79:
if ((0x3fe000000000000L & l) != 0L)
{ jjCheckNAdd(96); }
else if (curChar == 48)
{ jjCheckNAdd(95); }
if ((0x3fe000000000000L & l) != 0L)
{ jjCheckNAdd(81); }
else if (curChar == 48)
{ jjCheckNAdd(80); }
if ((0xe000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 117;
if ((0xe000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 93;
break;
case 4:
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAddStates(17, 19); }
break;
case 9:
if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 8;
break;
case 11:
if ((0x3000000000000L & l) != 0L && kind > 81)
kind = 81;
break;
case 13:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 72)
kind = 72;
{ jjCheckNAdd(13); }
break;
case 14:
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAddTwoStates(14, 15); }
break;
case 15:
if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 16;
break;
case 17:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 73)
kind = 73;
jjstateSet[jjnewStateCnt++] = 17;
break;
case 18:
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAddTwoStates(18, 19); }
break;
case 19:
if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 20;
break;
case 21:
if ((0x3ff000000000000L & l) != 0L)
{ jjAddStates(20, 21); }
break;
case 22:
if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 23;
break;
case 24:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 74)
kind = 74;
jjstateSet[jjnewStateCnt++] = 24;
break;
case 27:
if ((0x3ff000000000000L & l) != 0L)
{ jjAddStates(22, 23); }
break;
case 28:
if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 29;
break;
case 30:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 75)
kind = 75;
jjstateSet[jjnewStateCnt++] = 30;
break;
case 32:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 76)
kind = 76;
jjstateSet[jjnewStateCnt++] = 32;
break;
case 34:
if ((0x3ff000000000000L & l) != 0L)
{ jjAddStates(24, 25); }
break;
case 35:
if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 36;
break;
case 37:
if ((0x3ff000000000000L & l) != 0L)
{ jjAddStates(26, 27); }
break;
case 38:
if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 39;
break;
case 40:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 77)
kind = 77;
jjstateSet[jjnewStateCnt++] = 40;
break;
case 41:
if (curChar == 34)
{ jjCheckNAddStates(9, 13); }
break;
case 42:
if (curChar == 58)
{ jjCheckNAddTwoStates(45, 51); }
break;
case 46:
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAddStates(28, 30); }
break;
case 48:
if (curChar == 34 && kind > 79)
kind = 79;
break;
case 51:
if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 50;
break;
case 53:
if (curChar == 58)
{ jjCheckNAddTwoStates(56, 63); }
break;
case 57:
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAddStates(31, 33); }
break;
case 59:
if (curChar == 34 && kind > 80)
kind = 80;
break;
case 63:
if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 62;
break;
case 65:
if ((0xfffffffbffffdbffL & l) != 0L)
{ jjCheckNAddStates(14, 16); }
break;
case 67:
if ((0x8400000000L & l) != 0L)
{ jjCheckNAddStates(14, 16); }
break;
case 68:
if (curChar == 34 && kind > 114)
kind = 114;
break;
case 69:
if ((0xff000000000000L & l) != 0L)
{ jjCheckNAddStates(34, 37); }
break;
case 70:
if ((0xff000000000000L & l) != 0L)
{ jjCheckNAddStates(14, 16); }
break;
case 71:
if ((0xf000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 72;
break;
case 72:
if ((0xff000000000000L & l) != 0L)
{ jjCheckNAdd(70); }
break;
case 73:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 82)
kind = 82;
{ jjCheckNAddStates(0, 2); }
break;
case 74:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 82)
kind = 82;
{ jjCheckNAdd(74); }
break;
case 75:
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAddTwoStates(75, 76); }
break;
case 76:
if (curChar == 46)
{ jjCheckNAdd(77); }
break;
case 77:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 83)
kind = 83;
{ jjCheckNAdd(77); }
break;
case 78:
if (curChar == 39)
{ jjCheckNAddStates(3, 8); }
break;
case 80:
if ((0x3fe000000000000L & l) != 0L)
{ jjCheckNAdd(81); }
break;
case 81:
if (curChar == 45)
{ jjCheckNAddStates(38, 40); }
break;
case 82:
if (curChar == 48)
{ jjCheckNAdd(83); }
break;
case 83:
if ((0x3fe000000000000L & l) != 0L)
{ jjCheckNAdd(84); }
break;
case 84:
if (curChar == 45)
jjstateSet[jjnewStateCnt++] = 85;
break;
case 85:
if ((0x3fe000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 86;
break;
case 86:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 87;
break;
case 87:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 88;
break;
case 88:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 89;
break;
case 89:
if (curChar == 39 && kind > 84)
kind = 84;
break;
case 90:
if (curChar == 49)
jjstateSet[jjnewStateCnt++] = 91;
break;
case 91:
if ((0x7000000000000L & l) != 0L)
{ jjCheckNAdd(84); }
break;
case 92:
if ((0xe000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 93;
break;
case 93:
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAdd(81); }
break;
case 94:
if (curChar == 48)
{ jjCheckNAdd(95); }
break;
case 95:
if ((0x3fe000000000000L & l) != 0L)
{ jjCheckNAdd(96); }
break;
case 96:
if (curChar == 45)
{ jjCheckNAddStates(41, 43); }
break;
case 97:
if (curChar == 48)
{ jjCheckNAdd(98); }
break;
case 98:
if ((0x3fe000000000000L & l) != 0L)
{ jjCheckNAdd(99); }
break;
case 99:
if (curChar == 45)
jjstateSet[jjnewStateCnt++] = 100;
break;
case 100:
if ((0x3fe000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 101;
break;
case 101:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 102;
break;
case 102:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 103;
break;
case 103:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 104;
break;
case 104:
if (curChar == 32)
jjstateSet[jjnewStateCnt++] = 105;
break;
case 105:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 106;
break;
case 106:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 107;
break;
case 107:
if (curChar == 58)
jjstateSet[jjnewStateCnt++] = 108;
break;
case 108:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 109;
break;
case 109:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 110;
break;
case 110:
if (curChar == 58)
jjstateSet[jjnewStateCnt++] = 111;
break;
case 111:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 112;
break;
case 112:
if ((0x3ff000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 113;
break;
case 113:
if (curChar == 39 && kind > 85)
kind = 85;
break;
case 114:
if (curChar == 49)
jjstateSet[jjnewStateCnt++] = 115;
break;
case 115:
if ((0x7000000000000L & l) != 0L)
{ jjCheckNAdd(99); }
break;
case 116:
if ((0xe000000000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 117;
break;
case 117:
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAdd(96); }
break;
default : break;
}
} while(i != startsAt);
}
else if (curChar < 128)
{
long l = 1L << (curChar & 077);
do
{
switch(jjstateSet[--i])
{
case 10:
if ((0x7fffffe07fffffeL & l) != 0L)
{
if (kind > 72)
kind = 72;
{ jjCheckNAddStates(44, 48); }
}
else if (curChar == 64)
{ jjAddStates(49, 51); }
if ((0x800000008L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 0;
break;
case 118:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(18, 19); }
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(14, 15); }
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 72)
kind = 72;
{ jjCheckNAdd(13); }
}
break;
case 52:
if ((0xffffffffefffffffL & l) != 0L)
{ jjCheckNAddStates(14, 16); }
else if (curChar == 92)
{ jjAddStates(52, 54); }
if ((0x800000008L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 53;
if ((0x800000008L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 42;
break;
case 0:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(18, 19); }
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(14, 15); }
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 72)
kind = 72;
{ jjCheckNAdd(13); }
}
break;
case 1:
if (curChar == 92)
jjstateSet[jjnewStateCnt++] = 2;
break;
case 2:
if ((0x7fffffe07fffffeL & l) != 0L)
{ jjCheckNAddStates(17, 19); }
break;
case 3:
if (curChar == 92)
jjstateSet[jjnewStateCnt++] = 1;
break;
case 4:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddStates(17, 19); }
break;
case 5:
if ((0x800000008L & l) != 0L && kind > 78)
kind = 78;
break;
case 6:
if ((0x200000002L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 5;
break;
case 7:
if ((0x8000000080000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 6;
break;
case 8:
if ((0x20000000200000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 7;
break;
case 12:
if ((0x7fffffe07fffffeL & l) == 0L)
break;
if (kind > 72)
kind = 72;
{ jjCheckNAddStates(44, 48); }
break;
case 13:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 72)
kind = 72;
{ jjCheckNAdd(13); }
break;
case 14:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(14, 15); }
break;
case 16:
if ((0x7fffffe07fffffeL & l) == 0L)
break;
if (kind > 73)
kind = 73;
{ jjCheckNAdd(17); }
break;
case 17:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 73)
kind = 73;
{ jjCheckNAdd(17); }
break;
case 18:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(18, 19); }
break;
case 20:
if ((0x7fffffe07fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(21, 22); }
break;
case 21:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(21, 22); }
break;
case 23:
if ((0x7fffffe07fffffeL & l) == 0L)
break;
if (kind > 74)
kind = 74;
{ jjCheckNAdd(24); }
break;
case 24:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 74)
kind = 74;
{ jjCheckNAdd(24); }
break;
case 25:
if (curChar == 64)
{ jjAddStates(49, 51); }
break;
case 26:
if ((0x7fffffe07fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(27, 28); }
break;
case 27:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(27, 28); }
break;
case 29:
if ((0x7fffffe07fffffeL & l) == 0L)
break;
if (kind > 75)
kind = 75;
{ jjCheckNAdd(30); }
break;
case 30:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 75)
kind = 75;
{ jjCheckNAdd(30); }
break;
case 31:
if ((0x7fffffe07fffffeL & l) == 0L)
break;
if (kind > 76)
kind = 76;
{ jjCheckNAdd(32); }
break;
case 32:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 76)
kind = 76;
{ jjCheckNAdd(32); }
break;
case 33:
if ((0x7fffffe07fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(34, 35); }
break;
case 34:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(34, 35); }
break;
case 36:
if ((0x7fffffe07fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(37, 38); }
break;
case 37:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(37, 38); }
break;
case 39:
if ((0x7fffffe07fffffeL & l) == 0L)
break;
if (kind > 77)
kind = 77;
{ jjCheckNAdd(40); }
break;
case 40:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 77)
kind = 77;
{ jjCheckNAdd(40); }
break;
case 43:
if (curChar == 92)
jjstateSet[jjnewStateCnt++] = 44;
break;
case 44:
if ((0x7fffffe07fffffeL & l) != 0L)
{ jjCheckNAddStates(28, 30); }
break;
case 45:
if (curChar == 92)
jjstateSet[jjnewStateCnt++] = 43;
break;
case 46:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddStates(28, 30); }
break;
case 47:
if ((0x1000000010000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 48;
break;
case 49:
if ((0x20000000200L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 47;
break;
case 50:
if ((0x400000004000000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 49;
break;
case 54:
if (curChar == 92)
jjstateSet[jjnewStateCnt++] = 55;
break;
case 55:
if ((0x7fffffe07fffffeL & l) != 0L)
{ jjCheckNAddStates(31, 33); }
break;
case 56:
if (curChar == 92)
jjstateSet[jjnewStateCnt++] = 54;
break;
case 57:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddStates(31, 33); }
break;
case 58:
if ((0x1000000010000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 59;
break;
case 60:
if ((0x200000002000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 58;
break;
case 61:
if ((0x1000000010L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 60;
break;
case 62:
if ((0x20000000200000L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 61;
break;
case 64:
if ((0x800000008L & l) != 0L)
jjstateSet[jjnewStateCnt++] = 53;
break;
case 65:
if ((0xffffffffefffffffL & l) != 0L)
{ jjCheckNAddStates(14, 16); }
break;
case 66:
if (curChar == 92)
{ jjAddStates(52, 54); }
break;
case 67:
if ((0x14404410144044L & l) != 0L)
{ jjCheckNAddStates(14, 16); }
break;
default : break;
}
} while(i != startsAt);
}
else
{
int hiByte = (curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
long l2 = 1L << (curChar & 077);
do
{
switch(jjstateSet[--i])
{
case 52:
case 65:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
{ jjCheckNAddStates(14, 16); }
break;
default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
}
} while(i != startsAt);
}
if (kind != 0x7fffffff)
{
jjmatchedKind = kind;
jjmatchedPos = curPos;
kind = 0x7fffffff;
}
++curPos;
if ((i = jjnewStateCnt) == (startsAt = 118 - (jjnewStateCnt = startsAt)))
return curPos;
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { return curPos; }
}
}
private int jjMoveStringLiteralDfa0_1()
{
return jjMoveNfa_1(0, 0);
}
private int jjMoveNfa_1(int startState, int curPos)
{
int startsAt = 0;
jjnewStateCnt = 3;
int i = 1;
jjstateSet[0] = startState;
int kind = 0x7fffffff;
for (;;)
{
if (++jjround == 0x7fffffff)
ReInitRounds();
if (curChar < 64)
{
long l = 1L << curChar;
do
{
switch(jjstateSet[--i])
{
case 0:
if ((0x2400L & l) != 0L)
{
if (kind > 9)
kind = 9;
}
if (curChar == 13)
jjstateSet[jjnewStateCnt++] = 1;
break;
case 1:
if (curChar == 10 && kind > 9)
kind = 9;
break;
case 2:
if (curChar == 13)
jjstateSet[jjnewStateCnt++] = 1;
break;
default : break;
}
} while(i != startsAt);
}
else if (curChar < 128)
{
long l = 1L << (curChar & 077);
do
{
switch(jjstateSet[--i])
{
default : break;
}
} while(i != startsAt);
}
else
{
int hiByte = (curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
long l2 = 1L << (curChar & 077);
do
{
switch(jjstateSet[--i])
{
default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
}
} while(i != startsAt);
}
if (kind != 0x7fffffff)
{
jjmatchedKind = kind;
jjmatchedPos = curPos;
kind = 0x7fffffff;
}
++curPos;
if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
return curPos;
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { return curPos; }
}
}
private int jjMoveStringLiteralDfa0_2(){
switch(curChar)
{
case 42:
return jjMoveStringLiteralDfa1_2(0x400L);
default :
return 1;
}
}
private int jjMoveStringLiteralDfa1_2(long active0){
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
return 1;
}
switch(curChar)
{
case 35:
if ((active0 & 0x400L) != 0L)
return jjStopAtPos(1, 10);
break;
default :
return 2;
}
return 2;
}
static final int[] jjnextStates = {
74, 75, 76, 79, 80, 92, 94, 95, 116, 52, 64, 65, 66, 68, 65, 66,
68, 3, 4, 9, 21, 22, 27, 28, 34, 35, 37, 38, 45, 46, 51, 56,
57, 63, 65, 66, 70, 68, 82, 83, 90, 97, 98, 114, 13, 14, 15, 18,
19, 26, 31, 33, 67, 69, 71,
};
private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
{
switch(hiByte)
{
case 0:
return ((jjbitVec2[i2] & l2) != 0L);
default :
if ((jjbitVec0[i1] & l1) != 0L)
return true;
return false;
}
}
/** Token literal values. */
public static final String[] jjstrLiteralImages = {
"", null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, "\53", "\55", "\57", "\52", "\136", "\75\75", "\41\75", "\76",
"\74", "\74\75", "\76\75", "\46\46", "\174\174", "\41", "\45", "\44", "\50", "\51",
"\73", "\54", "\173", "\175", "\75", "\72", "\74\74", "\76\76", "\56", "\47", null,
"\42", };
protected Token jjFillToken()
{
final Token t;
final String curTokenImage;
final int beginLine;
final int endLine;
final int beginColumn;
final int endColumn;
String im = jjstrLiteralImages[jjmatchedKind];
curTokenImage = (im == null) ? input_stream.GetImage() : im;
beginLine = input_stream.getBeginLine();
beginColumn = input_stream.getBeginColumn();
endLine = input_stream.getEndLine();
endColumn = input_stream.getEndColumn();
t = Token.newToken(jjmatchedKind, curTokenImage);
t.beginLine = beginLine;
t.endLine = endLine;
t.beginColumn = beginColumn;
t.endColumn = endColumn;
return t;
}
int curLexState = 0;
int defaultLexState = 0;
int jjnewStateCnt;
int jjround;
int jjmatchedPos;
int jjmatchedKind;
/** Get the next Token. */
public Token getNextToken()
{
Token specialToken = null;
Token matchedToken;
int curPos = 0;
EOFLoop :
for (;;)
{
try
{
curChar = input_stream.BeginToken();
}
catch(java.io.IOException e)
{
jjmatchedKind = 0;
jjmatchedPos = -1;
matchedToken = jjFillToken();
matchedToken.specialToken = specialToken;
return matchedToken;
}
image = jjimage;
image.setLength(0);
jjimageLen = 0;
for (;;)
{
switch(curLexState)
{
case 0:
try { input_stream.backup(0);
while (curChar <= 32 && (0x100000600L & (1L << curChar)) != 0L)
curChar = input_stream.BeginToken();
}
catch (java.io.IOException e1) { continue EOFLoop; }
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_0();
break;
case 1:
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_1();
if (jjmatchedPos == 0 && jjmatchedKind > 11)
{
jjmatchedKind = 11;
}
break;
case 2:
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_2();
if (jjmatchedPos == 0 && jjmatchedKind > 11)
{
jjmatchedKind = 11;
}
break;
}
if (jjmatchedKind != 0x7fffffff)
{
if (jjmatchedPos + 1 < curPos)
input_stream.backup(curPos - jjmatchedPos - 1);
if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
{
matchedToken = jjFillToken();
matchedToken.specialToken = specialToken;
if (jjnewLexState[jjmatchedKind] != -1)
curLexState = jjnewLexState[jjmatchedKind];
return matchedToken;
}
else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
{
if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
{
matchedToken = jjFillToken();
if (specialToken == null)
specialToken = matchedToken;
else
{
matchedToken.specialToken = specialToken;
specialToken = (specialToken.next = matchedToken);
}
SkipLexicalActions(matchedToken);
}
else
SkipLexicalActions(null);
if (jjnewLexState[jjmatchedKind] != -1)
curLexState = jjnewLexState[jjmatchedKind];
continue EOFLoop;
}
jjimageLen += jjmatchedPos + 1;
if (jjnewLexState[jjmatchedKind] != -1)
curLexState = jjnewLexState[jjmatchedKind];
curPos = 0;
jjmatchedKind = 0x7fffffff;
try {
curChar = input_stream.readChar();
continue;
}
catch (java.io.IOException e1) { }
}
int error_line = input_stream.getEndLine();
int error_column = input_stream.getEndColumn();
String error_after = null;
boolean EOFSeen = false;
try { input_stream.readChar(); input_stream.backup(1); }
catch (java.io.IOException e1) {
EOFSeen = true;
error_after = curPos <= 1 ? "" : input_stream.GetImage();
if (curChar == '\n' || curChar == '\r') {
error_line++;
error_column = 0;
}
else
error_column++;
}
if (!EOFSeen) {
input_stream.backup(1);
error_after = curPos <= 1 ? "" : input_stream.GetImage();
}
throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
}
}
}
void SkipLexicalActions(Token matchedToken)
{
switch(jjmatchedKind)
{
default :
break;
}
}
private void jjCheckNAdd(int state)
{
if (jjrounds[state] != jjround)
{
jjstateSet[jjnewStateCnt++] = state;
jjrounds[state] = jjround;
}
}
private void jjAddStates(int start, int end)
{
do {
jjstateSet[jjnewStateCnt++] = jjnextStates[start];
} while (start++ != end);
}
private void jjCheckNAddTwoStates(int state1, int state2)
{
jjCheckNAdd(state1);
jjCheckNAdd(state2);
}
private void jjCheckNAddStates(int start, int end)
{
do {
jjCheckNAdd(jjnextStates[start]);
} while (start++ != end);
}
/** Constructor. */
public grausuTokenManager(SimpleCharStream stream){
if (SimpleCharStream.staticFlag)
throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
input_stream = stream;
}
/** Constructor. */
public grausuTokenManager (SimpleCharStream stream, int lexState){
ReInit(stream);
SwitchTo(lexState);
}
/** Reinitialise parser. */
public void ReInit(SimpleCharStream stream)
{
jjmatchedPos = jjnewStateCnt = 0;
curLexState = defaultLexState;
input_stream = stream;
ReInitRounds();
}
private void ReInitRounds()
{
int i;
jjround = 0x80000001;
for (i = 118; i-- > 0;)
jjrounds[i] = 0x80000000;
}
/** Reinitialise parser. */
public void ReInit(SimpleCharStream stream, int lexState)
{
ReInit(stream);
SwitchTo(lexState);
}
/** Switch to specified lex state. */
public void SwitchTo(int lexState)
{
if (lexState >= 3 || lexState < 0)
throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
else
curLexState = lexState;
}
/** Lexer state names. */
public static final String[] lexStateNames = {
"DEFAULT",
"Comentario_una_linea",
"Comentario_varias_lineas",
};
/** Lex State array. */
public static final int[] jjnewLexState = {
-1, -1, -1, -1, -1, -1, -1, 1, 2, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
};
static final long[] jjtoToken = {
0xfffffffffffff001L, 0xfffffffffffffL,
};
static final long[] jjtoSkip = {
0x67eL, 0x0L,
};
static final long[] jjtoSpecial = {
0x600L, 0x0L,
};
static final long[] jjtoMore = {
0x980L, 0x0L,
};
protected SimpleCharStream input_stream;
private final int[] jjrounds = new int[118];
private final int[] jjstateSet = new int[2 * 118];
private final StringBuilder jjimage = new StringBuilder();
private StringBuilder image = jjimage;
private int jjimageLen;
private int lengthOfMatch;
protected char curChar;
}
| [
"james.melgar@gmail.com"
] | james.melgar@gmail.com |
26fb56e7fb55afe58ee00865a2dc56ec38096757 | 43ce6ddae68f5405c0cb9af6a7bedfb16e0c25d2 | /src/org/usfirst/frc319/SteamworksBob319/CommandGroups/BlankCommandGroup.java | 296dc05db65345d9f6b4dd9fed14d3230804d98d | [] | no_license | Team319/SteamworksBob319 | 104969ef79ef3c1f92a0b5d8da3999bcf4bd5dc0 | 4587affb6994c8bb1fd273246f5b2d4159aa99a9 | refs/heads/master | 2021-01-11T17:12:57.701533 | 2017-10-12T18:19:49 | 2017-10-12T18:19:49 | 79,740,547 | 0 | 0 | null | 2017-10-12T18:19:50 | 2017-01-22T19:40:25 | Java | UTF-8 | Java | false | false | 1,451 | java | // RobotBuilder Version: 2.0
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in the future.
package org.usfirst.frc319.SteamworksBob319.CommandGroups;
import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc319.SteamworksBob319.subsystems.*;
/**
*
*/
public class BlankCommandGroup extends CommandGroup {
public BlankCommandGroup() {
// Add Commands here:
// e.g. addSequential(new Command1());
// addSequential(new Command2());
// these will run in order.
// To run multiple commands at the same time,
// use addParallel()
// e.g. addParallel(new Command1());
// addSequential(new Command2());
// Command1 and Command2 will run in parallel.
// A command group will require all of the subsystems that each member
// would require.
// e.g. if Command1 requires chassis, and Command2 requires arm,
// a CommandGroup containing them would require both the chassis and the
// arm.
}
}
| [
"BigBadBob319@gmail.com"
] | BigBadBob319@gmail.com |
7af2ca5812ecd8ba11acb22f3bda534806b52e63 | a1d3aa27bfec92ef6c53c47135063a5b37eb79c4 | /BackEnd/Core/sailfish-core/src/main/java/com/exactpro/sf/scriptrunner/impl/StatisticScriptReport.java | c6df5d21f900229ab17a70c3ea18db55af6b2627 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | 1ekrem/sailfish-core | 661159ca9c56a025302d6795c4e702568a588482 | b6051b1eb72b2bde5731a7e645f9ea4b8f92c514 | refs/heads/master | 2020-05-01T16:36:15.334838 | 2018-12-29T12:28:57 | 2018-12-29T13:33:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,617 | java | /******************************************************************************
* Copyright 2009-2018 Exactpro (Exactpro Systems Limited)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.exactpro.sf.scriptrunner.impl;
import java.util.List;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.exactpro.sf.aml.AMLBlockType;
import com.exactpro.sf.aml.script.CheckPoint;
import com.exactpro.sf.comparison.ComparisonResult;
import com.exactpro.sf.embedded.statistics.StatisticsService;
import com.exactpro.sf.embedded.statistics.entities.Tag;
import com.exactpro.sf.scriptrunner.ReportUtils;
import com.exactpro.sf.scriptrunner.ScriptContext;
import com.exactpro.sf.scriptrunner.StatusDescription;
public class StatisticScriptReport extends DefaultScriptReport {
private static final Logger logger = LoggerFactory.getLogger(StatisticScriptReport.class);
private final StatisticsService statisticsService;
private final List<Tag> tags;
private final String reportFolder;
private String matrixName;
private long actionCouter = 1;
public StatisticScriptReport(StatisticsService statisticsService, String reportFilePath, List<Tag> tags) {
this.statisticsService = statisticsService;
this.tags = tags;
this.reportFolder = reportFilePath; //new File(reportFilePath).getParentFile().getName();
}
@Override
public void createReport(ScriptContext context, String name, String description, long scriptRunId, String environmentName, String userName) {
logger.debug("Create report {}, {}, {}, {}", name, description, scriptRunId, environmentName);
this.matrixName = name;
//this.scriptRunId = scriptRunId;
//this.environmentName = environmentName;
if(this.statisticsService != null) {
this.statisticsService.matrixStarted(matrixName, reportFolder, scriptRunId, environmentName, userName, tags,
context.getScriptDescriptionId());
}
}
@Override
public void createException(Throwable cause) {
if(this.statisticsService != null && actionCouter == 1) {
statisticsService.matrixEception(matrixName, cause);
}
}
@Override
public void closeReport() {
if(this.statisticsService != null) {
statisticsService.matrixFinished(matrixName);
}
}
@Override
public void createTestCase(String reference, String description, int order, int matrixOrder, String tcId, int tcHash, AMLBlockType type) {
String name = ReportUtils.generateTestCaseName(reference, matrixOrder, type);
logger.debug("Create test case {}", name);
if(this.statisticsService != null) {
this.statisticsService.testCaseStarted(this.matrixName, tcId, name.replaceAll("\\W", "_"), description, order, tcHash);
}
}
@Override
public void closeTestCase(StatusDescription status) {
if(this.statisticsService != null) {
String failReason = null;
if(status.getCause() != null) {
failReason = extractFailReason(status.getCause());
}
this.statisticsService.testCaseFinished(this.matrixName, status.getStatus(), failReason, status.getKnownBugs());
}
actionCouter = 1;
}
@Override
public void createAction(String name, String serviceName, String action, String msg, String description, Object inputParameters, CheckPoint checkPoint, String tag, int hash,
List<String> verificationsOrder) {
if(this.statisticsService != null) {
this.statisticsService.actionStarted(matrixName, serviceName, action, msg, description, actionCouter++, tag,
hash);
}
}
@Override
public void createAction(String name, String serviceName, String action, String msg, String description, List<Object> inputParameters, CheckPoint checkPoint, String tag, int hash,
List<String> verificationsOrder) {
if(this.statisticsService != null) {
this.statisticsService.actionStarted(matrixName, serviceName, action, msg, description, actionCouter++, tag,
hash);
}
}
@Override
public void closeAction(StatusDescription status, Object actionResult) {
if(this.statisticsService != null) {
String failReason = null;
if(status.getCause() != null) {
failReason = extractFailReason(status.getCause());
}
this.statisticsService.actionFinished(matrixName, status.getStatus(), failReason);
}
}
@Override
public void createVerification(String name, String description, StatusDescription status, ComparisonResult result) {
if (this.statisticsService != null) {
this.statisticsService.actionVerification(matrixName, result);
}
}
private String extractFailReason(Throwable t) {
Throwable root = ExceptionUtils.getRootCause(t);
t = ObjectUtils.defaultIfNull(root, t);
return t != null ? t.getMessage() : null;
}
}
| [
"nikita.smirnov@exactprosystems.com"
] | nikita.smirnov@exactprosystems.com |
a104bc398f76f9bf689f0fc31f9b4d8dc75e9c92 | 0175a417f4b12b80cc79edbcd5b7a83621ee97e5 | /flexodesktop/generators/flexogenerator/src/main/java/org/openflexo/generator/action/GCAction.java | a52cc73527e617c3d85943147b52c72433f1f6eb | [] | no_license | agilebirds/openflexo | c1ea42996887a4a171e81ddbd55c7c1e857cbad0 | 0250fc1061e7ae86c9d51a6f385878df915db20b | refs/heads/master | 2022-08-06T05:42:04.617144 | 2013-05-24T13:15:58 | 2013-05-24T13:15:58 | 2,372,131 | 11 | 6 | null | 2022-07-06T19:59:55 | 2011-09-12T15:44:45 | Java | UTF-8 | Java | false | false | 4,908 | java | /*
* (c) Copyright 2010-2011 AgileBirds
*
* This file is part of OpenFlexo.
*
* OpenFlexo is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* OpenFlexo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OpenFlexo. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.openflexo.generator.action;
import java.util.Vector;
import java.util.logging.Logger;
import org.openflexo.foundation.FlexoEditor;
import org.openflexo.foundation.action.FlexoActionType;
import org.openflexo.foundation.cg.CGFile;
import org.openflexo.foundation.cg.CGObject;
import org.openflexo.foundation.cg.GeneratedOutput.GeneratorFactory;
import org.openflexo.foundation.cg.GenerationRepository;
import org.openflexo.foundation.cg.action.AbstractGCAction;
import org.openflexo.generator.AbstractProjectGenerator;
import org.openflexo.generator.file.AbstractCGFile;
public abstract class GCAction<A extends GCAction<A, T1>, T1 extends CGObject> extends AbstractGCAction<A, T1> {
@SuppressWarnings("unused")
private static final Logger logger = Logger.getLogger(GCAction.class.getPackage().getName());
public static interface ProjectGeneratorFactory extends GeneratorFactory {
public AbstractProjectGenerator<? extends GenerationRepository> generatorForRepository(GenerationRepository repository);
}
public static ProjectGeneratorFactory getProjectGeneratorFactory(GenerationRepository repository) {
return (ProjectGeneratorFactory) repository.getGeneratedCode().getFactory();
}
private AbstractProjectGenerator<? extends GenerationRepository> _projectGenerator;
protected GCAction(FlexoActionType<A, T1, CGObject> actionType, T1 focusedObject, Vector<CGObject> globalSelection, FlexoEditor editor) {
super(actionType, focusedObject, globalSelection, editor);
}
@Override
public GenerationRepository getRepository() {
return getRepository(getFocusedObject(), getGlobalSelection());
}
public AbstractProjectGenerator<? extends GenerationRepository> getProjectGenerator() {
GenerationRepository repository = getRepository();
if (_projectGenerator == null && repository != null) {
if (repository.getProjectGenerator() instanceof AbstractProjectGenerator) {
_projectGenerator = (AbstractProjectGenerator<? extends GenerationRepository>) repository.getProjectGenerator();
}
if (_projectGenerator == null) {
if (getProjectGeneratorFactory(repository) != null) {
_projectGenerator = getProjectGeneratorFactory(repository).generatorForRepository(getRepository());
}
}
}
if (_projectGenerator != null) {
_projectGenerator.setAction(this);
}
return _projectGenerator;
}
public static AbstractProjectGenerator<? extends GenerationRepository> getProjectGenerator(GenerationRepository repository) {
if (repository == null) {
return null;
}
return getProjectGeneratorFactory(repository) != null ? getProjectGeneratorFactory(repository).generatorForRepository(repository)
: null;
}
public void setProjectGenerator(AbstractProjectGenerator<? extends GenerationRepository> aProjectGenerator) {
_projectGenerator = aProjectGenerator;
}
/**
* Return all AbstractCGFile concerned by current selection
*
* @return
*/
protected static Vector<AbstractCGFile> getSelectedCGFiles(CGObject focusedObject, Vector<CGObject> globalSelection) {
return getSelectedCGFiles(getRepository(focusedObject, globalSelection), getSelectedTopLevelObjects(focusedObject, globalSelection));
}
/**
* Return all AbstractCGFile concerned by current selection
*
* @return
*/
protected static Vector<AbstractCGFile> getSelectedCGFiles(GenerationRepository repository, Vector<CGObject> selectedTopLevelObject) {
Vector<AbstractCGFile> returned = new Vector<AbstractCGFile>();
for (CGFile file : repository.getFiles()) {
for (CGObject obj : selectedTopLevelObject) {
if (obj.contains(file) && file instanceof AbstractCGFile) {
returned.add((AbstractCGFile) file);
}
}
}
return returned;
}
/**
* Return all AbstractCGFile concerned by current selection
*
* @return
*/
protected Vector<AbstractCGFile> getSelectedCGFiles() {
return getSelectedCGFiles(getRepository(), getSelectedTopLevelObjects());
}
private boolean _saveBeforeGenerating = true;
public boolean getSaveBeforeGenerating() {
return _saveBeforeGenerating;
}
public void setSaveBeforeGenerating(boolean saveBeforeGenerating) {
_saveBeforeGenerating = saveBeforeGenerating;
}
}
| [
"guillaume.polet@gmail.com"
] | guillaume.polet@gmail.com |
807b8eded1174e788a0187e1299a67b030e4d0cf | 9c1e687a744aa637bc7deba1d7c2c52a17b2dcf4 | /seam-security/src/main/java/de/chkal/togglz/seam/security/FeatureAdmin.java | e9a97e6055a75c09bf3fe99609f9f5563b5360bc | [
"Apache-2.0"
] | permissive | mschroeer/togglz | e02d3948888491232161a1da60cf02f818c50836 | 9417ddbe35be6c7b90f729d0d2f54beaaae37d09 | refs/heads/master | 2021-01-18T07:18:43.734459 | 2012-02-03T17:01:10 | 2012-02-03T17:01:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 410 | java | package de.chkal.togglz.seam.security;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.jboss.seam.security.annotations.SecurityBindingType;
@SecurityBindingType
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.METHOD })
public @interface FeatureAdmin {
}
| [
"christian@kaltepoth.de"
] | christian@kaltepoth.de |
397f644a0c8e6b85800a0fa9a5e4a0808418212d | cd604017f6dcc833813536d6005e880d3e7be820 | /ahome-sencha-shared/src/main/java/com/ait/toolkit/sencha/shared/client/dom/CompositeElementLite.java | 03f082373c81abc499bb1db76318d561876a9fe8 | [] | no_license | dikalo/ahome-sencha-shared | ab302fb2aa498f7d23b23a91e324501a76df89b3 | 1af938cbc08d9a415e2f849dfb165b4b40fbc764 | refs/heads/master | 2021-06-05T12:12:19.141003 | 2016-07-19T12:13:51 | 2016-07-19T12:13:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,594 | java | /*
Copyright (c) 2014 Ahomé Innovation Technologies. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.ait.toolkit.sencha.shared.client.dom;
import com.google.gwt.core.client.JavaScriptObject;
/**
* Flyweight composite class. Reuses the same Ext.Element for element
* operations.
*/
public class CompositeElementLite extends CompositeElement {
public CompositeElementLite(JavaScriptObject jsObj) {
super(jsObj);
}
private static CompositeElementLite instance(JavaScriptObject jsObj) {
return new CompositeElementLite(jsObj);
}
/**
* Returns a flyweight Element of the dom element object at the specified
* index.
*
* @param index
* the element index
* @return the element at index
*/
public native ExtElement item(int index) /*-{
var cel = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();
var el = cel.item(index);
return el == null ? null
: @com.ait.toolkit.sencha.shared.client.dom.ExtElement::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(el);
}-*/;
} | [
"jazzmatadazz@gmail.com"
] | jazzmatadazz@gmail.com |
1675ca649f4c16a8c0c03e93e18bcc5bd69f2f7a | 8d09189d10a9cd1a1ba402b52a7749097b04e4a8 | /aws-java-sdk-snowball/src/main/java/com/amazonaws/services/snowball/model/transform/JobMetadataMarshaller.java | 3809eab603f6722b777f7e3aaf03e9a63df1cf06 | [
"Apache-2.0"
] | permissive | hboutemy/aws-sdk-java | 7b6b219479136cafbf348209a8e7e1b3f0e64d15 | f04ef821eb2f10b55bec4e527b9dbbfc3847c5c3 | refs/heads/master | 2021-01-03T12:28:29.649460 | 2020-02-11T22:33:24 | 2020-02-11T22:33:24 | 240,073,241 | 0 | 0 | Apache-2.0 | 2020-02-12T17:29:57 | 2020-02-12T17:29:56 | null | UTF-8 | Java | false | false | 7,073 | java | /*
* Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.snowball.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.snowball.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* JobMetadataMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class JobMetadataMarshaller {
private static final MarshallingInfo<String> JOBID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("JobId").build();
private static final MarshallingInfo<String> JOBSTATE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("JobState").build();
private static final MarshallingInfo<String> JOBTYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("JobType").build();
private static final MarshallingInfo<String> SNOWBALLTYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SnowballType").build();
private static final MarshallingInfo<java.util.Date> CREATIONDATE_BINDING = MarshallingInfo.builder(MarshallingType.DATE)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("CreationDate").timestampFormat("unixTimestamp").build();
private static final MarshallingInfo<StructuredPojo> RESOURCES_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Resources").build();
private static final MarshallingInfo<String> DESCRIPTION_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Description").build();
private static final MarshallingInfo<String> KMSKEYARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("KmsKeyARN").build();
private static final MarshallingInfo<String> ROLEARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("RoleARN").build();
private static final MarshallingInfo<String> ADDRESSID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("AddressId").build();
private static final MarshallingInfo<StructuredPojo> SHIPPINGDETAILS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ShippingDetails").build();
private static final MarshallingInfo<String> SNOWBALLCAPACITYPREFERENCE_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SnowballCapacityPreference").build();
private static final MarshallingInfo<StructuredPojo> NOTIFICATION_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Notification").build();
private static final MarshallingInfo<StructuredPojo> DATATRANSFERPROGRESS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("DataTransferProgress").build();
private static final MarshallingInfo<StructuredPojo> JOBLOGINFO_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("JobLogInfo").build();
private static final MarshallingInfo<String> CLUSTERID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("ClusterId").build();
private static final MarshallingInfo<String> FORWARDINGADDRESSID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ForwardingAddressId").build();
private static final JobMetadataMarshaller instance = new JobMetadataMarshaller();
public static JobMetadataMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(JobMetadata jobMetadata, ProtocolMarshaller protocolMarshaller) {
if (jobMetadata == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(jobMetadata.getJobId(), JOBID_BINDING);
protocolMarshaller.marshall(jobMetadata.getJobState(), JOBSTATE_BINDING);
protocolMarshaller.marshall(jobMetadata.getJobType(), JOBTYPE_BINDING);
protocolMarshaller.marshall(jobMetadata.getSnowballType(), SNOWBALLTYPE_BINDING);
protocolMarshaller.marshall(jobMetadata.getCreationDate(), CREATIONDATE_BINDING);
protocolMarshaller.marshall(jobMetadata.getResources(), RESOURCES_BINDING);
protocolMarshaller.marshall(jobMetadata.getDescription(), DESCRIPTION_BINDING);
protocolMarshaller.marshall(jobMetadata.getKmsKeyARN(), KMSKEYARN_BINDING);
protocolMarshaller.marshall(jobMetadata.getRoleARN(), ROLEARN_BINDING);
protocolMarshaller.marshall(jobMetadata.getAddressId(), ADDRESSID_BINDING);
protocolMarshaller.marshall(jobMetadata.getShippingDetails(), SHIPPINGDETAILS_BINDING);
protocolMarshaller.marshall(jobMetadata.getSnowballCapacityPreference(), SNOWBALLCAPACITYPREFERENCE_BINDING);
protocolMarshaller.marshall(jobMetadata.getNotification(), NOTIFICATION_BINDING);
protocolMarshaller.marshall(jobMetadata.getDataTransferProgress(), DATATRANSFERPROGRESS_BINDING);
protocolMarshaller.marshall(jobMetadata.getJobLogInfo(), JOBLOGINFO_BINDING);
protocolMarshaller.marshall(jobMetadata.getClusterId(), CLUSTERID_BINDING);
protocolMarshaller.marshall(jobMetadata.getForwardingAddressId(), FORWARDINGADDRESSID_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
| [
""
] | |
aff9b30f0b719218c49a3581bc5ac94865333f56 | b3536077f0409e712f9ebef6740ee92f14962568 | /MongoDBTest/src/strings/IntegerMatch.java | 7b10e160b516cb74d77e08e99f4f98b752bf2d74 | [] | no_license | caidongxing/caidongxing | c70dc5e31477f0eec2d90664e6b752a7be067e0b | 3f33af305357b759088f3bd1b495561a3aca81bc | refs/heads/master | 2020-05-16T10:05:02.432432 | 2019-04-23T08:53:24 | 2019-04-23T08:53:24 | 182,970,319 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 385 | java | //: strings/IntegerMatch.java
package strings;
public class IntegerMatch {
public static void main(String[] args) {
System.out.println("-1234".matches("-?\\d+"));
System.out.println("5678".matches("-?\\d+"));
System.out.println("+911".matches("-?\\d+"));
System.out.println("+911".matches("(-|\\+)?\\d+"));
}
} /* Output:
true
true
false
true
*///:~
| [
"1045345259@qq.com"
] | 1045345259@qq.com |
eb169eaa5d78a403dab76ba2b781b709633ec332 | bd729ef9fcd96ea62e82bb684c831d9917017d0e | /keche/trunk/supp_app/statistics/src/main/java/com/ctfo/storage/statistics/core/StatisticsMain.java | 53b33fdde43eb5692cb473cc8a70a589af49aa79 | [] | no_license | shanghaif/workspace-kepler | 849c7de67b1f3ee5e7da55199c05c737f036780c | ac1644be26a21f11a3a4a00319c450eb590c1176 | refs/heads/master | 2023-03-22T03:38:55.103692 | 2018-03-24T02:39:41 | 2018-03-24T02:39:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 915 | java | /**
*
*/
package com.ctfo.storage.statistics.core;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.ctfo.storage.statistics.util.ConfigLoader;
//import com.ctfo.storage.statistics.util.SystemUtils;
import com.ctfo.storage.statistics.util.SystemUtil;
/**
* 统计服务
*/
public class StatisticsMain {
private static Logger log = LoggerFactory.getLogger(StatisticsMain.class);
public static void main(String[] args) {
try{
if (args.length < 3) {//参数不合法
log.error("输入参数不合法,请输入形式如“-d conf start”的参数。");
return;
}
// 加载配置文件信息
ConfigLoader.getInstance().init(args);
// 生成PID文件
SystemUtil.generagePid();
log.info("服务启动完成--ok!");
}catch (Exception e){
log.error("服务启动异常:" + e.getMessage() , e);
log.error("系统退出...");
System.exit(0);
}
}
}
| [
"zhangjunfang0505@163.com"
] | zhangjunfang0505@163.com |
e83bb103bd8f8ddb0b81d0e76925188a9ccf19f9 | 39bb4361b26b9b62f8f8f1c5f4120527f2841965 | /GildedRose_Patterns/src/test/java/com/gildedrose/GildedRoseTest.java | 8eebb8f564b56dff3c67b87f607efcd94b0cacbf | [] | no_license | KatesCleanCode/LegacyKatas | 4460a2d6a54a6e4fdcfa204ddd29a9c460fb3d25 | 0ad0a25e21706a17eaf3b1f9b3586956964d93b9 | refs/heads/master | 2022-11-21T01:58:39.834050 | 2022-11-18T11:35:35 | 2022-11-18T11:35:35 | 62,958,067 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,859 | java | package com.gildedrose;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
class GildedRoseTest {
// Alle Einzelteile haben einen Verkaufswert, der die Anzahl der Tage spiegelt, nach dem die Items verkauft sein müssen.
// Alle Einzelteile haben einen Qualitätswert, der aussagt, wie wertvoll der Artikel ist
// Am Ende jedes Tages senkt unser System beide Werte für jedes Element
// Sobald das Verfallsdatum abgelaufen ist, verschlechtert die Qualität doppelt so schnell
// Die Qualität eines Artikels ist nie negativ
// "Aged Brie" erhöht die Qualität, je älter es wird
// Die Qualität eines Artikels ist nie höher als 50
// "Sulfuras", ein legendärer Gegenstand kann nie verkauft werden oder verringert die Qualität
// "Backstage-Pässe", so wie bei „Aged Brie“, steigern die Qualität, wenn sich das Verfallsdatum nähert.
// Qualität erhöht sich doppelt so schnell, wenn 10 Tage oder weniger fehlen, und dreifach, wenn 5 Tagen oder weniger fehlen.
// Aber Qualität fällt auf 0 nach dem Konzert.
// Wir haben kürzlich einen Anbieter von zauberte Artikel. Dies erfordert eine Aktualisierung unseres Systems:
// "Bezauberte" Artikel degradieren in Qualität doppelt so schnell wie normale Artikel
// test ob alle items verändert werden
private static final int EXPIRED_SELLIN = 0;
@Test
void qualityOfBackstagePassesIncreasesByOneWhenSellInIsHigherThanTen() {
int initialQuality = 2;
GildedRose app = createAppWithBackstagePassesItem(11, initialQuality);
app.updateItems();
assertEquals(initialQuality + 1, app.items[0].quality);
}
@Test
void qualityOfBackstagePassesIncreasesByTwoWhenSellInIsTen() {
int initialQuality = 2;
GildedRose app = createAppWithBackstagePassesItem(10, initialQuality);
app.updateItems();
assertEquals(initialQuality + 2, app.items[0].quality);
}
@Test
void qualityOfBackstagePassesIncreasesByThreeWhenSellInIsFive() {
int initialQuality = 2;
GildedRose app = createAppWithBackstagePassesItem(5, initialQuality);
app.updateItems();
assertEquals(initialQuality + 3, app.items[0].quality);
}
@Test
void qualityOfBackstagePassesIsZeroWhenSellInExpires() {
int initialQuality = 2;
GildedRose app = createAppWithBackstagePassesItem(EXPIRED_SELLIN, initialQuality);
app.updateItems();
assertEquals(0, app.items[0].quality);
}
@Test
void qualityOfSimpleItemDecreasesByOneAfterOneDay() {
int initialQuality = 2;
GildedRose app = createAppWithSimpleItem(4, initialQuality);
app.updateItems();
assertEquals(initialQuality - 1, app.items[0].quality);
}
@Test
@Disabled("not yet implemented")
void qualityOfConjuredItemDecreasesByTwoAfterOneDay() {
int initialQuality = 2;
GildedRose app = createAppWithConjuredItem(4, initialQuality);
app.updateItems();
assertEquals(initialQuality - 2, app.items[0].quality);
}
@Test
void qualityOfAgedBrieIsIncreasedByOneAfterOneDay() {
int initialQuality = 2;
GildedRose app = createAppWithAgedBrieItem(4, initialQuality);
app.updateItems();
assertEquals(initialQuality + 1, app.items[0].quality);
}
@Test
void qualityOfSimpleItemDecreasesByTwoAfterSellInExpired() {
int initialQuality = 5;
GildedRose app = createAppWithSimpleItem(EXPIRED_SELLIN, initialQuality);
app.updateItems();
assertEquals(initialQuality - 2, app.items[0].quality);
}
@Test
@Disabled("not yet implemented")
void qualityOfConjuredItemDecreasesByFourAfterSellInExpired() {
int initialQuality = 5;
GildedRose app = createAppWithConjuredItem(EXPIRED_SELLIN, initialQuality);
app.updateItems();
assertEquals(initialQuality - 4, app.items[0].quality);
}
@Test
void qualityCannotBeNegative() {
int initialQuality = 0;
GildedRose app = createAppWithSimpleItem(1, initialQuality);
app.updateItems();
assertEquals(initialQuality, app.items[0].quality);
}
@Test
void qualityIsMax50() {
int initialQuality = 50;
GildedRose app = createAppWithAgedBrieItem(1, initialQuality);
app.updateItems();
assertEquals(initialQuality, app.items[0].quality);
}
@Test
void qualityOfSulfarasIsNotChanged() {
int initialQuality = 2;
GildedRose app = createAppWithSulfarasItem(4, initialQuality);
app.updateItems();
assertEquals(initialQuality, app.items[0].quality);
}
@Test
void sellInOfSulfarasIsNotChanged() {
int initialSellIn = 4;
GildedRose app = createAppWithSulfarasItem(initialSellIn, 6);
app.updateItems();
assertEquals(initialSellIn, app.items[0].sellIn);
}
@Test
void sellInOfSimpleItemDecreasesByOneAfterOneDay() {
int initialSellIn = 4;
GildedRose app = createAppWithSimpleItem(initialSellIn, 3);
app.updateItems();
assertEquals(initialSellIn - 1, app.items[0].sellIn);
}
private GildedRose createAppWithItem(String itemName, int initialSellIn, int initialQuality) {
Item[] items = new Item[] { new Item(itemName, initialSellIn, initialQuality) };
return new GildedRose(items);
}
private GildedRose createAppWithSimpleItem(int initialSellIn, int initialQuality) {
return createAppWithItem("foo", initialSellIn, initialQuality);
}
private GildedRose createAppWithAgedBrieItem(int initialSellIn, int initialQuality) {
return createAppWithItem("Aged Brie", initialSellIn, initialQuality);
}
private GildedRose createAppWithSulfarasItem(int initialSellIn, int initialQuality) {
return createAppWithItem("Sulfuras, Hand of Ragnaros", initialSellIn, initialQuality);
}
private GildedRose createAppWithBackstagePassesItem(int initialSellIn, int initialQuality) {
return createAppWithItem("Backstage passes to a TAFKAL80ETC concert", initialSellIn, initialQuality);
}
private GildedRose createAppWithConjuredItem(int initialSellIn, int initialQuality) {
return createAppWithItem("Conjured Mana Cake", initialSellIn, initialQuality);
}
}
| [
"katharina.schwarz@it-economics.de"
] | katharina.schwarz@it-economics.de |
7975da3ee8cea4676779eb720eac67dac8be98f8 | 7e1ba866c69650e207ed4a3a68a3fe7ac5dce128 | /core/src/main/java/com/srini/aempractice/core/models/HelloWorldModel.java | 1cd1d3d640ff77a1a32e110249d8a7c8c0c5593d | [] | no_license | SrinivasBalla/aem6.3-practice | 927e3cf61888cd2f6bf3da0234d733440fff07c4 | ccb77284f3e1a73e41e465179d6f312f9e3ec5dd | refs/heads/master | 2021-01-01T19:47:39.665985 | 2017-08-02T16:28:25 | 2017-08-02T16:28:25 | 98,683,494 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,523 | java | /*
* Copyright 2015 Adobe Systems Incorporated
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srini.aempractice.core.models;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.models.annotations.Default;
import org.apache.sling.models.annotations.Model;
import org.apache.sling.settings.SlingSettingsService;
@Model(adaptables=Resource.class)
public class HelloWorldModel {
@Inject
private SlingSettingsService settings;
@Inject @Named("sling:resourceType") @Default(values="No resourceType")
protected String resourceType;
private String message;
@PostConstruct
protected void init() {
message = "\tHello World!\n";
message += "\tThis is instance: " + settings.getSlingId() + "\n";
message += "\tResource type is: " + resourceType + "\n";
}
public String getMessage() {
return message;
}
}
| [
"srinivas.balla.v@gmail.com"
] | srinivas.balla.v@gmail.com |
a910a51458f893a8077712df6793eb65b083fbca | b5a37b5847c99ab17f2418ed06c7ff99496fdac9 | /service/src/main/java/customer/CustomerServiceImpl.java | ee7fbe25fc02283cddc60c64aa6723b6bc8ae56b | [] | no_license | mars971/clientManager | 4792f0101a7a7995d7fd84f9922f936323954319 | 3cdc13a4635d5834e0b29bfa6932a8d550991d7c | refs/heads/master | 2021-05-02T18:32:43.946424 | 2019-02-15T20:32:57 | 2019-02-15T20:32:57 | 65,237,439 | 0 | 0 | null | 2017-12-21T07:35:13 | 2016-08-08T20:37:49 | Java | UTF-8 | Java | false | false | 1,765 | java | package customer;
import ECustomer.Customer;
import ECustomer.CustomerDAO;
import org.hibernate.Criteria;
import java.util.Date;
import java.util.List;
public class CustomerServiceImpl implements CustomerService {
private CustomerDAO customerDAO;
public Customer findByCriterion(Criteria criterion) {
return customerDAO.findByCriterion(criterion);
}
public Customer findByCriteria(Criteria criteria) {
return customerDAO.findByCriteria(criteria);
}
public List<Customer> findAdressesByCriterion(Criteria criterion) {
return customerDAO.findAdressesByCriterion(criterion);
}
public List<Customer> findAdressesByCriteria(Criteria criteria) {
return customerDAO.findAdressesByCriteria(criteria);
}
public Customer findById(Integer idCustomer) {
return customerDAO.findById(idCustomer);
}
public List<Customer> findBySocialReason(String socialRaison) {
return customerDAO.findBySocialReason(socialRaison);
}
public List<Customer> findByDateCreation(Date dateCreation) {
return customerDAO.findByDateCreation(dateCreation);
}
public List<Customer> findBySiret(String siret) {
return customerDAO.findBySiret(siret);
}
public List<Customer> findBySiren(String siren) {
return customerDAO.findBySiren(siren);
}
public List<Customer> findByApe(String ape) {
return customerDAO.findByApe(ape);
}
public List<Customer> findBySummary(String summary) {
return customerDAO.findBySummary(summary);
}
public List<Customer> findByNaf(String naf) {
return customerDAO.findByNaf(naf);
}
public List<Customer> findAll() {
return customerDAO.findAll();
}
}
| [
"maxence.tissot@live.fr"
] | maxence.tissot@live.fr |
8996c7fac77fb8e73ac2d76333773c4f6dc5f7ae | 73e029dfcb1b90edf43023a14fc80ff6fc434dbe | /SimpleSOAPServiceWithPublisher/src/com/program/service/HelloWorldService.java | fc52a5ae2c013154d0827398e20d12f759738c6f | [] | no_license | csundeep/WebServicesExamples | aa81392ddb974603ea198bb3904c291324971625 | a45468cf28fc3706b0887429c2a77a529b82c6de | refs/heads/master | 2020-04-13T06:56:23.439643 | 2017-03-01T22:00:55 | 2017-03-01T22:00:55 | 163,035,331 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 424 | java | package com.program.service;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;
@WebService
@SOAPBinding(style = Style.RPC, use = Use.LITERAL)
public interface HelloWorldService {
@WebMethod
String sendMessage(@WebParam(name = "message") String message);
}
| [
"sandychowdary.535@gmail.com"
] | sandychowdary.535@gmail.com |
c93fbe55b71f1da1a4f317d1a8e6dc0b8e733407 | 351bdd22e2bba3a0390caa143e0f5fc078462ae3 | /src/controller/database/select/QueryData.java | 288b5673c718968422af57d1d09851d8791b8841 | [] | no_license | UnimibSoftEngCourse1819/progetto-aste-2-gruppo-aste-2 | 7eccac2fd558608358468d670ed266f18b14287b | 4059950b1104ef0eedb561a30bede5a88db0b102 | refs/heads/master | 2020-07-22T08:52:56.535939 | 2019-10-06T19:56:12 | 2019-10-06T19:56:12 | 207,139,221 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 452 | java | package controller.database.select;
import java.util.List;
/**
* This represent a single select
*/
public class QueryData {
private final String query;
private final List<String> typeParameters;
public QueryData(String query, List<String> typeParameters) {
this.query = query;
this.typeParameters = typeParameters;
}
public String getQuery() {
return query;
}
public List<String> getTypeParameters() {
return typeParameters;
}
} | [
"g.vallero@campus.unimib.it"
] | g.vallero@campus.unimib.it |
2bf480630177826fd06272f7fa6b463385c1c280 | 8f87d041530d06cb9873c2434e9b8809f157a98e | /src/main/java/com/mall/api/response/RespMeta.java | e4d46ac37ee955b6650a13a76356c27849fb7418 | [] | no_license | mrHuangWenHai/product | 17291b0e1d59d27fcc9ead26791618fd66e6df7c | 0798e6585f3e08b57012b08c58309806e796b717 | refs/heads/master | 2023-03-02T13:19:16.446757 | 2021-02-09T14:38:22 | 2021-02-09T14:38:22 | 337,434,294 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 391 | java | package com.mall.api.response;
public class RespMeta {
private int code = -1;
private String errorMsg;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getErrorMsg() {
return errorMsg;
}
public void setErrorMsg(String errorMsg) {
this.errorMsg = errorMsg;
}
} | [
"wenhai.hwh@alibaba-inc.com"
] | wenhai.hwh@alibaba-inc.com |
492eb141921c7d5f79c45bb5739b78425d872340 | d524fc4cdf20e288bed8485a27e14c10c38b459a | /ssm_vol2/vol2_dao/src/main/java/cn/xiaoguijun/domain/Product.java | 677e796dd882d21bf9cb8c2857899fb8dac7d7dd | [] | no_license | SingleMGJ/learning | 20d4ad260aa02f83b4a4d743399fc6d8696f7457 | 3c9ddae74d68f8961f3f54c35a371f9ecddbe14c | refs/heads/master | 2022-11-15T01:46:33.637462 | 2019-10-14T06:28:59 | 2019-10-14T06:28:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,760 | java | package cn.xiaoguijun.domain;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* The Mighty GUIJUN XIAO
* A MasterPiece
*
* @author GuiJun Xiao
* @date 2018/7/7
* @time 19:37
*/
public class Product implements Serializable {
private String id;
private String productNum;
private String productName;
private String cityName;
private Date departureTime;
private Double productPrice;
private String productDesc;
private Integer productStatus;
public String getDepartureTimeStr(){
return departureTime != null ? new SimpleDateFormat("yyyy-MM-dd HH:mm").format(departureTime) : "时间待定";
}
public String getProductStatusStr(){
if (productStatus == null) {
return "状态异常";
}
return productStatus == 1 ? "开启" : "关闭";
}
@Override
public String toString() {
return "Product{" +
"id='" + id + '\'' +
", productNum='" + productNum + '\'' +
", productName='" + productName + '\'' +
", cityName='" + cityName + '\'' +
", departureTime=" + departureTime +
", productPrice=" + productPrice +
", productDesc='" + productDesc + '\'' +
", productStatus=" + productStatus +
'}';
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getProductNum() {
return productNum;
}
public void setProductNum(String productNum) {
this.productNum = productNum;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public Date getDepartureTime() {
return departureTime;
}
public void setDepartureTime(Date departureTime) {
this.departureTime = departureTime;
}
public Double getProductPrice() {
return productPrice;
}
public void setProductPrice(Double productPrice) {
this.productPrice = productPrice;
}
public String getProductDesc() {
return productDesc;
}
public void setProductDesc(String productDesc) {
this.productDesc = productDesc;
}
public Integer getProductStatus() {
return productStatus;
}
public void setProductStatus(Integer productStatus) {
this.productStatus = productStatus;
}
public Product() {
}
}
| [
"xiaoguijun0206@outlook.com"
] | xiaoguijun0206@outlook.com |
5c68598f93767d463307ba6008ae0bf4ff15bc71 | 7dc2794ff7212a2893a3c43dea31ba63206dd870 | /src/lintcode/SubarraySum.java | b0d875bf4a684699cdf1f8bbcd759b7d8a7d371e | [] | no_license | JanWilliem/LintCode | 12de4e7d4a63b6efcd7d22301845ffa00be61d76 | 7127d33b5aa0bf750b26a5acbaa42b31a92661ee | refs/heads/master | 2016-08-12T20:31:03.739176 | 2015-12-19T07:48:08 | 2015-12-19T07:48:08 | 44,429,401 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,428 | java | package lintcode;
import java.util.ArrayList;
/**
* Subarray Sum
*
* 25% Accepted Given an integer array, find a subarray where the sum of numbers
* is zero. Your code should return the index of the first number and the index
* of the last number.
*
* Have you met this question in a real interview? Yes Example Given [-3, 1, 2,
* -3, 4], return [0, 2] or [1, 3].
*
* Note There is at least one subarray that it's sum equals to zero.
*
* @author Administrator
*
*/
public class SubarraySum {
public static void main(String[] args) {
int[] sums = { 4, 10, 13, 4, -1, 0, 3, 3, 5 };
subarraySum(sums);
}
/**
* @param nums:
* A list of integers
* @return: A list of integers includes the index of the first number and
* the index of the last number
*/
public static ArrayList<Integer> subarraySum(int[] nums) {
ArrayList<Integer> integerList = new ArrayList<Integer>();
for (int i = 0; i < nums.length; i++) {
int sum = 0;
if (nums[i] == 0) {
integerList.add(i);
integerList.add(i);
return integerList;
}
for (int j = i + 1; j < nums.length; j++) {
sum += nums[j];
if ((nums[i] + sum) == 0) {
integerList.add(i);
integerList.add(j);
System.err.println(integerList);
return integerList;
} else {
continue;
}
}
}
return integerList;
}
}
| [
"smithw1989@icloud.com"
] | smithw1989@icloud.com |
0fcf4026f8edf5874f4ad66080e0cf1ff2a54f5e | 69f83fc08532660007fed79a0b97565ce9876277 | /BadDao/src/main/java/net/terzeron/spring/user/dao/UserDao.java | 7e860d67cc9437524a1a5395813a25263547ca49 | [] | no_license | terzeron/SpringTest | c97c93b8eaedaa24216ed7731495c5a5042d908d | ca01098ad053ffd7d19714a09e28e50b831bd985 | refs/heads/master | 2023-05-26T16:54:33.913981 | 2023-05-23T20:10:11 | 2023-05-23T23:45:07 | 28,164,875 | 0 | 0 | null | 2023-05-23T23:45:08 | 2014-12-18T02:23:55 | Java | UTF-8 | Java | false | false | 1,348 | java | package net.terzeron.spring.user.dao;
import net.terzeron.spring.user.domain.User;
import java.sql.*;
/**
* Created by terzeron on 2015. 12. 9..
*/
public class UserDao {
private ConnectionMaker connectionMaker;
public UserDao(ConnectionMaker connectionMaker) {
this.connectionMaker = connectionMaker;
}
public void add(User user) throws ClassNotFoundException, SQLException {
Connection c = connectionMaker.makeConnection();
PreparedStatement ps = c.prepareStatement("insert into users (id, name, password) values (?, ?, ?)");
ps.setString(1, user.getId());
ps.setString(2, user.getName());
ps.setString(3, user.getPassword());
ps.executeUpdate();
ps.close();
c.close();
}
public User get(String id) throws ClassNotFoundException, SQLException {
Connection c = connectionMaker.makeConnection();
PreparedStatement ps = c.prepareStatement("selecct * from users where id = ?");
ps.setString(1, id);
ResultSet rs = ps.executeQuery();
rs.next();
User user = new User();
user.setId(rs.getString("id"));
user.setName(rs.getString("name"));
user.setPassword(rs.getString("password"));
rs.close();
ps.close();
c.close();
return user;
}
}
| [
"youngilcho@nhnent.com"
] | youngilcho@nhnent.com |
5e5af610ea49467536b95f80d317138c1df9fe0f | fb91f96c6deb06ed1289231bf9c96ce64ce4f57a | /src/main/java/pl/asie/charset/package-info.java | 326426ba4c5c2b77fd85619e355225e2273143d9 | [] | no_license | CharsetMC/Charset | b314c044b618bc66be6b8ddd2f4326553c7efcfa | 401e25a10399c19adf1ed893b94dd5867c07a1f0 | refs/heads/1.12-stable | 2022-09-22T19:59:22.751395 | 2022-08-31T20:56:19 | 2022-08-31T20:56:19 | 47,063,120 | 59 | 54 | null | 2019-07-21T07:11:19 | 2015-11-29T12:43:17 | Java | UTF-8 | Java | false | false | 879 | java | /*
* Copyright (c) 2015, 2016, 2017, 2018, 2019, 2020 Adrian Siekierka
*
* This file is part of Charset.
*
* Charset is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Charset is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Charset. If not, see <http://www.gnu.org/licenses/>.
*/
@ParametersAreNonnullByDefault
package pl.asie.charset;
import javax.annotation.ParametersAreNonnullByDefault; | [
"kontakt@asie.pl"
] | kontakt@asie.pl |
b3a8a089c99038ada30c90c56ec499ab20c4f7c6 | 156c614d3f49682b64e679830405d451ff5be7e2 | /src/main/java/converter/PresenteConverter.java | b3d3a725f0b95444cd27d6de49d039eb93707d70 | [] | no_license | RayanaSales/RepGerenciadorCasamento | d12435ce80d0a63d2f5c6a93a0d03a4aaf46ea60 | 66521d1375a3d2c95e92e2953ee2aaa0e457b3e3 | refs/heads/master | 2020-04-06T06:56:24.032915 | 2016-08-22T22:33:03 | 2016-08-22T22:33:03 | 54,608,178 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,006 | java | package converter;
import entidades.Pessoa;
import entidades.Presente;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.FacesConverter;
import servico.PresenteServico;
@FacesConverter(value = "presenteConverter")
public class PresenteConverter implements Converter
{
@Override
public Object getAsObject(FacesContext context, UIComponent component, String value)
{
if (value != null && !value.isEmpty())
{
return (Presente) component.getAttributes().get(value);
}
return null;
}
@Override
public String getAsString(FacesContext context, UIComponent component, Object entity)
{
if (entity != null && entity instanceof Pessoa)
{
component.getAttributes().put(((Presente) entity).getId().toString(), entity);
return ((Presente) entity).getId().toString();
}
return null;
}
}
| [
"rayanasales.ifpe@gmail.com"
] | rayanasales.ifpe@gmail.com |
434745721be167fd26988ed333bffd984afb8735 | fa6a46a849345961f4c7146ea9f6797447e81bf2 | /Rakthadaan/app/src/main/java/com/example/rakthadaan/interfaces/BotReply.java | 6ab9d91adfc41ec594558018719a3219dca33746 | [] | no_license | Android2k2k/Project | 35fc39c579b67c84c74bb3e30b8ce28a75bd9b77 | 5b4878e782886174e3629cdcb25df8160603e610 | refs/heads/master | 2023-04-21T11:49:09.076133 | 2021-05-15T01:15:06 | 2021-05-15T01:15:06 | 298,959,286 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 196 | java | package com.example.rakthadaan.interfaces;
import com.google.cloud.dialogflow.v2.DetectIntentResponse;
public interface BotReply {
void callback(DetectIntentResponse returnResponse);
}
| [
"chaitanyakarri963@gmail.com"
] | chaitanyakarri963@gmail.com |
bacddd91b6d1b9bac7bb0672491b3fe24d900757 | 1ecf7db32fe840780f5dedb060fa6e93d5925f69 | /src/main/com/trace/hadoop/hadoopinternal/compress/CompressDemo.java | 91dda01074d4090ddab8eab5fcc76a573df86fa6 | [] | no_license | lovexqh/trace | cf63956a864aafe719aa8d2d9262619c954c073a | fbfa6a590df691004d317fba81461fd0572c24c6 | refs/heads/master | 2016-09-05T18:06:21.499977 | 2013-11-17T09:16:27 | 2013-11-17T09:16:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,841 | java | package com.trace.hadoop.hadoopinternal.compress;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IOUtils;
import org.apache.hadoop.io.compress.CompressionCodec;
import org.apache.hadoop.io.compress.CompressionCodecFactory;
import org.apache.hadoop.io.compress.CompressionOutputStream;
import org.apache.hadoop.io.compress.Compressor;
import org.apache.hadoop.io.compress.CompressorStream;
import org.apache.hadoop.io.compress.GzipCodec;
import org.apache.hadoop.io.compress.zlib.BuiltInZlibDeflater;
import org.apache.hadoop.util.ReflectionUtils;
public class CompressDemo {
public static void compress(String method) throws ClassNotFoundException, IOException {
File fileIn = new File("README.txt");
InputStream in = new FileInputStream(fileIn);
Class<?> codecClass = Class.forName(method);
Configuration conf = new Configuration();
CompressionCodec codec = (CompressionCodec)
ReflectionUtils.newInstance(codecClass, conf);
File fileOut = new File("README.txt"+codec.getDefaultExtension());
fileOut.delete();
OutputStream out = new FileOutputStream(fileOut);
CompressionOutputStream cout =
codec.createOutputStream(out);
IOUtils.copyBytes(in, cout, 4096, false);
in.close();
cout.close();
}
public static void decompress(File file) throws IOException {
Configuration conf = new Configuration();
CompressionCodecFactory factory = new CompressionCodecFactory(conf);
CompressionCodec codec = factory.getCodec(new Path(file.getName()));
if( codec == null ) {
System.out.println("Cannot find codec for file "+file);
return;
}
File fileOut = new File(file.getName()+".txt");
InputStream in = codec.createInputStream( new FileInputStream(file) );
OutputStream out = new FileOutputStream(fileOut);
IOUtils.copyBytes(in, out, 4096, false);
in.close();
out.close();
}
static final int compressorOutputBufferSize=100;
public static void compressor() throws IOException {
File fileIn = new File("README.txt");
InputStream in = new FileInputStream(fileIn);
int datalength=in.available();
byte[] inbuf = new byte[datalength];
in.read(inbuf, 0, datalength);
in.close();
byte[] outbuf = new byte[compressorOutputBufferSize];
Compressor compressor=new BuiltInZlibDeflater();
int step=100;
int inputPos=0;
int putcount=0;
int getcount=0;
int compressedlen=0;
while(inputPos < datalength) {
int len=(datalength-inputPos>=step)? step:datalength-inputPos;
compressor.setInput(inbuf, inputPos, len );
putcount++;
while (!compressor.needsInput()) {
compressedlen=compressor.compress(outbuf, 0, compressorOutputBufferSize);
if(compressedlen>0) {
getcount++;
}
}
inputPos+=step;
}
compressor.finish();
// // loop by compressor.compress() return value
// compressedlen=compressor.compress(outbuf, 0, compressorOutputBufferSize);
// while( compressedlen > 0 ) {
// getcount++;
// compressedlen=compressor.compress(outbuf, 0, compressorOutputBufferSize);
// }
while(!compressor.finished()) {
getcount++;
compressor.compress(outbuf, 0, compressorOutputBufferSize);
}
System.out.println("Compress "+compressor.getBytesRead()+" bytes into "+compressor.getBytesWritten());
System.out.println("put "+putcount+" times and get "+getcount+" times");
compressor.end();
}
public static void compressorStream() throws IOException {
File fileIn = new File("README.txt");
InputStream in = new FileInputStream(fileIn);
File fileOut = new File("README.txt.stream.gz");
fileOut.delete();
OutputStream out = new FileOutputStream(fileOut);
GzipCodec codec=new GzipCodec();
codec.setConf(new Configuration());
CompressorStream cout = new CompressorStream(out, codec.createCompressor(), 10);
IOUtils.copyBytes(in, cout, 10, false);
in.close();
cout.close();
}
public static void main(String[] args) {
try {
//compressorStream();
compressor();
compress("org.apache.hadoop.io.compress.DefaultCodec");
compress("org.apache.hadoop.io.compress.GzipCodec");
compress("org.apache.hadoop.io.compress.BZip2Codec");
decompress(new File("README.txt.bz2"));
decompress(new File("README.txt.deflate"));
decompress(new File("README.txt"));
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
| [
"lovexqh@hotmail.com"
] | lovexqh@hotmail.com |
eb6007ad89994188d727dbb239923d6f3afa22e9 | 2633c7e454870374fc2d00111501ad7cc5f6da50 | /src/main/java/runway/moda/automation/repo/impl/DesignerLoginRepoImpl.java | e8daf2c365aa8db4d1328963837ffe29aac9eb78 | [] | no_license | kumrunnaharkeya/sample-automation-selenium | 746aec47bc8c5eb2d0edaed1212c9829aa868c1f | 85e3e3c88f71bd39408e3a5cfa6c8976c85a6f7f | refs/heads/master | 2020-05-21T08:52:36.514464 | 2016-10-05T07:27:30 | 2016-10-05T07:27:30 | 70,036,031 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 911 | java | package runway.moda.automation.repo.impl;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import runway.moda.automation.lib.ExcelPathResource;
import runway.moda.automation.lib.ExcelUtils;
import runway.moda.automation.models.Login;
import runway.moda.automation.repo.interfaces.DesignerLoginRepo;
public class DesignerLoginRepoImpl implements DesignerLoginRepo {
public Login get(Integer rowId) throws IOException {
XSSFRow row=ExcelUtils.getExcellSheet(ExcelPathResource.Designer_UserName.Location, ExcelPathResource.Designer_UserName.SheetName).getRow(rowId);
Login login=new Login();
login.setUserName(row.getCell(0).toString());
login.setPassword(row.getCell(1).toString());
return login;
}
}
| [
"kumrun.nahar@sekai-lab-bd.com"
] | kumrun.nahar@sekai-lab-bd.com |
a495f87547975277791cd0453b10138f3970351f | 20eb62855cb3962c2d36fda4377dfd47d82eb777 | /IntroClassJava/dataset/grade/c9d718f379a877bd04e4544ee830a1c4c256bb4f104f214afd1ccaf81e7b25dea689895678bb1e6f817d8b0939eb175f8e847130f30a9a22e980d38125933516/002/mutations/146/grade_c9d718f3_002.java | 608c009bf63c76541ad523c83a399f2a1edcaf1b | [] | no_license | ozzydong/CapGen | 356746618848065cce4e253e5d3c381baa85044a | 0ba0321b6b1191443276021f1997833342f02515 | refs/heads/master | 2023-03-18T20:12:02.923428 | 2020-08-21T03:08:28 | 2020-08-21T03:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,555 | java | package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class grade_c9d718f3_002 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
grade_c9d718f3_002 mainClass = new grade_c9d718f3_002 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
FloatObj grade = new FloatObj (), per1 = new FloatObj (), per2 =
new FloatObj (), per3 = new FloatObj (), per4 = new FloatObj ();
output += (String.format ("Enter thresholds for A, B, C, D\n"));
output += (String.format ("in that order, decreasing percentages > "));
per1.value = scanner.nextFloat ();
per2.value = scanner.nextFloat ();
per3.value = scanner.nextFloat ();
per4.value = scanner.nextFloat ();
output +=
(String.format ("Thank you. Now enter student score (percent) >"));
grade.value = scanner.nextFloat ();
if (grade.value >= per1.value) {
output += (String.format ("Student has an A grade\n"));
} else if (grade.value >= per2.value && grade.value < per1.value) {
output += (String.format ("Student has an B grade\n"));
} else if (grade.value >= per3.value && grade.value < per2.value) {
output += (String.format ("Studnet has an C grade\n"));
} else if (grade.value >= per4.value && grade.value < per3.value) {
output += (String.format ("Student has an D grade\n"));
} else if (per2.value < per4.value) {
output += (String.format ("Studnet has failed the course\n"));
}
if (true)
return;;
}
}
| [
"justinwm@163.com"
] | justinwm@163.com |
72d0d12494ad4918c03acb32a78776238db7ced2 | 6fe490cb5ab010d217812f9d1c25f79fc791e769 | /src/main/java/com/demo/controller/UserController.java | ad82668e61c6faa0cc8e7c19083427328f46ac69 | [] | no_license | Gerry-Yu/spring-security-mail | 077431062c12394d670acca9c24263ca04bb6cb3 | 51b96947cacee6db34f0d69e30da4fa9719a85a8 | refs/heads/master | 2021-05-03T16:52:36.898740 | 2016-10-26T11:22:42 | 2016-10-26T11:22:42 | 71,995,770 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,389 | java | package com.demo.controller;
import com.demo.model.User;
import com.demo.service.MailService;
import com.demo.service.UserService;
import com.demo.util.ConfirmCode;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
/**
* Created by Pinggang Yu on 2016/10/23.
*/
@Controller
public class UserController {
@Resource
UserService userService;
@Resource
MailService mailService;
@RequestMapping("register")
public String registerController(String emailAddress, String password) {
User user = new User(emailAddress, password, emailAddress);
String confirmCode = ConfirmCode.getConfirmCode(40);
try {
userService.registerUser(user, confirmCode);
} catch (Exception e) {
e.printStackTrace();
}
mailService.sendUserMail(user, confirmCode);
return "redirect:common/emailConfirm.html";
}
@RequestMapping("registerConfirm")
public String registerConfirm(String emailAddress, String confirmCode) {
boolean flag = userService.userConfirm(emailAddress, confirmCode);
if (flag) {
return "redirect:login.html";
} else {
return "redirect:common/emailConfirmError.html";
}
}
}
| [
"pg_yu@sina.com"
] | pg_yu@sina.com |
98a8c954bf4955be5ac3ccc75e820a5154b6e4a7 | d6391de7192911eed8260156726b1e025116f54a | /Lab04/java/task-1/src/Main.java | 495d54e46a727012e93602fb167017e02976efaf | [] | no_license | ranja-ionut/PA_Labs | 0f5462d5410951825b5582037d007eb1daa5a9ba | 100890cfc295b16f151cd7124799c838b704b482 | refs/heads/main | 2023-03-14T02:52:46.022795 | 2021-03-08T15:34:44 | 2021-03-08T15:34:44 | 345,696,985 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,619 | java | import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
static class Task {
public final static String INPUT_FILE = "in";
public final static String OUTPUT_FILE = "out";
int n;
int[] v;
private final static int MOD = 1000000007;
private void readInput() {
try {
Scanner sc = new Scanner(new File(INPUT_FILE));
n = sc.nextInt();
v = new int[n + 1];
for (int i = 1; i <= n; i++) {
v[i] = sc.nextInt();
}
sc.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private void writeOutput(int result) {
try {
PrintWriter pw = new PrintWriter(new File(OUTPUT_FILE));
pw.printf("%d\n", result);
pw.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private int getResult() {
// TODO: Aflati numarul de subsiruri (ale sirului stocat in v,
// indexat de la 1 la n), nevide cu suma numerelor para.
// Rezultatul se va intoarce modulo MOD (1000000007).
int rez1 = 0, rez2 = 0;
int kMod = (int) (1e9 + 7);
int[] even = new int[n+1];
int[] odd = new int[n+1];
//primul punct
even[0] = 1;
odd[0] = 0;
for (int i = 1; i <= n; ++i) {
if (v[i] % 2 != 0) {
odd[i] = even[i] = (int) ((1L * even[i - 1] + odd[i - 1]) % kMod);
} else {
even[i] = (int) ((1L * even[i - 1] * 2) % kMod);
odd[i] = (int) ((1L * odd[i - 1] * 2) % kMod);
}
}
rez1 = even[n] - 1;
// al treilea punct
int pare = 0, impare = 0;
for(int i = 1; i <= n; i++) {
if(v[i] % 2 == 0)
pare++;
else
impare++;
}
if(impare == 0)
rez = (int) (1L * ((Math.pow(2, pare))) % 1000000007);
else
rez = (int) (1L * ((Math.pow(2, pare + impare - 1))) % 1000000007);
if(true)
return rez;
else
return rez;
}
public void solve() {
readInput();
writeOutput(getResult());
}
}
public static void main(String[] args) {
new Task().solve();
}
}
| [
"ranjaionut99@gmail.com"
] | ranjaionut99@gmail.com |
d97dd4e4b811558ae4bab641e3858e11a4f2c603 | 082da50dc35b7c87bf260d6d76ee26736382d9e5 | /ALGO_branch_sums/src/Program_branch_sums.java | bae81590c506080ea12849f56dec06c6ff96794f | [] | no_license | templeside/ALGO_branch_sums | 9f89d91ba12ba4a3056b8d5a5364e5c86826f6d4 | e0a323be60733605265cf7d0e4a3e38d191bc88d | refs/heads/master | 2022-11-28T01:10:46.332917 | 2020-08-14T08:34:34 | 2020-08-14T08:34:34 | 284,203,011 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,029 | java | import java.util.*;
class Program {
// This is the class of the input root. Do not edit it.
public static class BinaryTree {
int value;
BinaryTree left;
BinaryTree right;
BinaryTree(int value) {
this.value = value;
this.left = null;
this.right = null;
}
}
public static List<Integer> branchSums(BinaryTree root) {
// Write your code here.
// Write your code here.
List<Integer> sums = new ArrayList<Integer>();
listBranchSums(root,0, sums);
return sums;
}
private static void listBranchSums(BinaryTree root,int numSum, List<Integer> sums) {
// TODO Auto-generated method stub
if(root ==null)
return;
numSum += root.value;
if(root.left==null&&root.right==null) {
sums.add(numSum);
return;
}
listBranchSums(root.left,numSum,sums);
listBranchSums(root.right,numSum,sums);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
// BinaryTree first
}
}
| [
"charles_window@DESKTOP-DGBVTC6"
] | charles_window@DESKTOP-DGBVTC6 |
682df87f28a2fd8db1716be94713983230169239 | 385e24db4809b88f019e7bc3b37e4670b4c635b4 | /test/edu/ucsc/refactor/RefactorersTest.java | d37ad5b89bfb0af1a19dd0468c41d232a8835498 | [
"Apache-2.0"
] | permissive | vesperin/vesper | 6e7c30e36713509e2da1c776c24a2dc5758e6d6c | ca43f1f6281f8ec287fa0666fc9842f011454cc4 | refs/heads/master | 2021-01-22T14:10:46.173907 | 2016-05-14T21:33:28 | 2016-05-14T21:33:28 | 15,055,367 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,654 | java | package edu.ucsc.refactor;
import edu.ucsc.refactor.locators.*;
import org.junit.Test;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.core.IsNull.notNullValue;
import static org.junit.Assert.*;
/**
* @author hsanchez@cs.ucsc.edu (Huascar A. Sanchez)
*/
public class RefactorersTest {
static final String CONTENT = "import java.util.List; \n" +
"class Preconditions {\n" +
"\tstatic void check(\n" +
"\t\tboolean cond, String message\n" +
"\t) throws RuntimeException {\n" +
"\t\tB bbb = new B(); cond = !cond;" +
"\t\tif(!cond) throw new IllegalArgumentException();\n" +
"\t}\n" +
"\tstatic class B{}\n" +
"}";
static final String NAME = "Preconditions.java";
static final Source SRC = new Source(NAME, CONTENT);
@Test public void testRefactorerCreation(){
final Refactorer refactorer = Vesper.createRefactorer();
assertThat(refactorer, notNullValue());
}
@Test public void testMultipleRefactorers(){
final Refactorer first = Vesper.createRefactorer();
final Refactorer second = Vesper.createRefactorer();
assertNotSame(first, second);
}
@Test public void testRefactorerIssueDetection(){
final Introspector introspector = Vesper.createIntrospector();
final Set<Issue> issues = introspector.detectIssues(SRC);
assertThat(issues.isEmpty(), is(false));
}
@Test public void testRefactorerCreateChanges() {
// for issue and for edit
final Refactorer refactorer = Vesper.createRefactorer();
final Introspector introspector = Vesper.createIntrospector();
final Set<Issue> issues = introspector.detectIssues(SRC);
assertThat(issues.isEmpty(), is(false));
for(Issue eachIssue : issues){
final Change fix = refactorer.createChange(
ChangeRequest.forIssue(
eachIssue,
new HashMap<String, Parameter>()
)
);
assertNotNull(fix);
assertThat(fix.isValid(), is(true));
}
final Change amendment = refactorer.createChange(
ChangeRequest.reformatSource(SRC)
);
assertNotNull(amendment);
assertThat(amendment.isValid(), is(true));
}
@Test public void testRefactorerRecommendChange(){
// for any issues found on the SRC
final Introspector introspector = Vesper.createIntrospector();
final List<Change> changes = introspector.detectImprovements(SRC);
assertThat(changes.isEmpty(), is(false));
assertThat(changes.size(), is(2));
}
@Test public void testRefactorerUnitLocator() {
final UnitLocator locator = Vesper.createUnitLocator(SRC);
final List<NamedLocation> params = locator.locate(new ParameterUnit("message"));
assertThat(params.isEmpty(), is(false));
final List<NamedLocation> methods = locator.locate(new MethodUnit("check"));
assertThat(methods.isEmpty(), is(false));
final List<NamedLocation> classes = locator.locate(new ClassUnit("Preconditions"));
assertThat(classes.isEmpty(), is(false));
final List<NamedLocation> fields = locator.locate(new FieldUnit("something"));
assertThat(fields.isEmpty(), is(true));
final List<NamedLocation> vars = locator.locate(new VarUnit("bbb"));
assertThat(vars.isEmpty(), is(false));
}
}
| [
"huascar.sanchez@gmail.com"
] | huascar.sanchez@gmail.com |
1c61e4761b39b184b051a347adaa1860479f68e8 | 134fca5b62ca6bac59ba1af5a5ebd271d9b53281 | /build/stx/libjava/tests/mauve/java/src/gnu/testlet/java/util/logging/Logger/getAnonymousLogger.java | 85bf7a46cf87031a098695e53feb80154f2797a0 | [
"MIT"
] | permissive | GunterMueller/ST_STX_Fork | 3ba5fb5482d9827f32526e3c32a8791c7434bb6b | d891b139f3c016b81feeb5bf749e60585575bff7 | refs/heads/master | 2020-03-28T03:03:46.770962 | 2018-09-06T04:19:31 | 2018-09-06T04:19:31 | 147,616,821 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,554 | java | // Tags: JDK1.4
// Uses: TestFilter TestSecurityManager TestResourceBundle
// Copyright (C) 2004 Sascha Brawer <brawer@dandelis.ch>
// This file is part of Mauve.
// Mauve is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
// Mauve is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Mauve; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
package gnu.testlet.java.util.logging.Logger;
import gnu.testlet.Testlet;
import gnu.testlet.TestHarness;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.Formatter;
import java.util.logging.SimpleFormatter;
import java.util.MissingResourceException;
/**
* @author <a href="mailto:brawer@dandelis.ch">Sascha Brawer</a>
*/
public class getAnonymousLogger
implements Testlet {
TestSecurityManager sec = new TestSecurityManager();
public void test(TestHarness th) {
Logger al;
Throwable caught;
TestFilter filter = new TestFilter();
Formatter formatter = new SimpleFormatter();
try {
sec.install();
// This used to be 'sec.setGrantLoggingControl(false)', but that
// causes Logger.getAnonymousLogger() to fail on JDK 1.4.2.
// Stephen Crawley: 2004-05-11
sec.setGrantLoggingControl(true);
// Check #1.
al = Logger.getAnonymousLogger();
th.check(al != null);
// Check #2: New instance for each call.
th.check(al != Logger.getAnonymousLogger());
// Check #3.
al = Logger.getAnonymousLogger();
th.check(al.getName(), null);
// Check #4.
th.check(al.getResourceBundle(), null);
// Check #5.
th.check(al.getResourceBundleName(), null);
// Check #6: Parent is root logger.
th.check(al.getParent(), Logger.getLogger(""));
// Check #7.
al.setFilter(filter);
al.setUseParentHandlers(false);
al.setLevel(Level.FINEST);
al.entering("Class", "method", "txt");
th.check(formatter.formatMessage(filter.getLastRecord()), "ENTRY txt");
// Check #8.
al = Logger.getAnonymousLogger(TestResourceBundle.class.getName());
th.check(al.getResourceBundle() instanceof TestResourceBundle);
// Check #9.
al.setFilter(filter);
al.setUseParentHandlers(false);
al.setLevel(Level.FINEST);
al.entering("Class", "method", "txt");
th.check(formatter.formatMessage(filter.getLastRecord()), "BETRETEN txt");
// Check #10.
try {
Logger.getAnonymousLogger("garbageClassName");
th.check(false);
} catch (MissingResourceException ex) {
th.check(true);
} catch (Exception ex) {
th.check(false);
th.debug(ex);
}
} finally {
sec.uninstall();
}
}
}
| [
"gunter.mueller@gmail.com"
] | gunter.mueller@gmail.com |
a9f87191d29a0fb4e2c1c5202b019df4eb0eebb8 | 793838c553984fccfb33b61d6dccfedcf3785a02 | /HuongCauPhan/src/main/java/com/giaphavietnam/model/IndividualModel.java | c778e4d91330f7edbb4da36ea1e9946503bfb0c2 | [] | no_license | NhomHuongCauPhan/Nhom17 | e98213b43c4ce6df2d52613b9ebf47652f07c886 | d94d1ed17aca48b496725ef40498e3fd9369c37e | refs/heads/master | 2022-11-25T03:24:29.290463 | 2020-06-28T05:03:54 | 2020-06-28T05:03:54 | 211,510,229 | 0 | 0 | null | 2022-11-16T05:42:17 | 2019-09-28T14:09:57 | JavaScript | UTF-8 | Java | false | false | 1,477 | java | package com.giaphavietnam.model;
import java.sql.Date;
public class IndividualModel {
private long individualId;
private String branch ;
private String fullName ;
private int gender;
private Date dateOfBirth ;
private Date dateOfDeath ;
private int father;
private long parentageId ;
private String avatar ;
public long getIndividualId() {
return individualId;
}
public void setIndividualId(long individualId) {
this.individualId = individualId;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public int getGender() {
return gender;
}
public void setGender(int gender) {
this.gender = gender;
}
public Date getDateOfBirth() {
return dateOfBirth;
}
public void setDateOfBirth(Date dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
public Date getDateOfDeath() {
return dateOfDeath;
}
public void setDateOfDeath(Date dateOfDeath) {
this.dateOfDeath = dateOfDeath;
}
public int getFather() {
return father;
}
public void setFather(int father) {
this.father = father;
}
public String getBranch() {
return branch;
}
public void setBranch(String branch) {
this.branch = branch;
}
public long getParentageId() {
return parentageId;
}
public void setParentageId(long parentageId) {
this.parentageId = parentageId;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
}
| [
"phamvanhieu300198@gmail.com"
] | phamvanhieu300198@gmail.com |
d04688db22a8f53a7d847fc987a85131aad1f533 | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/test/com/netflix/conductor/elasticsearch/query/parser/TestComparisonOp.java | 97383948cfe095739e3f6c8fc319d6d8645bca87 | [] | no_license | STAMP-project/dspot-experiments | f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5 | 121487e65cdce6988081b67f21bbc6731354a47f | refs/heads/master | 2023-02-07T14:40:12.919811 | 2019-11-06T07:17:09 | 2019-11-06T07:17:09 | 75,710,758 | 14 | 19 | null | 2023-01-26T23:57:41 | 2016-12-06T08:27:42 | null | UTF-8 | Java | false | false | 1,523 | java | /**
* Copyright 2016 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
*
*/
package com.netflix.conductor.elasticsearch.query.parser;
import org.junit.Assert;
import org.junit.Test;
/**
*
*
* @author Viren
*/
public class TestComparisonOp extends AbstractParserTest {
@Test
public void test() throws Exception {
String[] tests = new String[]{ "<", ">", "=", "!=", "IN" };
for (String test : tests) {
ComparisonOp name = new ComparisonOp(getInputStream(test));
String nameVal = name.getOperator();
Assert.assertNotNull(nameVal);
Assert.assertEquals(test, nameVal);
}
}
@Test(expected = ParserException.class)
public void testInvalidOp() throws Exception {
String test = "AND";
ComparisonOp name = new ComparisonOp(getInputStream(test));
String nameVal = name.getOperator();
Assert.assertNotNull(nameVal);
Assert.assertEquals(test, nameVal);
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
4eb71782c38f3b7bb6cea60f2c53f8303e78eb1c | 281d080c68b32de690b0b01ec85d8d96fd873979 | /launch/src/com/besideu/source/util/FileCache.java | dace14fc1bc75b6a6397ae1b0254e3750da88666 | [] | no_license | JRY1009/BesideU | 0a2d38a8ae9e320a1ec5f763d49e5a570a1bade6 | b09d58823bef99ab08bba80f82ab358944f84423 | refs/heads/master | 2020-08-23T17:07:02.321422 | 2015-05-12T07:33:10 | 2015-05-12T07:33:10 | 35,473,000 | 2 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,358 | java | package com.besideu.source.util;
import java.io.File;
import android.content.Context;
public class FileCache {
private File cacheDir;
public FileCache(Context context) {
// 如果有SD卡则在SD卡中建一个LazyList的目录存放缓存的图片
// 没有SD卡就放在系统的缓存目录中
if (android.os.Environment.getExternalStorageState().equals(
android.os.Environment.MEDIA_MOUNTED))
cacheDir = new File(
android.os.Environment.getExternalStorageDirectory(),
"BesideU/LazyList");
else
cacheDir = context.getCacheDir();
if (!cacheDir.exists())
cacheDir.mkdirs();
}
public File getFile(String url) {
// 将url的hashCode作为缓存的文件名
String filename = String.valueOf(url.hashCode());
// Another possible solution
// String filename = URLEncoder.encode(url);
File f = new File(cacheDir, filename);
return f;
}
public void clear() {
File[] files = cacheDir.listFiles();
if (files == null)
return;
for (File f : files)
f.delete();
}
} | [
"jerryzhou1009@gmail.com"
] | jerryzhou1009@gmail.com |
1b5c59df187ce61ac82ca472b8680896d1f1a0ae | 191b976a31b1779fb7178449e155a1ea1cfb0b34 | /07_UI_Controles/ListViewYTabLayoutApp/app/src/main/java/mx/com/omnius/listviewytablayoutapp/listas/AdaptadorLista.java | 68ebea303dfad3510ebf2557deb4c7aa31459088 | [] | no_license | AlecsisDuarte/AndroidCourse | 1a1389555551bb0a43d038ec5c7e14ef3023553f | b813d72c601f57960c01967e75629f6fc23f4494 | refs/heads/master | 2016-09-01T14:43:34.301751 | 2016-05-06T02:40:35 | 2016-05-06T02:40:35 | 55,887,291 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,149 | java | package mx.com.omnius.listviewytablayoutapp.listas;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import mx.com.omnius.listviewytablayoutapp.R;
public class AdaptadorLista extends ArrayAdapter<String>{
Context context;
String[] nombres;
String[] descripciones;
int[] idFotos;
int resourceId;
public AdaptadorLista(Context context, int resource, String[] objects) {
super(context, resource, objects);
this.resourceId = resource;
this.context = context;
}
public void setNombres(String[] nombres) {
this.nombres = nombres;
}
public void setDescripciones(String[] descripciones) {
this.descripciones = descripciones;
}
public void setIdFotos(int[] idFotos) {
this.idFotos = idFotos;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if (convertView == null){
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.vista_lista_personalizada, parent, false);
holder = new ViewHolder(convertView);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
holder.cargarDatos(position);
return convertView;
}
class ViewHolder{
ImageView imagen;
TextView nombre, descripcion;
ViewHolder(View vista){
nombre = (TextView) vista.findViewById(R.id.text_nombre);
descripcion = (TextView) vista.findViewById(R.id.text_descripcion);
imagen = (ImageView) vista.findViewById(R.id.image_lista);
}
void cargarDatos(int position){
nombre.setText(nombres[position]);
descripcion.setText(descripciones[position]);
imagen.setImageResource(idFotos[position]);
}
}
}
| [
"mduarte@brooklynpacket.com"
] | mduarte@brooklynpacket.com |
c6248ac0b7965f45bf855d95f29e145aac693937 | 9a6eb288177872d4829d997e2016f1297e24d46d | /src/main/java/com/web/database/MongoDB/Pojo/Form.java | eeca3b340034ec2ed2693ec08b5c11e689cba958 | [] | no_license | thecheapestpint/JobBoard-WebParser | cdc28db69bc7c6cde712ec2b51d2567dedf9c989 | 914f352e5bc0aac71d5adf4f235639525f7173b4 | refs/heads/master | 2021-01-19T19:51:31.996774 | 2017-08-23T18:15:16 | 2017-08-23T18:15:16 | 101,210,770 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 752 | java | package com.web.database.MongoDB.Pojo;
import java.util.Map;
public class Form {
private Map<String, String> form;
private Map<String, String> keyword;
private Map<String, String> location;
public Form(){
}
public Map<String, String> getFormAttributes() {
return form;
}
public Map<String, String> getKeywordAttributes() {
return keyword;
}
public Map<String, String> getLocationAttribtes() {
return location;
}
public Form(Map<String, String> formAttributes, Map<String, String> keywordAttributes, Map<String, String> locationAttribtes) {
this.form = formAttributes;
this.keyword = keywordAttributes;
this.location = locationAttribtes;
}
}
| [
"paul.mitchell354@gmail.com"
] | paul.mitchell354@gmail.com |
37d9d82eb18b3170eefcc89ef0289d7fa806d5c7 | 122287275ec1666cc27a6b6d06bab4f8b1c4ff33 | /用到的工具jar包/jars/evosuite-tests/org/apache/bcel/generic/GETSTATIC_ESTest.java | c045158a2be5d168231e308a4efc1893065c6bc5 | [] | no_license | NJUCWL/symbolic_tools | f036691918b147019c99584efb4dcbe1228ae6c0 | 669f549b0a97045de4cd95b1df43de93b1462e45 | refs/heads/main | 2023-05-09T12:00:57.836897 | 2021-06-01T13:34:40 | 2021-06-01T13:34:40 | 370,017,201 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,008 | java | /*
* This file was automatically generated by EvoSuite
* Tue Mar 16 14:54:51 GMT 2021
*/
package org.apache.bcel.generic;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.bcel.classfile.Constant;
import org.apache.bcel.classfile.ConstantFloat;
import org.apache.bcel.classfile.ConstantInterfaceMethodref;
import org.apache.bcel.classfile.ConstantPool;
import org.apache.bcel.generic.ConstantPoolGen;
import org.apache.bcel.generic.GETSTATIC;
import org.apache.bcel.verifier.structurals.ExecutionVisitor;
import org.apache.bcel.verifier.structurals.InstConstraintVisitor;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class GETSTATIC_ESTest extends GETSTATIC_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
GETSTATIC gETSTATIC0 = new GETSTATIC();
ExecutionVisitor executionVisitor0 = new ExecutionVisitor();
// Undeclared exception!
try {
gETSTATIC0.accept(executionVisitor0);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("org.apache.bcel.generic.FieldOrMethod", e);
}
}
@Test(timeout = 4000)
public void test1() throws Throwable {
GETSTATIC gETSTATIC0 = new GETSTATIC();
Constant[] constantArray0 = new Constant[3];
ConstantInterfaceMethodref constantInterfaceMethodref0 = new ConstantInterfaceMethodref(31, (-2104));
constantArray0[0] = (Constant) constantInterfaceMethodref0;
ConstantPoolGen constantPoolGen0 = new ConstantPoolGen(constantArray0);
// Undeclared exception!
try {
gETSTATIC0.produceStack(constantPoolGen0);
fail("Expecting exception: RuntimeException");
} catch(RuntimeException e) {
//
// Invalid constant pool reference: -2104. Constant pool size is: 256
//
verifyException("org.apache.bcel.classfile.ConstantPool", e);
}
}
@Test(timeout = 4000)
public void test2() throws Throwable {
GETSTATIC gETSTATIC0 = new GETSTATIC();
Constant[] constantArray0 = new Constant[2];
ConstantFloat constantFloat0 = new ConstantFloat(2.0F);
constantArray0[0] = (Constant) constantFloat0;
ConstantPool constantPool0 = new ConstantPool(constantArray0);
ConstantPoolGen constantPoolGen0 = new ConstantPoolGen(constantPool0);
// Undeclared exception!
try {
gETSTATIC0.produceStack(constantPoolGen0);
fail("Expecting exception: ClassCastException");
} catch(ClassCastException e) {
//
// org.apache.bcel.classfile.ConstantFloat cannot be cast to org.apache.bcel.classfile.ConstantCP
//
verifyException("org.apache.bcel.generic.FieldOrMethod", e);
}
}
@Test(timeout = 4000)
public void test3() throws Throwable {
GETSTATIC gETSTATIC0 = null;
try {
gETSTATIC0 = new GETSTATIC((-968));
fail("Expecting exception: RuntimeException");
} catch(RuntimeException e) {
//
// Negative index value: -968
//
verifyException("org.apache.bcel.generic.CPInstruction", e);
}
}
@Test(timeout = 4000)
public void test4() throws Throwable {
GETSTATIC gETSTATIC0 = new GETSTATIC();
// Undeclared exception!
try {
gETSTATIC0.produceStack((ConstantPoolGen) null);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("org.apache.bcel.generic.FieldOrMethod", e);
}
}
@Test(timeout = 4000)
public void test5() throws Throwable {
GETSTATIC gETSTATIC0 = new GETSTATIC();
Class<?>[] classArray0 = gETSTATIC0.getExceptions();
assertEquals(4, classArray0.length);
}
@Test(timeout = 4000)
public void test6() throws Throwable {
GETSTATIC gETSTATIC0 = new GETSTATIC(164);
assertEquals(3, gETSTATIC0.getLength());
}
@Test(timeout = 4000)
public void test7() throws Throwable {
GETSTATIC gETSTATIC0 = new GETSTATIC();
InstConstraintVisitor instConstraintVisitor0 = new InstConstraintVisitor();
// Undeclared exception!
try {
gETSTATIC0.accept(instConstraintVisitor0);
fail("Expecting exception: ArrayIndexOutOfBoundsException");
} catch(ArrayIndexOutOfBoundsException e) {
//
// -1
//
verifyException("org.apache.bcel.Const", e);
}
}
}
| [
"48467952+NJUCWL@users.noreply.github.com"
] | 48467952+NJUCWL@users.noreply.github.com |
89802414434a25d052d1455c4b18afd83c24951e | 47e2fa047571096dec2fdfd05d7f468f00ef21c9 | /src/linklist/ListNode.java | dea5c81ec7e79aa729714fbfe86ce450e502074c | [] | no_license | xsh857104167/intermediateAlgorithm | 4eab328bd3875ecaa34e53f4c9bda168d5ae41d7 | 7ecca8d93926776943b78706845c2c68b68cae0d | refs/heads/master | 2023-08-17T07:42:22.177619 | 2021-09-28T08:41:00 | 2021-09-28T08:41:00 | 393,368,323 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 309 | java | package linklist;
/**
* @author Murphy Xu
* @create 2021-08-10 15:42
*/
public class ListNode {
int val;
ListNode next;
ListNode() {
}
ListNode(int val) {
this.val = val;
}
ListNode(int val, ListNode next) {
this.val = val;
this.next = next;
}
}
| [
"xsh857104167@163.com"
] | xsh857104167@163.com |
5559f426896caeaf8e565e9d9b09461a0fc578c3 | 42fa9d930b0ae24e082a57c39229ef0478d6ed1b | /src/main/java/seasky/spring/boot/controller/PeopleController.java | f9a8182f1e6d1a8daf954d703aac3ed3b58e7876 | [] | no_license | SeaSky0606/seasky-rest-service | 489f92ba144d1239884e0a89c27af3e1e1d9c95e | 4b34f8fbf64dac44d3f480015c505a5339e6056a | refs/heads/master | 2021-01-17T12:59:47.280763 | 2020-11-23T02:00:55 | 2020-11-23T02:00:55 | 58,519,132 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,249 | java | package seasky.spring.boot.controller;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import seasky.spring.boot.bean.Greeting;
import seasky.spring.boot.model.PeopleModel;
@RestController
@RequestMapping("/people")
public class PeopleController {
private static final String template = "Hello, %s!";
private final AtomicLong counter = new AtomicLong();
@RequestMapping("/greeting")
public Greeting greeting(
@RequestParam(value = "name", defaultValue = "World") String name) {
return new Greeting(counter.incrementAndGet(), String.format(template,
name));
}
@RequestMapping("/getAllPeople")
public Map<String, Object> getAllPeople(
@RequestParam(value = "name", required = false, defaultValue = "World") String name) {
return new PeopleModel().getAllPeople();
}
@RequestMapping("/getPeopleById")
public Map<String, Object> getPeopleById(
@RequestParam(value = "id", defaultValue = "World") int id,
Model model) {
return new PeopleModel().getPeopleById(id);
}
}
| [
"847421525@qq.com"
] | 847421525@qq.com |
c8dd8c9c2d3e6ced072f7ba81c86cf6819648765 | aa2451199f92b3edbb8a74b996621cd1fdb2da36 | /app/src/main/java/com/pplview/parita/pplview/AnonymousActivityLog.java | 43de8e07418d0b81424a40fe4330913f5324b562 | [] | no_license | paritadey/PplView_news | 9be8233052eed00ea15e31f7ba2a04e922a9e56a | 9bef6a0ac3bf9e0e60a3e7ea69e7b272eb400bde | refs/heads/master | 2020-03-09T03:17:18.635499 | 2018-04-07T14:48:25 | 2018-04-07T14:48:25 | 128,561,719 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,557 | java | package com.pplview.parita.pplview;
import android.app.ProgressDialog;
import android.net.Uri;
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
public class AnonymousActivityLog extends AppCompatActivity {
TextView anoname, nocomment;
String myemail;
String EmailHolder;
public static final int CONNECTION_TIMEOUT = 20000;
public static final int READ_TIMEOUT = 20000;
private RecyclerView mRVFish;
private TimelineAdapter mAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_anonymous_log);
String id = android.provider.Settings.Secure.getString(getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
anoname=(TextView)findViewById(R.id.anoname);
anoname.setText(id);
EmailHolder=anoname.getText().toString().trim();
myemail=anoname.getText().toString().trim();
nocomment=(TextView)findViewById(R.id.nocomment);
new AsyncFetch(myemail).execute();
}
//showing the history of posts support/against of Anonymous User by sending the deviceid and when matching
// details found against the device id in the table stored in the database in the server then send the results as jsob object
public class AsyncFetch extends AsyncTask<String, String, String> {
ProgressDialog pdLoading = new ProgressDialog(AnonymousActivityLog.this);
HttpURLConnection conn;
URL url = null;
String searchQuery;
public AsyncFetch(String searchQuery){
this.searchQuery=searchQuery;
}
@Override
protected void onPreExecute() {
super.onPreExecute();
//this method will be running on UI thread
pdLoading.setMessage("\tLoading...");
pdLoading.setCancelable(false);
pdLoading.show();
}
@Override
protected String doInBackground(String... params) {
try {
// Enter URL address where your php file resides
url = new URL("https://paritasampa95.000webhostapp.com/PeopleView/AnonymousActivity.php");
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return e.toString();
}
try {
// Setup HttpURLConnection class to send and receive data from php and mysql
conn = (HttpURLConnection) url.openConnection();
conn.setReadTimeout(READ_TIMEOUT);
conn.setConnectTimeout(CONNECTION_TIMEOUT);
conn.setRequestMethod("POST");
// setDoInput and setDoOutput to true as we send and recieve data
conn.setDoInput(true);
conn.setDoOutput(true);
// add parameter to our above url
Uri.Builder builder = new Uri.Builder().appendQueryParameter("myemail", myemail);
String query = builder.build().getEncodedQuery();
OutputStream os = conn.getOutputStream();
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, "UTF-8"));
writer.write(query);
writer.flush();
writer.close();
os.close();
conn.connect();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
return e1.toString();
}
try {
int response_code = conn.getResponseCode();
// Check if successful connection made
if (response_code == HttpURLConnection.HTTP_OK) {
// Read data sent from server
InputStream input = conn.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(input));
StringBuilder result = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
result.append(line);
}
// Pass data to onPostExecute method
return (result.toString());
} else {
return("Connection error");
}
} catch (IOException e) {
e.printStackTrace();
return e.toString();
} finally {
conn.disconnect();
}
}
@Override
protected void onPostExecute(String result) {
//this method will be running on UI thread
pdLoading.dismiss();
List<Timeline> data=new ArrayList<>();
pdLoading.dismiss();
if(result.equals("no rows")) {
Toast.makeText(AnonymousActivityLog.this, "No Results found ", Toast.LENGTH_LONG).show();
}else{
try {
JSONArray jArray = new JSONArray(result);
// Extract data from json and store into ArrayList as class objects
for (int i = 0; i < jArray.length(); i++) {
JSONObject json_data = jArray.getJSONObject(i);
Timeline product = new Timeline();
product.heading = json_data.getString("heading");
product.description = json_data.getString("description");
product.comment=json_data.getString("comment");
product.userposttime=json_data.getString("userposttime");
data.add(product);
}
// Setup and Handover data to recyclerview
mRVFish = (RecyclerView)findViewById(R.id.recycler_view);
mRVFish.addItemDecoration(new background(AnonymousActivityLog.this));
mAdapter = new TimelineAdapter(AnonymousActivityLog.this, data);
mRVFish.setAdapter(mAdapter);
mRVFish.setLayoutManager(new LinearLayoutManager(AnonymousActivityLog.this));
} catch (JSONException e) {
// You to understand what actually error is and handle it appropriately
Log.d(e.toString(),"error");
//Log.d(result.toString(),"errortoshow");
// Toast.makeText(MyOrderList.this, e.toString(), Toast.LENGTH_LONG).show();
// Toast.makeText(AnonymousActivityLog.this, "No history is present", Toast.LENGTH_LONG).show();
nocomment.setVisibility(View.VISIBLE);
}
}
}
}
}
| [
"paritasampa95@gmail.com"
] | paritasampa95@gmail.com |
99bf1d921f94a92ed5e93293899776f8f8db063b | 070029c17682d8548a6333c1dfc910798b5ff2b2 | / 第10课-用spring Restdocs创建API文档/src/test/java/com/example/bai10restdocs/restdocs/WebLayerTest.java | 7819c353cb7b85ea84d4b1865bdc380ac730e52a | [] | no_license | baiyuting/springboot | d103a8364bb1f7d1c815e53333e4133289e1c2da | 6deef5e7ccb40000234cc61bb3ad97affb33367a | refs/heads/master | 2021-09-14T13:22:57.033909 | 2018-05-14T09:09:30 | 2018-05-14T09:09:30 | 109,808,500 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,504 | java | package com.example.bai10restdocs.restdocs;
import com.example.bai10restdocs.controller.HomeController;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.autoconfigure.restdocs.AutoConfigureRestDocs;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.ResultHandler;
import javax.annotation.Resource;
import static org.hamcrest.core.StringContains.containsString;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@RunWith(SpringRunner.class)
@WebMvcTest(HomeController.class)
@AutoConfigureRestDocs(outputDir = "target/snippets")
public class WebLayerTest {
@Resource
private MockMvc mockMvc;
@Test
public void shouldReturnDefaultMessage() throws Exception {
this.mockMvc.perform(get("/")).andDo(print()).andExpect(status().isOk())
.andExpect(content().string(containsString("Hello World")))
.andDo(document("home"));
}
}
| [
"baiyuting@vipkid.com.cn"
] | baiyuting@vipkid.com.cn |
48fffb09061315ea78cd7995f612c18a73a046a3 | 75dbf8d11cc79d911342594a0ce5a2c9fa271ef1 | /GfG/Strings/PalindromeCheck.java | db2fdddca60dd8cb5fb6b56573e7422741b099c1 | [] | no_license | prakharkeshari/DSA-work | d7671f8df854b322bd4e9cb45d5cf54f92ada512 | b61908fe066fb357dea7b575bc7a093145f2b152 | refs/heads/main | 2023-08-15T11:28:42.016350 | 2021-10-23T13:20:48 | 2021-10-23T13:20:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 440 | java | package Strings;
public class PalindromeCheck {
public static void main(String[] args) {
String str = "gfg";
System.out.println(checkPalindrom(str));
}
public static boolean checkPalindrom(String str){
for(int i=0;i<str.length();i++){
if(str.charAt(i)!= str.charAt(str.length()-1-i)){
return false;
}
}
return true;
}
}
| [
"prakharkeshari0@gmail.com"
] | prakharkeshari0@gmail.com |
45b009ec4394c51fa59559dbeabb2c15c021ab3c | cd733bcbc689a3e0b3cba349d418a63c37c6f846 | /Sample/testfl/gen/com/example/testfl/R.java | b080df3639a04864cc7ef08b5aa37becdb02ce7e | [] | no_license | Dragonchang/android_app | 58f70a59783947f90d01d0c2f3d213059af0f542 | 7b44bbc0c0590d613f0ca5f6fb4888cb7f9d6345 | refs/heads/master | 2022-03-12T22:55:12.167038 | 2019-10-17T05:21:54 | 2019-10-17T05:21:54 | 109,770,758 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,798 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.example.testfl;
public final class R {
public static final class attr {
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines.
Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
*/
public static final int activity_horizontal_margin=0x7f040000;
public static final int activity_vertical_margin=0x7f040001;
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
}
public static final class id {
public static final int action_settings=0x7f080005;
public static final int button1=0x7f080001;
public static final int button2=0x7f080002;
public static final int button3=0x7f080003;
public static final int button4=0x7f080004;
public static final int textView1=0x7f080000;
}
public static final class layout {
public static final int activity_main=0x7f030000;
public static final int activity_mydb=0x7f030001;
public static final int animator=0x7f030002;
}
public static final class menu {
public static final int main=0x7f070000;
}
public static final class string {
public static final int action_settings=0x7f050001;
public static final int app_name=0x7f050000;
public static final int hello_world=0x7f050002;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
*/
public static final int AppBaseTheme=0x7f060000;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f060001;
}
}
| [
"amt_masd_fl_zhang@htc.com"
] | amt_masd_fl_zhang@htc.com |
4f08d5e0d13961dd2405ea27711b7d491f9319ac | b9fcac1c00eba3225053e746a55a9cbf0e77ee86 | /src/br/com/fucapi/entity/Contrato.java | 85a14f15803f1897bece49a12f1559a7ba09a515 | [] | no_license | FernandoMauricio/locadora | 8fe0e6e8fc5982e894d32a50e16b661668092a3a | 04ca7afa0b49bfd741c108e269fbec3a00b90c4e | refs/heads/master | 2021-01-20T15:57:48.302713 | 2017-08-11T03:23:49 | 2017-08-11T03:23:49 | 90,803,587 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,754 | java | package br.com.fucapi.entity;
import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
/**
* The persistent class for the contratos database table.
*
*/
@Entity
@Table(name="contratos")
@NamedQuery(name="Contrato.findAll", query="SELECT c FROM Contrato c")
public class Contrato implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@Column(name="num_contrato")
private Long numContrato;
@Temporal(TemporalType.DATE)
@Column(name="data_devolucao")
private Date dataDevolucao;
@Temporal(TemporalType.DATE)
@Column(name="data_retirada")
private Date dataRetirada;
@Column(name="situacao_contrato")
private String situacaoContrato;
@Column(name="quant_diaria")
private double quantDiaria;
@Column(name="valor_diaria")
private double valorDiaria;
@Column(name="valor_taxas")
private double valorTaxas;
@Column(name="valor_total")
private String valorTotal;
//bi-directional many-to-one association to Cliente
@ManyToOne
@JoinColumn(name="fk_clientes_id")
private Cliente cliente;
//bi-directional many-to-one association to Veiculo
@ManyToOne
@JoinColumn(name="fk_veiculos_id")
private Veiculo veiculo;
public Contrato() {
}
public Date getDataDevolucao() {
return this.dataDevolucao;
}
public void setDataDevolucao(Date dataDevolucao) {
this.dataDevolucao = dataDevolucao;
}
public Date getDataRetirada() {
return this.dataRetirada;
}
public void setDataRetirada(Date dataRetirada) {
this.dataRetirada = dataRetirada;
}
public String getSituacaoContrato() {
return this.situacaoContrato;
}
public void setSituacaoContrato(String situacaoContrato) {
this.situacaoContrato = situacaoContrato;
}
public double getValorDiaria() {
return this.valorDiaria;
}
public void setValorDiaria(double valorDiaria) {
this.valorDiaria = valorDiaria;
}
public double getValorTaxas() {
return this.valorTaxas;
}
public void setValorTaxas(double valorTaxas) {
this.valorTaxas = valorTaxas;
}
public String getValorTotal() {
return this.valorTotal;
}
public void setValorTotal(String valorTotal) {
this.valorTotal = valorTotal;
}
public Cliente getCliente() {
return this.cliente;
}
public void setCliente(Cliente cliente) {
this.cliente = cliente;
}
public Veiculo getVeiculo() {
return this.veiculo;
}
public void setVeiculo(Veiculo veiculo) {
this.veiculo = veiculo;
}
public Long getNumContrato() {
return numContrato;
}
public void setNumContrato(Long numContrato) {
this.numContrato = numContrato;
}
public double getQuantDiaria() {
return quantDiaria;
}
public void setQuantDiaria(double quantDiaria) {
this.quantDiaria = quantDiaria;
}
} | [
"rafael.wfc@gmail.com"
] | rafael.wfc@gmail.com |
1cda9e0aea0bde65f203ae145abaaf3e090677cc | dfae58cfae72bb5ec122eaa13c86b69f57af20cb | /myShop/src/main/java/com/shop/mapper/OrderitemMapper.java | 1712bdbbcf856ef78770a102f5aa2415d86f1e03 | [] | no_license | Midyang/bishe | 2da32cdd6dbc5cfb9620daaa903ee7cbcbbbbe9e | 9979f1520f68cdcb634521386e833d55ab60f23e | refs/heads/master | 2023-01-04T23:29:58.965959 | 2019-05-31T16:13:49 | 2019-05-31T16:13:49 | 186,996,348 | 1 | 0 | null | 2022-12-16T05:00:35 | 2019-05-16T09:28:58 | Java | UTF-8 | Java | false | false | 885 | java | package com.shop.mapper;
import com.shop.pojo.Orderitem;
import com.shop.pojo.OrderitemExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OrderitemMapper {
int countByExample(OrderitemExample example);
int deleteByExample(OrderitemExample example);
int deleteByPrimaryKey(Integer id);
int insert(Orderitem record);
int insertSelective(Orderitem record);
List<Orderitem> selectByExample(OrderitemExample example);
Orderitem selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") Orderitem record, @Param("example") OrderitemExample example);
int updateByExample(@Param("record") Orderitem record, @Param("example") OrderitemExample example);
int updateByPrimaryKeySelective(Orderitem record);
int updateByPrimaryKey(Orderitem record);
} | [
"47728383+Midyang@users.noreply.github.com"
] | 47728383+Midyang@users.noreply.github.com |
1661d3f18432ad68fe4bf271523b27795a1e70bd | 7e9afab0f04cbdcf7db57855cb1f5df352dd84c3 | /src/main/java/frc/robot/commands/Base/SwerveWithJoysticks.java | bb7a718643bee541289aa11bc3042495616bc1fb | [] | no_license | ColinZ22/2021-FRC-Robot | 655f9e21cd7bd929c11e5216ebde1e5b84e213b1 | 0ea66e29d45f6c0fc3f469636d6ead8a5c1434a4 | refs/heads/main | 2023-04-11T03:06:55.920386 | 2021-05-02T21:09:42 | 2021-05-02T21:09:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,082 | java | package frc.robot.commands.Base;
import static frc.robot.Constants.*;
import edu.wpi.first.wpilibj.SlewRateLimiter;
import edu.wpi.first.wpilibj2.command.CommandBase;
import frc.robot.Robot;
public class SwerveWithJoysticks extends CommandBase {
// Slew rate limiters to make joystick inputs more gentle; 1/3 sec from 0 to 1.
private final SlewRateLimiter xspeedLimiter = new SlewRateLimiter(6);
private final SlewRateLimiter yspeedLimiter = new SlewRateLimiter(6);
private final SlewRateLimiter rotLimiter = new SlewRateLimiter(6);
public SwerveWithJoysticks() {
addRequirements(Robot.base);
}
// Called when the command is initially scheduled.
@Override
public void initialize() {
}
@Override
public void execute() {
// Get the x speed. We are inverting this because Xbox controllers return
// negative values when we push forward.
final var xSpeed =
xspeedLimiter.calculate(Robot.m_robotContainer.getLogiLeftYAxis())
* kMaxSpeed;
// Get the y speed or sideways/strafe speed. We are inverting this because
// we want a positive value when we pull to the left. Xbox controllers
// return positive values when you pull to the right by default.
final var ySpeed =
yspeedLimiter.calculate(Robot.m_robotContainer.getLogiLeftXAxis())
* kMaxSpeed;
// Get the rate of angular rotation. We are inverting this because we want a
// positive value when we pull to the left (remember, CCW is positive in
// mathematics). Xbox controllers return positive values when you pull to
// the right by default.
final var rot =
rotLimiter.calculate(Robot.m_robotContainer.getLogiRightXAxis())
* kMaxAngularSpeed;
//boolean calibrate = controller.getBumper(GenericHID.Hand.kLeft);
Robot.base.drive(xSpeed, ySpeed, rot, true);
}
// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {
}
// Returns true when the command should end.
@Override
public boolean isFinished() {
return false;
}
} | [
"59755453+ColinZ22@users.noreply.github.com"
] | 59755453+ColinZ22@users.noreply.github.com |
ccb5a90c8e9367b9439067f2a5fbca4e795923a7 | 7e67776ba4f72daf3c267d841fa39fffb84d3409 | /src/main/java/fredine/reactive/controller/CallbackController.java | 46bf3821b40cdb4a8c8b12d3fa667581795c7651 | [] | no_license | efredine/reactive | 0444e5a33019e65f6015aa2cbc4d35d007524a7c | 5591de073d53420541e79494b0f214ce137df611 | refs/heads/master | 2020-03-28T20:17:05.824836 | 2018-10-22T01:01:08 | 2018-10-22T01:01:08 | 149,055,988 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,309 | java | package fredine.reactive.controller;
import com.intuit.oauth2.client.OAuth2PlatformClient;
import com.intuit.oauth2.data.BearerTokenResponse;
import com.intuit.oauth2.data.UserInfoResponse;
import com.intuit.oauth2.exception.OAuthException;
import com.intuit.oauth2.exception.OpenIdException;
import fredine.reactive.client.OAuth2PlatformClientFactory;
import fredine.reactive.client.TokenStore;
import io.micronaut.context.annotation.Value;
import io.micronaut.http.HttpResponse;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
import io.micronaut.http.annotation.QueryValue;
import io.micronaut.session.Session;
import org.apache.commons.lang.StringUtils;
import org.apache.http.client.utils.URIBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.inject.Inject;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Optional;
@Controller("/")
public class CallbackController {
@Value("${oauth.redirect.url}")
private String redirectUri;
@Inject
private OAuth2PlatformClientFactory factory;
private static final Logger logger = LoggerFactory.getLogger(CallbackController.class);
@Get("/oauth2redirect")
public HttpResponse callBackFromOAuth(
@QueryValue("code") String authCode,
@QueryValue("state") String state,
@QueryValue("realmId") Optional<String> realmId,
TokenStore tokenStore,
Session session)
{
logger.info("inside oauth2redirect of sample" );
try {
if (tokenStore.getCSRFToken().equals(state)) {
realmId.ifPresent(tokenStore::setRealmId);
session.put("auth_code", authCode);
OAuth2PlatformClient client = factory.getOAuth2PlatformClient();
logger.info("inside oauth2redirect of sample -- redirectUri " + redirectUri );
BearerTokenResponse bearerTokenResponse = client.retrieveBearerTokens(authCode, redirectUri);
tokenStore.setAccessToken(bearerTokenResponse.getAccessToken());
tokenStore.setRefreshToken(bearerTokenResponse.getRefreshToken());
/*
Update your Data store here with user's AccessToken and RefreshToken along with the realmId
However, in case of OpenIdConnect, when you request OpenIdScopes during authorization,
you will also receive IDToken from Intuit.
You first need to validate that the IDToken actually came from Intuit.
*/
if (StringUtils.isNotBlank(bearerTokenResponse.getIdToken())) {
try {
if(client.validateIDToken(bearerTokenResponse.getIdToken())) {
logger.info("IdToken is Valid");
//get user info
saveUserInfo(bearerTokenResponse.getAccessToken(), session, client);
}
} catch (OpenIdException e) {
logger.error("Exception validating id token ", e);
}
}
// todo: make this configurable
URI redirectURI = new URIBuilder()
.setScheme("http")
.setHost("localhost")
.setPort(3000)
.setPath("/connected")
.build();
return HttpResponse.redirect(redirectURI);
}
logger.info("csrf token mismatch " );
} catch (OAuthException e) {
logger.error("Exception in callback handler ", e);
} catch (URISyntaxException e) {
logger.error("Unexpected URI syntax error: ", e);
}
return HttpResponse.badRequest();
}
private void saveUserInfo(String accessToken, Session session, OAuth2PlatformClient client) {
//Ideally you would fetch the realmId and the accessToken from the data store based on the user account here.
try {
UserInfoResponse response = client.getUserInfo(accessToken);
session.put("sub", response.getSub());
session.put("givenName", response.getGivenName());
session.put("email", response.getEmail());
}
catch (Exception ex) {
logger.error("Exception while retrieving user info ", ex);
}
}
}
| [
"eric.fredine@beanworks.com"
] | eric.fredine@beanworks.com |
4e761bf624ae42fd83f54a9c8156c5991b39a14f | de703694c2831e55a5ddaec78d9e14bb12ec38d5 | /ch06/src/sec13/exam02_constructor_access/package2/C.java | fb55da49b32d5231b23b40cf2b94baae32929aee | [] | no_license | witch49/Java | f4a0b184b21ff3d7701eafdf4232cfd7067a3ec4 | a367654d6482916e72f8b7d2514af9f1b75908e5 | refs/heads/master | 2020-04-28T19:36:14.886919 | 2019-05-31T01:51:58 | 2019-05-31T01:51:58 | 175,516,746 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 311 | java | package sec13.exam02_constructor_access.package2;
import sec13.exam02_constructor_access.package1.A;
public class C {
// Field
A a1 = new A(true);
// A a2 = new A(1); // 컴파일 에러. default 생성자 접근 불가
// A a3 = new A("문자열"); // 컴파일 에러. private 생성자 접근 불가
}
| [
"verdure789@gmail.com"
] | verdure789@gmail.com |
9476224b71b9d28b52b89df3e9eb9d953ad5fdcc | 3becf2374166696b6d6fec4e0e64bcc9d1a5af88 | /micro-service-gateway-9527/src/main/java/micro/service/cloud/GatewayApp9527.java | ff35238d5c289c36716fce9d33d1758d6e8b34ee | [] | no_license | WangYG3022/micro-service-base-2020 | ce707cb886b22482538c01333379e76e706f7d1a | 9e108c606dc18798dd05e6e787943d9c6ea0e8e7 | refs/heads/master | 2023-01-05T09:48:54.122972 | 2020-11-08T02:24:35 | 2020-11-08T02:24:35 | 293,549,429 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 515 | java | package micro.service.cloud;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
/**
* @description:
* @author: WANG Y.G.
* @time: 2020/08/06 18:20
* @version: V1.0
*/
@SpringBootApplication
@EnableEurekaClient
public class GatewayApp9527 {
public static void main(String[] args) {
SpringApplication.run(GatewayApp9527.class, args);
}
}
| [
"935203723@qq.com"
] | 935203723@qq.com |
7c2c685fe7e45dc85c10c7da16c4cbae9d7b8151 | 3ac1d94d17e1f726d65bfc4b78baa05b4bceea18 | /TeamCode/src/main/java/org/firstinspires/ftc/teamcode/DriverControl.java | 20374dcceea21a85c21282842c7a09b3a5f904ae | [
"BSD-3-Clause"
] | permissive | EpRoboRaiders/SkyStone | 4339e6b86a6b791c8b8a475347d96d3fe62fb5ec | 885f5c4d76e4c6c54814cacc3d11c9e0235c0390 | refs/heads/master | 2021-07-15T21:39:47.159890 | 2020-09-17T00:14:51 | 2020-09-17T00:14:51 | 211,736,180 | 0 | 0 | null | 2019-09-29T22:51:40 | 2019-09-29T22:51:40 | null | UTF-8 | Java | false | false | 13,377 | java | /* Copyright (c) 2017 FIRST. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted (subject to the limitations in the disclaimer below) provided that
* the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* Neither the name of FIRST nor the names of its contributors may be used to endorse or
* promote products derived from this software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS
* LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.util.Range;
import java.lang.Math;
import static com.qualcomm.robotcore.util.Range.clip;
@TeleOp(name="Robot Driving Controls", group="Iterative Opmode")
// DriverControl is the main program used during the Driver Controlled and Endgame periods.
public class DriverControl extends OpMode {
// Creates a motor based on the RobotTemplate class.
RobotTemplate robot = new RobotTemplate();
// The array driveMode stores all of the possible modes for driving our robot. At the start of
// the program, the mode is set to 0, or "tank."
enum Mode {
TANK("Pure Tank Drive"),
OMNI("Hybrid Tank/Mecanum Drive"),
MECANUM("Pure Mecanum Drive");
private String description;
// getNext taken from (with modifications)
// https://digitaljoel.nerd-herders.com/2011/04/05/get-the-next-value-in-a-java-enum/.
public Mode getNext() {
return this.ordinal() < Mode.values().length - 1
? Mode.values()[this.ordinal() + 1]
: Mode.values()[0];
}
// Code taken from (with modifications)
// https://stackoverflow.com/questions/15989316/
// how-to-add-a-description-for-each-entry-of-enum/15989359#15989359
private Mode(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
}
Mode mode = Mode.OMNI;
// final String[] driveMode = {"tank", "pov", "debug", "omni", "mecanum"};
int currentMode = 0;
// "[button]Pressed" booleans store the "current" state of a controller's button to compare it
// to the actual current value as stated by gamepad[controller number].[button].
boolean bPressed = false;
boolean leftPressed = false;
boolean rightPressed = false;
boolean leftBumperPressed = false;
// These constants ("final" variables) act to pin the terms "LOW," "MEDIUM," and "HIGH" speed
// to concrete numbers for extending and retracting the stone lift. The speed is set to
// "MEDIUM" at the beginning of the program.
static final double LOW = .33;
static final double MEDIUM = .67;
static final double HIGH = 1;
double liftSpeed = MEDIUM;
// clampPressed simply exists to make sure the robot does not forcibly move into a position
// in which the Capstone would be dropped onto the playing field as soon as the Driver
// Controlled period begins. It locks the clamp into its initial position once the code starts,
// and does not move until instructed, at which point it begins to behave according to the code.
boolean clampPressed = false;
// These doubles store the position of the "clamp" servos on the robot to do calculations on.
double chassisPosition = .35;
double mountedPosition = 1;
@Override
public void init() {
// Initialize the robot and its motors.
robot.init(hardwareMap);
// Tell the driver that initialization is complete.
telemetry.addData("Robot Mode:", "Initialized");
telemetry.update();
}
// Runs repeatedly after the "init" button is pressed on the phone. Currently, it serves no
// function.
@Override
public void init_loop() {}
// Runs once after the "start" is pressed on the phone. Currently, it simply moves the T-bar
// to an upright position.
@Override
public void start() {
// Move the t-bar to an upright position.
robot.stoneGrabber.setPosition(1);
}
// Runs repeatedly after the "start" button is pressed on the phone.
public void loop() {
// As seen below, run the code controlling the robot (separated into three distinct parts
// for the sake of modularity).
// chassisDrive: Contains the code used for running the "drive" motors on the robot.
chassisDrive();
// liftMovement: Contains the code used for controlling our stone lift's angle and
// "position," whether in or out.
liftMovement();
// clampControl: Contains the code used for the rest of the servos and motors on the robot,
// including the "stone clamps."
clampControl();
}
// Runs once after the "stop" button is pressed on the phone. Currently, it serves no function.
@Override
public void stop() {}
private void chassisDrive() {
// Cycle through the driving modes when the "b" button on the first controller is pressed.
if (gamepad1.b != bPressed) {
if(!bPressed) {
mode = mode.getNext();
}
bPressed = !bPressed;
}
// Run code depending on which drive mode is currently active (at 75% speed, because
// our robot is too fast at full speed):
switch(mode) {
case TANK: {
// In "tank" drive mode,
// the left joystick controls the speed of the left set of motors,
// and the right joystick controls the right set.
robot.leftFront.setPower(-gamepad1.left_stick_y * .75);
robot.leftBack.setPower(-gamepad1.left_stick_y * .75);
robot.rightFront.setPower(-gamepad1.right_stick_y * .75);
robot.rightBack.setPower(-gamepad1.right_stick_y * .75);
break;
}
case OMNI: {
// Really funky. Strafes left or right using the left joystick
// if the left joystick's "x" value is greater than "y;" runs like tank drive
// otherwise.
// This code was developed as a simple test by request of a coach, but the driver
// responsible for moving the chassis actually liked the way that it worked!
if (Math.abs(gamepad1.left_stick_x) > Math.abs(gamepad1.left_stick_y)) {
robot.leftFront.setPower(gamepad1.left_stick_x * .75);
robot.rightFront.setPower(-gamepad1.left_stick_x * .75);
robot.leftBack.setPower(-gamepad1.left_stick_x * .75);
robot.rightBack.setPower(gamepad1.left_stick_x * .75);
}
else {
robot.leftFront.setPower(-gamepad1.left_stick_y * .75);
robot.leftBack.setPower(-gamepad1.left_stick_y * .75);
robot.rightFront.setPower(-gamepad1.right_stick_y * .75);
robot.rightBack.setPower(-gamepad1.right_stick_y * .75);
}
break;
}
case MECANUM: {
// Code taken from http://ftckey.com/programming/advanced-programming/. Also
// funky; turns with the right joystick and moves/strafes with the left one.
robot.leftFront.setPower(clip((-gamepad1.left_stick_y + gamepad1.left_stick_x
+ gamepad1.right_stick_x), -1., 1) * .75);
robot.leftBack.setPower(clip((-gamepad1.left_stick_y - gamepad1.left_stick_x
- gamepad1.right_stick_x), -1., 1) * .75);
robot.rightFront.setPower(clip((-gamepad1.left_stick_y - gamepad1.left_stick_x
+ gamepad1.right_stick_x), -1., 1) * .75);
robot.rightBack.setPower(clip((-gamepad1.left_stick_y + gamepad1.left_stick_x
- gamepad1.right_stick_x), -1., 1) * .75);
break;
}
default: {
mode = Mode.TANK;
robot.leftFront.setPower(-gamepad1.left_stick_y * .75);
robot.leftBack.setPower(-gamepad1.left_stick_y * .75);
robot.rightFront.setPower(-gamepad1.right_stick_y * .75);
robot.rightBack.setPower(-gamepad1.right_stick_y * .75);
}
}
// Display the current mode of the robot in Telemetry for reasons deemed obvious.
for (int i=0; i<(Mode.values().length); i++){
telemetry.addData("Mode ", Mode.values()[i].ordinal());
telemetry.addData("Name", Mode.values()[i]);
}
// Display other information, including the position, speed, and mode of motors.
telemetry.addData("Robot Mode:", mode.getDescription());
telemetry.addData("Motor Position:", robot.leftFront.getCurrentPosition());
telemetry.addData("left front motor: ", robot.leftFront.getPower());
telemetry.addData("right front motor: ", robot.rightFront.getPower());
telemetry.addData("left back motor: ", robot.leftBack.getPower());
telemetry.addData("right back motor: ", robot.rightBack.getPower());
telemetry.update();
}
private void liftMovement(){
// Set the power of stoneLift (raising and lowering said lift) to 0 if both up and down
// are pressed on the second controller.
if (gamepad2.dpad_up && gamepad2.dpad_down) {
robot.stoneLift.setPower(0);
}
// If the "up" arrow is pressed, raise the stoneLift at half power.
else if(gamepad2.dpad_up) {
robot.stoneLift.setPower(1);
}
// If the "down" arrow is pressed, lower the stoneLift at half power.
else if(gamepad2.dpad_down){
robot.stoneLift.setPower(-1);
}
// Set the power of stoneLift to 0 if no directional buttons are pressed.
else{
robot.stoneLift.setPower(0);
}
// Set the power of liftRotator to the "y" value of the right stick of the second
// controller.
robot.liftRotator.setPower(gamepad2.right_stick_y);
// Set the foundation clamps to a "down" position if "x" is pressed; otherwise, set the
// clamps to "up."
if(gamepad2.x){
robot.rightClamp.setPosition(0);
robot.leftClamp.setPosition(1);
}
else if(gamepad2.b){
robot.rightClamp.setPosition(.275);
robot.leftClamp.setPosition(.775);
}
}
private void clampControl() {
// Because chassisGrabber is a servo, controlling it using speed does not apply. Instead,
// slowly increase or decrease the position of said servo when the "left" or "right"
// directional buttons are pressed on the second controller.
if(gamepad2.dpad_right){
chassisPosition += -.005;
}
else if(gamepad2.dpad_left) {
chassisPosition += .005;
}
// Clip chassisPosition between 0 and .35, the minimum and maximum realistic values for
// the servo.
clip(chassisPosition, 0, .35);
// Toggle mountedPosition between .5 and 1 when the "left bumper" on the second controller
// is pressed.
if (gamepad2.left_bumper != leftBumperPressed) {
if (!leftBumperPressed) {
if (mountedPosition == 1) {
mountedPosition = .5;
}
else if (mountedPosition == .5) {
mountedPosition = 1;
}
}
leftBumperPressed = !leftBumperPressed;
}
// Set the chassisGrabber and mountedGrabber servos to their respective positions.
robot.chassisGrabber.setPosition(chassisPosition);
robot.mountedGrabber.setPosition(mountedPosition);
}
} | [
"adamteaney@gmail.com"
] | adamteaney@gmail.com |
729eb1956701a1185cb9d796a5eb673869fb8b4a | 0003824a028d2aaa886f5840da77175d9bac8dfb | /src/eis/eis2java/translation/Translator$DoubleTranslator.java | 051f9a40bcd56111d7d4842f1d91b246db41ad29 | [] | no_license | silverhammermba/431final | f15341fc9c6887e9a38dd2bddf973b7666aca8a5 | 3addc66b9f1f80c6d309b18230eb93ef02159619 | refs/heads/master | 2021-01-12T08:46:10.619437 | 2016-12-16T21:01:18 | 2016-12-16T21:01:18 | 76,685,419 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,166 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3)
// Source File Name: Translator.java
package eis.eis2java.translation;
import eis.eis2java.exception.TranslationException;
import eis.iilang.Numeral;
import eis.iilang.Parameter;
// Referenced classes of package eis.eis2java.translation:
// Parameter2Java, Translator
private static class <init>
implements Parameter2Java
{
public Double translate(Parameter parameter)
throws TranslationException
{
if(!(parameter instanceof Numeral))
throw new TranslationException((new StringBuilder("Expected a numeral parameter but got ")).append(parameter).toString());
else
return Double.valueOf(((Numeral)parameter).getValue().doubleValue());
}
public Class translatesTo()
{
return java/lang/Double;
}
public volatile Object translate(Parameter parameter)
throws TranslationException
{
return translate(parameter);
}
private ()
{
}
( )
{
this();
}
}
| [
"silverhammermba@gmail.com"
] | silverhammermba@gmail.com |
6ee1fab3842c259441627a85b5309b4e978c0368 | 996ad7467ea18d9382ea8882dab38db4072df0d7 | /Testggcs0422/app/src/main/java/com/example/newland/testggcs0422/SetActivity.java | 3b42091ee931ad87f9852f0427b7a8dde35f7c8b | [] | no_license | CatOfSilence/MyNewlandCode | 450b663f66f248f614b16d1a74c62159d4bb0741 | f9f007a813d76384ef304f64906194d3a35fb764 | refs/heads/main | 2023-05-02T02:29:58.196606 | 2021-05-26T10:46:51 | 2021-05-26T10:46:51 | 370,979,274 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 432 | java | package com.example.newland.testggcs0422;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
public class SetActivity extends AppCompatActivity {
@SuppressLint("ResourceType")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_set);
}
}
| [
"2236247760@qq.com"
] | 2236247760@qq.com |
11367ebe58328afa6402e1b5fdbac429f636bd55 | 70c3b5180c73214b208490bc42a548fe291b2a59 | /D180905214/week3/Complex.java | a022861ed970d3db9093e6d4088dd7264d904735 | [] | no_license | shikharsrivastav2/OOP-lab | c722edee040c3ef2c8a24793e42cb38a7ff6377b | a5f1ed075a5b1ef7aba6d09175befc8b979a9bcd | refs/heads/master | 2020-08-06T10:40:13.709903 | 2019-10-05T05:12:56 | 2019-10-05T05:12:56 | 212,947,090 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,257 | java | import java.util.*;
class Complex
{
float a,b;
Complex()
{
a=0.0f;
b=0.0f;
}
Complex(int x,int y)
{
a=x;
b=y;
}
void disp()
{
if(b>0)
System.out.println(a+" + i"+b);
else if(b==0)
System.out.println(a);
else
System.out.println(a+" - i"+Math.abs(b));
}
void read()
{
System.out.println("enter real and imaginary parts of a+ib");
Scanner sc=new Scanner(System.in);
a=sc.nextFloat();
b=sc.nextFloat();
}
Complex add(Complex x)
{
Complex c=new Complex();
c.a=a+x.a;
c.b=b+x.b;
return c;
}
Complex sub(Complex x)
{
Complex c=new Complex();
c.a=a-x.a;
c.b=b-x.b;
return c;
}
}
class Complextest
{
public static void main(String args[])
{
System.out.println("Enter the two complex numbers");
Complex x=new Complex();
Complex y=new Complex();
Complex z=new Complex();
x.read();
y.read();
System.out.println("x = ");
x.disp();
System.out.println("\ny = ");
y.disp();
z=x.add(y);
System.out.println("The sum of complex numbers is :");
z.disp();
System.out.println("The diffrence of the complex numbers is :");
z=x.sub(y);
z.disp();
}
}
| [
"user"
] | user |
37acc1ed00172656c861e50f002042c7c89e1975 | 07a762ff475d1951757e4dfec031682ecb326095 | /src/main/java/co/makestar/sbvmaker/model/SubElement.java | 806412127bb021009c399e916fa4ceb54679c08c | [] | no_license | JungkwanBan/Subtitle_Maker_V2 | c88733265b6e3a2f4b25615bab991cba5eba1ef7 | 69c8c37e0183ad61c9c1986ebfe4f9d2b6a430d7 | refs/heads/master | 2020-04-23T20:17:13.438675 | 2019-02-19T08:20:01 | 2019-02-19T08:20:01 | 171,432,466 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 233 | java | package co.makestar.sbvmaker.model;
import lombok.Data;
@Data
public class SubElement {
TimeCode startTime;
TimeCode endTime;
String subTextKo;
String subTextJa;
String subTextEn;
String subTextZh;
String subStyle;
}
| [
"bjk110@gmail.com"
] | bjk110@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.