Search Results

Search found 2654 results on 107 pages for 'c sharp newbie'.

Page 10/107 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Android newbie installing Eclipse, having issues....

    - by Jeff
    I am a web developer, new to app development and Java/Android. I am about to follow some tutorials to get started learning but I'm running into a wall. The Android dev site says the recommended way to build Android apps is in Java using the Eclipse plug in. So I downloaded Eclipse Classic and unzipped it on to get this error: "A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: /Users//Desktop/eclipse/Eclipse.app/Contents/MacOS/jre/bin/java java in your current PATH" Any idea what the issue is and how I can fix it? Again, newbie to java, jre, android, so I apologize if this question has already been asked. In my research I've discovered that most of the posts or solutions I've found are tough for me to follow. There's always a few unclear items that are probably prohibiting me from getting the answer I need. So I'm hoping someone can walk me through installing or configuring whatever I need to regarding Java so I can continue installing Eclipse and begin learning. I should probably note that I'm on Mac OSX 10.6.6 Snow Leopard. Please let me know if you need any other info. Thanks so much in advance for any and all help!!!

    Read the article

  • Newbie - eclipse workflow (PHP development)

    - by engil
    Hi all - this is a bit of a newbie question but hoping I can get some guidance. I've been playing around with Eclipse for a couple months yet I'm still not completely comfortable with my setup and it seems like every time I install it to a new system I end up with different results. What I'm hoping to achieve is (I think) fairly standard. In my environment I'd like SVN (currently using Subclipse), FTP support (currently using Aptana plugin), debugging (going to use XDebug) and all the usual bells and whistles of development (code completion, refactoring, etc.) My biggest current issue is how to set up my environment to support both a 'development' and 'production' server. Optimally I would be able to work directly against the dev server (Eclipse on my Vista desktop against the VM Ubuntu dev server) and then push to production server (shared hosting). I'd prefer to work directly against the dev server (with no local project files, just using the Connections provided by Aptana) but I'm guessing this won't allow for code-completoin or all the other bells and whistles provided for development. Any thoughts? Kind of an open ended question, but maybe this could be an opportunity for some of you with a great deal of experience using Eclipse to describe your setups so people like me can get some insight into good ways to get set up.

    Read the article

  • Haskell newbie on types

    - by garulfo
    I'm completely new to Haskell (and more generally to functional programming), so forgive me if this is really basic stuff. To get more than a taste, I try to implement in Haskell some algorithmic stuff I'm working on. I have a simple module Interval that implements intervals on the line. It contains the type data Interval t = Interval t t the helper function makeInterval :: (Ord t) => t -> t -> Interval t makeInterval l r | l <= r = Interval l r | otherwise = error "bad interval" and some utility functions about intervals. Here, my interest lies in multidimensional intervals (d-intervals), those objects that are composed of d intervals. I want to separately consider d-intervals that are the union of d disjoint intervals on the line (multiple interval) from those that are the union of d interval on d separate lines (track interval). With distinct algorithmic treatments in mind, I think it would be nice to have two distinct types (even if both are lists of intervals here) such as import qualified Interval as I -- Multilple interval newtype MInterval t = MInterval [I.Interval t] -- Track interval newtype TInterval t = TInterval [I.Interval t] to allow for distinct sanity checks, e.g. makeMInterval :: (Ord t) => [I.Interval t] -> MInterval t makeMInterval is = if foldr (&&) True [I.precedes i i' | (i, i') <- zip is (tail is)] then (MInterval is) else error "bad multiple interval" makeTInterval :: (Ord t) => [I.Interval t] -> TInterval t makeTInterval = TInterval I now get to the point, at last! But some functions are naturally concerned with both multiple intervals and track intervals. For example, a function order would return the number of intervals in a multiple interval or a track interval. What can I do? Adding -- Dimensional interval data DInterval t = MIntervalStuff (MInterval t) | TIntervalStuff (TInterval t) does not help much, since, if I understand well (correct me if I'm wrong), I would have to write order :: DInterval t -> Int order (MIntervalStuff (MInterval is)) = length is order (TIntervalStuff (TInterval is)) = length is and call order as order (MIntervalStuff is) or order (TIntervalStuff is) when is is a MInterval or a TInterval. Not that great, it looks odd. Neither I want to duplicate the function (I have many functions that are concerned with both multiple and track intevals, and some other d-interval definitions such as equal length multiple and track intervals). I'm left with the feeling that I'm completely wrong and have missed some important point about types in Haskell (and/or can't forget enough here about OO programming). So, quite a newbie question, what would be the best way in Haskell to deal with such a situation? Do I have to forget about introducing MInterval and TInterval and go with one type only? Thanks a lot for your help, Garulfo

    Read the article

  • Autoconf (newbie) -- building with static library

    - by EB
    I am trying to migrate from manual build to autoconf, which is working very nicely so far. But I have one static library that I can't figure out how to integrate. That library will NOT be located in the usual library locations - the location of the binary (.a file) and header (.h file) will be given as a configure argument. (Notably, even if I move the .a file to /usr/lib or anywhere else I can think of, it still won't work.) Manual compilation is working with these: gcc ... -I/path/to/header/file/directory /full/path/to/the/.a/file/itself (Uh, I actually don't understand why the .a file is referenced directly, not with -L or anything. Yes, I have a half-baked understanding of building C programs.) I can use the configure argument to successfully find the header (.h file) using AC_CHECK_HEADER. Inside the AC_CHECK_HEADER I then add the location to CPFLAGS and the #include of the header file in the actual C code picks it up nicely. Given a configure argument that has been put into $location and the name of the needed files are myprog.h and myprog.a (which are both in the same directory), here is what works so far: AC_CHECK_HEADER([$location/myprog.h], [AC_DEFINE([HAVE_MYPROG_H], [1], [found myprog.h]) CFLAGS="$CFLAGS -I$location"]) Where I run into difficulties is getting the binary (.a file) linked in. No matter what I try, I always get an error about undefined references to the function calls for that library. I'm pretty sure it's a linkage issue, because I can fuss with the C code and make an intentional error in the function calls to that library which produces earlier errors that indicate that the function prototypes have been loaded and used to compile. I tried adding the location that contains the .a file to LDFLAGS and then doing a AC_CHECK_LIB but it is not found. Maybe my syntax is wrong, or maybe I'm missing something more fundamental, which would not be surprising since I'm a newbie and don't really know what I'm doing. Here is what I have tried: AC_CHECK_HEADER([$location/myprog.h], [AC_DEFINE([HAVE_MYPROG_H], [1], [found myprog.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS -L$location"; AC_CHECK_LIB(myprog)]) No dice. AC_CHECK_LIB is looking for -lmyprog I guess (or libmyprog?) so I'm not sure if that's a problem, so I tried this, too (omit AC_CHECK_LIB and include the .a directly in LDFLAGS), without luck: AC_CHECK_HEADER([$location/myprog.h], [AC_DEFINE([HAVE_MYPROG_H], [1], [found myprog.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS -L$location/myprog.a"]) To emulate the manual compilation, I tried removing the -L but that doesn't help: AC_CHECK_HEADER([$location/myprog.h], [AC_DEFINE([HAVE_MYPROG_H], [1], [found myprog.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS $location/myprog.a"]) I tried other combinations and permutations, but I think I might be missing something more fundamental....

    Read the article

  • PERL newbie : get a proper minimal debug_mode solution

    - by Michael Mao
    Hi all: I am learning PERL in a "head-first" manner. I am absolutely a newbie in this language: I am trying to have a debug_mode switch from CLI which can be used to control how my script works, by switching certain subroutines "on and off". And below is what I've got so far: #!/usr/bin/perl -s -w # purpose : make subroutine execution optional, # which is depending on a CLI switch flag use strict; use warnings; use constant DEBUG_VERBOSE => "v"; use constant DEBUG_SUPPRESS_ERROR_MSGS => "s"; use constant DEBUG_IGNORE_VALIDATION => "i"; use constant DEBUG_SETPPING_COMPUTATION => "c"; our ($debug_mode); mainMethod(); sub mainMethod # () { if(!$debug_mode) { print "debug_mode is OFF\n"; } elsif($debug_mode) { print "debug_mode is ON\n"; } else { print "OMG!\n"; exit -1; } checkArgv(); printErrorMsg("Error_Code_123", "Parsing Error at..."); verbose(); } sub checkArgv #() { print ("Number of ARGV : ".(1 + $#ARGV)."\n"); } sub printErrorMsg # ($error_code, $error_msg, ..) { if(defined($debug_mode) && !($debug_mode =~ DEBUG_SUPPRESS_ERROR_MSGS)) { print "You can only see me if -debug_mode is NOT set". " to DEBUG_SUPPRESS_ERROR_MSGS\n"; die("terminated prematurely...\n") and exit -1; } } sub verbose # () { if(defined($debug_mode) && ($debug_mode =~ DEBUG_VERBOSE)) { print "Blah blah blah...\n"; } } So far as I can tell, at least it works...: the -debug_mode switch doesn't interfere with normal ARGV the following commandlines work: ./optional.pl ./optional.pl -debug_mode ./optional.pl -debug_mode=v ./optional.pl -debug_mode=s However, I am puzzled when multiple debug_modes are "mixed", such as: ./optional.pl -debug_mode=sv ./optional.pl -debug_mode=vs I don't understand why the above lines of code "magically works". I see both of the "DEBUG_VERBOS" and "DEBUG_SUPPRESS_ERROR_MSGS" apply to the script, which is fine in this case. However, if there are some "conflicting" debug modes, I am not sure how to set the "precedence of debue_modes"? Also, I am not certain if my approach is good enough to Perlists and I hope I am getting my feet in the right direction. One biggest problem is that I now put if statements inside most of my subroutines for controlling their behavior under different modes. Is this okay? Is there a more elegant way? I know there must be a debug module from CPAN or elsewhere, but I wanna a real minimal solution that doesn't depend on any other module than the "default" And I cannot have any control on the environment where this script will be executed... Many thanks to the suggestions in advance.

    Read the article

  • SaaS Architecture Question from Newbie

    - by user226767
    I have developed a number of departmental client-server applications, and am now ready to begin working on moving one of these applications to a SaaS model. I have done some basic web development, but I'm a newbie when it comes to SaaS architectures. One of the first questions that comes to mind as I try to design the architecture is the question of single vs. multi tenancy. The pros and cons of each vary significantly depending on the type of application and scale required, so I'd like to describe my application and scale needs below, and hope others can comment on how I should get started with the architecture. The client-server application currently consists of a Firebird database and a Windows application. The database contains about 20 tables containing a few thousand records in 4 primary tables, and a few hundred records in various lookup and related tables. Although the number of records is small, the size can get large, as the database can contain large BLOBS. Each customer sets up their own database and has a handful of users within the organization connected to it. When I update the db schema, a new windows application is released, and it checks the db schema and then applies the updates as needed. For the SaaS application, I am designing for 100's (not 1000's or millions) of new customers per year. My first thought was to go with a multi tenancy model to make updates easy (shut down apply the updates to one database, and then start up). On the other hand, a single tenancy model would provide a means to roll updates out to a group of customers at a time, and spread the risk of data corruption - i.e. if something goes wrong with a database, it will impact one customer instead of all customers. With this idea, I was thinking of having a single web front-end which would connect to a single customer database upon login. Thus, when a new customer creates an account, a new database would be created (each customer would have their own db with multiple users as needed for the customer). In this model, a db update would require either a process to go through each db to apply schema changes, or a trigger upon logging in to initiate a schema update similar to the client-server model currently in use. Can anyone point me to information for similar applications which have been ported from client-server to SaaS? Or provide any pointers to consider? Basically I'm looking for architecture examples of taking a departmental application and making it available as a self service website for multiple customers. Thanks for any suggestions, resources, etc.

    Read the article

  • Newbie's problems with MySQL and php

    - by Mirage81
    I'm a real newbie with php and MySQL. Now I'm working on the following code which should search the database for eg. all the Lennons living in Liverpool. 1) How should I modify "get.php" to get the text "no results" to appear if there are no search results. 2) How should I modify "index.php" to get the option values (city and lastname) straight from the database instead of having to type them one by one? 3) Am I using mysql_real_escape_string the right way? 4) Any other mistakes in the code? index.php: <form action="get.php" method="post"> <p> <select name="city"> <option value="Birmingham">Birmingham</option> <option value="Liverpool">Liverpool</option> <option value="London">London</option> </select> </p> <p> <select name="lastname"> <option value="Lennon">Lennon</option> <option value="McCartney">McCartney</option> <option value="Osbourne">Osbourne</option> </select> </p> <p> <input value="Search" type="submit"> </p> </form> get.php: <?php $city = $_POST['city']; $lastname = $_POST['lastname']; $conn = mysql_connect('localhost', 'user', 'password'); mysql_select_db("database", $conn) or die("connection failed"); $query = "SELECT * FROM users WHERE city = '$city' AND lastname = '$lastname'"; $result = mysql_query($query, $conn); $city = mysql_real_escape_string($_POST['city']); $lastname = mysql_real_escape_string($_POST['lastname']); echo $rowcount; while ($row = mysql_fetch_row($result)) { if ($rowcount == '0') echo 'no results'; else { echo '<b>City: </b>'.htmlspecialchars($row[0]).'<br />'; echo '<b>Last name: </b>'.htmlspecialchars($row[1]).'<br />'; echo '<b>Information: </b>'.htmlspecialchars($row[2]); } } mysql_close($conn);

    Read the article

  • NewBie Question, jQuery: How can we implement if...else logic and call function

    - by Rachel
    I am new to jQuery and so don't mind this question if it sounds stupid but here is something that I am trying to do : I have 3 functions like: AddToCart Function which adds item to the shopping cart: //offer_id is the offer which we are trying to add to cart. addToCart: function(offer_id) { this.submit({action: 'add', 'offer_id': offer_id}, {'app_server_url': this.app_server_url}); }, RemoveFromCart which removes data from the cart //target is link clicked and event is the click event. removeFromCart: function(target, event) { this.uniqueElmt('cart_table').find('.sb_item_remove').unbind('click'); var offer_id = $(target).parent().find('.offer_id').html(); this.submit({action: 'remove', 'offer_id': offer_id, 'next_action': this.config.current_action}, {'app_server_url': this.app_server_url}); }, Get the current state of the cart //return string which represents current state of cart. getCartItems: function() { return this.contents; } Now I am trying to do 3 things: if there is no content in cart and addToCart is called than some action, so basically here we need to check the current state of cart and that is obtained by calling getCartItems and if it is Null and than if addToCart is called than we perform some action if there is content in the cart and addToCart is called than some action,so basically here we need to check the current state of cart and that is obtained by calling getCartItems and check if it is Null or not and than if addToCart is called than we perform some action if we had some content in the cart. if there is content in the cart and removeFromCart is called some action, so basically here we need to check the current state of cart and that is obtained by calling getCartItems and if it is not Null and if removeFromCart is called than we perform some action Pseudocode of what I am trying to do: if there is no content in cart and addToCart is called than $(document).track( { 'module' : 'Omniture', 'event' : 'instant', 'args' : { 'linkTrackVars' : 'products,events', 'linkTrackEvents' : 'scAdd,scOpen', 'linkType' : 'o', 'linkName' : 'Cart : First Product Added' // could be blank, but can include event name as added feature 'svalues' : { 'products' : ';OFFERID1[,;OFFERID2]', 'events' : 'scAdd,scOpen', }, } 'defer' : '0' } ); if there is content in the cart and addToCart is called than $(document).track( { 'module' : 'Omniture', 'event' : 'instant', 'args' : { 'linkTrackVars' : 'products,events', 'linkTrackEvents' : 'scAdd', 'linkType' : 'o', 'linkName' : 'Cart : Product Added' // could be blank, but can include event name as added feature 'svalues' : { 'products' : ';OFFERID1[,;OFFERID2]', 'events' : 'scAdd', }, }, 'defer' : '0' } ); if there is content in the cart and removeFromCart is called $(document).track( { 'module' : 'Omniture', 'event' : 'instant', 'args' : { 'linkTrackVars' : 'products,events', 'linkTrackEvents' : 'scRemove', 'linkType' : 'o', 'linkName' : 'Cart : Product Removed' // could be blank, but can include event name as added feature 'svalues' : { 'products' : ';OFFERID1[,;OFFERID2]', 'events' : 'scRemove', }, } 'defer' : '0' } ); My basic concern is that am complete newbie to jQuery and JavaScript and so am not sure how can I implement if...else logic and how can I call a funtion using jQuery/JavaScript.

    Read the article

  • Autoconf -- including a static library (newbie)

    - by EB
    I am trying to migrate my application from manual build to autoconf, which is working very nicely so far. But I have one static library that I can't figure out how to integrate. That library will NOT be located in the usual library locations - the location of the binary (.a file) and header (.h file) will be given as a configure argument. (Notably, even if I move the .a file to /usr/lib or anywhere else I can think of, it still won't work.) It is also not named traditionally (it does not start with "lib" or "l"). Manual compilation is working with these (directory is not predictable - this is just an example): gcc ... -I/home/john/mystuff /home/john/mystuff/helper.a (Uh, I actually don't understand why the .a file is referenced directly, not with -L or anything. Yes, I have a half-baked understanding of building C programs.) So, in my configure.ac, I can use the relevant configure argument to successfully find the header (.h file) using AC_CHECK_HEADER. Inside the AC_CHECK_HEADER I then add the location to CPFLAGS and the #include of the header file in the actual C code picks it up nicely. Given a configure argument that has been put into $location and the name of the needed files are helper.h and helper.a (which are both in the same directory), here is what works so far: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"]) Where I run into difficulties is getting the binary (.a file) linked in. No matter what I try, I always get an error about undefined references to the function calls for that library. I'm pretty sure it's a linkage issue, because I can fuss with the C code and make an intentional error in the function calls to that library which produces earlier errors that indicate that the function prototypes have been loaded and used to compile. I tried adding the location that contains the .a file to LDFLAGS and then doing a AC_CHECK_LIB but it is not found. Maybe my syntax is wrong, or maybe I'm missing something more fundamental, which would not be surprising since I'm a newbie and don't really know what I'm doing. Here is what I have tried: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS -L$location"; AC_CHECK_LIB(helper)]) No dice. AC_CHECK_LIB is looking for -lhelper I guess (or libhelper?) so I'm not sure if that's a problem, so I tried this, too (omit AC_CHECK_LIB and include the .a directly in LDFLAGS), without luck: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS -L$location/helper.a"]) To emulate the manual compilation, I tried removing the -L but that doesn't help: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS $location/helper.a"]) I tried other combinations and permutations, but I think I might be missing something more fundamental....

    Read the article

  • Autoconf -- building with static library (newbie)

    - by EB
    I am trying to migrate my application from manual build to autoconf, which is working very nicely so far. But I have one static library that I can't figure out how to integrate. That library will NOT be located in the usual library locations - the location of the binary (.a file) and header (.h file) will be given as a configure argument. (Notably, even if I move the .a file to /usr/lib or anywhere else I can think of, it still won't work.) It is also not named traditionally (it does not start with "lib" or "l"). Manual compilation is working with these (directory is not predictable - this is just an example): gcc ... -I/home/john/mystuff /home/john/mystuff/helper.a (Uh, I actually don't understand why the .a file is referenced directly, not with -L or anything. Yes, I have a half-baked understanding of building C programs.) So, in my configure.ac, I can use the relevant configure argument to successfully find the header (.h file) using AC_CHECK_HEADER. Inside the AC_CHECK_HEADER I then add the location to CPFLAGS and the #include of the header file in the actual C code picks it up nicely. Given a configure argument that has been put into $location and the name of the needed files are helper.h and helper.a (which are both in the same directory), here is what works so far: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"]) Where I run into difficulties is getting the binary (.a file) linked in. No matter what I try, I always get an error about undefined references to the function calls for that library. I'm pretty sure it's a linkage issue, because I can fuss with the C code and make an intentional error in the function calls to that library which produces earlier errors that indicate that the function prototypes have been loaded and used to compile. I tried adding the location that contains the .a file to LDFLAGS and then doing a AC_CHECK_LIB but it is not found. Maybe my syntax is wrong, or maybe I'm missing something more fundamental, which would not be surprising since I'm a newbie and don't really know what I'm doing. Here is what I have tried: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS -L$location"; AC_CHECK_LIB(helper)]) No dice. AC_CHECK_LIB is looking for -lhelper I guess (or libhelper?) so I'm not sure if that's a problem, so I tried this, too (omit AC_CHECK_LIB and include the .a directly in LDFLAGS), without luck: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS -L$location/helper.a"]) To emulate the manual compilation, I tried removing the -L but that doesn't help: AC_CHECK_HEADER([$location/helper.h], [AC_DEFINE([HAVE_HELPER_H], [1], [found helper.h]) CFLAGS="$CFLAGS -I$location"; LDFLAGS="$LDFLAGS $location/helper.a"]) I tried other combinations and permutations, but I think I might be missing something more fundamental....

    Read the article

  • Fluent NHibermate and Polymorphism and a Newbie!

    - by Andy Baker
    I'm a fluent nhibernate newbie and I'm struggling mapping a hierarchy of polymorhophic objects. I've produced the following Model that recreates the essence of what I'm doing in my real application. I have a ProductList and several specialised type of products; public class MyProductList { public virtual int Id { get; set; } public virtual string Name {get;set;} public virtual IList<Product> Products { get; set; } public MyProductList() { Products = new List<Product>(); } } public class Product { public virtual int Id { get; set; } public virtual string ProductDescription {get;set;} } public class SizedProduct : Product { public virtual decimal Size {get;set;} } public class BundleProduct : Product { public virtual Product BundleItem1 {get;set;} public virtual Product BundleItem2 {get;set;} } Note that I have a specialised type of Product called BundleProduct that has two products attached. I can add any of the specialised types of product to MyProductList and a bundle Product can be made up of any of the specialised types of product too. Here is the fluent nhibernate mapping that I'm using; public class MyListMap : ClassMap<MyList> { public MyListMap() { Id(ml => ml.Id); Map(ml => ml.Name); HasManyToMany(ml => ml.Products).Cascade.All(); } } public class ProductMap : ClassMap<Product> { public ProductMap() { Id(prod => prod.Id); Map(prod => prod.ProductDescription); } } public class SizedProductMap : SubclassMap<SizedProduct> { public SizedProductMap() { Map(sp => sp.Size); } } public class BundleProductMap : SubclassMap<BundleProduct> { public BundleProductMap() { References(bp => bp.BundleItem1).Cascade.All(); References(bp => bp.BundleItem2).Cascade.All(); } } I haven't configured have any reverse mappings, so a product doesn't know which Lists it belongs to or which bundles it is part of. Next I add some products to my list; MyList ml = new MyList() { Name = "Example" }; ml.Products.Add(new Product() { ProductDescription = "PSU" }); ml.Products.Add(new SizedProduct() { ProductDescription = "Extension Cable", Size = 2.0M }); ml.Products.Add(new BundleProduct() { ProductDescription = "Fan & Cable", BundleItem1 = new Product() { ProductDescription = "Fan Power Cable" }, BundleItem2 = new SizedProduct() { ProductDescription = "80mm Fan", Size = 80M } }); When I persist my list to the database and reload it, the list itself contains the items I expect ie MyList[0] has a type of Product, MyList[1] has a type of SizedProduct, and MyList[2] has a type of BundleProduct - great! If I navigate to the BundleProduct, I'm not able to see the types of Product attached to the BundleItem1 or BundleItem2 instead they are always proxies to the Product - in this example BundleItem2 should be a SizedProduct. Is there anything I can do to resove this either in my model or the mapping? Thanks in advance for your help.

    Read the article

  • Objective-C NSArray NEWBIE Question:

    - by clearbrian
    Hi I have a weird problems with NSArray where some of the members of the objects in my array are going out of scope but not the others: I have a simple object called Section. It has 3 members. @interface Section : NSObject { NSNumber *section_Id; NSNumber *routeId; NSString *startLocationName; } @property(nonatomic,retain) NSNumber *section_Id; @property(nonatomic,retain) NSNumber *routeId; @property(nonatomic,retain) NSString *startLocationName; @end @implementation Section @synthesize section_Id; @synthesize routeId; @synthesize startLocationName; //Some static finder methods to get list of Sections from the db + (NSMutableArray *) findAllSections:{ - (void)dealloc { [section_Id release]; [routeId release]; [startLocationName release]; [super dealloc]; } @end I fill it from a database in a method called findAllSection self.sections = [Section findAllSections]; In find all sections I create some local variables fill them with data from db. NSNumber *secId = [NSNumber numberWithInt:id_section]; NSNumber *rteId = [NSNumber numberWithInt:id_route]; NSString *startName = @""; Then create a new Section and store these local variable's data in the Section Section *section = [[Section alloc] init]; section.section_Id = secId; section.routeId = rteId; section.startLocationName = startName; Then I add the section to the array [sectionsArray addObject:section]; Then I clean up, releasing local variables and the section I added to the array [secId release]; [rteId release]; [startName release]; [locEnd_name release]; [section release]; In a loop repeat for all Sections (release local variables and section is done in every loop) The method returns and I check the array and all the Sections are there. I cant seem to dig further down to see the values of the Section objects in the array (is this possible) Later I try and retrieve one of the Sections I get it from the array Section * section = [self.sections objectAtIndex:row]; Then check the value NSLog(@" SECTION SELECTED:%@",section.section_Id); BUT call to section.section_Id crashed as section.section_Id is out of scope. I check the other members of this Section object and theyre ok. After some trial and error I find that by commenting out the release of the member variable the object is OK. //[secId release]; [rteId release]; [startName release]; [locEnd_name release]; [section release]; My questions are: Am I cleaning up ok? Should I release the object added to an array and the local variable in the function? Is my dealloc ok in Section? Does this code look ok and should I be looking elsewhere for the problem? I'm not doing anything complicated just filling array from DB use it in Table Cell. If its a stupid mistake then tell me (I did put NEWBIE on the question so dont be shocked it was asked) I can comment out the release but would prefer to know why or if code looks ok then ill need further digging. the only place that secId is released is in the dealloc. Thanks

    Read the article

  • Read video information(date created)?

    - by Lynx
    In window, i can get the date created of the video from properties(right click). I have a few idea on this but i dont know how to do it. 1. Get the video information directly from video(like in windows), 2. By extracting the video name to get the date created(The video's name is in date format, which is the time it created). And i also using taglib-sharp to get the video duration and resolution, but i cant find any sample code on how to get the video creation date. Note: video name in date format - example, 20121119_125550.avi Edit Found this code and so far its working string fileName = Server.MapPath("//video//20121119_125550.avi"); FileInfo fileInfo = new FileInfo(fileName); DateTime creationTime = fileInfo.CreationTime; Output: 2012/11/19 12:55:50 For the file's name, i will add another string in name. For example User1-20121119_125550.avi.avi, so it will get complicated after that.

    Read the article

  • Newbie, deciding Python or Erlang

    - by Joe
    Hi Guys, I'm a Administrator (unix, Linux and some windows apps such as Exchange) by experience and have never worked on any programming language besides C# and scripting on Bash and lately on powershell. I'm starting out as a service provider and using multiple network/server monitoring tools based on open source (nagios, opennms etc) in order to monitor them. At this moment, being inspired by a design that I came up with, to do more than what is available with the open source at this time, I would like to start programming and test some of these ideas. The requirement is that a server software that captures a stream of data and store them in a database(CouchDB or MongoDB preferably) and the client side (agent installed on a server) would be sending this stream of data on a schedule of every 10 minutes or so. For these two core ideas, I have been reading about Python and Erlang besides ruby. I do plan to use either Amazon or Rackspace where the server platform would run. This gives me the scalability needed when we have more customers with many servers. For that reason alone, I thought Erlang was a better fit(I could be totally wrong, new to this game) and I understand that Erlang has limited support in some ways compared to Ruby or Python. But also I'm totally new to the programming realm of things and any advise would be appreciated grately. Jo

    Read the article

  • Bazaar newbie question about repository structures

    - by esc1729
    I want to use Bazaar on Windows XP for web-development and related tasks. Most of the files are edited locally and then transferred via FTP to the server. Just now the repository sits on my local workstation. Later on it should be shared locally with some co-workers. Perhaps we will use a local Linux server as a centralized repository, but this structure is not decided for now. But first I need to understand the impacts of the different repository setups, which I do not at all. Using Bazaar-Explorer on Windows XP I’ve created a ‘shared tree repository’ from the option list of the init-dialogue in some location dev-filter/. Bazaar Explorer tells me: Created repository with treeless branches at F:/bzr.local/dev-filter Created branch at F:/bzr.local/dev-filter/trunk Created working tree at F:/bzr.local/dev-filter/work OK so far. Now I move a bunch of files into the work directory and add and commit them as Rev 1 ‘Start Revision’. Then I work on some of these files and commit them again as Rev 2. Here my confusion starts. Shouldn’t both revisions go into the trunk? The trunk is still empty, beside the .bzr directory which only holds some management information. If I delete my working directory, which I have tried during these first experiments, everything is gone. There’s obviously no hidden storage of those files. OK. Perhaps I need to push it into the trunk? This does not work either. Entering the work/ directory and initializing the ‘push’ to the trunk, Bazaar-Explorer tells me No new revisions to push. So what? This looks like a severe conceptual misunderstanding about what should happen on my side. Edit, 2010-02-03: Some conclusions What I learned meanwhile is this: I think I should switch to the command line until I really understand what’s going on, at least for creating the repositories and branches. Bazaar Explorer introduces a new level of abstraction which I only can handle if I understand the level beneath One of the secrets of working with Bazaar at least for me is to understand those .bzr directories, their particular properties and states when created with ‘bzr init’, ‘bzr init-repository’, ‘bzr branch’ etc. in all their variants and how they are plumped together. While there’s a whole chapter of ‘Organizing your workspace’ in the Bazaar User Guide, it’s more or less workflow oriented. The manual contains a lot of directory structures for the given examples. What I would prefer beside this and have not (or only rudimentary) found so far is some graphical representation of those ‘Lego like’ .bzr building blocks which create the linking of all the parts. So I started to invent some simple notation while working through the examples and looking into the .bzr directories to document what information is stored there, where does it come from, how and to what is it linked, is it complete or shared, etc. Erich Schreiber

    Read the article

  • josso newbie setup problems - can't use tomcat's manager page

    - by opensas
    I'm trying to setup josso on an apache tomcat server running on windows. I've installed Apache Tomcat/6.0.26 fro zip file to c:\tomcat then installed josso following the documentation at http://www.josso.org/confluence/display/JOSSO1/Quick+Start started tomcat with c:\tomcat\bin\startup.bat, and noticed the following warnings ADVERTENCIA: [SetPropertiesRule]{Server/Service/Engine/Realm} Setting property ' debug' to '1' did not find a matching property. 21/03/2010 15:55:03 org.apache.tomcat.util.digester.SetPropertiesRule begin ADVERTENCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Valve} Setting prope rty 'appName' to 'josso' did not find a matching property. ... ADVERTENCIA: Unable to find required classes (javax.activation.DataHandler and j avax.mail.internet.MimeMultipart). Attachment support is disabled. ... ADVERTENCIA: Bean with key 'josso:type=SSOAuditManager' has been registered as a n MBean but has no exposed attributes or operations ... but then everything seems to work fine, the problem is I can no longer access http://localhost:8080/manager/html using user tomcat /tomcat, as configured in \conf\tomcat-users.xml (before installing josso it worked) I tried with tomcat/tomcatpwd as defined in \lib\josso-credentials.xml and even added tomcat and the manager role to \lib\josso-users.xml, with no luck... Is anybody having the same problem? how can I access tomcat's manager page? Thanks a lot saludos sas This is my config: C:\tomcat\bincatalina version Using CATALINA_BASE: "C:\tomcat" Using CATALINA_HOME: "C:\tomcat" Using CATALINA_TMPDIR: "C:\tomcat\temp" Using JRE_HOME: "c:\java" Using CLASSPATH: "C:\tomcat\bin\bootstrap.jar" Server version: Apache Tomcat/6.0.26 Server built: March 9 2010 1805 Server number: 6.0.26.0 OS Name: Windows XP OS Version: 5.1 Architecture: x86 JVM Version: 1.5.0_22-b03 JVM Vendor: Sun Microsystems Inc ps: moreover, when shutting down, I get a couple of error like this GRAVE: A web application appears to have started a thread named [JOSSOAssertionM onitor] but has failed to stop it. This is very likely to create a memory leak. 21/03/2010 15:57:06 org.apache.catalina.loader.WebappClassLoader clearReferences Threads and then tomcat's shutdown freezes at 21/03/2010 15:57:07 org.apache.coyote.ajp.AjpAprProtocol destroy INFO: Parando Coyote AJP/1.3 en ajp-8009 ps: sorry for this lengthy question...

    Read the article

  • Problems cloning a GIT repository (Newbie problems)

    - by Brett Rigby
    Hi there, Trying to set-up GIT Server on my local dev machine and have been following this website so far but am a little stuck when trying to clone a repository. In GIT Bash, here's my output: $ git clone ssh://[email protected]:4837/ssh/home/Administrator/project1.git Initialized empty Git repository in C:/Git/project1/.git/ Permission denied (publickey,keyboard-interactive). fatal: The remote end hung up unexpectedly Any suggestions on why I would be getting a 'Permission denied (publickey,keyboard-interactive)' error? Thanks in advance!

    Read the article

  • .Net MEF newbie question

    - by steve.macdonald
    I am missing something basic when it comes to using MEF. I got it working using samples and a simple console app where everything is in the same assembly. Then I put some imports and exports in a separate project which contains various entities. I want to use these entities in an MS Test, but the composition is never actually done. When I move the composition stuff into the constructor of an entity in question it works, but that's obviously wrong. Does GetExecutingAssembly only "see" the test process? What am I missing re containers? I tried putting the container in a Using in the test without luck. The MEF docs are still very scant and I can't find a simple example of an application (or MS Test) which uses entities from a different project...

    Read the article

  • Career advice for a frustrated newbie programmer.

    - by Satoru.Logic
    Hi, all. This is my first year as a programmer. The programming language that I'm most familiar with is Python. I am maintaining a web2py based legacy system, alone, which means I have to grow up as an all-rounder. The original programmers on this project are nowhere to find, and there are hardly any usable documents about requirements or anything. I find it very frustrating every time I hear the users criticize the system, and I can't help explaining that "that was not my fault, those mess was there even before I entered this company." I wonder what should I do with this situation. Please give me some advice, thanks in advance.

    Read the article

  • java RMI newbie-- some basic questions about SSL and auth/.rate limiting an RMI service

    - by Arvind
    I am trying to work to secure a java based RMI service using SSL. I have some basic questions about the capabilities of using SSL. Specifically, from what I understand, the client and server connecting via SSL will need to have appropriate credential certificates in both client and server, for a client to be granted access to the server. Am I correct in my understanding? Also, what I want to know is, can a person who is already using my RMI service and has access to a client machine , make a copy of the certificate in the client machine to other client machines-- and then invoke my RMI service from those other machines as well? How do I prevent such a situation from occurring? I mean, in a REST API you can use OAuth authentication, can we have some kind of authentication in an RMI Service? Also, can I possibly limit usage of the RMI service? For eg, a specific client may be allowed to make only 5000 calls per day to my RMI service, and if he makes more calls the calls occurring after the 5000 calls limit are all denied? How do I do such rate limiting and/or authentication for my RMI Service?

    Read the article

  • TSQL Shred XML - Working with namespaces (newbie @ shredding XML)

    - by drachenstern
    Here's a link to my previous question on this same block of code with a working shred example Ok, I'm a C# ASP.NET dev following orders: The orders are to take a given dataset, shred the XML and return columns. I've argued that it's easier to do the shredding on the ASP.NET side where we already have access to things like deserializers, etc, and the entire complex of known types, but no, the boss says "shred it on the server, return a dataset, bind the dataset to the columns of the gridview" so for now, I'm doing what I was told. This is all to head off the folks who will come along and say "bad requirements". Task at hand: Current code that doesn't work: And if we modify the previous post to include namespaces on the XML elements, we lose the functionality that the previous post has... DECLARE @table1 AS TABLE ( ProductID VARCHAR(10) , Name VARCHAR(20) , Color VARCHAR(20) , UserEntered VARCHAR(20) , XmlField XML ) INSERT INTO @table1 SELECT '12345','ball','red','john','<sizes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><size xmlns="http://example.com/ns" name="medium"><price>10</price></size><size xmlns="http://example.com/ns" name="large"><price>20</price></size></sizes>' INSERT INTO @table1 SELECT '12346','ball','blue','adam','<sizes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><size xmlns="http://example.com/ns" name="medium"><price>12</price></size><size xmlns="http://example.com/ns" name="large"><price>25</price></size></sizes>' INSERT INTO @table1 SELECT '12347','ring','red','john','<sizes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><size xmlns="http://example.com/ns" name="medium"><price>5</price></size><size xmlns="http://example.com/ns" name="large"><price>8</price></size></sizes>' INSERT INTO @table1 SELECT '12348','ring','blue','adam','<sizes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><size xmlns="http://example.com/ns" name="medium"><price>8</price></size><size xmlns="http://example.com/ns" name="large"><price>10</price></size></sizes>' INSERT INTO @table1 SELECT '23456','auto','black','ann','<auto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><type xmlns="http://example.com/ns">car</type><wheels xmlns="http://example.com/ns">4</wheels><doors xmlns="http://example.com/ns">4</doors><cylinders xmlns="http://example.com/ns">3</cylinders></auto>' INSERT INTO @table1 SELECT '23457','auto','black','ann','<auto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><type xmlns="http://example.com/ns">truck</type><wheels xmlns="http://example.com/ns">4</wheels><doors xmlns="http://example.com/ns">2</doors><cylinders xmlns="http://example.com/ns">8</cylinders></auto><auto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><type xmlns="http://example.com/ns">car</type><wheels xmlns="http://example.com/ns">4</wheels><doors xmlns="http://example.com/ns">4</doors><cylinders xmlns="http://example.com/ns">6</cylinders></auto>' DECLARE @x XML -- I think I'm supposed to use WITH XMLNAMESPACES(...) here but I don't know how SELECT @x = ( SELECT ProductID , Name , Color , UserEntered , XmlField.query(' for $vehicle in //auto return <auto type = "{$vehicle/type}" wheels = "{$vehicle/wheels}" doors = "{$vehicle/doors}" cylinders = "{$vehicle/cylinders}" />') FROM @table1 table1 WHERE Name = 'auto' FOR XML AUTO ) SELECT @x SELECT ProductID = T.Item.value('../@ProductID', 'varchar(10)') , Name = T.Item.value('../@Name', 'varchar(20)') , Color = T.Item.value('../@Color', 'varchar(20)') , UserEntered = T.Item.value('../@UserEntered', 'varchar(20)') , VType = T.Item.value('@type' , 'varchar(10)') , Wheels = T.Item.value('@wheels', 'varchar(2)') , Doors = T.Item.value('@doors', 'varchar(2)') , Cylinders = T.Item.value('@cylinders', 'varchar(2)') FROM @x.nodes('//table1/auto') AS T(Item) If my previous post shows there's a much better way to do this, then I really need to revise this question as well, but on the off chance this coding-style is good, I can probably go ahead with this as-is... Any takers?

    Read the article

  • Javascript newbie, how to choose between window.URL.createObjectURL() and window.webkitURL.createObjectURL() based on browser

    - by Rohith Raveendran
    From the firefox developer website I know that firefox use objectURL = window.URL.createObjectURL(file); to get url of file type, but in chrome and other webkit browsers we have window.webkitURL.createObjectURL() for detecting url. I don't know how to swap this functions based on browser engines, and I need it to be worked on both browsers (Chrome and firefox) https://developer.mozilla.org/en/DOM/window.URL.createObjectURL

    Read the article

  • Trying to build a Drupal-like CMS in ASP.NET MVC - Newbie Questions

    - by user252160
    I am new to ASP.NET MVC, and the ASP.NET technology in general, so, please, excuse the stupidity of my questions. I have a lot of experience with php development and CMS customization (Drupal and Wordpress mainly), and I wanted to know whether some techniques could be applied in asp.net mvc. I want to know what exactly could be modified without recompiling an already built application Can I edit the views without recompiling the app. Can I create custom themes ? Can I add plugins compiled as dlls and use them at runtime. Can I "mark" the assembly in such a way that the web application will check on the next request and will reference it, without me manually adding it to the project and recompiling. I've heard that this is possible. I will make sure to add more when something comes up. The reason I am asking is because I'd like to try and develop a Drupal-like CMS (custom types, views, etc) in asp.net mvc. The dynamism of php will be quite a challenge to replicate in a compiled technology, yet I am ready to try.

    Read the article

  • Newbie Android question

    - by DanyW
    Hi folks, I have just started with Android with the usual Hello World project template in Eclipse. I modified the layout XML and removed the label that says "Hello World, !", and added a couple of other controls. However, these are not reflected in the app, within the emulator. When I run this app from Eclipse again it is still showing the Hello World label! I'm sure it's something terribly simple that I have completely missed. Can someone please point me in the right direction? Many thanks, Dany.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >