Search Results

Search found 30234 results on 1210 pages for 'object oriented'.

Page 13/1210 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Object database for website

    - by Damian
    I was planning to use db4o for a website. It's a microblog site with small posts and comments developed in java. The thing is I contacted db4o support asking if db4o would be suitable for a website, and they answered me that only for websites with low concurrency. That means with few requests? So, now I think db4o will not be a good choice. Do you know if there is any object database for java suitable for a website?

    Read the article

  • Sequence Diagram return a new constructed Object

    - by user256007
    I am drawing a Sequence Diagram where the scenario is. 1. an Actor calls :Table::query(query:String) :Table::query Calls :Connection::execute(query) :Connection::execute < a new :Row Object :Connection::execute calls :Row::fillData(result) :Connection::execute returns :Row ...... There are More But I am Stuck in Step 5 I cant Understand how to draw that, :Connection::execute returning the newly Constructed Row itself, in a Standard way.

    Read the article

  • Difference in Django object creation call

    - by PhilGo20
    I'd like to know if there's a difference between the following two calls to create an object in Django Animal.objects.create(name="cat", sound="meow") and Animal(name="cat", sound="meow") I see both in test cases and I want to make sure I am not missing something. thanks

    Read the article

  • What is the use of Association, Aggregation and Composition (Encapsulation) in Classes

    - by SahilMahajanMj
    I have gone through lots of theories about what is encapsulation and the three techniques of implementing it, which are Association, Aggregation and Composition. What i found is, Encapsulation Encapsulation is the technique of making the fields in a class private and providing access to the fields via public methods. If a field is declared private, it cannot be accessed by anyone outside the class, thereby hiding the fields within the class. For this reason, encapsulation is also referred to as data hiding. Encapsulation can be described as a protective barrier that prevents the code and data being randomly accessed by other code defined outside the class. Access to the data and code is tightly controlled by an interface. The main benefit of encapsulation is the ability to modify our implemented code without breaking the code of others who use our code. With this feature Encapsulation gives maintainability, flexibility and extensibility to our code. Association Association is a relationship where all object have their own lifecycle and there is no owner. Let’s take an example of Teacher and Student. Multiple students can associate with single teacher and single student can associate with multiple teachers but there is no ownership between the objects and both have their own lifecycle. Both can create and delete independently. Aggregation Aggregation is a specialize form of Association where all object have their own lifecycle but there is ownership and child object can not belongs to another parent object. Let’s take an example of Department and teacher. A single teacher can not belongs to multiple departments, but if we delete the department teacher object will not destroy. We can think about “has-a” relationship. Composition Composition is again specialize form of Aggregation and we can call this as a “death” relationship. It is a strong type of Aggregation. Child object dose not have their lifecycle and if parent object deletes all child object will also be deleted. Let’s take again an example of relationship between House and rooms. House can contain multiple rooms there is no independent life of room and any room can not belongs to two different house if we delete the house room will automatically delete. The question is: Now these all are real world examples. I am looking for some description about how to use these techniques in actual class code. I mean what is the point for using three different techniques for encapsulation, How these techniques could be implemented and How to choose which technique is applicable at time.

    Read the article

  • Validation and Error Generation when using the Data Mapper Pattern

    - by AndyPerlitch
    I am working on saving state of an object to a database using the data mapper pattern, but I am looking for suggestions/guidance on the validation and error message generation step (step 4 below). Here are the general steps as I see them for doing this: (1) The data mapper is used to get current info (assoc array) about the object in db: +=====================================================+ | person_id | name | favorite_color | age | +=====================================================+ | 1 | Andy | Green | 24 | +-----------------------------------------------------+ mapper returns associative array, eg. Person_Mapper::getPersonById($id) : $person_row = array( 'person_id' => 1, 'name' => 'Andy', 'favorite_color' => 'Green', 'age' => '24', ); (2) the Person object constructor takes this array as an argument, populating its fields. class Person { protected $person_id; protected $name; protected $favorite_color; protected $age; function __construct(array $person_row) { $this->person_id = $person_row['person_id']; $this->name = $person_row['name']; $this->favorite_color = $person_row['favorite_color']; $this->age = $person_row['age']; } // getters and setters... public function toArray() { return array( 'person_id' => $this->person_id, 'name' => $this->name, 'favorite_color' => $this->favorite_color, 'age' => $this->age, ); } } (3a) (GET request) Inputs of an HTML form that is used to change info about the person is populated using Person::getters <form> <input type="text" name="name" value="<?=$person->getName()?>" /> <input type="text" name="favorite_color" value="<?=$person->getFavColor()?>" /> <input type="text" name="age" value="<?=$person->getAge()?>" /> </form> (3b) (POST request) Person object is altered with the POST data using Person::setters $person->setName($_POST['name']); $person->setFavColor($_POST['favorite_color']); $person->setAge($_POST['age']); *(4) Validation and error message generation on a per-field basis - Should this take place in the person object or the person mapper object? - Should data be validated BEFORE being placed into fields of the person object? (5) Data mapper saves the person object (updates row in the database): $person_mapper->savePerson($person); // the savePerson method uses $person->toArray() // to get data in a more digestible format for the // db gateway used by person_mapper Any guidance, suggestions, criticism, or name-calling would be greatly appreciated.

    Read the article

  • Consumer Oriented Search In Oracle Endeca Information Discovery – Part 1

    - by Bob Zurek
    Information Discovery, a core capability of Oracle Endeca Information Discovery, enables business users to rapidly search, discover and navigate through a wide variety of big data including structured, unstructured and semi-structured data. One of the key capabilities, among many, that differentiate our solution from others in the Information Discovery market is our deep support for search across this growing amount of varied big data. Our method and approach is very different than classic simple keyword search that is found in may information discovery solutions. In this first part of a series on the topic of search, I will walk you through many of the key capabilities that go beyond the simple search box that you might experience in products where search was clearly an afterthought or attempt to catch up to our core capabilities in this area. Lets explore. The core data management solution of Oracle Endeca Information Discovery is the Endeca Server, a hybrid search-analytical database that his highly scalable and column-oriented in nature. We will talk in more technical detail about the capabilities of the Endeca Server in future blog posts as this post is intended to give you a feel for the deep search capabilities that are an integral part of the Endeca Server. The Endeca Server provides best-of-breed search features aw well as a new class of features that are the first to be designed around the requirement to bridge structured, semi-structured and unstructured big data. Some of the key features of search include type a heads, automatic alphanumeric spell corrections, positional search, Booleans, wildcarding, natural language, and category search and query classification dialogs. This is just a subset of the advanced search capabilities found in Oracle Endeca Information Discovery. Search is an important feature that makes it possible for business users to explore on the diverse data sets the Endeca Server can hold at any one time. The search capabilities in the Endeca server differ from other Information Discovery products with simple “search boxes” in the following ways: The Endeca Server Supports Exploratory Search.  Enterprise data frequently requires the user to explore content through an ad hoc dialog, with guidance that helps them succeed. This has implications for how to design search features. Traditional search doesn’t assume a dialog, and so it uses relevance ranking to get its best guess to the top of the results list. It calculates many relevance factors for each query, like word frequency, distance, and meaning, and then reduces those many factors to a single score based on a proprietary “black box” formula. But how can a business users, searching, act on the information that the document is say only 38.1% relevant? In contrast, exploratory search gives users the opportunity to clarify what is relevant to them through refinements and summaries. This approach has received consumer endorsement through popular ecommerce sites where guided navigation across a broad range of products has helped consumers better discover choices that meet their, sometimes undetermined requirements. This same model exists in Oracle Endeca Information Discovery. In fact, the Endeca Server powers many of the most popular e-commerce sites in the world. The Endeca Server Supports Cascading Relevance. Traditional approaches of search reduce many relevance weights to a single score. This means that if a result with a good title match gets a similar score to one with an exact phrase match, they’ll appear next to each other in a list. But a user can’t deduce from their score why each got it’s ranking, even though that information could be valuable. Oracle Endeca Information Discovery takes a different approach. The Endeca Server stratifies results by a primary relevance strategy, and then breaks ties within a strata by ordering them with a secondary strategy, and so on. Application managers get the explicit means to compose these strategies based on their knowledge of their own domain. This approach gives both business users and managers a deterministic way to set and understand relevance. Now that you have an understanding of two of the core search capabilities in Oracle Endeca Information Discovery, our next blog post on this topic will discuss more advanced features including set search, second-order relevance as well as an understanding of faceted search mechanisms that include queries and filters.  

    Read the article

  • Open Source .Net Object Database or Document Database for use in Hosted environment

    - by runxc1 Bret Ferrier
    I am looking at creating a web site and I want to try and learn either a Object Database or a Document Database. I am going to be using a hosting provider so I won't be able to install any software. I am unable to purchase any licensing so I need to be able use either a free or open source Object/Document Database. Are there any free Object/Document Databases that don't require installation of some sort?

    Read the article

  • Passing object from PHP to Mysql Stored procedure

    - by user268982
    Hi All, Scenario :- I have to call MYSQL stored procedure from PHP and do some operations ( around 15 commands ) on the database Problem :- I have to call stored procedure with 36 parameters. Lot of parameters . I don't think it is a good idea to pass these many individual parameters and even heard passing individul parameters increases network traffic. Looking for :- I created a Data Object at PHP side and is there any way I can create similar kind of Object in MYSQL and pass this object as a parameter and extract the data from the object in MYSQL stored procedure Thanks for your help Regards Kiran

    Read the article

  • Explore a COM Object in PHP

    - by shaiss
    What would be the proper way to explode a COM object for debugging? I have a 3rd party function that returns a multilevel object. The documentation is non existant, so I'd like to be able to echo everything out of the object or debug it in Komodo IDE. Komodo just says Object and nothing else. Maybe convert to array? I know some of the existing options such as $com->Status, but there are more variables returned that I'd like to know what they are.

    Read the article

  • Pattern for managing reference count and object life

    - by Gopalakrishnan Subramani
    We have a serial port which is connected to hundreds of physical devices on the same wire. We have protocols like Modbus and Hart to handle the request and response between the application and devices. The question is related to managing the reference count of the channel. When no device is using the channel, the channel should be closed. public class SerialPortChannel { int refCount = 0; public void AddReference() { refCount++; } public void ReleaseReference() { refCount--; if (refCount <= 0) this.ReleasePort(); //This close the serial port } } For each device connected, we create a object for the device like device = new Device(); device.Attach(channel); //this calls channel.AddReference() When the device disconnect, device.Detach(channel); //this calls channel.ReleaseReference() I am not convinced by the reference count model. Are there any better way to handle this problem in .NET World?

    Read the article

  • Proper way to set object instance variables

    - by ensnare
    I'm writing a class to insert users into a database, and before I get too far in, I just want to make sure that my OO approach is clean: class User(object): def setName(self,name): #Do sanity checks on name self._name = name def setPassword(self,password): #Check password length > 6 characters #Encrypt to md5 self._password = password def commit(self): #Commit to database >>u = User() >>u.setName('Jason Martinez') >>u.setPassword('linebreak') >>u.commit() Is this the right approach? Should I declare class variables up top? Should I use a _ in front of all the class variables to make them private? Thanks for helping out.

    Read the article

  • python object AttributeError: type object 'Track' has no attribute 'title'

    - by ccwhite1
    I apologize if this is a noob question, but I can't seem to figure this one out. I have defined an object that defines a music track (NOTE: originally had the just ATTRIBUTE vs self.ATTRIBUTE. I edited those values in to help remove confusion. They had no affect on the problem) class Track(object): def __init__(self, title, artist, album, source, dest): """ Model of the Track Object Contains the followign attributes: 'Title', 'Artist', 'Album', 'Source', 'Dest' """ self.atrTitle = title self.atrArtist = artist self.atrAlbum = album self.atrSource = source self.atrDest = dest I use ObjectListView to create a list of tracks in a specific directory ....other code.... self.aTrack = [Track(sTitle,sArtist,sAlbum,sSource, sDestDir)] self.TrackOlv.AddObjects(self.aTrack) ....other code.... Now I want to iterate the list and print out a single value of each item list = self.TrackOlv.GetObjects() for item in list: print item.atrTitle This fails with the error AttributeError: type object 'Track' has no attribute 'atrTitle' What really confuses me is if I highlight a single item in the Object List View display and use the following code, it will correctly print out the single value for the highlighted item list = self.TrackOlv.GetSelectedObject() print list.atrTitle

    Read the article

  • reinitializing javascript object's properties

    - by Pino
    In my Javascript drag and drop build app, a variety of buildings can be built. The specific characteristics of these are all saved in one object, like var buildings = { house: ['#07DA21',12,12,0,20], bank: ['#E7DFF2',16,16,0,3], stadium: ['#000000',12,12,0,1], townhall: ['#2082A8',20,8,0,1], etcetera } So every building has a number of characteristics, like color, size, look which can be called as buildings[townhall][0] (referring to the color). The object changes as the user changes things. When clicking 'reset' however, the whole object should be reset to its initial settings again to start over, but I have no idea how to do that. For normal objects it is something like. function building() {} var building = new building(); delete building; var building2 = new building(); You can easily delete and remake it, so the properties are reset. But my object is automatically initialized. Is there a way to turn my object into something that can be deleted and newly created, without making it very complicating, or a better way to store this information?

    Read the article

  • ASP.NET "Object reference not set..." error

    - by Roman
    Hi, I have a website written using ASP.NET. We have a development machine and a deployment server. The site works great on the development machine, but when is transfered (using simple FTP Upload) generates strange behavior. It starts working just fine, but after a while stops working and throws an exception "Exception: Object reference not set to an instance of an object.". The deal is that the absolute path of the website on the development machine is different than on the deployment server (and why should they be similar?) and the exact error is: Exception: Object reference not set to an instance of an object. at SOMEPROJECT_Objects.Player..ctor(Int32 PlayerID) in C:\inetpub\wwwroot\SOMEPROJECTSolution\ALLPROJECT\SOMEPROJECT_Objects\Player.cs:line 123 at SOMEPROJECT_GameLayer.M_Game.PlayerActiveGame(Int32 PlayerID) in C:\inetpub\wwwroot\SOMEPROJECTSolution\ALLPROJECT\SOMEPROJECT_GameLayer\M_Game.cs:line 85 at Web.getsms.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\SOMEPROJECTSolution\ALLPROJECT\SOMEPROJECT-sms\Web\getsms.aspx.cs:line 59 The address that it is looking for is the address on the DEVELOPMENT machine, where as the site now resides on the deployment server. Any ideas why this happens would be appreciated. Thanks, Roman

    Read the article

  • Creating an object relational schema from a Class diagram

    - by Caylem
    Hi Ladies and Gents. I'd like some help converting the following UML diagram: UML Diagram The diagram shows 4 classes and is related to a Loyalty card scheme for an imaginary supermarket. I'd like to create an object relational data base schema from it for use with Oracle 10g/11g. Not sure where to begin, if somebody could give me a head start that would be great. Looking for actually starting the schema, show abstraction, constraints, types(subtypes, supertypes) methods and functions. Note: I'm not looking for anyone to make any comments regarding the actual classes and whether changes should be made to the Diagram, just the schema. Thanks

    Read the article

  • How to generate a checksum for an java object

    - by Alex
    hi there, I'm looking for an solution to generate a checksum for any type of java object, which remains the same for every exection of an application which produces the same object. I tried it with object.hashcode(), but as I read in the api ....This integer need not remain consistent from one execution of an application to another execution of the same application. thank you, best regard alex

    Read the article

  • Streaming PDF via invocation of HTTPHandler using $.get into object element

    - by mythicdawn
    What I am trying to do is invoke an HTTPHandler via the $.get method of jQuery which will stream back a PDF and display it in a web page using an object element. My previous method of setting the src attribute of an IFrame to be the result of a handler invocation works, but I would like cross-browser completion notification, so have moved to using $.get(). Sample code: function buttonClick() { $.get("/PDFHandler.ashx", {}, function(data, textStatus, XMLHttpRequest) { var pdfObjectString = "<object data='' type='application/pdf' width='600' height='600'></object>"; var pdfObject = $(pdfObjectString); pdfObject.attr("data", data); $("#container").append(pdfObject); }); As you can see, I am attempting to stick the 'data' variable into an object element. This is not working (no error, PDF just doesn't display), presumably because the data that comes back is binary, yet the attr() method expects a string (I think). My question is thus: how can I invoke an HTTPHandler via $.get and somehow assign the data from the callback to the data attribute of an object?

    Read the article

  • OO and Writing Drupal Modules

    - by Aaron
    Preface: Yes, I've read: http://drupal.org/node/547518 I am writing 'foo' module for Drupal6, where I am organizing the code in an OO fashion. There's a class called Foo that has a bunch of setters and accessors, and it is working quite well at abstracting some pretty nasty code and SQL. The question is is it common practice to expose a class for other modules, or is it better to wrap things in the more typical foo_myfnname()? For example, if I am writing the module's docs, should I tell people to do this: $foo = new Foo(); $something = $foo->get_something(); or tell them to call: foo_get_something(); which under the hood does: function foo_get_something() { $foo = new Foo(); return $foo->get_something(); }

    Read the article

  • wanna store Object in MySQL database

    - by kandarp
    I have a variable in java which return type is Object(java.lang.Object). I want to store this variable value in MySQL database without casting in any other primitive data type. Is there any data type available in MySQL related to Object? If anybody knows, please reply at your earliest time. Thanks,

    Read the article

  • Can I change class types in a setter with an object-oriented language?

    - by user214626
    Hello, Here is the problem statement : Calling a setter on the object should result in the object to change to an object of a different class, which language can support this ? Ex. I have a class called "Man" (Parent Class), and two children namely "Toddler" and "Old Man", they are its children because they override a behaviour in Man called as walk.( i.e Toddler sometimes walks using both his hands and legs kneeled down and the Old man uses a stick to support himself). The Man class has a attribute called age, I have a setter on Man,say it is called setAge(int ageValue). I have 3 objects, 2 toddlers, 1 old-Man. (The system is up and running,i guess when we say objects it is obvious) .I will make this call, toddler.setAge(80), I expect the toddler to change to an object of type Old Man. Is this possible.Please suggest. Thanks,

    Read the article

  • Creating/populating Javascript custom object

    - by Ek0nomik
    I've created an ashx page which is going to serve me an XML document full of basic user information. I'm not sure which is the best way to go about creating and populating my custom javascript object. I've seen them created in two ways: function User() { this.Id; this.FirstName; this.LastName; this.Title; } and var User2 = { Id: null, FirstName: null, LastName: null, Title: null } I could populate each of these by doing something like: //first object User.Id = 1 //second object User2.FirstName = 'John' Is one method of creating the object better than the other?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >