Expected BEGIN_OBJECT but was STRING

Expected BEGIN_OBJECT but was STRING at line 1 column 1 path
我要往阿里云上传照片,一点上传就出现这个问题
图片说明
错误的地方:图片说明

1个回答

你的gson序列化的对象和要求的不同,第一个字段不能是string,你看下文档。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Gson : Expected BEGIN_ARRAY but was BEGIN_OBJECT
使用Gson解析的时候,遇到这个问题: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 21 path $.data Json字符串是这样的: { "data": { "banner": [ { "aid": "7", "catid": "0", "description": "asd", "end_time": "1432915200", "imgurl": "/upload/ads/2015-05-06/5549ac6f05399.jpg", "is_open": "1", "link": "http://", "order": "50", "start_time": "1430755200", "title": "asd" } ], "cat": [ { "addtime": "1429063456", "arrchildid": "1", "arrparentid": "", "catid": "1", "catname": "母婴2", "child": "0", "image": "", "is_show": "1", "listorder": "123", "pid": "0", "style": "0" }, { "addtime": "1429063835", "arrchildid": "2,3,4,12,16", "arrparentid": "", "catid": "2", "catname": "第三方", "child": "0", "image": "", "is_show": "1", "listorder": "0", "pid": "0", "style": "0" }, { "addtime": "1429068195", "arrchildid": "6,14", "arrparentid": "", "catid": "6", "catname": "母婴1", "child": "0", "image": "", "is_show": "1", "listorder": "0", "pid": "0", "style": "0" }, { "addtime": "1429068572", "arrchildid": "7", "arrparentid": "", "catid": "7", "catname": "母婴", "child": "0", "image": "", "is_show": "1", "listorder": "0", "pid": "0", "style": "0" }, { "addtime": "1429068577", "arrchildid": "8", "arrparentid": "", "catid": "8", "catname": "母婴水电费", "child": "0", "image": "", "is_show": "1", "listorder": "0", "pid": "0", "style": "0" }, { "addtime": "1429153032", "arrchildid": "11,13", "arrparentid": "", "catid": "11", "catname": "水电费水电费", "child": "0", "image": "", "is_show": "1", "listorder": "0", "pid": "0", "style": "0" }, { "addtime": "1430117866", "arrchildid": "15", "arrparentid": "", "catid": "15", "catname": "SDFG", "child": "0", "image": "", "is_show": "1", "listorder": "0", "pid": "0", "style": "0" } ], "filter": { "catid": 0, "keywords": "" }, "goods": [ { "addtime": "123123123", "brokerage": "600.00", "catid": "2", "collection": "0", "content": "", "description": "", "id": "4", "images": "", "is_delete": "0", "is_recommend": "1", "is_sale": "1", "keywords": "", "listorder": "12", "market_price": "1500.00", "on_sale": "0", "price": "1200.00", "sales": "0", "spec_array": "", "status": "1", "store": "120", "title": "我是商品1", "userid": "2" } ] }, "status": 0 } 使用HiJson格式化是这样的: ![图片说明](https://img-ask.csdn.net/upload/201505/07/1430994254_213752.png) 我的MallBean.java是这样写的 ``` public class MallBean { public List<MallData> data; public int status; public class MallData{ public List<MallDataBanner> banner; public List<MallDataCat> cat; public MallDataFilter filter; public List<MallDataGoods> goods; } public class MallDataBanner{ public String aid; public String catid; public String description; public String end_time; public String imgurl; public String is_open; public String link; public String order; public String start_time; public String title; } public class MallDataCat{ public String addtime; public String arrchildid; public String arrparentid; public String catid; public String catname; public String child; public String image; public String is_show; public String listorder; public String pid; public String style; } public class MallDataFilter{ public int catid; public String keywords; } public class MallDataGoods{ public String addtime; public String brokerage; public String catid; public String collection; public String content; public String description; public String id; public String images; public String is_delete; public String is_recommend; public String is_sale; public String keywords; public String listorder; public String market_price; public String on_sale; public String price; public String sales; public String status; public String store; public String title; public String userid; } } ``` 我解析是这样的(一下三种方法都是报同样的错): ``` Gson gson = new Gson(); MallBean mallBeanGson = gson.fromJson(response, MallBean.class); // MallBean mallBeanGson = gson.fromJson(response, new TypeToken<MallBean>(){}.getType()); // List<MallBean> mallBeanGson = gson.fromJson(response, new TypeToken<List<MallBean>>(){}.getType()); ```
代码出现 java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 21
这行代码是ResponseObject<List<Goods>> object=new GsonBuilder().create().fromJson(arg0.result, new TypeToken<ResponseObject<List<Goods>>>(){}.getType()); 求问什么原因有什么办法处理吗
Android 的Gson解析问题
public class DataEntity { /** * search_array : ["测试","解决"] * hot_search : ["解决","测试","12","测试3","黄金"] * major_search : ["专业搜索","专业搜索","专业搜索","专业搜索","专业搜索","专业搜索","专业搜索","专业搜索","专业搜索"] */ private List<Search_arrayEntity> search_array; private List<Hot_searchEntity> hot_search; private List<Major_searchEntity> major_search; public void setSearch_array(List<Search_arrayEntity> search_array) { this.search_array = search_array; } public void setHot_search(List<Hot_searchEntity> hot_search) { this.hot_search = hot_search; } public void setMajor_search(List<Major_searchEntity> major_search) { this.major_search = major_search; } public List<Search_arrayEntity> getSearch_array() { return search_array; } public List<Hot_searchEntity> getHot_search() { return hot_search; } public List<Major_searchEntity> getMajor_search() { return major_search; } public class Hot_searchEntity{ public String getTdata() { return tdata; } public void setTdata(String tdata) { this.tdata = tdata; } private String tdata; } public class Search_arrayEntity{ public String getData() { return data; } public void setData(String data) { this.data = data; } private String data; } public class Major_searchEntity{ public String data1; public String getDatat() { return data1; } public void setDatat(String data1) { this.data1 = data1; } } } 这样写实体类对吗? JsonException.JSON_TYPE json_type=JsonException.getJSONType(jsonObject.optString("data")); if(json_type.equals(JsonException.JSON_TYPE.JSON_TYPE_ARRAY)){ SearchBean searchBean=new Gson().fromJson(s, new TypeToken<SearchBean>(){}.getType()); searchView.getSuccess(searchBean); Log.e("GGG","arry"); }else if(json_type.equals(JsonException.JSON_TYPE.JSON_TYPE_OBJECT)){ SearchBean searchBean=new Gson().fromJson(s,SearchBean.class); searchView.getSuccess(searchBean); 报错信息如下: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 38 path $.data.search_array[0]
Gson解析Json数据出现了异常
在用Gson解析如下Json的时候 String jsonStr = "{code:403,msg:无查询好友信息,result:[]}"; 解析代码为: Gson son = new Gson(); MessageInfo info = son.fromJson(jsonStr, MessageInfo.class); System.out.println(info.getCode()); System.out.println(info.getResult()); System.out.println(info.getMsg()); MessageInfo.java private int code; private String msg; private Result result; result为空的时候,就会出现异常 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 31 望大神帮下忙,解决下,这个怎么来解析
gson将json格式的字符串转成java对象,json字符串中long怎么转变不会报错?
# gson将json格式的字符串转成java对象,json字符串中long怎么转变不会报错? public static void main(String[] args) { long timel=12323232L; SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String time=sdf.format(timel); System.out.println(time);//正常 Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create(); String obj="[{\"name\":\"caochuankui\",\"time\":"+timel+"}]"; JSONArray objo=new JSONArray(obj); GsonTest gt=gson.fromJson(objo.toString(), GsonTest.class);//报错 System.out.println(gt.getTime()); } } 错误信息如下: 1970-01-01 11:25:23 Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $ at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:200) at com.google.gson.Gson.fromJson(Gson.java:810) at com.google.gson.Gson.fromJson(Gson.java:775) at com.google.gson.Gson.fromJson(Gson.java:724) at com.google.gson.Gson.fromJson(Gson.java:696) at com.pagecofig.util.GsonTest.main(GsonTest.java:67) Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $ at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:387) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:189) ... 5 more 这要怎么解决,求大神指点
json解析json解析json解析
解析json出错 Expected BEGIN_ARRAY but was STRING at line 1 column 861 不知道怎么解析 这是返回的json: [{"Id":4,"ProductCode":"W003","ProductName":"智能钱包1号","ProductSName":"智能钱包1号","Description":"沿海银行推出的人民币理财系列产品,主要投资于优质信托融资项目、银行间债券市场的高信用等级债券等金融工具、理财计划、银行存款、承兑汇票等金融产品。期限灵活多选,并通过多种有效投资组合保障投资者的收益稳定可靠","Days":0,"TotalRaisedAmount":0.000000,"HasRaisedAmount":0.000000,"RaisedPercent":0.0,"RaisingStartDate":null,"RaisingEndDate":null,"ActualEstablishDate":null,"ProudctValueDate":null,"ProductDueDate":null,"EstimateCreditableDate":null,"ProductTypeId":2,"ProductTypeName":"IntelligentWallet","GoldExchangeName":"天安金交所","BankName":"沿海银行","BaseAmount":1.000000,"AdditionalAmount":1.000000,"PersonMaxAmount":0.000000,"Remark":null,"TDays":1,"TDaysForRedemption":1,"NearlySevenRate":4.320000,"MaxNearlySevenRate":0.000000,"MinNearlySevenRate":0.000000,"AmountPerMillion":1.150000,"IsNewComerBuy":true,"IsLimitTimeBuy":false,"StartDate":null,"EndDate":null,_"ProfitRule"_:"[{"Lv": 0,"Period": 7,"AmountPerMillion":1.15,"Rate": 4.51},{"Lv": 1,"Period": 15,"AmountPerMillion":1.16,"Rate": 4.52},{"Lv": 2,"Period": 30,"AmountPerMillion":1.17,"Rate": 4.53},{"Lv": 3,"Period": 45,"AmountPerMillion":1.18,"Rate": 4.54},{"Lv": 4,"Period": 60,"AmountPerMillion":1.19,"Rate": 4.55},{"Lv": 5,"Period": 75,"AmountPerMillion":1.20,"Rate": 4.56},{"Lv": 6,"Period": 90,"AmountPerMillion":1.21,"Rate": 4.57},{"Lv": 7,"Period": 120,"AmountPerMillion":1.22,"Rate": 4.58}]","HtmlBuyRule":null,"HtmlRedemptionRule":null,"HtmlProfitRule":null,"HtmlAssetRule":null} 这个是我的bean类: private int Id; private String ProductCode; private String ProductName; private String ProductSName; private String Description; private int Days; private double TotalRaisedAmount; private double HasRaisedAmount; private double RaisedPercent; private Object RaisingStartDate; private Object RaisingEndDate; private Object ActualEstablishDate; private Object ProudctValueDate; private Object ProductDueDate; private Object EstimateCreditableDate; private int ProductTypeId; private String ProductTypeName; private String GoldExchangeName; private String BankName; private double BaseAmount; private double AdditionalAmount; private double PersonMaxAmount; private Object Remark; private int TDays; private int TDaysForRedemption; private double NearlySevenRate; private double MaxNearlySevenRate; private double MinNearlySevenRate; private double AmountPerMillion; private boolean IsNewComerBuy; private boolean IsLimitTimeBuy; private Object StartDate; private Object EndDate; private List<Object> ProfitRule; private Object HtmlBuyRule; private Object HtmlRedemptionRule; private Object HtmlProfitRule; private Object HtmlAssetRule; 然后错误是出在这一行: dqlcproductEntityList = gson.fromJson(string, new TypeToken<List<ZnqbEntity>>(){}.getType()); 有没有大神知道怎么回事 是不是bean不对 主要看那个ProfitRule错误是Expected BEGIN_ARRAY but was STRING at line 1 column 861
Android解析JSON数组,如果里面有两个数组,要怎么处理
项目中遇到服务器给的文档里面有两个数组 这样 { "code":200, "message":"调用成功", "data":{ "mem_message_records":[ { "message_disease_typeid":"1", "message_disease_type":"心血管系统" }, { "message_disease_typeid":"2", "message_disease_type":"外围血管疾病" }, { "message_disease_typeid":"3", "message_disease_type":"脑血管疾病" }, { "message_disease_typeid":"4", "message_disease_type":"肺部疾病" }, { "message_disease_typeid":"5", "message_disease_type":"代谢疾病" }, { "message_disease_typeid":"6", "message_disease_type":"周围神经疾病" }, { "message_disease_typeid":"7", "message_disease_type":"其他疾病" } ], "mem_message_recordss":[ [ { "message_diseaseid":"1", "message_disease":"冠状动脉疾病" }, { "message_diseaseid":"2", "message_disease":"心绞痛" }, { "message_diseaseid":"3", "message_disease":"心肌梗死" }, { "message_diseaseid":"4", "message_disease":"冠状动脉血运重建" }, { "message_diseaseid":"5", "message_disease":"充血性心力衰竭" } ], [ { "message_diseaseid":"6", "message_disease":"闭塞性周围动脉粥样硬化" }, { "message_diseaseid":"7", "message_disease":"血栓行静脉炎" } ], [ { "message_diseaseid":"8", "message_disease":"脑血栓" }, { "message_diseaseid":"9", "message_disease":"短暂性脑供血不足" }, { "message_diseaseid":"10", "message_disease":"脑出血" } ], [ { "message_diseaseid":"11", "message_disease":"慢性支气管炎" }, { "message_diseaseid":"12", "message_disease":"慢性阻塞性肺病" }, { "message_diseaseid":"13", "message_disease":"支气管哮喘" }, { "message_diseaseid":"14", "message_disease":"间质性肺病" }, { "message_diseaseid":"15", "message_disease":"囊性肺纤维化" } ], [ { "message_diseaseid":"16", "message_disease":"1型糖尿病" }, { "message_diseaseid":"17", "message_disease":"2型糖尿病" }, { "message_diseaseid":"18", "message_disease":"糖尿病肾病" } ], [ { "message_diseaseid":"19", "message_disease":"糖尿病性周围精神病" }, { "message_diseaseid":"20", "message_disease":"自主神经性病变" } ], [ { "message_diseaseid":"21", "message_disease":"高血压" }, { "message_diseaseid":"22", "message_disease":"视网膜病变" }, { "message_diseaseid":"23", "message_disease":"恶性肿瘤" }, { "message_diseaseid":"24", "message_disease":"脑卒中" }, { "message_diseaseid":"25", "message_disease":"重性精神疾病" }, { "message_diseaseid":"26", "message_disease":"结核病" }, { "message_diseaseid":"27", "message_disease":"肝炎" }, { "message_diseaseid":"28", "message_disease":"先天畸形" }, { "message_diseaseid":"29", "message_disease":"其它" } ] ] } } 下面是我构建的实体类 这是最里层的两个, //疾病名称 public class JiBingdataname { private String message_diseaseid; private String message_disease; } //疾病类型 public class JiBingdata { private String message_disease_type; private String message_disease_typeid; } //外一层 public class JiBinglist { private List<JiBingdata> mem_message_records; private List<JiBingdataname> mem_message_recordss; } //最外层 public class JiBingbean { private String code; private String message; private JiBinglist data; } 下面是我的解析代码 //解析JSON数据 private class Mythread extends Thread { @Override public void run() { System.out.println("....启动线程"); //网络请求路径 String path = HttpInfo.PATH + HttpInfo.GET_JIBINGLIST + HttpInfo.ID; String jsonString = HttpUtils.getJsonContent(path); Gson gson = new Gson(); System.out.println("------------------------" + path); //解析json数据 jiBingbean = gson.fromJson(jsonString, JiBingbean.class); System.out.println("....启动线程" + jiBingbean); //解析成功后发送msg给UI主线程 Message msg = new Message(); msg.what = 101; myHandler.sendMessage(msg); } } 但是出现这样的问题 java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 520 path $.data.mem_message_recordss[0] logcat日志错误指向这一行, jiBingbean = gson.fromJson(jsonString, JiBingbean.class); 请教一下各位大神,是哪里处理的不好
retrofit请求获取返回值错误
retrofit请求获取返回值的时候retrofit.RetrofitError: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 37 path $.data ``` 进行请求的 ((App) getApplication()).getApi().updateAuthorization(access_token, nonce, timestamp, userCode, sign, userPhone, type, approvalinfo, modelIds, new Callback<AuthorityListEntity>() { @Override public void success(AuthorityListEntity authorityListEntity, Response response) { if (authorityListEntity.getMessage() != null) { if (authorityListEntity.isSuccess()) { failed(getResources().getString(R.string.authorizesucces)); } else { String message = authorityListEntity.getMessage(); if ("超时了".equals(message)) { String nonce = NetWorkUtil.getNonce(); String timestamp = NetWorkUtil.getTimestamp(); String refreshToken = SharedPreferencesUtils.getString(context, Constants.REFRESHTOKEN, ""); String code = SharedPreferencesUtils.getString(context, Constants.USERCODE, ""); String sign = new Md5().getMD5ofStr("refreshToken" + "=" + refreshToken + "&" + "userCode" + "=" + code + Constants.SIGNMANTISSA).toLowerCase(); refresh_1(nonce, timestamp, sign, refreshToken, code); } else { if (!TextUtils.isEmpty(message)) { failed(MessageUtils.setMessage(context, message)); } } } ``` 返回值 ``` {"accountOperationType":"2","data":{},"message":"编辑授权成功","modelIds":null,"page":0,"success":true,"total":0,"totalPages":0} ``` 下面是bean ``` public class AuthorityListEntity { private String message; private int page; private boolean success; private int total; private String accountOperationType; private List<String> modelIds; private List<DataBean> data; private int totalPages; public List<String> getModelIds() { return modelIds; } public void setModelIds(List<String> modelIds) { this.modelIds = modelIds; } public String getAccountOperationType() { return accountOperationType; } public void setAccountOperationType(String accountOperationType) { this.accountOperationType = accountOperationType; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public int getPage() { return page; } public void setPage(int page) { this.page = page; } public boolean isSuccess() { return success; } public void setSuccess(boolean success) { this.success = success; } public int getTotal() { return total; } public void setTotal(int total) { this.total = total; } public int getTotalPages() { return totalPages; } public void setTotalPages(int totalPages) { this.totalPages = totalPages; } public List<DataBean> getData() { return data; } public void setData(List<DataBean> data) { this.data = data; } public class DataBean { private String userPhone; private String deviceAddress; private int deviceNum; private String name; private String icon; private String isAuthorited; private String roomCode; private String deviceCode; private String type; private String userCode; private String accountOperationType; private String validationCode; public String getAccountOperationType() { return accountOperationType; } public void setAccountOperationType(String accountOperationType) { this.accountOperationType = accountOperationType; } public String getValidationCode() { return validationCode; } public void setValidationCode(String validationCode) { this.validationCode = validationCode; } public String getUserPhone() { return userPhone; } public void setUserPhone(String userPhone) { this.userPhone = userPhone; } public String getDeviceAddress() { return deviceAddress; } public void setDeviceAddress(String deviceAddress) { this.deviceAddress = deviceAddress; } public int getDeviceNum() { return deviceNum; } public void setDeviceNum(int deviceNum) { this.deviceNum = deviceNum; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getIcon() { return icon; } public void setIcon(String icon) { this.icon = icon; } public String getIsAuthorited() { return isAuthorited; } public void setIsAuthorited(String isAuthorited) { this.isAuthorited = isAuthorited; } public String getRoomCode() { return roomCode; } public void setRoomCode(String roomCode) { this.roomCode = roomCode; } public String getDeviceCode() { return deviceCode; } public void setDeviceCode(String deviceCode) { this.deviceCode = deviceCode; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getUserCode() { return userCode; } public void setUserCode(String userCode) { this.userCode = userCode; } } } ```
利用bmob加载数据到listview上,出现问题,求解决啊
使用bmob的菜鸟,写了一个利用bmob把图文数据加载到listview的代码,图片文件是用的bmobfile,我是通过获取它的URL然后进行网络图片下载来加载图片的,但是运行出错了,求解决啊 adapter的代码: public class ClassListAdapter extends BaseAdapter { private Context mContext; private LayoutInflater mInflater = null;// LayoutInflater作用是将layout的xml布局文件实例化为View类对象 private ArrayList<ClassInfo> mClassList = null; // 所选分类下的所有列表 public ClassListAdapter(Context context, ArrayList<ClassInfo> classList) { setmContext(context); mClassList = classList; mInflater = LayoutInflater.from(context); } @Override public int getCount() { return mClassList.size(); } @Override public Object getItem(int position) { return mClassList.get(position); } @Override public long getItemId(int position) { return position; } public void refresh(ArrayList<ClassInfo> list) { mClassList = list; notifyDataSetChanged(); } @Override public View getView(int position, View convertView, ViewGroup parent) { ClassHolder classHodler; if (convertView == null) { convertView = mInflater.inflate(R.layout.list_class_item, null); classHodler = new ClassHolder(); classHodler.tvClassName = (TextView) convertView .findViewById(R.id.tv_cn); classHodler.tvDate = (TextView) convertView .findViewById(R.id.tv_date); classHodler.ivClassPic = (ImageView) convertView .findViewById(R.id.class_pic); convertView.setTag(classHodler); } else { classHodler = (ClassHolder) convertView.getTag(); } classHodler.tvClassName.setText(mClassList.get(position).getCname()); classHodler.tvDate.setText(mClassList.get(position).getDate()); String url = mClassList.get(position).getCpic().getFileUrl(); classHodler.ivClassPic.setTag(url); new ImageLoader().showImageByThread(classHodler.ivClassPic, url); return convertView; } public Context getmContext() { return mContext; } public void setmContext(Context mContext) { this.mContext = mContext; } } listactivity的代码: public class ClassActivity extends Activity implements OnItemClickListener { private static final String TAG = "ClassActivity"; private ListView classListView; private ArrayList<ClassInfo> classList = new ArrayList<ClassInfo>(); private ClassListAdapter mClassListAdapter; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_class_all); initView(); initEvent(); } private void initEvent() { // TODO Auto-generated method stub mClassListAdapter = new ClassListAdapter(this, classList); classListView.setAdapter(mClassListAdapter); classListView.setOnItemClickListener(this); getClassData(); } private void initView() { // TODO Auto-generated method stub classListView = (ListView) findViewById(R.id.lv_class_all); } private void getClassData() { // TODO Auto-generated method stub BmobQuery<ClassInfo> query = new BmobQuery<ClassInfo>(); query.order("-updatedAt"); query.findObjects(this, new FindListener<ClassInfo>() { @Override public void onSuccess(final List<ClassInfo> object) { classList = (ArrayList<ClassInfo>) object; mClassListAdapter.refresh((ArrayList<ClassInfo>) classList); mClassListAdapter.notifyDataSetChanged(); } @Override public void onError(String arg0) { toast("获取数据失败了"); } }); } @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent toClassDetail = new Intent(ClassActivity.this, ClassDetailActivity.class); toClassDetail.putExtra("ClassName", classList.get(position).getCname()); toClassDetail.putExtra("ClassTeacherObjectId", classList.get(position) .getTobjectid()); toClassDetail.putExtra("ClassDate", classList.get(position).getDate()); toClassDetail.putExtra("ClassTime", classList.get(position).getTime()); toClassDetail.putExtra("ClassInfo", classList.get(position).getCinfo()); toClassDetail.putExtra("ClassPic", classList.get(position).getCpic() .getFileUrl()); startActivity(toClassDetail); } public void toast(String toast) { Toast.makeText(this, toast, Toast.LENGTH_SHORT); } } 这是运行时报的错 05-19 04:26:48.082: W/Zygote(25337): mz_is_rooted false 05-19 04:26:48.088: I/art(25337): Late-enabling -Xcheck:jni 05-19 04:26:48.153: E/art(25337): Failed sending reply to debugger: Broken pipe 05-19 04:26:48.153: I/art(25337): Debugger is no longer active 05-19 04:26:48.386: I/art(25337): Background sticky concurrent mark sweep GC freed 1718(102KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 41MB/41MB, paused 8.769ms total 20.573ms 05-19 04:26:48.835: E/GED(25337): Failed to get GED Log Buf, err(0) 05-19 04:26:48.837: I/art(25337): Background partial concurrent mark sweep GC freed 36(1912B) AllocSpace objects, 0(0B) LOS objects, 7% free, 50MB/54MB, paused 6.827ms total 24.126ms 05-19 04:26:48.851: I/OpenGLRenderer(25337): Initialized EGL, version 1.4 05-19 04:26:48.851: W/OpenGLRenderer(25337): Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... 05-19 04:26:48.867: I/OpenGLRenderer(25337): Initializing program atlas... 05-19 04:26:53.154: W/IInputConnectionWrapper(25337): clearMetaKeyStates on inactive InputConnection 05-19 04:26:56.365: E/MPlugin(25337): Unsupported class: com.mediatek.common.telephony.IOnlyOwnerSimSupport 05-19 04:26:56.379: E/WifiManager(25337): mWifiServiceMessenger == null 05-19 04:26:56.409: I/System.out(25337): url:http://open.bmob.cn/7/login 05-19 04:26:56.415: D/libc-netbsd(25337): [getaddrinfo]: hostname=open.bmob.cn; servname=(null); cache_mode=(null), netid=0; mark=0 05-19 04:26:56.415: D/libc-netbsd(25337): [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=4; ai_family=0 05-19 04:26:56.416: D/libc-netbsd(25337): [getaddrinfo]: hostname=open.bmob.cn; servname=(null); cache_mode=(null), netid=0; mark=0 05-19 04:26:56.416: D/libc-netbsd(25337): [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=1024; ai_family=0 05-19 04:26:56.476: D/libc-netbsd(25337): getaddrinfo: open.bmob.cn get result from proxy >> 05-19 04:26:56.476: I/System.out(25337): propertyValue:true 05-19 04:26:56.478: I/System.out(25337): [CDS]connect[open.bmob.cn/123.59.85.59:80] tm:2 05-19 04:26:56.545: I/System.out(25337): [OkHttp] sendRequest>> 05-19 04:26:56.545: I/System.out(25337): [OkHttp] sendRequest<< 05-19 04:26:56.609: I/NetworkManagementSocketTagger(25337): untagSocket(39) 05-19 04:26:56.799: E/MPlugin(25337): Unsupported class: com.mediatek.common.telephony.IOnlyOwnerSimSupport 05-19 04:26:56.806: E/WifiManager(25337): mWifiServiceMessenger == null 05-19 04:26:56.820: I/System.out(25337): url:http://open.bmob.cn/7/find 05-19 04:26:56.849: I/System.out(25337): [CDS]EAGAIN in Recvfrom 05-19 04:26:56.849: I/System.out(25337): [CDS]read byte is 0 05-19 04:26:56.849: I/System.out(25337): [OkHttp] sendRequest>> 05-19 04:26:56.850: I/System.out(25337): [OkHttp] sendRequest<< 05-19 04:26:56.921: I/NetworkManagementSocketTagger(25337): untagSocket(39) 05-19 04:26:56.994: E/AndroidRuntime(25337): FATAL EXCEPTION: main 05-19 04:26:56.994: E/AndroidRuntime(25337): Process: com.keke.doexercise, PID: 25337 05-19 04:26:56.994: E/AndroidRuntime(25337): g.Hamlet: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 176 05-19 04:26:56.994: E/AndroidRuntime(25337): at j.Though$This.Code(SourceFile:176) 05-19 04:26:56.994: E/AndroidRuntime(25337): at g.Tempest.Code(SourceFile:803) 05-19 04:26:56.994: E/AndroidRuntime(25337): at g.Tempest.Code(SourceFile:717) 05-19 04:26:56.994: E/AndroidRuntime(25337): at cn.bmob.v3.requestmanager.thing$3.Code(SourceFile:1) 05-19 04:26:56.994: E/AndroidRuntime(25337): at cn.bmob.v3.requestmanager.This.V(SourceFile:1) 05-19 04:26:56.994: E/AndroidRuntime(25337): at e.I.run(SourceFile:99) 05-19 04:26:56.994: E/AndroidRuntime(25337): at android.os.Handler.handleCallback(Handler.java:815) 05-19 04:26:56.994: E/AndroidRuntime(25337): at android.os.Handler.dispatchMessage(Handler.java:104) 05-19 04:26:56.994: E/AndroidRuntime(25337): at android.os.Looper.loop(Looper.java:194) 05-19 04:26:56.994: E/AndroidRuntime(25337): at android.app.ActivityThread.main(ActivityThread.java:5779) 05-19 04:26:56.994: E/AndroidRuntime(25337): at java.lang.reflect.Method.invoke(Native Method) 05-19 04:26:56.994: E/AndroidRuntime(25337): at java.lang.reflect.Method.invoke(Method.java:372) 05-19 04:26:56.994: E/AndroidRuntime(25337): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1005) 05-19 04:26:56.994: E/AndroidRuntime(25337): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:800) 05-19 04:26:56.994: E/AndroidRuntime(25337): Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 176 05-19 04:26:56.994: E/AndroidRuntime(25337): at l.This.beginArray(SourceFile:338) 05-19 04:26:56.994: E/AndroidRuntime(25337): at j.of$This.Code(SourceFile:1) 05-19 04:26:56.994: E/AndroidRuntime(25337): at j.Though$1.Code(SourceFile:93) 05-19 04:26:56.994: E/AndroidRuntime(25337): at j.Though$This.Code(SourceFile:172) 05-19 04:26:56.994: E/AndroidRuntime(25337): ... 13 more 05-19 04:26:57.004: I/Process(25337): Sending signal. PID: 25337 SIG: 9 05-19 04:26:58.048: I/art(25443): Background sticky concurrent mark sweep GC freed 701(46KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 50MB/50MB, paused 5.901ms total 15.544ms 05-19 04:26:58.051: E/GED(25443): Failed to get GED Log Buf, err(0) 05-19 04:26:58.068: I/OpenGLRenderer(25443): Initialized EGL, version 1.4 05-19 04:26:58.069: W/OpenGLRenderer(25443): Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... 05-19 04:26:58.084: I/OpenGLRenderer(25443): Initializing program atlas... 05-19 04:27:29.607: W/IInputConnectionWrapper(25443): showStatusIcon on inactive InputConnection
本人计算机编程初学者,在国外学习,给的作业不知如何入门求大神解读
以下是题目联系 求大神指导一二 # 此问题如何进行编写 The TextBook class. Fields (Instance Variables): The class should have three private fields: one of type String to represent the title of the text book, one of type int to represent the length of the book in chapters, and one of type int to represent the number of the last chapter to be read (i.e. the number of chapters read so far). Constructor Method: The class should provide a constructor method with two parameters, one of type String and the other of type int. The first parameter represents the title of the book and the second its length in chapters. The constructor should therefore initialise a TextBook object by setting the title of the book to the specified String, and the length of the book to the specified int. In addition, the number of the last chapter read should initially be set to zero (as nothing has been read at this point) Other Methods: A TextBook object should also have the following public methods associated with it: • a method getTitle() that returns the String that represents the title of the book. • a void method readNextChapter() that 'reads' the next chapter of the book (if this is possible): i.e. it should cause the 'last chapter' field to be increased by one, but only if there are chapters left to be read! If there are no more chapters left to read (i.e. the last chapter read was the final chapter of the book) then it should simply print out a suitable warning message. • a boolean method isFinished() that returns true if there are no chapters of the book left to read and false otherwise. • a void method closeBook() that resets the last chapter read field to zero (i.e. it is used to return the book to its initial state, ready for the next person to begin reading it). • a void method describe() that prints out a simple description of the text book, with the book title and number of chapters left to read, e.g.: "Programming with Java with 4 chapters left to read" The LibraryCard Class Fields (Instance Variables): Your implementation of the LibraryCard class should provide the following private fields: • an int field that holds the limit on the number of books that the card can be used to borrow. • an int field that holds the number of books that have been borrowed on the card so far. • a String field that holds a card reference, for e.g. "cardID 3", "cardID 27" or "cardID 94". Constructor: The constructor method should take two int parameters: the first is used to set the limit on the number of books that can be borrowed with the card. • the second is used to set the card reference. Note: the card reference should be a String of the form "cardID NUM", where NUM is the actual value of the second formal parameter of the constructor. The constructor should also initialise the 'number of books borrowed' field as 0 when the card is constructed. Methods: There are four methods in addition to the constructor: a method with signature public void swipe() which when invoked, increases the number of books borrowed on the card by one. • a method with signature public boolean expired() which returns true if no more books can be borrowed on the card, and false otherwise. • a method with signature public String getCardRef() that returns the value of the card reference field. • a method with signature public void describe() that prints out a description of the card, for e.g. "Library card cardID 27 with 3 books left". The Library Class Fields (Instance Variables): Your implementation of the Library class should declare the following private fields: A field TextBook[] bookShelf which holds the library's collection of TextBook objects. • You will also find it useful to have an int field (called nextBook or something similar) which indicates the position on the bookShelf where the next TextBook object can be found (the next one available for borrowing when someone presents a valid library card). • an int field representing the number of borrowers who have been issued with library cards. Constructor: The class should have a constructor with a single integer parameter which determines the maximum number of TextBook objects that may be held on the library's bookShelf. Note: A problem here is to set up the Library object up so that it contains TextBook objects in an array. There are several steps in Java to setting up an array of objects: 1. Declare a variable of the appropriate type (in this case it is just the field bookShelf). 2. Create an array and store it in the variable (at this point it is an array of nulls). 3. Fill the array up with suitable objects (for which you will need to use a suitable loop statement) A further issue is how to construct the TextBook objects that are put into the bookShelf array. One simple possibility is to give all the books the same title and number of chapters. A better possibility would be to give the books different titles, for example "text book 1", "text book 2","text book 3" and so one (the number of chapters can still be the same for each book). This is fairly simple to do as you can keep track of the number of each book as you go through the loop statement. Methods: The class has the following methods in addition to the constructor: a method with signature public LibraryCard issueCard() that when invoked issues (i.e. returns) a new LibraryCard object. The method should increment the count of the number of library borrowers by 1. Note: to issue a new LibraryCard it is necessary to provide two int parameter values (see description of LibraryCard constructor, above). The limit on borrowing can be fixed with a small int value, such as 5. However, the card identity number should be unique to each card, so you need to find a way of setting the actual parameter value to a different int value each time a new card is constructed. (Hint: think about numbering the cards sequentially, according to the number of borrowers. So, the first card issued might be given the reference "cardID 0", the next card "cardID 1", and so on.) • A method with signature public TextBook borrowBook(LibraryCard card), which allows a book to be borrowed from the library if a valid (i.e. non-expired) LibraryCard is presented. If there are still books left to be borrowed in the library and the card object has not expired, then the method should return the next TextBook object from the bookShelf array (and otherwise, it should return the null object). The method should also 'remove' the TextBook object from the bookShelf (by setting the array location to null) and increment the field that indicates the location of the next book that may be borrowed. Finally, the method should ensure that the library card is 'swiped' to record that a book has been borrowed. (Note: you may also wish to ensure that your method behaves sensibly if passed a null LibraryCard object.) • a method with signature public void returnBook(TextBook book) that allows a book to be handed back to the library. The method will need to put the book back in the bookShelf array. Note: it is important that it should do this in such a way that there are no 'gaps' on the shelf, and you may find that the pointer to the next book to be borrowed is again useful here. Once the TextBook has been put back in the array, the method will also need to change the 'next book' pointer appropriately. • a method with signature public void describe() that, as usual, is responsible for printing out a description of the object. In this case, an example of the sort of message that should be printed out is: "The library has 15 books left on the shelf and has issued 7 library cards". Testing Having written the classes make sure that they work properly. Get one or more instances of the classes onto the BlueJ workbench and check that they behave the way that they should. For example, what happens if you try to borrow a book with an invalid card, or when there are no books left on the book shelf? Make sure that you can only borrow as many books from the library as were put on the book shelf in the first place, and that library card expires once it has been swiped up to its limit. Use BlueJ's inspect facility to check that text books borrowed from the library really are removed from the bookShelf array, and so on. Layout and Code Style It is important to make sure that you lay out your code properly. In particular make sure that everything is indented properly, and that opening and closing braces are lined up. Also make sure you use meaningful variable names and follow the Java naming conventions (i.e. follow capitalisation conventions). Note that no comments are required at this stage (we will be looking at commenting later). Marking Scheme 50 marks awarded in all. class TextBook: (12 marks overall) Fields: 2 marks for correct work. Constructor: 2 marks for correct work. Methods: 8 marks in all for correct work. Methods getTitle() and closeBook() are worth 1 mark each. Method isFinished(), describe() and readChapter() carry 2 marks each. All marks lost for a method if it is completely incorrect, incoherent or missing. Lose 1 mark is isFinished() does the right thing but redundantly. Similarly, lose 1 mark for describe() if it uses more than a single print statement. For reachChapter(), the conditional expression should not allow a chapter to be read if the book is finished. class LibraryCard: (worth 15 marks overall) Fields: 2 marks for correct work. Constructor: 3 marks for correct work. Methods: 10 marks for work as per the spec. Methods describe() and getCardRef() are worth 2 marks each; methods swipe() and expired() are worth 3 marks each; Marks lost for use of incorrect return types, or over-use of conditional statements in method expired() etc. class Library: (worth 23 marks overall) Fields: 2 marks for correct work. Marks lost for missing out a field or failing to make it private or of the correct type. Constructor: 4 marks for correct work. Marks lost for failing to initialise fields appropriately. Note that a loop is needed to initialise the bookShelf[] array. Marls lost for getting the bounds on the loop wrong or failing to build a new TextBook object to assign to each location. One mark lost for failing to give each book a unique title (same number of chapters is fine). Methods: 17 marks for correct work. Methods returnBook() and describe() earn 3 marks each; method issueCard() is worth 4 marks, and method borrowBook(LibraryCard card) is worth 7. Marks lost for a method if it is completely incorrect or missing. Marks also lost for failing to implement a method as described in the brief (e.g check that borrowers field is incremented when a card is issued, and that the LibraryCard gets a unique card reference number. Marks lost if the the returnBook(TextBook book) method doesn't put books back in the way specified in the brief. Layout & Commenting: Code should be laid out clearly and systematically. Indentation should be used, and a consistent and sensible bracketing convention adopted throughout. Marks are lost for weird, unsystematic, inconsistent or obscure layout. Comments are not expected.
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
【资源】一个C/C++开发工程师的学习路线(已经无路可退,唯有逆风飞翔)【内附资源页】
声明: 1)该文章整理自网上的大牛和专家无私奉献的资料,具体引用的资料请看参考文献。 2)本文仅供学术交流,非商用。所以每一部分具体的参考资料并没有详细对应。如果某部分不小心侵犯了大家的利益,还望海涵,并联系博主删除。 3)博主才疏学浅,文中如有不当之处,请各位指出,共同进步,谢谢。 4)此属于第一版本,若有错误,还需继续修正与增删。还望大家多多指点。大家都共享一点点,一起为祖国科研的推进...
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
20道你必须要背会的微服务面试题,面试一定会被问到
写在前面: 在学习springcloud之前大家一定要先了解下,常见的面试题有那块,然后我们带着问题去学习这个微服务技术,那么就会更加理解springcloud技术。如果你已经学了springcloud,那么在准备面试的时候,一定要看看看这些面试题。 文章目录1、什么是微服务?2、微服务之间是如何通讯的?3、springcloud 与dubbo有哪些区别?4、请谈谈对SpringBoot 和S...
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
2020 年,大火的 Python 和 JavaScript 是否会被取而代之?
Python 和 JavaScript 是目前最火的两大编程语言,但是2020 年,什么编程语言将会取而代之呢? 作者 |Richard Kenneth Eng 译者 |明明如月,责编 | 郭芮 出品 | CSDN(ID:CSDNnews) 以下为译文: Python 和 JavaScript 是目前最火的两大编程语言。然而,他们不可能永远屹立不倒。最终,必将像其他编程语言一...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
神级宝库!GitHub 标星 1.2w+,Chrome 最天秀的插件都在这里啦!
作者 | Rocky0429 来源 | Python空间 大家好,我是 Rocky0429,一个沉迷 Chrome 不能自拔的蒟蒻… 作为一个在远古时代用过什么 IE、360、猎豹等浏览器的资深器哥,当我第一次了解 Chrome 的时候,就被它的美貌给吸引住了… 就在我用了一段时间之后,我坚决的卸载了电脑上其它碍眼的浏览器,并觉得在之前的搬砖生涯中,我不配当哥,我只配是个沙雕… ...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
张朝阳回应迟到 1 分钟罚 500:资本家就得剥削员工
loonggg读完需要2分钟速读仅需 1 分钟大家我,我是你们的校长。前几天,搜狐的董事局主席兼 CEO 张朝阳和搜狐都上热搜了。原因很简单,就是搜狐出了“考勤新规”。一封搜狐对员工发布...
一个程序在计算机中是如何运行的?超级干货!!!
强烈声明:本文很干,请自备茶水!???? 开门见山,咱不说废话! 你有没有想过,你写的程序,是如何在计算机中运行的吗?比如我们搞Java的,肯定写过这段代码 public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } ...
【蘑菇街技术部年会】程序员与女神共舞,鼻血再次没止住。(文末内推)
蘑菇街技术部的年会,别开生面,一样全是美女。
那个在阿里养猪的工程师,5年了……
简介: 在阿里,走过1825天,没有趴下,依旧斗志满满,被称为“五年陈”。他们会被授予一枚戒指,过程就叫做“授戒仪式”。今天,咱们听听阿里的那些“五年陈”们的故事。 下一个五年,猪圈见! 我就是那个在养猪场里敲代码的工程师,一年多前我和20位工程师去了四川的猪场,出发前总架构师慷慨激昂的说:同学们,中国的养猪产业将因为我们而改变。但到了猪场,发现根本不是那么回事:要个WIFI,没有;...
为什么程序猿都不愿意去外包?
分享外包的组织架构,盈利模式,亲身经历,以及根据一些外包朋友的反馈,写了这篇文章 ,希望对正在找工作的老铁有所帮助
Java校招入职华为,半年后我跑路了
何来 我,一个双非本科弟弟,有幸在 19 届的秋招中得到前东家华为(以下简称 hw)的赏识,当时秋招签订就业协议,说是入了某 java bg,之后一系列组织架构调整原因等等让人无法理解的神操作,最终毕业前夕,被通知调往其他 bg 做嵌入式开发(纯 C 语言)。 由于已至于校招末尾,之前拿到的其他 offer 又无法再收回,一时感到无力回天,只得默默接受。 毕业后,直接入职开始了嵌入式苦旅,由于从未...
从顶级黑客到上市公司老板
一看标题,很多老读者就知道我在写什么了。今天Ucloud成功上市,季昕华成为我所熟悉的朋友里又双叒叕一个成功上市的案例。我们认识大概是十五年多吧,如果没记错,第一次见面应该是2004年,...
世界上有哪些代码量很少,但很牛逼很经典的算法或项目案例?
点击上方蓝字设为星标下面开始今天的学习~今天分享四个代码量很少,但很牛逼很经典的算法或项目案例。1、no code 项目地址:https://github.com/kelseyhight...
​两年前不知如何编写代码的我,现在是一名人工智能工程师
全文共3526字,预计学习时长11分钟 图源:Unsplash 经常有小伙伴私信给小芯,我没有编程基础,不会写代码,如何进入AI行业呢?还能赶上AI浪潮吗? 任何时候努力都不算晚。 下面,小芯就给大家讲一个朋友的真实故事,希望能给那些处于迷茫与徘徊中的小伙伴们一丝启发。(下文以第一人称叙述) 图源:Unsplash 正如Elsa所说,职业转换是...
强烈推荐10本程序员必读的书
很遗憾,这个春节注定是刻骨铭心的,新型冠状病毒让每个人的神经都是紧绷的。那些处在武汉的白衣天使们,尤其值得我们的尊敬。而我们这些窝在家里的程序员,能不外出就不外出,就是对社会做出的最大的贡献。 有些读者私下问我,窝了几天,有点颓丧,能否推荐几本书在家里看看。我花了一天的时间,挑选了 10 本我最喜欢的书,你可以挑选感兴趣的来读一读。读书不仅可以平复恐惧的压力,还可以对未来充满希望,毕竟苦难终将会...
立即提问