Search Results

Search found 40745 results on 1630 pages for 'type deduction'.

Page 46/1630 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • which is the most accurate way to check variables type javascript

    - by mck89
    Hi, i need to check the type of a variable in javascript, i know 3 ways to do it: instanceof operator: if(a instanceof Function) typeof operator: if(typeof a=="function" toString method (jQuery uses this): Object.prototype.toString.call(a) == "[object Function]" Which is the most accurate way to do type checking beetween these solutions? and why? Please don't tell me that the last solution is better only because jQuery uses that.

    Read the article

  • Class type while deserialization in c++

    - by Rushi
    I am developing game editor in c++.I have implemented reflection mechanism using DiaSDK.Now I want to store state of the objects(Like Camera,Lights,Static mesh) in some level file via serialization. And later on able to retrieve their state via deserialization.Serializing objects is not a problem for me.But while deserializing objects how do I know class type?so that i can create object of that particular type.

    Read the article

  • I want to change Content-Type of the default in php

    - by ffffff
    I mention it in httpd.conf as follows to let you interpret css as php <FilesMatch "\.css$"> ForceType application/x-httpd-php </FilesMatch Content-Type is output as text/html and is troubled. Therefore I added the next cord to the top of the css file. <?php header("Content-Type: text/css"); ?> It's not cool... Do you know how to output text/css ?

    Read the article

  • Disadvantage of unlifted type products?

    - by peaker
    In Haskell, lifted type products mean that there's a semantic difference between (a,b,c) and (a, (b, c)). If all pattern matches of all products was always irrefutable, then there would be no difference, and (a, b, c) could be syntactic sugar for (a, (b, c)). Why did Haskell choose to lift type products?

    Read the article

  • Procedure in converting int to decimal data type?

    - by Fedor
    I have an int(11) column which is used to store money. I read some of the answers on SO and it seems I just need to update it to be a decimal (19,4) data type. Are there any gotchas I should know about before I actually do the converting? My application is in PHP/Zend and I'm not using an ORM so I doubt I would need to update any sort of class to consistently identify the data type.

    Read the article

  • Extracting fields from a define-type object in Scheme

    - by Mike
    Hi, I am trying to extract the field 'name' or 'named-expr' from the following object: (bind 'x (num 5)) ;; note that this is not a list, but a type Binding With the Binding definition: (define-type Binding (bind (name symbol?) (named-expr WAE?))) I have tried, but received the error "reference to an identifier before its definition: Binding-name." Here is what I tried typing: (begin (Binding-name (bind 'x (num 5)))) (begin (define x (bind 'x (num 5))) (Binding-name x)) Thank you!

    Read the article

  • Drupal - assign menu to block based on node type

    - by ernie
    I want to assign a specific menu in left sidebar block, based on the node type of the page currently being displayed. I think it should look something like this, but I am stuck. function my_module_nodeapi(&$node, $op) { switch ($op) { case 'view': if ($node->type == "large_reptiles") { //menu_set_active_menu_name('menu_reptile_menu'); //menu_set_active_item('menu_reptile_menu'); } break; } }

    Read the article

  • How To Test if a Type is Anonymous?

    - by DaveDev
    Hi Guys I have the following method which serialises an object to a HTML tag. I only want to do this though if the type isn't Anonymous. private void MergeTypeDataToTag(object typeData) { if (typeData != null) { Type elementType = typeData.GetType(); if (/* elementType != AnonymousType */) { _tag.Attributes.Add("class", elementType.Name); } // do some more stuff } } Can somebody show me how to achieve this? Thanks Dave

    Read the article

  • relational type operation on key value storage

    - by wayne
    in my objects table i have id | type | parent | order | created and then in my data table i have object_id | key | value i want to get object of type 'x' where key 'y' === 'z' in the most optimal way possible. ie. get user where slug === 'jonny' i'm currently doing it with joins, because i'm doing this in mysql as a quick test. but i'll be moving to redis or a similar key/value storage system so obviously that won't work.

    Read the article

  • Using javascript to detect browser type

    - by Duber
    I'm trying to use this line to detect browser type: IE or Firefox. alert(isBrowser("Microsoft")); but I get absolutely nothing, the alert doesn't even pop up. Not sure what I'm doing wrong. What would be the best practice way to detect browser type?

    Read the article

  • Need help how to call c# function which return type is array in jquery

    - by Manoj Wadhwani
    $('#calendar').fullCalendar ( { editable: true, events: $.ajax ( { type: "POST", url: "Calender.aspx/GetCDCatalog", contentType: "application/json; charset=utf-8", data: "{}", dataType: "json" } ) } ) calender.aspx is page and getcddialog is function which return type is array which doest not bind calender. public CD[] GetCDCatalog() { XDocument docXML = XDocument.Load(Server.MapPath("mydata.xml")); var CDs = from cd in docXML.Descendants("Table") select new CD { title = cd.Element("title").Value, star = cd.Element("star").Value, endTime = cd.Element("endTime").Value, }; return CDs.ToArray<CD>(); }

    Read the article

  • How to convert a table column to another data type

    - by holden
    I have a column with the type of Varchar in my Postgres database which I meant to be integers... and now I want to change them, unfortunately this doesn't seem to work using my rails migration. change_column :table1, :columnB, :integer So I tried doing this: execute 'ALTER TABLE "table1" ALTER COLUMN "columnB" TYPE integer USING CAST(columnB AS INTEGER)' but cast doesn't work in this instance because some of the column are null... any ideas?

    Read the article

  • Android : Typeface is changed when i apply password Type on EditText

    - by wawanopoulos
    I use FloatLabel library (https://github.com/weddingparty/AndroidFloatLabel) to add a little animation when user begin to write something in an EditText Android. My problem is that the typeface seems to be changed when i apply the password type to my EditText. I would like to keep the same typeface as normal. (see picture 1) But when i add the following line to apply password type, the typeface of hint seems to be changed ! pass.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);

    Read the article

  • multiple paramters type

    - by romerun
    I'm trying to write something like this: type 'a 'b xxx = {aaa: 'a: bbb: 'b: ccc: int};; It does not compile. Is it just syntax error, or they don't allow multiple paramters on type ? Then why ?

    Read the article

  • What is this <Module> Type in an assembly

    - by LightX
    Each time I open an assembly in reflector, I see this special <Module> type that shows up. Recently, I came across an assembly that has a static method defined in this type and I want to invoke it through reflection. Is this possible? Btw, this method has privatescope hidebysig method attributes

    Read the article

  • multiple parameters type

    - by romerun
    I'm trying to write something like this: type 'a 'b xxx = {aaa: 'a: bbb: 'b: ccc: int};; It does not compile. Is it just syntax error, or they don't allow multiple paramters on type ? Then why ?

    Read the article

  • Not naming a type - C++

    - by ML
    I am trying to convert an Adobe CS4 based plugin to CS5. This project has never been mine, this is the first time that i am seeing it. When I compile the source with what i was given, I get errors like: Does not name a type Example: SPAPI SPErr SPBasicAcquireSuite( const char *name, int64 version, const void **suite ); I get that: SPErr does not name a type I dont see any classes with SPErr being defined, but I doubt that Adobe has left this out of the SDK. I am using the PS_CS5_SDK_3 SDK

    Read the article

  • Setting the content-type of a response in Struts2

    - by Thomas
    So, I'm using freemarker templates with Struts2 to formulate my responses. However, since I'm trying to use taconite as well, I need the response to be sent with the content type of "text/xml". I can't seem to find a way to use freemarker directives to set the content type, and I am not well versed enough in struts to know if there is a way to do it through that. So, how should I go about this?

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >