Search Results

Search found 3192 results on 128 pages for 'implicit conversion'.

Page 5/128 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Use OpenOffice to do server-side ppt(x) to swf conversion

    - by Steven Xu
    I'd like to turn Powerpoint presentations to SWF files the same way that OpenOffice does it, except automatically through a command line call. I came across http://stackoverflow.com/questions/886144, which led me to explore PyUNO bridge, which comes with OpenOffice as well as the OpenOffice command line API, but I wasn't able to make anything productive of it. Any guidance is appreciated. If there is a good solution outside of OpenOffice, I would be happy to try it too.

    Read the article

  • Conversion of DOM element selection code to jQuery

    - by Tom McDonnell
    I have a large Javascript codebase to convert to jQuery. The code is structured such that DOM elements are created in Javascript (using a library called DomBuilder), and saved to variables if they will be needed later, before being added to the DOM. Eg. var inputs = { submitConfirm: INPUT({type: 'button', value: 'Submit'}), submitCancel : INPUT({type: 'button', value: 'Cancel'}) }; document.appendChild(inputs.submitConfirm); Then later for example... inputs.submitCancel.style.display = 'none'; inputs.submitCancel.addEventListener('click', onClickSubmitCancel, false); My problem is that jQuery seems to lack a way of manipulating DOM elements directly, as opposed to selecting them first (with for example $('#submitCancel'). Can anyone suggest a way to directly translate the last two Javascript lines given above to use jQuery, given that the DOM elements are already available, and so do not need to be selected?

    Read the article

  • Generic function to handle DataType Conversion

    - by Tommo1977
    I have the following function in C#, that I want to pass a MySQL DataReader value/object. If the value of the object passed is a DBNull I need to handle it and return a Null value of that data type e.g null int. Otherwise I want to convert the returned value like Convert.ToInt32(value) or similar. public static T ConvertFromDB<T>(object value) { return value == DBNull.Value ? default(T) : (T)value; } Can anyone offer any help on this ?

    Read the article

  • VB to C# conversion incongruency with lambdas

    - by Jason
    I have a bit of code that I have been tasked with converting to C# from VB. A snippet of mine seems like it cannot be converted from one to the other, and if so, I just don't know how to do it and am getting a little frustrated. Here's some background: OrderForm is an abstract class, inherited by Invoice (and also PurchaseOrder). The following VB snippet works correctly: Dim Invs As List(Of OrderForm) = GetForms(theOrder.OrderID) .... Dim inv As Invoice = Invs.Find( Function(someInv As Invoice) thePO.SubPONumber = someInv.SubInvoiceNumber) In C#, the best I came to converting this is: List<OrderForm> Invs = GetForms(theOrder.OrderID); .... Invoice inv = Invs.Find( (Invoice someInv) => thePO.SubPONumber == someInv.SubInvoiceNumber); However, I get the following error when I do this: Cannot convert lambda expression to delegate type 'System.Predicate' because the parameter types do not match the delegate parameter types Is there any way to fix this without restructuring my whole codebase?

    Read the article

  • C# Type Conversion

    - by PSU_Kardi
    Hi guys, I have two objects. Object A and Object B. Object A is an instance of a class that was generated from several XSD files. Used xsd.exe /c and compiled them. Now I have my new object. I also have a web service, returning something very similar to object A. So right now I have something along the lines of this: WebService.foo myResponseObj = MyService.GetObject(inData); MyFramework.foo myClientObj = new MyFramework.foo(); What I want to do is this myClientObj = (MyFramework.foo)myResponseObj However, it's not really liking this. Says "Cannot implicitly convert MyFramework.foo[] to WebService.foo[] Any ideas on how to resolve this? The object is quite large and they are basically identical.

    Read the article

  • C# Type conversion between two similar Datatable objects

    - by Ali
    I have .NET project with sync framework and two separate Datasets for MS SQL and Compact SQL. in my base class I have a generic DataTable object. in my derived classed I assign Typed DataTable to the generic object based on whether the application is operating online or offline: example: if (online) _dataTable = new MSSQLDataSet.Customer; else _dataTable = new CompactSQLDataSet.Customer; Now every where in my code i have to check and do a cast based on the current network mode like this: public void changeCustomerID(int ID) { if (online) (MSSQLDataSet.CustomerDataTable)_dataTable)[i].CustomerID = value; else (CompactMSSQLDataSet.CustomerDataTable)_dataTable)[i].CustomerID = value; } but I don't think this is very efficient and I believe it can be done in a smarter way to only use one line of code by dynamically getting the Type of _dataTable on the run time. my problem is at the design time, in order to acess datatable porperties such as "CustomerID" it has to be casted to either MSSQLDataSet.CustomerDataTable or CompactMSSQLDataSet.CustomerDataTable. Is there a way to have a function or a operator to convert the _datatable to its runtime type but still be able to use it's design time properties which are the same between the two types? something like: ((aType)_dataTable)[i].CustomerID = value; //or GetRuntimeType(_dataTable)[i].CustomerID = value;

    Read the article

  • .NET component for conversion to PDF

    - by Anvar
    Hi, I am looking for .NET component to convert different files into PDF format. Right now I need to be able to convert programmatically doc, xls and TIFF files to PDF. But I may need to deal with more file types in near future. I looked at Aspose.Words, it works good but for doc only. Is there any component on the market that would allow me to convert in my code all three file types? I would appreciate your suggestions. Thanks, Anvar

    Read the article

  • Delphi To Java code conversion: image.canvas.pixels

    - by Mattl
    I'm trying to convert an old Delphi program I wrote into Java to compile and run on my Android phone. I'm running the Android 2.1 operating system but am using version 1.6 of the SDK. I have a routine in Delphi where I set the colour of pixels on a canvas individually along the lines of: image1.canvas.pixels[x, y] := GetMyTColor(x, y); Is there a Java equivalent to the property on the Canvas: property Pixels[X, Y: Integer]: TColor

    Read the article

  • C# delegate to Java conversion

    - by Derek
    I am in the process of converting some code from C# to Java. I have never used C# before, but it has been pretty easy up to this point. I have a line that looks like this in the C# file: coverage.createMethod = delegate (Gridpoint gp){ //Some method stuff in here, with a return objecct } What exactly is this trying to do? It seems a little bit like an inline class but I am not sure how to go about converting htis to java

    Read the article

  • Java string to double conversion.

    - by wretrOvian
    Hi, I've been reading up on the net about the issues with handling float and double types in java. Unfortunately, the image is still not clear. Hence, i'm asking here direct. :( My MySQL table has various DECIMAL(m,d) columns. The m may range from 5 to 30. d stays a constant at 2. Question 1. What equivalent data-type should i be using in Java to work (i.e store, retrieve, and process) with the size of the values in my table? (I've settled with double - hence this post). Question 2. While trying to parse a double from a string, i'm getting errors Double dpu = new Double(dpuField.getText()); for example - "1" -> java.lang.NumberFormatException: empty String "10" -> 1.0 "101" -> 10.0 "101." -> 101.0 "101.1" -> 101.0 "101.19" -> 101.1 What am i doing wrong? What is the correct way to convert a string to a double value? And what measures should i take to perform operations on such values?

    Read the article

  • Conversion between different template instantiation of the same template

    - by Naveen
    I am trying to write an operator which converts between the differnt types of the same implementation. This is the sample code: template <class T = int> class A { public: A() : m_a(0){} template <class U> operator A<U>() { A<U> u; u.m_a = m_a; return u; } private: int m_a; }; int main(void) { A<int> a; A<double> b = a; return 0; } However, it gives the following error for line u.m_a = m_a;. Error 2 error C2248: 'A::m_a' : cannot access private member declared in class 'A' d:\VC++\Vs8Console\Vs8Console\Vs8Console.cpp 30 Vs8Console I understand the error is because A<U> is a totally different type from A<T>. Is there any simple way of solving this (may be using a friend?) other than providing setter and getter methods? I am using Visual studio 2008 if it matters.

    Read the article

  • prevent conversion of <br/>

    - by Chris
    Hello, I fear this is a dumb question, but I can't seem to find the answer. Pretty sure what that makes me...... I have C# generated HTML (HtmlGenerator), to which I sometimes want to insert a line break at a certain part of a cell's innertext. Here is how that comes out: <TD >There are lots of extra &lt; br /&gt; words here </TD> This then displays the <br/> as a part of my cell text - not good. Am I missing an easy way to have the <br/> preserved and not converted to &lt, etc...? thanks

    Read the article

  • String / DateTime Conversion problem (asp.net vb)

    - by Phil
    I have this code: Dim birthdaystring As String = MonthBirth.SelectedValue.ToString & "/" & DayBirth.SelectedValue.ToString & "/" & YearBirth.SelectedValue.ToString Dim birthday As DateTime = Convert.ToDateTime(birthdaystring) Which produces errors (String was not recognized as a valid DateTime.) The string was "01/31/1963". Any assistance would be appreciated. Thanks.

    Read the article

  • NHibernate Entity code conversion from #C to VB.Net

    - by CoderRoller
    Hello and thanks for your help in advance. I am starting on the NHibernate world and i am experimenting with the NHibernate CookBook recipes, i am trying to set a base entity class for my entities and this is the C# code for this. I would like to know whats the VB.NET version so i can implement it in my sample project. This is the C# code: public abstract class Entity<TId> { public virtual TId Id { get; protected set; } public override bool Equals(object obj) { return Equals(obj as Entity<TId>); } private static bool IsTransient(Entity<TId> obj) { return obj != null && Equals(obj.Id, default(TId)); } private Type GetUnproxiedType() { return GetType(); } public virtual bool Equals(Entity<TId> other) { if (other == null) return false; if (ReferenceEquals(this, other)) return true; if (!IsTransient(this) && !IsTransient(other) && Equals(Id, other.Id)) { var otherType = other.GetUnproxiedType(); var thisType = GetUnproxiedType(); return thisType.IsAssignableFrom(otherType) || otherType.IsAssignableFrom(thisType); } return false; } public override int GetHashCode() { if (Equals(Id, default(TId))) return base.GetHashCode(); return Id.GetHashCode(); } } I tried using an online converter but puts a Nothing reference in place of default(TId) that doesn't seem right to me that's why I request for help: Private Shared Function IsTransient(obj As Entity(Of TId)) As Boolean Return obj IsNot Nothing AndAlso Equals(obj.Id, Nothing) End Function I Would appreciate the insight you may give me on the subject.

    Read the article

  • Conversion of text to unicode strings...

    - by user154301
    I have to process JSON files that looks like this: \u0432\u043b\u0430\u0434\u043e\u043c <b>\u043f\u0443\u0442\u0438\u043c<\/b> \u043d\u0430\u0447 Unfortunately, I'm not sure how this encoding is called. I would like to convert it to .NET Unicode strings. What's the easies way to do it? Thanks in advance!

    Read the article

  • Implicit and Explicit implementations for Multiple Interface inheritance

    Following C#.NET demo explains you all the scenarios for implementation of Interface methods to classes. There are two ways you can implement a interface method to a class. 1. Implicit Implementation 2. Explicit Implementation. Please go though the sample. using System;   namespace ImpExpTest { class Program { static void Main(string[] args) { C o3 = new C(); Console.WriteLine(o3.fu());   I1 o1 = new C(); Console.WriteLine(o1.fu());   I2 o2 = new C(); Console.WriteLine(o2.fu());   var o4 = new C(); //var is considered as C Console.WriteLine(o4.fu());   var o5 = (I1)new C(); //var is considered as I1 Console.WriteLine(o5.fu());   var o6 = (I2)new C(); //var is considered as I2 Console.WriteLine(o6.fu());   D o7 = new D(); Console.WriteLine(o7.fu());   I1 o8 = new D(); Console.WriteLine(o8.fu());   I2 o9 = new D(); Console.WriteLine(o9.fu()); } }   interface I1 { string fu(); }   interface I2 { string fu(); }   class C : I1, I2 { #region Imicitly Defined I1 Members public string fu() { return "Hello C"; } #endregion Imicitly Defined I1 Members   #region Explicitly Defined I1 Members   string I1.fu() { return "Hello from I1"; }   #endregion Explicitly Defined I1 Members   #region Explicitly Defined I2 Members   string I2.fu() { return "Hello from I2"; }   #endregion Explicitly Defined I2 Members }   class D : C { #region Imicitly Defined I1 Members public string fu() { return "Hello from D"; } #endregion Imicitly Defined I1 Members } }.csharpcode, .csharpcode pre{ font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em;}.csharpcode .lnum { color: #606060; }Output:-Hello C Hello from I1 Hello from I2 Hello C Hello from I1 Hello from I2 Hello from D Hello from I1 Hello from I2 span.fullpost {display:none;}

    Read the article

  • VSFTPD and Implicit SSL

    - by Luma
    Hi Everyone, I have a Debian Dedicated server and I want to enable Implicit SSL on it using VSFTPD and I am having a hard time. I have read online and the only thing I can really find is how to enable SSL and in the man pages it lists one implicit ssl command. but since Implicit ssl uses a second listener (990 by default) I have no idea how to make it work on Debian. Has anyone managed to get this working? Here is my config: listen=YES anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 connect_from_port_20=YES pam_service_name=vsftpd ssl_enable=YES allow_anon_ssl=NO force_local_data_ssl=NO force_local_logins_ssl=NO ssl_tlsv1=YES ssl_sslv2=NO ssl_sslv3=NO rsa_cert_file=/etc/ssl/certs/vsftpd.pem if I include Implicit_SSL=YES the server won't even start. thanks

    Read the article

  • Implicit and Explicit implementations for Multiple Interface inheritance

    Following C#.NET demo explains you all the scenarios for implementation of Interface methods to classes. There are two ways you can implement a interface method to a class. 1. Implicit Implementation 2. Explicit Implementation. Please go though the sample. using System; namespace ImpExpTest {     class Program     {         static void Main(string[] args)         {             C o3 = new C();             Console.WriteLine(o3.fu());             I1 o1 = new C();             Console.WriteLine(o1.fu());             I2 o2 = new C();             Console.WriteLine(o2.fu());             var o4 = new C();       //var is considered as C             Console.WriteLine(o4.fu());             var o5 = (I1)new C();   //var is considered as I1             Console.WriteLine(o5.fu());             var o6 = (I2)new C();   //var is considered as I2             Console.WriteLine(o6.fu());             D o7 = new D();             Console.WriteLine(o7.fu());             I1 o8 = new D();             Console.WriteLine(o8.fu());             I2 o9 = new D();             Console.WriteLine(o9.fu());         }     }     interface I1     {         string fu();     }     interface I2     {         string fu();     }     class C : I1, I2     {         #region Imicitly Defined I1 Members         public string fu()         {             return "Hello C"         }         #endregion Imicitly Defined I1 Members         #region Explicitly Defined I1 Members         string I1.fu()         {             return "Hello from I1";         }         #endregion Explicitly Defined I1 Members         #region Explicitly Defined I2 Members         string I2.fu()         {             return "Hello from I2";         }         #endregion Explicitly Defined I2 Members     }     class D : C     {         #region Imicitly Defined I1 Members         public string fu()         {             return "Hello from D";         }         #endregion Imicitly Defined I1 Members     } } Output:- Hello C Hello from I1 Hello from I2 Hello C Hello from I1 Hello from I2 Hello from D Hello from I1 Hello from I2 span.fullpost {display:none;}

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >