Search Results

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

Page 44/332 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • SqlMetal, Sql Server 2008 database, Table with HierachyID, dal cs file is created sometimes ?

    - by judek.mp
    I have 2 databases with a 2 tables with HierachyID fields. For one database I can get a dal cs file, for the other database I cannot get a dal cs file ? HBus is a database I can get the dal cs for, ... SqlMetal /server:.\SQLSERVER2008 /database:HBus /code:HBusDC.cs /views /functions /sprocs /namespace:HBusDC /context:HBusDataContext This kicks me out a file, ... which works, but excludes the HierarchyID field for the table and includes all other fields for that table. This is OK I do not mind. The above cmd line kicks out an warning but still produces a file, like so SqlMetal /server:.\SQLSERVER2008 /database:HBus /code:HBusDC.cs /views /functions /sprocs /namespace:HBusDC /context:HBusDataContext Microsoft (R) Database Mapping Generator 2008 version 1.00.30729 for Microsoft (R) .NET Framework version 3.5 Copyright (C) Microsoft Corporation. All rights reserved. Warning : SQM1021: Unable to extract column 'OrgNode' of Table 'dbo.HMsg' from SqlServer because the column's DbType is a user-defined type (UDT). Warning : SQM1021: Unable to extract column 'OrgNode' of Table 'dbo.vwHMsg' from SqlServer because the column's DbType is a user-defined type (UDT). HMsg is a table with a HierarchyID field. I have another database, Elf, almost the same thing but I get a warning and an Error when using sql metal and I do not get a dal cs file ... SqlMetal /server:.\SQLSERVER2008 /database:Elf /code:ElfDataContextDal.cs /views /functions /sprocs /namespace:HBusDC /context:HBusDataContext An error as well as the warning and the cs file fails to appear on my disc, ... :-( SqlMetal /server:.\SQLSERVER2008 /database:Elf /code:ElfDataContextDal.cs /views /functions /sprocs /namespace:HBusDC /context:HBusDataContext Microsoft (R) Database Mapping Generator 2008 version 1.00.30729 for Microsoft (R) .NET Framework version 3.5 Copyright (C) Microsoft Corporation. All rights reserved. Warning : SQM1021: Unable to extract column 'OrgNode' of Table 'dbo.EntityLink' from SqlServer because the column's DbType is a user-defined type (UDT). Error : Requested value 'ELF.SYS.HIERARCHYID' was not found. The fields are declared the same way in Elf db OrgNode [HierarchyID] null , in HBus db ... OrgNode [HierarchyID] null , Both databases are in the same instance of sql server 2008, so the HierarchyID is an inbuilt type, neither db has HierarchyID udt ,... cheers in advance for any replies ...

    Read the article

  • Unable to display data in a WPF datagrid that has a DataView instance as the items source

    - by Jimmy W
    I am using a DataGrid object from the WPF toolkit. I am binding the DataGrid object to the default view of a DataTable instance as declared in the following code: WeatherGrid.ItemsSource = weatherDataTable.DefaultView; weatherDataTable has three columns. The first column is defined to contain a string data type. The other two columns are defined to contain double data types. When the application exits the function that calls the binding as expressed in the declaration, The DataGrid object displays data for the first column, but not the other columns. When I type the following in the immediate window in the debugger: ((DataRowView)WeatherGrid.Items[0]).Row[1] I get a number, but this doesn't correspond with what is being displayed. Why is only the first column visible, and how can I get all of the data to be visible? I'll leave my XAML definition for the DataGrid object below: <toolkit:DataGrid Margin="12.726,77.71,12,0" Name="WeatherGrid" Height="500" Grid.Row="1" VerticalAlignment="Top" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True" />

    Read the article

  • How To: Eclipse compile error with Android ADT

    - by Sahat
    This error happens when you try to build & run .xml files (i.e. main.xml or strings.xml) files instead of .java Problem: [2010-05-28 06:42:42] Error in an XML file: aborting build. [2010-05-28 06:42:42] res/layout/main.xml:0: error: Resource entry main is already defined. [2010-05-28 06:42:42] res/layout/main.out.xml:0: Originally defined here. [2010-05-28 06:42:42] /Users/sakhat/Code/Sudoku/res/layout/main.out.xml:1: error: Error parsing XML: no element found Solution: Delete the main.out.xml, if you still can't run, then follow this: Eclipse - Project - Clean... - Choose your project - OK

    Read the article

  • Is there an easy way to get a list of all successful captures from a regex pre-5.10?

    - by Chas. Owens
    I know the right way to do this if I have Perl 5.10 is to use named captures and values %+, but in Perl 5.8.9 and how can I get a list of successful captures? I have come up with two methods that are both just terrible: #you need to list each possible match my @captures = grep { defined } ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16); and #ew, I turned on symbolic references { no strict 'refs'; my @captures = map { defined $+[$_] ? $$_ : () } 1 .. $#+; } There is a third option I have found involving (?{}), but it requires global variables (because the closure happens at compile time) and takes the regex from reasonably clear to ungodly mess. The only alternative I have found is to capture the whole match and then use another set of regexes to get the values I want (actually I build the first regex out of the other regexes because there is no good reason to duplicate the logic).

    Read the article

  • Does C# have an equivalent to Scala's structural typing?

    - by Tom Morris
    In Scala, I can define structural types as follows: type Pressable { def press(): Unit } This means that I can define a function or method which takes as an argument something that is Pressable, like this: def foo(i: Pressable) { // etc. The object which I pass to this function must have defined for it a method called press() that matches the type signature defined in the type - takes no arguments, returns Unit (Scala's version of void). I can even use the structural type inline: def foo(i: { def press(): Unit }) { // etc. It basically allows the programmer to have all the benefits of duck typing while still having the benefit of compile-time type checking. Does C# have something similar? I've Googled but can't find anything, but I'm not familiar with C# in any depth. If there aren't, are there any plans to add this?

    Read the article

  • Scala 2.8 TreeMap and custom Ordering

    - by Dave
    I'm switching from scala 2.7 and ordered to scala 2.8 and using ordering. It looks quite straight forward but I was wondering could I make it a little less verbose. For example: scala> case class A(i: Int) defined class A scala> object A extends Ordering[A] { def compare(o1: A, o2: A) = o1.i - o2.i} defined module A If I then try to create a TreeMap I get an error scala> new collection.immutable.TreeMap[A, String]() <console>:10: error: could not find implicit value for parameter ordering: Ordering[A] new collection.immutable.TreeMap[A, String]() ^ However if I explicitly specify the object A as the ordering it works fine. scala> new collection.immutable.TreeMap[A, String]()(A) res34: scala.collection.immutable.TreeMap[A,String] = Map() Do I always have to explicitly specify the ordering or is there a shorter format? Thanks

    Read the article

  • PlayDependencyClassLoader does not find application code

    - by jkschneider
    When a third party dependency attempts to load a class defined in a Play application using Class.forName(className, true, Thread.currentThread().getContextClassLoader()); Play will throw a ClassNotFoundException because the context class loader is of type PlayDependencyClassLoader which apparently only contains classes defined in jar dependencies. Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: eventstore.Commit at org.mapdb.SerializerPojo.classForName(SerializerPojo.java:96) at org.mapdb.SerializerPojo$1.deserialize(SerializerPojo.java:74) at org.mapdb.SerializerPojo$1.deserialize(SerializerPojo.java:39) This only occurs when Play is started with play run. Starting Play with play start loads the class correctly. It would be a shame to sacrifice the class hot-swapping because of this behavior. Is there a known workaround?

    Read the article

  • Howto specify format of Restlet-response in browser?

    - by martin
    Hello everybody, i've started to introduce myself into REST. I use as REST-framework Restlet. I have defined a resource with methods for the GET with several response formats like @Get("xml") @Get("json") I now want to test my defined response-formats with my browser, but I don't know which parameter I have to specify in my URL to get the format. Something like: http://localhost:8182/members?type=xml I've tried some param-names, but I couldn't find the right param-name. I know that there must be such a parameter, because I've seen it already in an URL, but i forgot the name and couldn't find it in the net. How is the name of this parameter when using restlet? I would be pleased, if somebody can help me, thanks, Martin

    Read the article

  • ASP.NET MVC2 - using LINQ-generated class

    - by ile
    There are few things not clear to me about ASP.NET MV2. In database I have table Contacts with several fields, and there is an additional field XmlFields of which type is xml. In that field are stored additional description fields. There are 4 classes: Contact class which corresponds to Contact table and is defined by default when creating LINQ classes ContactListView class which inherits Contact class and has some additional properties ContactXmlView class that contains fields from XmlFields field ContactDetailsView class which merges ContactListView and ContactXmlView into one class and this one is used to display data in view pages ContactListView class has re-defined some properties from Contact class (so that I can add [Required] filter used for validation) - but I get warning message: 'ObjectTest.Models.Contacts.ContactListView.FirstName' hides inherited member 'SA.Model.Contact.FirstName'. Use the new keyword if hiding was intended. ContactDetailsView class is also used in a form when creating new contact and adding it to database. I am not sure if this is correct way, and the warning message confuses me a bit. Any advise about this? Thanks, Ile

    Read the article

  • url template tag in django template

    - by user192048
    guys: I was trying to use the url template tag in django, but no lucky, I defined my urls.py like this urlpatterns = patterns('', url(r'^analyse/$', views.home, name="home"), url(r'^analyse/index.html', views.index, name="index"), url(r'^analyse/setup.html', views.setup, name="setup"), url(r'^analyse/show.html', views.show, name="show"), url(r'^analyse/generate.html', views.generate, name="generate"), I defined the url pattern in my view like this {% url 'show'%} then I got this error message Caught an exception while rendering: Reverse for ''show'' with arguments '()' and keyword arguments '{}' not found. Original Traceback (most recent call last): File "/Library/Python/2.5/site-packages/django/template/debug.py", line 71, in render_node result = node.render(context) File "/Library/Python/2.5/site-packages/django/template/defaulttags.py", line 155, in render nodelist.append(node.render(context)) File "/Library/Python/2.5/site-packages/django/template/defaulttags.py", line 382, in render raise e NoReverseMatch: Reverse for ''show'' with arguments '()' and keyword arguments '{}' not found. I am wondering why django failed to render? what is the right way to define it in the tempalte?

    Read the article

  • Overriding classes/functions from a .dll.

    - by Jeff
    Say I have class A and class B. B inherits from class A, and implements a few virtual functions. The only problem is that B is defined in a .dll. Right now, I have a function that returns an instance of class A, but it retrieves that from a static function in the .dll that returns an instance of class B. My plan is to call the created object, and hopefully, have the functions in the .dll executed instead of the functions defined in class A. For some reason, I keep getting restricted memory access errors. Is there something I don't understand that will keep this plan from working?

    Read the article

  • Allow member to be const while still supporting operator= on the class

    - by LeopardSkinPillBoxHat
    I have several members in my class which are const and can therefore only be initialised via the initialiser list like so: class MyItemT { public: MyItemT(const MyPacketT& aMyPacket, const MyInfoT& aMyInfo) : mMyPacket(aMyPacket), mMyInfo(aMyInfo) { } private: const MyPacketT mMyPacket; const MyInfoT mMyInfo; }; My class can be used in some of our internally defined container classes (e.g. vectors), and these containers require that operator= is defined in the class. Of course, my operator= needs to do something like this: MyItemT& MyItemT::operator=(const MyItemT& other) { mMyPacket = other.mPacket; mMyInfo = other.mMyInfo; return *this; } which of course doesn't work because mMyPacket and mMyInfo are const members. Other than making these members non-const (which I don't want to do), any ideas about how I could fix this?

    Read the article

  • NamedParameterJdbcTemplate jconnect decimal issue

    - by user1052849
    I am using NamedParameterJdbcTemplate to insert data into a table. (Spring 2.5.3/Java 1.6) I am using jconnect driver to connect to sybase jdbc:sybase:Tds:<Server>:<Port>. For some reason the decimal values the decimal part is truncated. With the same code if I use jtds driver (jdbc:jtds:sybase://<Servername>:<Port>) its working fine. I cannot use jtds as jconn is being used by other code. In Java objects, field is defined as double. In database, field is defined as float (numeric with precision does not work). Any help is appreciated.

    Read the article

  • Ruby on rails link_to syntax

    - by mizipzor
    After following a tutorial Ive found. Im now redoing it again, without the scaffolding part, to learn it better. However, editing my \app\views\home\index.html.erb to contain: <h1>Rails test project</h1> <%= link_to "my blog", posts_path> I get an error: undefined local variable or method `posts_path' for #<ActionView::Base:0x4e1d954> Before I did this, I ran rake db:create, defined a migration class and ran rake db:migrate, everything without a problem. So the database should contain a posts table. But that link_to command cant seem to find posts_path. That variable (or is it even a function?) is probably defined through the scaffold routine. My question now is; how do I do that manually myself, define posts_path?

    Read the article

  • Using Java Reflections to retrieve member classes

    - by darkie15
    Hi All, I am using .getDeclaredClasses() method to retrieve all the classes that have been defined in object. However, I am not able to retrieve anonymous classes defined in the class. Here is the code sample that I am testing: public class TempCodes { public static void main(String[] args) { Ball b = new Ball() { public void hit() { System.out.println("You hit it!"); } }; b.hit(); } interface Ball { void hit(); } } and this is what my code does: memClass = className.getDeclaredClasses(); if (memClass .length > 0) { for (int index = 0 ; index < memClass .length ; index++) { System.out.println("\t\t\t" + memClass [index]); } } Can anyone help me understand how to retrieve the anonymous class? Regards, darkie

    Read the article

  • How to convert a plist file from mac os project to iphone project?

    - by Tom Pace
    I am developing an app for the iPhone OS devices, and am using a third-party engine which is not well documented but I've made great progress with it anyway. The problem: The engine's developer strongly urges extending from the existing template projects bundled with the engine, but the engine's plist files are Mac OSX project plist files. This is an iPhone engine, and so I cannot understand why the plist file is structured to take keys for Mac OS apps, but that's how it is. I did a FileMerge comparison to ensure there was nothing within the file itself that defined its use for one OS or the other, so I guess it's defined somewhere in the project settings.

    Read the article

  • annotation in matlab plot

    - by Tim
    Hi, I just wonder how to add annotation in matlab plot? Here is my code: plot(x,y); annotation('textarrow',[x, x+0.05],[y,y+0.05],'String','my point','FontSize',14); But the arrow points to the wrong place. How can I fix it? And any better idea for annotating a plot? Thanks and regards! EDIT: I just saw from the help document: annotation('line',x,y) creates a line annotation object that extends from the point defined by x(1),y(1) to the point defined by x(2),y(2), specified in normalized figure units. In my code, I would like the arrow pointing to the point (x,y) that is drawn by plot(), but annotation interprets the values of x and y as in normalized figure units. So I think that is what causes the problem. How can I specify the correct coordinates to annotation?

    Read the article

  • Is it possible to have "inherited partial structs" in c#?

    - by Balazs
    Is it possible to use partial structs to achieve something like this: Have an asp.net page base class with the following defined: public partial struct QuerystringKeys { public const string Username = "username"; public const string CurrentUser = "currentUser"; } Have an asp.net page, which inherits from the base class mentioned above, extend the partial declaration: public partial struct QuerystringKeys { /// <summary> /// The page number of the review instances list /// </summary> public const string Page = "page"; } The final goal is a QuerystringKeys struct with all three constant strings defined in it available to the asp.net page.

    Read the article

  • Getting memory section information

    - by Basilevs
    Can somebody explain me how the following code works? # if defined(__ELF__) # define __SECTION_FLAGS ", \"aw\" , @progbits" /* writable flag needed for ld ".[cd]tors" sections bug workaround) */ # elif defined(__COFF__) # define __SECTION_FLAGS ", \"dr\"" /* untested, may be writable flag needed */ # endif asm ( ".section .ctors" __SECTION_FLAGS "\n" ".globl __ctors_begin__\n" "__ctors_begin__:\n" ".previous\n" ); asm /* ld ".[cd]tors" sections bug workaround */ ( ".section .ctors0" __SECTION_FLAGS "\n" ".globl __ctors0_begin__\n" "__ctors0_begin__:\n" ".previous\n" ); Similarly we are getting __ctors_end__ , __ctors0_end__ and destructors location is also obtained this way. After some ld bug workarounds all functions pointed by pointers from __ctors_begin__ to __ctors_end__ are executed. I don't know assembler and this code is impossible for me to interpret. BTW: I know that invoking C++ contructors/destructors from C is not a task to be considered safe or easy.

    Read the article

  • Objective C Insanity -- simple assignement to a single float variable results in {{{CRAZY}}} values

    - by morgancodes
    memberA is defined in the header of ClassA. memberB is defined in the header of ClassB. ClassB is a subclass of ClassA Inside an instance of ClassB, setting memberA via simple assignment: memberA = 0.05 ...also changes memberB, but to a crazy number -- 1028443341. Additionally, assigning 0.05 to memberA results in memberA showing up in the debugger as 5.33083531e-38. Both variables are floats, neither is a pointer. I'm almost certianly making some noob mistake, but I don't have any clue what it might be. What sort of screw-up might make it so assigning a value to one variable results in crazy values appearing in two variables? I can give more details or real code, but figured I'd keep it simple to start with in case it's an obvious problem/solution.

    Read the article

  • __getattr__ on a module

    - by Matt Joiner
    How can implement the equivalent of a __getattr__ on a class, on a module? Example When calling a function that does not exist in a module's statically defined attributes, I wish to create an instance of a class in that module, and invoke the method on it with the same name as failed in the attribute lookup on the module. class A(object): def salutation(self, accusative): print "hello", accusative def __getattr__(mod, name): return getattr(A(), name) if __name__ == "__main__": salutation("world") Which gives: matt@stanley:~/Desktop$ python getattrmod.py Traceback (most recent call last): File "getattrmod.py", line 9, in <module> salutation("world") NameError: name 'salutation' is not defined Evidently something is not right about my assumed implementation.

    Read the article

  • ASP.NET Nested masterpages, how to set content in the top page from the aspx file?

    - by David Suarez
    I have some content from a CMS that I need to move to raw asp.net pages. Since the templates are nested I guess I can use nested masterpages to acomplish it, but I'm finding that I can't set values on the top masterpage from the deep child page. Here is a sample. I have several nested masterpages with contentplaceholders: top master (with contentPlaceHolder1) nested master, dependent on top master (with contentPlaceHolder2) aspx page, dependent on nested master, defines content for contentPlaceHolder1 and 2 The problem is that asp.net doesn't allow me to have the value of contentPlaceHolder1 defined in the content page, it should be defined in the nested master. But the point is that the client page knows that value, not the template masters (for instance, the page knows about the graphic it has to display on the the top, but the placeholder for the graphic is the top master). How can I set values in the aspx page to be rendered in the top master?

    Read the article

  • Web-To-Print - What technology should I explore? Web-Content -> drag & drop to Templates -> PDF

    - by hamlin11
    I'm discussing some software design issues with a potential client and the idea of Web-to-Print technology has come up. We need users to be able to drag images from an image library to various regions defined by a template. Example: Images may go in box A, B, or C and text may go in boxes D or E. These templates would be setup Boxes A through E would be defined inside a template by administrators using some sort of editor. These templates would serve as a mapping from web-content to a PDF. Once users drag images and insert text in the appropriate regions of the template, the result will be converted into a PDF. Is this feasible these days with jquery & asp.net? That would be nice. If not, what would be the ideal solution?

    Read the article

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