Search Results

Search found 8286 results on 332 pages for 'defined'.

Page 106/332 | < Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >

  • are C functions declared in <c____> headers guaranteed to be in the global namespace as well as std?

    - by Evan Teran
    So this is something that I've always wondered but was never quite sure about. So it is strictly a matter of curiosity, not a real problem. As far as I understand, what you do something like #include <cstdlib> everything (except macros of course) are declared in the std:: namespace. Every implementation that I've ever seen does this by doing something like the following: #include <stdlib.h> namespace std { using ::abort; // etc.... } Which of course has the effect of things being in both the global namespace and std. Is this behavior guaranteed? Or is it possible that an implementation could put these things in std but not in the global namespace? The only way I can think of to do that would be to have your libstdc++ implement every c function itself placing them in std directly instead of just including the existing libc headers (because there is no mechanism to remove something from a namespace). Which is of course a lot of effort with little to no benefit. The essence of my question is, is the following program strictly conforming and guaranteed to work? #include <cstdio> int main() { ::printf("hello world\n"); } EDIT: The closest I've found is this (17.4.1.2p4): Except as noted in clauses 18 through 27, the contents of each header cname shall be the same as that of the corresponding header name.h, as specified in ISO/IEC 9899:1990 Programming Languages C (Clause 7), or ISO/IEC:1990 Programming Languages—C AMENDMENT 1: C Integrity, (Clause 7), as appropriate, as if by inclusion. In the C + + Standard Library, however, the declarations and definitions (except for names which are defined as macros in C) are within namespace scope (3.3.5) of the namespace std. which to be honest I could interpret either way. "the contents of each header cname shall be the same as that of the corresponding header name.h, as specified in ISO/IEC 9899:1990 Programming Languages C" tells me that they may be required in the global namespace, but "In the C + + Standard Library, however, the declarations and definitions (except for names which are defined as macros in C) are within namespace scope (3.3.5) of the namespace std." says they are in std (but doesn't specify any other scoped they are in).

    Read the article

  • Calling helper function in Evaluate/Modify (Ctrl+F7) window

    - by m0f0
    Lets say i wrote helper for TStringList TslHelper = class helper for TStringList function DoSth: boolean; end; Then ive included this helper (unit in which helper is defined) in unit i want to use it. During debugging i hit Ctrl+F7 and i want to evaluate: someStringList.DoSth I cant get it to work. Is it possible? Regards

    Read the article

  • struts2, code completion in jsp

    - by bobbyquinne1
    Hi there, I have done some work with JSF(using netbeans as the IDE) and within your jsp/xhtml file you get code on beans/resource bundles that your have defined. ATM I am investigating struts2 and seem to be unable to get similar functionality in the IDE. Is this just the case with the IDE or do I need to define something? Thanks

    Read the article

  • Using Nuxeo, how do I lock down a page so that it redirects to the login page if the user is unauthe

    - by Aaron Chambers
    I have been put on to a project using Nuxeo, late in it's lifecycle and need to change a few things before it goes live. I am having trouble finding out where I need to look to lock down a Nuxeo based application so that a user is redirected to the login page if they are unauthorised and access a restricted page. Can someone please shoot my some direction on where this sort of logic is kept or defined?

    Read the article

  • Set element style to the :hover style using jQuery

    - by Baddie
    Is it possible (using jQuery or otherwise) to set the style of a certain element to the :hover style defined in a stylesheet? .regStyle { background-color: #000; } .regStyle:hover { background-color: #fff; } Trying it out $("#differentButton").click(function(){ // this doesn't work $("#someElement").addClass("regStyle:hover").remove("regStyle"); });

    Read the article

  • ASP.NET MVC ActionLink in jquery-tmpl template

    - by Justin
    I have a jquery-tmpl defined: <script id="postTemplate" type="text/x-jquery-tmpl"> <div class="div-msg-actions-inner"> @Html.ActionLink("Edit", "Edit", "Post", new { postId = "${PostId}" }, new { @class = "button" }) @Html.ActionLink("Reply", "Reply", "Post", new { topicId = "${TopicId}" }, new { @class = "button" }) </div> </script> The action link results in the "$" being encoded into "%24". Is there a way around this so the ID in my action link will get replaced correctly?

    Read the article

  • clicking title bar fires onBlur in Opera

    - by danme0
    Hi, I am closing a popup window at 'onBlur' defined for 'BODY' of an ASP webpage, so when a user clicks outside the popup the popup closes. I want the popup to be moveable around the screen and it works for all browsers but Opera. In Opera the 'onBlur' event is fired when clicking the titlebar of the popup - this seems weird for me, as the titlebar is a part of the popup window, right? What can I do about it?

    Read the article

  • What cross browser, W3C valid css, non-javascript "min-height" method?

    - by jitendra
    Should we always try to not to give "height" to elements in XHTML through CSS? if yes the i think min-height would be better idea instead of fixed height. What cross browser( including IE6), W3C valid css, non-javascript "min-height" method in css? if i add min-height to any tag example <div> then in future in more content comes in then will we have to change height of div or if min-height is defined then no need.

    Read the article

  • Why can I not access this class member in python?

    - by Peter Smit
    I have the following code class Transcription(object): WORD = 0 PHONE = 1 STATE = 2 def __init__(self): self.transcriptions = [] def align_transcription(self,model,target=Transcription.PHONE): pass The important part here is that I would like to have a class member as default value for a variable. This however gives the following error: NameError: name 'Transcription' is not defined Why is this not possible and what is the right (pythonic) way to do something like this.

    Read the article

  • What is "urgent data"?

    - by timn
    The man page of epoll_ctl() says about EPOLLPRI: There is urgent data available for read(2) operations. How exactly is "urgent data" defined and who decides which data has priority?

    Read the article

  • Multiset without Compare?

    - by nimcap
    I want to use multiset to count some custom defined keys. The keys are not comparable numerically, comparing two keys does not mean anything, but their equality can be checked. I see that multiset template wants a Compare to order the multiset. The order is not important to me, only the counts are important. If I omit Compare completely what happens? Does multiset work without any problems for my custom keys?

    Read the article

  • Defining a different primary key in Mongomapper

    - by ming yeow
    I am defining a primary key in MongoMapper. class B key :_id, string key :externalId, string end The problem is that everything i add a new record in B, it appears that I need to explicity specify the _id, when it is already defined in the external id B.new(:_id=>"123", :external_id=>"123 ) That does not quite make sense. There should be a way to specify externalId as the primary key, no?

    Read the article

  • Drawing with element array in OpenGL ES

    - by FatalMojo
    Hello! I am trying to use OpenGLES to draw a x by y matrix of squares about an arbitrary point. I have an array sideVertice[] that holds a series of vertex structs defined as such typedef struct { GLfloat x; GLfloat y; GLfloat z; } Vertex3D; and an element array defined as such GLubyte elementArray[]; my draw loop is as such glLoadIdentity(); glVertexPointer(3, GL_FLOAT, 0, cube.sideVertice); for (int i=0; i<((cube.cubeSize + 1)*(cube.cubeSize + 1)); i++) { for (int j=0; j<=3; j++) { elementArray[j] = j + i*4; glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_BYTE, elementArray); } } for (int i=0; i<=3; i++) elementArray[i] = i; However, the visual output is corrupted and I cannot figure out what the problem is. here is an output of the vertice held in the array: 2010-04-15 23:44:48.816 RubixGL[4203:20b] vertex[0][0] x:-26.000000 y:1.000000 2010-04-15 23:44:48.817 RubixGL[4203:20b] vertex[1][1] x:-26.000000 y:26.000000 2010-04-15 23:44:48.826 RubixGL[4203:20b] vertex[2][2] x:-1.000000 y:1.000000 2010-04-15 23:44:48.829 RubixGL[4203:20b] vertex[3][3] x:-1.000000 y:26.000000 2010-04-15 23:44:48.830 RubixGL[4203:20b] Next Face 2010-04-15 23:44:48.830 RubixGL[4203:20b] vertex[0][4] x:1.000000 y:1.000000 2010-04-15 23:44:48.832 RubixGL[4203:20b] vertex[1][5] x:1.000000 y:26.000000 2010-04-15 23:44:48.837 RubixGL[4203:20b] vertex[2][6] x:26.000000 y:1.000000 2010-04-15 23:44:48.838 RubixGL[4203:20b] vertex[3][7] x:26.000000 y:26.000000 2010-04-15 23:44:48.848 RubixGL[4203:20b] Next Face 2010-04-15 23:44:48.849 RubixGL[4203:20b] vertex[0][8] x:-26.000000 y:-26.000000 2010-04-15 23:44:48.850 RubixGL[4203:20b] vertex[1][9] x:-26.000000 y:-1.000000 2010-04-15 23:44:48.851 RubixGL[4203:20b] vertex[2][10] x:-1.000000 y:-26.000000 2010-04-15 23:44:48.852 RubixGL[4203:20b] vertex[3][11] x:-1.000000 y:-1.000000 2010-04-15 23:44:48.853 RubixGL[4203:20b] Next Face 2010-04-15 23:44:48.853 RubixGL[4203:20b] vertex[0][12] x:1.000000 y:-26.000000 2010-04-15 23:44:48.854 RubixGL[4203:20b] vertex[1][13] x:1.000000 y:-1.000000 2010-04-15 23:44:48.854 RubixGL[4203:20b] vertex[2][14] x:26.000000 y:-26.000000 2010-04-15 23:44:48.855 RubixGL[4203:20b] vertex[3][15] x:26.000000 y:-1.000000 any ideas?

    Read the article

  • Reading Excel Named Ranges by OLEDB hangs when the source file is open

    - by Sathish
    I am trying to read the Excel Named range using OLEDB using the below code "Select * from [MyNamedRange1]" everything works fine only when the source excel sheet is not opened if it is open then i am not able to read the range names using OLEDB it simply hangs Where as i am able to execute the query "Select * from [Sheet1$]" even if the workbook is open or closed... Any work arounds for reading the range by OLEDB only i dont want to go for interop... I have too many ranges defined in the excel file

    Read the article

  • A simple question about type coercion in C++

    - by David
    Given a function prototype, and a type definition: int my_function(unsigned short x); typedef unsigned short blatherskite; Is the following situation defined by standard: int main(int argc, char** argv) { int result; blatherskite b; b=3; result = my_function(b); } Do I get type coercion predictably via the function prototype?

    Read the article

  • Where to store Android preference keys?

    - by pixel
    When I create preference activity I define all preferences in xml file. Every preference has a key defined in this xml. But when I access preference I write: SharedPreferences appPreferences = PreferenceManager.getDefaultSharedPreferences(this); boolean foo_value = appPreferences.getBoolean("foo_key_defined_in_xml", false); Is there any way to avoid acessing "foo_key_defined_in_xml" in hard-coded way? Maybe there is a possibility to access it in R style way?

    Read the article

  • Max size of localStorage values?

    - by user269386
    Hi, since the localStorage (currently) only supports strings as values and in order to that the objects have to be stringified (stored as JSON-string), before they can be stored, i wondered if there is a defined limitation regarding the length of the values. Does anyone know if there is a definition which applies to all browsers, respectively does anyone know the limitations for Chrome5? Thanks, in advance, for your help

    Read the article

< Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >