Daily Archives

Articles indexed Wednesday May 5 2010

Page 16/119 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • QT drawing without erasing widget

    - by faya
    Hello, If I have a derived object of QWidget class and on slot function in it I have an update(). here is some pseudocode: *.h slot: updateNow(); *.cpp constructor() { setPalllete(QPallete(QColor(250,250,200))); setAUtoFillBackground(true); } updateNow() { update(); } paintEvent() { QPainter painter(this); painter.drawRect(1,2,3,4); } So how should I don't get erased my pallete after update() call? P.S. - Sorry for my English and only pseudocode.

    Read the article

  • <Tabcontrol and Canvas

    - by prajor
    Hello, I have following situation <stackpanel > <ViewBox height=25/ > <tabcontrol> <tabitem> <Canvas /> </tabitem> </tabcontrol> </stackpanel> Q1. I want stackpanel to fill the screen, tabcontrol to fill the remain portion after viewbox. How do I do that ? How do I avoid the tabcontrol shrinking based on the size of tab items. Q2. I want the canvas restricted to the tabitem size. Currently I put anything in the canvas and scorll it goes beyond the tab item. Any idea how to control this.

    Read the article

  • jQuery prevUntil() include start selector and end selecter

    - by Globalz
    I would like to select the start and end selector for the prevUntil() or nextUntil() jQuery selector methods. If i implement these methods now, it grabs everything between the two selectors given. i.e. $('p').prevUntil('h1') will not include the p and h1 element, only those between them. How could I also select the p and h1 elements as well as though between? Thanks!

    Read the article

  • Selecting child element

    - by ScG
    I have the following div <div id="acc"> <a href="#">Link 1</a> <div> Some Content </div> <a href="#">Link 2</a> <div> Some Content </div> </div> All the div's are collapsed to start with. How can I select the first div child of 'acc' and say Slide Down on it I have cached the selector like this: var $acc = $(acc);

    Read the article

  • problem in creating a trigger

    - by mohanish
    Hi Bill I am facing a problem in creating a trigger and i am not sure why this is erroring out.can you please help me. I have described the problem in this link below http://forums.mysql.com/read.php?99,365942,365942#msg-365942.

    Read the article

  • :: Help Needed to parse ksoap response using J2ME ::

    - by Sachin
    Hi Guys, I am developing a mobile application using J2ME, LWUIT and KSOAP. The application makes .net webservice calls and fetches responses. I am able to successfully make calls and receive respone, but not able to parse the response, due to my limited knowledge in java. following is my WSDL file and j2me code snippet used to make calls. The WSDL file has complex and SIMPLETYPE elements, which needs to be mapped to JAVA classes. i request you guys to help me out with any pointers or sample code. WSDL file: <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/"> <s:element name="Login"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="userLoginID" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="LoginResponse"> <s:complexType> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="User" nillable="true" type="tns:UserBin" /> </s:sequence> </s:complexType> </s:element> <s:complexType name="UserBin" abstract="true"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="CompanyCodeSeqId" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="Image" type="s:base64Binary" /> <s:element minOccurs="1" maxOccurs="1" name="DateOfBirth" type="s:dateTime" /> <s:element minOccurs="1" maxOccurs="1" name="UserSeqId" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="UserFirstName" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="UserLastName" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="PassWord" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="UserRole" type="tns:Roles" /> <s:element minOccurs="1" maxOccurs="1" name="UserSSN" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="EmailId" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="MobileNumber" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="CreatedDate" type="s:dateTime" /> <s:element minOccurs="1" maxOccurs="1" name="ModifiedDate" type="s:dateTime" /> <s:element minOccurs="1" maxOccurs="1" name="UserGroup" type="tns:UserGroups" /> <s:element minOccurs="1" maxOccurs="1" name="SecretQuestionID" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="SecretAnswer" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="WorkPhone" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="HomePhone" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="Company" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="PreviousLoginTime" type="s:dateTime" /> <s:element minOccurs="1" maxOccurs="1" name="LoginTime" type="s:dateTime" /> </s:sequence> </s:complexType> <s:simpleType name="Roles"> <s:restriction base="s:string"> <s:enumeration value="Guest" /> <s:enumeration value="Customer" /> <s:enumeration value="Driver" /> <s:enumeration value="Dispatcher" /> <s:enumeration value="CompanyCodeAdmin" /> </s:restriction> </s:simpleType> <s:simpleType name="UserGroups"> <s:restriction base="s:string"> <s:enumeration value="Invalid" /> <s:enumeration value="Customer" /> <s:enumeration value="Driver" /> <s:enumeration value="Dispatcher" /> </s:restriction> </s:simpleType> <s:complexType name="DriverBin"> <s:complexContent mixed="false"> <s:extension base="tns:UserBin"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="DriverGroupId" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="DriverTypeId" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="HireDate" type="s:dateTime" /> <s:element minOccurs="0" maxOccurs="1" name="LicenceNumber" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="ExpiryDateForLicence" type="s:dateTime" /> <s:element minOccurs="0" maxOccurs="1" name="VehicleNumber" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="EmergencyName" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="EmergencyPhone" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="EmergencyAddress" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="EmergencyRelationship" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="DriverType" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="DriverGroupName" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="VehicleID" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="SocialSN" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="StreetAddress" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="City" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="State" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="Zip" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="EmergencyCity" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="EmergencyState" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="EmergencyZip" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="TerminationDate" type="s:dateTime" /> <s:element minOccurs="1" maxOccurs="1" name="HireAgainFlag" type="s:boolean" /> <s:element minOccurs="0" maxOccurs="1" name="TerminationReason" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="Notes" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="ImageName" type="s:string" /> </s:sequence> </s:extension> </s:complexContent> </s:complexType> <s:complexType name="CustomerBin"> <s:complexContent mixed="false"> <s:extension base="tns:UserBin"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="PassengesDetails" type="tns:ArrayOfPassengerBin" /> <s:element minOccurs="0" maxOccurs="1" name="CompanyName" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="CreditCardDetailsArray" type="tns:ArrayOfCreditCardDetailsBin" /> <s:element minOccurs="0" maxOccurs="1" name="AddressArray" type="tns:ArrayOfAddressBin" /> <s:element minOccurs="1" maxOccurs="1" name="CustomerCompanyID" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="CustomerType" type="tns:CustomerType" /> <s:element minOccurs="0" maxOccurs="1" name="PassengerGradeName" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="PassengerGradeID" type="s:int" /> </s:sequence> </s:extension> </s:complexContent> </s:complexType> <s:complexType name="ArrayOfPassengerBin"> <s:sequence> <s:element minOccurs="0" maxOccurs="unbounded" name="PassengerBin" nillable="true" type="tns:PassengerBin" /> </s:sequence> </s:complexType> <s:complexType name="PassengerBin"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="CustomerSeqID" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="EmailID" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="PhoneNumber" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="LastName" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="FirstName" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="PassengerSeqID" nillable="true" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="IsSelf" type="s:boolean" /> </s:sequence> </s:complexType> <s:complexType name="ArrayOfCreditCardDetailsBin"> <s:sequence> <s:element minOccurs="0" maxOccurs="unbounded" name="CreditCardDetailsBin" nillable="true" type="tns:CreditCardDetailsBin" /> </s:sequence> </s:complexType> <s:complexType name="CreditCardDetailsBin"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="CardSeqID" nillable="true" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="ExpiryYear" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="ExpiryMonth" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="CardType" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="NickName" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="CVVNumber" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="CreditCardNumber" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="NameOnTheCard" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="ZipCode" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="IsPrimary" type="s:boolean" /> </s:sequence> </s:complexType> <s:complexType name="ArrayOfAddressBin"> <s:sequence> <s:element minOccurs="0" maxOccurs="unbounded" name="AddressBin" nillable="true" type="tns:AddressBin" /> </s:sequence> </s:complexType> <s:complexType name="AddressBin"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="UserSeqID" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="AddressID" nillable="true" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="ZipCode" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="IsPrimary" type="s:boolean" /> <s:element minOccurs="0" maxOccurs="1" name="State" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="StateID" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="StateCode" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="City" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="CityID" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="StreetAddress" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="NickName" type="s:string" /> </s:sequence> </s:complexType> <s:simpleType name="CustomerType"> <s:restriction base="s:string"> <s:enumeration value="Individual" /> <s:enumeration value="Corporate" /> </s:restriction> </s:simpleType> <s:complexType name="DispatcherBin"> <s:complexContent mixed="false"> <s:extension base="tns:UserBin"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Address1" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="Address2" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="City" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="Province" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="ZipCode" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="IsActive" type="s:boolean" /> <s:element minOccurs="1" maxOccurs="1" name="DispatcherHireDate" type="s:dateTime" /> <s:element minOccurs="1" maxOccurs="1" name="DispatcherSSN" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="TerminationDate" type="s:dateTime" /> <s:element minOccurs="0" maxOccurs="1" name="ReasonForTermination" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="HireAgainFlag" type="s:boolean" /> <s:element minOccurs="0" maxOccurs="1" name="EmergencyContactName" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="EmergencyContactNumber" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="EmergencyContactAddress" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="EmergencyContactRelationship" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="HireDate" type="s:dateTime" /> </s:sequence> </s:extension> </s:complexContent> </s:complexType> <s:element name="Logout"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="userLoginID" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="userSeqID" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="validationKey" type="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="LogoutResponse"> <s:complexType /> </s:element> </s:schema> </wsdl:types> <wsdl:message name="LoginSoapIn"> <wsdl:part name="parameters" element="tns:Login" /> </wsdl:message> <wsdl:message name="LoginSoapOut"> <wsdl:part name="parameters" element="tns:LoginResponse" /> </wsdl:message> <wsdl:message name="LogoutSoapIn"> <wsdl:part name="parameters" element="tns:Logout" /> </wsdl:message> <wsdl:message name="LogoutSoapOut"> <wsdl:part name="parameters" element="tns:LogoutResponse" /> </wsdl:message> <wsdl:portType name="AccountManagementSoap"> <wsdl:operation name="Login"> <wsdl:input message="tns:LoginSoapIn" /> <wsdl:output message="tns:LoginSoapOut" /> </wsdl:operation> <wsdl:operation name="Logout"> <wsdl:input message="tns:LogoutSoapIn" /> <wsdl:output message="tns:LogoutSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="AccountManagementSoap" type="tns:AccountManagementSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="Login"> <soap:operation soapAction="http://tempuri.org/Login" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="Logout"> <soap:operation soapAction="http://tempuri.org/Logout" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="AccountManagementSoap12" type="tns:AccountManagementSoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="Login"> <soap12:operation soapAction="http://tempuri.org/Login" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="Logout"> <soap12:operation soapAction="http://tempuri.org/Logout" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="AccountManagement"> <wsdl:port name="AccountManagementSoap" binding="tns:AccountManagementSoap"> <soap:address location="http://webservice.mcubeit.com/trs_webservice/services/AccountManagement.asmx" /> </wsdl:port> <wsdl:port name="AccountManagementSoap12" binding="tns:AccountManagementSoap12"> <soap12:address location="http://webservice.mcubeit.com/trs_webservice/services/AccountManagement.asmx" /> </wsdl:port> </wsdl:service> </wsdl:definitions> J2ME Code Snippet: String uname = username.getText(); String pass = password.getText(); String serviceUrl = "http://xxx.xxx.xxx/webservice/services/AccountManagement.asmx"; String serviceNameSpace = "http://tempuri.org/"; String soapAction = "http://tempuri.org/Login"; String methodName = "Login"; SoapObject rpc = new SoapObject(serviceNameSpace, methodName); rpc.addProperty("userLoginID", uname.trim()); rpc.addProperty("password", pass.trim()); //rpc.addProperty("userSeqID", String.valueOf(192).toString()); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.bodyOut = rpc; envelope.dotNet = true; envelope.encodingStyle = SoapSerializationEnvelope.ENC; HttpTransport ht = new HttpTransport(serviceUrl); ht.debug = true; ht.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); String result = null; try { ht.call(soapAction, envelope); result = (envelope.getResponse()).toString(); System.out.println("Result :" + result.toString()); } catch (org.xmlpull.v1.XmlPullParserException ex2) { System.out.println("XmlPullParserException :" + ex2.toString()); System.out.println("Request \n" + ht.requestDump); System.out.println("Response \n" + ht.responseDump); } catch (SoapFault sf) { System.out.println("SoapFault :" + sf.faultstring); System.out.println("Request \n" + ht.requestDump); System.out.println("Response \n" + ht.responseDump); } catch (IOException ioe) { System.out.println("IOException :" + ioe.toString()); System.out.println("Request \n" + ht.requestDump); System.out.println("Response \n" + ht.responseDump); } RESPONSE Result :CustomerBin{CompanyCodeSeqId=-1; Image=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==; DateOfBirth=1900-01-01T00:00:00; UserSeqId=192; UserFirstName=Sachin; UserLastName=Nevase; PassWord=anyType{}; UserRole=Customer; UserSSN=-2147483648; [email protected]; MobileNumber=804131244; CreatedDate=1900-01-01T00:00:00; ModifiedDate=1900-01-01T00:00:00; UserGroup=Customer; SecretQuestionID=-2147483648; SecretAnswer=anyType{}; WorkPhone=anyType{}; HomePhone=anyType{}; Company=anyType{}; PreviousLoginTime=2010-05-04T23:38:34; LoginTime=1900-01-01T00:00:00; PassengesDetails=anyType{PassengerBin=anyType{CustomerSeqID=192; [email protected]; PhoneNumber=0804131244; LastName=Nevase; FirstName=Sachin; PassengerSeqID=55; IsSelf=true; }; }; CustomerCompanyID=-1; CustomerType=Individual; PassengerGradeName=Grade1; PassengerGradeID=1; } Thanks, Sachin

    Read the article

  • How to create a magic square in PHP?

    - by TerranRich
    I'd like to try my hand at creating a Magic Square in PHP (i.e. a grid of numbers that all add up to the same value), but I really don't know where to start. I know of the many methods that create magic square, such as starting "1" at a fixed position, then moving in a specific direction with each iteration. But that doesn't create a truly randomized Magic Square, which is what I'm aiming for. I want to be able to generate an N-by-N Magic Square of N² numbers where each row and column adds up to N(N²+1)/2 (e.g. a 5x5 square where all rows/columns add up to 65 — the diagonals don't matter). Can anybody provide a starting point? I don't want anybody to do the work for me, I just need to know how to start such a project? I know of one generator, written in Java (http://www.dr-mikes-math-games-for-kids.com/how-to-make-a-magic-square.html) but the last Java experience I had was over 10 years ago before I quickly abandoned it. Therefore, I don't really understand what the code is actually doing. I did notice, however, that when you generate a new square, it shows the numbers 1-25 (for a 5x5 square), in order, before quickly generating a fresh randomized square.

    Read the article

  • how do i save time to a file?

    - by blood
    hi, i have a program that saves data to file and i want to put a time stamp of the current date/time on that log but when i try to write the time to the file it will not show up. #include <iostream> #include <windows.h> #include <fstream> #include <string> #include <sstream> #include <direct.h> #include <stdio.h> #include <time.h> using namespace std; string header_str = ("NULL"); int main() { for(;;) { stringstream header(stringstream::in | stringstream::out); header << "datasdasdasd_"; time_t rawtime; time ( &rawtime ); header << ctime (&rawtime); header_str = header.str(); fstream filestr; filestr.open ("C:\\test.txt", fstream::in | fstream::out | fstream::app | ios_base::binary | ios_base::out); for(;;) { filestr << (header_str); } filestr.close(); } return 0; } anyone know how to fix this?

    Read the article

  • Ruby LESS gem equivalent in Python

    - by Sean M
    The Ruby LESS gem looks awesome - and I am working on a Python/Pylons web project where it would be highly useful. CSS is, as someone we're all familiar with recently wrote about, clunky in some important ways. So I'd like to make it easier on myself. Is there an existing Python module or library that provides parallel functionality?

    Read the article

  • Books on Debugging Techniques?

    - by zooropa
    Are there any books on debugging techniques? A friend of mine is learning to code and he asked me this question. I told him I don't know of any. Is it that you just have to go through the School of Hard Knocks to learn?

    Read the article

  • Data Validation for Random varying Phone Numbers

    - by baron
    I am storing phone numbers of varying lengths in my WPF (C#, VS 08) App. I store them as strings. My question is about my method AddNewPhoneNo(string phoneNo). In this method, I use Int.TryParse to validate the incoming number (i.e. not null, is numeric...). I've since realized this is probably not the best way to do this, because then I am limited to a number which is ± 2147483647. Definetly this is not always the case with phone numbers. What is a good, easy way to validate phone numbers? I guess the basic rules would be as follows: All numeric All positive Upto 25 chars (could be more, but this will to do for time being) Can't thing if theres any more rules at the moment, that's probably it.

    Read the article

  • Trying to understand MVC Models, Advice?

    - by Tyler
    I am writing my own MVC for the purpose of learning it. I have pretty much everything "down-pat" and my main stuff written besides models due to some trouble understanding them and lack of viable examples. Now, I've been told a model should reprecent a single row, someone told me, your model class should on update/insert and delete rows, anything that involves fetching a single or multiple rows - a "finder" class should be used. So... a) what is a finder class, b) how do I implement it in a useage example, c) Is what I've been told about models correct or is there a better way than "finders"? Advice is much appricated :)

    Read the article

  • DirtyPageReminder

    Use a DirtyPageReminder to alert users for unsaved changes when they navigate away from the current pages or close the browsers.

    Read the article

  • Remove value from array?

    - by Rajesh45
    Hello friend, How can I take out one line of this array array< array< int^ >^ >^ sample = gcnew array< array< int^ >^ >{ gcnew array<int>{0, 0, 0, 0, 0}, gcnew array<int>{1, 1, 1, 1, 1}, gcnew array<int>{2, 2, 2, 2, 2}, }; So it would be :- array< array< int^ >^ >^ sample = gcnew array< array< int^ >^ >{ gcnew array<int>{0, 0, 0, 0, 0}, gcnew array<int>{2, 2, 2, 2, 2}, }; Rajesh.

    Read the article

  • Retrieving specific tuples using Mysql

    - by Narayanan
    Hi, I have some problems retrieving specific tuples. I am actually a student trying to build a Room management system. I have two tables: Room(roomID,hotelname,rate) and Reservation(resID,arriveDate,departDate,roomID). I am not sure how to retrieve the rooms that are available between 2 specific dates. This was the query that i used. SELECT Room.roomID,hotelname,rate FROM Room LEFT JOIN Reservation on ( Room.roomID=Reservation.resID and arriveDate >='2010-02-16' and departDate <='2010-02-20' ) GROUP BY roomID,hotelname,rate HAVING count(*)=0;' but it returns an empty set. Can any1 be kind enough to tell me what mistake i am doing??

    Read the article

  • How much of Grails GORM to test?

    - by Lloyd Meinholz
    Is there a "best practice" or defacto standard with how much of the GORM functionality one should test in the unit/functional tests? My take is that one should probably do most of the domain testing as functional tests so that you get the full grails environment. But what do you test? Inserts, updates, deletes? Do you test constraints even though they were probably more thoroughly tested by the grails release? Or do you just assume that GORM does what it is supposed to do and move to other parts of the application?

    Read the article

  • How to do wpf datavalidation with Ado.net

    - by biju
    How can i use data validation mechanisms with ado.net datatable or datasets. I have an input form which i am binding to a datatable.Now i want to do input validation how can i do that.I have tried using validationRules but i cant bind parameters to it.I tried using idataerrorinfo but cant get a clue.can someone provide some input..?

    Read the article

  • Using PHP as template language

    - by Kunal
    I wrote up this quick class to do templating via PHP -- I was wondering if this is easily exploitable if I were ever to open up templating to users (not the immediate plan, but thinking down the road). class Template { private $allowed_methods = array( 'if', 'switch', 'foreach', 'for', 'while' ); private function secure_code($template_code) { $php_section_pattern = '/\<\?(.*?)\?\>/'; $php_method_pattern = '/([a-zA-Z0-9_]+)[\s]*\(/'; preg_match_all($php_section_pattern, $template_code, $matches); foreach (array_unique($matches[1]) as $index => $code_chunk) { preg_match_all($php_method_pattern, $code_chunk, $sub_matches); $code_allowed = true; foreach ($sub_matches[1] as $method_name) { if (!in_array($method_name, $this->allowed_methods)) { $code_allowed = false; break; } } if (!$code_allowed) { $template_code = str_replace($matches[0][$index], '', $template_code); } } return $template_code; } public function render($template_code, $params) { extract($params); ob_start(); eval('?>'.$this->secure_code($template_code).'<?php '); $result = ob_get_contents(); ob_end_clean(); return $result; } } Example usage: $template_code = '<?= $title ?><? foreach ($photos as $photo): ?><img src="<?= $photo ?>"><? endforeach ?>'; $params = array('title' => 'My Title', 'photos' => array('img1.jpg', 'img2.jpg')); $template = new Template; echo $template->render($template_code, $params); The idea here is that I'd store the templates (PHP code) in the database, and then run it through the class which uses regular expressions to only allow permitted methods (if, for, etc.). Anyone see an obvious way to exploit this and run arbitrary PHP? If so, I'll probably go the more standard route of a templating language such as Smarty...

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >