Daily Archives

Articles indexed Tuesday April 20 2010

Page 35/121 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • Getting ListView values into a string array?

    - by Andrew
    I have a ListView control set up in details mode, and on a button press I would like to retrieve all column values from that row in the ListView. This is my code so far: Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim items As ListView.SelectedListViewItemCollection = _ Me.ManageList.SelectedItems Dim item As ListViewItem Dim values(0 To 4) As String Dim i As Integer = 0 For Each item In items values(i) = item.SubItems(1).Text i = i + 1 Next End Sub But values just comes out as an empty array. Any ideas? I just want the values array to be filled with the data of that ListView row. Cheers.

    Read the article

  • Implicit linking vs. explicit linking of DLL in Delphi

    - by Tom
    I'm having trouble getting my dll to work when using explicit linking. Using implicit linking it works fine. Would someone google me a solution? :) No, just kidding, here's my code: This code works fine: function CountChars(_s: Pchar): integer; StdCall; external 'sample_dll.dll'; procedure TForm1.Button1Click(Sender: TObject); begin ShowMessage(IntToStr(CountChars('Hello world'))); end; This code doesn't work (I get an access violation): procedure TForm1.Button1Click(Sender: TObject); var LibHandle: HMODULE; CountChars: function(_s: PChar): integer; begin LibHandle := LoadLibrary('sample_dll.dll'); ShowMessage(IntToStr(CountChars('Hello world'))); // Access violation FreeLibrary(LibHandle); end; This is the DLL code: library sample_dll; uses FastMM4, FastMM4Messages, SysUtils, Classes; {$R *.res} function CountChars(_s: PChar): integer; stdcall; begin Result := Length(_s); end; exports CountChars; begin end.

    Read the article

  • I cant browse php pages in my local server

    - by tibin mathew
    Hi, I cant browse php pages in my local server.Before it was working fine. But now i cant browse php pages, i can browse html pages and asp pages , no problems with that. But when i try to browse a php page its not loading. What will be the problem?? I am using windows 2000 advanced server and my web server is Tomcat please someone help me Guys i'm not getting anything in my browser, its just continue to loading Nothing showing in that page i'm not getting any 404 error or anything like that. its just continue to be loading

    Read the article

  • Problems with QDialog in Qt

    - by Martin
    I'm using Qt for Symbian. I have some problems with a QDialog that I open from a QMenu. The QDialog shows up fine and in the QDialog I have a QDialogButtonBox with a button to Close the QDialog. BUT if I close the QDialog and then open it from the QMenu again, it will show up but the button from the QDialogButtonBox will not show up. Instead the buttons from the QMainWindow will show but they are grayed out. How can I get the QDialog buttons to show every time? Maybe I have some problems with setting focus on the QDialog? I really can't see what I'm doing wrong here. It's not much code that I use, you can try it yourself. This is my code: In QMainWindow I use the following to create the menu: QAction *menuButton = new QAction("Menu", this); menuButton->setSoftKeyRole(QAction::PositiveSoftKey); QMenu *menu = new QMenu(this); menuButton->setMenu(menu); QAction *popup = new QAction("Show popup",this); connect(popup, SIGNAL(triggered()), this, SLOT(showPopup())); menu->addAction(popup); addAction(menuButton); This shows the QDialog: void MyMainWindow::showPopup(){ TestDialog *test = new TestDialog(this); test->setAttribute(Qt::WA_DeleteOnClose); test->show(); } This is the TestDialog: TestDialog::TestDialog(QWidget *parent) : QDialog(parent) { ui.setupUi(this); QDesktopWidget* desktopWidget = QApplication::desktop(); QRect rect = desktopWidget->availableGeometry(); this->setFixedWidth(rect.width()); }

    Read the article

  • First-chance exception at std::set dectructor

    - by bartek
    Hi, I have a strange exception at my class destructor: First-chance exception reading location 0x00000 class DispLst{ // For fast instance existance test std::set< std::string > instances; [...] DispLst::~DispLst(){ this->clean(); DeleteCriticalSection( &instancesGuard ); } <---- here instances destructor raises exception Call stack: X.exe!std::_Tree,std::allocator ,std::less,std::allocator ,std::allocator,std::allocator ,0 ::begin() Line 556 + 0xc bytes C++ X.exe!std::_Tree,std::allocator ,std::less,std::allocator ,std::allocator,std::allocator ,0 ::_Tidy() Line 1421 + 0x64 bytes C++ X.exe!std::_Tree,std::allocator ,std::less,std::allocator ,std::allocator,std::allocator ,0 ::~_Tree,std::allocator ,std::less,std::allocator ,std::allocator,std::allocator ,0 () Line 541 C++ X.exe!std::set,std::allocator ,std::less,std::allocator ,std::allocator,std::allocator ::~set,std::allocator ,std::less,std::allocator ,std::allocator,std::allocator () + 0x2b bytes C++ X.exe!DispLst::~DispLst() Line 82 + 0xf bytes C++ The exact place of error in xtree: void _Tidy() { // free all storage erase(begin(), end()); <------------------- HERE this->_Alptr.destroy(&_Left(_Myhead)); this->_Alptr.destroy(&_Parent(_Myhead)); this->_Alptr.destroy(&_Right(_Myhead)); this->_Alnod.deallocate(_Myhead, 1); _Myhead = 0, _Mysize = 0; } iterator begin() { // return iterator for beginning of mutable sequence return (_TREE_ITERATOR(_Lmost())); <---------------- HERE } What is going on ? I'm using Visual Studio 2008.

    Read the article

  • Silverlight calling windows workflow foundation as a web service

    - by wissem
    hi, I'm trying to call a windows workflow foundation published as a web service from a Silverlight project. When I call it from a console application it works fine because I can add a web reference then I just make an instance of that webservice then I invoke the method I want. The problem is in the silverlight project cause i can just add a service reference so I find myself working with soap stuff that doesn't work at all, and here is the code: private void btnUpdate_Click(object sender, RoutedEventArgs e) { xxxxxxx.Workflow1_WebServiceSoapClient zer = new xxxxx.Workflow1_WebServiceSoapClient(); zer.demanderSubmitReportCompleted += new EventHandler<xxxxxxxxxxxxxxx.demanderSubmitReportCompletedEventArgs>(service2); zer.demanderSubmitReportAsync("zzz", 20000); } public void service2(object sender, xxxxx.demanderSubmitReportCompletedEventArgs e) { string a = e.Result; } plz help ,thanks

    Read the article

  • JDBC CallableStatement and Oracle SYS_REFCURSOR IN parameters?

    - by deebo
    Pretty much what it says in the title, how the hell is this supposed to be done? Basically i need to pass a null (empty?) ref cursor as an IN parameter to a stored procedure. /** spring's PreparedStatementSetter#setValues(...) */ public void setValues(PreparedStatement ps) throws SQLException { CallableStatement cs = (CallableStatement) ps; cs.setString(1,"constant"); //this is the IN param cs.setNull(2, OracleTypes.CURSOR); //this is the OUT param cs.registerOutParameter(3, OracleTypes.CURSOR); } And this fails with: caused by: java.sql.SQLException: Unsupported feature: sqlType=-10 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) at oracle.jdbc.driver.OraclePreparedStatement.setNullCritical(OraclePreparedStatement.java:4399) at oracle.jdbc.driver.OraclePreparedStatement.setNullInternal(OraclePreparedStatement.java:4161) at oracle.jdbc.driver.OracleCallableStatement.setNull(OracleCallableStatement.java:4472) I'm at a loss here, tried several different ways to do this, but I couldn't find any examples about this and have no idea how to do it properly.

    Read the article

  • Best user portal?

    - by John
    Hi guys, Anyone recommend a good user portal, looking to create a portal for users to provide them some self help material. Has to be REALLY simple! Thanks John

    Read the article

  • VPN connects but no remote lan access

    - by Macros
    I have a PPTP_ VPN setup through Windows to a Cisco (LinkSYS) router, which was working fine up until yesterday. Now I can connect, and I can ping the router however I am unable to reach any of the machines on the remote network. I've tried this from multiple PCs on Multiple networks / internet connections wuth the same results. Any ideas what may have caused this?

    Read the article

  • Jquery Basic Beginner Question: How do i make my function reusable?

    - by obikodi
    I have spent the last few hours attempting to do this on my own, and using Google to find a solution but to no avail. So if you can help out i would super appreciate it! Basically I have a page which has 3 separate biographies in 'preview mode', which shows only the first paragraph of each bio. When you click on 'read more' for one bio it opens up the 'full mode'. What is happening at the moment, is if i click on one 'read more' link, it opens up the full mode on all 3 bio's. How do i edit the following code so; It only opens the full mode bio of the link i click on Make it reusable so i don't have to duplicate the code 3 times for each bio $("a#btnReadMore").click(function(){ $('.readMoreSlider').slideToggle("fast"); $(this).toggleClass("readMoreSliderActive"); return false; }); Thanks for your help!

    Read the article

  • Document/Scripts management for R code

    - by harshsinghal
    Hi useRs, I am looking for a solution that allows me to keep a track of a multitude of R scripts that I create for various projects and purposes. Some scripts are easily tracked to specific projects, whereas others are "convenience" functions created to serve a set of tasks. Is there a way I can create a central DB and query it to find which scripts match most appropriately? I could create a system using a DBMS manually, but are users aware of anything in general or specific to R, that comes in the form of a software tool (maybe FOSS) ?

    Read the article

  • google-app-engine deploy error..

    - by zjm1126
    2010-04-20 15:33:39,421 WARNING appengine_rpc.py:399 ssl module not found. Without the ssl module, the identity of the remote host cannot be verified, and connections may NOT be secure. To fix this, please install the ssl module from http://pypi.python.org/pypi/ssl . To learn more, see http://code.google.com/appengine/kb/general.html#rpcssl . how can i do ? thanks

    Read the article

  • Job Interview Question

    - by John Hpa
    What's your opinion of the following job interview question? In the requirement it never mentions about to have classic ASP experience. But the question is "What are the differences between ADO.NET DataSet and ADO Record Set?".

    Read the article

  • Is there a way to jail in Javascript, so that the DOM isn't visible

    - by TiansHUo
    I would really like to provide the user some scripting capabilities, while not giving it access to the more powerful features, like altering the DOM. That is, all input/output is tunneled thru a given interface. Like a kind of restricted javacsript. Example: If the interface is checkanswer(func) this are allowed: checkanswer( function (x,y)={ return x+y; } but these are not allowed: alert(1) document.write("hello world") eval("alert()")

    Read the article

  • problem in fonts type and fonts size on printing

    - by user1400
    hello i have a application on php that i show a report in the table , i want to print this page i can see my page fine in print preview , but when i send thuis page to printer ,the fonts are small and diffrent fonts that i set in css file this is my css file @page { size: A4 landscape; margin-top:2cm; margin-bottom:1cm; margin-left:1cm; margin-right:1cm; } table.print{ text-align:right; border:#999 1px solid; } table.print td.e1{ border-top:#999 1px solid; padding:5px 2px; text-align: right; font-size: 20pt; font-family:"stencil"; } table.print td.e2{ border-top:#999 1px solid; padding:5px 2px; text-align: right; font-size: 120%; font-family:"tahoma"; } thanks

    Read the article

  • Returning XML natively in a .NET (C#) webservice?

    - by James McMahon
    I realize that SOAP webservices in .NET return XML representation of whatever object the web method returns, but if I want to return data formatting in XML what is the best object to store it in? I am using the answer to this question to write my XML, here is the code: XmlWriter writer = XmlWriter.Create(pathToOutput); writer.WriteStartDocument(); writer.WriteStartElement("People"); writer.WriteStartElement("Person"); writer.WriteAttributeString("Name", "Nick"); writer.WriteEndElement(); writer.WriteStartElement("Person"); writer.WriteStartAttribute("Name"); writer.WriteValue("Nick"); writer.WriteEndAttribute(); writer.WriteEndElement(); writer.WriteEndElement(); writer.WriteEndDocument(); writer.Flush(); Now I can return this output as a String to my calling webmethod, but it shows up as <string> XML HERE </string>, is there anyway to just return the full xml? Please in your answer, give an example of how to use said object with either XmlWriter or another internal object (if you consider XmlWriter to be a poor choice). The System.Xml package (namespace) has many objects, but I haven't been able to uncover decent documentation on how to use the objects together, or what to use for what situations.

    Read the article

  • Constructor ambiguous quesiton

    - by Crystal
    I'm trying to create a simple date class, but I get an error on my main file that says, "call of overloaded Date() is ambiguous." I'm not sure why since I thought as long as I had different parameters for my constructor, I was ok. Here is my code: header file: #ifndef DATE_H #define DATE_H using std::string; class Date { public: static const int monthsPerYear = 12; // num of months in a yr Date(int = 1, int = 1, int = 1900); // default constructor Date(); // uses system time to create object void print() const; // print date in month/day/year format ~Date(); // provided to confirm destruction order string getMonth(int month) const; // gets month in text format private: int month; // 1 - 12 int day; // 1 - 31 int year; // any year int checkDay(int) const; }; #endif .cpp file #include <iostream> #include <iomanip> #include <string> #include <ctime> #include "Date.h" using namespace std; Date::Date() { time_t seconds = time(NULL); struct tm* t = localtime(&seconds); month = t->tm_mon; day = t->tm_mday; year = t->tm_year; } Date::Date(int mn, int dy, int yr) { if (mn > 0 && mn <= monthsPerYear) month = mn; else { month = 1; // invalid month set to 1 cout << "Invalid month (" << mn << ") set to 1.\n"; } year = yr; // could validate yr day = checkDay(dy); // validate the day // output Date object to show when its constructor is called cout << "Date object constructor for date "; print(); cout << endl; } void Date::print() const { string str; cout << month << '/' << day << '/' << year << '\n'; // new code for HW2 cout << setfill('0') << setw(3) << day; // prints in ddd cout << " " << year << '\n'; // yyyy format str = getMonth(month); // prints in month (full word), day, year cout << str << " " << day << ", " << year << '\n'; } and my main.cpp #include <iostream> #include "Date.h" using std::cout; int main() { Date date1(4, 30, 1980); date1.print(); cout << '\n'; Date date2; date2.print(); }

    Read the article

  • Parser combinators info

    - by Jeriho
    I am using parsing combinators in scala If I have recursive parser: val parser = "(?ui)(regexvalue)".r | (parser2~value) How can I check how many characters of input my parser consumed?

    Read the article

  • ORM solutions (JPA; Hibernate) vs. JDBC

    - by Grasper
    I need to be able to insert/update objects at a consistent rate of at least 8000 objects every 5 seconds in an in-memory HSQL database. I have done some comparison performance testing between Spring/Hibernate/JPA and pure JDBC. I have found a significant difference in performance using HSQL.. With Spring/Hib/JPA, I can insert 3000-4000 of my 1.5 KB objects (with a One-Many and a Many-Many relationship) in 5 seconds, while with direct JDBC calls I can insert 10,000-12,000 of those same objects. I cannot figure out why there is such a huge discrepancy. I have tweaked the Spring/Hib/JPA settings a lot trying to get close in performance without luck. I want to use Spring/Hib/JPA for future purposes, expandability, and because the foreign key relationships (one-many and many-many) are difficult to maintain by hand; but the performance requirements seem to point towards using pure JDBC. Any ideas of why there would be such a huge discrepancy?

    Read the article

  • String replace for personalize code generator

    - by Xurxof
    I must do a automatic codes generator with user-configurable string with predefined keys and can not find a good way to do it. For example, a string OT-{CustomCode}-{Date}-{##} could generate codes OT-C0001-20100420-01 OT-C0001-20100420-02 I thought of using RegExpr.Replace(), but I would have problems if the code of a customer was {##} Any help is welcome! (and sorry for my english)

    Read the article

  • Request builder call not returning when using ssl(https)

    - by Zeeshan Khan
    Hi , I am using GWT. Currently using gwt-rpc to for login authentication. For only login purpose i want to use ssl(https) and so instead of using gwt-rpc i am trying Request Builder and calling a servlet with https. When in Servlet URL i use protocol as http the request builder works perfectly and response returns to client side(onResponseReceived ). but when i use https in the servlet url then the servlet is gettting called but the response is not returning to the onResponseReceived method of request builder. my url with http looks like : http://localhost:8888/myproject/myservlet and with https it looks like :https://localhost/myproject/myservlet Please give any suggestion or is there any other way to do it.and also is it possible to use ssl over gwt-rpc.

    Read the article

  • IIS7.5 and MVC 2 : Implementing HTTP(S) security

    - by Program.X
    This is my first ASP.NET MVC application, and my first on an IIS 7.x installation whereby I have to do anything over and above the standard. I need to enforce Windows authentication on the /Index and /feeds/xxx.svc pages/services. In ASP.NET Web Forms, I would apply the Windows permissions on the files and remove Anonymous authentication in IIS 6. This needs to work over HTTP/S, but don't worry about that, that's in hand. What happens in MVC/IIS 7? I have tried modifying the permissions on the /Index.aspx view, which seems to block access. It asks me for a username/password, but does not grant access when I enter a valid username/password. Pressing Escape gives me an exception "*Access to the path 'E:\dev\xxx\xxx.ConsultantRegistration.Web.Admin\Views\ConsultantRegistration\index.aspx' is denied. *", which does get sent as a 401. So although the username/password does exist on the Index.aspx view, I can't use those credentials to access said view. I have in my web.config: What am I missing?

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >