pycuda写核函数报错error: expected a ")" 5C

核函数为利用模板更新像素点
通过pycuda写cuda核函数时报错:kernel.cu(3): error: expected a ")"

kernel.cu(9): error: identifier "template_size" is undefined

kernel.cu(13): warning: expression has no effect

kernel.cu(13): warning: expression has no effect

kernel.cu(13): error: expected an expression

kernel.cu(18): error: expected a ")"

kernel.cu(23): error: identifier "border" is undefined

kernel.cu(24): error: identifier "rows" is undefined

kernel.cu(26): error: identifier "cols" is undefined

kernel.cu(33): error: expected an expression

8 errors detected in the compilation of "/tmp/tmpxft_00005035_00000000-7_kernel.cpp1.ii".
]

import os,math,cv2,numpy
from PIL import Image
import numpy as np
import skimage
import pycuda.autoinit
import pycuda.driver as drv
from pycuda.compiler import SourceModule
from timeit import default_timer as timer

mod = SourceModule("""
__global__ void Gauss_cuda(int ***img,int ***im,float **template,int template_size)
{
    int x = blockIdx.x * blockDim.x + threadIdx.x;
    int y = blockIdx.y * blockDim.y + threadIdx.y;
    int z = threadIdx.z;
    int count = 0;
    for(int i=x;i<x+template_size;i++)
    {
        for(int j=y;j<y+template_size;j++)
        {
            count += im[i,j,z]*template[i,j,z]; 
        }
    }
    img[x][y][z] = count;  
}
__global__ void bilateral_cuda(float ***img,float ***orig,float **template,float border,float sigma1,float sigma2,int rows,int cols)
{
    int x = blockIdx.x * blockDim.x + threadIdx.x;
    int y = blockIdx.y * blockDim.y + threadIdx.y;
    int z = threadIdx.z;
    int xmin = max(x-border,0);
    int xmax = min(x+border+1,rows);
    int ymin = max(y-border,0);
    int ymax = min(y+border+1,cols);
    int w = 0;
    int v = 0;
    for(int i=xmin;i<xmax;i++)
    {
        for(int j=ymin;j<ymax;j++)
        {
            w += w+template[xmin-x+border+i,ymin-y+border+i]*exp((orig[i,j,z]-orig[x,y,z])*(orig[i,j,z]-orig[x,y,z])/(2*sigma2*sigma2));
            v += orig[x][y][z]*w;               
        }
    }
    img[x][y][z] = v/w;  
}

""")

Gauss_cuda = mod.get_function("Gauss_cuda")
bilateral_cuda = mod.get_function("bilateral_cuda")


def generateGaussianTemplate(template_size,sigma):
    template = np.zeros((template_size,template_size))
    mid = template_size/2
    sum = 0
    pi = 3.1415926
    for i in range(template_size):
        x = pow(i-mid,2)
        for j in range(template_size):
            y = pow(j-mid,2)
            g = math.exp((x+y)/(-2*sigma*sigma))/(2*pi*sigma)
            template[i][j] = g
            sum+=g
    #归一化
    template = template/sum
    return template

def Gauss_filter(img,template_size,sigma):
    [rows,cols,channel] = img.shape
    border = int(template_size/2)
    template = generateGaussianTemplate(template_size,sigma)
    im = cv2.copyMakeBorder(img,border,border,border,border,cv2.BORDER_REPLICATE)
    Gauss_cuda(
                drv.InOut(img), drv.In(im), drv.In(template),template_size,
                block=(template_size,template_size,3),grid=(rows,cols))
    return img

def Bilateral_filter(img,template_size,sigma1,sigma2):
    img = img/255
    border = int(template_size/2)
    [rows,cols,channel] = img.shape
    tmp = np.arange(-border,border+1)
    [x,y] = np.meshgrid(tmp,tmp)
    X = np.power(x,2)
    Y = np.power(y,2)
    d = np.exp(-(X+Y)/(2*sigma1*sigma1))
    orig_img = img
    Gauss_cuda(
                drv.InOut(img), drv.In(orig_img), drv.In(d),border,sigma1,sigma2,rows,cols,
                block=(template_size,template_size,3),grid=(rows,cols))
    return img*255

if __name__=='__main__':
    img = cv2.imread('demo2.jpg')
    #noise = skimage.util.random_noise(img,'gaussian')*255
    #cv2.imwrite('noise.jpg',noise)
    template_size = 3
    sigma_g = 0.8
    sigma = [3,0.1]
    bilateral = Bilateral_filter(img,template_size,sigma[0],sigma[1])
    Gauss = Gauss_filter(img,template_size,sigma_g)
    cv2.imwrite('bilateral_result_{}_{}_{}.jpg'.format(template_size,sigma[0],sigma[1]),bilateral)
    cv2.imwrite('Gauss_result_{}_{}.jpg'.format(template_size,sigma_g),Gauss)

2个回答

函数头文件没有使用对

KookoChow
被上帝遗弃的幼仔 有im[i,j,z]这种表示吗?不应该是im[i][j][z]这样表示吗?
7 个月之前 回复
weixin_41908053
liuxin95 回复江海之水: 核函数的形参命名有问题,template是关键字,改为disTemplate就好了
9 个月之前 回复
weixin_45043842
江的海 那我就没有办法了哦
9 个月之前 回复
weixin_41908053
liuxin95 回复江海之水: 里面就用到了max和min,在SourceModule里加了#include<math.h>还是一样的问题
9 个月之前 回复
weixin_45043842
江的海 怎么说呢,我之前遇到类似问题,修改或者加了头文件,具体就这样
9 个月之前 回复
weixin_41908053
liuxin95 可以具体点吗?
9 个月之前 回复

核函数的形参命名有问题,template是关键字,改为disTemplate就好了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Error[Pe065]: expected a ";"
我将gcc工程,移植到IAR Embedded Workbench中遇到一系列的错误提示,其中一个是Error[Pe065]: expected a ";" 提示错误的位置为如下语句,请问我应该怎么修改? typedef int ERROR_CantUseEvilMethod[sizeof(GenericClass *)==sizeof(function_to_bind) ? 1 : -1] __attribute((unused));
mysql InnoDB: Error: "mysql"."innodb_table_stats
附上错误日志: 2015-06-23 22:39:06 1252 [Note] Giving 0 client threads a chance to die gracefully 2015-06-23 22:39:06 1252 [Note] Shutting down slave threads 2015-06-23 22:39:06 1252 [Note] Forcefully disconnecting 0 remaining clients 2015-06-23 22:39:06 1252 [Note] Binlog end 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'partition' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'BLACKHOLE' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_SYS_FIELDS' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_SYS_INDEXES' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_SYS_TABLES' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_FT_CONFIG' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_FT_DELETED' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_METRICS' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_CMPMEM' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_CMP_RESET' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_CMP' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_LOCK_WAITS' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_LOCKS' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'INNODB_TRX' 2015-06-23 22:39:09 1252 [Note] Shutting down plugin 'InnoDB' 2015-06-23 22:39:09 1252 [Note] InnoDB: FTS optimize thread exiting. 2015-06-23 22:39:09 1252 [Note] InnoDB: Starting shutdown... 2015-06-23 22:39:12 1252 [Note] InnoDB: Shutdown completed; log sequence number 44832642 2015-06-23 22:39:12 1252 [Note] Shutting down plugin 'ARCHIVE' 2015-06-23 22:39:12 1252 [Note] Shutting down plugin 'MyISAM' 2015-06-23 22:39:12 1252 [Note] Shutting down plugin 'CSV' 2015-06-23 22:39:12 1252 [Note] Shutting down plugin 'MRG_MYISAM' 2015-06-23 22:39:12 1252 [Note] Shutting down plugin 'MEMORY' 2015-06-23 22:39:12 1252 [Note] Shutting down plugin 'sha256_password' 2015-06-23 22:39:12 1252 [Note] Shutting down plugin 'mysql_old_password' 2015-06-23 22:39:12 1252 [Note] Shutting down plugin 'mysql_native_password' 2015-06-23 22:39:12 1252 [Note] Shutting down plugin 'binlog' 2015-06-23 22:39:12 1252 [Note] /usr/sbin/mysqld: Shutdown complete 150623 22:39:12 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 150623 22:39:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 2015-06-23 22:39:39 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2015-06-23 22:39:39 1190 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000) 2015-06-23 22:39:39 1190 [Warning] Buffered warning: Changed limits: table_cache: 431 (requested 2000) 2015-06-23 22:39:39 1190 [Note] Plugin 'FEDERATED' is disabled. 2015-06-23 22:39:39 1190 [Note] InnoDB: Using atomics to ref count buffer pool pages 2015-06-23 22:39:39 1190 [Note] InnoDB: The InnoDB memory heap is disabled 2015-06-23 22:39:39 1190 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2015-06-23 22:39:39 1190 [Note] InnoDB: Memory barrier is not used 2015-06-23 22:39:39 1190 [Note] InnoDB: Compressed tables use zlib 1.2.3 2015-06-23 22:39:39 1190 [Note] InnoDB: Using Linux native AIO 2015-06-23 22:39:39 1190 [Note] InnoDB: Not using CPU crc32 instructions 2015-06-23 22:39:39 1190 [Note] InnoDB: Initializing buffer pool, size = 1.0G 2015-06-23 22:39:40 1190 [Note] InnoDB: Completed initialization of buffer pool 2015-06-23 22:39:40 1190 [Note] InnoDB: Highest supported file format is Barracuda. 2015-06-23 22:39:40 1190 [Note] InnoDB: 128 rollback segment(s) are active. 2015-06-23 22:39:40 1190 [Note] InnoDB: Waiting for purge to start 2015-06-23 22:39:40 1190 [Note] InnoDB: 5.6.22 started; log sequence number 44832642 2015-06-23 22:39:41 1190 [Note] Server hostname (bind-address): '*'; port: 3306 2015-06-23 22:39:41 1190 [Note] IPv6 is available. 2015-06-23 22:39:41 1190 [Note] - '::' resolves to '::'; 2015-06-23 22:39:41 1190 [Note] Server socket created on IP: '::'. 2015-06-23 22:39:41 1190 [ERROR] Incorrect definition of table mysql.db: expected column 'User' at position 2 to have type char(16), found type char(80). 2015-06-23 22:39:41 1190 [ERROR] Incorrect definition of table mysql.event: expected column 'definer' at position 3 to have type char(77), found type char(141). 2015-06-23 22:39:41 1190 [ERROR] Incorrect definition of table mysql.event: expected column 'sql_mode' at position 14 to have type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH'), found type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_A 2015-06-23 22:39:41 1190 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. 2015-06-23 22:39:41 1190 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.6.22' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) 2015-06-23 23:00:47 7f7038bc0700 InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch). 2015-06-23 23:00:47 7f7038bc0700 InnoDB: Error: Fetch of persistent statistics requested for table "moodle"."mdl_config" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
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()); ```
关于js文件的“}”报错
导入别人的js报错了,格式是json格式 头尾的 "{" 都报错,错误提示是Multiple markers at this line- Semi-colon expected请问是什么原因?都说不够仔细,那以下是完整的JSon数据: { "citylist": [{ "p": "北京", "c": [{ "n": "北京" }] }, { "p": "天津", "c": [{ "n": "天津" }] }, { "p": "河北", "c": [{ "n": "石家庄" }, { "n": "唐山" }, { "n": "秦皇岛" }, { "n": "邯郸" }, { "n": "邢台" }, { "n": "保定" }, { "n": "张家口" }, { "n": "承德" }, { "n": "沧州" }, { "n": "廊坊" }, { "n": "衡水" }] }, { "p": "山西", "c": [{ "n": "太原" }, { "n": "大同" }, { "n": "阳泉" }, { "n": "长治" }, { "n": "晋城" }, { "n": "朔州" }, { "n": "晋中" }, { "n": "运城" }, { "n": "忻州" }, { "n": "临汾" }, { "n": "吕梁" }] }, { "p": "内蒙古", "c": [{ "n": "呼和浩特" }, { "n": "包头" }, { "n": "乌海" }, { "n": "赤峰" }, { "n": "通辽" }, { "n": "鄂尔多斯" }, { "n": "呼伦贝尔" }, { "n": "巴彦淖尔" }, { "n": "乌兰察布" }, { "n": "兴安" }, { "n": "锡林郭勒" }, { "n": "阿拉善" }] }, { "p": "辽宁", "c": [{ "n": "沈阳" }, { "n": "大连" }, { "n": "鞍山" }, { "n": "抚顺" }, { "n": "本溪" }, { "n": "丹东" }, { "n": "锦州" }, { "n": "营口" }, { "n": "阜新" }, { "n": "辽阳" }, { "n": "盘锦" }, { "n": "铁岭" }, { "n": "朝阳" }, { "n": "葫芦岛" }] }, { "p": "吉林", "c": [{ "n": "长春" }, { "n": "吉林" }, { "n": "四平" }, { "n": "辽源" }, { "n": "通化" }, { "n": "白山" }, { "n": "松原" }, { "n": "白城" }, { "n": "延边" }] }, { "p": "黑龙江", "c": [{ "n": "哈尔滨" }, { "n": "齐齐哈尔" }, { "n": "鸡西" }, { "n": "鹤岗" }, { "n": "双鸭山" }, { "n": "大庆" }, { "n": "伊春" }, { "n": "佳木斯" }, { "n": "七台河" }, { "n": "牡丹江" }, { "n": "黑河" }, { "n": "绥化" }, { "n": "大兴安岭" }] }, { "p": "上海", "c": [{ "n": "上海" }] }, { "p": "江苏", "c": [{ "n": "南京" }, { "n": "无锡" }, { "n": "徐州" }, { "n": "常州" }, { "n": "苏州" }, { "n": "南通" }, { "n": "连云港" }, { "n": "淮安" }, { "n": "盐城" }, { "n": "扬州" }, { "n": "镇江" }, { "n": "泰州" }, { "n": "宿迁" }] }, { "p": "浙江", "c": [{ "n": "杭州" }, { "n": "宁波" }, { "n": "温州" }, { "n": "嘉兴" }, { "n": "湖州" }, { "n": "绍兴" }, { "n": "金华" }, { "n": "衢州" }, { "n": "舟山" }, { "n": "台州" }, { "n": "丽水" }] }, { "p": "安徽", "c": [{ "n": "合肥" }, { "n": "芜湖" }, { "n": "蚌埠" }, { "n": "淮南" }, { "n": "马鞍山" }, { "n": "淮北" }, { "n": "铜陵" }, { "n": "安庆" }, { "n": "黄山" }, { "n": "滁州" }, { "n": "阜阳" }, { "n": "宿州" }, { "n": "巢湖" }, { "n": "六安" }, { "n": "亳州" }, { "n": "池州" }, { "n": "宣城" }] }, { "p": "福建", "c": [{ "n": "福州" }, { "n": "厦门" }, { "n": "莆田" }, { "n": "三明" }, { "n": "泉州" }, { "n": "漳州" }, { "n": "南平" }, { "n": "龙岩" }, { "n": "宁德" }] }, { "p": "江西", "c": [{ "n": "南昌" }, { "n": "景德镇" }, { "n": "萍乡" }, { "n": "九江" }, { "n": "新余" }, { "n": "鹰潭" }, { "n": "赣州" }, { "n": "吉安" }, { "n": "宜春" }, { "n": "抚州" }, { "n": "上饶" }] }, { "p": "山东", "c": [{ "n": "济南" }, { "n": "青岛" }, { "n": "淄博" }, { "n": "枣庄" }, { "n": "东营" }, { "n": "烟台" }, { "n": "潍坊" }, { "n": "济宁" }, { "n": "泰安" }, { "n": "威海" }, { "n": "日照" }, { "n": "莱芜" }, { "n": "临沂" }, { "n": "德州" }, { "n": "聊城" }, { "n": "滨州" }, { "n": "菏泽" }] }, { "p": "河南", "c": [{ "n": "郑州" }, { "n": "开封" }, { "n": "洛阳" }, { "n": "平顶山" }, { "n": "安阳" }, { "n": "鹤壁" }, { "n": "新乡" }, { "n": "焦作" }, { "n": "濮阳" }, { "n": "许昌" }, { "n": "漯河" }, { "n": "三门峡" }, { "n": "南阳" }, { "n": "商丘" }, { "n": "信阳" }, { "n": "周口" }, { "n": "驻马店" }, { "n": "济源" }] }, { "p": "湖北", "c": [{ "n": "武汉" }, { "n": "黄石" }, { "n": "十堰" }, { "n": "宜昌" }, { "n": "襄樊" }, { "n": "鄂州" }, { "n": "荆门" }, { "n": "孝感" }, { "n": "荆州" }, { "n": "黄冈" }, { "n": "咸宁" }, { "n": "随州" }, { "n": "恩施" }, { "n": "仙桃" }, { "n": "潜江" }, { "n": "天门" }, { "n": "神农架" }] }, { "p": "湖南", "c": [{ "n": "长沙" }, { "n": "株洲" }, { "n": "湘潭" }, { "n": "衡阳" }, { "n": "邵阳" }, { "n": "岳阳" }, { "n": "常德" }, { "n": "张家界" }, { "n": "益阳" }, { "n": "郴州" }, { "n": "永州" }, { "n": "怀化" }, { "n": "娄底" }, { "n": "湘西" }] }, { "p": "广东", "c": [{ "n": "广州" }, { "n": "韶关" }, { "n": "深圳" }, { "n": "珠海" }, { "n": "汕头" }, { "n": "佛山" }, { "n": "江门" }, { "n": "湛江" }, { "n": "茂名" }, { "n": "肇庆" }, { "n": "惠州" }, { "n": "梅州" }, { "n": "汕尾" }, { "n": "河源" }, { "n": "阳江" }, { "n": "清远" }, { "n": "东莞" }, { "n": "中山" }, { "n": "潮州" }, { "n": "揭阳" }, { "n": "云浮" }] }, { "p": "广西", "c": [{ "n": "南宁" }, { "n": "柳州" }, { "n": "桂林" }, { "n": "梧州" }, { "n": "北海" }, { "n": "防城港" }, { "n": "钦州" }, { "n": "贵港" }, { "n": "玉林" }, { "n": "百色" }, { "n": "贺州" }, { "n": "河池" }, { "n": "来宾" }, { "n": "崇左" }] }, { "p": "海南", "c": [{ "n": "海口" }, { "n": "三亚" }, { "n": "五指山" }, { "n": "琼海" }, { "n": "儋州" }, { "n": "文昌" }, { "n": "万宁" }, { "n": "东方" }] }, { "p": "重庆", "c": [{ "n": "重庆" }] }, { "p": "四川", "c": [{ "n": "成都" }, { "n": "自贡" }, { "n": "攀枝花" }, { "n": "泸州" }, { "n": "德阳" }, { "n": "绵阳" }, { "n": "广元" }, { "n": "遂宁" }, { "n": "内江" }, { "n": "乐山" }, { "n": "南充" }, { "n": "眉山" }, { "n": "宜宾" }, { "n": "广安" }, { "n": "达川" }, { "n": "雅安" }, { "n": "巴中" }, { "n": "资阳" }, { "n": "阿坝" }, { "n": "甘孜" }, { "n": "凉山" }] }, { "p": "贵州", "c": [{ "n": "贵阳" }, { "n": "六盘水" }, { "n": "遵义" }, { "n": "安顺" }, { "n": "铜仁" }, { "n": "黔西南" }, { "n": "毕节" }, { "n": "黔东南" }, { "n": "黔南" }] }, { "p": "云南", "c": [{ "n": "昆明" }, { "n": "曲靖" }, { "n": "玉溪" }, { "n": "保山" }, { "n": "昭通" }, { "n": "丽江" }, { "n": "普洱" }, { "n": "临沧" }, { "n": "楚雄" }, { "n": "红河" }, { "n": "文山" }, { "n": "西双版纳" }, { "n": "大理" }, { "n": "德宏" }, { "n": "怒江傈" }, { "n": "迪庆" }] }, { "p": "西藏", "c": [{ "n": "拉萨" }, { "n": "昌都" }, { "n": "山南" }, { "n": "日喀则" }, { "n": "那曲" }, { "n": "阿里" }, { "n": "林芝" }] }, { "p": "陕西", "c": [{ "n": "西安" }, { "n": "铜川" }, { "n": "宝鸡" }, { "n": "咸阳" }, { "n": "渭南" }, { "n": "延安" }, { "n": "汉中" }, { "n": "榆林" }, { "n": "安康" }, { "n": "商洛" }] }, { "p": "甘肃", "c": [{ "n": "兰州" }, { "n": "嘉峪关" }, { "n": "金昌" }, { "n": "白银" }, { "n": "天水" }, { "n": "武威" }, { "n": "张掖" }, { "n": "平凉" }, { "n": "酒泉" }, { "n": "庆阳" }, { "n": "定西" }, { "n": "陇南" }, { "n": "临夏" }, { "n": "甘南" }] }, { "p": "青海", "c": [{ "n": "西宁" }, { "n": "海东" }, { "n": "海北" }, { "n": "黄南" }, { "n": "海南" }, { "n": "果洛" }, { "n": "玉树" }, { "n": "梅西" }] }, { "p": "宁夏", "c": [{ "n": "银川" }, { "n": "石嘴山" }, { "n": "吴忠" }, { "n": "固原" }, { "n": "中卫" }] }, { "p": "新疆", "c": [{ "n": "乌鲁木齐" }, { "n": "克拉玛依" }, { "n": "吐鲁番" }, { "n": "哈密" }, { "n": "昌吉" }, { "n": "博尔塔拉" }, { "n": "巴音郭楞" }, { "n": "阿克苏" }, { "n": "克孜勒苏" }, { "n": "喀什" }, { "n": "和田" }, { "n": "伊犁" }, { "n": "塔城" }, { "n": "阿勒泰" }, { "n": "石河子" }, { "n": "阿拉尔" }, { "n": "图木舒克" }, { "n": "五家渠" }] }, { "p": "香港", "c": [{ "n": "香港" }] }, { "p": "澳门", "c": [{ "n": "澳门" }] }, { "p": "台湾", "c": [{ "n": "台北市" }, { "n": "高雄市" }, { "n": "基隆市" }, { "n": "台中市" }, { "n": "台南市" }, { "n": "新竹市" }, { "n": "嘉义市" }, { "n": "台北县" }, { "n": "宜兰县" }, { "n": "新竹县" }, { "n": "桃园县" }, { "n": "苗栗县" }, { "n": "台中县" }, { "n": "彰化县" }, { "n": "南投县" }, { "n": "嘉义县" }, { "n": "云林县" }, { "n": "台南县" }, { "n": "高雄县" }, { "n": "屏东县" }, { "n": "台东县" }, { "n": "花莲县" }, { "n": "澎湖县" }] }] } 附图 ![图片说明](https://img-ask.csdn.net/upload/201801/22/1516588941_674301.jpg)
关于vue打包提示Error: Expected a pseudo-class or pseudo-element
![图片说明](https://img-ask.csdn.net/upload/201911/06/1573020553_450911.png) vue打包出错,提示Error: Expected a pseudo-class or pseudo-element错误打包不成功,请问该如何解决?
unix网络编程卷2门代码编译中报错:error: ‘door_arg_t’ undeclared (first use in this function),环境是centos6
gcc client1.c -lunpipc -lrt -ldoor client1.c: In function ‘main’: client1.c:8: error: ‘door_arg_t’ undeclared (first use in this function) client1.c:8: error: (Each undeclared identifier is reported only once client1.c:8: error: for each function it appears in.) client1.c:8: error: expected ‘;’ before ‘arg’ client1.c:17: error: ‘arg’ undeclared (first use in this function)
MongoDB迁移之后,启动报错 WT_PANIC: WiredTiger library panic
软件运行环境为 Centos 7.4 执行如下命令后报错(mongodb是备份的数据库): ./mongod --storageEngine wiredTiger --auth --dbpath /data/mongo_data/mongodb/ --unixSocketPrefix=/data/mongo_data/ --bind_ip=0.0.0.0 --logpath /data/mongo_data/logs/mongodb.out --quiet & 详细错误,启动异常错误为如下 2018-10-25T10:17:15.030+0800 W - [initandlisten] Detected unclean shutdown - /data/mongo_data/mongodb/mongod.lock is not empty. 2018-10-25T10:17:15.030+0800 W STORAGE [initandlisten] Recovering data from the last clean checkpoint. 2018-10-25T10:17:15.030+0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=11G,session_max=20000,eviction=(threads_max=4),statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0), 2018-10-25T10:17:15.034+0800 E STORAGE [initandlisten] WiredTiger (0) [1540433835:34734][16529:0x7f1cc3334cc0], file:WiredTiger.wt, connection: read checksum error for 4096B block at offset 94208: block header checksum of 3534655478 doesn't match expected checksum of 351635639 2018-10-25T10:17:15.034+0800 E STORAGE [initandlisten] WiredTiger (0) [1540433835:34762][16529:0x7f1cc3334cc0], file:WiredTiger.wt, connection: WiredTiger.wt: encountered an illegal file format or internal value 2018-10-25T10:17:15.034+0800 E STORAGE [initandlisten] WiredTiger (-31804) [1540433835:34770][16529:0x7f1cc3334cc0], file:WiredTiger.wt, connection: the process must exit and restart: WT_PANIC: WiredTiger library panic 2018-10-25T10:17:15.034+0800 I - [initandlisten] Fatal Assertion 28558 2018-10-25T10:17:15.043+0800 I CONTROL [initandlisten] 0xf75549 0xf12271 0xef60f1 0xd93f8a 0x13ab369 0x13ab525 0x13ab9c4 0x12fe3d2 0x131811c 0x1315ef8 0x1316d52 0x1340b4b 0x13aa50b 0x13780ab 0x133e207 0xd7e61c 0xd7c3a8 0xa7dc5d 0x7f57a2 0x7fa739 0x7f1cc186f445 0x7f3549 ----- BEGIN BACKTRACE ----- {"backtrace":[{"b":"400000","o":"B75549"},{"b":"400000","o":"B12271"},{"b":"400000","o":"AF60F1"},{"b":"400000","o":"993F8A"},{"b":"400000","o":"FAB369"},{"b":"400000","o":"FAB525"},{"b":"400000","o":"FAB9C4"},{"b":"400000","o":"EFE3D2"},{"b":"400000","o":"F1811C"},{"b":"400000","o":"F15EF8"},{"b":"400000","o":"F16D52"},{"b":"400000","o":"F40B4B"},{"b":"400000","o":"FAA50B"},{"b":"400000","o":"F780AB"},{"b":"400000","o":"F3E207"},{"b":"400000","o":"97E61C"},{"b":"400000","o":"97C3A8"},{"b":"400000","o":"67DC5D"},{"b":"400000","o":"3F57A2"},{"b":"400000","o":"3FA739"},{"b":"7F1CC184D000","o":"22445"},{"b":"400000","o":"3F3549"}],"processInfo":{ "mongodbVersion" : "3.0.6", "gitVersion" : "1ef45a23a4c5e3480ac919b28afcba3c615488f2", "uname" : { "sysname" : "Linux", "release" : "3.10.0-693.el7.x86_64", "version" : "#1 SMP Tue Aug 22 21:09:27 UTC 2017", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000", "buildId" : "7F7AA372EDE22BA34234ADA10A8AF2E665681140" }, { "b" : "7FFFF8CC1000", "elfType" : 3, "buildId" : "7FB8E16CEA1B913E2703A6E4159FB468CD1E3507" }, { "b" : "7F1CC2F18000", "path" : "/lib64/libpthread.so.0", "elfType" : 3, "buildId" : "F4C04BCE85D2D269D0A2AF4972FC69805B50345B" }, { "b" : "7F1CC2CA6000", "path" : "/lib64/libssl.so.10", "elfType" : 3, "buildId" : "ED0AC7DEB91A242C194B3DEF27A215F41CE43116" }, { "b" : "7F1CC2845000", "path" : "/lib64/libcrypto.so.10", "elfType" : 3, "buildId" : "BC0AE9CA0705BEC1F0C0375AAD839843BB219CB1" }, { "b" : "7F1CC263D000", "path" : "/lib64/librt.so.1", "elfType" : 3, "buildId" : "D33989EC31EFE745EB0D3B68A92D19E77D7DDFDA" }, { "b" : "7F1CC2439000", "path" : "/lib64/libdl.so.2", "elfType" : 3, "buildId" : "5CDB5A56336E7E2BD14FFA189411E44A834AFCD8" }, { "b" : "7F1CC2132000", "path" : "/lib64/libstdc++.so.6", "elfType" : 3, "buildId" : "9589AE0FDA6AEB1183EBA1C62A328F933E7817FD" }, { "b" : "7F1CC1E30000", "path" : "/lib64/libm.so.6", "elfType" : 3, "buildId" : "F4CAE74047F9AA2D5A71FDEC67C4285D75753EBA" }, { "b" : "7F1CC1C1A000", "path" : "/lib64/libgcc_s.so.1", "elfType" : 3, "buildId" : "531AA1391EA4E1489D5EF11AA5DC2FFD9E2BDFEE" }, { "b" : "7F1CC184D000", "path" : "/lib64/libc.so.6", "elfType" : 3, "buildId" : "CB4B7554D1ADBEF2F001142DD6F0A5139FC9AA69" }, { "b" : "7F1CC3134000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "D266B1F6650927E18108323BCCA8F7B68E68EB92" }, { "b" : "7F1CC1600000", "path" : "/lib64/libgssapi_krb5.so.2", "elfType" : 3, "buildId" : "DA322D74F55A0C4293085371A8D0E94B5962F5E7" }, { "b" : "7F1CC1318000", "path" : "/lib64/libkrb5.so.3", "elfType" : 3, "buildId" : "B69E63024D408E400401EEA6815317BDA38FB7C2" }, { "b" : "7F1CC1114000", "path" : "/lib64/libcom_err.so.2", "elfType" : 3, "buildId" : "A3832734347DCA522438308C9F08F45524C65C9B" }, { "b" : "7F1CC0EE1000", "path" : "/lib64/libk5crypto.so.3", "elfType" : 3, "buildId" : "A48639BF901DB554479BFAD114CB354CF63D7D6E" }, { "b" : "7F1CC0CCB000", "path" : "/lib64/libz.so.1", "elfType" : 3, "buildId" : "EA8E45DC8E395CC5E26890470112D97A1F1E0B65" }, { "b" : "7F1CC0ABD000", "path" : "/lib64/libkrb5support.so.0", "elfType" : 3, "buildId" : "6FDF5B013FD2739D304CFB9D723DCBC149EE03C9" }, { "b" : "7F1CC08B9000", "path" : "/lib64/libkeyutils.so.1", "elfType" : 3, "buildId" : "2E01D5AC08C1280D013AAB96B292AC58BC30A263" }, { "b" : "7F1CC06A0000", "path" : "/lib64/libresolv.so.2", "elfType" : 3, "buildId" : "2BDC2B6FF0B2C204CCE34D139A9EADA0272EB070" }, { "b" : "7F1CC0479000", "path" : "/lib64/libselinux.so.1", "elfType" : 3, "buildId" : "A88379F56A51950A33198890D37F5F8AEE71F8B4" }, { "b" : "7F1CC0217000", "path" : "/lib64/libpcre.so.1", "elfType" : 3, "buildId" : "9CA3D11F018BEEB719CDB34BE800BF1641350D0A" } ] }} mongod(_ZN5mongo15printStackTraceERSo+0x29) [0xf75549] mongod(_ZN5mongo10logContextEPKc+0xE1) [0xf12271] mongod(_ZN5mongo13fassertFailedEi+0x61) [0xef60f1] mongod(+0x993F8A) [0xd93f8a] mongod(__wt_eventv+0x489) [0x13ab369] mongod(__wt_err+0x95) [0x13ab525] mongod(__wt_panic+0x24) [0x13ab9c4] mongod(__wt_bm_read+0x72) [0x12fe3d2] mongod(__wt_bt_read+0x1AC) [0x131811c] mongod(__wt_btree_tree_open+0x58) [0x1315ef8] mongod(__wt_btree_open+0xD02) [0x1316d52] mongod(__wt_conn_btree_get+0x19B) [0x1340b4b] mongod(__wt_session_get_btree+0x41B) [0x13aa50b] mongod(__wt_metadata_open+0x2B) [0x13780ab] mongod(wiredtiger_open+0xCD7) [0x133e207] mongod(_ZN5mongo18WiredTigerKVEngineC1ERKSsS2_bb+0x30C) [0xd7e61c] mongod(+0x97C3A8) [0xd7c3a8] mongod(_ZN5mongo23GlobalEnvironmentMongoD22setGlobalStorageEngineERKSs+0x30D) [0xa7dc5d] mongod(_ZN5mongo13initAndListenEi+0x422) [0x7f57a2] mongod(main+0x139) [0x7fa739] libc.so.6(__libc_start_main+0xF5) [0x7f1cc186f445] mongod(+0x3F3549) [0x7f3549] ----- END BACKTRACE ----- 2018-10-25T10:17:15.043+0800 I - [initandlisten] ***aborting after fassert() failure
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); 请教一下各位大神,是哪里处理的不好
怎么把百度返回的Gson格式信息转换成集合?
renderReverse&&renderReverse({"status":0,"result":{"location":{"lng":116.322987,"lat":39.983424071404},"formatted_address":"北京市海淀区中关村大街27号1101-08室","business":"人民大学,中关村,苏州街","addressComponent":{"city":"北京市","district":"海淀区","province":"北京市","street":"中关村大街","street_number":"27号1101-08室"},"cityCode":131}}) 怎么解析成集合? Gson gso=new Gson(); List xinxi=gso.fromJson(line, List.class); 我Java这样写但是报错 错误信息是: Expected BEGIN_ARRAY but was STRING at line 1 column 1
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 studio中AndroidManifest出错
Manifest。xml源码如下: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.administrator.myapplication" > <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /> <!-- The ACCESS_COARSE/FINE_LOCATION permissions are not required to use Google Maps Android API v2, but are recommended. --> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.example.administrator.myapplication.MainActivity" android:label="@string/title_activity_main" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".MainActivity2Activity" android:label="MainActivity2Activity" > </activity> 下面略过五六个activity,都是同样的报错。 Android name那里error报的是"class"or"interface"expected 尝试过全称,可是依然是如上报错的。 想过重新创建项目再来一遍,可是打开软件就报错。。。QAQ 求各位大神,这是什么错误,该怎么解决呢?【最开始是因为一个改变了一个activity成了class,选择删除了那个activity注册的代码,结果。。。就出了以上的错误
各位大佬们java中报错Syntax error on token "haha", ; expected after this token 如何解决呢?
Syntax error on token "haha", ; expected after this token ``` package haha import java.util.Scanner; public class Demo { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scanner = new Scanner (System.in); System.out.print("请输入一个数"); int a = scanner.nextInt(); System.out.printf("%d的平方是%d\n",a,a*a); } }
FreeMarker For "?c" left-hand operand: Expected a number or boolean, but this evaluated to a string (wrapper: f.t.SimpleScalar) 不明白这个错和我的写法有什么关系?
这是我的语法 <#if datas?? && (datas?size > 0)> <#list datas as head> { "sourceId":"${head.sourceId?c}", "operaType":"${head.operaType!}" } </#list> </#if> 如果改成以下,就不报错,但是我就没办法处理超过四位数带逗号的数字格式 <#if datas?? && (datas?size > 0)> <#list datas as head> { "sourceId":"${head.sourceId}", "operaType":"${head.operaType!}" } </#list> </#if> 其中 ${head.sourceId} 这个数值实际为"1480",请问这种不能加?c的语法吗?还是只能数字才可以加?c 我把"${head.sourceId?c}"改成${head.sourceId?c} 也报相同的cuo'wu
Syntax error on token ",", new expected after this token 编译报错
报错信息:Syntax error on token ",", new expected after this token ``` for(String plugin : Configuration.XmlBuilder.pluginList) { this.executor = (Executor) Proxy.newProxyInstance( this.getClass().getClassLoader(), Class<?>[] {executor.getClass()}, new Plugin((IPlugin)Class.forName(plugin).newInstance()) ); } ```
maven爆出的一个问题,没有查到原因,谁能帮我看看
Multiple annotations found at this line: - Project build error: Non-parseable POM C:\Users\vincent\arquillian-tutorial\pom.xml: Duplicated tag: 'dependencyManagement' (position: START_TAG seen ...</dependencies>\r\n <dependencyManagement>... @50:25) - cvc-complex-type.2.4.a: Invalid content was found starting with element 'dependencyManagement'. One of '{"http://maven.apache.org/POM/ 4.0.0":parent, "http://maven.apache.org/POM/4.0.0":name, "http://maven.apache.org/POM/4.0.0":description, "http://maven.apache.org/POM/4.0.0":url, "http://maven.apache.org/POM/4.0.0":prerequisites, "http://maven.apache.org/POM/4.0.0":issueManagement, "http://maven.apache.org/POM/ 4.0.0":ciManagement, "http://maven.apache.org/POM/4.0.0":inceptionYear, "http://maven.apache.org/POM/4.0.0":mailingLists, "http:// maven.apache.org/POM/4.0.0":developers, "http://maven.apache.org/POM/4.0.0":contributors, "http://maven.apache.org/POM/4.0.0":licenses, "http:// maven.apache.org/POM/4.0.0":scm, "http://maven.apache.org/POM/4.0.0":organization, "http://maven.apache.org/POM/4.0.0":profiles, "http:// maven.apache.org/POM/4.0.0":modules, "http://maven.apache.org/POM/4.0.0":repositories, "http://maven.apache.org/POM/4.0.0":pluginRepositories, "http://maven.apache.org/POM/4.0.0":reports, "http://maven.apache.org/POM/4.0.0":reporting, "http://maven.apache.org/POM/ 4.0.0":distributionManagement}' is expected. 如上所述,在上一个<dependencies>中添加了: <dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <scope>test</scope> </dependency> 之后,就在下面另一行: <dependencyManagement>中提示,上面的错误,问什么呢?
html报错"http-equiv"
代码:<head> <meta http-equiv=Content-Type content="text/html; charset=gb2312"> 报错: Open quote is expected for attribute "http-equiv" associated with an element 谁知道?
in function 'xx'; error : expected';' before '}'
数据结构实验一 线性表的实现与多项式的加法 在codeblock下编译出错 in function 'Add': error : expected';' before '}' 代码如下: #include<stdlib.h> #include<stdio.h> #define ERROR 0 #define OK 1 #define Overflow 2 #define Underflow 3 #define Notpresent 4 #define Duplicate 5 typedef int Elemtype; typedef struct { int n; int maxLength; Elemtype *element; }SeqList; typedef int Status; typedef struct PNode { int coef; int exp; struct PNode* link; }PNode; typedef struct { struct PNode *head; }polynominal; Status Init(SeqList *L,int mSize) { L->maxLength=mSize; L->n=0; L->element=malloc(sizeof(Elemtype)*mSize); if(!L->element) return ERROR; return OK; } Status Find(SeqList L,int i,Elemtype *x) { if(i<0||i>L.n-1) return ERROR; *x=L.element[i]; return OK; } Status Insert(SeqList *L,int i,Elemtype x) { int j; if(i<-1||i>L->n-1) return ERROR; if(L->n==L->maxLength) return ERROR; for(j=L->n-1;j>i;j--) L->element[j+1]=L->element[j]; L->element[i+1]=x; L->n=L->n+1; return OK; } Status Delete(SeqList *L,int i) { int j; if(i<0||i>L->n-1) return ERROR; if(!L->n) return ERROR; for(j=i+1;j<L->n;j++) L->element[j-1]=L->element[j]; L->n --; return OK; } void Output(SeqList L) { int i; //if(!L.n) //return ERROR; for(i=0;i<L.n;i++) printf("%d ",L.element[i]); //return OK; } void Destroy(SeqList *L) { (*L).n=0; (*L).maxLength=0; free((*L).element); } void Create(polynominal *p) { PNode *pn,*pre,*q; p->head=malloc(sizeof(PNode)); p->head->exp=-1; p->head->link=NULL; for(;;) { pn=malloc(sizeof(PNode)); printf("coef:\n"); scanf("%d",&pn->coef); printf("exp:\n"); scanf("%d",&pn->exp); if(pn->exp<0) break; pre=p->head; q=p->head->link; while(q&&q->exp>pn->exp) { pre=q; q=q->link; } pn->link=q; pre->link=pn; } } void Add(polynominal *px,polynominal *qx) { PNode *q,*q1=qx->head,*p,*temp; p=px->head->link; q=q1->link; while(p&&q) { while(p->exp<q->exp) { q1=q; q=q->link; } if(p->exp==q->exp) { q->coef=q->coef+p->coef; if(q->coef==0) { q1->link=q->link; free(q); q=q1->link; p=p->link; } else { q1=q; q=q->link; p=p->link; } } else { temp=malloc(sizeof(PNode)); temp->coef=p->coef; temp->exp=p->exp; temp->link=q1->link; q1->link=temp; p=p->link; } } 1 } void main() { int i,j,k,m,num,x,y; SeqList list; printf("请输入元素的最大空间:"); scanf("%d",&m); Init(&list,m); printf("请输入元素的个数:"); scanf("%d",&num); list.n=num; printf("请输入各个元素:"); printf("\n"); for(i=0;i<num;i++) scanf("%d",&list.element[i]); Output(list); printf("请输入要插入元素的位置:"); scanf("%d",&i); printf("请输入要插入的元素:"); scanf("%d",&k); Insert(&list,i,k); Output(list); printf("请输入要查找的位置:"); scanf("%d",&j); Find(list,j,&x); printf("%d",x); printf("请输入要删除的元素下标:"); scanf("%d",&y); Delete(&list,y); Output(list); Destroy(&list); polynominal px; Create(&px); polynominal qx; Create (&qx); Add(&px,&qx); }
vue-loader安装后在.vue里的<style></style>里面写样式就报错?
提问:请问下,vue-loader也安装了为何在.vue的style标签了 还是不能写样式呢?webpack4,使用webpack-dev-server命令打包时就报错.应该如何解决? 我已经尝试卸载vue-loader重新安装,删除node-modules重新跑环境,但并没有解决掉.难到是某个加载器的版本的问题吗? main.js ``` import Vue from 'vue'; import app from './App.vue'; import { Header } from 'mint-ui'; Vue.component(Header.name, Header); var vm=new Vue({ el:'#app', render:c=>c(app) }); ``` App.vue ``` <template> <div class="box"> <!--header--> <mt-header fixed title="固定在顶部"></mt-header> <!--body--> <!--foot--> <h1>这是 App 组件</h1> </div> </template> <script> </script> <style lang="sass" scoped> .box{ padding-top:40px; } </style> ``` package.json ``` "devDependencies": { "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-plugin-component": "^0.10.1", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.1", "babel-preset-stage-0": "^6.24.1", "css-loader": "^0.28.7", "file-loader": "^1.1.5", "html-webpack-plugin": "^2.30.1", "less": "^2.7.3", "less-loader": "^4.0.5", "node-sass": "^4.5.3", "sass-loader": "^6.0.6", "style-loader": "^0.19.0", "url-loader": "^0.6.2", "vue-loader": "^13.3.0", "vue-template-compiler": "^2.5.2", "webpack": "^3.8.1", "webpack-dev-server": "^2.9.3" }, "dependencies": { "bootstrap": "^3.3.7", "mint-ui": "^2.2.9", "vue": "^2.5.2", "vue-router": "^3.0.1" } } ``` 错误提示: ``` ERROR in ./node_modules/css-loader!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-7ba5bd90","scoped": true,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js?indentedSyntax!./node_modules/vue-loader/lib/selector .js?type=styles&index=0!./src/App.vue Module build failed: .box{ ^ Invalid CSS after ".box{": expected "}", was "{" in F:\vuetest\day7\src\App.vue (line 19, column 6) @ ./node_modules/vue-style-loader!./node_modules/css-loader!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":" data-v-7ba5bd90","scoped":true,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js?indentedSyntax!./node_modul es/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue 4:14-331 13:3-17:5 14:22-339 @ ./src/App.vue @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:3000 webpack/hot/dev-server ./src/main.js
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、PDF搜索网站推荐 对于大部
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Vue + Spring Boot 项目实战(十四):用户认证方案与完善的访问拦截
本篇文章主要讲解 token、session 等用户认证方案的区别并分析常见误区,以及如何通过前后端的配合实现完善的访问拦截,为下一步权限控制的实现打下基础。
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入  假设现有4个人
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
一 说明 如果是初学者,建议去网上寻找安装Mysql的文章安装,以及使用navicat连接数据库,以后的示例基本是使用mysql数据库管理系统; 二 准备前提 需要建立一张学生表,列分别是id,名称,年龄,学生信息;本示例中文章篇幅原因SQL注释略; 建表语句: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // dosho
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
      11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
Android 9.0系统新特性,对刘海屏设备进行适配
其实Android 9.0系统已经是去年推出的“老”系统了,这个系统中新增了一个比较重要的特性,就是对刘海屏设备进行了支持。一直以来我也都有打算针对这个新特性好好地写一篇文章,但是为什么直到拖到了Android 10.0系统都发布了才开始写这篇文章呢?当然,一是因为我这段时间确实比较忙,今年几乎绝大部分的业余时间都放到写新书上了。但是最主要的原因并不是这个,而是因为刘海屏设备的适配存在一定的特殊性
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下
日均350000亿接入量,腾讯TubeMQ性能超过Kafka
整理 | 夕颜出品 | AI科技大本营(ID:rgznai100) 【导读】近日,腾讯开源动作不断,相继开源了分布式消息中间件TubeMQ,基于最主流的 OpenJDK8开发的
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
碎片化的时代,如何学习
今天周末,和大家聊聊学习这件事情。 在如今这个社会,我们的时间被各类 APP 撕的粉碎。 刷知乎、刷微博、刷朋友圈; 看论坛、看博客、看公号; 等等形形色色的信息和知识获取方式一个都不错过。 貌似学了很多,但是却感觉没什么用。 要解决上面这些问题,首先要分清楚一点,什么是信息,什么是知识。 那什么是信息呢? 你一切听到的、看到的,都是信息,比如微博上的明星出轨、微信中的表情大战、抖音上的...
相关热词 c#中dns类 c#合并的excel c# implicit c#怎么保留3个小数点 c# 串口通信、 网络调试助手c# c# 泛型比较大小 c#解压分卷问题 c#启动居中 c# 逻辑或运算符
立即提问