为什么Assembly.GetType()返回null? [问题点数:20分,结帖人xhwwy]

Bbs1
本版专家分:0
结帖率 100%
Bbs6
本版专家分:5130
Bbs6
本版专家分:8585
Bbs6
本版专家分:5130
Bbs1
本版专家分:31
Bbs1
本版专家分:0
Bbs7
本版专家分:23333
Bbs1
本版专家分:0
Bbs6
本版专家分:5130
Bbs8
本版专家分:30425
Bbs1
本版专家分:0
Bbs8
本版专家分:30425
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Bbs8
本版专家分:30425
Bbs1
本版专家分:0
Bbs7
本版专家分:23333
Bbs7
本版专家分:23333
Bbs1
本版专家分:0
Bbs7
本版专家分:23333
Bbs1
本版专家分:0
Bbs7
本版专家分:23333
Bbs1
本版专家分:99
Bbs1
本版专家分:0
Bbs1
本版专家分:14
求救~~~~~ 太奇怪了 listFiles为什么返回null??
if(one_file.isDirectory())rnrnFile[] test_file=one_file.listFiles();rnrnrnone_file是个文件或文件夹rn调试的时候,one_file的值是“/sdcard/.android_secure”rn然后下一句test_file就是null了,rnlistFiles不是只有当one_file不是文件夹才<em>返回</em>null吗?rnrn这是肿么了??? 一上午的时间都浪费了!rn求救~~~~~
为什么返回的总是null!!求助啊
服务器端代码:rnimport java.io.*;rnimport java.net.*;rnimport java.sql.*;rnpublic class TCPServer连接数据库 rnrnpublic static void main(String[] args) throws IOException rnrnString clientSentence;rnrnServerSocket welcomeSocket = new ServerSocket(54320);rnrnwhile(true)rnrnSocket connectionSocket = welcomeSocket.accept();rnrnBufferedReader inFromClient = new BufferedReader(new InputStreamReader (connectionSocket.getInputStream()));rnrnDataOutputStream outToClient = new DataOutputStream(connectionSocket.getOutputStream());rnrnclientSentence = inFromClient.readLine();rnrnStringrnname = null ;rnrntryrnrn rnrn String url="jdbc:mysql://localhost/testdb";rnrn String user="root";rnrn String pwd="";rnrn rnrn //加载驱动,这一句也可写为:Class.forName("com.mysql.jdbc.Driver");rnrn Class.forName("com.mysql.jdbc.Driver").newInstance();rnrn //建立到MySQL的连接rnrn Connection conn = DriverManager.getConnection(url,user, pwd);rnrn rnrn //执行SQL语句rnrn Statement stmt = conn.createStatement();//创建语句对象,用以执行sql语言rnrn ResultSet rs = stmt.executeQuery("select * from name_table where id="+clientSentence);rnrn //处理结果集rnrn while (rs.next())rnrn rnrn name = rs.getString("name"); rnrn rnrn rs.close();//关闭数据库rnrn conn.close();rnrn rnrn catch (Exception ex)rnrn rnrn System.out.println("Error : " + ex.toString());rnrn rnrnoutToClient.writeBytes(name+'\n');rnrnrnrnrnrnrnrnrnrnrnrn客户端:rnimport java.io.*;rnimport java.net.*;rnpublic class TCPClient rnrnrnpublic static void main(String[] args) throws IOException, IOException rnrn// TODO 自动生成的方法存根rnrnString sentence;rnrnString modifiedsentence;rnrnSystem.out.println("To server:");rnrnBufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));rnrnSocket clientSocket = new Socket("127.0.0.1", 54321);rnrnPrintWriter outToServer = new PrintWriter(clientSocket.getOutputStream());rnrnBufferedReader inFormServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));rnrnsentence = inFromUser.readLine();rnrnwhile(!sentence.equals("stop"))rnrnoutToServer.println(sentence);rnrnoutToServer.flush();rnrnSystem.out.println("To server:"+sentence);rnrnmodifiedsentence = inFormServer.readLine();rnrnSystem.out.println("from server:"+modifiedsentence);rnrnsentence=inFromUser.readLine();rnrnrnrnclientSocket.close();rnrnrnrnrnrnrn
求助:我调用 createImage 为什么返回 null?
我定义了一个类,它继承了 Frame。其中有一个函数,它调用了 createImage,如下所示:rnclass MyFrame extends Framernrn..................rnrn public int TestIt()rn rn Image a;rnrn a=createImage(40,64);rn .............rn rn...............rnrn我在 Applet1 (一个继承 Applet 的类)里创建了 MyFrame ,并调用 TestIt,如下:rnclass Applet1 extends Appletrnrn MyFrame x;rnrn public init()rn rn x=new MyFrame("XYZ");rn .........rn rn public paint(Graphics g)rn rn x.TestIt();rn ..........rn rn...........rnrnrn我发现,x.TestIt() 进入后,createImage(40,64)<em>返回</em> null,rn而把 createImage(40,64) 拿到 paint 里来执行,就没问题。rn怎么回事?rn
为什么总是返回NULL">CRuntimeClass::CreateObject("CMyClass") 为什么总是返回NULL
向高手请教:rn<em>为什么</em>CRuntimeClass::CreateObject("CMyClass") 总是<em>返回</em>NULL,rn已经向 CMyClass 中加入了 DECLARE_DYNCREATE(CMyClass) 和 IMPLEMENT_DYNCREATE(CMyClass, CObject)
int apache下PropertyUtils.getWriteMethod()为什么返回null
rnrn```rnpublic class A implements java.io.Serializable rnrn private static final long serialVersionUID = 1L;rnrn private int id;rnrn public int getId() rn return id;rn rnrn public void setId(int id) rn this.id = id;rn rnrnrn```rn```rn public static void main(String[] args) rn A a = new A();rn PropertyDescriptor[] e = PropertyUtils.getPropertyDescriptors(a);rn System.out.println(e[0].getWriteMethod()); // nullrn rn```rn以上(Integer也一样),<em>为什么</em>使用反射,这个方法<em>返回</em>null,其他类似:String,long,java.util.Date类似的都没有<em>返回</em>null,有研究的前辈指点后生一下,在线等!不胜感激!
在线等,createImage()为什么返回null?
public class Frame1 extends JFramernrnJPanel contentPane;rnImage image1;rnBorderLayout borderLayout1 = new BorderLayout();rnrn//Construct the framernpublic Frame1()rnrnenableEvents(AWTEvent.WINDOW_EVENT_MASK);rntryrnrnrnimage1=createImage(16,32);rnrnif(image1==null)rnrnSystem.out.println("create a null");rnSystem.exit(-1);rnrnjbInit();rnrncatch(Exception e)rnrne.printStackTrace();rnrnrnrn<em>为什么</em>createImage()运行的时侯总是<em>返回</em>null?
为什么AjaxPro操作数据库时返回null
----.cs------rn [AjaxPro.AjaxMethod]rn public bool PublishTopic()rn rn return CommonSql.ExecuteNonQuery("P_System_Config_UpdateVisitor");rn rnrn----.js------rnfunction LeaveWord_CallBack(ref) rn alert(ref.value);rn //ifrLeaveWord.window.location.reload();rn //$("Form1").reset();rnrnrn----ExecuteNonQuery----rn/// rn /// 执行不<em>返回</em>结果的 SQL 存储过程rn /// rn /// SQL 存储过程rn public bool ExecuteNonQuery(string sql)rn rn tryrn rn SqlCommand command = Conn.CreateCommand();rn command.CommandType = CommandType.StoredProcedure;rn command.CommandText = sql;rn Conn.Open();rn command.ExecuteNonQuery();rn return true;rn rn catch (Exception ex)rn rn string message = ex.Message;rn return false;rn rn finallyrn rn Conn.Close();rn rn rnrn设置了断点做调试,发现根本就没有执行ExecuteNonQuery方法,直接<em>返回</em>了null,如果改成rnpublic bool PublishTopic()rn rn return true;rn rn就可以<em>返回</em>truernrn第一次用AjaxPro操作数据库,郁闷死了
为什么一个ListCtrl的GetSafeHwnd总是返回NULL?
我在一个Dialog中加了一个CListCtrl,然后用该Dialog做成了一个Viewrn想在OnSize中实现自动的伸缩,但是CListCtrl的GetSafeHwnd总是<em>返回</em>NULLrnrn<em>为什么</em>?
GetProcAddress()为什么返回NULL值?
//build a DLL projectrn//fun.cpprn#include rnrnextern "C" __declspec(dllexport) void fun(void)rnrn cout<<<
为什么CListCtrl的GetSafeHwnd总是返回NULL
我在一个对话框里加了一个tab控件,在控件上放了一个list ctronal用m_nlistLSDHDJ->GetSafeHwnd()时,总<em>返回</em>NULLrnrn是什么原因?
求救,为什么我的LoadMenu返回NULL!
#include rn#include "resource.h"rnrnrnLRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);rnrnHINSTANCE hInst;rnTCHAR szAppName[] = TEXT("PopMenu");rnrnint WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevlnstance, PSTR szCmdShow, int iCmdShow)rnrn HWND hwnd;rn MSG msg;rn WNDCLASS wndclass;rnrn wndclass.style = CS_HREDRAW | CS_VREDRAW;rn wndclass.lpfnWndProc = WndProc;rn wndclass.cbClsExtra = 0;rn wndclass.cbWndExtra = 0;rn wndclass.hInstance = hInstance;rn wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);rn wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);rn wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);rnrn//如果下面的这行代码的NULL改成MAKEINTRESOURCE(POPMENU),就出现菜单,说明POPMENU没问题rnrn wndclass.lpszMenuName = NULL;rn wndclass.lpszClassName = szAppName;rn rn if(!RegisterClass(&wndclass))rn rn MessageBox(NULL, TEXT("This program requires Windows NT!"),rn szAppName, MB_ICONERROR);rn return 0;rn rnrn hInst = hInstance;rnrn hwnd = CreateWindow(szAppName, TEXT("Popup Menu Demonstration"),rn WS_OVERLAPPEDWINDOW,rn CW_USEDEFAULT, CW_USEDEFAULT,rn CW_USEDEFAULT, CW_USEDEFAULT,rn NULL, NULL, hInstance, NULL);rnrn ShowWindow(hwnd, iCmdShow);rn UpdateWindow(hwnd);rnrn while(GetMessage(&msg, NULL, 0, 0))rn rn TranslateMessage(&msg);rn DispatchMessage(&msg);rn rn return msg.wParam;rnrnrnLRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)rnrn static HMENU hMenu;rn static int idColor[5] = WHITE_BRUSH, LTGRAY_BRUSH, GRAY_BRUSH,rn DKGRAY_BRUSH, BLACK_BRUSH;rn static int iSelection = IDM_BKGND_WHITE;rn POINT point;rnrn switch(message)rn rn case WM_CREATE:rnrn //问题在这里,跟踪发现hInst非空,POPMENU也没问题(前面有个小测试),但是hMenu为NULL,错误为无法计算表达式的值。rnrn hMenu = LoadMenu(hInst,MAKEINTRESOURCE(POPMENU));rn hMenu = GetSubMenu(hMenu, 0);rn return 0;rn rn case WM_RBUTTONUP:rn point.x = LOWORD(lParam);rn point.y = HIWORD(lParam);rn ClientToScreen(hwnd, &point);rnrn TrackPopupMenu(hMenu, TPM_RIGHTBUTTON, point.x, point.y,rn 0, hwnd, NULL);rn return 0;rnrn case WM_COMMAND:rn switch(LOWORD(wParam))rn rn case IDm_FILE_NEW:rn case IDM_FILE_OPEN:rn case IDM_FILE_SAVE:rn case IDM_FILE_SAVE_AS:rn MessageBeep(0);rn return 0;rnrn case IDM_APP_EXIT:rn SendMessage(hwnd, WM_CLOSE, 0, 0);rn return 0;rnrn case IDM_EDIT_UNDO:rn case IDM_EDIT_CUT:rn case IDM_EDIT_COPY:rn case IDM_EDIT_PASTE:rn case IDM_EDIT_CLEAR:rn MessageBeep(0);rn return 0;rnrn case IDM_BKGND_WHITE:rn case IDM_BKGND_LTGRAY:rn case IDM_BKGND_GRAY:rn case IDM_BKGND_DKGRAY:rn case IDM_BKGND_BLACK:rnrn CheckMenuItem(hMenu, iSelection, MF_UNCHECKED);rn iSelection = LOWORD(wParam);rn CheckMenuItem(hMenu, iSelection, MF_CHECKED);rnrn SetClassLong(hwnd, GCL_HBRBACKGROUND, (LONG)rn GetStockObject(idColor[LOWORD(wParam) - IDM_BKGND_WHITE]));rnrn InvalidateRect(hwnd, NULL, TRUE);rn return 0;rnrn case IDM_APP_HELP:rn MessageBox(hwnd, TEXT("Help not yet implemented!"),rn szAppName, MB_ICONINFORMATION | MB_OK);rn return 0;rnrn case IDM_APP_ABOUT:rn MessageBox(hwnd, TEXT("Menu Demonstration Program \n")rn TEXT("(c)Charles Petzold, 1998"),rn szAppName, MB_ICONINFORMATION | MB_OK);rn return 0;rn rn rn break;rnrn case WM_DESTROY:rn PostQuitMessage(0);rn return 0;rn rn return DefWindowProc(hwnd, message, wParam, lParam);rnrnrn各位大侠帮忙看一下,谢谢了
这段代码为什么返回null
[code=HTML]rnrnrn rn 无标题文档rn rnrnrnrn rn rnrnrn[/code]
为什么我的GetControlUnknown()总是返回NULL
我用VC6作EXCEL2000的二次开发,在我的程序的一个对话框要使用其他第三方的ActiveX控件,我把以前在MFC下的程序照搬过来(当然,以前的没问题),实例代码如下:rnrn HWND hwndTree = GetDlgItem(IDC_FGTREE);//指向ActiveX控件1rn HWND hwndList = GetDlgItem(IDC_FGLIST);//指向ActiveX控件2rnrn CWnd wndList;rn wndList.Attach(hwndList);rnrn CWnd wndTree;rn wndTree.Attach(hwndTree);rnrn IUnknown *spTree = wndTree.GetControllingUnknown();//GetControlUnknown();rn IUnknown *spList = wndList.GetControllingUnknown();//GetControlUnknown();rn rn调试过程中,发现无论使用GetControlUnknown()还是GetControllingUnknown(),<em>返回</em>的IUnknown指针都是NULL,我要用这个指针,怎么办呀?哪位高手请指点,谢谢!
Camera.open()返回一直为null是为什么
[code=java]import android.hardware.Camera;rnimport android.os.Bundle;rnimport android.app.Activity;rnimport android.view.Menu;rnimport android.view.SurfaceHolder;rnimport android.view.SurfaceView;rnimport android.view.View;rnimport android.view.View.OnClickListener;rnimport android.widget.Button;rnrnpublic class MainActivity extends Activity implements SurfaceHolder.Callbackrnrn Camera camera;rn SurfaceView surfaceView;rn SurfaceHolder surfaceHolder;rn Button btnOpen;rn Button btnClose;rn Boolean isPreview=false;rn @Overridern protected void onCreate(Bundle savedInstanceState)rn rn super.onCreate(savedInstanceState);rn setContentView(R.layout.activity_main);rn surfaceView=(SurfaceView)findViewById(R.id.surfaceView);rn rn btnOpen=(Button)findViewById(R.id.open);rn btnClose=(Button)findViewById(R.id.close);rn surfaceHolder=surfaceView.getHolder();rn surfaceHolder.addCallback(this);rn btnOpen.setOnClickListener(new OnClickListener()rn rn @Overridern public void onClick(View v)rn rn // TODO Auto-generated method stubrn initCamera();rn rn );rn btnClose.setOnClickListener(new OnClickListener()rn rn @Overridern public void onClick(View v)rn rn // TODO Auto-generated method stubrn if (camera!=null && isPreview)rn rn camera.stopPreview();rn camera.release(); rn camera=null;rn isPreview=false;rn rn rn );rn rn rn public void initCamera()rn if (!isPreview)rn rn camera=Camera.open();rn rn if (camera!=null && !isPreview)rn rn tryrn rn camera.setPreviewDisplay(surfaceHolder);rn camera.startPreview();rn catch (Exception e)rn rn // TODO: handle exceptionrn e.printStackTrace();rn rn isPreview=true;rn rn rnrn @Overridern public boolean onCreateOptionsMenu(Menu menu)rn rn // Inflate the menu; this adds items to the action bar if it is present.rn getMenuInflater().inflate(R.menu.main, menu);rn return true;rn rnrn @Overridern public void surfaceCreated(SurfaceHolder holder)rn rn // TODO Auto-generated method stubrn rn rnrn @Overridern public void surfaceChanged(SurfaceHolder holder, int format, int width, int height)rn rn // TODO Auto-generated method stubrn rn rnrn @Overridern public void surfaceDestroyed(SurfaceHolder holder)rn rn // TODO Auto-generated method stubrn rn rnrnrn[/code]rn权限[code=java] rn rn [/code]
为什么GetEditCtrl().GetHandle()总是返回NULL?
CEdit& CMyCtlEdit::GetEditCtrl() constrn return *(CEdit*)this;rnrnrnrnHLOCAL hOldText = GetEditCtrl().GetHandle();rnASSERT(hOldText != NULL);//过不去,<em>为什么</em>?总是NULL值
JSP 插入数据为什么ResultSet总是返回null
这是我的循环插入的语句rn for(i=0;i
为什么我的bean总是返回null呀?
代码为:rnpackage checkUser;rnrnimport pub.dbBean;rnimport java.sql.*;rnrnpublic class checkUserBean rn public checkUserBean()rn rn public String checkUser(String userName,String userPass)rn rn String checkInfo="";rn if(userName!="")rn tryrn dbBean dbo=new dbBean();rn String sql="SELECT * FROM foa_WebPurview WHERE f_UserName='"+userName+"'";rn ResultSet rs=dbo.executeQuery(sql);rn if (rs.next()) rn sql="SELECT * FROM foa_WebPurview WHERE f_UserName='"+userName+"' AND f_UserPass='"+userPass+"'";rn rs=dbo.executeQuery(sql);rn if (rs.next()) rn checkInfo="userok";rn rn else rn checkInfo="密码输入错误!";rn rn rn elsern checkInfo="用户名不存在!";rn rn rn catch(Exception e)rnrn rn return checkInfo;rn rn rn我调用这个bean总是<em>返回</em>null,并且在控制台显示:rnOpenDB.executeQuery();[Microsoft][ODBC SOL Server Driver]rn[SOL Server]列名'系统管理员'无效。其中有两个字乱码!
为什么返回null">请看Type.GetType("System.Windows.Forms.Form")为什么返回null
请看Type.GetType("System.Windows.Forms.Form")<em>为什么</em><em>返回</em>null
BitmapFactory.decodeByteArray 函数有bug?为什么返回null
开发环境Android studiornrn电脑中的MySQL中的一个表的每个字段由 Windows C#程序读取,C#用socket TCP发给局域网的安卓手机。rn字符串和double已经成功发送并且在手机真机成功显示。rnrn最后一个要发送的是图片,图片的大小已经成功发送和接收。手机收到大小以后就new 相应大小的 byte[]。rn手机读取socket TCP缓冲区的 byte[] 后调用 rnBitmap tupian = BitmapFactory.decodeByteArray(bImage, 0, bImage.length);rn单步调试显示 tupian 变量为null,网上说 decodeByteArray 函数有bug,不知道是否还有其他方法。rn[img=https://img-bbs.csdn.net/upload/201612/23/1482460470_242658.png][/img]rnrnrnrn接收图片之后要存放到 Map 中:rn[code=java]Map map = new HashMap();rn map.put("图片", tupian);rn map.put("分类", strFenLei);rn map.put("名称", strMingCheng);rn map.put("价格", strJiaGe);rn datalist.add(map);[/code]rnrn一个 map 是一个item,item是 ListView 中的一项。 item 中显示图片的是 ImageView。暂时不知道 ImageView 是否能显示 Bitmap,因为在生成 Bitmap 的时候<em>返回</em>了null
AjaxPro.Method调用为什么总是返回null
我刚学asp.net,看个程序用到了AjaxPro,可是我一调试,所有AjaxPro.Method的调用全都<em>返回</em>null,也不报错...我都晕了,请各位帮帮我啊.rnrnweb里我也设置里:rnrnrnrnrnrnDefault.aspx.cs里我也设置了rnAjaxPro.AjaxNamespace("xkziBook")]rnpublic partial class _Default : System.Web.UI.Pagernrn protected void Page_Load(object sender, EventArgs e)rn rn AjaxPro.Utility.RegisterTypeForAjax(typeof(_Default));rn rn rn[AjaxPro.AjaxMethod]rn public bool userLogin(string pass)rn rn return false;rn rn..........rnrnrnrnDefault.aspx的js里我为了查看值如下写的:rnalert(xkziBook.userLogin().value);rn可是怎么搞它都<em>返回</em>null ,<em>为什么</em>啊?
not (2 < null) 返回为什么是false?
rtrnrn简单的问题
IAccessible.accSelection怎么用,为什么返回总是null
c# 查看ListView列表中被选中的项目,总是<em>返回</em>null
为什么pcap_next()函数老是返回NULL
刚开始学习用libpcap在ubuntu下抓包。rn下面是参考资料写的一段小程序,其中pcap_next()函数老是<em>返回</em>NULL值,抓不到数据包。rn运行程序时另一个控制台开着ping命令。rnrnrn程序的代码如下:rnrnrnrn/*test.c*/rn#includern#includern#includern#includern#includern#includern#includern#includern#includernrnint main(int argc,char **argv)rnrn int i;rn char *dev;rn char errbuf[PCAP_ERRBUF_SIZE];rn pcap_t *descr;rn const u_char *packet;rn struct pcap_pkthdr hdr;//the head of durn rnrn /*获取网络设备*/rn dev=pcap_lookupdev(errbuf);rn if(dev==NULL)rn rn printf ("%s\n",errbuf); rn exit(1);rn rn printf("DEV:%s\n",dev); rnrnrn /*打开网卡*/rn descr=pcap_open_live(NULL,BUFSIZ,1,-1,errbuf); rn if(descr==NULL) rn rn printf("Pcap_open_live():%s\n",errbuf); rn exit(1);rn rnrnrn /*捕获数据包*/rn packet=pcap_next(descr,&hdr);rn if(packet==NULL)rn rn printf("[color=#FF0000]Didn't grab packet[/color]\n");rn exit(1);rn rn rn printf("Grabbed packet of length%d\n",hdr.len); rn return 0;rnrnrnrnrnrn运行结果如下:rnrnhit@ubuntu:~/Documents$ gcc -o test -g test.c -lpcaprnhit@ubuntu:~/Documents$ sudo ./test rnDEV:eth0rn[color=#FF0000]Didn't grab packet[/color]rnhit@ubuntu:~/Documents$ rnrn求解答!!!rn
SELECT @@IDENTITY AS 'Identity'为什么返回的是NULL???
我在SQL里面执行下面的语句,每次都能正确插入,但是SELECT @@IDENTITY AS 'Identity'却<em>返回</em>的是NULLrnrn请高手讲解一下<em>为什么</em>,谢谢!!rnrnINSERT INTO Account (UserId,Email,FirstName,LastName,Addr1,City,State,zip,Country,phone)rnVALUES ('2222','Accountant','12','aaaa','aa','a','dd','ddd','dd','sss')rnSELECT @@IDENTITY AS 'Identity'
为什么加了数据库操作后AjaxPro返回null
[AjaxPro.AjaxMethod]rn public string GetServer()rn rn string name = "";rn string conn_str = "provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath(".") + "\\App_Data\\cc.mdb";rn //String sql = "select top 1 * from [test] ";rn //OleDbConnection conn = new OleDbConnection(conn_str);rn //OleDbCommand cmd = new OleDbCommand(sql, conn);rn //conn.Open();rn //OleDbDataReader reader = cmd.ExecuteReader();rn //if (reader.Read())rn //rn // name = reader["id"].ToString();rn //rn //reader.Close();rn //conn.Close();rnrnrn return "hello";rn rn rnrn把上面的数据库操作注释后,可以获得hello,取消注释就null了rnrn<em>为什么</em>
为什么我的SetWindowsHookEx总是返回NULL
//.EXErn DWORD dwThreadId = GetWindowThreadProcessId(m_hWnd,NULL);//获得自身进程ID rn InstallHook(TRUE,dwThreadId); rnrnrnrn//.DLLrnrn#pragma data_seg("Shared") rnHMODULE hmodDll=NULL; rnHHOOK hHook=NULL; rnrn#pragma data_seg() rnrnrnvoid __declspec(dllexport) WINAPI InstallHook(BOOL IsHook,DWORD dwThreadId) rn rn hHook =NULL;rn if(IsHook) rn rn hHook=SetWindowsHookEx(WH_GETMESSAGE,(HOOKPROC)GetMsgProc,hmodDll,dwThreadId); rn DWORD dwErr = GetLastError();rn //GetProcAddress(GetModuleHandle("GDI32.dll"),"ExtTextOutA"):取得要钩的函数在所在dll中的地址 rnrn HookAllAPI(_T("GDI32.dll"),GetProcAddress(GetModuleHandle(_T("GDI32.dll")), "TextOutW"),(PROC)&H_TextOutW,NULL); rn HookAllAPI(_T("GDI32.dll"),GetProcAddress(GetModuleHandle(_T("GDI32.dll")), "TextOutA"),(PROC)&H_TextOutA,NULL); rn rnrn============================================rn每次跟踪到这里,SetWindowsHookEx都<em>返回</em>的NULL(unused = CXX0030: 错误: 无法计算表达式的值)rndwErr 的值为0
为什么GetToolBarCtrl().GetToolTips()返回为NULL?
int CXXXToolBar::OnCreate(LPCREATESTRUCT lpCreateStruct)rnrn if (CToolBar::OnCreate(lpCreateStruct) == -1)rn return -1;rnrn CToolTipCtrl* pTTC=GetToolBarCtrl().GetToolTips();rn pTTC->ModifyStyle(NULL,TTS_BALLOON);rnrn return 0;rnrn前提:工具栏是带有Tips的。rn上面的代码pTTC居然为NULL,难道GetToolTips()<em>返回</em>的是用SetToolTips()设置的值。那原本CToolBar的CToolTipsCtrl*如何得到呢?
为什么在mysql_query()返回成功后,mysql_store_result()有时返回NULL?
有可能在一个对mysql_query()成功的调用后,mysql_store_result()<em>返回</em>NULL。当这发生时,它意味着出现了下列条件之一: 有一个malloc()失败(例如,如果结果集合太大)。 数据不能被读取(发生在连接上的一个错误)。 查询没有<em>返回</em>数据(例如,它是一个INSERT、UPDATE或DELETE)。 你总是可以通过调用mysql_field_c
请问大大们,Assembly.GetType的问题
请问以下代码的功能rnrn[code=C#]static void InjectExtension(Type extension)rn rn Assembly assBase;rn Type webServiceConfig;rn object currentProp;rn PropertyInfo propInfo;rn object[] value;rn Type myType;rn object[] objArray;rn object myObj;rn FieldInfo myField;rnrn tryrn rn assBase = typeof(SoapExtensionAttribute).Assembly;rn webServiceConfig =rn assBase.GetType("System.Web.Services.Configuration.WebServicesConfiguration");rnrn if (webServiceConfig == null)rn throw new Exception("Error ...");rnrn currentProp = webServiceConfig.GetProperty("Current",rn BindingFlags.NonPublic | BindingFlags.Static |rn BindingFlags.Instance | BindingFlags.Publicrn ).GetValue(null, null);rn propInfo = webServiceConfig.GetProperty("SoapExtensionTypes",rn BindingFlags.NonPublic | BindingFlags.Static |rn BindingFlags.Instance | BindingFlags.Publicrn );rn value = (object[])propInfo.GetValue(currentProp, null);rn myType = value.GetType().GetElementType();rn objArray = (object[])Array.CreateInstance(myType, (int)value.Length + 1);rn Array.Copy(value, objArray, (int)value.Length);rnrn myObj = Activator.CreateInstance(myType);rn myField = myType.GetField("Type",rn BindingFlags.NonPublic | BindingFlags.Static |rn BindingFlags.Instance | BindingFlags.Publicrn );rn myField.SetValue(myObj, extension,rn BindingFlags.NonPublic | BindingFlags.Static |rn BindingFlags.Instance | BindingFlags.Public | BindingFlags.SetField,rn null, nullrn );rn objArray[(int)objArray.Length - 1] = myObj;rn propInfo.SetValue(currentProp, objArray,rn BindingFlags.NonPublic | BindingFlags.Static |rn BindingFlags.Instance | BindingFlags.Public | BindingFlags.SetProperty,rn null, null, nullrn );rn rn catch (Exception e)rn rn e = e;rn rn [/code]rnrn其中我这边调试下来:rn[color=#999999]Assembly assBase;rnassBase = typeof(SoapExtensionAttribute).Assembly;rnrnassBase.GetType("System.Web.Services.Configuration.WebServicesConfiguration");rnrnGetType<em>返回</em> Null, [/color]rn[color=#FF0000](WebServices 端 为简单的<em>返回</em>字符串的范例,WebServices 手工添加正常,以上代码是在客户端动态生成的部分代码)[/color]rnrn请问,怎么样才能让assBase.GetType("System.Web.Services.Configuration.WebServicesConfiguration") 有<em>返回</em>值。谢谢
malloc返回null 急!!
#includern#includern#includernrntypedef struct studentrnrnstruct student *Next;rnchar Name[10];rnlong ID; //学号rnint Class;rnenum sexsM,WSex;rnstruct Daternrnint Year;rnint Month;rnint Day;rnBirthday;rnchar Phonenum[12];rnstruct scorernrnint Chinese;rnint Math;rnint English;rnfloat Average;rnScores;rnstud;rntypedef stud* studpt;rnrnstudpt Insert(studpt T)rnrnstudpt Tmp=NULL,Add=NULL;rnchar select;rnAdd=malloc(sizeof(stud)); //就这里出错!!一直<em>返回</em>null?什么原因啊?rnif(Add==NULL);rnrnprintf("Create memory space error!\n");rnreturn T;rnrnAdd->Next=NULL;rndornrnselect=InputImf(Add);rnwhile(select=='N'||select=='n');rnif(select=='e'||select=='E')rnrnfree(Add);rnprintf("Insert gave up!\n");rnreturn T;rnrnif(select!='y'||select!='Y')rnrnprintf("Wrong input! Exit!\n");rnfree(Add);rnreturn T;rnrnTmp=T;rnif(T->ID>Add->ID)rnrnTmp=Add;rnAdd->Next=T;rnrnelsernrnwhile(T->Next)rnrnif(T->Next->ID=Add->ID)rnrnAdd->Next=T->Next;rnT=Add;rnbreak;rnrnT=T->Next;rnrnif(Add->Next==NULL)rnT->Next=Add;rnrnprintf("Insert success!\n");rnreturn Tmp;rnrnrnvoid main ()rnrn int functionnum =0;rnstudpt T = NULL,p=NULL,head=NULL;rnT=Insert( T);rn head=T;p=T->Next;rnwhile(p)rnrnT=p->Next;rnfree(p);rnp=T->Next;rnrnif(head!=NULL)rnfree(head);rnrn
AVIStreamGetFrameOpen总是返回NULL
我用二进制打开AVI文件以后发现AVI视频的图像是MJPG格式的,现在我想用API函数来播放这个AVI文件,写好的代码播放没压缩的AVI是可以的,但是播放这个视频图像是MJPG格式时就出了问题,跟踪以后发现是AVIStreamGetFrameOpen总是<em>返回</em>NULL下面是我的代码rn PAVIFILE pfile; //avi文件打开对象rn AVIFILEINFO pfi; //文件信息rn AVISTREAMINFO aviStrInfo;rn PAVISTREAM pavi; //流信息rn PGETFRAME pgf; //帧信息rn AVIFileInit();rn AVIFileOpen(&pfile,path,OF_READ | OF_SHARE_EXCLUSIVE,NULL);rn AVIFileInfo(pfile,&pfi,sizeof(AVIFILEINFO));rn AVIFileGetStream(pfile,&pavi,streamtypeVIDEO,0);rn[color=#FF0000] pgf = AVIStreamGetFrameOpen(pavi, NULL);//总是<em>返回</em>NULL[/color]rn if(NULL == pgf)rn rn AVIStreamRelease(pavi);rn return NULL;rn rn lp=(BYTE *)AVIStreamGetFrame(pgf,shownum);//提取第m_nowshow帧 由于前面<em>返回</em>NULL,接下来的代码就不运行rn if(NULL == lp)rn rn AVIStreamGetFrameClose(pgf);rn AVIStreamRelease(pavi);rn return NULL;rn rn请高手指点一下,不知道的也请帮顶一下,谢谢啦~~果有描述的不清楚的地方请尽管指出来,我尽力再说详细些~rn
CComboBoxEx SetImageList 返回NULL
CImageList *pImageList=new CImageList;rn pImageList->Create(16, 16, ILC_COLORDDB|ILC_MASK, 0, 1);rn HBITMAP hBitMap;rn CBitmap *pBitMap;rn hBitMap=LoadALLPIC("res\\image044.jpg");rn pBitMap=new CBitmap;rn pBitMap->Attach(hBitMap);rn pImageList->Add(pBitMap,RGB(0,0,0));rn //delete pBitMap;rn CImageList* a=m_ExBox.SetImageList(pImageList);rna==NULL,这是怎么回事,rnpImageList->Create(16, 16, ILC_COLORDDB|ILC_MASK, 0, 1);rn这个Create函数应该如何设置,是不是这个函数的问题导致的,rn我的图片是jpg的,多少色的我也不清楚,怎么知道是多少色的呢?rn
返回null">classload.getResource("/")没有返回null
当我的项目中添加了nalipay-sdk-java20150407220053.jarn这个jar包时,n使用类加载器的getResource("/")方法里,n竟然可以得到路径,当我去掉这个jar包时n就是<em>返回</em>的null,网上的资料都说这样时只会<em>返回</em>null的;n抱歉没有C币了n![图片说明](https://img-ask.csdn.net/upload/201508/13/1439477813_588768.png)
GetCapture总返回NULL
问题如[url=http://topic.csdn.net/u/20081015/22/0d70dace-e38e-4537-bc2f-a288702dc937.html?23340]http://topic.csdn.net/u/20081015/22/0d70dace-e38e-4537-bc2f-a288702dc937.html?23340[/url]rnrn但是后面的回答没有回答到点上,仍然不能解决问题。不知道<em>为什么</em>LZ觉得“已解决”。我的疑问是:rnrn我知道GetCapture是怎么工作的,但问题是,鼠标在窗口A,它的事件就应该被窗口A捕获,对不对?那么在窗口A中点击时,应该<em>返回</em>的是窗口A对不对?那<em>为什么</em><em>返回</em>是NULL?rn我今天刚好遇到了这个问题,非常郁闷。先SetCapture一次,没有问题,在任何地方都能正常<em>返回</em>窗口A;但如果不SetCapture,在任何地方都<em>返回</em>NULL!至少在窗口A中应该<em>返回</em>窗口A对吧?
FindResource返回NULL
我在主程序添加一个窗体(例如Clogin LoginDlg ),然后想利用LoginDlg.DoModal()去显示这个窗。当利用主程序中的成员函数去调用LoginDlg.DoModal()。是可以显示LoginDlg窗体的。但我的主程序里有个回调函数。我想在该回调函数里利用LoginDlg.DoModal()去显示LoginDlg窗体,却显示不出来。我跟踪到DoModal()函数中去发现,DoModal()里面的HRSRC hResource = ::FindResource(hInst, m_lpszTemplateName, RT_DIALOG);<em>返回</em>的是NULL。所以显示不出来。这将如何解决,谢谢!
select @@identity返回null
用的微软企业库rn三层架构 最后调用DAL里的SaveUser方法 <em>返回</em>不了@@identity rnrn[color=#FF0000]可是我把完全相同的代码重新复制到一个新的项目(同一解决方案里),为了方便测试用的winform项目。然后再执行就<em>返回</em>出结果了 <em>为什么</em>在网站项目里他就null呢[/color]rnrn[code=C#]rnrn public int SaveUsers(Users users)rn rn using (IDbConnection conn = db.CreateConnection())rn rn conn.Open();rn IDbTransaction trans = conn.BeginTransaction();rn string sql = string.Format("insert into [Users](username,Password,Tel,Address,level,alipay,reg_leave) values ('0','1','2','3','4','5','6');select @@identity", users.UserName, users.PassWord, users.Tel, users.Address, "1", users.Alipay, users.RegLeave);rn return Convert.ToInt32(db.ExecuteScalar(CommandType.Text, sql));rn rn rn[/code]
fopen返回NULL
以下是代码rn求解<em>为什么</em>会fopen<em>返回</em>NULL;rn#include rn#include rn#include rn#include rn#include rnrn#define TURE 1rnrn#define LOCAL_SERVER_PORT 5866rn#define MAX_MSG 1024rnrnint main(void)rnrn int n, fd;rn socklen_t cli_addr_len;rn char buf[MAX_MSG] = 0;rn unsigned long int npak=0;rn struct sockaddr_in servaddr, cliaddr;rn FILE *fp;rn int KZ=0;rn int sendbufsize,recvbufsize;rn int size=4;rnrn printf("n%20 printf or 1 printf or no printf(2/1/0)?");//多少个包打印一次rn scanf("%d", &KZ);rn printf("stat:\n");rn if((fp=fopen("udp.dat", "wb")) == NULL)rn rn printf("error - open file.");rn return 0;rn rn if((fd = socket(AF_INET, SOCK_DGRAM, 0)) == -1)rn rn printf("socket error!\n");rn exit(0);rn rnrn servaddr.sin_family = AF_INET;rn servaddr.sin_addr.s_addr = htonl(INADDR_ANY);rn servaddr.sin_port = htons(LOCAL_SERVER_PORT);rn bind(fd, (struct sockaddr *)&servaddr, sizeof(servaddr));rnrn //设置系统缓冲区大小rn size = sizeof(int);rn recvbufsize = 0;rn if(getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void *)&recvbufsize, &size) == 0)rn printf("recvbufsize = %d\n", recvbufsize);rn recvbufsize = 128*1024;rn if(setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void *)&recvbufsize, sizeof(int)) == 0 )rn printf("recvbufsize = %d\n", recvbufsize);rn if(getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void *)&recvbufsize, &size) == 0)rn printf("recvbufsize = %d\n", recvbufsize);rnrnrn while(TURE)rn rn cli_addr_len = sizeof(cliaddr);rn n =recvfrom(fd, buf,MAX_MSG, 0, (struct sockaddr *)&cliaddr, &cli_addr_len);//接收数据rn npak++;rn if((KZ==2) && !(npak%20))rn printf("%d\n", npak);rn else if(KZ == 1)rn printf("%d\n", npak);rn fwrite(buf, MAX_MSG, 1, fp);//写硬盘,每一个包一写rn rn fclose(fp);rn return 0;rn
AjaxPro执行返回null
.csrn[code=C#]rnpublic static int flag = 0;rn protected void Page_Load(object sender, EventArgs e)rn rn AjaxPro.Utility.RegisterTypeForAjax(typeof(admin_admin_News));rn if (!IsPostBack)rn rn BindNewsClassData();rn SetBind("");rn rn rn [AjaxPro.AjaxMethod(AjaxPro.HttpSessionStateRequirement.ReadWrite)]rn public int News_Orders()rn rn if(flag == 0)rn rn flag = 1;rn SetBind("P_Name desc,");rn rn elsern rn flag = 0;rn SetBind("P_Name asc,");rn rn return flag;rn rn[/code]rnrn.aspxrn[code=HTML]function sufun()rnrn alert(admin_admin_News.News_Orders().value);rn alert("222");rn [/code]rn执行后弹出null然后又弹出222rn怎么办?
使用gethostbyname返回NULL
我使用gethostbyname来获得IP地址,但是总是<em>返回</em>NULL,请问怎么回事?rn补充,我已经设置了DNS,并且能够成功ping 域名
读取通讯录返回NULL
Cursor cursor=c.getContentResolver().query(Contacts.People.CONTENT_URI,null,null,null,null);rn while(cursor.moveToNext())rn nameFieldColumnIndex = cursor.getColumnIndexOrThrow(Contacts.People.NAME);rn name = cursor.getString(nameFieldColumnIndex);rn numberFieldColumnIndex = cursor.getColumnIndexOrThrow(Contacts.People.NUMBER);rn number1 = cursor.getString(numberFieldColumnIndex); rn //System.out.println(name); rn // System.out.println(number1);rn if(number1==null)rn Toast.makeText(c, name+"请求跟踪", Toast.LENGTH_LONG).show(); rn System.out.println("reach");rn rn rn rn 通讯录里放了两个人:shen 5556;dergin 1234 以上代码运行number1为null 名字打印出来为shen,dergin,[b]<em>为什么</em>没号码?
this.locationManager.getLastKnownLocation(provider);返回null
[code=java]rnthis.locationManager=(LocationManager)this.getSystemService(Context.LOCATION_SERVICE);rn List pStrings=this.locationManager.getProviders(true);rn if (pStrings.contains(LocationManager.GPS_PROVIDER)) rn provider=LocationManager.GPS_PROVIDER;rn rn else if (pStrings.contains(LocationManager.NETWORK_PROVIDER)) rn provider=LocationManager.NETWORK_PROVIDER;rn rn else rn Toast.makeText(this, "no gps", Toast.LENGTH_SHORT).show();rn return;rn rn location=this.locationManager.getLastKnownLocation(provider);rn[/code]rn手机只设置了gps定位,用gps的provider,总是<em>返回</em>null,权限设置了如下三个:rn rn rn rn但是同样只设置GPS定位,用陌陌,大众点评什么的都可以定位到附近,这是<em>为什么</em>?代码哪里有问题?rn同样代码,改成用network获取就可以得到location
ImageIo.read() 返回null
具体代码如下:nimgStr是一个base64字符串npublic static String decoderQRCodeForBase64(String imgStr) throws Exception n if (imgStr == null) n return "";n nn BASE64Decoder decoder = new BASE64Decoder();n byte[] b = decoder.decodeBuffer(imgStr);n for (int i = 0; i < b.length; ++i) n if (b[i] < 0) // 调整异常数据n b[i] += 256;n n nn InputStream input = new ByteArrayInputStream(b);nn String content = decoderQRCode(input);nn return content;nn n n n public static String decoderQRCode(InputStream input) throws Exception n BufferedImage bufImg = null;n String content = null;nn bufImg = ImageIO.read(input);n QRCodeDecoder decoder = new QRCodeDecoder();n content = new String(decoder.decode(new TwoDimensionCodeImage(bufImg)),n "utf-8");nn return content;n n n 在bufImg = ImageIO.read(input);这里读不出来,<em>返回</em>的是null,<em>为什么</em>呢,求大神解答,小白在线等。
getActivity()返回null的解决问题
如果从最近使用的应用里面点击我们的应用,系统会恢复之前被回收的Activity,这个时候FragmentActivity在oncreate里面也会做Fragment的恢复,但是此时恢复出的Fragment,在调用getActivity的时候会<em>返回</em>null。 解决方法: 如果该Context需要在Activity被销毁后还存在, 则使用getActivity().getApplicatio
LoadImage总是返回NULL
HBITMAP hBit = (HBITMAP)::LoadImage((HINSTANCE)GetModuleHandle(NULL), _T("C:\\CLOSED.BMP"), IMAGE_BITMAP, NULL, NULL, 0);rnrn<em>返回</em>NULL,GetLastError()<em>返回</em>1814(找不到映像文件中指定的资源名)rnrnHBITMAP hBit = SHLoadDIBitmap(_T("C:\\CLOSED.BMP"));rn<em>返回</em>NULL。GetLastError()<em>返回</em>3(找不到路径)rn可是确实存在这个文件啊
datatable.getchanges()为啥返回null
具体情况:界面中设计一个datagridview,手动添加列,将列1和列2绑定某个字段,列1和列2的类型为复选框类型。设置选中为Y,不选中为N。然后在代码中给该datagridview绑定一个datatable。绑定修改列1和列2的值。通过断点可以看到datatable的值已经改变。但是datatable.getchanges()<em>返回</em>却是null。这是怎么个情况?
struts2 ajax返回null
刚接触ajax和json,遇到点小问题,半天都没解决,希望大侠们支援哪。。。rn感激万分~~rnajax调用action顺利执行了,result里有了内容,但页面弹框显示为null或者直接不显示rn[code=Java]rnimport org.json.JSONObject;rn//result、username的setter、getter方法rnpublic String showUser()rn List list = userDAO.findByUsername("king");rn System.out.println("userame"+userame);rn rn JSONObject obj=new JSONObject();rn try rn obj.put("users", list);rn result=obj.toString();rn System.out.println("result: "+result);rn //显示:result: "users":["userpassword":"king","username":"king","userid":1]rn catch (JSONException e) rn e.printStackTrace();rn rn return Action.NONE;rn //return SUCCESS;//换成这句js不能弹窗 rn rn[/code]rnAction成功调用,username接收正常,rnstruts2.1.6:rn[code=XML]rnrn rn rn rn rn rn rn[/code]rnrnjsp页面js:rn[code=JScript]rn rn[/code]
GetDlgItem返回NULL
int WINAPI WinMain( HINSTANCE hInstance,rn HINSTANCE hPrevInstance,rn LPWSTR lpCmdLine,rn int nCmdShow)rnrn InitCommonControls();rn ImmDisableIME(0);rn DialogBox(hInstance,MAKEINTRESOURCE(IDD_WIFIDIALOG),NULL,(DLGPROC)WifiDlgProc);rn return 1;rnrnrnLRESULT CALLBACK WifiDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)rnrn int myid;rn DWORD dwStyle;rn CListCtrl *m_WifiList;rn/* if (myedit == NULL)rn rn MessageBox(hDlg,TEXT("list error"),NULL,MB_OK);rn */rn switch(message)rn rn case WM_INITDIALOG:rn rn m_WifiList = (CListCtrl*)GetDlgItem(hDlg,IDC_LIST1);rn (CListCtrl*)GetDlgItem(hDlg,IDC_LIST1)->EnableWindow(TRUE);rn int sx, sy;rn sx = GetSystemMetrics(SM_CXSCREEN);rn sy = GetSystemMetrics(SM_CYSCREEN);rn SetWindowPos(hDlg, 0, 0, 0, sx, sy-23, SWP_NOZORDER);rn rn dwStyle = m_WifiList)->GetExtendedStyle();rn dwStyle |= LVS_EX_CHECKBOXES;rn dwStyle |= LVS_EX_ONECLICKACTIVATE;rn dwStyle |= LVS_EX_SUBITEMIMAGES;rn m_WifiList->SetExtendedStyle(dwStyle);rn return TRUE;rn rn case WM_COMMAND:rn rn myid = LOWORD(wParam);rn switch(myid)rn rn case IDOK:rn EndDialog(hDlg,IDOK);rn return FALSE;rn case IDCANCEL:rn EndDialog(hDlg,IDCANCEL);rn return FALSE;rn rn rn default:rn return FALSE;rn rn
Attribute.GetCustomAttribute() 返回为null
[code=csharp]rnnamespace LookUpWhatsNewrnrn internal class WhatsNewCheckerrn rn private static readonly StringBuilder outPutText = new StringBuilder();rn private static DateTime backDateTo = new DateTime(2010,2,1);rnrn static void Main(string[] args)rn rn Assembly theAssembly = Assembly.Load("VectorClass");rn Attribute supportsAttibute = Attribute.GetCustomAttribute(theAssembly, typeof(LastModifiedAttribute));// supportsAttibute 为空! rn Conso.Read();rn rn rnrnrnnamespace WhatNewAttributesrnrn [AttributeUsage(AttributeTargets .Class |AttributeTargets.Method ,AllowMultiple =true ,Inherited =false )]rn public class LastModifiedAttribute:Attribute rn rn private readonly DateTime dateModified;rn private readonly string changes;rn public LastModifiedAttribute(string dateModified, string changes)rn rn this.dateModified = DateTime.Parse(dateModified);rn this.changes = changes;rn rn public DateTime DateModifiedrn rn getrn rn return this.dateModified;rn rn rn public string Changesrn rn getrn rn return this.changes;rn rn rn public string Issues get; set; rn rn [AttributeUsage(AttributeTargets.Assembly)]rn public class SupportWhatsNewAttribute : Attributern rn rnrnrnnamespace VectorClassrnrn [LastModifiedAttribute("14,Feb,2010", "IEnumerable interface implemented so vector can now be treated as a Collection")]rn [LastModifiedAttribute("10,Feb,2010", "IFormattable interface implemented so vector now responds to format specifiers N and VE")]rn public class Vector:IEnumerable ,IFormattablern rn public double x, y, z;rn public Vector(double x,double y,double z)rn rn this.x = x;rn this.y = y;rn this.z = z;rn rnrn [LastModifiedAttribute("10,Feb,2010", "Method added in order to formating support")]rn public string ToString(string format, IFormatProvider formatProvider)rn rn if (format == null)rn rn return ToString();rn rnrn switch (format)rn rn case "N":rn return string.Format("(0,1,2)", x, y, z);rn case "VE":rn return string.Format("0i+1j+2k", x, y, z);rn default:rn throw new ArgumentException("No 0 format !", format);rn rn rnrn public string ToString(string format)rn rn return ToString(format, null);rn rnrn public IEnumerator GetEnumerator()rn rn yield return x;rn yield return y;rn yield return z;rn rn [LastModifiedAttribute("14,Feb,2010", "Class create as part of collection support for Vector")]rn private class VectorIEnumerator : IEnumeratorrn rnrn public object Currentrn rn get throw new NotImplementedException(); rn rnrn public bool MoveNext()rn rn throw new NotImplementedException();rn rnrn public void Reset()rn rn throw new NotImplementedException();rn rn rn rn[/code]
preg_replace 返回 null
代买如下:rn$p='/(?
GetProp()总返回NULL
代码如下,CMmywnd是我封装的窗口类,MY_WND_PROP_NAME在头文件里定义为_T("name")rnrnLRESULT CALLBACK CMywnd::WndProc(HWND hWnd, UINT nMsg,WPARAM wp,LPARAM lp)rnrnLRESULT lResult=0;rnBOOL bCallDefault=TRUE;rnCMywnd *pWnd=(CMywnd*)GetProp(hWnd,MY_WND_PROP_NAME);rnif(pWnd==NULL)rnrnif(nMsg!=WM_CREATE)rnrnreturn DefWindowProc(hWnd,nMsg,wp,lp);rnrnelsernrnLPCREATESTRUCT pSt=(LPCREATESTRUCT)lp;rnpWnd=(CMywnd*)pSt->lpCreateParams;rnSetProp(hWnd,MY_WND_PROP_NAME,pWnd);//这个操作似乎没用,pWnd总是NULLrnrnrnif(!pWnd->PreProcessMsg(hWnd,nMsg,wp,lp,&lResult))rnreturn lResult;rnint wmId;rnswitch(nMsg)rnrncase WM_COMMAND:rnwmId = LOWORD(wp);rnswitch(wmId)rnrncase ID_CONSOLE_SHUTUP:rnrnbreak;rnrnbreak;rncase WM_CREATE:rnrnpWnd->m_hWnd=hWnd;rnlResult=pWnd->OnCreat(hWnd);rnbCallDefault=FALSE;rnbreak;rnrncase WM_DESTROY:rnbCallDefault=pWnd->OnCommand(LOWORD(wp));rnbreak;rncase WM_CLOSE:rnpWnd->Destroy();rnbCallDefault=FALSE;rnbreak;rndefault:rnbreak;rnrnif(bCallDefault)rnreturn DefWindowProc(hWnd,nMsg,wp,lp);rnelsernreturn lResult;rn
返回NULL还是抛出异常
在使用工厂模式编程的时候,往往要<em>返回</em>一个对象,rn那么这个对象没有能成功生成的时候,我们是<em>返回</em>NULL还是抛出异常.rn我只是听一位同事说抛出异常rn两者的优缺,不知到有没有更深的见解,洗耳恭听中rnrnrnrnrnrnhttp://51home.ku.net
ExtractIconEx怎么返回NULL?
HICON hIcon;rnCString strIconPath;rnstrIconPath = _T("C:\\program files\\FlashGet\\flashget.exe");rnExtractIconEx(strIconPath,128,&hIcon,NULL,1);rnrn我用提图标软件就可以提出来。可是上面的代码却不行。rnrnhIcon为NULL.rn这是<em>为什么</em>呢?rn
资源加载返回null的问题
今天项目当中某个模块需要从配置文件读取数据,因为是其他人写好的代码(以为没有问题)始终加载不了配置,在使用类加载资源时<em>返回</em>null,查了多遍也没有发现问题。 百度后得到结果: 1,用Class.getResourceAsStream() 时,路径应该是以"/"开头的,如: Hello.class.getResourceAsStream("/config/config.xml"); 2,
findViewById返回Null
遇到个难题了,findViewById<em>返回</em>Null。rn查网一般原因有几种:rn1.findViewById在setContentView(R.layout.main);之前rn2.在另一个view的元素应该用view.findViewById来拿rn3.clean一下工程,让ID重新生成rnrn但是我都试过了问题没有解决。rn下面我贴一下代码:rn布局xmlrn[code=XML]rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn[/code]rnrnActivityrn[code=Java]rnpublic void onCreate(Bundle savedInstanceState) rn super.onCreate(savedInstanceState);rn setContentView(R.layout.main);rn rn inflater = LayoutInflater.from(MainActivity.this);rn initTitleBar();rn initFilterDialog();rn initMainList();rn rn......rnpublic void initFilterDialog()rn //初始化变量rn final View dialogView = inflater.inflate(R.layout.filter, null);rn keywordEditText = (EditText) dialogView.findViewById(R.id.keywordEditText);rn scopeSpinner = (Spinner) dialogView.findViewById(R.id.scopeSpinner);rn lawnoEditText = (EditText) dialogView.findViewById(R.id.lawnoEditText);rn validSpinner = (Spinner) dialogView.findViewById(R.id.validSpinner);rn areaSpinner = (Spinner) dialogView.findViewById(R.id.areaSpinner);rn categorySpinner = (Spinner) dialogView.findViewById(R.id.categorySpinner);rn pubunitEditText = (EditText) dialogView.findViewById(R.id.pubunitEditText);rn searchButton = (Button) dialogView.findViewById(R.id.filterSearchBtn);rn searchButton.setOnClickListener(new OnClickEvent());rn resetButton = (Button) dialogView.findViewById(R.id.filterResetBtn);rn resetButton.setOnClickListener(new OnClickEvent());rn cancelButton = (Button) dialogView.findViewById(R.id.filterCancelBtn);rn cancelButton.setOnClickListener(new OnClickEvent());rn pubdateEditText = (EditText) dialogView.findViewById(R.id.pubdateEditText);rn pubdateEditText.setOnClickListener(new OnClickEvent()); //错误在这!!!rn pubdatetoEditText = (EditText) dialogView.findViewById(R.id.pubdatetoEditText);rn pubdatetoEditText.setOnClickListener(new OnClickEvent());rn final Calendar c = Calendar.getInstance(); rn datePickerDialog = new DatePickerDialog(MainActivity.this,new DatePickerDialog.OnDateSetListener() rn public void onDateSet(DatePicker view, int year, int monthOfYear,rn int dayOfMonth) rn datePickerDialogTarget.setText(year+""+monthOfYear+""+dayOfMonth);rn rn ,c.get(Calendar.YEAR),c.get(Calendar.MONTH),c.get(Calendar.DAY_OF_MONTH));rn// datePickerDialog.setButton("设置", null);rn //创建面板rn AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);rn builder.setIcon(R.drawable.m_filter);rn builder.setTitle(R.string.filter);rn builder.setView(dialogView);rn filterDialog=builder.create();rn rn[/code]rn————————————————————————————————————————————————rn空指针错误发生在pubdateEditText.setOnClickListener(new OnClickEvent());rnpubdateEditText为null。rn奇怪的是pubdateEditText以上的元素全部拿得到,就是pubdateEditText拿不到。rn后来我屏蔽rnpubdateEditText = (EditText) dialogView.findViewById(R.id.pubdateEditText);rnpubdateEditText.setOnClickListener(new OnClickEvent());rn结果pubdatetoEditText.setOnClickListener(new OnClickEvent());的pubdatetoEditText也报空指针。rn————————————————————————————————————————————————rn这个问题奇怪的地方就是常见的三种问题都被排除,多数元素拿得到只后面这两个拿不到。rn大家帮我看看问题出在哪,谢谢!
ftpclient storeFileStream 返回null
[code=Java] public void doAudits(ImeiTXTVO[] imeis) throws Exception rn FTPClient ftpClient=new FTPClient();rn ftpClient.setControlEncoding("GBK"); rn ftpClient.connect(host);rn int replycode=ftpClient.getReplyCode();rn if(!FTPReply.isPositiveCompletion(replycode)) rn ftpClient.disconnect();rn throw new Exception("FTP server refused connection."); rn rn try rn log.info("登陆FTP:"+host);rn ftpClient.login(username, password);rn ftpClient.changeWorkingDirectory(ftpFileDir);rn //ftpClient.setDataTimeout(10000);rn ftpClient.setFileType(ftpClient.BINARY_FILE_TYPE);rn OutputStream fout ;rnrn for(int i=0;i>>>>>>>" + fin.available());rn while((count = fin.read(buff)) != -1) rn gzout.write(buff,0,count); rn rn fin.close();rn gzout.flush();rn gzout.close();rn rn rn FileInputStream gzin = new FileInputStream(f);rn //System.out.println("2>>>>>>>>" + gzin.available());rn System.out.println(">>>>>>" + ftp_file);rn fout = ftpClient.storeFileStream(ftp_file); rn System.out.println(">>>>>>" + fout); rnrn byte[] b = new byte[1024]; rn int num; rn while ((num = gzin.read(b)) != -1) rn rn fout.write(b,0,num); rn rn rn rn rn fout.flush(); rn fout.close();rn gzin.close(); rn rn boolean flag = ftpClient.rename("temp_" + file_title , file_title);rn rn rn imeiTxtDao.updateForAudit(imeis[i]);rn rn rn System.out.println("登出FTP:"+host);rn //throw new RuntimeException("上传ftp出错");rn catch(Exception e)rn e.printStackTrace();rn throw new RuntimeException("上传ftp出错"+e.toString());rn finallyrn rn ftpClient.logout();rn if(ftpClient.isConnected())rn ftpClient.disconnect();rn rn log.info("登出FTP:"+host);rn System.out.println("登出FTP:"+host);rn rn rn [/code]rnrn<em>为什么</em>第二次得到的fout为NULL啊。
Ajaxpro2 返回null
后台代码:rnrn [AjaxPro.AjaxMethod]rn public string getMidSort(string id) rn rn tryrn rn this.tbxgoods.Text = id;//注释就正常了rn return id;rn rn catch (Exception e)rn rn return "00000";rn rn rn rnrn前台JS:rn rnrnrn请问<em>为什么</em>CallBack里得到的值都是00000
XmlDocument的getElementById()返回null
初学C#,今天遇到了一个问题,请高手指点rnrn我用一个XmlDocument对象加载了一个xml文件,然后用createElement()方法生成了一些新结点放到里面,rn但是奇怪的事情发生了rnrn用getElementById()取原来文件中有的元素时,能取到rn用getElementById()取动态新生成的元素时,<em>返回</em>nullrnrnXml文件格式如下:rn[code=XML]rnrn rn rn rn rn rn rn rn rn rn]>rnrnrn rn rnrn[/code]rnrn这里是对它的操作rn[code=C#]rn XmlElement element = doc.CreateElement("ITEM", doc.NamespaceURI);rn rn element.SetAttribute("id", id);rn element.SetAttribute("name", name);rn element.SetAttribute("text", name);rnrn parent.AppendChild(element);rnrn doc.getElementById(id); //这里<em>返回</em>nullrn[/code]
GetModuleHandle总是返回NULL
我自己建立了一个进程,在GetModuleHandle前已经运行了该进程,rn然后GetModuleHandle(进程名),为何总是<em>返回</em>NULL呢?不解。。。。rn错误代码为126rn希望有朋友能帮忙解答一下,谢谢
Direct3D LockRect 返回NULL
通过Direct3D来进行视频播放,发现经过几次的Create 和 Release之后,从IDirect3DSurface9->LockRect<em>返回</em>的D3DLOCKED_RECT类型数据中,pBits为NULL Pitch 为0,请问这是什么原因呢?求大牛指导
返回NULL值的记录
表prnrnid 字段1 字段2rn1 a ……rn2 b …… rn3 c ……rn4 null ……rnrnselect * from a where 字段1<>'c'rnrn结果只<em>返回</em>第1、2条记录,如何让第4条null值的记录也<em>返回</em>。rnrn要求不要改数据。
getClass().getClassLoader() 返回 null
如上,我总是得到空值,哪位高手帮我讲一下? 我要得到本地的地址, 如hello/myPicture.jpg,那么hello/myPicture.jpg应该放到什么地方???
ajaxpro 总是返回 null
在本地写好的网站,打包安装到其它机器就不行了,总是<em>返回</em>null值,各位有什么办法吗?
ContextLoader.getCurrentWebApplicationContext();返回null怎么回事
rn  rnrn  异常rn   这行报null怎么回事,我灰常不理解.请大家帮忙指点给出方案来,谢谢.
GetProcessAddress返回NULL的问题
我在一台WindowsXP的系统用VS2005下开发一个Win32的DLL, 在本机用测试程序LoadLibrary后,用GetProcessAddress可以正确<em>返回</em>函数地址并正常调用。后将此DLL部署到一台Win2003 server的机器上,在该机器上LoadLibrary成功,但是用GetProcessAddress获取的函数地址始终为NULL。在该机器上用DUMPBIN -EXPORT看到输出的函数符号确实和GetProcessAddress调用时的字符串相同。请问这会是什么问题?
返回Null还是抛出异常?
观点:如果<em>返回</em>null是一个正常行为,则<em>返回</em>null,如果是一个错误,则抛出Exception。观点:1、如果<em>返回</em>null是一个正常行为,则<em>返回</em>null。但在命名时最好给用户以提示,例如GetUserOrNull(string userName, string password)这样的函数名。2、如果是错误,则抛出Exception。...
malloc分配内存返回null
一个关于地图的项目, 要读取好多数据文件, 每个文件大小都是上百兆, 总共加起来差不多有5G.rn刚开始加载几个文件都没问题, 加载到一个400多M的文件时跳出错误了. 跟踪了一下是malloc<em>返回</em>了null.rn不知道是不是malloc分配内存的极限了. 我的电脑是8G内存, 64位Win7, 在网上看了一个virtualalloc()函数说是可以分配虚拟内存比malloc分配的大, 但是我用了依然<em>返回</em>null.rn求分配大内存的方法(╥﹏╥)
GetProcAddress总是返回NULL
---math.h文件rn#include rnextern "C" __declspec(dllexport) int pascal Test(int i,int j);rn//extern "C" class CMathrn//rn//public:rn// CMath(void);rn// __declspec(dllexport) int pascal Add(int i,int j);rn// ~CMath(void);rn//;rnrnrn---math.cpp文件rn#include "StdAfx.h"rn#include "Math.h"rnint pascal Test(int i,int j)rnrn return i+j;rnrnrnVS2010,编译生成了firt.dll文件rnrn-----------------------client----------------------rn-------------test.cpp--------------rn#includern#includerntypedef int ( _stdcall *FUN)(int,int);rnint main(void)rnrn HINSTANCE hinst=::LoadLibraryA("first.dll");rn if(NULL != hinst)rn rn std::cout<<
求解,SelectObject返回NULL
要改写一下xSkinButton类,然后在DrawBitmap有如下代码:rnvoid CxSkinButton::DrawBitmap(CDC* dc, HBITMAP hbmp, RECT r, int DrawMode)rnrnHDC hdcMem = CreateCompatibleDC(dc->m_hDC);rnHGDIOBJ hbmOld = SelectObject(hdcMem, hbmp);//此句<em>返回</em>NULLrnrn调试发现hbmp参数传过来是有效图片(和外面LoadBitmap<em>返回</em>参数一致),<em>为什么</em>会<em>返回</em>NULL呢?rnrn如果在函数里面LoadBitmap是可以的,即把代码改成如下则是可以的rnvoid CxSkinButton::DrawBitmap(CDC* dc, HBITMAP hbmp, RECT r, int DrawMode)rnrnhbmp = LoadBitmap(IDB_XXX);rnHDC hdcMem = CreateCompatibleDC(dc->m_hDC);rnHGDIOBJ hbmOld = SelectObject(hdcMem, hbmp);rn
ps.executeBatch返回null?
spring+hibernate框架下,使用HibernateCallBack执行sql语句(非hql)rn[code=java]rnString modSql = "insert into m_modinfo (streamnumber, "rn + "committime, tablename,phoneNumber, sqlset, app) values(?," + "to_date('" + dateStringrn + "','yyyy-MM-dd HH24:mi:ss'),?,?,?,?)";rnrn DataSource ds = SessionFactoryUtils.getDataSource(session.getSessionFactory());rn Connection conn = ds.getConnection();rn ps = conn.prepareStatement(modSql);rnrn for(Iterator it = sqlsetList.iterator(); it.hasNext(); )rn String sqlset = it.next();rn rn ps.setInt(1, streamNumber);rn ps.setString(2, "plus_ringboxdepot");rn ps.setString(3, provinceId);rn ps.setString(4, sqlset);rn ps.setString(5, "mng");rn rn ps.addBatch();rn rn rn int[] results = ps.executeBatch();rn[/code]rnrn日志跟踪到的 results 是null。api对此没有解释,大神帮看看rn下面是api对<em>返回</em>值的描述:rnReturns:rnan array of update counts containing one element for each command in the batch. The elements of the array are ordered according to the order in which commands were added to the batch.
SCOPE_IDENTITY()返回null
本机环境:win7旗舰版、sql 2008 、vb6rnrn在数据库中直接执行insert后,rn再select @@IDENTITY 或select SCOPE_IDENTITY() 均有正确的<em>返回</em>值。rnrn但使用vb语句执行insert后,rnselect @@IDENTITY有正确的<em>返回</em>值,而select SCOPE_IDENTITY() <em>返回</em>null rn不知是<em>为什么</em>,参考vb代码如下,blackbox表有自增长字段名idrnrnrn[code=vb]Conn.BeginTransrnConn.Execute "insert into blackbox(CZYDM,jqmc,jqip,frmename,timein) values ('" & _rn M_Zdrh & "','" & .rJQMC & "','" & .rJQID & "','" & .frmName & "',getdate())"rn rnIf rstConnSTR.State = 1 Then rstConnSTR.ClosernrstConnSTR.Open "select SCOPE_IDENTITY() as ID", Conn, adOpenStatic, adLockReadOnlyrn M_ShowFormParameter.BlackBoxID = Int(rstConnSTR("ID"))rnConn.CommitTrans[/code]rnrnrn上面的rstConnSTR("ID"))<em>返回</em>值为null?rnrnrn
jni FindClass返回null
小弟最近有个项目要用到jni来实现,在jni中需要引用自己写的类来<em>返回</em>某些值,但是在jni中使用FindClass,如果该类不是java自带的就会<em>返回</em>null,求解决方法rnrn以下是测试代码:rnrntest.A.java //自己定义的类,希望jni通过该类来<em>返回</em>数据rn[code=Java]rnpackage test;rnrnpublic class Arnrn public int num;rnrn[/code]rnrntest.B.java //测试类,看看jni是否能够成功<em>返回</em>A的对象rn[code=Java]rnpackage test;rnrnpublic class Brnrn public static native A getA();rn rn staticrn rn System.loadLibrary("A");rn rn rn public static void main(String[] args)rn rn System.out.println(getA().num);rn rnrn[/code]rnrntest_B.h //jni的头文件rn[code=C/C++]rn/* DO NOT EDIT THIS FILE - it is machine generated */rn#include rn/* Header for class test_B */rnrn#ifndef _Included_test_Brn#define _Included_test_Brn#ifdef __cplusplusrnextern "C" rn#endifrn/*rn * Class: test_Brn * Method: getArn * Signature: ()Ltest/A;rn */rnJNIEXPORT jobject JNICALL Java_test_B_getArn (JNIEnv *, jclass);rnrn#ifdef __cplusplusrnrn#endifrn#endifrn[/code]rnrntest_B.c //jni的实现文件rn[code=C/C++]rn#include "test_B.h"rnrn/*rn * Class: test_Brn * Method: getArn * Signature: ()Ltest/A;rn */rnJNIEXPORT jobject JNICALL Java_test_B_getArn (JNIEnv * env, jclass cl)rnrn jclass class_A = (*env)->FindClass(env, "test.A"); //我已经调试过了,这句执行后class_A的结果为nullrn jfieldID fid_A_num = (*env)->GetFieldID(env, class_A, "num", "I");rn jmethodID mid_A = (*env)->GetMethodID(env, class_A, "", "()V");rn jobject obj_A_a = (*env)->NewObject(env, class_A, mid_A);rn (*env)->SetIntField(env, obj_A_a, fid_A_num, 100);rn return obj_A_a;rnrn[/code]
webservice返回null
各位大牛出来了,小弟有问题请教:rnrn最近在公司做的东西,需要调用外网的接口,然后我们公司开发人员访问外网需要通过代理。rn现在的情况是:我在本地通过代理服务器访问对方接口,<em>返回</em>一个DataSet;但是提交测试后在测试环境通过测试服务器访问对方的接口,<em>返回</em>null。rnrn这是怎么回事呢?rnrnPS:最近刚公司升级了.net 4.0 是否有关系呢?
getElementById返回 null值
org.w3c.dom.Document提供了getElementById的方法。可是我试了下,得到的Element为nullrn在网上看了下,说是设置SCHEMA,不太懂,请赐教。rnxml文件如下所示rn[code=XML]rnrnrnrn rn rnrnrn[/code]rnrn如何找到id为2的element?
ajax返回null
请求发送到服务器了,并且服务器可以成功处理请求,但是不知道<em>为什么</em><em>返回</em>的响应确实nullrn服务器代码:rn[code=Java]rnpublic String searchCourse()throws Exceptionrn course = coursemanage.searchCourse(course.getCourseNo());rn jsonobject = new JSONObject();rn jsonobject.put("courses",new JSONObject(course));rn result = jsonobject.toString();rn System.out.println(result);//可以正常输出数据rn return SUCCESS;rn rn[/code]rnrnstruts.xml配置文件rn[code=XML]rnrn rn resultrn rn rn[/code]rnrnajax代码rn[code=JScript]rn$("#search").click(function()rn $.ajax(rn url:"/StudentManageSystem/choose/search.action?course.courseNo="+$("#courseno").val()+"&timed="+new Date(),rn dataType:"json",rn success:function(data)rn alert(data);//<em>返回</em>的是null,为何?rn var course = eval("("+data+")");rn if(course!=null)rn $("div .searchresult").append(" ");rn else rn alert("输入代码不正确,重新输入");rn rn rn );rn );rn[/code]
getHibernateTemplate返回null
getHibernateTemplate()<em>返回</em>null,下面是web.xml,applicationContext.xml和异常信息,谢谢大家啦~rnrnweb.xml:rnrnrn gongre1rn rn rn struts2rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rn rn rn struts2rn /*rn rn rn rn index.jsprn login.jsprn rn rn rn rn rn contextConfigLocationrn rn /WEB-INF/applicationContext.xmlrn rn rn rn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rnrnrnapplicationContext.xml:rnrnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn org.hibernate.dialect.MySQLDialectrn rn rn rn rn rn com/domain/User.hbm.xmlrn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rnrnrnuserDao.java:rnpublic List getUsername()rn getHibernateTemplate().find("from user");rn getHibernateTemplate();rn ArrayList s = new ArrayList(Arrays.asList("s","u","n"));rn return s;rn rnrnHTTP Status 500 - rnrn--------------------------------------------------------------------------------rnrntype Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjava.lang.NullPointerExceptionrn com.dao.UserDao.getUsername(UserDao.java:19)rn com.service.UserServiceImpl.validLogin(UserServiceImpl.java:15)rn com.actions.LoginAction.execute(LoginAction.java:28)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn java.lang.reflect.Method.invoke(Method.java:601)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:255)rn org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)rn org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)rn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:510)rn org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rn
peekService返回null
大家好,我最近写了一个音乐播放器,为了拿到正在播放的歌曲的信息我在一个receiver中peekService,可以确定服务已经在后台运行,IBinder iBinder = peekService(context, new Intent(context,MusicPlayerService.class));以上代码iBinder依然<em>返回</em>null,但是我的MusicPlayerService服务与activity使用aidl通信是没问题的,求各位帮忙解决问题
GifImageTestD7下载
GifImageTestD7GifImageTestD7 相关下载链接:[url=//download.csdn.net/download/fufeng1015/2234027?utm_source=bbsseo]//download.csdn.net/download/fufeng1015/2234027?utm_source=bbsseo[/url]
静态网页制作-图片浏览下载
应用静态网页技术,制作带左右框架的手动图片浏览网页和自动自动图片浏览网页 相关下载链接:[url=//download.csdn.net/download/lqr1992164/7250191?utm_source=bbsseo]//download.csdn.net/download/lqr1992164/7250191?utm_source=bbsseo[/url]
RTEMS引导程序的设计与实现_李红卫下载
基于PC 机的RT EMS 嵌入式操作系统通常由GNU GRUB 引导。在分析GNU GRUB 与RT EMS 之间的接口和ELF 可运行程序的文件格式的基础上给出了BOOT 和LOADER的实现算法, 并详细介绍了实模式到保护模式的切换过程, 且给出了加载ELF 可运行程序的实现算法。 相关下载链接:[url=//download.csdn.net/download/sxgtc/8541245?utm_source=bbsseo]//download.csdn.net/download/sxgtc/8541245?utm_source=bbsseo[/url]
相关热词 c++和c#哪个就业率高 c# 批量动态创建控件 c# 模块和程序集的区别 c# gmap 截图 c# 验证码图片生成类 c# 再次尝试 连接失败 c#开发编写规范 c# 压缩图片好麻烦 c#计算数组中的平均值 c#获取路由参数
我们是很有底线的