Search Results

Search found 319 results on 13 pages for 'ans'.

Page 10/13 | < Previous Page | 6 7 8 9 10 11 12 13  | Next Page >

  • A think on sum(X, 1)

    - by Runner
    >> X = [0 1 2 3 4 5] >> sum(X, 1) ans = 3 5 7 sum(X, 1) should sum along the 1st dimension(row) as per the document says: S = SUM(X,DIM) sums along the dimension DIM. But why does it actually sums along the 2nd dimension(column)?

    Read the article

  • Which license do you choose for google code projects, and why?

    - by Remus Rusanu
    Starting a new project on Google code offers a choice of several licenses: Apache License 2.0 Artistic License/GPL Eclipse Public License GPL v2/v3 Lesser GPL MIT Mozilla License 1.1 New BSD License Which license do you choose, ans why? I'm also interested in opinions which license is the least restrictive license for commercial users, ie. allow commercial use of the code w/o restrictions.

    Read the article

  • synchronized in java - Proper use

    - by ZoharYosef
    I'm building a simple program to use in multi processes (Threads). My question is more to understand - when I have to use a reserved word synchronized? Do I need to use this word in any method that affects the bone variables? I know I can put it on any method that is not static, but I want to understand more. thank you! here is the code: public class Container { // *** data members *** public static final int INIT_SIZE=10; // the first (init) size of the set. public static final int RESCALE=10; // the re-scale factor of this set. private int _sp=0; public Object[] _data; /************ Constructors ************/ public Container(){ _sp=0; _data = new Object[INIT_SIZE]; } public Container(Container other) { // copy constructor this(); for(int i=0;i<other.size();i++) this.add(other.at(i)); } /** return true is this collection is empty, else return false. */ public synchronized boolean isEmpty() {return _sp==0;} /** add an Object to this set */ public synchronized void add (Object p){ if (_sp==_data.length) rescale(RESCALE); _data[_sp] = p; // shellow copy semantic. _sp++; } /** returns the actual amount of Objects contained in this collection */ public synchronized int size() {return _sp;} /** returns true if this container contains an element which is equals to ob */ public synchronized boolean isMember(Object ob) { return get(ob)!=-1; } /** return the index of the first object which equals ob, if none returns -1 */ public synchronized int get(Object ob) { int ans=-1; for(int i=0;i<size();i=i+1) if(at(i).equals(ob)) return i; return ans; } /** returns the element located at the ind place in this container (null if out of range) */ public synchronized Object at(int p){ if (p>=0 && p<size()) return _data[p]; else return null; }

    Read the article

  • How are classes more secure than structures ?

    - by Asad Hanif
    Structure's member are public by default ans class's members are private by default. We can access private data members through a proper channel (using member function). If we have access to member functions we can read/write data in private data member, so how it is secure...we are accessing it and we are changing data too.....

    Read the article

  • Why is the application not starting from top...

    - by user536213
    i have created iphone game.When i pause the game using pause button i quit cliking quit button... Now when i start the game again ..the previous counter i created using this code... [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(updateTimerFunc) userInfo:nil repeats:YES]; the timer is 100 sec and moves to zero...now it start giving the difference of twwo ,,98,96,94 if i quit the game again ans start this time the difference will become of 4 96,92 ...its keep on increasing ....what is this issue? kindly help

    Read the article

  • How classes are secure than structures ?

    - by Asad Hanif
    Structure's member are public by default ans class's members are private by default. We can access private data members through a proper channel (using member function). If we have access to member functions we can read/write data in private data member, so how it is secure...we are accessing it and we are changing data too.....

    Read the article

  • Link List Problem,

    - by david
    OK i have a problem with a Link List program i'm trying to Do, the link List is working fine. Here is my code #include <iostream> using namespace std; struct record { string word; struct record * link; }; typedef struct record node; node * insert_Node( node * head, node * previous, string key ); node * search( node *head, string key, int *found); void displayList(node *head); node * delete_node( node *head, node * previous, string key); int main() { node * previous, * head = NULL; int found = 0; string node1Data,newNodeData, nextData,lastData; //set up first node cout <<"Depature"<<endl; cin >>node1Data; previous = search( head, node1Data, &found); cout <<"Previous" <<previous<<endl; head = insert_Node(head, previous, node1Data); cout <<"Depature inserted"<<endl; //insert node between first node and head cout <<"Destination"<<endl; cin >>newNodeData; previous = search( head, newNodeData, &found); cout <<"Previous" <<previous<<endl; head = insert_Node(head, previous, newNodeData); cout <<"Destinationinserted"<<endl; //insert node between second node and head cout <<"Cost"<<endl; cin >>newNodeData; previous = search( head, newNodeData, &found); cout <<"Previous" <<previous<<endl; head = insert_Node(head, previous, newNodeData); cout <<"Cost inserted"<<endl; cout <<"Number of Seats Required"<<endl; //place node between new node and first node cin >>nextData; previous = search( head, nextData, &found); cout <<"Previous" <<previous<<endl; head = insert_Node(head, previous, nextData); cout <<"Number of Seats Required inserted"<<endl; //insert node between first node and head cout <<"Name"<<endl; cin >>newNodeData; previous = search( head, newNodeData, &found); cout <<"Previous" <<previous<<endl; head = insert_Node(head, previous, newNodeData); cout <<"Name inserted"<<endl; //insert node between node and head cout <<"Address "<<endl; cin >>newNodeData; previous = search( head, newNodeData, &found); cout <<"Previous" <<previous<<endl; head = insert_Node(head, previous, newNodeData); cout <<"Address inserted"<<endl; //place node as very last node cin >>lastData; previous = search( head, lastData, &found); cout <<"Previous" <<previous<<endl; head = insert_Node(head, previous, lastData); cout <<"C"<<endl; displayList(head); char Ans = 'y'; //Delete nodes do { cout <<"Enter Keyword to be delete"<<endl; cin >>nextData; previous = search( head, nextData, &found); if (found == 1) head = delete_node( head, previous,nextData); displayList(head); cout <<"Do you want to Delete more y /n "<<endl; cin >> Ans; } while( Ans =='y'); int choice, i=0, counter=0; int fclass[10]; int coach[10]; printf("Welcome to the booking program"); printf("\n-----------------"); do{ printf("\n Please pick one of the following option:"); printf("\n 1) Reserve a first class seat on Flight 101."); printf("\n 2) Reserve a coach seat on Flight 101."); printf("\n 3) Quit "); printf("\n ---------------------------------------------------------------------"); printf("\nYour choice?"); scanf("%d",&choice); switch(choice) { case 1: i++; if (i <10){ printf("Here is your seat: %d " , fclass[i]); } else if (i = 10) { printf("Sorry there is no more seats on First Class. Please wait for the next flight"); } break; case 2: if (i <10){ printf("Here is your Seat Coach: %d " , coach[i]); } else if ( i = 10) { printf("Sorry their is no more Seats on Coach. Please wait for the next flight"); } break; case 3: printf("Thank you and goodbye\n"); //exit(0); } } while (choice != 3); } /******************************************************* search function to return previous position of node ******************************************************/ node * search( node *head, string key, int *found) { node * previous, * current; current = head; previous = current; *found = 0;//not found //if (current->word < key) move through links until the next link //matches or current_word > key while( current !=NULL) { //compare exactly if (key ==current->word ) { *found = 1; break; } //if key is less than word else if ( key < current->word ) break; else { //previous stays one link behind current previous = current; current = previous -> link; } } return previous; } /******************************************************** display function as used with createList ******************************************************/ void displayList(node *head) { node * current; //current now contains the address held of the 1st node similar //to head current = head; cout << "\n\n"; if( current ==NULL) cout << "Empty List\n\n"; else { /*Keep going displaying the contents of the list and set current to the address of the next node. When set to null, there are no more nodes */ while(current !=NULL) { cout << current->word<<endl; current = current ->link; } } } /************************************************************ insert node used to position node (i) empty list head = NULL (ii) to position node before the first node key < head->word (iii) every other position including the end of the list This is done using the following steps (a) Pass in all the details to create the node either details or a whole record (b) Pass the details over to fill the node (C) Use the if statement to add the node to the list **********************************************************/ node * insert_Node( node * head, node * previous, string key ) { node * new_node, * temp; new_node = new node; //create the node new_node ->word = key; new_node -> link = NULL; if (head == NULL || key < head->word ) //empty list { //give address of head to temp temp = head; //head now points to the new_node head = new_node; //new_node now points to what head was pointing at new_node -> link = temp; } else { //pass address held in link to temp temp = previous-> link; //put address of new node to link of previous previous -> link = new_node; //pass address of temp to link of new node new_node -> link = temp; } return head; } node * delete_node( node *head, node * previous, string key) { /* this function will delete a node but will not return its contents */ node * temp; if(key == head->word) //delete node at head of list { temp = head; //point head at the next node head = head -> link; } else { //holds the address of the node after the one // to be deleted temp = previous-> link; /*assign the previous to the address of the present node to be deleted which holds the address of the next node */ previous-> link = previous-> link-> link; } delete temp; return head; }//end delete The problem i have is when i Enter in the Number 2 in the Node(Seats) i like to get a Counter Taken 2 off of 50, some thing like what i have here enter code here int choice, i=0, counter=0; int fclass[10]; int coach[10]; printf("Welcome to the booking program"); printf("\n-----------------"); do{ printf("\n Please pick one of the following option:"); printf("\n 1) Reserve a first class seat on Flight 101."); printf("\n 2) Reserve a coach seat on Flight 101."); printf("\n 3) Quit "); printf("\n ---------------------------------------------------------------------"); printf("\nYour choice?"); scanf("%d",&choice); switch(choice) { case 1: i++; if (i <10){ printf("Here is your seat: %d " , fclass[i]); } else if (i = 10) { printf("Sorry there is no more seats on First Class. Please wait for the next flight"); } break; case 2: if (i <10){ printf("Here is your Seat Coach: %d " , coach[i]); } else if ( i = 10) { printf("Sorry their is no more Seats on Coach. Please wait for the next flight"); } break; case 3: printf("Thank you and goodbye\n"); //exit(0); } } while (choice != 3); How can i get what the User enters into number of Seats into this function

    Read the article

  • OpenIndiana installation hangs at 2% - Preparing disk for OpenIndiana installation

    - by Chris S
    I've been trying to install OpenIndiana on an HP DL320 G6 for a while now. I've got a 16GB HP SDHC card in the onboard slot and a SATA CD-Rom with oi-dev-151a-text-x86.iso burnt to a disc. Installation seems to progress fine until I get to the actual installation portion. The SD card is picked up as a USB Disk. All the other configuration options are very 'normal' (there really aren't many options to begin with). Automatic NIC configuration. The installer starts "Installing OpenIndiana", does a few steps, then gets to "Preparing disk for OpenIndiana installation" at 2%; and just sits there. I've let it sit for half an hour now ans still no progress. How can I get past this issue? PS I'm not terribly familiar with OpenSolaris, but am with FreeBSD and *nix CLIs in general.

    Read the article

  • SBS 08 Backup fail

    - by Bastien974
    I'm trying to backup my SBS 08 (only C:) with Windows Server Backup. It fails a few minutes after it started : Backup started at '08/12/2009 1:27:23 PM' failed as Volume Shadow copy operation failed for backup volumes with following error code '2155348022'. Please rerun backup once issue is resolved. In the EventViewer i have lots of error : VSS : 12289 SQLVDI : 1 MSSQL$MICROSOFT##SSEE : 18210 MSSQL$MICROSOFT##SSEE : 3041 SQLWRITER : 24583 All VSS ans SQL services are started. I have WSUS 3.0, Exchange 07. I don't have any third party backup software running at the same time. Thanks for your help !

    Read the article

  • Google's Search Box in SharePoint

    - by Evan M.
    Has anyone here looked at the Google Search Box for SharePoint? We're looking into it as part of our MOSS deployment since we also use Google's GSA, and I'm personally not impressed with it, while a colleague seems to think that it's the only option we should be using, or even considering. While I've got no problems with the GSA indexing our SharePoint content, the Search Box just seems clumsy. It looks horrible, the results being returned are much more limited than what I get if I use the GSA search page itself, configuring it has been nothing but a PITA and it's still only got a basic config ans isn't respecting things like user permissions or search scopes that the default SharePoint Indexer and search controls handle out of the box. What are your guys thoughts? Am I being overly critical, and should just spend more time trying to configure it? Are you using a split-personality with it yourself, where you have the GSA for enterprise wide search, but use SharePoint for local searches? Other thoughts?

    Read the article

  • Point dns server to root dns servers [duplicate]

    - by Dhaksh
    This question already has an answer here: What is a glue record? 3 answers Why does DNS work the way it does? 4 answers I have setup a custom authoritative only DNS server using bind9. Its a Master ans Slave method. Assume DNS Servers are: ns1.customdnsserver.com [192.168.91.129] ==> Master ns2.customdnsserver.com [192.168.91.130] ==> Slave Now i will host few shared hosting websites in my own web server. Where i will link above Nameservers to my domains in shared hosting. My Question is: How do i tell root DNS servers about my own authoritative only DNS server? So that when someone queries for domain www.example.com and if the domain's website is hosted in my shared hosting i want root servers to point the query to my own DNS Server so that the www.example.com get resolved for IP address.

    Read the article

  • [iTunes] Using custom ID3-Tags?

    - by shox
    Hi guys, I hope I am in the right forum for this question. I love foobar2000 on windows and have 2 custom Tags for my mp3s Rate and mood. Now I have to use a Mac to play my music and emulating foobar won't work, because foobar has to recreate its database every time it starts... ans thats about 2h of hahsing - no good. So is there any way to read out, order by and write custom tags with iTunes or any other, if possible free, mac app? Thanks for your answers.

    Read the article

  • Setting Password for phpMyAdmin

    - by anitha
    am using rhel 5 and php 5 with mysql 5. My server is already configured and running all applications smoothly. I am accessing mysql as root and password is 'anitha123'. but when i am accessing phpmyadmin through browser, it is not asking for password. Somebody please tell me how can i set it like prompting for username ans password. Since i am not familiar with php mysql please tell me how to do it in simple way. thanks and regards a anitha

    Read the article

  • SBS 08 Backup fail

    - by Bastien974
    Hi, I'm trying to backup my SBS 08 (only C:) with Windows Server Backup. It fails a few minutes after it started : Backup started at '08/12/2009 1:27:23 PM' failed as Volume Shadow copy operation failed for backup volumes with following error code '2155348022'. Please rerun backup once issue is resolved. In the EventViewer i have lots of error : VSS : 12289 SQLVDI : 1 MSSQL$MICROSOFT##SSEE : 18210 MSSQL$MICROSOFT##SSEE : 3041 SQLWRITER : 24583 All VSS ans SQL services are started. I have WSUS 3.0, Exchange 07. I don't have any third party backup software running at the same time. Thanks for your help !

    Read the article

  • Monitoring IIS with SNMP

    - by Shtong
    Hello, I'm trying to monitor IIS using the Windows integrated SNMP service (for versions 2000, 2003 ans 2008 of Windows Server, but i'm doing my experiments on a 2008 R2 box). So far I was able to install the SNMP service, and query mib-2 values without problems. Now, I'm having trouble to monitor IIS informations, as the SNMP service does not seem to know about the .iso.org.dod.internet.private.enterprises.microsoft.software.internetServer OIDs. Walking the entire SNMP tree only gets the mib-2 stuff as well as the names of some services, but that's it. I did't find anything interesting in the service configuration panel. So how do I configure this service to get IIS information, or other WMI data for that matter (I installed the SNMP WMI Provider) ? I can't find any documentation about that !

    Read the article

  • How to input 64-bit hex values in octave

    - by Chris Ashton
    I'm trying to use Octave as a programmer's calculator. I want to input a 64-bit pointer, but when I do apparently the 64-bit value gets silently truncated to 32-bit: octave:44> base_ptr=0x1010101020202020 base_ptr = 538976288 octave:45> uint64(base_ptr) ans = 538976288 octave:46> printf("%lx\n", base_ptr) 20202020 So it seems like it's truncated the input value to the low 32-bits. I would use scanf, but the docs say it should only be used internally. How can I input the full 64-bit value? Alternately, is there some awesome free programmer's calculator out there for Windows? (I know Windows calculator has a programmer's mode but I would like arbitrary variable support). I tried using my ti-89 but it also doesn't support 64-bit hex.

    Read the article

  • SQL Server Management Studio - Error connecting to remote DB

    - by Julien Poulin
    All right, here is the deal: I'm connecting to a Windows 2003 Server using VPN. On this server, there is a remote SQL Server 2005 Express engine. I can connect to the database using Visual Studio 2008. What I can't do though, is connect to this same database with SQL Server 2005 Management Studio (Standard). I have checked the connection info a hundred times and still nothing. One thought: do VS ans SSMS use the same sql provider? Note: I'm running Windows 7 RC. I had absolutely no problem using the same config under Vista. This is the error I get when trying to connect with SSMS:

    Read the article

  • Mass modify all php files on my server

    - by anslume
    I would like to delete a php code on all my php files on my debian server. indeed I would like to get rid of a line: eval(base64_decode("DQplcnJvcl9yZXBvcnR")); It's present in many of my phpfiles. That's why I would like to find a script which is going to look it up in all my php files and replace itwith nothing? Do you have any idea how i could do that ? I know how to do it on windows with some software (notepad++ is very useful) but no idea how can I do that in a command line through ssh Thanks for your answer, Ans

    Read the article

  • openGL ES - change the render mode from RENDERMODE_WHEN_DIRTY to RENDERMODE_CONTINUOUSLY on touch

    - by Sid
    i want to change the rendermode from RENDERMODE_WHEN_DIRTY to RENDERMODE_CONTINUOUSLY when i touch the screen. WHAT i Need : Initially the object should be stationary. after touching the screen, it should move automatically. The motion of my object is a projectile motion ans it is working fine. what i get : Force close and a NULL pointer exception. My code : public class BallThrowGLSurfaceView extends GLSurfaceView{ MyRender _renderObj; Context context; GLSurfaceView glView; public BallThrowGLSurfaceView(Context context) { super(context); // TODO Auto-generated constructor stub _renderObj = new MyRender(context); this.setRenderer(_renderObj); this.setRenderMode(RENDERMODE_WHEN_DIRTY); this.requestFocus(); this.setFocusableInTouchMode(true); glView = new GLSurfaceView(context.getApplicationContext()); } @Override public boolean onTouchEvent(MotionEvent event) { // TODO Auto-generated method stub if (event != null) { if (event.getAction() == MotionEvent.ACTION_DOWN) { if (_renderObj != null) { Log.i("renderObj", _renderObj + "lll"); // Ensure we call switchMode() on the OpenGL thread. // queueEvent() is a method of GLSurfaceView that will do this for us. queueEvent(new Runnable() { public void run() { glView.setRenderMode(RENDERMODE_CONTINUOUSLY); } }); return true; } } } return super.onTouchEvent(event); } } PS : i know that i am making some silly mistakes in this, but cannot figure out what it really is.

    Read the article

  • Safari Mobile Multi-Line <Select> aka GWT Multi-Line ListBox

    - by McTrafik
    Hi guys. Working on a webapp here that must run on the iPad (so, Safari Mobile). I have this code that works fine in just about anything except iPad: <select class="gwt-ListBox" size="12" multiple="multiple"> <option value="Bleeding Eyelashes">Bleeding Eyelashes</option> <option value="Smelly Pupils">Smelly Pupils</option> <option value="Bushy Eyebrows">Bushy Eyebrows</option> <option value="Green Vessels">Green Vessels</option> <option value="Sucky Noses">Sucky Noses</option> </select> What it's supposed to look like is a box with 12 lines ans 5 of them filled up. It works fine in FF, IE, Chrome, Safari Win. But, when I open it on iPad, it's just a single line! Styling it with CSS doesn't work. It just makes the single line bigger if I set the height. Is there a way to make it behave the same way as in normal browsers, or do I nave to make a custom component? Thanks.

    Read the article

  • Can static methods be called using object/instance in .NET

    Ans is Yes and No   Yes in C++, Java and VB.NET No in C#   This is only compiler restriction in c#. You might see in some websites that we can break this restriction using reflection and delegates, but we can’t, according to my little research J I shall try to explain you…   Following is code sample to break this rule using reflection, it seems that it is possible to call a static method using an object, p1 using System; namespace T {     class Program     {         static void Main()         {             var p1 = new Person() { Name = "Smith" };             typeof(Person).GetMethod("TestStatMethod").Invoke(p1, new object[] { });                     }         class Person         {             public string Name { get; set; }             public static void TestStatMethod()             {                 Console.WriteLine("Hello");             }         }     } } but I do not think so this method is being called using p1 rather Type Name “Person”. I shall try to prove this… look at another example…  Test2 has been inherited from Test1. Let’s see various scenarios… Scenario1 using System; namespace T {     class Program     {         static void Main()         {             Test1 t = new Test1();            typeof(Test2).GetMethod("Method1").Invoke(t,                                  new object[] { });         }     }     class Test1     {         public static void Method1()         {             Console.WriteLine("At test1::Method1");         }     }       class Test2 : Test1     {         public static void Method1()         {             Console.WriteLine("At test1::Method2");         }     } } Output:   At test1::Method2 Scenario2         static void Main()         {             Test2 t = new Test2();            typeof(Test2).GetMethod("Method1").Invoke(t,                                          new object[] { });         }   Output:   At test1::Method2   Scenario3         static void Main()         {             Test1 t = new Test2();            typeof(Test2).GetMethod("Method1").Invoke(t,                             new object[] { });         }   Output: At test1::Method2 In all above scenarios output is same, that means, Reflection also not considering the object what you pass to Invoke method in case of static methods. It is always considering the type which you specify in typeof(). So, what is the use passing instance to “Invoke”. Let see below sample using System; namespace T {     class Program     {         static void Main()         {            typeof(Test2).GetMethod("Method1").                Invoke(null, new object[] { });         }     }       class Test1     {         public static void Method1()         {             Console.WriteLine("At test1::Method1");         }     }     class Test2 : Test1     {         public static void Method1()         {             Console.WriteLine("At test1::Method2");         }     } }   Output is   At test1::Method2   I was able to call Invoke “Method1” of Test2 without any object.  Yes, there no wonder here as Method1 is static. So we may conclude that static methods cannot be called using instances (only in c#) Why Microsoft has restricted it in C#? Ans: Really there Is no use calling static methods using objects because static methods are stateless. but still Java and C++ latest compilers allow calling static methods using instances. Java sample class Test {      public static void main(String str[])      {            Person p = new Person();            System.out.println(p.GetCount());      } }   class Person {   public static int GetCount()   {      return 100;   } }   Output          100 span.fullpost {display:none;}

    Read the article

  • Visual Studio Talk Show #118 is now online - Command-Query Responsibility Separation (French)

    - by guybarrette
    http://www.visualstudiotalkshow.com Erik Renaud: La séparation des responsabilités entre les commandes et les requêtes Nous discutons avec Erik Renaud de la séparation des responsabilités entre les commandes et les requêtes (Command-Query Responsibility Separation - CQRS). La plupart des applications lisent les données beaucoup plus fréquemment qu'ils font des écritures. Sur la base de cette déclaration, une bonne idée consiste à séparer le code qui est responsable de l’écriture des données du code qui est responsable des requêtes (lecture). Erik Renaud est un coach .NET et co-fondateur de nVentive, une société conseil qui aide les équipes de développement logiciel au moyen de « coaching » et de « guidance ». Ses mandats courants se concentrent dans les grandes institutions financières en créant de nouvelles équipes qui supportent directement leurs activités primaires. Erik cumule plus de 10 ans d’expérience en développement logiciel, en faisant du coaching pour des équipes pour des besoins en architecture, modélisation et analyse. Pour la seconde année, il a reçu de Microsoft la reconnaissance MVP. Il est un ScrumMaster certifié, ce qui l’aide à guider les équipes vers le succès, et offre souvent des formations pour les technologies orientées objet. Il peut être rejoint au [email protected], ou vu tout partout où le kendo est pratiqué. var addthis_pub="guybarrette";

    Read the article

  • Getting an invalidoperationexception when deserialising XML

    - by Paul Johnson
    Hi, I'm writing a simple proof of concept application to load up an XML file and depending on the very simple code, create a window and put something into it (it's for a much larger project). Due to limitations in Mono, I'm having to run in this way. The code I currently have looks like this using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Windows.Forms; using System.IO; using System.Collections; using System.Xml; using System.Xml.Serialization; namespace form_from_xml { public class xmlhandler : Form { public void loaddesign() { FormData f; f = null; try { string path_env = Path.GetDirectoryName(Application.ExecutablePath) + Path.DirectorySeparatorChar; // code dies on the line below XmlSerializer s = new XmlSerializer(typeof(FormData)); TextReader r = new StreamReader(path_env + "designer-test.xml"); f = (FormData)s.Deserialize(r); r.Close(); } catch (System.IO.FileNotFoundException) { MessageBox.Show("Unable to find the form file", "File not found", MessageBoxButtons.OK); } } } [XmlRoot("Forms")] public class FormData { private ArrayList formData; public FormData() { formData = new ArrayList(); } [XmlElement("Element")] public Elements[] elements { get { Elements[] elements = new Elements[formData.Count]; formData.CopyTo(elements); return elements; } set { if (value == null) return; Elements[] elements = (Elements[])value; formData.Clear(); foreach (Elements element in elements) formData.Add(element); } } public int AddItem(Elements element) { return formData.Add(element); } } public class Elements { [XmlAttribute("formname")] public string name; [XmlAttribute("winxsize")] public int winxs; [XmlAttribute("winysize")] public int winys; [XmlAttribute("type")] public object type; [XmlAttribute("xpos")] public int xpos; [XmlAttribute("ypos")] public int ypos; [XmlAttribute("externaldata")] public bool external; [XmlAttribute("externalplace")] public string externalplace; [XmlAttribute("text")] public string text; [XmlAttribute("questions")] public bool questions; [XmlAttribute("questiontype")] public object qtype; [XmlAttribute("numberqs")] public int numberqs; [XmlAttribute("answerfile")] public string ansfile; [XmlAttribute("backlink")] public int backlink; [XmlAttribute("forwardlink")] public int forwardlink; public Elements() { } public Elements(string fn, int wx, int wy, object t, int x, int y, bool ext, string extpl, string te, bool q, object qt, int num, string ans, int back, int end) { name = fn; winxs = wx; winys = wy; type = t; xpos = x; ypos = y; external = ext; externalplace = extpl; text = te; questions = q; qtype = qt; numberqs = num; ansfile = ans; backlink = back; forwardlink = end; } } } With a very simple xmlhandler xml = new xmlhander(); xml.loaddesign(); attached to a winform button. Everything is in the same namespace and the xml file actually exists. This is annoying me now - can anyone spot the error of my ways? Paul

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13  | Next Page >