blob_id
stringlengths 40
40
| language
stringclasses 1
value | repo_name
stringlengths 5
132
| path
stringlengths 2
382
| src_encoding
stringclasses 34
values | length_bytes
int64 9
3.8M
| score
float64 1.5
4.94
| int_score
int64 2
5
| detected_licenses
listlengths 0
142
| license_type
stringclasses 2
values | text
stringlengths 9
3.8M
| download_success
bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
ac189efa1e5dba9522a00bf9eee0bfed3f8537e4
|
Java
|
29partners/karter
|
/MongoDAO/src/main/java/com/moveon/rental/model/Transporter.java
|
UTF-8
| 1,016
| 2.375
| 2
|
[] |
no_license
|
package com.moveon.rental.model;
import java.util.Arrays;
public class Transporter extends BaseModel {
private String transporterName ;
private long[] phoneNumbers;
private Address address ;
private String emailId;
public String getTransporterName() {
return transporterName;
}
public void setTransporterName(String transporterName) {
this.transporterName = transporterName;
}
public long[] getPhoneNumbers() {
return phoneNumbers;
}
public void setPhoneNumbers(long[] phoneNumbers) {
this.phoneNumbers = phoneNumbers;
}
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
}
public String getEmailId() {
return emailId;
}
public void setEmailId(String emailId) {
this.emailId = emailId;
}
@Override
public String toString() {
return "[name -> "+getTransporterName()+";_id->"+getId()+";phone ->"+Arrays.toString(getPhoneNumbers())+"]";
}
}
| true
|
1bd66030accdd55c2545f28ecc6f336132cd59e8
|
Java
|
amirreza1375/ChecklistLibrary
|
/CheckListModule/src/main/java/com/example/checklist/BaseViewModel/MandatoryListener.java
|
UTF-8
| 177
| 1.859375
| 2
|
[
"MIT"
] |
permissive
|
package com.example.checklist.BaseViewModel;
public interface MandatoryListener {
void onMandatoryStatusError();
void onElementStatusChanged(boolean isConditionary);
}
| true
|
1194bf794ae5d69d8028a909ffa6230213a58374
|
Java
|
firebitsbr/scada-12
|
/src/com/scada/service/impl/UserRightServiceImpl.java
|
UTF-8
| 740
| 2.09375
| 2
|
[] |
no_license
|
package com.scada.service.impl;
import java.util.List;
import com.scada.dao.UserRightDao;
import com.scada.domain.UserRight;
import com.scada.service.UserRightService;
public class UserRightServiceImpl implements UserRightService {
private UserRightDao userRightDao;
public UserRightDao getUserRightDao() {
return userRightDao;
}
public void setUserRightDao(UserRightDao userRightDao) {
this.userRightDao = userRightDao;
}
@Override
public void save(UserRight userRight) {
this.userRightDao.save(userRight);
}
@Override
public List<UserRight> getAll() {
return this.userRightDao.getAll();
}
@Override
public UserRight findUserRightById(Integer id) {
return this.userRightDao.getUserRightById(id);
}
}
| true
|
fc026e899f1af1df0cdfd074297fbf5c228a170c
|
Java
|
akzlublin125/improvingskills
|
/src/ChapterThree/DatesAndTimes.java
|
UTF-8
| 880
| 3.359375
| 3
|
[] |
no_license
|
package ChapterThree;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Month;
/**
* Created by Michal on 09.03.2017.
*/
public class DatesAndTimes {
public static void main(String[] args) {
System.out.println(LocalDate.now());
System.out.println(LocalTime.now());
System.out.println(LocalDateTime.now());
LocalDate date1 = LocalDate.of(2015, Month.JANUARY, 20);
LocalDate date2 = LocalDate.of(2015, 1, 20);
// LocalTime time0 = LocalTime.of(6);
LocalTime time1 = LocalTime.of(6, 15);
LocalTime time2 = LocalTime.of(6, 15, 20, 200);
double year = 1992;
date1 = date1.plusDays(2);
//date1 = date1.plusYears(year);
LocalDate date = LocalDate.of(2020, Month.JANUARY, 20);
// date = date.plusMinutes(1);
}
}
| true
|
9f0f942079a91609d6dd2c540cf86da3b6e9ac24
|
Java
|
thais2106/Trabalho4oBim
|
/src/main/java/br/univel/produto/ProdutoDAO.java
|
ISO-8859-2
| 657
| 2.296875
| 2
|
[] |
no_license
|
package br.univel.produto;
import java.sql.SQLException;
import java.util.List;
/**
* Interface de mtodos da classe Produto
* @author tcrivelatti - 27/10/2015
*
*/
public interface ProdutoDAO {
public void inserir(Produto p) throws SQLException;
public void atualizar(Produto p) throws SQLException;
public void excluir (Produto p) throws SQLException;
public Produto buscar(int id) throws SQLException;
public List<Produto> listar() throws SQLException;
public List<Produto> listarCodBarras(String codbarras) throws SQLException;
public List<Produto> listarDescricao(String descricao) throws SQLException;
}
| true
|
24ed143e9c9850fab6bff1520dcd624f28a9ba5c
|
Java
|
Wudelin/MonitoringOfForest
|
/factory/src/main/java/com/wdl/factory/presenter/recognition/RecognitionPresenter.java
|
UTF-8
| 2,071
| 2.09375
| 2
|
[] |
no_license
|
package com.wdl.factory.presenter.recognition;
import android.text.TextUtils;
import com.wdl.factory.Factory;
import com.wdl.factory.data.DataSource;
import com.wdl.factory.data.data.helper.RecognitionHelper;
import com.wdl.factory.model.card.RecResult;
import com.wdl.factory.persistence.Account;
import com.wdl.factory.presenter.BasePresenter;
import net.qiujuer.genius.kit.handler.Run;
import net.qiujuer.genius.kit.handler.runable.Action;
/**
* 项目名: MonitoringOfForest
* 包名: com.wdl.factory.presenter.recognition
* 创建者: wdl
* 创建时间: 2018/8/22 14:50
* 描述: TODO
*/
@SuppressWarnings("unused")
public class RecognitionPresenter extends BasePresenter<RecognitionContract.View>
implements RecognitionContract.Presenter,DataSource.Callback<RecResult>{
public RecognitionPresenter(RecognitionContract.View view) {
super(view);
}
@Override
public void recognition(final String path) {
final RecognitionContract.View view = getView();
if (TextUtils.isEmpty(path))return;
final String accessToken = Account.getToken();
if ("".equals(accessToken)) {
if (view!=null){
Run.onUiAsync(new Action() {
@Override
public void call() {
// view.showError();
}
});
}
return;
}
Factory.runOnAsy(new Runnable() {
@Override
public void run() {
RecognitionHelper.recognition(path,accessToken,RecognitionPresenter.this);
}
});
}
@Override
public void onLoaded(final RecResult data) {
final RecognitionContract.View view = getView();
if (data!=null&&view!=null){
Run.onUiAsync(new Action() {
@Override
public void call() {
view.succeed(data);
}
});
}
}
@Override
public void onNotAvailable(int res) {
}
}
| true
|
2d1fcecb4785132acde63d4a657b987e7634fa23
|
Java
|
foodmade/iwallet
|
/src/main/java/com/qkl/wallet/core/event/WithdrawEvent.java
|
UTF-8
| 910
| 2.21875
| 2
|
[] |
no_license
|
package com.qkl.wallet.core.event;
import com.qkl.wallet.common.enumeration.ExceptionEnum;
import com.qkl.wallet.vo.out.WithdrawCallback;
import lombok.Data;
import org.springframework.context.ApplicationEvent;
@Data
public class WithdrawEvent extends ApplicationEvent {
/**
* 0 成功
* 1 失败
*/
private Integer type;
/**
* 备注
*/
private String message;
/**
* 回调参数
*/
private WithdrawCallback callbackResponse;
public WithdrawEvent(Object source,WithdrawCallback callbackResponse,Integer type,String message) {
super(source);
this.type = type;
this.message = message;
this.callbackResponse = callbackResponse;
if(this.type == 1){
this.callbackResponse.setMessage(message);
this.callbackResponse.setCode(ExceptionEnum.SERVICEERROR.getCode());
}
}
}
| true
|
145c06b65de17315b54ccd4722f95959e470da7d
|
Java
|
umairsheikh/Pipeflow-Parser
|
/main/java/org/deri/cqels/engine/ProjectRouter.java
|
UTF-8
| 1,422
| 2.015625
| 2
|
[] |
no_license
|
package org.deri.cqels.engine;
import java.lang.reflect.Method;
import java.util.List;
import org.deri.cqels.data.ExtendMapping;
import org.deri.cqels.data.Mapping;
import org.deri.cqels.data.ProjectMapping;
import org.deri.cqels.engine.iterator.MappingIterator;
import org.deri.cqels.engine.iterator.NullMappingIter;
import com.hp.hpl.jena.sparql.algebra.op.OpExtend;
import com.hp.hpl.jena.sparql.algebra.op.OpProject;
import com.hp.hpl.jena.sparql.core.Var;
import com.hp.hpl.jena.sparql.core.VarExprList;
/**
* This class implements the router with project operator
* @author Danh Le Phuoc
* @author Chan Le Van
* @organization DERI Galway, NUIG, Ireland www.deri.ie
* @email danh.lephuoc@deri.org
* @email chan.levan@deri.org
* @see OpRouter1
*/
public class ProjectRouter extends OpRouter1 {
List<Var> vars;
public ProjectRouter(ExecContext context, OpProject op, OpRouter sub) {
super(context, op, sub);
vars = op.getVars();
}
@Override
public void route(Mapping mapping)
{
//System.out.println("project "+mapping);
_route(new ProjectMapping(context, mapping, vars));
}
@Override
public MappingIterator searchBuff4Match(Mapping mapping) {
//TODO: check if necessary to call this method
return NullMappingIter.instance();
}
@Override
public MappingIterator getBuff() {
return NullMappingIter.instance();
}
public void visit(RouterVisitor rv) {
rv.visit(this);
this.subRouter.visit(rv);
}
}
| true
|
addc65f1610caca539ff70fce5e58cc28d905393
|
Java
|
zhongxingyu/Seer
|
/Diff-Raw-Data/11/11_e2af5a0e9eeff1f30c741e77d2aa9bd31a21f1e9/Armor/11_e2af5a0e9eeff1f30c741e77d2aa9bd31a21f1e9_Armor_s.java
|
UTF-8
| 4,517
| 2.203125
| 2
|
[] |
no_license
|
package me.Joeyy.Armor;
import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.logging.Logger;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.player.PlayerListener;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import com.nijiko.permissions.PermissionHandler;
import com.nijikokun.bukkit.Permissions.Permissions;
public class Armor extends JavaPlugin {
ArmorListener ArmorListener = new ArmorListener(this);
PlayerListener ArmorMove = new PlayerListener();
public static PermissionHandler Permissions;
public static final Logger log = Logger.getLogger("Minecraft");
public final static String premessage = ChatColor.RED + "[Armor] "
+ ChatColor.YELLOW;
public void onEnable() {
PluginManager pm = getServer().getPluginManager();
pm.registerEvent(Event.Type.ENTITY_DAMAGE, ArmorListener,
Event.Priority.Normal, this);
this.loadConfigFile();
setupPermissions();
log.info("Armor version " + getDescription().getVersion()
+ " is enabled");
getCommand("equiparmor").setExecutor(new EquipArmorCommand(this));
}
public void onDisable() {
log.info("Armor version " + getDescription().getVersion()
+ " is disabled");
}
public void loadConfigFile() {
// load config file, creating it first if it doesn't exist
File configFile = new File(this.getDataFolder(), "config.properties");
if (!configFile.canRead())
try {
FileOutputStream myFile;
PrintStream myStream;
configFile.getParentFile().mkdirs();
myFile = new FileOutputStream(configFile);
myStream = new PrintStream(myFile);
myStream.println("##Control falldamage for each shoe##");
myStream.println("\n");
myStream.println("Leather-Boots-Fall-Damage-Prevention: 1\n");
myStream.println("Iron-Boots-Fall-Damage-Prevention: 2\n");
myStream.println("Gold-Boots-Fall-Damage-Prevention: 3\n");
myStream.println("Diamond-Boots-Fall-Damage-Prevention: 4\n");
myStream.println("\n");
myStream.println("##Control lavadamage for each armor set##");
myStream.println("\n");
myStream.println("Set-Lava-Damage-Using-Ironarmor: 3\n");
myStream.println("Set-Lava-Damage-Using-Goldarmor: 2\n");
myStream.println("Set-Lava-Damage-Using-Diamondarmor: 1\n");
myStream.println("\n");
myStream.println("##Hurt on hitting cactus with armor (true/false)##");
myStream.println("\n");
myStream.println("Hurt-On-Catcus-Contact-Prevention: true\n");
myStream.println("\n");
myStream.println("##Gold boots giving light (true/false)##");
myStream.println("\n");
myStream.println("Gold-Boots-Give-Light: true\n");
myStream.println("\n");
myStream.println("##Control monster damage##");
myStream.println("\n");
myStream.close();
} catch (Exception e) {
System.out
.println("ERROR! Armor: could not create configuration file");
}
}
@SuppressWarnings("static-access")
private void setupPermissions() {
Plugin test = this.getServer().getPluginManager().getPlugin("Permissions");
if (this.Permissions == null) {
if (test != null) {
this.Permissions = ((Permissions)test).getHandler();
} else {
log.info("Permission system not detected, defaulting to OP");
}
}
}
public boolean isPlayer(CommandSender sender) {
if (sender instanceof Player)
return true;
return false;
}
public static void givePlayerArmor(Player player, ArmorType set) {
if (player == null || !player.isOnline())
return;
PlayerInventory inv = player.getInventory();
inv.setHelmet(new ItemStack(set.helmet, 1, set.helmet.getMaxDurability(), new Byte((byte) 0)));
inv.setChestplate(new ItemStack(set.chestplate, 1, set.chestplate.getMaxDurability(), new Byte((byte) 0)));
inv.setLeggings(new ItemStack(set.leggings, 1, set.leggings.getMaxDurability(), new Byte((byte) 0)));
inv.setBoots(new ItemStack(set.boots, 1, set.boots.getMaxDurability(), new Byte((byte) 0)));
}
}
| true
|
ad5ba6f90f6b5af40e09648f22af8219d76e6848
|
Java
|
AliLozano/johm
|
/src/test/java/redis/clients/johm/benchmark/SimpleTimer.java
|
UTF-8
| 645
| 2.6875
| 3
|
[
"MIT"
] |
permissive
|
package redis.clients.johm.benchmark;
import java.util.Calendar;
import java.util.concurrent.atomic.AtomicLong;
final class SimpleTimer {
private final AtomicLong beginMillis = new AtomicLong(0L);
private final AtomicLong endMillis = new AtomicLong(0L);
void begin() {
reset(); // better be safe
beginMillis.set(Calendar.getInstance().getTimeInMillis());
}
void end() {
endMillis.set(Calendar.getInstance().getTimeInMillis());
}
long elapsed() {
return endMillis.get() - beginMillis.get();
}
void reset() {
beginMillis.set(0L);
endMillis.set(0L);
}
}
| true
|
a11e83b199da19335d805395c606f12708b85fc9
|
Java
|
equivi/mailsy-application-controller
|
/src/test/java/com/equivi/mailsy/application/controller/AppRegistryControllerTest.java
|
UTF-8
| 808
| 1.96875
| 2
|
[] |
no_license
|
package com.equivi.mailsy.application.controller;
import com.equivi.mailsy.application.service.AppRegistryService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import static org.mockito.Mockito.verify;
@RunWith(MockitoJUnitRunner.class)
public class AppRegistryControllerTest {
@Mock
private AppRegistryService appRegistryService;
@InjectMocks
private AppRegistryController appRegistryController;
private static final String appRegistryKey = "ABC-123";
@Test
public void testCheckRegistryKey() throws Exception {
appRegistryController.checkRegistryKey(appRegistryKey);
verify(appRegistryService).isApplicationExpired(appRegistryKey);
}
}
| true
|
85865bc65ceded39ea4f1e685f18ab821c7f0f20
|
Java
|
hhhu04/practice
|
/feed/src/main/java/cat/feed/controller/TestController.java
|
UTF-8
| 1,420
| 2.234375
| 2
|
[] |
no_license
|
package cat.feed.controller;
import cat.feed.entity.User;
import cat.feed.jwt.JwtTokenProvider;
import cat.feed.repository.UserRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@RestController
@RequiredArgsConstructor
public class TestController {
private final PasswordEncoder passwordEncoder;
private final JwtTokenProvider jwtTokenProvider;
private final UserRepository userRepository;
// 회원가입
@PostMapping("/join2")
public User join(@RequestBody User user) {
user = user.userJoin(user,passwordEncoder);
return userRepository.save(user);
}
@PostMapping("/login2")
public String login(@RequestBody Map<String, String> user) {
User member = userRepository.findByUserId(user.get("userId"))
.orElseThrow(() -> new IllegalArgumentException("가입되지 않은 E-MAIL 입니다."));
if (!passwordEncoder.matches(user.get("password"), member.getPassword())) {
throw new IllegalArgumentException("잘못된 비밀번호입니다.");
}
return jwtTokenProvider.createToken(member.getUsername(), member.getRoles());
}
}
| true
|
78524fafee54ebde479f47b7e76a1e297443f2c8
|
Java
|
voraj/StrategyPattern
|
/src/com/p532/brickout/impl/WallCollisionChecker.java
|
UTF-8
| 794
| 2.71875
| 3
|
[] |
no_license
|
package com.p532.brickout.impl;
import com.p532.brickout.gameui.Board;
import com.p532.brickout.intf.EventChecker;
public class WallCollisionChecker implements EventChecker {
private int x;
private int y;
private Board board;
public WallCollisionChecker() {
// TODO Auto-generated constructor stub
}
public WallCollisionChecker(Board board) {
super();
this.board = board;
}
@Override
public void check() {
if (x <= 0 || x >= board.getWidth() - board.getBall().getWidth()) {
board.getBall().reverseXDir();
}
if (y <= 0) {
board.getBall().reverseYDir();
}
}
@Override
public void setX(int x) {
this.x = x;
}
@Override
public void setY(int y) {
// TODO Auto-generated method stub
this.y = y;
}
}
| true
|
10e8d45d7f763a5615a4214bfd6e941ad742a73e
|
Java
|
moutainhigh/foss
|
/esb-extends-pojo/src/main/java/com/deppon/esb/pojo/domain/crm2foss/UpdateEOrderRequest.java
|
UTF-8
| 34,476
| 1.789063
| 2
|
[] |
no_license
|
package com.deppon.esb.pojo.domain.crm2foss;
import java.util.Date;
/**
* @ClassName: updateOrderRquest
* @Description: TODO(这里用一句话描述这个类的作用)
* @author lvchognxin
* @date 2015年6月5日 上午9:23:10
*
*/
public class UpdateEOrderRequest {
/**
* 创建时间
*/
private Date createDate;
/**
* 创建人
*/
private String createUser;
/**
* ID
*/
private String id;
/**
* 修改时间
*/
private Date modifyDate;
/**
* 修改人
*/
private String modifyUser;
/**
* 受理部门
*/
private String acceptDept;//
/**
* 受理部门名称
*/
private String acceptDeptName;
/**
* 接货员手机
*/
private String accepterPersonMobile;
/**
* 接货起始时间
*/
private Date beginAcceptTime;
/**
* 渠道客户Id
*/
private String channelCustId;
/**
* 渠道单号
*/
private String channelNumber;
/**
* 渠道类型
*/
private String channelType;
/**
* 联系人id
*/
private String contactManId;
/**
* 联系人手机
*/
private String contactMobile;
/**
* 发货联系人名称
*/
private String contactName;
/**
* 联系人电话
*/
private String contactPhone;
/**
* 联系人省份
*/
private String contactProvince;
/**
* 联系地址
*/
private String contactAddress;
/**
* 联系区域
*/
private String contactArea;
/**
* 联系城市
*/
private String contactCity;
/**
* 联系人省份编码
*/
private String contactProvinceCode;
/**
* 联系城市编码
*/
private String contactCityCode;
/**
* 联系区编码
*/
private String contactAreaCode;
/**
* 受理人
*/
private String dealPerson;
/**
* 提货方式
*/
private String deliveryMode;
/**
* 接货结束时间
*/
private Date endAcceptTime;
/**
* 反馈信息
*/
private String feedbackInfo;
/**
* 货物名称
*/
private String goodsName;
/**
* 托运货物总件数
*/
private Integer goodsNumber;
/**
* 货物总体积
*/
private Double totalVolume;
/**
* 托运货物总重量
*/
private Double totalWeight;
/**
* 货物类型
*/
private String goodsType;
/**
* 报价申明价值
*/
private Double insuredAmount;
/**
* 是否接货
*/
private Boolean isReceiveGoods;
/**
* 是否短信通知
*/
private Boolean isSendmessage;
/**
* 阿里巴巴订单的会员类型
*/
private String memberType;
/**
* 官网收货人德邦用户名
*/
private String onlineName;
/**
* 订单受理时间
*/
private Date orderAcceptTime;
/**
* 订单号
*/
private String orderNumber;
/**
* 下单人
*/
private String orderPerson;
/**
* 订单状态
*/
private String orderStatus;
/**
* 下单时间
*/
private Date orderTime;
/**
* 货物包装类型
*/
private String packing;
/**
* 付款方式
*/
private String paymentType;
/**
* 接货员
*/
private String receiver;
/**
* 收货人详细地址
*/
private String receiverCustAddress;
/**
* 收货人区县
*/
private String receiverCustArea;
/**
* 收货人城市
*/
private String receiverCustCity;
/**
* 收货人省份
*/
private String receiverCustProvince;
/**
* 出发省编码
*/
private String receiveProvinceCode;
/**
* 出发市编码
*/
private String receiveCityCode;
/**
* 出发区编码
*/
private String receiveCountyCode;
/**
* 收货客户id
*/
private String receiverCustId;
/**
* 收货人联系手机
*/
private String receiverCustMobile;
/**
* 收货人客户姓名
*/
private String receiverCustName;
/**
* 收货客户编号
*/
private String receiverCustNumber;
/**
* 接货人联系电话
*/
private String receiverCustPhone;
/**
* 收货客户所属公司
*/
private String receiverCustcompany;
/**
* 到达网点
*/
private String receivingToPoint;
/**
* 到达网点名称
*/
private String receivingToPointName;
/**
* 代收货款类型
*/
private String reciveLoanType;
/**
* 订单来源
*/
private String resource;
/**
* 签收单
*/
private String returnBillType;
/**
* 代收货款金额
*/
private Double reviceMoneyAmount;
/**
* 发货id
*/
private String shipperId;
/**
* 发货名称
*/
private String shipperName;
/**
* 发货编码
*/
private String shipperNumber;
/**
* 始发网点
*/
private String startStation;
/**
* 始发网点名称
*/
private String startStationName;
/**
* 储运事项
*/
private String transNote;
/**
* 货物运输方式
*/
private String transportMode;
/**
* 运单号
*/
private String waybillNumber;
/**
* 优惠券
*/
private String couponNumber;
/**
* 是否电子运单大客户 add by 2014-08-22
*/
private String ifElecBillBigCust;
/**
* 订单类型 add by 2014-08-22
*/
private String orderType;
/**
* 代收货款账号 add by 2014-08-22
*/
private String reciveLoanAccount;
/**
* 开户名 add by 2014-08-22
*/
private String accountName;
/**
* 发货地址备注
*/
private String contactAddrRemark;
/**
* 收货地址备注
*/
private String receiverCustAddrRemark;
/**
* 是否电子发票 add by 2014-10-24
*/
private String ifEInvoice;
/**
* 电子发票手机号 add by 2014-10-24
*/
private String invoicePhone;
/**
* 电子发票邮箱 add by 2014-10-24
*/
private String invoiceMail;
// 原始发货地址
private String originalsaddress;
// 原始发货街道镇
private String originalraddress;
// 原始收货地址
private String originalsStreet;
// 原始收货街道镇
private String originalrStreet;
// 是否推荐物流
private String recommend;
// 纯运费
private Double freight;
// 采购单号
private String procurementNumber;
// 是否淘系订单
private String ifTaoBao;
// 大头笔
private String markerPen;
// 路由信息
private String routInfo;
// 修改类型
private String modifyType;
// 版本号
private Double versionId;
//是否子母件
private String isPicPackage;
// 原始单号
private String originalNumber;
/**
* @return createDate
*/
public Date getCreateDate() {
return createDate;
}
/**
* @param createDate the createDate to set
*/
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
/**
* @return createUser
*/
public String getCreateUser() {
return createUser;
}
/**
* @param createUser the createUser to set
*/
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
/**
* @return id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return modifyDate
*/
public Date getModifyDate() {
return modifyDate;
}
/**
* @param modifyDate the modifyDate to set
*/
public void setModifyDate(Date modifyDate) {
this.modifyDate = modifyDate;
}
/**
* @return modifyUser
*/
public String getModifyUser() {
return modifyUser;
}
/**
* @param modifyUser the modifyUser to set
*/
public void setModifyUser(String modifyUser) {
this.modifyUser = modifyUser;
}
/**
* @return acceptDept
*/
public String getAcceptDept() {
return acceptDept;
}
/**
* @param acceptDept the acceptDept to set
*/
public void setAcceptDept(String acceptDept) {
this.acceptDept = acceptDept;
}
/**
* @return acceptDeptName
*/
public String getAcceptDeptName() {
return acceptDeptName;
}
/**
* @param acceptDeptName the acceptDeptName to set
*/
public void setAcceptDeptName(String acceptDeptName) {
this.acceptDeptName = acceptDeptName;
}
/**
* @return accepterPersonMobile
*/
public String getAccepterPersonMobile() {
return accepterPersonMobile;
}
/**
* @param accepterPersonMobile the accepterPersonMobile to set
*/
public void setAccepterPersonMobile(String accepterPersonMobile) {
this.accepterPersonMobile = accepterPersonMobile;
}
/**
* @return beginAcceptTime
*/
public Date getBeginAcceptTime() {
return beginAcceptTime;
}
/**
* @param beginAcceptTime the beginAcceptTime to set
*/
public void setBeginAcceptTime(Date beginAcceptTime) {
this.beginAcceptTime = beginAcceptTime;
}
/**
* @return channelCustId
*/
public String getChannelCustId() {
return channelCustId;
}
/**
* @param channelCustId the channelCustId to set
*/
public void setChannelCustId(String channelCustId) {
this.channelCustId = channelCustId;
}
/**
* @return channelNumber
*/
public String getChannelNumber() {
return channelNumber;
}
/**
* @param channelNumber the channelNumber to set
*/
public void setChannelNumber(String channelNumber) {
this.channelNumber = channelNumber;
}
/**
* @return channelType
*/
public String getChannelType() {
return channelType;
}
/**
* @param channelType the channelType to set
*/
public void setChannelType(String channelType) {
this.channelType = channelType;
}
/**
* @return contactManId
*/
public String getContactManId() {
return contactManId;
}
/**
* @param contactManId the contactManId to set
*/
public void setContactManId(String contactManId) {
this.contactManId = contactManId;
}
/**
* @return contactMobile
*/
public String getContactMobile() {
return contactMobile;
}
/**
* @param contactMobile the contactMobile to set
*/
public void setContactMobile(String contactMobile) {
this.contactMobile = contactMobile;
}
/**
* @return contactName
*/
public String getContactName() {
return contactName;
}
/**
* @param contactName the contactName to set
*/
public void setContactName(String contactName) {
this.contactName = contactName;
}
/**
* @return contactPhone
*/
public String getContactPhone() {
return contactPhone;
}
/**
* @param contactPhone the contactPhone to set
*/
public void setContactPhone(String contactPhone) {
this.contactPhone = contactPhone;
}
/**
* @return contactProvince
*/
public String getContactProvince() {
return contactProvince;
}
/**
* @param contactProvince the contactProvince to set
*/
public void setContactProvince(String contactProvince) {
this.contactProvince = contactProvince;
}
/**
* @return contactAddress
*/
public String getContactAddress() {
return contactAddress;
}
/**
* @param contactAddress the contactAddress to set
*/
public void setContactAddress(String contactAddress) {
this.contactAddress = contactAddress;
}
/**
* @return contactArea
*/
public String getContactArea() {
return contactArea;
}
/**
* @param contactArea the contactArea to set
*/
public void setContactArea(String contactArea) {
this.contactArea = contactArea;
}
/**
* @return contactCity
*/
public String getContactCity() {
return contactCity;
}
/**
* @param contactCity the contactCity to set
*/
public void setContactCity(String contactCity) {
this.contactCity = contactCity;
}
/**
* @return contactProvinceCode
*/
public String getContactProvinceCode() {
return contactProvinceCode;
}
/**
* @param contactProvinceCode the contactProvinceCode to set
*/
public void setContactProvinceCode(String contactProvinceCode) {
this.contactProvinceCode = contactProvinceCode;
}
/**
* @return contactCityCode
*/
public String getContactCityCode() {
return contactCityCode;
}
/**
* @param contactCityCode the contactCityCode to set
*/
public void setContactCityCode(String contactCityCode) {
this.contactCityCode = contactCityCode;
}
/**
* @return contactAreaCode
*/
public String getContactAreaCode() {
return contactAreaCode;
}
/**
* @param contactAreaCode the contactAreaCode to set
*/
public void setContactAreaCode(String contactAreaCode) {
this.contactAreaCode = contactAreaCode;
}
/**
* @return dealPerson
*/
public String getDealPerson() {
return dealPerson;
}
/**
* @param dealPerson the dealPerson to set
*/
public void setDealPerson(String dealPerson) {
this.dealPerson = dealPerson;
}
/**
* @return deliveryMode
*/
public String getDeliveryMode() {
return deliveryMode;
}
/**
* @param deliveryMode the deliveryMode to set
*/
public void setDeliveryMode(String deliveryMode) {
this.deliveryMode = deliveryMode;
}
/**
* @return endAcceptTime
*/
public Date getEndAcceptTime() {
return endAcceptTime;
}
/**
* @param endAcceptTime the endAcceptTime to set
*/
public void setEndAcceptTime(Date endAcceptTime) {
this.endAcceptTime = endAcceptTime;
}
/**
* @return feedbackInfo
*/
public String getFeedbackInfo() {
return feedbackInfo;
}
/**
* @param feedbackInfo the feedbackInfo to set
*/
public void setFeedbackInfo(String feedbackInfo) {
this.feedbackInfo = feedbackInfo;
}
/**
* @return goodsName
*/
public String getGoodsName() {
return goodsName;
}
/**
* @param goodsName the goodsName to set
*/
public void setGoodsName(String goodsName) {
this.goodsName = goodsName;
}
/**
* @return goodsNumber
*/
public Integer getGoodsNumber() {
return goodsNumber;
}
/**
* @param goodsNumber the goodsNumber to set
*/
public void setGoodsNumber(Integer goodsNumber) {
this.goodsNumber = goodsNumber;
}
/**
* @return totalVolume
*/
public Double getTotalVolume() {
return totalVolume;
}
/**
* @param totalVolume the totalVolume to set
*/
public void setTotalVolume(Double totalVolume) {
this.totalVolume = totalVolume;
}
/**
* @return totalWeight
*/
public Double getTotalWeight() {
return totalWeight;
}
/**
* @param totalWeight the totalWeight to set
*/
public void setTotalWeight(Double totalWeight) {
this.totalWeight = totalWeight;
}
/**
* @return goodsType
*/
public String getGoodsType() {
return goodsType;
}
/**
* @param goodsType the goodsType to set
*/
public void setGoodsType(String goodsType) {
this.goodsType = goodsType;
}
/**
* @return insuredAmount
*/
public Double getInsuredAmount() {
return insuredAmount;
}
/**
* @param insuredAmount the insuredAmount to set
*/
public void setInsuredAmount(Double insuredAmount) {
this.insuredAmount = insuredAmount;
}
/**
* @return isReceiveGoods
*/
public Boolean getIsReceiveGoods() {
return isReceiveGoods;
}
/**
* @param isReceiveGoods the isReceiveGoods to set
*/
public void setIsReceiveGoods(Boolean isReceiveGoods) {
this.isReceiveGoods = isReceiveGoods;
}
/**
* @return isSendmessage
*/
public Boolean getIsSendmessage() {
return isSendmessage;
}
/**
* @param isSendmessage the isSendmessage to set
*/
public void setIsSendmessage(Boolean isSendmessage) {
this.isSendmessage = isSendmessage;
}
/**
* @return memberType
*/
public String getMemberType() {
return memberType;
}
/**
* @param memberType the memberType to set
*/
public void setMemberType(String memberType) {
this.memberType = memberType;
}
/**
* @return onlineName
*/
public String getOnlineName() {
return onlineName;
}
/**
* @param onlineName the onlineName to set
*/
public void setOnlineName(String onlineName) {
this.onlineName = onlineName;
}
/**
* @return orderAcceptTime
*/
public Date getOrderAcceptTime() {
return orderAcceptTime;
}
/**
* @param orderAcceptTime the orderAcceptTime to set
*/
public void setOrderAcceptTime(Date orderAcceptTime) {
this.orderAcceptTime = orderAcceptTime;
}
/**
* @return orderNumber
*/
public String getOrderNumber() {
return orderNumber;
}
/**
* @param orderNumber the orderNumber to set
*/
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
/**
* @return orderPerson
*/
public String getOrderPerson() {
return orderPerson;
}
/**
* @param orderPerson the orderPerson to set
*/
public void setOrderPerson(String orderPerson) {
this.orderPerson = orderPerson;
}
/**
* @return orderStatus
*/
public String getOrderStatus() {
return orderStatus;
}
/**
* @param orderStatus the orderStatus to set
*/
public void setOrderStatus(String orderStatus) {
this.orderStatus = orderStatus;
}
/**
* @return orderTime
*/
public Date getOrderTime() {
return orderTime;
}
/**
* @param orderTime the orderTime to set
*/
public void setOrderTime(Date orderTime) {
this.orderTime = orderTime;
}
/**
* @return packing
*/
public String getPacking() {
return packing;
}
/**
* @param packing the packing to set
*/
public void setPacking(String packing) {
this.packing = packing;
}
/**
* @return paymentType
*/
public String getPaymentType() {
return paymentType;
}
/**
* @param paymentType the paymentType to set
*/
public void setPaymentType(String paymentType) {
this.paymentType = paymentType;
}
/**
* @return receiver
*/
public String getReceiver() {
return receiver;
}
/**
* @param receiver the receiver to set
*/
public void setReceiver(String receiver) {
this.receiver = receiver;
}
/**
* @return receiverCustAddress
*/
public String getReceiverCustAddress() {
return receiverCustAddress;
}
/**
* @param receiverCustAddress the receiverCustAddress to set
*/
public void setReceiverCustAddress(String receiverCustAddress) {
this.receiverCustAddress = receiverCustAddress;
}
/**
* @return receiverCustArea
*/
public String getReceiverCustArea() {
return receiverCustArea;
}
/**
* @param receiverCustArea the receiverCustArea to set
*/
public void setReceiverCustArea(String receiverCustArea) {
this.receiverCustArea = receiverCustArea;
}
/**
* @return receiverCustCity
*/
public String getReceiverCustCity() {
return receiverCustCity;
}
/**
* @param receiverCustCity the receiverCustCity to set
*/
public void setReceiverCustCity(String receiverCustCity) {
this.receiverCustCity = receiverCustCity;
}
/**
* @return receiverCustProvince
*/
public String getReceiverCustProvince() {
return receiverCustProvince;
}
/**
* @param receiverCustProvince the receiverCustProvince to set
*/
public void setReceiverCustProvince(String receiverCustProvince) {
this.receiverCustProvince = receiverCustProvince;
}
/**
* @return receiveProvinceCode
*/
public String getReceiveProvinceCode() {
return receiveProvinceCode;
}
/**
* @param receiveProvinceCode the receiveProvinceCode to set
*/
public void setReceiveProvinceCode(String receiveProvinceCode) {
this.receiveProvinceCode = receiveProvinceCode;
}
/**
* @return receiveCityCode
*/
public String getReceiveCityCode() {
return receiveCityCode;
}
/**
* @param receiveCityCode the receiveCityCode to set
*/
public void setReceiveCityCode(String receiveCityCode) {
this.receiveCityCode = receiveCityCode;
}
/**
* @return receiveCountyCode
*/
public String getReceiveCountyCode() {
return receiveCountyCode;
}
/**
* @param receiveCountyCode the receiveCountyCode to set
*/
public void setReceiveCountyCode(String receiveCountyCode) {
this.receiveCountyCode = receiveCountyCode;
}
/**
* @return receiverCustId
*/
public String getReceiverCustId() {
return receiverCustId;
}
/**
* @param receiverCustId the receiverCustId to set
*/
public void setReceiverCustId(String receiverCustId) {
this.receiverCustId = receiverCustId;
}
/**
* @return receiverCustMobile
*/
public String getReceiverCustMobile() {
return receiverCustMobile;
}
/**
* @param receiverCustMobile the receiverCustMobile to set
*/
public void setReceiverCustMobile(String receiverCustMobile) {
this.receiverCustMobile = receiverCustMobile;
}
/**
* @return receiverCustName
*/
public String getReceiverCustName() {
return receiverCustName;
}
/**
* @param receiverCustName the receiverCustName to set
*/
public void setReceiverCustName(String receiverCustName) {
this.receiverCustName = receiverCustName;
}
/**
* @return receiverCustNumber
*/
public String getReceiverCustNumber() {
return receiverCustNumber;
}
/**
* @param receiverCustNumber the receiverCustNumber to set
*/
public void setReceiverCustNumber(String receiverCustNumber) {
this.receiverCustNumber = receiverCustNumber;
}
/**
* @return receiverCustPhone
*/
public String getReceiverCustPhone() {
return receiverCustPhone;
}
/**
* @param receiverCustPhone the receiverCustPhone to set
*/
public void setReceiverCustPhone(String receiverCustPhone) {
this.receiverCustPhone = receiverCustPhone;
}
/**
* @return receiverCustcompany
*/
public String getReceiverCustcompany() {
return receiverCustcompany;
}
/**
* @param receiverCustcompany the receiverCustcompany to set
*/
public void setReceiverCustcompany(String receiverCustcompany) {
this.receiverCustcompany = receiverCustcompany;
}
/**
* @return receivingToPoint
*/
public String getReceivingToPoint() {
return receivingToPoint;
}
/**
* @param receivingToPoint the receivingToPoint to set
*/
public void setReceivingToPoint(String receivingToPoint) {
this.receivingToPoint = receivingToPoint;
}
/**
* @return receivingToPointName
*/
public String getReceivingToPointName() {
return receivingToPointName;
}
/**
* @param receivingToPointName the receivingToPointName to set
*/
public void setReceivingToPointName(String receivingToPointName) {
this.receivingToPointName = receivingToPointName;
}
/**
* @return reciveLoanType
*/
public String getReciveLoanType() {
return reciveLoanType;
}
/**
* @param reciveLoanType the reciveLoanType to set
*/
public void setReciveLoanType(String reciveLoanType) {
this.reciveLoanType = reciveLoanType;
}
/**
* @return resource
*/
public String getResource() {
return resource;
}
/**
* @param resource the resource to set
*/
public void setResource(String resource) {
this.resource = resource;
}
/**
* @return returnBillType
*/
public String getReturnBillType() {
return returnBillType;
}
/**
* @param returnBillType the returnBillType to set
*/
public void setReturnBillType(String returnBillType) {
this.returnBillType = returnBillType;
}
/**
* @return reviceMoneyAmount
*/
public Double getReviceMoneyAmount() {
return reviceMoneyAmount;
}
/**
* @param reviceMoneyAmount the reviceMoneyAmount to set
*/
public void setReviceMoneyAmount(Double reviceMoneyAmount) {
this.reviceMoneyAmount = reviceMoneyAmount;
}
/**
* @return shipperId
*/
public String getShipperId() {
return shipperId;
}
/**
* @param shipperId the shipperId to set
*/
public void setShipperId(String shipperId) {
this.shipperId = shipperId;
}
/**
* @return shipperName
*/
public String getShipperName() {
return shipperName;
}
/**
* @param shipperName the shipperName to set
*/
public void setShipperName(String shipperName) {
this.shipperName = shipperName;
}
/**
* @return shipperNumber
*/
public String getShipperNumber() {
return shipperNumber;
}
/**
* @param shipperNumber the shipperNumber to set
*/
public void setShipperNumber(String shipperNumber) {
this.shipperNumber = shipperNumber;
}
/**
* @return startStation
*/
public String getStartStation() {
return startStation;
}
/**
* @param startStation the startStation to set
*/
public void setStartStation(String startStation) {
this.startStation = startStation;
}
/**
* @return startStationName
*/
public String getStartStationName() {
return startStationName;
}
/**
* @param startStationName the startStationName to set
*/
public void setStartStationName(String startStationName) {
this.startStationName = startStationName;
}
/**
* @return transNote
*/
public String getTransNote() {
return transNote;
}
/**
* @param transNote the transNote to set
*/
public void setTransNote(String transNote) {
this.transNote = transNote;
}
/**
* @return transportMode
*/
public String getTransportMode() {
return transportMode;
}
/**
* @param transportMode the transportMode to set
*/
public void setTransportMode(String transportMode) {
this.transportMode = transportMode;
}
/**
* @return waybillNumber
*/
public String getWaybillNumber() {
return waybillNumber;
}
/**
* @param waybillNumber the waybillNumber to set
*/
public void setWaybillNumber(String waybillNumber) {
this.waybillNumber = waybillNumber;
}
/**
* @return couponNumber
*/
public String getCouponNumber() {
return couponNumber;
}
/**
* @param couponNumber the couponNumber to set
*/
public void setCouponNumber(String couponNumber) {
this.couponNumber = couponNumber;
}
/**
* @return ifElecBillBigCust
*/
public String getIfElecBillBigCust() {
return ifElecBillBigCust;
}
/**
* @param ifElecBillBigCust the ifElecBillBigCust to set
*/
public void setIfElecBillBigCust(String ifElecBillBigCust) {
this.ifElecBillBigCust = ifElecBillBigCust;
}
/**
* @return orderType
*/
public String getOrderType() {
return orderType;
}
/**
* @param orderType the orderType to set
*/
public void setOrderType(String orderType) {
this.orderType = orderType;
}
/**
* @return reciveLoanAccount
*/
public String getReciveLoanAccount() {
return reciveLoanAccount;
}
/**
* @param reciveLoanAccount the reciveLoanAccount to set
*/
public void setReciveLoanAccount(String reciveLoanAccount) {
this.reciveLoanAccount = reciveLoanAccount;
}
/**
* @return accountName
*/
public String getAccountName() {
return accountName;
}
/**
* @param accountName the accountName to set
*/
public void setAccountName(String accountName) {
this.accountName = accountName;
}
/**
* @return contactAddrRemark
*/
public String getContactAddrRemark() {
return contactAddrRemark;
}
/**
* @param contactAddrRemark the contactAddrRemark to set
*/
public void setContactAddrRemark(String contactAddrRemark) {
this.contactAddrRemark = contactAddrRemark;
}
/**
* @return receiverCustAddrRemark
*/
public String getReceiverCustAddrRemark() {
return receiverCustAddrRemark;
}
/**
* @param receiverCustAddrRemark the receiverCustAddrRemark to set
*/
public void setReceiverCustAddrRemark(String receiverCustAddrRemark) {
this.receiverCustAddrRemark = receiverCustAddrRemark;
}
/**
* @return ifEInvoice
*/
public String getIfEInvoice() {
return ifEInvoice;
}
/**
* @param ifEInvoice the ifEInvoice to set
*/
public void setIfEInvoice(String ifEInvoice) {
this.ifEInvoice = ifEInvoice;
}
/**
* @return invoicePhone
*/
public String getInvoicePhone() {
return invoicePhone;
}
/**
* @param invoicePhone the invoicePhone to set
*/
public void setInvoicePhone(String invoicePhone) {
this.invoicePhone = invoicePhone;
}
/**
* @return invoiceMail
*/
public String getInvoiceMail() {
return invoiceMail;
}
/**
* @param invoiceMail the invoiceMail to set
*/
public void setInvoiceMail(String invoiceMail) {
this.invoiceMail = invoiceMail;
}
/**
* @return originalsaddress
*/
public String getOriginalsaddress() {
return originalsaddress;
}
/**
* @param originalsaddress the originalsaddress to set
*/
public void setOriginalsaddress(String originalsaddress) {
this.originalsaddress = originalsaddress;
}
/**
* @return originalraddress
*/
public String getOriginalraddress() {
return originalraddress;
}
/**
* @param originalraddress the originalraddress to set
*/
public void setOriginalraddress(String originalraddress) {
this.originalraddress = originalraddress;
}
/**
* @return originalsStreet
*/
public String getOriginalsStreet() {
return originalsStreet;
}
/**
* @param originalsStreet the originalsStreet to set
*/
public void setOriginalsStreet(String originalsStreet) {
this.originalsStreet = originalsStreet;
}
/**
* @return originalrStreet
*/
public String getOriginalrStreet() {
return originalrStreet;
}
/**
* @param originalrStreet the originalrStreet to set
*/
public void setOriginalrStreet(String originalrStreet) {
this.originalrStreet = originalrStreet;
}
/**
* @return recommend
*/
public String getRecommend() {
return recommend;
}
/**
* @param recommend the recommend to set
*/
public void setRecommend(String recommend) {
this.recommend = recommend;
}
/**
* @return freight
*/
public Double getFreight() {
return freight;
}
/**
* @param freight the freight to set
*/
public void setFreight(Double freight) {
this.freight = freight;
}
/**
* @return procurementNumber
*/
public String getProcurementNumber() {
return procurementNumber;
}
/**
* @param procurementNumber the procurementNumber to set
*/
public void setProcurementNumber(String procurementNumber) {
this.procurementNumber = procurementNumber;
}
/**
* @return ifTaoBao
*/
public String getIfTaoBao() {
return ifTaoBao;
}
/**
* @param ifTaoBao the ifTaoBao to set
*/
public void setIfTaoBao(String ifTaoBao) {
this.ifTaoBao = ifTaoBao;
}
/**
* @return markerPen
*/
public String getMarkerPen() {
return markerPen;
}
/**
* @param markerPen the markerPen to set
*/
public void setMarkerPen(String markerPen) {
this.markerPen = markerPen;
}
/**
* @return routInfo
*/
public String getRoutInfo() {
return routInfo;
}
/**
* @param routInfo the routInfo to set
*/
public void setRoutInfo(String routInfo) {
this.routInfo = routInfo;
}
/**
* @return modifyType
*/
public String getModifyType() {
return modifyType;
}
/**
* @param modifyType the modifyType to set
*/
public void setModifyType(String modifyType) {
this.modifyType = modifyType;
}
/**
* @return versionId
*/
public Double getVersionId() {
return versionId;
}
/**
* @param versionId the versionId to set
*/
public void setVersionId(Double versionId) {
this.versionId = versionId;
}
@Override
public String toString() {
return "UpdateEOrderRequest [createDate=" + createDate
+ ", createUser=" + createUser + ", id=" + id + ", modifyDate="
+ modifyDate + ", modifyUser=" + modifyUser + ", acceptDept="
+ acceptDept + ", acceptDeptName=" + acceptDeptName
+ ", accepterPersonMobile=" + accepterPersonMobile
+ ", beginAcceptTime=" + beginAcceptTime + ", channelCustId="
+ channelCustId + ", channelNumber=" + channelNumber
+ ", channelType=" + channelType + ", contactManId="
+ contactManId + ", contactMobile=" + contactMobile
+ ", contactName=" + contactName + ", contactPhone="
+ contactPhone + ", contactProvince=" + contactProvince
+ ", contactAddress=" + contactAddress + ", contactArea="
+ contactArea + ", contactCity=" + contactCity
+ ", contactProvinceCode=" + contactProvinceCode
+ ", contactCityCode=" + contactCityCode + ", contactAreaCode="
+ contactAreaCode + ", dealPerson=" + dealPerson
+ ", deliveryMode=" + deliveryMode + ", endAcceptTime="
+ endAcceptTime + ", feedbackInfo=" + feedbackInfo
+ ", goodsName=" + goodsName + ", goodsNumber=" + goodsNumber
+ ", totalVolume=" + totalVolume + ", totalWeight="
+ totalWeight + ", goodsType=" + goodsType + ", insuredAmount="
+ insuredAmount + ", isReceiveGoods=" + isReceiveGoods
+ ", isSendmessage=" + isSendmessage + ", memberType="
+ memberType + ", onlineName=" + onlineName
+ ", orderAcceptTime=" + orderAcceptTime + ", orderNumber="
+ orderNumber + ", orderPerson=" + orderPerson
+ ", orderStatus=" + orderStatus + ", orderTime=" + orderTime
+ ", packing=" + packing + ", paymentType=" + paymentType
+ ", receiver=" + receiver + ", receiverCustAddress="
+ receiverCustAddress + ", receiverCustArea="
+ receiverCustArea + ", receiverCustCity=" + receiverCustCity
+ ", receiverCustProvince=" + receiverCustProvince
+ ", receiveProvinceCode=" + receiveProvinceCode
+ ", receiveCityCode=" + receiveCityCode
+ ", receiveCountyCode=" + receiveCountyCode
+ ", receiverCustId=" + receiverCustId
+ ", receiverCustMobile=" + receiverCustMobile
+ ", receiverCustName=" + receiverCustName
+ ", receiverCustNumber=" + receiverCustNumber
+ ", receiverCustPhone=" + receiverCustPhone
+ ", receiverCustcompany=" + receiverCustcompany
+ ", receivingToPoint=" + receivingToPoint
+ ", receivingToPointName=" + receivingToPointName
+ ", reciveLoanType=" + reciveLoanType + ", resource="
+ resource + ", returnBillType=" + returnBillType
+ ", reviceMoneyAmount=" + reviceMoneyAmount + ", shipperId="
+ shipperId + ", shipperName=" + shipperName
+ ", shipperNumber=" + shipperNumber + ", startStation="
+ startStation + ", startStationName=" + startStationName
+ ", transNote=" + transNote + ", transportMode="
+ transportMode + ", waybillNumber=" + waybillNumber
+ ", couponNumber=" + couponNumber + ", ifElecBillBigCust="
+ ifElecBillBigCust + ", orderType=" + orderType
+ ", reciveLoanAccount=" + reciveLoanAccount + ", accountName="
+ accountName + ", contactAddrRemark=" + contactAddrRemark
+ ", receiverCustAddrRemark=" + receiverCustAddrRemark
+ ", ifEInvoice=" + ifEInvoice + ", invoicePhone="
+ invoicePhone + ", invoiceMail=" + invoiceMail
+ ", originalsaddress=" + originalsaddress
+ ", originalraddress=" + originalraddress
+ ", originalsStreet=" + originalsStreet + ", originalrStreet="
+ originalrStreet + ", recommend=" + recommend + ", freight="
+ freight + ", procurementNumber=" + procurementNumber
+ ", ifTaoBao=" + ifTaoBao + ", markerPen=" + markerPen
+ ", routInfo=" + routInfo + ", modifyType=" + modifyType
+ ", versionId=" + versionId + ",isPicPackage=" + isPicPackage
+",originalNumber=" + originalNumber +"]";
}
public String getIsPicPackage() {
return isPicPackage;
}
public void setIsPicPackage(String isPicPackage) {
this.isPicPackage = isPicPackage;
}
public String getOriginalNumber() {
return originalNumber;
}
public void setOriginalNumber(String originalNumber) {
this.originalNumber = originalNumber;
}
}
| true
|
7646a61c50bfa88895454e00877d4c136e77e411
|
Java
|
BRICOMATA9/Teaching
|
/Java/TP/Workspace/SQL/mysql/src/test4.java
|
UTF-8
| 1,883
| 3.171875
| 3
|
[] |
no_license
|
import java.sql.* ;
import java.io.* ;
import java.sql.DriverManager;
import java.sql.ResultSet;
public class test4 {
public static void main (String[] args) {
try {
// chargement de la classe par son nom
Class c = Class.forName("com.mysql.jdbc.Driver") ;
Driver pilote = (Driver)c.newInstance() ;
// enregistrement du pilote auprès du DriverManager
DriverManager.registerDriver(pilote);
// Protocole de connexion
String protocole = "jdbc:mysql:" ;
// Adresse IP de l’hôte de la base et port
String ip = "localhost" ; // dépend du contexte
String port = "3306" ; // port MySQL par défaut
// Nom de la base ;
String nomBase = "gentoo" ; // dépend du contexte
// Chaîne de connexion
String conString = protocole + "//" + ip + ":" + port + "/" + nomBase ;
// Identifiants de connexion et mot de passe
String nomConnexion = "root" ; // dépend du contexte
String motDePasse = "aghilesDJ35B" ; // dépend du contexte
// Connexion
Connection con = DriverManager.getConnection(conString, nomConnexion, motDePasse);
if (con ==null) System.out.println("nnnnnnnn");
else System.out.println("It works");
// Envoi d’un requête générique
//String sql = "USE gentoo" ;
//Statement smt = con.createStatement() ;
//ResultSet rs = smt.executeQuery(sql) ;
String sql = "SELECT * FROM developers" ;
Statement smt = con.createStatement() ;
ResultSet rs = smt.executeQuery(sql) ;
while (rs.next()) {
System.out.println(rs.getString(1)+" "+rs.getString(2)) ;
}
} catch (Exception e) {
System.out.println(e);
}
}
}
| true
|
7999476dbb87258936ebc8b6f9c93934180ffe9a
|
Java
|
caibinglong1987/roamApp-studio
|
/app/src/main/java/com/roamtech/telephony/roamapp/activity/CommunicationSettingActivity.java
|
UTF-8
| 1,731
| 1.835938
| 2
|
[] |
no_license
|
package com.roamtech.telephony.roamapp.activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.LinearLayout;
import com.nostra13.universalimageloader.utils.L;
import com.roamtech.telephony.roamapp.R;
import com.roamtech.telephony.roamapp.base.BaseActivity;
public class CommunicationSettingActivity extends BaseActivity {
private LinearLayout setApnLayout;
private LinearLayout setTransferLayout;
private LinearLayout layout_set_roam_box;
@Override
public int getLayoutId() {
return R.layout.activity_communication_setting;
}
@Override
public void initView(@Nullable Bundle savedInstanceState) {
super.initView(savedInstanceState);
setApnLayout = (LinearLayout) findViewById(R.id.layout_setApn);
setTransferLayout = (LinearLayout) findViewById(R.id.layout_setTransfer);
layout_set_roam_box = (LinearLayout) findViewById(R.id.layout_set_roam_box);
}
@Override
public void setListener() {
super.setListener();
setApnLayout.setOnClickListener(this);
setTransferLayout.setOnClickListener(this);
layout_set_roam_box.setOnClickListener(this);
}
@Override
public void onClick(View v) {
super.onClick(v);
switch (v.getId()){
case R.id.layout_setApn:
toActivity(ApnSettingActivity.class, null);
break;
case R.id.layout_setTransfer:
toActivity(CallTransferActivity.class, null);
break;
case R.id.layout_set_roam_box:
toActivity(LMBAOIndexActivity.class, null);
break;
}
}
}
| true
|
a7bf60047129f815e8588c513c1d36987c709590
|
Java
|
diegoferose/clasesJava
|
/src/Telas.java
|
UTF-8
| 946
| 3.65625
| 4
|
[] |
no_license
|
import java.util.Scanner;
public class Telas {
public static void main(String[] args) {
//en el almacen mil telas tiene dos colores de tela
// si la tela a vender es blanca tiene un de descuento del 15%
// si es de cualquir otro color, el descuento es del 5%
//
//escriba un programa que pida el valor de la tela y su color
// y calcule el valor a pagar.
//aqui se crea un scaner para ingresar numeros por consola
Scanner miScanercito = new Scanner(System.in);
System.out.println("por favor ingrese el color de la tela: ");
String colorTela = miScanercito.next();
System.out.println("por favor ingrese el valor de la tela: ");
double valorTela = miScanercito.nextDouble();
if (colorTela.equals("blanco")){
valorTela = valorTela * 0.85;
}
System.out.println("El valor a pagar es: "+valorTela);
}
}
| true
|
532ccf3826ae857cdf0809381191ecc366750daa
|
Java
|
jprante/datastructures
|
/datastructures-json-tiny/src/test/java/org/xbib/datastructures/json/tiny/test/JsonBuilderTest.java
|
UTF-8
| 10,294
| 2.671875
| 3
|
[
"Apache-2.0"
] |
permissive
|
package org.xbib.datastructures.json.tiny.test;
import org.junit.jupiter.api.Test;
import org.xbib.datastructures.json.tiny.Json;
import org.xbib.datastructures.json.tiny.JsonBuilder;
import org.xbib.datastructures.json.tiny.StreamParser;
import org.xbib.datastructures.json.tiny.StringParser;
import java.io.IOException;
import java.io.StringReader;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class JsonBuilderTest {
@Test
public void testUmlautEncoding() throws IOException{
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.buildMap(Map.of("Hello", "Jörg"));
assertEquals("{\"Hello\":\"Jörg\"}", jsonBuilder.build());
}
@Test
public void testObjectStrFromMap() throws IOException {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.buildMap(Map.of("a", "b"));
assertEquals("{\"a\":\"b\"}", jsonBuilder.build());
}
@Test
public void testObjectNumFromMap() throws IOException {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.buildMap(Map.of("a", 2));
assertEquals("{\"a\":2}", jsonBuilder.build());
}
@Test
public void testArrayFromCollection() throws IOException {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.buildCollection(List.of("a", "b", "c"));
assertEquals("[\"a\",\"b\",\"c\"]", jsonBuilder.build());
}
@Test
public void testArrayStr() throws IOException {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginCollection()
.buildValue("a")
.buildValue("b")
.buildValue("c")
.endCollection();
String s = jsonBuilder.build();
assertEquals("[\"a\",\"b\",\"c\"]", s);
StreamParser streamParser = new StreamParser();
assertEquals("[a, b, c]", streamParser.parse(new StringReader(s)).get().toString());
StringParser stringParser = new StringParser();
assertEquals("[a, b, c]", stringParser.parse(s).get().toString());
}
@Test
public void testArrayNum() throws IOException {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginCollection()
.buildValue(1)
.buildValue(2)
.buildValue(3)
.endCollection();
String s = jsonBuilder.build();
assertEquals("[1,2,3]", s);
StreamParser streamParser = new StreamParser();
assertEquals("[1, 2, 3]", streamParser.parse(new StringReader(s)).get().toString());
}
@Test
public void testArrayFloat() throws IOException {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginCollection()
.buildValue(1.0)
.buildValue(2.0)
.buildValue(3.0)
.endCollection();
String s = jsonBuilder.build();
assertEquals("[1.0,2.0,3.0]", s);
StreamParser streamParser = new StreamParser();
assertEquals("[1.0, 2.0, 3.0]", streamParser.parse(new StringReader(s)).get().toString());
}
@Test
public void testObjectStr() throws IOException {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginMap()
.buildKey("a")
.buildValue("b")
.endMap();
String s = jsonBuilder.build();
assertEquals("{\"a\":\"b\"}", s);
StreamParser streamParser = new StreamParser();
assertEquals("{a=b}", streamParser.parse(new StringReader(s)).get().toString());
}
@Test
public void testObjectNum() throws IOException {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginMap()
.buildKey("a")
.buildValue(1)
.endMap();
String s = jsonBuilder.build();
assertEquals("{\"a\":1}", s);
StreamParser streamParser = new StreamParser();
assertEquals("{a=1}", streamParser.parse(new StringReader(s)).get().toString());
}
@Test
public void testBuild() throws Exception {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.buildMap(Map.of("a", "b"));
assertEquals("{\"a\":\"b\"}", jsonBuilder.build());
}
@Test
public void testKeyValue() throws Exception {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginMap();
jsonBuilder.buildKey("a");
jsonBuilder.buildValue("b");
// test comma separation
jsonBuilder.buildKey("c");
jsonBuilder.buildValue("d");
jsonBuilder.endMap();
assertEquals("{\"a\":\"b\",\"c\":\"d\"}", jsonBuilder.build());
}
@Test
public void testMapBuild() throws Exception {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginMap();
jsonBuilder.buildKey("map");
// buildMap is wrapped with '{' and '}'
jsonBuilder.buildMap(Map.of("a", "b"));
jsonBuilder.endMap();
assertEquals("{\"map\":{\"a\":\"b\"}}", jsonBuilder.build());
}
@Test
public void testBeginMapBuild() throws Exception {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginMap();
jsonBuilder.beginMap("map");
// buildMap is not wrapped with '{' and '}'
jsonBuilder.buildMap(Map.of("a", "b"));
jsonBuilder.endMap();
jsonBuilder.endMap();
assertEquals("{\"map\":{\"a\":\"b\"}}", jsonBuilder.build());
}
@Test
public void testMapOfCollections() throws Exception {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginMap();
jsonBuilder.beginMap("map");
jsonBuilder.collection("a", Arrays.asList("b", "c"));
// test comma separation
jsonBuilder.collection("d", Arrays.asList("e", "f"));
jsonBuilder.endMap();
jsonBuilder.endMap();
assertEquals("{\"map\":{\"a\":[\"b\",\"c\"],\"d\":[\"e\",\"f\"]}}", jsonBuilder.build());
}
@Test
public void testMapOfEmptyCollections() throws Exception {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginMap();
jsonBuilder.beginMap("map");
jsonBuilder.collection("a", List.of());
// test comma separation
jsonBuilder.collection("b", List.of());
jsonBuilder.endMap();
jsonBuilder.endMap();
assertEquals("{\"map\":{\"a\":[],\"b\":[]}}", jsonBuilder.build());
}
@Test
public void testCollectionOfMaps() throws Exception {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginMap();
jsonBuilder.beginCollection("collection");
jsonBuilder.buildMap(Map.of("a", "b"));
// test comma separation
jsonBuilder.buildMap(Map.of("c", "d"));
jsonBuilder.endCollection();
jsonBuilder.endMap();
assertEquals("{\"collection\":[{\"a\":\"b\"},{\"c\":\"d\"}]}", jsonBuilder.build());
}
@Test
public void testListOfMapAsField() throws Exception {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginMap();
jsonBuilder.field("collection", List.of(Map.of("a","b"), Map.of("c", "d")));
jsonBuilder.endMap();
assertEquals("{\"collection\":[{\"a\":\"b\"},{\"c\":\"d\"}]}", jsonBuilder.build());
}
@Test
public void testCollectionOfEmptyMaps() throws Exception {
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginMap();
jsonBuilder.beginCollection("collection");
jsonBuilder.buildMap(Map.of());
// test comma separation
jsonBuilder.buildMap(Map.of());
jsonBuilder.endCollection();
jsonBuilder.endMap();
assertEquals("{\"collection\":[{},{}]}", jsonBuilder.build());
}
@Test
public void testCopy() throws Exception {
JsonBuilder jsonBuilder1 = JsonBuilder.builder();
jsonBuilder1.buildMap(Map.of("a", "b"));
JsonBuilder jsonBuilder2 = JsonBuilder.builder();
jsonBuilder2.buildMap(Map.of("c", "d"));
JsonBuilder jsonBuilder = JsonBuilder.builder();
jsonBuilder.beginCollection();
jsonBuilder.copy(jsonBuilder1);
// test comma separation
jsonBuilder.copy(jsonBuilder2);
jsonBuilder.endCollection();
assertEquals("[{\"a\":\"b\"},{\"c\":\"d\"}]", jsonBuilder.build());
}
@SuppressWarnings("unchecked")
@Test
public void testJsonToMap() {
Map<String, Object> map = Json.toMap("{\"map\":{\"a\":\"b\"}}");
assertTrue(map.get("map") instanceof Map);
assertEquals("b", ((Map<String, Object>) map.get("map")).get("a"));
}
@Test
public void testMapInList() throws IOException {
JsonBuilder builder = JsonBuilder.builder();
String field = "name";
String value = "Jörg";
builder.beginMap().
beginMap("bool")
.beginCollection("should")
.beginMap()
.beginMap("simple_query_string")
.field("query", value)
.field("fields", Collections.singletonList(field))
.field("default_operator", "and")
.endMap()
.endMap()
.beginMap()
.beginMap("simple_query_string")
.field("query", "\"" + value + "\"")
.field("fields", Collections.singletonList(field + "^2"))
.field("default_operator", "and")
.endMap()
.endMap()
.endCollection()
.field("minimum_should_match", "1")
.endMap()
.endMap();
assertEquals("{\"bool\":{\"should\":[{\"simple_query_string\":{\"query\":\"Jörg\",\"fields\":[\"name\"],\"default_operator\":\"and\"}},{\"simple_query_string\":{\"query\":\"\\\"Jörg\\\"\",\"fields\":[\"name^2\"],\"default_operator\":\"and\"}}],\"minimum_should_match\":\"1\"}}", builder.build());
}
}
| true
|
f7e8ada4d6fe9c5f93dc30f2a05bddefe7af2db0
|
Java
|
skltp-anpassningstjanster/riv.en13606.NPOAdapterService
|
/NPOAdapterIntegrationComponent/src/main/java/se/skl/skltpservices/npoadapter/mapper/Mapper.java
|
UTF-8
| 2,237
| 2.0625
| 2
|
[] |
no_license
|
/**
* Copyright (c) 2014 Inera AB, <http://inera.se/>
*
* This file is part of SKLTP.
*
* 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.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package se.skl.skltpservices.npoadapter.mapper;
import org.mule.api.MuleMessage;
import se.skl.skltpservices.npoadapter.mapper.error.MapperException;
/**
* The generic mapper interface. <p/>
*
* All mappers have to be stateless and thread-safe.
*
* @author Peter
*/
public interface Mapper {
/**
* Parses a RIV service contract request from the javax.xml.stream.XMLStreamReader and maps
* the object to the actual se.rivta.en13606.ehrextract.v11.RIV13606REQUESTEHREXTRACTRequestType representation
* which is returned as a XML String
*
* @param message the message to parse the RIV service contract request from.
* @return the target message with payload as {@link se.rivta.en13606.ehrextract.v11.RIV13606REQUESTEHREXTRACTRequestType}.
*/
MuleMessage mapRequest(MuleMessage message) throws MapperException;
/**
* Parses a response from the javax.xml.stream.XMLStreamReader and maps the object to the actual
* RIV service contract representation from se.rivta.en13606.ehrextract.v11.RIV13606REQUESTEHREXTRACTResponseType
*
* @param message the message to parse the se.rivta.en13606.ehrextract.v11.RIV13606REQUESTEHREXTRACTResponseType from.
* @return the target message with payload as specified by the actual the RIV service contract.
*/
MuleMessage mapResponse(MuleMessage message) throws MapperException;
}
| true
|
b95dd646ebd4021ce7397d4aa8dc173d157b15a6
|
Java
|
hdanaci/Online7-Cyber__bnb
|
/src/test/java/cyber_bnb/step_definitions/Testoj3.java
|
UTF-8
| 1,891
| 2.40625
| 2
|
[] |
no_license
|
package cyber_bnb.step_definitions;
import org.junit.Assert;
import org.openqa.selenium.support.ui.Select;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import cyber_bnb.pages.BookPage;
import cyber_bnb.pages.HomePage;
import cyber_bnb.pages.SignInPage;
import cyber_bnb.utilities.BrowserUtils;
import cyber_bnb.utilities.ConfigurationReader;
import cyber_bnb.utilities.Driver;
public class Testoj3 {
SignInPage signIn = new SignInPage();
BookPage book = new BookPage();
HomePage home = new HomePage();
@Given("the team lead has an existing reservation")
public void the_team_lead_has_an_existing_reservation() {
Driver.getDriver().get(ConfigurationReader.getProperty("qa1_url"));
signIn.email.sendKeys("jalabaster7f@drupal.org");
signIn.password.sendKeys("terimapam");
signIn.signInButton.click();
BrowserUtils.waitFor(4);
home.huntButton.click();
}
@When("the user tries to reserve second time dates {int} time {string} to {string} and clicks search button")
public void the_user_tries_to_reserve_second_time_dates_time_to_and_clicks_search_button(Integer day, String timeS, String timeE) {
BrowserUtils.waitFor(3);
home.dateButton.click();
home.dateButton.sendKeys(""+day);
BrowserUtils.waitFor(3);
Select times = new Select(home.startHour);
times.selectByVisibleText(timeS);
BrowserUtils.waitFor(3);
Select timeF = new Select(home.finishHour);
timeF.selectByVisibleText(timeE);
BrowserUtils.waitFor(2);
home.searchButton.click();
}
@Then("it should give message {string} at the screen")
public void it_should_give_message_at_the_screen(String error) {
BrowserUtils.waitFor(3);
String actual=book.doubleMessage.getText();
Assert.assertEquals(actual, error);
}
}
| true
|
5d154cf82ed8c207faf50233a68f1f6d4714e103
|
Java
|
kuaifan/eeui-template
|
/plugins/eeui/framework/android/src/main/java/app/eeui/framework/ui/module/WebNavigatorModule.java
|
UTF-8
| 1,868
| 1.90625
| 2
|
[
"MIT"
] |
permissive
|
package app.eeui.framework.ui.module;
import android.app.Activity;
import com.alibaba.fastjson.JSONObject;
import app.eeui.framework.extend.module.eeuiJson;
import app.eeui.framework.extend.module.eeuiPage;
import app.eeui.framework.extend.view.ExtendWebView;
import app.eeui.framework.extend.view.webviewBridge.JsCallback;
import app.eeui.framework.ui.eeui;
public class WebNavigatorModule {
private static eeui __obj;
private static eeui myApp() {
if (__obj == null) {
__obj = new eeui();
}
return __obj;
}
/***************************************************************************************************/
/***************************************************************************************************/
/***************************************************************************************************/
public static void push(ExtendWebView webView, String object, JsCallback callback) {
JSONObject json = eeuiJson.parseObject(object);
if (json.size() == 0) {
json.put("url", object);
}
json.put("pageTitle", eeuiJson.getString(json, "pageTitle", " "));
myApp().openPage(webView, json.toJSONString(), eeui.MCallback(callback));
}
public static void pop(ExtendWebView webView, String object, JsCallback callback) {
JSONObject json = eeuiJson.parseObject(object);
if (eeuiJson.getString(json, "pageName", null) == null) {
json.put("pageName", eeuiPage.getPageName((Activity) webView.getContext()));
}
if (callback != null) {
json.put("listenerName", "__navigatorPop");
myApp().setPageStatusListener(webView.getContext(), json.toJSONString(), eeui.MCallback(callback));
}
myApp().closePage(webView.getContext(), json.toJSONString());
}
}
| true
|
223bd14e9f9b9e1bfaeb66aa584a3885a6c40d8f
|
Java
|
lnquy065/OCRTranslate
|
/app/src/main/java/com/bitstudio/aztranslate/Check_Internet.java
|
UTF-8
| 2,169
| 2.4375
| 2
|
[] |
no_license
|
package com.bitstudio.aztranslate;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.AsyncTask;
import android.widget.Toast;
import java.io.IOException;
import java.lang.reflect.Parameter;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;
public class Check_Internet extends AsyncTask<String,Void,Integer>{
Context context;
public Check_Internet(Context context) {
this.context=context;
}
public boolean isConnected()
{
ConnectivityManager connectivityManager=(ConnectivityManager)context.getSystemService(Service.CONNECTIVITY_SERVICE);
if (connectivityManager!=null)
{
NetworkInfo info=connectivityManager.getActiveNetworkInfo();
if (info!=null)
{
if (info.getState()==NetworkInfo.State.CONNECTED)
{
return true;
}
}
}
return false;
}
@Override
protected Integer doInBackground(String... params) {
Integer result=0;
try {
Socket socket=new Socket();
SocketAddress socketAddress=new InetSocketAddress("8.8.8.8",53);
socket.connect(socketAddress,1500);
socket.close();
result=1;
} catch (IOException e) {
e.printStackTrace();
result=0;
}
return result;
}
@Override
protected void onPostExecute(Integer result) {
if (isConnected())
{
if (result==1)
{
Toast.makeText(context, " internet available ", Toast.LENGTH_LONG).show();
}
if(result==0)
{
Toast.makeText(context, " No internet available ", Toast.LENGTH_LONG).show();
}
}
else
{
Toast.makeText(context, " No internet available ", Toast.LENGTH_SHORT).show();
}
super.onPostExecute(result);
}
}
| true
|
600e768c6a999c27c9a9cee33464b7bc8b9e1fb2
|
Java
|
ramagotka/Capstone2
|
/app/src/main/java/example/com/fivetribesscoringsheet/KilledDialogFragment.java
|
UTF-8
| 4,044
| 2.53125
| 3
|
[] |
no_license
|
package example.com.fivetribesscoringsheet;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Toast;
public class KilledDialogFragment extends DialogFragment {
private OnCompleteListener mListener;
public static interface OnCompleteListener {
public abstract void onComplete(String name, int count, String color);
}
public static KilledDialogFragment newInstance(String[] list, String color, int[] counts){
Bundle args = new Bundle();
args.putStringArray("list", list);
args.putString("color", color);
args.putIntArray("counts", counts);
KilledDialogFragment fragment = new KilledDialogFragment();
fragment.setArguments(args);
return fragment;
}
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
// Get the layout inflater
LayoutInflater inflater = getActivity().getLayoutInflater();
final String[] names = getArguments().getStringArray("list");
final String color = getArguments().getString("color");
final int[] counts = getArguments().getIntArray("counts");
// Inflate and set the layout for the dialog
// Pass null as the parent view because its going in the dialog layout
builder.setSingleChoiceItems(names, 0, null)
.setView(inflater.inflate(R.layout.fragment_killed_dialog, null))
.setTitle("Kill " + color)
.setPositiveButton(R.string.kill_button,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
ListView lw = ((AlertDialog)dialog).getListView();
String name = names[lw.getCheckedItemPosition()];
EditText editText = (EditText) getDialog()
.findViewById(R.id.kill_dialog_edittext);
String string = String.valueOf(editText.getText());
int count;
if (!string.equals("")) {
count = Integer.parseInt(string);
}
else {
count = 0;
}
if (count > counts[lw.getCheckedItemCount()]){
Toast.makeText(getContext(), name + R.string.kill_error_toast,
Toast.LENGTH_LONG).show();
}
else {
sendData(name, count, color);
}
}
}).setNegativeButton(R.string.add_new_player_negative_button,
new DialogInterface.OnClickListener(){
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
return builder.create();
}
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
try {
this.mListener = (OnCompleteListener)activity;
}
catch (final ClassCastException e) {
throw new ClassCastException(activity.toString() + " must implement OnCompleteListener");
}
}
private void sendData(String name, int count, String color){
this.mListener.onComplete(name, count, color);
}
}
| true
|
ec52f82323f696f7956155d73cfcaf7cc613e9bc
|
Java
|
EnsemblGenomes/dbcon
|
/dbcon/src/test/java/uk/ac/sanger/cgp/dbcon/pooling/RaceConditionTest.java
|
UTF-8
| 3,081
| 2.15625
| 2
|
[] |
no_license
|
/*
##########################################################################
# COPYRIGHT NOTICE #
##########################################################################
# #
# Copyright (c) 2006 Genome Research Ltd. #
# Author: The Cancer Genome Project IT group cancerit@sanger.ac.uk #
# #
# THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, #
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF #
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. #
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY #
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, #
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE #
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
# #
# This code is free software; you can redistribute it and/or modify it #
# under the terms of the BSD License. #
# #
# Any redistribution or derivation in whole or in part including any #
# substantial portion of this code must include this copyright and #
# permission notice. #
# #
##########################################################################
*/
package uk.ac.sanger.cgp.dbcon.pooling;
import junit.framework.TestCase;
import uk.ac.sanger.cgp.dbcon.config.Config;
import uk.ac.sanger.cgp.dbcon.exceptions.DbConException;
import uk.ac.sanger.cgp.dbcon.singletons.SingletonPools;
import uk.ac.sanger.cgp.dbcon.singletons.Singletons;
import uk.ac.sanger.cgp.dbcon.support.Constants;
/**
* Created to address the problems of race conditions which configuration
* suffered from under ealier versions of the dbcon pooling code.
*
* @author andrewyates
* @author $Author$
* @version $Revision$
*/
public class RaceConditionTest extends TestCase {
protected void tearDown() throws Exception {
Pools.getInstance().destroyAllPools();
SingletonPools.getInstance().destroyAllPools();
}
public void testRace() {
try {
Connections.getConnection(Constants.DB_SYNONYM);
Singletons.getConnection(Constants.DB_SYNONYM);
}
catch(DbConException e) {
e.printStackTrace();
fail("Found exception; failing");
}
Config poolConfig = Pools.getInstance().getConfig(Constants.DB_SYNONYM);
Config singletonConfig = SingletonPools.getInstance().getConfig(Constants.DB_SYNONYM);
assertTrue("Race condition still applies since " +
"singleton's config is not correct", poolConfig.getMaxActive() != singletonConfig.getMaxActive());
}
}
| true
|
71b3af0518ae4c12074bfe2ba3150cc8b6c50f44
|
Java
|
opssemnik/AetherSMP
|
/src/minecraft/net/minecraft/src/ModelAechorPlant.java
|
UTF-8
| 5,723
| 2.046875
| 2
|
[] |
no_license
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
package net.minecraft.src;
import org.lwjgl.opengl.GL11;
// Referenced classes of package net.minecraft.src:
// ModelBase, ModelRenderer
public class ModelAechorPlant extends ModelBase
{
public ModelAechorPlant()
{
this(0.0F);
}
public ModelAechorPlant(float f)
{
this(f, 0.0F);
}
public ModelAechorPlant(float f, float f1)
{
pie = 6.283186F;
size = 1.0F;
petal = new ModelRenderer[petals];
leaf = new ModelRenderer[petals];
for(int i = 0; i < petals; i++)
{
petal[i] = new ModelRenderer(0, 0);
if(i % 2 == 0)
{
petal[i] = new ModelRenderer(29, 3);
petal[i].addBox(-4F, -1F, -12F, 8, 1, 9, f - 0.25F);
petal[i].setRotationPoint(0.0F, 1.0F + f1, 0.0F);
} else
{
petal[i].addBox(-4F, -1F, -13F, 8, 1, 10, f - 0.125F);
petal[i].setRotationPoint(0.0F, 1.0F + f1, 0.0F);
}
leaf[i] = new ModelRenderer(38, 13);
leaf[i].addBox(-2F, -1F, -9.5F, 4, 1, 8, f - 0.15F);
leaf[i].setRotationPoint(0.0F, 1.0F + f1, 0.0F);
}
stamen = new ModelRenderer[stamens];
stamen2 = new ModelRenderer[stamens];
for(int j = 0; j < stamens; j++)
{
stamen[j] = new ModelRenderer(36, 13);
stamen[j].addBox(0.0F, -9F, -1.5F, 1, 6, 1, f - 0.25F);
stamen[j].setRotationPoint(0.0F, 1.0F + f1, 0.0F);
}
for(int k = 0; k < stamens; k++)
{
stamen2[k] = new ModelRenderer(32, 15);
stamen2[k].addBox(0.0F, -10F, -1.5F, 1, 1, 1, f + 0.125F);
stamen2[k].setRotationPoint(0.0F, 1.0F + f1, 0.0F);
}
head = new ModelRenderer(0, 12);
head.addBox(-3F, -3F, -3F, 6, 2, 6, f + 0.75F);
head.setRotationPoint(0.0F, 1.0F + f1, 0.0F);
stem = new ModelRenderer(24, 13);
stem.addBox(-1F, 0.0F, -1F, 2, 6, 2, f);
stem.setRotationPoint(0.0F, 1.0F + f1, 0.0F);
thorn = new ModelRenderer[thorns];
for(int l = 0; l < thorns; l++)
{
thorn[l] = new ModelRenderer(32, 13);
thorn[l].setRotationPoint(0.0F, 1.0F + f1, 0.0F);
}
thorn[0].addBox(-1.75F, 1.25F, -1F, 1, 1, 1, f - 0.25F);
thorn[1].addBox(-1F, 2.25F, 0.75F, 1, 1, 1, f - 0.25F);
thorn[2].addBox(0.75F, 1.25F, 0.0F, 1, 1, 1, f - 0.25F);
thorn[3].addBox(0.0F, 2.25F, -1.75F, 1, 1, 1, f - 0.25F);
}
public void render(float f, float f1, float f2, float f3, float f4, float f5)
{
setRotationAngles(f, f1, f2, f3, f4, f5);
GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 1.2F, 0.0F);
GL11.glScalef(size, size, size);
for(int i = 0; i < petals; i++)
{
petal[i].render(f5);
leaf[i].render(f5);
}
for(int j = 0; j < stamens; j++)
{
stamen[j].render(f5);
stamen2[j].render(f5);
}
head.render(f5);
stem.render(f5);
for(int k = 0; k < thorns; k++)
{
thorn[k].render(f5);
}
GL11.glPopMatrix();
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
{
head.rotateAngleX = 0.0F;
head.rotateAngleY = f4 / 57.29578F;
float f6 = sinage2;
stem.rotateAngleY = head.rotateAngleY;
stem.rotationPointY = f6 * 0.5F;
for(int i = 0; i < thorns; i++)
{
thorn[i].rotateAngleY = head.rotateAngleY;
thorn[i].rotationPointY = f6 * 0.5F;
}
for(int j = 0; j < petals; j++)
{
petal[j].rotateAngleX = j % 2 != 0 ? -0.4125F : -0.25F;
petal[j].rotateAngleX += sinage;
petal[j].rotateAngleY = head.rotateAngleY;
petal[j].rotateAngleY += (pie / (float)petals) * (float)j;
leaf[j].rotateAngleX = j % 2 != 0 ? 0.2F : 0.1F;
leaf[j].rotateAngleX += sinage * 0.75F;
leaf[j].rotateAngleY = head.rotateAngleY + pie / (float)petals / 2.0F;
leaf[j].rotateAngleY += (pie / (float)petals) * (float)j;
petal[j].rotationPointY = f6;
leaf[j].rotationPointY = f6;
}
for(int k = 0; k < stamens; k++)
{
stamen[k].rotateAngleX = 0.2F + (float)k / 15F;
stamen[k].rotateAngleY = head.rotateAngleY + 0.1F;
stamen[k].rotateAngleY += (pie / (float)stamens) * (float)k;
stamen[k].rotateAngleX += sinage * 0.4F;
stamen2[k].rotateAngleX = 0.2F + (float)k / 15F;
stamen2[k].rotateAngleY = head.rotateAngleY + 0.1F;
stamen2[k].rotateAngleY += (pie / (float)stamens) * (float)k;
stamen2[k].rotateAngleX += sinage * 0.4F;
stamen[k].rotationPointY = f6 + sinage * 2.0F;
stamen2[k].rotationPointY = f6 + sinage * 2.0F;
}
head.rotationPointY = f6 + sinage * 2.0F;
}
private ModelRenderer petal[];
private ModelRenderer leaf[];
private ModelRenderer stamen[];
private ModelRenderer stamen2[];
private ModelRenderer thorn[];
private ModelRenderer stem;
private ModelRenderer head;
private static int petals = 10;
private static int thorns = 4;
private static int stamens = 3;
public float sinage;
public float sinage2;
public float size;
private float pie;
}
| true
|
55f26a6506a9fba181ff41dce6ea97334bbdb89c
|
Java
|
McQuaidRobotics/FRC3173_Archive
|
/2019/src/main/java/frc/robot/subsystems/Cargo.java
|
UTF-8
| 524
| 2.171875
| 2
|
[] |
no_license
|
package frc.robot.subsystems;
import edu.wpi.first.wpilibj.command.Subsystem;
import frc.robot.RobotMap;
import edu.wpi.first.wpilibj.Solenoid;
// Hatch
public class Cargo extends Subsystem {
private Solenoid cargoLauncher = RobotMap.cargoLauncher;
//private static Solenoid cargoLauncherStatic = RobotMap.cargoLauncher;
@Override
public void initDefaultCommand() {
// Set the default command for a subsystem here.
}
public void toggleCargoLauncher() {
cargoLauncher.set(!cargoLauncher.get());
}
}
| true
|
e951d3a5fd33231c8401bcaf8d79d726503d4996
|
Java
|
chico93/jpa-hibernate
|
/src/test/java/jpahibernate/TestHibernate.java
|
UTF-8
| 5,339
| 2.609375
| 3
|
[] |
no_license
|
package jpahibernate;
import java.util.List;
import org.junit.Test;
import jpahibernate.DAO.GenericDAO;
import jpahibernate.model.TelefoneUser;
import jpahibernate.model.UsuarioPessoa;
import jpahibernate.util.HibernateUtil;
@SuppressWarnings("unchecked")
public class TestHibernate {
@Test
public void testHibernateUtil() {
HibernateUtil.geEntityManager();
}
@Test
public void testSalvar() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
UsuarioPessoa pessoa = new UsuarioPessoa();
pessoa.setIdade(45);
pessoa.setNome("Tadeu 2");
pessoa.setSenha("123");
pessoa.setLogin("tadeuespindolapalermo");
pessoa.setSobrenome("Espíndola Palermo");
genericDAO.salvar(pessoa);
}
@Test
public void testBuscar() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
UsuarioPessoa pessoa = new UsuarioPessoa();
pessoa.setId(1L);
pessoa = genericDAO.pesquisar(pessoa);
System.out.println(pessoa);
}
@Test
public void testBuscarPorId() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
UsuarioPessoa pessoa = genericDAO.pesquisar(1L, UsuarioPessoa.class);
System.out.println(pessoa);
}
@Test
public void testUpdate() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
UsuarioPessoa pessoa = genericDAO.pesquisar(2L, UsuarioPessoa.class);
pessoa.setIdade(99);
pessoa.setNome("Antonio");
pessoa.setSenha("123456");
pessoa.setLogin("antony");
pessoa.setSobrenome("Francisco dos Santos");
pessoa = genericDAO.updateMerge(pessoa);
System.out.println(pessoa);
}
@Test
public void testDelete() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
UsuarioPessoa pessoa = genericDAO.pesquisar(1L, UsuarioPessoa.class);
try {
genericDAO.deletarPorId(pessoa);
} catch (Exception e) {
e.printStackTrace();
}
}
@Test
public void testCosultarTodos() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
List<UsuarioPessoa> list = genericDAO.listar(UsuarioPessoa.class);
for (UsuarioPessoa usuarioPessoa : list) {
System.out.println(usuarioPessoa);
System.out.println();
}
}
@Test
public void testQueryList() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
List<UsuarioPessoa> list = genericDAO.getEntityManager().createQuery("from UsuarioPessoa where nome = 'Antonio'").getResultList();
for (UsuarioPessoa usuarioPessoa : list) {
System.out.println(usuarioPessoa);
}
}
@Test
public void testQueryListMaxResult() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
List<UsuarioPessoa> list = genericDAO.getEntityManager().createQuery("from UsuarioPessoa order by nome")
.setMaxResults(2)
.getResultList();
for (UsuarioPessoa usuarioPessoa : list) {
System.out.println(usuarioPessoa);
}
}
@Test
public void testeQueryListParameter() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
List<UsuarioPessoa> list = genericDAO.getEntityManager().createQuery("from UsuarioPessoa where nome = :nome or sobrenome = :sobrenome")
.setParameter("nome", "Antonio")
.setParameter("sobrenome", "Francisco dos Santos")
.getResultList();
for (UsuarioPessoa usuarioPessoa : list) {
System.out.println(usuarioPessoa);
}
}
@Test
public void testeQuerySomaIdade() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
Long somaIdade = (Long) genericDAO.getEntityManager()
.createQuery("select sum(u.idade) from UsuarioPessoa u").getSingleResult();
System.out.println("Soma de todas as idades é: " + somaIdade);
Double mediaIdade = (Double) genericDAO.getEntityManager()
.createQuery("select avg(u.idade) from UsuarioPessoa u").getSingleResult();
System.out.println("Média de todas as idades é: " + mediaIdade);
}
@Test
public void testNamedQueryTodos() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
List<UsuarioPessoa> list = genericDAO.getEntityManager()
.createNamedQuery("UsuarioPessoa.todos")
.getResultList();
for(UsuarioPessoa usuarioPessoa : list) {
System.out.println(usuarioPessoa);
}
}
@Test
public void testNamedQueryNome() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
List<UsuarioPessoa> list = genericDAO.getEntityManager()
.createNamedQuery("UsuarioPessoa.buscaPorNome")
.setParameter("nome", "Tadeu 2")
.getResultList();
for(UsuarioPessoa usuarioPessoa : list) {
System.out.println(usuarioPessoa);
}
}
@SuppressWarnings("rawtypes")
@Test
public void testGravarTelefone() {
GenericDAO genericDAO = new GenericDAO();
UsuarioPessoa pessoa = (UsuarioPessoa) genericDAO.pesquisar(14L, UsuarioPessoa.class);
TelefoneUser telefoneUser = new TelefoneUser();
telefoneUser.setTipo("Casa");
telefoneUser.setNumero("(61) 3397-5465");
telefoneUser.setUsuarioPessoa(pessoa);
genericDAO.salvar(telefoneUser);
}
@Test
public void testConsultaTelefone() {
GenericDAO<UsuarioPessoa> genericDAO = new GenericDAO<>();
UsuarioPessoa pessoa = (UsuarioPessoa) genericDAO.pesquisar(3L, UsuarioPessoa.class);
for (TelefoneUser fone : pessoa.getTelefoneUsers()) {
System.out.println(fone.getNumero());
System.out.println(fone.getTipo());
System.out.println(fone.getUsuarioPessoa().getNome());
System.out.println("--------------------");
}
}
}
| true
|
ed7923ed71a451cb1673833a6401e56630367abd
|
Java
|
eugeniofcysne/ProjetoIntegrado20191
|
/Projeto Integrado/src/view/CadastroAlunoView.java
|
UTF-8
| 3,233
| 2.546875
| 3
|
[] |
no_license
|
package view;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.EventQueue;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import controller.AlunoController;
import model.Aluno;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JTextPane;
import javax.swing.JFormattedTextField;
import javax.swing.JTextArea;
public class CadastroAlunoView extends JFrame {
private JPanel contentPane;
private AlunoController alunoController;
/**
* Launch the application.
*/
/**
* Create the frame.
*/
public CadastroAlunoView(AlunoController alunoController) {
this.alunoController = alunoController;
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
setTitle("Cadastro Aluno");
JFormattedTextField frmtdtxtfldNome = new JFormattedTextField();
frmtdtxtfldNome.setText("nome");
frmtdtxtfldNome.setToolTipText("nome");
frmtdtxtfldNome.setBounds(42, 13, 107, 22);
contentPane.add(frmtdtxtfldNome);
JFormattedTextField frmtdtxtfldSerie = new JFormattedTextField();
frmtdtxtfldSerie.setText("serie");
frmtdtxtfldSerie.setBounds(42, 92, 107, 22);
contentPane.add(frmtdtxtfldSerie);
JFormattedTextField frmtdtxtfldCodResponsavel = new JFormattedTextField();
frmtdtxtfldCodResponsavel.setText("CodResponsavel");
frmtdtxtfldCodResponsavel.setBounds(42, 57, 107, 22);
contentPane.add(frmtdtxtfldCodResponsavel);
JFormattedTextField frmtdtxtfldDataNascimento = new JFormattedTextField();
frmtdtxtfldDataNascimento.setText("dataNascimento");
frmtdtxtfldDataNascimento.setBounds(42, 130, 107, 22);
contentPane.add(frmtdtxtfldDataNascimento);
JFormattedTextField frmtdtxtfldRg = new JFormattedTextField();
frmtdtxtfldRg.setToolTipText("RG");
frmtdtxtfldRg.setText("RG");
frmtdtxtfldRg.setBounds(42, 165, 107, 22);
contentPane.add(frmtdtxtfldRg);
JTextArea txtrXxxxxxxx = new JTextArea();
txtrXxxxxxxx.setText("xx/xx/xxxx");
txtrXxxxxxxx.setBounds(161, 130, 126, 22);
contentPane.add(txtrXxxxxxxx);
JButton btnCadastrar = new JButton("Cadastrar");
btnCadastrar.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent arg0) {
System.out.println("deu certo");
String pegaNome = frmtdtxtfldNome.getText();
String pegaRg = frmtdtxtfldRg.getText();
String pegaDataNascimento = frmtdtxtfldDataNascimento.getText();
int pegaCodResponsavel = Integer.parseInt(frmtdtxtfldCodResponsavel.getText());
String pegaSerie = frmtdtxtfldSerie.getText();
int codAlu=1;
Aluno aluno = new Aluno(pegaNome, pegaRg, pegaDataNascimento, pegaCodResponsavel, pegaSerie, codAlu);
alunoController.persistir(aluno);
Component frame = null;
JOptionPane.showMessageDialog(frame, "cadastrado com sucesso");
//executarAluno(
}
});
btnCadastrar.setBounds(323, 91, 97, 25);
contentPane.add(btnCadastrar);
}
}
| true
|
c46e82be4df20de441aa8d443023bbda2ac04cde
|
Java
|
AndrewWang1993/TieBa_Blog
|
/TimeBlog/src/com/mct/activity/MainActivity.java
|
GB18030
| 7,005
| 1.945313
| 2
|
[
"Apache-2.0"
] |
permissive
|
package com.mct.activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import com.mct.blog.R;
import com.mct.control.MainPagerAdater;
import com.mct.model.ArticleItem;
import com.mct.utils.UserUtil;
import com.mct.view.fragment.ArticleDetailFragment;
import com.mct.view.fragment.ArticleListFragment;
import com.mct.view.fragment.SettingFragment;
import com.mct.view.fragment.SquareFragment;
import com.mct.view.fragment.UserInfoFragment;
public class MainActivity extends FragmentActivity implements OnClickListener {
private enum ShowStatus { // ʾص״̬
HIDE, SHOW
}
private ShowStatus status;
private ViewPager mPager;
private RadioGroup tabGroup;
private Fragment[] fragments;
// Ƭ
private ArticleDetailFragment mArticleDetailFragment;
// Ļ
private int screenWidth;
// ʾƬIJ
private FrameLayout fragmentLayout;
private LinearLayout contentLayout;
// ʾƬIJֲ
private LinearLayout.LayoutParams layoutParam;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
screenWidth = getWindowManager().getDefaultDisplay().getWidth();
// ViewPagerĿ
contentLayout = (LinearLayout) findViewById(R.id.m_content);
LinearLayout.LayoutParams lp2 = (LinearLayout.LayoutParams) contentLayout
.getLayoutParams();
lp2.width = screenWidth;
contentLayout.setLayoutParams(lp2);
// ƬĿ
fragmentLayout = (FrameLayout) findViewById(R.id.fragment_detail);
layoutParam = (LinearLayout.LayoutParams) fragmentLayout
.getLayoutParams();
layoutParam.width = screenWidth;
layoutParam.leftMargin = -screenWidth;
fragmentLayout.setLayoutParams(layoutParam);
status = ShowStatus.HIDE;
// Ƭ
mArticleDetailFragment = new ArticleDetailFragment();
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.replace(R.id.fragment_detail, mArticleDetailFragment);
ft.commit();
mPager = (ViewPager) findViewById(R.id.m_pager);
tabGroup = (RadioGroup) findViewById(R.id.tab_group);
findViewById(R.id.tab_article).setOnClickListener(this);
findViewById(R.id.tab_square).setOnClickListener(this);
findViewById(R.id.tab_me).setOnClickListener(this);
initPager();
}
private void initPager() {
fragments = new Fragment[4];
ArticleListFragment alf = new ArticleListFragment();
alf.setOnArticleItemClickListener(onArticleItemClickListener);
fragments[0] = alf;
fragments[1] = new SquareFragment();
fragments[2] = new UserInfoFragment();
fragments[3] = new SettingFragment();
MainPagerAdater adapter = new MainPagerAdater(
getSupportFragmentManager(), fragments);
mPager.setAdapter(adapter);
mPager.setCurrentItem(2);
mPager.setOnPageChangeListener(new OnPageChangeListener() {
@Override
public void onPageSelected(int arg0) {
// TODO Auto-generated method stub
if (arg0 < 3) {
((RadioButton) tabGroup.getChildAt(arg0)).setChecked(true);
} else {
tabGroup.clearCheck();
}
if (arg0 == 0) {
((ArticleListFragment) fragments[0]).loadData();
}
}
@Override
public void onPageScrolled(int position, float offset,
int offsetInPixels) {
// TODO Auto-generated method stub
}
@Override
public void onPageScrollStateChanged(int arg0) {
// TODO Auto-generated method stub
}
});
}
private ArticleListFragment.OnArticleItemClickListener onArticleItemClickListener = new ArticleListFragment.OnArticleItemClickListener() {
@Override
public void onClick(ArticleItem item) {
// TODO Auto-generated method stub
showArticleDetail();
mArticleDetailFragment.loadData(item);
}
};
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.tab_article:
mPager.setCurrentItem(0);
break;
case R.id.tab_square:
mPager.setCurrentItem(1);
break;
case R.id.tab_me:
mPager.setCurrentItem(2);
break;
}
}
@Override
protected void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
// עû
UserUtil.getInstance().logout();
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
// TODO Auto-generated method stub
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (status == ShowStatus.SHOW) {
backToArticleList();
} else {
FragmentTransaction ft = getSupportFragmentManager()
.beginTransaction();
ft.remove(mArticleDetailFragment);
ft.commit();
finish();
}
return true;
}
return super.onKeyUp(keyCode, event);
}
public void backToArticleList() {
new ScrollTask().execute(-30);
}
/**
* ʾ
*/
public void showArticleDetail() {
new ScrollTask().execute(30);
}
class ScrollTask extends AsyncTask<Integer, Integer, Integer> {
@Override
protected Integer doInBackground(Integer... params) {
// TODO Auto-generated method stub
int offset = params[0]; // ÿƶƫ
int currentMarginLeft = layoutParam.leftMargin;
while (true) {
currentMarginLeft += offset;
if (currentMarginLeft >= 0) { // ȫʾҳ
currentMarginLeft = 0;
break;
}
if (currentMarginLeft <= -screenWidth) { // ȫҳ
currentMarginLeft = -screenWidth;
break;
}
publishProgress(currentMarginLeft);
try {
Thread.sleep(20);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return currentMarginLeft;
}
@Override
protected void onPostExecute(Integer result) {
// TODO Auto-generated method stub
super.onPostExecute(result);
layoutParam.leftMargin = result;
fragmentLayout.setLayoutParams(layoutParam);
if (result == 0) {
// Ѿʾ
status = ShowStatus.SHOW;
} else {
status = ShowStatus.HIDE;
}
}
@Override
protected void onProgressUpdate(Integer... values) {
// TODO Auto-generated method stub
super.onProgressUpdate(values);
layoutParam.leftMargin = values[0];
fragmentLayout.setLayoutParams(layoutParam);
}
}
}
| true
|
9c2eae763ba8648cdb8bee536c0f53b5b3b6a066
|
Java
|
IoanaDiaconu/SpringLearning
|
/Project/student-admin/src/main/java/com/springapp/controller/MainController.java
|
UTF-8
| 7,347
| 2.171875
| 2
|
[] |
no_license
|
package com.springapp.controller;
import com.springapp.dao.Course;
import com.springapp.dao.Student;
import com.springapp.service.CourseEditor;
import com.springapp.service.CourseService;
import com.springapp.service.StudentService;
import org.apache.commons.io.IOUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.security.authentication.RememberMeAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.ServletRequestDataBinder;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.validation.Valid;
import java.io.*;
import java.util.List;
import java.util.Locale;
@Controller
class MainController {
private static Logger log = Logger.getLogger(MainController.class);
@Autowired
StudentService studentService;
@Autowired
MessageSource messageSource;
@Autowired
CourseService courseService;
private Locale locale;
public Locale getLocale() {
return locale;
}
public void setLocale(Locale locale) {
this.locale = locale;
}
@InitBinder
void initBinder(HttpServletRequest request, ServletRequestDataBinder dataBinder) {
dataBinder.registerCustomEditor(Course.class, new CourseEditor(this.courseService));
}
@RequestMapping("login")
public ModelAndView getLoginForm(@RequestParam(required = false) String authFailed, String logout,
String denied, HttpServletRequest request) {
String message = "";
String username = SecurityContextHolder.getContext().getAuthentication().getPrincipal().toString();
if (authFailed != null) {
message = "Invalid username of password, try again !";
log.info("! Authentification failed: " + message);
} else if (logout != null) {
message = "Logged Out successfully, login again to continue !";
log.info("! Authentification failed: " + message);
} else if (denied != null) {
message = "Access denied for this user "+ username + " !" ;
log.info("! Authentification failed: " + message);
}
if (isRememberMeAuthenticated()) {
setRememberMeTargetUrlToSession(request);
}
return new ModelAndView("login", "message", message);
}
private boolean isRememberMeAuthenticated() {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (authentication == null) {
return false;
}
return RememberMeAuthenticationToken.class.isAssignableFrom(authentication.getClass());
}
private void setRememberMeTargetUrlToSession(HttpServletRequest request){
HttpSession session = request.getSession(false);
if(session!=null){
session.setAttribute("targetUrl", "/list");
}
}
@RequestMapping(value = "/user", method = RequestMethod.GET)
public String getUserPage() {
String username, authority;
ModelAndView modelAndView = new ModelAndView();
username = getUserInfo().getUsername();
modelAndView.addObject("username", username);
authority = getUserInfo().getAuthorities().toString();
if (authority.contains("ROLE_ADMIN")) {
return "redirect:list";
} else {
return "redirect:courses";
}
}
@RequestMapping("admin")
public String getAdminPage() {
return "admin";
}
@RequestMapping("403page")
public String get403denied() {
return "redirect:login?denied";
}
@RequestMapping(value = "/add", method = RequestMethod.GET)
public String add(Model model) {
Student student = new Student();
student.setUsername(getUserInfo().getUsername());
model.addAttribute("student", student);
model.addAttribute("courses", courseService.listCourse());
return "addstudent";
}
@RequestMapping(value = "/save", method = RequestMethod.POST)
public String save(@ModelAttribute("student") @Valid Student student,
BindingResult br, @RequestParam("file") File file) {
if (br.hasErrors()) {
log.error("! Record cannot be saved. Error " + br.getAllErrors() + " occurred");
return "addstudent";
}
if (student.getId() > 0) {
student.setUsername(getUserInfo().getUsername());
studentService.updateStudent(student);
} else {
byte[] picture = new byte[(int) file.length()];
student.setUsername(getUserInfo().getUsername());
try {
FileInputStream inputStream = new FileInputStream(file.getCanonicalPath());
inputStream.read(picture);
inputStream.close();
student.setPicture(picture);
} catch (Exception e) {
e.printStackTrace();
}
studentService.addStudent(student);
}
return "redirect:list";
}
@RequestMapping(value = "/list", method = RequestMethod.GET)
public String list(Model model) {
List<Student> students = studentService.listStudent();
model.addAttribute("username", getUserInfo().getUsername());
model.addAttribute("students", students);
return "students";
}
@RequestMapping(value = "/edit/{id}", method = RequestMethod.GET)
public String edit(@PathVariable Integer id, Model model) {
model.addAttribute("student", studentService.getStudent(id));
model.addAttribute("courses",courseService.listCourse());
return "addstudent";
}
@RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
public String delete(@PathVariable Integer id) {
studentService.deleteStudent(id);
return "redirect:/list";
}
@RequestMapping("/download/{id}")
public String download(@PathVariable("id")
Integer id, HttpServletResponse response) {
Student student = studentService.getStudent(id);
try {
response.setHeader("Content-Disposition", "inline;filename=\"" + student.getPicture() + "\"");
OutputStream out = response.getOutputStream();
ByteArrayInputStream inputStream = new ByteArrayInputStream(student.getPicture());
response.setContentType(student.getPicture().toString());
IOUtils.copy(inputStream, out);
out.flush();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public UserDetails getUserInfo() {
return (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
}
}
| true
|
b88a430e4734617c9ee6c5e54f01f57393b59533
|
Java
|
amaliacioata/ProblemsResolved
|
/CRUDOnCSV/src/CRUDOperations.java
|
UTF-8
| 4,454
| 3.265625
| 3
|
[] |
no_license
|
import java.io.*;
import java.sql.SQLOutput;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.List;
public class CRUDOperations {
public static void main(String[] args) {
String filePath="C:\\Users\\Vostro\\Desktop\\Cioată Cristina-Amalia\\CRUDOnCSV\\src\\products.csv";
System.out.println("Write a line in products.csv file");
writeProductsFile(filePath);
System.out.println("Read products.csv file");
readProductsFile(filePath);
System.out.println("Update lines in products.csv file");
System.out.println("Delete lines in products,csv file");
}
public static void writeProductsFile(String filePath) {
List<Products> products=new ArrayList<>();
Products product=new Products();
product.setProductName("shoes");
product.setPrice(50);
product.setQuantity(1);
product=new Products();
product.setProductName("dress");
product.setPrice(200);
product.setQuantity(1);
product=new Products();
product.setProductName("belt");
product.setPrice(15);
product.setQuantity(1);
FileWriter fileWriter= null;
try{
fileWriter = new FileWriter(filePath,true); //avoiding overwrites file
fileWriter.append("Product Name, Price, Quantity \n");
for(Products p: products){
fileWriter.append(p.getProductName());
fileWriter.append(",");
fileWriter.append(String.valueOf(p.getPrice()));
fileWriter.append(",");
fileWriter.append(String.valueOf(p.getQuantity()));
fileWriter.append("\n");
}
}catch(Exception ex){
ex.printStackTrace();
}finally{
try{
fileWriter.flush(); //need to be sure that all your data from buffer is written
fileWriter.close();
}catch(Exception e){
e.printStackTrace();
}
}
}
public static void readProductsFile(String filePath) {
BufferedReader reader = null;
try {
List<Products> products = new ArrayList<Products>();
String line = "";
reader = new BufferedReader(new FileReader("."+filePath));
reader.readLine();
while ((line = reader.readLine()) != null) {
String[] fields = line.split(",");
if(fields.length >0){
Products product=new Products();
product.setProductName(fields[0]);
product.setPrice(Integer.valueOf((fields[1])));
product.setQuantity(Integer.valueOf(fields[2]));
products.add(product);
}
}
} catch (Exception ex) {
ex.printStackTrace();
} finally {
try {
reader.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
public void removeLineFromFile(String file, String lineToRemove) {
try {
File inFile = new File(file);
//Construct the new file that will later be renamed to the original filename.
File tempFile = new File(inFile.getAbsolutePath() + ".tmp");
BufferedReader br = new BufferedReader(new FileReader(file));
PrintWriter pw = new PrintWriter(new FileWriter(tempFile));
String line = null;
//Read from the original file and write to the new unless content matches data to be removed.
while ((line = br.readLine()) != null) {
if (!line.trim().equals(lineToRemove)) {
pw.println(line);
pw.flush();
}
}
pw.close();
br.close();
//remove the original file
if (!inFile.delete()) {
System.out.println("Could not delete file");
return;
}
//Rename the new file to the filename the original file had.
if (!tempFile.renameTo(inFile))
System.out.println("Could not rename file");
} catch (FileNotFoundException ex) {
ex.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
| true
|
7bb8d2e2af02f3dd7ef1a02a15b203432f5daf84
|
Java
|
skychwang/MindCraft
|
/spigot/work/decompile-93a89a75/net/minecraft/server/TagsEntity.java
|
UTF-8
| 1,723
| 2.109375
| 2
|
[] |
no_license
|
package net.minecraft.server;
import java.util.Collection;
import java.util.Optional;
public class TagsEntity {
private static Tags<EntityTypes<?>> c = new Tags<>((minecraftkey) -> {
return Optional.empty();
}, "", false, "");
private static int d;
public static final Tag<EntityTypes<?>> SKELETONS = a("skeletons");
public static final Tag<EntityTypes<?>> RADIERS = a("raiders");
public static void a(Tags<EntityTypes<?>> tags) {
TagsEntity.c = tags;
++TagsEntity.d;
}
public static Tags<EntityTypes<?>> a() {
return TagsEntity.c;
}
private static Tag<EntityTypes<?>> a(String s) {
return new TagsEntity.a(new MinecraftKey(s));
}
public static class a extends Tag<EntityTypes<?>> {
private int a = -1;
private Tag<EntityTypes<?>> b;
public a(MinecraftKey minecraftkey) {
super(minecraftkey);
}
public boolean a(EntityTypes<?> entitytypes) {
if (this.a != TagsEntity.d) {
this.b = TagsEntity.c.b(this.c());
this.a = TagsEntity.d;
}
return this.b.isTagged(entitytypes);
}
@Override
public Collection<EntityTypes<?>> a() {
if (this.a != TagsEntity.d) {
this.b = TagsEntity.c.b(this.c());
this.a = TagsEntity.d;
}
return this.b.a();
}
@Override
public Collection<Tag.b<EntityTypes<?>>> b() {
if (this.a != TagsEntity.d) {
this.b = TagsEntity.c.b(this.c());
this.a = TagsEntity.d;
}
return this.b.b();
}
}
}
| true
|
ea2a6071c4192e886288d2f8337dade050045007
|
Java
|
qijitech/support-im
|
/library/src/main/java/support/im/chats/ChatsActivity.java
|
UTF-8
| 2,058
| 2.09375
| 2
|
[] |
no_license
|
package support.im.chats;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.Fragment;
import android.view.Menu;
import android.view.MenuItem;
import com.raizlabs.android.dbflow.annotation.NotNull;
import java.util.ArrayList;
import support.im.leanclound.Constants;
import support.ui.app.SupportSinglePaneActivity;
public class ChatsActivity extends SupportSinglePaneActivity {
protected ChatsFragment mChatsFragment;
public static void startChatsWithMemberId(Context context, String memberId) {
Intent intent = new Intent(context, ChatsActivity.class);
intent.putExtra(Constants.EXTRA_MEMBER_ID, memberId);
context.startActivity(intent);
}
public static void startChatsWithMemberIdList(Context context, @NotNull ArrayList memberIdList) {
if (memberIdList == null || memberIdList.size() <= 0) {
throw new IllegalArgumentException("memberIdList must not null or size > 0");
} else {
Intent intent = new Intent(context, ChatsActivity.class);
intent.putStringArrayListExtra(Constants.EXTRA_MEMBER_LIST_ID, memberIdList);
context.startActivity(intent);
}
}
public static void startChatsWithConversationId(Context context, String conversationId) {
Intent intent = new Intent(context, ChatsActivity.class);
intent.putExtra(Constants.EXTRA_CONVERSATION_ID, conversationId);
context.startActivity(intent);
}
@Override protected Fragment onCreatePane() {
return mChatsFragment = ChatsFragment.create();
}
@Override public boolean onCreateOptionsMenu(Menu menu) {
return super.onCreateOptionsMenu(menu);
}
@Override public boolean onOptionsItemSelected(MenuItem item) {
return super.onOptionsItemSelected(item);
}
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == GroupProfileActivity.REQUEST_CODE) {
if (resultCode == GroupProfileActivity.EXIT_CODE) {
finish();
}
}
super.onActivityResult(requestCode, resultCode, data);
}
}
| true
|
c9a564630cc6ba7039dd33f5a904a2556b72fb00
|
Java
|
suresh-narra-rft/avonniv
|
/src/main/java/com/avonniv/service/CallDescriptionService.java
|
UTF-8
| 3,320
| 2.234375
| 2
|
[] |
no_license
|
package com.avonniv.service;
import com.avonniv.domain.CallDescription;
import com.avonniv.domain.FileInfo;
import com.avonniv.domain.Grant;
import com.avonniv.repository.CallDescriptionRepository;
import com.avonniv.repository.FileInfoRepository;
import com.avonniv.repository.GrantRepository;
import com.avonniv.service.dto.CallDescriptionDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
@Service
@Transactional
public class CallDescriptionService {
private final Logger log = LoggerFactory.getLogger(CallDescriptionService.class);
private final CallDescriptionRepository callDescriptionRepository;
private final GrantRepository grantRepository;
private final FileInfoRepository fileInfoRepository;
public CallDescriptionService(CallDescriptionRepository callDescriptionRepository,
GrantRepository grantRepository,
FileInfoRepository fileInfoRepository) {
this.callDescriptionRepository = callDescriptionRepository;
this.grantRepository = grantRepository;
this.fileInfoRepository = fileInfoRepository;
}
public CallDescription createCallDescription(CallDescriptionDTO callDescriptionDTO) {
CallDescription newCallDescription = new CallDescription();
newCallDescription.setTitle(callDescriptionDTO.getTitle());
newCallDescription.setDescription(callDescriptionDTO.getDescription());
Grant grant = grantRepository.findOne(callDescriptionDTO.getGrantDTO().getId());
newCallDescription.setGrant(grant);
FileInfo fileInfo = fileInfoRepository.findOne(callDescriptionDTO.getFileInfoDTO().getId());
newCallDescription.setFileInfo(fileInfo);
callDescriptionRepository.save(newCallDescription);
log.debug("Created Information for Call Description: {}", newCallDescription);
return newCallDescription;
}
public List<CallDescriptionDTO> getAll() {
return callDescriptionRepository.findAll().stream().map(CallDescriptionDTO::new).collect(Collectors.toList());
}
public Optional<CallDescription> updateCallDescription(CallDescriptionDTO callDescriptionDTO) {
return Optional.of(callDescriptionRepository
.findOne(callDescriptionDTO.getId()))
.map(callDescription -> {
callDescription.setTitle(callDescriptionDTO.getTitle());
callDescription.setDescription(callDescriptionDTO.getDescription());
Grant grant = grantRepository.findOne(callDescriptionDTO.getGrantDTO().getId());
callDescription.setGrant(grant);
FileInfo fileInfo = fileInfoRepository.findOne(callDescriptionDTO.getFileInfoDTO().getId());
callDescription.setFileInfo(fileInfo);
log.debug("Changed Information for Call Description: {}", callDescription);
return callDescription;
});
}
public void deleteCallDescription(CallDescriptionDTO callDescriptionDTO) {
callDescriptionRepository.delete(callDescriptionDTO.getId());
}
}
| true
|
8a4a0bcb91fc50300dfa04422a832e9217022fa7
|
Java
|
lcf123456/czt
|
/BS56/.svn/pristine/d7/d72d4a245e31ed60b61ed939bf47cee062c1d75c.svn-base
|
UTF-8
| 292
| 1.65625
| 2
|
[] |
no_license
|
package com.ztel.app.service.wms;
import java.util.List;
import com.ztel.app.vo.wms.ShipOrderLineVo;
public interface ShipOrderLineService {
public List<ShipOrderLineVo> getShipOrderLineByOrderNo(String orderNo);
public int doUpdateShipOrderLine(ShipOrderLineVo shipOrderLineVo);
}
| true
|
4f3857d090cd7042b23eb19fd8795d6d68e3a087
|
Java
|
oliverran/template
|
/src/main/java/uk/ac/napier/soc/ssd/coursework/repository/EnrollmentRepository.java
|
UTF-8
| 1,391
| 2.09375
| 2
|
[] |
no_license
|
package uk.ac.napier.soc.ssd.coursework.repository;
import uk.ac.napier.soc.ssd.coursework.domain.Enrollment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.*;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Optional;
/**
* Spring Data repository for the Enrollment entity.
*/
@SuppressWarnings("unused")
@Repository
public interface EnrollmentRepository extends JpaRepository<Enrollment, Long> {
@Query("select enrollment from Enrollment enrollment where enrollment.user.login = ?#{principal.username}")
List<Enrollment> findByUserIsCurrentUser();
@Query(value = "select distinct enrollment from Enrollment enrollment left join fetch enrollment.courses",
countQuery = "select count(distinct enrollment) from Enrollment enrollment")
Page<Enrollment> findAllWithEagerRelationships(Pageable pageable);
@Query(value = "select distinct enrollment from Enrollment enrollment left join fetch enrollment.courses")
List<Enrollment> findAllWithEagerRelationships();
@Query("select enrollment from Enrollment enrollment left join fetch enrollment.courses where enrollment.id =:id")
Optional<Enrollment> findOneWithEagerRelationships(@Param("id") Long id);
}
| true
|
a05e71e44c3ef4c1f26496eca9771cbdaaf9d76a
|
Java
|
changelzj/spring-cxf
|
/src/main/java/com/example/webservice/UserWebService.java
|
UTF-8
| 368
| 2.0625
| 2
|
[] |
no_license
|
package com.example.webservice;
import com.example.entity.User;
import javax.jws.WebResult;
import javax.jws.WebService;
import java.util.List;
@WebService(serviceName = "UserWebService")
public interface UserWebService {
@WebResult(name = "getUserById")
User getUserById(Integer id);
@WebResult(name = "getList")
List<User> getList(User user);
}
| true
|
04ae8f5f746b60dd4269475e88162139e46e5eb1
|
Java
|
Lsyee10/lsyee2
|
/src/com/lsy/www/entity/form/sys/KpkpWwwSysSearchForm.java
|
UTF-8
| 413
| 1.84375
| 2
|
[] |
no_license
|
/**
* Project : kpkp
* Copyright (c) Hang Zhou Daily Press Group.
* All rights reserved.
*/
package com.lsy.www.entity.form.sys;
/**
* Description:首页表单
*
* @version 1.0 2016年3月2日
* @author Wu guang jing
*/
public class KpkpWwwSysSearchForm {
private String keyword;
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
}
| true
|
bf46ba6015b2db8a08af3b38f6cf990e4dd55020
|
Java
|
yanakudryk/pinterest-appium-android
|
/src/main/java/screens/CreateBoardScreen.java
|
UTF-8
| 1,129
| 2.171875
| 2
|
[] |
no_license
|
package screens;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidBy;
import io.appium.java_client.pagefactory.AndroidFindAll;
import io.appium.java_client.pagefactory.AndroidFindBy;
public class CreateBoardScreen extends BaseScreen {
@AndroidFindBy(xpath = "//android.widget.LinearLayout[@content-desc='Create a board…']")
private AndroidElement createBoardButton;
@AndroidFindAll(value = {
@AndroidBy(id = "com.pinterest:id/board_name_et"),
@AndroidBy(id = "com.pinterest:id/board_name_edittext")})
private AndroidElement boardName;
@AndroidFindBy(id = "com.pinterest:id/create_btn")
private AndroidElement createButton;
public CreateBoardScreen(AndroidDriver<AndroidElement> driver) {
super(driver);
}
public void createBoard(String name){
if(action.isDisplayedElement(createBoardButton)){
action.tapButton(createBoardButton);
}
action.inputText(boardName, name);
action.tapButton(createButton);
}
}
| true
|
28e5e63fc1a3627ace1229c32a9c93f90db73b42
|
Java
|
melissaehong/AllProjects
|
/Java/Java_Fundamentals/HashMatique.java
|
UTF-8
| 541
| 3.203125
| 3
|
[] |
no_license
|
import java.util.HashMap;
public class HashMatique{
public static void main(String[] args){
HashMap<String, String> trackList = new HashMap<>();
trackList.put("Song1", "Lyrics");
trackList.put("Song2", "Lyrics");
trackList.put("Song3", "Lyrics");
trackList.put("Song4", "Lyrics");
String track = trackList.get("Song1");
System.out.println(track);
for (String key : trackList.keySet()){
System.out.println(key + " : " + trackList.get(key));
}
}
}
| true
|
efcef4c8e58b3a619e15b6efbbb9cb552adacfaf
|
Java
|
MarchioroMarco/Fila_5
|
/src/main/java/it/its/TestDockerService/controller/CittaController.java
|
UTF-8
| 1,437
| 2.109375
| 2
|
[] |
no_license
|
package it.its.TestDockerService.controller;
import java.util.Date;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import it.its.TestDockerService.dto.BaseResponseDto;
import it.its.TestDockerService.dto.CittaDto;
import it.its.TestDockerService.service.CittaService;
@RestController
@RequestMapping(value = "api/citta")
public class CittaController {
@Autowired
private CittaService cittaService;
private static final Logger LOGGER = LoggerFactory.getLogger(DipendentiController.class);
@GetMapping(produces = "application/json")
public BaseResponseDto<List<CittaDto>> fetchAll(){
BaseResponseDto<List<CittaDto>> response = new BaseResponseDto<>();
LOGGER.info("******Otteniamo tutto******");
List<CittaDto> citta = cittaService.parseDto();
response.setTimestamp(new Date());
response.setStatus(HttpStatus.OK.value());
response.setMessagge("SERVIZIO_ELABORATO_CORRETTAMENTE");
if(citta.isEmpty()) {
response.setResponse(null);
return response;
}
LOGGER.info("Numero dei record: " + citta.size());
response.setResponse(citta);
return response;
}
}
| true
|
7fffd969a0513eab050a85203b717f5fdbbeb52b
|
Java
|
PlumpMath/designPattern-121
|
/prototype/code/java/demo.java
|
UTF-8
| 1,265
| 3.421875
| 3
|
[] |
no_license
|
//==================抽象类==================
public abstract class NoramActor {
public abstract NoramActor Clone();
}
public abstract class FlyActor {
public abstract FlyActor Clone();
}
//==================具体类==================
public class NoramActorA extend NoramActor {
public override NoramActor Clone() {
return ...;
}
}
public class NoramActorB extend NoramActor {
public override NoramActor Clone() {
return ...;
}
}
public class FlyActorA extend FlyActor {
public override FlyActor Clone() {
return ...;
}
}
public class FlyActorB extend FlyActor {
public override FlyActor Clone() {
return ...;
}
}
//==================客户程序==================
public class GameSystem {
public static void Run(NormalActor normalActor, FlyActor flyActor) {
NormalActor normalActor1 = normalActor.clone();
NormalActor normalActor2 = normalActor.clone();
NormalActor normalActor3 = normalActor.clone();
FlyActor flyActor1 = flyActor.clone();
FlyActor flyActor2 = flyActor.clone();
}
}
//==================测试程序==================
class App {
public static void Main() {
GameSystem gameSystem = new GameSystem();
gameSystem.Run(new NormalActorA(), new flyActorB())
}
}
| true
|
09a0e89aa5b299e7016f1d91e56d57dc689ddbc9
|
Java
|
chonochonovuk/SOFTUNI_JAVA_DB_MYSQL
|
/spring-intro-ex/src/main/java/org/chonochonov/springintroex/entities/AgeRestriction.java
|
UTF-8
| 111
| 1.851563
| 2
|
[] |
no_license
|
package org.chonochonov.springintroex.entities;
public enum AgeRestriction {
MINOR,
TEEN,
ADULT
}
| true
|
93d9597430d4bf8bf835b99530dd2de95db52c10
|
Java
|
magicmmp/iUESTC
|
/app/src/main/java/com/febers/iuestc/module/course/view/CourseFragment.java
|
UTF-8
| 6,603
| 1.929688
| 2
|
[
"Apache-2.0"
] |
permissive
|
package com.febers.iuestc.module.course.view;
import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
import com.bigkoo.pickerview.view.OptionsPickerView;
import com.febers.iuestc.MyApp;
import com.febers.iuestc.R;
import com.febers.iuestc.base.BaseCode;
import com.febers.iuestc.base.BaseEvent;
import com.febers.iuestc.base.BaseFragment;
import com.febers.iuestc.base.Constants;
import com.febers.iuestc.entity.BeanCourse;
import com.febers.iuestc.entity.BeanUserStatus;
import com.febers.iuestc.module.course.presenter.CourseContract;
import com.febers.iuestc.module.course.presenter.CoursePresenterImpl;
import com.febers.iuestc.module.login.view.LoginActivity;
import com.febers.iuestc.util.SPUtil;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class CourseFragment extends BaseFragment implements CourseContract.View {
private static final String TAG = "CourseFragment";
private CourseContract.Presenter presenter = new CoursePresenterImpl(this);
private List<Button> buttonList = new ArrayList<>();
private List<Integer> weeks = new ArrayList<>();
private OptionsPickerView pickerView;
private TextView tvNowWeek;
private ImageView ivNull;
private int nowWeek;
@Override
protected int setContentView() {
return R.layout.fragment_course;
}
@Override
protected int setToolbar() {
return R.id.tb_course;
}
@Override
protected String setToolbarTitle() {
return "";
}
@Override
protected int setMenu() {
return R.menu.course_menu;
}
@Override
protected Boolean registerEventBus() {
return true;
}
@Override
public void dataRequest(Boolean isRefresh) {
if (isRefresh) {
if (!MyApp.checkNetConnecting()) {
onError("当前网络不可用");
return;
}
showProgressDialog();
}
presenter.courseRequest(isRefresh);
}
@Override
protected void initView() {
initPicker();
tvNowWeek = findViewById(R.id.tv_course_title);
ivNull = findViewById(R.id.iv_null_course);
setTitle(0);
dataRequest(false);
}
@Override
public void showUnderCourse(BaseEvent<List<BeanCourse>> event) {
dismissProgressDialog();
activity.runOnUiThread( () -> {
if (event.getCode() == BaseCode.ERROR) {
onError("刷新课表出错,请尝试再次获取");
return;
}
if (event.getCode() == BaseCode.CLEAR) {
for (int i = 0; i < buttonList.size(); i++) {
buttonList.get(i).setVisibility(View.GONE);
}
ivNull.setVisibility(View.VISIBLE);
return;
}
for (int i = 0; i < buttonList.size(); i++) {
buttonList.get(i).setVisibility(View.INVISIBLE);
}
if (event.getCode() == BaseCode.UPDATE) {
ivNull.setVisibility(View.GONE);
onError("刷新课表成功");
}
CourseViewHelper helper = new CourseViewHelper(activity);
helper.create(event.getDate(), nowWeek, buttonList);
});
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.item_course_choose_week:
if (!isLogin()) {
break;
}
pickerView.show();
break;
case R.id.item_course_refresh:
if (!isLogin()) {
break;
}
dataRequest(true);
break;
default:
break;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onSupportVisible() {
super.onSupportVisible();
Boolean firstGet = SPUtil.INSTANCE().get(Constants.COURSE_FIRST_GET, true);
if (firstGet) {
dataRequest(true);
SPUtil.INSTANCE().put(Constants.COURSE_FIRST_GET, false);
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void userStatusChanged(BaseEvent<BeanUserStatus> event) {
if (event.getCode() == BaseCode.UPDATE) {
//刷新课表
dataRequest(true);
} else {
showUnderCourse(new BaseEvent<>(BaseCode.CLEAR, new ArrayList<>()));
}
}
@Override
public void statusLoss() {
startActivity(new Intent(getActivity(), LoginActivity.class));
}
/**
* 选择器初始化
* 默认共有20周
*/
private void initPicker() {
for (int i = 1; i < 21; i++) {
weeks.add(i);
}
pickerView = new OptionsPickerBuilder(getContext(), (options1, options2, options3, v) -> {
Toast.makeText(getContext(), "当前周数已设置为第" + (options1+1) + "周", Toast.LENGTH_SHORT).show();
SPUtil.INSTANCE().put(Constants.COURSE_NOW_WEEK, (options1+1));
SPUtil.INSTANCE().put("set_week", true);
setTitle(options1+1);
dataRequest(false);
})
.setTitleText("选择当前周数")
.setOutSideCancelable(false)
.setCyclic(true, false, false)
.setBgColor(getResources().getColor(R.color.lightgray))
.build();
pickerView.setPicker(weeks);
}
private void setTitle(int week) {
nowWeek = 1;
if (week == 0) {
nowWeek = SPUtil.INSTANCE().get(Constants.COURSE_NOW_WEEK, 1);
if (nowWeek == 0) nowWeek = 1;
} else {
nowWeek = week;
}
Objects.requireNonNull(getActivity()).runOnUiThread(()-> tvNowWeek.setText("第" + nowWeek + "周"));
}
private Boolean isLogin() {
return SPUtil.INSTANCE().get(Constants.IS_LOGIN, false);
}
public static CourseFragment newInstance(String param1) {
Bundle args = new Bundle();
args.putString(PARAMETER, param1);
CourseFragment fragment = new CourseFragment();
fragment.setArguments(args);
return fragment;
}
}
| true
|
2f64633589b5a011186284b8c72a31b8b993069a
|
Java
|
ayeminwai/spring-batch
|
/spring-batch/src/main/java/com/v6team/amw/springbatch/model/UserData.java
|
UTF-8
| 1,451
| 2.125
| 2
|
[] |
no_license
|
package com.v6team.amw.springbatch.model;
public class UserData {
private String id;
private String userName;
private String role;
private String orgId;
private String companyId;
private String branchId;
private String zoneId;
private String userSyskey;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getBranchId() {
return branchId;
}
public void setBranchId(String branchId) {
this.branchId = branchId;
}
public String getZoneId() {
return zoneId;
}
public void setZoneId(String zoneId) {
this.zoneId = zoneId;
}
public String getUserSyskey() {
return userSyskey;
}
public void setUserSyskey(String userSyskey) {
this.userSyskey = userSyskey;
}
public UserData() {
super();
clearProperties();
}
private void clearProperties() {
this.id = "";
this.userName = "";
this.orgId = "0";
}
}
| true
|
e3f1dcb8fe7ce31fb63bc6a1b4dd49df4e3ac934
|
Java
|
nikita-agarwal21/Java
|
/pgm1/PrintPIE.java
|
UTF-8
| 168
| 2.203125
| 2
|
[] |
no_license
|
package pgm1;
public class PrintPIE {public static void main(String args[])
{
System.out.println("PI="+Math.PI);
System.out.println("E="+Math.E);
}
}
| true
|
202d603ec05bf5a3fb5ba19c0c2c22324f2e7600
|
Java
|
nkopiec/JavaLearning
|
/017 Numbers/src/pl/java/Triangle.java
|
UTF-8
| 706
| 3.84375
| 4
|
[] |
no_license
|
package pl.java;
import java.util.Scanner;
public class Triangle {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Give length basis your triangle: ");
int basis = input.nextInt();
System.out.println("Give length first arm your triangle: ");
int arm1 = input.nextInt();
System.out.println("Give length second arm your triangle: ");
int arm2 = input.nextInt();
int arms = arm1 + arm2;
if (arms > basis) {
System.out.println("You give good measurements, it is trangle");
}
else if (basis >= arms ) {
System.out.println("You give bad measurements, it isn't trangle");
}
}
}
| true
|
5f2324ea678e3a35c8e1c7c8d61f035d4b0ed776
|
Java
|
czmichael/PictureOrderingSystem
|
/src/main/java/zhi/Photo.java
|
UTF-8
| 2,579
| 2.96875
| 3
|
[] |
no_license
|
package zhi;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.drew.imaging.ImageMetadataReader;
import com.drew.metadata.Directory;
import com.drew.metadata.Metadata;
import com.drew.metadata.Tag;
/**
* Class encapsulates meta data such as time taken of a photo
*
* @author Zhi Chen
* created: 04/23/2016
* updated: 06/07/2020
*/
public class Photo {
private Path path;
private Date createdDate;
private Metadata metadata;
private String fileName;
public Photo(Path path) {
this.path = path;
this.metadata = retrieveMetadata();
findCreatedDate();
}
private Metadata retrieveMetadata() {
File file = this.path.toFile();
this.fileName = file.getName();
Metadata metadata = null;
try {
metadata = ImageMetadataReader.readMetadata(file);
} catch (Exception e) {
try {
System.err.println("file: " + file.getCanonicalPath().toString());
} catch (IOException e1) {
throw new RuntimeException(e);
}
throw new RuntimeException(e);
}
return metadata;
}
private void findCreatedDate() {
for (Directory directory : metadata.getDirectories()) {
for (Tag tag : directory.getTags()) {
String tagName = tag.getTagName();
if (tagName.contains("Date/Time Original")) {
String timeTakenString = tag.getDescription();
String pattern = "yyyy:MM:dd HH:mm:ss";
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);
try {
this.createdDate = simpleDateFormat.parse(timeTakenString);
} catch (ParseException e) {
throw new RuntimeException(e);
}
}
}
}
}
public String getFileName() {
for (Directory directory : metadata.getDirectories()) {
for (Tag tag : directory.getTags()) {
String tagName = tag.getTagName();
if (tagName.equals("File Name")) {
return tag.getDescription();
}
}
}
return null;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public Path getPath() {
return path;
}
public void setPath(Path path) {
this.path = path;
}
public String toString() {
return this.fileName;
}
}
| true
|
7da54eab3445e66d5645ab54e3c43c8ab821048c
|
Java
|
polarpoint-io/jhipster-demo
|
/product/src/main/java/io/polarpoint/product/domain/Field.java
|
UTF-8
| 5,493
| 2.0625
| 2
|
[] |
no_license
|
package io.polarpoint.product.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
/**
* A Field.
*/
@Entity
@Table(name = "field")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Field implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;
@Column(name = "defaultz")
private String defaultz;
@Column(name = "editable")
private Boolean editable;
@Column(name = "label")
private String label;
@Column(name = "mandatory")
private Boolean mandatory;
@Column(name = "maxs")
private String maxs;
@Column(name = "mins")
private String mins;
@Column(name = "multiple")
private Long multiple;
@Column(name = "name")
private String name;
@Column(name = "patternz")
private String patternz;
@Column(name = "type")
private String type;
@OneToMany(mappedBy = "order")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
private Set<Page> pages = new HashSet<>();
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getDefaultz() {
return defaultz;
}
public Field defaultz(String defaultz) {
this.defaultz = defaultz;
return this;
}
public void setDefaultz(String defaultz) {
this.defaultz = defaultz;
}
public Boolean isEditable() {
return editable;
}
public Field editable(Boolean editable) {
this.editable = editable;
return this;
}
public void setEditable(Boolean editable) {
this.editable = editable;
}
public String getLabel() {
return label;
}
public Field label(String label) {
this.label = label;
return this;
}
public void setLabel(String label) {
this.label = label;
}
public Boolean isMandatory() {
return mandatory;
}
public Field mandatory(Boolean mandatory) {
this.mandatory = mandatory;
return this;
}
public void setMandatory(Boolean mandatory) {
this.mandatory = mandatory;
}
public String getMaxs() {
return maxs;
}
public Field maxs(String maxs) {
this.maxs = maxs;
return this;
}
public void setMaxs(String maxs) {
this.maxs = maxs;
}
public String getMins() {
return mins;
}
public Field mins(String mins) {
this.mins = mins;
return this;
}
public void setMins(String mins) {
this.mins = mins;
}
public Long getMultiple() {
return multiple;
}
public Field multiple(Long multiple) {
this.multiple = multiple;
return this;
}
public void setMultiple(Long multiple) {
this.multiple = multiple;
}
public String getName() {
return name;
}
public Field name(String name) {
this.name = name;
return this;
}
public void setName(String name) {
this.name = name;
}
public String getPatternz() {
return patternz;
}
public Field patternz(String patternz) {
this.patternz = patternz;
return this;
}
public void setPatternz(String patternz) {
this.patternz = patternz;
}
public String getType() {
return type;
}
public Field type(String type) {
this.type = type;
return this;
}
public void setType(String type) {
this.type = type;
}
public Set<Page> getPages() {
return pages;
}
public Field pages(Set<Page> pages) {
this.pages = pages;
return this;
}
public Field addPage(Page page) {
this.pages.add(page);
page.setOrder(this);
return this;
}
public Field removePage(Page page) {
this.pages.remove(page);
page.setOrder(null);
return this;
}
public void setPages(Set<Page> pages) {
this.pages = pages;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Field)) {
return false;
}
return id != null && id.equals(((Field) o).id);
}
@Override
public int hashCode() {
return 31;
}
@Override
public String toString() {
return "Field{" +
"id=" + getId() +
", defaultz='" + getDefaultz() + "'" +
", editable='" + isEditable() + "'" +
", label='" + getLabel() + "'" +
", mandatory='" + isMandatory() + "'" +
", maxs='" + getMaxs() + "'" +
", mins='" + getMins() + "'" +
", multiple=" + getMultiple() +
", name='" + getName() + "'" +
", patternz='" + getPatternz() + "'" +
", type='" + getType() + "'" +
"}";
}
}
| true
|
d4ef73ac8239e08a1bf11fa610b27917146314f0
|
Java
|
jpace/quamat
|
/src/test/java/org/quamat/fmt/FormattingTest.java
|
UTF-8
| 1,586
| 2.625
| 3
|
[
"MIT"
] |
permissive
|
package org.quamat.fmt;
import junitparams.Parameters;
import junitparams.naming.TestCaseName;
import org.incava.attest.Parameterized;
import org.junit.Test;
import java.util.Arrays;
import java.util.Formattable;
import java.util.Formatter;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
public class FormattingTest extends Parameterized {
static class TestABC implements Formattable {
private final String str;
public TestABC(String str) {
this.str = str;
}
@Override
public void formatTo(Formatter formatter, int flags, int width, int precision) {
System.out.println("formatter: " + formatter);
System.out.println("flags: " + flags);
System.out.println("width: " + width);
System.out.println("precision: " + precision);
formatter.format(str);
}
}
@Test @Parameters @TestCaseName
public void format(String expected, String format, Object ... args) {
System.out.println("format: " + format);
System.out.println("args: " + Arrays.asList(args));
String result = String.format(format, args);
System.out.println("result: " + result);
assertThat(result, equalTo(expected));
}
private java.util.List<Object[]> parametersForFormat() {
java.util.List<Object[]> pl = paramsList();
pl.add(params("abc", "%s", new Object[] { "abc" }));
pl.add(params("abc", "%s", new Object[] { new TestABC("abc") }));
return pl;
}
}
| true
|
b6cec191926290de8f6a5ee5893e0a5656ae7034
|
Java
|
ZEROAZERO/2020-01-05
|
/leetcode/src/string/Q38_CountAndSay.java
|
UTF-8
| 2,316
| 4
| 4
|
[] |
no_license
|
package string;
/**
38.「外观数列」是一个整数序列,从数字 1 开始,序列中的每一项都是对前一项的描述。前五项如下:
1. 1
2. 11
3. 21
4. 1211
5. 111221
1 被读作 "one 1" ("一个一") , 即 11。
11 被读作 "two 1s" ("两个一"), 即 21。
21 被读作 "one 2", "one 1" ("一个二" , "一个一") , 即 1211。
给定一个正整数 n(1 ≤ n ≤ 30),输出外观数列的第 n 项。
注意:整数序列中的每一项将表示为一个字符串。
示例 1:
输入: 1
输出: "1"
解释:这是一个基本样例。
示例 2:
输入: 4
输出: "1211"
解释:当 n = 3 时,序列是 "21",其中我们有 "2" 和 "1" 两组,"2" 可以读作 "12",也就是出现频次 = 1 而 值 = 2;类似 "1" 可以读作 "11"。所以答案是 "12" 和 "11" 组合在一起,也就是 "1211"。
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/count-and-say
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
*/
public class Q38_CountAndSay {
public String countAndSay(int n) {
if (n == 1) {
return "1";
}
String res = "1";
int range = 1;
for (int i=1; i<n; i++) {
StringBuilder sb = new StringBuilder();
//System.out.println("--"+res);
for (int j=0; j<res.length(); j = j+range) {
int k = j + 1;
int c = 1;//记录同一个连续数字出现次数
while (k<res.length() && res.charAt(k) == res.charAt(j)) {
k++;
c++;
}
range = c;//j跨越到下一个不同的数字
sb.append(c);
sb.append(res.charAt(j));
}
res = sb.toString();
sb.delete(0, sb.length());
}
return res;
}
public static void main(String[] args) {
String res = new Q38_CountAndSay().countAndSay(4);
System.out.println(res);
String res1 = new Q38_CountAndSay().countAndSay(5);
System.out.println(res1);
String res2 = new Q38_CountAndSay().countAndSay(6);
System.out.println(res2);
}
}
| true
|
697ddc9428334d78a2de220a70ac12cc4270e023
|
Java
|
ramananandh/MyPublicRepo
|
/soa-client/src/main/java/org/ebayopensource/turmeric/runtime/common/impl/internal/markdown/SOABaseMarkdownStateManager.java
|
UTF-8
| 4,385
| 1.859375
| 2
|
[
"Apache-2.0"
] |
permissive
|
/*******************************************************************************
* Copyright (c) 2006-2010 eBay Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*******************************************************************************/
package org.ebayopensource.turmeric.runtime.common.impl.internal.markdown;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import org.ebayopensource.turmeric.runtime.common.impl.internal.service.ServiceDesc;
import org.ebayopensource.turmeric.runtime.common.impl.utils.LogManager;
import org.ebayopensource.turmeric.runtime.common.service.ServiceOperationDesc;
import org.ebayopensource.turmeric.runtime.sif.impl.internal.service.ClientServiceDesc;
import com.ebay.kernel.markdown.simple.SimpleMarkdownStateManager;
/**
* @author ichernyshev
*/
public abstract class SOABaseMarkdownStateManager<I extends SOABaseMarkdownStateId, S extends SOABaseMarkdownState<I>>
extends SimpleMarkdownStateManager<I,S>
{
@Override
protected boolean doesStateIdInclude(I outer, I inner) {
if (!outer.getAdminName().equals(inner.getAdminName())) {
return false;
}
String outerOpName = outer.getOperationName();
if (outerOpName != null) {
String innerOpName = inner.getOperationName();
if (innerOpName == null || !innerOpName.equals(outerOpName)) {
return false;
}
}
return true;
}
private void createServiceStateIds(ServiceDesc svcDesc, Collection<I> ids) {
List<URL> locations = null;
if(svcDesc instanceof ClientServiceDesc){
locations = ((ClientServiceDesc)svcDesc).getServiceLocations();
}
createServiceStateIds(svcDesc, null, ids, locations);
Collection<ServiceOperationDesc> ops = svcDesc.getAllOperations();
for (ServiceOperationDesc op: ops) {
String opName = op.getName();
createServiceStateIds(svcDesc, opName, ids, locations);
}
}
private void createServiceStateIds(ServiceDesc svcDesc, String opName, Collection<I> ids, List<URL> locations)
{
String adminName = svcDesc.getAdminName();
String subname = svcDesc.getServiceId().getServiceSubname();
if(locations!=null &&!locations.isEmpty())
{
for(URL location:locations){
ids.add(createSoaStateId(adminName, opName, null, location.toString()));
if (subname != null) {
ids.add(createSoaStateId(adminName, opName, subname, location.toString()));
}
}
}else{
ids.add(createSoaStateId(adminName, opName, null, null));
if (subname != null) {
ids.add(createSoaStateId(adminName, opName, subname, null));
}
}
}
public final void addServiceStates(ServiceDesc svcDesc) {
Collection<I> ids = new ArrayList<I>();
createServiceStateIds(svcDesc, ids);
Map<I,Throwable> errors = new HashMap<I,Throwable>();
createStates(ids, errors);
// log any errors after loading
for (Map.Entry<I,Throwable> entry: errors.entrySet()) {
I id = entry.getKey();
Throwable e = entry.getValue();
LogManager.getInstance(SOABaseMarkdownStateManager.class).log(Level.SEVERE,
"Unable to pre-create markdown state " + id.getStringId() +
" in '" + getName() + "'. " + e.toString(), e);
}
postCreateStates(svcDesc, ids);
}
protected void postCreateStates(ServiceDesc svcDesc, Collection<I> ids) {
// no work here, allow overrides
}
@Override
protected Collection<I> getParentIds(S primaryState) {
I primaryId = primaryState.getId();
String opName = primaryId.getOperationName();
String subname = primaryId.getSubname();
String location = primaryId.getLocation();
if (opName == null && subname == null) {
return null;
}
Collection<I> result = new ArrayList<I>();
// add top level
result.add(createSoaStateId(primaryId.getAdminName(), null, null, location));
if (opName != null && subname != null) {
result.add(createSoaStateId(primaryId.getAdminName(), opName, null, location));
result.add(createSoaStateId(primaryId.getAdminName(), null, subname, location));
}
return result;
}
protected abstract I createSoaStateId(String adminName, String opName, String subname, String location);
}
| true
|
be51193f99bf5964468be5d2441e3b24b65a024d
|
Java
|
nifengfeiyang/springboot-elasticsearch-example
|
/src/main/java/com/zhhongcai/example/productes/service/ProductSearchServiceImpl.java
|
UTF-8
| 23,040
| 1.90625
| 2
|
[] |
no_license
|
package com.zhhongcai.example.productes.service;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Joiner;
import com.google.common.base.Splitter;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.zhhongcai.example.productes.dto.Page;
import com.zhhongcai.example.productes.dto.ProductIndex;
import com.zhhongcai.example.productes.dto.ProductSearchReqDto;
import com.zhhongcai.example.productes.dto.ProductSearchRespDto;
import com.zhhongcai.example.productes.dto.SelectingSkuDto;
import org.apache.commons.lang3.StringUtils;
import org.apache.lucene.search.join.ScoreMode;
import org.elasticsearch.action.search.MultiSearchRequest;
import org.elasticsearch.action.search.MultiSearchResponse;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.RangeQueryBuilder;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.aggregations.Aggregation;
import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.metrics.valuecount.ParsedValueCount;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.sort.NestedSortBuilder;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortMode;
import org.elasticsearch.search.sort.SortOrder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
/**
* @Author: caizhh
* @Date: Create in 18-10-17 下午5:02
* @Description:
*/
@Service
public class ProductSearchServiceImpl implements ProductSearchService {
@Value("${product.index.name}")
private String indexName;
@Value("${discountPercentList}")
private String discountPercentList;
private Logger logger = LoggerFactory.getLogger(ProductSearchServiceImpl.class);
@Resource
private RestHighLevelClient restHighLevelClient;
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Resource
private ObjectMapper objectMapper;
@Override
public Page<ProductSearchRespDto> search(ProductSearchReqDto reqDto) throws Exception {
SearchSourceBuilder sb = buildSearchSourceBuilder(reqDto);
if (sb == null) {
return buildFromSearchResponse(reqDto.getShopId(), null, reqDto.getPageNum(), reqDto.getPageSize());
}
SearchRequest searchRequest = new SearchRequest(new String[]{indexName}, sb);
// searchRequest.scroll(new TimeValue(1, TimeUnit.MINUTES));
SearchResponse response = restHighLevelClient.search(searchRequest);
return buildFromSearchResponse(reqDto.getShopId(), response, reqDto.getPageNum(), reqDto.getPageSize());
}
private SearchSourceBuilder buildSearchSourceBuilder(ProductSearchReqDto reqDto) throws Exception {
BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
if (!needQuery(reqDto, boolQuery)) {
return null;
}
SearchSourceBuilder sourceBuilder = new SearchSourceBuilder();
if (!CollectionUtils.isEmpty(boolQuery.filter())) {
sourceBuilder.query(boolQuery);
}
//排序
SortOrder sortOrder = SortOrder.DESC.toString().equalsIgnoreCase(reqDto.getSortType()) ? SortOrder.DESC : SortOrder.ASC;
if (StringUtils.isNotBlank(reqDto.getSortItem())) {
if ("quantity".equalsIgnoreCase(reqDto.getSortItem())) {
//库存
sourceBuilder.sort(SortBuilders.fieldSort("inventoryInfos.itemQuantities.quantity")
.setNestedSort(new NestedSortBuilder("inventoryInfos.itemQuantities"))
.sortMode(SortMode.SUM).order(sortOrder));
} else if ("sales_volume".equalsIgnoreCase(reqDto.getSortItem())) {
//销量
sourceBuilder.sort(SortBuilders.fieldSort("skuInfos.salesVolume").sortMode(SortMode.SUM).order(sortOrder));
} else if ("retail_price".equalsIgnoreCase(reqDto.getSortItem())) {
//价格
sourceBuilder.sort(SortBuilders.fieldSort("skuInfos.retailPrice").sortMode(SortMode.MIN).order(sortOrder));
} else {
//默认按上架时间升序
sourceBuilder.sort(SortBuilders.fieldSort("skuInfos.onlineTime").sortMode(SortMode.MAX).order(sortOrder));
}
} else {
//默认按上架时间升序
sourceBuilder.sort(SortBuilders.fieldSort("skuInfos.onlineTime").sortMode(SortMode.MAX).order(sortOrder));
}
//分页
sourceBuilder.from((reqDto.getPageNum() - 1) * reqDto.getPageSize())
.size(reqDto.getPageSize());
logger.info("sourceBuilder: " + sourceBuilder.toString());
return sourceBuilder;
}
private boolean needQuery(ProductSearchReqDto reqDto, BoolQueryBuilder boolQuery) throws Exception {
Optional.ofNullable(reqDto.getShopId()).orElseThrow(() -> new Exception("店铺id不能为空"));
//审核通过
boolQuery.filter(QueryBuilders.termQuery("skuInfos.status", 1));
//未选及部分选
if (reqDto.getStatus() != null && reqDto.getStatus() == 0) {
boolQuery.should(QueryBuilders.termsQuery("skuInfos.selectedShops", Lists.newArrayList(reqDto.getShopId())))
.should(QueryBuilders.termsQuery("skuInfos.selectingShops", Lists.newArrayList(reqDto.getShopId())))
.minimumShouldMatch(1);
}
if (StringUtils.isNotBlank(reqDto.getSpuOrSku())) {
boolQuery.filter(QueryBuilders.termsQuery("skuInfos.skuId", reqDto.getSpuOrSku()));
}
//品牌
Optional.ofNullable(reqDto.getBrandId()).ifPresent(brandId ->
boolQuery.filter(QueryBuilders.termQuery("brandId", brandId)));
//供应商
Optional.ofNullable(reqDto.getProviderId()).ifPresent(providerId ->
boolQuery.filter(QueryBuilders.termQuery("providerId", providerId)));
//TODO 仓库地址
if (StringUtils.isNotBlank(reqDto.getWarehouseLocation())) {
boolQuery.filter(QueryBuilders.nestedQuery("inventoryInfos",
QueryBuilders.termsQuery("inventoryInfos.warehouseId", reqDto.getWarehouseLocation()), ScoreMode.None));
}
//TODO 关键字 品类 品牌?
if (StringUtils.isNotBlank(reqDto.getKeyword())) {
boolQuery.filter(QueryBuilders.multiMatchQuery(reqDto.getKeyword(), "productModel", "productName"));
}
//品类
Optional.ofNullable(reqDto.getCategoryId()).ifPresent(categoryId ->
boolQuery.filter(QueryBuilders.wildcardQuery("categoryIdPath", "*" + categoryId + "*")));
//语言
if (StringUtils.isNotBlank(reqDto.getLanguage())) {
boolQuery.filter(QueryBuilders.termQuery("language", reqDto.getLanguage()));
}
//币别
if (StringUtils.isNotBlank(reqDto.getCurrency())) {
boolQuery.filter(QueryBuilders.termQuery("currency", reqDto.getCurrency()));
}
RangeQueryBuilder priceRange = null;
//价格from
if (reqDto.getPriceFrom() != null) {
priceRange = QueryBuilders.rangeQuery("skuInfos.retailPrice").from(reqDto.getPriceFrom());
}
//价格to
if (reqDto.getPriceTo() != null) {
if (priceRange == null) {
priceRange = QueryBuilders.rangeQuery("skuInfos.retailPrice").to(reqDto.getPriceTo());
} else {
priceRange.to(reqDto.getPriceTo());
}
}
if (priceRange != null) {
boolQuery.filter(priceRange);
}
RangeQueryBuilder quantityRange = null;
//库存from
if (reqDto.getQuantityFrom() != null) {
quantityRange = QueryBuilders.rangeQuery("inventoryInfos.itemQuantities.quantity").from(reqDto.getQuantityFrom());
}
//库存to
if (reqDto.getQuantityTo() != null) {
if (quantityRange == null) {
quantityRange = QueryBuilders.rangeQuery("inventoryInfos.itemQuantities.quantity").to(reqDto.getQuantityTo());
} else {
quantityRange.to(reqDto.getQuantityTo());
}
}
if (quantityRange != null) {
boolQuery.filter(QueryBuilders.nestedQuery("inventoryInfos.itemQuantities", quantityRange, ScoreMode.None));
}
//价格降幅
Optional.ofNullable(reqDto.getDiscountPercent()).ifPresent(discountPercent -> {
if (discountPercent > 0) {
boolQuery.filter(QueryBuilders.rangeQuery("skuInfos.discount").to((double) discountPercent / -100.0)
.includeLower(true).includeUpper(false));
}
});
//上架时间
Optional.ofNullable(reqDto.getOnSaleTime()).ifPresent(onSaleTime -> {
if (onSaleTime > 0) {
String time = sdf.format(new Date(System.currentTimeMillis() - onSaleTime * 3600000 * 24L));
boolQuery.filter(QueryBuilders.rangeQuery("skuInfos.onlineTime").from(time));
}
});
return true;
}
private Page<ProductSearchRespDto> buildFromSearchResponse(Long shopId, SearchResponse response, Integer pageNum,
Integer pageSize) throws Exception {
Page<ProductSearchRespDto> page = new Page<>();
page.setPageNum(pageNum);
page.setPageSize(pageSize);
if (response != null) {
logger.info("response=" + response.toString());
if (RestStatus.OK.equals(response.status())) {
int length = response.getHits().getHits().length;
if (length > 0) {
//总数
page.setTotalRecord(response.getHits().totalHits);
page.setTotalPage(page.getTotalRecord() / pageSize + (page.getTotalRecord() % pageSize > 0 ? 1 : 0));
Set<Long> warehouseIds = Sets.newHashSet();
Set<Long> providerIds = Sets.newHashSet();
List<Long> productIds = Lists.newArrayListWithCapacity(length);
List<ProductSearchRespDto> data = Lists.newArrayListWithCapacity(length);
for (int i = 0; i < response.getHits().getHits().length; i++) {
ProductSearchRespDto dto = buildProductSearchRespDto(shopId, response.getHits().getHits()[i]);
Optional.ofNullable(dto.getWarehouseLocation()).ifPresent(warehouseLocation ->
Splitter.on(",").omitEmptyStrings().split(dto.getWarehouseLocation()).forEach(warehouseId -> warehouseIds.add(Long.parseLong(warehouseId))));
providerIds.add(dto.getProviderId());
productIds.add(dto.getProductId());
data.add(dto);
}
page.setResults(data);
}
} else {
logger.error("查询商品失败: " + response);
throw new Exception("查询商品失败");
}
}
return page;
}
private ProductSearchRespDto buildProductSearchRespDto(Long shopId, SearchHit searchHit) throws Exception {
ProductIndex productIndex = objectMapper.readValue(searchHit.getSourceAsString(), ProductIndex.class);
ProductSearchRespDto dto = new ProductSearchRespDto();
dto.setProductId(productIndex.getProductId());
dto.setCurrency(productIndex.getCurrency());
dto.setName(productIndex.getProductName());
dto.setSpu(productIndex.getProductModel());
dto.setProviderId(productIndex.getProviderId());
dto.setBrandId(productIndex.getBrandId());
dto.setCategoryId(productIndex.getCategoryId());
if (!CollectionUtils.isEmpty(productIndex.getInventoryInfos())) {
Integer sumQuantity = 0;
Set<Long> warehouseIds = Sets.newHashSet();
for (ProductIndex.InventoryInfo inventoryInfo : productIndex.getInventoryInfos()) {
for (ProductIndex.ItemQuantity itemQuantity : inventoryInfo.getItemQuantities()) {
sumQuantity += itemQuantity.getQuantity();
}
warehouseIds.add(inventoryInfo.getWarehouseId());
}
dto.setQuantity(sumQuantity);
dto.setWarehouseLocation(Joiner.on(",").skipNulls().join(warehouseIds));
}
if (!CollectionUtils.isEmpty(productIndex.getSkuInfos())) {
double minRetailPrice = Double.MAX_VALUE;
double maxRetailPrice = 0.0;
long sumSalesVolume = 0;
int status = 0;
for (ProductIndex.SkuInfo skuInfo : productIndex.getSkuInfos()) {
if (minRetailPrice > skuInfo.getRetailPrice()) {
minRetailPrice = skuInfo.getRetailPrice();
}
if (maxRetailPrice < skuInfo.getRetailPrice()) {
maxRetailPrice = skuInfo.getRetailPrice();
}
sumSalesVolume += skuInfo.getSalesVolume();
if (shopId != null) {
if (skuInfo.getSelectedShops() != null) {
if (skuInfo.getSelectedShops().contains(shopId)) {
status++;
}
}
if (skuInfo.getSelectingShops() != null) {
if (skuInfo.getSelectingShops().contains(shopId)) {
status++;
}
}
}
}
if (shopId != null) {
dto.setStatus(status > 0 ? (status >= productIndex.getSkuInfos().size() ? 2 : 1) : null);
}
dto.setMinRetailPrice(String.valueOf(minRetailPrice));
dto.setMaxRetailPrice(String.valueOf(maxRetailPrice));
dto.setSalesVolume(sumSalesVolume);
}
return dto;
}
@Override
public Map<Integer, Long> priceDiscountPercentCount(ProductSearchReqDto reqDto) throws Exception {
reqDto.setPageNum(null);
reqDto.setPageSize(null);
MultiSearchRequest multiSearchRequest = new MultiSearchRequest();
String[] percentList = discountPercentList.split(",");
Map<Integer, Long> countMap = Maps.newHashMapWithExpectedSize(percentList.length);
for (int i = 0; i < percentList.length; i++) {
Integer from = (i == 0 ? Integer.valueOf(percentList[1]) : null);
Integer to = (i == 0 ? 0 : Integer.valueOf(percentList[i]));
countMap.put(Integer.valueOf(percentList[i]), 0L);
SearchRequest req = buildPriceDiscountPercentCountRequest(reqDto, from, to, i);
Optional.ofNullable(req).ifPresent(multiSearchRequest::add);
}
logger.info("buildPriceDiscountPercentCountRequest multiSearchRequest=" + multiSearchRequest.requests());
if (CollectionUtils.isEmpty(multiSearchRequest.requests())) {
return countMap;
}
MultiSearchResponse multiResponse = restHighLevelClient.multiSearch(multiSearchRequest);
logger.info("priceDiscountPercentCount multiResponse=" + multiResponse.toString());
for (int i = 0; i < multiResponse.getResponses().length; i++) {
MultiSearchResponse.Item item = multiResponse.getResponses()[i];
SearchResponse response = item.getResponse();
if (RestStatus.OK.equals(response.status())) {
for (int j = 0; j < percentList.length; j++) {
Aggregation data = response.getAggregations().getAsMap().get("productId_" + j);
if (data != null) {
countMap.put(Integer.valueOf(percentList[j]), ((ParsedValueCount) data).getValue());
}
}
}
}
return countMap;
}
private SearchRequest buildPriceDiscountPercentCountRequest(ProductSearchReqDto dto, Integer from, Integer to, int index) throws Exception {
SearchSourceBuilder sourceBuilder = new SearchSourceBuilder();
BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
if (!needQuery(dto, boolQuery)) {
return null;
}
RangeQueryBuilder rangeQueryBuilder = QueryBuilders.rangeQuery("skuInfos.discount").includeUpper(true);
Optional.ofNullable(from).ifPresent(df -> rangeQueryBuilder.from(df == 0 ? 0 : df / -100.0));
Optional.ofNullable(to).ifPresent(dt -> rangeQueryBuilder.to(dt == 0 ? 0 : dt / -100.0));
boolQuery.must(rangeQueryBuilder);
sourceBuilder.query(boolQuery);
sourceBuilder.fetchSource(false);
sourceBuilder.size(0);
// sourceBuilder.trackTotalHits(false);
sourceBuilder.aggregation(AggregationBuilders.count("productId_" + index).field("productId"));
logger.info("buildPriceDiscountPercentCountRequest sourceBuilder=" + sourceBuilder.toString());
return new SearchRequest(new String[]{indexName}, sourceBuilder);
}
@Override
public List<SelectingSkuDto> listSelectingSku(List<Long> productIds, Long shopId) throws Exception {
SearchSourceBuilder sb = new SearchSourceBuilder();
sb.query(QueryBuilders.termsQuery("productId", productIds));
//TODO 条数
sb.size(300);
logger.info("listSelectingSku request= " + sb.toString());
SearchResponse response = restHighLevelClient.search(new SearchRequest(new String[]{indexName}, sb));
logger.info("listSelectingSku response= " + response.toString());
if (RestStatus.OK.equals(response.status())) {
int size = response.getHits().getHits().length;
if (size > 0) {
List<SelectingSkuDto> result = Lists.newArrayListWithCapacity(size);
Set<Long> warehouseIds = Sets.newHashSet();
for (int i = 0; i < size; i++) {
result.addAll(buildSelectingSkuDto(shopId, response.getHits().getHits()[i]));
}
Set<Long> providerIds = Sets.newHashSet();
List<Long> skuIds = Lists.newArrayListWithCapacity(result.size());
result.forEach(dto -> {
Splitter.on(",").omitEmptyStrings().split(dto.getWarehouseLocation()).forEach(warehouseId -> warehouseIds.add(Long.parseLong(warehouseId)));
skuIds.add(dto.getSkuId());
providerIds.add(dto.getProviderId());
});
return result;
}
} else {
logger.error("查询失败:" + response);
throw new Exception("查询失败");
}
return null;
}
private List<SelectingSkuDto> buildSelectingSkuDto(Long shopId, SearchHit searchHit) throws IOException {
ProductIndex productIndex = objectMapper.readValue(searchHit.getSourceAsString(), ProductIndex.class);
List<SelectingSkuDto> list = Lists.newArrayListWithCapacity(productIndex.getSkuInfos().size());
productIndex.getSkuInfos().forEach(sku -> {
SelectingSkuDto dto = new SelectingSkuDto();
dto.setName(productIndex.getProductName());
dto.setCurrency(productIndex.getCurrency());
dto.setSpu(productIndex.getProductModel());
dto.setSku(sku.getSku());
dto.setProductId(productIndex.getProductId());
dto.setWarehouseLocation("");
dto.setStatus(0);
if (sku.getSelectingShops() != null) {
if (sku.getSelectingShops().contains(shopId)) {
dto.setStatus(1);
}
}
if (sku.getSelectedShops() != null) {
if (sku.getSelectedShops().contains(shopId)) {
dto.setStatus(1);
}
}
int quantity = 0;
Set<Long> warehouseIds = Sets.newHashSet();
for (ProductIndex.InventoryInfo inventoryInfo : productIndex.getInventoryInfos()) {
for (ProductIndex.ItemQuantity itemQuantity : inventoryInfo.getItemQuantities()) {
if (itemQuantity.getItemId() == sku.getSkuId()) {
quantity += itemQuantity.getQuantity();
warehouseIds.add(inventoryInfo.getWarehouseId());
}
}
}
dto.setWarehouseLocation(Joiner.on(",").skipNulls().join(warehouseIds));
dto.setQuantity(quantity);
dto.setRetailPrice(String.valueOf(sku.getRetailPrice()));
dto.setSkuId(sku.getSkuId());
dto.setProviderId(productIndex.getProviderId());
dto.setCategoryId(productIndex.getCategoryId());
dto.setBrandId(productIndex.getBrandId());
dto.setSalesVolume((long) sku.getSalesVolume());
list.add(dto);
});
return list;
}
@Override
public List<Long> searchProductId(ProductSearchReqDto request) throws Exception {
SearchSourceBuilder sb = buildSearchSourceBuilder(request);
if (sb == null) {
return Collections.emptyList();
}
//只取出productId
sb.fetchSource("productId", "");
SearchRequest searchRequest = new SearchRequest(new String[]{indexName}, sb);
SearchResponse response = restHighLevelClient.search(searchRequest);
logger.info("response = " + response);
List<Long> productIds = Lists.newArrayListWithCapacity(request.getPageSize());
if (RestStatus.OK.equals(response.status())) {
int length = response.getHits().getHits().length;
if (length > 0) {
for (int i = 0; i < response.getHits().getHits().length; i++) {
productIds.add(Long.parseLong(response.getHits().getHits()[i].getSourceAsMap().get("productId").toString()));
}
}
} else {
logger.error("查询商品失败: " + response);
throw new Exception("查询商品失败");
}
return productIds;
}
}
| true
|
404b759839532fd01d488fd5641233e022050a37
|
Java
|
yrashish/geode
|
/geode-core/src/main/java/org/apache/geode/internal/DeployedJar.java
|
UTF-8
| 15,682
| 1.78125
| 2
|
[
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"MIT",
"BSD-2-Clause",
"LicenseRef-scancode-unknown"
] |
permissive
|
/*
* 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.geode.internal;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Properties;
import java.util.function.Predicate;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
import java.util.regex.Pattern;
import java.util.stream.Stream;
import org.apache.commons.collections.CollectionUtils;
import org.apache.logging.log4j.Logger;
import org.apache.geode.annotations.internal.MakeNotStatic;
import org.apache.geode.cache.CacheClosedException;
import org.apache.geode.cache.CacheFactory;
import org.apache.geode.cache.Declarable;
import org.apache.geode.cache.execute.Function;
import org.apache.geode.cache.execute.FunctionService;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.logging.internal.log4j.api.LogService;
import org.apache.geode.management.internal.deployment.FunctionScanner;
import org.apache.geode.pdx.internal.TypeRegistry;
/**
* ClassLoader for a single JAR file.
*
* @since GemFire 7.0
*/
public class DeployedJar {
private static final Logger logger = LogService.getLogger();
@MakeNotStatic("This object gets updated in the production code")
private static final MessageDigest messageDigest = getMessageDigest();
private static final Pattern PATTERN_SLASH = Pattern.compile("/");
private final String artifactId;
private final File file;
private final byte[] md5hash;
private final Collection<Function> registeredFunctions = new ArrayList<>();
private static MessageDigest getMessageDigest() {
try {
return MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException ignored) {
// Failure just means we can't do a simple compare for content equality
}
return null;
}
public File getFile() {
return this.file;
}
public int getVersion() {
return JarDeployer.extractVersionFromFilename(this.file.getName());
}
/**
* Writes the given jarBytes to versionedJarFile
*/
public DeployedJar(File versionedJarFile) {
String artifactId = JarDeployer.toArtifactId(versionedJarFile.getName());
this.file = versionedJarFile;
this.artifactId = artifactId;
if (!hasValidJarContent(versionedJarFile)) {
throw new IllegalArgumentException(
"File does not contain valid JAR content: " + versionedJarFile.getAbsolutePath());
}
byte[] digest = null;
try {
if (messageDigest != null) {
digest = fileDigest(this.file);
}
} catch (IOException e) {
// Ignored
}
this.md5hash = digest;
}
/**
* Peek into the JAR data and make sure that it is valid JAR content.
*
* @param jarFile Jar containing data to be validated.
* @return True if the data has JAR content, false otherwise
*/
public static boolean hasValidJarContent(File jarFile) {
boolean valid = false;
try (FileInputStream fileInputStream = new FileInputStream(jarFile);
JarInputStream jarInputStream = new JarInputStream(fileInputStream)) {
valid = jarInputStream.getNextJarEntry() != null;
} catch (IOException ignore) {
// Ignore this exception and just return false
}
return valid;
}
/**
* Scan the JAR file and attempt to register any function classes found.
*/
public synchronized void registerFunctions() throws ClassNotFoundException {
final boolean isDebugEnabled = logger.isDebugEnabled();
if (isDebugEnabled) {
logger.debug("Registering functions with DeployedJar: {}", this);
}
BufferedInputStream bufferedInputStream;
try {
bufferedInputStream = new BufferedInputStream(new FileInputStream(this.file));
} catch (Exception ex) {
logger.error("Unable to scan jar file for functions");
return;
}
JarInputStream jarInputStream = null;
try {
Collection<String> functionClasses = findFunctionsInThisJar();
jarInputStream = new JarInputStream(bufferedInputStream);
JarEntry jarEntry = jarInputStream.getNextJarEntry();
while (jarEntry != null) {
if (jarEntry.getName().endsWith(".class")) {
final String className = PATTERN_SLASH.matcher(jarEntry.getName()).replaceAll("\\.")
.substring(0, jarEntry.getName().length() - 6);
if (functionClasses.contains(className)) {
if (isDebugEnabled) {
logger.debug("Attempting to load class: {}, from JAR file: {}", jarEntry.getName(),
this.file.getAbsolutePath());
}
try {
Class<?> clazz = ClassPathLoader.getLatest().forName(className);
Collection<Function> registerableFunctions = getRegisterableFunctionsFromClass(clazz);
for (Function function : registerableFunctions) {
FunctionService.registerFunction(function);
if (isDebugEnabled) {
logger.debug("Registering function class: {}, from JAR file: {}", className,
this.file.getAbsolutePath());
}
this.registeredFunctions.add(function);
}
} catch (ClassNotFoundException | NoClassDefFoundError cnfex) {
logger.error("Unable to load all classes from JAR file: {}",
this.file.getAbsolutePath(), cnfex);
throw cnfex;
}
} else {
if (isDebugEnabled) {
logger.debug("No functions found in class: {}, from JAR file: {}", jarEntry.getName(),
this.file.getAbsolutePath());
}
}
}
jarEntry = jarInputStream.getNextJarEntry();
}
} catch (IOException ioex) {
logger.error("Exception when trying to read class from ByteArrayInputStream", ioex);
} finally {
if (jarInputStream != null) {
try {
jarInputStream.close();
} catch (IOException ioex) {
logger.error("Exception attempting to close JAR input stream", ioex);
}
}
try {
bufferedInputStream.close();
} catch (IOException ignore) {
}
}
}
/**
* Unregisters all functions from this jar if it was undeployed (i.e. newVersion == null), or all
* functions not present in the new version if it was redeployed.
*
* @param newVersion The new version of this jar that was deployed, or null if this jar was
* undeployed.
*/
protected synchronized void cleanUp(DeployedJar newVersion) {
Stream<String> oldFunctions = this.registeredFunctions.stream().map(Function::getId);
Stream<String> removedFunctions;
if (newVersion == null) {
removedFunctions = oldFunctions;
} else {
Predicate<String> isRemoved =
(String oldFunctionId) -> !newVersion.hasFunctionWithId(oldFunctionId);
removedFunctions = oldFunctions.filter(isRemoved);
}
removedFunctions.forEach(FunctionService::unregisterFunction);
this.registeredFunctions.clear();
try {
TypeRegistry typeRegistry = ((InternalCache) CacheFactory.getAnyInstance()).getPdxRegistry();
if (typeRegistry != null) {
typeRegistry.flushCache();
}
} catch (CacheClosedException ignored) {
// That's okay, it just means there was nothing to flush to begin with
}
}
/**
* Uses MD5 hashes to determine if the original byte content of this DeployedJar is the same as
* that past in.
*
* @param stagedFile File to compare the original content to
* @return True of the MD5 hash is the same o
*/
boolean hasSameContentAs(final File stagedFile) {
// If the MD5 hash can't be calculated then silently return no match
if (messageDigest == null || this.md5hash == null) {
return false;
}
byte[] compareToMd5;
try {
compareToMd5 = fileDigest(stagedFile);
} catch (IOException ex) {
return false;
}
if (logger.isDebugEnabled()) {
logger.debug("For JAR file: {}, Comparing MD5 hash {} to {}", this.file.getAbsolutePath(),
new String(this.md5hash), new String(compareToMd5));
}
return Arrays.equals(this.md5hash, compareToMd5);
}
private byte[] fileDigest(File file) throws IOException {
BufferedInputStream fis = new BufferedInputStream(new FileInputStream(file));
try {
byte[] data = new byte[8192];
int read;
while ((read = fis.read(data)) > 0) {
messageDigest.update(data, 0, read);
}
} finally {
fis.close();
}
return messageDigest.digest();
}
/**
* Check to see if the class implements the Function interface. If so, it will be registered with
* FunctionService. Also, if the functions's class was originally declared in a cache.xml file
* then any properties specified at that time will be reused when re-registering the function.
*
* @param clazz Class to check for implementation of the Function class
* @return A collection of Objects that implement the Function interface.
*/
private Collection<Function> getRegisterableFunctionsFromClass(Class<?> clazz) {
final List<Function> registerableFunctions = new ArrayList<>();
try {
if (Function.class.isAssignableFrom(clazz) && !Modifier.isAbstract(clazz.getModifiers())) {
boolean registerUninitializedFunction = true;
if (Declarable.class.isAssignableFrom(clazz)) {
try {
InternalCache cache = (InternalCache) CacheFactory.getAnyInstance();
final List<Properties> propertiesList = cache.getDeclarableProperties(clazz.getName());
if (!propertiesList.isEmpty()) {
registerUninitializedFunction = false;
// It's possible that the same function was declared multiple times in cache.xml
// with different properties. So, register the function using each set of
// properties.
for (Properties properties : propertiesList) {
@SuppressWarnings("unchecked")
Function function = newFunction((Class<Function>) clazz, true);
if (function != null) {
((Declarable) function).initialize(cache, properties);
((Declarable) function).init(properties); // for backwards compatibility
if (function.getId() != null) {
registerableFunctions.add(function);
}
}
}
}
} catch (CacheClosedException ignored) {
// That's okay, it just means there were no properties to init the function with
}
}
if (registerUninitializedFunction) {
@SuppressWarnings("unchecked")
Function function = newFunction((Class<Function>) clazz, false);
if (function != null && function.getId() != null) {
registerableFunctions.add(function);
}
}
}
} catch (Exception ex) {
logger.error("Attempting to register function from JAR file: {}", this.file.getAbsolutePath(),
ex);
}
return registerableFunctions;
}
protected Collection<String> findFunctionsInThisJar() throws IOException {
return new FunctionScanner().findFunctionsInJar(this.file);
}
private Function newFunction(final Class<Function> clazz, final boolean errorOnNoSuchMethod) {
try {
final Constructor<Function> constructor = clazz.getConstructor();
return constructor.newInstance();
} catch (NoSuchMethodException nsmex) {
if (errorOnNoSuchMethod) {
logger.error("Zero-arg constructor is required, but not found for class: {}",
clazz.getName(), nsmex);
} else {
if (logger.isDebugEnabled()) {
logger.debug(
"Not registering function because it doesn't have a zero-arg constructor: {}",
clazz.getName());
}
}
} catch (Exception ex) {
logger.error("Error when attempting constructor for function for class: {}", clazz.getName(),
ex);
}
return null;
}
/**
* Get this jar's artifact ID, which is the part of the jar file name that precedes the version
* information.
*
* @return the artifact ID for this jar
*/
public String getArtifactId() {
return this.artifactId;
}
/**
* @return the filename as user deployed, i.e remove the sequence number
*/
public String getDeployedFileName() {
String fileBaseName = JarDeployer.getDeployedFileBaseName(this.file.getName());
if (fileBaseName == null) {
throw new IllegalStateException("file name needs to have a sequence number");
}
return fileBaseName + ".jar";
}
public String getFileCanonicalPath() throws IOException {
return this.file.getCanonicalPath();
}
public URL getFileURL() {
try {
return this.file.toURL();
} catch (MalformedURLException e) {
logger.warn(e);
}
return null;
}
private boolean hasFunctionWithId(String id) {
if (CollectionUtils.isEmpty(this.registeredFunctions)) {
return false;
}
return this.registeredFunctions.stream().map(Function::getId)
.anyMatch(functionId -> functionId.equals(id));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (this.artifactId == null ? 0 : this.artifactId.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
DeployedJar other = (DeployedJar) obj;
if (this.artifactId == null) {
if (other.artifactId != null) {
return false;
}
} else if (!this.artifactId.equals(other.artifactId)) {
return false;
}
return true;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder(getClass().getName());
sb.append('@').append(System.identityHashCode(this)).append('{');
sb.append("artifactId=").append(this.artifactId);
sb.append(",file=").append(this.file.getAbsolutePath());
sb.append(",md5hash=").append(toHex(this.md5hash));
sb.append(",version=").append(this.getVersion());
sb.append('}');
return sb.toString();
}
private String toHex(byte[] data) {
StringBuilder result = new StringBuilder();
for (byte b : data) {
result.append(String.format("%02x", b));
}
return result.toString();
}
}
| true
|
e68a16ae769aa8a8f6c12f6f2fe6065eb6a53f65
|
Java
|
bensen07/SearchTutorial
|
/src/main/java/org/benz/tree/Tree.java
|
UTF-8
| 6,503
| 3.484375
| 3
|
[] |
no_license
|
package org.benz.tree;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import org.benz.common.TreeNode;
public class Tree {
private TreeNode root;
public TreeNode head;
static TreeNode prev;
public TreeNode getRoot() {
return root;
}
public void setRoot(TreeNode root) {
this.root = root;
}
public void insertNode(String key, int value) {
TreeNode node = new TreeNode(key, value);
if (root == null) {
root = node;
} else {
TreeNode temp = root;
TreeNode currentparent = null;
while (temp != null) {
currentparent = temp;
if (value > temp.getValue()) {
temp = temp.getRight();
if (temp == null) {
currentparent.setRight(node);
return;
}
} else if (value < temp.getValue()) {
temp = temp.getLeft();
if (temp == null) {
currentparent.setLeft(node);
return;
}
}
}
}
}
public void printInorderTree(TreeNode node) {
if (null == node) {
return;
}
printInorderTree(node.getLeft());
System.out.println(node.toString());
printInorderTree(node.getRight());
}
public void printpreorderTree(TreeNode node) {
if (null == node) {
return;
}
System.out.println(node.toString());
printpreorderTree(node.getLeft());
printpreorderTree(node.getRight());
}
public void printpostorderTree(TreeNode node) {
if (null == node) {
return;
}
printpostorderTree(node.getLeft());
printpostorderTree(node.getRight());
System.out.println(node.toString());
}
public TreeNode convertTreeToLinkedList(TreeNode node) {
if (node == null)
return node;
if (node.getLeft() != null) {
TreeNode left = convertTreeToLinkedList(node.getLeft());
while (left.getRight() != null) {
left = left.getRight();
}
left.setRight(node);
node.setLeft(left);
}
if (node.getRight() != null) {
TreeNode right = convertTreeToLinkedList(node.getRight());
while (right.getLeft() != null) {
right = right.getLeft();
}
right.setLeft(node);
node.setRight(right);
}
return node;
}
public TreeNode convertToDoubleLinkedList(TreeNode node) {
if (node == null)
return node;
node = convertTreeToLinkedList(node);
while (node.getLeft() != null) {
node = node.getLeft();
}
return node;
}
public TreeNode reverseTreeLinkedList(TreeNode node) {
TreeNode prev = null;
TreeNode current = node;
TreeNode next = null;
while (null != current) {
next = current.getRight();
current.setRight(prev);
prev = current;
current = next;
}
node = prev;
return node;
}
public int maxHeightOfTree(TreeNode node) {
if (node == null) {
return 0;
}
return 1 + Math.max(maxHeightOfTree(node.getLeft()), maxHeightOfTree(node.getRight()));
}
public int minHeightOfTree(TreeNode node) {
if (node == null) {
return 0;
}
return 1 + Math.min(minHeightOfTree(node.getLeft()), minHeightOfTree(node.getRight()));
}
public boolean isBalancedTree(TreeNode root) {
return (maxHeightOfTree(root) - minHeightOfTree(root) <= 1);
}
public int numberOfNodes(TreeNode node) {
if (node == null) {
return 0;
}
return 1 + numberOfNodes(node.getLeft()) + numberOfNodes(node.getRight());
}
// public void recursiveConversionToDLL(TreeNode node) {
// System.out.println("RecConv Node:" + node);
// if (node == null) {
// return;
// }
//
// recursiveConversionToDLL(node.getLeft());
// if (null == prev) {
// head = root;
// } else {
// node.setLeft(prev);
// prev.setRight(node);
// }
//
// prev = node;
//
// recursiveConversionToDLL(node.getRight());
//
// }
void printList(TreeNode node) {
while (node != null) {
System.out.print(node + " -> ");
node = node.getRight();
}
}
void bfs(TreeNode node) {
Queue<TreeNode> q = new LinkedList<TreeNode>();
q.add(node);
System.out.println(node + "->");
while (!q.isEmpty()) {
TreeNode curr = q.remove();
if (null != curr.getLeft()) {
q.add(curr.getLeft());
System.out.println(curr.getLeft() + ",");
}
if (null != curr.getRight()) {
q.add(curr.getRight());
System.out.println(curr.getRight());
}
}
}
void dfs(TreeNode node) {
if (null != node) {
if (null != node.getLeft()) {
dfs(node.getLeft());
}
if (null != node.getRight()) {
dfs(node.getRight());
}
System.out.println(node);
}
return;
}
TreeNode convertArrayToTree(int[] arr, int start, int end) {
if (end < start)
return null;
int middle = (start + end) / 2;
System.out.println("Middle " + middle + " Val:" + arr[middle]);
TreeNode node = new TreeNode("", arr[middle]);
node.setLeft(convertArrayToTree(arr, start, middle - 1));
node.setRight(convertArrayToTree(arr, middle + 1, end));
return node;
}
List<LinkedList<TreeNode>> findLevelLinkList(TreeNode head) {
if (null == head) {
return null;
}
int level = 0;
List<LinkedList<TreeNode>> result = new ArrayList<LinkedList<TreeNode>>();
LinkedList<TreeNode> list = new LinkedList<TreeNode>();
list.add(head);
result.add(level, list);
while (true) {
list = new LinkedList<TreeNode>();
for (int i = 0; i < result.get(level).size(); i++) {
TreeNode n = result.get(level).get(i);
if (n != null) {
if (n.getLeft() != null) {
list.add(n.getLeft());
}
if (n.getRight() != null) {
list.add(n.getRight());
}
}
}
if (list.size() > 0) {
result.add(list);
} else {
break;
}
level++;
}
return result;
}
// public TreeNode inorderSucc(TreeNode node) {
//
// if (node.parent == null || node.getRight() != null) {
// TreeNode n = node.getRight();
// while (n.getLeft() != null) {
// n = n.getLeft();
// }
// return n;
// }else {
// while(TreeNode p = node.parent !=null) {
// if(p.getLeft() == node) {
// break;
// }
// node = p;
// }
// }
// return p;
//
// }
private boolean covers(TreeNode root, TreeNode p) {
if (null == root) {
return false;
}
if (root == p) {
return true;
}
return covers(root.getLeft(), p) || covers(root.getRight(), p);
}
public TreeNode commonAncestor(TreeNode root, TreeNode p, TreeNode q) {
if (root == null) {
return null;
}
if (covers(root.getLeft(), p) && covers(root.getLeft(), q)) {
return commonAncestor(root.getLeft(), p, q);
}
if (covers(root.getRight(), p) && covers(root.getRight(), q)) {
return commonAncestor(root.getRight(), p, q);
}
return root;
}
}
| true
|
9cec8b65aa780fe2834817a423a343eee80e3996
|
Java
|
kirapythia/pythia-backend
|
/pythia-backend/src/main/java/fi/espoo/pythia/backend/mappers/PrjVal2ToPrjMapper.java
|
UTF-8
| 2,010
| 2.34375
| 2
|
[
"MIT"
] |
permissive
|
package fi.espoo.pythia.backend.mappers;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import fi.espoo.pythia.backend.repos.entities.Project;
import fi.espoo.pythia.backend.repos.entities.SisterProject;
import fi.espoo.pythia.backend.transfer.ProjectValue2;
public class PrjVal2ToPrjMapper {
public static Project projectValue2ToProject(ProjectValue2 pv, Project project) {
// LocalDateTime ZoneOffset
// current data
Project p = new Project();
p.setProjectId(pv.getProjectId());
p.setHansuProjectId(pv.getHansuProjectId());
p.setMainNo(pv.getMainNo());
p.setName(pv.getName());
p.setDescription(pv.getDescription());
p.setCompleted(pv.isCompleted());
if(p.getCreatedAt().isEqual(null)){
p.setCreatedAt(OffsetDateTime.now());
}
p.setCreatedBy(pv.getCreatedBy());
p.setUpdatedAt(OffsetDateTime.now());
p.setUpdatedBy(pv.getUpdatedBy());
// try {
// List<Plan> plans = new ArrayList();
// for (PlanValue pp : pv.getPlans()) {
// plans.add(PlanValueToPlanMapper.planValueToPlan(pp, p));
// }
// p.setPlans(plans);
// } catch (java.lang.NullPointerException e) {
// p.setPlans(new ArrayList<Plan>());
// }
try {
p.setSisterProjects(project.getSisterProjects());
} catch (java.lang.NullPointerException e) {
p.setSisterProjects(new ArrayList<SisterProject>());
}
// try {
// List<SisterProject> sProjects = project.getSisterProjects();
//
// for (int i = 0; i < pv.getSisterProjects().size(); i++) {
// System.out.println("pvgetsisterprojectid" +
// pv.getSisterProjects().get(i));
// sProjects.get(i).setSisterProjectId(pv.getSisterProjects().get(i));
// }
// p.setSisterProjects(sProjects);
// } catch (java.lang.NullPointerException e) {
// p.setSisterProjects(project.getSisterProjects());
// } catch (java.lang.IndexOutOfBoundsException e) {
// p.setSisterProjects(project.getSisterProjects());
// }
return p;
}
}
| true
|
e3a1231c7d4ff478fc89a3745779e50b3e38a246
|
Java
|
kangsukyung/todaysroom_JSP_PROJECT
|
/kosta1200/src/kosta1200/todayroom/mapper/ProductInquiryMapper.java
|
UTF-8
| 345
| 1.859375
| 2
|
[] |
no_license
|
package kosta1200.todayroom.mapper;
import java.util.List;
import kosta1200.todayroom.vo.Product_inquiryVO;
public interface ProductInquiryMapper {
int insertProductInquiry(Product_inquiryVO product_inquiryVO);
List<Product_inquiryVO> listProductInquiry();
int insertProductInquiryAnswer(Product_inquiryVO product_inquiryVO);
}
| true
|
381316c31cf56578560f212db1a98df530215242
|
Java
|
Streamduo/healthcare
|
/app/src/main/java/com/sxy/healthcare/home/fragment/OtherFragment.java
|
UTF-8
| 419
| 1.734375
| 2
|
[] |
no_license
|
package com.sxy.healthcare.home.fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import com.sxy.healthcare.R;
import com.sxy.healthcare.base.BaseFragment;
public class OtherFragment extends BaseFragment {
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fragment_other);
}
}
| true
|
a2b8ac3e1358a4e3b59a36004b65a271c4e14c28
|
Java
|
chinasixth/HadoopDemo
|
/src/main/java/com/hmdu/bigdata/hdfsapi/HdfsClient.java
|
UTF-8
| 1,477
| 2.484375
| 2
|
[] |
no_license
|
package com.hmdu.bigdata.hdfsapi;
import com.hmdu.bigdata.FSUtil.FSUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.log4j.Logger;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
public class HdfsClient {
public static Logger logger = Logger.getLogger(HdfsClient.class);
public static FileSystem fs = null;
/*
* 静态代码块封装公共代码部分
* */
static {
// 获取配置对象
Configuration conf = new Configuration();
try {
fs = FileSystem.get(new URI("hdfs://192.168.216.115:9000"), conf, "root");
} catch (IOException e) {
logger.error(e.getMessage());
} catch (InterruptedException e) {
logger.error(e.getMessage());
} catch (URISyntaxException e) {
logger.error(e.getMessage());
}
}
/*
* 批量上传文件
* */
public static void main(String[] args) {
Path[] srcs = {
new Path("E:\\hadoopdata\\test01.txt"),
new Path("E:\\hadoopdata\\test02.txt"),
new Path("E:\\hadoopdata\\shell多线程.txt")
};
try {
fs.copyFromLocalFile(false, true, srcs, new Path("/"));
} catch (IOException e) {
logger.error(e.getMessage());
}
FSUtils.close(fs);
}
}
| true
|
fc245d4107b9183b620c443c8214a935f64db80d
|
Java
|
DineshShende/ProjectXDataJPA
|
/src/main/java/com/projectx/data/domain/test/TestChildId.java
|
UTF-8
| 2,368
| 2.359375
| 2
|
[] |
no_license
|
package com.projectx.data.domain.test;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
//@Embeddable
public class TestChildId implements Serializable{
@OneToOne
@JoinColumn(name="TESTPARENTID")
private TestParent testParentId;
@Column(name="TESTTYPE")
private Integer testType;
@Column(name="ENTITYTYPE")
private Integer entityType;
public TestChildId() {
super();
}
public TestChildId(TestParent testParentId, Integer testType,
Integer entityType) {
super();
this.testParentId = testParentId;
this.testType = testType;
this.entityType = entityType;
}
public TestParent getTestParentId() {
return testParentId;
}
public void setTestParentId(TestParent testParentId) {
this.testParentId = testParentId;
}
public Integer getTestType() {
return testType;
}
public void setTestType(Integer testType) {
this.testType = testType;
}
public Integer getEntityType() {
return entityType;
}
public void setEntityType(Integer entityType) {
this.entityType = entityType;
}
@Override
public String toString() {
return "TestChildId [testParentId=" + testParentId + ", testType="
+ testType + ", entityType=" + entityType + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((entityType == null) ? 0 : entityType.hashCode());
result = prime * result
+ ((testParentId == null) ? 0 : testParentId.hashCode());
result = prime * result
+ ((testType == null) ? 0 : testType.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
TestChildId other = (TestChildId) obj;
if (entityType == null) {
if (other.entityType != null)
return false;
} else if (!entityType.equals(other.entityType))
return false;
if (testParentId == null) {
if (other.testParentId != null)
return false;
} else if (!testParentId.equals(other.testParentId))
return false;
if (testType == null) {
if (other.testType != null)
return false;
} else if (!testType.equals(other.testType))
return false;
return true;
}
}
| true
|
3ee928f5cf6461a567cead5c464dd2d6473370b1
|
Java
|
Gomiyux/Applet-Creation-Java
|
/src/cola_canvas_v0/Cola_lenta.java
|
UTF-8
| 3,076
| 3.46875
| 3
|
[] |
no_license
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package cola_canvas_v0;
/**
*
* @author pedro
*/
public class Cola_lenta implements ICola {
protected int tail, head, capacidad, numelementos;
protected Object datos[];
CanvasCola canvas;
/**
* Constructor de la clase. Inicializa la cola y los atributos de la clase.
*
* @param capacidad que será la cantidad de elementos con que se inicializa
* el vector
*
*/
public Cola_lenta(int capacidad, CanvasCola elcanvas) {
datos = new Object[capacidad];
this.capacidad = capacidad;
numelementos = 0;
tail = 0;
head = 0;
canvas=elcanvas;
}
/**
* Devuelve el número de elementos que hay en la cola
*
* @return numelementos
*/
@Override
public int GetNum() {
return numelementos;
}
/**
* Añade el elemento a la cola si no está llena
*
* @param elemento que se desea acolar
* @throws Exception si la cola está llena
*/
@Override
public synchronized void Acola(Object elemento) throws Exception {
if (!colallena()) {
datos[tail] = elemento;
Thread.sleep(10);
tail = (tail + 1) % capacidad;
Thread.sleep(10);
numelementos++;
canvas.representa(datos, tail, head, numelementos);
} else {
canvas.avisa(1);
throw new Exception("COLA LLENA");
}
}
/**
* Extrae el primer elemento de la cola si existe
*
* @return elemento que se extrae
* @throws Exception si la cola está vacia
*/
@Override
public synchronized Object Desacola() throws Exception {
if (!colavacia()) {
Object valor = datos[head];
Thread.sleep(10);
head = (head + 1) % capacidad;
Thread.sleep(10);
numelementos--;
canvas.representa(datos, tail, head, numelementos);
return valor;
} else {
canvas.avisa(2);
throw new Exception("COLA VACIA");
}
}
/**
* Devuelve el primer elemento de la cola sin extraerlo
*
* @return elemento que está el primero en la cola
* @throws Exception si la cola está vacia
*/
@Override
public Object Primero() throws Exception {
if (!colavacia()) {
return datos[head];
} else {
throw new Exception("cola vacia");
}
}
/**
* Comprueba si la cola está vacia
*
* @return cierto o falso
*/
private boolean colavacia() {
if (numelementos == 0) {
return true;
} else {
return false;
}
}
/**
* Comprueba si la cola está llena
*
* @return cierto o falso
*/
private boolean colallena() {
if (numelementos == capacidad) {
return true;
} else {
return false;
}
}
}
| true
|
38f265b8ff529402b717c3b76f387971343264ab
|
Java
|
nays111/kimpd
|
/src/main/java/com/clnine/kimpd/src/Web/report/ReportController.java
|
UTF-8
| 2,461
| 2.03125
| 2
|
[] |
no_license
|
package com.clnine.kimpd.src.Web.report;
import com.clnine.kimpd.config.BaseException;
import com.clnine.kimpd.config.BaseResponse;
import com.clnine.kimpd.src.Web.report.models.GetReportCategoryRes;
import com.clnine.kimpd.src.Web.report.models.PostReportReq;
import com.clnine.kimpd.utils.JwtService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import static com.clnine.kimpd.config.BaseResponseStatus.*;
@RestController
@CrossOrigin
@RequiredArgsConstructor
public class ReportController {
private final ReportProvider reportProvider;
private final JwtService jwtService;
private final ReportService reportService;
@ResponseBody
@GetMapping("/report-categories")
@Operation(summary = "신고유형 카테고리 조회 API")
public BaseResponse<List<GetReportCategoryRes>> getReportCategories()throws BaseException {
List<GetReportCategoryRes> getReportCategoryResList;
try{
int userIdx = jwtService.getUserIdx();
getReportCategoryResList = reportProvider.getReportCategory();
return new BaseResponse<>(SUCCESS,getReportCategoryResList);
}catch(BaseException exception){
return new BaseResponse<>(exception.getStatus());
}
}
@ResponseBody
@PostMapping("/castings/{userIdx}/reports")
@Operation(summary = "신고하기 API",description = "토큰이 필요합니다.")
public BaseResponse<String> postReport(@PathVariable(required = true,value="userIdx")int reportedUserIdx,
@RequestBody PostReportReq postReportReq){
if(postReportReq.getReportDescription()==null || postReportReq.getReportDescription().length()==0){
return new BaseResponse<>(EMPTY_REPORT_DESCRIPTION);
}
if(postReportReq.getReportCategoryIdx()==null){
return new BaseResponse<>(EMPTY_REPORT_CATEGORY);
}
try{
int reporterUserIdx = jwtService.getUserIdx();
reportService.postReport(reporterUserIdx,reportedUserIdx,postReportReq);
reportService.deleteUserByReport(reportedUserIdx);
return new BaseResponse<>(SUCCESS);
}catch(BaseException exception){
return new BaseResponse<>(exception.getStatus());
}
}
}
| true
|
de96d59206dc06a00126b3490d98804bf6843735
|
Java
|
jeqo/talk-observing-distributed-systems
|
/hello-world-monolith/src/main/java/io/github/jeqo/demo/HelloWorldMonolithApp.java
|
UTF-8
| 1,518
| 2.375
| 2
|
[
"MIT"
] |
permissive
|
package io.github.jeqo.demo;
import io.dropwizard.Application;
import io.dropwizard.Configuration;
import io.dropwizard.setup.Environment;
import io.github.jeqo.demo.domain.TranslationService;
import io.github.jeqo.demo.rest.GreetingResource;
import io.prometheus.client.CollectorRegistry;
import io.prometheus.client.dropwizard.DropwizardExports;
import io.prometheus.client.exporter.MetricsServlet;
/**
* Hello Monolith Application to explain applications that all services are part of the same
* application.
*/
public class HelloWorldMonolithApp extends Application<Configuration> {
public static void main(String[] args) throws Exception {
new HelloWorldMonolithApp().run(args);
}
@Override
public void run(Configuration configuration, Environment environment) throws Exception {
// Preparing Translation Service
final TranslationService translationService = new TranslationService();
// Preparing Greeting Service and inject Translation
final GreetingResource greetingService = new GreetingResource(translationService);
// Register Greeting Service
environment.jersey().register(greetingService);
// Add Metrics Instrumentation to count requests
final CollectorRegistry collectorRegistry = new CollectorRegistry();
collectorRegistry.register(new DropwizardExports(environment.metrics()));
// Register Metrics Servlet
environment.admin()
.addServlet("metrics", new MetricsServlet(collectorRegistry))
.addMapping("/metrics");
}
}
| true
|
afe21f6052975d682c155c0cd698a4b22b6e1714
|
Java
|
OnhkimKilav/findMeProject
|
/src/main/java/com/findme/dao/userDAO/UserDAOLoggingImpl.java
|
UTF-8
| 1,095
| 2.4375
| 2
|
[] |
no_license
|
package com.findme.dao.userDAO;
import com.findme.model.User;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Repository;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import javax.transaction.Transactional;
@Repository
@Transactional
@Scope(proxyMode = ScopedProxyMode.TARGET_CLASS)
public class UserDAOLoggingImpl implements IUserDAOLogging {
@PersistenceContext
private EntityManager entityManager;
@Override
public User checkLogIn(String email, String password) {
Query query = entityManager.createNativeQuery("SELECT * FROM USERS WHERE EMAIL = ? AND PASSWORD = ?", User.class)
.setParameter(1, email)
.setParameter(2, password);
query.executeUpdate();
try {
return (User) query.getSingleResult();
} catch (NoResultException e) {
return null;
}
}
}
| true
|
7445bf7dff4df3635ea74146843a6afcabd567a5
|
Java
|
Endyxd/CSC116
|
/Notepad++/position.java
|
UTF-8
| 789
| 3.5
| 4
|
[] |
no_license
|
import java.util.Scanner;
public class position{
public static int input(){
System.out.print("Enter in the time from 1-4: ");
Scanner input = new Scanner(System.in);
int in = input.nextInt();
input.close();
if (in>4){
System.out.println("Okay I am just going to assume you meant 4");
in = 4;
}
if (in<1){
System.out.println("Okay I am going to assume you meant 1");
in = 1;
}
return in;
}
public static void main(String[] args){
int a = -32;
int v = 48;
int s = 0;
double fin;
int t;
t = input();
//System.out.println(t);
fin = (s + (v*t)+(1/2)*(a)*(Math.pow(t,2)));
System.out.println("The number gotten out of this was: " + fin);
System.out.println("Restart to try another number :)");
}
}
| true
|
13cc853a60a3405c93603c0fa97da594524e64f1
|
Java
|
ponvel2k4/Retail-Billing-System
|
/src/main/java/com/retail/billing/domain/Product.java
|
UTF-8
| 1,100
| 3.0625
| 3
|
[] |
no_license
|
package com.retail.billing.domain;
/**
*
* @author ponvel
*
*/
public class Product {
private String productName;
private int quantity;
private double price;
private ProductCategory category;
private double totalCost;
public Product(String productName, int quantity, double price,
ProductCategory category) {
super();
this.productName = productName;
this.quantity = quantity;
this.price = price;
this.category = category;
this.totalCost = price * quantity;
}
public String getProductName() {
return productName;
}
public int getQuantity() {
return quantity;
}
public ProductCategory getCategory() {
return category;
}
public double getPrice() {
return price;
}
/**
* Method to get the discounted price
*
* @param product
* @param discountPercentage
* @return
*/
public double getDiscountedPrice(Product product, double discountPercentage) {
if (product.getCategory().name() == ProductCategory.OTHERS.name()
&& discountPercentage != 0) {
return (totalCost - totalCost * discountPercentage / 100);
}
return totalCost;
}
}
| true
|
5f6aa34ed81afd11a000871c9473269662f56113
|
Java
|
hxy1753911686/springBootStudy
|
/springBoot_mybatis/src/main/java/org/spring/springboot/controller/CityController.java
|
UTF-8
| 2,810
| 2.375
| 2
|
[] |
no_license
|
package org.spring.springboot.controller;
import org.spring.springboot.entity.City;
import org.spring.springboot.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
//@RestController 如果要跳頁面,必須用Controller
@Controller
public class CityController {
@Autowired
private CityService cityService;
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String gotoIndex(Model model) {
List<City> list = cityService.findAllCity();
model.addAttribute("cityList", list);
return "/showCity";
}
@RequestMapping(value = "/findOneCity", method = RequestMethod.GET)
public City findOneCity(@RequestParam(value = "cityName", required = true) String cityName) {
return cityService.findByName(cityName);
}
@RequestMapping(value = "addCity", method = RequestMethod.POST)
public String addNewCity(HashMap<String, Object> map) {
return "/addCity";
}
@RequestMapping(value = "saveCity", method = RequestMethod.POST)
public String saveCity(@ModelAttribute City city) {
cityService.saveCity(city);
return "/addCity";
}
@RequestMapping(value = "findCity", method = RequestMethod.POST)
public String findCityById(@RequestParam(value = "cityId") Long cityId, Model model) {
List<City> list = new ArrayList<City>();
if (cityId != null) {
City city = cityService.findCityById(cityId);
list.add(city);
} else {
list = cityService.findAllCity();
}
model.addAttribute("cityList", list);
return "/showCity";
}
@RequestMapping(value = "deleteCity/{id}", method = RequestMethod.POST)
public String deleteCityById(@PathVariable("id") Long cityId, Model model) {
cityService.deleteCity(cityId);
List<City> list = cityService.findAllCity();
model.addAttribute("cityList", list);
return "/showCity";
}
@RequestMapping(value = "updateCity/{id}", method = RequestMethod.POST)
public String toUpdateCity(@PathVariable("id") Long cityId, Model model) {
City city = cityService.findCityById(cityId);
model.addAttribute("city", city);
return "/updateCity";
}
@RequestMapping(value = "updateCity", method = RequestMethod.POST)
public String updateCity(@ModelAttribute City city, Model model) {
cityService.updateCity(city);
List<City> list = cityService.findAllCity();
model.addAttribute("cityList", list);
return "/showCity";
}
}
| true
|
0e783effea7fe159a810ee4f856b8d64fab4e4e6
|
Java
|
Viola0417/Evaluation-website
|
/src/util/DbUtil.java
|
GB18030
| 1,872
| 2.8125
| 3
|
[] |
no_license
|
package util;
import java.sql.*;
/*
public class DbUtil {
private static Connection connection=null;
static {
try {
//1.
Class.forName("com.mysql.cj.jdbc.Driver");
//2.ݿ
//jdbc:mysql://localhost:3306/testloc?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
connection = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/test_system?serverTimezone" +
"=Asia/Shanghai&characterEncoding=utf-8&useSSL=false", "root", "970417jly");
System.out.println("ݿѳɹ");
} catch(ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static Connection getConnection() {
return connection;
}
}
*/
public class DbUtil {
static Connection con;
//ȡļ
public static Connection getConnection(){
String driver = "com.mysql.cj.jdbc.Driver";
try {
//ݿ
Class.forName(driver);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
//ݿ
con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/test_system?serverTimezone" +
"=Asia/Shanghai&characterEncoding=utf-8&useSSL=false", "root", "970417jly");
System.out.println("ݿѳɹ");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return con;
}
/*
public static Connection getConnection() {
return con;
}
*/
}
| true
|
a95a639c645e36672dbaed0b92d00fa65542f906
|
Java
|
mumudong/mumu
|
/hadoop/kafka/kafka-connect-kafka/src/main/java/org/yc/kafka/indexer/utils/KafkaOffsetUtils.java
|
UTF-8
| 5,606
| 2.25
| 2
|
[] |
no_license
|
package org.yc.kafka.indexer.utils;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.RetryUntilElapsed;
import org.codehaus.jackson.map.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.ImmutableMap;
import kafka.api.PartitionOffsetRequestInfo;
import kafka.cluster.Broker;
import kafka.common.TopicAndPartition;
import kafka.javaapi.OffsetRequest;
import kafka.javaapi.OffsetResponse;
import kafka.javaapi.PartitionMetadata;
import kafka.javaapi.TopicMetadata;
import kafka.javaapi.TopicMetadataRequest;
import kafka.javaapi.TopicMetadataResponse;
import kafka.javaapi.consumer.SimpleConsumer;
public class KafkaOffsetUtils {
private static final Logger logger = LoggerFactory.getLogger(KafkaOffsetUtils.class);
private static ObjectMapper objectMapper = new ObjectMapper();
//zk path to save kafka offset ,eg: "/consumers/[groupId]/offsets/[topic]/[partitionId]" => long (offset)
public static final String OFFSET_ZK_PATH = "/consumers/%s/offsets/%s";
public static Map<TopicAndPartition,Long> getConsumerOffsets(String zkServers, String groupID, String topic) {
Map<TopicAndPartition,Long> retVals = new HashMap<TopicAndPartition,Long>();
CuratorFramework curatorFramework = CuratorFrameworkFactory.builder()
.connectString(zkServers).connectionTimeoutMs(1000)
.sessionTimeoutMs(10000).retryPolicy(new RetryUntilElapsed(5000, 1000)).build();
curatorFramework.start();
try{
String nodePath = String.format(OFFSET_ZK_PATH, groupID, topic);
if(curatorFramework.checkExists().forPath(nodePath)!=null){
List<String> partitions=curatorFramework.getChildren().forPath(nodePath);
for(String partiton:partitions){
int partitionL=Integer.valueOf(partiton);
Long offset=objectMapper.readValue(curatorFramework.getData().forPath(nodePath+"/"+partiton),Long.class);
TopicAndPartition topicAndPartition=new TopicAndPartition(topic,partitionL);
retVals.put(topicAndPartition, offset);
}
}
}catch(Exception e){
logger.error(String.format("get offsets error,topic:%s, group:%s",topic,groupID),e);
}
curatorFramework.close();
return retVals;
}
public static Map<TopicAndPartition, Long> getTopicOffsets(String brokers, String topic) {
Map<TopicAndPartition, Long> retVals = new HashMap<TopicAndPartition, Long>();
for (String broker : brokers.split(",")) {
SimpleConsumer simpleConsumer = new SimpleConsumer(broker.split(":")[0], Integer.valueOf(broker.split(":")[1]), 10000, 1024, "consumer");
TopicMetadataRequest topicMetadataRequest = new TopicMetadataRequest(Arrays.asList(topic));
TopicMetadataResponse topicMetadataResponse = simpleConsumer.send(topicMetadataRequest);
for (TopicMetadata metadata : topicMetadataResponse.topicsMetadata()) {
for (PartitionMetadata part : metadata.partitionsMetadata()) {
Broker leader = part.leader();
if (leader != null) {
TopicAndPartition topicAndPartition = new TopicAndPartition(topic, part.partitionId());
PartitionOffsetRequestInfo partitionOffsetRequestInfo = new PartitionOffsetRequestInfo(kafka.api.OffsetRequest.LatestTime(), 10000);
OffsetRequest offsetRequest = new OffsetRequest(ImmutableMap.of(topicAndPartition, partitionOffsetRequestInfo),
kafka.api.OffsetRequest.CurrentVersion(), simpleConsumer.clientId());
OffsetResponse offsetResponse = simpleConsumer.getOffsetsBefore(offsetRequest);
if (!offsetResponse.hasError()) {
long[] offsets = offsetResponse.offsets(topic, part.partitionId());
retVals.put(topicAndPartition, offsets[0]);
}
}
}
}
simpleConsumer.close();
}
return retVals;
}
// import org.apache.spark.streaming.kafka.OffsetRange;
// public static void saveOffsets(String zkServers, String topic, String group, OffsetRange[] offsetRanges) {
// ObjectMapper objectMapper = new ObjectMapper();
// CuratorFramework curatorFramework = null;
// try{
// curatorFramework = CuratorFrameworkFactory.builder()
// .connectString(zkServers).connectionTimeoutMs(1000)
// .sessionTimeoutMs(10000).retryPolicy(new RetryUntilElapsed(5000, 1000)).build();
//
// curatorFramework.start();
// }catch (Exception e) {
// logger.error("connect to zk error",e);
// return;
// }
// for (OffsetRange offsetRange : offsetRanges) {
// try {
// byte[] offsetBytes = objectMapper.writeValueAsBytes(offsetRange.untilOffset());
// String nodePath = String.format(OFFSET_ZK_PATH, group, topic)+ "/" + offsetRange.partition();
// if(curatorFramework.checkExists().forPath(nodePath)!=null){
// curatorFramework.setData().forPath(nodePath,offsetBytes);
// }else{
// curatorFramework.create().creatingParentsIfNeeded().forPath(nodePath, offsetBytes);
// }
// }catch (Exception e) {
// String msg = String.format("save offset error,topic:%s,group:%s,partition:%s,offset:%s", topic,group,offsetRange.partition(),offsetRange.untilOffset());
// logger.error(msg,e);
// }
// }
// curatorFramework.close();
// }
}
| true
|
0f2fbfb40ce90846a4cfc9cfbbbe7a7cc072c31b
|
Java
|
thetobber/psec-demo
|
/src/main/java/chat/mou/events/ReadEvent.java
|
UTF-8
| 336
| 1.992188
| 2
|
[] |
no_license
|
package chat.mou.events;
import org.springframework.context.ApplicationEvent;
public class ReadEvent extends ApplicationEvent
{
private final byte[] body;
public ReadEvent(Object source, byte[] body)
{
super(source);
this.body = body;
}
public byte[] getBody()
{
return body;
}
}
| true
|
0a33b33c0ac3dcf22dd81f76937ad2e4b7a34f67
|
Java
|
eeKunev/test
|
/Test.java
|
UTF-8
| 317
| 2.203125
| 2
|
[] |
no_license
|
package fmi.informatics.comparators.JUnitTest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class Test {
@org.junit.Test
public void test() {
HelperTest t = new HelperTest();
assertTrue(t.i == 5);
assertEquals("t ne e \"4\"","4",t.j);
}
}
| true
|
bc62bcb5607cae13b9e0f9e07b97ce6782f08314
|
Java
|
bakeyevrus/rhino
|
/backend/src/main/java/cz/cvut/fel/bakeyevrus/rhino/handler/GraphHandler.java
|
UTF-8
| 3,549
| 2.1875
| 2
|
[] |
no_license
|
package cz.cvut.fel.bakeyevrus.rhino.handler;
import cz.cvut.fel.bakeyevrus.rhino.dto.GraphDto;
import cz.cvut.fel.bakeyevrus.rhino.exception.UnauthorizedException;
import cz.cvut.fel.bakeyevrus.rhino.service.ProjectService;
import cz.cvut.fel.bakeyevrus.rhino.validation.RequestBodyValidator;
import cz.cvut.fel.bakeyevrus.rhino.validation.RestAction;
import lombok.extern.log4j.Log4j2;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import org.springframework.web.server.ServerWebInputException;
import reactor.core.publisher.Mono;
import java.util.function.Function;
@Log4j2
@Component
public class GraphHandler {
private final ProjectService projectService;
private final RequestBodyValidator validator;
public GraphHandler(ProjectService graphService, RequestBodyValidator validator) {
this.projectService = graphService;
this.validator = validator;
}
public Mono<ServerResponse> createGraph(ServerRequest request) {
String projectId = request.pathVariable("projectId");
return request.bodyToMono(GraphDto.class)
.doOnNext(graphDto -> validator.validate(graphDto, RestAction.Create.class))
.flatMap(graphDto -> projectService.createGraph(graphDto, projectId))
.flatMap(graphDto -> ServerResponse.ok().syncBody(graphDto))
.switchIfEmpty(ServerResponse.notFound().build())
.transform(handleErrors);
}
public Mono<ServerResponse> deleteGraph(ServerRequest request) {
String projectId = request.pathVariable("projectId");
String graphId = request.pathVariable("graphId");
return projectService.deleteGraph(projectId, graphId)
.flatMap(isGraphDeleted -> isGraphDeleted ? ServerResponse.ok().build() : ServerResponse.notFound().build())
.transform(handleErrors);
}
public Mono<ServerResponse> updateGraph(ServerRequest request) {
String projectId = request.pathVariable("projectId");
String graphId = request.pathVariable("graphId");
return request.bodyToMono(GraphDto.class)
.doOnNext(graphDto -> validator.validate(graphDto, RestAction.Update.class))
.transform(matchIds(graphId))
.flatMap(graphDto -> projectService.updateGraph(graphDto, projectId))
.flatMap(graphDto -> ServerResponse.ok().syncBody(graphDto))
.switchIfEmpty(ServerResponse.notFound().build())
.transform(handleErrors);
}
private final Function<Mono<ServerResponse>, Mono<ServerResponse>> handleErrors =
f -> f.onErrorResume(
ServerWebInputException.class,
err -> {
log.info(err.getMessage());
return ServerResponse.badRequest().build();
})
.onErrorResume(
UnauthorizedException.class,
err -> ServerResponse.status(HttpStatus.UNAUTHORIZED).build()
);
private Function<Mono<GraphDto>, Mono<GraphDto>> matchIds(String urlGraphId) {
return f -> f.filter(graphDto -> urlGraphId.equals(graphDto.getId()))
.switchIfEmpty(Mono.error(new ServerWebInputException("URL id and Graph id doesn't match")));
}
}
| true
|
356a0bfbd36f72476d801c8cffc32ba380b921a7
|
Java
|
Lan2010/GitLib
|
/mining/wakuang-app/code/app-api/src/main/java/com/tianzhixing/app/common/AreaConfig.java
|
UTF-8
| 213,051
| 2.359375
| 2
|
[] |
no_license
|
package com.tianzhixing.app.common;
import java.util.HashMap;
import java.util.Map;
public class AreaConfig {
public static Map<String, String> AREA = new HashMap<String, String>();
static {
AREA.put("140202", "山西省大同市城区");
AREA.put("140203", "山西省大同市矿区");
AREA.put("140211", "山西省大同市南郊区");
AREA.put("140212", "山西省大同市新荣区");
AREA.put("140221", "山西省大同市阳高县");
AREA.put("140222", "山西省大同市天镇县");
AREA.put("140223", "山西省大同市广灵县");
AREA.put("140224", "山西省大同市灵丘县");
AREA.put("140225", "山西省大同市浑源县");
AREA.put("140226", "山西省大同市左云县");
AREA.put("140227", "山西省大同市大同县");
AREA.put("140300", "山西省阳泉市");
AREA.put("140301", "山西省阳泉市");
AREA.put("140302", "山西省阳泉市城区");
AREA.put("140303", "山西省阳泉市矿区");
AREA.put("140311", "山西省阳泉市郊区");
AREA.put("140321", "山西省阳泉市平定县");
AREA.put("140322", "山西省阳泉市盂县");
AREA.put("140400", "山西省长治市");
AREA.put("140401", "山西省长治市");
AREA.put("140402", "山西省长治市城区");
AREA.put("140411", "山西省长治市郊区");
AREA.put("140421", "山西省长治市长治县");
AREA.put("140423", "山西省长治市襄垣县");
AREA.put("140424", "山西省长治市屯留县");
AREA.put("140425", "山西省长治市平顺县");
AREA.put("140426", "山西省长治市黎城县");
AREA.put("140427", "山西省长治市壶关县");
AREA.put("140428", "山西省长治市长子县");
AREA.put("140429", "山西省长治市武乡县");
AREA.put("140430", "山西省长治市沁县");
AREA.put("140431", "山西省长治市沁源县");
AREA.put("140481", "山西省长治市潞城市");
AREA.put("140500", "山西省晋城市");
AREA.put("140501", "山西省晋城市");
AREA.put("140502", "山西省晋城市城区");
AREA.put("140521", "山西省晋城市沁水县");
AREA.put("140522", "山西省晋城市阳城县");
AREA.put("140524", "山西省晋城市陵川县");
AREA.put("140525", "山西省晋城市泽州县");
AREA.put("140581", "山西省晋城市高平市");
AREA.put("140600", "山西省朔州市");
AREA.put("140601", "山西省朔州市");
AREA.put("140602", "山西省朔州市朔城区");
AREA.put("140603", "山西省朔州市平鲁区");
AREA.put("140621", "山西省朔州市山阴县");
AREA.put("140622", "山西省朔州市应县");
AREA.put("140623", "山西省朔州市右玉县");
AREA.put("140624", "山西省朔州市怀仁县");
AREA.put("140700", "山西省晋中市");
AREA.put("140701", "山西省晋中市");
AREA.put("140702", "山西省晋中市榆次区");
AREA.put("140721", "山西省晋中市榆社县");
AREA.put("140722", "山西省晋中市左权县");
AREA.put("140723", "山西省晋中市和顺县");
AREA.put("140724", "山西省晋中市昔阳县");
AREA.put("140725", "山西省晋中市寿阳县");
AREA.put("140726", "山西省晋中市太谷县");
AREA.put("140727", "山西省晋中市祁县");
AREA.put("140728", "山西省晋中市平遥县");
AREA.put("140729", "山西省晋中市灵石县");
AREA.put("140781", "山西省晋中市介休市");
AREA.put("140800", "山西省运城市");
AREA.put("130531", "河北省邢台市广宗县");
AREA.put("130532", "河北省邢台市平乡县");
AREA.put("130533", "河北省邢台市威县");
AREA.put("130534", "河北省邢台市清河县");
AREA.put("130535", "河北省邢台市临西县");
AREA.put("130581", "河北省邢台市南宫市");
AREA.put("130582", "河北省邢台市沙河市");
AREA.put("130600", "河北省保定市");
AREA.put("130601", "河北省保定市");
AREA.put("130602", "河北省保定市新市区");
AREA.put("130603", "河北省保定市北市区");
AREA.put("130604", "河北省保定市南市区");
AREA.put("130621", "河北省保定市满城县");
AREA.put("130622", "河北省保定市清苑县");
AREA.put("130623", "河北省保定市涞水县");
AREA.put("130624", "河北省保定市阜平县");
AREA.put("130625", "河北省保定市徐水县");
AREA.put("130626", "河北省保定市定兴县");
AREA.put("130627", "河北省保定市唐县");
AREA.put("130628", "河北省保定市高阳县");
AREA.put("130629", "河北省保定市容城县");
AREA.put("130630", "河北省保定市涞源县");
AREA.put("130631", "河北省保定市望都县");
AREA.put("130632", "河北省保定市安新县");
AREA.put("130633", "河北省保定市易县");
AREA.put("130634", "河北省保定市曲阳县");
AREA.put("130635", "河北省保定市蠡县");
AREA.put("130636", "河北省保定市顺平县");
AREA.put("130637", "河北省保定市博野县");
AREA.put("130638", "河北省保定市雄县");
AREA.put("130681", "河北省保定市涿州市");
AREA.put("130682", "河北省保定市定州市");
AREA.put("130683", "河北省保定市安国市");
AREA.put("130684", "河北省保定市高碑店市");
AREA.put("130700", "河北省张家口市");
AREA.put("130701", "河北省张家口市");
AREA.put("130702", "河北省张家口市桥东区");
AREA.put("130703", "河北省张家口市桥西区");
AREA.put("130705", "河北省张家口市宣化区");
AREA.put("130706", "河北省张家口市下花园区");
AREA.put("130721", "河北省张家口市宣化县");
AREA.put("130722", "河北省张家口市张北县");
AREA.put("130723", "河北省张家口市康保县");
AREA.put("130724", "河北省张家口市沽源县");
AREA.put("130725", "河北省张家口市尚义县");
AREA.put("130726", "河北省张家口市蔚县");
AREA.put("130727", "河北省张家口市阳原县");
AREA.put("130728", "河北省张家口市怀安县");
AREA.put("130729", "河北省张家口市万全县");
AREA.put("130730", "河北省张家口市怀来县");
AREA.put("130731", "河北省张家口市涿鹿县");
AREA.put("130732", "河北省张家口市赤城县");
AREA.put("130733", "河北省张家口市崇礼县");
AREA.put("130800", "河北省承德市");
AREA.put("130801", "河北省承德市");
AREA.put("130802", "河北省承德市双桥区");
AREA.put("130803", "河北省承德市双滦区");
AREA.put("130804", "河北省承德市鹰手营子矿区");
AREA.put("130821", "河北省承德市承德县");
AREA.put("130822", "河北省承德市兴隆县");
AREA.put("130823", "河北省承德市平泉县");
AREA.put("130824", "河北省承德市滦平县");
AREA.put("110000", "北京市");
AREA.put("110100", "北京市");
AREA.put("110101", "北京市东城区");
AREA.put("110102", "北京市西城区");
AREA.put("110103", "北京市崇文区");
AREA.put("110104", "北京市宣武区");
AREA.put("110105", "北京市朝阳区");
AREA.put("110106", "北京市丰台区");
AREA.put("110107", "北京市石景山区");
AREA.put("110108", "北京市海淀区");
AREA.put("110109", "北京市门头沟区");
AREA.put("110111", "北京市房山区");
AREA.put("110112", "北京市通州区");
AREA.put("110113", "北京市顺义区");
AREA.put("110114", "北京市昌平区");
AREA.put("110115", "北京市大兴区");
AREA.put("110116", "北京市怀柔区");
AREA.put("110117", "北京市平谷区");
AREA.put("110200", "北京市");
AREA.put("110228", "北京市密云县");
AREA.put("110229", "北京市延庆县");
AREA.put("120000", "天津市");
AREA.put("120100", "天津市");
AREA.put("120101", "天津市和平区");
AREA.put("120102", "天津市河东区");
AREA.put("120103", "天津市河西区");
AREA.put("120104", "天津市南开区");
AREA.put("120105", "天津市河北区");
AREA.put("120106", "天津市红桥区");
AREA.put("120107", "天津市塘沽区");
AREA.put("120108", "天津市汉沽区");
AREA.put("120109", "天津市大港区");
AREA.put("120110", "天津市东丽区");
AREA.put("120111", "天津市西青区");
AREA.put("120112", "天津市津南区");
AREA.put("120113", "天津市北辰区");
AREA.put("120114", "天津市武清区");
AREA.put("120115", "天津市宝坻区");
AREA.put("120200", "天津市");
AREA.put("120221", "天津市宁河县");
AREA.put("120223", "天津市静海县");
AREA.put("120225", "天津市蓟县");
AREA.put("130000", "河北省");
AREA.put("130100", "河北省石家庄市");
AREA.put("130101", "河北省石家庄市");
AREA.put("130102", "河北省石家庄市长安区");
AREA.put("130103", "河北省石家庄市桥东区");
AREA.put("130104", "河北省石家庄市桥西区");
AREA.put("130105", "河北省石家庄市新华区");
AREA.put("130107", "河北省石家庄市井陉矿区");
AREA.put("130108", "河北省石家庄市裕华区");
AREA.put("130121", "河北省石家庄市井陉县");
AREA.put("130123", "河北省石家庄市正定县");
AREA.put("130124", "河北省石家庄市栾城县");
AREA.put("130125", "河北省石家庄市行唐县");
AREA.put("130126", "河北省石家庄市灵寿县");
AREA.put("130127", "河北省石家庄市高邑县");
AREA.put("130128", "河北省石家庄市深泽县");
AREA.put("130129", "河北省石家庄市赞皇县");
AREA.put("130130", "河北省石家庄市无极县");
AREA.put("130131", "河北省石家庄市平山县");
AREA.put("130132", "河北省石家庄市元氏县");
AREA.put("130133", "河北省石家庄市赵县");
AREA.put("130181", "河北省石家庄市辛集市");
AREA.put("130182", "河北省石家庄市藁城市");
AREA.put("130183", "河北省石家庄市晋州市");
AREA.put("130825", "河北省承德市隆化县");
AREA.put("130826", "河北省承德市丰宁满族自治县");
AREA.put("130827", "河北省承德市宽城满族自治县");
AREA.put("130828", "河北省承德市围场满族蒙古族自治县");
AREA.put("130900", "河北省沧州市");
AREA.put("130901", "河北省沧州市");
AREA.put("130902", "河北省沧州市新华区");
AREA.put("130903", "河北省沧州市运河区");
AREA.put("130921", "河北省沧州市沧县");
AREA.put("130922", "河北省沧州市青县");
AREA.put("130923", "河北省沧州市东光县");
AREA.put("130924", "河北省沧州市海兴县");
AREA.put("130925", "河北省沧州市盐山县");
AREA.put("130926", "河北省沧州市肃宁县");
AREA.put("130927", "河北省沧州市南皮县");
AREA.put("130928", "河北省沧州市吴桥县");
AREA.put("130929", "河北省沧州市献县");
AREA.put("130930", "河北省沧州市孟村回族自治县");
AREA.put("130981", "河北省沧州市泊头市");
AREA.put("130982", "河北省沧州市任丘市");
AREA.put("130983", "河北省沧州市黄骅市");
AREA.put("130984", "河北省沧州市河间市");
AREA.put("131000", "河北省廊坊市");
AREA.put("131001", "河北省廊坊市");
AREA.put("131002", "河北省廊坊市安次区");
AREA.put("131003", "河北省廊坊市广阳区");
AREA.put("131022", "河北省廊坊市固安县");
AREA.put("131023", "河北省廊坊市永清县");
AREA.put("131024", "河北省廊坊市香河县");
AREA.put("131025", "河北省廊坊市大城县");
AREA.put("131026", "河北省廊坊市文安县");
AREA.put("131028", "河北省廊坊市大厂回族自治县");
AREA.put("131081", "河北省廊坊市霸州市");
AREA.put("131082", "河北省廊坊市三河市");
AREA.put("131100", "河北省衡水市");
AREA.put("131101", "河北省衡水市");
AREA.put("131102", "河北省衡水市桃城区");
AREA.put("131121", "河北省衡水市枣强县");
AREA.put("131122", "河北省衡水市武邑县");
AREA.put("131123", "河北省衡水市武强县");
AREA.put("131124", "河北省衡水市饶阳县");
AREA.put("131125", "河北省衡水市安平县");
AREA.put("131126", "河北省衡水市故城县");
AREA.put("131127", "河北省衡水市景县");
AREA.put("131128", "河北省衡水市阜城县");
AREA.put("131181", "河北省衡水市冀州市");
AREA.put("131182", "河北省衡水市深州市");
AREA.put("140000", "山西省");
AREA.put("140100", "山西省太原市");
AREA.put("140101", "山西省太原市");
AREA.put("140105", "山西省太原市小店区");
AREA.put("140106", "山西省太原市迎泽区");
AREA.put("140107", "山西省太原市杏花岭区");
AREA.put("140108", "山西省太原市尖草坪区");
AREA.put("140109", "山西省太原市万柏林区");
AREA.put("140110", "山西省太原市晋源区");
AREA.put("140121", "山西省太原市清徐县");
AREA.put("140122", "山西省太原市阳曲县");
AREA.put("140123", "山西省太原市娄烦县");
AREA.put("140181", "山西省太原市古交市");
AREA.put("140200", "山西省大同市");
AREA.put("140201", "山西省大同市");
AREA.put("130184", "河北省石家庄市新乐市");
AREA.put("130185", "河北省石家庄市鹿泉市");
AREA.put("130200", "河北省唐山市");
AREA.put("130201", "河北省唐山市");
AREA.put("130202", "河北省唐山市路南区");
AREA.put("130203", "河北省唐山市路北区");
AREA.put("130204", "河北省唐山市古冶区");
AREA.put("130205", "河北省唐山市开平区");
AREA.put("130207", "河北省唐山市丰南区");
AREA.put("130208", "河北省唐山市丰润区");
AREA.put("130223", "河北省唐山市滦县");
AREA.put("130224", "河北省唐山市滦南县");
AREA.put("130225", "河北省唐山市乐亭县");
AREA.put("130227", "河北省唐山市迁西县");
AREA.put("130229", "河北省唐山市玉田县");
AREA.put("130230", "河北省唐山市唐海县");
AREA.put("130281", "河北省唐山市遵化市");
AREA.put("130283", "河北省唐山市迁安市");
AREA.put("130300", "河北省秦皇岛市");
AREA.put("130301", "河北省秦皇岛市");
AREA.put("130302", "河北省秦皇岛市海港区");
AREA.put("130303", "河北省秦皇岛市山海关区");
AREA.put("130304", "河北省秦皇岛市北戴河区");
AREA.put("130321", "河北省秦皇岛市青龙满族自治县");
AREA.put("130322", "河北省秦皇岛市昌黎县");
AREA.put("130323", "河北省秦皇岛市抚宁县");
AREA.put("130324", "河北省秦皇岛市卢龙县");
AREA.put("130400", "河北省邯郸市");
AREA.put("130401", "河北省邯郸市");
AREA.put("130402", "河北省邯郸市邯山区");
AREA.put("130403", "河北省邯郸市丛台区");
AREA.put("130404", "河北省邯郸市复兴区");
AREA.put("130406", "河北省邯郸市峰峰矿区");
AREA.put("130421", "河北省邯郸市邯郸县");
AREA.put("130423", "河北省邯郸市临漳县");
AREA.put("130424", "河北省邯郸市成安县");
AREA.put("130425", "河北省邯郸市大名县");
AREA.put("130426", "河北省邯郸市涉县");
AREA.put("130427", "河北省邯郸市磁县");
AREA.put("130428", "河北省邯郸市肥乡县");
AREA.put("130429", "河北省邯郸市永年县");
AREA.put("130430", "河北省邯郸市邱县");
AREA.put("130431", "河北省邯郸市鸡泽县");
AREA.put("130432", "河北省邯郸市广平县");
AREA.put("130433", "河北省邯郸市馆陶县");
AREA.put("130434", "河北省邯郸市魏县");
AREA.put("130435", "河北省邯郸市曲周县");
AREA.put("130481", "河北省邯郸市武安市");
AREA.put("130500", "河北省邢台市");
AREA.put("130501", "河北省邢台市");
AREA.put("130502", "河北省邢台市桥东区");
AREA.put("130503", "河北省邢台市桥西区");
AREA.put("130521", "河北省邢台市邢台县");
AREA.put("130522", "河北省邢台市临城县");
AREA.put("130523", "河北省邢台市内丘县");
AREA.put("130524", "河北省邢台市柏乡县");
AREA.put("130525", "河北省邢台市隆尧县");
AREA.put("130526", "河北省邢台市任县");
AREA.put("130527", "河北省邢台市南和县");
AREA.put("130528", "河北省邢台市宁晋县");
AREA.put("130529", "河北省邢台市巨鹿县");
AREA.put("130530", "河北省邢台市新河县");
AREA.put("230183", "黑龙江省哈尔滨市尚志市");
AREA.put("230184", "黑龙江省哈尔滨市五常市");
AREA.put("230200", "黑龙江省齐齐哈尔市");
AREA.put("230201", "黑龙江省齐齐哈尔市");
AREA.put("230202", "黑龙江省齐齐哈尔市龙沙区");
AREA.put("230203", "黑龙江省齐齐哈尔市建华区");
AREA.put("230204", "黑龙江省齐齐哈尔市铁锋区");
AREA.put("230205", "黑龙江省齐齐哈尔市昂昂溪区");
AREA.put("230206", "黑龙江省齐齐哈尔市富拉尔基区");
AREA.put("230207", "黑龙江省齐齐哈尔市碾子山区");
AREA.put("230208", "黑龙江省齐齐哈尔市梅里斯达斡尔族区");
AREA.put("230221", "黑龙江省齐齐哈尔市龙江县");
AREA.put("230223", "黑龙江省齐齐哈尔市依安县");
AREA.put("230224", "黑龙江省齐齐哈尔市泰来县");
AREA.put("230225", "黑龙江省齐齐哈尔市甘南县");
AREA.put("230227", "黑龙江省齐齐哈尔市富裕县");
AREA.put("230229", "黑龙江省齐齐哈尔市克山县");
AREA.put("230230", "黑龙江省齐齐哈尔市克东县");
AREA.put("230231", "黑龙江省齐齐哈尔市拜泉县");
AREA.put("230281", "黑龙江省齐齐哈尔市讷河市");
AREA.put("230300", "黑龙江省鸡西市");
AREA.put("230301", "黑龙江省鸡西市");
AREA.put("230302", "黑龙江省鸡西市鸡冠区");
AREA.put("230303", "黑龙江省鸡西市恒山区");
AREA.put("230304", "黑龙江省鸡西市滴道区");
AREA.put("230305", "黑龙江省鸡西市梨树区");
AREA.put("230306", "黑龙江省鸡西市城子河区");
AREA.put("230307", "黑龙江省鸡西市麻山区");
AREA.put("230321", "黑龙江省鸡西市鸡东县");
AREA.put("230381", "黑龙江省鸡西市虎林市");
AREA.put("230382", "黑龙江省鸡西市密山市");
AREA.put("230400", "黑龙江省鹤岗市");
AREA.put("230401", "黑龙江省鹤岗市");
AREA.put("230402", "黑龙江省鹤岗市向阳区");
AREA.put("230403", "黑龙江省鹤岗市工农区");
AREA.put("230404", "黑龙江省鹤岗市南山区");
AREA.put("230405", "黑龙江省鹤岗市兴安区");
AREA.put("230406", "黑龙江省鹤岗市东山区");
AREA.put("230407", "黑龙江省鹤岗市兴山区");
AREA.put("230421", "黑龙江省鹤岗市萝北县");
AREA.put("230422", "黑龙江省鹤岗市绥滨县");
AREA.put("230500", "黑龙江省双鸭山市");
AREA.put("230501", "黑龙江省双鸭山市");
AREA.put("230502", "黑龙江省双鸭山市尖山区");
AREA.put("230503", "黑龙江省双鸭山市岭东区");
AREA.put("230505", "黑龙江省双鸭山市四方台区");
AREA.put("230506", "黑龙江省双鸭山市宝山区");
AREA.put("230521", "黑龙江省双鸭山市集贤县");
AREA.put("230522", "黑龙江省双鸭山市友谊县");
AREA.put("230523", "黑龙江省双鸭山市宝清县");
AREA.put("230524", "黑龙江省双鸭山市饶河县");
AREA.put("230600", "黑龙江省大庆市");
AREA.put("230601", "黑龙江省大庆市");
AREA.put("230602", "黑龙江省大庆市萨尔图区");
AREA.put("150927", "内蒙古自治区乌兰察布市察哈尔右翼中旗");
AREA.put("150928", "内蒙古自治区乌兰察布市察哈尔右翼后旗");
AREA.put("150929", "内蒙古自治区乌兰察布市四子王旗");
AREA.put("150981", "内蒙古自治区乌兰察布市丰镇市");
AREA.put("152200", "内蒙古自治区兴安盟");
AREA.put("152201", "内蒙古自治区兴安盟乌兰浩特市");
AREA.put("152202", "内蒙古自治区兴安盟阿尔山市");
AREA.put("152221", "内蒙古自治区兴安盟科尔沁右翼前旗");
AREA.put("152222", "内蒙古自治区兴安盟科尔沁右翼中旗");
AREA.put("152223", "内蒙古自治区兴安盟扎赉特旗");
AREA.put("152224", "内蒙古自治区兴安盟突泉县");
AREA.put("152500", "内蒙古自治区锡林郭勒盟");
AREA.put("152501", "内蒙古自治区锡林郭勒盟二连浩特市");
AREA.put("152502", "内蒙古自治区锡林郭勒盟锡林浩特市");
AREA.put("152522", "内蒙古自治区锡林郭勒盟阿巴嘎旗");
AREA.put("211221", "辽宁省铁岭市铁岭县");
AREA.put("211223", "辽宁省铁岭市西丰县");
AREA.put("211224", "辽宁省铁岭市昌图县");
AREA.put("211281", "辽宁省铁岭市调兵山市");
AREA.put("211282", "辽宁省铁岭市开原市");
AREA.put("211300", "辽宁省朝阳市");
AREA.put("211301", "辽宁省朝阳市");
AREA.put("211302", "辽宁省朝阳市双塔区");
AREA.put("211303", "辽宁省朝阳市龙城区");
AREA.put("211321", "辽宁省朝阳市朝阳县");
AREA.put("211322", "辽宁省朝阳市建平县");
AREA.put("211324", "辽宁省朝阳市喀喇沁左翼蒙古族自治县");
AREA.put("211381", "辽宁省朝阳市北票市");
AREA.put("211382", "辽宁省朝阳市凌源市");
AREA.put("211400", "辽宁省葫芦岛市");
AREA.put("211401", "辽宁省葫芦岛市");
AREA.put("211402", "辽宁省葫芦岛市连山区");
AREA.put("211403", "辽宁省葫芦岛市龙港区");
AREA.put("211404", "辽宁省葫芦岛市南票区");
AREA.put("211421", "辽宁省葫芦岛市绥中县");
AREA.put("211422", "辽宁省葫芦岛市建昌县");
AREA.put("211481", "辽宁省葫芦岛市兴城市");
AREA.put("220000", "吉林省");
AREA.put("220100", "吉林省长春市");
AREA.put("220101", "吉林省长春市");
AREA.put("220102", "吉林省长春市南关区");
AREA.put("220103", "吉林省长春市宽城区");
AREA.put("220104", "吉林省长春市朝阳区");
AREA.put("220105", "吉林省长春市二道区");
AREA.put("220106", "吉林省长春市绿园区");
AREA.put("220112", "吉林省长春市双阳区");
AREA.put("220122", "吉林省长春市农安县");
AREA.put("220181", "吉林省长春市九台市");
AREA.put("220182", "吉林省长春市榆树市");
AREA.put("220183", "吉林省长春市德惠市");
AREA.put("220200", "吉林省吉林市");
AREA.put("220201", "吉林省吉林市");
AREA.put("220202", "吉林省吉林市昌邑区");
AREA.put("220203", "吉林省吉林市龙潭区");
AREA.put("220204", "吉林省吉林市船营区");
AREA.put("220211", "吉林省吉林市丰满区");
AREA.put("220221", "吉林省吉林市永吉县");
AREA.put("220281", "吉林省吉林市蛟河市");
AREA.put("220282", "吉林省吉林市桦甸市");
AREA.put("220283", "吉林省吉林市舒兰市");
AREA.put("220284", "吉林省吉林市磐石市");
AREA.put("220300", "吉林省四平市");
AREA.put("220301", "吉林省四平市");
AREA.put("220302", "吉林省四平市铁西区");
AREA.put("220303", "吉林省四平市铁东区");
AREA.put("220322", "吉林省四平市梨树县");
AREA.put("220323", "吉林省四平市伊通满族自治县");
AREA.put("220381", "吉林省四平市公主岭市");
AREA.put("220382", "吉林省四平市双辽市");
AREA.put("220400", "吉林省辽源市");
AREA.put("220401", "吉林省辽源市");
AREA.put("220402", "吉林省辽源市龙山区");
AREA.put("220403", "吉林省辽源市西安区");
AREA.put("220421", "吉林省辽源市东丰县");
AREA.put("220422", "吉林省辽源市东辽县");
AREA.put("220500", "吉林省通化市");
AREA.put("210500", "辽宁省本溪市");
AREA.put("150000", "内蒙古自治区");
AREA.put("150100", "内蒙古自治区呼和浩特市");
AREA.put("150101", "内蒙古自治区呼和浩特市");
AREA.put("150102", "内蒙古自治区呼和浩特市新城区");
AREA.put("150103", "内蒙古自治区呼和浩特市回民区");
AREA.put("150104", "内蒙古自治区呼和浩特市玉泉区");
AREA.put("150105", "内蒙古自治区呼和浩特市赛罕区");
AREA.put("150121", "内蒙古自治区呼和浩特市土默特左旗");
AREA.put("150122", "内蒙古自治区呼和浩特市托克托县");
AREA.put("150123", "内蒙古自治区呼和浩特市和林格尔县");
AREA.put("150124", "内蒙古自治区呼和浩特市清水河县");
AREA.put("150125", "内蒙古自治区呼和浩特市武川县");
AREA.put("150200", "内蒙古自治区包头市");
AREA.put("150201", "内蒙古自治区包头市");
AREA.put("150202", "内蒙古自治区包头市东河区");
AREA.put("150203", "内蒙古自治区包头市昆都仑区");
AREA.put("150204", "内蒙古自治区包头市青山区");
AREA.put("150205", "内蒙古自治区包头市石拐区");
AREA.put("150206", "内蒙古自治区包头市白云矿区");
AREA.put("150207", "内蒙古自治区包头市九原区");
AREA.put("150221", "内蒙古自治区包头市土默特右旗");
AREA.put("150222", "内蒙古自治区包头市固阳县");
AREA.put("150223", "内蒙古自治区包头市达尔罕茂明安联合旗");
AREA.put("150300", "内蒙古自治区乌海市");
AREA.put("150301", "内蒙古自治区乌海市");
AREA.put("150302", "内蒙古自治区乌海市海勃湾区");
AREA.put("150303", "内蒙古自治区乌海市海南区");
AREA.put("150304", "内蒙古自治区乌海市乌达区");
AREA.put("150400", "内蒙古自治区赤峰市");
AREA.put("150401", "内蒙古自治区赤峰市");
AREA.put("150402", "内蒙古自治区赤峰市红山区");
AREA.put("150403", "内蒙古自治区赤峰市元宝山区");
AREA.put("150404", "内蒙古自治区赤峰市松山区");
AREA.put("150421", "内蒙古自治区赤峰市阿鲁科尔沁旗");
AREA.put("150422", "内蒙古自治区赤峰市巴林左旗");
AREA.put("150423", "内蒙古自治区赤峰市巴林右旗");
AREA.put("150424", "内蒙古自治区赤峰市林西县");
AREA.put("150425", "内蒙古自治区赤峰市克什克腾旗");
AREA.put("150426", "内蒙古自治区赤峰市翁牛特旗");
AREA.put("150428", "内蒙古自治区赤峰市喀喇沁旗");
AREA.put("150429", "内蒙古自治区赤峰市宁城县");
AREA.put("150430", "内蒙古自治区赤峰市敖汉旗");
AREA.put("150500", "内蒙古自治区通辽市");
AREA.put("150501", "内蒙古自治区通辽市");
AREA.put("150502", "内蒙古自治区通辽市科尔沁区");
AREA.put("150521", "内蒙古自治区通辽市科尔沁左翼中旗");
AREA.put("150522", "内蒙古自治区通辽市科尔沁左翼后旗");
AREA.put("150523", "内蒙古自治区通辽市开鲁县");
AREA.put("150524", "内蒙古自治区通辽市库伦旗");
AREA.put("150525", "内蒙古自治区通辽市奈曼旗");
AREA.put("150526", "内蒙古自治区通辽市扎鲁特旗");
AREA.put("150581", "内蒙古自治区通辽市霍林郭勒市");
AREA.put("150600", "内蒙古自治区鄂尔多斯市");
AREA.put("150602", "内蒙古自治区鄂尔多斯市东胜区");
AREA.put("150621", "内蒙古自治区鄂尔多斯市达拉特旗");
AREA.put("330122", "浙江省杭州市桐庐县");
AREA.put("140801", "山西省运城市");
AREA.put("140802", "山西省运城市盐湖区");
AREA.put("140821", "山西省运城市临猗县");
AREA.put("140822", "山西省运城市万荣县");
AREA.put("140823", "山西省运城市闻喜县");
AREA.put("140824", "山西省运城市稷山县");
AREA.put("140825", "山西省运城市新绛县");
AREA.put("140826", "山西省运城市绛县");
AREA.put("140827", "山西省运城市垣曲县");
AREA.put("140828", "山西省运城市夏县");
AREA.put("140829", "山西省运城市平陆县");
AREA.put("140830", "山西省运城市芮城县");
AREA.put("140881", "山西省运城市永济市");
AREA.put("140882", "山西省运城市河津市");
AREA.put("140900", "山西省忻州市");
AREA.put("140901", "山西省忻州市");
AREA.put("140902", "山西省忻州市忻府区");
AREA.put("140921", "山西省忻州市定襄县");
AREA.put("140922", "山西省忻州市五台县");
AREA.put("140923", "山西省忻州市代县");
AREA.put("140924", "山西省忻州市繁峙县");
AREA.put("140925", "山西省忻州市宁武县");
AREA.put("140926", "山西省忻州市静乐县");
AREA.put("140927", "山西省忻州市神池县");
AREA.put("140928", "山西省忻州市五寨县");
AREA.put("140929", "山西省忻州市岢岚县");
AREA.put("140930", "山西省忻州市河曲县");
AREA.put("140931", "山西省忻州市保德县");
AREA.put("140932", "山西省忻州市偏关县");
AREA.put("140981", "山西省忻州市原平市");
AREA.put("141000", "山西省临汾市");
AREA.put("141001", "山西省临汾市");
AREA.put("141002", "山西省临汾市尧都区");
AREA.put("141021", "山西省临汾市曲沃县");
AREA.put("141022", "山西省临汾市翼城县");
AREA.put("141023", "山西省临汾市襄汾县");
AREA.put("141024", "山西省临汾市洪洞县");
AREA.put("141025", "山西省临汾市古县");
AREA.put("141026", "山西省临汾市安泽县");
AREA.put("141027", "山西省临汾市浮山县");
AREA.put("141028", "山西省临汾市吉县");
AREA.put("141029", "山西省临汾市乡宁县");
AREA.put("141030", "山西省临汾市大宁县");
AREA.put("141031", "山西省临汾市隰县");
AREA.put("141032", "山西省临汾市永和县");
AREA.put("141033", "山西省临汾市蒲县");
AREA.put("141034", "山西省临汾市汾西县");
AREA.put("141081", "山西省临汾市侯马市");
AREA.put("141082", "山西省临汾市霍州市");
AREA.put("141100", "山西省吕梁市");
AREA.put("141101", "山西省吕梁市");
AREA.put("141102", "山西省吕梁市离石区");
AREA.put("141121", "山西省吕梁市文水县");
AREA.put("141122", "山西省吕梁市交城县");
AREA.put("141123", "山西省吕梁市兴县");
AREA.put("141124", "山西省吕梁市临县");
AREA.put("141125", "山西省吕梁市柳林县");
AREA.put("141126", "山西省吕梁市石楼县");
AREA.put("141127", "山西省吕梁市岚县");
AREA.put("141128", "山西省吕梁市方山县");
AREA.put("141129", "山西省吕梁市中阳县");
AREA.put("141130", "山西省吕梁市交口县");
AREA.put("141181", "山西省吕梁市孝义市");
AREA.put("210501", "辽宁省本溪市");
AREA.put("210502", "辽宁省本溪市平山区");
AREA.put("210503", "辽宁省本溪市溪湖区");
AREA.put("210504", "辽宁省本溪市明山区");
AREA.put("210505", "辽宁省本溪市南芬区");
AREA.put("210521", "辽宁省本溪市本溪满族自治县");
AREA.put("210522", "辽宁省本溪市桓仁满族自治县");
AREA.put("210600", "辽宁省丹东市");
AREA.put("210601", "辽宁省丹东市");
AREA.put("210602", "辽宁省丹东市元宝区");
AREA.put("210603", "辽宁省丹东市振兴区");
AREA.put("210604", "辽宁省丹东市振安区");
AREA.put("210624", "辽宁省丹东市宽甸满族自治县");
AREA.put("210681", "辽宁省丹东市东港市");
AREA.put("210682", "辽宁省丹东市凤城市");
AREA.put("210700", "辽宁省锦州市");
AREA.put("210701", "辽宁省锦州市");
AREA.put("210702", "辽宁省锦州市古塔区");
AREA.put("210703", "辽宁省锦州市凌河区");
AREA.put("210711", "辽宁省锦州市太和区");
AREA.put("210726", "辽宁省锦州市黑山县");
AREA.put("210727", "辽宁省锦州市义县");
AREA.put("210781", "辽宁省锦州市凌海市");
AREA.put("210782", "辽宁省锦州市北宁市");
AREA.put("210800", "辽宁省营口市");
AREA.put("210801", "辽宁省营口市");
AREA.put("210802", "辽宁省营口市站前区");
AREA.put("210803", "辽宁省营口市西市区");
AREA.put("210804", "辽宁省营口市鲅鱼圈区");
AREA.put("210811", "辽宁省营口市老边区");
AREA.put("210881", "辽宁省营口市盖州市");
AREA.put("210882", "辽宁省营口市大石桥市");
AREA.put("210900", "辽宁省阜新市");
AREA.put("210901", "辽宁省阜新市");
AREA.put("210902", "辽宁省阜新市海州区");
AREA.put("210903", "辽宁省阜新市新邱区");
AREA.put("210904", "辽宁省阜新市太平区");
AREA.put("210905", "辽宁省阜新市清河门区");
AREA.put("210911", "辽宁省阜新市细河区");
AREA.put("210921", "辽宁省阜新市阜新蒙古族自治县");
AREA.put("210922", "辽宁省阜新市彰武县");
AREA.put("211000", "辽宁省辽阳市");
AREA.put("211001", "辽宁省辽阳市");
AREA.put("211002", "辽宁省辽阳市白塔区");
AREA.put("211003", "辽宁省辽阳市文圣区");
AREA.put("211004", "辽宁省辽阳市宏伟区");
AREA.put("211005", "辽宁省辽阳市弓长岭区");
AREA.put("211011", "辽宁省辽阳市太子河区");
AREA.put("211021", "辽宁省辽阳市辽阳县");
AREA.put("211081", "辽宁省辽阳市灯塔市");
AREA.put("211100", "辽宁省盘锦市");
AREA.put("211101", "辽宁省盘锦市");
AREA.put("211102", "辽宁省盘锦市双台子区");
AREA.put("211103", "辽宁省盘锦市兴隆台区");
AREA.put("211121", "辽宁省盘锦市大洼县");
AREA.put("211122", "辽宁省盘锦市盘山县");
AREA.put("211200", "辽宁省铁岭市");
AREA.put("211201", "辽宁省铁岭市");
AREA.put("150601", "内蒙古自治区鄂尔多斯市");
AREA.put("321300", "江苏省宿迁市");
AREA.put("321301", "江苏省宿迁市");
AREA.put("321302", "江苏省宿迁市宿城区");
AREA.put("321311", "江苏省宿迁市宿豫区");
AREA.put("321322", "江苏省宿迁市沭阳县");
AREA.put("321323", "江苏省宿迁市泗阳县");
AREA.put("321324", "江苏省宿迁市泗洪县");
AREA.put("330000", "浙江省");
AREA.put("330100", "浙江省杭州市");
AREA.put("330101", "浙江省杭州市");
AREA.put("330102", "浙江省杭州市上城区");
AREA.put("330103", "浙江省杭州市下城区");
AREA.put("330104", "浙江省杭州市江干区");
AREA.put("330105", "浙江省杭州市拱墅区");
AREA.put("330106", "浙江省杭州市西湖区");
AREA.put("330108", "浙江省杭州市滨江区");
AREA.put("330109", "浙江省杭州市萧山区");
AREA.put("330110", "浙江省杭州市余杭区");
AREA.put("340303", "安徽省蚌埠市蚌山区");
AREA.put("330782", "浙江省金华市义乌市");
AREA.put("330783", "浙江省金华市东阳市");
AREA.put("330784", "浙江省金华市永康市");
AREA.put("330800", "浙江省衢州市");
AREA.put("330801", "浙江省衢州市");
AREA.put("330802", "浙江省衢州市柯城区");
AREA.put("330803", "浙江省衢州市衢江区");
AREA.put("330822", "浙江省衢州市常山县");
AREA.put("330824", "浙江省衢州市开化县");
AREA.put("330825", "浙江省衢州市龙游县");
AREA.put("330881", "浙江省衢州市江山市");
AREA.put("330900", "浙江省舟山市");
AREA.put("330901", "浙江省舟山市");
AREA.put("330902", "浙江省舟山市定海区");
AREA.put("330903", "浙江省舟山市普陀区");
AREA.put("330921", "浙江省舟山市岱山县");
AREA.put("330922", "浙江省舟山市嵊泗县");
AREA.put("331000", "浙江省台州市");
AREA.put("331001", "浙江省台州市");
AREA.put("331002", "浙江省台州市椒江区");
AREA.put("331003", "浙江省台州市黄岩区");
AREA.put("331004", "浙江省台州市路桥区");
AREA.put("331021", "浙江省台州市玉环县");
AREA.put("331022", "浙江省台州市三门县");
AREA.put("331023", "浙江省台州市天台县");
AREA.put("331024", "浙江省台州市仙居县");
AREA.put("331081", "浙江省台州市温岭市");
AREA.put("331082", "浙江省台州市临海市");
AREA.put("331100", "浙江省丽水市");
AREA.put("331101", "浙江省丽水市");
AREA.put("331102", "浙江省丽水市莲都区");
AREA.put("331121", "浙江省丽水市青田县");
AREA.put("331122", "浙江省丽水市缙云县");
AREA.put("331123", "浙江省丽水市遂昌县");
AREA.put("331124", "浙江省丽水市松阳县");
AREA.put("331125", "浙江省丽水市云和县");
AREA.put("331126", "浙江省丽水市庆元县");
AREA.put("331127", "浙江省丽水市景宁畲族自治县");
AREA.put("331181", "浙江省丽水市龙泉市");
AREA.put("340000", "安徽省");
AREA.put("340100", "安徽省合肥市");
AREA.put("340101", "安徽省合肥市");
AREA.put("340102", "安徽省合肥市瑶海区");
AREA.put("340103", "安徽省合肥市庐阳区");
AREA.put("340104", "安徽省合肥市蜀山区");
AREA.put("340111", "安徽省合肥市包河区");
AREA.put("340121", "安徽省合肥市长丰县");
AREA.put("340122", "安徽省合肥市肥东县");
AREA.put("340123", "安徽省合肥市肥西县");
AREA.put("340200", "安徽省芜湖市");
AREA.put("340201", "安徽省芜湖市");
AREA.put("340202", "安徽省芜湖市镜湖区");
AREA.put("340203", "安徽省芜湖市马塘区");
AREA.put("340204", "安徽省芜湖市新芜区");
AREA.put("340207", "安徽省芜湖市鸠江区");
AREA.put("340221", "安徽省芜湖市芜湖县");
AREA.put("340222", "安徽省芜湖市繁昌县");
AREA.put("340223", "安徽省芜湖市南陵县");
AREA.put("340300", "安徽省蚌埠市");
AREA.put("340301", "安徽省蚌埠市");
AREA.put("340302", "安徽省蚌埠市龙子湖区");
AREA.put("320802", "江苏省淮安市清河区");
AREA.put("340304", "安徽省蚌埠市禹会区");
AREA.put("340311", "安徽省蚌埠市淮上区");
AREA.put("340321", "安徽省蚌埠市怀远县");
AREA.put("340322", "安徽省蚌埠市五河县");
AREA.put("340323", "安徽省蚌埠市固镇县");
AREA.put("340400", "安徽省淮南市");
AREA.put("340401", "安徽省淮南市");
AREA.put("340402", "安徽省淮南市大通区");
AREA.put("340403", "安徽省淮南市田家庵区");
AREA.put("340404", "安徽省淮南市谢家集区");
AREA.put("340405", "安徽省淮南市八公山区");
AREA.put("340406", "安徽省淮南市潘集区");
AREA.put("340421", "安徽省淮南市凤台县");
AREA.put("340500", "安徽省马鞍山市");
AREA.put("340501", "安徽省马鞍山市");
AREA.put("340502", "安徽省马鞍山市金家庄区");
AREA.put("340503", "安徽省马鞍山市花山区");
AREA.put("340504", "安徽省马鞍山市雨山区");
AREA.put("340521", "安徽省马鞍山市当涂县");
AREA.put("340600", "安徽省淮北市");
AREA.put("340601", "安徽省淮北市");
AREA.put("340602", "安徽省淮北市杜集区");
AREA.put("340603", "安徽省淮北市相山区");
AREA.put("340604", "安徽省淮北市烈山区");
AREA.put("340621", "安徽省淮北市濉溪县");
AREA.put("340700", "安徽省铜陵市");
AREA.put("340701", "安徽省铜陵市");
AREA.put("340702", "安徽省铜陵市铜官山区");
AREA.put("340703", "安徽省铜陵市狮子山区");
AREA.put("340711", "安徽省铜陵市郊区");
AREA.put("340721", "安徽省铜陵市铜陵县");
AREA.put("340800", "安徽省安庆市");
AREA.put("340801", "安徽省安庆市");
AREA.put("340802", "安徽省安庆市迎江区");
AREA.put("340803", "安徽省安庆市大观区");
AREA.put("340811", "安徽省安庆市郊区");
AREA.put("340822", "安徽省安庆市怀宁县");
AREA.put("340823", "安徽省安庆市枞阳县");
AREA.put("340824", "安徽省安庆市潜山县");
AREA.put("340825", "安徽省安庆市太湖县");
AREA.put("340826", "安徽省安庆市宿松县");
AREA.put("340827", "安徽省安庆市望江县");
AREA.put("340828", "安徽省安庆市岳西县");
AREA.put("340881", "安徽省安庆市桐城市");
AREA.put("341000", "安徽省黄山市");
AREA.put("341001", "安徽省黄山市");
AREA.put("341002", "安徽省黄山市屯溪区");
AREA.put("341003", "安徽省黄山市黄山区");
AREA.put("341004", "安徽省黄山市徽州区");
AREA.put("341021", "安徽省黄山市歙县");
AREA.put("341022", "安徽省黄山市休宁县");
AREA.put("341023", "安徽省黄山市黟县");
AREA.put("341024", "安徽省黄山市祁门县");
AREA.put("341100", "安徽省滁州市");
AREA.put("341101", "安徽省滁州市");
AREA.put("341102", "安徽省滁州市琅琊区");
AREA.put("341103", "安徽省滁州市南谯区");
AREA.put("341122", "安徽省滁州市来安县");
AREA.put("341124", "安徽省滁州市全椒县");
AREA.put("341125", "安徽省滁州市定远县");
AREA.put("341126", "安徽省滁州市凤阳县");
AREA.put("231123", "黑龙江省黑河市逊克县");
AREA.put("330127", "浙江省杭州市淳安县");
AREA.put("330182", "浙江省杭州市建德市");
AREA.put("330183", "浙江省杭州市富阳市");
AREA.put("330185", "浙江省杭州市临安市");
AREA.put("330200", "浙江省宁波市");
AREA.put("330201", "浙江省宁波市");
AREA.put("330203", "浙江省宁波市海曙区");
AREA.put("330204", "浙江省宁波市江东区");
AREA.put("330205", "浙江省宁波市江北区");
AREA.put("330206", "浙江省宁波市北仑区");
AREA.put("330211", "浙江省宁波市镇海区");
AREA.put("330212", "浙江省宁波市鄞州区");
AREA.put("330225", "浙江省宁波市象山县");
AREA.put("330226", "浙江省宁波市宁海县");
AREA.put("330281", "浙江省宁波市余姚市");
AREA.put("330282", "浙江省宁波市慈溪市");
AREA.put("330283", "浙江省宁波市奉化市");
AREA.put("330300", "浙江省温州市");
AREA.put("330301", "浙江省温州市");
AREA.put("330302", "浙江省温州市鹿城区");
AREA.put("330303", "浙江省温州市龙湾区");
AREA.put("330304", "浙江省温州市瓯海区");
AREA.put("330322", "浙江省温州市洞头县");
AREA.put("330324", "浙江省温州市永嘉县");
AREA.put("330326", "浙江省温州市平阳县");
AREA.put("330327", "浙江省温州市苍南县");
AREA.put("330328", "浙江省温州市文成县");
AREA.put("330329", "浙江省温州市泰顺县");
AREA.put("330381", "浙江省温州市瑞安市");
AREA.put("330382", "浙江省温州市乐清市");
AREA.put("330400", "浙江省嘉兴市");
AREA.put("330401", "浙江省嘉兴市");
AREA.put("330402", "浙江省嘉兴市秀城区");
AREA.put("330411", "浙江省嘉兴市秀洲区");
AREA.put("330421", "浙江省嘉兴市嘉善县");
AREA.put("330424", "浙江省嘉兴市海盐县");
AREA.put("330481", "浙江省嘉兴市海宁市");
AREA.put("330482", "浙江省嘉兴市平湖市");
AREA.put("330483", "浙江省嘉兴市桐乡市");
AREA.put("330500", "浙江省湖州市");
AREA.put("330501", "浙江省湖州市");
AREA.put("330502", "浙江省湖州市吴兴区");
AREA.put("330503", "浙江省湖州市南浔区");
AREA.put("330521", "浙江省湖州市德清县");
AREA.put("330522", "浙江省湖州市长兴县");
AREA.put("330523", "浙江省湖州市安吉县");
AREA.put("330600", "浙江省绍兴市");
AREA.put("330601", "浙江省绍兴市");
AREA.put("330602", "浙江省绍兴市越城区");
AREA.put("330621", "浙江省绍兴市绍兴县");
AREA.put("330624", "浙江省绍兴市新昌县");
AREA.put("330681", "浙江省绍兴市诸暨市");
AREA.put("330682", "浙江省绍兴市上虞市");
AREA.put("330683", "浙江省绍兴市嵊州市");
AREA.put("330700", "浙江省金华市");
AREA.put("330701", "浙江省金华市");
AREA.put("330702", "浙江省金华市婺城区");
AREA.put("330703", "浙江省金华市金东区");
AREA.put("330723", "浙江省金华市武义县");
AREA.put("330726", "浙江省金华市浦江县");
AREA.put("330727", "浙江省金华市磐安县");
AREA.put("320205", "江苏省无锡市锡山区");
AREA.put("320206", "江苏省无锡市惠山区");
AREA.put("320211", "江苏省无锡市滨湖区");
AREA.put("320281", "江苏省无锡市江阴市");
AREA.put("320282", "江苏省无锡市宜兴市");
AREA.put("320521", "江苏省苏州市张家港市");
AREA.put("320300", "江苏省徐州市");
AREA.put("320301", "江苏省徐州市");
AREA.put("320302", "江苏省徐州市鼓楼区");
AREA.put("320303", "江苏省徐州市云龙区");
AREA.put("320304", "江苏省徐州市九里区");
AREA.put("320305", "江苏省徐州市贾汪区");
AREA.put("320311", "江苏省徐州市泉山区");
AREA.put("320321", "江苏省徐州市丰县");
AREA.put("320322", "江苏省徐州市沛县");
AREA.put("320323", "江苏省徐州市铜山县");
AREA.put("320324", "江苏省徐州市睢宁县");
AREA.put("320381", "江苏省徐州市新沂市");
AREA.put("320382", "江苏省徐州市邳州市");
AREA.put("320400", "江苏省常州市");
AREA.put("320401", "江苏省常州市");
AREA.put("320402", "江苏省常州市天宁区");
AREA.put("320404", "江苏省常州市钟楼区");
AREA.put("320405", "江苏省常州市戚墅堰区");
AREA.put("320411", "江苏省常州市新北区");
AREA.put("320412", "江苏省常州市武进区");
AREA.put("320481", "江苏省常州市溧阳市");
AREA.put("320482", "江苏省常州市金坛市");
AREA.put("320500", "江苏省苏州市");
AREA.put("320501", "江苏省苏州市");
AREA.put("320502", "江苏省苏州市沧浪区");
AREA.put("320503", "江苏省苏州市平江区");
AREA.put("320504", "江苏省苏州市金阊区");
AREA.put("320505", "江苏省苏州市虎丘区");
AREA.put("320506", "江苏省苏州市吴中区");
AREA.put("320507", "江苏省苏州市相城区");
AREA.put("320581", "江苏省苏州市常熟市");
AREA.put("320582", "江苏省苏州市张家港市");
AREA.put("320583", "江苏省苏州市昆山市");
AREA.put("320584", "江苏省苏州市吴江市");
AREA.put("320585", "江苏省苏州市太仓市");
AREA.put("320600", "江苏省南通市");
AREA.put("320601", "江苏省南通市");
AREA.put("320602", "江苏省南通市崇川区");
AREA.put("320611", "江苏省南通市港闸区");
AREA.put("320621", "江苏省南通市海安县");
AREA.put("320623", "江苏省南通市如东县");
AREA.put("320681", "江苏省南通市启东市");
AREA.put("320682", "江苏省南通市如皋市");
AREA.put("320683", "江苏省南通市通州市");
AREA.put("320684", "江苏省南通市海门市");
AREA.put("320700", "江苏省连云港市");
AREA.put("320701", "江苏省连云港市");
AREA.put("320703", "江苏省连云港市连云区");
AREA.put("320705", "江苏省连云港市新浦区");
AREA.put("320706", "江苏省连云港市海州区");
AREA.put("320721", "江苏省连云港市赣榆县");
AREA.put("320722", "江苏省连云港市东海县");
AREA.put("230603", "黑龙江省大庆市龙凤区");
AREA.put("230604", "黑龙江省大庆市让胡路区");
AREA.put("230605", "黑龙江省大庆市红岗区");
AREA.put("230606", "黑龙江省大庆市大同区");
AREA.put("220501", "吉林省通化市");
AREA.put("220502", "吉林省通化市东昌区");
AREA.put("220503", "吉林省通化市二道江区");
AREA.put("220521", "吉林省通化市通化县");
AREA.put("220523", "吉林省通化市辉南县");
AREA.put("220524", "吉林省通化市柳河县");
AREA.put("220581", "吉林省通化市梅河口市");
AREA.put("220582", "吉林省通化市集安市");
AREA.put("220600", "吉林省白山市");
AREA.put("220601", "吉林省白山市");
AREA.put("220602", "吉林省白山市八道江区");
AREA.put("220621", "吉林省白山市抚松县");
AREA.put("220622", "吉林省白山市靖宇县");
AREA.put("220623", "吉林省白山市长白朝鲜族自治县");
AREA.put("220625", "吉林省白山市江源县");
AREA.put("220681", "吉林省白山市临江市");
AREA.put("220700", "吉林省松原市");
AREA.put("220701", "吉林省松原市");
AREA.put("220702", "吉林省松原市宁江区");
AREA.put("220721", "吉林省松原市前郭尔罗斯蒙古族自治县");
AREA.put("220722", "吉林省松原市长岭县");
AREA.put("220723", "吉林省松原市乾安县");
AREA.put("220724", "吉林省松原市扶余县");
AREA.put("220800", "吉林省白城市");
AREA.put("220801", "吉林省白城市");
AREA.put("220802", "吉林省白城市洮北区");
AREA.put("220821", "吉林省白城市镇赉县");
AREA.put("220822", "吉林省白城市通榆县");
AREA.put("220881", "吉林省白城市洮南市");
AREA.put("220882", "吉林省白城市大安市");
AREA.put("222400", "吉林省延边朝鲜族自治州");
AREA.put("222401", "吉林省延边朝鲜族自治州延吉市");
AREA.put("222402", "吉林省延边朝鲜族自治州图们市");
AREA.put("222403", "吉林省延边朝鲜族自治州敦化市");
AREA.put("222404", "吉林省延边朝鲜族自治州珲春市");
AREA.put("222405", "吉林省延边朝鲜族自治州龙井市");
AREA.put("222406", "吉林省延边朝鲜族自治州和龙市");
AREA.put("222424", "吉林省延边朝鲜族自治州汪清县");
AREA.put("222426", "吉林省延边朝鲜族自治州安图县");
AREA.put("230000", "黑龙江省");
AREA.put("230100", "黑龙江省哈尔滨市");
AREA.put("230101", "黑龙江省哈尔滨市");
AREA.put("230102", "黑龙江省哈尔滨市道里区");
AREA.put("230103", "黑龙江省哈尔滨市南岗区");
AREA.put("230104", "黑龙江省哈尔滨市道外区");
AREA.put("230106", "黑龙江省哈尔滨市香坊区");
AREA.put("230107", "黑龙江省哈尔滨市动力区");
AREA.put("230108", "黑龙江省哈尔滨市平房区");
AREA.put("230109", "黑龙江省哈尔滨市松北区");
AREA.put("230111", "黑龙江省哈尔滨市呼兰区");
AREA.put("230123", "黑龙江省哈尔滨市依兰县");
AREA.put("230124", "黑龙江省哈尔滨市方正县");
AREA.put("230125", "黑龙江省哈尔滨市宾县");
AREA.put("230126", "黑龙江省哈尔滨市巴彦县");
AREA.put("230127", "黑龙江省哈尔滨市木兰县");
AREA.put("230128", "黑龙江省哈尔滨市通河县");
AREA.put("230129", "黑龙江省哈尔滨市延寿县");
AREA.put("230181", "黑龙江省哈尔滨市阿城市");
AREA.put("230182", "黑龙江省哈尔滨市双城市");
AREA.put("150622", "内蒙古自治区鄂尔多斯市准格尔旗");
AREA.put("150623", "内蒙古自治区鄂尔多斯市鄂托克前旗");
AREA.put("150624", "内蒙古自治区鄂尔多斯市鄂托克旗");
AREA.put("150625", "内蒙古自治区鄂尔多斯市杭锦旗");
AREA.put("150626", "内蒙古自治区鄂尔多斯市乌审旗");
AREA.put("150627", "内蒙古自治区鄂尔多斯市伊金霍洛旗");
AREA.put("150700", "内蒙古自治区呼伦贝尔市");
AREA.put("150701", "内蒙古自治区呼伦贝尔市");
AREA.put("150702", "内蒙古自治区呼伦贝尔市海拉尔区");
AREA.put("150721", "内蒙古自治区呼伦贝尔市阿荣旗");
AREA.put("150722", "内蒙古自治区呼伦贝尔市莫力达瓦达斡尔族自治旗");
AREA.put("150723", "内蒙古自治区呼伦贝尔市鄂伦春自治旗");
AREA.put("150724", "内蒙古自治区呼伦贝尔市鄂温克族自治旗");
AREA.put("150725", "内蒙古自治区呼伦贝尔市陈巴尔虎旗");
AREA.put("150726", "内蒙古自治区呼伦贝尔市新巴尔虎左旗");
AREA.put("150727", "内蒙古自治区呼伦贝尔市新巴尔虎右旗");
AREA.put("150781", "内蒙古自治区呼伦贝尔市满洲里市");
AREA.put("150782", "内蒙古自治区呼伦贝尔市牙克石市");
AREA.put("150783", "内蒙古自治区呼伦贝尔市扎兰屯市");
AREA.put("150784", "内蒙古自治区呼伦贝尔市额尔古纳市");
AREA.put("150785", "内蒙古自治区呼伦贝尔市根河市");
AREA.put("150800", "内蒙古自治区巴彦淖尔市");
AREA.put("150801", "内蒙古自治区巴彦淖尔市");
AREA.put("150802", "内蒙古自治区巴彦淖尔市临河区");
AREA.put("150821", "内蒙古自治区巴彦淖尔市五原县");
AREA.put("150822", "内蒙古自治区巴彦淖尔市磴口县");
AREA.put("150823", "内蒙古自治区巴彦淖尔市乌拉特前旗");
AREA.put("150824", "内蒙古自治区巴彦淖尔市乌拉特中旗");
AREA.put("150825", "内蒙古自治区巴彦淖尔市乌拉特后旗");
AREA.put("150826", "内蒙古自治区巴彦淖尔市杭锦后旗");
AREA.put("150900", "内蒙古自治区乌兰察布市");
AREA.put("150901", "内蒙古自治区乌兰察布市");
AREA.put("150902", "内蒙古自治区乌兰察布市集宁区");
AREA.put("150921", "内蒙古自治区乌兰察布市卓资县");
AREA.put("150922", "内蒙古自治区乌兰察布市化德县");
AREA.put("150923", "内蒙古自治区乌兰察布市商都县");
AREA.put("150924", "内蒙古自治区乌兰察布市兴和县");
AREA.put("150925", "内蒙古自治区乌兰察布市凉城县");
AREA.put("150926", "内蒙古自治区乌兰察布市察哈尔右翼前旗");
AREA.put("320100", "江苏省南京市");
AREA.put("320101", "江苏省南京市");
AREA.put("320102", "江苏省南京市玄武区");
AREA.put("320103", "江苏省南京市白下区");
AREA.put("320104", "江苏省南京市秦淮区");
AREA.put("320105", "江苏省南京市建邺区");
AREA.put("320106", "江苏省南京市鼓楼区");
AREA.put("320107", "江苏省南京市下关区");
AREA.put("320111", "江苏省南京市浦口区");
AREA.put("320113", "江苏省南京市栖霞区");
AREA.put("320114", "江苏省南京市雨花台区");
AREA.put("320115", "江苏省南京市江宁区");
AREA.put("320116", "江苏省南京市六合区");
AREA.put("320124", "江苏省南京市溧水县");
AREA.put("320125", "江苏省南京市高淳县");
AREA.put("320200", "江苏省无锡市");
AREA.put("320201", "江苏省无锡市");
AREA.put("320202", "江苏省无锡市崇安区");
AREA.put("320203", "江苏省无锡市南长区");
AREA.put("320204", "江苏省无锡市北塘区");
AREA.put("230621", "黑龙江省大庆市肇州县");
AREA.put("371602", "山东省滨州市滨城区");
AREA.put("371621", "山东省滨州市惠民县");
AREA.put("371622", "山东省滨州市阳信县");
AREA.put("371623", "山东省滨州市无棣县");
AREA.put("371624", "山东省滨州市沾化县");
AREA.put("371625", "山东省滨州市博兴县");
AREA.put("371626", "山东省滨州市邹平县");
AREA.put("371700", "山东省荷泽市");
AREA.put("371701", "山东省荷泽市");
AREA.put("371702", "山东省荷泽市牡丹区");
AREA.put("371721", "山东省荷泽市曹县");
AREA.put("371722", "山东省荷泽市单县");
AREA.put("371723", "山东省荷泽市成武县");
AREA.put("371724", "山东省荷泽市巨野县");
AREA.put("371725", "山东省荷泽市郓城县");
AREA.put("371726", "山东省荷泽市鄄城县");
AREA.put("371727", "山东省荷泽市定陶县");
AREA.put("371728", "山东省荷泽市东明县");
AREA.put("410000", "河南省");
AREA.put("410100", "河南省郑州市");
AREA.put("410101", "河南省郑州市");
AREA.put("410102", "河南省郑州市中原区");
AREA.put("410103", "河南省郑州市二七区");
AREA.put("410104", "河南省郑州市管城回族区");
AREA.put("410105", "河南省郑州市金水区");
AREA.put("410106", "河南省郑州市上街区");
AREA.put("410108", "河南省郑州市惠济区");
AREA.put("410122", "河南省郑州市中牟县");
AREA.put("410181", "河南省郑州市巩义市");
AREA.put("410182", "河南省郑州市荥阳市");
AREA.put("410183", "河南省郑州市新密市");
AREA.put("410184", "河南省郑州市新郑市");
AREA.put("410185", "河南省郑州市登封市");
AREA.put("410200", "河南省开封市");
AREA.put("410201", "河南省开封市");
AREA.put("410202", "河南省开封市龙亭区");
AREA.put("410203", "河南省开封市顺河回族区");
AREA.put("410204", "河南省开封市鼓楼区");
AREA.put("410205", "河南省开封市南关区");
AREA.put("410211", "河南省开封市郊区");
AREA.put("410221", "河南省开封市杞县");
AREA.put("410222", "河南省开封市通许县");
AREA.put("410223", "河南省开封市尉氏县");
AREA.put("410224", "河南省开封市开封县");
AREA.put("410225", "河南省开封市兰考县");
AREA.put("410300", "河南省洛阳市");
AREA.put("410301", "河南省洛阳市");
AREA.put("410302", "河南省洛阳市老城区");
AREA.put("410303", "河南省洛阳市西工区");
AREA.put("410304", "河南省洛阳市廛河回族区");
AREA.put("410305", "河南省洛阳市涧西区");
AREA.put("410306", "河南省洛阳市吉利区");
AREA.put("410307", "河南省洛阳市洛龙区");
AREA.put("410322", "河南省洛阳市孟津县");
AREA.put("410323", "河南省洛阳市新安县");
AREA.put("410324", "河南省洛阳市栾川县");
AREA.put("410325", "河南省洛阳市嵩县");
AREA.put("410326", "河南省洛阳市汝阳县");
AREA.put("410327", "河南省洛阳市宜阳县");
AREA.put("410328", "河南省洛阳市洛宁县");
AREA.put("341181", "安徽省滁州市天长市");
AREA.put("341182", "安徽省滁州市明光市");
AREA.put("370900", "山东省泰安市");
AREA.put("370901", "山东省泰安市");
AREA.put("370902", "山东省泰安市泰山区");
AREA.put("370903", "山东省泰安市岱岳区");
AREA.put("370921", "山东省泰安市宁阳县");
AREA.put("370923", "山东省泰安市东平县");
AREA.put("370982", "山东省泰安市新泰市");
AREA.put("370983", "山东省泰安市肥城市");
AREA.put("371000", "山东省威海市");
AREA.put("371001", "山东省威海市");
AREA.put("371002", "山东省威海市环翠区");
AREA.put("371081", "山东省威海市文登市");
AREA.put("371082", "山东省威海市荣成市");
AREA.put("371083", "山东省威海市乳山市");
AREA.put("371100", "山东省日照市");
AREA.put("371101", "山东省日照市");
AREA.put("371102", "山东省日照市东港区");
AREA.put("371103", "山东省日照市岚山区");
AREA.put("371121", "山东省日照市五莲县");
AREA.put("371122", "山东省日照市莒县");
AREA.put("371200", "山东省莱芜市");
AREA.put("371201", "山东省莱芜市");
AREA.put("371202", "山东省莱芜市莱城区");
AREA.put("371203", "山东省莱芜市钢城区");
AREA.put("371300", "山东省临沂市");
AREA.put("371301", "山东省临沂市");
AREA.put("371302", "山东省临沂市兰山区");
AREA.put("371311", "山东省临沂市罗庄区");
AREA.put("371312", "山东省临沂市河东区");
AREA.put("371321", "山东省临沂市沂南县");
AREA.put("371322", "山东省临沂市郯城县");
AREA.put("371323", "山东省临沂市沂水县");
AREA.put("371324", "山东省临沂市苍山县");
AREA.put("371325", "山东省临沂市费县");
AREA.put("371326", "山东省临沂市平邑县");
AREA.put("371327", "山东省临沂市莒南县");
AREA.put("371328", "山东省临沂市蒙阴县");
AREA.put("371329", "山东省临沂市临沭县");
AREA.put("371400", "山东省德州市");
AREA.put("371401", "山东省德州市");
AREA.put("371402", "山东省德州市德城区");
AREA.put("371421", "山东省德州市陵县");
AREA.put("371422", "山东省德州市宁津县");
AREA.put("371423", "山东省德州市庆云县");
AREA.put("371424", "山东省德州市临邑县");
AREA.put("371425", "山东省德州市齐河县");
AREA.put("371426", "山东省德州市平原县");
AREA.put("371427", "山东省德州市夏津县");
AREA.put("371428", "山东省德州市武城县");
AREA.put("371481", "山东省德州市乐陵市");
AREA.put("371482", "山东省德州市禹城市");
AREA.put("371500", "山东省聊城市");
AREA.put("371501", "山东省聊城市");
AREA.put("371502", "山东省聊城市东昌府区");
AREA.put("371521", "山东省聊城市阳谷县");
AREA.put("371522", "山东省聊城市莘县");
AREA.put("371523", "山东省聊城市茌平县");
AREA.put("371524", "山东省聊城市东阿县");
AREA.put("371525", "山东省聊城市冠县");
AREA.put("371526", "山东省聊城市高唐县");
AREA.put("371581", "山东省聊城市临清市");
AREA.put("421123", "湖北省黄冈市罗田县");
AREA.put("371601", "山东省滨州市");
AREA.put("350629", "福建省漳州市华安县");
AREA.put("350681", "福建省漳州市龙海市");
AREA.put("350700", "福建省南平市");
AREA.put("350701", "福建省南平市");
AREA.put("350702", "福建省南平市延平区");
AREA.put("350721", "福建省南平市顺昌县");
AREA.put("350722", "福建省南平市浦城县");
AREA.put("350723", "福建省南平市光泽县");
AREA.put("350724", "福建省南平市松溪县");
AREA.put("350725", "福建省南平市政和县");
AREA.put("350781", "福建省南平市邵武市");
AREA.put("350782", "福建省南平市武夷山市");
AREA.put("350783", "福建省南平市建瓯市");
AREA.put("350784", "福建省南平市建阳市");
AREA.put("350800", "福建省龙岩市");
AREA.put("350801", "福建省龙岩市");
AREA.put("350802", "福建省龙岩市新罗区");
AREA.put("350821", "福建省龙岩市长汀县");
AREA.put("350822", "福建省龙岩市永定县");
AREA.put("350823", "福建省龙岩市上杭县");
AREA.put("350824", "福建省龙岩市武平县");
AREA.put("350825", "福建省龙岩市连城县");
AREA.put("350881", "福建省龙岩市漳平市");
AREA.put("350900", "福建省宁德市");
AREA.put("350901", "福建省宁德市");
AREA.put("350902", "福建省宁德市蕉城区");
AREA.put("350921", "福建省宁德市霞浦县");
AREA.put("350922", "福建省宁德市古田县");
AREA.put("350923", "福建省宁德市屏南县");
AREA.put("350924", "福建省宁德市寿宁县");
AREA.put("350925", "福建省宁德市周宁县");
AREA.put("350926", "福建省宁德市柘荣县");
AREA.put("350981", "福建省宁德市福安市");
AREA.put("350982", "福建省宁德市福鼎市");
AREA.put("360000", "江西省");
AREA.put("360100", "江西省南昌市");
AREA.put("360101", "江西省南昌市");
AREA.put("360102", "江西省南昌市东湖区");
AREA.put("360103", "江西省南昌市西湖区");
AREA.put("360104", "江西省南昌市青云谱区");
AREA.put("360105", "江西省南昌市湾里区");
AREA.put("360111", "江西省南昌市青山湖区");
AREA.put("360121", "江西省南昌市南昌县");
AREA.put("360122", "江西省南昌市新建县");
AREA.put("360123", "江西省南昌市安义县");
AREA.put("360124", "江西省南昌市进贤县");
AREA.put("360200", "江西省景德镇市");
AREA.put("360201", "江西省景德镇市");
AREA.put("360202", "江西省景德镇市昌江区");
AREA.put("360203", "江西省景德镇市珠山区");
AREA.put("360222", "江西省景德镇市浮梁县");
AREA.put("360281", "江西省景德镇市乐平市");
AREA.put("360300", "江西省萍乡市");
AREA.put("360301", "江西省萍乡市");
AREA.put("360302", "江西省萍乡市安源区");
AREA.put("360313", "江西省萍乡市湘东区");
AREA.put("360321", "江西省萍乡市莲花县");
AREA.put("360322", "江西省萍乡市上栗县");
AREA.put("360323", "江西省萍乡市芦溪县");
AREA.put("360400", "江西省九江市");
AREA.put("360401", "江西省九江市");
AREA.put("360402", "江西省九江市庐山区");
AREA.put("360421", "江西省九江市九江县");
AREA.put("370303", "山东省淄博市张店区");
AREA.put("370304", "山东省淄博市博山区");
AREA.put("370305", "山东省淄博市临淄区");
AREA.put("370306", "山东省淄博市周村区");
AREA.put("370321", "山东省淄博市桓台县");
AREA.put("370322", "山东省淄博市高青县");
AREA.put("370323", "山东省淄博市沂源县");
AREA.put("370400", "山东省枣庄市");
AREA.put("370401", "山东省枣庄市");
AREA.put("370402", "山东省枣庄市市中区");
AREA.put("370403", "山东省枣庄市薛城区");
AREA.put("370404", "山东省枣庄市峄城区");
AREA.put("370405", "山东省枣庄市台儿庄区");
AREA.put("370406", "山东省枣庄市山亭区");
AREA.put("370481", "山东省枣庄市滕州市");
AREA.put("370500", "山东省东营市");
AREA.put("370501", "山东省东营市");
AREA.put("370502", "山东省东营市东营区");
AREA.put("370503", "山东省东营市河口区");
AREA.put("370521", "山东省东营市垦利县");
AREA.put("370522", "山东省东营市利津县");
AREA.put("370523", "山东省东营市广饶县");
AREA.put("370600", "山东省烟台市");
AREA.put("370601", "山东省烟台市");
AREA.put("370602", "山东省烟台市芝罘区");
AREA.put("370611", "山东省烟台市福山区");
AREA.put("370612", "山东省烟台市牟平区");
AREA.put("370613", "山东省烟台市莱山区");
AREA.put("370634", "山东省烟台市长岛县");
AREA.put("370681", "山东省烟台市龙口市");
AREA.put("370682", "山东省烟台市莱阳市");
AREA.put("370683", "山东省烟台市莱州市");
AREA.put("370684", "山东省烟台市蓬莱市");
AREA.put("370685", "山东省烟台市招远市");
AREA.put("370686", "山东省烟台市栖霞市");
AREA.put("370687", "山东省烟台市海阳市");
AREA.put("370700", "山东省潍坊市");
AREA.put("370701", "山东省潍坊市");
AREA.put("370702", "山东省潍坊市潍城区");
AREA.put("370703", "山东省潍坊市寒亭区");
AREA.put("370704", "山东省潍坊市坊子区");
AREA.put("370705", "山东省潍坊市奎文区");
AREA.put("370724", "山东省潍坊市临朐县");
AREA.put("370725", "山东省潍坊市昌乐县");
AREA.put("370781", "山东省潍坊市青州市");
AREA.put("370782", "山东省潍坊市诸城市");
AREA.put("370783", "山东省潍坊市寿光市");
AREA.put("370784", "山东省潍坊市安丘市");
AREA.put("370785", "山东省潍坊市高密市");
AREA.put("370786", "山东省潍坊市昌邑市");
AREA.put("370800", "山东省济宁市");
AREA.put("370801", "山东省济宁市");
AREA.put("370802", "山东省济宁市市中区");
AREA.put("370811", "山东省济宁市任城区");
AREA.put("211202", "辽宁省铁岭市银州区");
AREA.put("211204", "辽宁省铁岭市清河区");
AREA.put("141182", "山西省吕梁市汾阳市");
AREA.put("152523", "内蒙古自治区锡林郭勒盟苏尼特左旗");
AREA.put("152524", "内蒙古自治区锡林郭勒盟苏尼特右旗");
AREA.put("152525", "内蒙古自治区锡林郭勒盟东乌珠穆沁旗");
AREA.put("152526", "内蒙古自治区锡林郭勒盟西乌珠穆沁旗");
AREA.put("152527", "内蒙古自治区锡林郭勒盟太仆寺旗");
AREA.put("152528", "内蒙古自治区锡林郭勒盟镶黄旗");
AREA.put("152529", "内蒙古自治区锡林郭勒盟正镶白旗");
AREA.put("152530", "内蒙古自治区锡林郭勒盟正蓝旗");
AREA.put("152531", "内蒙古自治区锡林郭勒盟多伦县");
AREA.put("152900", "内蒙古自治区阿拉善盟");
AREA.put("152921", "内蒙古自治区阿拉善盟阿拉善左旗");
AREA.put("152922", "内蒙古自治区阿拉善盟阿拉善右旗");
AREA.put("152923", "内蒙古自治区阿拉善盟额济纳旗");
AREA.put("210000", "辽宁省");
AREA.put("210100", "辽宁省沈阳市");
AREA.put("210101", "辽宁省沈阳市");
AREA.put("210102", "辽宁省沈阳市和平区");
AREA.put("210103", "辽宁省沈阳市沈河区");
AREA.put("210104", "辽宁省沈阳市大东区");
AREA.put("210105", "辽宁省沈阳市皇姑区");
AREA.put("210106", "辽宁省沈阳市铁西区");
AREA.put("210111", "辽宁省沈阳市苏家屯区");
AREA.put("210112", "辽宁省沈阳市东陵区");
AREA.put("210113", "辽宁省沈阳市新城子区");
AREA.put("210114", "辽宁省沈阳市于洪区");
AREA.put("210122", "辽宁省沈阳市辽中县");
AREA.put("210123", "辽宁省沈阳市康平县");
AREA.put("210124", "辽宁省沈阳市法库县");
AREA.put("210181", "辽宁省沈阳市新民市");
AREA.put("210200", "辽宁省大连市");
AREA.put("210201", "辽宁省大连市");
AREA.put("210202", "辽宁省大连市中山区");
AREA.put("210203", "辽宁省大连市西岗区");
AREA.put("210204", "辽宁省大连市沙河口区");
AREA.put("210211", "辽宁省大连市甘井子区");
AREA.put("210212", "辽宁省大连市旅顺口区");
AREA.put("210213", "辽宁省大连市金州区");
AREA.put("210224", "辽宁省大连市长海县");
AREA.put("210281", "辽宁省大连市瓦房店市");
AREA.put("210282", "辽宁省大连市普兰店市");
AREA.put("210283", "辽宁省大连市庄河市");
AREA.put("210300", "辽宁省鞍山市");
AREA.put("210301", "辽宁省鞍山市");
AREA.put("210302", "辽宁省鞍山市铁东区");
AREA.put("210303", "辽宁省鞍山市铁西区");
AREA.put("210304", "辽宁省鞍山市立山区");
AREA.put("210311", "辽宁省鞍山市千山区");
AREA.put("210321", "辽宁省鞍山市台安县");
AREA.put("210323", "辽宁省鞍山市岫岩满族自治县");
AREA.put("210381", "辽宁省鞍山市海城市");
AREA.put("210400", "辽宁省抚顺市");
AREA.put("210401", "辽宁省抚顺市");
AREA.put("210402", "辽宁省抚顺市新抚区");
AREA.put("210403", "辽宁省抚顺市东洲区");
AREA.put("210404", "辽宁省抚顺市望花区");
AREA.put("210411", "辽宁省抚顺市顺城区");
AREA.put("210421", "辽宁省抚顺市抚顺县");
AREA.put("210422", "辽宁省抚顺市新宾满族自治县");
AREA.put("210423", "辽宁省抚顺市清原满族自治县");
AREA.put("320803", "江苏省淮安市楚州区");
AREA.put("320804", "江苏省淮安市淮阴区");
AREA.put("320811", "江苏省淮安市清浦区");
AREA.put("320826", "江苏省淮安市涟水县");
AREA.put("320829", "江苏省淮安市洪泽县");
AREA.put("320830", "江苏省淮安市盱眙县");
AREA.put("320831", "江苏省淮安市金湖县");
AREA.put("320900", "江苏省盐城市");
AREA.put("320901", "江苏省盐城市");
AREA.put("320902", "江苏省盐城市亭湖区");
AREA.put("320903", "江苏省盐城市盐都区");
AREA.put("320921", "江苏省盐城市响水县");
AREA.put("320922", "江苏省盐城市滨海县");
AREA.put("320923", "江苏省盐城市阜宁县");
AREA.put("320924", "江苏省盐城市射阳县");
AREA.put("320925", "江苏省盐城市建湖县");
AREA.put("320981", "江苏省盐城市东台市");
AREA.put("320982", "江苏省盐城市大丰市");
AREA.put("321000", "江苏省扬州市");
AREA.put("321001", "江苏省扬州市");
AREA.put("321002", "江苏省扬州市广陵区");
AREA.put("321003", "江苏省扬州市邗江区");
AREA.put("321011", "江苏省扬州市郊区");
AREA.put("321023", "江苏省扬州市宝应县");
AREA.put("321081", "江苏省扬州市仪征市");
AREA.put("321084", "江苏省扬州市高邮市");
AREA.put("321088", "江苏省扬州市江都市");
AREA.put("321100", "江苏省镇江市");
AREA.put("321101", "江苏省镇江市");
AREA.put("321102", "江苏省镇江市京口区");
AREA.put("321111", "江苏省镇江市润州区");
AREA.put("321112", "江苏省镇江市丹徒区");
AREA.put("321181", "江苏省镇江市丹阳市");
AREA.put("321182", "江苏省镇江市扬中市");
AREA.put("321183", "江苏省镇江市句容市");
AREA.put("321200", "江苏省泰州市");
AREA.put("321201", "江苏省泰州市");
AREA.put("321202", "江苏省泰州市海陵区");
AREA.put("321203", "江苏省泰州市高港区");
AREA.put("321281", "江苏省泰州市兴化市");
AREA.put("321282", "江苏省泰州市靖江市");
AREA.put("321283", "江苏省泰州市泰兴市");
AREA.put("321284", "江苏省泰州市姜堰市");
AREA.put("341621", "安徽省亳州市涡阳县");
AREA.put("341622", "安徽省亳州市蒙城县");
AREA.put("341623", "安徽省亳州市利辛县");
AREA.put("341700", "安徽省池州市");
AREA.put("341701", "安徽省池州市");
AREA.put("341702", "安徽省池州市贵池区");
AREA.put("341721", "安徽省池州市东至县");
AREA.put("341722", "安徽省池州市石台县");
AREA.put("341723", "安徽省池州市青阳县");
AREA.put("341800", "安徽省宣城市");
AREA.put("341801", "安徽省宣城市");
AREA.put("341802", "安徽省宣城市宣州区");
AREA.put("341821", "安徽省宣城市郎溪县");
AREA.put("341822", "安徽省宣城市广德县");
AREA.put("341823", "安徽省宣城市泾县");
AREA.put("341824", "安徽省宣城市绩溪县");
AREA.put("341825", "安徽省宣城市旌德县");
AREA.put("341881", "安徽省宣城市宁国市");
AREA.put("350000", "福建省");
AREA.put("350100", "福建省福州市");
AREA.put("350101", "福建省福州市");
AREA.put("350102", "福建省福州市鼓楼区");
AREA.put("350103", "福建省福州市台江区");
AREA.put("350104", "福建省福州市仓山区");
AREA.put("350105", "福建省福州市马尾区");
AREA.put("370882", "山东省济宁市兖州市");
AREA.put("350628", "福建省漳州市平和县");
AREA.put("360926", "江西省宜春市铜鼓县");
AREA.put("360981", "江西省宜春市丰城市");
AREA.put("360982", "江西省宜春市樟树市");
AREA.put("360983", "江西省宜春市高安市");
AREA.put("361000", "江西省抚州市");
AREA.put("361001", "江西省抚州市");
AREA.put("361002", "江西省抚州市临川区");
AREA.put("361021", "江西省抚州市南城县");
AREA.put("361022", "江西省抚州市黎川县");
AREA.put("361023", "江西省抚州市南丰县");
AREA.put("361024", "江西省抚州市崇仁县");
AREA.put("361025", "江西省抚州市乐安县");
AREA.put("361026", "江西省抚州市宜黄县");
AREA.put("361027", "江西省抚州市金溪县");
AREA.put("361028", "江西省抚州市资溪县");
AREA.put("361029", "江西省抚州市东乡县");
AREA.put("361030", "江西省抚州市广昌县");
AREA.put("361100", "江西省上饶市");
AREA.put("361101", "江西省上饶市");
AREA.put("361102", "江西省上饶市信州区");
AREA.put("361121", "江西省上饶市上饶县");
AREA.put("361122", "江西省上饶市广丰县");
AREA.put("361123", "江西省上饶市玉山县");
AREA.put("361124", "江西省上饶市铅山县");
AREA.put("361125", "江西省上饶市横峰县");
AREA.put("361126", "江西省上饶市弋阳县");
AREA.put("361127", "江西省上饶市余干县");
AREA.put("361128", "江西省上饶市鄱阳县");
AREA.put("361129", "江西省上饶市万年县");
AREA.put("361130", "江西省上饶市婺源县");
AREA.put("361181", "江西省上饶市德兴市");
AREA.put("370000", "山东省");
AREA.put("370100", "山东省济南市");
AREA.put("370101", "山东省济南市");
AREA.put("370102", "山东省济南市历下区");
AREA.put("370103", "山东省济南市市中区");
AREA.put("370104", "山东省济南市槐荫区");
AREA.put("370105", "山东省济南市天桥区");
AREA.put("370112", "山东省济南市历城区");
AREA.put("370113", "山东省济南市长清区");
AREA.put("370124", "山东省济南市平阴县");
AREA.put("370125", "山东省济南市济阳县");
AREA.put("370126", "山东省济南市商河县");
AREA.put("370181", "山东省济南市章丘市");
AREA.put("370200", "山东省青岛市");
AREA.put("370201", "山东省青岛市");
AREA.put("370202", "山东省青岛市市南区");
AREA.put("370203", "山东省青岛市市北区");
AREA.put("370205", "山东省青岛市四方区");
AREA.put("370211", "山东省青岛市黄岛区");
AREA.put("370212", "山东省青岛市崂山区");
AREA.put("370213", "山东省青岛市李沧区");
AREA.put("370214", "山东省青岛市城阳区");
AREA.put("370281", "山东省青岛市胶州市");
AREA.put("370282", "山东省青岛市即墨市");
AREA.put("370283", "山东省青岛市平度市");
AREA.put("370284", "山东省青岛市胶南市");
AREA.put("370285", "山东省青岛市莱西市");
AREA.put("370300", "山东省淄博市");
AREA.put("370301", "山东省淄博市");
AREA.put("370302", "山东省淄博市淄川区");
AREA.put("370883", "山东省济宁市邹城市");
AREA.put("360423", "江西省九江市武宁县");
AREA.put("360424", "江西省九江市修水县");
AREA.put("360425", "江西省九江市永修县");
AREA.put("360426", "江西省九江市德安县");
AREA.put("360427", "江西省九江市星子县");
AREA.put("360428", "江西省九江市都昌县");
AREA.put("360429", "江西省九江市湖口县");
AREA.put("360430", "江西省九江市彭泽县");
AREA.put("360481", "江西省九江市瑞昌市");
AREA.put("360500", "江西省新余市");
AREA.put("360501", "江西省新余市");
AREA.put("360502", "江西省新余市渝水区");
AREA.put("360521", "江西省新余市分宜县");
AREA.put("360600", "江西省鹰潭市");
AREA.put("360601", "江西省鹰潭市");
AREA.put("360602", "江西省鹰潭市月湖区");
AREA.put("360622", "江西省鹰潭市余江县");
AREA.put("360681", "江西省鹰潭市贵溪市");
AREA.put("360700", "江西省赣州市");
AREA.put("360701", "江西省赣州市");
AREA.put("360702", "江西省赣州市章贡区");
AREA.put("360721", "江西省赣州市赣县");
AREA.put("360722", "江西省赣州市信丰县");
AREA.put("360723", "江西省赣州市大余县");
AREA.put("360724", "江西省赣州市上犹县");
AREA.put("360725", "江西省赣州市崇义县");
AREA.put("360726", "江西省赣州市安远县");
AREA.put("360727", "江西省赣州市龙南县");
AREA.put("360728", "江西省赣州市定南县");
AREA.put("360729", "江西省赣州市全南县");
AREA.put("360730", "江西省赣州市宁都县");
AREA.put("360731", "江西省赣州市于都县");
AREA.put("360732", "江西省赣州市兴国县");
AREA.put("360733", "江西省赣州市会昌县");
AREA.put("360734", "江西省赣州市寻乌县");
AREA.put("360735", "江西省赣州市石城县");
AREA.put("360781", "江西省赣州市瑞金市");
AREA.put("360782", "江西省赣州市南康市");
AREA.put("360800", "江西省吉安市");
AREA.put("360801", "江西省吉安市");
AREA.put("360802", "江西省吉安市吉州区");
AREA.put("360803", "江西省吉安市青原区");
AREA.put("360821", "江西省吉安市吉安县");
AREA.put("360822", "江西省吉安市吉水县");
AREA.put("360823", "江西省吉安市峡江县");
AREA.put("360824", "江西省吉安市新干县");
AREA.put("360825", "江西省吉安市永丰县");
AREA.put("360826", "江西省吉安市泰和县");
AREA.put("360827", "江西省吉安市遂川县");
AREA.put("360828", "江西省吉安市万安县");
AREA.put("360829", "江西省吉安市安福县");
AREA.put("360830", "江西省吉安市永新县");
AREA.put("360881", "江西省吉安市井冈山市");
AREA.put("360900", "江西省宜春市");
AREA.put("360901", "江西省宜春市");
AREA.put("360902", "江西省宜春市袁州区");
AREA.put("360921", "江西省宜春市奉新县");
AREA.put("360922", "江西省宜春市万载县");
AREA.put("360923", "江西省宜春市上高县");
AREA.put("360924", "江西省宜春市宜丰县");
AREA.put("371600", "山东省滨州市");
AREA.put("360925", "江西省宜春市靖安县");
AREA.put("410926", "河南省濮阳市范县");
AREA.put("420503", "湖北省宜昌市伍家岗区");
AREA.put("420504", "湖北省宜昌市点军区");
AREA.put("420505", "湖北省宜昌市猇亭区");
AREA.put("420506", "湖北省宜昌市夷陵区");
AREA.put("420525", "湖北省宜昌市远安县");
AREA.put("420526", "湖北省宜昌市兴山县");
AREA.put("420527", "湖北省宜昌市秭归县");
AREA.put("420528", "湖北省宜昌市长阳土家族自治县");
AREA.put("420529", "湖北省宜昌市五峰土家族自治县");
AREA.put("420581", "湖北省宜昌市宜都市");
AREA.put("420582", "湖北省宜昌市当阳市");
AREA.put("420583", "湖北省宜昌市枝江市");
AREA.put("420600", "湖北省襄樊市");
AREA.put("420601", "湖北省襄樊市");
AREA.put("420602", "湖北省襄樊市襄城区");
AREA.put("420606", "湖北省襄樊市樊城区");
AREA.put("420607", "湖北省襄樊市襄阳区");
AREA.put("420624", "湖北省襄樊市南漳县");
AREA.put("420625", "湖北省襄樊市谷城县");
AREA.put("420626", "湖北省襄樊市保康县");
AREA.put("420682", "湖北省襄樊市老河口市");
AREA.put("420683", "湖北省襄樊市枣阳市");
AREA.put("420684", "湖北省襄樊市宜城市");
AREA.put("420700", "湖北省鄂州市");
AREA.put("420701", "湖北省鄂州市");
AREA.put("420702", "湖北省鄂州市梁子湖区");
AREA.put("420703", "湖北省鄂州市华容区");
AREA.put("420704", "湖北省鄂州市鄂城区");
AREA.put("420800", "湖北省荆门市");
AREA.put("420801", "湖北省荆门市");
AREA.put("420802", "湖北省荆门市东宝区");
AREA.put("420804", "湖北省荆门市掇刀区");
AREA.put("420821", "湖北省荆门市京山县");
AREA.put("420822", "湖北省荆门市沙洋县");
AREA.put("420881", "湖北省荆门市钟祥市");
AREA.put("420900", "湖北省孝感市");
AREA.put("420901", "湖北省孝感市");
AREA.put("420902", "湖北省孝感市孝南区");
AREA.put("420921", "湖北省孝感市孝昌县");
AREA.put("420922", "湖北省孝感市大悟县");
AREA.put("420923", "湖北省孝感市云梦县");
AREA.put("420981", "湖北省孝感市应城市");
AREA.put("420982", "湖北省孝感市安陆市");
AREA.put("420984", "湖北省孝感市汉川市");
AREA.put("421000", "湖北省荆州市");
AREA.put("421001", "湖北省荆州市");
AREA.put("421002", "湖北省荆州市沙市区");
AREA.put("421003", "湖北省荆州市荆州区");
AREA.put("421022", "湖北省荆州市公安县");
AREA.put("421023", "湖北省荆州市监利县");
AREA.put("421024", "湖北省荆州市江陵县");
AREA.put("421081", "湖北省荆州市石首市");
AREA.put("421083", "湖北省荆州市洪湖市");
AREA.put("421087", "湖北省荆州市松滋市");
AREA.put("421100", "湖北省黄冈市");
AREA.put("421101", "湖北省黄冈市");
AREA.put("421102", "湖北省黄冈市黄州区");
AREA.put("421121", "湖北省黄冈市团风县");
AREA.put("421122", "湖北省黄冈市红安县");
AREA.put("430381", "湖南省湘潭市湘乡市");
AREA.put("430922", "湖南省益阳市桃江县");
AREA.put("430923", "湖南省益阳市安化县");
AREA.put("430401", "湖南省衡阳市");
AREA.put("430405", "湖南省衡阳市珠晖区");
AREA.put("430406", "湖南省衡阳市雁峰区");
AREA.put("430407", "湖南省衡阳市石鼓区");
AREA.put("430408", "湖南省衡阳市蒸湘区");
AREA.put("430412", "湖南省衡阳市南岳区");
AREA.put("430421", "湖南省衡阳市衡阳县");
AREA.put("430422", "湖南省衡阳市衡南县");
AREA.put("430423", "湖南省衡阳市衡山县");
AREA.put("430424", "湖南省衡阳市衡东县");
AREA.put("430426", "湖南省衡阳市祁东县");
AREA.put("430481", "湖南省衡阳市耒阳市");
AREA.put("430482", "湖南省衡阳市常宁市");
AREA.put("430500", "湖南省邵阳市");
AREA.put("430501", "湖南省邵阳市");
AREA.put("430502", "湖南省邵阳市双清区");
AREA.put("430503", "湖南省邵阳市大祥区");
AREA.put("430511", "湖南省邵阳市北塔区");
AREA.put("430521", "湖南省邵阳市邵东县");
AREA.put("430522", "湖南省邵阳市新邵县");
AREA.put("430523", "湖南省邵阳市邵阳县");
AREA.put("430524", "湖南省邵阳市隆回县");
AREA.put("430525", "湖南省邵阳市洞口县");
AREA.put("430527", "湖南省邵阳市绥宁县");
AREA.put("430528", "湖南省邵阳市新宁县");
AREA.put("430529", "湖南省邵阳市城步苗族自治县");
AREA.put("430581", "湖南省邵阳市武冈市");
AREA.put("430600", "湖南省岳阳市");
AREA.put("430601", "湖南省岳阳市");
AREA.put("430602", "湖南省岳阳市岳阳楼区");
AREA.put("430603", "湖南省岳阳市云溪区");
AREA.put("430611", "湖南省岳阳市君山区");
AREA.put("430621", "湖南省岳阳市岳阳县");
AREA.put("430623", "湖南省岳阳市华容县");
AREA.put("430624", "湖南省岳阳市湘阴县");
AREA.put("430626", "湖南省岳阳市平江县");
AREA.put("430681", "湖南省岳阳市汨罗市");
AREA.put("430682", "湖南省岳阳市临湘市");
AREA.put("430700", "湖南省常德市");
AREA.put("430701", "湖南省常德市");
AREA.put("430702", "湖南省常德市武陵区");
AREA.put("430703", "湖南省常德市鼎城区");
AREA.put("430721", "湖南省常德市安乡县");
AREA.put("430722", "湖南省常德市汉寿县");
AREA.put("430723", "湖南省常德市澧县");
AREA.put("430724", "湖南省常德市临澧县");
AREA.put("430725", "湖南省常德市桃源县");
AREA.put("430726", "湖南省常德市石门县");
AREA.put("430781", "湖南省常德市津市市");
AREA.put("430800", "湖南省张家界市");
AREA.put("320723", "江苏省连云港市灌云县");
AREA.put("320724", "江苏省连云港市灌南县");
AREA.put("320800", "江苏省淮安市");
AREA.put("320801", "江苏省淮安市");
AREA.put("330781", "浙江省金华市兰溪市");
AREA.put("230622", "黑龙江省大庆市肇源县");
AREA.put("230623", "黑龙江省大庆市林甸县");
AREA.put("230624", "黑龙江省大庆市杜尔伯特蒙古族自治县");
AREA.put("230700", "黑龙江省伊春市");
AREA.put("230701", "黑龙江省伊春市");
AREA.put("230702", "黑龙江省伊春市伊春区");
AREA.put("230703", "黑龙江省伊春市南岔区");
AREA.put("230704", "黑龙江省伊春市友好区");
AREA.put("230705", "黑龙江省伊春市西林区");
AREA.put("230706", "黑龙江省伊春市翠峦区");
AREA.put("230707", "黑龙江省伊春市新青区");
AREA.put("230708", "黑龙江省伊春市美溪区");
AREA.put("230709", "黑龙江省伊春市金山屯区");
AREA.put("230710", "黑龙江省伊春市五营区");
AREA.put("230711", "黑龙江省伊春市乌马河区");
AREA.put("230712", "黑龙江省伊春市汤旺河区");
AREA.put("230713", "黑龙江省伊春市带岭区");
AREA.put("230714", "黑龙江省伊春市乌伊岭区");
AREA.put("230715", "黑龙江省伊春市红星区");
AREA.put("230716", "黑龙江省伊春市上甘岭区");
AREA.put("230722", "黑龙江省伊春市嘉荫县");
AREA.put("230781", "黑龙江省伊春市铁力市");
AREA.put("230800", "黑龙江省佳木斯市");
AREA.put("230801", "黑龙江省佳木斯市");
AREA.put("230802", "黑龙江省佳木斯市永红区");
AREA.put("230803", "黑龙江省佳木斯市向阳区");
AREA.put("230804", "黑龙江省佳木斯市前进区");
AREA.put("230805", "黑龙江省佳木斯市东风区");
AREA.put("230811", "黑龙江省佳木斯市郊区");
AREA.put("230822", "黑龙江省佳木斯市桦南县");
AREA.put("230826", "黑龙江省佳木斯市桦川县");
AREA.put("230828", "黑龙江省佳木斯市汤原县");
AREA.put("230833", "黑龙江省佳木斯市抚远县");
AREA.put("230881", "黑龙江省佳木斯市同江市");
AREA.put("230882", "黑龙江省佳木斯市富锦市");
AREA.put("230900", "黑龙江省七台河市");
AREA.put("230901", "黑龙江省七台河市");
AREA.put("230902", "黑龙江省七台河市新兴区");
AREA.put("230903", "黑龙江省七台河市桃山区");
AREA.put("230904", "黑龙江省七台河市茄子河区");
AREA.put("230921", "黑龙江省七台河市勃利县");
AREA.put("231000", "黑龙江省牡丹江市");
AREA.put("231001", "黑龙江省牡丹江市");
AREA.put("231002", "黑龙江省牡丹江市东安区");
AREA.put("231003", "黑龙江省牡丹江市阳明区");
AREA.put("231004", "黑龙江省牡丹江市爱民区");
AREA.put("231005", "黑龙江省牡丹江市西安区");
AREA.put("231024", "黑龙江省牡丹江市东宁县");
AREA.put("231025", "黑龙江省牡丹江市林口县");
AREA.put("231081", "黑龙江省牡丹江市绥芬河市");
AREA.put("231083", "黑龙江省牡丹江市海林市");
AREA.put("231084", "黑龙江省牡丹江市宁安市");
AREA.put("231085", "黑龙江省牡丹江市穆棱市");
AREA.put("231100", "黑龙江省黑河市");
AREA.put("231101", "黑龙江省黑河市");
AREA.put("231102", "黑龙江省黑河市爱辉区");
AREA.put("231121", "黑龙江省黑河市嫩江县");
AREA.put("360403", "江西省九江市浔阳区");
AREA.put("231124", "黑龙江省黑河市孙吴县");
AREA.put("231181", "黑龙江省黑河市北安市");
AREA.put("231182", "黑龙江省黑河市五大连池市");
AREA.put("231200", "黑龙江省绥化市");
AREA.put("231201", "黑龙江省绥化市");
AREA.put("231202", "黑龙江省绥化市北林区");
AREA.put("231221", "黑龙江省绥化市望奎县");
AREA.put("231222", "黑龙江省绥化市兰西县");
AREA.put("231223", "黑龙江省绥化市青冈县");
AREA.put("231224", "黑龙江省绥化市庆安县");
AREA.put("231225", "黑龙江省绥化市明水县");
AREA.put("231226", "黑龙江省绥化市绥棱县");
AREA.put("231281", "黑龙江省绥化市安达市");
AREA.put("231282", "黑龙江省绥化市肇东市");
AREA.put("231283", "黑龙江省绥化市海伦市");
AREA.put("232700", "黑龙江省大兴安岭地区");
AREA.put("232721", "黑龙江省大兴安岭地区呼玛县");
AREA.put("232722", "黑龙江省大兴安岭地区塔河县");
AREA.put("232723", "黑龙江省大兴安岭地区漠河县");
AREA.put("310000", "上海市");
AREA.put("310100", "上海市");
AREA.put("310101", "上海市黄浦区");
AREA.put("310103", "上海市卢湾区");
AREA.put("310104", "上海市徐汇区");
AREA.put("310105", "上海市长宁区");
AREA.put("310106", "上海市静安区");
AREA.put("310107", "上海市普陀区");
AREA.put("310108", "上海市闸北区");
AREA.put("310109", "上海市虹口区");
AREA.put("310110", "上海市杨浦区");
AREA.put("310112", "上海市闵行区");
AREA.put("310113", "上海市宝山区");
AREA.put("310114", "上海市嘉定区");
AREA.put("310115", "上海市浦东新区");
AREA.put("310116", "上海市金山区");
AREA.put("310117", "上海市松江区");
AREA.put("310118", "上海市青浦区");
AREA.put("310119", "上海市南汇区");
AREA.put("310120", "上海市奉贤区");
AREA.put("310200", "上海市");
AREA.put("310230", "上海市崇明县");
AREA.put("320000", "江苏省");
AREA.put("429021", "湖北省神农架林区");
AREA.put("430000", "湖南省");
AREA.put("430100", "湖南省长沙市");
AREA.put("430101", "湖南省长沙市");
AREA.put("430102", "湖南省长沙市芙蓉区");
AREA.put("430103", "湖南省长沙市天心区");
AREA.put("430104", "湖南省长沙市岳麓区");
AREA.put("430105", "湖南省长沙市开福区");
AREA.put("430111", "湖南省长沙市雨花区");
AREA.put("430121", "湖南省长沙市长沙县");
AREA.put("430122", "湖南省长沙市望城县");
AREA.put("430124", "湖南省长沙市宁乡县");
AREA.put("430181", "湖南省长沙市浏阳市");
AREA.put("430200", "湖南省株洲市");
AREA.put("430201", "湖南省株洲市");
AREA.put("430202", "湖南省株洲市荷塘区");
AREA.put("430203", "湖南省株洲市芦淞区");
AREA.put("430204", "湖南省株洲市石峰区");
AREA.put("430211", "湖南省株洲市天元区");
AREA.put("430221", "湖南省株洲市株洲县");
AREA.put("430223", "湖南省株洲市攸县");
AREA.put("430224", "湖南省株洲市茶陵县");
AREA.put("430225", "湖南省株洲市炎陵县");
AREA.put("430281", "湖南省株洲市醴陵市");
AREA.put("430300", "湖南省湘潭市");
AREA.put("430301", "湖南省湘潭市");
AREA.put("430302", "湖南省湘潭市雨湖区");
AREA.put("430304", "湖南省湘潭市岳塘区");
AREA.put("430321", "湖南省湘潭市湘潭县");
AREA.put("420500", "湖北省宜昌市");
AREA.put("411525", "河南省信阳市固始县");
AREA.put("411526", "河南省信阳市潢川县");
AREA.put("411527", "河南省信阳市淮滨县");
AREA.put("411528", "河南省信阳市息县");
AREA.put("411600", "河南省周口市");
AREA.put("411601", "河南省周口市");
AREA.put("411602", "河南省周口市川汇区");
AREA.put("411621", "河南省周口市扶沟县");
AREA.put("411622", "河南省周口市西华县");
AREA.put("411623", "河南省周口市商水县");
AREA.put("411624", "河南省周口市沈丘县");
AREA.put("411625", "河南省周口市郸城县");
AREA.put("411626", "河南省周口市淮阳县");
AREA.put("411627", "河南省周口市太康县");
AREA.put("411628", "河南省周口市鹿邑县");
AREA.put("411681", "河南省周口市项城市");
AREA.put("411700", "河南省驻马店市");
AREA.put("411701", "河南省驻马店市");
AREA.put("411702", "河南省驻马店市驿城区");
AREA.put("411721", "河南省驻马店市西平县");
AREA.put("411722", "河南省驻马店市上蔡县");
AREA.put("411723", "河南省驻马店市平舆县");
AREA.put("411724", "河南省驻马店市正阳县");
AREA.put("411725", "河南省驻马店市确山县");
AREA.put("411726", "河南省驻马店市泌阳县");
AREA.put("411727", "河南省驻马店市汝南县");
AREA.put("411728", "河南省驻马店市遂平县");
AREA.put("411729", "河南省驻马店市新蔡县");
AREA.put("420000", "湖北省");
AREA.put("420100", "湖北省武汉市");
AREA.put("420101", "湖北省武汉市");
AREA.put("420102", "湖北省武汉市江岸区");
AREA.put("420103", "湖北省武汉市江汉区");
AREA.put("420104", "湖北省武汉市乔口区");
AREA.put("420105", "湖北省武汉市汉阳区");
AREA.put("420106", "湖北省武汉市武昌区");
AREA.put("420107", "湖北省武汉市青山区");
AREA.put("420111", "湖北省武汉市洪山区");
AREA.put("420112", "湖北省武汉市东西湖区");
AREA.put("420113", "湖北省武汉市汉南区");
AREA.put("420114", "湖北省武汉市蔡甸区");
AREA.put("420115", "湖北省武汉市江夏区");
AREA.put("420116", "湖北省武汉市黄陂区");
AREA.put("420117", "湖北省武汉市新洲区");
AREA.put("420200", "湖北省黄石市");
AREA.put("420201", "湖北省黄石市");
AREA.put("420202", "湖北省黄石市黄石港区");
AREA.put("420203", "湖北省黄石市西塞山区");
AREA.put("420204", "湖北省黄石市下陆区");
AREA.put("420205", "湖北省黄石市铁山区");
AREA.put("420222", "湖北省黄石市阳新县");
AREA.put("420281", "湖北省黄石市大冶市");
AREA.put("420300", "湖北省十堰市");
AREA.put("420301", "湖北省十堰市");
AREA.put("420302", "湖北省十堰市茅箭区");
AREA.put("420303", "湖北省十堰市张湾区");
AREA.put("420321", "湖北省十堰市郧县");
AREA.put("420322", "湖北省十堰市郧西县");
AREA.put("420323", "湖北省十堰市竹山县");
AREA.put("420324", "湖北省十堰市竹溪县");
AREA.put("420325", "湖北省十堰市房县");
AREA.put("420381", "湖北省十堰市丹江口市");
AREA.put("420501", "湖北省宜昌市");
AREA.put("430400", "湖南省衡阳市");
AREA.put("410401", "河南省平顶山市");
AREA.put("410402", "河南省平顶山市新华区");
AREA.put("410403", "河南省平顶山市卫东区");
AREA.put("410404", "河南省平顶山市石龙区");
AREA.put("410411", "河南省平顶山市湛河区");
AREA.put("410421", "河南省平顶山市宝丰县");
AREA.put("410422", "河南省平顶山市叶县");
AREA.put("410423", "河南省平顶山市鲁山县");
AREA.put("410425", "河南省平顶山市郏县");
AREA.put("410481", "河南省平顶山市舞钢市");
AREA.put("410482", "河南省平顶山市汝州市");
AREA.put("410500", "河南省安阳市");
AREA.put("410501", "河南省安阳市");
AREA.put("410502", "河南省安阳市文峰区");
AREA.put("410503", "河南省安阳市北关区");
AREA.put("410505", "河南省安阳市殷都区");
AREA.put("410506", "河南省安阳市龙安区");
AREA.put("410522", "河南省安阳市安阳县");
AREA.put("410523", "河南省安阳市汤阴县");
AREA.put("410526", "河南省安阳市滑县");
AREA.put("410527", "河南省安阳市内黄县");
AREA.put("410581", "河南省安阳市林州市");
AREA.put("410600", "河南省鹤壁市");
AREA.put("410601", "河南省鹤壁市");
AREA.put("410602", "河南省鹤壁市鹤山区");
AREA.put("410603", "河南省鹤壁市山城区");
AREA.put("410611", "河南省鹤壁市淇滨区");
AREA.put("410621", "河南省鹤壁市浚县");
AREA.put("410622", "河南省鹤壁市淇县");
AREA.put("410700", "河南省新乡市");
AREA.put("410701", "河南省新乡市");
AREA.put("410702", "河南省新乡市红旗区");
AREA.put("410703", "河南省新乡市卫滨区");
AREA.put("410704", "河南省新乡市凤泉区");
AREA.put("410711", "河南省新乡市牧野区");
AREA.put("410721", "河南省新乡市新乡县");
AREA.put("410724", "河南省新乡市获嘉县");
AREA.put("410725", "河南省新乡市原阳县");
AREA.put("410726", "河南省新乡市延津县");
AREA.put("410727", "河南省新乡市封丘县");
AREA.put("410728", "河南省新乡市长垣县");
AREA.put("410781", "河南省新乡市卫辉市");
AREA.put("410782", "河南省新乡市辉县市");
AREA.put("410800", "河南省焦作市");
AREA.put("410801", "河南省焦作市");
AREA.put("410802", "河南省焦作市解放区");
AREA.put("410803", "河南省焦作市中站区");
AREA.put("410804", "河南省焦作市马村区");
AREA.put("410811", "河南省焦作市山阳区");
AREA.put("410821", "河南省焦作市修武县");
AREA.put("410822", "河南省焦作市博爱县");
AREA.put("410823", "河南省焦作市武陟县");
AREA.put("410825", "河南省焦作市温县");
AREA.put("410881", "河南省焦作市济源市");
AREA.put("410882", "河南省焦作市沁阳市");
AREA.put("410883", "河南省焦作市孟州市");
AREA.put("410900", "河南省濮阳市");
AREA.put("410901", "河南省濮阳市");
AREA.put("410902", "河南省濮阳市华龙区");
AREA.put("410922", "河南省濮阳市清丰县");
AREA.put("430382", "湖南省湘潭市韶山市");
AREA.put("421124", "湖北省黄冈市英山县");
AREA.put("410927", "河南省濮阳市台前县");
AREA.put("410928", "河南省濮阳市濮阳县");
AREA.put("411000", "河南省许昌市");
AREA.put("411001", "河南省许昌市");
AREA.put("411002", "河南省许昌市魏都区");
AREA.put("411023", "河南省许昌市许昌县");
AREA.put("411024", "河南省许昌市鄢陵县");
AREA.put("411025", "河南省许昌市襄城县");
AREA.put("411081", "河南省许昌市禹州市");
AREA.put("411082", "河南省许昌市长葛市");
AREA.put("411100", "河南省漯河市");
AREA.put("411101", "河南省漯河市");
AREA.put("411102", "河南省漯河市源汇区");
AREA.put("411103", "河南省漯河市郾城区");
AREA.put("411104", "河南省漯河市召陵区");
AREA.put("411121", "河南省漯河市舞阳县");
AREA.put("411122", "河南省漯河市临颍县");
AREA.put("411200", "河南省三门峡市");
AREA.put("411201", "河南省三门峡市");
AREA.put("411202", "河南省三门峡市湖滨区");
AREA.put("411221", "河南省三门峡市渑池县");
AREA.put("411222", "河南省三门峡市陕县");
AREA.put("411224", "河南省三门峡市卢氏县");
AREA.put("411281", "河南省三门峡市义马市");
AREA.put("411282", "河南省三门峡市灵宝市");
AREA.put("411300", "河南省南阳市");
AREA.put("411301", "河南省南阳市");
AREA.put("411302", "河南省南阳市宛城区");
AREA.put("411303", "河南省南阳市卧龙区");
AREA.put("411321", "河南省南阳市南召县");
AREA.put("411322", "河南省南阳市方城县");
AREA.put("411323", "河南省南阳市西峡县");
AREA.put("411324", "河南省南阳市镇平县");
AREA.put("411325", "河南省南阳市内乡县");
AREA.put("411326", "河南省南阳市淅川县");
AREA.put("411327", "河南省南阳市社旗县");
AREA.put("411328", "河南省南阳市唐河县");
AREA.put("411329", "河南省南阳市新野县");
AREA.put("411330", "河南省南阳市桐柏县");
AREA.put("411381", "河南省南阳市邓州市");
AREA.put("411400", "河南省商丘市");
AREA.put("411401", "河南省商丘市");
AREA.put("411402", "河南省商丘市梁园区");
AREA.put("411403", "河南省商丘市睢阳区");
AREA.put("411421", "河南省商丘市民权县");
AREA.put("411422", "河南省商丘市睢县");
AREA.put("411423", "河南省商丘市宁陵县");
AREA.put("411424", "河南省商丘市柘城县");
AREA.put("411425", "河南省商丘市虞城县");
AREA.put("411426", "河南省商丘市夏邑县");
AREA.put("411481", "河南省商丘市永城市");
AREA.put("411500", "河南省信阳市");
AREA.put("411501", "河南省信阳市");
AREA.put("411502", "河南省信阳市师河区");
AREA.put("411503", "河南省信阳市平桥区");
AREA.put("411521", "河南省信阳市罗山县");
AREA.put("411522", "河南省信阳市光山县");
AREA.put("411523", "河南省信阳市新县");
AREA.put("411524", "河南省信阳市商城县");
AREA.put("440100", "广东省广州市");
AREA.put("440101", "广东省广州市");
AREA.put("410381", "河南省洛阳市偃师市");
AREA.put("410400", "河南省平顶山市");
AREA.put("510704", "四川省绵阳市游仙区");
AREA.put("510722", "四川省绵阳市三台县");
AREA.put("510723", "四川省绵阳市盐亭县");
AREA.put("510724", "四川省绵阳市安县");
AREA.put("510725", "四川省绵阳市梓潼县");
AREA.put("510726", "四川省绵阳市北川羌族自治县");
AREA.put("510727", "四川省绵阳市平武县");
AREA.put("510781", "四川省绵阳市江油市");
AREA.put("510800", "四川省广元市");
AREA.put("510801", "四川省广元市");
AREA.put("510802", "四川省广元市市中区");
AREA.put("510811", "四川省广元市元坝区");
AREA.put("510812", "四川省广元市朝天区");
AREA.put("510821", "四川省广元市旺苍县");
AREA.put("510822", "四川省广元市青川县");
AREA.put("510823", "四川省广元市剑阁县");
AREA.put("510824", "四川省广元市苍溪县");
AREA.put("510900", "四川省遂宁市");
AREA.put("510901", "四川省遂宁市");
AREA.put("510903", "四川省遂宁市船山区");
AREA.put("510904", "四川省遂宁市安居区");
AREA.put("510921", "四川省遂宁市蓬溪县");
AREA.put("510922", "四川省遂宁市射洪县");
AREA.put("510923", "四川省遂宁市大英县");
AREA.put("511000", "四川省内江市");
AREA.put("511001", "四川省内江市");
AREA.put("511002", "四川省内江市市中区");
AREA.put("511011", "四川省内江市东兴区");
AREA.put("511024", "四川省内江市威远县");
AREA.put("511025", "四川省内江市资中县");
AREA.put("511028", "四川省内江市隆昌县");
AREA.put("511100", "四川省乐山市");
AREA.put("511101", "四川省乐山市");
AREA.put("511102", "四川省乐山市市中区");
AREA.put("511111", "四川省乐山市沙湾区");
AREA.put("511112", "四川省乐山市五通桥区");
AREA.put("511113", "四川省乐山市金口河区");
AREA.put("511123", "四川省乐山市犍为县");
AREA.put("511124", "四川省乐山市井研县");
AREA.put("511126", "四川省乐山市夹江县");
AREA.put("511129", "四川省乐山市沐川县");
AREA.put("511132", "四川省乐山市峨边彝族自治县");
AREA.put("511133", "四川省乐山市马边彝族自治县");
AREA.put("511181", "四川省乐山市峨眉山市");
AREA.put("511300", "四川省南充市");
AREA.put("370826", "山东省济宁市微山县");
AREA.put("370827", "山东省济宁市鱼台县");
AREA.put("370828", "山东省济宁市金乡县");
AREA.put("370829", "山东省济宁市嘉祥县");
AREA.put("370830", "山东省济宁市汶上县");
AREA.put("370831", "山东省济宁市泗水县");
AREA.put("370832", "山东省济宁市梁山县");
AREA.put("370881", "山东省济宁市曲阜市");
AREA.put("350111", "福建省福州市晋安区");
AREA.put("350121", "福建省福州市闽侯县");
AREA.put("350122", "福建省福州市连江县");
AREA.put("350123", "福建省福州市罗源县");
AREA.put("350124", "福建省福州市闽清县");
AREA.put("350125", "福建省福州市永泰县");
AREA.put("350128", "福建省福州市平潭县");
AREA.put("350181", "福建省福州市福清市");
AREA.put("350182", "福建省福州市长乐市");
AREA.put("350200", "福建省厦门市");
AREA.put("350201", "福建省厦门市");
AREA.put("350203", "福建省厦门市思明区");
AREA.put("350205", "福建省厦门市海沧区");
AREA.put("350206", "福建省厦门市湖里区");
AREA.put("350211", "福建省厦门市集美区");
AREA.put("350212", "福建省厦门市同安区");
AREA.put("350213", "福建省厦门市翔安区");
AREA.put("350300", "福建省莆田市");
AREA.put("350301", "福建省莆田市");
AREA.put("350302", "福建省莆田市城厢区");
AREA.put("350303", "福建省莆田市涵江区");
AREA.put("350304", "福建省莆田市荔城区");
AREA.put("350305", "福建省莆田市秀屿区");
AREA.put("350322", "福建省莆田市仙游县");
AREA.put("350400", "福建省三明市");
AREA.put("350401", "福建省三明市");
AREA.put("350402", "福建省三明市梅列区");
AREA.put("350403", "福建省三明市三元区");
AREA.put("350421", "福建省三明市明溪县");
AREA.put("350423", "福建省三明市清流县");
AREA.put("350424", "福建省三明市宁化县");
AREA.put("350425", "福建省三明市大田县");
AREA.put("350426", "福建省三明市尤溪县");
AREA.put("350427", "福建省三明市沙县");
AREA.put("350428", "福建省三明市将乐县");
AREA.put("350429", "福建省三明市泰宁县");
AREA.put("350430", "福建省三明市建宁县");
AREA.put("350481", "福建省三明市永安市");
AREA.put("350500", "福建省泉州市");
AREA.put("350501", "福建省泉州市");
AREA.put("350502", "福建省泉州市鲤城区");
AREA.put("350503", "福建省泉州市丰泽区");
AREA.put("350504", "福建省泉州市洛江区");
AREA.put("350505", "福建省泉州市泉港区");
AREA.put("350521", "福建省泉州市惠安县");
AREA.put("350524", "福建省泉州市安溪县");
AREA.put("350525", "福建省泉州市永春县");
AREA.put("350526", "福建省泉州市德化县");
AREA.put("350527", "福建省泉州市金门县");
AREA.put("350581", "福建省泉州市石狮市");
AREA.put("350582", "福建省泉州市晋江市");
AREA.put("350583", "福建省泉州市南安市");
AREA.put("350600", "福建省漳州市");
AREA.put("350601", "福建省漳州市");
AREA.put("350602", "福建省漳州市芗城区");
AREA.put("350603", "福建省漳州市龙文区");
AREA.put("350622", "福建省漳州市云霄县");
AREA.put("350623", "福建省漳州市漳浦县");
AREA.put("350624", "福建省漳州市诏安县");
AREA.put("350625", "福建省漳州市长泰县");
AREA.put("350626", "福建省漳州市东山县");
AREA.put("350627", "福建省漳州市南靖县");
AREA.put("341200", "安徽省阜阳市");
AREA.put("341201", "安徽省阜阳市");
AREA.put("341202", "安徽省阜阳市颍州区");
AREA.put("341203", "安徽省阜阳市颍东区");
AREA.put("341204", "安徽省阜阳市颍泉区");
AREA.put("341221", "安徽省阜阳市临泉县");
AREA.put("341222", "安徽省阜阳市太和县");
AREA.put("341225", "安徽省阜阳市阜南县");
AREA.put("341226", "安徽省阜阳市颍上县");
AREA.put("341282", "安徽省阜阳市界首市");
AREA.put("341300", "安徽省宿州市");
AREA.put("341301", "安徽省宿州市");
AREA.put("341302", "安徽省宿州市墉桥区");
AREA.put("341321", "安徽省宿州市砀山县");
AREA.put("341322", "安徽省宿州市萧县");
AREA.put("341323", "安徽省宿州市灵璧县");
AREA.put("341324", "安徽省宿州市泗县");
AREA.put("341400", "安徽省巢湖市");
AREA.put("341401", "安徽省巢湖市");
AREA.put("341402", "安徽省巢湖市居巢区");
AREA.put("341421", "安徽省巢湖市庐江县");
AREA.put("341422", "安徽省巢湖市无为县");
AREA.put("341423", "安徽省巢湖市含山县");
AREA.put("341424", "安徽省巢湖市和县");
AREA.put("341500", "安徽省六安市");
AREA.put("341501", "安徽省六安市");
AREA.put("341502", "安徽省六安市金安区");
AREA.put("341503", "安徽省六安市裕安区");
AREA.put("341521", "安徽省六安市寿县");
AREA.put("341522", "安徽省六安市霍邱县");
AREA.put("341523", "安徽省六安市舒城县");
AREA.put("341524", "安徽省六安市金寨县");
AREA.put("341525", "安徽省六安市霍山县");
AREA.put("341600", "安徽省亳州市");
AREA.put("341601", "安徽省亳州市");
AREA.put("341602", "安徽省亳州市谯城区");
AREA.put("445301", "广东省云浮市");
AREA.put("445302", "广东省云浮市云城区");
AREA.put("445321", "广东省云浮市新兴县");
AREA.put("445322", "广东省云浮市郁南县");
AREA.put("445323", "广东省云浮市云安县");
AREA.put("445381", "广东省云浮市罗定市");
AREA.put("450000", "广西壮族自治区");
AREA.put("450100", "广西壮族自治区南宁市");
AREA.put("450101", "广西壮族自治区南宁市");
AREA.put("450102", "广西壮族自治区南宁市兴宁区");
AREA.put("450103", "广西壮族自治区南宁市青秀区");
AREA.put("450105", "广西壮族自治区南宁市江南区");
AREA.put("450107", "广西壮族自治区南宁市西乡塘区");
AREA.put("450108", "广西壮族自治区南宁市良庆区");
AREA.put("450109", "广西壮族自治区南宁市邕宁区");
AREA.put("450122", "广西壮族自治区南宁市武鸣县");
AREA.put("450123", "广西壮族自治区南宁市隆安县");
AREA.put("450124", "广西壮族自治区南宁市马山县");
AREA.put("450125", "广西壮族自治区南宁市上林县");
AREA.put("450126", "广西壮族自治区南宁市宾阳县");
AREA.put("450127", "广西壮族自治区南宁市横县");
AREA.put("450200", "广西壮族自治区柳州市");
AREA.put("450201", "广西壮族自治区柳州市");
AREA.put("450202", "广西壮族自治区柳州市城中区");
AREA.put("450203", "广西壮族自治区柳州市鱼峰区");
AREA.put("450204", "广西壮族自治区柳州市柳南区");
AREA.put("450205", "广西壮族自治区柳州市柳北区");
AREA.put("450221", "广西壮族自治区柳州市柳江县");
AREA.put("450222", "广西壮族自治区柳州市柳城县");
AREA.put("450223", "广西壮族自治区柳州市鹿寨县");
AREA.put("460105", "海南省海口市秀英区");
AREA.put("522625", "贵州省黔东南苗族侗族自治州镇远县");
AREA.put("460107", "海南省海口市琼山区");
AREA.put("460108", "海南省海口市美兰区");
AREA.put("460200", "海南省三亚市");
AREA.put("460201", "海南省三亚市");
AREA.put("469000", "海南省省直辖县级行政单位");
AREA.put("469001", "海南省五指山市");
AREA.put("469002", "海南省琼海市");
AREA.put("469003", "海南省儋州市");
AREA.put("469005", "海南省文昌市");
AREA.put("469006", "海南省万宁市");
AREA.put("469007", "海南省东方市");
AREA.put("469025", "海南省定安县");
AREA.put("469026", "海南省屯昌县");
AREA.put("469027", "海南省澄迈县");
AREA.put("469028", "海南省临高县");
AREA.put("469030", "海南省白沙黎族自治县");
AREA.put("469031", "海南省昌江黎族自治县");
AREA.put("469033", "海南省乐东黎族自治县");
AREA.put("469034", "海南省陵水黎族自治县");
AREA.put("469035", "海南省保亭黎族苗族自治县");
AREA.put("469036", "海南省琼中黎族苗族自治县");
AREA.put("469037", "海南省西沙群岛");
AREA.put("469038", "海南省南沙群岛");
AREA.put("469039", "海南省中沙群岛的岛礁及其海域");
AREA.put("500000", "重庆市");
AREA.put("500100", "重庆市");
AREA.put("500101", "重庆市万州区");
AREA.put("500102", "重庆市涪陵区");
AREA.put("500103", "重庆市渝中区");
AREA.put("500104", "重庆市大渡口区");
AREA.put("500105", "重庆市江北区");
AREA.put("500106", "重庆市沙坪坝区");
AREA.put("500107", "重庆市九龙坡区");
AREA.put("500108", "重庆市南岸区");
AREA.put("500109", "重庆市北碚区");
AREA.put("500110", "重庆市万盛区");
AREA.put("500111", "重庆市双桥区");
AREA.put("500112", "重庆市渝北区");
AREA.put("500113", "重庆市巴南区");
AREA.put("500114", "重庆市黔江区");
AREA.put("500115", "重庆市长寿区");
AREA.put("500200", "重庆市");
AREA.put("500222", "重庆市綦江县");
AREA.put("500223", "重庆市潼南县");
AREA.put("500224", "重庆市铜梁县");
AREA.put("500225", "重庆市大足县");
AREA.put("500226", "重庆市荣昌县");
AREA.put("500227", "重庆市璧山县");
AREA.put("500228", "重庆市梁平县");
AREA.put("500229", "重庆市城口县");
AREA.put("500230", "重庆市丰都县");
AREA.put("500231", "重庆市垫江县");
AREA.put("500232", "重庆市武隆县");
AREA.put("500233", "重庆市忠县");
AREA.put("500234", "重庆市开县");
AREA.put("500235", "重庆市云阳县");
AREA.put("500236", "重庆市奉节县");
AREA.put("500237", "重庆市巫山县");
AREA.put("500238", "重庆市巫溪县");
AREA.put("500240", "重庆市石柱土家族自治县");
AREA.put("440783", "广东省江门市开平市");
AREA.put("450901", "广西壮族自治区玉林市");
AREA.put("440785", "广东省江门市恩平市");
AREA.put("440800", "广东省湛江市");
AREA.put("440801", "广东省湛江市");
AREA.put("440802", "广东省湛江市赤坎区");
AREA.put("440803", "广东省湛江市霞山区");
AREA.put("440804", "广东省湛江市坡头区");
AREA.put("440811", "广东省湛江市麻章区");
AREA.put("440823", "广东省湛江市遂溪县");
AREA.put("440825", "广东省湛江市徐闻县");
AREA.put("440881", "广东省湛江市廉江市");
AREA.put("440882", "广东省湛江市雷州市");
AREA.put("440883", "广东省湛江市吴川市");
AREA.put("440900", "广东省茂名市");
AREA.put("440901", "广东省茂名市");
AREA.put("440902", "广东省茂名市茂南区");
AREA.put("440903", "广东省茂名市茂港区");
AREA.put("440923", "广东省茂名市电白县");
AREA.put("440981", "广东省茂名市高州市");
AREA.put("440982", "广东省茂名市化州市");
AREA.put("440983", "广东省茂名市信宜市");
AREA.put("441200", "广东省肇庆市");
AREA.put("441201", "广东省肇庆市");
AREA.put("441202", "广东省肇庆市端州区");
AREA.put("441203", "广东省肇庆市鼎湖区");
AREA.put("441223", "广东省肇庆市广宁县");
AREA.put("441224", "广东省肇庆市怀集县");
AREA.put("441225", "广东省肇庆市封开县");
AREA.put("441226", "广东省肇庆市德庆县");
AREA.put("441283", "广东省肇庆市高要市");
AREA.put("441284", "广东省肇庆市四会市");
AREA.put("441300", "广东省惠州市");
AREA.put("441301", "广东省惠州市");
AREA.put("441302", "广东省惠州市惠城区");
AREA.put("441303", "广东省惠州市惠阳区");
AREA.put("441322", "广东省惠州市博罗县");
AREA.put("441323", "广东省惠州市惠东县");
AREA.put("441324", "广东省惠州市龙门县");
AREA.put("441400", "广东省梅州市");
AREA.put("441401", "广东省梅州市");
AREA.put("441402", "广东省梅州市梅江区");
AREA.put("441421", "广东省梅州市梅县");
AREA.put("441422", "广东省梅州市大埔县");
AREA.put("441423", "广东省梅州市丰顺县");
AREA.put("441424", "广东省梅州市五华县");
AREA.put("441426", "广东省梅州市平远县");
AREA.put("441427", "广东省梅州市蕉岭县");
AREA.put("441481", "广东省梅州市兴宁市");
AREA.put("441500", "广东省汕尾市");
AREA.put("441501", "广东省汕尾市");
AREA.put("441502", "广东省汕尾市城区");
AREA.put("441521", "广东省汕尾市海丰县");
AREA.put("441523", "广东省汕尾市陆河县");
AREA.put("441581", "广东省汕尾市陆丰市");
AREA.put("441600", "广东省河源市");
AREA.put("441601", "广东省河源市");
AREA.put("441602", "广东省河源市源城区");
AREA.put("441621", "广东省河源市紫金县");
AREA.put("441622", "广东省河源市龙川县");
AREA.put("441623", "广东省河源市连平县");
AREA.put("441624", "广东省河源市和平县");
AREA.put("441625", "广东省河源市东源县");
AREA.put("450224", "广西壮族自治区柳州市融安县");
AREA.put("500243", "重庆市彭水苗族土家族自治县");
AREA.put("500300", "重庆市");
AREA.put("440105", "广东省广州市海珠区");
AREA.put("440106", "广东省广州市天河区");
AREA.put("440107", "广东省广州市芳村区");
AREA.put("440111", "广东省广州市白云区");
AREA.put("440112", "广东省广州市黄埔区");
AREA.put("440113", "广东省广州市番禺区");
AREA.put("440114", "广东省广州市花都区");
AREA.put("440183", "广东省广州市增城市");
AREA.put("440184", "广东省广州市从化市");
AREA.put("440200", "广东省韶关市");
AREA.put("440201", "广东省韶关市");
AREA.put("440203", "广东省韶关市武江区");
AREA.put("440204", "广东省韶关市浈江区");
AREA.put("440205", "广东省韶关市曲江区");
AREA.put("440222", "广东省韶关市始兴县");
AREA.put("440224", "广东省韶关市仁化县");
AREA.put("440229", "广东省韶关市翁源县");
AREA.put("440232", "广东省韶关市乳源瑶族自治县");
AREA.put("440233", "广东省韶关市新丰县");
AREA.put("440281", "广东省韶关市乐昌市");
AREA.put("440282", "广东省韶关市南雄市");
AREA.put("440300", "广东省深圳市");
AREA.put("440301", "广东省深圳市");
AREA.put("440303", "广东省深圳市罗湖区");
AREA.put("440304", "广东省深圳市福田区");
AREA.put("440305", "广东省深圳市南山区");
AREA.put("440306", "广东省深圳市宝安区");
AREA.put("440307", "广东省深圳市龙岗区");
AREA.put("440308", "广东省深圳市盐田区");
AREA.put("440400", "广东省珠海市");
AREA.put("440401", "广东省珠海市");
AREA.put("440402", "广东省珠海市香洲区");
AREA.put("440403", "广东省珠海市斗门区");
AREA.put("440404", "广东省珠海市金湾区");
AREA.put("440500", "广东省汕头市");
AREA.put("440501", "广东省汕头市");
AREA.put("440507", "广东省汕头市龙湖区");
AREA.put("440511", "广东省汕头市金平区");
AREA.put("440512", "广东省汕头市濠江区");
AREA.put("440513", "广东省汕头市潮阳区");
AREA.put("440514", "广东省汕头市潮南区");
AREA.put("440515", "广东省汕头市澄海区");
AREA.put("440523", "广东省汕头市南澳县");
AREA.put("440600", "广东省佛山市");
AREA.put("440601", "广东省佛山市");
AREA.put("440604", "广东省佛山市禅城区");
AREA.put("440605", "广东省佛山市南海区");
AREA.put("440606", "广东省佛山市顺德区");
AREA.put("440607", "广东省佛山市三水区");
AREA.put("440608", "广东省佛山市高明区");
AREA.put("440700", "广东省江门市");
AREA.put("440701", "广东省江门市");
AREA.put("440703", "广东省江门市蓬江区");
AREA.put("440704", "广东省江门市江海区");
AREA.put("440705", "广东省江门市新会区");
AREA.put("440781", "广东省江门市台山市");
AREA.put("460100", "海南省海口市");
AREA.put("460101", "海南省海口市");
AREA.put("500241", "重庆市秀山土家族苗族自治县");
AREA.put("500242", "重庆市酉阳土家族苗族自治县");
AREA.put("441701", "广东省阳江市");
AREA.put("450921", "广西壮族自治区玉林市容县");
AREA.put("450922", "广西壮族自治区玉林市陆川县");
AREA.put("450923", "广西壮族自治区玉林市博白县");
AREA.put("450924", "广西壮族自治区玉林市兴业县");
AREA.put("450981", "广西壮族自治区玉林市北流市");
AREA.put("451000", "广西壮族自治区百色市");
AREA.put("451001", "广西壮族自治区百色市");
AREA.put("451002", "广西壮族自治区百色市右江区");
AREA.put("451021", "广西壮族自治区百色市田阳县");
AREA.put("451022", "广西壮族自治区百色市田东县");
AREA.put("451023", "广西壮族自治区百色市平果县");
AREA.put("451024", "广西壮族自治区百色市德保县");
AREA.put("451025", "广西壮族自治区百色市靖西县");
AREA.put("451026", "广西壮族自治区百色市那坡县");
AREA.put("451027", "广西壮族自治区百色市凌云县");
AREA.put("451028", "广西壮族自治区百色市乐业县");
AREA.put("451029", "广西壮族自治区百色市田林县");
AREA.put("451030", "广西壮族自治区百色市西林县");
AREA.put("451031", "广西壮族自治区百色市隆林各族自治县");
AREA.put("451100", "广西壮族自治区贺州市");
AREA.put("451101", "广西壮族自治区贺州市");
AREA.put("451102", "广西壮族自治区贺州市八步区");
AREA.put("451121", "广西壮族自治区贺州市昭平县");
AREA.put("451122", "广西壮族自治区贺州市钟山县");
AREA.put("451123", "广西壮族自治区贺州市富川瑶族自治县");
AREA.put("451200", "广西壮族自治区河池市");
AREA.put("451201", "广西壮族自治区河池市");
AREA.put("451202", "广西壮族自治区河池市金城江区");
AREA.put("451221", "广西壮族自治区河池市南丹县");
AREA.put("451222", "广西壮族自治区河池市天峨县");
AREA.put("451223", "广西壮族自治区河池市凤山县");
AREA.put("451224", "广西壮族自治区河池市东兰县");
AREA.put("451225", "广西壮族自治区河池市罗城仫佬族自治县");
AREA.put("451226", "广西壮族自治区河池市环江毛南族自治县");
AREA.put("451227", "广西壮族自治区河池市巴马瑶族自治县");
AREA.put("451228", "广西壮族自治区河池市都安瑶族自治县");
AREA.put("451229", "广西壮族自治区河池市大化瑶族自治县");
AREA.put("451281", "广西壮族自治区河池市宜州市");
AREA.put("451300", "广西壮族自治区来宾市");
AREA.put("451301", "广西壮族自治区来宾市");
AREA.put("451302", "广西壮族自治区来宾市兴宾区");
AREA.put("451321", "广西壮族自治区来宾市忻城县");
AREA.put("430801", "湖南省张家界市");
AREA.put("430802", "湖南省张家界市永定区");
AREA.put("430811", "湖南省张家界市武陵源区");
AREA.put("430821", "湖南省张家界市慈利县");
AREA.put("430822", "湖南省张家界市桑植县");
AREA.put("430900", "湖南省益阳市");
AREA.put("430901", "湖南省益阳市");
AREA.put("430902", "湖南省益阳市资阳区");
AREA.put("430903", "湖南省益阳市赫山区");
AREA.put("430921", "湖南省益阳市南县");
AREA.put("441700", "广东省阳江市");
AREA.put("420502", "湖北省宜昌市西陵区");
AREA.put("430981", "湖南省益阳市沅江市");
AREA.put("431000", "湖南省郴州市");
AREA.put("431001", "湖南省郴州市");
AREA.put("431002", "湖南省郴州市北湖区");
AREA.put("431003", "湖南省郴州市苏仙区");
AREA.put("431021", "湖南省郴州市桂阳县");
AREA.put("431022", "湖南省郴州市宜章县");
AREA.put("431023", "湖南省郴州市永兴县");
AREA.put("431024", "湖南省郴州市嘉禾县");
AREA.put("431025", "湖南省郴州市临武县");
AREA.put("431026", "湖南省郴州市汝城县");
AREA.put("431027", "湖南省郴州市桂东县");
AREA.put("431028", "湖南省郴州市安仁县");
AREA.put("431081", "湖南省郴州市资兴市");
AREA.put("431100", "湖南省永州市");
AREA.put("431101", "湖南省永州市");
AREA.put("431102", "湖南省永州市芝山区");
AREA.put("431103", "湖南省永州市冷水滩区");
AREA.put("431121", "湖南省永州市祁阳县");
AREA.put("431122", "湖南省永州市东安县");
AREA.put("431123", "湖南省永州市双牌县");
AREA.put("431124", "湖南省永州市道县");
AREA.put("431125", "湖南省永州市江永县");
AREA.put("431126", "湖南省永州市宁远县");
AREA.put("431127", "湖南省永州市蓝山县");
AREA.put("431128", "湖南省永州市新田县");
AREA.put("431129", "湖南省永州市江华瑶族自治县");
AREA.put("431200", "湖南省怀化市");
AREA.put("431201", "湖南省怀化市");
AREA.put("431202", "湖南省怀化市鹤城区");
AREA.put("431221", "湖南省怀化市中方县");
AREA.put("431222", "湖南省怀化市沅陵县");
AREA.put("431223", "湖南省怀化市辰溪县");
AREA.put("431224", "湖南省怀化市溆浦县");
AREA.put("431225", "湖南省怀化市会同县");
AREA.put("431226", "湖南省怀化市麻阳苗族自治县");
AREA.put("431227", "湖南省怀化市新晃侗族自治县");
AREA.put("431228", "湖南省怀化市芷江侗族自治县");
AREA.put("431229", "湖南省怀化市靖州苗族侗族自治县");
AREA.put("431230", "湖南省怀化市通道侗族自治县");
AREA.put("431281", "湖南省怀化市洪江市");
AREA.put("431300", "湖南省娄底市");
AREA.put("431301", "湖南省娄底市");
AREA.put("431302", "湖南省娄底市娄星区");
AREA.put("431321", "湖南省娄底市双峰县");
AREA.put("431322", "湖南省娄底市新化县");
AREA.put("431381", "湖南省娄底市冷水江市");
AREA.put("431382", "湖南省娄底市涟源市");
AREA.put("433100", "湖南省湘西土家族苗族自治州");
AREA.put("433101", "湖南省湘西土家族苗族自治州吉首市");
AREA.put("433122", "湖南省湘西土家族苗族自治州泸溪县");
AREA.put("433123", "湖南省湘西土家族苗族自治州凤凰县");
AREA.put("433124", "湖南省湘西土家族苗族自治州花垣县");
AREA.put("433125", "湖南省湘西土家族苗族自治州保靖县");
AREA.put("433126", "湖南省湘西土家族苗族自治州古丈县");
AREA.put("433127", "湖南省湘西土家族苗族自治州永顺县");
AREA.put("433130", "湖南省湘西土家族苗族自治州龙山县");
AREA.put("440000", "广东省");
AREA.put("410329", "河南省洛阳市伊川县");
AREA.put("410923", "河南省濮阳市南乐县");
AREA.put("450902", "广西壮族自治区玉林市玉州区");
AREA.put("421125", "湖北省黄冈市浠水县");
AREA.put("421126", "湖北省黄冈市蕲春县");
AREA.put("421127", "湖北省黄冈市黄梅县");
AREA.put("421181", "湖北省黄冈市麻城市");
AREA.put("421182", "湖北省黄冈市武穴市");
AREA.put("421200", "湖北省咸宁市");
AREA.put("421201", "湖北省咸宁市");
AREA.put("421202", "湖北省咸宁市咸安区");
AREA.put("421221", "湖北省咸宁市嘉鱼县");
AREA.put("421222", "湖北省咸宁市通城县");
AREA.put("421223", "湖北省咸宁市崇阳县");
AREA.put("421224", "湖北省咸宁市通山县");
AREA.put("421281", "湖北省咸宁市赤壁市");
AREA.put("421300", "湖北省随州市");
AREA.put("421301", "湖北省随州市");
AREA.put("421302", "湖北省随州市曾都区");
AREA.put("421381", "湖北省随州市广水市");
AREA.put("422800", "湖北省恩施土家族苗族自治州");
AREA.put("422801", "湖北省恩施土家族苗族自治州恩施市");
AREA.put("422802", "湖北省恩施土家族苗族自治州利川市");
AREA.put("422822", "湖北省恩施土家族苗族自治州建始县");
AREA.put("422823", "湖北省恩施土家族苗族自治州巴东县");
AREA.put("422825", "湖北省恩施土家族苗族自治州宣恩县");
AREA.put("422826", "湖北省恩施土家族苗族自治州咸丰县");
AREA.put("422827", "湖北省恩施土家族苗族自治州来凤县");
AREA.put("422828", "湖北省恩施土家族苗族自治州鹤峰县");
AREA.put("429000", "湖北省省直辖行政单位");
AREA.put("429004", "湖北省仙桃市");
AREA.put("429005", "湖北省潜江市");
AREA.put("429006", "湖北省天门市");
AREA.put("530111", "云南省昆明市官渡区");
AREA.put("530112", "云南省昆明市西山区");
AREA.put("530113", "云南省昆明市东川区");
AREA.put("530121", "云南省昆明市呈贡县");
AREA.put("530122", "云南省昆明市晋宁县");
AREA.put("530124", "云南省昆明市富民县");
AREA.put("530125", "云南省昆明市宜良县");
AREA.put("530126", "云南省昆明市石林彝族自治县");
AREA.put("530127", "云南省昆明市嵩明县");
AREA.put("530128", "云南省昆明市禄劝彝族苗族自治县");
AREA.put("530129", "云南省昆明市寻甸回族彝族自治县");
AREA.put("530181", "云南省昆明市安宁市");
AREA.put("530300", "云南省曲靖市");
AREA.put("530301", "云南省曲靖市");
AREA.put("530302", "云南省曲靖市麒麟区");
AREA.put("530321", "云南省曲靖市马龙县");
AREA.put("530322", "云南省曲靖市陆良县");
AREA.put("530323", "云南省曲靖市师宗县");
AREA.put("530324", "云南省曲靖市罗平县");
AREA.put("530325", "云南省曲靖市富源县");
AREA.put("530326", "云南省曲靖市会泽县");
AREA.put("530328", "云南省曲靖市沾益县");
AREA.put("530381", "云南省曲靖市宣威市");
AREA.put("530400", "云南省玉溪市");
AREA.put("530401", "云南省玉溪市");
AREA.put("620500", "甘肃省天水市");
AREA.put("533124", "云南省德宏傣族景颇族自治州陇川县");
AREA.put("533300", "云南省怒江傈僳族自治州");
AREA.put("533321", "云南省怒江傈僳族自治州泸水县");
AREA.put("532323", "云南省楚雄彝族自治州牟定县");
AREA.put("532324", "云南省楚雄彝族自治州南华县");
AREA.put("532325", "云南省楚雄彝族自治州姚安县");
AREA.put("532326", "云南省楚雄彝族自治州大姚县");
AREA.put("532327", "云南省楚雄彝族自治州永仁县");
AREA.put("532328", "云南省楚雄彝族自治州元谋县");
AREA.put("532329", "云南省楚雄彝族自治州武定县");
AREA.put("532331", "云南省楚雄彝族自治州禄丰县");
AREA.put("532500", "云南省红河哈尼族彝族自治州");
AREA.put("532501", "云南省红河哈尼族彝族自治州个旧市");
AREA.put("532502", "云南省红河哈尼族彝族自治州开远市");
AREA.put("532522", "云南省红河哈尼族彝族自治州蒙自县");
AREA.put("532523", "云南省红河哈尼族彝族自治州屏边苗族自治县");
AREA.put("532524", "云南省红河哈尼族彝族自治州建水县");
AREA.put("532525", "云南省红河哈尼族彝族自治州石屏县");
AREA.put("532526", "云南省红河哈尼族彝族自治州弥勒县");
AREA.put("532527", "云南省红河哈尼族彝族自治州泸西县");
AREA.put("532528", "云南省红河哈尼族彝族自治州元阳县");
AREA.put("532529", "云南省红河哈尼族彝族自治州红河县");
AREA.put("532530", "云南省红河哈尼族彝族自治州金平苗族瑶族傣族自治县");
AREA.put("532531", "云南省红河哈尼族彝族自治州绿春县");
AREA.put("532532", "云南省红河哈尼族彝族自治州河口瑶族自治县");
AREA.put("532600", "云南省文山壮族苗族自治州");
AREA.put("532621", "云南省文山壮族苗族自治州文山县");
AREA.put("532622", "云南省文山壮族苗族自治州砚山县");
AREA.put("532623", "云南省文山壮族苗族自治州西畴县");
AREA.put("532624", "云南省文山壮族苗族自治州麻栗坡县");
AREA.put("532625", "云南省文山壮族苗族自治州马关县");
AREA.put("532626", "云南省文山壮族苗族自治州丘北县");
AREA.put("532627", "云南省文山壮族苗族自治州广南县");
AREA.put("532628", "云南省文山壮族苗族自治州富宁县");
AREA.put("532800", "云南省西双版纳傣族自治州");
AREA.put("532801", "云南省西双版纳傣族自治州景洪市");
AREA.put("532822", "云南省西双版纳傣族自治州勐海县");
AREA.put("532823", "云南省西双版纳傣族自治州勐腊县");
AREA.put("532900", "云南省大理白族自治州");
AREA.put("532901", "云南省大理白族自治州大理市");
AREA.put("532922", "云南省大理白族自治州漾濞彝族自治县");
AREA.put("532923", "云南省大理白族自治州祥云县");
AREA.put("532924", "云南省大理白族自治州宾川县");
AREA.put("532925", "云南省大理白族自治州弥渡县");
AREA.put("532926", "云南省大理白族自治州南涧彝族自治县");
AREA.put("532927", "云南省大理白族自治州巍山彝族回族自治县");
AREA.put("532928", "云南省大理白族自治州永平县");
AREA.put("532929", "云南省大理白族自治州云龙县");
AREA.put("532930", "云南省大理白族自治州洱源县");
AREA.put("532931", "云南省大理白族自治州剑川县");
AREA.put("532932", "云南省大理白族自治州鹤庆县");
AREA.put("533100", "云南省德宏傣族景颇族自治州");
AREA.put("533102", "云南省德宏傣族景颇族自治州瑞丽市");
AREA.put("533103", "云南省德宏傣族景颇族自治州潞西市");
AREA.put("533122", "云南省德宏傣族景颇族自治州梁河县");
AREA.put("533123", "云南省德宏傣族景颇族自治州盈江县");
AREA.put("610727", "陕西省汉中市略阳县");
AREA.put("610728", "陕西省汉中市镇巴县");
AREA.put("610729", "陕西省汉中市留坝县");
AREA.put("533323", "云南省怒江傈僳族自治州福贡县");
AREA.put("533324", "云南省怒江傈僳族自治州贡山独龙族怒族自治县");
AREA.put("533325", "云南省怒江傈僳族自治州兰坪白族普米族自治县");
AREA.put("533400", "云南省迪庆藏族自治州");
AREA.put("533421", "云南省迪庆藏族自治州香格里拉县");
AREA.put("533422", "云南省迪庆藏族自治州德钦县");
AREA.put("533423", "云南省迪庆藏族自治州维西傈僳族自治县");
AREA.put("540000", "西藏自治区");
AREA.put("540100", "西藏自治区拉萨市");
AREA.put("540101", "西藏自治区拉萨市");
AREA.put("540102", "西藏自治区拉萨市城关区");
AREA.put("540121", "西藏自治区拉萨市林周县");
AREA.put("540122", "西藏自治区拉萨市当雄县");
AREA.put("540123", "西藏自治区拉萨市尼木县");
AREA.put("540124", "西藏自治区拉萨市曲水县");
AREA.put("540125", "西藏自治区拉萨市堆龙德庆县");
AREA.put("540126", "西藏自治区拉萨市达孜县");
AREA.put("540127", "西藏自治区拉萨市墨竹工卡县");
AREA.put("542100", "西藏自治区昌都地区");
AREA.put("542121", "西藏自治区昌都地区昌都县");
AREA.put("542122", "西藏自治区昌都地区江达县");
AREA.put("542123", "西藏自治区昌都地区贡觉县");
AREA.put("542124", "西藏自治区昌都地区类乌齐县");
AREA.put("542125", "西藏自治区昌都地区丁青县");
AREA.put("542126", "西藏自治区昌都地区察雅县");
AREA.put("542127", "西藏自治区昌都地区八宿县");
AREA.put("542128", "西藏自治区昌都地区左贡县");
AREA.put("542129", "西藏自治区昌都地区芒康县");
AREA.put("542132", "西藏自治区昌都地区洛隆县");
AREA.put("542133", "西藏自治区昌都地区边坝县");
AREA.put("542200", "西藏自治区山南地区");
AREA.put("542221", "西藏自治区山南地区乃东县");
AREA.put("542222", "西藏自治区山南地区扎囊县");
AREA.put("542223", "西藏自治区山南地区贡嘎县");
AREA.put("542224", "西藏自治区山南地区桑日县");
AREA.put("542225", "西藏自治区山南地区琼结县");
AREA.put("542226", "西藏自治区山南地区曲松县");
AREA.put("542227", "西藏自治区山南地区措美县");
AREA.put("542228", "西藏自治区山南地区洛扎县");
AREA.put("542229", "西藏自治区山南地区加查县");
AREA.put("542231", "西藏自治区山南地区隆子县");
AREA.put("542232", "西藏自治区山南地区错那县");
AREA.put("542233", "西藏自治区山南地区浪卡子县");
AREA.put("542300", "西藏自治区日喀则地区");
AREA.put("542301", "西藏自治区日喀则地区日喀则市");
AREA.put("542322", "西藏自治区日喀则地区南木林县");
AREA.put("542323", "西藏自治区日喀则地区江孜县");
AREA.put("542324", "西藏自治区日喀则地区定日县");
AREA.put("542325", "西藏自治区日喀则地区萨迦县");
AREA.put("542326", "西藏自治区日喀则地区拉孜县");
AREA.put("542327", "西藏自治区日喀则地区昂仁县");
AREA.put("542328", "西藏自治区日喀则地区谢通门县");
AREA.put("542329", "西藏自治区日喀则地区白朗县");
AREA.put("542330", "西藏自治区日喀则地区仁布县");
AREA.put("542331", "西藏自治区日喀则地区康马县");
AREA.put("513227", "四川省阿坝藏族羌族自治州小金县");
AREA.put("513228", "四川省阿坝藏族羌族自治州黑水县");
AREA.put("513229", "四川省阿坝藏族羌族自治州马尔康县");
// AREA.put("513025","四川省达川地区通江县");
AREA.put("511424", "四川省眉山市丹棱县");
AREA.put("530424", "云南省玉溪市华宁县");
AREA.put("530425", "云南省玉溪市易门县");
AREA.put("530426", "云南省玉溪市峨山彝族自治县");
AREA.put("530427", "云南省玉溪市新平彝族傣族自治县");
AREA.put("530428", "云南省玉溪市元江哈尼族彝族傣族自治县");
AREA.put("530500", "云南省保山市");
AREA.put("530501", "云南省保山市");
AREA.put("530502", "云南省保山市隆阳区");
AREA.put("530521", "云南省保山市施甸县");
AREA.put("530522", "云南省保山市腾冲县");
AREA.put("530523", "云南省保山市龙陵县");
AREA.put("530524", "云南省保山市昌宁县");
AREA.put("530600", "云南省昭通市");
AREA.put("530601", "云南省昭通市");
AREA.put("530602", "云南省昭通市昭阳区");
AREA.put("530621", "云南省昭通市鲁甸县");
AREA.put("530622", "云南省昭通市巧家县");
AREA.put("530623", "云南省昭通市盐津县");
AREA.put("530624", "云南省昭通市大关县");
AREA.put("530625", "云南省昭通市永善县");
AREA.put("530626", "云南省昭通市绥江县");
AREA.put("530627", "云南省昭通市镇雄县");
AREA.put("530628", "云南省昭通市彝良县");
AREA.put("530629", "云南省昭通市威信县");
AREA.put("530630", "云南省昭通市水富县");
AREA.put("530700", "云南省丽江市");
AREA.put("530701", "云南省丽江市");
AREA.put("530702", "云南省丽江市古城区");
AREA.put("530721", "云南省丽江市玉龙纳西族自治县");
AREA.put("530722", "云南省丽江市永胜县");
AREA.put("530723", "云南省丽江市华坪县");
AREA.put("530724", "云南省丽江市宁蒗彝族自治县");
AREA.put("530800", "云南省思茅市");
AREA.put("530801", "云南省思茅市");
AREA.put("530802", "云南省思茅市翠云区");
AREA.put("530821", "云南省思茅市普洱哈尼族彝族自治县");
AREA.put("530822", "云南省思茅市墨江哈尼族自治县");
AREA.put("530823", "云南省思茅市景东彝族自治县");
AREA.put("530824", "云南省思茅市景谷傣族彝族自治县");
AREA.put("530825", "云南省思茅市镇沅彝族哈尼族拉祜族自治县");
AREA.put("530826", "云南省思茅市江城哈尼族彝族自治县");
AREA.put("530827", "云南省思茅市孟连傣族拉祜族佤族自治县");
AREA.put("530828", "云南省思茅市澜沧拉祜族自治县");
AREA.put("530829", "云南省思茅市西盟佤族自治县");
AREA.put("530900", "云南省临沧市");
AREA.put("530901", "云南省临沧市");
AREA.put("530902", "云南省临沧市临翔区");
AREA.put("530921", "云南省临沧市凤庆县");
AREA.put("530922", "云南省临沧市云县");
AREA.put("530923", "云南省临沧市永德县");
AREA.put("530924", "云南省临沧市镇康县");
AREA.put("530925", "云南省临沧市双江拉祜族佤族布朗族傣族自治县");
AREA.put("530926", "云南省临沧市耿马傣族佤族自治县");
AREA.put("530927", "云南省临沧市沧源佤族自治县");
AREA.put("520203", "贵州省六盘水市六枝特区");
AREA.put("520221", "贵州省六盘水市水城县");
AREA.put("520222", "贵州省六盘水市盘县");
AREA.put("520300", "贵州省遵义市");
AREA.put("520301", "贵州省遵义市");
AREA.put("520302", "贵州省遵义市红花岗区");
AREA.put("520303", "贵州省遵义市汇川区");
AREA.put("520321", "贵州省遵义市遵义县");
AREA.put("520322", "贵州省遵义市桐梓县");
AREA.put("520323", "贵州省遵义市绥阳县");
AREA.put("520324", "贵州省遵义市正安县");
AREA.put("520325", "贵州省遵义市道真仡佬族苗族自治县");
AREA.put("520326", "贵州省遵义市务川仡佬族苗族自治县");
AREA.put("520327", "贵州省遵义市凤冈县");
AREA.put("520328", "贵州省遵义市湄潭县");
AREA.put("520329", "贵州省遵义市余庆县");
AREA.put("520330", "贵州省遵义市习水县");
AREA.put("520381", "贵州省遵义市赤水市");
AREA.put("520382", "贵州省遵义市仁怀市");
AREA.put("520400", "贵州省安顺市");
AREA.put("520401", "贵州省安顺市");
AREA.put("520402", "贵州省安顺市西秀区");
AREA.put("520421", "贵州省安顺市平坝县");
AREA.put("520422", "贵州省安顺市普定县");
AREA.put("520423", "贵州省安顺市镇宁布依族苗族自治县");
AREA.put("520424", "贵州省安顺市关岭布依族苗族自治县");
AREA.put("520425", "贵州省安顺市紫云苗族布依族自治县");
AREA.put("522200", "贵州省铜仁地区");
AREA.put("522201", "贵州省铜仁地区铜仁市");
AREA.put("522222", "贵州省铜仁地区江口县");
AREA.put("522223", "贵州省铜仁地区玉屏侗族自治县");
AREA.put("522224", "贵州省铜仁地区石阡县");
AREA.put("522225", "贵州省铜仁地区思南县");
AREA.put("522226", "贵州省铜仁地区印江土家族苗族自治县");
AREA.put("522227", "贵州省铜仁地区德江县");
AREA.put("522228", "贵州省铜仁地区沿河土家族自治县");
AREA.put("522229", "贵州省铜仁地区松桃苗族自治县");
AREA.put("522230", "贵州省铜仁地区万山特区");
AREA.put("522300", "贵州省黔西南布依族苗族自治州");
AREA.put("522301", "贵州省黔西南布依族苗族自治州兴义市");
AREA.put("522322", "贵州省黔西南布依族苗族自治州兴仁县");
AREA.put("522323", "贵州省黔西南布依族苗族自治州普安县");
AREA.put("522324", "贵州省黔西南布依族苗族自治州晴隆县");
AREA.put("522325", "贵州省黔西南布依族苗族自治州贞丰县");
AREA.put("522326", "贵州省黔西南布依族苗族自治州望谟县");
AREA.put("522327", "贵州省黔西南布依族苗族自治州册亨县");
AREA.put("522328", "贵州省黔西南布依族苗族自治州安龙县");
AREA.put("522400", "贵州省毕节地区");
AREA.put("522401", "贵州省毕节地区毕节市");
AREA.put("522422", "贵州省毕节地区大方县");
AREA.put("522423", "贵州省毕节地区黔西县");
AREA.put("522424", "贵州省毕节地区金沙县");
AREA.put("511301", "四川省南充市");
AREA.put("511302", "四川省南充市顺庆区");
AREA.put("511303", "四川省南充市高坪区");
AREA.put("511304", "四川省南充市嘉陵区");
AREA.put("511321", "四川省南充市南部县");
AREA.put("511322", "四川省南充市营山县");
AREA.put("511323", "四川省南充市蓬安县");
AREA.put("511324", "四川省南充市仪陇县");
AREA.put("511325", "四川省南充市西充县");
AREA.put("511381", "四川省南充市阆中市");
AREA.put("511400", "四川省眉山市");
AREA.put("511401", "四川省眉山市");
AREA.put("511402", "四川省眉山市东坡区");
AREA.put("440102", "广东省广州市东山区");
AREA.put("440103", "广东省广州市荔湾区");
AREA.put("440104", "广东省广州市越秀区");
AREA.put("500381", "重庆市江津市");
AREA.put("500382", "重庆市合川市");
AREA.put("500383", "重庆市永川市");
AREA.put("500384", "重庆市南川市");
AREA.put("510000", "四川省");
AREA.put("510100", "四川省成都市");
AREA.put("510101", "四川省成都市");
AREA.put("510104", "四川省成都市锦江区");
AREA.put("510105", "四川省成都市青羊区");
AREA.put("510106", "四川省成都市金牛区");
AREA.put("510107", "四川省成都市武侯区");
AREA.put("510108", "四川省成都市成华区");
AREA.put("510112", "四川省成都市龙泉驿区");
AREA.put("510113", "四川省成都市青白江区");
AREA.put("510114", "四川省成都市新都区");
AREA.put("510115", "四川省成都市温江区");
AREA.put("510121", "四川省成都市金堂县");
AREA.put("510122", "四川省成都市双流县");
AREA.put("510124", "四川省成都市郫县");
AREA.put("510129", "四川省成都市大邑县");
AREA.put("510131", "四川省成都市蒲江县");
AREA.put("510132", "四川省成都市新津县");
AREA.put("510181", "四川省成都市都江堰市");
AREA.put("510182", "四川省成都市彭州市");
AREA.put("510183", "四川省成都市邛崃市");
AREA.put("510184", "四川省成都市崇州市");
AREA.put("510300", "四川省自贡市");
AREA.put("510301", "四川省自贡市");
AREA.put("510302", "四川省自贡市自流井区");
AREA.put("510303", "四川省自贡市贡井区");
AREA.put("510304", "四川省自贡市大安区");
AREA.put("510311", "四川省自贡市沿滩区");
AREA.put("510321", "四川省自贡市荣县");
AREA.put("510322", "四川省自贡市富顺县");
AREA.put("510400", "四川省攀枝花市");
AREA.put("510401", "四川省攀枝花市");
AREA.put("510402", "四川省攀枝花市东区");
AREA.put("510403", "四川省攀枝花市西区");
AREA.put("510411", "四川省攀枝花市仁和区");
AREA.put("510421", "四川省攀枝花市米易县");
AREA.put("510422", "四川省攀枝花市盐边县");
AREA.put("510500", "四川省泸州市");
AREA.put("510501", "四川省泸州市");
AREA.put("510502", "四川省泸州市江阳区");
AREA.put("510503", "四川省泸州市纳溪区");
AREA.put("510504", "四川省泸州市龙马潭区");
AREA.put("510521", "四川省泸州市泸县");
AREA.put("510522", "四川省泸州市合江县");
AREA.put("510524", "四川省泸州市叙永县");
AREA.put("510525", "四川省泸州市古蔺县");
AREA.put("510600", "四川省德阳市");
AREA.put("510601", "四川省德阳市");
AREA.put("510603", "四川省德阳市旌阳区");
AREA.put("510623", "四川省德阳市中江县");
AREA.put("510626", "四川省德阳市罗江县");
AREA.put("510681", "四川省德阳市广汉市");
AREA.put("510682", "四川省德阳市什邡市");
AREA.put("530402", "云南省玉溪市红塔区");
AREA.put("530421", "云南省玉溪市江川县");
AREA.put("530422", "云南省玉溪市澄江县");
AREA.put("510701", "四川省绵阳市");
AREA.put("510703", "四川省绵阳市涪城区");
AREA.put("441702", "广东省阳江市江城区");
AREA.put("441721", "广东省阳江市阳西县");
AREA.put("441723", "广东省阳江市阳东县");
AREA.put("441781", "广东省阳江市阳春市");
AREA.put("441800", "广东省清远市");
AREA.put("441801", "广东省清远市");
AREA.put("441802", "广东省清远市清城区");
AREA.put("441821", "广东省清远市佛冈县");
AREA.put("441823", "广东省清远市阳山县");
AREA.put("441825", "广东省清远市连山壮族瑶族自治县");
AREA.put("441826", "广东省清远市连南瑶族自治县");
AREA.put("441827", "广东省清远市清新县");
AREA.put("441881", "广东省清远市英德市");
AREA.put("441882", "广东省清远市连州市");
AREA.put("441900", "广东省东莞市");
AREA.put("442000", "广东省中山市");
AREA.put("445100", "广东省潮州市");
AREA.put("445101", "广东省潮州市");
AREA.put("445102", "广东省潮州市湘桥区");
AREA.put("445121", "广东省潮州市潮安县");
AREA.put("445122", "广东省潮州市饶平县");
AREA.put("445200", "广东省揭阳市");
AREA.put("445201", "广东省揭阳市");
AREA.put("445202", "广东省揭阳市榕城区");
AREA.put("445221", "广东省揭阳市揭东县");
AREA.put("445222", "广东省揭阳市揭西县");
AREA.put("445224", "广东省揭阳市惠来县");
AREA.put("445281", "广东省揭阳市普宁市");
AREA.put("445300", "广东省云浮市");
AREA.put("513433", "四川省凉山彝族自治州冕宁县");
AREA.put("513434", "四川省凉山彝族自治州越西县");
AREA.put("513435", "四川省凉山彝族自治州甘洛县");
AREA.put("513436", "四川省凉山彝族自治州美姑县");
AREA.put("513437", "四川省凉山彝族自治州雷波县");
AREA.put("520000", "贵州省");
AREA.put("520100", "贵州省贵阳市");
AREA.put("520101", "贵州省贵阳市");
AREA.put("520102", "贵州省贵阳市南明区");
AREA.put("520103", "贵州省贵阳市云岩区");
AREA.put("520111", "贵州省贵阳市花溪区");
AREA.put("520112", "贵州省贵阳市乌当区");
AREA.put("520113", "贵州省贵阳市白云区");
AREA.put("520114", "贵州省贵阳市小河区");
AREA.put("520121", "贵州省贵阳市开阳县");
AREA.put("520122", "贵州省贵阳市息烽县");
AREA.put("520123", "贵州省贵阳市修文县");
AREA.put("520181", "贵州省贵阳市清镇市");
AREA.put("520200", "贵州省六盘水市");
AREA.put("520201", "贵州省六盘水市钟山区");
AREA.put("511421", "四川省眉山市仁寿县");
AREA.put("511422", "四川省眉山市彭山县");
AREA.put("511423", "四川省眉山市洪雅县");
AREA.put("620523", "甘肃省天水市甘谷县");
AREA.put("653024", "新疆维吾尔自治区克孜勒苏柯尔克孜自治州乌恰县");
AREA.put("653100", "新疆维吾尔自治区喀什地区");
AREA.put("653101", "新疆维吾尔自治区喀什地区喀什市");
AREA.put("653121", "新疆维吾尔自治区喀什地区疏附县");
AREA.put("653122", "新疆维吾尔自治区喀什地区疏勒县");
AREA.put("653123", "新疆维吾尔自治区喀什地区英吉沙县");
AREA.put("653124", "新疆维吾尔自治区喀什地区泽普县");
AREA.put("653125", "新疆维吾尔自治区喀什地区莎车县");
AREA.put("653126", "新疆维吾尔自治区喀什地区叶城县");
AREA.put("653127", "新疆维吾尔自治区喀什地区麦盖提县");
AREA.put("653128", "新疆维吾尔自治区喀什地区岳普湖县");
AREA.put("653129", "新疆维吾尔自治区喀什地区伽师县");
AREA.put("653130", "新疆维吾尔自治区喀什地区巴楚县");
AREA.put("653131", "新疆维吾尔自治区喀什地区塔什库尔干塔吉克自治县");
AREA.put("653200", "新疆维吾尔自治区和田地区");
AREA.put("653201", "新疆维吾尔自治区和田地区和田市");
AREA.put("653221", "新疆维吾尔自治区和田地区和田县");
AREA.put("653222", "新疆维吾尔自治区和田地区墨玉县");
AREA.put("653223", "新疆维吾尔自治区和田地区皮山县");
AREA.put("653224", "新疆维吾尔自治区和田地区洛浦县");
AREA.put("653225", "新疆维吾尔自治区和田地区策勒县");
AREA.put("653226", "新疆维吾尔自治区和田地区于田县");
AREA.put("653227", "新疆维吾尔自治区和田地区民丰县");
AREA.put("654000", "新疆维吾尔自治区伊犁哈萨克自治州");
AREA.put("654002", "新疆维吾尔自治区伊犁哈萨克自治州伊宁市");
AREA.put("654003", "新疆维吾尔自治区伊犁哈萨克自治州奎屯市");
AREA.put("654021", "新疆维吾尔自治区伊犁哈萨克自治州伊宁县");
AREA.put("654022", "新疆维吾尔自治区伊犁哈萨克自治州察布查尔锡伯自治县");
AREA.put("654023", "新疆维吾尔自治区伊犁哈萨克自治州霍城县");
AREA.put("654024", "新疆维吾尔自治区伊犁哈萨克自治州巩留县");
AREA.put("654025", "新疆维吾尔自治区伊犁哈萨克自治州新源县");
AREA.put("654026", "新疆维吾尔自治区伊犁哈萨克自治州昭苏县");
AREA.put("654027", "新疆维吾尔自治区伊犁哈萨克自治州特克斯县");
AREA.put("654028", "新疆维吾尔自治区伊犁哈萨克自治州尼勒克县");
AREA.put("654200", "新疆维吾尔自治区塔城地区");
AREA.put("654201", "新疆维吾尔自治区塔城地区塔城市");
AREA.put("654202", "新疆维吾尔自治区塔城地区乌苏市");
AREA.put("654221", "新疆维吾尔自治区塔城地区额敏县");
AREA.put("654223", "新疆维吾尔自治区塔城地区沙湾县");
AREA.put("654224", "新疆维吾尔自治区塔城地区托里县");
AREA.put("654225", "新疆维吾尔自治区塔城地区裕民县");
AREA.put("654226", "新疆维吾尔自治区塔城地区和布克赛尔蒙古自治县");
AREA.put("654300", "新疆维吾尔自治区阿勒泰地区");
AREA.put("654301", "新疆维吾尔自治区阿勒泰地区阿勒泰市");
AREA.put("654321", "新疆维吾尔自治区阿勒泰地区布尔津县");
AREA.put("654322", "新疆维吾尔自治区阿勒泰地区富蕴县");
AREA.put("654323", "新疆维吾尔自治区阿勒泰地区福海县");
AREA.put("654324", "新疆维吾尔自治区阿勒泰地区哈巴河县");
AREA.put("654325", "新疆维吾尔自治区阿勒泰地区青河县");
AREA.put("542333", "西藏自治区日喀则地区仲巴县");
AREA.put("542334", "西藏自治区日喀则地区亚东县");
AREA.put("542335", "西藏自治区日喀则地区吉隆县");
AREA.put("542336", "西藏自治区日喀则地区聂拉木县");
AREA.put("632623", "青海省果洛藏族自治州甘德县");
AREA.put("632624", "青海省果洛藏族自治州达日县");
AREA.put("650108", "新疆维吾尔自治区乌鲁木齐市东山区");
AREA.put("650121", "新疆维吾尔自治区乌鲁木齐市乌鲁木齐县");
AREA.put("650200", "新疆维吾尔自治区克拉玛依市");
AREA.put("650201", "新疆维吾尔自治区克拉玛依市");
AREA.put("650202", "新疆维吾尔自治区克拉玛依市独山子区");
AREA.put("650203", "新疆维吾尔自治区克拉玛依市克拉玛依区");
AREA.put("650204", "新疆维吾尔自治区克拉玛依市白碱滩区");
AREA.put("650205", "新疆维吾尔自治区克拉玛依市乌尔禾区");
AREA.put("652100", "新疆维吾尔自治区吐鲁番地区");
AREA.put("652101", "新疆维吾尔自治区吐鲁番地区吐鲁番市");
AREA.put("652122", "新疆维吾尔自治区吐鲁番地区鄯善县");
AREA.put("652123", "新疆维吾尔自治区吐鲁番地区托克逊县");
AREA.put("652200", "新疆维吾尔自治区哈密地区");
AREA.put("652201", "新疆维吾尔自治区哈密地区哈密市");
AREA.put("652222", "新疆维吾尔自治区哈密地区巴里坤哈萨克自治县");
AREA.put("652223", "新疆维吾尔自治区哈密地区伊吾县");
AREA.put("652300", "新疆维吾尔自治区昌吉回族自治州");
AREA.put("652301", "新疆维吾尔自治区昌吉回族自治州昌吉市");
AREA.put("652302", "新疆维吾尔自治区昌吉回族自治州阜康市");
AREA.put("652303", "新疆维吾尔自治区昌吉回族自治州米泉市");
AREA.put("652323", "新疆维吾尔自治区昌吉回族自治州呼图壁县");
AREA.put("652324", "新疆维吾尔自治区昌吉回族自治州玛纳斯县");
AREA.put("652325", "新疆维吾尔自治区昌吉回族自治州奇台县");
AREA.put("652327", "新疆维吾尔自治区昌吉回族自治州吉木萨尔县");
AREA.put("652328", "新疆维吾尔自治区昌吉回族自治州木垒哈萨克自治县");
AREA.put("652700", "新疆维吾尔自治区博尔塔拉蒙古自治州");
AREA.put("652701", "新疆维吾尔自治区博尔塔拉蒙古自治州博乐市");
AREA.put("652722", "新疆维吾尔自治区博尔塔拉蒙古自治州精河县");
AREA.put("652723", "新疆维吾尔自治区博尔塔拉蒙古自治州温泉县");
AREA.put("652800", "新疆维吾尔自治区巴音郭楞蒙古自治州");
AREA.put("652801", "新疆维吾尔自治区巴音郭楞蒙古自治州库尔勒市");
AREA.put("652822", "新疆维吾尔自治区巴音郭楞蒙古自治州轮台县");
AREA.put("652823", "新疆维吾尔自治区巴音郭楞蒙古自治州尉犁县");
AREA.put("652824", "新疆维吾尔自治区巴音郭楞蒙古自治州若羌县");
AREA.put("652825", "新疆维吾尔自治区巴音郭楞蒙古自治州且末县");
AREA.put("652826", "新疆维吾尔自治区巴音郭楞蒙古自治州焉耆回族自治县");
AREA.put("652827", "新疆维吾尔自治区巴音郭楞蒙古自治州和静县");
AREA.put("652828", "新疆维吾尔自治区巴音郭楞蒙古自治州和硕县");
AREA.put("652829", "新疆维吾尔自治区巴音郭楞蒙古自治州博湖县");
AREA.put("652900", "新疆维吾尔自治区阿克苏地区");
AREA.put("652901", "新疆维吾尔自治区阿克苏地区阿克苏市");
AREA.put("652922", "新疆维吾尔自治区阿克苏地区温宿县");
AREA.put("652923", "新疆维吾尔自治区阿克苏地区库车县");
AREA.put("652924", "新疆维吾尔自治区阿克苏地区沙雅县");
AREA.put("652925", "新疆维吾尔自治区阿克苏地区新和县");
AREA.put("652926", "新疆维吾尔自治区阿克苏地区拜城县");
AREA.put("652927", "新疆维吾尔自治区阿克苏地区乌什县");
AREA.put("652928", "新疆维吾尔自治区阿克苏地区阿瓦提县");
AREA.put("542332", "西藏自治区日喀则地区定结县");
AREA.put("659000", "新疆维吾尔自治区省直辖行政单位");
AREA.put("659001", "新疆维吾尔自治区石河子市");
AREA.put("659002", "新疆维吾尔自治区阿拉尔市");
AREA.put("610730", "陕西省汉中市佛坪县");
AREA.put("610800", "陕西省榆林市");
AREA.put("610801", "陕西省榆林市");
AREA.put("610802", "陕西省榆林市榆阳区");
AREA.put("610821", "陕西省榆林市神木县");
AREA.put("610822", "陕西省榆林市府谷县");
AREA.put("610823", "陕西省榆林市横山县");
AREA.put("610824", "陕西省榆林市靖边县");
AREA.put("610825", "陕西省榆林市定边县");
AREA.put("610826", "陕西省榆林市绥德县");
AREA.put("610827", "陕西省榆林市米脂县");
AREA.put("610828", "陕西省榆林市佳县");
AREA.put("610829", "陕西省榆林市吴堡县");
AREA.put("610830", "陕西省榆林市清涧县");
AREA.put("610831", "陕西省榆林市子洲县");
AREA.put("610900", "陕西省安康市");
AREA.put("610901", "陕西省安康市");
AREA.put("610902", "陕西省安康市汉滨区");
AREA.put("610921", "陕西省安康市汉阴县");
AREA.put("610922", "陕西省安康市石泉县");
AREA.put("610923", "陕西省安康市宁陕县");
AREA.put("610924", "陕西省安康市紫阳县");
AREA.put("610925", "陕西省安康市岚皋县");
AREA.put("610926", "陕西省安康市平利县");
AREA.put("610927", "陕西省安康市镇坪县");
AREA.put("610928", "陕西省安康市旬阳县");
AREA.put("610929", "陕西省安康市白河县");
AREA.put("611000", "陕西省商洛市");
AREA.put("611001", "陕西省商洛市");
AREA.put("611002", "陕西省商洛市商州区");
AREA.put("611021", "陕西省商洛市洛南县");
AREA.put("611022", "陕西省商洛市丹凤县");
AREA.put("611023", "陕西省商洛市商南县");
AREA.put("611024", "陕西省商洛市山阳县");
AREA.put("611025", "陕西省商洛市镇安县");
AREA.put("611026", "陕西省商洛市柞水县");
AREA.put("620000", "甘肃省");
AREA.put("620100", "甘肃省兰州市");
AREA.put("620101", "甘肃省兰州市");
AREA.put("620102", "甘肃省兰州市城关区");
AREA.put("620103", "甘肃省兰州市七里河区");
AREA.put("620104", "甘肃省兰州市西固区");
AREA.put("620105", "甘肃省兰州市安宁区");
AREA.put("620111", "甘肃省兰州市红古区");
AREA.put("620121", "甘肃省兰州市永登县");
AREA.put("620122", "甘肃省兰州市皋兰县");
AREA.put("620123", "甘肃省兰州市榆中县");
AREA.put("620200", "甘肃省嘉峪关市");
AREA.put("620201", "甘肃省嘉峪关市");
AREA.put("620300", "甘肃省金昌市");
AREA.put("620301", "甘肃省金昌市");
AREA.put("620302", "甘肃省金昌市金川区");
AREA.put("620321", "甘肃省金昌市永昌县");
AREA.put("620400", "甘肃省白银市");
AREA.put("620401", "甘肃省白银市");
AREA.put("620402", "甘肃省白银市白银区");
AREA.put("620403", "甘肃省白银市平川区");
AREA.put("620421", "甘肃省白银市靖远县");
AREA.put("620422", "甘肃省白银市会宁县");
AREA.put("620423", "甘肃省白银市景泰县");
AREA.put("632600", "青海省果洛藏族自治州");
AREA.put("632621", "青海省果洛藏族自治州玛沁县");
AREA.put("632622", "青海省果洛藏族自治州班玛县");
AREA.put("620524", "甘肃省天水市武山县");
AREA.put("632625", "青海省果洛藏族自治州久治县");
AREA.put("632626", "青海省果洛藏族自治州玛多县");
AREA.put("632700", "青海省玉树藏族自治州");
AREA.put("632721", "青海省玉树藏族自治州玉树县");
AREA.put("632722", "青海省玉树藏族自治州杂多县");
AREA.put("632723", "青海省玉树藏族自治州称多县");
AREA.put("632724", "青海省玉树藏族自治州治多县");
AREA.put("632725", "青海省玉树藏族自治州囊谦县");
AREA.put("632726", "青海省玉树藏族自治州曲麻莱县");
AREA.put("632800", "青海省海西蒙古族藏族自治州");
AREA.put("632801", "青海省海西蒙古族藏族自治州格尔木市");
AREA.put("632802", "青海省海西蒙古族藏族自治州德令哈市");
AREA.put("632821", "青海省海西蒙古族藏族自治州乌兰县");
AREA.put("632822", "青海省海西蒙古族藏族自治州都兰县");
AREA.put("632823", "青海省海西蒙古族藏族自治州天峻县");
AREA.put("640000", "宁夏回族自治区");
AREA.put("640100", "宁夏回族自治区银川市");
AREA.put("640101", "宁夏回族自治区银川市");
AREA.put("640104", "宁夏回族自治区银川市兴庆区");
AREA.put("640105", "宁夏回族自治区银川市西夏区");
AREA.put("640106", "宁夏回族自治区银川市金凤区");
AREA.put("640121", "宁夏回族自治区银川市永宁县");
AREA.put("640122", "宁夏回族自治区银川市贺兰县");
AREA.put("640181", "宁夏回族自治区银川市灵武市");
AREA.put("640200", "宁夏回族自治区石嘴山市");
AREA.put("640201", "宁夏回族自治区石嘴山市");
AREA.put("640202", "宁夏回族自治区石嘴山市大武口区");
AREA.put("640205", "宁夏回族自治区石嘴山市惠农区");
AREA.put("640221", "宁夏回族自治区石嘴山市平罗县");
AREA.put("640300", "宁夏回族自治区吴忠市");
AREA.put("640301", "宁夏回族自治区吴忠市");
AREA.put("640302", "宁夏回族自治区吴忠市利通区");
AREA.put("640323", "宁夏回族自治区吴忠市盐池县");
AREA.put("640324", "宁夏回族自治区吴忠市同心县");
AREA.put("640381", "宁夏回族自治区吴忠市青铜峡市");
AREA.put("640400", "宁夏回族自治区固原市");
AREA.put("640401", "宁夏回族自治区固原市");
AREA.put("640402", "宁夏回族自治区固原市原州区");
AREA.put("640422", "宁夏回族自治区固原市西吉县");
AREA.put("640423", "宁夏回族自治区固原市隆德县");
AREA.put("640424", "宁夏回族自治区固原市泾源县");
AREA.put("640425", "宁夏回族自治区固原市彭阳县");
AREA.put("640500", "宁夏回族自治区中卫市");
AREA.put("640501", "宁夏回族自治区中卫市");
AREA.put("640502", "宁夏回族自治区中卫市沙坡头区");
AREA.put("640521", "宁夏回族自治区中卫市中宁县");
AREA.put("640522", "宁夏回族自治区中卫市海原县");
AREA.put("650000", "新疆维吾尔自治区");
AREA.put("650100", "新疆维吾尔自治区乌鲁木齐市");
AREA.put("650101", "新疆维吾尔自治区乌鲁木齐市");
AREA.put("650102", "新疆维吾尔自治区乌鲁木齐市天山区");
AREA.put("650103", "新疆维吾尔自治区乌鲁木齐市沙依巴克区");
AREA.put("610304", "陕西省宝鸡市陈仓区");
AREA.put("451322", "广西壮族自治区来宾市象州县");
AREA.put("451323", "广西壮族自治区来宾市武宣县");
AREA.put("451324", "广西壮族自治区来宾市金秀瑶族自治县");
AREA.put("451381", "广西壮族自治区来宾市合山市");
AREA.put("451400", "广西壮族自治区崇左市");
AREA.put("451401", "广西壮族自治区崇左市");
AREA.put("451402", "广西壮族自治区崇左市江洲区");
AREA.put("451421", "广西壮族自治区崇左市扶绥县");
AREA.put("451422", "广西壮族自治区崇左市宁明县");
AREA.put("451423", "广西壮族自治区崇左市龙州县");
AREA.put("451424", "广西壮族自治区崇左市大新县");
AREA.put("451425", "广西壮族自治区崇左市天等县");
AREA.put("451481", "广西壮族自治区崇左市凭祥市");
AREA.put("460000", "海南省");
AREA.put("440784", "广东省江门市鹤山市");
AREA.put("460106", "海南省海口市龙华区");
AREA.put("450225", "广西壮族自治区柳州市融水苗族自治县");
AREA.put("450226", "广西壮族自治区柳州市三江侗族自治县");
AREA.put("450300", "广西壮族自治区桂林市");
AREA.put("450301", "广西壮族自治区桂林市");
AREA.put("450302", "广西壮族自治区桂林市秀峰区");
AREA.put("450303", "广西壮族自治区桂林市叠彩区");
AREA.put("450304", "广西壮族自治区桂林市象山区");
AREA.put("450305", "广西壮族自治区桂林市七星区");
AREA.put("450311", "广西壮族自治区桂林市雁山区");
AREA.put("450321", "广西壮族自治区桂林市阳朔县");
AREA.put("450322", "广西壮族自治区桂林市临桂县");
AREA.put("450323", "广西壮族自治区桂林市灵川县");
AREA.put("450324", "广西壮族自治区桂林市全州县");
AREA.put("450325", "广西壮族自治区桂林市兴安县");
AREA.put("450326", "广西壮族自治区桂林市永福县");
AREA.put("450327", "广西壮族自治区桂林市灌阳县");
AREA.put("450328", "广西壮族自治区桂林市龙胜各族自治县");
AREA.put("450329", "广西壮族自治区桂林市资源县");
AREA.put("450330", "广西壮族自治区桂林市平乐县");
AREA.put("450331", "广西壮族自治区桂林市荔蒲县");
AREA.put("450332", "广西壮族自治区桂林市恭城瑶族自治县");
AREA.put("450400", "广西壮族自治区梧州市");
AREA.put("450401", "广西壮族自治区梧州市");
AREA.put("450403", "广西壮族自治区梧州市万秀区");
AREA.put("450404", "广西壮族自治区梧州市蝶山区");
AREA.put("450405", "广西壮族自治区梧州市长洲区");
AREA.put("450421", "广西壮族自治区梧州市苍梧县");
AREA.put("450422", "广西壮族自治区梧州市藤县");
AREA.put("450423", "广西壮族自治区梧州市蒙山县");
AREA.put("450481", "广西壮族自治区梧州市岑溪市");
AREA.put("450500", "广西壮族自治区北海市");
AREA.put("450501", "广西壮族自治区北海市");
AREA.put("450502", "广西壮族自治区北海市海城区");
AREA.put("450503", "广西壮族自治区北海市银海区");
AREA.put("450512", "广西壮族自治区北海市铁山港区");
AREA.put("450521", "广西壮族自治区北海市合浦县");
AREA.put("450600", "广西壮族自治区防城港市");
AREA.put("450601", "广西壮族自治区防城港市");
AREA.put("450602", "广西壮族自治区防城港市港口区");
AREA.put("450603", "广西壮族自治区防城港市防城区");
AREA.put("450621", "广西壮族自治区防城港市上思县");
AREA.put("450681", "广西壮族自治区防城港市东兴市");
AREA.put("450700", "广西壮族自治区钦州市");
AREA.put("450701", "广西壮族自治区钦州市");
AREA.put("450702", "广西壮族自治区钦州市钦南区");
AREA.put("450703", "广西壮族自治区钦州市钦北区");
AREA.put("450721", "广西壮族自治区钦州市灵山县");
AREA.put("450722", "广西壮族自治区钦州市浦北县");
AREA.put("450800", "广西壮族自治区贵港市");
AREA.put("450801", "广西壮族自治区贵港市");
AREA.put("450802", "广西壮族自治区贵港市港北区");
AREA.put("450803", "广西壮族自治区贵港市港南区");
AREA.put("450804", "广西壮族自治区贵港市覃塘区");
AREA.put("450821", "广西壮族自治区贵港市平南县");
AREA.put("450881", "广西壮族自治区贵港市桂平市");
AREA.put("450900", "广西壮族自治区玉林市");
AREA.put("510683", "四川省德阳市绵竹市");
AREA.put("510700", "四川省绵阳市");
AREA.put("522626", "贵州省黔东南苗族侗族自治州岑巩县");
AREA.put("522627", "贵州省黔东南苗族侗族自治州天柱县");
AREA.put("522628", "贵州省黔东南苗族侗族自治州锦屏县");
AREA.put("522629", "贵州省黔东南苗族侗族自治州剑河县");
AREA.put("522630", "贵州省黔东南苗族侗族自治州台江县");
AREA.put("522631", "贵州省黔东南苗族侗族自治州黎平县");
AREA.put("522632", "贵州省黔东南苗族侗族自治州榕江县");
AREA.put("522633", "贵州省黔东南苗族侗族自治州从江县");
AREA.put("522634", "贵州省黔东南苗族侗族自治州雷山县");
AREA.put("522635", "贵州省黔东南苗族侗族自治州麻江县");
AREA.put("522636", "贵州省黔东南苗族侗族自治州丹寨县");
AREA.put("522700", "贵州省黔南布依族苗族自治州");
AREA.put("522701", "贵州省黔南布依族苗族自治州都匀市");
AREA.put("522702", "贵州省黔南布依族苗族自治州福泉市");
AREA.put("522722", "贵州省黔南布依族苗族自治州荔波县");
AREA.put("522723", "贵州省黔南布依族苗族自治州贵定县");
AREA.put("522725", "贵州省黔南布依族苗族自治州瓮安县");
AREA.put("522726", "贵州省黔南布依族苗族自治州独山县");
AREA.put("522727", "贵州省黔南布依族苗族自治州平塘县");
AREA.put("522728", "贵州省黔南布依族苗族自治州罗甸县");
AREA.put("522729", "贵州省黔南布依族苗族自治州长顺县");
AREA.put("522730", "贵州省黔南布依族苗族自治州龙里县");
AREA.put("522731", "贵州省黔南布依族苗族自治州惠水县");
AREA.put("522732", "贵州省黔南布依族苗族自治州三都水族自治县");
AREA.put("530000", "云南省");
AREA.put("530100", "云南省昆明市");
AREA.put("530101", "云南省昆明市");
AREA.put("530102", "云南省昆明市五华区");
AREA.put("530103", "云南省昆明市盘龙区");
AREA.put("621222", "甘肃省陇南市文县");
AREA.put("621223", "甘肃省陇南市宕昌县");
AREA.put("621224", "甘肃省陇南市康县");
AREA.put("542337", "西藏自治区日喀则地区萨嘎县");
AREA.put("542338", "西藏自治区日喀则地区岗巴县");
AREA.put("610328", "陕西省宝鸡市千阳县");
AREA.put("610329", "陕西省宝鸡市麟游县");
AREA.put("610330", "陕西省宝鸡市凤县");
AREA.put("610331", "陕西省宝鸡市太白县");
AREA.put("610400", "陕西省咸阳市");
AREA.put("610401", "陕西省咸阳市");
AREA.put("610402", "陕西省咸阳市秦都区");
AREA.put("610403", "陕西省咸阳市杨凌区");
AREA.put("610404", "陕西省咸阳市渭城区");
AREA.put("610422", "陕西省咸阳市三原县");
AREA.put("610423", "陕西省咸阳市泾阳县");
AREA.put("610424", "陕西省咸阳市乾县");
AREA.put("610425", "陕西省咸阳市礼泉县");
AREA.put("610426", "陕西省咸阳市永寿县");
AREA.put("610427", "陕西省咸阳市彬县");
AREA.put("610428", "陕西省咸阳市长武县");
AREA.put("610429", "陕西省咸阳市旬邑县");
AREA.put("610430", "陕西省咸阳市淳化县");
AREA.put("610431", "陕西省咸阳市武功县");
AREA.put("610481", "陕西省咸阳市兴平市");
AREA.put("610500", "陕西省渭南市");
AREA.put("610501", "陕西省渭南市");
AREA.put("610502", "陕西省渭南市临渭区");
AREA.put("610521", "陕西省渭南市华县");
AREA.put("610522", "陕西省渭南市潼关县");
AREA.put("610523", "陕西省渭南市大荔县");
AREA.put("610524", "陕西省渭南市合阳县");
AREA.put("610525", "陕西省渭南市澄城县");
AREA.put("610526", "陕西省渭南市蒲城县");
AREA.put("610527", "陕西省渭南市白水县");
AREA.put("610528", "陕西省渭南市富平县");
AREA.put("610581", "陕西省渭南市韩城市");
AREA.put("610582", "陕西省渭南市华阴市");
AREA.put("610600", "陕西省延安市");
AREA.put("610601", "陕西省延安市");
AREA.put("610602", "陕西省延安市宝塔区");
AREA.put("610621", "陕西省延安市延长县");
AREA.put("610622", "陕西省延安市延川县");
AREA.put("610623", "陕西省延安市子长县");
AREA.put("610624", "陕西省延安市安塞县");
AREA.put("610625", "陕西省延安市志丹县");
AREA.put("610626", "陕西省延安市吴旗县");
AREA.put("610627", "陕西省延安市甘泉县");
AREA.put("610628", "陕西省延安市富县");
AREA.put("610629", "陕西省延安市洛川县");
AREA.put("610630", "陕西省延安市宜川县");
AREA.put("610631", "陕西省延安市黄龙县");
AREA.put("610632", "陕西省延安市黄陵县");
AREA.put("610700", "陕西省汉中市");
AREA.put("610701", "陕西省汉中市");
AREA.put("610702", "陕西省汉中市汉台区");
AREA.put("610721", "陕西省汉中市南郑县");
AREA.put("610722", "陕西省汉中市城固县");
AREA.put("610723", "陕西省汉中市洋县");
AREA.put("610724", "陕西省汉中市西乡县");
AREA.put("610725", "陕西省汉中市勉县");
AREA.put("610726", "陕西省汉中市宁强县");
AREA.put("620501", "甘肃省天水市");
AREA.put("620502", "甘肃省天水市秦城区");
AREA.put("620503", "甘肃省天水市北道区");
AREA.put("620521", "甘肃省天水市清水县");
AREA.put("620522", "甘肃省天水市秦安县");
AREA.put("542400", "西藏自治区那曲地区");
AREA.put("542421", "西藏自治区那曲地区那曲县");
AREA.put("542422", "西藏自治区那曲地区嘉黎县");
AREA.put("542423", "西藏自治区那曲地区比如县");
AREA.put("542424", "西藏自治区那曲地区聂荣县");
AREA.put("542425", "西藏自治区那曲地区安多县");
AREA.put("542426", "西藏自治区那曲地区申扎县");
AREA.put("542427", "西藏自治区那曲地区索县");
AREA.put("542428", "西藏自治区那曲地区班戈县");
AREA.put("542429", "西藏自治区那曲地区巴青县");
AREA.put("542430", "西藏自治区那曲地区尼玛县");
AREA.put("542500", "西藏自治区阿里地区");
AREA.put("542521", "西藏自治区阿里地区普兰县");
AREA.put("542522", "西藏自治区阿里地区札达县");
AREA.put("542523", "西藏自治区阿里地区噶尔县");
AREA.put("542524", "西藏自治区阿里地区日土县");
AREA.put("542525", "西藏自治区阿里地区革吉县");
AREA.put("542526", "西藏自治区阿里地区改则县");
AREA.put("542527", "西藏自治区阿里地区措勤县");
AREA.put("542600", "西藏自治区林芝地区");
AREA.put("542621", "西藏自治区林芝地区林芝县");
AREA.put("542622", "西藏自治区林芝地区工布江达县");
AREA.put("542623", "西藏自治区林芝地区米林县");
AREA.put("542624", "西藏自治区林芝地区墨脱县");
AREA.put("542625", "西藏自治区林芝地区波密县");
AREA.put("542626", "西藏自治区林芝地区察隅县");
AREA.put("542627", "西藏自治区林芝地区朗县");
AREA.put("610000", "陕西省");
AREA.put("610100", "陕西省西安市");
AREA.put("610101", "陕西省西安市");
AREA.put("610102", "陕西省西安市新城区");
AREA.put("610103", "陕西省西安市碑林区");
AREA.put("610104", "陕西省西安市莲湖区");
AREA.put("610111", "陕西省西安市灞桥区");
AREA.put("610112", "陕西省西安市未央区");
AREA.put("610113", "陕西省西安市雁塔区");
AREA.put("610114", "陕西省西安市阎良区");
AREA.put("610115", "陕西省西安市临潼区");
AREA.put("610116", "陕西省西安市长安区");
AREA.put("610122", "陕西省西安市蓝田县");
AREA.put("610124", "陕西省西安市周至县");
AREA.put("610125", "陕西省西安市户县");
AREA.put("610126", "陕西省西安市高陵县");
AREA.put("610200", "陕西省铜川市");
AREA.put("610201", "陕西省铜川市");
AREA.put("610202", "陕西省铜川市王益区");
AREA.put("610203", "陕西省铜川市印台区");
AREA.put("610204", "陕西省铜川市耀州区");
AREA.put("610222", "陕西省铜川市宜君县");
AREA.put("610300", "陕西省宝鸡市");
AREA.put("610301", "陕西省宝鸡市");
AREA.put("610302", "陕西省宝鸡市渭滨区");
AREA.put("610303", "陕西省宝鸡市金台区");
AREA.put("654326", "新疆维吾尔自治区阿勒泰地区吉木乃县");
AREA.put("632525", "青海省海南藏族自治州贵南县");
AREA.put("650104", "新疆维吾尔自治区乌鲁木齐市新市区");
AREA.put("650105", "新疆维吾尔自治区乌鲁木齐市水磨沟区");
AREA.put("650106", "新疆维吾尔自治区乌鲁木齐市头屯河区");
AREA.put("621225", "甘肃省陇南市西和县");
AREA.put("621226", "甘肃省陇南市礼县");
AREA.put("621227", "甘肃省陇南市徽县");
AREA.put("621228", "甘肃省陇南市两当县");
AREA.put("622900", "甘肃省临夏回族自治州");
AREA.put("622901", "甘肃省临夏回族自治州临夏市");
AREA.put("622921", "甘肃省临夏回族自治州临夏县");
AREA.put("622922", "甘肃省临夏回族自治州康乐县");
AREA.put("622923", "甘肃省临夏回族自治州永靖县");
AREA.put("622924", "甘肃省临夏回族自治州广河县");
AREA.put("622925", "甘肃省临夏回族自治州和政县");
AREA.put("622926", "甘肃省临夏回族自治州东乡族自治县");
AREA.put("622927", "甘肃省临夏回族自治州积石山保安族东乡族撒拉族自治县");
AREA.put("623000", "甘肃省甘南藏族自治州");
AREA.put("623001", "甘肃省甘南藏族自治州合作市");
AREA.put("623021", "甘肃省甘南藏族自治州临潭县");
AREA.put("623022", "甘肃省甘南藏族自治州卓尼县");
AREA.put("623023", "甘肃省甘南藏族自治州舟曲县");
AREA.put("623024", "甘肃省甘南藏族自治州迭部县");
AREA.put("623025", "甘肃省甘南藏族自治州玛曲县");
AREA.put("623026", "甘肃省甘南藏族自治州碌曲县");
AREA.put("623027", "甘肃省甘南藏族自治州夏河县");
AREA.put("630000", "青海省");
AREA.put("630100", "青海省西宁市");
AREA.put("630101", "青海省西宁市");
AREA.put("630102", "青海省西宁市城东区");
AREA.put("630103", "青海省西宁市城中区");
AREA.put("630104", "青海省西宁市城西区");
AREA.put("630105", "青海省西宁市城北区");
AREA.put("630121", "青海省西宁市大通回族土族自治县");
AREA.put("630122", "青海省西宁市湟中县");
AREA.put("630123", "青海省西宁市湟源县");
AREA.put("632100", "青海省海东地区");
AREA.put("632121", "青海省海东地区平安县");
AREA.put("632122", "青海省海东地区民和回族土族自治县");
AREA.put("632123", "青海省海东地区乐都县");
AREA.put("632126", "青海省海东地区互助土族自治县");
AREA.put("632127", "青海省海东地区化隆回族自治县");
AREA.put("632128", "青海省海东地区循化撒拉族自治县");
AREA.put("632200", "青海省海北藏族自治州");
AREA.put("632221", "青海省海北藏族自治州门源回族自治县");
AREA.put("632222", "青海省海北藏族自治州祁连县");
AREA.put("632223", "青海省海北藏族自治州海晏县");
AREA.put("632224", "青海省海北藏族自治州刚察县");
AREA.put("632300", "青海省黄南藏族自治州");
AREA.put("632321", "青海省黄南藏族自治州同仁县");
AREA.put("632322", "青海省黄南藏族自治州尖扎县");
AREA.put("632323", "青海省黄南藏族自治州泽库县");
AREA.put("632324", "青海省黄南藏族自治州河南蒙古族自治县");
AREA.put("632500", "青海省海南藏族自治州");
AREA.put("632521", "青海省海南藏族自治州共和县");
AREA.put("632522", "青海省海南藏族自治州同德县");
AREA.put("632523", "青海省海南藏族自治州贵德县");
AREA.put("632524", "青海省海南藏族自治州兴海县");
AREA.put("652929", "新疆维吾尔自治区阿克苏地区柯坪县");
AREA.put("610322", "陕西省宝鸡市凤翔县");
AREA.put("610323", "陕西省宝鸡市岐山县");
AREA.put("610324", "陕西省宝鸡市扶风县");
AREA.put("610326", "陕西省宝鸡市眉县");
AREA.put("610327", "陕西省宝鸡市陇县");
AREA.put("650107", "新疆维吾尔自治区乌鲁木齐市达坂城区");
AREA.put("620525", "甘肃省天水市张家川回族自治县");
AREA.put("620600", "甘肃省武威市");
AREA.put("620601", "甘肃省武威市");
AREA.put("620602", "甘肃省武威市凉州区");
AREA.put("620621", "甘肃省武威市民勤县");
AREA.put("620622", "甘肃省武威市古浪县");
AREA.put("620623", "甘肃省武威市天祝藏族自治县");
AREA.put("620700", "甘肃省张掖市");
AREA.put("620701", "甘肃省张掖市");
AREA.put("620702", "甘肃省张掖市甘州区");
AREA.put("620721", "甘肃省张掖市肃南裕固族自治县");
AREA.put("620722", "甘肃省张掖市民乐县");
AREA.put("620723", "甘肃省张掖市临泽县");
AREA.put("620724", "甘肃省张掖市高台县");
AREA.put("620725", "甘肃省张掖市山丹县");
AREA.put("620800", "甘肃省平凉市");
AREA.put("620801", "甘肃省平凉市");
AREA.put("620802", "甘肃省平凉市崆峒区");
AREA.put("620821", "甘肃省平凉市泾川县");
AREA.put("620822", "甘肃省平凉市灵台县");
AREA.put("620823", "甘肃省平凉市崇信县");
AREA.put("620824", "甘肃省平凉市华亭县");
AREA.put("620825", "甘肃省平凉市庄浪县");
AREA.put("620826", "甘肃省平凉市静宁县");
AREA.put("620900", "甘肃省酒泉市");
AREA.put("620901", "甘肃省酒泉市");
AREA.put("620902", "甘肃省酒泉市肃州区");
AREA.put("620921", "甘肃省酒泉市金塔县");
AREA.put("620922", "甘肃省酒泉市安西县");
AREA.put("620923", "甘肃省酒泉市肃北蒙古族自治县");
AREA.put("620924", "甘肃省酒泉市阿克塞哈萨克族自治县");
AREA.put("620981", "甘肃省酒泉市玉门市");
AREA.put("620982", "甘肃省酒泉市敦煌市");
AREA.put("621000", "甘肃省庆阳市");
AREA.put("621001", "甘肃省庆阳市");
AREA.put("621002", "甘肃省庆阳市西峰区");
AREA.put("621021", "甘肃省庆阳市庆城县");
AREA.put("621022", "甘肃省庆阳市环县");
AREA.put("621023", "甘肃省庆阳市华池县");
AREA.put("621024", "甘肃省庆阳市合水县");
AREA.put("621025", "甘肃省庆阳市正宁县");
AREA.put("621026", "甘肃省庆阳市宁县");
AREA.put("621027", "甘肃省庆阳市镇原县");
AREA.put("621100", "甘肃省定西市");
AREA.put("621101", "甘肃省定西市");
AREA.put("621102", "甘肃省定西市安定区");
AREA.put("621121", "甘肃省定西市通渭县");
AREA.put("621122", "甘肃省定西市陇西县");
AREA.put("621123", "甘肃省定西市渭源县");
AREA.put("621124", "甘肃省定西市临洮县");
AREA.put("621125", "甘肃省定西市漳县");
AREA.put("621126", "甘肃省定西市岷县");
AREA.put("621200", "甘肃省陇南市");
AREA.put("621201", "甘肃省陇南市");
AREA.put("621202", "甘肃省陇南市武都区");
AREA.put("621221", "甘肃省陇南市成县");
AREA.put("653000", "新疆维吾尔自治区克孜勒苏柯尔克孜自治州");
AREA.put("653001", "新疆维吾尔自治区克孜勒苏柯尔克孜自治州阿图什市");
AREA.put("653022", "新疆维吾尔自治区克孜勒苏柯尔克孜自治州阿克陶县");
AREA.put("653023", "新疆维吾尔自治区克孜勒苏柯尔克孜自治州阿合奇县");
AREA.put("659003", "新疆维吾尔自治区图木舒克市");
AREA.put("659004", "新疆维吾尔自治区五家渠市");
AREA.put("710000", "台湾省");
AREA.put("810000", "香港特别行政区");
AREA.put("820000", "澳门特别行政区");
AREA.put("A00000", "亚洲");
AREA.put("B00000", "非洲");
AREA.put("C00000", "欧洲");
AREA.put("D00000", "美洲");
AREA.put("E00000", "大洋洲");
AREA.put("F01000", "南极洲");
AREA.put("ZZZZZZ", "其它");
AREA.put("522425", "贵州省毕节地区织金县");
AREA.put("522426", "贵州省毕节地区纳雍县");
AREA.put("522427", "贵州省毕节地区威宁彝族回族苗族自治县");
AREA.put("522428", "贵州省毕节地区赫章县");
AREA.put("522600", "贵州省黔东南苗族侗族自治州");
AREA.put("522601", "贵州省黔东南苗族侗族自治州凯里市");
AREA.put("522622", "贵州省黔东南苗族侗族自治州黄平县");
AREA.put("522623", "贵州省黔东南苗族侗族自治州施秉县");
AREA.put("522624", "贵州省黔东南苗族侗族自治州三穗县");
AREA.put("513230", "四川省阿坝藏族羌族自治州壤塘县");
AREA.put("511425", "四川省眉山市青神县");
AREA.put("511500", "四川省宜宾市");
AREA.put("511501", "四川省宜宾市");
AREA.put("511502", "四川省宜宾市翠屏区");
AREA.put("511521", "四川省宜宾市宜宾县");
AREA.put("511522", "四川省宜宾市南溪县");
AREA.put("511523", "四川省宜宾市江安县");
AREA.put("511524", "四川省宜宾市长宁县");
AREA.put("511525", "四川省宜宾市高县");
AREA.put("511526", "四川省宜宾市珙县");
AREA.put("511527", "四川省宜宾市筠连县");
AREA.put("511528", "四川省宜宾市兴文县");
AREA.put("511529", "四川省宜宾市屏山县");
AREA.put("511600", "四川省广安市");
AREA.put("511601", "四川省广安市");
AREA.put("511602", "四川省广安市广安区");
AREA.put("511621", "四川省广安市岳池县");
AREA.put("511622", "四川省广安市武胜县");
AREA.put("511623", "四川省广安市邻水县");
AREA.put("511681", "四川省广安市华莹市");
AREA.put("511700", "四川省达州市");
AREA.put("511701", "四川省达州市");
AREA.put("511702", "四川省达州市通川区");
AREA.put("511721", "四川省达州市达县");
AREA.put("511722", "四川省达州市宣汉县");
AREA.put("511723", "四川省达州市开江县");
AREA.put("511724", "四川省达州市大竹县");
AREA.put("511725", "四川省达州市渠县");
AREA.put("511781", "四川省达州市万源市");
AREA.put("511800", "四川省雅安市");
AREA.put("511801", "四川省雅安市");
AREA.put("511802", "四川省雅安市雨城区");
AREA.put("511821", "四川省雅安市名山县");
AREA.put("511822", "四川省雅安市荥经县");
AREA.put("511823", "四川省雅安市汉源县");
AREA.put("511824", "四川省雅安市石棉县");
AREA.put("511825", "四川省雅安市天全县");
AREA.put("511826", "四川省雅安市芦山县");
AREA.put("511827", "四川省雅安市宝兴县");
AREA.put("511900", "四川省巴中市");
AREA.put("511901", "四川省巴中市");
AREA.put("511902", "四川省巴中市巴州区");
AREA.put("511921", "四川省巴中市通江县");
AREA.put("511922", "四川省巴中市南江县");
AREA.put("511923", "四川省巴中市平昌县");
AREA.put("512000", "四川省资阳市");
AREA.put("512001", "四川省资阳市");
AREA.put("512002", "四川省资阳市雁江区");
AREA.put("512021", "四川省资阳市安岳县");
AREA.put("512022", "四川省资阳市乐至县");
AREA.put("512081", "四川省资阳市简阳市");
AREA.put("513200", "四川省阿坝藏族羌族自治州");
AREA.put("513221", "四川省阿坝藏族羌族自治州汶川县");
AREA.put("513222", "四川省阿坝藏族羌族自治州理县");
AREA.put("513223", "四川省阿坝藏族羌族自治州茂县");
AREA.put("513224", "四川省阿坝藏族羌族自治州松潘县");
AREA.put("513225", "四川省阿坝藏族羌族自治州九寨沟县");
AREA.put("513226", "四川省阿坝藏族羌族自治州金川县");
AREA.put("532300", "云南省楚雄彝族自治州");
AREA.put("532301", "云南省楚雄彝族自治州楚雄市");
AREA.put("532322", "云南省楚雄彝族自治州双柏县");
AREA.put("530423", "云南省玉溪市通海县");
AREA.put("513231", "四川省阿坝藏族羌族自治州阿坝县");
AREA.put("513232", "四川省阿坝藏族羌族自治州若尔盖县");
AREA.put("513233", "四川省阿坝藏族羌族自治州红原县");
AREA.put("513300", "四川省甘孜藏族自治州");
AREA.put("513321", "四川省甘孜藏族自治州康定县");
AREA.put("513322", "四川省甘孜藏族自治州泸定县");
AREA.put("513323", "四川省甘孜藏族自治州丹巴县");
AREA.put("513324", "四川省甘孜藏族自治州九龙县");
AREA.put("513325", "四川省甘孜藏族自治州雅江县");
AREA.put("513326", "四川省甘孜藏族自治州道孚县");
AREA.put("513327", "四川省甘孜藏族自治州炉霍县");
AREA.put("513328", "四川省甘孜藏族自治州甘孜县");
AREA.put("513329", "四川省甘孜藏族自治州新龙县");
AREA.put("513330", "四川省甘孜藏族自治州德格县");
AREA.put("513331", "四川省甘孜藏族自治州白玉县");
AREA.put("513332", "四川省甘孜藏族自治州石渠县");
AREA.put("513333", "四川省甘孜藏族自治州色达县");
AREA.put("513334", "四川省甘孜藏族自治州理塘县");
AREA.put("513335", "四川省甘孜藏族自治州巴塘县");
AREA.put("513336", "四川省甘孜藏族自治州乡城县");
AREA.put("513337", "四川省甘孜藏族自治州稻城县");
AREA.put("513338", "四川省甘孜藏族自治州得荣县");
AREA.put("513400", "四川省凉山彝族自治州");
AREA.put("513401", "四川省凉山彝族自治州西昌市");
AREA.put("513422", "四川省凉山彝族自治州木里藏族自治县");
AREA.put("513423", "四川省凉山彝族自治州盐源县");
AREA.put("513424", "四川省凉山彝族自治州德昌县");
AREA.put("513425", "四川省凉山彝族自治州会理县");
AREA.put("513426", "四川省凉山彝族自治州会东县");
AREA.put("513427", "四川省凉山彝族自治州宁南县");
AREA.put("513428", "四川省凉山彝族自治州普格县");
AREA.put("513429", "四川省凉山彝族自治州布拖县");
AREA.put("513430", "四川省凉山彝族自治州金阳县");
AREA.put("513431", "四川省凉山彝族自治州昭觉县");
AREA.put("513432", "四川省凉山彝族自治州喜德县");
AREA.put("513025", "四川省达川地区通江县");
AREA.put("320821", "江苏省淮安市淮阴县");
AREA.put("370111", "山东省济南市郊区");
AREA.put("513701", "四川省巴中地区巴中市");
AREA.put("513023", "四川省达川地区开江县");
AREA.put("422302", "湖北省咸宁地区赤壁市");
AREA.put("362422", "江西省吉安地区吉水县");
AREA.put("132235", "河北省邢台地区威县");
AREA.put("110227", "北京市怀柔县");
AREA.put("642221", "宁夏回族自治区固原地区固原县");
AREA.put("342623", "安徽省巢湖地区无为县");
AREA.put("132828", "河北省廊坊地区文安县");
AREA.put("420621", "湖北省襄樊市襄阳县");
AREA.put("342401", "安徽省六安地区六安市");
AREA.put("452528", "广西壮族自治区玉林地区博白县");
AREA.put("142731", "山西省运城地区绛县");
AREA.put("510102", "四川省成都市东城区");
AREA.put("142703", "山西省运城地区河津市");
AREA.put("362227", "江西省宜春地区万载县");
AREA.put("321321", "江苏省宿迁市宿豫县");
AREA.put("432503", "湖南省娄底地区涟源市");
AREA.put("422324", "湖北省咸宁地区通城县");
AREA.put("522101", "贵州省遵义地区遵义市");
AREA.put("622628", "甘肃省陇南地区礼县");
AREA.put("142725", "山西省运城地区万荣县");
AREA.put("441425", "广东省梅州市兴宁县");
AREA.put("450121", "广西壮族自治区南宁市邕宁县");
AREA.put("510211", "四川省重庆市江北区");
AREA.put("210225", "辽宁省大连市庄河县");
AREA.put("412301", "河南省商丘地区商丘市");
AREA.put("433027", "湖南省怀化地区芷江县");
AREA.put("432522", "湖南省娄底地区双峰县");
AREA.put("422202", "湖北省孝感地区应城市");
AREA.put("132337", "河北省石家庄市行唐县");
AREA.put("430425", "湖南省衡阳市常宁县");
AREA.put("330725", "浙江省金华市义乌县");
AREA.put("330719", "浙江省金华市兰溪市");
AREA.put("452424", "广西壮族自治区贺州地区昭平县");
AREA.put("452130", "广西壮族自治区南宁地区大新县");
AREA.put("132928", "河北省沧州地区南皮县");
AREA.put("362426", "江西省吉安地区泰和县");
AREA.put("320112", "江苏省南京市大厂区");
AREA.put("360621", "江西省鹰潭市贵溪县");
AREA.put("440681", "广东省佛山市顺德市");
AREA.put("441321", "广东省惠州市惠阳县");
AREA.put("372822", "山东省临沂地区郯城县");
AREA.put("522501", "贵州省安顺地区安顺市");
AREA.put("432823", "湖南省郴州地区永兴县");
AREA.put("142729", "山西省运城地区闻喜县");
AREA.put("330219", "浙江省宁波市余姚市");
AREA.put("342127", "安徽省阜阳地区阜南县");
AREA.put("330821", "浙江省衢州市衢县");
AREA.put("362201", "江西省宜春地区宜春市");
AREA.put("440682", "广东省佛山市南海市");
AREA.put("372325", "山东省滨州地区沾化县");
AREA.put("422422", "湖北省荆州地区松滋县");
AREA.put("310226", "上海市奉贤县");
AREA.put("132522", "河北省张家口地区康保县");
AREA.put("342530", "安徽省宣城地区旌德县");
AREA.put("532723", "云南省思茅地区墨江哈尼族自治县");
AREA.put("140104", "山西省太原市河西区");
AREA.put("362401", "江西省吉安地区吉安市");
AREA.put("411123", "河南省漯河市郾城县");
AREA.put("440421", "广东省珠海市斗门县");
AREA.put("362132", "江西省赣州地区于都县");
AREA.put("362301", "江西省上饶地区上饶市");
AREA.put("410504", "河南省安阳市铁西区");
AREA.put("422228", "湖北省孝感地区汉川县");
AREA.put("441228", "广东省肇庆市新兴县");
AREA.put("622624", "甘肃省陇南地区成县");
AREA.put("362331", "江西省上饶地区万年县");
AREA.put("452501", "广西壮族自治区玉林地区玉林市");
AREA.put("422426", "湖北省荆州地区洪湖县");
AREA.put("512924", "四川省南充地区营山县");
AREA.put("362427", "江西省吉安地区遂川县");
AREA.put("440582", "广东省汕头市潮阳市");
AREA.put("321083", "江苏省扬州市兴化市");
AREA.put("460002", "海南省海南省琼海市");
AREA.put("142226", "山西省忻州地区繁峙县");
AREA.put("440508", "广东省汕头市金园区");
AREA.put("512927", "四川省南充地区仪陇县");
AREA.put("640102", "宁夏回族自治区银川市城区");
AREA.put("510212", "四川省重庆市沙坪坝区");
AREA.put("460028", "海南省海南省临高县");
AREA.put("413026", "河南省信阳地区固始县");
AREA.put("330222", "浙江省宁波市慈溪县");
AREA.put("352225", "福建省宁德地区霞浦县");
AREA.put("342326", "安徽省滁县地区凤阳县");
AREA.put("612425", "陕西省安康地区紫阳县");
AREA.put("612322", "陕西省汉中地区城固县");
AREA.put("460003", "海南省海南省儋州市");
AREA.put("441281", "广东省肇庆市云浮市");
AREA.put("362202", "江西省宜春地区丰城市");
AREA.put("440711", "广东省江门市郊区");
AREA.put("412932", "河南省南阳市桐柏县");
AREA.put("321027", "江苏省扬州市邗江县");
AREA.put("413023", "河南省信阳地区平桥区");
AREA.put("342824", "安徽省安庆地区潜山县");
AREA.put("132224", "河北省邢台地区内丘县");
AREA.put("362527", "江西省抚州地区宜黄县");
AREA.put("341223", "安徽省阜阳市涡阳县");
AREA.put("372922", "山东省菏泽地区曹县");
AREA.put("362232", "江西省宜春地区靖安县");
AREA.put("440921", "广东省茂名市信宜县");
AREA.put("232301", "黑龙江省绥化地区绥化市");
AREA.put("441611", "广东省河源市郊区");
AREA.put("352203", "福建省宁德地区福鼎市");
AREA.put("640203", "宁夏回族自治区石嘴山市石嘴山区");
AREA.put("511223", "四川省万县市梁平县");
AREA.put("440782", "广东省江门市新会市");
AREA.put("441381", "广东省惠州市惠阳市");
AREA.put("432402", "湖南省常德地区津市市");
AREA.put("340901", "安徽省");
AREA.put("422601", "湖北省郧阳地区丹江口市");
AREA.put("510231", "四川省重庆市北碚区");
AREA.put("413021", "河南省信阳地区息县");
AREA.put("231027", "黑龙江省牡丹江市虎林县");
AREA.put("362133", "江西省赣州地区兴国县");
AREA.put("142201", "山西省忻州地区忻州市");
AREA.put("654101", "新疆维吾尔自治区伊犁哈萨克自治州伊宁市");
AREA.put("410311", "河南省洛阳市郊区");
AREA.put("440725", "广东省江门市鹤山县");
AREA.put("420221", "湖北省黄石市大冶县");
AREA.put("321025", "江苏省扬州市泰兴县");
AREA.put("132903", "河北省沧州地区任丘市");
AREA.put("441282", "广东省肇庆市罗定市");
AREA.put("342529", "安徽省宣城地区泾县");
AREA.put("342322", "安徽省滁县地区来安县");
AREA.put("342701", "安徽省徽州地区屯溪市");
AREA.put("413022", "河南省信阳地区淮滨县");
AREA.put("352104", "福建省南平地区建瓯市");
AREA.put("362430", "江西省吉安地区永新县");
AREA.put("140102", "山西省太原市南城区");
AREA.put("422129", "湖北省黄冈地区广济县");
AREA.put("422226", "湖北省孝感地区云梦县");
AREA.put("442526", "广东省博罗县");
AREA.put("460035", "海南省海南省保亭黎族苗族自治县");
AREA.put("622326", "甘肃省武威地区天祝藏族自治县");
AREA.put("352202", "福建省宁德地区福安市");
AREA.put("412822", "河南省驻马店地区泌阳县");
AREA.put("441229", "广东省肇庆市郁南县");
AREA.put("133001", "河北省衡水地区衡水市");
AREA.put("152127", "内蒙古自治区呼伦贝尔盟鄂伦春自治旗");
AREA.put("362233", "江西省宜春地区铜鼓县");
AREA.put("512921", "四川省南充地区南充县");
AREA.put("432322", "湖南省益阳地区南县");
AREA.put("332529", "浙江省丽水地区景宁畲族自治县");
AREA.put("432424", "湖南省常德地区澧县");
AREA.put("622421", "甘肃省定西地区定西县");
AREA.put("362203", "江西省宜春地区樟树市");
AREA.put("500239", "重庆市黔江土家族苗族自治县");
AREA.put("432326", "湖南省益阳地区安化县");
AREA.put("452229", "广西壮族自治区柳州地区融水苗族自治县");
AREA.put("412828", "河南省驻马店地区新蔡县");
AREA.put("432301", "湖南省益阳地区益阳市");
AREA.put("152122", "内蒙古自治区呼伦贝尔盟阿荣旗");
AREA.put("350321", "福建省莆田市莆田县");
AREA.put("440125", "广东省广州市增城县");
AREA.put("452225", "广西壮族自治区柳州地区武宣县");
AREA.put("132423", "河北省保定地区徐水县");
AREA.put("422201", "湖北省孝感地区孝感市");
AREA.put("420622", "湖北省襄樊市枣阳县");
AREA.put("442827", "广东省云浮县");
AREA.put("412726", "河南省周口地区郸城县");
AREA.put("362131", "江西省赣州地区宁都县");
AREA.put("452201", "广西壮族自治区柳州地区合山市");
AREA.put("152101", "内蒙古自治区呼伦贝尔盟海拉尔市");
AREA.put("460102", "海南省海口市振东区");
AREA.put("522321", "贵州省黔西南布依族苗族自治州兴义县");
AREA.put("352123", "福建省南平地区建瓯县");
AREA.put("362322", "江西省上饶地区广丰县");
AREA.put("422702", "湖北省宜昌地区当阳市");
AREA.put("130228", "河北省唐山市遵化县");
AREA.put("372522", "山东省聊城市莘县");
AREA.put("429001", "湖北省省直辖行政单位随州市");
AREA.put("460004", "海南省海南省琼山市");
AREA.put("420983", "湖北省孝感市广水市");
AREA.put("422429", "湖北省荆州地区潜江县");
AREA.put("432425", "湖南省常德地区临澧县");
AREA.put("511023", "四川省内江市安岳县");
AREA.put("510222", "四川省重庆市巴县");
AREA.put("362223", "江西省宜春地区清江县");
AREA.put("210221", "辽宁省大连市金县");
AREA.put("362524", "江西省抚州地区南丰县");
AREA.put("452428", "广西壮族自治区贺州地区富川瑶族自治县");
AREA.put("362522", "江西省抚州地区南城县");
AREA.put("412825", "河南省驻马店地区上蔡县");
AREA.put("610321", "陕西省宝鸡市宝鸡县");
AREA.put("410426", "河南省平顶山市襄城县");
AREA.put("320586", "江苏省苏州市吴县市");
AREA.put("511127", "四川省乐山市洪雅县");
AREA.put("152123", "内蒙古自治区呼伦贝尔盟莫力达瓦达斡尔族自治旗");
AREA.put("412823", "河南省驻马店地区遂平县");
AREA.put("612323", "陕西省汉中地区洋县");
AREA.put("432401", "湖南省常德地区常德市");
AREA.put("342201", "安徽省宿县地区宿州市");
AREA.put("412328", "河南省商丘地区永城县");
AREA.put("510227", "四川省重庆市潼南县");
AREA.put("612427", "陕西省安康地区平利县");
AREA.put("422421", "湖北省荆州地区江陵县");
AREA.put("452224", "广西壮族自治区柳州地区象州县");
AREA.put("422326", "湖北省咸宁地区通山县");
AREA.put("372321", "山东省滨州地区惠民县");
AREA.put("432627", "湖南省邵阳地区城步苗族自治县");
AREA.put("362531", "江西省抚州地区东乡县");
AREA.put("412722", "河南省周口地区西华县");
AREA.put("412727", "河南省周口地区淮阳县");
AREA.put("452226", "广西壮族自治区柳州地区来宾县");
AREA.put("422723", "湖北省宜昌地区枝江县");
AREA.put("432801", "湖南省郴州地区郴州市");
AREA.put("372501", "山东省聊城市聊城市");
AREA.put("362329", "江西省上饶地区余干县");
AREA.put("362229", "江西省宜春地区宜丰县");
AREA.put("232101", "黑龙江省松花江地区双城市");
AREA.put("441522", "广东省汕尾市陆丰县");
AREA.put("440603", "广东省佛山市石湾区");
AREA.put("230121", "黑龙江省哈尔滨市呼兰县");
AREA.put("511227", "四川省万县市巫溪县");
AREA.put("370625", "山东省烟台市掖县");
AREA.put("362102", "江西省赣州地区瑞金市");
AREA.put("432501", "湖南省娄底地区娄底市");
AREA.put("430402", "湖南省衡阳市江东区");
AREA.put("142431", "山西省晋中地区平遥县");
AREA.put("532729", "云南省思茅地区澜沧拉祜族自治县");
AREA.put("362101", "江西省赣州地区赣州市");
AREA.put("332525", "浙江省丽水地区庆元县");
AREA.put("441230", "广东省肇庆市罗定县");
AREA.put("440510", "广东省汕头市河浦区");
AREA.put("440822", "广东省湛江市廉江县");
AREA.put("422431", "湖北省荆州地区钟祥县");
AREA.put("132529", "河北省张家口地区怀来县");
AREA.put("440721", "广东省江门市新会县");
AREA.put("513021", "四川省达川地区达县");
AREA.put("420603", "湖北省襄樊市樊东区");
AREA.put("422130", "湖北省黄冈地区黄梅县");
AREA.put("510215", "四川省重庆市北碚区");
AREA.put("362502", "江西省抚州地区临川市");
AREA.put("432502", "湖南省娄底地区冷水江市");
AREA.put("362330", "江西省上饶地区波阳县");
AREA.put("432426", "湖南省常德地区桃源县");
AREA.put("532124", "云南省昭通地区盐津县");
AREA.put("352228", "福建省宁德地区屏南县");
AREA.put("372926", "山东省菏泽地区巨野县");
AREA.put("452402", "广西壮族自治区贺州地区贺州市");
AREA.put("452427", "广西壮族自治区贺州地区钟山县");
AREA.put("432822", "湖南省郴州地区桂阳县");
AREA.put("513824", "四川省眉山地区洪雅县");
AREA.put("513030", "四川省达川地区渠县");
AREA.put("413027", "河南省信阳地区商城县");
AREA.put("362226", "江西省宜春地区奉新县");
AREA.put("622322", "甘肃省武威地区民勤县");
AREA.put("440223", "广东省韶关市南雄县");
AREA.put("513623", "四川省广安市武胜县");
AREA.put("412724", "河南省周口地区太康县");
AREA.put("440504", "广东省汕头市公园区");
AREA.put("452730", "广西壮族自治区河池地区都安瑶族自治县");
AREA.put("342723", "安徽省徽州地区歙县");
AREA.put("519004", "四川省峨眉山市");
AREA.put("332527", "浙江省丽水地区遂昌县");
AREA.put("440321", "广东省深圳市宝安县");
AREA.put("452701", "广西壮族自治区河池地区河池市");
AREA.put("513022", "四川省达川地区宣汉县");
AREA.put("420122", "湖北省武汉市江夏区");
AREA.put("500221", "重庆市长寿县");
AREA.put("652322", "新疆维吾尔自治区昌吉回族自治州米泉市");
AREA.put("510283", "四川省重庆市合川市");
AREA.put("412821", "河南省驻马店地区确山县");
AREA.put("321121", "江苏省镇江市丹徒县");
AREA.put("612326", "陕西省汉中地区宁强县");
AREA.put("120224", "天津市宝坻县");
AREA.put("320522", "江苏省苏州市太仓县");
AREA.put("440181", "广东省广州市番禺市");
AREA.put("612132", "陕西省渭南地区合阳县");
AREA.put("420604", "湖北省襄樊市樊西区");
AREA.put("142724", "山西省运城地区临猗县");
AREA.put("622223", "甘肃省张掖地区民乐县");
AREA.put("362324", "江西省上饶地区铅山县");
AREA.put("320625", "江苏省南通市海门县");
AREA.put("460104", "海南省海口市秀英区");
AREA.put("120222", "天津市武清县");
AREA.put("372923", "山东省菏泽地区定陶县");
AREA.put("452624", "广西壮族自治区百色地区平果县");
AREA.put("330321", "浙江省温州市瓯海县");
AREA.put("132329", "河北省石家庄市新乐县");
AREA.put("370911", "山东省泰安市郊区");
AREA.put("412929", "河南省南阳市唐河县");
AREA.put("372301", "山东省滨州地区滨州市");
AREA.put("211203", "辽宁省铁岭市铁法区");
AREA.put("622801", "甘肃省庆阳地区西峰市");
AREA.put("432923", "湖南省零陵地区道县");
AREA.put("362428", "江西省吉安地区万安县");
AREA.put("211022", "辽宁省辽阳市灯塔县");
AREA.put("432824", "湖南省郴州地区宜章县");
AREA.put("310227", "上海市松江县");
AREA.put("132130", "河北省邯郸地区磁县");
AREA.put("410321", "河南省洛阳市偃师县");
AREA.put("522502", "贵州省安顺地区清镇市");
AREA.put("512326", "四川省涪陵地区武隆县");
AREA.put("330722", "浙江省金华市永康县");
AREA.put("513821", "四川省眉山地区眉山县");
AREA.put("362325", "江西省上饶地区横峰县");
AREA.put("612401", "陕西省安康地区安康市");
AREA.put("452522", "广西壮族自治区玉林地区贵县");
AREA.put("430419", "湖南省衡阳市耒阳市");
AREA.put("372901", "山东省菏泽地区菏泽市");
AREA.put("510625", "四川省德阳市什邡县");
AREA.put("352224", "福建省宁德地区福鼎县");
AREA.put("332501", "浙江省丽水地区丽水市");
AREA.put("342422", "安徽省六安地区寿县");
AREA.put("142723", "山西省运城地区芮城县");
AREA.put("510221", "四川省重庆市长寿县");
AREA.put("612628", "陕西省延安地区富县");
AREA.put("372525", "山东省聊城市冠县");
AREA.put("321028", "江苏省扬州市泰县");
AREA.put("422427", "湖北省荆州地区沔阳县");
AREA.put("152125", "内蒙古自治区呼伦贝尔盟额尔古纳右旗");
AREA.put("512223", "四川省万县地区忠县");
AREA.put("510125", "四川省成都市新都县");
AREA.put("612301", "陕西省汉中地区汉中市");
AREA.put("352127", "福建省南平地区光泽县");
AREA.put("220123", "吉林省长春市九台县");
AREA.put("412723", "河南省周口地区商水县");
AREA.put("232103", "黑龙江省松花江地区五常市");
AREA.put("132823", "河北省廊坊地区香河县");
}
}
| true
|
319b4ec68503e978a6547672919a9b2fd8b26813
|
Java
|
lywwyl/FanFanSmall
|
/app/src/main/java/com/example/dell/fangfangsmall/camera/IPresenter/IVerificationPresenter.java
|
UTF-8
| 1,520
| 1.953125
| 2
|
[] |
no_license
|
package com.example.dell.fangfangsmall.camera.IPresenter;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Handler;
import com.example.dell.fangfangsmall.face.yt.person.face.YtDetectFace;
import java.util.List;
/**
* Created by zhangyuanyuan on 2017/9/14.
*/
public abstract class IVerificationPresenter {
protected IVerifcationView mBaseView;
public IVerificationPresenter(IVerifcationView baseView) {
mBaseView = baseView;
}
public abstract void saveFace(Bitmap bitmap);
public abstract void showDialog();
public abstract void foundPerson(Handler handler, Bitmap bitmap);
public abstract void uploadFaceBitmap(Handler handler, List<String> paths);
public abstract void distinguishFace(Handler handler, Bitmap bitmap);
public abstract void setDetecting(boolean isDetecting);
public interface IVerifcationView {
void saveCount(int count, String path);
void saveFinish();
void newPerson(Bitmap bitmap);
void addFace(List<String> paths);
void newpersonSuccess(String personId);
void saveFirstFail();
void newpersonFail(int code, String msg);
void uploadBitmapFinish(int c);
void uploadBitmapFail(int code, String msg);
void distinguishFaceSuccess(YtDetectFace ytDetectFace);
void distinguishFail(int code, String msg);
void distinguishError();
void distinguishEnd();
Context getContext();
}
}
| true
|
48776574225e32904a456cbc1ef96529329988d7
|
Java
|
zhongxingyu/Seer
|
/Diff-Raw-Data/8/8_d3c67a977f87f416b6ba515205c14123a80d3901/SchedulerSystem/8_d3c67a977f87f416b6ba515205c14123a80d3901_SchedulerSystem_t.java
|
UTF-8
| 4,693
| 2.140625
| 2
|
[] |
no_license
|
package pt.ist.fenixframework.plugins.scheduler.domain;
import java.lang.reflect.Modifier;
import java.util.Collections;
import java.util.List;
import org.joda.time.DateTime;
import pt.ist.fenixframework.FenixFramework;
import pt.ist.fenixframework.pstm.PersistentRoot;
import pt.ist.fenixframework.pstm.Transaction;
import dml.DomainClass;
import dml.DomainModel;
public class SchedulerSystem extends SchedulerSystem_Base {
private static SchedulerSystem instance = null;
private SchedulerSystem() {
super();
final SchedulerSystem root = PersistentRoot.getRoot(SchedulerSystem.class.getName());
if (root != null && root != this) {
throw new Error("Trying to create a 2nd instance of SchedulerSystemRoot! There can only be one!");
}
}
public static SchedulerSystem getInstance() {
if (instance == null) {
instance = PersistentRoot.getRoot(SchedulerSystem.class.getName());
if (instance == null) {
instance = new SchedulerSystem();
PersistentRoot.addRoot(SchedulerSystem.class.getName(), instance);
}
instance.initTasks();
}
return instance;
}
public static void queueTasks() {
final SchedulerSystem schedulerSystem = getInstance();
for (final Task task : schedulerSystem.getTaskSet()) {
if (task.shouldRunNow()) {
schedulerSystem.queueTasks(task);
}
}
}
private void queueTasks(final Task task) {
if (!hasPendingTask()) {
setPendingTask(task);
} else {
getPendingTask().queue(task);
}
}
public void initTasks() {
final DomainModel domainModel = FenixFramework.getDomainModel();
for (final DomainClass domainClass : domainModel.getDomainClasses()) {
if (isTaskInstance(domainClass) && !existsTaskInstance(domainClass)) {
System.out.println("Creating task instance for: " + domainClass.getFullName());
initTask(domainClass);
}
}
}
private static boolean isTask(final DomainClass domainClass) {
return domainClass != null && domainClass.getFullName().equals(Task.class.getName());
}
private static boolean isTaskInstance(final DomainClass domainClass) {
if (domainClass == null || isTask(domainClass)) {
return false;
}
final DomainClass superclass = (DomainClass) domainClass.getSuperclass();
return isTask(superclass) || isTaskInstance(superclass);
}
private boolean existsTaskInstance(final DomainClass domainClass) {
final String classname = domainClass.getFullName();
for (final Task task : getTaskSet()) {
if (task.getOjbConcreteClass().equals(classname)) {
return true;
}
}
return false;
}
private void initTask(final DomainClass domainClass) {
try {
final Class taskClass = Class.forName(domainClass.getFullName());
if (!Modifier.isAbstract(taskClass.getModifiers())) {
taskClass.newInstance();
}
} catch (final ClassNotFoundException e) {
System.out.println("Failed initialization of task: " + domainClass.getFullName());
e.printStackTrace();
} catch (final InstantiationException e) {
System.out.println("Failed initialization of task: " + domainClass.getFullName());
e.printStackTrace();
} catch (final IllegalAccessException e) {
System.out.println("Failed initialization of task: " + domainClass.getFullName());
e.printStackTrace();
}
}
public static void runPendingTask() {
for (Task task = popPendingTaskService(); task != null; task = popPendingTaskService()) {
task.runPendingTask();
}
}
private static Task popPendingTaskService() {
Task result = null;
boolean committed = false;
try {
if (jvstm.Transaction.current() != null) {
jvstm.Transaction.commit();
}
Transaction.begin();
result = SchedulerSystem.getInstance().popPendingTask();
jvstm.Transaction.checkpoint();
committed = true;
} finally {
if (!committed) {
Transaction.abort();
Transaction.begin();
}
Transaction.currentFenixTransaction().setReadOnly();
}
return result;
}
private Task popPendingTask() {
final Task task = getPendingTask();
if (task != null) {
final Task next = task.getNextTask();
setPendingTask(next);
task.setLastRun(new DateTime());
}
return task;
}
public <T> Task getTask(final Class<? extends Task> clazz) {
for (final Task task : getTaskSet()) {
if (task.getClass() == clazz) {
return task;
}
}
return null;
}
public void clearAllScheduledTasks() {
for (final Task task : getTaskSet()) {
task.clearAllSchedules();
}
}
}
| true
|
1fa25a93f766f51009bfbca3e2f9cae574c60452
|
Java
|
CHIRDL-Openmrs-Modules/chicaops
|
/api/src/main/java/org/openmrs/module/chicaops/DashboardTask.java
|
UTF-8
| 2,219
| 2.03125
| 2
|
[] |
no_license
|
/**
* The contents of this file are subject to the OpenMRS Public License
* Version 1.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://license.openmrs.org
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*
* Copyright (C) OpenMRS, LLC. All Rights Reserved.
*/
package org.openmrs.module.chicaops;
import java.util.ArrayList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.openmrs.api.context.Context;
import org.openmrs.module.chicaops.dashboard.CareCenterResult;
import org.openmrs.module.chicaops.dashboard.DashboardMailerPager;
import org.openmrs.module.chicaops.dashboard.RuleCheckResult;
import org.openmrs.module.chicaops.dashboard.ServerCheckResult;
import org.openmrs.module.chicaops.service.ChicaopsService;
import org.openmrs.scheduler.tasks.AbstractTask;
/**
*
* @author Steve McKee
*/
public class DashboardTask extends AbstractTask {
private static final Logger log = LoggerFactory.getLogger(DashboardTask.class);
/**
* @see org.openmrs.scheduler.tasks.AbstractTask#execute()
*/
@Override
public void execute() {
try {
ChicaopsService dashService = Context.getService(ChicaopsService.class);
// Check the states
ArrayList<CareCenterResult> results = dashService.checkCareCenters();
// Check server issues
ServerCheckResult serverResult = dashService.performServerChecks();
// Check rules
RuleCheckResult ruleResult = dashService.performRuleChecks();
// Send emails/pages if necessary.
DashboardMailerPager mailer = new DashboardMailerPager();
mailer.sendEmailsOrPages(results);
mailer.sendEmailsOrPages(serverResult);
mailer.sendEmailsOrPages(ruleResult);
} catch (Exception e) {
log.error("Error creating/sending email/pages", e);
}
}
}
| true
|
2fa5dae03041f9847ad96d0e373cb1913a6a7d7b
|
Java
|
nurlix/mfcredit
|
/src/main/java/kg/gov/mf/loan/manage/dao/documentpackage/DocumentPackageStateDaoImpl.java
|
UTF-8
| 1,490
| 2.296875
| 2
|
[] |
no_license
|
package kg.gov.mf.loan.manage.dao.documentpackage;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import kg.gov.mf.loan.manage.dao.AbstractDao;
import kg.gov.mf.loan.manage.model.documentpackage.DocumentPackageState;
@Repository("documentPackageStateDao")
public class DocumentPackageStateDaoImpl extends AbstractDao<Long, DocumentPackageState> implements DocumentPackageStateDao {
@SuppressWarnings("unchecked")
@Override
public List<DocumentPackageState> findAll() {
Criteria criteria = createEntityCriteria().addOrder(Order.asc("name"));
criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
List<DocumentPackageState> states = (List<DocumentPackageState>) criteria.list();
return states;
}
@Override
public DocumentPackageState findById(long id) {
return getByKey(id);
}
@Override
public DocumentPackageState findByName(String name) {
Criteria crit = createEntityCriteria();
crit.add(Restrictions.eq("name", name));
return (DocumentPackageState) crit.uniqueResult();
}
@Override
public void save(DocumentPackageState state) {
persist(state);
}
@Override
public void deleteById(long id) {
Criteria crit = createEntityCriteria();
crit.add(Restrictions.eq("id", id));
DocumentPackageState state = (DocumentPackageState)crit.uniqueResult();
delete(state);
}
}
| true
|
c5929b93cbe62e593680a223878f8299d9722a2e
|
Java
|
glohiya/mockRepo
|
/src/test/Animal.java
|
UTF-8
| 710
| 3.171875
| 3
|
[] |
no_license
|
package test;
public class Animal {
Animal() {
}
Animal(int a) {
}
/**
* @param args
*/
public static void main(String[] args) {
// dummy comment for DEMO-12
System.out.print(" animals main ");
final byte a;
a = 3;
System.out.print("\n "+a);
char ch1 = 'g';
boolean b5 = ch1 > 4.6;
System.out.println("\n "+ch1+" is > 4.6 - "+b5);
b5 = null instanceof Object;
System.out.println("\n " + " null check= " + b5 + " " + (null instanceof Object));
try {
System.out.print("\n 1");
System.out.print("\n XX"); // Added extra
System.out.print("\n 2");
} catch (Exception e) {
System.out.println("found = "+e);
} finally {
System.out.print("\n finally");
}
}
}
| true
|
3204900072aa5d9cc0258bb96b46815c19fd9404
|
Java
|
jenkinsci/docker-commons-plugin
|
/src/test/java/org/jenkinsci/plugins/docker/commons/tools/DockerToolInstallerTest.java
|
UTF-8
| 8,039
| 1.671875
| 2
|
[
"MIT"
] |
permissive
|
/*
* The MIT License
*
* Copyright 2016 CloudBees, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.jenkinsci.plugins.docker.commons.tools;
import hudson.FilePath;
import hudson.Functions;
import hudson.console.PlainTextConsoleOutputStream;
import hudson.model.TaskListener;
import hudson.slaves.DumbSlave;
import hudson.tools.InstallSourceProperty;
import hudson.util.StreamTaskListener;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.commons.io.output.TeeOutputStream;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.junit.Assume;
import org.junit.Rule;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.WithoutJenkins;
public class DockerToolInstallerTest {
@Rule
public JenkinsRule r = new JenkinsRule();
@Issue({"JENKINS-48674"})
@WithoutJenkins
@Test
public void testImageUrl() throws MalformedURLException {
assertEquals(new URL("https://get.docker.com/builds/Linux/x86_64/docker-1.10.0"), DockerToolInstaller.getDockerImageUrl("linux/x86_64", "1.10.0"));
assertEquals(new URL("https://get.docker.com/builds/Windows/x86_64/docker-1.10.0"), DockerToolInstaller.getDockerImageUrl("win/x86_64","1.10.0"));
assertEquals(new URL("https://get.docker.com/builds/Darwin/x86_64/docker-1.10.0"), DockerToolInstaller.getDockerImageUrl("mac/x86_64","1.10.0"));
assertEquals(new URL("https://get.docker.com/builds/Linux/x86_64/docker-17.05.0-ce"), DockerToolInstaller.getDockerImageUrl("linux/x86_64", "17.05.0-ce"));
assertEquals(new URL("https://get.docker.com/builds/Windows/x86_64/docker-17.05.0-ce"), DockerToolInstaller.getDockerImageUrl("win/x86_64","17.05.0-ce"));
assertEquals(new URL("https://get.docker.com/builds/Darwin/x86_64/docker-17.05.0-ce"), DockerToolInstaller.getDockerImageUrl("mac/x86_64","17.05.0-ce"));
assertEquals(new URL("https://get.docker.com/builds/Linux/x86_64/docker-latest"), DockerToolInstaller.getDockerImageUrl("linux/x86_64", "latest"));
assertEquals(new URL("https://get.docker.com/builds/Windows/x86_64/docker-latest"), DockerToolInstaller.getDockerImageUrl("win/x86_64","latest"));
assertEquals(new URL("https://get.docker.com/builds/Darwin/x86_64/docker-latest"), DockerToolInstaller.getDockerImageUrl("mac/x86_64","latest"));
assertEquals(new URL("https://download.docker.com/linux/static/stable/x86_64/docker-17.09.0-ce"), DockerToolInstaller.getDockerImageUrl("linux/x86_64", "17.09.0-ce"));
assertEquals(new URL("https://download.docker.com/win/static/stable/x86_64/docker-17.09.0-ce"), DockerToolInstaller.getDockerImageUrl("win/x86_64","17.09.0-ce"));
assertEquals(new URL("https://download.docker.com/mac/static/stable/x86_64/docker-17.09.0-ce"), DockerToolInstaller.getDockerImageUrl("mac/x86_64","17.09.0-ce"));
assertEquals(new URL("https://download.docker.com/linux/static/stable/x86_64/docker-20.10.6"), DockerToolInstaller.getDockerImageUrl("linux/x86_64", "20.10.6"));
assertEquals(new URL("https://download.docker.com/win/static/stable/x86_64/docker-20.10.6"), DockerToolInstaller.getDockerImageUrl("win/x86_64","20.10.6"));
assertEquals(new URL("https://download.docker.com/mac/static/stable/x86_64/docker-20.10.6"), DockerToolInstaller.getDockerImageUrl("mac/x86_64","20.10.6"));
}
@Issue({"JENKINS-36082", "JENKINS-32790", "JENKINS-48674"})
@Test
public void smokes() throws Exception {
Assume.assumeFalse(Functions.isWindows());
try {
new URL("https://get.docker.com/").openStream().close();
new URL("https://download.docker.com/").openStream().close();
} catch (IOException x) {
Assume.assumeNoException("Cannot contact download sites, perhaps test machine is not online", x);
}
String[] testedVersions = {"20.10.6", "19.03.9"};
DockerTool[] installations = new DockerTool[testedVersions.length];
for (int i = 0; i < testedVersions.length; i++) {
String v = testedVersions[i];
installations[i] = new DockerTool(v, "", Collections.singletonList(new InstallSourceProperty(Collections.singletonList(new DockerToolInstaller("", v)))));
}
r.jenkins.getDescriptorByType(DockerTool.DescriptorImpl.class).setInstallations(installations);
DumbSlave slave = r.createOnlineSlave();
FilePath toolDir = slave.getRootPath().child("tools/org.jenkinsci.plugins.docker.commons.tools.DockerTool");
List<FilePath> files = new ArrayList<>();
for (String v : testedVersions) {
FilePath exe = downloadDocker(slave, toolDir, v);
files.add(exe);
files.add(toolDir.child(v + "/.timestamp"));
}
assertThat("we do not have any extra files in here", toolDir.list("**"), arrayContainingInAnyOrder(files.toArray(new FilePath[files.size()])));
}
private FilePath downloadDocker(DumbSlave slave, FilePath toolDir, String version) throws IOException, InterruptedException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
TeeOutputStream tee = new TeeOutputStream(baos, new PlainTextConsoleOutputStream(System.err));
TaskListener l = new StreamTaskListener(tee);
ByteArrayOutputStream errStream = new ByteArrayOutputStream();
FilePath exe = toolDir.child(version+"/bin/docker");
// Download for first time:
assertEquals(exe.getRemote(), DockerTool.getExecutable(version, slave, l, null));
assertTrue(exe.exists());
assertThat(baos.toString(), containsString(Messages.DockerToolInstaller_downloading_docker_client_(version)));
// Next time we do not need to download:
baos.reset();
assertEquals(exe.getRemote(), DockerTool.getExecutable(version, slave, l, null));
assertTrue(exe.exists());
assertThat(baos.toString(), not(containsString(Messages.DockerToolInstaller_downloading_docker_client_(version))));
// Version check:
baos.reset();
if (slave.createLauncher(l).launch().cmds(exe.getRemote(), "version", "--format", "{{.Client.Version}}").quiet(true).stdout(tee).stderr(errStream).join() != 0) {
/* Failure message should mention /var/run/docker.sock */
assertThat(errStream.toString(), containsString("/var/run/docker.sock"));
} else {
/* Successful output should either be `latest` or include the docker version */
if (!version.equals("latest")) {
assertEquals(version, baos.toString().trim());
}
}
return exe;
}
}
| true
|
4966fd68fcd91519029d171ce028009125a095e2
|
Java
|
gulangcoder/customer
|
/service/system-web/src/main/java/cn/fintecher/system/mapper/EntPromotionRuleMapper.java
|
UTF-8
| 1,226
| 2.09375
| 2
|
[] |
no_license
|
package cn.fintecher.system.mapper;
import cn.fintecher.system.model.EntPromotionRule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* EntPromotionRuleMapper数据库操作接口类
*
**/
@Mapper
public interface EntPromotionRuleMapper {
/**
*
* 查询(根据主键ID查询)
*
**/
EntPromotionRule selectByPrimaryKey(@Param("id") Long id);
/**
*
* 删除(根据主键ID删除)
*
**/
int deleteByPrimaryKey(@Param("id") Long id);
/**
*
* 添加
*
**/
int insert(EntPromotionRule record);
/**
*
* 添加 (匹配有值的字段)
*
**/
int insertSelective(EntPromotionRule record);
/**
*
* 修改 (匹配有值的字段)
*
**/
int updateByPrimaryKeySelective(EntPromotionRule record);
/**
*
* 修改(根据主键ID修改)
*
**/
int updateByPrimaryKey(EntPromotionRule record);
//批量插入数据
int insertList(List<EntPromotionRule> list);
//根据活动的id删除对应的规则
int deleteByPromotionCode(String promotionCode);
//根据活动的id查询对应的规则
List<EntPromotionRule> selectByPromotionCode(String promotionCode);
}
| true
|
172326e186c662a78dce2a08da3976334b0585d0
|
Java
|
moezghattas/erp-bank-ejb
|
/erp-bank-ejb/src/main/java/services/interfaces/CashierServicesRemote.java
|
UTF-8
| 420
| 2
| 2
|
[] |
no_license
|
package services.interfaces;
import java.util.List;
import javax.ejb.Remote;
import entities.Cashier;
@Remote
public interface CashierServicesRemote {
Boolean addCashier(Cashier cashier);
Boolean deleteCashierById(Integer id);
Cashier findCashierById(Integer id);
Boolean updateCashier(Cashier cashier);
Boolean deleteCashier(Cashier cashier);
List<Cashier> findAllCashier();
}
| true
|
af2a4ff7bcb5a6062bb7d0aa2ceef8e60d3bd980
|
Java
|
bellmit/sducat
|
/sducat-common/src/main/java/com/sducat/common/enums/NoticeTypeEnum.java
|
UTF-8
| 640
| 2.5625
| 3
|
[] |
no_license
|
package com.sducat.common.enums;
import lombok.Getter;
/**
* Created by skyyemperor on 2021-02-25
* Description :
*/
@Getter
public enum NoticeTypeEnum {
INTERACTIVE_NOTICE(1, "互动通知"),
CHECK_NOTICE(2, "系统通知"),
;
private final Integer key;
private final String remark;
NoticeTypeEnum(Integer key, String remark) {
this.key = key;
this.remark = remark;
}
public static String getRemark(Integer key) {
for (NoticeTypeEnum enums : NoticeTypeEnum.values()) {
if (enums.key.equals(key)) return enums.getRemark();
}
return null;
}
}
| true
|
8a7ff534ae64510d99f6577bdee132c873c1d4d0
|
Java
|
viktor92/LanMsn
|
/app/src/main/java/com/lanmsn/fragments/ChatMessageAdapter.java
|
UTF-8
| 2,585
| 2.390625
| 2
|
[] |
no_license
|
package com.lanmsn.fragments;
import android.app.ActionBar;
import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import java.util.List;
import com.lanmsn.R;
public class ChatMessageAdapter extends ArrayAdapter<String> {
private Context context;
private List<String> messages = null;
public ChatMessageAdapter(Context context, int textViewResourceId,
List<String> items) {
super(context, textViewResourceId, items);
this.context=context;
this.messages=items;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
if (v == null) {
LayoutInflater vi = (LayoutInflater) context.getApplicationContext()
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.message_row, null);
}
String message = messages.get(position);
if (message != null && !message.isEmpty()) {
TextView nameText = (TextView) v
.findViewById(R.id.messageTextView);
if (nameText != null) {
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.MATCH_PARENT);
if (message.startsWith(WiFiChatFragment.myMessage)) {
String msg = message.substring(WiFiChatFragment.myMessage.length());
nameText.setText(msg);
params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
params.leftMargin=10;
params.rightMargin=10;
params.topMargin=10;
nameText.setLayoutParams(params);
nameText.setBackgroundResource(R.drawable.green_rectangle);
} else {
nameText.setText(message);
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
params.leftMargin=10;
params.rightMargin=10;
params.topMargin=10;
nameText.setLayoutParams(params);
nameText.setBackgroundResource(R.drawable.blue_rectangle);
}
}
}
return v;
}
}
| true
|
de7dc5d527c679aa7a0bed8829e1673126014de8
|
Java
|
gayyou/algorithm
|
/剑指offer题目/chaper4MoreEfficient/MoreThanHalfNumber.java
|
UTF-8
| 1,062
| 3.546875
| 4
|
[] |
no_license
|
package chaper4MoreEfficient;
/**
* @author Weybn
* @motto Rare in the word you're worth it.
* @time 2019/12/10 18:25
*/
public class MoreThanHalfNumber {
public static class TargetNumber {
int number;
int count;
public TargetNumber(int number) {
this.number = number;
}
}
public int getMoreThanHalfNumber(int[] intArray) {
TargetNumber targetNumber = new TargetNumber(Integer.MIN_VALUE);
for (int i = 0; i < intArray.length; i++) {
if (intArray[i] != targetNumber.number) {
if (targetNumber.count == 0) {
targetNumber.number = intArray[i];
targetNumber.count = 1;
} else {
targetNumber.count--;
}
} else {
targetNumber.count++;
}
}
return targetNumber.number;
}
public static void main(String[] args) {
MoreThanHalfNumber moreThanHalfNumber = new MoreThanHalfNumber();
int[] ints = new int[]{1, 2, 1, 1, 1, 3, 4, 1, 5, 5, 5, 5, 1, 1, 1};
System.out.println(moreThanHalfNumber.getMoreThanHalfNumber(ints));
}
}
| true
|
e68e870d2101d21bc1eaab006ee94c1bfacbe64b
|
Java
|
jwrzosek/PW_WEITI_PROZE_sokoban
|
/src/com/company/elements/Element.java
|
UTF-8
| 493
| 2.921875
| 3
|
[] |
no_license
|
package com.company.elements;
/**
* Interfejs, ktory implemntuja wszystkie Klasy, ktorych obiety s elementami rozgrywki.
*/
public interface Element {
/**
* Metoda zwracajaca wspolrzedna X przez obiekty klas implementujacych interfejs Element
* (Player, Wall, Crate, Finish)
*/
int getStartX();
/**
* Metoda zwracajaca wspolrzedna Y przez obiekty klas implementujacych interfejs Element
* (Player, Wall, Crate, Finish)
*/
int getStartY();
}
| true
|
b43c0e8fc62858369ef48f68093eb9e92b2650d6
|
Java
|
Abstract-fciencias/Abstract-Sciencie-Society
|
/AbstractScienceSociety/src/main/java/com/mycompany/abstractsciencesociety/model/Comentario.java
|
UTF-8
| 4,602
| 1.992188
| 2
|
[] |
no_license
|
/*
* 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.abstractsciencesociety.model;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedNativeQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author edervs
*/
@Entity
@Table(name = "comentario")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Comentario.findAll", query = "SELECT c FROM Comentario c")
, @NamedQuery(name = "Comentario.findByIdcomentario", query = "SELECT c FROM Comentario c WHERE c.idcomentario = :idcomentario")
, @NamedQuery(name = "Comentario.findByComentario", query = "SELECT c FROM Comentario c WHERE c.comentario = :comentario")
, @NamedQuery(name = "Comentario.findByFechapublicacion", query = "SELECT c FROM Comentario c WHERE c.fechapublicacion = :fechapublicacion")})
@NamedNativeQueries(value = {
@NamedNativeQuery(
name = "Comentario.findByIdtema",
query = "select * from comentario where idtema = ?1",
resultClass = Comentario.class
)
})
public class Comentario implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "idcomentario")
private Integer idcomentario;
@Basic(optional = false)
@Column(name = "comentario")
private String comentario;
@Basic(optional = false)
@Column(name = "fechapublicacion")
@Temporal(TemporalType.TIMESTAMP)
private Date fechapublicacion;
@JoinColumn(name = "idtema", referencedColumnName = "idtema")
@ManyToOne
private Tema idtema;
@JoinColumn(name = "idusuario", referencedColumnName = "idusuario")
@ManyToOne
private Usuario idusuario;
public Comentario() {
}
public Comentario(Integer idcomentario) {
this.idcomentario = idcomentario;
}
public Comentario(Integer idcomentario, String comentario, Date fechapublicacion) {
this.idcomentario = idcomentario;
this.comentario = comentario;
this.fechapublicacion = fechapublicacion;
}
public Comentario(String comentario, Date fechapublicacion) {
this.comentario = comentario;
this.fechapublicacion = fechapublicacion;
}
public Integer getIdcomentario() {
return idcomentario;
}
public void setIdcomentario(Integer idcomentario) {
this.idcomentario = idcomentario;
}
public String getComentario() {
return comentario;
}
public void setComentario(String comentario) {
this.comentario = comentario;
}
public Date getFechapublicacion() {
return fechapublicacion;
}
public void setFechapublicacion(Date fechapublicacion) {
this.fechapublicacion = fechapublicacion;
}
public Tema getIdtema() {
return idtema;
}
public void setIdtema(Tema idtema) {
this.idtema = idtema;
}
public Usuario getIdusuario() {
return idusuario;
}
public void setIdusuario(Usuario idusuario) {
this.idusuario = idusuario;
}
@Override
public int hashCode() {
int hash = 0;
hash += (idcomentario != null ? idcomentario.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Comentario)) {
return false;
}
Comentario other = (Comentario) object;
if ((this.idcomentario == null && other.idcomentario != null) || (this.idcomentario != null && !this.idcomentario.equals(other.idcomentario))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.mycompany.abstractsciencesociety.model.Comentario[ idcomentario=" + idcomentario + " ]";
}
}
| true
|
bcbb0344baad9dcfd3873c3b2176c29e24af76e3
|
Java
|
xmtsui/stepbystep
|
/java/testjava8/FunctionInterfaceTest.java
|
UTF-8
| 1,395
| 3.53125
| 4
|
[] |
no_license
|
/**
* 通过JDK8源码javadoc,可以知道这个注解有以下特点:
* 1、该注解只能标记在"有且仅有一个抽象方法"的接口上。
* 2、JDK8接口中的静态方法和默认方法,都不算是抽象方法。
* 3、接口默认继承java.lang.Object,所以如果接口显示声明覆盖了Object中方法,那么也不算抽象方法。
* 4、该注解不是必须的,如果一个接口符合"函数式接口"定义,那么加不加该注解都没有影响。加上该注解能够更好地让编译器进行检查。如果编写的不是函数式接口,但是加上了@FunctionInterface,那么编译器会报错。
* @FunctionalInterface标记在接口上,“函数式接口”是指仅仅只包含一个抽象方法的接口。
*/
public class FunctionInterfaceTest {
public static void main(String[] args){
InterfaceTest.staticMethod();
ImplTest implTest = new ImplTest();
implTest.defaultMethod();
implTest.abstractMethod();
}
}
@FunctionalInterface
interface InterfaceTest {
static void staticMethod() {
System.out.println("this is a static method");
}
default void defaultMethod() {
System.out.println("this is a default method");
}
void abstractMethod();
public boolean equals(Object var);
}
class ImplTest implements InterfaceTest {
public void abstractMethod() {
System.out.println("this is a abstract method");
}
}
| true
|
136dd77440aa93f78eed48907742c57f4bbd8dd4
|
Java
|
PhatPharm/SpaceSimulator
|
/CelestialBody.java
|
UTF-8
| 1,791
| 3.109375
| 3
|
[] |
no_license
|
package creation;
import java.util.*;
public class CelestialBody {
int x;
int y;
int sizeDiameter;
double mass;
double gravity;
Random r = new Random();
int centerX = this.getX();
int centerY = this.getY();
//boolean isOffscreen = false;
int maxX = Display.width - 150;
int minX = 150;
int maxY = Display.height - 150;
int minY = 150;
int moveOffset = 5;
int velocity;
CelestialBody() {
x = Display.width/2;//r.nextInt(maxX - minX) + minX;
y = Display.height/2 - 25;//r.nextInt(Display.height);//r.nextInt(maxY - minY) + minY;
}
public int convertToRadius(int d) {
//takes a diameter and converts it to radius
int r = d/2;
return r;
}
public int convertToDiameter(int r) {
//takes a radius and converts it to diameter
int d = r * 2;
return d;
}
public int convertToDraw(int centerCoordinate, int diameter) {
//takes the x coordinate of the oval and convert x coordinate to center
//size is in diameter
int drawCoordinate = centerCoordinate - convertToRadius(diameter);
return drawCoordinate;
}
public int convertToCenter(int drawCoordinate, int diameter) {
int centerCoordinate = drawCoordinate + convertToRadius(diameter);
return centerCoordinate;
}
public int setNewX(int centerX) {
// centerX = r.nextInt(Display.width);
return centerX;
}
public int setNewY() {
centerY = r.nextInt(Display.height);
return centerY;
}
public int getX() {
return convertToCenter(x, this.getDiameter());
}
public int getY() {
return convertToCenter(y, this.getDiameter());
}
public double getGravity() {
return gravity;
}
public double getMass() {
return mass;
}
public int getDiameter() {
return sizeDiameter;
}
}
| true
|
843385d2bea24f250b9a801f926f0a72045755a7
|
Java
|
kingwang09/meslap-pure
|
/src/org/jesus/meslap/user/dao/UserDAO.java
|
UTF-8
| 180
| 1.820313
| 2
|
[] |
no_license
|
package org.jesus.meslap.user.dao;
import org.jesus.meslap.entity.User;
public interface UserDAO {
public void save(User user);
public User get(String userId);
}
| true
|
0c1457b333ee7413a1ee04b849e385744bfa6011
|
Java
|
ntustSEteamTCard/TCard
|
/src/main/java/com/TCard/demo/Controller/FileUploadController.java
|
UTF-8
| 1,295
| 2.40625
| 2
|
[] |
no_license
|
package com.TCard.demo.Controller;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
public interface FileUploadController {
// // 多個檔案上傳的接口
// @PostMapping("/api/upload/multi")
// @ResponseBody
// public ResponseEntity<?> uploadFileMulti(@RequestParam("files") MultipartFile[] uploadfiles) {
//
//
// // 取得檔案名稱
// String uploadedFileName = Arrays.stream(uploadfiles).map(x -> x.getOriginalFilename())
// .filter(x -> !StringUtils.isEmpty(x)).collect(Collectors.joining(" , "));
//
// if (StringUtils.isEmpty(uploadedFileName)) {
// return new ResponseEntity("請選擇檔案!", HttpStatus.OK);
// }
//
// try {
//
// saveUploadedFiles(Arrays.asList(uploadfiles));
//
// } catch (IOException e) {
// return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
// }
//
// return new ResponseEntity("成功上傳 - "
// + uploadedFileName, HttpStatus.OK);
//
// }
}
| true
|
73ca36db316043395c8a01446cc2534aa43a5c1e
|
Java
|
hanfak/design-patterns-examples-
|
/commonlibraries/src/main/java/apache/ValueType.java
|
UTF-8
| 1,015
| 2.78125
| 3
|
[] |
no_license
|
package apache;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import static org.apache.commons.lang3.builder.ToStringStyle.SHORT_PREFIX_STYLE;
/**
* We have decided that it is OK to consider org.apache.commons.lang3.builder.* classes part of the domain.
* This is because these are just utility methods to save us from making manual mistakes implementing these methods.
*/
public abstract class ValueType {
@SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
@Override
public boolean equals(Object object) {
return EqualsBuilder.reflectionEquals(this, object);
}
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, SHORT_PREFIX_STYLE);
}
}
| true
|
d587a742b1fe37e7bc549e8396e6314fcbcec242
|
Java
|
mcwenar2018/DzienTrzeci
|
/src/ClassABC.java
|
UTF-8
| 924
| 3.15625
| 3
|
[] |
no_license
|
/*
//TO DO
public class ClassABC {
public static void main(String[] args) {
System.out.println("instrukcja AA");
new AA();
System.out.println("-------------");
System.out.println("instrukcja BB");
new BB();
System.out.println("-------------");
System.out.println("instrukcja CC");
new CC();
System.out.println("-------------");
}
}
class AA{
AA(){
System.out.println("Wywoluje AA");
}
public AA(boolean isSilent){
if (!isSilent){
System.out.println("AA - not silent");
}
}
class BB extends AA{
public BB() {
System.out.println("Wywoluje BB");
}
public BB(boolean isSilent){
super(isSilent);
if (!isSilent){
System.out.println("BB - not silent");
}
}
}}
*/
| true
|
ac5f8c621c2e15d4794fd3e24bd8eab4d562131d
|
Java
|
SamvelS/ProjectManagement
|
/src/main/java/com/workfront/ProjectManagement/domain/User.java
|
UTF-8
| 3,786
| 2.390625
| 2
|
[] |
no_license
|
package com.workfront.ProjectManagement.domain;
import com.workfront.ProjectManagement.validationOrder.FirstOrder;
import com.workfront.ProjectManagement.validationOrder.SecondOrder;
import com.workfront.ProjectManagement.validationOrder.ThirdOrder;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@Entity
@Table(name = "account")
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private int id;
@Column(name = "first_name")
@NotBlank(message="First name is required", groups = FirstOrder.class)
@Size(min = 2, max = 50, message = "Fist name length should be between 2 and 50", groups = SecondOrder.class)
private String firstName;
@Column(name = "last_name")
@NotBlank(message="Last name is required", groups = FirstOrder.class)
@Size(min = 2, max = 100, message = "Last name length should be between 2 and 100", groups = SecondOrder.class)
private String lastName;
@Column(name = "email")
@NotBlank(message = "Email is required", groups = FirstOrder.class)
@Pattern(regexp = "^[a-zA-Z0-9_!#$%&'*+/=?`{|}~^.-]+@[a-zA-Z0-9.-]+[a-zA-Z]", message = "Email is not valid", groups = SecondOrder.class)
@Size(max = 255, message = "Email length should be max 255 characters", groups = ThirdOrder.class)
private String email;
@Column(name = "password")
@NotBlank(message="Password is required", groups = FirstOrder.class)
@Size(min = 6, max = 50, message = "Password length should be between 6 and 50", groups = SecondOrder.class)
private String password;
@Column(name = "status_id")
private int statusId;
@Column(name = "created_on", updatable = false)
private Date createdOn;
@OneToMany(fetch = FetchType.EAGER)
@JoinTable
(
name = "account_role",
joinColumns = @JoinColumn(name = "account_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "role_id", referencedColumnName = "id")
)
private List<Role> roles;
public int getId() {
return id;
}
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public String getEmail() {
return email;
}
public String getPassword() {
return password;
}
public void setId(int id) {
this.id = id;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public void setEmail(String email) {
this.email = email;
}
public void setPassword(String password) {
this.password = password;
}
public List<Role> getRoles() {
return roles;
}
public void setRoles(List<Role> roles) {
this.roles = roles;
}
public List<Permission> getPermissions() {
if(this.roles == null) {
return Collections.emptyList();
}
return this.roles.stream().map(r -> r.getPermissions()).collect(Collectors.toList()).stream().flatMap(Collection::stream).collect(Collectors.toList());
}
public int getStatusId() { return this.statusId; }
public void setStatusId(int statusId) { this.statusId = statusId; }
public Date getCreatedOn() {
return createdOn;
}
public void setCreatedOn(Date createdOn) {
this.createdOn = createdOn;
}
}
| true
|
62f9fb5fea3f411e3a9a81cc8ccbc56630370213
|
Java
|
AH-Toby/Java-leaning
|
/basec-code/day06-code/src/cn/isearch/demo03/Person.java
|
UTF-8
| 423
| 3.328125
| 3
|
[] |
no_license
|
package cn.isearch.demo03;
public class Person {
String name;
private int age; //私有化
public void show(){
System.out.println("我的名字叫:"+name+"我的年龄:"+age);
}
public void setAge(int num) {
if (num>=0){
age = num;
}else {
System.out.println("数据错误");
}
}
public int getAge() {
return age;
}
}
| true
|
546b6969cdd421ca48b9c37f089898e87a7a3404
|
Java
|
KamilKolasa/System-zarzadzania-piosenkami-i-glosowania
|
/src/main/java/com/app/controller/AdminRestController.java
|
UTF-8
| 643
| 2.328125
| 2
|
[] |
no_license
|
package com.app.controller;
import com.app.model.dto.CreateSongDto;
import com.app.model.dto.Info;
import com.app.service.SongService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
@RestController
@RequiredArgsConstructor
@RequestMapping("/admin")
public class AdminRestController {
private final SongService songService;
@PostMapping("/addSong")
public Info<String> AddSong(@RequestBody CreateSongDto createSongDto) {
var createSong = songService.addSong(createSongDto);
return Info.<String>builder().data("SONG " + createSong.getName() + " IS ADD").build();
}
}
| true
|
c7d3595422391bc46a25cf72e3909d5b37bb3362
|
Java
|
Marccudi/UD10
|
/UD10/src/Ej1/UD10Ej1.java
|
UTF-8
| 211
| 1.578125
| 2
|
[] |
no_license
|
package Ej1;
//import java.util.InputMismatchException;
public class UD10Ej1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Aleatorio a = new Aleatorio();
a.menu();
}
}
| true
|
9ae9b332e7114efaaa3085dcb2bbbfe00c7eea3b
|
Java
|
RiiD/cloud-computing
|
/src/main/java/reactive_microservice_db/LoansDao.java
|
UTF-8
| 452
| 1.960938
| 2
|
[] |
no_license
|
package reactive_microservice_db;
import org.springframework.data.mongodb.repository.ReactiveMongoRepository;
import reactor.core.publisher.Flux;
import java.util.Date;
public interface LoansDao extends ReactiveMongoRepository<Loan,String> {
Flux<Loan> findAllByIsbn(String isbn);
Flux<Loan> findAllByReturnDateIsNotNull();
Flux<Loan> findAllByReader_email(String email);
Flux<Loan> findByLoanDateBetween(Date fromDate, Date toDate);
}
| true
|
2a20ebca753541cc3426de3d2ec680bde9b6191f
|
Java
|
Duckdan/AndroidFunctions
|
/app/src/main/java/study/com/androidfunctions/weight/SideslipRecyclerView.java
|
UTF-8
| 9,702
| 2.40625
| 2
|
[
"Apache-2.0"
] |
permissive
|
package study.com.androidfunctions.weight;
import android.content.Context;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.view.animation.LinearInterpolator;
import android.widget.Scroller;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseViewHolder;
import study.com.androidfunctions.R;
/**
* 侧滑的RecyclerView
*/
public class SideslipRecyclerView extends RecyclerView {
private Context mContext;
//检测滑动速度
private VelocityTracker mVelocityTracker;
private Scroller mScroller;
//4种状态,分别为关闭、正在关闭、正在打开、打开
private int status = CLOSE;
public static final int CLOSE = 0;
public static final int CLOSING = 1;
public static final int OPENING = 2;
public static final int OPEN = 3;
//滑动速度临界值
public static final int VELOCITY = 100;
//默认的滑动时间
public static final int DEFAULT_TIME = 200;
private View mItemView;
private int mPosition;
private TextView mDeleteView;
//删除图片的宽度
private int mMaxLength;
//OnTouch点的位置
private int mLastX;
private int mLastY;
//是否是水平滑动
private boolean isHorMoving;
//是否是垂直滑动
private boolean isVerMoving;
//是否开始滑动
private boolean isStartScroll;
private OnItemClickListener mListener;
//是否支持侧滑
private boolean isSlide = true;
private int noSlidePosition = -1;
public SideslipRecyclerView(Context context) {
this(context, null);
}
public SideslipRecyclerView(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public SideslipRecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
mContext = context;
mScroller = new Scroller(mContext, new LinearInterpolator());
mVelocityTracker = VelocityTracker.obtain();
}
public void setSlide(boolean isSlide) {
this.isSlide = isSlide;
}
/**
* 设置不滑动条目的最大位置
*/
public void setNoSlidePosition(int noSlidePosition) {
this.noSlidePosition = noSlidePosition;
}
@Override
public boolean onTouchEvent(MotionEvent e) {
if (!isSlide) { //不支持侧滑
return super.onTouchEvent(e);
}
mVelocityTracker.addMovement(e);
//获取当前坐标
int x = (int) e.getX();
int y = (int) e.getY();
//寻找对应坐标点下的V
View view = findChildViewUnder(x, y);
if (view == null) {
return false;
}
int position = getChildLayoutPosition(view);
if (position <= noSlidePosition) {
if (e.getAction() == MotionEvent.ACTION_UP) {
if (mListener != null) {
mPosition = position;
mListener.onItemClick(mItemView, mPosition);
}
}
return super.onTouchEvent(e);
}
switch (e.getAction()) {
case MotionEvent.ACTION_DOWN:
//删除图片还没打开的状态
if (status == CLOSE) {
//通过baseviewholder获取对应的子View,详情可以看代码
BaseViewHolder viewHolder = (BaseViewHolder) getChildViewHolder(view);
mItemView = viewHolder.getView(R.id.item_layout);
mPosition = viewHolder.getAdapterPosition();
mDeleteView = viewHolder.getView(R.id.item_delete);
mMaxLength = mDeleteView.getWidth();
mDeleteView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
//返回原点
mItemView.scrollTo(0, 0);
status = CLOSE;
if (mListener != null)
mListener.onDeleteClick(mPosition);
}
});
//当删除图片已经完全显示的时候
} else if (status == OPEN) {
//从当前view的偏移点mItemView.getScrollX(),位移-mMaxLength长度单位
// 时间DEFAULT_TIMEms,向左移动为正数
mScroller.startScroll(mItemView.getScrollX(), 0, -mMaxLength, 0, DEFAULT_TIME);
//刷新下一帧动画
invalidate();
status = CLOSE;
return false;
} else {
return false;
}
break;
case MotionEvent.ACTION_MOVE:
//获取上次的落点与当前的坐标之间的差值
int dx = mLastX - x;
int dy = mLastY - y;
int scrollX = mItemView.getScrollX();
//水平滑动距离大于垂直距离
if (Math.abs(dx) > Math.abs(dy)) {
isHorMoving = true;
//向左滑动,直至显示删除图片,向左滑动的最大距离不超过删除图片的宽度
if (scrollX + dx >= mMaxLength) {
mItemView.scrollTo(mMaxLength, 0);
return true;
//向右滑动,直至删除图片不显示,向右滑动的最大距离不超过初始位置
} else if (scrollX + dx <= 0) {
mItemView.scrollTo(0, 0);
return true;
}
//如果在图片还未完全显示的状态下,那么手指滑动多少,图片就移动多少
mItemView.scrollBy(dx, 0);
//mItemView.scrollTo(dx+scrollX,0);
} else {
}
break;
case MotionEvent.ACTION_UP:
if (!isHorMoving && !isVerMoving && mListener != null) {
mListener.onItemClick(mItemView, mPosition);
}
isHorMoving = false;
mVelocityTracker.computeCurrentVelocity(1000);//计算手指滑动的速度
float xVelocity = mVelocityTracker.getXVelocity();//水平方向速度(向左为负)
float yVelocity = mVelocityTracker.getYVelocity();//垂直方向速度
int upScrollX = mItemView.getScrollX();
int deltaX = 0;
//向右滑动速度为正数
//滑动速度快的状态下抬起手指,计算所需偏移量
if (Math.abs(xVelocity) > Math.abs(yVelocity) && Math.abs(xVelocity) >= VELOCITY) {
//向右隐藏
if (xVelocity >= VELOCITY) {
deltaX = -upScrollX;
status = CLOSING;
} else if (xVelocity <= -VELOCITY) {
deltaX = mMaxLength - upScrollX;
status = OPENING;
}
//滑动速度慢的状态下抬起手指,如果滑动距离大于1/2的图片宽度,计算偏移量
//不够的话恢复原点
} else {
if (upScrollX >= mMaxLength / 2) {
deltaX = mMaxLength - upScrollX;
status = OPENING;
} else {
deltaX = -upScrollX;
status = CLOSING;
}
}
mScroller.startScroll(upScrollX, 0, deltaX, 0, DEFAULT_TIME);
isStartScroll = true;
invalidate();
mVelocityTracker.clear();
break;
}
mLastX = x;
mLastY = y;
return super.onTouchEvent(e);
}
@Override
public void computeScroll() {
//滚动是否完成,true表示还未完成
if (mScroller.computeScrollOffset()) {
mItemView.scrollTo(mScroller.getCurrX(), mScroller.getCurrY());
invalidate();
//有滑动,并且在滑动结束的时候
} else if (isStartScroll) {
isStartScroll = false;
if (status == CLOSING)
status = CLOSE;
if (status == OPENING)
status = OPEN;
}
}
/**
* 恢复条目至初始状态
*/
public void revover() {
if (mItemView != null) {
mItemView.scrollTo(0, 0);
}
}
@Override
protected void onDetachedFromWindow() {
mVelocityTracker.recycle();
super.onDetachedFromWindow();
}
@Override
public void onScrollStateChanged(int state) {
super.onScrollStateChanged(state);
isVerMoving = state == SCROLL_STATE_DRAGGING;
}
public void setOnItemClickListener(OnItemClickListener listener) {
this.mListener = listener;
}
public interface OnItemClickListener {
/**
* item点击回调
*
* @param view
* @param position
*/
void onItemClick(View view, int position);
/**
* 删除按钮回调
*
* @param position
*/
void onDeleteClick(int position);
}
}
| true
|
dbbc1ed18ba33d9c3b2dde43f235436f5ce1dd42
|
Java
|
llmhyy/microbat
|
/sav.commons/src/test/java/sav/commons/testdata/calculator/CalculatorTest.java
|
UTF-8
| 1,783
| 2.5625
| 3
|
[] |
no_license
|
package sav.commons.testdata.calculator;
import org.junit.Assert;
import org.junit.Test;
public class CalculatorTest {
@Test
public void test1() {
int x = 0;
int y = 1;
int max = Calculator.getSum(x, y);
Assert.assertTrue(Calculator.validateGetSum(x, y, max));
}
@Test
public void test2() {
int x = 1;
int y = 1;
int max = Calculator.getSum(x, y);
Assert.assertTrue(Calculator.validateGetSum(x, y, max));
}
@Test
public void test3() {
int x = 2;
int y = 3;
int max = Calculator.getSum(x, y);
Assert.assertTrue(Calculator.validateGetSum(x, y, max));
}
@Test
public void test4() {
int x = -1;
int y = 1;
int max = Calculator.getSum(x, y);
Assert.assertTrue(Calculator.validateGetSum(x, y, max));
}
@Test
public void test5() {
int x = 5;
int y = -1;
int max = Calculator.getSum(x, y);
Assert.assertTrue(Calculator.validateGetSum(x, y, max));
}
@Test
public void test6() {
int x = 5;
int y = -4;
int max = Calculator.getSum(x, y);
Assert.assertTrue(Calculator.validateGetSum(x, y, max));
}
@Test
public void test7() {
int x = 50;
int y = 10;
int max = Calculator.getSum(x, y);
Assert.assertTrue(Calculator.validateGetSum(x, y, max));
}
@Test
public void test8() {
int x = 2;
int y = 1;
int max = Calculator.getSum(x, y);
Assert.assertTrue(Calculator.validateGetSum(x, y, max));
}
@Test
public void test9() {
int x = 10;
int y = 5;
int max = Calculator.getSum(x, y);
Assert.assertTrue(Calculator.validateGetSum(x, y, max));
}
@Test
public void test10() {
int x = -2;
int y = 1;
int max = Calculator.getSum(x, y);
Assert.assertTrue(Calculator.validateGetSum(x, y, max));
}
}
| true
|
33a27fa399d218c6263d88e91ff5dfb7d8c1ab7b
|
Java
|
gokintosh/datastructuresandalgojava
|
/src/main/java/com/gokul/questions/StringPrograms.java
|
UTF-8
| 579
| 3.421875
| 3
|
[] |
no_license
|
package com.gokul.questions;
public class StringPrograms {
public static void main(String[] args) {
String str="gokul";
System.out.println(reverse(str));
}
public static String reverse(String in){
if(in==null){
throw new IllegalArgumentException("null cannot be a valid string input");
}
StringBuilder out=new StringBuilder();
char[] stringAsChars=in.toCharArray();
for(int i=in.length()-1;i>=0;i--){
out.append(stringAsChars[i]);
}
return out.toString();
}
}
| true
|