conversion

How to convert Integer to Date in JSP page and then format that Date ?

I get following varaiable, but I cannot format Integer, so is there any way to convert Integer to Date in JSP page? <fmt:formatDate value="${c.dateInIntegerValue}" pattern="dd.MM.yyyy hh:mm"/> ...

JavaScript: convert to currency format

Is there a built in function of JavaScript to convert a string into a current format? For example var a = '1234'; a.convertToCurrency(); // return $1,234 UPDATE Please note that I want the function to return the currency to include the US comma to group digits. ...

WPF binding with explicit conversion.

Hello everyone, My question may be a repeat of other conversion question but I feel mine is different. Here goes... [simplified example]. public class DataWrapper<T> { public T DataValue{ get; set; } public DataWrapper(T value) { DataValue = value; } public static explicit operator DataWrapper<T> (T value...

String to Unicode conversion with VB.NET

How could i convert a Greek string, to Unicode with VB.NET, without knowing the source encoding? ...

Validating a Timezone String and Returning it as Minutes

I I have a timezone taken from a user that must be converted into total minutes to be stored in the database. I have the following code and it looks pretty ugly. I am new to C# and was wondering if there is a better way to do this. string tz = userList.Rows[0][1].ToString().Trim(); //Timezones can take the form of + or - followe...

How can I know which values are numeric in oracle 9i

I have this database which contains a varchar. I want to know which records holds numeric values. I tried REGEXP_COUNT and other but I'm running on 9i and I think this is for 10g > How can I achieve this? I tried: select to_number( my_column ) from my_table But it doesn't work, because well not all of them are numeric. EDIT Ba...

OLEVariant to .Net byte[]

I have an OLEVariant disguised as a .Net object that I recieve from a client-side component over the net. I know that the contents are an array of bytes, but I don't know how to convert those contents to a native .Net byte array (byte[]). Any clues on how I can accomplish the conversion? Edit: We answered our own question. To take an Ol...

error C2664 + generic classes + /Wp64

Hi! I've got the following lines of code: p_diffuse = ShaderProperty<Vector4>(Vector4(1,1,1,1)); addProperty(&p_diffuse, "diffuse"); p_shininess = ShaderProperty<float>(10.0f); addProperty(&p_shininess, "shininess"); the addProperty function is implemented as follows: template <class A_Type> void IShader<A_Type>::addProperty( Shade...

Convert typed-in Text to lowercase

I've got an index.jsp with [snip] <% String name = request.getParameter("name"); String pass = request.getParameter("pass"); String globalname = "webeng"; String globalpass = "2009"; if (name !=null && pass!=null && name.equals(globalname) && pass.equals(globalpass)) { %> <hr /> <p><b>Howdy, <%= request.getPara...

problem with valueOf(), converting a char to Character in Java

Hello, I'm trying to convert a char to Character before it gets pushed on a stack but get a "cannot find symbol error", I don't see what the problem might be. This is how I pass the char to the stack: stack.push(valueOf(in)); Where 'in' is a char. ...

PHP Integer base timestamp importing to Java Long base timestamp

I get Integer timestamp from PHP program, but in Java timestamps are ing Long format. So how can I convert this PHP Integer timestamp to Java Long format and convert that long format to Date object? ...

VB.NET Conversion problem when trying to convert from base class to subclass (BC30311: "Value of type '<type1>' cannot be converted to '<type2>'")

Hello! Please take a look at the following code: Public Sub Method(Of TEntity As EntityObject)(ByVal entity As TEntity) If TypeOf entity Is Contact Then Dim contact As Contact = entity 'Compile error' Dim contact = DirectCast(entity, Contact) 'Compile error' Dim contact = CType(entity, Contact) 'Compile er...

Data needs conversion into columns from multiple-address-object-blocks (Excel / OpenOffice )

Each block contains 3 addresses - name, city, state, zip - how do I break it apart in OpenOffice/Excel? James R. Javier DDS Kent R. Nelson DDS Theodore G. Lund DDS 421 SW 335th St 1911 SW Campus Rd 2748 SW 315th St Federal Way, WA 98023-6192 Federal Way, WA 98023-6473 Federal Way, WA 98023-7832 H. Jung Song DDS Timothy J. Weaver DDS Sa...

Is there javascript (prefer jquery) library that automatically maps form elements to JSON?

Background: This is something I have been looking for since before even JSON was known as JSON. Suppose you have the following javascript variable inside your code: jsonroot = { 'fname':'valued' ,'lname':'customer' ,faves:['berry','chocolate','mint'] ,actors:[ {'fname':'brad','lname':'pitt'} ,{'fname':...

How to convert a date String into the right format in Java?

Can somebody please explain to me how I can convert 2009-10-27 14:36:59.580250 into 27.10.2009, 14:36 ? The first date is available as a string and the second one should be a string as well ;) Up to now I'm not so into date conversion within Java... Thanks in advance! ...

interpret signed as unsigned

I have a value like this: int64_t s_val = SOME_SIGNED_VALUE; How can I get a uint64_t u_val that has exactly the same bit pattern as s_val, but is treated as unsigned? This may be really simple, but after looking on Stackoverflow and elsewhere I haven't turned up the answer. ...

Implicit conversion from void to XmlDocument

Probably a stupid question, but I'm quite new to the whole "get-and-set-property"-kind of programming; I keep getting a compiling-error on this part of my code; private string _File = "Session.xml"; private XmlDocument XmlDoc { get { XmlDocument _Doc = new XmlDocument(); return _Doc.LoadXml(_File); } } pri...

WMF / EMF File Format conversion C#

In my program, I have a requirement to "playback" or "parse" windows metafiles (WMF and EMF). I have dug through MSDN and Google, and the closest I have come is the Graphics. EnumerateMetafile method. I can get it to work, in that my EnumerateMetafileProc callback is called, and I can then call PlayRecord. What is missing, is how to get ...

Expression.Constant(value, type) type is unknown. How to define the type

Hi there: So the problem is I have the following line wehre value is a string var filterValue = Expression.Constant(value, property.Type); if property.Type is a string everything is fine however the type really could be anything, like a decimal? I dont know how to make this work for all different types I have this function priva...

Reading to get back into Java development?

I haven't done much Java development in about six years or so. I may have the need soon to port a C# application to Java so as to make it run on both Windows and the company standard flavor of Linux (for reasons I can't discuss). The thing I want to know is, what is the best reading material to brush up on changes to Java since then, so ...