Python 调用C++ dll库文件函数提示WindowsError: exception: access violation writing 0x00905A4D

.H文件如下:
/*
视频解码
*/
#ifndef __BLL_AUTELVIDEODECODE_H
#define __BLL_AUTELVIDEODECODE_H

#ifdef AUTELVIDEODECODE_EXPORTS
#define AUTELVIDEODECODE_API __declspec(dllexport)
#else
#define AUTELVIDEODECODE_API __declspec(dllimport)
#endif

#include "bll/UDPClient/UDPAsyncClient.h"
#include "bll/DataManager/DataManager.h"
#include "bll/Utils/CommonFuntion.h"
#include "bll/frame.h"
#include "bll/video_data_mgn.h"
#include "bll/h264.h"

extern "C"
{
//编码
#include "libavcodec/avcodec.h"
//封装格式处理
#include "libavformat/avformat.h"
//像素处理
#include "libswscale/swscale.h"

#include "libavutil/avutil.h"
#include "libavutil/imgutils.h"
};

#pragma comment(lib,"avutil.lib")
#pragma comment(lib,"avformat.lib")
#pragma comment(lib,"avcodec.lib")
#pragma comment(lib,"swscale.lib")

#define VIDEO_UDP_PORT (1234)
#define min(a, b) ((a) < (b) ? (a) : (b))

#define MAX_RECVBUF_SIZE (64 * 1024)
#define MAX_FRAME_SIZE (1024 * 1024)

#pragma pack(push, 1)

struct Decoder {
AVCodec *codec;
AVFrame *frame;
AVCodecContext *dec_ctx;
};

typedef struct {
uint8_t *data;
int size;
int64_t pts;
int keyframe;
int decode_only;
} VideoPacket;

typedef struct {
int width;
int height;

int64_t pts;

int keyframe;
int decode_only;

int opaque;

uint8_t *data;
int      size;

} YuvFrame;

#pragma pack(pop)

typedef void (WINAPIV *yuvFrame_func)(YuvFrame *yuv);

class AUTELVIDEODECODE_API CAutelVideoDecode
{
public:
explicit CAutelVideoDecode(std::string strHost="", int nPort=VIDEO_UDP_PORT);
~CAutelVideoDecode(void);

inline void SetYuvframeCallback(yuvFrame_func pfn) {
    m_pfnyuvFrame = pfn;
}

//functions
private:
//通过udp实时获取视频数据包线程
void StartRecvPacketThread();
void StopRecvPacketThread();
static int WINAPIV recv_video_data_func(char* buf, int length, void* ctx, void* pObj);
void DoRecvPacket();
static DWORD ThRecvPacket(LPVOID lpParam);

//从buf里面读取视频帧数据进行渲染线程
void StartRenderThread();
void StopRenderThread();
void DoRenderFrame();
static DWORD ThRenderFrame(LPVOID lpParam);


Decoder *Decoder_Create(void);
int Decoder_Destroy();
int Decoder_Decode(VideoPacket *inpkt, YuvFrame *frame);
int get_video_frame(AVFrame *frame, YuvFrame *yuv);
void PushFrame(YuvFrame frame);
YuvFrame FrontFrame();

//params
private:

//通过udp实时获取视频数据包线程
HANDLE m_hRecvVideoPacket;
bool m_bStopRecvVideoPacket;

//从buf里面读取视频帧数据进行渲染线程
HANDLE m_hRenderFrame;
bool m_bStopRender;

CUDPAsyncClient *m_pUdpClient;
std::string m_strHostAddr;
int m_udpPort;

Decoder *m_pDecoder;
yuvFrame_func m_pfnyuvFrame;

typedef std::queue<YuvFrame> QUEUE_YUVFRAME;
QUEUE_YUVFRAME m_que_yuvframe;
CRITICAL_SECTION m_cri_yuvFramequeLocker;

};

#endif

CPP文件
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#include "AutelVideoDecode.h"

BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}

return TRUE;

}

extern "C"
{
AUTELVIDEODECODE_API CAutelVideoDecode* AutelVideoDecode() { return new CAutelVideoDecode(); }
AUTELVIDEODECODE_API void SetYuvframeCallback(CAutelVideoDecode* pAutel, yuvFrame_func pfn) { pAutel->SetYuvframeCallback(pfn); }
}

#####编译成AutelVideoDecode.dll库后供python2.7程序调用。

####Python程序如下
import sys,pygame
import YUVFrame
import thread
from ctypes import *
ObjAutelvideodecodeDLL = windll.LoadLibrary(".\bin\autelvideodecode.dll")
class AutoTestAutelRealTimeVideo:
def init(self):
pygame.init()
self.size = width, height = 1280, 720
self.black = 0, 0, 0
self.YUVFrame = None
self.overlay =None
self.IYUV = pygame.IYUV_OVERLAY
self.lock = thread.allocate_lock()
CALLFUCTION = CFUNCTYPE(None, POINTER(YUVFrame.YUVFrame))
self.PrenderYuvframe = CALLFUCTION(self.renderYuvframe)
#ObjAutelvideodecodeDLL.AutelVideoDecode.argtype=c_char_p
ObjAutelvideodecodeDLL.AutelVideoDecode.restype = c_void_p
ObjAutelvideodecodeDLL.SetYuvframeCallback.argtypes = (c_void_p,c_void_p)
#ObjAutelvideodecodeDLL.SetYuvframeCallback.restype = None
self.AutelObj = ObjAutelvideodecodeDLL.AutelVideoDecode()
def ......

编译后出错:
Connected to pydev debugger (build 129.782)
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 2.7.3\helpers\pydev\pydevd.py", line 1481, in
debugger.run(setup['file'], None, None)
File "C:\Program Files (x86)\JetBrains\PyCharm 2.7.3\helpers\pydev\pydevd.py", line 1124, in run
pydev_imports.execfile(file, globals, locals) #execute the script
File "E:/AutoTestAutelRealTimeVideo/AutoTestAutelRealTimeVideo.py", line 84, in
test()
File "E:/AutoTestAutelRealTimeVideo/AutoTestAutelRealTimeVideo.py", line 66, in test
test = AutoTestAutelRealTimeVideo()
File "E:/AutoTestAutelRealTimeVideo/AutoTestAutelRealTimeVideo.py", line 25, in init
self.AutelObj = ObjAutelvideodecodeDLL.AutelVideoDecode()
WindowsError: exception: access violation writing 0x00905A4D

c++
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Python第三方库openpyxl如何对Exce提取指定字符的所在行
初学Python, 被这个问题困扰了好久了。 我想提取Excel每一行的第一个单元格为字符"Air"的行的内容。 尝试了以下代码,但是没能成功,还请前辈们指教。谢过! from openpyxl import Workbook from openpyxl import load_workbook wb=load_workbook("C:/Users/SSSVV/Desktop/Air log/Air log now 1207.xlsx") sheet_names=wb.sheetnames ws=wb[sheet_names[0]] maxrow=ws.max_row maxcol=ws.max_column ID="air" i=1 for i in ws.rows: for cell in i: if ID in ws.cell(row=i,column=1).value: print(cell.value)
openpyxl写入excel后打开报错“已删除的记录: /xl/comments/comment1.xml 部分的 批注 (批注)”?
CompareExcel.py代码如下: ``` from openpyxl.styles import Font,Alignment,Side,Border,Color,colors,PatternFill from MMSpackagefile.codefile.ExcelData import ExcelData class CompareExcel(object): def __init__(self): pass def settruecelltype(self, sheet, row, col): cell = sheet.cell(row, col) font = Font(size=12, bold=False, name='Arial', color=colors.BLACK) thin = Side(border_style='thin', color='0000FF') border = Border(left=thin, right=thin, top=thin, bottom=thin) cell.font = font cell.border = border def setfalsecelltype(self, sheet, row, col): cell = sheet.cell(row, col) font = Font(size=12, bold=False, name='Arial', color=colors.RED) fill = PatternFill(start_color=colors.YELLOW, end_color=colors.YELLOW, fill_type='solid') thin = Side(border_style='thin', color='0000FF') border = Border(left=thin, right=thin, top=thin, bottom=thin) cell.fill = fill cell.font = font cell.border = border #expectlist,actlist 分别为预期返回list和实际返回list; #data 为案例sheet页中过滤的案例数据; #fullfield 为所有字段项去重(无论是否都需要比较,即是结果明细sheet页中标题字段)fulladdfield所有添加字段项去重 #categoryfield为从案例中获得的比较字段类; #sheetfield为配置文件excel里,比较字段sheet页里获取的list,其中list1为所有的子字段列表,list2为添加的字段列表,list3为两个dict,key分别为IsCompare和IsAdd def comp(self, expectlist, actlist, data, full, fulladdfield, categoryfield, sheetfield, sheet_result): comparefield = [] #为根据案例中的需比较字段类获得的需比较字段项 addfield = [] #为根据案例中的需比较字段类获得的需比较添加字段项 rownum = sheet_result.max_row fullli = ExcelData().sort_list(full) fullfield = fullli[:-1] if len(fulladdfield) != 0: fullfield = [e for e in fullfield if e not in fulladdfield] for j in categoryfield: for m in sheetfield: if m.get('checkfield') == 'IsCompare': comparefield.extend(list(m.get(j).split(','))) else: if not m.get(j) != m.get(j): addfield.extend(list(m.get(j).split(','))) if len(expectlist) == len(actlist) and len(expectlist) != 0: sumlogicvalue = CompareExcel().setresultsheet(expectlist, actlist, fullfield, fulladdfield, comparefield, addfield, data, sheet_result, rownum) if len(expectlist) != 1: sheet_result.merge_cells(start_row=rownum + 1, start_column=1, end_row=rownum + len(expectlist), end_column=1) # return sumlogicvalue elif len(expectlist) == len(actlist) and len(expectlist) == 0: rowvalue = [] rowvalue.append(data.get('case_id')) sumlogicvalue = False for q in range(2, 2*len(fullfield)+len(fulladdfield)+2): rowvalue.append('') rowvalue.append(sumlogicvalue) sheet_result.append(rowvalue) CompareExcel().settruecelltype(sheet_result, rownum+1, 1) for w in range(2, 2*len(fullfield)+len(fulladdfield)+3): CompareExcel().setfalsecelltype(sheet_result, rownum+1, w) # return sumlogicvalue elif len(expectlist) > len(actlist): commonexpectlist = [] commonactlist = [] surplusexpectlist = [] for i in expectlist: sign = 0 for j in actlist: if i['data']['id'] == j['data']['id']: sign = 1 commonexpectlist.append(i) commonactlist.append(j) if sign == 0: surplusexpectlist.append(i) CompareExcel().setresultsheet(commonexpectlist, commonactlist, fullfield, fulladdfield, comparefield, addfield, data, sheet_result, rownum) si = 'ex' CompareExcel().setsurlistvalue(si, surplusexpectlist, fullfield, fulladdfield, sheet_result, rownum, commonexpectlist) sheet_result.merge_cells(start_row=rownum + 1, start_column=1, end_row=rownum + len(expectlist), end_column=1) sumlogicvalue = False # return sumlogicvalue else: commonexpectlist = [] commonactlist = [] surplusexpectlist = [] for i in actlist: sign = 0 for j in expectlist: if i['data']['id'] == j['data']['id']: sign = 1 commonactlist.append(i) commonexpectlist.append(j) if sign == 0: surplusexpectlist.append(i) CompareExcel().setresultsheet(commonexpectlist, commonactlist, fullfield, fulladdfield, comparefield, addfield, data, sheet_result, rownum) si = 'ac' CompareExcel().setsurlistvalue(si, surplusexpectlist, fullfield, fulladdfield, sheet_result, rownum, commonexpectlist) sheet_result.merge_cells(start_row=rownum + 1, start_column=1, end_row=rownum + len(actlist), end_column=1) sumlogicvalue = False return sumlogicvalue def setresultsheet(self, expectlist, actlist, fullfield, fulladdfield, comparefield, addfield, data, sheet_result, rownum): for i in range(len(expectlist)): rowvalue = [] expectreturn = [] actreturn = [] addreturn = [] logicvalue = True columnnum = [] for j in range(len(fullfield)): if fullfield[j] in comparefield: # if fullfield[j] == 'name': # actlist[i]['data'][fullfield[j]] = '浦发银' if fullfield[j] in list(expectlist[i]['data'].keys()): expectreturn.append(expectlist[i]['data'][fullfield[j]]) else: expectreturn.append('') if fullfield[j] in list(actlist[i]['data'].keys()): actreturn.append(actlist[i]['data'][fullfield[j]]) else: actreturn.append('') if expectlist[i].get('data').get(fullfield[j]) != actlist[i].get('data').get(fullfield[j]): logicvalue = False columnnum.append(2+j) columnnum.append(2+j+len(fullfield)) columnnum.append(2*len(fullfield)+len(fulladdfield)+2) else: expectreturn.append('') actreturn.append('') if len(fulladdfield) != 0: logicvalue = False columnnum.append(2 * len(fullfield) + len(fulladdfield) + 2) for m in range(len(fulladdfield)): if fulladdfield[m] in addfield: columnnum.append(2 + 2 * len(fullfield) + m) if fulladdfield[m] in list(actlist[i].get('data').keys()): addreturn.append(actlist[i].get('data').get(fulladdfield[m])) else: addreturn.append('') else: addreturn.append('') if i == 0: rowvalue.append(data.get('case_id')) else: rowvalue.append('') rowvalue.extend(expectreturn) rowvalue.extend(actreturn) if len(addreturn) != 0: if len(addreturn) == 1: rowvalue.append(addreturn) else: rowvalue.extend(addreturn) rowvalue.append(logicvalue) sheet_result.append(rowvalue) for o in range(1, 2*len(fullfield)+len(fulladdfield)+3): if o in columnnum: CompareExcel().setfalsecelltype(sheet_result, rownum + 1 + i, o) else: CompareExcel().settruecelltype(sheet_result, rownum + 1 + i, o) return logicvalue def setsurlistvalue(self, sig, surplusexpectlist, fullfield, fulladdfield, sheet_result, rownum, commonexpectlist): for k in surplusexpectlist: surrowvalue = [''] expectlis = [] actlis = [] for l in fullfield: sign = 0 if l in list(k['data'].keys()): sign = 1 expectlis.append(k['data'][l]) if sign == 0: expectlis.append('') actlis.append('') if sig == 'ex': surrowvalue.extend(expectlis) surrowvalue.extend(actlis) else: surrowvalue.extend(actlis) surrowvalue.extend(expectlis) if len(fulladdfield) != 0: addlis = [] for m in fulladdfield: if m in list(k['data'].keys()): addlis.append(k['data'][m]) addlis.append('') surrowvalue.extend(addlis) surrowvalue.append('False') sheet_result.append(surrowvalue) for t in range(len(surplusexpectlist)): for n in range(2, len(surrowvalue) + 1): CompareExcel().setfalsecelltype(sheet_result, rownum + 1 + len(commonexpectlist) + t, n) ``` test_stock_info.py内容如下: ``` import pytest import os import time import openpyxl as op from MMSpackagefile.codefile.ExcelData import ExcelData from MMSpackagefile.codefile.CompareExcel import CompareExcel path1 = 'E:\\MMS\\myfirstproject\\MMSpackagefile\\configdatasource\\stock_info_option12.xlsx' path2 = 'E:\\MMS\\myfirstproject\\MMSpackagefile\\configdatasource\\mms_cofigfile.xlsx' executecase = ExcelData().getexecutecase(path1, 1, 0) #返回可执行案例的list configcomparefield = ExcelData().getexcelfield(path1, 0, 0) #返回stock_info_option12.xlsx第一个sheet页的比对字段list configcomparefield1 = ExcelData().getexcelfield(path1, 0, 0) dirpath = os.path.abspath('..') version_list = ExcelData().getversion(path2, 0, 1) #返回配置文件的版本信息 localtime = time.strftime('%Y%m%d%H%M%S', time.localtime()) path = dirpath + '\\Result\\' + version_list[0] + '_' + version_list[1] + '_' + localtime os.makedirs(path) excel = op.load_workbook(path2) excel.save(path + '\\mms_cofigfile_' + localtime + '.xlsx') exce = op.load_workbook(path1) comparefield, addfield, sheetfield = ExcelData().getfullfielditem(configcomparefield1) excel, sheet = ExcelData().setresulttitle(comparefield, addfield, exce) @pytest.fixture(scope='module') def stock_info(request): value = {} value['case_id'] = request.param['case_id'] value['title'] = request.param['title'] value['ticker'] = request.param['ticker'] value['exchange'] = request.param['exchange'] value['asset_class'] = request.param['asset_class'] value['IsCompare'] = request.param['IsCompare'] value['IsAdd'] = request.param['IsAdd'] return value @pytest.mark.parametrize('stock_info', executecase, indirect=True) def test_stock_info(stock_info): configdata = ExcelData().getversion(path2, 0, 1) oldreturnlist = ExcelData().getrequestdata(configdata[2], stock_info, 'stock-info') newreturnlist = ExcelData().getrequestdata(configdata[3], stock_info, 'stock-info') categoryfield = stock_info.get('IsCompare').split(',') isbool = CompareExcel().comp(oldreturnlist, newreturnlist, stock_info, comparefield, addfield, categoryfield, configcomparefield, sheet) ExcelData().setcolumnautowidth(sheet) excel.save(path + '\\stock_info_option12_' + localtime + '.xlsx') assert isbool ``` 现在有两个问题,一个是CompareExcel.py里函数setresultsheet最后一行logicvalue高亮显示: 提示:This inspection warns about local variables referenced before assignment.我并未在函数外部使用过这个变量logicvalue为什么会有这种提示? 第二个问题,我用openpyxl写excel文件,打开时候提示 ![图片说明](https://img-ask.csdn.net/upload/201912/17/1576586295_401469.png) 不太清楚这个提示是因为什么原因引起的,,之前也出现过这个问题,后来检查是因为重复保存的原因,改成保存一次就好了,现在又出现这个问题,几天了还没排查到原因,哪位大神看下?
poi导入exce到数据库,两次导入相同的数据,如何判断导入第二次的时候只更新
poi导入exce到数据库,两次导入相同的数据,如何判断导入第二次的时候只更新
JS的: Cannot read property 'value' of undefined
部分html代码 ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>随机数据生成</title> <link rel="stylesheet" type="text/css" href="css/index.css"> <script type="text/javascript" src="js/index.js"></script> </head> <body> <textarea rows="1" cols="1" name="date" class="texta" value=""></textarea> <script type="text/javascript"> var texta = document.getElementsByTagName("textarea")[0]; start.onclick = function(){ IntegerDate(peoVal,exceVal,qualVal,unqualVal,texta); } ``` 外部JS代码 ``` function IntegerDate(sNum,exce,good,qual,unqual,elements){//注释:总人数,优秀,良好,合格,不合格,要添加的元素 for(var i = 0;i < sNum;i++){ if(exce){ elements.getAttribute("value") += randomInt(4800,5040) + '\n'; } if(good){ elements.getAttribute("value") += randomInt(4300,4550) + '\n'; } if(qual){ elements.getAttribute("value") += randomInt(3100,4180) + '\n'; } if(unqual){ elements.getAttribute("value") += randomInt(2300,2940) + '\n'; } } } ``` 错误图片提示 ![图片说明](https://img-ask.csdn.net/upload/201712/06/1512574468_688310.png)
.NET 基于Office excel 转 word 怎么实现,求大神指教
exce中有表格,合并单元格 等信息,Excel转word。 求大神指教
Android 以一段字符串为分割点分割另一段字符串
如何以字符串为分割点将另一字符串分割成两段。例如:IOException 以Exce为分割点分割为IO和ption两段。
action调用service无限报空指针,试了很多方法都没用
index.jsp ``` <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <script type="text/javascript"> window.location.href = "Test_test.do"; </script> </body> </html> ``` action ``` package com.action; import com.opensymphony.xwork2.ActionSupport; import com.service.StuService; public class TestAction extends ActionSupport { private StuService stuService; public String test() throws Exception { System.out.println("进入action"); stuService.getArraylist(); return "success"; } public StuService getStuService() { return stuService; } public void setStuService(StuService stuService) { this.stuService = stuService; } } ``` dao ``` package com.dao; import com.entity.Log; public interface LogDAO { public void saveLog(Log log); public void finfLog(); } ``` daoImpl ``` package com.dao.impl; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import javax.annotation.Resource; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.springframework.stereotype.Component; import com.dao.LogDAO; import com.entity.Log; @Component public class LogDAOImpl implements LogDAO { private SessionFactory sessionfactory; public void saveLog(Log log) { Session session = sessionfactory.getCurrentSession(); session.save(log); // throw new NullPointerException(); } public void finfLog() { Session session = sessionfactory.getCurrentSession(); Query query = session.createQuery(" from Log"); ArrayList<Log> p = (ArrayList<Log>) query.list(); for (int i = 0; i < p.size(); i++) { System.out.println(p.get(i).getMassage()); } } public SessionFactory getSessionfactory() { return sessionfactory; } @Resource public void setSessionfactory(SessionFactory sessionfactory) { this.sessionfactory = sessionfactory; } } ``` 实体类 ``` package com.entity; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.SequenceGenerator; import javax.persistence.Table; @Entity @Table(name="t_log") public class Log { private int id; private String massage; public Log() { super(); } public Log(int id, String massage) { super(); this.id = id; this.massage = massage; } @Id @SequenceGenerator(name = "SEQ_STORE", sequenceName = "stu_seq") @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_STORE") public int getId() { return id; } public void setId(int id) { this.id = id; } public String getMassage() { return massage; } public void setMassage(String massage) { this.massage = massage; } } ``` service ``` package com.service; import javax.annotation.Resource; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import com.dao.LogDAO; import com.dao.StuDAO; import com.entity.Log; import com.entity.Stu; @Component // 业务逻辑层 public class StuService { private StuDAO stuDao; private LogDAO logDao; @Transactional public void getArraylist() throws Exception { // stuDao.getStu(); logDao.finfLog(); } @Resource public void setLogDao(LogDAO logDao) { this.logDao = logDao; } } ``` spring配置 ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"> <context:annotation-config /> <context:component-scan base-package="com" /> <!-- 数据源 --> <bean id="DataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> <property name="url" value="jdbc:oracle:thin:@localhost:1521:STUDY" /> <property name="username" value="sys as SYSDBA" /> <property name="password" value="7998" /> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="DataSource" /> <property name="packagesToScan"> <list> <value>com.entity</value> </list> </property> <!-- Hibernate内容 --> <property name="hibernateProperties"> <value> hibernate.dialect = org.hibernate.dialect.OracleDialect hibernate.show_sql = true hibernate.format_sql = true </value> <!-- <props> <prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop> <prop key="hibernate.show_sql">true</prop> </props> --> </property> </bean> <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <tx:advice id="txAdvice" transaction-manager="txManager"> <tx:attributes> <tx:method name="get*" read-only="true" /> <tx:method name="*" rollback-for="Exce ption" /> </tx:attributes> </tx:advice> <aop:config> <aop:pointcut id="txPointcut" expression="execution(* com.service.*.*(..))" /> <aop:advisor advice-ref="txAdvice" pointcut-ref="txPointcut" /> </aop:config> <bean name="testAction" class="com.action.TestAction"> <property name="stuService" ref="stuService"> </property> </bean> </beans> ``` struts配置 ```<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> <struts> <!-- 从2.3.16开始DMI默认是禁止的 全称是:动态方法调用 --> <constant name="struts.enable.DynamicMethodInvocation" value="true"></constant> <!-- <constant name="struts.devMode" value="true"></constant> --> <constant name="struts.action.extension" value="do"></constant> <package name="MyPackage" namespace="/" extends="struts-default"> <!-- 约定优于配置 --> <action name="*_*" class="com.action.{1}Action" method="{2}"> <result>/success.jsp</result> </action> </package> </struts> ```
java poi excel导出怎么制作标题
一个导出的excel,内容包括大标题,列标题和数据,现在这个大标题不会弄。用的是HSSFWorkbook。我是新手,希望能说的详细一点,多谢!我这样写的 HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.createSheet("report"); //--- sheet.addMergedRegion(new CellRangeAddress(0,0,0,7)); HSSFRow rowheader = sheet.createRow(0); HSSFCell cellheader = rowheader.createCell(0); cellheader.setCellValue("标题内容"); //-- HSSFRow row = sheet.createRow(1); HSSFCell cell = row.createCell(0); String[] headNames=new String[]{"工号","姓名","迟到次数","早退次数","夜班","周末班","节假日班","总工时"}; for (int k=0;k<headNames.length;k++) { cell=row.createCell(k); cell.setCellValue(headNames[k]); cell.setCellStyle(headStyle); } List<Workhour> list = workhourBizImpl.findByParamGruopForExcel(workhour); for (int i = 0; i < list.size(); i++){ --数据 } 但是我一加//里面的代码,列标题就没了。。。
java.lang.NoSuchFieldError: STANDARD_NUMBER_TYPES
springMVC项目出现了这个错误。。真心不知道怎么搞。。求大佬。。 ``` 严重: Exception sending request initialized lifecycle event to listener instance of class [org.springframework.web.context.request.RequestContextListener] java.lang.NoSuchFieldError: STANDARD_NUMBER_TYPES at org.springframework.web.context.request.ServletRequestAttributes.<clinit>(ServletRequestAttributes.java:55) at org.springframework.web.context.request.RequestContextListener.requestInitialized(RequestContextListener.java:59) at org.apache.catalina.core.StandardContext.fireRequestInitEvent(StandardContext.java:5826) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:625) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:498) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:796) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1372) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) ```
一个关于Android编成问题
代码如下: public class get extends MainActivity { Socket socket; BufferedReader in; private EditText OP; EditText dose=(EditText)findViewById(R.id.editText); public get() { try { Socket socket = new Socket("192.168.11.254", 8080); BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream())); new gd().start(); } catch (IOException e) { e.printStackTrace(); } } class gd extends Thread { public void run() { while (this.isAlive()) { try { String kk = in.readLine(); int k = (kk.lastIndexOf("dose")); String z; z = kk.substring(k + 5, k + 10); Thread.sleep(50); } catch (Exception e) { e.printStackTrace(); } } } } } 提示如下: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.Window.findViewById(int)' on a null object reference 如何解决?
jboss-eap的发布项目的问题,报了很多错误,不知道是什么原因。
{"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed :" => {"Operation step-2" => {"WFLYCTL0080: Failed services" => {"jboss.module.s ervice.\"deployment.itoo-basic-teacher-ear.ear.itoo-tool.jar\".main" => "org.jbo ss.msc.service.StartException in service jboss.module.service.\"deployment.itoo- basic-teacher-ear.ear.itoo-tool.jar\".main: WFLYSRV0179: Failed to load module: deployment.itoo-basic-teacher-ear.ear.itoo-tool.jar:main Caused by: org.jboss.modules.ModuleNotFoundException: org.jboss.netty:main", "jboss.module.service.\"deployment.itoo-basic-teacher-ear.ear.itoo-base.jar\".ma in" => "org.jboss.msc.service.StartException in service jboss.module.service.\"d eployment.itoo-basic-teacher-ear.ear.itoo-base.jar\".main: WFLYSRV0179: Failed t o load module: deployment.itoo-basic-teacher-ear.ear.itoo-base.jar:main Caused by: org.jboss.modules.ModuleNotFoundException: org.jboss.netty:main", "jboss.module.service.\"deployment.itoo-basic-teacher-ear.ear.itoo-basic-teacher -core.jar\".main" => "org.jboss.msc.service.StartException in service jboss.modu le.service.\"deployment.itoo-basic-teacher-ear.ear.itoo-basic-teacher-core.jar\" .main: WFLYSRV0179: Failed to load module: deployment.itoo-basic-teacher-ear.ear .itoo-basic-teacher-core.jar:main Caused by: org.jboss.modules.ModuleNotFoundException: org.jboss.netty:main", "jboss.module.service.\"deployment.itoo-basic-teacher-ear.ear\".main" => "org.jb oss.msc.service.StartException in service jboss.module.service.\"deployment.itoo -basic-teacher-ear.ear\".main: WFLYSRV0179: Failed to load module: deployment.it oo-basic-teacher-ear.ear:main Caused by: org.jboss.modules.ModuleNotFoundException: org.jboss.netty:main", "jboss.module.service.\"deployment.itoo-basic-teacher-ear.ear.itoo-excelV2.0-api .jar\".main" => "org.jboss.msc.service.StartException in service jboss.module.se rvice.\"deployment.itoo-basic-teacher-ear.ear.itoo-excelV2.0-api.jar\".main: WFL YSRV0179: Failed to load module: deployment.itoo-basic-teacher-ear.ear.itoo-exce lV2.0-api.jar:main Caused by: org.jboss.modules.ModuleNotFoundException: org.jboss.netty:main", "jboss.module.service.\"deployment.itoo-basic-teacher-ear.ear.itoo-cloud-api.jar \".main" => "org.jboss.msc.service.StartException in service jboss.module.servic e.\"deployment.itoo-basic-teacher-ear.ear.itoo-cloud-api.jar\".main: WFLYSRV0179 : Failed to load module: deployment.itoo-basic-teacher-ear.ear.itoo-cloud-api.ja r:main Caused by: org.jboss.modules.ModuleNotFoundException: org.jboss.netty:main", "jboss.module.service.\"deployment.itoo-basic-teacher-ear.ear.itoo-basic-teacher -web.war\".main" => "org.jboss.msc.service.StartException in service jboss.modul e.service.\"deployment.itoo-basic-teacher-ear.ear.itoo-basic-teacher-web.war\".m ain: WFLYSRV0179: Failed to load module: deployment.itoo-basic-teacher-ear.ear.i too-basic-teacher-web.war:main Caused by: org.jboss.modules.ModuleNotFoundException: org.jboss.netty:main", "jboss.module.service.\"deployment.itoo-basic-teacher-ear.ear.itoo-basic-api.jar \".main" => "org.jboss.msc.service.StartException in service jboss.module.servic e.\"deployment.itoo-basic-teacher-ear.ear.itoo-basic-api.jar\".main: WFLYSRV0179 : Failed to load module: deployment.itoo-basic-teacher-ear.ear.itoo-basic-api.ja r:main Caused by: org.jboss.modules.ModuleNotFoundException: org.jboss.netty:main", "jboss.module.service.\"deployment.itoo-basic-teacher-ear.ear.itoo-authority-api .jar\".main" => "org.jboss.msc.service.StartException in service jboss.module.se rvice.\"deployment.itoo-basic-teacher-ear.ear.itoo-authority-api.jar\".main: WFL YSRV0179: Failed to load module: deployment.itoo-basic-teacher-ear.ear.itoo-auth ority-api.jar:main Caused by: org.jboss.modules.ModuleNotFoundException: org.jboss.netty:main"} }}}
delphi 7 执行有返回参数的oracle存储过程
存储过程名 Pro_zxc 参数 : 卡号 ,编号, 数量,金额,时间,错误代码(0/1),返回消息 ``` exce Pro_zxc('301007087','001','1','1000',to_date('2018-03-17','yyyy-mm-dd'),:Result_Code,:Result_Code) ``` 我用 ``` OrclSql := 'exce Pro_zxc(' + QuotedStr(edtID.Text) + ',' + QuotedStr(edtNum.Text) + ',''' + IntToStr(CNum) +''',' + QuotedStr(HcDBLabelEdit3.Text) + ',' + 'to_date('+QuotedStr(dateSigContractDate.Text)+','+'''yyyy-mm-dd'')'+',:Result_Code,:Result_Code)'; WriteLog(OrclSql); UniQueryMoney.Close; UniQueryMoney.SQL.Clear; UniQueryMoney.SQL.Add(OrclSql); WriteLog('UniQueryMoney.SQL.Add(OrclSql);'); UniQueryMoney.Open; //报错 ora-00900 invalid sql statement WriteLog('UniQueryMoney.Open;'); Result_Num := UniQueryMoney.ParamByName('Result_Code').AsString; WriteLog('Result_Num = '+Result_Num); Result_Msg := UniQueryMoney.ParamByName('Result_Msg').AsString; WriteLog('Result_Msg = '+Result_Msg); ``` 这样报错,有没有大佬能够教导一下,这个存储过程我delphi7该怎样执行
求助各位大神LIstfragment中,分线程获取数据后刷新界面崩溃,用分线程加载数据后
如题:代码如下,要在viewpager中的一个fragment中加载一个listview,用分线程加载数据后,handleMessage给成员变量的集合赋值后,notify,会直接崩溃 /** * 报警图片 */ public class AlarmPhotoFragment extends ListFragment { private int mType = 0; private ListView mListView; public static int type = 0; private String urlStr; private LayoutInflater mInflater; private List<String> cids = new ArrayList<String>(); List<AlarmPhotoBean.Timestamps.ListEntity> lists = new ArrayList<AlarmPhotoBean.Timestamps.ListEntity>(); LocalRecordAlarmAdapter mLocalRecordAlarmAdapter; private AlarmPhotoBean alarmPhotoBeans = new AlarmPhotoBean(); int page = 1; private Handler handler = new Handler() { @Override public void handleMessage(Message msg) { super.handleMessage(msg); switch (msg.what) { case 9: String json = (String) msg.obj; Gson gson = new Gson(); AlarmPhotoBean alarmPhotoBean = gson.fromJson(json, AlarmPhotoBean.class); CLog.v("alarmPhotoBean: " + alarmPhotoBean); if (!alarmPhotoBean.getBase_urls().isEmpty() && !alarmPhotoBean.getTimestamps().isEmpty()) { List<AlarmPhotoBean.Timestamps> timestamps = alarmPhotoBean.getTimestamps(); List<AlarmPhotoBean.Timestamps.ListEntity> list = timestamps.get(0).getList(); CLog.v("alarmPhotoBeans:" + alarmPhotoBean); lists.addAll(list); alarmPhotoBeans = alarmPhotoBean; com.lingyang.sdk.util.CLog.v("lists: " + lists); notifyDataSetChanged(); } break; } } }; @Override public void onAttach(Activity activity) { super.onAttach(activity); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mType = getArguments().getInt("type", 0); } @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); View view = inflater.inflate(R.layout.fragment_localrecord_alarm, container, false); initData(); mInflater = inflater; page = 1; return view; } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mListView = getListView(); if(mLocalRecordAlarmAdapter == null) { mLocalRecordAlarmAdapter = new LocalRecordAlarmAdapter(getActivity(), lists, alarmPhotoBeans); } else { setListAdapter(mLocalRecordAlarmAdapter); mLocalRecordAlarmAdapter.notifyDataSetChanged(); } } private void notifyDataSetChanged() { if (mLocalRecordAlarmAdapter == null) { mLocalRecordAlarmAdapter = new LocalRecordAlarmAdapter(getActivity(), lists, alarmPhotoBeans); } CLog.v("notifyDataSetChanged()"); setListAdapter(mLocalRecordAlarmAdapter); } /** * 初始化集合信息 */ private void initData() { Date dNow = new Date(); //当前时间 long time = dNow.getTime(); long begoreTime = TimeUtils.getBeforeTimeStamp(time); getTimeStamp(begoreTime, time); } public void getTimeStamp(long start, long end) { String userToken; String accessToken; List<CameraResponse.MyCameras.Camera> mListCamera = AttentionFragment.mListCamera; // for (final CameraResponse.MyCameras.Camera cameras : mListCamera) { final CameraResponse.MyCameras.Camera cameras = mListCamera.get(0); com.lingyang.sdk.util.CLog.v("cid: " + cameras.cid); userToken = CloudOpenAPI.getInstance().getUserToken(); accessToken = CloudOpenAPI.getInstance().getDeviceToken(cameras.cid); urlStr = AlarmHttpUtils.TOTIMESTAMP + cameras.cid + "/snapshots?from=" + start / 1000 + "&type=3" + "&to=" + end / 1000 + "&user_token=" + userToken + "&access_token=" + accessToken; cids.add(cameras.cid); Object obj = new Object(); synchronized (obj) { new Thread() { public void run() { try { URL url = null; HttpURLConnection conn = null; InputStream is = null; ByteArrayOutputStream baos = null; try { url = new URL(urlStr); conn = (HttpURLConnection) url.openConnection(); conn.setReadTimeout(AlarmHttpUtils.TIMEOUT_IN_MILLIONS); conn.setConnectTimeout(AlarmHttpUtils.TIMEOUT_IN_MILLIONS); conn.setRequestMethod("GET"); conn.setRequestProperty("accept", "*/*"); conn.setRequestProperty("connection", "Keep-Alive"); com.lingyang.sdk.util.CLog.v("conn.getResponseCode(): " + conn.getResponseCode()); if (conn.getResponseCode() == 200) { is = conn.getInputStream(); baos = new ByteArrayOutputStream(); int len = -1; byte[] buf = new byte[128]; while ((len = is.read(buf)) != -1) { baos.write(buf, 0, len); } baos.flush(); baos.toString(); Message message = new Message(); message.what = 9; message.obj = baos.toString(); handler.sendMessage(message); } else { throw new RuntimeException(" responseCode is not 200 ... "); } } catch (Exception e) { e.printStackTrace(); } finally { try { if (is != null) is.close(); } catch (IOException e) { } try { if (baos != null) baos.close(); } catch (IOException e) { } conn.disconnect(); } } catch (Exception e) { e.printStackTrace(); } } }.start(); } // } } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); } @Override public void onResume() { super.onResume(); } }
EXCE小问题,类型不匹配,请解答
Sub TIANXIE() Dim m As Integer Dim n As Integer For n = 2 To 10 Step 1 If Cells(n, 2).Value = "#N/A" Then Cells(n, 3).Value = "" Cells(n, 3).Value = "20150401" Else Cells(n, 3).Value = Cells(n, 2).Value End If Next n End Sub
最近碰到dubbox 里面添加filter的问题,网上找了下,也没有啥效果,想问问有谁也碰到过?
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'filter' threw exception; nested exception is java.lang.IllegalStateException: No such extension AuthorityFilter for filter/com.alibaba.dubbo.rpc.Filter at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:101) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1450) ... 13 more
exe ,Excel共同访问一个COM怎么实现
我现在写了一个C#的com,想让一个Exe,在产生信息号时,通过接口向COM中写值,当值写完成后,通知Exce的RTD读数据。ClientExcelValue.m_Ordercallback.UpdateNotify(); //通知Excel读数据。而在excel中=RTD("ShZd|OrderInfo", , "index"); 通过public int ServerStart(IRTDUpdateEvent callback) { ClientExcelValue.m_Ordercallback = callback; return 1; } 设置,这样看来是可行的,但实际使用中,怎么发现ClientExcelValue.m_Ordercallback始终是null,而最先运行的是excel的RTD("ShZd|OrderInfo", , "index")。如果调试,会发现ClientExcelValue.m_Ordercallback它有值,但2个程序(exe,excel)同时运行,通过exe的调试,发现ClientExcelValue.m_Ordercallback始终为null,所以不能操作下去。是不是exe,excel分别初始化了COM,导致2个对象在内存中不是访问的同一个COM实例?? 那么我改怎么办?在线等,高手帮忙!
今天我们项目weblogic突然死掉了,各位帮忙诊断下!
各位大虾: 今天我们的项目weblogic突然死掉,这是一个地级市的协同办公项目,因为使用的用户较多,死掉之后用户无法及时使用,这给我们造成了很大的麻烦,甲方要求不得在出现第二次,项目组苦思冥想都不知道这是什么原因,各种搜索资源都已尝试,仍未找到缘由,特上来请教各位大侠 项目环境: oracle 10g; weblogic 10; windows 2003(目前是试运行,后面可能会更换成 redhat or solaris); 然后在附上weblgoic的堆栈信息,如下: [code="java"] <2011-6-14 上午08时36分48秒 CST> <Error> <HTTP> <BEA-101020> <[weblogic.servlet. internal.WebAppServletContext@180b6f2 - appName: 'wzoa', name: 'wzoa', context-p ath: '', spec-version: 'null'] Servlet failed with Exception java.lang.NullPointerException at com.gw.util.PageFilter.doFilter(PageFilter.java:24) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja va:42) at com.gw.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:79) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja va:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio n.run(WebAppServletContext.java:3496) Truncated. see log file for complete stacktrace > at java.util.zip.Inflater.ensureOpen(Inflater.java:332) at java.util.zip.Inflater.inflateBytes(Inflater.java:346) at java.util.zip.Inflater.inflate(Inflater.java:216) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:135) at java.io.FilterInputStream.read(FilterInputStream.java:116) at java.io.FilterInputStream.read(FilterInputStream.java:90) at java.util.Properties$LineReader.readLine(Properties.java:418) at java.util.Properties.load0(Properties.java:337) at java.util.Properties.load(Properties.java:325) at org.extremecomponents.table.core.TableProperties.init(TableProperties .java:40) at org.extremecomponents.table.limit.TableLimitFactory.<init>(TableLimit Factory.java:69) at org.extremecomponents.table.limit.TableLimitFactory.<init>(TableLimit Factory.java:46) at org.extremecomponents.table.limit.TableLimitFactory.<init>(TableLimit Factory.java:39) at com.gw.util.PageLimit.<init>(PageLimit.java:50) at com.gw.util.PageLimit.<init>(PageLimit.java:40) at com.gw.util.PageFilter.setPageLimit(PageFilter.java:49) at com.gw.util.PageFilter.doFilter(PageFilter.java:24) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja va:42) at com.gw.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:79) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja va:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio n.run(WebAppServletContext.java:3496) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate dSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS ervletContext.java:2180) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC ontext.java:2086) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j ava:1406) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) java.lang.NullPointerException at java.util.zip.Inflater.ensureOpen(Inflater.java:332) at java.util.zip.Inflater.inflateBytes(Inflater.java:346) at java.util.zip.Inflater.inflate(Inflater.java:216) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:135) at java.io.FilterInputStream.read(FilterInputStream.java:116) at java.io.FilterInputStream.read(FilterInputStream.java:90) at java.util.Properties$LineReader.readLine(Properties.java:418) at java.util.Properties.load0(Properties.java:337) at java.util.Properties.load(Properties.java:325) at org.extremecomponents.table.core.TableProperties.init(TableProperties .java:40) at org.extremecomponents.table.limit.TableLimitFactory.<init>(TableLimit Factory.java:69) at org.extremecomponents.table.limit.TableLimitFactory.<init>(TableLimit Factory.java:46) at org.extremecomponents.table.limit.TableLimitFactory.<init>(TableLimit Factory.java:39) <2011-6-14 上午08时36分48秒 CST> <Error> <HTTP> <BEA-101020> <[weblogic.servlet.internal.WebAppServletContext@180b6f2 - appName: 'wzoa', name: ' wzoa', context-path: '', spec-version: 'null'] Servlet failed with Exception java.lang.NullPointerException at com.gw.util.PageFilter.doFilter(PageFilter.java:24) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja va:42) at com.gw.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:79) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja va:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio n.run(WebAppServletContext.java:3496) Truncated. see log file for complete stacktrace > at com.gw.util.PageLimit.<init>(PageLimit.java:50) at com.gw.util.PageLimit.<init>(PageLimit.java:40) at com.gw.util.PageFilter.setPageLimit(PageFilter.java:49) at com.gw.util.PageFilter.doFilter(PageFilter.java:24) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja va:42) at com.gw.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:79) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja va:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio n.run(WebAppServletContext.java:3496) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate dSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS ervletContext.java:2180) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC ontext.java:2086) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j ava:1406) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) java.lang.NullPointerException at java.util.zip.Inflater.ensureOpen(Inflater.java:332)<2011-6-14 上午08 时36分48秒 CST> <Error> <HTTP> <BEA-101020> <[weblogic.servlet.internal.WebAppSe rvletContext@180b6f2 - appName: 'wzoa', name: 'wzoa', context-path: '', spec-ver sion: 'null'] Servlet failed with Exception java.lang.NullPointerException at com.gw.util.PageFilter.doFilter(PageFilter.java:24) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja va:42) at com.gw.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:79) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja va:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio n.run(WebAppServletContext.java:3496) Truncated. see log file for complete stacktrace > at java.util.zip.Inflater.inflateBytes(Inflater.java:346) at java.util.zip.Inflater.inflate(Inflater.java:216) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:135) at java.io.FilterInputStream.read(FilterInputStream.java:116) at java.io.FilterInputStream.read(FilterInputStream.java:90) at java.util.Properties$LineReader.readLine(Properties.java:418)[JRockit ] ERROR: The JVM has crashed. Writing crash information to E:\bea\wlserver_10.3\ samples\domains\wl_server\jrockit.3684.dump. ===== BEGIN DUMP ============================================================= JRockit dump produced after 0 days, 12:47:25 on Tue Jun 14 08:37:19 2011 ********************************************************** * If you see this dump, please go to * * http://edocs.bea.com/jrockit/go2troubleshooting.html * * for troubleshooting information. * ********************************************************** Additional information is available in: E:\bea\wlserver_10.3\samples\domains\wl_server\jrockit.3684.dump E:\bea\wlserver_10.3\samples\domains\wl_server\jrockit.3684.mdmp Error Message: Unspecified error [52] Exception Rec: EXCEPTION_ACCESS_VIOLATION (c0000005) at 0x0046A7B6 - memory at 0 x00000000 could not be written. Minidump : Wrote mdmp. Size is 452MB SafeDllMode : -1 Fatal Error : As of this writing noone should EVER use native stack unwind exce pt myself. Version : BEA JRockit(R) R27.6.0-50_o-100423-1.6.0_05-20080626-2105-windows -ia32 GC Strategy : Mode: throughput. Currently using strategy: genparpar GC Status : OC is not running. Last finished OC was OC#303. : YC is not running. Last finished YC was YC#349. OC History : Strategy genparpar was used for OC#272 to OC#278. : Strategy singleparpar was used for OC#279. : Strategy genparpar was used for OC#280 to OC#284. : Strategy singleparpar was used for OC#285. : Strategy genparpar was used for OC#286 to OC#303. YC History : Ran 1 YCs before OC#299. : Ran 1 YCs before OC#300. : Ran 1 YCs before OC#301. : Ran 1 YCs before OC#302. : Ran 1 YCs before OC#303. : Ran 2 YCs since last OC. YC Promotion : Last YC successfully promoted all objects Heap : 0x00C00000 - 0x60C00000 (Size: 1536 MB) Compaction : 0x0CC00008 - 0x12C00000 (Current compaction type: internal) Stopping PointBase server... PointBase server stopped. [/code]
求mfc 读写Excel的类,可以支持wps表
之前的操作Excel总是出现wps问题或者创建exce服务器失败,所以想求一个强大点的excel操作类
关于ThreadLocal的一个测试 大神 帮我看下 为什么run方法里面找不到对象 (为了方便 我把他们都写到一个类中)
<div class="iteye-blog-content-contain" style="font-size: 14px;"> <p>直接贴代码了</p> <pre name="code" class="java">package test; public class TestThreadLocal { public static void main(String[] args) { /*ExecutorService exce = Executors.newCachedThreadPool(); for(int i=0;i&lt;10;i++){ exce.execute(new Thread(new TestThread(),"this is thread:"+i)); } exce.shutdown(); } */ //一个公共的对象 TestI testI = new TestI(); //创建一个ThreadLocal来维护这个对象 LocalObject localObject = new LocalObject(); localObject.addTestI(testI); // System.out.println(localObject.getTestI().getI()); for(int i=0;i&lt;10 ;i++){ new Thread(new TestThread(localObject),"this is thread:"+i).start(); } } } class LocalObject{ //创建一个ThreadLocal 用来维护对象TestI private ThreadLocal&lt;TestI&gt; testIocal = new ThreadLocal&lt;TestI&gt;(); public void addTestI(TestI testI){ testIocal.set(testI); } public TestI getTestI(){ return testIocal.get(); } public void doSomeThing(){ getTestI().setI(); } } class TestThread implements Runnable{ private LocalObject localObject ; public TestThread(LocalObject localObject){ this.localObject = localObject; } private int i=10; @Override public void run() { while(this.localObject.getTestI().getI()&gt;0){ this.localObject.doSomeThing(); i--; if(this.localObject.getTestI().getI()!=i){ System.out.println(Thread.currentThread().getName()+"not matched"); } // System.out.println(Thread.currentThread().getName()+"::"+LocalObject.getTestI().getI()); } } } class TestI { private int i=10; public void setI(){ i--; } public int getI(){ return i; } }</pre> <p> 报错是Exception in thread "this is thread:1" java.lang.NullPointerException<br>    at test.TestThread.run(TestThreadLocal.java:75)</p> <p> </p> <p>就是run方法里面找不到对象,但是我通过构造方法注入了一个对象了呀。怎么回事 搞了2天了。。。</p> </div>
相见恨晚的超实用网站
搞学习 知乎:www.zhihu.com 简答题:http://www.jiandati.com/ 网易公开课:https://open.163.com/ted/ 网易云课堂:https://study.163.com/ 中国大学MOOC:www.icourse163.org 网易云课堂:study.163.com 哔哩哔哩弹幕网:www.bilibili.com 我要自学网:www.51zxw
花了20分钟,给女朋友们写了一个web版群聊程序
参考博客 [1]https://www.byteslounge.com/tutorials/java-ee-html5-websocket-example
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
引言 本文主要是记录一下面试字节跳动的经历。 三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
这30个CSS选择器,你必须熟记(上)
关注前端达人,与你共同进步CSS的魅力就是让我们前端工程师像设计师一样进行网页的设计,我们能轻而易举的改变颜色、布局、制作出漂亮的影音效果等等,我们只需要改几行代码,不需...
国产开源API网关项目进入Apache孵化器:APISIX
点击蓝色“程序猿DD”关注我回复“资源”获取独家整理的学习资料!近日,又有一个开源项目加入了这个Java开源界大名鼎鼎的Apache基金会,开始进行孵化器。项目名称:AP...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 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)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
编写Spring MVC控制器的14个技巧
本期目录 1.使用@Controller构造型 2.实现控制器接口 3.扩展AbstractController类 4.为处理程序方法指定URL映射 5.为处理程序方法指定HTTP请求方法 6.将请求参数映射到处理程序方法 7.返回模型和视图 8.将对象放入模型 9.处理程序方法中的重定向 10.处理表格提交和表格验证 11.处理文件上传 12.在控制器中自动装配业务类 ...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
求小姐姐抠图竟遭白眼?痛定思痛,我决定用 Python 自力更生!
点击蓝色“Python空间”关注我丫加个“星标”,每天一起快乐的学习大家好,我是 Rocky0429,一个刚恰完午饭,正在用刷网页浪费生命的蒟蒻...一堆堆无聊八卦信息的网页内容慢慢使我的双眼模糊,一个哈欠打出了三斤老泪,就在此时我看到了一张图片:是谁!是谁把我女朋友的照片放出来的!awsl!太好看了叭...等等,那个背景上的一堆鬼画符是什么鬼?!真是看不下去!叔叔婶婶能忍,隔壁老王的三姨妈的四表...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
相关热词 如何提升c#开发能力 矩阵乘法c# c#调用谷歌浏览器 c# 去空格去转义符 c#用户登录窗体代码 c# 流 c# linux 可视化 c# mvc 返回图片 c# 像素空间 c# 日期 最后一天
立即提问