Search Results

Search found 1474 results on 59 pages for 'datatype'.

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

  • c# Column datatype Date type (NOT DateTime)

    - by Sha Le
    Hi All: I want know is there good way to detect Column DataType for Date field (NOT DateTime)? This what currently I do: switch (dt.Columns[col].DataType.FullName) { case "System.DateTime": formatedVal = Formatter.GetDateTime(val); break; // which is NOT possible, but something equivalent am looking for case "System.Date": formatedVal = Formatter.GetDate(val); break; default: formatedVal = val.ToString(); break; } Thanks a bunch. :-)

    Read the article

  • JQGrid datatype as Ajax function not getting called

    - by mraman
    Hi, JQGrid datatype as Ajax function not getting called. once i tried to debug using firebug, found out that those lines are not exectuced. please let me know the issue with my code. Thanks in advance. jQuery("#list").jqGrid({ //url:'example.xml', datatype: function() { $.ajax({ url: "example.xml", data: "{}", dataType: "xml", mtype: "GET", complete: function(jsondata, stat) { alert((jsondata.responseText)); if (stat == "success") { alert("ew"); } }, error : function () {alert("error")} }); }, colNames:['QueueName','SLA Associated', 'SLA met', 'SLA Breached', 'SLA MET %', 'SLA Breached %'], colModel :[ {name:'QueueName',index:'QueueName', width:150}, {name:'SLAAssociated',index:'SLAAssociated', width:150}, {name:'SLAmet',index:'SLAmet', width:150}, {name:'SLABreached',index:'SLABreached', width:150}, {name:'SLAMETPer',index:'SLAMETPer', width:150}, {name:'SLABreachedPer',index:'SLABreachedPer', width:150} ], pager: jQuery('#pager1'), rowNum:1, rowList:[5,10], imgpath: 'themes/basic/images' }); in Header i add as follows <html xmlns="http://www.w3.org/1999/xhtml"> <link rel="stylesheet" type="text/css" media="screen" href="themes/basic/grid.css" /> <link rel="stylesheet" type="text/css" media="screen" href="themes/jqModal.css" /> <link rel="stylesheet" type="text/css" media="screen" href="css/report.css" /> <script src="jquery.js" type="text/javascript"></script> <script src="jquery.jqGrid.js" type="text/javascript"></script> <script src="js/jqModal.js" type="text/javascript"></script> <script src="js/jqDnR.js" type="text/javascript"></script>

    Read the article

  • WPF HiercharchicalDataTemplate.DataType: How to react on interfaces?

    - by David Schmitt
    Problem I've got a collection of IThings and I'd like to create a HierarchicalDataTemplate for a TreeView. The straightforward DataType={x:Type local:IThing} of course doesn't work, probably because the WPF creators didn't want to handle the possible ambiguities. Since this should handle IThings from different sources at the same time, referencing the implementing class is out of question. Current solution For now I'm using a ViewModel which proxies IThing through a concrete implementation: public interface IThing { string SomeString { get; } ObservableCollection<IThing> SomeThings { get; } // many more stuff } public class IThingViewModel { public IThing Thing { get; } public IThingViewModel(IThing it) { this.Thing = it; } } <!-- is never applied --> <HierarchicalDataTemplate DataType="{x:Type local:IThing}"> <!-- is applied, but looks strange --> <HierarchicalDataTemplate DataType="{x:Type local:IThingViewModel}" ItemsSource="{Binding Thing.SomeThings}"> <TextBox Text="{Binding Thing.SomeString}"/> </HierarchicalDataTemplate> Question Is there a better (i.e. no proxy) way?

    Read the article

  • Retrieving datatypes from underlying database

    - by H4mm3rHead
    Hi, Im making an application that displays information about an underlying database. The database can be anything, but is typically either Oracle, MSSQL or MySQL. I am trying to extract the datatype but cannot seem to get this right. I have a DbConnection because i dont know whether I need a OleDbConnection or an OdbcConnection. On this connection I make a GetSchema("Columns", "mytablename") query and gets the result back. It seems though that there are some inconsistencies with my datatypes or the query returns different datatypes for the different databases. For instance, in my MSSQL database I query and get an integer back (which seems to be the OleDbType) which I map to a datatype. My varchars is now of type char - no length - and this confuses me a bit. I guess my main question is something like: Is there any way of making a uniform way of extracting datatypes across providers and having an "accurate" representation of the datatype?

    Read the article

  • jQuery ajax() function is ignoring dataType parameter in Firefox

    - by ccleve
    I'm trying to use jQuery.ajax() to fetch some html, but Firefox is giving me a "junk after document element" error message. As explained here and here the problem seems to be that Firefox is expecting XML from the server, and when it doesn't parse correctly it throws the error. Here's my ajax code: jQuery.ajax({ url: name, dataType: "html", success: function(result) { console.log(result); }, error: function (jqXHR, textStatus, errorThrown) { console.log(errorThrown); } }); The server returns the html with these response headers: Accept-Ranges bytes Content-Length 2957 Last-Modified Tue, 02 Jul 2013 16:16:59 GMT Note that there's no content-type header. I'm sure that adding one would solve the problem, but that's not an option. The real problem is that Firefox appears to be ignoring the dataType: parameter in the ajax call. I've also tried adding contentType: and accepts: parameters, but it doesn't help. What am I missing here? How do I force Firefox to process the response as plain text?

    Read the article

  • Ontology - Conflict of same individuals property and datatype property

    - by blueomega
    I am having a problem with "same individuals property" in protege, when i run a reasoner (pellet 1.5 or fact++) Lets take ontology example thing has class sons A and B, A has sons C and D. B, C and D have individuals of the same class. Cant i say a individual C is "same individual" as individual B, and then add also individual D is "same individual" as individual B. Wich is true, they have diferent names, but they are same individual.. Why does it only work when i set individual B has "same individual" of type C or D? The protege error is "InconsistentOntologyException:Fact++.Kernel: inconsistent Ontology" and pellet says ontology is inconsistent. EDIT: Seems its a more deep rooted problem, this example works :(, gonna keep checking. EDIT2: After some more experimenting, seems its a conflict with DataType properties. They all share a DataType properties with same name. In the example domain of property would be A and range string. Any idea how to solve?

    Read the article

  • Regex in javascript for enum datatype of mysql

    - by himadri
    Hello, I am working with php and mysql. I have one dropdown box where I am asking datatype of mysql field. Now, I want to put javascript validation for it. I am confused with the enum datatype. I am using regular expression /^[']{1}[^',^\\]+[']{1}$/. This is for one single value of enum values. It is working fine but issue is when I put single quote or backslash with backslash, it is valid but this regular expression shows it as invalid. For eg, 'a'b' is invalid but 'a\'b' is valid.

    Read the article

  • PHP - get MySQL query results as their native data type?

    - by redidas
    I've tried fetching MySQL query results using mysql_fetch_row() mysql_result() and numeric values are being returned as strings. Is there any way to fetch the data as its datatype stored in the table? The application will be querying many different queries so I will be unable to cast the values as the intended datatype on a 1 by 1 basis.

    Read the article

  • Highest value datatype can store in c#

    - by user472832
    I am writing a small program for my assignment to find the primitive roots of a prime number. So far, the program works for smaller prime numbers till 13 and gives correct number of roots. But for higher primes numbers, it is showing only fewer primitive roots. And now i got stuck for the prime number 41, shows no primitive roots for it. I used DOUBLE datatype for the calculation, and again tried with the datatype DECIMAL, but no luck. Does anyone know about this kind of problem??? Thank you.

    Read the article

  • Serializing a DataType="time" field using XmlSerializer

    - by CraftyFella
    Hi, I'm getting an odd result when serializing a DateTime field using XmlSerializer. I have the following class: public class RecordExample { [XmlElement("TheTime", DataType = "time")] public DateTime TheTime { get; set; } [XmlElement("TheDate", DataType = "date")] public DateTime TheDate { get; set; } public static bool Serialize(Stream stream, object obj, Type objType, Encoding encoding) { try { using (var writer = XmlWriter.Create(stream, new XmlWriterSettings { Encoding = encoding })) { var xmlSerializer = new XmlSerializer(objType); if (writer != null) xmlSerializer.Serialize(writer, obj); } return true; } catch (Exception) { return false; } } } When i call the use the XmlSerializer with the following testing code: var obj = new RecordExample {TheDate = DateTime.Now.Date, TheTime = new DateTime(0001, 1, 1, 12, 00, 00)}; var ms = new MemoryStream(); RecordExample.Serialize(ms, obj, typeof (RecordExample), Encoding.UTF8); txtSource2.Text = Encoding.UTF8.GetString(ms.ToArray()); I get some strange results, here's the xml that is produced: <?xml version="1.0" encoding="utf-8"?> <RecordExample xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <TheTime>12:00:00.0000000+00:00</TheTime> <TheDate>2010-03-08</TheDate> </RecordExample> Any idea's how i can get the "TheTime" element to contain a time which looks more like this: <TheTime>12:00:00.0Z</TheTime> ...as that's what i was expecting? Thanks Dave

    Read the article

  • parsec-3.1.0 with custom token datatype

    - by Tener
    parsec-3.1.0 ( http://hackage.haskell.org/package/parsec-3.1.0 ) works with any token type. However there are combinators like Text.Parsec.Char.satisfy that are only defined for Char datatype. There doesn't seem to be any more general counterpart available. Should I define my own versions or did I miss something? Perhaps there are different parser libraries in Haskell that allows: custom token types custom parser state (I need to parse stateful format - Wavefront OBJ)

    Read the article

  • Searching over a templated tree

    - by floatingfrisbee
    So I have 2 interfaces: A node that can have children public interface INode { IEnumeration<INode> Children { get; } void AddChild(INode node); } And a derived "Data Node" that can have data associated with it public interface IDataNode<DataType> : INode { DataType Data; IDataNode<DataType> FindNode(DataType dt); } Keep in mind that each node in the tree could have a different data type associated with it as its Data (because the INode.AddChild function just takes the base INode) Here is the implementation of the IDataNode interface: internal class DataNode<DataType> : IDataNode<DataType> { List<INode> m_Children; DataNode(DataType dt) { Data = dt; } public IEnumerable<INode> Children { get { return m_Children; } } public void AddChild(INode node) { if (null == m_Children) m_Children = new List<INode>(); m_Children.Add(node); } public DataType Data { get; private set; } Question is how do I implement the FindNode function without knowing what kinds of DataType I will encounter in the tree? public IDataNode<DataType> FindNode(DataType dt) { throw new NotImplementedException(); } } As you can imagine something like this will not work out public IDataNode<DataType> FindNode(DataType dt) { IDataNode<DataType> result = null; foreach (var child in Children) { if (child is IDataNode<DataType>) { var datachild = child as IDataNode<DataType>; if (datachild.Data.Equals(dt)) { result = child as IDataNode<DataType>; break; } } else { // What?? } } return result; } Is my only option to do this when I know what kinds of DataType a particular tree I use will have? Maybe I am going about this in the wrong way, so any tips are appreciated. Thanks!

    Read the article

  • Datatype to save excel file in sql server?

    - by gowri-ganapathy
    Hi, I have a table in which there are two columns : 1. import type, 2. Excel import template. The second column - "Excel import template" should store the whole excel file. How would I save excel file in databse...can I use binary datatype column, convert excel file to bytes and save the same ? Thanks in advance !

    Read the article

  • Time DataType in Sql Server 2005

    - by MadBoy
    I've created small database under SQL Server 2008. Now i wanted to move it to SQL Server 2005 and it doesn't work since it doesn't have Time datatype. What option do I have to store only time in SQL Server 2005. I've written small TimeSheet application which needs to write hours and minutes mostly in format like 05:30:00 (hh:mm:ss) but ss is optional.

    Read the article

  • Unable to output formatted HTML from Jquery with html DataType

    - by Dkong
    I am calling some data which has pre-formatted HTML code in it, but when it renders from the jquery it appears to ignore my markup. This is my jQuery: function GetFeed(){ document.getElementById("marq").innerHTML = ''; $.ajax({ type: "POST", url: "xmlproxy.ashx", dataType: "html", success: function(obj) { $('<span class="tickerItem"></span>').html(obj).appendTo('#marq'); } }); }

    Read the article

  • int24 - 24 bit integral datatype

    - by Oops
    Hi, is there a 24Bit primitive integral datatype in C++? If there is none, would it be possible to create a class int24 (, uint24 ) ? it's purpose could be: * manipulating soundfiles in 24 bit format * manipulating bitmapdata without alphachannel many thanks in advance Oops

    Read the article

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