blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
sequencelengths
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
689M
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
131 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
32 values
content
stringlengths
3
9.45M
authors
sequencelengths
1
1
author_id
stringlengths
0
313
9e5698a94723bd599e071fd5f86f3e1329d06c8b
be40fdfd1a353a7e89c085f96376c2b3b5162554
/asciidoctor-editor-plugin/src/main/java/de/jcup/asciidoctoreditor/Matcher.java
a29062806fad1f1a3a07e4d4f8e3eeffd03e3083
[ "Apache-2.0" ]
permissive
rbioteau/eclipse-asciidoctor-editor
4a7dcd898370b18dec9481fc07edc61dd04407e5
dcab5981887fc7eb24b6004f3d6def847a539b27
refs/heads/master
2022-05-01T11:04:34.869188
2022-02-20T19:57:44
2022-02-20T19:57:44
221,953,460
0
0
NOASSERTION
2019-11-15T15:40:39
2019-11-15T15:40:39
null
UTF-8
Java
false
false
836
java
/* * Copyright 2016 Albert Tregnaghi * * 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 de.jcup.asciidoctoreditor; @AdaptedFromEGradle public interface Matcher<T> { /** * Returns true when matcher matches * @param toMatch * @return <code>true</code> when matching */ public boolean matches(T toMatch) ; }
48782a3346d4bdd3fcd403409c28989bf2f9b8ba
3ed1675a63b4e86014dd866f0b20163a89a22791
/app/src/main/java/android/example/firebaseapp/fragments/NotificationFragment.java
4ae3a1e9467e76ecc82c8857632557a552677c22
[]
no_license
BlajDavid/tutorial-firebase-android
e8c87ecba2aab8a8659ef9330b92992802bfa210
3d12893063300c5e01c11f7d94728c2d07d32793
refs/heads/master
2022-12-18T01:43:46.299211
2020-08-28T08:54:41
2020-08-28T08:54:41
285,375,158
0
0
null
null
null
null
UTF-8
Java
false
false
537
java
package android.example.firebaseapp.fragments; import android.os.Bundle; import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.example.firebaseapp.R; public class NotificationFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_notification, container, false); } }
298ac3aac7fec57864312b4f2170a8a6b93012a3
d696e137eeda76613393e629c68df7f691fa82dc
/android/app/build/generated/not_namespaced_r_class_sources/debug/r/com/facebook/react/R.java
3acfab127df99666501db42475435c5b49df0dad
[ "MIT" ]
permissive
alexkoles/videoListRN
d39dc22eacc8fc5aad8c821366f2cb20aa4b1c2d
c68934490a81a69d0853a3e633c2d7d5e4e247ab
refs/heads/master
2022-12-13T16:06:41.013379
2020-09-10T13:14:19
2020-09-10T13:14:19
294,413,264
0
0
null
null
null
null
UTF-8
Java
false
false
137,155
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package com.facebook.react; public final class R { private R() {} public static final class anim { private anim() {} public static final int abc_fade_in = 0x7f010000; public static final int abc_fade_out = 0x7f010001; public static final int abc_grow_fade_in_from_bottom = 0x7f010002; public static final int abc_popup_enter = 0x7f010003; public static final int abc_popup_exit = 0x7f010004; public static final int abc_shrink_fade_out_from_bottom = 0x7f010005; public static final int abc_slide_in_bottom = 0x7f010006; public static final int abc_slide_in_top = 0x7f010007; public static final int abc_slide_out_bottom = 0x7f010008; public static final int abc_slide_out_top = 0x7f010009; public static final int abc_tooltip_enter = 0x7f01000a; public static final int abc_tooltip_exit = 0x7f01000b; public static final int catalyst_fade_in = 0x7f010018; public static final int catalyst_fade_out = 0x7f010019; public static final int catalyst_push_up_in = 0x7f01001a; public static final int catalyst_push_up_out = 0x7f01001b; public static final int catalyst_slide_down = 0x7f01001c; public static final int catalyst_slide_up = 0x7f01001d; } public static final class attr { private attr() {} public static final int actionBarDivider = 0x7f030000; public static final int actionBarItemBackground = 0x7f030001; public static final int actionBarPopupTheme = 0x7f030002; public static final int actionBarSize = 0x7f030003; public static final int actionBarSplitStyle = 0x7f030004; public static final int actionBarStyle = 0x7f030005; public static final int actionBarTabBarStyle = 0x7f030006; public static final int actionBarTabStyle = 0x7f030007; public static final int actionBarTabTextStyle = 0x7f030008; public static final int actionBarTheme = 0x7f030009; public static final int actionBarWidgetTheme = 0x7f03000a; public static final int actionButtonStyle = 0x7f03000b; public static final int actionDropDownStyle = 0x7f03000c; public static final int actionLayout = 0x7f03000d; public static final int actionMenuTextAppearance = 0x7f03000e; public static final int actionMenuTextColor = 0x7f03000f; public static final int actionModeBackground = 0x7f030010; public static final int actionModeCloseButtonStyle = 0x7f030011; public static final int actionModeCloseDrawable = 0x7f030012; public static final int actionModeCopyDrawable = 0x7f030013; public static final int actionModeCutDrawable = 0x7f030014; public static final int actionModeFindDrawable = 0x7f030015; public static final int actionModePasteDrawable = 0x7f030016; public static final int actionModePopupWindowStyle = 0x7f030017; public static final int actionModeSelectAllDrawable = 0x7f030018; public static final int actionModeShareDrawable = 0x7f030019; public static final int actionModeSplitBackground = 0x7f03001a; public static final int actionModeStyle = 0x7f03001b; public static final int actionModeWebSearchDrawable = 0x7f03001c; public static final int actionOverflowButtonStyle = 0x7f03001d; public static final int actionOverflowMenuStyle = 0x7f03001e; public static final int actionProviderClass = 0x7f03001f; public static final int actionViewClass = 0x7f030021; public static final int activityChooserViewStyle = 0x7f030022; public static final int actualImageResource = 0x7f030023; public static final int actualImageScaleType = 0x7f030024; public static final int actualImageUri = 0x7f030025; public static final int alertDialogButtonGroupStyle = 0x7f030026; public static final int alertDialogCenterButtons = 0x7f030027; public static final int alertDialogStyle = 0x7f030028; public static final int alertDialogTheme = 0x7f030029; public static final int allowStacking = 0x7f03002a; public static final int alpha = 0x7f03002b; public static final int alphabeticModifiers = 0x7f03002c; public static final int arrowHeadLength = 0x7f03002f; public static final int arrowShaftLength = 0x7f030030; public static final int autoCompleteTextViewStyle = 0x7f030031; public static final int autoSizeMaxTextSize = 0x7f030032; public static final int autoSizeMinTextSize = 0x7f030033; public static final int autoSizePresetSizes = 0x7f030034; public static final int autoSizeStepGranularity = 0x7f030035; public static final int autoSizeTextType = 0x7f030036; public static final int background = 0x7f030037; public static final int backgroundImage = 0x7f030039; public static final int backgroundSplit = 0x7f03003f; public static final int backgroundStacked = 0x7f030040; public static final int backgroundTint = 0x7f030041; public static final int backgroundTintMode = 0x7f030042; public static final int barLength = 0x7f030046; public static final int borderlessButtonStyle = 0x7f030052; public static final int buttonBarButtonStyle = 0x7f030061; public static final int buttonBarNegativeButtonStyle = 0x7f030062; public static final int buttonBarNeutralButtonStyle = 0x7f030063; public static final int buttonBarPositiveButtonStyle = 0x7f030064; public static final int buttonBarStyle = 0x7f030065; public static final int buttonGravity = 0x7f030067; public static final int buttonIconDimen = 0x7f030068; public static final int buttonPanelSideLayout = 0x7f030069; public static final int buttonStyle = 0x7f03006a; public static final int buttonStyleSmall = 0x7f03006b; public static final int buttonTint = 0x7f03006c; public static final int buttonTintMode = 0x7f03006d; public static final int checkboxStyle = 0x7f030076; public static final int checkedTextViewStyle = 0x7f03007d; public static final int closeIcon = 0x7f030092; public static final int closeItemLayout = 0x7f030099; public static final int collapseContentDescription = 0x7f03009a; public static final int collapseIcon = 0x7f03009b; public static final int color = 0x7f03009e; public static final int colorAccent = 0x7f03009f; public static final int colorBackgroundFloating = 0x7f0300a0; public static final int colorButtonNormal = 0x7f0300a1; public static final int colorControlActivated = 0x7f0300a2; public static final int colorControlHighlight = 0x7f0300a3; public static final int colorControlNormal = 0x7f0300a4; public static final int colorError = 0x7f0300a5; public static final int colorPrimary = 0x7f0300ac; public static final int colorPrimaryDark = 0x7f0300ad; public static final int colorSwitchThumbNormal = 0x7f0300b3; public static final int commitIcon = 0x7f0300b4; public static final int contentDescription = 0x7f0300b5; public static final int contentInsetEnd = 0x7f0300b6; public static final int contentInsetEndWithActions = 0x7f0300b7; public static final int contentInsetLeft = 0x7f0300b8; public static final int contentInsetRight = 0x7f0300b9; public static final int contentInsetStart = 0x7f0300ba; public static final int contentInsetStartWithNavigation = 0x7f0300bb; public static final int controlBackground = 0x7f0300c2; public static final int coordinatorLayoutStyle = 0x7f0300c3; public static final int customNavigationLayout = 0x7f0300d5; public static final int defaultQueryHint = 0x7f0300da; public static final int dialogCornerRadius = 0x7f0300db; public static final int dialogPreferredPadding = 0x7f0300dc; public static final int dialogTheme = 0x7f0300dd; public static final int displayOptions = 0x7f0300de; public static final int divider = 0x7f0300df; public static final int dividerHorizontal = 0x7f0300e0; public static final int dividerPadding = 0x7f0300e1; public static final int dividerVertical = 0x7f0300e2; public static final int drawableSize = 0x7f0300e7; public static final int drawerArrowStyle = 0x7f0300ec; public static final int dropDownListViewStyle = 0x7f0300ed; public static final int dropdownListPreferredItemHeight = 0x7f0300ee; public static final int editTextBackground = 0x7f0300ef; public static final int editTextColor = 0x7f0300f0; public static final int editTextStyle = 0x7f0300f1; public static final int elevation = 0x7f0300f2; public static final int expandActivityOverflowButtonDrawable = 0x7f030104; public static final int fadeDuration = 0x7f030116; public static final int failureImage = 0x7f030117; public static final int failureImageScaleType = 0x7f030118; public static final int firstBaselineToTopHeight = 0x7f03011e; public static final int font = 0x7f030120; public static final int fontFamily = 0x7f030121; public static final int fontProviderAuthority = 0x7f030122; public static final int fontProviderCerts = 0x7f030123; public static final int fontProviderFetchStrategy = 0x7f030124; public static final int fontProviderFetchTimeout = 0x7f030125; public static final int fontProviderPackage = 0x7f030126; public static final int fontProviderQuery = 0x7f030127; public static final int fontStyle = 0x7f030128; public static final int fontVariationSettings = 0x7f030129; public static final int fontWeight = 0x7f03012a; public static final int gapBetweenBars = 0x7f03012c; public static final int goIcon = 0x7f03012d; public static final int height = 0x7f03012f; public static final int hideOnContentScroll = 0x7f030135; public static final int homeAsUpIndicator = 0x7f03013b; public static final int homeLayout = 0x7f03013c; public static final int icon = 0x7f03013e; public static final int iconTint = 0x7f030144; public static final int iconTintMode = 0x7f030145; public static final int iconifiedByDefault = 0x7f030146; public static final int imageButtonStyle = 0x7f030147; public static final int indeterminateProgressStyle = 0x7f030148; public static final int initialActivityCount = 0x7f030149; public static final int isLightTheme = 0x7f03014b; public static final int itemPadding = 0x7f030155; public static final int keylines = 0x7f030165; public static final int lastBaselineToBottomHeight = 0x7f030167; public static final int layout = 0x7f030168; public static final int layout_anchor = 0x7f03016a; public static final int layout_anchorGravity = 0x7f03016b; public static final int layout_behavior = 0x7f03016c; public static final int layout_dodgeInsetEdges = 0x7f03016f; public static final int layout_insetEdge = 0x7f030170; public static final int layout_keyline = 0x7f030171; public static final int lineHeight = 0x7f030176; public static final int listChoiceBackgroundIndicator = 0x7f030178; public static final int listDividerAlertDialog = 0x7f03017b; public static final int listItemLayout = 0x7f03017c; public static final int listLayout = 0x7f03017d; public static final int listMenuViewStyle = 0x7f03017e; public static final int listPopupWindowStyle = 0x7f03017f; public static final int listPreferredItemHeight = 0x7f030180; public static final int listPreferredItemHeightLarge = 0x7f030181; public static final int listPreferredItemHeightSmall = 0x7f030182; public static final int listPreferredItemPaddingLeft = 0x7f030184; public static final int listPreferredItemPaddingRight = 0x7f030185; public static final int logo = 0x7f030187; public static final int logoDescription = 0x7f030188; public static final int maxButtonHeight = 0x7f03019e; public static final int measureWithLargestChild = 0x7f0301a1; public static final int multiChoiceItemLayout = 0x7f0301a4; public static final int navigationContentDescription = 0x7f0301a5; public static final int navigationIcon = 0x7f0301a6; public static final int navigationMode = 0x7f0301a7; public static final int numericModifiers = 0x7f0301aa; public static final int overlapAnchor = 0x7f0301ab; public static final int overlayImage = 0x7f0301ac; public static final int paddingBottomNoButtons = 0x7f0301ad; public static final int paddingEnd = 0x7f0301ae; public static final int paddingStart = 0x7f0301af; public static final int paddingTopNoTitle = 0x7f0301b0; public static final int panelBackground = 0x7f0301b1; public static final int panelMenuListTheme = 0x7f0301b2; public static final int panelMenuListWidth = 0x7f0301b3; public static final int placeholderImage = 0x7f0301b9; public static final int placeholderImageScaleType = 0x7f0301ba; public static final int popupMenuStyle = 0x7f0301bc; public static final int popupTheme = 0x7f0301bd; public static final int popupWindowStyle = 0x7f0301be; public static final int preserveIconSpacing = 0x7f0301bf; public static final int pressedStateOverlayImage = 0x7f0301c0; public static final int progressBarAutoRotateInterval = 0x7f0301c2; public static final int progressBarImage = 0x7f0301c3; public static final int progressBarImageScaleType = 0x7f0301c4; public static final int progressBarPadding = 0x7f0301c5; public static final int progressBarStyle = 0x7f0301c6; public static final int queryBackground = 0x7f0301c7; public static final int queryHint = 0x7f0301c8; public static final int radioButtonStyle = 0x7f0301c9; public static final int ratingBarStyle = 0x7f0301cb; public static final int ratingBarStyleIndicator = 0x7f0301cc; public static final int ratingBarStyleSmall = 0x7f0301cd; public static final int retryImage = 0x7f0301cf; public static final int retryImageScaleType = 0x7f0301d0; public static final int roundAsCircle = 0x7f0301d3; public static final int roundBottomEnd = 0x7f0301d4; public static final int roundBottomLeft = 0x7f0301d5; public static final int roundBottomRight = 0x7f0301d6; public static final int roundBottomStart = 0x7f0301d7; public static final int roundTopEnd = 0x7f0301d8; public static final int roundTopLeft = 0x7f0301d9; public static final int roundTopRight = 0x7f0301da; public static final int roundTopStart = 0x7f0301db; public static final int roundWithOverlayColor = 0x7f0301dc; public static final int roundedCornerRadius = 0x7f0301dd; public static final int roundingBorderColor = 0x7f0301de; public static final int roundingBorderPadding = 0x7f0301df; public static final int roundingBorderWidth = 0x7f0301e0; public static final int searchHintIcon = 0x7f0301e5; public static final int searchIcon = 0x7f0301e6; public static final int searchViewStyle = 0x7f0301e7; public static final int seekBarStyle = 0x7f0301e8; public static final int selectableItemBackground = 0x7f0301e9; public static final int selectableItemBackgroundBorderless = 0x7f0301ea; public static final int showAsAction = 0x7f0301f0; public static final int showDividers = 0x7f0301f1; public static final int showText = 0x7f0301f3; public static final int showTitle = 0x7f0301f4; public static final int singleChoiceItemLayout = 0x7f0301f6; public static final int spinBars = 0x7f0301fc; public static final int spinnerDropDownItemStyle = 0x7f0301fd; public static final int spinnerStyle = 0x7f0301fe; public static final int splitTrack = 0x7f0301ff; public static final int srcCompat = 0x7f030200; public static final int state_above_anchor = 0x7f030207; public static final int statusBarBackground = 0x7f03020d; public static final int subMenuArrow = 0x7f030212; public static final int submitBackground = 0x7f030213; public static final int subtitle = 0x7f030214; public static final int subtitleTextAppearance = 0x7f030215; public static final int subtitleTextColor = 0x7f030216; public static final int subtitleTextStyle = 0x7f030217; public static final int suggestionRowLayout = 0x7f030218; public static final int switchMinWidth = 0x7f030219; public static final int switchPadding = 0x7f03021a; public static final int switchStyle = 0x7f03021b; public static final int switchTextAppearance = 0x7f03021c; public static final int textAllCaps = 0x7f030237; public static final int textAppearanceLargePopupMenu = 0x7f030242; public static final int textAppearanceListItem = 0x7f030244; public static final int textAppearanceListItemSecondary = 0x7f030245; public static final int textAppearanceListItemSmall = 0x7f030246; public static final int textAppearancePopupMenuHeader = 0x7f030248; public static final int textAppearanceSearchResultSubtitle = 0x7f030249; public static final int textAppearanceSearchResultTitle = 0x7f03024a; public static final int textAppearanceSmallPopupMenu = 0x7f03024b; public static final int textColorAlertDialogListItem = 0x7f03024e; public static final int textColorSearchUrl = 0x7f03024f; public static final int theme = 0x7f030254; public static final int thickness = 0x7f030256; public static final int thumbTextPadding = 0x7f030257; public static final int thumbTint = 0x7f030258; public static final int thumbTintMode = 0x7f030259; public static final int tickMark = 0x7f03025a; public static final int tickMarkTint = 0x7f03025b; public static final int tickMarkTintMode = 0x7f03025c; public static final int tint = 0x7f03025d; public static final int tintMode = 0x7f03025e; public static final int title = 0x7f03025f; public static final int titleMargin = 0x7f030261; public static final int titleMarginBottom = 0x7f030262; public static final int titleMarginEnd = 0x7f030263; public static final int titleMarginStart = 0x7f030264; public static final int titleMarginTop = 0x7f030265; public static final int titleMargins = 0x7f030266; public static final int titleTextAppearance = 0x7f030267; public static final int titleTextColor = 0x7f030268; public static final int titleTextStyle = 0x7f030269; public static final int toolbarNavigationButtonStyle = 0x7f03026b; public static final int toolbarStyle = 0x7f03026c; public static final int tooltipForegroundColor = 0x7f03026d; public static final int tooltipFrameBackground = 0x7f03026e; public static final int tooltipText = 0x7f03026f; public static final int track = 0x7f030270; public static final int trackTint = 0x7f030271; public static final int trackTintMode = 0x7f030272; public static final int ttcIndex = 0x7f030273; public static final int viewAspectRatio = 0x7f030276; public static final int viewInflaterClass = 0x7f030277; public static final int voiceIcon = 0x7f030278; public static final int windowActionBar = 0x7f030279; public static final int windowActionBarOverlay = 0x7f03027a; public static final int windowActionModeOverlay = 0x7f03027b; public static final int windowFixedHeightMajor = 0x7f03027c; public static final int windowFixedHeightMinor = 0x7f03027d; public static final int windowFixedWidthMajor = 0x7f03027e; public static final int windowFixedWidthMinor = 0x7f03027f; public static final int windowMinWidthMajor = 0x7f030280; public static final int windowMinWidthMinor = 0x7f030281; public static final int windowNoTitle = 0x7f030282; } public static final class bool { private bool() {} public static final int abc_action_bar_embed_tabs = 0x7f040000; public static final int abc_allow_stacked_button_bar = 0x7f040001; public static final int abc_config_actionMenuItemAllCaps = 0x7f040002; } public static final class color { private color() {} public static final int abc_background_cache_hint_selector_material_dark = 0x7f050000; public static final int abc_background_cache_hint_selector_material_light = 0x7f050001; public static final int abc_btn_colored_borderless_text_material = 0x7f050002; public static final int abc_btn_colored_text_material = 0x7f050003; public static final int abc_color_highlight_material = 0x7f050004; public static final int abc_hint_foreground_material_dark = 0x7f050005; public static final int abc_hint_foreground_material_light = 0x7f050006; public static final int abc_input_method_navigation_guard = 0x7f050007; public static final int abc_primary_text_disable_only_material_dark = 0x7f050008; public static final int abc_primary_text_disable_only_material_light = 0x7f050009; public static final int abc_primary_text_material_dark = 0x7f05000a; public static final int abc_primary_text_material_light = 0x7f05000b; public static final int abc_search_url_text = 0x7f05000c; public static final int abc_search_url_text_normal = 0x7f05000d; public static final int abc_search_url_text_pressed = 0x7f05000e; public static final int abc_search_url_text_selected = 0x7f05000f; public static final int abc_secondary_text_material_dark = 0x7f050010; public static final int abc_secondary_text_material_light = 0x7f050011; public static final int abc_tint_btn_checkable = 0x7f050012; public static final int abc_tint_default = 0x7f050013; public static final int abc_tint_edittext = 0x7f050014; public static final int abc_tint_seek_thumb = 0x7f050015; public static final int abc_tint_spinner = 0x7f050016; public static final int abc_tint_switch_track = 0x7f050017; public static final int accent_material_dark = 0x7f050018; public static final int accent_material_light = 0x7f050019; public static final int background_floating_material_dark = 0x7f05001a; public static final int background_floating_material_light = 0x7f05001b; public static final int background_material_dark = 0x7f05001c; public static final int background_material_light = 0x7f05001d; public static final int bright_foreground_disabled_material_dark = 0x7f05001e; public static final int bright_foreground_disabled_material_light = 0x7f05001f; public static final int bright_foreground_inverse_material_dark = 0x7f050020; public static final int bright_foreground_inverse_material_light = 0x7f050021; public static final int bright_foreground_material_dark = 0x7f050022; public static final int bright_foreground_material_light = 0x7f050023; public static final int button_material_dark = 0x7f050024; public static final int button_material_light = 0x7f050025; public static final int catalyst_logbox_background = 0x7f05002a; public static final int catalyst_redbox_background = 0x7f05002b; public static final int dim_foreground_disabled_material_dark = 0x7f050053; public static final int dim_foreground_disabled_material_light = 0x7f050054; public static final int dim_foreground_material_dark = 0x7f050055; public static final int dim_foreground_material_light = 0x7f050056; public static final int error_color_material_dark = 0x7f050057; public static final int error_color_material_light = 0x7f050058; public static final int foreground_material_dark = 0x7f050059; public static final int foreground_material_light = 0x7f05005a; public static final int highlighted_text_material_dark = 0x7f05005b; public static final int highlighted_text_material_light = 0x7f05005c; public static final int material_blue_grey_800 = 0x7f05005d; public static final int material_blue_grey_900 = 0x7f05005e; public static final int material_blue_grey_950 = 0x7f05005f; public static final int material_deep_teal_200 = 0x7f050060; public static final int material_deep_teal_500 = 0x7f050061; public static final int material_grey_100 = 0x7f050062; public static final int material_grey_300 = 0x7f050063; public static final int material_grey_50 = 0x7f050064; public static final int material_grey_600 = 0x7f050065; public static final int material_grey_800 = 0x7f050066; public static final int material_grey_850 = 0x7f050067; public static final int material_grey_900 = 0x7f050068; public static final int notification_action_color_filter = 0x7f0500a6; public static final int notification_icon_bg_color = 0x7f0500a7; public static final int primary_dark_material_dark = 0x7f0500a8; public static final int primary_dark_material_light = 0x7f0500a9; public static final int primary_material_dark = 0x7f0500aa; public static final int primary_material_light = 0x7f0500ab; public static final int primary_text_default_material_dark = 0x7f0500ac; public static final int primary_text_default_material_light = 0x7f0500ad; public static final int primary_text_disabled_material_dark = 0x7f0500ae; public static final int primary_text_disabled_material_light = 0x7f0500af; public static final int ripple_material_dark = 0x7f0500b0; public static final int ripple_material_light = 0x7f0500b1; public static final int secondary_text_default_material_dark = 0x7f0500b2; public static final int secondary_text_default_material_light = 0x7f0500b3; public static final int secondary_text_disabled_material_dark = 0x7f0500b4; public static final int secondary_text_disabled_material_light = 0x7f0500b5; public static final int switch_thumb_disabled_material_dark = 0x7f0500b6; public static final int switch_thumb_disabled_material_light = 0x7f0500b7; public static final int switch_thumb_material_dark = 0x7f0500b8; public static final int switch_thumb_material_light = 0x7f0500b9; public static final int switch_thumb_normal_material_dark = 0x7f0500ba; public static final int switch_thumb_normal_material_light = 0x7f0500bb; public static final int tooltip_background_dark = 0x7f0500be; public static final int tooltip_background_light = 0x7f0500bf; } public static final class dimen { private dimen() {} public static final int abc_action_bar_content_inset_material = 0x7f060000; public static final int abc_action_bar_content_inset_with_nav = 0x7f060001; public static final int abc_action_bar_default_height_material = 0x7f060002; public static final int abc_action_bar_default_padding_end_material = 0x7f060003; public static final int abc_action_bar_default_padding_start_material = 0x7f060004; public static final int abc_action_bar_elevation_material = 0x7f060005; public static final int abc_action_bar_icon_vertical_padding_material = 0x7f060006; public static final int abc_action_bar_overflow_padding_end_material = 0x7f060007; public static final int abc_action_bar_overflow_padding_start_material = 0x7f060008; public static final int abc_action_bar_stacked_max_height = 0x7f060009; public static final int abc_action_bar_stacked_tab_max_width = 0x7f06000a; public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f06000b; public static final int abc_action_bar_subtitle_top_margin_material = 0x7f06000c; public static final int abc_action_button_min_height_material = 0x7f06000d; public static final int abc_action_button_min_width_material = 0x7f06000e; public static final int abc_action_button_min_width_overflow_material = 0x7f06000f; public static final int abc_alert_dialog_button_bar_height = 0x7f060010; public static final int abc_alert_dialog_button_dimen = 0x7f060011; public static final int abc_button_inset_horizontal_material = 0x7f060012; public static final int abc_button_inset_vertical_material = 0x7f060013; public static final int abc_button_padding_horizontal_material = 0x7f060014; public static final int abc_button_padding_vertical_material = 0x7f060015; public static final int abc_cascading_menus_min_smallest_width = 0x7f060016; public static final int abc_config_prefDialogWidth = 0x7f060017; public static final int abc_control_corner_material = 0x7f060018; public static final int abc_control_inset_material = 0x7f060019; public static final int abc_control_padding_material = 0x7f06001a; public static final int abc_dialog_corner_radius_material = 0x7f06001b; public static final int abc_dialog_fixed_height_major = 0x7f06001c; public static final int abc_dialog_fixed_height_minor = 0x7f06001d; public static final int abc_dialog_fixed_width_major = 0x7f06001e; public static final int abc_dialog_fixed_width_minor = 0x7f06001f; public static final int abc_dialog_list_padding_bottom_no_buttons = 0x7f060020; public static final int abc_dialog_list_padding_top_no_title = 0x7f060021; public static final int abc_dialog_min_width_major = 0x7f060022; public static final int abc_dialog_min_width_minor = 0x7f060023; public static final int abc_dialog_padding_material = 0x7f060024; public static final int abc_dialog_padding_top_material = 0x7f060025; public static final int abc_dialog_title_divider_material = 0x7f060026; public static final int abc_disabled_alpha_material_dark = 0x7f060027; public static final int abc_disabled_alpha_material_light = 0x7f060028; public static final int abc_dropdownitem_icon_width = 0x7f060029; public static final int abc_dropdownitem_text_padding_left = 0x7f06002a; public static final int abc_dropdownitem_text_padding_right = 0x7f06002b; public static final int abc_edit_text_inset_bottom_material = 0x7f06002c; public static final int abc_edit_text_inset_horizontal_material = 0x7f06002d; public static final int abc_edit_text_inset_top_material = 0x7f06002e; public static final int abc_floating_window_z = 0x7f06002f; public static final int abc_list_item_padding_horizontal_material = 0x7f060033; public static final int abc_panel_menu_list_width = 0x7f060034; public static final int abc_progress_bar_height_material = 0x7f060035; public static final int abc_search_view_preferred_height = 0x7f060036; public static final int abc_search_view_preferred_width = 0x7f060037; public static final int abc_seekbar_track_background_height_material = 0x7f060038; public static final int abc_seekbar_track_progress_height_material = 0x7f060039; public static final int abc_select_dialog_padding_start_material = 0x7f06003a; public static final int abc_switch_padding = 0x7f06003b; public static final int abc_text_size_body_1_material = 0x7f06003c; public static final int abc_text_size_body_2_material = 0x7f06003d; public static final int abc_text_size_button_material = 0x7f06003e; public static final int abc_text_size_caption_material = 0x7f06003f; public static final int abc_text_size_display_1_material = 0x7f060040; public static final int abc_text_size_display_2_material = 0x7f060041; public static final int abc_text_size_display_3_material = 0x7f060042; public static final int abc_text_size_display_4_material = 0x7f060043; public static final int abc_text_size_headline_material = 0x7f060044; public static final int abc_text_size_large_material = 0x7f060045; public static final int abc_text_size_medium_material = 0x7f060046; public static final int abc_text_size_menu_header_material = 0x7f060047; public static final int abc_text_size_menu_material = 0x7f060048; public static final int abc_text_size_small_material = 0x7f060049; public static final int abc_text_size_subhead_material = 0x7f06004a; public static final int abc_text_size_subtitle_material_toolbar = 0x7f06004b; public static final int abc_text_size_title_material = 0x7f06004c; public static final int abc_text_size_title_material_toolbar = 0x7f06004d; public static final int compat_button_inset_horizontal_material = 0x7f060053; public static final int compat_button_inset_vertical_material = 0x7f060054; public static final int compat_button_padding_horizontal_material = 0x7f060055; public static final int compat_button_padding_vertical_material = 0x7f060056; public static final int compat_control_corner_material = 0x7f060057; public static final int compat_notification_large_icon_max_height = 0x7f060058; public static final int compat_notification_large_icon_max_width = 0x7f060059; public static final int disabled_alpha_material_dark = 0x7f060089; public static final int disabled_alpha_material_light = 0x7f06008a; public static final int highlight_alpha_material_colored = 0x7f06008e; public static final int highlight_alpha_material_dark = 0x7f06008f; public static final int highlight_alpha_material_light = 0x7f060090; public static final int hint_alpha_material_dark = 0x7f060091; public static final int hint_alpha_material_light = 0x7f060092; public static final int hint_pressed_alpha_material_dark = 0x7f060093; public static final int hint_pressed_alpha_material_light = 0x7f060094; public static final int notification_action_icon_size = 0x7f06012e; public static final int notification_action_text_size = 0x7f06012f; public static final int notification_big_circle_margin = 0x7f060130; public static final int notification_content_margin_start = 0x7f060131; public static final int notification_large_icon_height = 0x7f060132; public static final int notification_large_icon_width = 0x7f060133; public static final int notification_main_column_padding_top = 0x7f060134; public static final int notification_media_narrow_margin = 0x7f060135; public static final int notification_right_icon_size = 0x7f060136; public static final int notification_right_side_padding_top = 0x7f060137; public static final int notification_small_icon_background_padding = 0x7f060138; public static final int notification_small_icon_size_as_large = 0x7f060139; public static final int notification_subtext_size = 0x7f06013a; public static final int notification_top_pad = 0x7f06013b; public static final int notification_top_pad_large_text = 0x7f06013c; public static final int tooltip_corner_radius = 0x7f06013e; public static final int tooltip_horizontal_padding = 0x7f06013f; public static final int tooltip_margin = 0x7f060140; public static final int tooltip_precise_anchor_extra_offset = 0x7f060141; public static final int tooltip_precise_anchor_threshold = 0x7f060142; public static final int tooltip_vertical_padding = 0x7f060143; public static final int tooltip_y_offset_non_touch = 0x7f060144; public static final int tooltip_y_offset_touch = 0x7f060145; } public static final class drawable { private drawable() {} public static final int abc_ab_share_pack_mtrl_alpha = 0x7f070006; public static final int abc_action_bar_item_background_material = 0x7f070007; public static final int abc_btn_borderless_material = 0x7f070008; public static final int abc_btn_check_material = 0x7f070009; public static final int abc_btn_check_to_on_mtrl_000 = 0x7f07000b; public static final int abc_btn_check_to_on_mtrl_015 = 0x7f07000c; public static final int abc_btn_colored_material = 0x7f07000d; public static final int abc_btn_default_mtrl_shape = 0x7f07000e; public static final int abc_btn_radio_material = 0x7f07000f; public static final int abc_btn_radio_to_on_mtrl_000 = 0x7f070011; public static final int abc_btn_radio_to_on_mtrl_015 = 0x7f070012; public static final int abc_btn_switch_to_on_mtrl_00001 = 0x7f070013; public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f070014; public static final int abc_cab_background_internal_bg = 0x7f070015; public static final int abc_cab_background_top_material = 0x7f070016; public static final int abc_cab_background_top_mtrl_alpha = 0x7f070017; public static final int abc_control_background_material = 0x7f070018; public static final int abc_dialog_material_background = 0x7f070019; public static final int abc_edit_text_material = 0x7f07001a; public static final int abc_ic_ab_back_material = 0x7f07001b; public static final int abc_ic_arrow_drop_right_black_24dp = 0x7f07001c; public static final int abc_ic_clear_material = 0x7f07001d; public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f07001e; public static final int abc_ic_go_search_api_material = 0x7f07001f; public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f070020; public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f070021; public static final int abc_ic_menu_overflow_material = 0x7f070022; public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f070023; public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f070024; public static final int abc_ic_menu_share_mtrl_alpha = 0x7f070025; public static final int abc_ic_search_api_material = 0x7f070026; public static final int abc_ic_star_black_16dp = 0x7f070027; public static final int abc_ic_star_black_36dp = 0x7f070028; public static final int abc_ic_star_black_48dp = 0x7f070029; public static final int abc_ic_star_half_black_16dp = 0x7f07002a; public static final int abc_ic_star_half_black_36dp = 0x7f07002b; public static final int abc_ic_star_half_black_48dp = 0x7f07002c; public static final int abc_ic_voice_search_api_material = 0x7f07002d; public static final int abc_item_background_holo_dark = 0x7f07002e; public static final int abc_item_background_holo_light = 0x7f07002f; public static final int abc_list_divider_material = 0x7f070030; public static final int abc_list_divider_mtrl_alpha = 0x7f070031; public static final int abc_list_focused_holo = 0x7f070032; public static final int abc_list_longpressed_holo = 0x7f070033; public static final int abc_list_pressed_holo_dark = 0x7f070034; public static final int abc_list_pressed_holo_light = 0x7f070035; public static final int abc_list_selector_background_transition_holo_dark = 0x7f070036; public static final int abc_list_selector_background_transition_holo_light = 0x7f070037; public static final int abc_list_selector_disabled_holo_dark = 0x7f070038; public static final int abc_list_selector_disabled_holo_light = 0x7f070039; public static final int abc_list_selector_holo_dark = 0x7f07003a; public static final int abc_list_selector_holo_light = 0x7f07003b; public static final int abc_menu_hardkey_panel_mtrl_mult = 0x7f07003c; public static final int abc_popup_background_mtrl_mult = 0x7f07003d; public static final int abc_ratingbar_indicator_material = 0x7f07003e; public static final int abc_ratingbar_material = 0x7f07003f; public static final int abc_ratingbar_small_material = 0x7f070040; public static final int abc_scrubber_control_off_mtrl_alpha = 0x7f070041; public static final int abc_scrubber_control_to_pressed_mtrl_000 = 0x7f070042; public static final int abc_scrubber_control_to_pressed_mtrl_005 = 0x7f070043; public static final int abc_scrubber_primary_mtrl_alpha = 0x7f070044; public static final int abc_scrubber_track_mtrl_alpha = 0x7f070045; public static final int abc_seekbar_thumb_material = 0x7f070046; public static final int abc_seekbar_tick_mark_material = 0x7f070047; public static final int abc_seekbar_track_material = 0x7f070048; public static final int abc_spinner_mtrl_am_alpha = 0x7f070049; public static final int abc_spinner_textfield_background_material = 0x7f07004a; public static final int abc_switch_thumb_material = 0x7f07004b; public static final int abc_switch_track_mtrl_alpha = 0x7f07004c; public static final int abc_tab_indicator_material = 0x7f07004d; public static final int abc_tab_indicator_mtrl_alpha = 0x7f07004e; public static final int abc_text_cursor_material = 0x7f07004f; public static final int abc_text_select_handle_left_mtrl_dark = 0x7f070050; public static final int abc_text_select_handle_left_mtrl_light = 0x7f070051; public static final int abc_text_select_handle_middle_mtrl_dark = 0x7f070052; public static final int abc_text_select_handle_middle_mtrl_light = 0x7f070053; public static final int abc_text_select_handle_right_mtrl_dark = 0x7f070054; public static final int abc_text_select_handle_right_mtrl_light = 0x7f070055; public static final int abc_textfield_activated_mtrl_alpha = 0x7f070056; public static final int abc_textfield_default_mtrl_alpha = 0x7f070057; public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f070058; public static final int abc_textfield_search_default_mtrl_alpha = 0x7f070059; public static final int abc_textfield_search_material = 0x7f07005a; public static final int abc_vector_test = 0x7f07005b; public static final int notification_action_background = 0x7f070081; public static final int notification_bg = 0x7f070082; public static final int notification_bg_low = 0x7f070083; public static final int notification_bg_low_normal = 0x7f070084; public static final int notification_bg_low_pressed = 0x7f070085; public static final int notification_bg_normal = 0x7f070086; public static final int notification_bg_normal_pressed = 0x7f070087; public static final int notification_icon_background = 0x7f070088; public static final int notification_template_icon_bg = 0x7f070089; public static final int notification_template_icon_low_bg = 0x7f07008a; public static final int notification_tile_bg = 0x7f07008b; public static final int notify_panel_notification_icon_bg = 0x7f07008c; public static final int redbox_top_border_background = 0x7f07008d; public static final int tooltip_frame_dark = 0x7f07008f; public static final int tooltip_frame_light = 0x7f070090; } public static final class id { private id() {} public static final int accessibility_actions = 0x7f08000b; public static final int accessibility_hint = 0x7f08002c; public static final int accessibility_label = 0x7f08002d; public static final int accessibility_role = 0x7f08002e; public static final int accessibility_state = 0x7f08002f; public static final int accessibility_value = 0x7f080030; public static final int action_bar = 0x7f080031; public static final int action_bar_activity_content = 0x7f080032; public static final int action_bar_container = 0x7f080033; public static final int action_bar_root = 0x7f080034; public static final int action_bar_spinner = 0x7f080035; public static final int action_bar_subtitle = 0x7f080036; public static final int action_bar_title = 0x7f080037; public static final int action_container = 0x7f080038; public static final int action_context_bar = 0x7f080039; public static final int action_divider = 0x7f08003a; public static final int action_image = 0x7f08003b; public static final int action_menu_divider = 0x7f08003c; public static final int action_menu_presenter = 0x7f08003d; public static final int action_mode_bar = 0x7f08003e; public static final int action_mode_bar_stub = 0x7f08003f; public static final int action_mode_close_button = 0x7f080040; public static final int action_text = 0x7f080041; public static final int actions = 0x7f080042; public static final int activity_chooser_view_content = 0x7f080043; public static final int add = 0x7f080044; public static final int alertTitle = 0x7f080045; public static final int async = 0x7f080048; public static final int blocking = 0x7f08004b; public static final int bottom = 0x7f08004c; public static final int buttonPanel = 0x7f08004d; public static final int catalyst_redbox_title = 0x7f08004f; public static final int center = 0x7f080050; public static final int centerCrop = 0x7f080053; public static final int centerInside = 0x7f080054; public static final int checkbox = 0x7f080059; public static final int chronometer = 0x7f08005d; public static final int content = 0x7f080064; public static final int contentPanel = 0x7f080065; public static final int custom = 0x7f080067; public static final int customPanel = 0x7f080068; public static final int decor_content_parent = 0x7f08006b; public static final int default_activity_button = 0x7f08006c; public static final int edit_query = 0x7f080075; public static final int end = 0x7f080076; public static final int expand_activities_button = 0x7f08007b; public static final int expanded_menu = 0x7f08007c; public static final int fitBottomStart = 0x7f080083; public static final int fitCenter = 0x7f080084; public static final int fitEnd = 0x7f080085; public static final int fitStart = 0x7f080086; public static final int fitXY = 0x7f080088; public static final int focusCrop = 0x7f08008b; public static final int forever = 0x7f08008c; public static final int fps_text = 0x7f08008d; public static final int group_divider = 0x7f080091; public static final int home = 0x7f080093; public static final int icon = 0x7f080095; public static final int icon_group = 0x7f080096; public static final int image = 0x7f080098; public static final int info = 0x7f080099; public static final int italic = 0x7f08009a; public static final int left = 0x7f08009e; public static final int line1 = 0x7f0800a5; public static final int line3 = 0x7f0800a6; public static final int listMode = 0x7f0800a7; public static final int list_item = 0x7f0800a8; public static final int message = 0x7f0800aa; public static final int multiply = 0x7f0800c7; public static final int none = 0x7f0800cb; public static final int normal = 0x7f0800cc; public static final int notification_background = 0x7f0800cd; public static final int notification_main_column = 0x7f0800ce; public static final int notification_main_column_container = 0x7f0800cf; public static final int parentPanel = 0x7f0800d4; public static final int progress_circular = 0x7f0800d9; public static final int progress_horizontal = 0x7f0800da; public static final int radio = 0x7f0800db; public static final int react_test_id = 0x7f0800dc; public static final int right = 0x7f0800dd; public static final int right_icon = 0x7f0800e4; public static final int right_side = 0x7f0800e5; public static final int rn_frame_file = 0x7f0800e6; public static final int rn_frame_method = 0x7f0800e7; public static final int rn_redbox_dismiss_button = 0x7f0800e8; public static final int rn_redbox_line_separator = 0x7f0800e9; public static final int rn_redbox_loading_indicator = 0x7f0800ea; public static final int rn_redbox_reload_button = 0x7f0800eb; public static final int rn_redbox_report_button = 0x7f0800ec; public static final int rn_redbox_report_label = 0x7f0800ed; public static final int rn_redbox_stack = 0x7f0800ee; public static final int screen = 0x7f0800f3; public static final int scrollIndicatorDown = 0x7f0800f5; public static final int scrollIndicatorUp = 0x7f0800f6; public static final int scrollView = 0x7f0800f7; public static final int search_badge = 0x7f0800f9; public static final int search_bar = 0x7f0800fa; public static final int search_button = 0x7f0800fb; public static final int search_close_btn = 0x7f0800fc; public static final int search_edit_frame = 0x7f0800fd; public static final int search_go_btn = 0x7f0800fe; public static final int search_mag_icon = 0x7f0800ff; public static final int search_plate = 0x7f080100; public static final int search_src_text = 0x7f080101; public static final int search_voice_btn = 0x7f080102; public static final int select_dialog_listview = 0x7f080103; public static final int shortcut = 0x7f080105; public static final int spacer = 0x7f080110; public static final int split_action_bar = 0x7f080111; public static final int src_atop = 0x7f080112; public static final int src_in = 0x7f080113; public static final int src_over = 0x7f080114; public static final int start = 0x7f080115; public static final int submenuarrow = 0x7f080118; public static final int submit_area = 0x7f080119; public static final int tabMode = 0x7f08011a; public static final int tag_transition_group = 0x7f080120; public static final int tag_unhandled_key_event_manager = 0x7f080121; public static final int tag_unhandled_key_listeners = 0x7f080122; public static final int text = 0x7f080125; public static final int text2 = 0x7f080126; public static final int textSpacerNoButtons = 0x7f080128; public static final int textSpacerNoTitle = 0x7f080129; public static final int time = 0x7f080130; public static final int title = 0x7f080131; public static final int titleDividerNoCustom = 0x7f080132; public static final int title_template = 0x7f080133; public static final int top = 0x7f080134; public static final int topPanel = 0x7f080135; public static final int uniform = 0x7f08013d; public static final int up = 0x7f08013f; public static final int view_tag_instance_handle = 0x7f080142; public static final int view_tag_native_id = 0x7f080143; public static final int wrap_content = 0x7f080147; } public static final class integer { private integer() {} public static final int abc_config_activityDefaultDur = 0x7f090000; public static final int abc_config_activityShortDur = 0x7f090001; public static final int cancel_button_image_alpha = 0x7f090004; public static final int config_tooltipAnimTime = 0x7f090005; public static final int react_native_dev_server_port = 0x7f090013; public static final int react_native_inspector_proxy_port = 0x7f090014; public static final int status_bar_notification_info_maxnum = 0x7f090016; } public static final class layout { private layout() {} public static final int abc_action_bar_title_item = 0x7f0b0000; public static final int abc_action_bar_up_container = 0x7f0b0001; public static final int abc_action_menu_item_layout = 0x7f0b0002; public static final int abc_action_menu_layout = 0x7f0b0003; public static final int abc_action_mode_bar = 0x7f0b0004; public static final int abc_action_mode_close_item_material = 0x7f0b0005; public static final int abc_activity_chooser_view = 0x7f0b0006; public static final int abc_activity_chooser_view_list_item = 0x7f0b0007; public static final int abc_alert_dialog_button_bar_material = 0x7f0b0008; public static final int abc_alert_dialog_material = 0x7f0b0009; public static final int abc_alert_dialog_title_material = 0x7f0b000a; public static final int abc_cascading_menu_item_layout = 0x7f0b000b; public static final int abc_dialog_title_material = 0x7f0b000c; public static final int abc_expanded_menu_layout = 0x7f0b000d; public static final int abc_list_menu_item_checkbox = 0x7f0b000e; public static final int abc_list_menu_item_icon = 0x7f0b000f; public static final int abc_list_menu_item_layout = 0x7f0b0010; public static final int abc_list_menu_item_radio = 0x7f0b0011; public static final int abc_popup_menu_header_item_layout = 0x7f0b0012; public static final int abc_popup_menu_item_layout = 0x7f0b0013; public static final int abc_screen_content_include = 0x7f0b0014; public static final int abc_screen_simple = 0x7f0b0015; public static final int abc_screen_simple_overlay_action_mode = 0x7f0b0016; public static final int abc_screen_toolbar = 0x7f0b0017; public static final int abc_search_dropdown_item_icons_2line = 0x7f0b0018; public static final int abc_search_view = 0x7f0b0019; public static final int abc_select_dialog_material = 0x7f0b001a; public static final int abc_tooltip = 0x7f0b001b; public static final int dev_loading_view = 0x7f0b002c; public static final int fps_view = 0x7f0b002d; public static final int notification_action = 0x7f0b004a; public static final int notification_action_tombstone = 0x7f0b004b; public static final int notification_template_custom_big = 0x7f0b004c; public static final int notification_template_icon_group = 0x7f0b004d; public static final int notification_template_part_chronometer = 0x7f0b004e; public static final int notification_template_part_time = 0x7f0b004f; public static final int redbox_item_frame = 0x7f0b0050; public static final int redbox_item_title = 0x7f0b0051; public static final int redbox_view = 0x7f0b0052; public static final int select_dialog_item_material = 0x7f0b0053; public static final int select_dialog_multichoice_material = 0x7f0b0054; public static final int select_dialog_singlechoice_material = 0x7f0b0055; public static final int support_simple_spinner_dropdown_item = 0x7f0b0056; } public static final class string { private string() {} public static final int abc_action_bar_home_description = 0x7f0e0000; public static final int abc_action_bar_up_description = 0x7f0e0001; public static final int abc_action_menu_overflow_description = 0x7f0e0002; public static final int abc_action_mode_done = 0x7f0e0003; public static final int abc_activity_chooser_view_see_all = 0x7f0e0004; public static final int abc_activitychooserview_choose_application = 0x7f0e0005; public static final int abc_capital_off = 0x7f0e0006; public static final int abc_capital_on = 0x7f0e0007; public static final int abc_menu_alt_shortcut_label = 0x7f0e0008; public static final int abc_menu_ctrl_shortcut_label = 0x7f0e0009; public static final int abc_menu_delete_shortcut_label = 0x7f0e000a; public static final int abc_menu_enter_shortcut_label = 0x7f0e000b; public static final int abc_menu_function_shortcut_label = 0x7f0e000c; public static final int abc_menu_meta_shortcut_label = 0x7f0e000d; public static final int abc_menu_shift_shortcut_label = 0x7f0e000e; public static final int abc_menu_space_shortcut_label = 0x7f0e000f; public static final int abc_menu_sym_shortcut_label = 0x7f0e0010; public static final int abc_prepend_shortcut_label = 0x7f0e0011; public static final int abc_search_hint = 0x7f0e0012; public static final int abc_searchview_description_clear = 0x7f0e0013; public static final int abc_searchview_description_query = 0x7f0e0014; public static final int abc_searchview_description_search = 0x7f0e0015; public static final int abc_searchview_description_submit = 0x7f0e0016; public static final int abc_searchview_description_voice = 0x7f0e0017; public static final int abc_shareactionprovider_share_with = 0x7f0e0018; public static final int abc_shareactionprovider_share_with_application = 0x7f0e0019; public static final int abc_toolbar_collapse_description = 0x7f0e001a; public static final int alert_description = 0x7f0e001b; public static final int button_description = 0x7f0e001f; public static final int catalyst_change_bundle_location = 0x7f0e0020; public static final int catalyst_copy_button = 0x7f0e0021; public static final int catalyst_debug = 0x7f0e0022; public static final int catalyst_debug_chrome = 0x7f0e0023; public static final int catalyst_debug_chrome_stop = 0x7f0e0024; public static final int catalyst_debug_connecting = 0x7f0e0025; public static final int catalyst_debug_error = 0x7f0e0026; public static final int catalyst_debug_nuclide = 0x7f0e0027; public static final int catalyst_debug_nuclide_error = 0x7f0e0028; public static final int catalyst_debug_stop = 0x7f0e0029; public static final int catalyst_dismiss_button = 0x7f0e002a; public static final int catalyst_heap_capture = 0x7f0e002b; public static final int catalyst_hot_reloading = 0x7f0e002c; public static final int catalyst_hot_reloading_auto_disable = 0x7f0e002d; public static final int catalyst_hot_reloading_auto_enable = 0x7f0e002e; public static final int catalyst_hot_reloading_stop = 0x7f0e002f; public static final int catalyst_inspector = 0x7f0e0030; public static final int catalyst_loading_from_url = 0x7f0e0031; public static final int catalyst_perf_monitor = 0x7f0e0032; public static final int catalyst_perf_monitor_stop = 0x7f0e0033; public static final int catalyst_reload = 0x7f0e0034; public static final int catalyst_reload_button = 0x7f0e0035; public static final int catalyst_reload_error = 0x7f0e0036; public static final int catalyst_report_button = 0x7f0e0037; public static final int catalyst_sample_profiler_disable = 0x7f0e0038; public static final int catalyst_sample_profiler_enable = 0x7f0e0039; public static final int catalyst_settings = 0x7f0e003a; public static final int catalyst_settings_title = 0x7f0e003b; public static final int combobox_description = 0x7f0e0041; public static final int header_description = 0x7f0e0046; public static final int image_description = 0x7f0e0049; public static final int imagebutton_description = 0x7f0e004a; public static final int link_description = 0x7f0e004b; public static final int menu_description = 0x7f0e004c; public static final int menubar_description = 0x7f0e004d; public static final int menuitem_description = 0x7f0e004e; public static final int progressbar_description = 0x7f0e0076; public static final int radiogroup_description = 0x7f0e0077; public static final int rn_tab_description = 0x7f0e0078; public static final int scrollbar_description = 0x7f0e0079; public static final int search_description = 0x7f0e007a; public static final int search_menu_title = 0x7f0e007b; public static final int spinbutton_description = 0x7f0e007c; public static final int state_busy_description = 0x7f0e007d; public static final int state_collapsed_description = 0x7f0e007e; public static final int state_expanded_description = 0x7f0e007f; public static final int state_mixed_description = 0x7f0e0080; public static final int state_off_description = 0x7f0e0081; public static final int state_on_description = 0x7f0e0082; public static final int status_bar_notification_info_overflow = 0x7f0e0083; public static final int summary_description = 0x7f0e0084; public static final int tablist_description = 0x7f0e0085; public static final int timer_description = 0x7f0e0086; public static final int toolbar_description = 0x7f0e0087; } public static final class style { private style() {} public static final int AlertDialog_AppCompat = 0x7f0f0000; public static final int AlertDialog_AppCompat_Light = 0x7f0f0001; public static final int Animation_AppCompat_Dialog = 0x7f0f0002; public static final int Animation_AppCompat_DropDownUp = 0x7f0f0003; public static final int Animation_AppCompat_Tooltip = 0x7f0f0004; public static final int Animation_Catalyst_LogBox = 0x7f0f0005; public static final int Animation_Catalyst_RedBox = 0x7f0f0006; public static final int Base_AlertDialog_AppCompat = 0x7f0f000a; public static final int Base_AlertDialog_AppCompat_Light = 0x7f0f000b; public static final int Base_Animation_AppCompat_Dialog = 0x7f0f000c; public static final int Base_Animation_AppCompat_DropDownUp = 0x7f0f000d; public static final int Base_Animation_AppCompat_Tooltip = 0x7f0f000e; public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f0f0011; public static final int Base_DialogWindowTitle_AppCompat = 0x7f0f0010; public static final int Base_TextAppearance_AppCompat = 0x7f0f0015; public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f0f0016; public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f0f0017; public static final int Base_TextAppearance_AppCompat_Button = 0x7f0f0018; public static final int Base_TextAppearance_AppCompat_Caption = 0x7f0f0019; public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f0f001a; public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f0f001b; public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f0f001c; public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f0f001d; public static final int Base_TextAppearance_AppCompat_Headline = 0x7f0f001e; public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f0f001f; public static final int Base_TextAppearance_AppCompat_Large = 0x7f0f0020; public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f0f0021; public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0f0022; public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0f0023; public static final int Base_TextAppearance_AppCompat_Medium = 0x7f0f0024; public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f0f0025; public static final int Base_TextAppearance_AppCompat_Menu = 0x7f0f0026; public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f0f0027; public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0f0028; public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f0f0029; public static final int Base_TextAppearance_AppCompat_Small = 0x7f0f002a; public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f0f002b; public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f0f002c; public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f0f002d; public static final int Base_TextAppearance_AppCompat_Title = 0x7f0f002e; public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f0f002f; public static final int Base_TextAppearance_AppCompat_Tooltip = 0x7f0f0030; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0f0031; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0f0032; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0f0033; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0f0034; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0f0035; public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0f0036; public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0f0037; public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f0f0038; public static final int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 0x7f0f0039; public static final int Base_TextAppearance_AppCompat_Widget_Button_Colored = 0x7f0f003a; public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0f003b; public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0f003c; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0f003d; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0f003e; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0f003f; public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f0f0040; public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0f0041; public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0f0046; public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0f0047; public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0f0048; public static final int Base_ThemeOverlay_AppCompat = 0x7f0f006a; public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0f006b; public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0f006c; public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0f006d; public static final int Base_ThemeOverlay_AppCompat_Dialog = 0x7f0f006e; public static final int Base_ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0f006f; public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0f0070; public static final int Base_Theme_AppCompat = 0x7f0f0049; public static final int Base_Theme_AppCompat_CompactMenu = 0x7f0f004a; public static final int Base_Theme_AppCompat_Dialog = 0x7f0f004b; public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f0f004f; public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f0f004c; public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f0f004d; public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f0f004e; public static final int Base_Theme_AppCompat_Light = 0x7f0f0050; public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f0f0051; public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f0f0052; public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f0f0056; public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f0f0053; public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f0f0054; public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0f0055; public static final int Base_V21_ThemeOverlay_AppCompat_Dialog = 0x7f0f0084; public static final int Base_V21_Theme_AppCompat = 0x7f0f0080; public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f0f0081; public static final int Base_V21_Theme_AppCompat_Light = 0x7f0f0082; public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f0f0083; public static final int Base_V22_Theme_AppCompat = 0x7f0f0085; public static final int Base_V22_Theme_AppCompat_Light = 0x7f0f0086; public static final int Base_V23_Theme_AppCompat = 0x7f0f0087; public static final int Base_V23_Theme_AppCompat_Light = 0x7f0f0088; public static final int Base_V26_Theme_AppCompat = 0x7f0f0089; public static final int Base_V26_Theme_AppCompat_Light = 0x7f0f008a; public static final int Base_V26_Widget_AppCompat_Toolbar = 0x7f0f008b; public static final int Base_V28_Theme_AppCompat = 0x7f0f008c; public static final int Base_V28_Theme_AppCompat_Light = 0x7f0f008d; public static final int Base_V7_ThemeOverlay_AppCompat_Dialog = 0x7f0f0092; public static final int Base_V7_Theme_AppCompat = 0x7f0f008e; public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0f008f; public static final int Base_V7_Theme_AppCompat_Light = 0x7f0f0090; public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0f0091; public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0f0093; public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0f0094; public static final int Base_V7_Widget_AppCompat_Toolbar = 0x7f0f0095; public static final int Base_Widget_AppCompat_ActionBar = 0x7f0f0096; public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0f0097; public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0f0098; public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f0f0099; public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f0f009a; public static final int Base_Widget_AppCompat_ActionButton = 0x7f0f009b; public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f0f009c; public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f0f009d; public static final int Base_Widget_AppCompat_ActionMode = 0x7f0f009e; public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0f009f; public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f0f00a0; public static final int Base_Widget_AppCompat_Button = 0x7f0f00a1; public static final int Base_Widget_AppCompat_ButtonBar = 0x7f0f00a7; public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0f00a8; public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f0f00a2; public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f0f00a3; public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0f00a4; public static final int Base_Widget_AppCompat_Button_Colored = 0x7f0f00a5; public static final int Base_Widget_AppCompat_Button_Small = 0x7f0f00a6; public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f0f00a9; public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f0f00aa; public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0f00ab; public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f0f00ac; public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0f00ad; public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f0f00ae; public static final int Base_Widget_AppCompat_EditText = 0x7f0f00af; public static final int Base_Widget_AppCompat_ImageButton = 0x7f0f00b0; public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0f00b1; public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0f00b2; public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0f00b3; public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f0f00b4; public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0f00b5; public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f0f00b6; public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f0f00b7; public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0f00b8; public static final int Base_Widget_AppCompat_ListMenuView = 0x7f0f00b9; public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f0f00ba; public static final int Base_Widget_AppCompat_ListView = 0x7f0f00bb; public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f0f00bc; public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f0f00bd; public static final int Base_Widget_AppCompat_PopupMenu = 0x7f0f00be; public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f0f00bf; public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0f00c0; public static final int Base_Widget_AppCompat_ProgressBar = 0x7f0f00c1; public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f0f00c2; public static final int Base_Widget_AppCompat_RatingBar = 0x7f0f00c3; public static final int Base_Widget_AppCompat_RatingBar_Indicator = 0x7f0f00c4; public static final int Base_Widget_AppCompat_RatingBar_Small = 0x7f0f00c5; public static final int Base_Widget_AppCompat_SearchView = 0x7f0f00c6; public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0f00c7; public static final int Base_Widget_AppCompat_SeekBar = 0x7f0f00c8; public static final int Base_Widget_AppCompat_SeekBar_Discrete = 0x7f0f00c9; public static final int Base_Widget_AppCompat_Spinner = 0x7f0f00ca; public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f0f00cb; public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f0f00cd; public static final int Base_Widget_AppCompat_Toolbar = 0x7f0f00ce; public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0f00cf; public static final int CalendarDatePickerDialog = 0x7f0f00db; public static final int CalendarDatePickerStyle = 0x7f0f00dc; public static final int ClockTimePickerDialog = 0x7f0f00e0; public static final int ClockTimePickerStyle = 0x7f0f00e1; public static final int DialogAnimationFade = 0x7f0f00e2; public static final int DialogAnimationSlide = 0x7f0f00e3; public static final int Platform_AppCompat = 0x7f0f00ef; public static final int Platform_AppCompat_Light = 0x7f0f00f0; public static final int Platform_ThemeOverlay_AppCompat = 0x7f0f00f5; public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f0f00f6; public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f0f00f7; public static final int Platform_V21_AppCompat = 0x7f0f00f8; public static final int Platform_V21_AppCompat_Light = 0x7f0f00f9; public static final int Platform_V25_AppCompat = 0x7f0f00fa; public static final int Platform_V25_AppCompat_Light = 0x7f0f00fb; public static final int Platform_Widget_AppCompat_Spinner = 0x7f0f00fc; public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f0f00fd; public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f0f00fe; public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f0f00ff; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f0f0100; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f0f0101; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Shortcut = 0x7f0f0102; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_SubmenuArrow = 0x7f0f0103; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f0f0104; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Title = 0x7f0f0105; public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f0f010b; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f0f0106; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f0f0107; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f0f0108; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f0f0109; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f0f010a; public static final int RtlUnderlay_Widget_AppCompat_ActionButton = 0x7f0f010c; public static final int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 0x7f0f010d; public static final int SpinnerDatePickerDialog = 0x7f0f0122; public static final int SpinnerDatePickerStyle = 0x7f0f0123; public static final int SpinnerTimePickerDialog = 0x7f0f0124; public static final int SpinnerTimePickerStyle = 0x7f0f0125; public static final int TextAppearance_AppCompat = 0x7f0f0131; public static final int TextAppearance_AppCompat_Body1 = 0x7f0f0132; public static final int TextAppearance_AppCompat_Body2 = 0x7f0f0133; public static final int TextAppearance_AppCompat_Button = 0x7f0f0134; public static final int TextAppearance_AppCompat_Caption = 0x7f0f0135; public static final int TextAppearance_AppCompat_Display1 = 0x7f0f0136; public static final int TextAppearance_AppCompat_Display2 = 0x7f0f0137; public static final int TextAppearance_AppCompat_Display3 = 0x7f0f0138; public static final int TextAppearance_AppCompat_Display4 = 0x7f0f0139; public static final int TextAppearance_AppCompat_Headline = 0x7f0f013a; public static final int TextAppearance_AppCompat_Inverse = 0x7f0f013b; public static final int TextAppearance_AppCompat_Large = 0x7f0f013c; public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0f013d; public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0f013e; public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0f013f; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0f0140; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0f0141; public static final int TextAppearance_AppCompat_Medium = 0x7f0f0142; public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0f0143; public static final int TextAppearance_AppCompat_Menu = 0x7f0f0144; public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0f0145; public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0f0146; public static final int TextAppearance_AppCompat_Small = 0x7f0f0147; public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0f0148; public static final int TextAppearance_AppCompat_Subhead = 0x7f0f0149; public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0f014a; public static final int TextAppearance_AppCompat_Title = 0x7f0f014b; public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0f014c; public static final int TextAppearance_AppCompat_Tooltip = 0x7f0f014d; public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0f014e; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0f014f; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0f0150; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0f0151; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0f0152; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0f0153; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0f0154; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0f0155; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0f0156; public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0f0157; public static final int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 0x7f0f0158; public static final int TextAppearance_AppCompat_Widget_Button_Colored = 0x7f0f0159; public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0f015a; public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0f015b; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0f015c; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0f015d; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0f015e; public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0f015f; public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0f0160; public static final int TextAppearance_Compat_Notification = 0x7f0f0161; public static final int TextAppearance_Compat_Notification_Info = 0x7f0f0162; public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0f0163; public static final int TextAppearance_Compat_Notification_Time = 0x7f0f0164; public static final int TextAppearance_Compat_Notification_Title = 0x7f0f0165; public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0f017d; public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0f017e; public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0f017f; public static final int Theme = 0x7f0f0180; public static final int ThemeOverlay_AppCompat = 0x7f0f01d5; public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0f01d6; public static final int ThemeOverlay_AppCompat_Dark = 0x7f0f01d7; public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0f01d8; public static final int ThemeOverlay_AppCompat_Dialog = 0x7f0f01db; public static final int ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0f01dc; public static final int ThemeOverlay_AppCompat_Light = 0x7f0f01dd; public static final int Theme_AppCompat = 0x7f0f0181; public static final int Theme_AppCompat_CompactMenu = 0x7f0f0182; public static final int Theme_AppCompat_DayNight = 0x7f0f0183; public static final int Theme_AppCompat_DayNight_DarkActionBar = 0x7f0f0184; public static final int Theme_AppCompat_DayNight_Dialog = 0x7f0f0185; public static final int Theme_AppCompat_DayNight_DialogWhenLarge = 0x7f0f0188; public static final int Theme_AppCompat_DayNight_Dialog_Alert = 0x7f0f0186; public static final int Theme_AppCompat_DayNight_Dialog_MinWidth = 0x7f0f0187; public static final int Theme_AppCompat_DayNight_NoActionBar = 0x7f0f0189; public static final int Theme_AppCompat_Dialog = 0x7f0f018a; public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0f018d; public static final int Theme_AppCompat_Dialog_Alert = 0x7f0f018b; public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0f018c; public static final int Theme_AppCompat_Light = 0x7f0f018e; public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0f018f; public static final int Theme_AppCompat_Light_Dialog = 0x7f0f0190; public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0f0193; public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0f0191; public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0f0192; public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0f0194; public static final int Theme_AppCompat_NoActionBar = 0x7f0f0195; public static final int Theme_Catalyst = 0x7f0f0196; public static final int Theme_Catalyst_LogBox = 0x7f0f0197; public static final int Theme_Catalyst_RedBox = 0x7f0f0198; public static final int Theme_FullScreenDialog = 0x7f0f019f; public static final int Theme_FullScreenDialogAnimatedFade = 0x7f0f01a0; public static final int Theme_FullScreenDialogAnimatedSlide = 0x7f0f01a1; public static final int Theme_ReactNative_AppCompat_Light = 0x7f0f01d3; public static final int Theme_ReactNative_AppCompat_Light_NoActionBar_FullScreen = 0x7f0f01d4; public static final int Widget_AppCompat_ActionBar = 0x7f0f0202; public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0f0203; public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0f0204; public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0f0205; public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0f0206; public static final int Widget_AppCompat_ActionButton = 0x7f0f0207; public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0f0208; public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0f0209; public static final int Widget_AppCompat_ActionMode = 0x7f0f020a; public static final int Widget_AppCompat_ActivityChooserView = 0x7f0f020b; public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0f020c; public static final int Widget_AppCompat_Button = 0x7f0f020d; public static final int Widget_AppCompat_ButtonBar = 0x7f0f0213; public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0f0214; public static final int Widget_AppCompat_Button_Borderless = 0x7f0f020e; public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f0f020f; public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0f0210; public static final int Widget_AppCompat_Button_Colored = 0x7f0f0211; public static final int Widget_AppCompat_Button_Small = 0x7f0f0212; public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f0f0215; public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f0f0216; public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f0f0217; public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f0f0218; public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0f0219; public static final int Widget_AppCompat_EditText = 0x7f0f021a; public static final int Widget_AppCompat_ImageButton = 0x7f0f021b; public static final int Widget_AppCompat_Light_ActionBar = 0x7f0f021c; public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0f021d; public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0f021e; public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0f021f; public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0f0220; public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0f0221; public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0f0222; public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0f0223; public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0f0224; public static final int Widget_AppCompat_Light_ActionButton = 0x7f0f0225; public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0f0226; public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0f0227; public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0f0228; public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0f0229; public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0f022a; public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0f022b; public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f0f022c; public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0f022d; public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0f022e; public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0f022f; public static final int Widget_AppCompat_Light_SearchView = 0x7f0f0230; public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0f0231; public static final int Widget_AppCompat_ListMenuView = 0x7f0f0232; public static final int Widget_AppCompat_ListPopupWindow = 0x7f0f0233; public static final int Widget_AppCompat_ListView = 0x7f0f0234; public static final int Widget_AppCompat_ListView_DropDown = 0x7f0f0235; public static final int Widget_AppCompat_ListView_Menu = 0x7f0f0236; public static final int Widget_AppCompat_PopupMenu = 0x7f0f0237; public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f0f0238; public static final int Widget_AppCompat_PopupWindow = 0x7f0f0239; public static final int Widget_AppCompat_ProgressBar = 0x7f0f023a; public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0f023b; public static final int Widget_AppCompat_RatingBar = 0x7f0f023c; public static final int Widget_AppCompat_RatingBar_Indicator = 0x7f0f023d; public static final int Widget_AppCompat_RatingBar_Small = 0x7f0f023e; public static final int Widget_AppCompat_SearchView = 0x7f0f023f; public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f0f0240; public static final int Widget_AppCompat_SeekBar = 0x7f0f0241; public static final int Widget_AppCompat_SeekBar_Discrete = 0x7f0f0242; public static final int Widget_AppCompat_Spinner = 0x7f0f0243; public static final int Widget_AppCompat_Spinner_DropDown = 0x7f0f0244; public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0f0245; public static final int Widget_AppCompat_Spinner_Underlined = 0x7f0f0246; public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f0f0248; public static final int Widget_AppCompat_Toolbar = 0x7f0f0249; public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0f024a; public static final int Widget_Compat_NotificationActionContainer = 0x7f0f024b; public static final int Widget_Compat_NotificationActionText = 0x7f0f024c; public static final int Widget_Support_CoordinatorLayout = 0x7f0f02b3; public static final int redboxButton = 0x7f0f02b4; } public static final class styleable { private styleable() {} public static final int[] ActionBar = { 0x7f030037, 0x7f03003f, 0x7f030040, 0x7f0300b6, 0x7f0300b7, 0x7f0300b8, 0x7f0300b9, 0x7f0300ba, 0x7f0300bb, 0x7f0300d5, 0x7f0300de, 0x7f0300df, 0x7f0300f2, 0x7f03012f, 0x7f030135, 0x7f03013b, 0x7f03013c, 0x7f03013e, 0x7f030148, 0x7f030155, 0x7f030187, 0x7f0301a7, 0x7f0301bd, 0x7f0301c5, 0x7f0301c6, 0x7f030214, 0x7f030217, 0x7f03025f, 0x7f030269 }; public static final int ActionBar_background = 0; public static final int ActionBar_backgroundSplit = 1; public static final int ActionBar_backgroundStacked = 2; public static final int ActionBar_contentInsetEnd = 3; public static final int ActionBar_contentInsetEndWithActions = 4; public static final int ActionBar_contentInsetLeft = 5; public static final int ActionBar_contentInsetRight = 6; public static final int ActionBar_contentInsetStart = 7; public static final int ActionBar_contentInsetStartWithNavigation = 8; public static final int ActionBar_customNavigationLayout = 9; public static final int ActionBar_displayOptions = 10; public static final int ActionBar_divider = 11; public static final int ActionBar_elevation = 12; public static final int ActionBar_height = 13; public static final int ActionBar_hideOnContentScroll = 14; public static final int ActionBar_homeAsUpIndicator = 15; public static final int ActionBar_homeLayout = 16; public static final int ActionBar_icon = 17; public static final int ActionBar_indeterminateProgressStyle = 18; public static final int ActionBar_itemPadding = 19; public static final int ActionBar_logo = 20; public static final int ActionBar_navigationMode = 21; public static final int ActionBar_popupTheme = 22; public static final int ActionBar_progressBarPadding = 23; public static final int ActionBar_progressBarStyle = 24; public static final int ActionBar_subtitle = 25; public static final int ActionBar_subtitleTextStyle = 26; public static final int ActionBar_title = 27; public static final int ActionBar_titleTextStyle = 28; public static final int[] ActionBarLayout = { 0x10100b3 }; public static final int ActionBarLayout_android_layout_gravity = 0; public static final int[] ActionMenuItemView = { 0x101013f }; public static final int ActionMenuItemView_android_minWidth = 0; public static final int[] ActionMenuView = { }; public static final int[] ActionMode = { 0x7f030037, 0x7f03003f, 0x7f030099, 0x7f03012f, 0x7f030217, 0x7f030269 }; public static final int ActionMode_background = 0; public static final int ActionMode_backgroundSplit = 1; public static final int ActionMode_closeItemLayout = 2; public static final int ActionMode_height = 3; public static final int ActionMode_subtitleTextStyle = 4; public static final int ActionMode_titleTextStyle = 5; public static final int[] ActivityChooserView = { 0x7f030104, 0x7f030149 }; public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 0; public static final int ActivityChooserView_initialActivityCount = 1; public static final int[] AlertDialog = { 0x10100f2, 0x7f030068, 0x7f030069, 0x7f03017c, 0x7f03017d, 0x7f0301a4, 0x7f0301f4, 0x7f0301f6 }; public static final int AlertDialog_android_layout = 0; public static final int AlertDialog_buttonIconDimen = 1; public static final int AlertDialog_buttonPanelSideLayout = 2; public static final int AlertDialog_listItemLayout = 3; public static final int AlertDialog_listLayout = 4; public static final int AlertDialog_multiChoiceItemLayout = 5; public static final int AlertDialog_showTitle = 6; public static final int AlertDialog_singleChoiceItemLayout = 7; public static final int[] AnimatedStateListDrawableCompat = { 0x101011c, 0x1010194, 0x1010195, 0x1010196, 0x101030c, 0x101030d }; public static final int AnimatedStateListDrawableCompat_android_dither = 0; public static final int AnimatedStateListDrawableCompat_android_visible = 1; public static final int AnimatedStateListDrawableCompat_android_variablePadding = 2; public static final int AnimatedStateListDrawableCompat_android_constantSize = 3; public static final int AnimatedStateListDrawableCompat_android_enterFadeDuration = 4; public static final int AnimatedStateListDrawableCompat_android_exitFadeDuration = 5; public static final int[] AnimatedStateListDrawableItem = { 0x10100d0, 0x1010199 }; public static final int AnimatedStateListDrawableItem_android_id = 0; public static final int AnimatedStateListDrawableItem_android_drawable = 1; public static final int[] AnimatedStateListDrawableTransition = { 0x1010199, 0x1010449, 0x101044a, 0x101044b }; public static final int AnimatedStateListDrawableTransition_android_drawable = 0; public static final int AnimatedStateListDrawableTransition_android_toId = 1; public static final int AnimatedStateListDrawableTransition_android_fromId = 2; public static final int AnimatedStateListDrawableTransition_android_reversible = 3; public static final int[] AppCompatImageView = { 0x1010119, 0x7f030200, 0x7f03025d, 0x7f03025e }; public static final int AppCompatImageView_android_src = 0; public static final int AppCompatImageView_srcCompat = 1; public static final int AppCompatImageView_tint = 2; public static final int AppCompatImageView_tintMode = 3; public static final int[] AppCompatSeekBar = { 0x1010142, 0x7f03025a, 0x7f03025b, 0x7f03025c }; public static final int AppCompatSeekBar_android_thumb = 0; public static final int AppCompatSeekBar_tickMark = 1; public static final int AppCompatSeekBar_tickMarkTint = 2; public static final int AppCompatSeekBar_tickMarkTintMode = 3; public static final int[] AppCompatTextHelper = { 0x1010034, 0x101016d, 0x101016e, 0x101016f, 0x1010170, 0x1010392, 0x1010393 }; public static final int AppCompatTextHelper_android_textAppearance = 0; public static final int AppCompatTextHelper_android_drawableTop = 1; public static final int AppCompatTextHelper_android_drawableBottom = 2; public static final int AppCompatTextHelper_android_drawableLeft = 3; public static final int AppCompatTextHelper_android_drawableRight = 4; public static final int AppCompatTextHelper_android_drawableStart = 5; public static final int AppCompatTextHelper_android_drawableEnd = 6; public static final int[] AppCompatTextView = { 0x1010034, 0x7f030032, 0x7f030033, 0x7f030034, 0x7f030035, 0x7f030036, 0x7f0300e3, 0x7f0300e4, 0x7f0300e5, 0x7f0300e6, 0x7f0300e8, 0x7f0300e9, 0x7f0300ea, 0x7f0300eb, 0x7f03011e, 0x7f030121, 0x7f030129, 0x7f030167, 0x7f030176, 0x7f030237, 0x7f030252 }; public static final int AppCompatTextView_android_textAppearance = 0; public static final int AppCompatTextView_autoSizeMaxTextSize = 1; public static final int AppCompatTextView_autoSizeMinTextSize = 2; public static final int AppCompatTextView_autoSizePresetSizes = 3; public static final int AppCompatTextView_autoSizeStepGranularity = 4; public static final int AppCompatTextView_autoSizeTextType = 5; public static final int AppCompatTextView_drawableBottomCompat = 6; public static final int AppCompatTextView_drawableEndCompat = 7; public static final int AppCompatTextView_drawableLeftCompat = 8; public static final int AppCompatTextView_drawableRightCompat = 9; public static final int AppCompatTextView_drawableStartCompat = 10; public static final int AppCompatTextView_drawableTint = 11; public static final int AppCompatTextView_drawableTintMode = 12; public static final int AppCompatTextView_drawableTopCompat = 13; public static final int AppCompatTextView_firstBaselineToTopHeight = 14; public static final int AppCompatTextView_fontFamily = 15; public static final int AppCompatTextView_fontVariationSettings = 16; public static final int AppCompatTextView_lastBaselineToBottomHeight = 17; public static final int AppCompatTextView_lineHeight = 18; public static final int AppCompatTextView_textAllCaps = 19; public static final int AppCompatTextView_textLocale = 20; public static final int[] AppCompatTheme = { 0x1010057, 0x10100ae, 0x7f030000, 0x7f030001, 0x7f030002, 0x7f030003, 0x7f030004, 0x7f030005, 0x7f030006, 0x7f030007, 0x7f030008, 0x7f030009, 0x7f03000a, 0x7f03000b, 0x7f03000c, 0x7f03000e, 0x7f03000f, 0x7f030010, 0x7f030011, 0x7f030012, 0x7f030013, 0x7f030014, 0x7f030015, 0x7f030016, 0x7f030017, 0x7f030018, 0x7f030019, 0x7f03001a, 0x7f03001b, 0x7f03001c, 0x7f03001d, 0x7f03001e, 0x7f030022, 0x7f030026, 0x7f030027, 0x7f030028, 0x7f030029, 0x7f030031, 0x7f030052, 0x7f030061, 0x7f030062, 0x7f030063, 0x7f030064, 0x7f030065, 0x7f03006a, 0x7f03006b, 0x7f030076, 0x7f03007d, 0x7f03009f, 0x7f0300a0, 0x7f0300a1, 0x7f0300a2, 0x7f0300a3, 0x7f0300a4, 0x7f0300a5, 0x7f0300ac, 0x7f0300ad, 0x7f0300b3, 0x7f0300c2, 0x7f0300db, 0x7f0300dc, 0x7f0300dd, 0x7f0300e0, 0x7f0300e2, 0x7f0300ed, 0x7f0300ee, 0x7f0300ef, 0x7f0300f0, 0x7f0300f1, 0x7f03013b, 0x7f030147, 0x7f030178, 0x7f030179, 0x7f03017a, 0x7f03017b, 0x7f03017e, 0x7f03017f, 0x7f030180, 0x7f030181, 0x7f030182, 0x7f030183, 0x7f030184, 0x7f030185, 0x7f030186, 0x7f0301b1, 0x7f0301b2, 0x7f0301b3, 0x7f0301bc, 0x7f0301be, 0x7f0301c9, 0x7f0301cb, 0x7f0301cc, 0x7f0301cd, 0x7f0301e7, 0x7f0301e8, 0x7f0301e9, 0x7f0301ea, 0x7f0301fd, 0x7f0301fe, 0x7f03021b, 0x7f030242, 0x7f030244, 0x7f030245, 0x7f030246, 0x7f030248, 0x7f030249, 0x7f03024a, 0x7f03024b, 0x7f03024e, 0x7f03024f, 0x7f03026b, 0x7f03026c, 0x7f03026d, 0x7f03026e, 0x7f030277, 0x7f030279, 0x7f03027a, 0x7f03027b, 0x7f03027c, 0x7f03027d, 0x7f03027e, 0x7f03027f, 0x7f030280, 0x7f030281, 0x7f030282 }; public static final int AppCompatTheme_android_windowIsFloating = 0; public static final int AppCompatTheme_android_windowAnimationStyle = 1; public static final int AppCompatTheme_actionBarDivider = 2; public static final int AppCompatTheme_actionBarItemBackground = 3; public static final int AppCompatTheme_actionBarPopupTheme = 4; public static final int AppCompatTheme_actionBarSize = 5; public static final int AppCompatTheme_actionBarSplitStyle = 6; public static final int AppCompatTheme_actionBarStyle = 7; public static final int AppCompatTheme_actionBarTabBarStyle = 8; public static final int AppCompatTheme_actionBarTabStyle = 9; public static final int AppCompatTheme_actionBarTabTextStyle = 10; public static final int AppCompatTheme_actionBarTheme = 11; public static final int AppCompatTheme_actionBarWidgetTheme = 12; public static final int AppCompatTheme_actionButtonStyle = 13; public static final int AppCompatTheme_actionDropDownStyle = 14; public static final int AppCompatTheme_actionMenuTextAppearance = 15; public static final int AppCompatTheme_actionMenuTextColor = 16; public static final int AppCompatTheme_actionModeBackground = 17; public static final int AppCompatTheme_actionModeCloseButtonStyle = 18; public static final int AppCompatTheme_actionModeCloseDrawable = 19; public static final int AppCompatTheme_actionModeCopyDrawable = 20; public static final int AppCompatTheme_actionModeCutDrawable = 21; public static final int AppCompatTheme_actionModeFindDrawable = 22; public static final int AppCompatTheme_actionModePasteDrawable = 23; public static final int AppCompatTheme_actionModePopupWindowStyle = 24; public static final int AppCompatTheme_actionModeSelectAllDrawable = 25; public static final int AppCompatTheme_actionModeShareDrawable = 26; public static final int AppCompatTheme_actionModeSplitBackground = 27; public static final int AppCompatTheme_actionModeStyle = 28; public static final int AppCompatTheme_actionModeWebSearchDrawable = 29; public static final int AppCompatTheme_actionOverflowButtonStyle = 30; public static final int AppCompatTheme_actionOverflowMenuStyle = 31; public static final int AppCompatTheme_activityChooserViewStyle = 32; public static final int AppCompatTheme_alertDialogButtonGroupStyle = 33; public static final int AppCompatTheme_alertDialogCenterButtons = 34; public static final int AppCompatTheme_alertDialogStyle = 35; public static final int AppCompatTheme_alertDialogTheme = 36; public static final int AppCompatTheme_autoCompleteTextViewStyle = 37; public static final int AppCompatTheme_borderlessButtonStyle = 38; public static final int AppCompatTheme_buttonBarButtonStyle = 39; public static final int AppCompatTheme_buttonBarNegativeButtonStyle = 40; public static final int AppCompatTheme_buttonBarNeutralButtonStyle = 41; public static final int AppCompatTheme_buttonBarPositiveButtonStyle = 42; public static final int AppCompatTheme_buttonBarStyle = 43; public static final int AppCompatTheme_buttonStyle = 44; public static final int AppCompatTheme_buttonStyleSmall = 45; public static final int AppCompatTheme_checkboxStyle = 46; public static final int AppCompatTheme_checkedTextViewStyle = 47; public static final int AppCompatTheme_colorAccent = 48; public static final int AppCompatTheme_colorBackgroundFloating = 49; public static final int AppCompatTheme_colorButtonNormal = 50; public static final int AppCompatTheme_colorControlActivated = 51; public static final int AppCompatTheme_colorControlHighlight = 52; public static final int AppCompatTheme_colorControlNormal = 53; public static final int AppCompatTheme_colorError = 54; public static final int AppCompatTheme_colorPrimary = 55; public static final int AppCompatTheme_colorPrimaryDark = 56; public static final int AppCompatTheme_colorSwitchThumbNormal = 57; public static final int AppCompatTheme_controlBackground = 58; public static final int AppCompatTheme_dialogCornerRadius = 59; public static final int AppCompatTheme_dialogPreferredPadding = 60; public static final int AppCompatTheme_dialogTheme = 61; public static final int AppCompatTheme_dividerHorizontal = 62; public static final int AppCompatTheme_dividerVertical = 63; public static final int AppCompatTheme_dropDownListViewStyle = 64; public static final int AppCompatTheme_dropdownListPreferredItemHeight = 65; public static final int AppCompatTheme_editTextBackground = 66; public static final int AppCompatTheme_editTextColor = 67; public static final int AppCompatTheme_editTextStyle = 68; public static final int AppCompatTheme_homeAsUpIndicator = 69; public static final int AppCompatTheme_imageButtonStyle = 70; public static final int AppCompatTheme_listChoiceBackgroundIndicator = 71; public static final int AppCompatTheme_listChoiceIndicatorMultipleAnimated = 72; public static final int AppCompatTheme_listChoiceIndicatorSingleAnimated = 73; public static final int AppCompatTheme_listDividerAlertDialog = 74; public static final int AppCompatTheme_listMenuViewStyle = 75; public static final int AppCompatTheme_listPopupWindowStyle = 76; public static final int AppCompatTheme_listPreferredItemHeight = 77; public static final int AppCompatTheme_listPreferredItemHeightLarge = 78; public static final int AppCompatTheme_listPreferredItemHeightSmall = 79; public static final int AppCompatTheme_listPreferredItemPaddingEnd = 80; public static final int AppCompatTheme_listPreferredItemPaddingLeft = 81; public static final int AppCompatTheme_listPreferredItemPaddingRight = 82; public static final int AppCompatTheme_listPreferredItemPaddingStart = 83; public static final int AppCompatTheme_panelBackground = 84; public static final int AppCompatTheme_panelMenuListTheme = 85; public static final int AppCompatTheme_panelMenuListWidth = 86; public static final int AppCompatTheme_popupMenuStyle = 87; public static final int AppCompatTheme_popupWindowStyle = 88; public static final int AppCompatTheme_radioButtonStyle = 89; public static final int AppCompatTheme_ratingBarStyle = 90; public static final int AppCompatTheme_ratingBarStyleIndicator = 91; public static final int AppCompatTheme_ratingBarStyleSmall = 92; public static final int AppCompatTheme_searchViewStyle = 93; public static final int AppCompatTheme_seekBarStyle = 94; public static final int AppCompatTheme_selectableItemBackground = 95; public static final int AppCompatTheme_selectableItemBackgroundBorderless = 96; public static final int AppCompatTheme_spinnerDropDownItemStyle = 97; public static final int AppCompatTheme_spinnerStyle = 98; public static final int AppCompatTheme_switchStyle = 99; public static final int AppCompatTheme_textAppearanceLargePopupMenu = 100; public static final int AppCompatTheme_textAppearanceListItem = 101; public static final int AppCompatTheme_textAppearanceListItemSecondary = 102; public static final int AppCompatTheme_textAppearanceListItemSmall = 103; public static final int AppCompatTheme_textAppearancePopupMenuHeader = 104; public static final int AppCompatTheme_textAppearanceSearchResultSubtitle = 105; public static final int AppCompatTheme_textAppearanceSearchResultTitle = 106; public static final int AppCompatTheme_textAppearanceSmallPopupMenu = 107; public static final int AppCompatTheme_textColorAlertDialogListItem = 108; public static final int AppCompatTheme_textColorSearchUrl = 109; public static final int AppCompatTheme_toolbarNavigationButtonStyle = 110; public static final int AppCompatTheme_toolbarStyle = 111; public static final int AppCompatTheme_tooltipForegroundColor = 112; public static final int AppCompatTheme_tooltipFrameBackground = 113; public static final int AppCompatTheme_viewInflaterClass = 114; public static final int AppCompatTheme_windowActionBar = 115; public static final int AppCompatTheme_windowActionBarOverlay = 116; public static final int AppCompatTheme_windowActionModeOverlay = 117; public static final int AppCompatTheme_windowFixedHeightMajor = 118; public static final int AppCompatTheme_windowFixedHeightMinor = 119; public static final int AppCompatTheme_windowFixedWidthMajor = 120; public static final int AppCompatTheme_windowFixedWidthMinor = 121; public static final int AppCompatTheme_windowMinWidthMajor = 122; public static final int AppCompatTheme_windowMinWidthMinor = 123; public static final int AppCompatTheme_windowNoTitle = 124; public static final int[] ButtonBarLayout = { 0x7f03002a }; public static final int ButtonBarLayout_allowStacking = 0; public static final int[] ColorStateListItem = { 0x10101a5, 0x101031f, 0x7f03002b }; public static final int ColorStateListItem_android_color = 0; public static final int ColorStateListItem_android_alpha = 1; public static final int ColorStateListItem_alpha = 2; public static final int[] CompoundButton = { 0x1010107, 0x7f030066, 0x7f03006c, 0x7f03006d }; public static final int CompoundButton_android_button = 0; public static final int CompoundButton_buttonCompat = 1; public static final int CompoundButton_buttonTint = 2; public static final int CompoundButton_buttonTintMode = 3; public static final int[] CoordinatorLayout = { 0x7f030165, 0x7f03020d }; public static final int CoordinatorLayout_keylines = 0; public static final int CoordinatorLayout_statusBarBackground = 1; public static final int[] CoordinatorLayout_Layout = { 0x10100b3, 0x7f03016a, 0x7f03016b, 0x7f03016c, 0x7f03016f, 0x7f030170, 0x7f030171 }; public static final int CoordinatorLayout_Layout_android_layout_gravity = 0; public static final int CoordinatorLayout_Layout_layout_anchor = 1; public static final int CoordinatorLayout_Layout_layout_anchorGravity = 2; public static final int CoordinatorLayout_Layout_layout_behavior = 3; public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 4; public static final int CoordinatorLayout_Layout_layout_insetEdge = 5; public static final int CoordinatorLayout_Layout_layout_keyline = 6; public static final int[] DrawerArrowToggle = { 0x7f03002f, 0x7f030030, 0x7f030046, 0x7f03009e, 0x7f0300e7, 0x7f03012c, 0x7f0301fc, 0x7f030256 }; public static final int DrawerArrowToggle_arrowHeadLength = 0; public static final int DrawerArrowToggle_arrowShaftLength = 1; public static final int DrawerArrowToggle_barLength = 2; public static final int DrawerArrowToggle_color = 3; public static final int DrawerArrowToggle_drawableSize = 4; public static final int DrawerArrowToggle_gapBetweenBars = 5; public static final int DrawerArrowToggle_spinBars = 6; public static final int DrawerArrowToggle_thickness = 7; public static final int[] FontFamily = { 0x7f030122, 0x7f030123, 0x7f030124, 0x7f030125, 0x7f030126, 0x7f030127 }; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 1; public static final int FontFamily_fontProviderFetchStrategy = 2; public static final int FontFamily_fontProviderFetchTimeout = 3; public static final int FontFamily_fontProviderPackage = 4; public static final int FontFamily_fontProviderQuery = 5; public static final int[] FontFamilyFont = { 0x1010532, 0x1010533, 0x101053f, 0x101056f, 0x1010570, 0x7f030120, 0x7f030128, 0x7f030129, 0x7f03012a, 0x7f030273 }; public static final int FontFamilyFont_android_font = 0; public static final int FontFamilyFont_android_fontWeight = 1; public static final int FontFamilyFont_android_fontStyle = 2; public static final int FontFamilyFont_android_ttcIndex = 3; public static final int FontFamilyFont_android_fontVariationSettings = 4; public static final int FontFamilyFont_font = 5; public static final int FontFamilyFont_fontStyle = 6; public static final int FontFamilyFont_fontVariationSettings = 7; public static final int FontFamilyFont_fontWeight = 8; public static final int FontFamilyFont_ttcIndex = 9; public static final int[] GenericDraweeHierarchy = { 0x7f030024, 0x7f030039, 0x7f030116, 0x7f030117, 0x7f030118, 0x7f0301ac, 0x7f0301b9, 0x7f0301ba, 0x7f0301c0, 0x7f0301c2, 0x7f0301c3, 0x7f0301c4, 0x7f0301cf, 0x7f0301d0, 0x7f0301d3, 0x7f0301d4, 0x7f0301d5, 0x7f0301d6, 0x7f0301d7, 0x7f0301d8, 0x7f0301d9, 0x7f0301da, 0x7f0301db, 0x7f0301dc, 0x7f0301dd, 0x7f0301de, 0x7f0301df, 0x7f0301e0, 0x7f030276 }; public static final int GenericDraweeHierarchy_actualImageScaleType = 0; public static final int GenericDraweeHierarchy_backgroundImage = 1; public static final int GenericDraweeHierarchy_fadeDuration = 2; public static final int GenericDraweeHierarchy_failureImage = 3; public static final int GenericDraweeHierarchy_failureImageScaleType = 4; public static final int GenericDraweeHierarchy_overlayImage = 5; public static final int GenericDraweeHierarchy_placeholderImage = 6; public static final int GenericDraweeHierarchy_placeholderImageScaleType = 7; public static final int GenericDraweeHierarchy_pressedStateOverlayImage = 8; public static final int GenericDraweeHierarchy_progressBarAutoRotateInterval = 9; public static final int GenericDraweeHierarchy_progressBarImage = 10; public static final int GenericDraweeHierarchy_progressBarImageScaleType = 11; public static final int GenericDraweeHierarchy_retryImage = 12; public static final int GenericDraweeHierarchy_retryImageScaleType = 13; public static final int GenericDraweeHierarchy_roundAsCircle = 14; public static final int GenericDraweeHierarchy_roundBottomEnd = 15; public static final int GenericDraweeHierarchy_roundBottomLeft = 16; public static final int GenericDraweeHierarchy_roundBottomRight = 17; public static final int GenericDraweeHierarchy_roundBottomStart = 18; public static final int GenericDraweeHierarchy_roundTopEnd = 19; public static final int GenericDraweeHierarchy_roundTopLeft = 20; public static final int GenericDraweeHierarchy_roundTopRight = 21; public static final int GenericDraweeHierarchy_roundTopStart = 22; public static final int GenericDraweeHierarchy_roundWithOverlayColor = 23; public static final int GenericDraweeHierarchy_roundedCornerRadius = 24; public static final int GenericDraweeHierarchy_roundingBorderColor = 25; public static final int GenericDraweeHierarchy_roundingBorderPadding = 26; public static final int GenericDraweeHierarchy_roundingBorderWidth = 27; public static final int GenericDraweeHierarchy_viewAspectRatio = 28; public static final int[] GradientColor = { 0x101019d, 0x101019e, 0x10101a1, 0x10101a2, 0x10101a3, 0x10101a4, 0x1010201, 0x101020b, 0x1010510, 0x1010511, 0x1010512, 0x1010513 }; public static final int GradientColor_android_startColor = 0; public static final int GradientColor_android_endColor = 1; public static final int GradientColor_android_type = 2; public static final int GradientColor_android_centerX = 3; public static final int GradientColor_android_centerY = 4; public static final int GradientColor_android_gradientRadius = 5; public static final int GradientColor_android_tileMode = 6; public static final int GradientColor_android_centerColor = 7; public static final int GradientColor_android_startX = 8; public static final int GradientColor_android_startY = 9; public static final int GradientColor_android_endX = 10; public static final int GradientColor_android_endY = 11; public static final int[] GradientColorItem = { 0x10101a5, 0x1010514 }; public static final int GradientColorItem_android_color = 0; public static final int GradientColorItem_android_offset = 1; public static final int[] LinearLayoutCompat = { 0x10100af, 0x10100c4, 0x1010126, 0x1010127, 0x1010128, 0x7f0300df, 0x7f0300e1, 0x7f0301a1, 0x7f0301f1 }; public static final int LinearLayoutCompat_android_gravity = 0; public static final int LinearLayoutCompat_android_orientation = 1; public static final int LinearLayoutCompat_android_baselineAligned = 2; public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3; public static final int LinearLayoutCompat_android_weightSum = 4; public static final int LinearLayoutCompat_divider = 5; public static final int LinearLayoutCompat_dividerPadding = 6; public static final int LinearLayoutCompat_measureWithLargestChild = 7; public static final int LinearLayoutCompat_showDividers = 8; public static final int[] LinearLayoutCompat_Layout = { 0x10100b3, 0x10100f4, 0x10100f5, 0x1010181 }; public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0; public static final int LinearLayoutCompat_Layout_android_layout_width = 1; public static final int LinearLayoutCompat_Layout_android_layout_height = 2; public static final int LinearLayoutCompat_Layout_android_layout_weight = 3; public static final int[] ListPopupWindow = { 0x10102ac, 0x10102ad }; public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0; public static final int ListPopupWindow_android_dropDownVerticalOffset = 1; public static final int[] MenuGroup = { 0x101000e, 0x10100d0, 0x1010194, 0x10101de, 0x10101df, 0x10101e0 }; public static final int MenuGroup_android_enabled = 0; public static final int MenuGroup_android_id = 1; public static final int MenuGroup_android_visible = 2; public static final int MenuGroup_android_menuCategory = 3; public static final int MenuGroup_android_orderInCategory = 4; public static final int MenuGroup_android_checkableBehavior = 5; public static final int[] MenuItem = { 0x1010002, 0x101000e, 0x10100d0, 0x1010106, 0x1010194, 0x10101de, 0x10101df, 0x10101e1, 0x10101e2, 0x10101e3, 0x10101e4, 0x10101e5, 0x101026f, 0x7f03000d, 0x7f03001f, 0x7f030021, 0x7f03002c, 0x7f0300b5, 0x7f030144, 0x7f030145, 0x7f0301aa, 0x7f0301f0, 0x7f03026f }; public static final int MenuItem_android_icon = 0; public static final int MenuItem_android_enabled = 1; public static final int MenuItem_android_id = 2; public static final int MenuItem_android_checked = 3; public static final int MenuItem_android_visible = 4; public static final int MenuItem_android_menuCategory = 5; public static final int MenuItem_android_orderInCategory = 6; public static final int MenuItem_android_title = 7; public static final int MenuItem_android_titleCondensed = 8; public static final int MenuItem_android_alphabeticShortcut = 9; public static final int MenuItem_android_numericShortcut = 10; public static final int MenuItem_android_checkable = 11; public static final int MenuItem_android_onClick = 12; public static final int MenuItem_actionLayout = 13; public static final int MenuItem_actionProviderClass = 14; public static final int MenuItem_actionViewClass = 15; public static final int MenuItem_alphabeticModifiers = 16; public static final int MenuItem_contentDescription = 17; public static final int MenuItem_iconTint = 18; public static final int MenuItem_iconTintMode = 19; public static final int MenuItem_numericModifiers = 20; public static final int MenuItem_showAsAction = 21; public static final int MenuItem_tooltipText = 22; public static final int[] MenuView = { 0x10100ae, 0x101012c, 0x101012d, 0x101012e, 0x101012f, 0x1010130, 0x1010131, 0x7f0301bf, 0x7f030212 }; public static final int MenuView_android_windowAnimationStyle = 0; public static final int MenuView_android_itemTextAppearance = 1; public static final int MenuView_android_horizontalDivider = 2; public static final int MenuView_android_verticalDivider = 3; public static final int MenuView_android_headerBackground = 4; public static final int MenuView_android_itemBackground = 5; public static final int MenuView_android_itemIconDisabledAlpha = 6; public static final int MenuView_preserveIconSpacing = 7; public static final int MenuView_subMenuArrow = 8; public static final int[] PopupWindow = { 0x1010176, 0x10102c9, 0x7f0301ab }; public static final int PopupWindow_android_popupBackground = 0; public static final int PopupWindow_android_popupAnimationStyle = 1; public static final int PopupWindow_overlapAnchor = 2; public static final int[] PopupWindowBackgroundState = { 0x7f030207 }; public static final int PopupWindowBackgroundState_state_above_anchor = 0; public static final int[] RecycleListView = { 0x7f0301ad, 0x7f0301b0 }; public static final int RecycleListView_paddingBottomNoButtons = 0; public static final int RecycleListView_paddingTopNoTitle = 1; public static final int[] SearchView = { 0x10100da, 0x101011f, 0x1010220, 0x1010264, 0x7f030092, 0x7f0300b4, 0x7f0300da, 0x7f03012d, 0x7f030146, 0x7f030168, 0x7f0301c7, 0x7f0301c8, 0x7f0301e5, 0x7f0301e6, 0x7f030213, 0x7f030218, 0x7f030278 }; public static final int SearchView_android_focusable = 0; public static final int SearchView_android_maxWidth = 1; public static final int SearchView_android_inputType = 2; public static final int SearchView_android_imeOptions = 3; public static final int SearchView_closeIcon = 4; public static final int SearchView_commitIcon = 5; public static final int SearchView_defaultQueryHint = 6; public static final int SearchView_goIcon = 7; public static final int SearchView_iconifiedByDefault = 8; public static final int SearchView_layout = 9; public static final int SearchView_queryBackground = 10; public static final int SearchView_queryHint = 11; public static final int SearchView_searchHintIcon = 12; public static final int SearchView_searchIcon = 13; public static final int SearchView_submitBackground = 14; public static final int SearchView_suggestionRowLayout = 15; public static final int SearchView_voiceIcon = 16; public static final int[] SimpleDraweeView = { 0x7f030023, 0x7f030024, 0x7f030025, 0x7f030039, 0x7f030116, 0x7f030117, 0x7f030118, 0x7f0301ac, 0x7f0301b9, 0x7f0301ba, 0x7f0301c0, 0x7f0301c2, 0x7f0301c3, 0x7f0301c4, 0x7f0301cf, 0x7f0301d0, 0x7f0301d3, 0x7f0301d4, 0x7f0301d5, 0x7f0301d6, 0x7f0301d7, 0x7f0301d8, 0x7f0301d9, 0x7f0301da, 0x7f0301db, 0x7f0301dc, 0x7f0301dd, 0x7f0301de, 0x7f0301df, 0x7f0301e0, 0x7f030276 }; public static final int SimpleDraweeView_actualImageResource = 0; public static final int SimpleDraweeView_actualImageScaleType = 1; public static final int SimpleDraweeView_actualImageUri = 2; public static final int SimpleDraweeView_backgroundImage = 3; public static final int SimpleDraweeView_fadeDuration = 4; public static final int SimpleDraweeView_failureImage = 5; public static final int SimpleDraweeView_failureImageScaleType = 6; public static final int SimpleDraweeView_overlayImage = 7; public static final int SimpleDraweeView_placeholderImage = 8; public static final int SimpleDraweeView_placeholderImageScaleType = 9; public static final int SimpleDraweeView_pressedStateOverlayImage = 10; public static final int SimpleDraweeView_progressBarAutoRotateInterval = 11; public static final int SimpleDraweeView_progressBarImage = 12; public static final int SimpleDraweeView_progressBarImageScaleType = 13; public static final int SimpleDraweeView_retryImage = 14; public static final int SimpleDraweeView_retryImageScaleType = 15; public static final int SimpleDraweeView_roundAsCircle = 16; public static final int SimpleDraweeView_roundBottomEnd = 17; public static final int SimpleDraweeView_roundBottomLeft = 18; public static final int SimpleDraweeView_roundBottomRight = 19; public static final int SimpleDraweeView_roundBottomStart = 20; public static final int SimpleDraweeView_roundTopEnd = 21; public static final int SimpleDraweeView_roundTopLeft = 22; public static final int SimpleDraweeView_roundTopRight = 23; public static final int SimpleDraweeView_roundTopStart = 24; public static final int SimpleDraweeView_roundWithOverlayColor = 25; public static final int SimpleDraweeView_roundedCornerRadius = 26; public static final int SimpleDraweeView_roundingBorderColor = 27; public static final int SimpleDraweeView_roundingBorderPadding = 28; public static final int SimpleDraweeView_roundingBorderWidth = 29; public static final int SimpleDraweeView_viewAspectRatio = 30; public static final int[] Spinner = { 0x10100b2, 0x1010176, 0x101017b, 0x1010262, 0x7f0301bd }; public static final int Spinner_android_entries = 0; public static final int Spinner_android_popupBackground = 1; public static final int Spinner_android_prompt = 2; public static final int Spinner_android_dropDownWidth = 3; public static final int Spinner_popupTheme = 4; public static final int[] StateListDrawable = { 0x101011c, 0x1010194, 0x1010195, 0x1010196, 0x101030c, 0x101030d }; public static final int StateListDrawable_android_dither = 0; public static final int StateListDrawable_android_visible = 1; public static final int StateListDrawable_android_variablePadding = 2; public static final int StateListDrawable_android_constantSize = 3; public static final int StateListDrawable_android_enterFadeDuration = 4; public static final int StateListDrawable_android_exitFadeDuration = 5; public static final int[] StateListDrawableItem = { 0x1010199 }; public static final int StateListDrawableItem_android_drawable = 0; public static final int[] SwitchCompat = { 0x1010124, 0x1010125, 0x1010142, 0x7f0301f3, 0x7f0301ff, 0x7f030219, 0x7f03021a, 0x7f03021c, 0x7f030257, 0x7f030258, 0x7f030259, 0x7f030270, 0x7f030271, 0x7f030272 }; public static final int SwitchCompat_android_textOn = 0; public static final int SwitchCompat_android_textOff = 1; public static final int SwitchCompat_android_thumb = 2; public static final int SwitchCompat_showText = 3; public static final int SwitchCompat_splitTrack = 4; public static final int SwitchCompat_switchMinWidth = 5; public static final int SwitchCompat_switchPadding = 6; public static final int SwitchCompat_switchTextAppearance = 7; public static final int SwitchCompat_thumbTextPadding = 8; public static final int SwitchCompat_thumbTint = 9; public static final int SwitchCompat_thumbTintMode = 10; public static final int SwitchCompat_track = 11; public static final int SwitchCompat_trackTint = 12; public static final int SwitchCompat_trackTintMode = 13; public static final int[] TextAppearance = { 0x1010095, 0x1010096, 0x1010097, 0x1010098, 0x101009a, 0x101009b, 0x1010161, 0x1010162, 0x1010163, 0x1010164, 0x10103ac, 0x1010585, 0x7f030121, 0x7f030129, 0x7f030237, 0x7f030252 }; public static final int TextAppearance_android_textSize = 0; public static final int TextAppearance_android_typeface = 1; public static final int TextAppearance_android_textStyle = 2; public static final int TextAppearance_android_textColor = 3; public static final int TextAppearance_android_textColorHint = 4; public static final int TextAppearance_android_textColorLink = 5; public static final int TextAppearance_android_shadowColor = 6; public static final int TextAppearance_android_shadowDx = 7; public static final int TextAppearance_android_shadowDy = 8; public static final int TextAppearance_android_shadowRadius = 9; public static final int TextAppearance_android_fontFamily = 10; public static final int TextAppearance_android_textFontWeight = 11; public static final int TextAppearance_fontFamily = 12; public static final int TextAppearance_fontVariationSettings = 13; public static final int TextAppearance_textAllCaps = 14; public static final int TextAppearance_textLocale = 15; public static final int[] Toolbar = { 0x10100af, 0x1010140, 0x7f030067, 0x7f03009a, 0x7f03009b, 0x7f0300b6, 0x7f0300b7, 0x7f0300b8, 0x7f0300b9, 0x7f0300ba, 0x7f0300bb, 0x7f030187, 0x7f030188, 0x7f03019e, 0x7f0301a2, 0x7f0301a5, 0x7f0301a6, 0x7f0301bd, 0x7f030214, 0x7f030215, 0x7f030216, 0x7f03025f, 0x7f030261, 0x7f030262, 0x7f030263, 0x7f030264, 0x7f030265, 0x7f030266, 0x7f030267, 0x7f030268 }; public static final int Toolbar_android_gravity = 0; public static final int Toolbar_android_minHeight = 1; public static final int Toolbar_buttonGravity = 2; public static final int Toolbar_collapseContentDescription = 3; public static final int Toolbar_collapseIcon = 4; public static final int Toolbar_contentInsetEnd = 5; public static final int Toolbar_contentInsetEndWithActions = 6; public static final int Toolbar_contentInsetLeft = 7; public static final int Toolbar_contentInsetRight = 8; public static final int Toolbar_contentInsetStart = 9; public static final int Toolbar_contentInsetStartWithNavigation = 10; public static final int Toolbar_logo = 11; public static final int Toolbar_logoDescription = 12; public static final int Toolbar_maxButtonHeight = 13; public static final int Toolbar_menu = 14; public static final int Toolbar_navigationContentDescription = 15; public static final int Toolbar_navigationIcon = 16; public static final int Toolbar_popupTheme = 17; public static final int Toolbar_subtitle = 18; public static final int Toolbar_subtitleTextAppearance = 19; public static final int Toolbar_subtitleTextColor = 20; public static final int Toolbar_title = 21; public static final int Toolbar_titleMargin = 22; public static final int Toolbar_titleMarginBottom = 23; public static final int Toolbar_titleMarginEnd = 24; public static final int Toolbar_titleMarginStart = 25; public static final int Toolbar_titleMarginTop = 26; public static final int Toolbar_titleMargins = 27; public static final int Toolbar_titleTextAppearance = 28; public static final int Toolbar_titleTextColor = 29; public static final int[] View = { 0x1010000, 0x10100da, 0x7f0301ae, 0x7f0301af, 0x7f030254 }; public static final int View_android_theme = 0; public static final int View_android_focusable = 1; public static final int View_paddingEnd = 2; public static final int View_paddingStart = 3; public static final int View_theme = 4; public static final int[] ViewBackgroundHelper = { 0x10100d4, 0x7f030041, 0x7f030042 }; public static final int ViewBackgroundHelper_android_background = 0; public static final int ViewBackgroundHelper_backgroundTint = 1; public static final int ViewBackgroundHelper_backgroundTintMode = 2; public static final int[] ViewStubCompat = { 0x10100d0, 0x10100f2, 0x10100f3 }; public static final int ViewStubCompat_android_id = 0; public static final int ViewStubCompat_android_layout = 1; public static final int ViewStubCompat_android_inflatedId = 2; } public static final class xml { private xml() {} public static final int rn_dev_preferences = 0x7f110000; } }
21b899cf61c244ffe6a159512d5946ed8ed60713
7e47326b2b14ea54bb3f0e11fb412ce88218dc15
/Algorithm/src/Lead2Offer/sort/HeapSortV2.java
4556f9e2b02e036baa8c4b4123754959ca430235
[]
no_license
AchillesYoung/re_learn
e321175db0afd2fdb1953ee270a0a8d3cf5d38f8
9fd4625a7d6aac5e4027db440a9c0fff5f95d80e
refs/heads/master
2023-02-19T19:13:13.234581
2021-01-23T09:23:34
2021-01-23T09:23:34
289,865,134
0
0
null
null
null
null
GB18030
Java
false
false
4,303
java
package Lead2Offer.sort; import java.util.Arrays; public class HeapSortV2 { /** * 构建大顶堆,然后后数组最后一位换位置 * 时间复杂度O (nlgn) * 就地排序?O(1) */ public int[] heap_sort(int[] unsorted_arry) { int size = unsorted_arry.length; if (unsorted_arry == null || size < 2) { return unsorted_arry; } //step1:先把原始数组构建第一次大顶堆,后续再交换重做 //循环遍历数组,把元素依次插入构造的大顶堆,向下构造 for (int i = 0; i < size; ++i) { heap_insert(unsorted_arry, i); } //step2:现在数组的头节点是最大,swap一下,数组变小再次构建,这次不是insert了,因为只是堆头变了 swap(unsorted_arry, 0, --size); while (size > 0) { //这里传的是size,不是end,索引要size-1 heapify(unsorted_arry, 0, size); //先赋值再-- swap(unsorted_arry, 0, --size); } return unsorted_arry; } /** * 来算树子节点索引 * index/2 = parent * index * 2 + 1 = leftChild, index * 2 + 2 = rightChild * 0-1-2-3-4-5-6 * // 0 * // 1 2 * //3 4 5 6 */ private void heap_insert(int[] arr, int index) { //第一次"数组构建堆过程"构建过程全是在加子节点,根据数组->树的对应索引,所以忽略该叶节点后续子节点 //所以这里只需和父节点比较,循环往上 while (arr[index] >= arr[(index - 1) >> 1]) { swap(arr, index, (index - 1) >> 1); //继续交换比较索引,这时候该父节点和爷节点比较 index = (index - 1) >> 1; } } /** * heapify重构构造应该是往下递归的,(这时候顶元素已经是新的),现在拿新的往下递归 * 每次往下递归,都要对比小子树的三个节点, * 先计算左节点是否超出现在的虚拟数组长度(left<size)-->这里长度size要和索引区分开 * 如果超出虚拟数组长度size的 * 先拿左节点(子树节点计算index * 2 + 1) */ public void heapify(int[] arr, int index, int size) { /** * heapify重构构造应该是往下递归的,(这时候顶元素已经是新的),现在拿新的往下递归 * 每次往下递归,都要对比小子树的三个节点, * 先计算左节点是否超出现在的虚拟数组长度(left<size)-->这里长度size要和索引区分开 * 如果超出虚拟数组长度size的 * 先拿左节点(子树节点计算index * 2 + 1) */ int left = index * 2 + 1; //这里判断子节点索引 left <= size -1 while (left <= size - 1) { //两次比较拿到三个节点最大值索引 int largest = left + 1 <= size - 1 && arr[left + 1] > arr[left] ? left + 1 : left; //先对比二个子节点,拿到最大的节点的索引,再去和父节点index比较,最终拿到largest //这里拿到了子树里面最大的元素索引 largest = arr[largest] > arr[index] ? largest : index; //如果最大的就是index,结束循环,不然交换继续向下递归 if (largest == index) { break; } //这里子节点大了,要交换父节点,向下传递 swap(arr, largest, index); //继续向下,stack递归遍 // 这里没有左右子树的概念是因为哪个节点出来了换位就基于哪个节点继续向下遍历。直到叶节点 index = largest; //算下更新left去判断是否下次会越界 left = index * 2 + 1; } } private static void swap(int[] arr, int i, int j) { arr[i] ^= arr[j]; arr[j] ^= arr[i]; arr[i] ^= arr[j]; } public static void main(String[] args) { int [] arr = new int[]{6,5,1,2,4,3}; System.out.println(Arrays.toString(arr)); swap(arr, 1,2); System.out.println(); System.out.println(Arrays.toString(arr)); } }
5781617ae4cfdbf42906dbb2857a2c3922eec799
24acbcc7b5ad20d2cea61b2b2b8190befe7f5bce
/Blogs/src/algs/blog/multithread/array/MultiThreadDriver.java
294cfbd5b2d2e0dcf1b37485e8e1216fd7ae04a8
[ "MIT" ]
permissive
heineman/algorithms-nutshell-2ed
a08e2136fb3f9199e119a8aebca1be09a02b86f4
6bdaf7ee2878f69a2df00ae7a3274f5d43d24605
refs/heads/master
2022-09-04T20:53:52.422824
2021-12-29T02:34:44
2021-12-29T02:34:44
43,086,309
577
226
null
null
null
null
UTF-8
Java
false
false
6,419
java
package algs.blog.multithread.array; import algs.model.IPoint; import algs.model.array.IPivotIndex; import algs.model.array.LastSelector; import algs.model.array.RandomSelector; import algs.model.data.points.UniformGenerator; import algs.model.tests.common.TrialSuite; import algs.model.tests.common.TrialSuiteHelper; /** * Run multiple times through with different number of helper threads. * * @author George Heineman * @version 1.0, 6/1/09 */ public class MultiThreadDriver { /** Numbers in range 1 .. 16777216 */ static int BASE = 16777216; /** * Run a traditional quick sort implementation. * <p> * All incoming points are assumed to be drawn from the unit square. * * @param size size of array to construct * @param set record times using this suite set * @param pts generated points whose (x,y) vals are used in input set * @param selector which pivot index method to use. */ public static void runTrialNormal (int size, TrialSuite set, IPoint[]pts, IPivotIndex selector) { Integer[] ar = new Integer[size]; for (int i = 0, idx = 0; i < pts.length; i++) { ar[idx++] = (int) (pts[i].getX() * BASE); ar[idx++] = (int) (pts[i].getY() * BASE); } // default algs.model.array.QuickSort<Integer> qs = new algs.model.array.QuickSort<Integer>(ar); qs.setPivotMethod(selector); System.gc(); long start = System.currentTimeMillis(); qs.qsort(0,size-1); long end = System.currentTimeMillis(); set.addTrial(size, start, end); for (int i = 0; i < ar.length-1; i++) { assert (ar[i] <= ar[i+1]); } } /** * Run a quick sort implementation using a fixed single thread helper. * <p> * All incoming points are assumed to be drawn from the unit square. * * @param size size of array to construct * @param set record times using this suite set * @param pts generated points whose (x,y) vals are used in input set * @param selector which pivot index method to use. * @param ratio ratio for setting threshold */ public static void runTrialOneHelper (int size, TrialSuite set, IPoint[]pts, IPivotIndex selector, int ratio) { Integer[] ar = new Integer[size]; for (int i = 0, idx = 0; i < pts.length; i++) { ar[idx++] = (int) (pts[i].getX() * BASE); ar[idx++] = (int) (pts[i].getY() * BASE); } // use fixed one-thread helper QuickSortOneHelper<Integer> qs = new QuickSortOneHelper<Integer>(ar); qs.setThresholdRatio(ratio); qs.setPivotMethod(selector); System.gc(); long start = System.currentTimeMillis(); qs.qsort(0,size-1); long end = System.currentTimeMillis(); set.addTrial(size, start, end); for (int i = 0; i < ar.length-1; i++) { assert (ar[i] <= ar[i+1]); } } /** * Change the number of helper threads inside to try different configurations. * <p> * Set to NUM_THREADS by default. * * @param size size of array to construct * @param set record times using this suite set * @param pts generated points whose (x,y) vals are used in input set * @param selector which pivot index method to use. * @param ratio ratio to use for threshold * @param numThread number of threads to use */ public static void runTrialParallel (int size, TrialSuite set, IPoint[]pts, IPivotIndex selector, int ratio, int numThread) { Integer[] ar = new Integer[size]; for (int i = 0, idx = 0; i < pts.length; i++) { ar[idx++] = (int) (pts[i].getX() * BASE); ar[idx++] = (int) (pts[i].getY() * BASE); } // default QuickSort<Integer> qs = new QuickSort<Integer>(ar); qs.setPivotMethod(selector); qs.setNumberHelperThreads(numThread); qs.setThresholdRatio(ratio); System.gc(); long start = System.currentTimeMillis(); qs.qsort(0,size-1); long end = System.currentTimeMillis(); set.addTrial(size, start, end); for (int i = 0; i < ar.length-1; i++) { assert (ar[i] <= ar[i+1]); } } /** * Actual driver which generates a bunch of tables. Interesting to * compare selectors of ('first' and 'random') especially with multiple * threads. It turns out that the cost of using a random-number computation * is noticeable. */ public static void main (String[] args) { int MAX_R = 21; int NUM_TRIALS = 20; UniformGenerator ug = new UniformGenerator(); TrialSuite last = new TrialSuite(); TrialSuite random = new TrialSuite(); TrialSuite[] lastMT = new TrialSuite[MAX_R]; TrialSuite[] randomMT = new TrialSuite[MAX_R]; for (int r = 0; r < MAX_R; r++) { lastMT[r] = new TrialSuite(); randomMT[r] = new TrialSuite(); } // Number of trials over sizes from 65536 to 1048576 for (int nt = 1; nt < 10; nt++) { System.out.println("num thread=" + nt); for (int size = 65536; size <= 1048576; size *= 2) { System.out.println (size + "..."); for (int t = 0; t < NUM_TRIALS; t++) { // create random arrays of given SIZE with range [0 .. 32768] IPoint[]pts = ug.generate(size/2); // 500 points = 1000 random [0,1] values // only run first time if (nt == 1) { runTrialNormal (size, last, pts, new LastSelector()); runTrialNormal (size, random, pts, new RandomSelector()); } for (int r = 0; r < MAX_R; r++) { int ratio = r+1; if (r == MAX_R-1) { ratio = Integer.MAX_VALUE; } runTrialParallel (size, lastMT[r], pts, new LastSelector(), ratio, nt); runTrialParallel (size, randomMT[r], pts, new RandomSelector(), ratio, nt); } } } if (nt == 1) { // last one always System.out.println ("LAST"); System.out.println (last.computeTable()); // random one always System.out.println ("RANDOM"); System.out.println (random.computeTable()); } // concatenate all together. String lastT = TrialSuiteHelper.combine(lastMT); String randomT = TrialSuiteHelper.combine(randomMT); System.out.println("LAST-ONE-HELPER(r)"); System.out.println(lastT); System.out.println("RANDOM-ONE-HELPER(r)"); System.out.println(randomT); } } }
7b589a5dcacd48b30124107152ce5164b60ffb26
ba252c8563cdc726a4dcfc2e6fa614b07d8a9d51
/flaptor-util/com/flaptor/util/apis/GoogleGeo.java
bfc2bde8d14a875a4f35fe0d4244795824efc317
[ "Apache-2.0" ]
permissive
ramiyer/indextank-service
d5f535820bb1ece696fbbd72af571c10376c4af4
e71329dbeffbb5c0c3735f64e98da98dcd747e51
refs/heads/master
2021-01-18T07:22:28.416088
2014-05-18T03:08:41
2014-05-18T03:08:41
3,032,084
0
0
null
null
null
null
UTF-8
Java
false
false
493
java
package com.flaptor.util.apis; /** * Interface for Geocoding queries * * @author Martin Massera */ public interface GoogleGeo { /** * get from cache or google api the geographic information * * blocking wait to enforce the request limit * @param place * @return */ public Geocode getGeocode(String place); /** * retrieve the geocode only if it doesnt have to sleep */ public Geocode getGeocodeNoDelay(String place); }
9b478457649ff8301db43ffe64100839511f35b0
9c0a5b81ee94366fe3e4c81e7d9dd93bff41c14e
/app/src/main/java/com/sung/noel/demo_keyboard/util/TextToSpeechUtil.java
a18e514c373c1a55f18111c5f56823d8ef8c5e28
[]
no_license
noel77543/Demo_keyboard
a90a9db58ef6ee69ffe7cf8621c0aab15118b962
e8ad7942512156f6789b215106fcecb332d66542
refs/heads/master
2020-04-06T12:54:11.139515
2018-11-14T07:25:45
2018-11-14T07:25:45
157,475,411
2
0
null
null
null
null
UTF-8
Java
false
false
1,789
java
package com.sung.noel.demo_keyboard.util; import android.content.Context; import android.speech.tts.TextToSpeech; import android.widget.Toast; import com.sung.noel.demo_keyboard.R; import java.util.Locale; public class TextToSpeechUtil implements TextToSpeech.OnInitListener { private TextToSpeech textToSpeech; private Context context; //音調 private final float PITCH = 1.0f; //語速 private final float RATE = 1.3f; public TextToSpeechUtil(Context context) { this.context = context; textToSpeech = new TextToSpeech(context, this); } //--------------- @Override public void onInit(int status) { if (status == TextToSpeech.SUCCESS) { int result = textToSpeech.setLanguage(Locale.TAIWAN); if (result == TextToSpeech.LANG_MISSING_DATA || result == TextToSpeech.LANG_NOT_SUPPORTED) { Toast.makeText(context, context.getString(R.string.toast_speech_error), Toast.LENGTH_SHORT).show(); } else { if (textToSpeech != null && !textToSpeech.isSpeaking()) { textToSpeech.setPitch(PITCH); textToSpeech.setSpeechRate(RATE); } } } } //----------------- /*** * 說話 * @param text */ public void speak(String text) { if (textToSpeech != null) { if (textToSpeech.isSpeaking()) { textToSpeech.stop(); } textToSpeech.speak(text, TextToSpeech.QUEUE_FLUSH, null); } } //----------------- /*** * 停止 */ public void shutDown() { if (textToSpeech != null) { textToSpeech.stop(); textToSpeech.shutdown(); } } }
91ad2e23a444994dab016f68fe1b0739f6a39e01
89085eceddd2d32e962eea67ccc1852f6c9e17db
/testdata/com/wordpress/login/LoginModule.java
6ee76fa3bbe470eb2c90be161665e1a4dfd23ef5
[]
no_license
locnguyent3108/30DAYSCHALLENGE
7195cead397cf8e4ab94e2042dd5e1f5a018d6aa
5e275092624d9b77222c93a3d1ba2df0a6d9909a
refs/heads/master
2023-05-12T11:07:00.313587
2020-07-23T10:21:05
2020-07-23T10:21:05
279,071,457
0
0
null
2023-05-09T18:51:37
2020-07-12T13:36:04
Java
UTF-8
Java
false
false
59
java
package com.wordpress.login; public class LoginModule { }
d627b81a10c29b305d70dc6e1d4a111e7098ed1e
926b938969fcf7ac3235583f49712158a1b12f7b
/tlum_groupware_e/src/main/java/com/tlum/service/EmployeeService.java
78c5cddf3bdbab15edd6099eb85942625641cfeb
[]
no_license
EomSuengHyeun/tlum_groupware_e
d8cce6d7d674c97a71836aeb27b0673adee0207d
3c8b524e1bc026f5f2e1085d33344bd44188f43f
refs/heads/master
2020-03-18T02:37:57.148670
2018-05-21T00:57:43
2018-05-21T00:57:43
134,199,630
0
0
null
null
null
null
UTF-8
Java
false
false
818
java
package com.tlum.service; import java.util.List; import com.tlum.dto.EmployeeVO; import com.tlum.dto.SearchCriteria; public interface EmployeeService { public List<EmployeeVO> selectEmployeeList()throws Exception; public EmployeeVO selectEmployeeById(String emp_id)throws Exception; public void insertEmployee(EmployeeVO employee)throws Exception; public void updateEmployee(EmployeeVO employee)throws Exception; public void deleteEmployee(String emp_id)throws Exception; public void insertEmployeePic(EmployeeVO employee)throws Exception; public List<EmployeeVO> selectEmployeeListByDepNo(String dep_no)throws Exception; public boolean empLoginChk(EmployeeVO employee)throws Exception; public List<EmployeeVO> selectSearchEmploy(SearchCriteria cri) throws Exception; }
[ "djatm@LAPTOP-N4RNINRI" ]
djatm@LAPTOP-N4RNINRI
2436cab8f8586131dde875556bbc6fe2c7b315ca
f9b2f91b49abac0ab6bf8926d3637944799915a7
/src/main/java/com.optimist.pokerstats.pokertracker/account/event/AccountPositionPlayerIdChanged.java
4f10baa42a6679589085614589d54a635a0d79b5
[]
no_license
robertBrem/pokertracker-cassandra
1a54fd51bdb538f75fd567ca670a38110a2f0567
548e40f688f98798dfab082425a5fed42cfe8260
refs/heads/master
2020-04-06T06:59:09.700126
2016-08-21T13:31:04
2016-08-21T13:31:04
58,078,034
0
0
null
null
null
null
UTF-8
Java
false
false
331
java
package com.optimist.pokerstats.pokertracker.account.event; import lombok.Getter; @Getter public class AccountPositionPlayerIdChanged extends AccountPositionEvent { private final Long playerId; public AccountPositionPlayerIdChanged(Long id, Long playerId) { super(id); this.playerId = playerId; } }
bf3f6275bed38ccdf5873eb2c1bf8045da755ae8
55486e812e2449fe8bcc8c972b2e721a231083a0
/Assignments/QuyPV/FFSE1703/src/assignment/Sosanh.java
419479d6e76bdd1f513febf6372ba4d3078f7483
[]
no_license
FASTTRACKSE/FFSE1703.JavaCore
15bdcfe15fbdf7fbc94a99c11f58b940149f0b01
14ba6725f3424724cf5ac20c57321162ae9ddd0a
refs/heads/master
2021-07-11T20:33:02.506208
2018-12-28T01:06:07
2018-12-28T01:06:07
125,818,158
4
1
null
null
null
null
UTF-8
Java
false
false
1,040
java
package assignment; import java.util.Scanner; public class Sosanh { public static void main(String[] args) { Scanner myInput = new Scanner(System.in); int a, b, c, d; System.out.print("Nhập Vào số thứ 1: "); a = myInput.nextInt(); System.out.print("Nhập Vào số thứ 2: "); b = myInput.nextInt(); System.out.print("Nhập Vào số thứ 3: "); c = myInput.nextInt(); // TÌM SỐ LỚN NHẤT if (a > b && a > c) { System.out.println("Số lớn nhất là: " + a); } else if (b > a && b > c) { System.out.println("Số lớn nhất là: " + b); } else { System.out.println("Số lớn nhất là: " + c); } // TÌM SỐ NHỎ NHẤT if (a < b && a < c) { System.out.println("Số nhỏ nhất là: " + a); } else if (b < a && b < c) { System.out.println("Số nhỏ nhất là: " + b); } else { System.out.println("Số nhỏ nhất là: " + c); } // x = Math.max(a, b); // y = Math.max(x, c); } }
e31f1f1ac920aab0d5495f862290321ade5add7e
d9d959f661f934c3c93d3ffd0297ebe277f7bb7b
/app/src/main/java/vip/okfood/opendd/AccServiceQQ.java
438db2ba82602c5e44f9ac918e0cc16bd524b575
[]
no_license
Leo0618/OpenDD
931a8f8aec68b9f69d7961f89d52e85733cf7f0a
b2fdddaccc9b1b41e027b86882b2bb1bcface4ca
refs/heads/master
2020-12-02T04:59:33.161348
2020-01-03T02:45:09
2020-01-03T02:45:09
230,897,092
0
0
null
null
null
null
UTF-8
Java
false
false
1,260
java
package vip.okfood.opendd; import android.accessibilityservice.AccessibilityService; import android.view.accessibility.AccessibilityEvent; import java.util.List; /** * function:AccServiceQQ * * <p></p> * Created by lzj on 2019/3/18. */ public class AccServiceQQ extends AccessibilityService { private static final String TAG = "AccServiceQQ"; @Override public void onInterrupt() { LogUtil.i(TAG, "onInterrupt"); } @Override protected void onServiceConnected() { LogUtil.i(TAG, "onServiceConnected");} @Override public void onAccessibilityEvent(AccessibilityEvent event) { int eventType = event.getEventType(); if(!SPUtil.isNotification()) { return; } if(eventType == AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED) { LogUtil.v(event.toString()); List<CharSequence> texts = event.getText(); if(texts == null || texts.isEmpty()) return; for(CharSequence text : texts) { if(text.toString().contains("嘀嘀")) { LogUtil.i("收到消息,执行动作"); RunTask.instance().launch(); break; } } } } }
ae3d7d67a2e70251c627d4ae06d90fe88d1d78af
96e93f497b336001e2447f7564c4b146a74c5893
/src/main/java/com/niall/connect3/MainActivity.java
9f92a890dbcde0c83d779ee2f810f289cb2a1076
[]
no_license
Dhruvjain2000/Tic-Tac-Toe-Android
654ddad076fa6cce741369c7528c31e338fbd78b
c6fba72d69d24ddddfbd10ee7708211047b952f4
refs/heads/master
2021-04-29T16:58:59.873230
2018-02-15T17:39:42
2018-02-15T17:39:42
121,659,623
0
0
null
null
null
null
UTF-8
Java
false
false
4,054
java
package com.niall.connect3; import android.graphics.Color; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.GridLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; public class MainActivity extends AppCompatActivity { private static final float TRANSLATE_AMOUNT = 1000f; private Game game; private LinearLayout playAgainLayout; private TextView scoreText; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); game = new Game(); playAgainLayout = (LinearLayout) findViewById((R.id.playAgainLayout)); playAgainLayout.setVisibility(LinearLayout.GONE); scoreText = (TextView) findViewById(R.id.scoreText); scoreText.setText(game.getScoreDisplayText()); } public void placeCounter(View view) { int counterPosition = Integer.parseInt(view.getTag().toString()); if (game.isSelectedSpaceAvailable(counterPosition)) { game.placeCounter(counterPosition); animatePlayersCounter(view); if (game.isBoardFilled()) { ((TextView)findViewById(R.id.playAgainText)) .setText("Game ends a draw! Play again?"); playAgainLayout.setBackgroundColor(Color.LTGRAY); playAgainLayout.setVisibility(LinearLayout.VISIBLE); return; } else if (game.isWinner()) { ((TextView)findViewById(R.id.playAgainText)) .setText(game.getCurrentPlayer().getName() + " is the winner!"); switch (game.getCurrentCounterColour()) { case RED: playAgainLayout.setBackgroundColor(Color.RED); break; case YELLOW: playAgainLayout.setBackgroundColor(Color.YELLOW); } game.increaseCurrentPlayersScore(); scoreText.setText(game.getScoreDisplayText()); playAgainLayout.setVisibility(LinearLayout.VISIBLE); return; } game.switchCurrentPlayer(); } else { makeLongToast("Space taken"); } } private void animatePlayersCounter(View view) { ImageView counter = (ImageView) view; setCounterImageColourBasedOnCurrentPlayer(counter); counter.setTranslationY(TRANSLATE_AMOUNT * -1f); counter.setAlpha(1f); counter.animate().translationYBy(TRANSLATE_AMOUNT).rotationBy(360f).setDuration(500); } private void setCounterImageColourBasedOnCurrentPlayer(ImageView counter) { switch (game.getCurrentCounterColour()) { case RED: counter.setImageResource(R.drawable.red); break; case YELLOW: counter.setImageResource(R.drawable.yellow); } } public void playAgainButtonClick(View view) { game.reset(); resetCounterImages(); playAgainLayout.setVisibility(LinearLayout.GONE); } private void resetCounterImages() { GridLayout gridLayout = (GridLayout) findViewById(R.id.gridLayout); for (int i = 0; i < gridLayout.getChildCount(); i++) { ImageView counterView = (ImageView) gridLayout.getChildAt(i); counterView.setAlpha(0f); } } private void makeLongToast(String message) { makeToast(message, Toast.LENGTH_LONG); } private void makeShortToast(String message) { makeToast(message, Toast.LENGTH_SHORT); } private void makeToast(String message, int toastLength) { Toast.makeText(getApplicationContext(), message, toastLength).show(); } }
6e436d20c14aa26bfb7b1f3b5a836261c48991e4
20bfd34a7f09565bda4c6490799d71c26a22d974
/common-lib/src/main/java/com/codekutter/common/GlobalConstants.java
89b0ac1828d2ce5cbbcd730f94e683daada640de
[ "Apache-2.0" ]
permissive
subhagho/codekutter
e0dba77d8ddb9e41bff79ab01ea0e018614cbf31
0715300a7c953d4c02bb386d58a2fcc9789d6508
refs/heads/master
2023-08-07T20:19:22.910659
2021-07-06T06:01:16
2021-07-06T06:01:16
224,968,407
3
3
Apache-2.0
2023-08-24T20:27:42
2019-11-30T06:12:54
Java
UTF-8
Java
false
false
4,831
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. * * Copyright (c) $year * Date: 1/1/19 9:06 PM * Subho Ghosh (subho dot ghosh at outlook.com) * */ package com.codekutter.common; import com.codekutter.common.utils.LogUtils; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.joda.JodaModule; import org.elasticsearch.common.Strings; import javax.annotation.Nonnull; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; /** * Class defines static global constants. */ public class GlobalConstants { /** * Default Joda date format to parse/print dates. */ public static final String DEFAULT_JODA_DATE_FORMAT = "M.d.y"; /** * Default Joda data/time format to parse/print date/time. */ public static final String DEFAULT_JODA_DATETIME_FORMAT = String.format("%s H:m:s", DEFAULT_JODA_DATE_FORMAT); /** * Default Joda date format to parse/print dates. */ public static final String DEFAULT_DATE_FORMAT = "MM.dd.yyyy"; /** * Default Joda data/time format to parse/print date/time. */ public static final String DEFAULT_DATETIME_FORMAT = String.format("%s HH:mm:ss", DEFAULT_DATE_FORMAT); /** * ConfigParam name for passing a configuration node. */ public static final String DEFAULT_CONFIG_PARAM_NAME = "config"; /** * URI Scheme constant for file. */ public static final String URI_SCHEME_FILE = "file"; /** * URI Scheme constant for HTTP. */ public static final String URI_SCHEME_HTTP = "http"; /** * URI Scheme constant for HTTPS. */ public static final String URI_SCHEME_HTTPS = "https"; /** * URI Scheme constant for FTP. */ public static final String URI_SCHEME_FTP = "ftp"; /** * URI Scheme constant for SFTP. */ public static final String URI_SCHEME_SFTP = "sftp"; private static String OS = System.getProperty("os.name").toLowerCase(); private static Charset charset = StandardCharsets.UTF_8; /** * Is this a windows OS? * * @return - Windows OS? */ public static boolean isWindows() { return (OS.contains("win")); } /** * Is this a Mac OS? * * @return - Mac OS? */ public static boolean isMac() { return (OS.contains("mac")); } /** * Is this a *NIX OS? * * @return - (U)NIX OS? */ public static boolean isUnix() { return (OS.contains("nix") || OS.contains("nux") || OS.indexOf("aix") > 0); } /** * Is this a Solaris OS? * * @return - Solaris OS? */ public static boolean isSolaris() { return (OS.contains("sunos")); } /** * Get a new instance of the JSON Object mapper. * * @return - JSON Object mapper. */ public static ObjectMapper getJsonMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.registerModule(new JodaModule()); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.INDENT_OUTPUT); return mapper; } public static String quote(@Nonnull String value) { return String.format("\"%s\"", value); } public static Charset defaultCharset() { return charset; } public static void defaultCharset(@Nonnull String value) { if (!Strings.isNullOrEmpty(value)) { charset = Charset.forName(value); } } public static void defaultCharset(@Nonnull Charset value) { if (value != null) { charset = value; } } static { charset = Charset.defaultCharset(); String cs = System.getProperty("file.encoding"); if (!Strings.isNullOrEmpty(cs)) { charset = Charset.forName(cs); } System.out.println(String.format("Using default charset. [charset=%s]", charset.displayName())); } }
2f91d00aea78d070276fdfa69b37cf1d6d96c33c
5a225eec2f13bd66df75a927ca3d7701f34d8240
/CMP464/chatProgram/src/utils/Interface/FCTA.java
55ed6cacd31f193def11ab9decf8ce769d515c43
[]
no_license
EnjoyWorkTrue/Spring2014
d0dece545039ab8011b476a75e474de745d171d1
1b368f7d8eff12d633fee7bc8519eb565e290816
refs/heads/master
2021-01-23T12:45:40.390026
2014-05-28T20:03:34
2014-05-28T20:03:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
222
java
package utils.Interface; public interface FCTA { public void appendMessage(String message); public void setNicknameList(String readUTF); public void addClient(String name); public void deleteUser(String user); }
33f6e7bd14bb62ddc9eb92a447f8b4b311a4a4c4
df730f8905a7296e5a19eea30a325cdbf8299310
/ai2331/common_base/src/main/java/com/ai2331/common/cache/impl/RedisCacheService.java
dc9b264f555335b9a81a4ec6945da6d1d5b519dd
[]
no_license
jyxs/springboot
b1013ee0f7e11b14ca6149db3f2e319a8867652e
ad72fac618687945e8e7fa5701b4b971b6041d64
refs/heads/master
2023-06-24T09:11:04.174841
2020-11-04T14:25:15
2020-11-04T14:25:15
219,902,418
2
0
null
2023-06-14T22:31:00
2019-11-06T03:16:29
JavaScript
UTF-8
Java
false
false
13,966
java
package com.ai2331.common.cache.impl; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.RandomUtils; import org.springframework.data.redis.core.BoundListOperations; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.util.CollectionUtils; public class RedisCacheService extends AbstractCacheService { /** * */ private static final long serialVersionUID = -8514808951223948514L; private RedisTemplate<String, Object> redisTemplate; @Override public void set(Object k, Object v, int ttl) { if (ObjectUtils.isNotEmpty(k)) { redisTemplate.opsForValue().set(k.toString(), v); if (ttl == 0) { redisTemplate.expire(k.toString(), randomInt(), TimeUnit.SECONDS);// 过期时间如果为0,则随机10~30分钟 } else if (ttl > 0) { redisTemplate.expire(k.toString(), ttl, TimeUnit.SECONDS); } // 如果小于0,则为永久缓存 } } @Override public Object get(Object k) { if (ObjectUtils.isNotEmpty(k)) { return redisTemplate.opsForValue().get(k); } return null; } @Override public void remove(Object k) { if (ObjectUtils.isNotEmpty(k)) { redisTemplate.delete(k.toString()); } } @SuppressWarnings("unchecked") public void remove(Object... k) { if (ObjectUtils.isNotEmpty(k) && k.length > 0) { redisTemplate.delete(CollectionUtils.arrayToList(k)); } } @Override public void init() { } @Override public void exit() { } /** * 指定缓存失效时间 * * @param key 键 * @param time 时间(秒) * @return */ public boolean expire(String key, long time) { try { if (time > 0) { redisTemplate.expire(key, time, TimeUnit.SECONDS); } else if (time == 0) { redisTemplate.expire(key, randomInt(), TimeUnit.SECONDS); } return true; } catch (Exception e) { e.printStackTrace(); return false; } } /** * 根据key 获取过期时间 * * @param key 键 不能为null * @return 时间(秒) 返回0代表为永久有效 */ public long getExpire(String key) { return redisTemplate.getExpire(key, TimeUnit.SECONDS); } /** * 判断key是否存在 * * @param key 键 * @return true 存在 false不存在 */ public boolean hasKey(String key) { try { return redisTemplate.hasKey(key); } catch (Exception e) { e.printStackTrace(); return false; } } /** * 递增 * * @param key 键 * @param delta 要增加几(大于0) * @return */ public long incr(String key, long delta) { if (delta <= 0) { throw new RuntimeException("递增因子必须大于0"); } return redisTemplate.opsForValue().increment(key, delta); } /** * 递减 * * @param key 键 * @param delta 要减少几(小于0) * @return */ public long decr(String key, long delta) { if (delta <= 0) { throw new RuntimeException("递减因子必须大于0"); } return redisTemplate.opsForValue().increment(key, -delta); } // ================================Map================================= /** * HashGet * * @param key 键 不能为null * @param item 项 不能为null * @return 值 */ public Object hget(String key, String item) { return redisTemplate.opsForHash().get(key, item); } /** * 获取hashKey对应的所有键值 * * @param key 键 * @return 对应的多个键值 */ public Map<Object, Object> hmget(String key) { return redisTemplate.opsForHash().entries(key); } /** * HashSet * * @param key 键 * @param map 对应多个键值 * @return true 成功 false 失败 */ public boolean hmset(String key, Map<String, Object> map) { try { hmset(key, map, 0); return true; } catch (Exception e) { e.printStackTrace(); return false; } } /** * HashSet 并设置时间 * * @param key 键 * @param map 对应多个键值 * @param time 时间(秒) * @return true成功 false失败 */ public boolean hmset(String key, Map<String, Object> map, long time) { try { redisTemplate.opsForHash().putAll(key, map); expire(key, time); return true; } catch (Exception e) { e.printStackTrace(); return false; } } /** * 向一张hash表中放入数据,如果不存在将创建 * * @param key 键 * @param item 项 * @param value 值 * @return true 成功 false失败 */ public boolean hset(String key, String item, Object value) { try { hset(key, item, value, 0); return true; } catch (Exception e) { e.printStackTrace(); return false; } } /** * 向一张hash表中放入数据,如果不存在将创建 * * @param key 键 * @param item 项 * @param value 值 * @param time 时间(秒) 注意:如果已存在的hash表有时间,这里将会替换原有的时间 * @return true 成功 false失败 */ public boolean hset(String key, String item, Object value, long time) { try { redisTemplate.opsForHash().put(key, item, value); if (time > 0) { expire(key, time); } return true; } catch (Exception e) { e.printStackTrace(); return false; } } /** * 删除hash表中的值 * * @param key 键 不能为null * @param item 项 可以使多个 不能为null */ public void hdel(String key, Object... item) { redisTemplate.opsForHash().delete(key, item); } /** * 判断hash表中是否有该项的值 * * @param key 键 不能为null * @param item 项 不能为null * @return true 存在 false不存在 */ public boolean hHasKey(String key, String item) { return redisTemplate.opsForHash().hasKey(key, item); } /** * hash递增 如果不存在,就会创建一个 并把新增后的值返回 * * @param key 键 * @param item 项 * @param by 要增加几(大于0) * @return */ public double hincr(String key, String item, double by) { return redisTemplate.opsForHash().increment(key, item, by); } /** * hash递减 * * @param key 键 * @param item 项 * @param by 要减少记(小于0) * @return */ public double hdecr(String key, String item, double by) { return redisTemplate.opsForHash().increment(key, item, -by); } // ============================set============================= /** * 根据key获取Set中的所有值 * * @param key 键 * @return */ public Set<Object> sGet(String key) { try { return redisTemplate.opsForSet().members(key); } catch (Exception e) { e.printStackTrace(); return null; } } /** * 根据value从一个set中查询,是否存在 * * @param key 键 * @param value 值 * @return true 存在 false不存在 */ public boolean sHasKey(String key, Object value) { try { return redisTemplate.opsForSet().isMember(key, value); } catch (Exception e) { e.printStackTrace(); return false; } } /** * 将数据放入set缓存 * * @param key 键 * @param values 值 可以是多个 * @return 成功个数 */ public long sSet(String key, Object... values) { try { return sSetAndTime(key, 0, values); } catch (Exception e) { e.printStackTrace(); return 0; } } /** * 将set数据放入缓存 * * @param key 键 * @param time 时间(秒) * @param values 值 可以是多个 * @return 成功个数 */ public long sSetAndTime(String key, long time, Object... values) { try { Long count = redisTemplate.opsForSet().add(key, values); expire(key, time); return count; } catch (Exception e) { e.printStackTrace(); return 0; } } /** * 获取set缓存的长度 * * @param key 键 * @return */ public long sGetSetSize(String key) { try { return redisTemplate.opsForSet().size(key); } catch (Exception e) { e.printStackTrace(); return 0; } } /** * 移除值为value的 * * @param key 键 * @param values 值 可以是多个 * @return 移除的个数 */ public long setRemove(String key, Object... values) { try { Long count = redisTemplate.opsForSet().remove(key, values); return count; } catch (Exception e) { e.printStackTrace(); return 0; } } // ===============================list================================= /** * 获取list缓存的内容 * * @param key 键 * @param start 开始 * @param end 结束 0 到 -1代表所有值 * @return */ public List<Object> lGet(String key, long start, long end) { try { return redisTemplate.opsForList().range(key, start, end); } catch (Exception e) { e.printStackTrace(); return null; } } /** * 获取list缓存的长度 * * @param key 键 * @return */ public long lGetListSize(String key) { try { return redisTemplate.opsForList().size(key); } catch (Exception e) { e.printStackTrace(); return 0; } } /** * 通过索引 获取list中的值 * * @param key 键 * @param index 索引 index>=0时, 0 表头,1 第二个元素,依次类推;index<0时,-1,表尾,-2倒数第二个元素,依次类推 * @return */ public Object lGetIndex(String key, long index) { try { return redisTemplate.opsForList().index(key, index); } catch (Exception e) { e.printStackTrace(); return null; } } /** * 将list放入缓存 * * @param key 键 * @param value 值 * @return */ public boolean lSet(String key, Object value) { try { return lSet(key, value, 0); } catch (Exception e) { e.printStackTrace(); return false; } } /** * 将list放入缓存 * * @param key 键 * @param value 值 * @param time 时间(秒) * @return */ public boolean lSet(String key, Object value, long time) { try { redisTemplate.opsForList().rightPush(key, value); expire(key, time); return true; } catch (Exception e) { e.printStackTrace(); return false; } } /** * 将list放入缓存 * * @param key 键 * @param value 值 * @return */ public boolean lSet(String key, List<Object> value) { try { return lSet(key, value, 0); } catch (Exception e) { e.printStackTrace(); return false; } } /** * 将list放入缓存 * * @param key 键 * @param value 值 * @param time 时间(秒) * @return */ public boolean lSet(String key, List<Object> value, long time) { try { redisTemplate.opsForList().rightPushAll(key, value); expire(key, time); return true; } catch (Exception e) { e.printStackTrace(); return false; } } /** * 根据索引修改list中的某条数据 * * @param key 键 * @param index 索引 * @param value 值 * @return */ public boolean lUpdateIndex(String key, long index, Object value) { try { redisTemplate.opsForList().set(key, index, value); return true; } catch (Exception e) { e.printStackTrace(); return false; } } /** * 移除N个值为value * * @param key 键 * @param count 移除多少个 * @param value 值 * @return 移除的个数 */ public long lRemove(String key, long count, Object value) { try { Long remove = redisTemplate.opsForList().remove(key, count, value); return remove; } catch (Exception e) { e.printStackTrace(); return 0; } } // =========keys============ /** * 模糊查询获取key值 * * @param pattern * @return */ public Set<String> keys(String pattern) { return redisTemplate.keys(pattern); } // =========MQ============ /** * 使用Redis的消息队列 * * @param channel * @param message 消息内容 */ public void convertAndSend(String channel, Object message) { redisTemplate.convertAndSend(channel, message); } // =========BoundListOperations 用法 start============ /** * 将数据添加到Redis的list中(从右边添加) * * @param listKey * @param expireEnum 有效期的枚举类 * @param values 待添加的数据 */ public void addToListRight(String listKey, int ttl, Object... values) { // 绑定操作 BoundListOperations<String, Object> boundValueOperations = redisTemplate.boundListOps(listKey); // 插入数据 boundValueOperations.rightPushAll(values); // 设置过期时间 if (ttl == 0) { ttl = randomInt(); } else if (ttl > 0) { boundValueOperations.expire(ttl, TimeUnit.SECONDS); } } /** * 根据起始结束序号遍历Redis中的list * * @param listKey * @param start 起始序号 * @param end 结束序号 * @return */ public List<Object> rangeList(String listKey, long start, long end) { // 绑定操作 BoundListOperations<String, Object> boundValueOperations = redisTemplate.boundListOps(listKey); // 查询数据 return boundValueOperations.range(start, end); } /** * 弹出右边的值 --- 并且移除这个值 * * @param listKey */ public Object rifhtPop(String listKey) { // 绑定操作 BoundListOperations<String, Object> boundValueOperations = redisTemplate.boundListOps(listKey); return boundValueOperations.rightPop(); } /** * 生成随机数 * * @return */ private int randomInt() { return RandomUtils.nextInt(10 * 60, 30 * 60); } public RedisTemplate<String, Object> getRedisTemplate() { return redisTemplate; } public void setRedisTemplate(RedisTemplate<String, Object> redisTemplate) { this.redisTemplate = redisTemplate; } }
0b9515811875a556ae8d0d9e68171a825907b05e
18644800777f9b9cfcd1ccb9efc2fa7a8697dca8
/src/dobble/Carta.java
f37655821eb6a8aa6ab28cc7bd30e2ec3e666a8b
[]
no_license
carsanvel/Dobble
b87efbff1ee83220bd9cabc25a8e11d36b95dc94
80e771bcb4248125f6e64c6fb4cf00987b4af436
refs/heads/master
2023-05-04T13:26:57.889950
2021-05-25T19:41:27
2021-05-25T19:41:27
341,247,681
0
0
null
null
null
null
UTF-8
Java
false
false
384
java
package dobble; import java.io.Serializable; public class Carta implements Serializable{ private String directorio; public Carta(String directorio) { this.directorio = directorio; } public String getDirectorio() { return directorio; } public void setDirectorio(String directorio) { this.directorio = directorio; } }
7516700e4a2b02ee055313366cfbb5201753d13c
25a436417d2122691d769a0c7a96cbd916774b63
/src/cn/sxt/service/PermissionService.java
a3c4f3a60ea97433d42c36ed507038f2dbb6e3e4
[ "MIT" ]
permissive
Icyfighting/Car-Rental-Management-System
1501ec0cd59e8dae904e2a5fdca58fa1c7af88a1
0b68aea3fa7ae12dac62ddc11ceb131d3dd21055
refs/heads/master
2020-04-11T13:55:40.241062
2018-12-16T16:51:18
2018-12-16T16:51:18
161,830,510
0
0
null
null
null
null
UTF-8
Java
false
false
254
java
package cn.sxt.service; import java.util.List; import cn.sxt.pojo.Funs; import cn.sxt.pojo.Menus; public interface PermissionService { public List<Menus> getMenuByUserName(String userName); public List<Funs> getFunsByUserName(String userName); }
51fabde5a29be25510ea4c4168f49390db43022e
d4bc8939d38dedeca6b6f93e46580c3f8ee9b2a5
/StackMin.java
351920edbd818de9264b87d5e07723b73c4049ef
[]
no_license
pavi2004/Stacks-and-Queues
6413fb941593051fb2b85fe4cbbaa96f779d3f2d
e28853781721edc829ac2b04e11d20f125ccdaef
refs/heads/master
2021-01-05T21:33:29.516403
2020-02-24T05:19:01
2020-02-24T05:19:01
241,143,765
0
0
null
null
null
null
UTF-8
Java
false
false
1,487
java
import java.util.*; class MyStack { Stack<Integer> s; Integer minEle; MyStack() { s = new Stack<Integer>(); } void getMin() { if (s.isEmpty()) System.out.println("Stack is empty"); else System.out.println("Minimum Element in the " + " stack is: " + minEle); } void pop() { if (s.isEmpty()) { System.out.println("Stack is empty"); return; } System.out.print("Top Most Element Removed: "); Integer t = s.pop(); if (t < minEle) { System.out.println(minEle); minEle = 2*minEle - t; } else System.out.println(t); } void push(Integer x) { if (s.isEmpty()) { minEle = x; s.push(x); System.out.println("Number Inserted: " + x); return; } if (x < minEle) { s.push(2*x - minEle); minEle = x; } else s.push(x); System.out.println("Number Inserted: " + x); } }; public class StackMin { public static void main(String[] args) { Scanner sc=new Scanner(System.in); MyStack s = new MyStack(); System.out.println("1.push 2.pop 3.getmin 0.exit"); while(true) { System.out.println("Enter choice:"); Integer choice=sc.nextInt(); switch(choice) { case 1: System.out.println("Enter data:"); s.push(sc.nextInt()); break; case 2: s.pop(); break; case 3: s.getMin(); break; case 0: return; } } } }
1805aa6aae6aac84deeee0e8aa50d7a688157f83
fe755c562710dbe487c3197e11b2c6e91fbec9e3
/src/main/java/learningfiles/Collections.java
f032c24e8921aaaa44fd60d7e8d479876447a40c
[]
no_license
khurshedkadyrov/googleProject
2525534e0883f8e1215db02da60b0c5aa1819d58
1343c32437c92c6d9b357743a8019744db6a711e
refs/heads/master
2021-07-14T13:33:34.282903
2019-12-04T18:14:48
2019-12-04T18:14:48
216,406,449
3
0
null
2020-10-13T16:56:12
2019-10-20T18:16:36
Java
UTF-8
Java
false
false
444
java
package learningfiles; import java.util.ArrayList; import java.util.Collections; class MyClass1 { public static void main(String[ ] args) { ArrayList<String> animals = new ArrayList<String>(); animals.add("tiger"); animals.add("cat"); animals.add("snake"); animals.add("dog"); Collections.sort(animals); System.out.println(animals); } } /* Outputs: [cat, dog, snake, tiger] */
ff5a09c801670191360fa070ecdb9b3581969371
e20b9a1f40a130cbebbbfb018072eb2d07862478
/net/minecraft/server/ChatComponentUtils.java
941a6044641522bd37862ae54b2b13c2e00b9f07
[]
no_license
IServerPowered/mc-dev
d3aec5d09375e34264037a190285dbfbc95fc46a
14d88a9a6d9e4c9084d3037a0682a5c415832042
refs/heads/1.8.3
2021-01-17T17:49:54.651138
2015-03-09T22:35:39
2015-03-09T22:35:39
33,264,491
2
0
null
2015-04-01T18:19:08
2015-04-01T18:19:07
null
UTF-8
Java
false
false
2,765
java
package net.minecraft.server; import java.util.Iterator; import java.util.List; public class ChatComponentUtils { public static IChatBaseComponent filterForDisplay(ICommandListener icommandlistener, IChatBaseComponent ichatbasecomponent, Entity entity) throws CommandException { Object object = null; if (ichatbasecomponent instanceof ChatComponentScore) { ChatComponentScore chatcomponentscore = (ChatComponentScore) ichatbasecomponent; String s = chatcomponentscore.g(); if (PlayerSelector.isPattern(s)) { List list = PlayerSelector.getPlayers(icommandlistener, s, Entity.class); if (list.size() != 1) { throw new ExceptionEntityNotFound(); } s = ((Entity) list.get(0)).getName(); } object = entity != null && s.equals("*") ? new ChatComponentScore(entity.getName(), chatcomponentscore.h()) : new ChatComponentScore(s, chatcomponentscore.h()); ((ChatComponentScore) object).b(chatcomponentscore.getText()); } else if (ichatbasecomponent instanceof ChatComponentSelector) { String s1 = ((ChatComponentSelector) ichatbasecomponent).g(); object = PlayerSelector.getPlayerNames(icommandlistener, s1); if (object == null) { object = new ChatComponentText(""); } } else if (ichatbasecomponent instanceof ChatComponentText) { object = new ChatComponentText(((ChatComponentText) ichatbasecomponent).g()); } else { if (!(ichatbasecomponent instanceof ChatMessage)) { return ichatbasecomponent; } Object[] aobject = ((ChatMessage) ichatbasecomponent).j(); for (int i = 0; i < aobject.length; ++i) { Object object1 = aobject[i]; if (object1 instanceof IChatBaseComponent) { aobject[i] = filterForDisplay(icommandlistener, (IChatBaseComponent) object1, entity); } } object = new ChatMessage(((ChatMessage) ichatbasecomponent).i(), aobject); } ChatModifier chatmodifier = ichatbasecomponent.getChatModifier(); if (chatmodifier != null) { ((IChatBaseComponent) object).setChatModifier(chatmodifier.clone()); } Iterator iterator = ichatbasecomponent.a().iterator(); while (iterator.hasNext()) { IChatBaseComponent ichatbasecomponent1 = (IChatBaseComponent) iterator.next(); ((IChatBaseComponent) object).addSibling(filterForDisplay(icommandlistener, ichatbasecomponent1, entity)); } return (IChatBaseComponent) object; } }
e29b73ca1083950ca4858b14e983eba536a38b60
a04e8bedf2fb66fc9996cd631a46c8a86aa0c7f3
/app/src/main/java/com/example/dictionary/ui/login/LoggedInUserView.java
f99fb3de9443800da031168e781cb8b83c510258
[]
no_license
tuancode123/App-Tudienanhviet
8c8707480054aeeeeea9f4731b2cde83b22880da
40a60873c71afea0be8fd6da2da041891ab5c946
refs/heads/master
2022-11-29T01:10:18.714853
2020-08-05T15:42:38
2020-08-05T15:42:38
280,556,717
0
0
null
null
null
null
UTF-8
Java
false
false
380
java
package com.example.dictionary.ui.login; /** * Class exposing authenticated user details to the UI. */ class LoggedInUserView { private String displayName; //... other data fields that may be accessible to the UI LoggedInUserView(String displayName) { this.displayName = displayName; } String getDisplayName() { return displayName; } }
e4b04f5d2a7d9d59d2af2e6bcf65a582aa8a0b93
e96172bcad99d9fddaa00c25d00a319716c9ca3a
/plugin/src/test/resources/codeInsight/daemonCodeAnalyzer/quickFix/genericCreateFromUsage/after2.java
cdfc6cc67e2eece775df6bcc44dbaf72db1a507f
[ "Apache-2.0" ]
permissive
consulo/consulo-java
8c1633d485833651e2a9ecda43e27c3cbfa70a8a
a96757bc015eff692571285c0a10a140c8c721f8
refs/heads/master
2023-09-03T12:33:23.746878
2023-08-29T07:26:25
2023-08-29T07:26:25
13,799,330
5
4
Apache-2.0
2023-01-03T08:32:23
2013-10-23T09:56:39
Java
UTF-8
Java
false
false
208
java
// "Create Method 'get'" "true" class Generic<T> { public T get() { <caret><selection>return null;</selection> } } class WWW { <E> void foo (Generic<E> p) { E e = p.get(); } }
43c42bb80647475996bb71a6aba8ca4b309bc88d
ee803b09a37881b9e6388956b5a9d569c886a7b2
/src/main/java/com/gorban/easy/dynamicprogramming/BestTimeToBuyAndSellStock.java
b373f76ef7be4fd52dffb11e748e1180c56b1d34
[]
no_license
dimalgor/leetcode-interview-questins
540b66d8e4cafcccff3462065d44c834fa5f0990
216dc5acf5d36071667ba92e983ab6ee2f4e961d
refs/heads/main
2023-07-23T16:56:29.167384
2021-09-07T11:52:49
2021-09-07T11:52:49
363,573,986
0
0
null
null
null
null
UTF-8
Java
false
false
490
java
package com.gorban.easy.dynamicprogramming; public class BestTimeToBuyAndSellStock { public int maxProfit(int[] prices) { int minPrice = Integer.MAX_VALUE; int maxProfit = 0; for (int i = 0; i < prices.length; i++) { if (prices[i] < minPrice){ minPrice = prices[i]; } else if (prices[i] - minPrice > maxProfit){ maxProfit = prices[i] - minPrice; } } return maxProfit; } }
4e424875ea37ffdd93fc092e9bb0bee74287272e
361649e5f457cb27498a1c54b1574ed250be2939
/src/main/java/com/ruoyi/project/system/domain/FeeApplyInfoChild.java
63c349d1c1bc0bd7cd44378e5a9ec2000d732205
[]
no_license
wgp1996/project
e9dbbd34cc063117e2000c58df444d73984ccd71
b2ecd685e83b2debc67eb9e375b7dd8e0bf8fcf7
refs/heads/master
2023-04-08T06:25:52.125344
2021-04-23T06:34:20
2021-04-23T06:34:20
331,804,643
0
0
null
null
null
null
UTF-8
Java
false
false
3,510
java
package com.ruoyi.project.system.domain; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.framework.aspectj.lang.annotation.Excel; import com.ruoyi.framework.web.domain.BaseEntity; /** * 费用报销子表对象 fee_apply_info_child * * @author ruoyi * @date 2021-04-16 */ public class FeeApplyInfoChild extends BaseEntity { private static final long serialVersionUID = 1L; /** id */ private String id; /** 单号 */ @Excel(name = "单号") private String djNumber; /** 费用项目名称 */ @Excel(name = "费用项目名称") private String feeName; /** 费用项目编码 */ @Excel(name = "费用项目编码") private String feeCode; /** 报销事由 */ @Excel(name = "报销事由") private String applyContent; /** 凭证张数 */ @Excel(name = "凭证张数") private Integer feeNum; /** 报销金额 */ @Excel(name = "报销金额") private Double feeMoney; /** 项目名称 */ @Excel(name = "项目名称") private String projectName; /** 项目编码 */ @Excel(name = "项目编码") private String projectCode; public void setId(String id) { this.id = id; } public String getId() { return id; } public void setDjNumber(String djNumber) { this.djNumber = djNumber; } public String getDjNumber() { return djNumber; } public void setFeeName(String feeName) { this.feeName = feeName; } public String getFeeName() { return feeName; } public void setFeeCode(String feeCode) { this.feeCode = feeCode; } public String getFeeCode() { return feeCode; } public void setApplyContent(String applyContent) { this.applyContent = applyContent; } public String getApplyContent() { return applyContent; } public void setFeeNum(Integer feeNum) { this.feeNum = feeNum; } public Integer getFeeNum() { return feeNum; } public void setFeeMoney(Double feeMoney) { this.feeMoney = feeMoney; } public Double getFeeMoney() { return feeMoney; } public void setProjectName(String projectName) { this.projectName = projectName; } public String getProjectName() { return projectName; } public void setProjectCode(String projectCode) { this.projectCode = projectCode; } public String getProjectCode() { return projectCode; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("djNumber", getDjNumber()) .append("feeName", getFeeName()) .append("feeCode", getFeeCode()) .append("applyContent", getApplyContent()) .append("feeNum", getFeeNum()) .append("feeMoney", getFeeMoney()) .append("projectName", getProjectName()) .append("projectCode", getProjectCode()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) .append("remark", getRemark()) .toString(); } }
[ "wgp1996" ]
wgp1996
06976adf6871b9ded536c3dc6a9a22d1df90c56c
b3002a34125c34b8ed62b693ae9dfba51bdd62e5
/weigaoSys/src/main/java/org/mybatis/weigao/service/SalesmanService.java
f1f10b97cf0448437c3c2c00c52b4130a0c8dbb1
[]
no_license
ghouman/weigaoSys
d38c76b9cfe7dbb8fc4766787df5e82a54a314f6
e5a472a0bade993149c06e1c6e307cc3020977f8
refs/heads/master
2021-01-13T02:07:11.081666
2014-05-08T16:09:07
2014-05-08T16:09:07
19,579,739
0
1
null
null
null
null
UTF-8
Java
false
false
673
java
package org.mybatis.weigao.service; import org.mybatis.weigao.domain.Salesman; import org.mybatis.weigao.persistence.SalesmanMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * Created with IntelliJ IDEA. * User: ghm * Date: 13-12-4 * Time: 上午1:01 * To change this template use File | Settings | File Templates. */ @Service public class SalesmanService { @Autowired private SalesmanMapper salesmanMapper; public List<Salesman> getSalesmanByManagername(String managerName){ return salesmanMapper.getSalesmanByManagername(managerName); } }
588d1c7c063f0536ac1a05ddc025154ea1fd62b6
17579c03e3ac445da521dd78fc72ca300e52d1b5
/app/src/main/java/com/seuic/app/store/ui/activity/SplashActivity.java
adbe937b5b9c6e0959985c8fdb21cc72b4035777
[ "Apache-2.0" ]
permissive
garyzqg/AppStore
a5daa2f0469f88dd0cd932b52886f6567d5a08fb
b2d18c97b7d8d18e7aeb64da42330d958c00594f
refs/heads/master
2023-03-18T12:54:05.513010
2017-10-29T05:03:45
2017-10-29T05:03:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,987
java
package com.seuic.app.store.ui.activity; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.View; import android.widget.TextView; import com.seuic.app.store.R; import com.seuic.app.store.utils.AndroidUtils; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; /** * Created on 2017/9/15. * * @author dpuntu */ public class SplashActivity extends AbsStatusBarActivity { private Unbinder mUnBinder; private boolean flag = false; private Runnable mRunnable; @BindView(R.id.app_store_skip) TextView skipText; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidUtils.initStatusBar(SplashActivity.this); setContentView(R.layout.activity_splash); mUnBinder = ButterKnife.bind(SplashActivity.this); } @Override protected void onStart() { super.onStart(); skipTextFunction(); } /** * 设置skipText的功能 */ private void skipTextFunction() { mRunnable = new Runnable() { @Override public void run() { goHome(); } }; skipText.postDelayed(mRunnable, 3000); skipText.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { goHome(); } }); } @Override protected void onDestroy() { super.onDestroy(); flag = true; if (mRunnable != null) { skipText.removeCallbacks(mRunnable); } if (mUnBinder != null) { mUnBinder.unbind(); } } private synchronized void goHome() { if (!flag) { flag = true; startActivity(new Intent(SplashActivity.this, HomeActivity.class)); finish(); } } }
9a2c1d3e448442f9e5f8595f48babfa75941f12f
189561dd893653f0f92a0e7d4932f7e0585cb36e
/app/src/main/java/cn/zhouzy/greatcate/module/main/model/DisplayModel.java
9766d615f7bac7135cbc582f1becdd6e0378a72b
[]
no_license
IzZzI/GreatCateAs
abad71279a326a17e3396b8e6524d23fea0144aa
e94bcf04b227e8be2cdc28a278d18f750c7dc7a8
refs/heads/master
2021-01-19T21:54:33.358887
2017-10-12T15:22:16
2017-10-12T15:22:16
88,719,507
0
0
null
null
null
null
UTF-8
Java
false
false
2,060
java
package cn.zhouzy.greatcate.module.main.model; import cn.zhouzy.greatcate.api.DisplayApi; import cn.zhouzy.greatcate.common.callback.CommonCallback; import cn.zhouzy.greatcate.common.constant.Constant; import cn.zhouzy.greatcate.common.mannager.RetrofitMannager; import cn.zhouzy.greatcate.contract.DisplayContract; import cn.zhouzy.greatcate.entity.Root; import rx.Subscriber; import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; /** * Created by gdxw on 2017/3/8. */ public class DisplayModel implements DisplayContract.IDisplayModel { @Override public void getCateList(int cid, String pn, String rn, final CommonCallback callback) { RetrofitMannager.getInstance().create(DisplayApi.class).getCateList(cid, pn, rn, Constant.KEY).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()) .subscribe(new Subscriber<Root>() { @Override public void onCompleted() { } @Override public void onError(Throwable e) { callback.onFail(e.getMessage()); } @Override public void onNext(Root root) { if (root != null && root.getResult() != null) { callback.onSuccess(root.getResult().getData()); }else{ callback.onFail(root.getReason()); } } }); } @Override public void getMoreCateList(int cid, String pn, String rn,final CommonCallback callback) { RetrofitMannager.getInstance().create(DisplayApi.class).getCateList(cid, pn, rn, Constant.KEY).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()) .subscribe(new Subscriber<Root>() { @Override public void onCompleted() { } @Override public void onError(Throwable e) { callback.onFail(e.getMessage()); } @Override public void onNext(Root root) { if (root != null && root.getResult() != null) { callback.onSuccess(root.getResult().getData()); }else{ callback.onFail(root.getReason()); } } }); } }
5abdc8ed864965b3f7e1375b670a4494c4d56bf2
ac899212bf96b52c2540ab8b1346a9d5dc71d32a
/StarGame/core/src/ru/vyacheslav/andrdgb/base/SpritesPool.java
895a75d83a75f06ec5408c8a534384e3ebf811db
[]
no_license
viacheslav-s/AndroidGameGB
6091d2a958ef14aa1411f8c893a40963ed0f9b80
27f5b40b41bb56327bcdf8445f8fec3125c015f0
refs/heads/master
2020-03-28T17:23:38.161600
2018-10-10T23:22:57
2018-10-10T23:22:57
148,784,308
0
0
null
null
null
null
UTF-8
Java
false
false
2,076
java
package ru.vyacheslav.andrdgb.base; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import java.util.ArrayList; import java.util.List; public abstract class SpritesPool<T extends Sprite> { // список активных объектов protected List<T> activeObjects = new ArrayList<T>(); // список свободных объектов protected List<T> freeObjects = new ArrayList<T>(); protected abstract T newObject(); public T obtain() { T object; if (freeObjects.isEmpty()) { object = newObject(); } else { object = freeObjects.remove(freeObjects.size() - 1); } activeObjects.add(object); log(); return object; } public void updateActiveObjects(float delta) { for (int i = 0; i < activeObjects.size(); i++) { Sprite sprite = activeObjects.get(i); if (!sprite.isDestroyed()) { sprite.update(delta); } } } public void freeAllDestroyedActiveObjects() { for (int i = 0; i < activeObjects.size(); i++) { T sprite = activeObjects.get(i); if (sprite.isDestroyed()) { free(sprite); i--; sprite.flushDestroy(); } } } public void freeAllActiveObjects() { freeObjects.addAll(activeObjects); activeObjects.clear(); } private void free(T object) { if (activeObjects.remove(object)) { freeObjects.add(object); log(); } } public void drawActiveObjects(SpriteBatch batch) { for (int i = 0; i < activeObjects.size(); i++) { Sprite sprite = activeObjects.get(i); if (!sprite.isDestroyed()) { sprite.draw(batch); } } } public List<T> getActiveObjects() { return activeObjects; } public void dispose() { activeObjects.clear(); freeObjects.clear(); } protected void log() { } }
47df2e860409c076d64d31580020977a8955f9be
49239851600bec967e94aa0e8891ffae2e9018ed
/mavenbos44/src/main/java/cn/itcast/bos/service/qp/NoticeBillService.java
d5a69d6a2904f34c5165bfec753c2fb1a5a6f97c
[]
no_license
facestosun/myproject
115ce8ce98e09a4080fed53e99ce13628c81d5ed
9058715861a8706e998c3a3605ef99ce60b43523
refs/heads/master
2021-01-21T20:43:12.023977
2017-06-18T13:00:27
2017-06-18T13:00:27
94,676,476
0
0
null
null
null
null
UTF-8
Java
false
false
338
java
package cn.itcast.bos.service.qp; import cn.itcast.bos.domain.qp.NoticeBill; //通知单业务层接口 public interface NoticeBillService { /** * * 说明:保存通知单 * @param noticeBill * @author 传智.BoBo老师 * @time:2017年3月12日 下午5:18:49 */ public void saveNoticeBill(NoticeBill noticeBill); }
920bd5ec784b1a0dfba72099250daf520bf2be73
4f95ee547c24f46eaa691efa1aeacb18eb8613f6
/src/main/java/com/smartcity/event/LightChangeEvent.java
ae52bb699201354b4e133c63ad6f409489551f74
[]
no_license
samanpanwar/cen6087panwarparmeter
439d70310f746d4be2afc8a8cbc10baf7030cd13
858ac9a268ee6e9df46eb1018f034e311c626c86
refs/heads/master
2021-08-22T18:07:18.848705
2017-10-27T03:33:06
2017-10-27T03:33:06
104,002,492
0
0
null
null
null
null
UTF-8
Java
false
false
2,500
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 com.smartcity.event; import com.smartcity.application.Simulation; import com.smartcity.model.Car; import com.smartcity.model.Intersection; import com.smartcity.model.Intersection.LightDirection; /** * * @author Blake */ public class LightChangeEvent extends Event { public enum ChangeType{INITIAL, ALL_RED, GREEN}; private final static long YELLOW_TIME = 50; private final static long GREEN_TIME = 250; private final Intersection intersection; private final LightDirection lightDirection; private final ChangeType changeType; public LightChangeEvent(double eventTime, Intersection intersection, LightDirection lightDirection, ChangeType changeType) { super(eventTime); this.intersection = intersection; this.lightDirection = lightDirection; this.changeType = changeType; } @Override protected void eventAction() { switch(changeType){ case INITIAL: EventBus.submitEvent(new LightChangeEvent(eventTime + YELLOW_TIME, intersection, lightDirection, ChangeType.ALL_RED)); break; case ALL_RED: EventBus.submitEvent(new LightChangeEvent(eventTime + YELLOW_TIME, intersection, lightDirection, ChangeType.GREEN)); break; case GREEN: //Queues up a new light change direction LightDirection newDirection; if(lightDirection.equals(LightDirection.EW_BOUND)){ newDirection = LightDirection.NS_BOUND; } else { newDirection = LightDirection.EW_BOUND; } EventBus.submitEvent(new IntersectionDequeueEvent(eventTime + Car.DEQUQE_LIGHT_TIME, intersection, lightDirection, intersection.getAndEmptyCars(lightDirection))); EventBus.submitEvent(new LightChangeEvent(eventTime + GREEN_TIME, intersection, newDirection, ChangeType.INITIAL)); break; default: throw new IllegalArgumentException(changeType + " is not handled"); } intersection.setLightState(lightDirection, changeType); Simulation.WORLD.renderIntersectionLights(intersection); } }
551c0f3e7aa3299409fd33cdbfb8d321722b682a
0eff078d53ad5ca1f5db377ca3d279227345cb47
/project4-1/src/main/java/com/ziwu/controller/off/OffStudentCourseController.java
8be921fe2441b720aa603a5ed3c15b2ce11b6f5d
[]
no_license
JaSDLe/CPEMS
eb35749186d38d1390af0853b1840039aaad0003
cf2a1b7500f509a5687abc56f0a9d64ac9b5569e
refs/heads/master
2022-12-24T10:02:18.356996
2019-08-20T05:26:45
2019-08-20T05:26:45
199,406,810
0
0
null
2022-12-10T05:13:09
2019-07-29T08:01:41
Vue
UTF-8
Java
false
false
2,112
java
package com.ziwu.controller.off; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.ziwu.pojo.RespBean; import com.ziwu.pojo.StudentCourse; import com.ziwu.service.StudentCourseService; @RestController @RequestMapping("/studentcourse") public class OffStudentCourseController { @Autowired StudentCourseService studentcourseService; @RequestMapping(value = "/sc", method = RequestMethod.GET) public Map<String, Object> getStudentCourseByPage(@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size, @RequestParam(defaultValue = "") String keywords) { Map<String, Object> map = new HashMap<>(); Long count = studentcourseService.getCountByKeywords(keywords); System.out.println("count" + count); List<StudentCourse> studentcourseByPage = studentcourseService.getStudentCourseByPage(page, size, keywords); map.put("studentcourses", studentcourseByPage); map.put("count", count); return map; } @RequestMapping(value = "/sc/{ids}", method = RequestMethod.DELETE) public RespBean deleteStudentCourse(@PathVariable String ids) { if (studentcourseService.deleteStudentCourse(ids)) { return RespBean.ok("删除成功!"); } return RespBean.error("删除失败!"); } @RequestMapping(value = "/ins", method = RequestMethod.POST) public RespBean insStudentCourse(Integer[] user_ids,Integer[] teacher_course_ids) { int i=studentcourseService.insertStudentCourse(user_ids, teacher_course_ids); if (i == user_ids.length * teacher_course_ids.length) { return RespBean.ok("课程分配成功!"); } else if (i == -1) { return RespBean.error("课程分配重复,分配失败!"); } return RespBean.error("分配失败!"); } }
05e06e62d6fc4043ae48485cb2b1e933d115e5ed
44bfe83ec7bc3733a21edcecaad41502c452b780
/app/src/main/java/com/example/ankit/firebasewithlistview/MyDBHandler.java
2a85592263df96070db806254cee15db19da3e84
[]
no_license
ankitkishore/FacebookLogin
fcb271a3389d42da07f2db8874fc79272b6d32dd
4f463d10201afcad5da21b0810d89b4a780f0c1d
refs/heads/master
2021-09-02T19:14:09.690786
2018-01-03T19:03:14
2018-01-03T19:03:14
116,171,625
0
0
null
null
null
null
UTF-8
Java
false
false
2,927
java
/* package com.example.ankit.firebasewithlistview; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import java.util.ArrayList; */ /** * Created by ankit on 12/20/2017. *//* public class MyDBHandler extends SQLiteOpenHelper { private static final int DATABASE_VERSION = 1; private static final String DATABASE_NAME = "vocabulary.db"; public static final String TABLE_PRODUCTS = "vocabula"; public static final String COLUMN_ID = "_id"; public static final String COLUMN_WORD = "word"; public static final String COLUMN_MEANING = "meaning"; //We need to pass database information along to superclass public MyDBHandler(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) { super(context, DATABASE_NAME, factory, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { String query = "CREATE TABLE "+ TABLE_PRODUCTS + "( "+ COLUMN_ID +" INTEGER PRIMARY KEY, "+COLUMN_WORD+"TEXT, "+ COLUMN_MEANING +"course TEXT)"; */ /*String query = "CREATE TABLE " + TABLE_PRODUCTS + "(" + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + COLUMN_WORD + " TEXT, " + COLUMN_MEANING + " TEXT " + ");"; *//* db.execSQL(query); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS " + TABLE_PRODUCTS); onCreate(db); } //Add a new row to the database public void addWord(Vocabulary vocabulary){ ContentValues values = new ContentValues(); values.put(COLUMN_WORD, vocabulary.getWord()); values.put(COLUMN_MEANING, vocabulary.getMeaning()); SQLiteDatabase db = getWritableDatabase(); db.insert(TABLE_PRODUCTS, null, values); db.close(); } public ArrayList<Vocabulary> databaseToList(){ SQLiteDatabase db = getWritableDatabase(); String query = "SELECT * FROM " + TABLE_PRODUCTS + " WHERE 1"; Vocabulary db_voc = new Vocabulary(); ArrayList<Vocabulary> vocabulary = new ArrayList<>(); //Cursor points to a location in your results Cursor c = db.rawQuery(query, null); //Move to the first row in your results c.moveToFirst(); //Position after the last row means the end of the results while (!c.isAfterLast()) { if (c.getString(c.getColumnIndex("word")) != null) { db_voc.setWord(c.getString(c.getColumnIndex("word"))); db_voc.setMeaning(c.getString(c.getColumnIndex("meaning"))); vocabulary.add(db_voc); } c.moveToNext(); } db.close(); return vocabulary; } } */
029da60ef145ea9d8bf134799fdb3e83b4cdecf2
30a3c97f8ed5782c8a698fb2b9bbd5830eb8d71c
/app/src/main/java/test/alexzander/swipetodelete/ContactHolder.java
a31e82daf0747f58829d18d4745bf30f0be76902
[]
no_license
TermLog/SwipeToDelete
57ba8dc28a86600ad85d93915b7ff87cbb893b05
3f229e41c23c128a67e1fd80b66f3d3e5bcd2ff6
refs/heads/master
2021-01-20T03:04:01.975512
2017-04-26T16:03:59
2017-04-26T16:03:59
89,493,659
3
2
null
2017-06-27T07:11:15
2017-04-26T14:56:50
Java
UTF-8
Java
false
false
1,589
java
package test.alexzander.swipetodelete; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.TextView; /** * Created by AlexZandR on 4/24/17. */ public class ContactHolder extends RecyclerView.ViewHolder { public boolean isPendingDelete = false; public TextView deletedName; public TextView name; public TextView phone; public View progressIndicator; public View contactContainer; public View undoContainer; public View undoData; public ContactHolder(final View itemView, final UndoClickListener listener) { super(itemView); deletedName = (TextView) itemView.findViewById(R.id.user_name_deleted); name = (TextView) itemView.findViewById(R.id.user_name); phone = (TextView) itemView.findViewById(R.id.user_phone_number); contactContainer = itemView.findViewById(R.id.contact_container); undoContainer = itemView.findViewById(R.id.undo_container); undoData = itemView.findViewById(R.id.undo_data); itemView.findViewById(R.id.button_undo).setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { listener.onUndoClick(getAdapterPosition()); } }); progressIndicator = itemView.findViewById(R.id.progress_indicator); } View getTopContainer() { if (isPendingDelete) { return undoContainer; } else { return contactContainer; } } }
0b9c26a6777ac84d535c7ce3525709c9ac5a2b78
499771a524b00a915d779d96ab8439b7c180da39
/src/main/java/mjb/dev/cjo/channels/package-info.java
4a5a2481282e6932d0b36c34a9aaab9bd7c9817e
[]
no_license
michaelbradley91/CJO
63cc1be9a3c378a29fa31c48318d1bb3b341f8c0
65fb4d1b6bdf49fcbb221234da3b702d56f9325d
refs/heads/master
2021-01-20T21:24:12.299437
2014-07-22T12:16:20
2014-07-22T12:16:20
17,651,625
0
0
null
null
null
null
UTF-8
Java
false
false
17,951
java
/** * ****************<br> * Date: 15/03/2014<br> * Author: michael<br> * ****************<br> * <br> * This package contains all of the basic channels provided by CJO to enable concurrency!<br> * This package does not include operators, such as alt, or serve or parallel composition.<br> * <br> * All channels have two different ends - a read end where you extract the message and a write end where you put the message in.<br> * Channels vary in how many processes are permitted to synchronise on a channel at once, and whether or not the writing * is asynchronous. It's up to you to choose those best suited for the task! * */ package mjb.dev.cjo.channels; /** * Notes to self: * * How should channels be implemented??? * We've already decided that channels are going to be resources in the resource graph. Things like alts * are also resources, that have dependencies on the channels. * * When I want to write to a channel, I can lock onto it and be sure that I am aware of all the readers/writers. * Depending on the situation, I may interact in a variety of ways, but what's important is that we can release a reader if a reader * is available, or wait otherwise. * * The simplest way to manage this is to construct a semaphore, pull it down, then release the resource, and then pull down on the * semaphore. If a reader doesn't find me, I'll just pull down and wait until I'm released. If a reader does find me, even before * I've started pulling down, I'm still guaranteed to go through - of course, I might not see the message. * * So, for a reader who may need to wait, I guess it makes sense to leave behind both a box and a semaphore. The writer * can put the message inside the box strictly before releasing me. Then I'll get it when I wake up. * * A slight issue with this... firstly, it is using quite a lot of memory, and having attempted these things * with monitors, it isn't really necessary for everyone to have a separate semaphore... * * The major issue is that this doesn't seem to play well with alts. If I am waiting on two channels, do I leave the same semaphore * for both, and how do I de-register my interest?? I'd rather not have to enforce that everyone behaves specially for alts * when they see them. * * Instead, I'd rather the waiting process enabled the process its waking up to respond in some way. * A simple way to do this, which also removes the needs for specific semaphores, is to pass * a function to be run when the process is woken up. (It's assumed due to the resource graph that all relevant * components are locked). * * This function had better take the message in the case of a writer, but it should also know who exactly the reader is. * For the purposes of an alt, this is especially important as it will want to know which branch was released. * How can the branch be known? - the resource is unique, so just passing the channel in itself should be sufficient. * * The alt, when its method is called, can subsequently de-register its interest in all other channels * that it was listening too, which again are guaranteed not to have made an attempt to respond due to the wonders * of the resource graph. :) * * We can implement fairness fairly easily, just by storing these requests as lists of functions. * To be honest, we'll just pass the channel in to make up the list, so that the functions have proper names. * * If it is a list, it is a pain to have to remove random items. * We can avoid this if the item is stored alongside a flag to say whether or not it is still * interested (or specifically, that occasion was still interested). * So, we'd probably use a pair of a box for the flag to specify interest, and the channel itself. * Handling the correct boxes shouldn't be too hard, even for alts. * A cleaner way for the sake of the garbage collector is to store the list as a doubly linked list, * and then when removal is scheduled we can manage this in O(1) (with a hash map if life is that restricting, * but for speed I think we can just return an identity that should be used) * * With an alt containing guards, we can just evaluate the guards immediately once all the resources are locked, and throw * away the resources we didn't need once set up (by not adding dependencies) * For the orelse, we simply activate this if all guards fail. (We could evaluate guards asynchronously, which is more efficient * so probably worth it...?) * For the "after" statement, we can spawn a separate thread to wait for the required amount of time, and then just try to lock * on the alt's resource, and see if it activated since its specific creation (the alt will probably set something inside * it to tell it not to worry). * * A more awkward issue is how to handle interrupts. It would be nice for our channels not to wait on each other uninterruptibly. * So, when a channel is woken up by an interrupt when it had been waiting on its semaphore, the easiest thing to do is to try locking * onto its resource, check if the communication was successful anyway (and if so don't bother killing it), but otherwise de-register * interest and pass it down...? * * A nuisance about passing it down is that you would need loads of try catch statements around your * channels. This is maybe no unreasonable, and we could add "uninterruptibly" versions of each method, but that is seriously * painful, and honestly, probably a bad plan... (would probably be better to include uninterruptible as a flag based * on what we're about to suggest) * * I'd like to convert interruptions to runtime exceptions, so that they don't need loads of try catch statements necessarily. * Honestly, there's rarely a good idea as to what to do in situations like this anyway, so I'm pretty happy with this plan * and it technically provides the same power (although it is a lot less clear what's going on). * * For other kinds of exceptions, we'll just have to throw them I suppose. I need to be careful * to catch them first, and handle the situation gracefully nevertheless. * * For operators like parallel composition, how the exception is thrown is kind of important, but we won't worry here... * * Something enabled in CSO is to close channels. Is this worth it? * In terms of implementation, it is a matter of locking on the channel, closing it, and then throwing out all listeners * accordingly... Any further attempts to listen would receive the same kind of response... * I guess it isn't particularly burdensome to implement. It was used as a termination mechanism in CSO, * so I'd quite like it. There's no reason why we can't allow channels to be re-opened like this too. * * There's a bit of ambiguity as to what an alt should do if one its channels is closed... does it wait for the others or stop * immediately?? * * A listener which is thrown out by a channel is meant to throw a "Stop exception" - a special kind of exception to indicate * the channels were intentionally closed - so this isn't so much a failure but an understanding of termination. * * So... channels had better support the following I guess... * "Add read listener" (throws closed exception) * "Add write listener" (throws closed exception) * "Remove read listener" * "Remove write listener" * "Close" * "Close read end" * "Close write end" * * In terms of the closein and closeout business... It is kind of nice being able to separate the read and write * components of the channel. For the sake of abstraction, providing access to only one half each is nice, but the implementation * needs to be aware of both... * The closein and closeout vary according to the channels flexibility on in and out. closein does nothing on a many-many channel! * Honestly, I don't like this... To enforce the contract faithfully, I could try to keep track of threads, but that's dangerous due * to the scheduler. * * I think I'd prefer to drop this notion. Just have a single close that kills everything...? Maybe not... * For certain processes which aren't aware of their context, they'd like to just closein or closeout, so that other writers * or readers also using the channel might still be able to continue... * * According to the online notes, the informal contract (where we imagine a 1-1 channel to be owned by just one process) is: * close - promises no process with ever read or write to this channel again * closein - promises that this process will never read from this channel again * closeout - promises that this process will never write to this channel again * * I don't think we need open - it's probably bad practice anyway, and I already don't like this area... * In the old CJO attempt, there was a way to close all possible in, but allow writers and readers already inside to complete * their interactions before the channel actually closed. In other words, writers and readers would not necessarily * be thrown out unless there was no one else to interact with. * Given the way closein and closeout will actually work, I don't think there's any use to this... (we can't have transactions * in mid process anymore since the invention of the resource graph) * * Depending on the channel, when the listener is added if the writer or otherwise is added it will trigger a sequence of interactions... * The listeners should support * "Reader arrived" (with the reader itself) * "Writer arrived" (with message + the writer itself) * * These methods are all named in helpful ways for the implementation, but are a bit weird for the user. * Since the implementation is pretty complicated, I'm quite tempted just to wrap up the method names * with a surrounding class... We'll see, but for now I'm going with helpful names. * * We do need a naming convention. Do we use read or write, or in and out?? * I never really liked in and out. You can read from in and write to out, but you push messages in when you write, and take * them out when you read!!? I don't want to clash with the convention in CSO, as that will probably confuse people * even more... * * Also, Java's kind of harsh in what method names we can use (no operator overloading). We'll probably just use "read" and "write" for channels, * rather than ? and !. So, maybe I should call the two ends of a channel source and target or something... that would probably * only make sense to people with some graph theory. * * I could call them "writeEnd" and "readEnd" which is particularly clear, but quite cumbersome... * or "readChannel" and "writeChannel" since the two combined form a channel. Also writeEnd doesn't make it clear it's a channel. * I could go with "ChannelReader" and "ChannelWriter" to make it clear that one allows writing to channels, and the other * reading from channels. These are probably the best clear names... * * I think that's how it is a going to work... * * Trying to determine the typing for classes... * * All classes need these standard methods in their implementation, but it is a problem as I want to hide * these methods from the user. Granted, I could just type cast everything, it is not very OOP... * * I guess I'll have to make the classes abstract. ok - since Java doesn't support multiple extensions, * I can't do it directly this way either... The problem is that generally knowing the channel is a reader * or a writer is not enough for an alt - it needs to know the underlying implementation access methods. * * This means the interfaces could do with protected methods, but this isn't possible either in Java. * The "best" I can do seemingly is to use an abstract class called "channel" which hides the implementation specific * methods, and then operators will typically cast channel readers and writers to channels... * * To avoid the casting, I can enable the use of a method getChannel underneath the channel - not exactly * brilliant, but since everyone knows it can be cast, I guess it is just better to be clear about it * (I don't want later implementations of readers or writers not to be channels - so I wanted to avoid relying on this) * * An alternative: * * This is quite painful... however, I can perform the following mechanism: * I can enable the user of a channel to get both the read and the write ends of a channel. * We can then make both abstract, and use a protected method to get hold of he original channel again. * * In the implementation, the methods would basically be forwarded. It is a bit of a pain for the user, * as they have to constantly get the correct end of the channel... but I guess it should work... * (Prevents bad casting too!) * * **************** * * You know, in a lot of ways, reading and writing from channels is much like applying an operation to them... * Huh? * So, what is a one one channel exactly?? When an alt starts waiting on such a channel, how exactly * does it know that it can in fact wait (illegal state exception), when all it sees is a basic channel implementation... * Ordinarily, the alt accesses the underlying methods of the class - are these channel specific? I guess so... * * That means we'll need to let them be overridden...great... * * I'm seriously thinking that a lot of the problems are just that channels should not support read and write * methods by default, but that these should be "operations" and only the registering and deregistering of * writers or readers should actually be managed by the channels... * * It's kind of confusing. Consider for example an asynchronous channel. This needs to make sure its reader doesn't wait, * but for a general read operation, this would be required... I guess it is quite a horrible mix... * I think I'll stick to having read and write operations built in still - just a bit confusing * * **************** * * Update: read and write will be operations like everything else! However, to enforce that we can implement * buffered channels, we're going to need to build a "buffer write operation" that needs to know where exactly in the pipeline * of waiting writers it is... * * We can do this with a more specialised FIFO queue, so I'm moving it up... * * Hmm... while this will work, using listeners for queues to tell where you are in a queue is very expensive... * The reason this is inefficient is because, as an operator, it allows both processes attempting to perform buffering, and * processes not performing buffering to use the same channel. Hence, it is not dedicated to ensuring you wake up * at the right time. * * The issue with having a channel that is buffered specifically is how it should hold up processes during the protocol... * The problem is kind of complicated - even for an alt!! * * Consider an alt with an asynchronous channel - if the alt is reading, all is ok. If the alt is writing, * it should be made to wait until the buffer is not full, and then it can write. * * It seems that the channel could do with telling the reader or writer to wait on its own somehow... which I guess is why * asynchronous channels exist, but how is an alt supposed to be aware of this? Grrr... If asynchronous writes were a special * operator, then alts would need the ability to write asynchronously too... * * Wow! This is heavily interlinked and awkward. * So, it seems a bit crazy that an asynchronous write should be an operator used within alts, as it would make * alts seriously complicated. * * This is sooo hard to decide... ok - let's make the channel asynchronous somehow. This means it needs some kind of additional * operator so that something like an alt can be made to wait if necessary. * * It is possible to allow the channel to hold processes up when they are attempting to register as readers or writers, * but an alt doesn't really want to be held up like this... yuck - I see why it's not in CSO - none of this plays well together. * * Ok... so an alt would probably normally check to see if a writer is ready when it wants to read, but in a buffered channel * this doesn't mean that it should get the writer's message necessarily... write? * * Not exactly - but I guess it is as good as any other reader. The other side being when an alt is trying to write, it might * notice there are no readers, and presume it should wait. It will then add itself as a waiting reader. * * What could an asynchronous buffer do? The alt will be waiting unnecessarily. It could automatically call the writer * if it is within the buffer - this would release the alt immediately, but there could be a concurrency issue with genuine readers... * * Suppose it did keep track of which writers have been told that their readers arrived (albeit lying to certain processes)... * It could spawn a new thread, and wait on the writer to tell it so, checking that it wasn't removed in the mean time. * This might generate a lot of threads, but it isn't crazy... it is clean at least - it is probably what I will wind up doing... * * I'd like not to do this for ordinary reads or writers, as this is a registration issue. Hence, maybe the read operation could * call a special operation to signal it is a controlled read or whatever - it should be possible to avoid generating a new * thread from within the channel. * * Of course, that suggests reading and writing should be contained within the channel - something I'm not keen on - so * maybe I will keep reading and writing within the channel. Yeeshh... (Avoiding close an asynchronous issues is more complicated still.. * * Maybe buffered channels should just have a fixed number of pretend readers - and keep track of the writers? * * ***************** * * Change of plan - everything will be operators. Operators will update channels when they are ready to receive responses. * This should make life a lot easier * */
ff7612e4a7ff61359ce87b5c44ea69c114bc721d
0b918b10690bb3a6268aad9991f743288c73b31b
/src/main/java/com/niit/DAO/BlogDAOImpl.java
72dd5e094f6f80115293fd3d358ca7e729036711
[]
no_license
Nagaakhila/Project2
1285b4eb4eb085571ca7708c8607f39b32685912
9c67b4c65399cd483e45b5aca68b1d5466b273fc
refs/heads/master
2021-01-23T22:31:14.969217
2017-09-12T17:55:00
2017-09-12T17:55:00
102,940,471
0
0
null
null
null
null
UTF-8
Java
false
false
2,128
java
package com.niit.DAO; import java.util.List; import javax.transaction.Transactional; import org.hibernate.SessionFactory; import org.hibernate.query.Query; import org.springframework.beans.factory.annotation.Autowired; import com.niit.model.Blog; public class BlogDAOImpl implements BlogDAO { @Autowired SessionFactory sessionFactory; public BlogDAOImpl(SessionFactory sessionFactory) { this.sessionFactory=sessionFactory; } @Transactional public boolean createBlog(Blog blog) { try { sessionFactory.getCurrentSession().saveOrUpdate(blog); return true; } catch(Exception e) { System.out.println("Exception Arised"+e); return false; } } @Transactional public Blog getBlogdetails(int blogId) { try { return (Blog)sessionFactory.getCurrentSession().createQuery("from Blog where blogId="+blogId); } catch(Exception e) { System.out.println("Exception Arised"+e); return null; } } @Transactional public List<Blog> getBlog() { @SuppressWarnings("unchecked") List<Blog> listBlog = (List<Blog>) sessionFactory.getCurrentSession().createQuery("from Blog"); return listBlog; } @Transactional public boolean approveBlog(Blog blog) { try { blog.setStatus("A"); sessionFactory.getCurrentSession().update(blog); return true; } catch(Exception e) { System.out.println("Exception Arised"+e); return false; } } @Transactional public boolean editBlog(int blogId) { try { @SuppressWarnings("rawtypes") Query query = (Query) sessionFactory.getCurrentSession().createQuery("update Blog where blogId="+blogId); query.executeUpdate(); return true; } catch(Exception e) { System.out.println("Exception Arised"+e); return false; } } @Transactional public boolean deleteBlog(int blogId) { try { sessionFactory.getCurrentSession().delete(blogId); return true; } catch(Exception e) { System.out.println("Exception Arised"+e); return false; } } }
[ "NAGA AKHILA@LAPTOP-C1KQN4GL" ]
NAGA AKHILA@LAPTOP-C1KQN4GL
1276e17942bd0752aa90af929d2881fc34a29315
f69f55587297f7eabf39367965b454aac385e885
/src/com/lanou/dao/StudentDao.java
e39b9f51577b68941b9ead07f026237344d74418
[]
no_license
lemonbin/Day06_hibernate
6cac80220d1521b7b5f24534821b538430235e6c
4a7b41bac1b09858d7eb4a93d5663c4807a499df
refs/heads/master
2021-07-12T09:11:49.523876
2017-10-17T09:52:54
2017-10-17T09:52:54
107,200,845
0
0
null
null
null
null
UTF-8
Java
false
false
350
java
package com.lanou.dao; import com.lanou.domain.Student; /** * Created by dllo on 2017/10/17. */ public interface StudentDao extends BaseDao<Student> { /** * 学生登录查询 * @param sname 用户名 * @param psw 密码 * @return 成功返回true, 否则返回false */ boolean login(String sname, String psw); }
92414629113b6ad6f0225d7a1707005a3d5e4309
7ffbd449b15c100c818a826b010326090ec72c2b
/src/main/java/com/hcl/claimprocessing/utils/ClaimConstants.java
b21208f1e02dc51d2f6e7b825c6f5286a3ba955b
[]
no_license
moramjyoshna/claim_processing
0658491195006683ae273f853e0eef947adc2fcd
fe45d913ea50f3e3439578145881aa79c839ea0b
refs/heads/master
2020-08-27T08:59:04.238981
2020-03-16T05:44:42
2020-03-16T05:44:42
217,309,442
0
0
null
null
null
null
UTF-8
Java
false
false
3,747
java
package com.hcl.claimprocessing.utils; public class ClaimConstants { private ClaimConstants() { throw new IllegalStateException("Utility class"); } public static final String CLAIM_INFO_EXIST = "Claim Info Already Exist"; public static final String POLICY_INFO_DOESNOT_EXIST = "Policy Info Not Found"; public static final String USER_NOT_FOUND = "User Doesn't Exist"; public static final String CLAIM_APPLIED = "Claim Applied Successfully"; public static final Integer SENIOR_APPROVER = 2; public static final Integer JUNIOR_APPROVER = 1; public static final String LOGIN_DENIED = "Login denied for the user"; public static final String LOGIN_SUCCESS = "User logged in Successfully"; public static final String PENDING_STATUS = "Pending"; public static final String INTERNAL_SERVER_ERROR = "Internal Server Error"; public static final String POLICY_NOT_FOUND_EXCEPTION = "Policy number doesnot exist"; public static final String POLICY_ID_MANDATORY_EXCEPTION = "Policy Id is mandatory"; public static final String POLICY_ID_EXIST = "Policy Id exists and success"; public static final String APPROVED_STATUS = "Approved"; public static final String CLAIM_INFO_NOT_FOUND = "Claim Inffo Not Found"; public static final Integer PAGENATION_SIZE = 10; public static final String CLAIM_INFO_NOT_EXIST = "Claim Info Not Exist"; public static final String INVALID_INPUTS = "Invalid pagenumber"; public static final String INVALID_CREDENTIAL = "Invalid credentials"; public static final String CLAIM_UPDATE_SUCCESS = "Claim Info Updated Successfully"; public static final String HOSPITAL_NOT_EXIST = "Hospital Doesnot cover the Claim"; public static final String IN_NETWORK = "In"; public static final String OUT_OF_NETWORK = "Out"; public static final String REVERT_BACK = "Rever Back"; public static final String AILMENT_NOT_EXIST = "No Ailment Info Found"; public static final String REJECTED_STATUS = "Rejected"; public static final String HOSPITAL_INFO_NOT_EXIST = "Hospital Info not exists"; public static final String POLICY_NOT_EMPTY_EXCEPTION = "Policy should not empty"; public static final String DIAGNOSIS_INFO_NOT_EXIST = "Diagnosis Info not exists"; public static final String AILMENT_INFO_NOT_EXIST = "Ailment Info Not exists"; public static final String SEPERATOR = ":"; public static final String USER_LOGIN_CONTROLLER_INFO = "Inside Login Controller"; public static final String USER_LOGIN_SERVICE_INFO = "Inside Login Service"; public static final String APPLY_CLAIM_CONTROLLER = "Inside Apply Claim Controller"; public static final String APPLY_CLAIM_SERVICE = "Inside Apply Claim Service"; public static final String UPDATE_CLAIM_CONTROLLER = "Inside Update Claim Controller"; public static final String UPDATE_CLAIM_SERVICE = "Inside Update Claim Service"; public static final String GET_CLAIM_SERVICE = "Inside Get Claim list Service"; public static final String GET_CLAIM_CONTROLLER = "Inside Get Claim list Controller"; public static final String GET_AILMENT_LIST_CONTROLLER = "Inside Get Ailments List Controller"; public static final String GET_AILMENT_LIST_SERVICE = "Inside Get Ailments List Service"; public static final String GET_DIAGNOSIS_LIST_SERVICE = "Inside Get Diagnosis List Service"; public static final String GET_DIAGNOSIS_LIST_CONTROLLER = "Inside Get Diagnosis List Controller"; public static final String GET_HOSPITAL_LIST_CONTROLLER = "Inside Get Hospital List Controller"; public static final String GET_HOSPITAL_LIST_SERVICE = "Inside Get Hospital List Service"; public static final String SEARCH_POLICY_INFO_CONTROLLER = "Inside the Search Policy Controller"; public static final String SEARCH_POLICY_INFO_SERVICE = "Inside the Search Policy Service"; }
758f1cb20d4ec62a2309deee96384d5b286612d7
3a9171f0d989e019577c66de45d6e4cb9ac21408
/pestival3/src/pestival3/c.java
92e7e6be9aa1c2d7d858788d96a744ff0f42ff96
[]
no_license
gudals6676/java
159d36701553152ac9fdc0ca2c817954dc1b5009
88a5fbde27893d49c307d59ffd474d41d5aa936a
refs/heads/master
2023-04-20T07:30:53.828870
2021-05-07T04:52:22
2021-05-07T04:52:22
359,686,867
0
0
null
null
null
null
UTF-8
Java
false
false
738
java
package pestival3; public class c { public static void main(String[] args) { // TODO Auto-generated method stub char[][] arr = new char[5][5]; char mora = 'A'; for (int i = 0; i < arr.length; i += 1) { if (i <= 2) { for (int j = i; j <5-i; j += 1) { arr[i][j] = mora++; } } else { for (int j = 4 - i; j <= i; j += 1) { arr[i][j] = mora++; } } } for (int i = 0; i < arr.length; i += 1) { for (int j = 0; j < arr.length; j += 1) { System.out.print(arr[i][j] + " " + "\t"); } System.out.println(); } } }
b6aad76669ce99ddaa2d2998e093e1c2bb61a44c
5f367650f000a434182b6699ae32c88b80ec1d09
/src/de/fh_muenster/its/info2/vokabel/ListenVerwaltung.java
2f28cc9b0e7ee41ef855f4c43e8cd7502f506fc6
[]
no_license
Metaxion/DBVokabeln
549b50c1ab5b611b5cfd5536b1f2450527697a1e
babf9b832a678917c8dafb070302d1d411a510a3
refs/heads/master
2023-05-30T03:28:38.476692
2021-06-08T11:26:04
2021-06-08T11:26:04
372,518,831
0
0
null
null
null
null
UTF-8
Java
false
false
1,698
java
package de.fh_muenster.its.info2.vokabel; /** * Stellt die Verwaltung fuer eine doppelteverkettete Liste dar * @author Marcel Krups * */ public class ListenVerwaltung { private Vokabel anfang; private Vokabel ende; /** * Fuellt den Anfang der Liste mit den Vokabeln aus der uebergebenen zeile * @param vok, die Vokabel die angehaengt wird */ public void erstesElementAnhaengen(Vokabel vok) { anfang = vok; anfang.setNext(null); anfang.setPrev(null); ende = anfang; } /** * Fuellt die naechste Stelle der Liste mit den Vokabeln aus der uebergebenen zeile * @param vok, die Vokabel die angehaengt wird */ public void neuesElementAnhaengen(Vokabel vok) { ende.setNext(vok); ende.getNext().setPrev(ende); ende = ende.getNext(); } public Vokabel getEnde() { return ende; } public void setEnde(Vokabel ende) { this.ende = ende; } public Vokabel getAnfang() { return anfang; } public void setAnfang(Vokabel anfang) { this.anfang = anfang; } /** * Loescht das uebergebene Element vok aus der Liste * @param vok, die zu loeschende Vokabel */ public void loescheElement(Vokabel vok) { //Erstes Element if(vok.getPrev() == null) { //Und kein weiteres Element if(vok.getNext() == null) { anfang = null; ende = anfang; } //Erstes Element von mehreren else { anfang = anfang.getNext(); anfang.setPrev(null); } } //Letztes Element else if(vok.getNext() == null) { ende = ende.getPrev(); ende.setNext(null); } //Mitten drin else { Vokabel listeNext = vok.getNext(); Vokabel listePrev = vok.getPrev(); listePrev.setNext(listeNext); listeNext.setPrev(listePrev); } } }
708a65d4f89debb2781c1b0260ce03e2d0ce59b0
96d5f10e1fc8378d4ca1f2de1b893b33aeeffd68
/app/src/main/java/com/dscnitp/freshersportal/ImageViewActivity.java
caff500ce5472387e2934f3d48b7101fa2339ab6
[]
no_license
shreyavijayvargiya/freshers-portal-app
87c2b81460b9d35899f92e9fece622399befc092
be0b6e63bf56a09488b1d63edf9bc772d4559fae
refs/heads/master
2022-12-30T13:36:00.680905
2020-10-25T07:34:11
2020-10-25T07:34:11
303,754,504
0
0
null
2020-10-25T07:34:12
2020-10-13T15:54:09
null
UTF-8
Java
false
false
351
java
package com.dscnitp.freshersportal; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class ImageViewActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_image_view); } }
2503b8d3ba243d516a4c92f25e728d17bccc4c8c
873ba033d4c470f88512544bbaeab2a5dbfbf7a6
/Java/Project 3/Floatp.java
82ce6a2e67546f0fce9cc2eac8ec9f6fd88376cc
[]
no_license
derickh93/School-Code
a888c88d8cf1270865b84867c4ed4dcaee619613
fea2081956ceb9941f3ceb58e04fbe8f5b7b4f23
refs/heads/main
2023-05-27T04:41:42.522130
2021-06-10T05:22:04
2021-06-10T05:22:04
301,509,770
0
0
null
null
null
null
UTF-8
Java
false
false
387
java
class Floatp extends Primary { float val; Floatp(float f) { val = f; } public String toString() { return this.getClass().getName() + " : " + val; } void printParseTree(String indent) { String indent1 = indent+" "; super.printParseTree(indent); IO.displayln(indent1 + indent1.length() + " " + val); } Val Eval() { return new FloatVal(val); } }
617afc4341c0cb2e647667dfe80471c137f2f496
40304730ea043e99c4967e9220d8e79956aa27cd
/consumer/src/main/java/com/PaDa/controller/StudentHandler.java
a2f1e2074556864d286b2e134b901a0444a6f8dd
[]
no_license
0PaDa0/SpringCloud
5c21ea7b01d2afa2a07f77cd6eeb5aa6b6432d69
38ce8a826cdd832b3ca24735e4f9186ccb2e5022
refs/heads/master
2022-11-02T05:07:57.097551
2020-06-12T18:04:15
2020-06-12T18:04:15
271,849,969
0
0
null
null
null
null
UTF-8
Java
false
false
713
java
package com.PaDa.controller; import com.PaDa.entity.Student; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; import java.util.Collection; @RestController @RequestMapping("/consumer") public class StudentHandler { @Autowired private RestTemplate restTemplate; @GetMapping("/findAll") public Collection<Student> findAll(){ return restTemplate.getForEntity("http://localhost:8010/student/findAll",Collection.class).getBody(); } }
7906f8b031ed90a59ee944c3fd05e955d2ab775c
d28dcdf2154fdff2839817834ea7ccbfadd349d6
/src/main/java/net/playblack/cuboids/gameinterface/CWorld.java
07f00c493727cbda761c479b44d28e630a6eeb7e
[ "BSD-2-Clause" ]
permissive
darkdiplomat/Cuboids
39b1b6087bb633163cf15fb7d636b9a0f6c5ac4f
97246bfb267192dd0000fb4d1a35ae60cc2c431c
refs/heads/master
2021-01-18T09:56:58.256623
2013-09-10T09:36:21
2013-09-10T09:36:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,298
java
package net.playblack.cuboids.gameinterface; import net.playblack.cuboids.blocks.CBlock; import net.playblack.mcutils.Vector; /** * Adapter for a world object. Implement this to map to your local world * * @author chris * */ public abstract class CWorld { /** * Get fully qualified (unique) world name * * @implementation This must be a _ divided concatenation of the actual * world name and the current dimension. For example: * mountainWorld_NORMAL or mountainWorld_NETHER etc * @return */ public abstract String getName(); /** * Get the current dimension * * @return */ public abstract int getDimension(); /** * Get this worlds ID * * @return */ public abstract int getId(); /** * Get the block from the current position * * @implementation This must check for chests, double chests and signs and * send the corresponding block! This must also do position * corrections for block positions * @param position * @return */ public abstract CBlock getBlockAt(Vector position); /** * Get a block form the current x,y,z position * * @implementation This must check for chests, double chests and signs and * send the corresponding block! This must also do position * corrections for block positions * @param x * @param y * @param z * @return */ protected abstract CBlock getBlockAt(int x, int y, int z); /** * Check if a chunk is loaded * * @param position * @return */ public abstract boolean isChunkLoaded(Vector position); /** * Check if a chunk is loaded * * @param x * @param y * @param z * @return */ public abstract boolean isChunkLoaded(int x, int y, int z); /** * Load a chunk there * * @param position */ public abstract void loadChunk(Vector position); /** * Load a chunk there * * @param x * @param y * @param z */ public abstract void loadChunk(int x, int y, int z); /** * Get current RELATIVE time of this world * * @return */ public abstract long getTime(); /** * Get the ground level - that is the last block before air (sky) * * @param x * @param z * @return */ public abstract int getHighestBlock(int x, int z); /** * Set block type and data in a world * * @implementation This must check for chests, double chests and sign * contents after placing a block! * @param type * @param data * @param v */ public abstract void setBlockAt(short type, byte data, Vector v); /** * Set a block type in the world * * @implementation This must check for chests, double chests and sign * contents after placing a block! * @param type * @param v */ public abstract void setBlockAt(short type, Vector v); /** * Set a block at the given position * * @implementation This must check for chests, double chests and sign * contents after placing a block! * @param position * @param block */ public abstract void setBlockAt(Vector position, CBlock block); /** * Set the block data in a world * * @param data * @param v */ public abstract void setBlockData(byte data, Vector v); /** * Return the name of a dimension by its Id (NETHER, NORMAL, END, * EXTRABREIT, etc) * * @param dim * @return */ public abstract String dimensionFromId(int dim); /** * Get a name combination for the world consisting of * WorldName_WorldDimension * * @return */ public abstract String getFilePrefix(); /** * Check if this world is implemented as CanaryMod world * @return */ public abstract boolean isCanaryModWorld(); /** * Check if this world is implemented as Bukkit world * @return */ public abstract boolean isBukkitWorld(); }
00a41afbe806ad1d4c9b2c228019cfb0d8b3ac03
dad58132832f19e09667181236ee8b781c3a2f7f
/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/VAppReference.java
6833ffff014a679c61a65c982274037b3fbe7548
[ "Apache-2.0" ]
permissive
danikov/jclouds
d08cb3169eb15a8e49a3e4ee4946549e7976b512
588a7c38ad2ffb7a10fb5c434d8f9fda8510dc0d
refs/heads/master
2021-01-18T20:57:11.057424
2012-04-27T02:21:19
2012-04-27T02:21:19
2,746,934
0
1
null
null
null
null
UTF-8
Java
false
false
2,122
java
/* * Licensed to jclouds, Inc. (jclouds) under one or more * contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. jclouds licenses this file * to you 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 org.jclouds.vcloud.director.v1_5.domain; import java.net.URI; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "VAppReference") public class VAppReference extends Reference { public static Builder<?> builder() { return new ConcreteBuilder(); } @Override public Builder<?> toBuilder() { return builder().fromVAppReference(this); } private static class ConcreteBuilder extends Builder<ConcreteBuilder> { } public static class Builder<B extends Builder<B>> extends Reference.Builder<B> { @Override public VAppReference build() { return new VAppReference(this); } protected B fromVAppReference(VAppReference in) { return fromReference(in); } } public VAppReference(Builder<?> builder) { super(builder); } public VAppReference(URI href, String id, String name, String type) { super(href, id, name, type); } protected VAppReference() { // For JAXB } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; VAppReference that = VAppReference.class.cast(o); return super.equals(that); } // NOTE hashcode inheritted from Reference }
f03b3e18be3f193a2ad453d6c39e2ed708ba25e5
66b29e3878bcf9259e203cb17a4447971bf7c851
/service/service_sys/src/main/java/com/pactera/sys/service/impl/FzUserServiceImpl.java
826447581d2fd8abe13ece3ec2442a7af96f5230
[]
no_license
yixuan30/base
78ccd25cbee1f5ca0eed1d0f6cf1adca7dd2cc47
83512b11c64a0a52639ee755e05beb148880d280
refs/heads/master
2022-12-12T00:56:05.640478
2020-09-03T08:17:57
2020-09-03T08:17:57
288,607,766
2
1
null
null
null
null
UTF-8
Java
false
false
14,102
java
package com.pactera.sys.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.pactera.commonUtils.JWTUtils; import com.pactera.commonUtils.MD5Utils; import com.pactera.config.exceptionhandler.pacteraException; import com.pactera.sys.bean.ActiveUser; import com.pactera.sys.config.jwt.JWTToken; import com.pactera.sys.converter.MenuConverter; import com.pactera.sys.converter.UserConverter; import com.pactera.sys.entity.*; import com.pactera.sys.entity.enums.UserStatusEnum; import com.pactera.sys.entity.enums.UserTypeEnum; import com.pactera.sys.entity.menu.MenuNodeVO; import com.pactera.sys.entity.page.PageVo; import com.pactera.sys.entity.role.RoleVo; import com.pactera.sys.entity.user.UserEditVo; import com.pactera.sys.entity.user.UserInfoVo; import com.pactera.sys.entity.user.UserQuery; import com.pactera.sys.entity.vo.UserInfo; import com.pactera.sys.entity.vo.UserVo; import com.pactera.sys.mapper.FzUserMapper; import com.pactera.sys.service.*; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.pactera.sys.utils.MenuTreeBuilder; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import java.util.*; import java.util.stream.Collectors; /** * <p> * 服务实现类 * </p> * * @author yixuan30 * @since 2020-08-19 */ @Service public class FzUserServiceImpl extends ServiceImpl<FzUserMapper, FzUser> implements FzUserService { @Autowired private FzUserRoleService fzUserRoleService; @Autowired private FzRoleService fzRoleService; @Autowired private FzRoleMenuService fzRoleMenuService; @Autowired private FzMenuService fzMenuService; @Autowired private UserConverter userConverter; /* * 添加用户信息 * */ @Override public void addUser(UserVo user) { //封装用户信息 FzUser fzUser = new FzUser(); BeanUtils.copyProperties(user,fzUser); String salt=UUID.randomUUID().toString().substring(0,32); fzUser.setPassword(MD5Utils.md5Encryption(user.getPassword(), salt)); fzUser.setSalt(salt); fzUser.setType(UserTypeEnum.SYSTEM_USER.getTypeCode());//添加的用户默认是普通用户 fzUser.setState(UserStatusEnum.AVAILABLE.getStatusCode());//添加的用户默认启用 fzUser.setAvatar("https://education-1010.oss-cn-beijing.aliyuncs.com/logo.jpg"); baseMapper.insert(fzUser); } /* * 修改用户状态 * */ @Override public void updateStatus(String id, Boolean status) { FzUser fzUser = baseMapper.selectById(id); if(fzUser == null){ throw new pacteraException(2001,"用户不存在"); } ActiveUser activeUser = (ActiveUser)SecurityUtils.getSubject().getPrincipal(); if(fzUser.getUserId().equals(activeUser.getUser().getUserId())){ throw new pacteraException(2001,"不予许禁用当前用户"); }else { FzUser u = new FzUser(); u.setUserId(id); u.setState(status ? UserStatusEnum.DISABLE.getStatusCode() : UserStatusEnum.AVAILABLE.getStatusCode()); baseMapper.updateById(u); } } /* * 编辑用户 * */ @Override public UserEditVo edit(String id) { FzUser user = baseMapper.selectById(id); if(user ==null){ throw new pacteraException(2001,"用户不错在"); } UserEditVo userEditVo = new UserEditVo(); BeanUtils.copyProperties(user,userEditVo); return userEditVo; } /* * 更新用户 * */ @Override public void update1(String id, UserEditVo userEditVo) { FzUser user = baseMapper.selectById(id); String username = userEditVo.getUserName(); if(user ==null){ throw new pacteraException(2001,"用户不错在"); } QueryWrapper<FzUser> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("user_name",username); Integer res = baseMapper.selectCount(queryWrapper); if(res==0){ throw new pacteraException(2001,"用户名已被占用"); } FzUser user1 = new FzUser(); BeanUtils.copyProperties(userEditVo,user1); user1.setUserId(user.getUserId()); baseMapper.updateById(user1); } /* * 用户列表 * */ @Override public PageVo<UserVo> findUserList(Integer pageNum, Integer pageSize, UserVo userVo) { PageHelper.startPage(pageNum,pageSize); String username = userVo.getUserName(); String nickname = userVo.getNickName(); Integer sex = userVo.getSex(); String email = userVo.getEmail(); QueryWrapper<FzUser> queryWrapper = new QueryWrapper<>(); if(username!=null&&!"".equals(username)){ queryWrapper.like("user_name",username); } if(nickname!=null&&!"".equals(nickname)){ queryWrapper.like("nick_name","nickname"); } if(email!=null&&!"".equals(email)){ queryWrapper.like("email",email); } if(sex!=null){ queryWrapper.like("sex",sex); } List<FzUser> fzUsers = baseMapper.selectList(queryWrapper); List<UserVo> userVos = userConverter.converterToUserVOList(fzUsers); PageInfo<FzUser> info = new PageInfo<>(fzUsers); return new PageVo<>(info.getTotal(),userVos); } /* * 根据id查询用户信息 * */ @Override public UserInfo getUserById(String id) { UserInfo userInfo = new UserInfo(); //获取用户信息 FzUser fzUser = this.getById(id); if(fzUser != null) { BeanUtils.copyProperties(fzUser, userInfo); } QueryWrapper<FzUserRole> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("user_id",id); // //根据id所有的用户-角色信息 List<FzUserRole> listUserRole = fzUserRoleService.list(queryWrapper); List<RoleVo> listRole = new ArrayList<>(); //封装角色信息 for(FzUserRole userRole : listUserRole){ RoleVo roleVo = new RoleVo(); BeanUtils.copyProperties(userRole,roleVo); if(roleVo != null){ listRole.add(roleVo); } } userInfo.setRolelist(listRole); return userInfo; } /* * 删除用户信息 * */ @Override public void delUserByid(String id) { FzUser user = baseMapper.selectById(id); if(user==null){ throw new pacteraException(2001,"要删除的用户不存在"); } ActiveUser activeUser = (ActiveUser)SecurityUtils.getSubject().getPrincipal(); if(activeUser.getUser().getUserId().equals(user.getUserId())){ throw new pacteraException(2001,"不能删除当前登录的用户"); } baseMapper.deleteById(id); //删除对应的角色 QueryWrapper<FzUserRole> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("user_id",id); //根据id所有的用户-角色信息 fzUserRoleService.remove(queryWrapper); } /* * 给用分配角色 * */ @Override public void assignRoles(String id, String[] ids) { FzUser fzUser = baseMapper.selectById(id); if(fzUser==null){ throw new pacteraException(2001,"用户不存在"); } //删除之前的分配 QueryWrapper<FzUserRole> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("user_id",id); fzUserRoleService.remove(queryWrapper); //添加现在的分配 if(ids.length>0){ for(String rid : ids){ FzRole role = fzRoleService.getById(rid); if(role == null){ throw new pacteraException(2001,"该角色不存在"); } if(role.getState().equals("0")){ throw new pacteraException(2001,"该用户已被禁用"); } FzUserRole fzUserRole = new FzUserRole(); fzUserRole.setUserId(id); fzUserRole.setRoleId(rid); fzUserRoleService.save(fzUserRole); } } } /* * 用户登录 * */ @Override public String login(UserQuery userQuery) { String token; String name = userQuery.getUsername(); String password = userQuery.getPassword(); FzUser user = findUserByName(name); if(user!=null){ String salt =user.getSalt(); //秘钥为盐 String target = MD5Utils.md5Encryption(password, salt); //生成token token = JWTUtils.sign(name, target); JWTToken jwtToken = new JWTToken(token); try { SecurityUtils.getSubject().login(jwtToken); } catch (AuthenticationException e) { throw new pacteraException(2001,e.getMessage()); } }else { throw new pacteraException(2001,"用户未找到"); } return token; } /* * 根据用户名查询用户 * */ public FzUser findUserByName(String name) { QueryWrapper<FzUser> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("user_name",name); FzUser one = this.getOne(queryWrapper); return one; } /* * 根据id获取角色 * */ @Override public List<FzRole> findRolesById(String userId) { QueryWrapper<FzUserRole> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("user_id",userId); List<FzUserRole> URlist = fzUserRoleService.list(queryWrapper); List<String> ids = new ArrayList<>(); List<FzRole> roles = new ArrayList<>(); if(!CollectionUtils.isEmpty(URlist)){ //获取ids for (FzUserRole userRole : URlist){ ids.add(userRole.getRoleId()); } //获取roles if(!CollectionUtils.isEmpty(ids)){ for(String id : ids){ FzRole role = fzRoleService.getById(id); roles.add(role); } } } return roles; } /* *根据角色获取菜单 * */ @Override public List<FzMenu> findMenuByRoles(List<FzRole> roles) { List<FzMenu> menus = new ArrayList<>(); if(!CollectionUtils.isEmpty(roles)){ //使用set集合去重 Set<String> menuIds = new HashSet<>(); List<FzRoleMenu> roleMenus; //获取roleMenus for(FzRole role : roles){ QueryWrapper<FzRoleMenu> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("role_id",role.getRoleId()); roleMenus = fzRoleMenuService.list(queryWrapper); //获取menuIds if(!CollectionUtils.isEmpty(roleMenus)){ for(FzRoleMenu roleMenu: roleMenus){ menuIds.add(roleMenu.getMenuId()); } } //获取menus if(!CollectionUtils.isEmpty(menuIds)){ for (String menuId: menuIds){ FzMenu menu = fzMenuService.getById(menuId); menus.add(menu); } } } } return menus; } /* * 获取用户信息 * */ @Override public UserInfoVo info() { ActiveUser activeUser = (ActiveUser) SecurityUtils.getSubject().getPrincipal(); UserInfoVo userInfoVo = new UserInfoVo(); userInfoVo.setAvatar(activeUser.getUser().getAvatar()); userInfoVo.setUserName(activeUser.getUser().getUserName()); userInfoVo.setNickName(activeUser.getUser().getNickName()); userInfoVo.setUrl(activeUser.getUrls()); List<String> roleNames = activeUser.getRoles().stream().map(FzRole::getRoleName).collect(Collectors.toList()); userInfoVo.setRoles(roleNames); userInfoVo.setPerms(activeUser.getPermissions()); userInfoVo.setIsAdmin(activeUser.getUser().getType()== UserTypeEnum.SYSTEM_ADMIN.getTypeCode()); return userInfoVo; } /* * 获取菜单 * */ @Override public List<MenuNodeVO> findMenu() { List<FzMenu> menus =null; List<MenuNodeVO> menuNodeVOS = new ArrayList<>(); ActiveUser activeUser = (ActiveUser)SecurityUtils.getSubject().getPrincipal(); if(activeUser.getUser().getType()==UserTypeEnum.SYSTEM_ADMIN.getTypeCode()){ //超级管理员 menus = fzMenuService.selectAll(); }else if(activeUser.getUser().getType() == UserTypeEnum.SYSTEM_USER.getTypeCode()){ //普通用户 menus = activeUser.getMenus(); } if(!CollectionUtils.isEmpty(menus)){ menuNodeVOS = MenuConverter.converterToMenuNodeVO(menus); } return MenuTreeBuilder.build(menuNodeVOS); } /* * 用户拥有的角色Ids * */ @Override public List<String> roles(String id) { List<String> roleIds = new ArrayList<>(); QueryWrapper<FzUserRole> queryWrapper = new QueryWrapper<>(); List<FzUserRole> lists = fzUserRoleService.list(queryWrapper); if(!CollectionUtils.isEmpty(lists)){ for(FzUserRole list : lists){ FzRole role = fzRoleService.getById(list.getRoleId()); if(role != null){ roleIds.add(role.getRoleId()); } } } return roleIds; } }
05396ee6765d4b7d41b2f3aafc86c3a1c4f26b0d
7e723643210fb9b9329b55a25e41341d33149f71
/RobotSmailHelper/app/src/main/java/com/jeff/robotsmailhelper/application/MyApplication.java
1f7d0031cee7252613fbbf752122e8aa8c081b8d
[]
no_license
lxchenyong/ChatRobot
ef7fd709f1dd0bfa716ab31b22365ed54f72724a
1b92688029f4cbb3ff861046d688060d6730b950
refs/heads/master
2021-01-23T02:48:18.409693
2017-08-26T10:20:40
2017-08-26T10:20:40
86,024,048
0
0
null
null
null
null
UTF-8
Java
false
false
369
java
package com.jeff.robotsmailhelper.application; import org.litepal.LitePal; import bz.sunlight.volleylibrary.StorageApplication; /** * 自定义application * Created by chen_yong on 2017/3/29. */ public class MyApplication extends StorageApplication { @Override public void onCreate() { super.onCreate(); LitePal.initialize(this); } }
0f8c723f99ed4e1b060ba92bf8021e1456aaab15
7d8622045826ca5328cccb57466821409e40715a
/src/ood/payment/Booking.java
6a7f1409676fe5396591cff0ced696b925bd86af
[]
no_license
yashiljijhotiya/Interview-Prep
5f298f7ad22a19396c6c06821778e58dde9b0019
190eccbac554a1afc85b8ae9990ee7a09955b081
refs/heads/master
2022-11-04T20:43:53.263403
2022-10-10T12:00:51
2022-10-10T12:00:51
227,983,786
0
0
null
null
null
null
UTF-8
Java
false
false
259
java
package ood.payment; import ood.enums.BookingStatus; import java.util.Date; public class Booking { private String bookingNumber; private int noOfBookings; private Date createdOn; private BookingStatus status; private Payment payment; }
973924d2d8e58bfbe6b4a4ec873cd08bbd779413
4b2c479327968b216da9fd44e752a92d2a4780ca
/src/main/java/ch/hslu/oop/sw04/Line.java
989ba5c9ef2b95c879f09f55f196cd444025c72a
[]
no_license
Lucaraid/oop_project
4ef7eb20556297047d27e46857ce57f384f8c5d3
ff0bdfee582ac74e22ed0b6b1f4daa401859e79d
refs/heads/master
2020-03-13T00:34:46.876096
2018-05-08T11:16:26
2018-05-08T11:16:26
130,889,567
0
0
null
null
null
null
UTF-8
Java
false
false
1,389
java
package ch.hslu.oop.sw04; /** * */ public class Line { private Point startPoint, endPoint; private int x1, y1, x2, y2; public static void main(String[] args) { Point startPoint = new Point(1,2); Point endPoint = new Point(3,4); Line line1 = new Line(startPoint, endPoint); Point newStartPoint = new Point(5, 6); line1.setStartPoint(newStartPoint); line1.startPoint.setX(2); Line line2 = new Line(11,12,13,14); line2.setStartPoint(15,16); } public Line(int x1, int y1, int x2, int y2 ) { this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; this.startPoint = new Point(x1,y1); this.endPoint = new Point(x2,y2); } public Line(Point point1, Point point2) { this.startPoint = point1; this.endPoint = point2; } public Point getStartPoint() { return this.startPoint; } public Point getEndPoint() { return this.endPoint; } public void setStartPoint(Point startPoint){ this.startPoint = startPoint; } public void setEndPoint(Point endPoint){ this.endPoint = endPoint; } public void setStartPoint(int x, int y){ this.x1 = x; this.y1 = y; } public void setEndPoint(int x, int y){ this.x2 = x; this.y2 = y; } }
3a4a8c0918a4e8861016217cff4d68ce6d642a3e
a7ec1f2a5f2a793ea8f1c294df3c2ddedaaaad1d
/insane-test/src/main/java/com/kh/insane/salary/model/vo/Provision.java
faf01059ad03c04bee366592c209409215ef250c
[]
no_license
orderthan23/insane
26e48910b89d789c85a1a4a79e5ffca465e47b76
7096d61aff4325013ac59748a154036ca72a00b0
refs/heads/master
2022-12-09T18:10:08.338069
2020-09-28T12:16:43
2020-09-28T12:16:43
299,295,373
0
0
null
null
null
null
UTF-8
Java
false
false
4,436
java
package com.kh.insane.salary.model.vo; public class Provision { // PROVISION 테이블 private int provisionSeq; // PROVISION_SEQ 지급수당코드 private String provisionName;// PROVISION_NAME 지급항목명 private String taxYn;// TAX_YN 과세비과세구분 private String provisionType;// PROVISION_TYPE 지급항목유형 private int provisionLimit;// PROVISION_LIMIT 지급금액한도 private String npnYn;// NPN_YN 국민연금여부 private String hlthinsYn;// HLTHINS_YN 건강보험여부 private String empInsuranceYn;// EMP_INSURANCE_YN 고용보험여부 private String incomeTaxYn;// INCOME_TAX_YN 소득세여부 private String usageStatus; private int companyNo;// COMPANY_NO 회사번호 // PROVISION_HISTORY 테이블, PROVISION_SEQ를 기준으로 LEFT JOIN private int provisionHistorySeq; private int empNoSeq; private int amount; private String payDate; public Provision() { super(); } public Provision(int provisionSeq, String provisionName, String taxYn, String provisionType, int provisionLimit, String npnYn, String hlthinsYn, String empInsuranceYn, String incomeTaxYn, String usageStatus, int companyNo, int provisionHistorySeq, int empNoSeq, int amount, String payDate) { super(); this.provisionSeq = provisionSeq; this.provisionName = provisionName; this.taxYn = taxYn; this.provisionType = provisionType; this.provisionLimit = provisionLimit; this.npnYn = npnYn; this.hlthinsYn = hlthinsYn; this.empInsuranceYn = empInsuranceYn; this.incomeTaxYn = incomeTaxYn; this.usageStatus = usageStatus; this.companyNo = companyNo; this.provisionHistorySeq = provisionHistorySeq; this.empNoSeq = empNoSeq; this.amount = amount; this.payDate = payDate; } public int getProvisionSeq() { return provisionSeq; } public void setProvisionSeq(int provisionSeq) { this.provisionSeq = provisionSeq; } public String getProvisionName() { return provisionName; } public void setProvisionName(String provisionName) { this.provisionName = provisionName; } public String getTaxYn() { return taxYn; } public void setTaxYn(String taxYn) { this.taxYn = taxYn; } public String getProvisionType() { return provisionType; } public void setProvisionType(String provisionType) { this.provisionType = provisionType; } public int getProvisionLimit() { return provisionLimit; } public void setProvisionLimit(int provisionLimit) { this.provisionLimit = provisionLimit; } public String getNpnYn() { return npnYn; } public void setNpnYn(String npnYn) { this.npnYn = npnYn; } public String getHlthinsYn() { return hlthinsYn; } public void setHlthinsYn(String hlthinsYn) { this.hlthinsYn = hlthinsYn; } public String getEmpInsuranceYn() { return empInsuranceYn; } public void setEmpInsuranceYn(String empInsuranceYn) { this.empInsuranceYn = empInsuranceYn; } public String getIncomeTaxYn() { return incomeTaxYn; } public void setIncomeTaxYn(String incomeTaxYn) { this.incomeTaxYn = incomeTaxYn; } public String getUsageStatus() { return usageStatus; } public void setUsageStatus(String usageStatus) { this.usageStatus = usageStatus; } public int getCompanyNo() { return companyNo; } public void setCompanyNo(int companyNo) { this.companyNo = companyNo; } public int getProvisionHistorySeq() { return provisionHistorySeq; } public void setProvisionHistorySeq(int provisionHistorySeq) { this.provisionHistorySeq = provisionHistorySeq; } public int getEmpNoSeq() { return empNoSeq; } public void setEmpNoSeq(int empNoSeq) { this.empNoSeq = empNoSeq; } public int getAmount() { return amount; } public void setAmount(int amount) { this.amount = amount; } public String getPayDate() { return payDate; } public void setPayDate(String payDate) { this.payDate = payDate; } @Override public String toString() { return "Provision [provisionSeq=" + provisionSeq + ", provisionName=" + provisionName + ", taxYn=" + taxYn + ", provisionType=" + provisionType + ", provisionLimit=" + provisionLimit + ", npnYn=" + npnYn + ", hlthinsYn=" + hlthinsYn + ", empInsuranceYn=" + empInsuranceYn + ", incomeTaxYn=" + incomeTaxYn + ", usageStatus=" + usageStatus + ", companyNo=" + companyNo + ", provisionHistorySeq=" + provisionHistorySeq + ", empNoSeq=" + empNoSeq + ", amount=" + amount + ", payDate=" + payDate + "]"; } }
72b5539ff741e8a702ecca9d1c1448cdf09311c2
25887e77403165f04e8b43a4cc8ce016e51a9dad
/tools/com.liferay.ide.portlet.ui.tests/src/com/liferay/ide/portlet/ui/tests/JSFPortletWizard.java
75757ebc1ff6729457bb0b016188b0316c6edc0d
[]
no_license
gamerson/liferay-ide-tests
e307bbe87fc40237c6e13907284b1eb8a82def4b
098b7a34699b98a223080eb340ada0946bd3f0df
refs/heads/master
2021-01-16T23:34:44.140146
2017-06-06T05:29:24
2017-06-09T07:42:17
52,887,467
0
8
null
2017-06-09T07:42:18
2016-03-01T15:29:49
Java
UTF-8
Java
false
false
2,031
java
/******************************************************************************* * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library 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 2.1 of the License, or (at your option) * any later version. * * This library 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. * *******************************************************************************/ package com.liferay.ide.portlet.ui.tests; import com.liferay.ide.ui.tests.UIBase; /** * @author Li Lu */ public interface JSFPortletWizard extends UIBase { final String CREATE_VIRW_FILES = "Create view files"; final int INDEX__JSF_VALIDATION_MESSAGE1 = 2; final int INDEX_JSF_VALIDATION_MESSAGE2 = 4; final int INDEX_JSF_VALIDATION_MESSAGE3 = 6; final String LABEL_ICE_FACES = "ICEfaces"; final String LABEL_LIFERAY_FACES_ALLOY = "Liferay Faces Alloy"; final String LABEL_PRIME_FACES = "PrimeFaces"; final String LABEL_RICH_FACES = "RichFaces"; final String LABEL_STANDARD_JSF = "Standard JSF"; final String LABEL_VIEW_FOLDER = "View folder:"; final String PORTLET_CLASS_DEFAULT_VALUE = "javax.portlet.faces.GenericFacesPortlet"; final String TEXT_JSP_FOLDER_CANOT_BE_EMPTY = " JSP folder cannot be empty."; final String TEXT_MUST_BE_VALID_PORTLET_CLASS = " JSF portlet class must be a valid portlet class."; final String TEXT_MUST_SPECIFY_JSF_PORTLET_CLASS = " Must specify a JSF portlet class."; final String TEXT_VIEW_FILE_OEVERWRITTEN = " View file already exists and will be overwritten."; final String TEXT_VIEWS_SHOULD_IN_WEB_INF_FOLDER = " The views should be generated in the WEB-INF folder."; }
7143d67b6587bba2a36ed1bb6c2d594d7e7e9c1c
a8acd956cea7475ff0470a8c3393a1186787161d
/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java
b8be732803c858db1d731c5f7d5ea6a0672d12fa
[]
no_license
kslat3r/ob-aisp-balances-autogen-api
72cb1ab70322d6444956019885f3ab9e49f82418
97fb45611f4f684e3fcd99d847842e06a8f0e9d4
refs/heads/master
2020-06-12T20:37:32.699869
2019-06-29T17:56:19
2019-06-29T17:56:19
194,418,264
1
0
null
null
null
null
UTF-8
Java
false
false
2,974
java
package org.openapitools.configuration; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.util.UriComponentsBuilder; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.service.Contact; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.paths.Paths; import springfox.documentation.spring.web.paths.RelativePathProvider; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; import javax.servlet.ServletContext; @Configuration @EnableSwagger2 public class OpenAPIDocumentationConfig { ApiInfo apiInfo() { return new ApiInfoBuilder() .title("Account and Transaction API Specification") .description("Swagger for Account and Transaction API Specification") .license("open-licence") .licenseUrl("https://www.openbanking.org.uk/open-licence") .termsOfServiceUrl("") .version("v3.1.0") .contact(new Contact("","", "[email protected]")) .build(); } @Bean public Docket customImplementation(ServletContext servletContext, @Value("${openapi.ob-aisp-balances-autogen-api.base-path:/open-banking/v3.1/aisp}") String basePath) { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.sapient.aisp.balances.api")) .build() .pathProvider(new BasePathAwareRelativePathProvider(servletContext, basePath)) .directModelSubstitute(java.time.LocalDate.class, java.sql.Date.class) .directModelSubstitute(java.time.OffsetDateTime.class, java.util.Date.class) .apiInfo(apiInfo()); } class BasePathAwareRelativePathProvider extends RelativePathProvider { private String basePath; public BasePathAwareRelativePathProvider(ServletContext servletContext, String basePath) { super(servletContext); this.basePath = basePath; } @Override protected String applicationPath() { return Paths.removeAdjacentForwardSlashes(UriComponentsBuilder.fromPath(super.applicationPath()).path(basePath).build().toString()); } @Override public String getOperationPath(String operationPath) { UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromPath("/"); return Paths.removeAdjacentForwardSlashes( uriComponentsBuilder.path(operationPath.replaceFirst("^" + basePath, "")).build().toString()); } } }
13ab06eb8623ebfa423e2e01580e33ea8b175db7
1ba7b9fc0123bcfbe02bcf2d49e46c5191e90c34
/src/baidu/Main.java
7a5672eb7b5efe4ac31201086b40b6fe9446e26f
[]
no_license
hackjus/Interview-Algorithm
af17d9da6ed15488a4e3b8a96b35e172f4581b7d
6ce33625ac348c1b96d58eb54869d752d5c8d4da
refs/heads/master
2022-12-29T16:19:58.031295
2020-10-18T09:17:49
2020-10-18T09:17:49
287,580,693
0
0
null
null
null
null
UTF-8
Java
false
false
1,693
java
package baidu; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { int[] x = {1, 2, 3, 4, 7, 9}; System.out.println(Arrays.binarySearch(x, 5)); Scanner in = new Scanner(System.in); int k = in.nextInt(); for (int i = 0; i < k; i++) { int n = in.nextInt(); int m = in.nextInt(); int[] cost = new int[n]; for (int j = 0; j < cost.length; j++) { cost[j] = in.nextInt(); } int[] arr = new int[m]; for (int a = 0; a < arr.length; a++) { arr[a] = in.nextInt(); } Arrays.sort(arr); List<Integer> res = new ArrayList<>(); for (int b = 0; b < cost.length; b++) { int index = Arrays.binarySearch(arr, cost[b]); if (index == -1 || -index > arr.length) { res.add(0); } else if (index >= 0 && index < arr.length) { res.add(arr.length - index); } else { res.add(arr.length + index + 1); } // int cnt = 0; // for (int j = 0; j < arr.length; j++) { // if (arr[j] >= cost[b]) { // cnt++; // } // } // res.add(cnt); } for (int b1 = 0; b1 < res.size() - 1; b1++) { System.out.print(res.get(b1) + " "); } System.out.print(res.get(res.size() - 1)); } } }
29e34caca439b0198017d8ed6a60502ed0dc598a
ddd81a639eb986b0f6c6887be92df338101ec743
/src/main/java/com/example/tgpmsystem/utils/JwtUtil.java
187f6718114ca80cd39bb0f2957c73bea7f7d288
[]
no_license
crnwtxxi/TgpmService
50c3fc80d3f592370ad3ad32ecf31fbd212d81d0
e94068147e8ea15f416a1391d4dedd47dd4410be
refs/heads/master
2023-04-30T12:12:39.808748
2021-05-11T13:03:18
2021-05-11T13:03:18
366,383,793
0
0
null
null
null
null
UTF-8
Java
false
false
2,199
java
package com.example.tgpmsystem.utils; import io.jsonwebtoken.Claims; import io.jsonwebtoken.JwtBuilder; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import org.springframework.http.converter.json.GsonBuilderUtils; import java.util.Date; import java.util.Map; public class JwtUtil { //盐值 private static String key = "67abce7685c5023375a91114b02c26a1"; //毫秒 private static long ttl = Constants.TimeValueInMillions.HOUR_2;//2个小时 public String getKey() { return key; } public void setKey(String key) { this.key = key; } public long getTtl() { return ttl; } public void setTtl(long ttl) { this.ttl = ttl; } /** * @param claims 载荷内容 * @param ttl 有效时长 * @return */ public static String createToken(Map<String, Object> claims, long ttl) { JwtUtil.ttl = ttl; return createToken(claims); } public static String createRefreshToken(String userId, long ttl) { long nowMillis = System.currentTimeMillis(); Date now = new Date(nowMillis); JwtBuilder builder = Jwts.builder().setId(userId) .setIssuedAt(now) .signWith(SignatureAlgorithm.HS256, key); if (ttl > 0) { builder.setExpiration(new Date(nowMillis + ttl)); } return builder.compact(); } /** * @param claims 载荷 * @return token */ public static String createToken(Map<String, Object> claims) { long nowMillis = System.currentTimeMillis(); Date now = new Date(nowMillis); JwtBuilder builder = Jwts.builder() .setIssuedAt(now) .signWith(SignatureAlgorithm.HS256, key); if (claims != null) { builder.setClaims(claims); } if (ttl > 0) { builder.setExpiration(new Date(nowMillis + ttl)); } return builder.compact(); } public static Claims parseJWT(String jwtStr) { return Jwts.parser() .setSigningKey(key) .parseClaimsJws(jwtStr) .getBody(); } }
71be2fbe8c410394a7c024db528c71b088b2cab2
e5fe1d4b35655f7b8e25d4318879e03937681ee3
/BeanWiringImplicitAnnotatio/src/edu/jspiders/beanwiringimplicitxmlcpu/beans/MotherBoard.java
a2e4b5070df42f6659f8fd8e6a73ebbabdbc68b3
[]
no_license
NitheshKrishnan/HESM15
c0ad4cd3d2d7e52ec4c2461285a497d8fec6021c
5d93924320a90c9dc25714868edc594efbaebd04
refs/heads/master
2020-07-03T21:17:23.768357
2019-08-22T02:41:52
2019-08-22T02:41:52
202,052,583
0
0
null
null
null
null
UTF-8
Java
false
false
856
java
package edu.jspiders.beanwiringimplicitxmlcpu.beans; import java.io.Serializable; public class MotherBoard implements Serializable { private String brand; private String dimension; private double price; public MotherBoard() { System.out.println(this.getClass().getSimpleName()+" Object Created"); } public String getBrand() { return brand; } public void setBrand(String brand) { this.brand = brand; } public String getDimension() { return dimension; } public void setDimension(String dimension) { this.dimension = dimension; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } @Override public String toString() { return "MotherBoard [brand=" + brand + ", dimension=" + dimension + ", price=" + price + "]"; } }
7fe5d7340da9e91bb4f8fd0a9bbf3a02709c8259
d96cbdb4f7cbe45946b891bf8fe5f47c4fde33bc
/src/test/java/com/tecsup/gestion/dao/RoutesDAOTest.java
81425a124c3eef5325a69925f5a3288a40f4ae03
[]
no_license
hipcam/PI_Spring
bfe81e6e15173a17d8474c9439fa2b5ccd1bfa18
03261850882002aac541242c07a931635c82a184
refs/heads/master
2020-03-18T18:44:50.297349
2018-06-08T09:15:30
2018-06-08T09:15:30
134,218,499
0
0
null
null
null
null
UTF-8
Java
false
false
2,814
java
package com.tecsup.gestion.dao; import static org.junit.Assert.fail; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import com.tecsup.gestion.exception.DAOException; import com.tecsup.gestion.exception.EmptyResultException; import com.tecsup.gestion.model.Route; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("file:src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml") @WebAppConfiguration public class RoutesDAOTest { private static final Logger logger = LoggerFactory.getLogger(RoutesDAOTest.class); @Autowired private RouteDAO routeDAO; @BeforeClass public static void beforeClass() { logger.info("Antes de todos los metodos"); } @Before public void before() { logger.info("Antes de cada metodo"); } @Test public void testFindRouteByName() { try { // Route rou = routeDAO.findRouteByName("Aviacion"); Assert.assertEquals("-12.029788 -76.998393", rou.getUbicacion()); Assert.assertEquals( "07:10:00", rou.getHorapartida()); Assert.assertNotNull(rou); logger.info(rou.toString()); } catch (EmptyResultException e) { fail(e.getMessage()); } catch (DAOException e) { fail(e.getMessage()); } } //@Test //public void testCreateEmployee() { //logger.info("--"); // //String LOGIN = "aalvarado2"; //logger.info(LOGIN); //String PWD = "123"; //String FIRSTNAME = "Fernanda"; //String LASTNAME = "Alvarado"; //int SALARY = 3000; //int AGE = 19; //int DEPT_ID = 14; //try { // // // employeeDAO.create(LOGIN, PWD, FIRSTNAME, LASTNAME, SALARY, AGE, DEPT_ID); // // // Employee emp = employeeDAO.findEmployeeByLogin(LOGIN); // Assert.assertEquals(PWD, emp.getPassword()); // Assert.assertEquals(FIRSTNAME, emp.getFirstname()); // Assert.assertEquals(LASTNAME, emp.getLastname()); // Assert.assertEquals(SALARY, emp.getSalary()); // Assert.assertEquals(AGE, emp.getAge()); //} catch (DAOException e) { // fail(e.getMessage()); //} catch (EmptyResultException e) { // fail(e.getMessage()); //} //} @After public void after() { logger.info("Despues de cada metodo"); } @AfterClass public static void afterClass() { logger.info("Despues de todos los metodos"); } }
[ "" ]
68141670b90c4c8bdc92f2801779a243fdccded8
fdd4fe64e780ae3de2b2a64ade6b035be7f1cef9
/src/main/java/com/microguru/api/domain/Card.java
0f813e96ac3d727d6f3bcfb3c190b833cfd44a79
[]
no_license
mguruk/spring-rest-api-sample
a36f8f29ace9c423c38a962d4742b82f80393774
b0e96f06c9d9525413ab9bf1075e855a6f087590
refs/heads/main
2023-07-01T03:16:22.635285
2021-08-03T04:46:59
2021-08-03T04:46:59
392,192,521
0
0
null
null
null
null
UTF-8
Java
false
false
1,446
java
package com.microguru.api.domain; import java.io.Serializable; import java.util.HashMap; import java.util.Map; public class Card implements Serializable { private String type; private String number; private ExpirationDate expirationDate; private String iban; private String swift; private Map<String, Object> additionalProperties = new HashMap<String, Object>(); private final static long serialVersionUID = -2019262357400841962L; public String getType() { return type; } public void setType(String type) { this.type = type; } public String getNumber() { return number; } public void setNumber(String number) { this.number = number; } public ExpirationDate getExpirationDate() { return expirationDate; } public void setExpirationDate(ExpirationDate expirationDate) { this.expirationDate = expirationDate; } public String getIban() { return iban; } public void setIban(String iban) { this.iban = iban; } public String getSwift() { return swift; } public void setSwift(String swift) { this.swift = swift; } public Map<String, Object> getAdditionalProperties() { return this.additionalProperties; } public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } }
c65329822d3854bc5e7e53ea9d4f6e5b8e4fd1a5
60b4c47647daa872744621eaa2ded12fa07aa7c6
/src/main/java/cc/christen/app/service/mapper/package-info.java
c994d136cc2f78fcba3bb2ecc0f15e4ae05c641d
[]
no_license
BulkSecurityGeneratorProject20/store
298b3ab03d5bb03153920b8c32fdf54cd7eba7f8
eb36011fb1b6cbb13d51d69ae8f9f4dd1d08fd67
refs/heads/master
2022-12-14T11:28:56.074679
2018-07-15T13:13:19
2018-07-15T13:13:19
296,662,608
0
0
null
2020-09-18T15:39:13
2020-09-18T15:39:12
null
UTF-8
Java
false
false
123
java
/** * MapStruct mappers for mapping domain objects and Data Transfer Objects. */ package cc.christen.app.service.mapper;
d971e997078601138b54a6b28f016779f308c51a
3fc0ac5b232512af0d878473531d03f47651b05f
/src/main/java/com/jeecms/cms/action/member/ForgotPasswordAct.java
78397fba9c5055638cb7f6867a756de9cfc50230
[]
no_license
cderfdsa/jeecms-1
95ead45d60a1a26be528b0c7755c1b2d6b579abb
b75cdab89d547718e0b5605c95f2bed2a4e70f6f
refs/heads/master
2020-07-13T09:04:08.476104
2019-07-31T09:38:15
2019-07-31T09:38:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
11,337
java
package com.jeecms.cms.action.member; import com.jeecms.cms.api.Constants; import com.jeecms.cms.api.ResponseCode; import com.jeecms.cms.web.Token; import com.jeecms.common.email.EmailSender; import com.jeecms.common.email.MessageTemplate; import com.jeecms.common.security.encoder.PwdEncoder; import com.jeecms.common.web.RequestUtils; import com.jeecms.common.web.session.SessionProvider; import com.jeecms.core.entity.CmsConfig; import com.jeecms.core.entity.CmsSite; import com.jeecms.core.entity.UnifiedUser; import com.jeecms.core.manager.ConfigMng; import com.jeecms.core.manager.UnifiedUserMng; import com.jeecms.core.web.WebErrors; import com.jeecms.core.web.util.CmsUtils; import com.jeecms.core.web.util.FrontUtils; import com.octo.captcha.service.CaptchaServiceException; import com.octo.captcha.service.image.ImageCaptchaService; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.Serializable; import java.util.Date; import static com.jeecms.cms.Constants.TPLDIR_MEMBER; /** * 找回密码Action * * 用户忘记密码后点击找回密码链接,输入用户名、邮箱和验证码<li> * 如果信息正确,返回一个提示页面,并发送一封找回密码的邮件,邮件包含一个链接及新密码,点击链接新密码即生效<li> * 如果输入错误或服务器邮箱等信息设置不完整,则给出提示信息<li> */ @Controller public class ForgotPasswordAct { private static Logger log = LoggerFactory .getLogger(ForgotPasswordAct.class); public static final String FORGOT_PASSWORD_INPUT = "tpl.forgotPasswordInput"; public static final String FORGOT_PASSWORD_RESULT = "tpl.forgotPasswordResult"; public static final String PASSWORD_RESET = "tpl.passwordReset"; public static final String PASSWORD_SMS_RESET = "tpl.setNewPassword"; /** * 找回密码输入页 * * @param request * @param response * @param models * @return */ @Token(save=true) @RequestMapping(value = "/member/forgot_password.jspx", method = RequestMethod.GET) public String forgotPasswordInput(HttpServletRequest request, HttpServletResponse response, ModelMap model) { CmsSite site = CmsUtils.getSite(request); CmsConfig config = site.getConfig(); Integer validateType = 0; if(config.getValidateType() != null) { validateType = config.getValidateType(); } Integer isSMSForgotPassword = 0;//是否开启SMS找回密码 if(validateType == 2) { isSMSForgotPassword = 1; } model.addAttribute("isSMSForgotPassword", isSMSForgotPassword); FrontUtils.frontData(request, model, site); return FrontUtils.getTplPath(request, site.getSolutionPath(), TPLDIR_MEMBER, FORGOT_PASSWORD_INPUT); } /** * 找回密码提交页 * * @param username * @param email * @param captcha * @param request * @param response * @return */ @Token(remove=true) @RequestMapping(value = "/member/forgot_password.jspx", method = RequestMethod.POST) public String forgotPasswordSubmit(String email, String captcha, HttpServletRequest request, HttpServletResponse response, ModelMap model,String mobile) { CmsSite site = CmsUtils.getSite(request); CmsConfig config = site.getConfig(); WebErrors errors = WebErrors.create(request); String username=RequestUtils.getQueryParam(request,"username"); Boolean isSMSForgotPassword = false;//是否开启SMS找回密码 if (config.getValidateType() == 2) { isSMSForgotPassword = true; } if(isSMSForgotPassword) { errors = validateSMSForgotPasswordSubmit(username, mobile, captcha, request, response); }else { errors = validateForgotPasswordSubmit(username, email, captcha, request, response); } if (errors.hasErrors()) { return FrontUtils.showError(request, response, model, errors); } if(isSMSForgotPassword) { //把用户保存到SESSION中 UnifiedUser user = unifiedUserMng.getByUsername(username); session.setAttribute(request, response, "FOTGOTPWD_USER_ID", user.getId()); //跳转到创建新密码页面 model.addAttribute("username", username); FrontUtils.frontData(request, model, site); return FrontUtils.getTplPath(request, site.getSolutionPath(), TPLDIR_MEMBER, PASSWORD_SMS_RESET); } UnifiedUser user = unifiedUserMng.getByUsername(username); EmailSender sender = configMng.getEmailSender(); MessageTemplate msgTpl = configMng.getForgotPasswordMessageTemplate(); model.addAttribute("user", user); FrontUtils.frontData(request, model, site); if (user == null) { // 用户名不存在 model.addAttribute("status", 1); } else if (StringUtils.isBlank(user.getEmail())) { // 用户没有设置邮箱 model.addAttribute("status", 2); } else if (!user.getEmail().equals(email)) { // 邮箱输入错误 model.addAttribute("status", 3); } else if (sender == null) { // 邮件服务器没有设置好 model.addAttribute("status", 4); } else if (msgTpl == null) { // 邮件模板没有设置好 model.addAttribute("status", 5); } else { try { unifiedUserMng.passwordForgotten(user.getId(), sender, msgTpl); model.addAttribute("status", 0); } catch (Exception e) { // 发送邮件异常 model.addAttribute("status", 100); model.addAttribute("message", e.getMessage()); log.error("send email exception.", e); } } return FrontUtils.getTplPath(request, site.getSolutionPath(), TPLDIR_MEMBER, FORGOT_PASSWORD_RESULT); } @RequestMapping(value = "/member/password_reset.jspx", method = RequestMethod.GET) public String passwordReset(Integer uid, String key, HttpServletRequest request, HttpServletResponse response, ModelMap model) { CmsSite site = CmsUtils.getSite(request); WebErrors errors = validatePasswordReset(uid, key, request); if (errors.hasErrors()) { return FrontUtils.showError(request, response, model, errors); } UnifiedUser user = unifiedUserMng.findById(uid); if (user == null) { // 用户不存在 model.addAttribute("status", 1); } else if (StringUtils.isBlank(user.getResetKey())) { // resetKey不存在 model.addAttribute("status", 2); } else if (!user.getResetKey().equals(key)) { // 重置key错误 model.addAttribute("status", 3); } else { unifiedUserMng.resetPassword(uid); model.addAttribute("status", 0); } FrontUtils.frontData(request, model, site); return FrontUtils.getTplPath(request, site.getSolutionPath(), TPLDIR_MEMBER, PASSWORD_RESET); } //SMS验证密码修改 @RequestMapping(value="sms_password_reset.jspx",method=RequestMethod.POST) public String smsRestPassword(String username,String loginPassword,HttpServletRequest request, HttpServletResponse response,ModelMap model) { CmsSite site = CmsUtils.getSite(request); WebErrors errors = WebErrors.create(request); //获取session中的用户ID Integer userId = (Integer) session.getAttribute(request,"FOTGOTPWD_USER_ID"); if(StringUtils.isBlank(username) || StringUtils.isBlank(loginPassword)) { errors.addErrorString(Constants.API_MESSAGE_PARAM_REQUIRED); errors.addErrorString(ResponseCode.API_CODE_PARAM_REQUIRED); }else if(userId == null) { //验证过期 errors.addErrorString(Constants.API_MESSAGE_USER_STATUS_OVER_TIME); errors.addErrorString(ResponseCode.API_CODE_USER_STATUS_OVER_TIME); } if(errors.hasErrors()) { return FrontUtils.showError(request, response, model, errors); } UnifiedUser user = unifiedUserMng.findById(userId); if(user == null) { errors.addErrorString(Constants.API_MESSAGE_USER_NOT_FOUND); errors.addErrorString(ResponseCode.API_CODE_USER_NOT_FOUND); }else if(!username.equals(user.getUsername())) { errors.addErrorString(Constants.API_MESSAGE_PARAM_ERROR); errors.addErrorString(ResponseCode.API_CODE_PARAM_ERROR); } if(errors.hasErrors()) { return FrontUtils.showError(request, response, model, errors); }else { user.setPassword(pwdEncoder.encodePassword(loginPassword)); unifiedUserMng.restPassword(user); model.addAttribute("status", 0); } FrontUtils.frontData(request, model, site); return FrontUtils.getTplPath(request, site.getSolutionPath(), TPLDIR_MEMBER, PASSWORD_RESET); } private WebErrors validateForgotPasswordSubmit(String username, String email, String captcha, HttpServletRequest request, HttpServletResponse response) { WebErrors errors = WebErrors.create(request); if (errors.ifBlank(username, "username", 100, true)) { return errors; } if (errors.ifBlank(email, "email", 100, true)) { return errors; } if (errors.ifBlank(captcha, "captcha", 20, true)) { return errors; } try { if (!imageCaptchaService.validateResponseForID(session .getSessionId(request, response), captcha)) { errors.addErrorCode("error.invalidCaptcha"); return errors; } } catch (CaptchaServiceException e) { errors.addErrorCode("error.exceptionCaptcha"); log.warn("", e); return errors; } return errors; } /** * 校验SMS找回密码 * */ private WebErrors validateSMSForgotPasswordSubmit(String username, String mobile, String captcha, HttpServletRequest request, HttpServletResponse response) { WebErrors errors = WebErrors.create(request); if (errors.ifBlank(username, "username", 100, true)) { return errors; } if (errors.ifBlank(mobile, "mobile", 20, true)) { return errors; } if (errors.ifBlank(captcha, "captcha", 20, true)) { return errors; } Serializable autoCodeTime = session.getAttribute(request, "FORGOTPWD_AUTO_CODE_CREAT_TIME");// 验证码有效时间 Serializable autoCode = session.getAttribute(request, "FORGOTPWD_AUTO_CODE");// 验证码值 // 判断验证码是否在有效时间范围 if (autoCodeTime != null && autoCode != null) { Long effectiveTime = Long.parseLong(autoCodeTime.toString()); if (effectiveTime > new Date().getTime()) { // 验证码验证码是否正确 if (captcha.equals(autoCode.toString())) { session.setAttribute(request, response, "FORGOTPWD_AUTO_CODE_CREAT_TIME", null); } else { // 验证码不正确 errors.addErrorCode("error.invalidCaptcha"); } } else { // 验证码失效 errors.addErrorCode("error.invalidCaptcha");//loseEfficacyCaptcha } } else { // 验证码错误 errors.addErrorCode("error.invalidCaptcha"); } return errors; } private WebErrors validatePasswordReset(Integer uid, String key, HttpServletRequest request) { WebErrors errors = WebErrors.create(request); if (errors.ifNull(uid, "uid", true)) { return errors; } if (errors.ifBlank(key, "key", 50, true)) { return errors; } return errors; } @Autowired private UnifiedUserMng unifiedUserMng; @Autowired private ConfigMng configMng; @Autowired private SessionProvider session; @Autowired private ImageCaptchaService imageCaptchaService; @Autowired private PwdEncoder pwdEncoder; }
5b70366fb309bdc41c8d1c51a7fe5dfb074669a4
878b0db310c68f26075c16170a5dc8a4bb0a7e5e
/account_service/src/test/java/net/medrag/account_service/service/CustomMetricsModeTest.java
ce841e817c58ad1936dc0c1073f731e3d2261c8d
[]
no_license
Suomessa/ifuture
ecd68cca069fb5dde60ca0ac21684807389fefc3
efbbeb90376b4254bbc7951ea95e81a0d61d2265
refs/heads/master
2023-03-16T12:17:51.396254
2020-06-28T13:38:35
2020-06-28T13:38:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,961
java
package net.medrag.account_service.service; import net.medrag.account_service.model.Statistics; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit.jupiter.SpringExtension; import java.lang.reflect.Field; import java.util.concurrent.atomic.AtomicInteger; import static org.junit.jupiter.api.Assertions.*; /** * Some more useless tests */ @ExtendWith(SpringExtension.class) @TestPropertySource(locations = "classpath:test.properties") class CustomMetricsModeTest { @TestConfiguration @ComponentScan("net.medrag") static class TestConfig { } @Autowired private CustomMetricsMode mode; @Test void increaseGetAmountCount() throws NoSuchFieldException, IllegalAccessException { mode.increaseGetAmountCount(); Class<? extends CustomMetricsMode> aClass = mode.getClass(); Field getAmountField = aClass.getDeclaredField("getAmountEndpointRequestsCount"); getAmountField.setAccessible(true); Integer count = ((AtomicInteger)getAmountField.get(mode)).get(); assertEquals(1, count); } @Test void increaseAddAmountCount() throws NoSuchFieldException, IllegalAccessException { mode.increaseAddAmountCount(); Class<? extends CustomMetricsMode> aClass = mode.getClass(); Field addAmountField = aClass.getDeclaredField("addAmountEndpointRequestsCount"); addAmountField.setAccessible(true); Integer count = ((AtomicInteger)addAmountField.get(mode)).get(); assertEquals(1, count); } @Test void getStats() { Statistics stats = mode.getStats(); assertNotNull(stats); } }
[ "fg2946gznal30fu2" ]
fg2946gznal30fu2
b6c41e13c11c2b6c45969f6db2cbb9add470ede9
4beb274e3d197a22d248a94ab8f36d38304716ea
/design/src/main/java/com/tomclaw/design/PseudoSpinnerView.java
61f967d7190a50caeea5739028f1ade43d793bef
[ "MIT" ]
permissive
solkin/mandarin-android
ecd59c1807991391fa41da90628a72e68822b157
b49ba9c5d6757aeaa6fb9c1a138bb401f09d6102
refs/heads/master
2023-04-05T05:34:26.021628
2021-03-02T19:23:49
2021-03-02T19:23:49
8,887,274
22
5
null
null
null
null
UTF-8
Java
false
false
856
java
package com.tomclaw.design; import android.content.Context; import android.content.res.TypedArray; import android.graphics.PorterDuff; import androidx.appcompat.widget.AppCompatTextView; import android.util.AttributeSet; import android.util.TypedValue; /** * Created by solkin on 29.05.15. */ public class PseudoSpinnerView extends AppCompatTextView { public PseudoSpinnerView(Context context, AttributeSet attrs) { super(context, attrs); TypedValue typedValue = new TypedValue(); TypedArray a = context.obtainStyledAttributes(typedValue.data, new int[]{R.attr.spinner_triangle_color}); try { int accentColor = a.getColor(0, 0); getBackground().setColorFilter(accentColor, PorterDuff.Mode.SRC_ATOP); } finally { a.recycle(); } } }
9a85044a8bbbac3f74478cfeb87762059607abd1
508ffdb40a3d9ecb84a0a10dfb3f745cd2b4d27f
/Java/code/web-ui/src/java/org/cluj/bus/model/MapInfo.java
0d00407c48e68704d18502e36584122be2203faa
[ "Apache-2.0" ]
permissive
abotos/ClujLiveTransit
8626b50b50d1f97e0ffc2c18bd1bb8413ac4ab01
fa69e20ca0811cdff6dc0ecad1235aa0cb8ec3c7
refs/heads/master
2021-01-01T06:27:22.199353
2014-03-16T07:40:46
2014-03-16T07:40:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,068
java
/* * ************************************************************************* * Copyright (C) FRS Belgium NV ("FRSGlobal"). All rights reserved. * * This computer program is protected by copyright law and international * treaties. Unauthorized reproduction or distribution of this program, * or any portion of it, may result in severe civil and criminal penalties, * and will be prosecuted to the maximum extent possible under the law. * ************************************************************************* */ package org.cluj.bus.model; import java.util.Collection; public class MapInfo { private StationInfo stationInfo; private Collection<BusInfo> busInfos; public StationInfo getStationInfo() { return stationInfo; } public void setStationInfo(StationInfo stationInfo) { this.stationInfo = stationInfo; } public Collection<BusInfo> getBusInfos() { return busInfos; } public void setBusInfos(Collection<BusInfo> busInfos) { this.busInfos = busInfos; } }
ce6ea589d50ffd8f839d86df64bd10dd55e1dbe3
6100bb97604bd6ddc1174167b12cdfbe32703be7
/tass/bcel-5.1/src/src/java/org/apache/bcel/classfile/LineNumber.java
19a265cdf099c7b647cf1dcbf69e85c58bf98eb3
[ "Apache-2.0", "BSD-2-Clause", "Apache-1.1" ]
permissive
zathras/java.net
1c06bce2f8218f63b0a3174c774872d5bb43882c
cc10f2dbe6879dd2f387631510e2fb247b43aa62
refs/heads/master
2023-02-02T12:34:11.749192
2022-01-27T04:50:00
2022-01-27T04:50:00
176,968,689
13
3
null
null
null
null
UTF-8
Java
false
false
5,370
java
package org.apache.bcel.classfile; /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" and * "Apache BCEL" must not be used to endorse or promote products * derived from this software without prior written permission. For * written permission, please contact [email protected]. * * 5. Products derived from this software may not be called "Apache", * "Apache BCEL", nor may "Apache" appear in their name, without * prior written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR * ITS 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ import org.apache.bcel.Constants; import java.io.*; /** * This class represents a (PC offset, line number) pair, i.e., a line number in * the source that corresponds to a relative address in the byte code. This * is used for debugging purposes. * * @version $Id: LineNumber.java,v 1.1.1.1 2006/05/19 19:26:07 billf Exp $ * @author <A HREF="mailto:[email protected]">M. Dahm</A> * @see LineNumberTable */ public final class LineNumber implements Cloneable, Node, Serializable { private int start_pc; // Program Counter (PC) corresponds to line private int line_number; // number in source file /** * Initialize from another object. */ public LineNumber(LineNumber c) { this(c.getStartPC(), c.getLineNumber()); } /** * Construct object from file stream. * @param file Input stream * @throws IOException */ LineNumber(DataInputStream file) throws IOException { this(file.readUnsignedShort(), file.readUnsignedShort()); } /** * @param start_pc Program Counter (PC) corresponds to * @param line_number line number in source file */ public LineNumber(int start_pc, int line_number) { this.start_pc = start_pc; this.line_number = line_number; } /** * Called by objects that are traversing the nodes of the tree implicitely * defined by the contents of a Java class. I.e., the hierarchy of methods, * fields, attributes, etc. spawns a tree of objects. * * @param v Visitor object */ public void accept(Visitor v) { v.visitLineNumber(this); } /** * Dump line number/pc pair to file stream in binary format. * * @param file Output file stream * @throws IOException */ public final void dump(DataOutputStream file) throws IOException { file.writeShort(start_pc); file.writeShort(line_number); } /** * @return Corresponding source line */ public final int getLineNumber() { return line_number; } /** * @return PC in code */ public final int getStartPC() { return start_pc; } /** * @param line_number. */ public final void setLineNumber(int line_number) { this.line_number = line_number; } /** * @param start_pc. */ public final void setStartPC(int start_pc) { this.start_pc = start_pc; } /** * @return String representation */ public final String toString() { return "LineNumber(" + start_pc + ", " + line_number + ")"; } /** * @return deep copy of this object */ public LineNumber copy() { try { return (LineNumber)clone(); } catch(CloneNotSupportedException e) {} return null; } }
7265d5a718595a7bc2bd12519952f77f20baa3a4
0396d0e7cf12171e9a6f6972e6cc21732a55aa28
/src/main/java/de/vwgis/kafkatitanixexercise/model/PassengersData.java
820baf9691879d62d25d2adec99a6fea48b8e5d5
[]
no_license
Vilkaz/kafka-titanix-exercise
b4727237fe2baa53924ba1b1cc6ab145ce080ce1
5d468c2e083373d89dc8c742189e38d914b78536
refs/heads/master
2022-11-26T04:20:20.520204
2020-07-31T08:07:25
2020-07-31T08:07:25
278,098,956
0
0
null
null
null
null
UTF-8
Java
false
false
1,146
java
package de.vwgis.kafkatitanixexercise.model; import lombok.Data; import org.springframework.stereotype.Component; /** * A Class for to accumulate Data about all Passengers. * * Kinda like replacement for a DB in this exercise. */ @Data public class PassengersData { private int male; private int female; private int maleSurvivors; private int femaleSurvivors; public void consumePassenger(BasicPassenger passenger) { //here we have a potenial exception if a gender is not classified. //Ask PO how he want to handle it SurvivorCounter survivorCounter = SurvivorCounter.valueOf(passenger.getSex()); survivorCounter.count(passenger, this); } void consumeMale(BasicPassenger passenger) { male++; maleSurvivors += passenger.getSurvived() ? 1 : 0; } void consumeFemale(BasicPassenger passenger) { female++; femaleSurvivors += passenger.getSurvived() ? 1 : 0; } public String getStatus() { return String.format("Males: %d (%d survivors) Females %d (%d survivors)", male, maleSurvivors, female, femaleSurvivors); } }
c25fdf82d40e22a3663f7fc9394f0ec4dda55b1c
78da5c34df2d9f98592fffca68752c1104905e39
/LTIWebExample/src/com/lti/servletExamples/Example1.java
1027b5d0922c57033fbef7f36a0ee6f643bdb257
[]
no_license
architRaj2159/ProjectGladiator
8444bc948e3442a5b62657732fbb8201cc676ec1
415cbf29323edfe5dc0e52f83041daa31182744d
refs/heads/master
2022-12-16T17:35:20.282270
2020-08-27T20:58:47
2020-08-27T20:58:47
289,845,618
0
0
null
null
null
null
UTF-8
Java
false
false
877
java
package com.lti.servletExamples; import java.io.IOException; import java.io.PrintWriter; import java.time.LocalDate; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Servlet implementation class Example1 */ @WebServlet("/Hello.exe") // URL or URI of the servlets public class Example1 extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.write("<html><body>"); out.write("<h1>Welcome to the world of servlets</h1>"); out.write("<h2>Today's date: " + LocalDate.now() + "</h2>"); out.write("</body></html>"); } }
7a1c24f63197b15387313921cb93820dd499360b
0faf5c3affe35c9bd105903945cf1be391aa84e4
/app/src/main/java/com/example/sampramudana/mvp32api/Main/Activity/MainActivity.java
c0b07bae6b051b655c1bbb9b47882769ae33be88
[]
no_license
Sampramudana/MVP32API
0465cddafbba9e56264985eaf1af4c99a9a0693f
670542de16693729909d79581bbb1ee0f6e4cf9a
refs/heads/master
2020-04-01T19:39:04.054225
2018-10-18T04:43:55
2018-10-18T04:43:55
153,564,726
0
0
null
null
null
null
UTF-8
Java
false
false
1,541
java
package com.example.sampramudana.mvp32api.Main.Activity; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import com.example.sampramudana.mvp32api.Main.Adapter.MainAdapter; import com.example.sampramudana.mvp32api.Main.Model.ArticlesItem; import com.example.sampramudana.mvp32api.Main.Presenter.MainPresenter; import com.example.sampramudana.mvp32api.Main.View.MainView; import com.example.sampramudana.mvp32api.R; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; public class MainActivity extends AppCompatActivity implements MainView { @BindView(R.id.recyclerNFL) RecyclerView recyclerNFL; private MainPresenter mainPresenter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ButterKnife.bind(this); mainPresenter = new MainPresenter(); onAttachView(); } @Override public void onError(String msg) { } @Override public void onSuccess(List<ArticlesItem> data) { recyclerNFL.setLayoutManager(new LinearLayoutManager(this)); recyclerNFL.setAdapter(new MainAdapter(MainActivity.this, data)); } @Override public void onAttachView() { mainPresenter.onAttach(this); mainPresenter.getData(); } @Override public void onDettachView() { } }
9f83c7f58dc97b248bea862a9c7d6a92c7f3b2d7
37a7c112c8c50f1920229ad8ed6a90583e8ce4c8
/src/zrsy/dao/helper/GpHelper.java
a3c4baaeb8f5d87c30742d8df73e987941e26d70
[]
no_license
yeqingyun/pdm
a25ebe6a4aed80c8a706a4cafbedd97ea114f9d6
80cdaf5d84711b0fbd72ba04e1a966971af12ceb
refs/heads/master
2021-04-12T11:27:28.603837
2018-08-16T13:56:19
2018-08-16T13:56:19
126,423,239
1
0
null
null
null
null
UTF-8
Java
false
false
1,438
java
package zrsy.dao.helper; import java.sql.ResultSet; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; import zrsy.vo.Gp; public class GpHelper extends BasicGpHelper { public String getSqlString() { return " from Gp " + " left join SyDef on (SyDef.SyId = Gp.SyId) " + " where 1=1 "; //" where 1=1 and GpName <> '超级用户' "; } public List<Gp> getQueryList(ResultSet rs,String fields) throws java.sql.SQLException { ArrayList<Gp> list = new ArrayList<Gp>(); String[] _fields = fields.split(","); try { while(rs.next()) { Gp gp = new Gp(); for(int i=0;i<_fields.length;i++) { if(_fields[i].equals("GpId") || _fields[i].equals("Gp.GpId")) gp.setGpId(rs.getInt("GpId")); if(_fields[i].equals("SyId") || _fields[i].equals("Gp.SyId")) gp.setSyId(rs.getInt("SyId")); if(_fields[i].equals("GpName") || _fields[i].equals("Gp.GpName")) gp.setGpName(rs.getString("GpName")); if(_fields[i].equals("Remark") || _fields[i].equals("Gp.Remark")) gp.setRemark(rs.getString("Remark")); if(_fields[i].equals("SyName") || _fields[i].equals("SyDef.SyName as SyName")) gp.setSyName(rs.getString("SyName")); } list.add(gp); } } catch(java.sql.SQLException e) { Logger.getLogger(this.getClass()).error("GpHelper.getQueryList SQLException", e); throw e; } return list; } }
07199cb451e5fc6b1e93f0e3df05abba31255a2e
29c775f96e9c734e30f149e6b00382c887d6cecb
/java/src/main/java/com/jmy/service/admin/SubjectService.java
0a558e1a317c01830dbb5151ab4da85b73b69a57
[]
no_license
KrisJiang1/EASWeb
718aa28ac3d3a479d906ac05bfda83134c725b62
ab54d6be7758477ef893ce4a3ea53f1c05d9843a
refs/heads/master
2023-01-09T09:26:13.725719
2020-11-16T16:25:02
2020-11-16T16:25:02
304,688,363
0
0
null
null
null
null
UTF-8
Java
false
false
450
java
package com.jmy.service.admin; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.extension.service.IService; import com.jmy.pojo.admin.Subject; import java.util.List; import java.util.Map; public interface SubjectService extends IService<Subject> { Subject insertSubject(Subject subject); Subject updateSubject(Subject subject); Integer deleteSubject(Integer id); List<Map> listPage(JSONObject params); }
0dc3c00945efcc0d096dfe4ae577910109fc465b
7f6667ee00a1e757ccf1a12c0618a82f1e39179f
/src/model/Ticket.java
12bbc662a7583db9e31e4ebe84b694cb35aa48b4
[]
no_license
cjwen15/TicketSelling
6d7c016a4fde67114e29f6c83b2b1fa28c8bbc23
8cfd4d68760e8ef6a560a072cfd6c37d4a134427
refs/heads/master
2021-11-22T00:42:09.896694
2018-09-17T03:15:50
2018-09-17T03:15:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,362
java
package model; import java.util.ArrayList; import javax.swing.JComboBox; import javax.swing.JTextArea; import javax.swing.JTextField; public class Ticket extends Thread { //获得控件 JComboBox pathCom, com1, com2; JTextField jtf1, jtf2; JTextArea showMessage; ArrayList<Path> list = null; public JComboBox getPathCom() { return pathCom; } public void setPathCom(JComboBox pathCom) { this.pathCom = pathCom; } public JComboBox getCom1() { return com1; } public void setCom1(JComboBox com1) { this.com1 = com1; } public JComboBox getCom2() { return com2; } public void setCom2(JComboBox com2) { this.com2 = com2; } public JTextField getJtf1() { return jtf1; } public void setJtf1(JTextField jtf1) { this.jtf1 = jtf1; } public JTextField getJtf2() { return jtf2; } public void setJtf2(JTextField jtf2) { this.jtf2 = jtf2; } public JTextArea getShowMessage() { return showMessage; } public void setShowMessage(JTextArea showMessage) { this.showMessage = showMessage; } public ArrayList<Path> getList() { return list; } public void setList(ArrayList<Path> list) { this.list = list; } public void run() { synchronized (this) { if (Thread.currentThread().getName().equals("1号窗")) { int ticketCount = Integer.parseInt(jtf1.getText()); for (int i = 0; i < 4; i++) { Path pathTemp = list.get(i); if (com1.getSelectedItem().toString() == "2001" && pathTemp.getPathId() == "2001") { int ticket = pathTemp.getPathTicket(); if (ticket - ticketCount >= 0) { ticket = ticket - ticketCount; pathTemp.setPathTicket(ticket); showMessage.append(Thread.currentThread().getName() + "售票,2001号列车,车票剩余:" + ticket); showMessage.append("\n"); } else { showMessage.append("车票剩余不足,请查询具体班次列车剩余车票"); showMessage.append("\n"); } } if (com1.getSelectedItem().toString() == "2002" && pathTemp.getPathId() == "2002") { int ticket = pathTemp.getPathTicket(); if (ticket - ticketCount >= 0) { ticket = ticket - ticketCount; pathTemp.setPathTicket(ticket); showMessage.append(Thread.currentThread().getName() + "售票,2002号列车,车票剩余:" + ticket); showMessage.append("\n"); } else { showMessage.append("车票剩余不足,请查询具体班次列车剩余车票"); showMessage.append("\n"); } } if (com1.getSelectedItem().toString() == "2003" && pathTemp.getPathId() == "2003") { int ticket = pathTemp.getPathTicket(); if (ticket - ticketCount >= 0) { ticket = ticket - ticketCount; pathTemp.setPathTicket(ticket); showMessage.append(Thread.currentThread().getName() + "售票,2003号列车,车票剩余:" + ticket); showMessage.append("\n"); } else { showMessage.append("车票剩余不足,请查询具体班次列车剩余车票"); showMessage.append("\n"); } } if (com1.getSelectedItem().toString() == "2004" && pathTemp.getPathId() == "2004") { int ticket = pathTemp.getPathTicket(); if (ticket - ticketCount >= 0) { ticket = ticket - ticketCount; pathTemp.setPathTicket(ticket); showMessage.append(Thread.currentThread().getName() + "售票,2004号列车,车票剩余:" + ticket); showMessage.append("\n"); } else { showMessage.append("车票剩余不足,请查询具体班次列车剩余车票"); showMessage.append("\n"); } } } } else if (Thread.currentThread().getName().equals("2号窗")) { int ticketCount = Integer.parseInt(jtf2.getText()); for (int i = 0; i < 4; i++) { Path pathTemp = list.get(i); if (com2.getSelectedItem().toString() == "2001" && pathTemp.getPathId() == "2001") { int ticket = pathTemp.getPathTicket(); if (ticket - ticketCount >= 0) { ticket = ticket - ticketCount; pathTemp.setPathTicket(ticket); showMessage.append(Thread.currentThread().getName() + "售票,2001号列车,车票剩余:" + ticket); showMessage.append("\n"); } else { showMessage.append("车票剩余不足,请查询具体班次列车剩余车票"); showMessage.append("\n"); } } if (com2.getSelectedItem().toString() == "2002" && pathTemp.getPathId() == "2002") { int ticket = pathTemp.getPathTicket(); if (ticket - ticketCount >= 0) { ticket = ticket - ticketCount; pathTemp.setPathTicket(ticket); showMessage.append(Thread.currentThread().getName() + "售票,2002号列车,车票剩余:" + ticket); showMessage.append("\n"); } else { showMessage.append("车票剩余不足,请查询具体班次列车剩余车票"); showMessage.append("\n"); } } if (com2.getSelectedItem().toString() == "2003" && pathTemp.getPathId() == "2003") { int ticket = pathTemp.getPathTicket(); if (ticket - ticketCount >= 0) { ticket = ticket - ticketCount; pathTemp.setPathTicket(ticket); showMessage.append(Thread.currentThread().getName() + "售票,2003号列车,车票剩余:" + ticket); showMessage.append("\n"); } else { showMessage.append("车票剩余不足,请查询具体班次列车剩余车票"); showMessage.append("\n"); } } if (com2.getSelectedItem().toString() == "2004" && pathTemp.getPathId() == "2004") { int ticket = pathTemp.getPathTicket(); if (ticket - ticketCount >= 0) { ticket = ticket - ticketCount; pathTemp.setPathTicket(ticket); showMessage.append(Thread.currentThread().getName() + "售票,2004号列车,车票剩余:" + ticket); showMessage.append("\n"); } else { showMessage.append("车票剩余不足,请查询具体班次列车剩余车票"); showMessage.append("\n"); } } } } try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } } }
57b8c8279f6363df5724d960517d50bb2aad7a42
70612533c98269a724799a0fb1c792f5717d5d3f
/src/main/java/com/example/demo/model/MessageForm.java
512a6fcbb1aa9c414bbb10f1bc9d8302ac5172ce
[]
no_license
soichiro0311/ElasticBeansTalkSample
076ee8bc7d9e5249991924337b8bdc2bf636b9bb
766dc2ca9cf1d2d3e184d7b28f61d4c0e1018a31
refs/heads/master
2020-04-05T10:55:33.712251
2018-11-10T17:50:20
2018-11-10T17:50:20
156,816,110
0
0
null
null
null
null
UTF-8
Java
false
false
407
java
package com.example.demo.model; import javax.validation.constraints.Size; public class MessageForm { @Size(max = 80) private String name; @Size(min = 1, max = 140) private String text; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getText() { return text; } public void setText(String text) { this.text = text; } }
20da569bd711f53808dfd28843d62ed3c195193f
bbcd74f1d9f20beea0d8aafdf7965d89fbed3cea
/QuickStart/src/test/java/QuickStart/QuickStart/AppTest.java
20bd18567b9831400c1958adef3292df71b66fee
[]
no_license
yigonglou/QuickStart
fdca349fa4f3ed332c144db04599b98c4cd06e40
619e62b65d3489fe1beb7d6166c0430e02a9a1e3
refs/heads/master
2021-05-20T10:10:27.945308
2020-04-01T20:22:23
2020-04-01T20:22:23
252,241,980
0
0
null
2020-10-13T20:49:52
2020-04-01T17:26:09
HTML
UTF-8
Java
false
false
858
java
package QuickStart.QuickStart; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest( String testName ) { super( testName ); System.out.println("Test Name " + testName); } /** * @return the suite of tests being tested */ public static Test suite() { System.out.println("Test Class " + AppTest.class.toString()); return new TestSuite( AppTest.class ); } /** * Rigourous Test :-) */ public void testApp() { System.out.println("testApp ..."); assertTrue( false ); } }
612549d3af24d70d0bca8c2a4c847fc316826aeb
db30ca3612ca3fdf7bd6abdf8f9c096f0a100807
/src/main/java/ndov/cdm/trein/reisinformatie/data/_2/MaterieelDeelDVSType.java
12bbf7cd7f0b8d8bacb4e154b0ae1f843279168b
[ "MIT" ]
permissive
joelhaasnoot/widt_push
2a0693f94c62561e8c057ec0eb0fd13c0d301e4a
c0a735bbfc50bf97fe71cda1f789a7bddbd3cac6
refs/heads/master
2021-01-21T12:46:19.409881
2015-03-06T13:40:06
2015-03-06T13:40:06
31,770,647
0
0
null
null
null
null
UTF-8
Java
false
false
10,790
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2014.10.07 at 09:16:58 PM CEST // package ndov.cdm.trein.reisinformatie.data._2; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * Fysieke stukken materieel * * <p>Java class for MaterieelDeelDVSType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="MaterieelDeelDVSType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="MaterieelSoort" type="{urn:ndov:cdm:trein:reisinformatie:data:2}MaterieelSoortType"/> * &lt;element name="MaterieelAanduiding" type="{urn:ndov:cdm:trein:reisinformatie:data:2}MaterieelAanduidingType"/> * &lt;element name="MaterieelLengte" type="{urn:ndov:cdm:trein:reisinformatie:data:2}MaterieelLengteType"/> * &lt;element name="MaterieelDeelVertrekPositie" type="{urn:ndov:cdm:trein:reisinformatie:data:2}MaterieelDeelVertrekPositieType" minOccurs="0"/> * &lt;element name="MaterieelDeelVolgordeVertrek" type="{urn:ndov:cdm:trein:reisinformatie:data:2}MaterieelDeelVolgordeType" minOccurs="0"/> * &lt;element name="MaterieelDeelEindBestemming" type="{urn:ndov:cdm:trein:reisinformatie:data:2}StationPlannedActueelType" maxOccurs="2" minOccurs="2"/> * &lt;element name="PresentatieMaterieelDeelEindBestemming" type="{urn:ndov:cdm:trein:reisinformatie:data:2}MeertaligeUitingenType" minOccurs="0"/> * &lt;element name="SpoorVak" type="{urn:ndov:cdm:trein:reisinformatie:data:2}SpoorVakType" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="Wijziging" type="{urn:ndov:cdm:trein:reisinformatie:data:2}WijzigingType" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="PresentatieWijziging" type="{urn:ndov:cdm:trein:reisinformatie:data:2}MeertaligeUitingenType" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MaterieelDeelDVSType", propOrder = { "materieelSoort", "materieelAanduiding", "materieelLengte", "materieelDeelVertrekPositie", "materieelDeelVolgordeVertrek", "materieelDeelEindBestemming", "presentatieMaterieelDeelEindBestemming", "spoorVak", "wijziging", "presentatieWijziging" }) public class MaterieelDeelDVSType { @XmlElement(name = "MaterieelSoort", required = true) protected String materieelSoort; @XmlElement(name = "MaterieelAanduiding", required = true) protected String materieelAanduiding; @XmlElement(name = "MaterieelLengte", required = true) protected BigInteger materieelLengte; @XmlElement(name = "MaterieelDeelVertrekPositie") protected BigInteger materieelDeelVertrekPositie; @XmlElement(name = "MaterieelDeelVolgordeVertrek") protected BigInteger materieelDeelVolgordeVertrek; @XmlElement(name = "MaterieelDeelEindBestemming", required = true) protected List<StationPlannedActueelType> materieelDeelEindBestemming; @XmlElement(name = "PresentatieMaterieelDeelEindBestemming") protected MeertaligeUitingenType presentatieMaterieelDeelEindBestemming; @XmlElement(name = "SpoorVak") protected List<String> spoorVak; @XmlElement(name = "Wijziging") protected List<WijzigingType> wijziging; @XmlElement(name = "PresentatieWijziging") protected MeertaligeUitingenType presentatieWijziging; /** * Gets the value of the materieelSoort property. * * @return * possible object is * {@link String } * */ public String getMaterieelSoort() { return materieelSoort; } /** * Sets the value of the materieelSoort property. * * @param value * allowed object is * {@link String } * */ public void setMaterieelSoort(String value) { this.materieelSoort = value; } /** * Gets the value of the materieelAanduiding property. * * @return * possible object is * {@link String } * */ public String getMaterieelAanduiding() { return materieelAanduiding; } /** * Sets the value of the materieelAanduiding property. * * @param value * allowed object is * {@link String } * */ public void setMaterieelAanduiding(String value) { this.materieelAanduiding = value; } /** * Gets the value of the materieelLengte property. * * @return * possible object is * {@link java.math.BigInteger } * */ public BigInteger getMaterieelLengte() { return materieelLengte; } /** * Sets the value of the materieelLengte property. * * @param value * allowed object is * {@link java.math.BigInteger } * */ public void setMaterieelLengte(BigInteger value) { this.materieelLengte = value; } /** * Gets the value of the materieelDeelVertrekPositie property. * * @return * possible object is * {@link java.math.BigInteger } * */ public BigInteger getMaterieelDeelVertrekPositie() { return materieelDeelVertrekPositie; } /** * Sets the value of the materieelDeelVertrekPositie property. * * @param value * allowed object is * {@link java.math.BigInteger } * */ public void setMaterieelDeelVertrekPositie(BigInteger value) { this.materieelDeelVertrekPositie = value; } /** * Gets the value of the materieelDeelVolgordeVertrek property. * * @return * possible object is * {@link java.math.BigInteger } * */ public BigInteger getMaterieelDeelVolgordeVertrek() { return materieelDeelVolgordeVertrek; } /** * Sets the value of the materieelDeelVolgordeVertrek property. * * @param value * allowed object is * {@link java.math.BigInteger } * */ public void setMaterieelDeelVolgordeVertrek(BigInteger value) { this.materieelDeelVolgordeVertrek = value; } /** * Gets the value of the materieelDeelEindBestemming property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the materieelDeelEindBestemming property. * * <p> * For example, to add a new item, do as follows: * <pre> * getMaterieelDeelEindBestemming().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link StationPlannedActueelType } * * */ public List<StationPlannedActueelType> getMaterieelDeelEindBestemming() { if (materieelDeelEindBestemming == null) { materieelDeelEindBestemming = new ArrayList<StationPlannedActueelType>(); } return this.materieelDeelEindBestemming; } /** * Gets the value of the presentatieMaterieelDeelEindBestemming property. * * @return * possible object is * {@link MeertaligeUitingenType } * */ public MeertaligeUitingenType getPresentatieMaterieelDeelEindBestemming() { return presentatieMaterieelDeelEindBestemming; } /** * Sets the value of the presentatieMaterieelDeelEindBestemming property. * * @param value * allowed object is * {@link MeertaligeUitingenType } * */ public void setPresentatieMaterieelDeelEindBestemming(MeertaligeUitingenType value) { this.presentatieMaterieelDeelEindBestemming = value; } /** * Gets the value of the spoorVak property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the spoorVak property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSpoorVak().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getSpoorVak() { if (spoorVak == null) { spoorVak = new ArrayList<String>(); } return this.spoorVak; } /** * Gets the value of the wijziging property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the wijziging property. * * <p> * For example, to add a new item, do as follows: * <pre> * getWijziging().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link ndov.cdm.trein.reisinformatie.data._2.WijzigingType } * * */ public List<WijzigingType> getWijziging() { if (wijziging == null) { wijziging = new ArrayList<WijzigingType>(); } return this.wijziging; } /** * Gets the value of the presentatieWijziging property. * * @return * possible object is * {@link MeertaligeUitingenType } * */ public MeertaligeUitingenType getPresentatieWijziging() { return presentatieWijziging; } /** * Sets the value of the presentatieWijziging property. * * @param value * allowed object is * {@link MeertaligeUitingenType } * */ public void setPresentatieWijziging(MeertaligeUitingenType value) { this.presentatieWijziging = value; } }
e9ae767a08e10b2e861af52e9ba2b56fa3bd5b7e
5b4172a52bab4acf1fbe1e9218e89b94bd33b29c
/src/unsw/dungeon/InventoryView.java
09b2d82fae3e37f6a94eadd400e7e57c4e9e4b7b
[]
no_license
declan-warn/dungeon-explorer
970ec24d767296ebed698c1ae2a4056037daf8af
4d90cf887aad093927b59721d3b6f64bcef18de0
refs/heads/master
2021-01-05T02:47:21.213340
2019-11-20T02:38:42
2019-11-20T02:38:42
240,848,943
0
0
null
null
null
null
UTF-8
Java
false
false
3,422
java
package unsw.dungeon; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.image.Image; import javafx.scene.layout.ColumnConstraints; import javafx.scene.layout.GridPane; import javafx.scene.layout.RowConstraints; import unsw.dungeon.entity.collectable.CollectableEntity; import unsw.dungeon.entity.collectable.Item; import unsw.dungeon.entity.collectable.Key; import unsw.dungeon.entity.collectable.Potion; import unsw.dungeon.entity.collectable.Sword; import unsw.dungeon.event.EventListener; import unsw.dungeon.event.ItemPickupEvent; import unsw.dungeon.event.ItemUseEvent; public class InventoryView extends GridPane implements EventListener { private final int PADDING = 4; private final int WIDTH = 3; private final int HEIGHT = 3; private final int CELL_SIZE = 32; private Map<CollectableEntity, ItemIndicator> indicators; private ItemIndicator[][] grid; public InventoryView() { this.setStyle("-fx-background-image: url('/inventory-grid.png'); -fx-background-position: top 2px left 2px;"); this.setPadding(new Insets(PADDING)); this.setAlignment(Pos.CENTER); this.setHgap(PADDING); this.setVgap(PADDING); this.setMaxWidth((CELL_SIZE + PADDING) * WIDTH); for (int x = 0; x < WIDTH; x++) { this.getColumnConstraints().add(new ColumnConstraints(CELL_SIZE)); } for (int y = 0; y < HEIGHT; y++) { this.getRowConstraints().add(new RowConstraints(CELL_SIZE)); } this.indicators = new HashMap<>(); this.grid = new ItemIndicator[HEIGHT][WIDTH]; } private void addIndicator(ItemIndicator indicator) { this.addToGrid(indicator); } private void addToGrid(ItemIndicator indicator) { int x = 0; int y = 0; find: { for (; y < HEIGHT; y++) { for (; x < WIDTH; x++) { if (this.grid[y][x] == null) break find; } } } this.grid[y][x] = indicator; this.add(indicator, x, y); } private void removeFromGrid(ItemIndicator indicator) { int x = 0; int y = 0; find: { for (; y < HEIGHT; y++) { for (; x < WIDTH; x++) { if (this.grid[y][x] == indicator) break find; } } } this.grid[y][x] = null; this.getChildren().remove(indicator); } @Override public void handle(ItemPickupEvent event) { Image img = event.getItem().getImage(); ItemIndicator indicator = new ItemIndicator(img); indicator.enable(); if (event.getRemainingUses() > 1) { indicator.setText(String.valueOf(event.getRemainingUses())); } this.addIndicator(indicator); this.indicators.put(event.getItem(), indicator); } @Override public void handle(ItemUseEvent event) { CollectableEntity item = event.getItem(); if (this.indicators.containsKey(item)) { ItemIndicator indicator = this.indicators.get(item); if (item.isType(Item.KEY)) { System.out.println("KEY USED!"); } if (event.getRemainingUses() > 0) { indicator.setText(String.valueOf(event.getRemainingUses())); } else { this.indicators.remove(indicator); this.removeFromGrid(indicator); System.out.println("REMOVNg"); } } } }
763edebf92f5f9383d94fec7a654786c8d588429
2716dd247fef3b7c0e2b08d6318e3f9451af9582
/Labs/BaseBallLeague/src/main/java/com/mycompany/baseballleague/controller/App.java
8c3910ee4d8b65a97d0136075a48c0cd8d8f4193
[]
no_license
ategt/guild-self-work
ce4a1cb0be8c65c69c1ce908d3def9aa0386d60e
55fb12c31fe70abfb315cf39bb9ef331afd05e50
refs/heads/master
2021-09-01T00:54:20.423148
2016-06-29T19:21:03
2016-06-29T19:21:03
115,227,667
0
0
null
null
null
null
UTF-8
Java
false
false
448
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 com.mycompany.baseballleague.controller; import com.mycompany.baseballleague.controller.BaseballController; /** * * @author apprentice */ public class App { public static void main(String[] args) { new BaseballController().run(); } }
26b0e84aea98b4d6e871e9c6eb7d41905255b0a3
49739a17cb09d7db35fdd1cfbb1a0c68092f6754
/src/org/parallax3d/lights/AmbientLight.java
72216799850b9fa1fcd96e53ffd047e56936daea
[ "CC-BY-3.0" ]
permissive
realh/parallax
84d9709f713fd2121a7d45ca25953624e9d033c1
37f3fbc01dfa2f346b217e4c0a86e918c35dab98
refs/heads/master
2020-02-26T15:13:51.392986
2015-11-21T17:33:16
2015-11-21T17:33:16
44,762,693
1
0
null
2015-10-22T17:47:03
2015-10-22T17:47:03
null
UTF-8
Java
false
false
2,421
java
/* * Copyright 2012 Alex Usachev, [email protected] * * This file is part of Parallax project. * * Parallax is free software: you can redistribute it and/or modify it * under the terms of the Creative Commons Attribution 3.0 Unported License. * * Parallax 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 Creative Commons Attribution * 3.0 Unported License. for more details. * * You should have received a copy of the the Creative Commons Attribution * 3.0 Unported License along with Parallax. * If not, see http://creativecommons.org/licenses/by/3.0/. */ package org.parallax3d.lights; import java.util.Map; import org.parallax3d.renderer.Float32Array; import org.parallax3d.renderer.RendererLights; import org.parallax3d.shaders.Uniform; import org.parallax3d.math.Color; /** * This light's color gets applied to all the objects in the scene globally. * * <pre> * {@code * AmbientLight light = new AmbientLight( 0xff0000 ); * getScene().add( light ); * } * </pre> * * @author thothbot * */ public final class AmbientLight extends Light { public static class UniformAmbient implements Light.UniformLight { public Float32Array colors; @Override public void reset() { this.colors = (Float32Array) Float32Array.createArray(); for(int i = 0; i < 3; i++) this.colors.set(i, 0.0); } @Override public void refreshUniform(Map<String, Uniform> uniforms) { uniforms.get("ambientLightColor").setValue( colors ); } } public AmbientLight(int hex) { super(hex); } public AmbientLight clone() { AmbientLight light = new AmbientLight(0x000000); super.clone(light); return light; } @Override public void setupRendererLights(RendererLights zlights, boolean isGammaInput) { Float32Array colors = zlights.ambient.colors; Color color = getColor(); double r = 0, g = 0, b = 0; if(colors.getLength() == 3) { r = colors.get(0); g = colors.get(1); b = colors.get(2); } if ( isGammaInput ) { r += color.getR() * color.getR(); g += color.getG() * color.getG(); b += color.getB() * color.getB(); } else { r += color.getR(); g += color.getG(); b += color.getB(); } colors.set( 0, r ); colors.set( 1, g ); colors.set( 2, b ); } }
c29c5e7d30f7464db43054d25aacb7349473e629
297b2b4dad220397902bea562655921d2695924a
/src/test/java/WarmUpTask/forMySelfPractice/P4VerifyOrder.java
05880c4aaed53b405293b668f41391099eeb66fb
[]
no_license
RajmiNakarmi/seleniumProjectB20
033d379023b85aeb75f6160a7cea48b13ee86d91
48231532fe9b5f6aa205d8ba90292d10f5fd0565
refs/heads/master
2023-01-11T09:49:50.588040
2020-11-15T15:47:00
2020-11-15T15:47:00
313,065,094
0
0
null
null
null
null
UTF-8
Java
false
false
985
java
package WarmUpTask.forMySelfPractice; import com.cybertek.utilities.SmartBearUtilities; import com.cybertek.utilities.WebDriverFactory; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; public class P4VerifyOrder { WebDriver driver; @BeforeMethod public void setupMethod() { driver = WebDriverFactory.getDriver("Chrome"); driver.get("http://secure.smartbearsoftware.com/samples/testcomplete12/WebOrders/login.aspx"); SmartBearUtilities.loginToSmartBear(driver); } @Test public void verification_Order() { WebElement name = driver.findElement(By.xpath("//td[.='Paul Brown']")); String actualName = name.getText(); String expectedName = "Paul Brown"; Assert.assertEquals(actualName, expectedName, "Result does not match"); } }
001bf61d18021c04e408d661efb6567eaea97610
49a5ca02311785f0ef2b1e4bed37fd29e5fac8da
/src/test/java/sn/delivery/neldam/repository/timezone/DateTimeWrapper.java
342103528f22753a82e2ab02774b21b4b0a7cd2e
[]
no_license
anscamou/neldam
400138896827d70e11d31f2c0c7e14fc13c921f9
d5f646f28587cf87b337797e99b57bba80146055
refs/heads/main
2023-03-24T06:11:33.663237
2021-03-17T19:03:48
2021-03-17T19:03:48
345,460,574
0
0
null
null
null
null
UTF-8
Java
false
false
3,098
java
package sn.delivery.neldam.repository.timezone; import java.io.Serializable; import java.time.*; import java.util.Objects; import javax.persistence.*; @Entity @Table(name = "jhi_date_time_wrapper") public class DateTimeWrapper implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(name = "instant") private Instant instant; @Column(name = "local_date_time") private LocalDateTime localDateTime; @Column(name = "offset_date_time") private OffsetDateTime offsetDateTime; @Column(name = "zoned_date_time") private ZonedDateTime zonedDateTime; @Column(name = "local_time") private LocalTime localTime; @Column(name = "offset_time") private OffsetTime offsetTime; @Column(name = "local_date") private LocalDate localDate; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Instant getInstant() { return instant; } public void setInstant(Instant instant) { this.instant = instant; } public LocalDateTime getLocalDateTime() { return localDateTime; } public void setLocalDateTime(LocalDateTime localDateTime) { this.localDateTime = localDateTime; } public OffsetDateTime getOffsetDateTime() { return offsetDateTime; } public void setOffsetDateTime(OffsetDateTime offsetDateTime) { this.offsetDateTime = offsetDateTime; } public ZonedDateTime getZonedDateTime() { return zonedDateTime; } public void setZonedDateTime(ZonedDateTime zonedDateTime) { this.zonedDateTime = zonedDateTime; } public LocalTime getLocalTime() { return localTime; } public void setLocalTime(LocalTime localTime) { this.localTime = localTime; } public OffsetTime getOffsetTime() { return offsetTime; } public void setOffsetTime(OffsetTime offsetTime) { this.offsetTime = offsetTime; } public LocalDate getLocalDate() { return localDate; } public void setLocalDate(LocalDate localDate) { this.localDate = localDate; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DateTimeWrapper dateTimeWrapper = (DateTimeWrapper) o; return !(dateTimeWrapper.getId() == null || getId() == null) && Objects.equals(getId(), dateTimeWrapper.getId()); } @Override public int hashCode() { return Objects.hashCode(getId()); } // prettier-ignore @Override public String toString() { return "TimeZoneTest{" + "id=" + id + ", instant=" + instant + ", localDateTime=" + localDateTime + ", offsetDateTime=" + offsetDateTime + ", zonedDateTime=" + zonedDateTime + '}'; } }
0c540879e013654b70eb108caa29931498a8a5d5
7fec055610b4441d39ddb15f3f6cfb09559b2017
/src/com/company/Archosaur.java
9d2d78368171cf4418c4fa9987573035e219a8f9
[]
no_license
Freatnor/Subclasses-Lab
7e13dfc0eec1889cf41deae88555c22ecb34e138
4a36bf8473cc98ce95f4a4e4f45dd28f103e6144
refs/heads/master
2021-01-16T19:49:46.087146
2016-06-28T18:33:05
2016-06-28T18:33:05
62,154,955
0
0
null
2016-06-28T15:58:37
2016-06-28T15:58:37
null
UTF-8
Java
false
false
1,646
java
package com.company; /** * Created by Jonathan Taylor on 6/28/16. */ public class Archosaur extends Reptile{ private boolean mIsExtinct; private boolean mIsWarmBlooded; private boolean mHasFeathers; private static final String archosaur = "\n |------They are also an Archosaur which "; private static final String extinct = "is extinct "; private static final String notExtinct = "is not extinct "; private static final String warmBlood = "is warm blooded "; private static final String coldBlood = "is cold blooded "; private static final String feathers = "and has feathers!"; private static final String noFeathers = "and has no feathers!"; public Archosaur(String name, boolean isExtinct, boolean isWarmBlooded, boolean hasFeathers) { super(name); mIsExtinct = isExtinct; mIsWarmBlooded = isWarmBlooded; mHasFeathers = hasFeathers; } public boolean isExtinct() { return mIsExtinct; } public void setExtinct(boolean extinct) { mIsExtinct = extinct; } public boolean isWarmBlooded() { return mIsWarmBlooded; } public boolean isHasFeathers() { return mHasFeathers; } @Override public String toString() { String returnString = archosaur; if(mIsExtinct) returnString += extinct; else returnString += notExtinct; if(mIsWarmBlooded) returnString += warmBlood; else returnString += coldBlood; if(mHasFeathers) returnString += feathers; else returnString += noFeathers; return super.toString() + returnString; } }
af13d7d76beabf8afb83dcd8cbe5053325da813b
b730e4b88a1fc40732d94d0beefd6d8f8cacee04
/platforms/android/src/org/linphone/LinphoneManager.java
bd927fc178627390a31f4a605a16ef475d9c8deb
[]
no_license
dannyrojas28/SoftphoneEmsGit
14f56d30eda8a1314e6fdbf3fd61aef6ff75b465
5fb8e9e28c4e89fc0db982038d92eb3455dceff2
refs/heads/master
2021-01-18T01:42:52.353693
2016-09-14T21:24:44
2016-09-14T21:24:44
68,207,569
0
0
null
null
null
null
UTF-8
Java
false
false
50,646
java
/* LinphoneManager.java Copyright (C) 2010 Belledonne Communications, Grenoble, France This program 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 of the License, or (at your option) any later version. This program 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 this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.linphone; import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.app.Activity; import android.content.BroadcastReceiver; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Configuration; import android.content.res.Resources; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.media.AudioManager; import android.media.MediaPlayer; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; import android.os.Build; import android.os.Environment; import android.os.Handler; import android.os.PowerManager; import android.os.PowerManager.WakeLock; import android.os.Vibrator; import android.provider.MediaStore; import android.provider.Settings; import android.provider.Settings.SettingNotFoundException; import android.telephony.TelephonyManager; import android.util.DisplayMetrics; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import com.techstorm.Constants; import org.linphone.compatibility.Compatibility; import org.linphone.core.CallDirection; import org.linphone.core.LinphoneAddress; import org.linphone.core.LinphoneBuffer; import org.linphone.core.LinphoneCall; import org.linphone.core.LinphoneCall.State; import org.linphone.core.LinphoneCallParams; import org.linphone.core.LinphoneCallStats; import org.linphone.core.LinphoneChatMessage; import org.linphone.core.LinphoneChatRoom; import org.linphone.core.LinphoneContent; import org.linphone.core.LinphoneCore; import org.linphone.core.LinphoneCore.EcCalibratorStatus; import org.linphone.core.LinphoneCore.GlobalState; import org.linphone.core.LinphoneCore.LogCollectionUploadState; import org.linphone.core.LinphoneCore.RegistrationState; import org.linphone.core.LinphoneCore.RemoteProvisioningState; import org.linphone.core.LinphoneCoreException; import org.linphone.core.LinphoneCoreFactory; import org.linphone.core.LinphoneCoreListener; import org.linphone.core.LinphoneEvent; import org.linphone.core.LinphoneFriend; import org.linphone.core.LinphoneFriendList; import org.linphone.core.LinphoneInfoMessage; import org.linphone.core.LinphoneProxyConfig; import org.linphone.core.PayloadType; import org.linphone.core.PresenceActivityType; import org.linphone.core.PresenceModel; import org.linphone.core.PublishState; import org.linphone.core.SubscriptionState; import org.linphone.core.TunnelConfig; import org.linphone.mediastream.Log; import org.linphone.mediastream.Version; import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration; import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration.AndroidCamera; import org.linphone.mediastream.video.capture.hwconf.Hacks; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.Timer; import java.util.TimerTask; import com.emsitel.reventa.R; import static android.media.AudioManager.MODE_RINGTONE; import static android.media.AudioManager.STREAM_RING; import static android.media.AudioManager.STREAM_VOICE_CALL; /** * * Manager of the low level LibLinphone stuff.<br /> * Including:<ul> * <li>Starting C liblinphone</li> * <li>Reacting to C liblinphone state changes</li> * <li>Calling Linphone android service listener methods</li> * <li>Interacting from Android GUI/service with low level SIP stuff/</li> * </ul> * * Add Service Listener to react to Linphone state changes. * * @author Guillaume Beraudo * */ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessage.LinphoneChatMessageListener { private static LinphoneManager instance; private Context mServiceContext; private AudioManager mAudioManager; private PowerManager mPowerManager; private Resources mR; private LinphonePreferences mPrefs; private LinphoneCore mLc; private String lastLcStatusMessage; private String basePath; private static boolean sExited; private boolean mAudioFocused; private int mLastNetworkType=-1; private ConnectivityManager mConnectivityManager; private Handler mHandler = new Handler(); private WakeLock mIncallWakeLock; private static List<LinphoneChatMessage> mPendingChatFileMessage; private static LinphoneChatMessage mUploadPendingFileMessage; public String wizardLoginViewDomain = null; private static List<LinphoneChatMessage.LinphoneChatMessageListener> simpleListeners = new ArrayList<LinphoneChatMessage.LinphoneChatMessageListener>(); public static void addListener(LinphoneChatMessage.LinphoneChatMessageListener listener) { if (!simpleListeners.contains(listener)) { simpleListeners.add(listener); } } public static void removeListener(LinphoneChatMessage.LinphoneChatMessageListener listener) { simpleListeners.remove(listener); } protected LinphoneManager(final Context c) { sExited = false; mServiceContext = c; basePath = c.getFilesDir().getAbsolutePath(); mLPConfigXsd = basePath + "/lpconfig.xsd"; mLinphoneFactoryConfigFile = basePath + "/linphonerc"; mLinphoneConfigFile = basePath + "/.linphonerc"; mLinphoneRootCaFile = basePath + "/rootca.pem"; mRingSoundFile = basePath + "/oldphone_mono.wav"; mRingbackSoundFile = basePath + "/ringback.wav"; mPauseSoundFile = basePath + "/hold.mkv"; mChatDatabaseFile = basePath + "/linphone-history.db"; mCallLogDatabaseFile = basePath + "/linphone-log-history.db"; mFriendsDatabaseFile = basePath + "/linphone-friends.db"; mErrorToneFile = basePath + "/error.wav"; mUserCertificatePath = basePath; mPrefs = LinphonePreferences.instance(); mAudioManager = ((AudioManager) c.getSystemService(Context.AUDIO_SERVICE)); mVibrator = (Vibrator) c.getSystemService(Context.VIBRATOR_SERVICE); mPowerManager = (PowerManager) c.getSystemService(Context.POWER_SERVICE); mConnectivityManager = (ConnectivityManager) c.getSystemService(Context.CONNECTIVITY_SERVICE); mR = c.getResources(); mPendingChatFileMessage = new ArrayList<LinphoneChatMessage>(); } private static final int LINPHONE_VOLUME_STREAM = STREAM_VOICE_CALL; private static final int dbStep = 4; /** Called when the activity is first created. */ private final String mLPConfigXsd; private final String mLinphoneFactoryConfigFile; private final String mLinphoneRootCaFile; public final String mLinphoneConfigFile; private final String mRingSoundFile; private final String mRingbackSoundFile; private final String mPauseSoundFile; private final String mChatDatabaseFile; private final String mCallLogDatabaseFile; private final String mFriendsDatabaseFile; private final String mErrorToneFile; private final String mUserCertificatePath; private ByteArrayInputStream mUploadingImageStream; private Timer mTimer; private BroadcastReceiver mKeepAliveReceiver = new KeepAliveReceiver(); private void routeAudioToSpeakerHelper(boolean speakerOn) { Log.w("Routing audio to " + (speakerOn ? "speaker" : "earpiece") + ", disabling bluetooth audio route"); BluetoothManager.getInstance().disableBluetoothSCO(); mLc.enableSpeaker(speakerOn); } public void routeAudioToSpeaker() { routeAudioToSpeakerHelper(true); } public String getUserAgent() throws NameNotFoundException { StringBuilder userAgent = new StringBuilder(); userAgent.append("LinphoneAndroid/" + mServiceContext.getPackageManager().getPackageInfo(mServiceContext.getPackageName(),0).versionCode); userAgent.append(" ("); userAgent.append("Linphone/" + LinphoneManager.getLc().getVersion() + "; "); userAgent.append(Build.DEVICE + " " + Build.MODEL + " Android/" + Build.VERSION.SDK_INT); userAgent.append(")"); return userAgent.toString(); } public void routeAudioToReceiver() { routeAudioToSpeakerHelper(false); } public synchronized static final LinphoneManager createAndStart(Context c) { if (instance != null) throw new RuntimeException("Linphone Manager is already initialized"); instance = new LinphoneManager(c); instance.startLibLinphone(c); TelephonyManager tm = (TelephonyManager) c.getSystemService(Context.TELEPHONY_SERVICE); boolean gsmIdle = tm.getCallState() == TelephonyManager.CALL_STATE_IDLE; setGsmIdle(gsmIdle); return instance; } public void addDownloadMessagePending(LinphoneChatMessage message){ synchronized (mPendingChatFileMessage) { mPendingChatFileMessage.add(message); } } public boolean isMessagePending(LinphoneChatMessage message){ boolean messagePending = false; synchronized (mPendingChatFileMessage) { for (LinphoneChatMessage chat : mPendingChatFileMessage) { if (chat.getStorageId() == message.getStorageId()) { messagePending = true; break; } } } return messagePending; } public void cancelFileDownload(LinphoneChatMessage message){ synchronized (mPendingChatFileMessage) { for (LinphoneChatMessage chat : mPendingChatFileMessage) { if (chat.getStorageId() == message.getStorageId()) { chat.cancelFileTransfer(); mPendingChatFileMessage.remove(chat); } break; } } } public void removePendingMessage(LinphoneChatMessage message){ synchronized (mPendingChatFileMessage) { for (LinphoneChatMessage chat : mPendingChatFileMessage) { if (chat.getStorageId() == message.getStorageId()) { mPendingChatFileMessage.remove(chat); } break; } } } public void setUploadPendingFileMessage(LinphoneChatMessage message){ mUploadPendingFileMessage = message; } public LinphoneChatMessage getMessageUploadPending(){ return mUploadPendingFileMessage; } public void setUploadingImageStream(ByteArrayInputStream array){ this.mUploadingImageStream = array; } @Override public void onLinphoneChatMessageStateChanged(LinphoneChatMessage msg, LinphoneChatMessage.State state) { if (state == LinphoneChatMessage.State.FileTransferDone) { if(msg.isOutgoing() && mUploadingImageStream != null){ mUploadPendingFileMessage = null; mUploadingImageStream = null; } else { File file = new File(Environment.getExternalStorageDirectory(), msg.getAppData()); try { String url = MediaStore.Images.Media.insertImage(getContext().getContentResolver(), file.getPath(), file.getName(), null); msg.setAppData(url); file.delete(); } catch (FileNotFoundException e) { e.printStackTrace(); } removePendingMessage(msg); } } if(state == LinphoneChatMessage.State.FileTransferError) { //TODO } for (LinphoneChatMessage.LinphoneChatMessageListener l: simpleListeners) { l.onLinphoneChatMessageStateChanged(msg, state); } } @Override public void onLinphoneChatMessageFileTransferReceived(LinphoneChatMessage msg, LinphoneContent content, LinphoneBuffer buffer) { } @Override public void onLinphoneChatMessageFileTransferSent(LinphoneChatMessage msg, LinphoneContent content, int offset, int size, LinphoneBuffer bufferToFill) { if (mUploadingImageStream != null && size > 0) { byte[] data = new byte[size]; int read = mUploadingImageStream.read(data, 0, size); if (read > 0) { bufferToFill.setContent(data); bufferToFill.setSize(read); } else { Log.e("Error, upload task asking for more bytes(" + size + ") than available (" + mUploadingImageStream.available() + ")"); } } } @Override public void onLinphoneChatMessageFileTransferProgressChanged(LinphoneChatMessage msg, LinphoneContent content, int offset, int total) { for (LinphoneChatMessage.LinphoneChatMessageListener l: simpleListeners) { l.onLinphoneChatMessageFileTransferProgressChanged(msg, content, offset, total); } } private boolean isPresenceModelActivitySet() { LinphoneCore lc = getLcIfManagerNotDestroyedOrNull(); if (isInstanciated() && lc != null) { return lc.getPresenceModel() != null && lc.getPresenceModel().getActivity() != null; } return false; } public void changeStatusToOnline() { LinphoneCore lc = getLcIfManagerNotDestroyedOrNull(); if (isInstanciated() && lc != null && isPresenceModelActivitySet() && lc.getPresenceModel().getActivity().getType() != PresenceActivityType.Online) { lc.getPresenceModel().getActivity().setType(PresenceActivityType.Online); } else if (isInstanciated() && lc != null && !isPresenceModelActivitySet()) { PresenceModel model = LinphoneCoreFactory.instance().createPresenceModel(PresenceActivityType.Online, null); lc.setPresenceModel(model); } } public void changeStatusToOnThePhone() { LinphoneCore lc = getLcIfManagerNotDestroyedOrNull(); if (isInstanciated() && isPresenceModelActivitySet() && lc.getPresenceModel().getActivity().getType() != PresenceActivityType.OnThePhone) { lc.getPresenceModel().getActivity().setType(PresenceActivityType.OnThePhone); } else if (isInstanciated() && !isPresenceModelActivitySet()) { PresenceModel model = LinphoneCoreFactory.instance().createPresenceModel(PresenceActivityType.OnThePhone, null); lc.setPresenceModel(model); } } public void changeStatusToOffline() { LinphoneCore lc = getLcIfManagerNotDestroyedOrNull(); if (isInstanciated() && isPresenceModelActivitySet() && lc.getPresenceModel().getActivity().getType() != PresenceActivityType.Offline) { lc.getPresenceModel().getActivity().setType(PresenceActivityType.Offline); } else if (isInstanciated() && !isPresenceModelActivitySet()) { PresenceModel model = LinphoneCoreFactory.instance().createPresenceModel(PresenceActivityType.Offline, null); lc.setPresenceModel(model); } } public static synchronized final LinphoneManager getInstance() { if (instance != null) return instance; if (sExited) { throw new RuntimeException("Linphone Manager was already destroyed. " + "Better use getLcIfManagerNotDestroyed and check returned value"); } throw new RuntimeException("Linphone Manager should be created before accessed"); } public static synchronized final LinphoneCore getLc() { return getInstance().mLc; } public String getLPConfigXsdPath() { return mLPConfigXsd; } public void newOutgoingCall(AddressType address) { String to = address.getText().toString(); newOutgoingCall(to, address.getDisplayedName()); } public void newOutgoingCall(String to, String displayName) { // if (mLc.isIncall()) { // listenerDispatcher.tryingNewOutgoingCallButAlreadyInCall(); // return; // } LinphoneAddress lAddress; try { lAddress = mLc.interpretUrl(to); LinphoneProxyConfig lpc = mLc.getDefaultProxyConfig(); if (Constants.FORBID_SELF_CALL && lpc!=null && lAddress.asStringUriOnly().equals(lpc.getIdentity())) { return; } } catch (LinphoneCoreException e) { return; } lAddress.setDisplayName(displayName); boolean isLowBandwidthConnection = !LinphoneUtils.isHighBandwidthConnection(LinphoneService.instance().getApplicationContext()); if (mLc.isNetworkReachable()) { try { if (Version.isVideoCapable()) { boolean prefVideoEnable = mPrefs.isVideoEnabled(); boolean prefInitiateWithVideo = mPrefs.shouldInitiateVideoCall(); CallManager.getInstance().inviteAddress(lAddress, prefVideoEnable && prefInitiateWithVideo, isLowBandwidthConnection); } else { CallManager.getInstance().inviteAddress(lAddress, false, isLowBandwidthConnection); } } catch (LinphoneCoreException e) { return; } } } private void resetCameraFromPreferences() { boolean useFrontCam = mPrefs.useFrontCam(); int camId = 0; AndroidCamera[] cameras = AndroidCameraConfiguration.retrieveCameras(); for (AndroidCamera androidCamera : cameras) { if (androidCamera.frontFacing == useFrontCam) camId = androidCamera.id; } LinphoneManager.getLc().setVideoDevice(camId); } public static interface AddressType { void setText(CharSequence s); CharSequence getText(); void setDisplayedName(String s); String getDisplayedName(); } public static interface NewOutgoingCallUiListener { public void onWrongDestinationAddress(); public void onCannotGetCallParameters(); public void onAlreadyInCall(); } public boolean toggleEnableCamera() { if (mLc.isIncall()) { boolean enabled = !mLc.getCurrentCall().cameraEnabled(); enableCamera(mLc.getCurrentCall(), enabled); return enabled; } return false; } public void enableCamera(LinphoneCall call, boolean enable) { if (call != null) { call.enableCamera(enable); if (Constants.ENABLE_CALL_NOTIFICATION) LinphoneService.instance().refreshIncallIcon(mLc.getCurrentCall()); } } public void sendStaticImage(boolean send) { if (mLc.isIncall()) { enableCamera(mLc.getCurrentCall(), !send); } } public void playDtmf(ContentResolver r, char dtmf) { try { if (Settings.System.getInt(r, Settings.System.DTMF_TONE_WHEN_DIALING) == 0) { // audible touch disabled: don't play on speaker, only send in outgoing stream return; } } catch (SettingNotFoundException e) {} getLc().playDtmf(dtmf, -1); } public void terminateCall() { if (mLc.isIncall()) { mLc.terminateCall(mLc.getCurrentCall()); } } public void initTunnelFromConf() { if (!mLc.isTunnelAvailable()) return; NetworkInfo info = mConnectivityManager.getActiveNetworkInfo(); mLc.tunnelCleanServers(); TunnelConfig config = mPrefs.getTunnelConfig(); if (config.getHost() != null) { mLc.tunnelAddServer(config); manageTunnelServer(info); } } private boolean isTunnelNeeded(NetworkInfo info) { if (info == null) { Log.i("No connectivity: tunnel should be disabled"); return false; } String pref = mPrefs.getTunnelMode(); if ("always".equals(pref)) { return true; } if (info.getType() != ConnectivityManager.TYPE_WIFI && "3G_only".equals(pref)) { Log.i("need tunnel: 'no wifi' connection"); return true; } return false; } private void manageTunnelServer(NetworkInfo info) { if (mLc == null) return; if (!mLc.isTunnelAvailable()) return; Log.i("Managing tunnel"); if (isTunnelNeeded(info)) { Log.i("Tunnel need to be activated"); mLc.tunnelSetMode(LinphoneCore.TunnelMode.enable); } else { Log.i("Tunnel should not be used"); String pref = mPrefs.getTunnelMode(); mLc.tunnelSetMode(LinphoneCore.TunnelMode.disable); if (Constants.TUNNEL_MODE_ENTRY_VALUE_AUTO.equals(pref)) { mLc.tunnelSetMode(LinphoneCore.TunnelMode.auto); } } } public synchronized final void destroyLinphoneCore() { sExited = true; BluetoothManager.getInstance().destroy(); try { mTimer.cancel(); mLc.destroy(); } catch (RuntimeException e) { e.printStackTrace(); } finally { mServiceContext.unregisterReceiver(instance.mKeepAliveReceiver); mLc = null; } } public void restartLinphoneCore(){ destroyLinphoneCore(); startLibLinphone(mServiceContext); sExited = false; } private synchronized void startLibLinphone(Context c) { try { copyAssetsFromPackage(); //traces alway start with traces enable to not missed first initialization boolean isDebugLogEnabled = !(Constants.DISABLE_EVERY_LOG); LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name)); LinphoneCoreFactory.instance().enableLogCollection(isDebugLogEnabled); mLc = LinphoneCoreFactory.instance().createLinphoneCore(this, mLinphoneConfigFile, mLinphoneFactoryConfigFile, null, c); TimerTask lTask = new TimerTask() { @Override public void run() { UIThreadDispatcher.dispatch(new Runnable() { @Override public void run() { if (mLc != null) { mLc.iterate(); } } }); } }; /*use schedule instead of scheduleAtFixedRate to avoid iterate from being call in burst after cpu wake up*/ mTimer = new Timer("Linphone scheduler"); mTimer.schedule(lTask, 0, 20); } catch (Exception e) { e.printStackTrace(); Log.e(e, "Cannot start linphone"); } } private synchronized void initLiblinphone(LinphoneCore lc) throws LinphoneCoreException { mLc = lc; boolean isDebugLogEnabled = !(Constants.DISABLE_EVERY_LOG) && mPrefs.isDebugEnabled(); LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name)); LinphoneCoreFactory.instance().enableLogCollection(isDebugLogEnabled); PreferencesMigrator prefMigrator = new PreferencesMigrator(mServiceContext); prefMigrator.migrateRemoteProvisioningUriIfNeeded(); prefMigrator.migrateSharingServerUrlIfNeeded(); if (prefMigrator.isMigrationNeeded()) { prefMigrator.doMigration(); } // Some devices could be using software AEC before // This will disable it in favor of hardware AEC if available if (prefMigrator.isEchoMigratioNeeded()) { Log.d("Echo canceller configuration need to be updated"); prefMigrator.doEchoMigration(); mPrefs.echoConfigurationUpdated(); } mLc.setContext(mServiceContext); mLc.setZrtpSecretsCache(basePath + "/zrtp_secrets"); try { String versionName = mServiceContext.getPackageManager().getPackageInfo(mServiceContext.getPackageName(), 0).versionName; if (versionName == null) { versionName = String.valueOf(mServiceContext.getPackageManager().getPackageInfo(mServiceContext.getPackageName(), 0).versionCode); } mLc.setUserAgent("LinphoneAndroid", versionName); } catch (NameNotFoundException e) { Log.e(e, "cannot get version name"); } mLc.setRing(mRingSoundFile); if (Constants.USE_LINPHONECORE_RINGING) { disableRinging(); } else { mLc.setRing(null); //We'll use the android media player api to play the ringtone } mLc.setRingback(mRingbackSoundFile); mLc.setRootCA(mLinphoneRootCaFile); mLc.setPlayFile(mPauseSoundFile); mLc.setChatDatabasePath(mChatDatabaseFile); mLc.setCallLogsDatabasePath(mCallLogDatabaseFile); mLc.setFriendsDatabasePath(mFriendsDatabaseFile); mLc.setUserCertificatesPath(mUserCertificatePath); //mLc.setCallErrorTone(Reason.NotFound, mErrorToneFile); int availableCores = Runtime.getRuntime().availableProcessors(); Log.w("MediaStreamer : " + availableCores + " cores detected and configured"); mLc.setCpuCount(availableCores); int migrationResult = getLc().migrateToMultiTransport(); Log.d("Migration to multi transport result = " + migrationResult); mLc.migrateCallLogs(); if (Constants.ENABLE_PUSH_ID) { Compatibility.initPushNotificationService(mServiceContext); } IntentFilter lFilter = new IntentFilter(Intent.ACTION_SCREEN_ON); lFilter.addAction(Intent.ACTION_SCREEN_OFF); mServiceContext.registerReceiver(mKeepAliveReceiver, lFilter); updateNetworkReachability(); if (Version.sdkAboveOrEqual(Version.API11_HONEYCOMB_30)) { BluetoothManager.getInstance().initBluetooth(); } resetCameraFromPreferences(); mLc.setFileTransferServer(LinphonePreferences.instance().getSharingPictureServerUrl()); } private void copyAssetsFromPackage() throws IOException { copyIfNotExist(R.raw.oldphone_mono, mRingSoundFile); copyIfNotExist(R.raw.ringback, mRingbackSoundFile); copyIfNotExist(R.raw.hold, mPauseSoundFile); copyIfNotExist(R.raw.incoming_chat, mErrorToneFile); copyIfNotExist(R.raw.linphonerc_default, mLinphoneConfigFile); copyFromPackage(R.raw.linphonerc_factory, new File(mLinphoneFactoryConfigFile).getName()); copyIfNotExist(R.raw.lpconfig, mLPConfigXsd); copyIfNotExist(R.raw.rootca, mLinphoneRootCaFile); } public void copyIfNotExist(int ressourceId, String target) throws IOException { File lFileToCopy = new File(target); if (!lFileToCopy.exists()) { copyFromPackage(ressourceId,lFileToCopy.getName()); } } public void copyFromPackage(int ressourceId, String target) throws IOException{ FileOutputStream lOutputStream = mServiceContext.openFileOutput (target, 0); InputStream lInputStream = mR.openRawResource(ressourceId); int readByte; byte[] buff = new byte[8048]; while (( readByte = lInputStream.read(buff)) != -1) { lOutputStream.write(buff,0, readByte); } lOutputStream.flush(); lOutputStream.close(); lInputStream.close(); } //public void loadConfig(){ // try { // copyIfNotExist(R.raw.configrc, mConfigFile); // } catch (Exception e){ // Log.w(e); // } // LinphonePreferences.instance().setRemoteProvisioningUrl("file://" + mConfigFile); // getLc().getConfig().setInt("misc","transient_provisioning",1); //} public boolean detectVideoCodec(String mime) { for (PayloadType videoCodec : mLc.getVideoCodecs()) { if (mime.equals(videoCodec.getMime())) return true; } return false; } public boolean detectAudioCodec(String mime){ for (PayloadType audioCodec : mLc.getAudioCodecs()) { if (mime.equals(audioCodec.getMime())) return true; } return false; } public void updateNetworkReachability() { ConnectivityManager cm = (ConnectivityManager) mServiceContext.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo eventInfo = cm.getActiveNetworkInfo(); if (eventInfo == null || eventInfo.getState() == NetworkInfo.State.DISCONNECTED) { Log.i("No connectivity: setting network unreachable"); mLc.setNetworkReachable(false); } else if (eventInfo.getState() == NetworkInfo.State.CONNECTED){ manageTunnelServer(eventInfo); boolean wifiOnly = LinphonePreferences.instance().isWifiOnlyEnabled(); if (wifiOnly){ if (eventInfo.getType()==ConnectivityManager.TYPE_WIFI) mLc.setNetworkReachable(true); else { Log.i("Wifi-only mode, setting network not reachable"); mLc.setNetworkReachable(false); } }else{ int curtype=eventInfo.getType(); if (curtype!=mLastNetworkType){ //if kind of network has changed, we need to notify network_reachable(false) to make sure all current connections are destroyed. //they will be re-created during setNetworkReachable(true). Log.i("Connectivity has changed."); mLc.setNetworkReachable(false); } mLc.setNetworkReachable(true); mLastNetworkType=curtype; } } } @TargetApi(Build.VERSION_CODES.HONEYCOMB) private void doDestroy() { if (LinphoneService.isReady()) // indeed, no need to crash ChatStorage.getInstance().close(); BluetoothManager.getInstance().destroy(); try { mTimer.cancel(); mLc.destroy(); } catch (RuntimeException e) { e.printStackTrace(); } finally { mServiceContext.unregisterReceiver(instance.mKeepAliveReceiver); mLc = null; instance = null; } } public static synchronized void destroy() { if (instance == null) return; getInstance().changeStatusToOffline(); sExited = true; instance.doDestroy(); } private String getString(int key) { return mR.getString(key); } /* Simple implementation as Android way seems very complicate: For example: with wifi and mobile actives; when pulling mobile down: I/Linphone( 8397): WIFI connected: setting network reachable I/Linphone( 8397): new state [RegistrationProgress] I/Linphone( 8397): mobile disconnected: setting network unreachable I/Linphone( 8397): Managing tunnel I/Linphone( 8397): WIFI connected: setting network reachable */ public void connectivityChanged(ConnectivityManager cm, boolean noConnectivity) { updateNetworkReachability(); } public interface EcCalibrationListener { void onEcCalibrationStatus(EcCalibratorStatus status, int delayMs); } private LinphoneCall ringingCall; private MediaPlayer mRingerPlayer; private Vibrator mVibrator; public void displayWarning(LinphoneCore lc, String message) {} public void authInfoRequested(LinphoneCore lc, String realm, String username, String domain) {} public void byeReceived(LinphoneCore lc, String from) {} public void displayMessage(LinphoneCore lc, String message) {} public void show(LinphoneCore lc) {} public void newSubscriptionRequest(LinphoneCore lc, LinphoneFriend lf, String url) { } public void notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf) { } @Override public void dtmfReceived(LinphoneCore lc, LinphoneCall call, int dtmf) { Log.d("DTMF received: " + dtmf); } @Override public void messageReceived(LinphoneCore lc, LinphoneChatRoom cr, LinphoneChatMessage message) { // if (mServiceContext.getResources().getBoolean(R.bool.disable_chat)) { // return; // } // // LinphoneAddress from = message.getFrom(); // // String textMessage = message.getText(); // String url = message.getExternalBodyUrl(); // if (textMessage != null && textMessage.length() > 0) { // ChatStorage.getInstance().saveTextMessage(from.asStringUriOnly(), "", textMessage, message.getTime()); // } else if (url != null && url.length() > 0) { // ChatStorage.getInstance().saveImageMessage(from.asStringUriOnly(), "", null, message.getExternalBodyUrl(), message.getTime()); // } // // try { // LinphoneContact contact = ContactsManager.getInstance().findContactFromAddress(from); // if (!mServiceContext.getResources().getBoolean(R.bool.disable_chat_message_notification)) { // if (LinphoneActivity.isInstanciated() && !LinphoneActivity.instance().displayChatMessageNotification(from.asStringUriOnly())) { // return; // } else { // if (contact != null) { // LinphoneService.instance().displayMessageNotification(from.asStringUriOnly(), contact.getFullName(), textMessage); // } else { // LinphoneService.instance().displayMessageNotification(from.asStringUriOnly(), from.getUserName(), textMessage); // } // } // } // } catch (Exception e) { // Log.e(e); // } } public String getLastLcStatusMessage() { return lastLcStatusMessage; } public void displayStatus(final LinphoneCore lc, final String message) { Log.i(message); lastLcStatusMessage=message; } public void globalState(final LinphoneCore lc, final GlobalState state, final String message) { Log.i("New global state [",state,"]"); if (state == GlobalState.GlobalOn){ try { initLiblinphone(lc); } catch (LinphoneCoreException e) { Log.e(e); } } } public void registrationState(final LinphoneCore lc, final LinphoneProxyConfig proxy,final RegistrationState state,final String message) { Log.i("New registration state ["+state+"]"); } private int savedMaxCallWhileGsmIncall; private synchronized void preventSIPCalls() { if (savedMaxCallWhileGsmIncall != 0) { Log.w("SIP calls are already blocked due to GSM call running"); return; } savedMaxCallWhileGsmIncall = mLc.getMaxCalls(); mLc.setMaxCalls(0); } private synchronized void allowSIPCalls() { if (savedMaxCallWhileGsmIncall == 0) { Log.w("SIP calls are already allowed as no GSM call known to be running"); return; } mLc.setMaxCalls(savedMaxCallWhileGsmIncall); savedMaxCallWhileGsmIncall = 0; } public static void setGsmIdle(boolean gsmIdle) { LinphoneManager mThis = instance; if (mThis == null) return; if (gsmIdle) { mThis.allowSIPCalls(); } else { mThis.preventSIPCalls(); } } public Context getContext() { try { if (mServiceContext != null) return mServiceContext; else if (LinphoneService.isReady()) return LinphoneService.instance().getApplicationContext(); } catch (Exception e) { e.printStackTrace(); } return null; } @SuppressLint("Wakelock") public void callState(final LinphoneCore lc,final LinphoneCall call, final State state, final String message) { Log.i("New call state [",state,"]"); if (state == State.IncomingReceived && !call.equals(lc.getCurrentCall())) { if (call.getReplacedCall()!=null){ // attended transfer // it will be accepted automatically. return; } } if (state == State.IncomingReceived && Constants.AUTO_ANSWER_CALLS) { try { mLc.acceptCall(call); } catch (LinphoneCoreException e) { e.printStackTrace(); } } else if (state == State.IncomingReceived || (state == State.CallIncomingEarlyMedia && Constants.ALLOW_RINGING_WHILE_EARLY_MEDIA)) { // Brighten screen for at least 10 seconds if (mLc.getCallsNb() == 1) { BluetoothManager.getInstance().disableBluetoothSCO(); // Just in case ringingCall = call; startRinging(); // otherwise there is the beep } } else if (call == ringingCall && isRinging) { //previous state was ringing, so stop ringing stopRinging(); } if (state == State.Connected) { if (mLc.getCallsNb() == 1) { requestAudioFocus(); Compatibility.setAudioManagerInCallMode(mAudioManager); } if (Hacks.needSoftvolume()) { Log.w("Using soft volume audio hack"); adjustVolume(0); // Synchronize } } if (state == State.OutgoingEarlyMedia) { Compatibility.setAudioManagerInCallMode(mAudioManager); } if (state == State.CallReleased || state == State.Error) { if (mLc.getCallsNb() == 0) { if (mAudioFocused){ int res = mAudioManager.abandonAudioFocus(null); Log.d("Audio focus released a bit later: " + (res == AudioManager.AUDIOFOCUS_REQUEST_GRANTED ? "Granted" : "Denied")); mAudioFocused = false; } Context activity = getContext(); if (activity != null) { TelephonyManager tm = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE); if (tm.getCallState() == TelephonyManager.CALL_STATE_IDLE) { Log.d("---AudioManager: back to MODE_NORMAL"); mAudioManager.setMode(AudioManager.MODE_NORMAL); Log.d("All call terminated, routing back to earpiece"); routeAudioToReceiver(); } } } } if (state == State.CallEnd) { if (mLc.getCallsNb() == 0) { if (mIncallWakeLock != null && mIncallWakeLock.isHeld()) { mIncallWakeLock.release(); Log.i("Last call ended: releasing incall (CPU only) wake lock"); } else { Log.i("Last call ended: no incall (CPU only) wake lock were held"); } } } if (state == State.StreamsRunning) { if (BluetoothManager.getInstance().isBluetoothHeadsetAvailable()) { BluetoothManager.getInstance().routeAudioToBluetooth(); // Hack to ensure the bluetooth route is really used mHandler.postDelayed(new Runnable() { @Override public void run() { BluetoothManager.getInstance().routeAudioToBluetooth(); } }, 500); } if (mIncallWakeLock == null) { mIncallWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "incall"); } if (!mIncallWakeLock.isHeld()) { Log.i("New call active : acquiring incall (CPU only) wake lock"); mIncallWakeLock.acquire(); } else { Log.i("New call active while incall (CPU only) wake lock already active"); } } } public void callStatsUpdated(final LinphoneCore lc, final LinphoneCall call, final LinphoneCallStats stats) {} public void callEncryptionChanged(LinphoneCore lc, LinphoneCall call, boolean encrypted, String authenticationToken) { } public void startEcCalibration(LinphoneCoreListener l) throws LinphoneCoreException { routeAudioToSpeaker(); int oldVolume = mAudioManager.getStreamVolume(STREAM_VOICE_CALL); int maxVolume = mAudioManager.getStreamMaxVolume(STREAM_VOICE_CALL); mAudioManager.setStreamVolume(STREAM_VOICE_CALL, maxVolume, 0); mLc.startEchoCalibration(l); mAudioManager.setStreamVolume(STREAM_VOICE_CALL, oldVolume, 0); } private boolean isRinging; private boolean disableRinging = false; public void disableRinging() { disableRinging = true; } private void requestAudioFocus(){ if (!mAudioFocused){ int res = mAudioManager.requestAudioFocus(null, AudioManager.STREAM_VOICE_CALL, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT ); Log.d("Audio focus requested: " + (res == AudioManager.AUDIOFOCUS_REQUEST_GRANTED ? "Granted" : "Denied")); if (res == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) mAudioFocused=true; } } private synchronized void startRinging() { if (disableRinging) { routeAudioToSpeaker(); return; } if (Constants.ALLOW_RINGING_WHILE_EARLY_MEDIA) { routeAudioToSpeaker(); // Need to be able to ear the ringtone during the early media } if (Hacks.needGalaxySAudioHack()) { mAudioManager.setMode(MODE_RINGTONE); } try { if ((mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE || mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_NORMAL) && mVibrator != null) { long[] patern = {0,1000,1000}; mVibrator.vibrate(patern, 1); } if (mRingerPlayer == null) { requestAudioFocus(); mRingerPlayer = new MediaPlayer(); mRingerPlayer.setAudioStreamType(STREAM_RING); String ringtone = LinphonePreferences.instance().getRingtone(android.provider.Settings.System.DEFAULT_RINGTONE_URI.toString()); try { if (ringtone.startsWith("content://")) { mRingerPlayer.setDataSource(mServiceContext, Uri.parse(ringtone)); } else { FileInputStream fis = new FileInputStream(ringtone); mRingerPlayer.setDataSource(fis.getFD()); fis.close(); } } catch (IOException e) { Log.e(e, "Cannot set ringtone"); } mRingerPlayer.prepare(); mRingerPlayer.setLooping(true); mRingerPlayer.start(); } else { Log.w("already ringing"); } } catch (Exception e) { Log.e(e,"cannot handle incoming call"); } isRinging = true; } private synchronized void stopRinging() { if (mRingerPlayer != null) { mRingerPlayer.stop(); mRingerPlayer.release(); mRingerPlayer = null; } if (mVibrator != null) { mVibrator.cancel(); } if (Hacks.needGalaxySAudioHack()) mAudioManager.setMode(AudioManager.MODE_NORMAL); isRinging = false; // You may need to call galaxys audio hack after this method if (!BluetoothManager.getInstance().isBluetoothHeadsetAvailable()) { if (isTabletDevice(mServiceContext)) { Log.d("Stopped ringing, routing back to speaker"); routeAudioToSpeaker(); } else { Log.d("Stopped ringing, routing back to earpiece"); routeAudioToReceiver(); } } } /** * Checks if the device is a tablet or a phone * * @param activityContext * The Activity Context. * @return Returns true if the device is a Tablet */ public static boolean isTabletDevice(Context activityContext) { // Verifies if the Generalized Size of the device is XLARGE to be // considered a Tablet boolean xlarge = ((activityContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE); // If XLarge, checks if the Generalized Density is at least MDPI // (160dpi) if (xlarge) { DisplayMetrics metrics = new DisplayMetrics(); Activity activity = (Activity) activityContext; activity.getWindowManager().getDefaultDisplay().getMetrics(metrics); // MDPI=160, DEFAULT=160, DENSITY_HIGH=240, DENSITY_MEDIUM=160, // DENSITY_TV=213, DENSITY_XHIGH=320 if (metrics.densityDpi == DisplayMetrics.DENSITY_DEFAULT || metrics.densityDpi == DisplayMetrics.DENSITY_HIGH || metrics.densityDpi == DisplayMetrics.DENSITY_MEDIUM || metrics.densityDpi == DisplayMetrics.DENSITY_TV || metrics.densityDpi == DisplayMetrics.DENSITY_XHIGH) { // Yes, this is a tablet! return true; } } // No, this is not a tablet! return false; } public static String extractADisplayName(Resources r, LinphoneAddress address) { if (address == null) return Constants.UNKNOWN_INCOMING_CALL_NAME; final String displayName = address.getDisplayName(); if (displayName!=null) { return displayName; } else if (address.getUserName() != null){ return address.getUserName(); } else { String rms = address.toString(); if (rms != null && rms.length() > 1) return rms; return Constants.UNKNOWN_INCOMING_CALL_NAME; } } public static boolean reinviteWithVideo() { return CallManager.getInstance().reinviteWithVideo(); } /** * * @return false if already in video call. */ public boolean addVideo() { LinphoneCall call = mLc.getCurrentCall(); enableCamera(call, true); return reinviteWithVideo(); } public boolean acceptCallIfIncomingPending() throws LinphoneCoreException { if (mLc.isInComingInvitePending()) { mLc.acceptCall(mLc.getCurrentCall()); return true; } return false; } public boolean acceptCall(LinphoneCall call) { try { mLc.acceptCall(call); return true; } catch (LinphoneCoreException e) { Log.i(e, "Accept call failed"); } return false; } public boolean acceptCallWithParams(LinphoneCall call, LinphoneCallParams params) { try { mLc.acceptCallWithParams(call, params); return true; } catch (LinphoneCoreException e) { Log.i(e, "Accept call failed"); } return false; } public static String extractIncomingRemoteName(Resources r, LinphoneAddress linphoneAddress) { return extractADisplayName(r, linphoneAddress); } public void adjustVolume(int i) { if (Build.VERSION.SDK_INT < 15) { int oldVolume = mAudioManager.getStreamVolume(LINPHONE_VOLUME_STREAM); int maxVolume = mAudioManager.getStreamMaxVolume(LINPHONE_VOLUME_STREAM); int nextVolume = oldVolume +i; if (nextVolume > maxVolume) nextVolume = maxVolume; if (nextVolume < 0) nextVolume = 0; mLc.setPlaybackGain((nextVolume - maxVolume)* dbStep); } else // starting from ICS, volume must be adjusted by the application, at least for STREAM_VOICE_CALL volume stream mAudioManager.adjustStreamVolume(LINPHONE_VOLUME_STREAM, i < 0 ? AudioManager.ADJUST_LOWER : AudioManager.ADJUST_RAISE, AudioManager.FLAG_SHOW_UI); } public static Boolean isProximitySensorNearby(final SensorEvent event) { float threshold = 4.001f; // <= 4 cm is near final float distanceInCm = event.values[0]; final float maxDistance = event.sensor.getMaximumRange(); Log.d("Proximity sensor report [",distanceInCm,"] , for max range [",maxDistance,"]"); if (maxDistance <= threshold) { // Case binary 0/1 and short sensors threshold = maxDistance; } return distanceInCm < threshold; } private static boolean sLastProximitySensorValueNearby; private static Set<Activity> sProximityDependentActivities = new HashSet<Activity>(); private static SensorEventListener sProximitySensorListener = new SensorEventListener() { @Override public void onSensorChanged(SensorEvent event) { if (event.timestamp == 0) return; //just ignoring for nexus 1 sLastProximitySensorValueNearby = isProximitySensorNearby(event); proximityNearbyChanged(); } @Override public void onAccuracyChanged(Sensor sensor, int accuracy) {} }; private static void simulateProximitySensorNearby(Activity activity, boolean nearby) { final Window window = activity.getWindow(); WindowManager.LayoutParams params = window.getAttributes(); View view = ((ViewGroup) window.getDecorView().findViewById(android.R.id.content)).getChildAt(0); if (nearby) { params.screenBrightness = 0.1f; view.setVisibility(View.INVISIBLE); Compatibility.hideNavigationBar(activity); } else { params.screenBrightness = WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_NONE; view.setVisibility(View.VISIBLE); Compatibility.showNavigationBar(activity); } window.setAttributes(params); } private static void proximityNearbyChanged() { boolean nearby = sLastProximitySensorValueNearby; for (Activity activity : sProximityDependentActivities) { simulateProximitySensorNearby(activity, nearby); } } public static synchronized void startProximitySensorForActivity(Activity activity) { if (sProximityDependentActivities.contains(activity)) { Log.i("proximity sensor already active for " + activity.getLocalClassName()); return; } if (sProximityDependentActivities.isEmpty()) { SensorManager sm = (SensorManager) activity.getSystemService(Context.SENSOR_SERVICE); Sensor s = sm.getDefaultSensor(Sensor.TYPE_PROXIMITY); if (s != null) { sm.registerListener(sProximitySensorListener,s,SensorManager.SENSOR_DELAY_UI); Log.i("Proximity sensor detected, registering"); } } else if (sLastProximitySensorValueNearby){ simulateProximitySensorNearby(activity, true); } sProximityDependentActivities.add(activity); } public static synchronized void stopProximitySensorForActivity(Activity activity) { sProximityDependentActivities.remove(activity); simulateProximitySensorNearby(activity, false); if (sProximityDependentActivities.isEmpty()) { SensorManager sm = (SensorManager) activity.getSystemService(Context.SENSOR_SERVICE); sm.unregisterListener(sProximitySensorListener); sLastProximitySensorValueNearby = false; } } public static synchronized LinphoneCore getLcIfManagerNotDestroyedOrNull() { if (sExited || instance == null) { // Can occur if the UI thread play a posted event but in the meantime the LinphoneManager was destroyed // Ex: stop call and quickly terminate application. Log.w("Trying to get linphone core while LinphoneManager already destroyed or not created"); return null; } return getLc(); } public static final boolean isInstanciated() { return instance != null; } public synchronized LinphoneCall getPendingIncomingCall() { LinphoneCall currentCall = mLc.getCurrentCall(); if (currentCall == null) return null; LinphoneCall.State state = currentCall.getState(); boolean incomingPending = currentCall.getDirection() == CallDirection.Incoming && (state == State.IncomingReceived || state == State.CallIncomingEarlyMedia); return incomingPending ? currentCall : null; } @SuppressWarnings("serial") public static class LinphoneConfigException extends LinphoneException { public LinphoneConfigException() { super(); } public LinphoneConfigException(String detailMessage, Throwable throwable) { super(detailMessage, throwable); } public LinphoneConfigException(String detailMessage) { super(detailMessage); } public LinphoneConfigException(Throwable throwable) { super(throwable); } } @Override public void notifyReceived(LinphoneCore lc, LinphoneCall call, LinphoneAddress from, byte[] event) { } @Override public void transferState(LinphoneCore lc, LinphoneCall call, State new_call_state) { } @Override public void infoReceived(LinphoneCore lc, LinphoneCall call, LinphoneInfoMessage info) { Log.d("Info message received from "+call.getRemoteAddress().asString()); LinphoneContent ct=info.getContent(); if (ct!=null){ Log.d("Info received with body with mime type "+ct.getType()+"/"+ct.getSubtype()+" and data ["+ct.getDataAsString()+"]"); } } @Override public void subscriptionStateChanged(LinphoneCore lc, LinphoneEvent ev, SubscriptionState state) { Log.d("Subscription state changed to "+state+" event name is "+ev.getEventName()); } @Override public void notifyReceived(LinphoneCore lc, LinphoneEvent ev, String eventName, LinphoneContent content) { Log.d("Notify received for event "+eventName); if (content!=null) Log.d("with content "+content.getType()+"/"+content.getSubtype()+" data:"+content.getDataAsString()); } @Override public void publishStateChanged(LinphoneCore lc, LinphoneEvent ev, PublishState state) { Log.d("Publish state changed to " + state + " for event name " + ev.getEventName()); } @Override public void isComposingReceived(LinphoneCore lc, LinphoneChatRoom cr) { Log.d("Composing received for chatroom " + cr.getPeerAddress().asStringUriOnly()); } @Override public void configuringStatus(LinphoneCore lc, RemoteProvisioningState state, String message) { Log.d("Remote provisioning status = " + state.toString() + " (" + message + ")"); if (state == RemoteProvisioningState.ConfiguringSuccessful) { if (LinphonePreferences.instance().isProvisioningLoginViewEnabled()) { LinphoneProxyConfig proxyConfig = lc.createProxyConfig(); try { LinphoneAddress addr = LinphoneCoreFactory.instance().createLinphoneAddress(proxyConfig.getIdentity()); wizardLoginViewDomain = addr.getDomain(); } catch (LinphoneCoreException e) { wizardLoginViewDomain = null; } } } } @Override public void fileTransferProgressIndication(LinphoneCore lc, LinphoneChatMessage message, LinphoneContent content, int progress) { } @Override public void fileTransferRecv(LinphoneCore lc, LinphoneChatMessage message, LinphoneContent content, byte[] buffer, int size) { } @Override public int fileTransferSend(LinphoneCore lc, LinphoneChatMessage message, LinphoneContent content, ByteBuffer buffer, int size) { return 0; } @Override public void uploadProgressIndication(LinphoneCore linphoneCore, int offset, int total) { if(total > 0) Log.d("Log upload progress: currently uploaded = " + offset + " , total = " + total + ", % = " + String.valueOf((offset * 100) / total)); } @Override public void uploadStateChanged(LinphoneCore linphoneCore, LogCollectionUploadState state, String info) { Log.d("Log upload state: " + state.toString() + ", info = " + info); if (state == LogCollectionUploadState.LogCollectionUploadStateDelivered) { // LinphoneActivity.instance().sendLogs(LinphoneService.instance().getApplicationContext(),info); } } @Override public void ecCalibrationStatus(LinphoneCore lc, EcCalibratorStatus status, int delay_ms, Object data) { // TODO Auto-generated method stub } @Override public void friendListCreated(LinphoneCore lc, LinphoneFriendList list) { // TODO Auto-generated method stub } @Override public void friendListRemoved(LinphoneCore lc, LinphoneFriendList list) { // TODO Auto-generated method stub } }
ba1c4c16ec1814055f40af044966486411366a46
dd0e7f769b273cc96c2da337a71bd8e0c77b28a3
/src/main/java/com/jakes/movies/repository/MovieRepository.java
3df117b02e1a0b1ca46ea6d18a186f3de309d91a
[]
no_license
JakeDasheck/Spring-movies
ba2feed506ad8c419adb0011b5a6bfa0914da94f
6e427b0dad99ec50aed06d7f3ebbfac4a51cc78f
refs/heads/master
2023-03-24T11:33:04.895042
2021-03-19T11:03:11
2021-03-19T11:03:11
287,374,616
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package com.jakes.movies.repository; import com.jakes.movies.model.Movie; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface MovieRepository extends JpaRepository<Movie, Integer> { List<Movie> findMoviesByName(String name); }
3efea899c5388639ecebbea92ceba012740900b2
55b6fb53025fdcf78f266c94556329421c1b7305
/src/main/java/com/nieyue/dao/CollectDao.java
ca413ecc27083a20108179efeec28762f651d623
[]
no_license
lijin148/SevenSeconds
d318c38b1731bbb326afc2de87dc06372752b885
8d22ca6048f98426348bcce04ce1bde5a084fe8b
refs/heads/master
2020-03-07T05:30:40.378493
2017-08-25T09:48:42
2017-08-25T09:48:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,443
java
package com.nieyue.dao; import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import com.nieyue.bean.Collect; import com.nieyue.bean.CollectArticleDTO; /** * 收藏数据库接口 * @author yy * */ @Mapper public interface CollectDao { /** 新增收藏*/ public boolean addCollect(Collect collect) ; /** 删除收藏 */ public boolean delCollect(Integer collectId) ; /** 更新收藏*/ public boolean updateCollect(Collect collect); /** 装载收藏 */ public Collect loadCollect( @Param("articleId")Integer articleId, @Param("acountId")Integer acountId, @Param("collectId")Integer collectId); /** 收藏总共数目 */ public int countAll( @Param("articleId")Integer articleId, @Param("acountId")Integer acountId ); /** 分页收藏信息 */ public List<Collect> browsePagingCollect( @Param("articleId")Integer articleId, @Param("acountId")Integer acountId, @Param("pageNum")int pageNum, @Param("pageSize")int pageSize, @Param("orderName")String orderName, @Param("orderWay")String orderWay) ; /** 分页DTO收藏信息 */ public List<CollectArticleDTO> browsePagingCollectArticleDTO( @Param("articleId")Integer articleId, @Param("acountId")Integer acountId, @Param("pageNum")int pageNum, @Param("pageSize")int pageSize, @Param("orderName")String orderName, @Param("orderWay")String orderWay) ; }
47fc0680d9a329ace3921af0a0a5a667e6651a07
d56afbed8bd86bb68dda53b06d9832c848ebf2b6
/ hem-system/src/main/java/hu/bme/analytics/hems/encrypt/PasswordModifierListener.java
2fc2335d4637d80fb122c0379346e3df29a25bb5
[]
no_license
balazsbalintm/hem-system
65d4ef16b2c8dcb148ad209e6db60d3da9dcb48b
96cd112fc98f29dd5a11f3f57dd476eb9c16aa4c
refs/heads/master
2021-01-10T19:41:16.011856
2015-11-15T15:36:09
2015-11-15T15:36:09
42,005,551
0
0
null
null
null
null
UTF-8
Java
false
false
2,343
java
package hu.bme.analytics.hems.encrypt; import java.awt.TextField; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JFrame; import javax.swing.JOptionPane; public class PasswordModifierListener implements ActionListener { private final static Logger LOGGER = Logger.getLogger(PasswordModifierListener.class.getName()); private JFrame mainFrame; private TextField tf_oldPw; private TextField tf_newPw; private TextField tf_newPwAgain; public PasswordModifierListener(JFrame mainFrame, TextField tf_oldPw, TextField tf_newPw, TextField tf_newPwAgain) { this.mainFrame = mainFrame; this.tf_oldPw = tf_oldPw; this.tf_newPw = tf_newPw; this.tf_newPwAgain = tf_newPwAgain; } @Override public void actionPerformed(ActionEvent arg0) { LOGGER.log(Level.INFO, "Submit button was pressed!"); try { Boolean result = PasswordEncryptionService.authenticateFromLocalFile("admin", tf_oldPw.getText()); if(result) { if(tf_newPw.getText() != null && tf_newPw.getText().equals(tf_newPwAgain.getText())) { byte[] pw = PasswordEncryptionService.getEncryptedPassword(tf_newPw.getText()); FileOutputStream fos = new FileOutputStream("appPassword"); fos.write(pw); fos.close(); JOptionPane.showMessageDialog(mainFrame, "Jelszo modositva!", "", JOptionPane.PLAIN_MESSAGE); LOGGER.log(Level.INFO, "Password was successfully modified!"); } else { JOptionPane.showMessageDialog(mainFrame, "Az uj jelszo helytelen (elter a ket mezoben)!", "", JOptionPane.ERROR_MESSAGE); LOGGER.log(Level.INFO, "New passwords were different in the new password fields!"); } } else { JOptionPane.showMessageDialog(mainFrame, "Helytelen jelszo!", "", JOptionPane.ERROR_MESSAGE); LOGGER.log(Level.INFO, "The initial password was incorrect!"); } } catch (NoSuchAlgorithmException | InvalidKeySpecException | IOException e) { LOGGER.log(Level.SEVERE, "Error during changing the password: " + e.getMessage()); e.printStackTrace(); } } }
a8460ca447500616af1da844ada3021cb2e0b5bc
9b1d15ddf1fe42ac866c9e5a63b76f6df55bb2be
/09_EL_JSTL/src/cn/bjtu/servlet/Download.java
c157182fc89c947134fbf65618e68d6dcef78886
[]
no_license
ZhaoChancey/JavaWebDemo
a233854968717b4625c6c716a2cbd3cf530575cf
8614e625d38f2d99c36a94eb63f27dc83a6f4dbb
refs/heads/master
2021-05-25T16:54:20.858572
2020-04-07T14:59:13
2020-04-07T14:59:13
253,829,168
0
0
null
null
null
null
UTF-8
Java
false
false
2,776
java
package cn.bjtu.servlet; import org.apache.commons.io.IOUtils; import sun.misc.BASE64Encoder; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URLEncoder; /** * @author shkstart * @create 2020-03-15 22:14 */ public class Download extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // 1、获取要下载的文件名 String downloadFileName = "11.jpg"; // 2、读取要下载的文件内容 (通过ServletContext对象可以读取) ServletContext servletContext = getServletContext(); // 获取要下载的文件类型 String mimeType = servletContext.getMimeType("/file/" + downloadFileName); System.out.println("下载的文件类型:" + mimeType); // 4、在回传前,通过响应头告诉客户端返回的数据类型 resp.setContentType(mimeType); // 5、还要告诉客户端收到的数据是用于下载使用而不是直接显示在页面(还是使用响应头) // Content-Disposition响应头,表示收到的数据怎么处理 // attachment表示附件,表示下载使用 // filename= 表示指定下载的文件名 // 下载下来的文件名由响应头决定 // url编码是把汉字转换成为%xx%xx的格式:谷歌和IE,Base64编码支持火狐 if (req.getHeader("User-Agent").contains("Firefox")){ // 如果是火狐浏览器使用Base64编码 resp.setHeader("Content-Disposition","attachment;filename==?UTF-8?B?" + new BASE64Encoder().encode("中国.jpg".getBytes("UTF-8")) + "?="); } else { // 如果不是火狐,是IE或谷歌,使用URL编码操作 resp.setHeader("Content-Disposition","attachment;filename=" + URLEncoder.encode("中国.jpg","UTF-8")); } /* getResourceAsStream把获取的资源转换成流返回 */ /** * /斜杠被服务器解析表示地址为http://ip:prot/工程名/ 映射 到代码的Web目录 */ InputStream resourceAsStream = servletContext.getResourceAsStream("/file/" + downloadFileName); //获取响应的输出流 OutputStream outputStream = resp.getOutputStream(); // 3、把下载的文件内容回传给客户端 // 读取输入流中全部的数据,复制给输出流,输出给客户端 IOUtils.copy(resourceAsStream,outputStream); } }
0c85ad183141866a23d849788d104deaed425012
dcb13920a8c29324d1cc2a220adf73b1eccdb5e5
/FrameWork/src/Common/WebDriverGeneric.java
c93d6009d84e92b7de03ebb5d422b9dea08f069f
[]
no_license
shanmugam2690/Seleniumbasic
e7dcb36210adf23e3cbd7d2ff0a087015e411781
f98d6fdb4958c1dbc0eb789e7351158dd6f0a99b
refs/heads/master
2021-01-19T19:13:20.675595
2017-04-16T11:02:22
2017-04-16T11:02:22
88,407,268
0
0
null
null
null
null
UTF-8
Java
false
false
473
java
package Common; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.testng.Reporter; public class WebDriverGeneric { public WebDriver driver = null; public void enterTextById (String id , String value) { driver.findElement(By.id(id)).sendKeys(value); Reporter.log("Entered text by id:" +value+ "Entered locator id:" +id); } public void clickId(String id) { driver.findElement(By.id(id)).click(); } }
7865e17088fe8d3cae48069499498c2726203c81
fae0a973015ca7ca6f8c415f1257fdf6cff3c559
/zookeeper-3.3.3/src/java/main/org/apache/zookeeper/server/persistence/FileSnap.java
e10c6b5bf112aff8f77ac8e84d4b682c2244af1c
[ "Apache-2.0" ]
permissive
jiaqiang/thirdparty
2c197db2f70f568829ff43ba0f96b9d5fbba96ba
6ee8c1cfa659228770d1598139d47331a5e852a4
refs/heads/master
2021-01-15T12:37:59.453381
2015-09-05T14:46:20
2015-09-05T14:46:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
10,107
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.zookeeper.server.persistence; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.EOFException; import java.io.InputStream; import java.io.OutputStream; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.zip.Adler32; import java.util.zip.CheckedInputStream; import java.util.zip.CheckedOutputStream; import org.apache.jute.BinaryInputArchive; import org.apache.jute.BinaryOutputArchive; import org.apache.jute.InputArchive; import org.apache.jute.OutputArchive; import org.apache.log4j.Logger; import org.apache.zookeeper.server.DataTree; import org.apache.zookeeper.server.SessionInfo; import org.apache.zookeeper.server.util.SerializeUtils; /** * This class implements the snapshot interface. * it is responsible for storing, serializing * and deserializing the right snapshot. * and provides access to the snapshots. */ public class FileSnap implements SnapShot { File snapDir; private volatile boolean close = false; private static final int VERSION=2; private static final long dbId=-1; private static final Logger LOG = Logger.getLogger(FileSnap.class); public final static int SNAP_MAGIC = ByteBuffer.wrap("ZKSN".getBytes()).getInt(); public FileSnap(File snapDir) { this.snapDir = snapDir; } /** * deserialize a data tree from the most recent snapshot * @return the zxid of the snapshot */ public long deserialize(DataTree dt, Map<Long, SessionInfo> sessions) throws IOException { // we run through 100 snapshots (not all of them) // if we cannot get it running within 100 snapshots // we should give up List<File> snapList = findNValidSnapshots(100); if (snapList.size() == 0) { return -1L; } File snap = null; boolean foundValid = false; // in order to be compatible with old version snapshot format. // at beginning, we read snapshot in new way, if read failure(EOFException), // we retry to read the same snapshot in old way. both new way and old way failure, // we retry the next snapshot in snapshot list. boolean retryInOldLogFormat = false; int times = 0; int i = 0; while(i < snapList.size()) { snap = snapList.get(i); InputStream snapIS = null; CheckedInputStream crcIn = null; try { LOG.info("Reading snapshot " + snap); snapIS = new BufferedInputStream(new FileInputStream(snap)); crcIn = new CheckedInputStream(snapIS, new Adler32()); InputArchive ia = BinaryInputArchive.getArchive(crcIn); deserialize(dt,sessions, ia, retryInOldLogFormat); long checkSum = crcIn.getChecksum().getValue(); long val = ia.readLong("val"); if (val != checkSum) { throw new IOException("CRC corruption in snapshot : " + snap); } foundValid = true; break; } catch (IOException eof) { LOG.warn("can not deserialize in new format, try old format."); retryInOldLogFormat = !retryInOldLogFormat; ++times; if (times % 2 == 0) {++i;} } catch(Exception e) { LOG.warn("problem reading snap file " + snap, e); } finally { if (snapIS != null) snapIS.close(); if (crcIn != null) crcIn.close(); } } if (!foundValid) { throw new IOException("Not able to find valid snapshots in " + snapDir); } dt.lastProcessedZxid = Util.getZxidFromName(snap.getName(), "snapshot"); return dt.lastProcessedZxid; } /** * deserialize the datatree from an inputarchive * @param dt the datatree to be serialized into * @param sessions the sessions to be filled up * @param ia the input archive to restore from * @throws IOException */ public void deserialize(DataTree dt, Map<Long, SessionInfo> sessions, InputArchive ia, boolean retryInOldLogFormat) throws IOException { FileHeader header = new FileHeader(); header.deserialize(ia, "fileheader"); if (header.getMagic() != SNAP_MAGIC) { throw new IOException("mismatching magic headers " + header.getMagic() + " != " + FileSnap.SNAP_MAGIC); } SerializeUtils.deserializeSnapshot(dt,ia,sessions, retryInOldLogFormat); } /** * find the most recent snapshot in the database. * @return the file containing the most recent snapshot */ public File findMostRecentSnapshot() throws IOException { List<File> files = findNValidSnapshots(1); if (files.size() == 0) { return null; } return files.get(0); } /** * find the last (maybe) valid n snapshots. this does some * minor checks on the validity of the snapshots. It just * checks for / at the end of the snapshot. This does * not mean that the snapshot is truly valid but is * valid with a high probability. also, the most recent * will be first on the list. * @param n the number of most recent snapshots * @return the last n snapshots (the number might be * less than n in case enough snapshots are not available). * @throws IOException */ private List<File> findNValidSnapshots(int n) throws IOException { List<File> files = Util.sortDataDir(snapDir.listFiles(),"snapshot", false); int count = 0; List<File> list = new ArrayList<File>(); for (File f : files) { // we should catch the exceptions // from the valid snapshot and continue // until we find a valid one try { if (Util.isValidSnapshot(f)) { list.add(f); count++; if (count == n) { break; } } } catch (IOException e) { LOG.info("invalid snapshot " + f, e); } } return list; } /** * find the last n snapshots. this does not have * any checks if the snapshot might be valid or not * @param the number of most recent snapshots * @return the last n snapshots * @throws IOException */ public List<File> findNRecentSnapshots(int n) throws IOException { List<File> files = Util.sortDataDir(snapDir.listFiles(), "snapshot", false); int i = 0; List<File> list = new ArrayList<File>(); for (File f: files) { if (i==n) break; i++; list.add(f); } return list; } /** * serialize the datatree and sessions * @param dt the datatree to be serialized * @param sessions the sessions to be serialized * @param oa the output archive to serialize into * @param header the header of this snapshot * @throws IOException */ protected void serialize(DataTree dt,Map<Long, SessionInfo> sessions, OutputArchive oa, FileHeader header) throws IOException { // this is really a programmatic error and not something that can // happen at runtime if(header==null) throw new IllegalStateException( "Snapshot's not open for writing: uninitialized header"); header.serialize(oa, "fileheader"); SerializeUtils.serializeSnapshot(dt,oa,sessions); } /** * serialize the datatree and session into the file snapshot * @param dt the datatree to be serialized * @param sessions the sessions to be serialized * @param snapShot the file to store snapshot into */ public synchronized void serialize(DataTree dt, Map<Long, SessionInfo> sessions, File snapShot) throws IOException { if (!close) { OutputStream sessOS = new BufferedOutputStream(new FileOutputStream(snapShot)); CheckedOutputStream crcOut = new CheckedOutputStream(sessOS, new Adler32()); //CheckedOutputStream cout = new CheckedOutputStream() OutputArchive oa = BinaryOutputArchive.getArchive(crcOut); FileHeader header = new FileHeader(SNAP_MAGIC, VERSION, dbId); serialize(dt,sessions,oa, header); long val = crcOut.getChecksum().getValue(); oa.writeLong(val, "val"); oa.writeString("/", "path"); sessOS.flush(); crcOut.close(); sessOS.close(); } } /** * synchronized close just so that if serialize is in place * the close operation will block and will wait till serialize * is done and will set the close flag */ @Override public synchronized void close() throws IOException { close = true; } }
[ "user00@VM_64_237_centos.(none)" ]
user00@VM_64_237_centos.(none)
836cfe27b1e623b1a131b082b9c5147955ad11d8
51c77cd0ce4c0c14d60b341e0be89d0088172320
/imageio/imageio-metadata/src/main/java/com/twelvemonkeys/imageio/metadata/tiff/TIFF.java
539a2e128396c12f88ecbe847962fe8ba2b06f15
[ "BSD-3-Clause" ]
permissive
lafaspot/TwelveMonkeys
f633467c7c78a26afe9cf15c37134348a9e2861e
dbf1ea6d1190965026d2e39ae6dac7d31001e78e
refs/heads/master
2021-01-20T04:09:50.542559
2017-07-06T19:44:23
2017-07-06T19:44:23
89,653,173
1
1
null
2017-07-06T19:44:24
2017-04-28T00:57:33
Java
UTF-8
Java
false
false
8,391
java
/* * Copyright (c) 2009, Harald Kuhr * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted 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 "TwelveMonkeys" nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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 com.twelvemonkeys.imageio.metadata.tiff; /** * TIFF * * @author <a href="mailto:[email protected]">Harald Kuhr</a> * @author last modified by $Author: haraldk$ * @version $Id: TIFF.java,v 1.0 Nov 15, 2009 3:02:24 PM haraldk Exp$ */ @SuppressWarnings("UnusedDeclaration") public interface TIFF { short BYTE_ORDER_MARK_BIG_ENDIAN = ('M' << 8) | 'M'; short BYTE_ORDER_MARK_LITTLE_ENDIAN = ('I' << 8) | 'I'; int TIFF_MAGIC = 42; short TYPE_BYTE = 1; short TYPE_ASCII = 2; short TYPE_SHORT = 3; short TYPE_LONG = 4; short TYPE_RATIONAL = 5; short TYPE_SBYTE = 6; short TYPE_UNDEFINED = 7; short TYPE_SSHORT = 8; short TYPE_SLONG = 9; short TYPE_SRATIONAL = 10; short TYPE_FLOAT = 11; short TYPE_DOUBLE = 12; short TYPE_IFD = 13; /* 1 = BYTE 8-bit unsigned integer. 2 = ASCII 8-bit byte that contains a 7-bit ASCII code; the last byte must be NUL (binary zero). 3 = SHORT 16-bit (2-byte) unsigned integer. 4 = LONG 32-bit (4-byte) unsigned integer. 5 = RATIONAL Two LONGs: the first represents the numerator of a fraction; the second, the denominator. TIFF 6.0 and above: 6 = SBYTE An 8-bit signed (twos-complement) integer. 7 = UNDEFINED An 8-bit byte that may contain anything, depending on the definition of the field. 8 = SSHORT A 16-bit (2-byte) signed (twos-complement) integer. 9 = SLONG A 32-bit (4-byte) signed (twos-complement) integer. 10 = SRATIONAL Two SLONGs: the first represents the numerator of a fraction, the second the denominator. 11 = FLOAT Single precision (4-byte) IEEE format. 12 = DOUBLE Double precision (8-byte) IEEE format. See http://www.awaresystems.be/imaging/tiff/tifftags/subifds.html 13 = IFD, same as LONG TODO: BigTiff specifies more types See http://www.awaresystems.be/imaging/tiff/bigtiff.html, http://www.remotesensing.org/libtiff/bigtiffdesign.html (what about 14-15??) 16 = TIFF_LONG8, being unsigned 8byte integer 17 = TIFF_SLONG8, being signed 8byte integer 18 = TIFF_IFD8, being a new unsigned 8byte IFD offset. Should probably all map to Java long (and fail if high bit is set for the unsigned types???) */ String[] TYPE_NAMES = { null, "BYTE", "ASCII", "SHORT", "LONG", "RATIONAL", "SBYTE", "UNDEFINED", "SSHORT", "SLONG", "SRATIONAL", "FLOAT", "DOUBLE", "IFD", null, null, "LONG8", "SLONG8", "IFD8" }; /** Length of the corresponding type, in bytes. */ int[] TYPE_LENGTHS = { -1, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, 4, -1, -1, 8, 8, 8 }; /// EXIF defined TIFF tags int TAG_EXIF_IFD = 34665; int TAG_GPS_IFD = 34853; int TAG_INTEROP_IFD = 40965; /// A. Tags relating to image data structure: int TAG_IMAGE_WIDTH = 256; int TAG_IMAGE_HEIGHT = 257; int TAG_BITS_PER_SAMPLE = 258; int TAG_COMPRESSION = 259; int TAG_PHOTOMETRIC_INTERPRETATION = 262; int TAG_FILL_ORDER = 266; int TAG_ORIENTATION = 274; int TAG_SAMPLES_PER_PIXEL = 277; int TAG_PLANAR_CONFIGURATION = 284; int TAG_SAMPLE_FORMAT = 339; int TAG_YCBCR_SUB_SAMPLING = 530; int TAG_YCBCR_POSITIONING = 531; int TAG_X_RESOLUTION = 282; int TAG_Y_RESOLUTION = 283; int TAG_X_POSITION = 286; int TAG_Y_POSITION = 287; int TAG_RESOLUTION_UNIT = 296; /// B. Tags relating to recording offset int TAG_STRIP_OFFSETS = 273; int TAG_ROWS_PER_STRIP = 278; int TAG_STRIP_BYTE_COUNTS = 279; int TAG_FREE_OFFSETS = 288; // "Not recommended for general interchange." // "Old-style" JPEG (still used as EXIF thumbnail) int TAG_JPEG_INTERCHANGE_FORMAT = 513; int TAG_JPEG_INTERCHANGE_FORMAT_LENGTH = 514; int TAG_GROUP3OPTIONS = 292; int TAG_GROUP4OPTIONS = 293; /// C. Tags relating to image data characteristics int TAG_TRANSFER_FUNCTION = 301; int TAG_PREDICTOR = 317; int TAG_WHITE_POINT = 318; int TAG_PRIMARY_CHROMATICITIES = 319; int TAG_COLOR_MAP = 320; int TAG_INK_SET = 332; int TAG_INK_NAMES = 333; int TAG_NUMBER_OF_INKS = 334; int TAG_EXTRA_SAMPLES = 338; int TAG_TRANSFER_RANGE = 342; int TAG_YCBCR_COEFFICIENTS = 529; int TAG_REFERENCE_BLACK_WHITE = 532; /// D. Other tags int TAG_DATE_TIME = 306; int TAG_DOCUMENT_NAME = 269; int TAG_IMAGE_DESCRIPTION = 270; int TAG_MAKE = 271; int TAG_MODEL = 272; int TAG_PAGE_NAME = 285; int TAG_PAGE_NUMBER = 297; int TAG_SOFTWARE = 305; int TAG_ARTIST = 315; int TAG_HOST_COMPUTER = 316; int TAG_COPYRIGHT = 33432; int TAG_SUBFILE_TYPE = 254; int TAG_OLD_SUBFILE_TYPE = 255; // Deprecated NO NOT WRITE! int TAG_SUB_IFD = 330; /** * XMP record. * @see com.twelvemonkeys.imageio.metadata.xmp.XMP */ int TAG_XMP = 700; /** * IPTC record. * @see com.twelvemonkeys.imageio.metadata.iptc.IPTC */ int TAG_IPTC = 33723; /** * Photoshop image resources. * @see com.twelvemonkeys.imageio.metadata.psd.PSD */ int TAG_PHOTOSHOP = 34377; /** * Photoshop layer and mask information (byte order follows TIFF container). * Layer and mask information found in a typical layered Photoshop file. * Starts with a character string of "Adobe Photoshop Document Data Block" * (or "Adobe Photoshop Document Data V0002" for PSB) * including the null termination character. * @see com.twelvemonkeys.imageio.metadata.psd.PSD */ int TAG_PHOTOSHOP_IMAGE_SOURCE_DATA = 37724; int TAG_PHOTOSHOP_ANNOTATIONS = 50255; /** * ICC Color Profile. * @see java.awt.color.ICC_Profile */ int TAG_ICC_PROFILE = 34675; // Microsoft Office Document Imaging (MODI) // http://msdn.microsoft.com/en-us/library/aa167596%28office.11%29.aspx int TAG_MODI_BLC = 34718; int TAG_MODI_VECTOR = 34719; int TAG_MODI_PTC = 34720; // http://blogs.msdn.com/b/openspecification/archive/2009/12/08/details-of-three-tiff-tag-extensions-that-microsoft-office-document-imaging-modi-software-may-write-into-the-tiff-files-it-generates.aspx int TAG_MODI_PLAIN_TEXT = 37679; int TAG_MODI_OLE_PROPERTY_SET = 37680; int TAG_MODI_TEXT_POS_INFO = 37681; int TAG_TILE_WIDTH = 322; int TAG_TILE_HEIGTH = 323; int TAG_TILE_OFFSETS = 324; int TAG_TILE_BYTE_COUNTS = 325; // JPEG int TAG_JPEG_TABLES = 347; // "Old-style" JPEG (Obsolete) DO NOT WRITE! int TAG_OLD_JPEG_PROC = 512; int TAG_OLD_JPEG_Q_TABLES = 519; int TAG_OLD_JPEG_DC_TABLES = 520; int TAG_OLD_JPEG_AC_TABLES = 521; }
66d9e5f3bbbd8cb360a420bb8cf15b927dce05ec
5b7b57c14b91d3d578855abebae59549048b1fd9
/AppCommon/src/main/java/com/trade/eight/moudle/auth/AuthUploadIdCardAct.java
637aecc56305c788aefa7eac75106c09a5fe6607
[]
no_license
xanhf/8yuan
8c4f50fa7c95ae5f0dfb282f67a7b1c39b0b4711
a8b7f351066f479b3bc8a6037036458008e1624c
refs/heads/master
2021-05-14T19:58:44.462393
2017-11-16T10:31:29
2017-11-16T10:31:55
114,601,135
0
0
null
null
null
null
UTF-8
Java
false
false
29,493
java
package com.trade.eight.moudle.auth; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.text.Html; import android.text.TextUtils; import android.view.Gravity; import android.view.KeyEvent; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; import com.easylife.ten.lib.R; import com.netease.nim.uikit.common.media.picker.PickImageHelper; import com.netease.nim.uikit.common.media.picker.model.PhotoInfo; import com.netease.nim.uikit.common.util.storage.StorageType; import com.netease.nim.uikit.common.util.storage.StorageUtil; import com.netease.nim.uikit.common.util.string.StringUtil; import com.netease.nim.uikit.session.constant.Extras; import com.trade.eight.base.BaseActivity; import com.trade.eight.config.AndroidAPIConfig; import com.trade.eight.config.AppSetting; import com.trade.eight.dao.UserInfoDao; import com.trade.eight.entity.TempObject; import com.trade.eight.entity.response.CommonResponse; import com.trade.eight.moudle.auth.data.AuthDataHelp; import com.trade.eight.moudle.auth.entity.CardAuthObj; import com.trade.eight.moudle.auth.entity.IdCardObj; import com.trade.eight.moudle.home.activity.MainActivity; import com.trade.eight.moudle.me.activity.LoginActivity; import com.trade.eight.moudle.outterapp.WebActivity; import com.trade.eight.moudle.trade.activity.FXBTGCashInH5Act; import com.trade.eight.net.okhttp.NetCallback; import com.trade.eight.tools.ConvertUtil; import com.trade.eight.tools.DateUtil; import com.trade.eight.tools.DialogUtil; import com.trade.eight.tools.Log; import com.trade.eight.tools.UploadFileUtil; import com.trade.eight.tools.refresh.RefreshUtil; import com.trade.eight.view.picker.wheelPicker.picker.DatePicker; import java.io.File; import java.io.FileInputStream; import java.util.Calendar; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; /** * Created by dufangzhu on 2017/5/19. * 上传身份证 */ public class AuthUploadIdCardAct extends BaseActivity implements View.OnClickListener { public static final String TAG = "AuthUploadIdCardAct"; public AuthUploadIdCardAct context = this; /*时间选择器开始年月日*/ public static final int DATE_START_YEAR = 1900; public static final int DATE_START_MONTH = 1; public static final int DATE_START_DAY = 1; /*时间选择器结束年月日*/ public static final int DATE_END_YEAR = 2047; public static final int DATE_END_MONTH = 1; public static final int DATE_END_DAY = 1; View statusView, contentView; View idCardView01, idCardView02, cardinfo01, cardinfo02, idcard01OK, idcard02OK, idcard_01bg, idcard_02bg, tv_idcard01, tv_idcard02, reload01, reload02, tv_rule; ImageView img_card01, img_card02, img_status; EditText ed_idno, ed_name; TextView tv_sex, tv_status01, tv_status02, tv_reload01, tv_reload02, tv_startdate, tv_enddate; Button btn_status_commit, btn_commit; RefreshUtil refreshUtil; TextView text_card_input_tips_1; TextView text_card_input_tips_2; public static void start(Context context) { context.startActivity(new Intent(context, AuthUploadIdCardAct.class)); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.upload_idcard); setAppCommonTitle(getResources().getString(R.string.me_account_auth)); if (!new UserInfoDao(context).isLogin()) { LoginActivity.start(context); finish(); return; } initViews(); checkStatus(); initRefresh(); } void initRefresh() { refreshUtil = new RefreshUtil(this); refreshUtil.setRefreshTime(AppSetting.getInstance(this).getRefreshTimeWPList()); refreshUtil.setOnRefreshListener(new RefreshUtil.OnRefreshListener() { @Override public Object doInBackground() { return AuthDataHelp.getCheckStatus(AuthUploadIdCardAct.this); } @Override public void onUpdate(Object result) { if (result != null) { cardAuthObj = (CardAuthObj) result; initStatus(cardAuthObj.getStatus()); } } }); } @Override protected void appCommonGoBack() { if (exitRegConfig()) { return; } else { doMyfinish(); } } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { if (exitRegConfig()) { return true; } else { doMyfinish(); } return true; } return super.onKeyDown(keyCode, event); } boolean exitRegConfig() { if (cardAuthObj != null && cardAuthObj.getStatus() == CardAuthObj.STATUS_NOT_SUBMMIT) { String msg = context.getResources().getString(R.string.auth_exit_msg); String negStr = context.getResources().getString(R.string.auth_reg_neg); String postStr = context.getResources().getString(R.string.auth_reg_post); DialogUtil.showConfirmDlg(context, msg, negStr, postStr, true, new Handler.Callback() { @Override public boolean handleMessage(Message message) { doMyfinish(); return false; } }, new Handler.Callback() { @Override public boolean handleMessage(Message message) { return false; } }); return true; } return false; } public void initViews() { statusView = findViewById(R.id.statusView); contentView = findViewById(R.id.contentView); idCardView01 = findViewById(R.id.idCardView01); idCardView02 = findViewById(R.id.idCardView02); img_card01 = (ImageView) findViewById(R.id.img_card01); img_card02 = (ImageView) findViewById(R.id.img_card02); tv_idcard01 = findViewById(R.id.tv_idcard01); tv_idcard02 = findViewById(R.id.tv_idcard02); reload01 = findViewById(R.id.reload01); reload02 = findViewById(R.id.reload02); idcard01OK = findViewById(R.id.idcard01OK); idcard02OK = findViewById(R.id.idcard02OK); idcard_01bg = findViewById(R.id.idcard_01bg); idcard_02bg = findViewById(R.id.idcard_02bg); img_status = (ImageView) findViewById(R.id.img_status); cardinfo01 = findViewById(R.id.cardinfo01); cardinfo02 = findViewById(R.id.cardinfo02); ed_idno = (EditText) findViewById(R.id.ed_idno); ed_name = (EditText) findViewById(R.id.ed_name); tv_sex = (TextView) findViewById(R.id.tv_sex); tv_reload01 = (TextView) findViewById(R.id.tv_reload01); tv_reload02 = (TextView) findViewById(R.id.tv_reload02); tv_reload01.setText(Html.fromHtml(getString(R.string.auth_upload_failed))); tv_reload02.setText(Html.fromHtml(getString(R.string.auth_upload_failed))); tv_startdate = (TextView) findViewById(R.id.tv_startdate); tv_enddate = (TextView) findViewById(R.id.tv_enddate); tv_startdate.setOnClickListener(this); tv_enddate.setOnClickListener(this); tv_status01 = (TextView) findViewById(R.id.tv_status01); tv_status02 = (TextView) findViewById(R.id.tv_status02); text_card_input_tips_1 = (TextView) findViewById(R.id.text_card_input_tips_1); text_card_input_tips_2 = (TextView) findViewById(R.id.text_card_input_tips_2); btn_status_commit = (Button) findViewById(R.id.btn_status_commit); idCardView01.setOnClickListener(this); idCardView02.setOnClickListener(this); btn_commit = (Button) findViewById(R.id.btn_commit); btn_commit.setOnClickListener(this); btn_commit.setEnabled(false); // tv_sex.setOnClickListener(this); tv_rule = findViewById(R.id.tv_rule); tv_rule.setOnClickListener(this); } CardAuthObj cardAuthObj; public void checkStatus() { showNetLoadingProgressDialog(null); AuthDataHelp.checkStatus(context, new NetCallback(context) { @Override public void onFailure(String resultCode, String resultMsg) { showCusToast(ConvertUtil.NVL(resultMsg, context.getResources().getString(R.string.network_problem))); } @Override public void onResponse(String response) { CommonResponse<CardAuthObj> commonResponse = CommonResponse.fromJson(response, CardAuthObj.class); if (commonResponse == null) { showCusToast(context.getResources().getString(R.string.network_problem)); return; } cardAuthObj = commonResponse.getData(); if (!commonResponse.isSuccess() || cardAuthObj == null) { showCusToast(ConvertUtil.NVL(commonResponse.getErrorInfo(), context.getResources().getString(R.string.network_problem))); return; } if (commonResponse != null && commonResponse.isSuccess() && cardAuthObj != null) { initStatus(cardAuthObj.getStatus()); } } }); } private static final int PICK_AVATAR_REQUEST = 0x0E; boolean isFront = true; //正面上传成功 boolean isCard01OK = false; boolean isCard02OK = false; protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == Activity.RESULT_OK && requestCode == PICK_AVATAR_REQUEST) { String url = data.getStringExtra(com.netease.nim.uikit.session.constant.Extras.EXTRA_FILE_PATH); if (com.trade.eight.tools.StringUtil.isEmpty(url)) { List<PhotoInfo> list = (List<PhotoInfo>) data.getSerializableExtra(Extras.EXTRA_PHOTO_LISTS); if (list != null && list.size() > 0) url = list.get(0).getAbsolutePath(); } //updateAvatar if (url != null) { final String path = url; Log.v(TAG, "path=" + path); String api = AndroidAPIConfig.URL_AUTH_FRONT_CARD; if (!isFront) { api = AndroidAPIConfig.URL_AUTH_BACK_CARD; } showNetLoadingProgressDialog(null); final String reqUrl = api; /* * 注意这在upload里面进行了图片压缩 * */ AuthDataHelp.upload(context, new File(path), reqUrl, new UploadFileUtil.LoadCallBack() { @Override public void hand(CommonResponse<IdCardObj> res, String localPath) { hideNetLoadingProgressDialog(); if (res == null) { showCusToast(getString(R.string.network_problem)); return; } if (res.isSuccess() && res.getData() != null) { //设置信息 Log.v(TAG, "isFront=" + isFront); IdCardObj idCardObj = res.getData(); if (isFront) { //正面信息成功 // PickerlImageLoadTool.disPlay("file://" + path, new RotateImageViewAware(img_card01, path), // com.netease.nim.uikit.R.drawable.nim_image_default); // ImageLoader.getInstance().displayImage("file://" + path, img_card01); setImg(img_card01, localPath); text_card_input_tips_1.setVisibility(View.GONE); btn_commit.setEnabled(false); isCard01OK = true; String idNo = ConvertUtil.NVL(idCardObj.getIdNo(), ""); String name = ConvertUtil.NVL(idCardObj.getName(), ""); String sex = ConvertUtil.NVL(idCardObj.getSex(), ""); //显示证件正面信息 if (idCardObj != null) { ed_idno.setText(idNo); ed_idno.setSelection(ed_idno.getText().length()); ed_name.setText(name); tv_sex.setText(sex); } cardinfo01.setVisibility(View.VISIBLE); idcard01OK.setVisibility(View.VISIBLE); idcard_01bg.setVisibility(View.INVISIBLE); if (TextUtils.isEmpty(idNo) || TextUtils.isEmpty(name) || TextUtils.isEmpty(sex)) { text_card_input_tips_1.setVisibility(View.VISIBLE); text_card_input_tips_1.setText(getResources().getString(R.string.card_input_tips_3)); return; } if ((idNo.length() != 15 && idNo.length() != 18)) { text_card_input_tips_1.setVisibility(View.VISIBLE); text_card_input_tips_1.setText(getResources().getString(R.string.card_input_tips_1)); } } else { text_card_input_tips_2.setVisibility(View.GONE); btn_commit.setEnabled(false); //反面信息成功 isCard02OK = true; // ImageLoader.getInstance().displayImage("file://" + path, img_card02); setImg(img_card02, localPath); String startdate = ConvertUtil.NVL(idCardObj.getExpirationStart(), ""); String enddate = ConvertUtil.NVL(idCardObj.getExpirationEnd(), ""); //显示信息成功 if (idCardObj != null) { tv_startdate.setText(startdate); tv_enddate.setText(enddate); } cardinfo02.setVisibility(View.VISIBLE); idcard02OK.setVisibility(View.VISIBLE); idcard_02bg.setVisibility(View.INVISIBLE); if (TextUtils.isEmpty(startdate) || TextUtils.isEmpty(enddate)) { text_card_input_tips_2.setVisibility(View.VISIBLE); text_card_input_tips_2.setText(getResources().getString(R.string.card_input_tips_3)); return; } if (!TextUtils.isEmpty(enddate) && DateUtil.compareDateWithNow(enddate)) { text_card_input_tips_2.setVisibility(View.VISIBLE); text_card_input_tips_2.setText(getResources().getString(R.string.card_input_tips_2)); } } } else { String msgStr = ConvertUtil.NVL(res.getErrorInfo(), context.getResources().getString(R.string.network_problem)); DialogUtil.showMsgDialog(context, msgStr, null); if (isFront) { tv_idcard01.setVisibility(View.GONE); reload01.setVisibility(View.VISIBLE); } else { tv_idcard02.setVisibility(View.GONE); reload02.setVisibility(View.VISIBLE); } } //都成功了就可以点击 if (isCard01OK && isCard02OK) { // int idNolength = ed_idno.getText().toString().length(); // if ((idNolength == 15 || idNolength == 18)) { // String enDate = tv_enddate.getText().toString(); // if (!TextUtils.isEmpty(enDate) && !DateUtil.compareDateWithNow(enDate)) { // btn_commit.setEnabled(true); // } // } if (text_card_input_tips_1.getVisibility() == View.GONE && text_card_input_tips_2.getVisibility() == View.GONE) { btn_commit.setEnabled(true); } } return; } }); } } } @Override public void onClick(View v) { int id = v.getId(); if (id == R.id.idCardView01 || id == R.id.idCardView02) { // if (!NetworkUtil.checkNetwork(context)) { // showCusToast(getString(R.string.network_problem)); // return; // } if (id == R.id.idCardView01) { isFront = true; //图片的显示方向问题 // /storage/emulated/0/DCIM/Camera/IMG_20170522_184829.jpg // String path = "/storage/emulated/0/DCIM/Camera/IMG_20170522_184829.jpg"; // ImageLoader.getInstance().displayImage("file://" + path, img_card01); // return; } else { isFront = false; } PickImageHelper.PickImageOption option = new PickImageHelper.PickImageOption(); option.titleResId = R.string.app_name; option.crop = false; option.multiSelect = false; //这里cropOutputImageWidth;当设置了crop=false之后就没用到了 option.cropOutputImageWidth = 720; option.cropOutputImageHeight = 720; option.isUseDiyCamera = true; if (isFront) { option.diyCameraTips = getResources().getString(R.string.card_takephoto_tips_1); } else { option.diyCameraTips = getResources().getString(R.string.card_takephoto_tips_2); } option.outputPath = tempFile(); PickImageHelper.pickImage(context, PICK_AVATAR_REQUEST, option); } else if (id == R.id.btn_commit) { DialogUtil.showConfirmDlg(context, context.getResources().getString(R.string.auth_confirm), context.getResources().getString(R.string.auth_confirm_cancle), context.getResources().getString(R.string.auth_confirm_submit), true, null, new Handler.Callback() { @Override public boolean handleMessage(Message message) { submit(); return false; } }); } else if (id == R.id.tv_sex) { final String[] sexChoose = {"男", "女"}; int sel = 0; if (tv_sex.getText().toString().contains("女")) { sel = 1; } AlertDialog.Builder builder = new AlertDialog.Builder(context); if (android.os.Build.VERSION.SDK_INT >= 11) { builder = new AlertDialog.Builder(context, R.style.dialog_holo); } builder.setSingleChoiceItems(sexChoose, sel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); tv_sex.setText(sexChoose[which]); } }).create().show(); } else if (id == R.id.tv_rule) { WebActivity.start(context, getString(R.string.auth_rule_title), AndroidAPIConfig.URL_AGRE_OPEN_ACCOUNT); } else if (id == R.id.tv_enddate) { // showDatePicker(tv_enddate); } else if (id == R.id.tv_startdate) { // showDatePicker(tv_startdate); } } /** * 时间选择器 * * @param tv */ private void showDatePicker(final TextView tv) { DatePicker picker = new DatePicker(this, DatePicker.YEAR_MONTH_DAY); picker.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL); picker.setRangeStart(DATE_START_YEAR, DATE_START_MONTH, DATE_START_DAY); picker.setRangeEnd(DATE_END_YEAR, DATE_END_MONTH, DATE_END_DAY); picker.setSelectedItem(Calendar.getInstance().get(Calendar.YEAR), Calendar.getInstance().get(Calendar.MONTH) + 1, Calendar.getInstance().get(Calendar.DAY_OF_MONTH)); picker.setOnDatePickListener(new DatePicker.OnYearMonthDayPickListener() { @Override public void onDatePicked(String year, String month, String day) { if (year != null && month != null && day != null) { tv.setText(year + "-" + month + "-" + day); } } }); picker.show(); } void submit() { String idno = ed_idno.getText().toString(); String name = ed_name.getText().toString(); String sex = tv_sex.getText().toString(); String expiresStart = tv_startdate.getText().toString(); String expiresEnd = tv_enddate.getText().toString(); if (StringUtil.isEmpty(idno)) { showCusToast(getString(R.string.card_input_idno)); return; } if (StringUtil.isEmpty(name)) { showCusToast(getString(R.string.card_input_name)); return; } if (StringUtil.isEmpty(sex)) { showCusToast(getString(R.string.card_input_sex)); return; } if (StringUtil.isEmpty(expiresStart)) { showCusToast(getString(R.string.card_input_startdate)); return; } if (StringUtil.isEmpty(expiresEnd)) { showCusToast(getString(R.string.card_input_enddate)); return; } //提交 Map<String, String> map = new LinkedHashMap<>(); map.put("name", name); map.put("idNo", idno); map.put("sex", sex); map.put("expiresStart", expiresStart); map.put("expiresEnd", expiresEnd); AuthDataHelp.submit(context, map, new NetCallback(context) { @Override public void onFailure(String resultCode, String resultMsg) { showCusToast(ConvertUtil.NVL(resultMsg, context.getResources().getString(R.string.network_problem))); } @Override public void onResponse(String response) { CommonResponse<TempObject> commonResponse = CommonResponse.fromJson(response, TempObject.class); if (commonResponse == null) { showCusToast(context.getResources().getString(R.string.network_problem)); return; } if (!commonResponse.isSuccess()) { showCusToast(ConvertUtil.NVL(commonResponse.getErrorInfo(), context.getResources().getString(R.string.network_problem))); return; } //成功之后 显示当前状态 initStatus(CardAuthObj.STATUS_CHECKING); } }); } public static final String JPG = ".jpg"; private String tempFile() { String filename = StringUtil.get32UUID() + JPG; return StorageUtil.getWritePath(filename, StorageType.TYPE_TEMP); } void initStatus(int status) { //审核通过 if (status == CardAuthObj.STATUS_SUCCESS) { contentView.setVisibility(View.GONE); statusView.setVisibility(View.VISIBLE); img_status.setImageResource(R.drawable.ic_card_status_ok); tv_status01.setText(getString(R.string.card_status_success)); tv_status02.setText(""); initStatusBtn(status); } else if (status == CardAuthObj.STATUS_CHECKING) { contentView.setVisibility(View.GONE); statusView.setVisibility(View.VISIBLE); img_status.setImageResource(R.drawable.ic_card_status_checking); tv_status01.setText(getString(R.string.card_status_checking)); tv_status02.setText(getString(R.string.card_status_checking_hint)); initStatusBtn(status); refreshUtil.start(); } else if (status == CardAuthObj.STATUS_FAILED) { contentView.setVisibility(View.GONE); statusView.setVisibility(View.VISIBLE); img_status.setImageResource(R.drawable.ic_card_status_fail); tv_status01.setText(getString(R.string.card_status_failed)); String msg = getString(R.string.card_status_failed_hint); if (cardAuthObj != null) { msg = ConvertUtil.NVL(cardAuthObj.getReturnMsg(), msg); } tv_status02.setText(msg); initStatusBtn(status); } else { //还没提交过资料 contentView.setVisibility(View.VISIBLE); statusView.setVisibility(View.GONE); } } void initStatusBtn(final int status) { if (status == CardAuthObj.STATUS_SUCCESS) { btn_status_commit.setText(getString(R.string.btn_card_status_success)); } else if (status == CardAuthObj.STATUS_CHECKING) { btn_status_commit.setText(getString(R.string.btn_card_status_checking)); } else if (status == CardAuthObj.STATUS_FAILED) { btn_status_commit.setText(getString(R.string.btn_card_status_failed)); } btn_status_commit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (status == CardAuthObj.STATUS_SUCCESS) { //跳转到入金页面 FXBTGCashInH5Act.startCashin(context); finish(); } else if (status == CardAuthObj.STATUS_CHECKING) { Intent intent = new Intent(context, MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); finish(); } else if (status == CardAuthObj.STATUS_FAILED) { //重新提交 contentView.setVisibility(View.VISIBLE); statusView.setVisibility(View.GONE); } } }); } void setImg(ImageView imgView, String path) { try { FileInputStream fis = new FileInputStream(path); Bitmap bitmap = BitmapFactory.decodeStream(fis); if (bitmap.getWidth() < bitmap.getHeight()) { Matrix matrix = new Matrix(); matrix.postRotate(-90); bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true); } imgView.setImageBitmap(bitmap); } catch (Exception e) { e.printStackTrace(); } catch (OutOfMemoryError e) { e.printStackTrace(); } } @Override public void onDestroy() { super.onDestroy(); if (refreshUtil != null) { refreshUtil.stop(); } } }
a78aeacb4f323e973578c7b9dfad19885c1f6253
0e7529e0b264fdfdc7d86fcb9ee74679bb930458
/src/main/java/com/dnp/bulidingmanage/common/config/MyWebAppConfigurer.java
8af4655d8e9ace9b0567fe954f5116ff0822f01c
[]
no_license
379924269/buliding_manage
e06f9545fa8454ed25c043a9a8e6ae60f14d43a1
117768c6b07cabfdd6f792219dc28174ec4f9bcc
refs/heads/master
2021-05-08T03:07:36.843068
2017-11-14T07:16:33
2017-11-14T07:16:33
108,231,290
1
0
null
null
null
null
UTF-8
Java
false
false
1,396
java
package com.dnp.bulidingmanage.common.config; import com.dnp.bulidingmanage.common.MyInterceptor; import org.springframework.context.annotation.Configuration; import org.springframework.util.ResourceUtils; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; /** * 注册拦截器 * * @Author 华仔 * @Author 2017/10/16 10:02 */ @Configuration public class MyWebAppConfigurer extends WebMvcConfigurerAdapter { //没用shiro的时候注册的拦截器 //@Override //public void addInterceptors(InterceptorRegistry registry) { // //拦截规则:除了login,其他都拦截判断 // String excludePathPatterns[] = {"/manager/login", "/manager/notLogin", "/swagger-resources/**", "/"}; // registry.addInterceptor(new MyInterceptor()).addPathPatterns("/**").excludePathPatterns(excludePathPatterns); //} @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/static/**").addResourceLocations(ResourceUtils.CLASSPATH_URL_PREFIX + "/static/"); registry.addResourceHandler("/swagger-resources/**").addResourceLocations(ResourceUtils.CLASSPATH_URL_PREFIX + "/swagger-resources/"); } }
0bac3594d653de114500a0989590062e1cd672ca
9df515f1b1498d9923c8fdbd4cc024781fd59024
/app/src/main/java/com/afwsamples/testdpc/common/ColorPicker.java
d93ac3c9dca2e3a1b08b4b78fbfdeea3532a96a3
[ "Apache-2.0" ]
permissive
jindog/android-testdpc
0452866f6a73e3fd46ffff6e9501e81bb5f04d05
14d1aa42539dbe8232d89b9b810afff079d41544
refs/heads/master
2021-06-21T13:58:33.958065
2020-12-10T11:11:00
2020-12-10T11:11:00
140,535,194
0
0
Apache-2.0
2020-12-10T11:11:02
2018-07-11T07:03:16
Java
UTF-8
Java
false
false
8,481
java
/* * Copyright (C) 2016 The Android Open Source Project * * 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.afwsamples.testdpc.common; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.graphics.Color; import android.graphics.PorterDuff; import android.os.Bundle; import android.app.DialogFragment; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.SeekBar; import android.widget.TextView; import android.widget.Toast; import com.afwsamples.testdpc.R; /** * This fragment can be used to get a color input from the user. It contains the seek bars for * RGB and an edit box for entering hexadecimal color value, either of them can be used to provide * input. */ public class ColorPicker extends DialogFragment implements SeekBar.OnSeekBarChangeListener, View.OnClickListener { private static final String ARG_COLOR_VALUE = "init_color"; private static final String ARG_LISTENER_FRAGMENT_TAG = "listener_fragment_tag"; private static final String ARG_ID = "id"; public static final String COLOR_STRING_FORMATTER = "#%08x"; private String mListenerTag; private int mCurrentColor; // Id given as an argument while initiating this class, this will be passed as is to the // listener on callback. Since there could be multiple elements initiating this, caller // can use this to differentiate those. private String mId; private View mTitleHeader; private SeekBar mRedBar; private SeekBar mGreenBar; private SeekBar mBlueBar; private TextView mRedBarValue; private TextView mGreenBarValue; private TextView mBlueBarValue; private EditText mColorValue; private Button mDoneButton; private Button mCancelButton; private Button mPreviewButton; public static ColorPicker newInstance(int initColor, String listenerTag, String id) { ColorPicker fragment = new ColorPicker(); Bundle args = new Bundle(); args.putInt(ARG_COLOR_VALUE, initColor); args.putString(ARG_LISTENER_FRAGMENT_TAG, listenerTag); args.putString(ARG_ID, id); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null) { mCurrentColor = savedInstanceState.getInt(ARG_COLOR_VALUE); mListenerTag = savedInstanceState.getString(ARG_LISTENER_FRAGMENT_TAG); mId = savedInstanceState.getString(ARG_ID); } else if (getArguments() != null) { mCurrentColor = getArguments().getInt(ARG_COLOR_VALUE, getResources().getColor(R.color.teal)); mListenerTag = getArguments().getString(ARG_LISTENER_FRAGMENT_TAG); mId = getArguments().getString(ARG_ID); } } @Override public Dialog onCreateDialog(Bundle savedInstanceState) { final View rootView = LayoutInflater.from(getActivity()).inflate( R.layout.color_picker, null); AlertDialog dialog = new AlertDialog.Builder(getActivity()) .setView(rootView) .setPositiveButton(R.string.color_picker_done, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { OnColorSelectListener listener = (OnColorSelectListener) getFragmentManager().findFragmentByTag(mListenerTag); if (listener != null) { listener.onColorSelected(mCurrentColor, mId); } } }) .setNegativeButton(android.R.string.cancel, null) .create(); dialog.setOnShowListener(new DialogInterface.OnShowListener() { @Override public void onShow(DialogInterface dialog) { mDoneButton = ((AlertDialog) dialog).getButton(AlertDialog.BUTTON_POSITIVE); mDoneButton.setTextColor(mCurrentColor); mCancelButton = ((AlertDialog) dialog).getButton(AlertDialog.BUTTON_NEGATIVE); mCancelButton.setTextColor(mCurrentColor); updateViewsColor(); } }); initializeViews(rootView); return dialog; } @Override public void onSaveInstanceState(Bundle outState) { outState.putInt(ARG_COLOR_VALUE, mCurrentColor); outState.putString(ARG_LISTENER_FRAGMENT_TAG, mListenerTag); outState.putString(ARG_ID, mId); super.onSaveInstanceState(outState); } private void initializeViews(View rootView) { mTitleHeader = rootView.findViewById(R.id.title_header); mRedBar = (SeekBar) rootView.findViewById(R.id.red_bar); mGreenBar = (SeekBar) rootView.findViewById(R.id.green_bar); mBlueBar = (SeekBar) rootView.findViewById(R.id.blue_bar); mRedBarValue = (TextView) rootView.findViewById(R.id.red_bar_value); mGreenBarValue = (TextView) rootView.findViewById(R.id.green_bar_value); mBlueBarValue = (TextView) rootView.findViewById(R.id.blue_bar_value); mRedBar.setOnSeekBarChangeListener(this); mGreenBar.setOnSeekBarChangeListener(this); mBlueBar.setOnSeekBarChangeListener(this); mColorValue = (EditText) rootView.findViewById(R.id.color_value); mPreviewButton = (Button) rootView.findViewById(R.id.color_preview); mPreviewButton.setOnClickListener(this); } private void updateViewsColor() { mTitleHeader.setBackgroundColor(mCurrentColor); mDoneButton.setTextColor(mCurrentColor); mCancelButton.setTextColor(mCurrentColor); mRedBar.setProgress(Color.red(mCurrentColor)); mGreenBar.setProgress(Color.green(mCurrentColor)); mBlueBar.setProgress(Color.blue(mCurrentColor)); mRedBarValue.setText(Integer.toString(Color.red(mCurrentColor))); mGreenBarValue.setText(Integer.toString(Color.green(mCurrentColor))); mBlueBarValue.setText(Integer.toString(Color.blue(mCurrentColor))); mColorValue.setText(String.format(COLOR_STRING_FORMATTER, mCurrentColor)); mColorValue.setSelection(mColorValue.getText().length()); mColorValue.getBackground().mutate().setColorFilter(mCurrentColor, PorterDuff.Mode.SRC_ATOP); mPreviewButton.setTextColor(mCurrentColor); } @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { if (fromUser) { mCurrentColor = Color.rgb(mRedBar.getProgress(), mGreenBar.getProgress(), mBlueBar.getProgress()); updateViewsColor(); } } @Override public void onStartTrackingTouch(SeekBar seekBar) { // Do nothing } @Override public void onStopTrackingTouch(SeekBar seekBar) { // Do nothing } public interface OnColorSelectListener { void onColorSelected(int selectedColor, String id); } /** * User has tapped the update button, update the color value depending on the value in * the edit box. The current color value will be updated only if the edit box contains a valid * color, otherwise an error toast is shown to the user. */ @Override public void onClick(View view) { try { mCurrentColor = Color.parseColor(mColorValue.getText().toString()); updateViewsColor(); } catch (IllegalArgumentException e) { Toast.makeText(getActivity(), R.string.not_valid_color, Toast.LENGTH_SHORT).show(); } } }
972f42479dda89478c3d281f0be7808342f06053
99de17bc26dfd7c61484ab3c04f7582a2db7a2a0
/HermesEventbus/src/main/java/com/lhfboy/library/hermes/wrapper/MethodWrapper.java
784f0a43676641b31b0d770d28ca71db96c7bb87
[ "Apache-2.0" ]
permissive
kesionli/HermesEventBus-master
56d9ff74f6105b2091301d5737d4649301abd68c
edec6d6b0833c1320c2fe52224b0553d60d016df
refs/heads/master
2022-04-22T10:54:31.212781
2019-05-23T09:11:29
2019-05-23T09:11:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,034
java
/** * * Copyright 2016 Xiaofei * * 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.lhfboy.library.hermes.wrapper; import android.os.Parcel; import android.os.Parcelable; import com.lhfboy.library.hermes.annotation.MethodId; import com.lhfboy.library.hermes.util.TypeUtils; import java.lang.reflect.Method; /** * Created by Xiaofei on 16/4/7. */ public class MethodWrapper extends BaseWrapper implements Parcelable { private TypeWrapper[] mParameterTypes; private TypeWrapper mReturnType; public static final Creator<MethodWrapper> CREATOR = new Creator<MethodWrapper>() { public MethodWrapper createFromParcel(Parcel in) { MethodWrapper methodWrapper = new MethodWrapper(); methodWrapper.readFromParcel(in); return methodWrapper; } public MethodWrapper[] newArray(int size) { return new MethodWrapper[size]; } }; private MethodWrapper() {} public MethodWrapper(Method method) { setName(!method.isAnnotationPresent(MethodId.class), TypeUtils.getMethodId(method)); Class<?>[] classes = method.getParameterTypes(); if (classes == null) { classes = new Class<?>[0]; } int length = classes.length; mParameterTypes = new TypeWrapper[length]; for (int i = 0; i < length; ++i) { mParameterTypes[i] = new TypeWrapper(classes[i]); } mReturnType = new TypeWrapper(method.getReturnType()); } public MethodWrapper(String methodName, Class<?>[] parameterTypes) { setName(true, methodName); if (parameterTypes == null) { parameterTypes = new Class<?>[0]; } int length = parameterTypes.length; mParameterTypes = new TypeWrapper[length]; for (int i = 0; i < length; ++i) { mParameterTypes[i] = new TypeWrapper(parameterTypes[i]); } mReturnType = null; } public MethodWrapper(Class<?>[] parameterTypes) { setName(false, ""); if (parameterTypes == null) { parameterTypes = new Class<?>[0]; } int length = parameterTypes.length; mParameterTypes = new TypeWrapper[length]; for (int i = 0; i < length; ++i) { mParameterTypes[i] = parameterTypes[i] == null ? null : new TypeWrapper(parameterTypes[i]); } mReturnType = null; } public TypeWrapper[] getParameterTypes() { return mParameterTypes; } public TypeWrapper getReturnType() { return mReturnType; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel parcel, int flags) { super.writeToParcel(parcel, flags); parcel.writeParcelableArray(mParameterTypes, flags); parcel.writeParcelable(mReturnType, flags); } public void readFromParcel(Parcel in) { super.readFromParcel(in); ClassLoader classLoader = MethodWrapper.class.getClassLoader(); Parcelable[] parcelables = in.readParcelableArray(classLoader); if (parcelables == null) { mParameterTypes = null; } else { int length = parcelables.length; mParameterTypes = new TypeWrapper[length]; for (int i = 0; i < length; ++i) { mParameterTypes[i] = (TypeWrapper) parcelables[i]; } } mReturnType = in.readParcelable(classLoader); } }
[ "dong1825650144" ]
dong1825650144
686c34fd2690242c5db0ef2f5448f4eaffcc554d
5b65dc08a7caa2709ee2e64c5ced1a0050bf489b
/flink-examples-api/src/main/java/com/buildupchao/flinkexamples/api/JoinExample.java
c9113636f0a4da0bc5eebbfcb6036da87d170118
[]
no_license
suixuan/flink-examples
614a553853ca576fa1630e7e425354684eb0cd96
0e3c3bd54d90614d85f3d9900af0f4de403775bb
refs/heads/master
2022-12-28T14:14:37.054725
2020-05-16T10:21:41
2020-05-16T10:21:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,398
java
package com.buildupchao.flinkexamples.api; import lombok.AllArgsConstructor; import lombok.Data; import lombok.ToString; import org.apache.flink.api.common.functions.JoinFunction; import org.apache.flink.api.java.DataSet; import org.apache.flink.api.java.ExecutionEnvironment; import org.apache.flink.api.java.operators.DataSource; import org.apache.flink.api.java.tuple.Tuple3; import org.apache.flink.shaded.guava18.com.google.common.collect.Lists; import java.util.List; /** * inner join (equals join) * * @author buildupchao * @date 2020/01/01 15:17 * @since JDK 1.8 */ public class JoinExample { public static void main(String[] args) throws Exception { ExecutionEnvironment environment = ExecutionEnvironment.getExecutionEnvironment(); List<Tuple3<Integer, String, Integer>> personList = Lists.newArrayList( Tuple3.of(101, "王朝", 0), Tuple3.of(102, "马汉", 1), Tuple3.of(103, "张龙", 0), Tuple3.of(104, "赵虎", 0) ); List<Tuple3<Integer, String, Integer>> learningCourseList = Lists.newArrayList( Tuple3.of(101, "Flink", 0), Tuple3.of(102, "Spark", 1), Tuple3.of(104, "Data-Warehouse", 0) ); DataSource<Tuple3<Integer, String, Integer>> personDataSource = environment.fromCollection(personList); DataSource<Tuple3<Integer, String, Integer>> learningCourseDataSource = environment.fromCollection(learningCourseList); DataSet<UserInfo> userInfoDataSet = personDataSource.join(learningCourseDataSource) .where(0, 2) .equalTo(0, 2) .with(new UserInfoJonFunction()); userInfoDataSet.print(); } private static class UserInfoJonFunction implements JoinFunction<Tuple3<Integer, String, Integer>, Tuple3<Integer, String, Integer>, UserInfo> { @Override public UserInfo join(Tuple3<Integer, String, Integer> person, Tuple3<Integer, String, Integer> learningCourse) throws Exception { return new UserInfo(person.f0, person.f1, learningCourse.f1); } } @Data @ToString @AllArgsConstructor private static class UserInfo { private Integer userId; private String userName; private String learningCourse; } }
b594b2fe6bb13ea3b025540cb59043675a4f3365
de455d4ae2c998c9cd7fc485acce3e414b10218c
/Tigerstripe/NRP_Interface/src/NRP_Interface/TypeDefinitions/TerminationState.java
ed02702272c3e8b7825eb2b87293b5b87a835390
[]
no_license
donaldh/mef-nrp-yang
a3f93b0469459ea1c9a150a97f0d3b07f91146b1
f7d3a1d4b3cd5c349292bcb18a481f974c1b6b1b
refs/heads/master
2021-01-16T23:20:32.983856
2017-01-30T15:44:43
2017-01-30T15:45:14
56,094,174
1
1
null
null
null
null
UTF-8
Java
false
false
2,617
java
/******************************************************************************* * Created with Tigerstripe(tm) Workbench v.$runtime.getProperty("tigerstripe.feature.version") * Copyright (c) 2007 Cisco Systems, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * DO NOT EDIT THIS FILE - Created with Tigerstripe(tm) Workbench * *******************************************************************************/ package NRP_Interface.TypeDefinitions; /** * Provides support for the range of behaviours and specific states that an LP can take with respect to termination of the signal. Indicates to what degree the LayerTermination is terminated. * * @tigerstripe.enum * isAbstract = "false" * base-type="String" * extensible="false" * @tigerstripe.interface package = "$artifact.IStandardSpecifics.InterfaceProperties.get("package")" * generate = "true" * * */ public abstract class TerminationState { /** * * @tigerstripe.label * value = '"LP_CAN_NEVER_TERMINATE"' * * * */ public final static String LP_CAN_NEVER_TERMINATE = "LP_CAN_NEVER_TERMINATE"; /** * * @tigerstripe.label * value = '"LT_NOT_TERMINATED"' * * * */ public final static String LT_NOT_TERMINATED = "LT_NOT_TERMINATED"; /** * * @tigerstripe.label * value = '"TERMINATED_SERVER_TO_CLIENT_FLOW"' * * * */ public final static String TERMINATED_SERVER_TO_CLIENT_FLOW = "TERMINATED_SERVER_TO_CLIENT_FLOW"; /** * * @tigerstripe.label * value = '"TERMINATED_CLIENT_TO_SERVER_FLOW"' * * * */ public final static String TERMINATED_CLIENT_TO_SERVER_FLOW = "TERMINATED_CLIENT_TO_SERVER_FLOW"; /** * * @tigerstripe.label * value = '"TERMINATED_BIDIRECTIONAL"' * * * */ public final static String TERMINATED_BIDIRECTIONAL = "TERMINATED_BIDIRECTIONAL"; /** * * @tigerstripe.label * value = '"LT_PERMENANTLY_TERMINATED"' * * * */ public final static String LT_PERMENANTLY_TERMINATED = "LT_PERMENANTLY_TERMINATED"; /** * * @tigerstripe.label * value = '"TERMINATION_STATE_UNKNOWN"' * * * */ public final static String TERMINATION_STATE_UNKNOWN = "TERMINATION_STATE_UNKNOWN"; }
693dac9be92b192d99ec15a3a2ed6516802fa600
3a41bdf604d4eebdb53f24e809872039d1605051
/Array Lab 1/task11.java
fb3b51103ed45cc78cef1cd61a489bdad5d3baaf
[]
no_license
iamraufu/BRACUCSE110
e12a5d5779bb5f09c4674c2fc0410416e40be67e
367255bcf3c375cdff4bd7140238d30dd5048950
refs/heads/main
2023-01-06T11:36:04.384245
2020-11-07T22:14:26
2020-11-07T22:14:26
310,927,841
4
0
null
null
null
null
UTF-8
Java
false
false
587
java
import java.util.Scanner; public class task11{ public static void main(String []args){ Scanner sc= new Scanner(System.in); System.out.println("Enter Ten Numbers"); int a[]=new int[10]; for(int i=0;i<a.length;i++){ a[i]=sc.nextInt(); } for(int i=0;i<a.length;i++){ if(a[i]==i){ a[i]=sc.nextInt(); } if(a.length==i){ System.out.println("Enter A Different Number"); } } for(int i=0;i<a.length;i++){ System.out.println(a[i]); } } }
c9116a57cb1412f0774752c6b71d0329c000a3a8
446f34f1400a35149758107c284046839d4ae233
/market-product/src/main/java/com/lyc/market/product/web/IndexController.java
471147840ac93bcca31839f0b3159218c28f4a6b
[]
no_license
lycGlish/Market
6f1b20cfa418be4cdd79ad53281720a9fb188575
eddc6509c9d0da0fd0c472a5a992ecf9bf28e7dd
refs/heads/master
2022-12-03T09:39:00.849108
2020-08-20T08:05:39
2020-08-20T08:05:39
287,201,964
0
0
null
null
null
null
UTF-8
Java
false
false
1,191
java
package com.lyc.market.product.web; import com.lyc.market.product.entity.CategoryEntity; import com.lyc.market.product.service.CategoryService; import com.lyc.market.product.vo.Catalog2Vo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; import java.util.Map; /** * @author lyc * @date 2020/8/19 17:19 */ @Controller public class IndexController { @Autowired CategoryService categoryService; @GetMapping("/index/catalog.json") @ResponseBody public Map<String, List<Catalog2Vo>> getCatalogJson() { Map<String, List<Catalog2Vo>> catalogJson = categoryService.getCatalogJson(); return catalogJson; } @GetMapping({"/", "/index.html"}) public String indexPage(Model model) { // 查出所有的一级分类 List<CategoryEntity> categoryEntities = categoryService.getLevel1Categories(); model.addAttribute("categories", categoryEntities); return "index"; } }
b3dfdc7b289a4c80e799b139f94b9cf5c822e7ce
6816462670c067a360582c0780429bfbc1b4195b
/service-user/src/main/java/com/luotao/demo/zipkin/service/OrderServiceImpl.java
73609ca5729db7e26d0f08532bc72326d9e8d52e
[]
no_license
abcde10156/dubbo-zipkin-demo
6c3ea242ea00720104b5700fd075a85dfcc654f3
e282e89a8b7e843eeb28468e2b8679e7927e057b
refs/heads/master
2020-03-20T21:05:38.056952
2018-06-18T07:47:04
2018-06-18T07:47:04
137,723,461
0
0
null
null
null
null
UTF-8
Java
false
false
943
java
package com.luotao.demo.zipkin.service; import com.luotao.demo.dubbozipkin.request.RequestLong; import com.luotao.demo.dubbozipkin.response.ResponseOrder; import org.springframework.stereotype.Service; import java.util.LinkedHashMap; import java.util.Map; /** * User: luotao-pc * Date: 2018/6/16 * Time: 14:54 */ @Service("orderService") public class OrderServiceImpl implements OrderService { @Override public ResponseOrder findOrder(RequestLong id) { if (id.getId().equals(101L)) { try { Thread.currentThread().sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } } String time = "_" + System.currentTimeMillis(); ResponseOrder responseOrder = new ResponseOrder(); responseOrder.setOrderName("name" + time); responseOrder.setOrderType("type" + time); return responseOrder; } }
90d71d2bef3c4116866ff193448ba9b26f12af18
27c4841c76805bbb3ef9a9d5ae273c41a6d0cfc2
/lib-base/src/main/java/com/android/base/loadsir/ErrorCallback.java
a6a5951c37368a8a95e5e77f8f0e7bc265e34260
[]
no_license
Demo-H/openEye
757b23b7af76bd750994dcf78090716911ebf942
992c446a4107d5c68c9369f6893c40ef14798c4f
refs/heads/master
2022-10-06T21:21:11.022930
2020-06-07T02:33:04
2020-06-07T02:33:04
270,168,541
0
0
null
null
null
null
UTF-8
Java
false
false
347
java
package com.android.base.loadsir; import com.android.base.R; import com.android.base.loadsir.callback.Callback; /** * <p> * 类描述: 错误页面 * <p> * Created by Dhunter on 2020/6/2. */ public class ErrorCallback extends Callback { @Override protected int onCreateView() { return R.layout.base_layout_error; } }
be89415165bb38badbfd0d464b677cf474634951
912bc4335ce933982177ec34717efdc289827348
/src/main/java/com/example/docureader/model/I9/SubSection1AliensAuthorizedToWorkHelpPassportNum.java
1d06be09e1e69453d152bd1498677acff5365d5c
[]
no_license
Srujith/docureader
6bb426365a9d393d2335d370c74cba20d77e5a1c
3f141b9e401a40391eb66a5e923b9a91c1c177f4
refs/heads/master
2022-04-17T02:36:02.940567
2020-04-13T19:29:27
2020-04-13T19:29:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,217
java
package com.example.docureader.model.I9; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "dataNode" }) public class SubSection1AliensAuthorizedToWorkHelpPassportNum { @JsonProperty("dataNode") private String dataNode; @JsonIgnore private Map<String, Object> additionalProperties = new HashMap<String, Object>(); @JsonProperty("dataNode") public String getDataNode() { return dataNode; } @JsonProperty("dataNode") public void setDataNode(String dataNode) { this.dataNode = dataNode; } @JsonAnyGetter public Map<String, Object> getAdditionalProperties() { return this.additionalProperties; } @JsonAnySetter public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } }
d9f3cbe2b652d28f23dd9307475f775104126424
cc483e31e0049ac9652dfe9c543164e5fed02c7e
/ultravioletZx/src/main/java/org/ultraviolet/spectrum/z80/Z80.java
a2603377024821dca359d80c8451aa1bfcf779e0
[]
no_license
ultravioletemulator/ultravioletZx
549475b2ab2afd5fb424658eded92216d56e1966
82a0774fa27c4937711f2bdbc10f75dcec70a28d
refs/heads/master
2021-07-02T20:35:17.968160
2017-09-22T12:09:29
2017-09-22T12:09:29
104,324,110
0
0
null
null
null
null
UTF-8
Java
false
false
7,746
java
package org.ultraviolet.spectrum.z80; import org.apache.commons.lang3.builder.ToStringBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.ultraviolet.spectrum.core.Masks; import org.ultraviolet.spectrum.machines.Machine; /** * Created by developer on 21/09/2017. */ public class Z80 { //Registers // A,B,C,D,E 8-bit registers // AF 16-bit register containing A and flags // BC 16-bit register containing B and C // DE 16-bit register containing D and E // HL 16-bit register used for addressing // F 8-bit Flag register // I 8-bit Interrupt Page address register // IX,IY 16-bit index registers // PC 16-bit Program Counter register // R 8-bit Memory Refresh register // SP 16-bit Stack Pointer register // 8-bit registers A,B,C,D,E private byte regA; private byte regB; private byte regC; private byte regD; private byte regE; // 16Bits // private short regAF; // private short regBC; // private short regDE; private short regHL; // // 8-bit Flag register F //Bit 7 6 5 4 3 2 1 0 //Pos S Z X H X P/V N C // C carry Flag // N ann/subtract // P/V Parity/Overflow flag // H Half carry flag // Z Zero flag // S Sign flag // X Not used // private byte regF; // 8-bit Interrupt Page address register I // IFFs private byte regI; // 16-bit index registers IX,IY private short regIX; private short regIY; // PC 16-bit Program Counter register private short pc = 0; // 8-bit Memory Refresh register R private byte regR; // SP 16-bit Stack Pointer register private short sp; static final Logger logger = LoggerFactory.getLogger(Z80.class); public Z80() { } public Z80(byte regA, byte regB, byte regC, byte regD, byte regE, short regHL, byte regF, byte regI, short regIX, short regIY, short pc, byte regR, short sp) { this.regA = regA; this.regB = regB; this.regC = regC; this.regD = regD; this.regE = regE; this.regHL = regHL; this.regF = regF; this.regI = regI; this.regIX = regIX; this.regIY = regIY; this.pc = pc; this.regR = regR; this.sp = sp; } public byte getRegA() { return regA; } public void setRegA(byte regA) { this.regA = regA; } public byte getRegB() { return regB; } public void setRegB(byte regB) { this.regB = regB; } public byte getRegC() { return regC; } public void setRegC(byte regC) { this.regC = regC; } public byte getRegD() { return regD; } public void setRegD(byte regD) { this.regD = regD; } public byte getRegE() { return regE; } public void setRegE(byte regE) { this.regE = regE; } public short getRegAF() { return Z80.bytesToShort(regA, regF); } public void setRegAF(short regAF) { byte lo = (byte) (regAF & 0xff); byte hi = (byte) ((regAF >> 8) & 0xff); regA = hi; regF = lo; } public short getRegBC() { return Z80.bytesToShort(regB, regC); } public void setRegBC(short regBC) { byte lo = (byte) (regBC & 0xff); byte hi = (byte) ((regBC >> 8) & 0xff); regB = hi; regC = lo; } public short getRegDE() { return Z80.bytesToShort(regD, regE); } public void setRegDE(short regDE) { byte lo = (byte) (regDE & 0xff); byte hi = (byte) ((regDE >> 8) & 0xff); regD = hi; regE = lo; } public short getRegHL() { return regHL; } public void setRegHL(short regHL) { this.regHL = regHL; } public byte getRegF() { return regF; } public void setRegF(byte regF) { this.regF = regF; } public byte getRegI() { return regI; } public void setRegI(byte regI) { this.regI = regI; } public short getRegIX() { return regIX; } public void setRegIX(short regIX) { this.regIX = regIX; } public short getRegIY() { return regIY; } public void setRegIY(short regIY) { this.regIY = regIY; } public short getPc() { return pc; } public void setPc(short pc) { this.pc = pc; } public byte getRegR() { return regR; } public void setRegR(byte regR) { this.regR = regR; } public short getSp() { return sp; } public void setSp(short sp) { this.sp = sp; } public byte getCFlag() { return (byte) (this.regF & Masks.MASK_FLAG_C); } public byte getNFlag() { return (byte) (this.regF & Masks.MASK_FLAG_N); } public byte getPVFlag() { return (byte) (this.regF & Masks.MASK_FLAG_PV); } public byte gsetZFlag() { return (byte) (this.regF & Masks.MASK_FLAG_Z); } public byte getHFlag() { return (byte) (this.regF & Masks.MASK_FLAG_H); } public byte getSFlag() { return (byte) (this.regF & Masks.MASK_FLAG_S); } public void setCFlag() { this.regF = (byte) (this.regF & Masks.MASK_FLAG_C); } public void setNFlag() { this.regF = (byte) (this.regF & Masks.MASK_FLAG_N); } public void setPVFlag() { this.regF = (byte) (this.regF & Masks.MASK_FLAG_PV); } public void setZFlag() { this.regF = (byte) (this.regF & Masks.MASK_FLAG_Z); } public void setSFlag() { this.regF = (byte) (this.regF & Masks.MASK_FLAG_S); } public void setHFlag() { this.regF = (byte) (Masks.MASK_FLAG_H); } public void resetCFlag() { this.regF = (byte) (Masks.MASK_FLAG_C); } public void resetNFlag() { this.regF = (byte) (Masks.MASK_FLAG_N); } public void resetPVFlag() { this.regF = (byte) (Masks.MASK_FLAG_PV); } public void resetZFlag() { this.regF = (byte) (this.regF & Masks.MASK_FLAG_Z); } public void resetSFlag() { this.regF = (byte) (Masks.MASK_FLAG_S); } public void resetHFlag() { this.regF = (byte) (Masks.MASK_FLAG_H); } // C carry Flag // N ann/subtract // P/V Parity/Overflow flag // H Half carry flag // Z Zero flag // S Sign flag // X Not used @Override public String toString() { return ToStringBuilder.reflectionToString(this); } public static byte[] intToBytes(int x) { byte[] bytes = new byte[4]; for (int i = 0; x != 0; i++, x >>>= 8) { bytes[i] = (byte) (x & 0xFF); } return bytes; } public static byte setFlag(Machine machine, byte flags) { byte flagsPrev = machine.getZ80().getRegF(); byte flagsRes = (byte) (flagsPrev & flags); machine.getZ80().setRegF(flagsRes); return flagsRes; } public static int bytesToInt(byte[] arr, int off) { return arr[off] << 8 & 0xFF00 | arr[off + 1] & 0xFF; } // end of getInt public static short bytesToShort(byte hi, byte lo) { short val = (short) (((hi & 0xFF) << 8) | (lo & 0xFF)); return val; } public static byte[] shortToBytes(short x) { byte[] res = new byte[2]; res[0] = (byte) (x & 0xff); res[1] = (byte) ((x >> 8) & 0xff); return res; } private final static char[] hexArray = "0123456789ABCDEF".toCharArray(); public static String bytesToHex(byte[] bytes) { char[] hexChars = new char[bytes.length * 2]; for (int j = 0; j < bytes.length; j++) { int v = bytes[j] & 0xFF; hexChars[j * 2] = hexArray[v >>> 4]; hexChars[j * 2 + 1] = hexArray[v & 0x0F]; } return new String(hexChars); } public static String byteToHex(byte bytes) { int v = bytes & 0xFF; int ind = v >>> 4; return "" + hexArray[ind]; } public static final byte[] hexFromString(final String s) { String[] v = s.split(" "); byte[] arr = new byte[v.length]; int i = 0; for (String val : v) { arr[i++] = Integer.decode("0x" + val).byteValue(); } return arr; } public void printStatus() { logger.debug("Pc: " + bytesToHex(shortToBytes(pc))); logger.debug("A: " + byteToHex(regA)); logger.debug("B: " + byteToHex(regB)); logger.debug("C: " + byteToHex(regC)); logger.debug("D: " + byteToHex(regD)); logger.debug("E: " + byteToHex(regE)); } }
0f19cd84dc0996f37329b3be49c59474ede2e676
7abf3e0d525c8b3700f3f05751eedef953a9eef7
/src/ReverseWords.java
7651d7be3984c455fb6c63c214cc8526dd0e3819
[]
no_license
panbowen/LeetCodeOnlineJudge
40cb07bfbf132896a8dfe88986692c04040f222b
39d9406f76121af373e335f7dec281d9b6d72b0f
refs/heads/master
2016-09-06T00:07:02.672823
2015-08-02T14:12:35
2015-08-02T14:12:35
17,144,477
0
0
null
null
null
null
UTF-8
Java
false
false
556
java
public class ReverseWords { public static String reverseWords(String s) { int len = s.length(); if (len == 0 || len == 1) return s; String[] temp = s.split(" "); StringBuilder sb = new StringBuilder(); for (int i = temp.length -1; i>=0 ; i--){ if(!temp[i].equals("")) sb.append(temp[i]).append(" "); } return sb.length() == 0? "":sb.substring(0, sb.length()-1); } public static void main(String[] args){ String s = "the sky is blue"; System.out.println(reverseWords(s)); } }
b956946209770742b9b46d9a7ce9058fba2723e6
46d8584ea10af86dc69f3ec85cc3fcc08f4b4b10
/app/src/main/java/news/syj/com/activity/MainActivity.java
8ddb5d516dd35811ae1ec4e5a2112c8cbd9177e9
[]
no_license
shayajie/MyNewsApplication
7d0bf4d29e8c45d05a5ad7fa62bb6a18d7e5e124
d2e407684674ce95e947770f56429a2bbbf86c8f
refs/heads/master
2021-01-17T20:31:06.425193
2016-07-18T09:05:22
2016-07-18T09:05:22
63,029,046
0
0
null
null
null
null
UTF-8
Java
false
false
1,272
java
package news.syj.com.activity; import android.content.Intent; import android.support.annotation.Nullable; import android.support.design.widget.TabLayout; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import news.syj.com.R; import news.syj.com.utils.UmengManager; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override protected void onResume() { super.onResume(); UmengManager.onResume(this); } @Override protected void onPause() { super.onPause(); UmengManager.onPause(this); } }