Search Results

Search found 3925 results on 157 pages for 'smart guy'.

Page 5/157 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Tweeting through the Genesis Smart Client Framework

    This article demonstrates a basic Twitter client as a Genesis Hosted Application for the Genesis Smart Client Framework...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • How to stop Office 2010 changing " and ' to smart quotes

    - by fatherjack
    I have recently upgraded to Office 2010 at work and there are a few things that are a real problem for me. As a T-SQL developer and SQL Server DBA I copy and paste code to and from various applications and if Word gets involved it can has disastrous consequences. There is an option that appears to be defaulted to "on" that changes a straight quote to what Word describes as a smart quote - see the image below. Note - the single quote suffers from the same effect. Now, getting to the point that...(read more)

    Read the article

  • Getting Started with the Genesis Smart Client Framework on Visual Studio 2010

    Read this article if you are new to developing with the Genesis Smart Client Framework. It will guide you through the process of setting up your development environment and executing your first Genesis Hosted Application....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Introduction to SMART

    <b>Linux Magazine:</b> "Did you know your drive was SMART? Actually: Self-Monitoring, Analysis, and Reporting Technology. It can be used to gather information about your hard drives and offers some additional information about the status of your storage devices. It can also be used with other tools to help predict drive failure. "

    Read the article

  • Bad sectors, S.M.A.R.T., SpinRite, firmware on platter and drive id questions.

    - by Christopher Galpin
    Is it possible for S.M.A.R.T. to give false readings (say I was fiddling with lots of recovery programs, transfers, so on and so forth) or is it absolutely a read-only direct correlation to the physical status of a drive? Does SpinRite level 5 "recover bad sectors" operate on those marked at the factory? Are they on the same level as your generic bad sector, with SpinRite thus having full access? (Also I'm curious if SMART's bad sector count is zero'd afterward or if it includes factory marked sectors.) The main firmware of some drives, like a WD Passport is stored on the platter. How is it protected? Is it through marking them as bad sectors? If so, I'm wondering if SpinRite's sector recovery could bring about firmware corruption on these drives. Is the failure of a drive to report valid identity information (hdparm -I /dev/xx) consistent with corrupted firmware, or just general disk failure? I may be misunderstanding the role of firmware here. I feel I've read a drive's identity information is on the platter, just like the partition tables and so on. Is this true? (Apologizes if this is more appropriate for SuperUser.)

    Read the article

  • smartctl not returning on HBA that's secure-erasing a different drive

    - by Stu2000
    Whenever I run smartctl -i /dev/sd* where * is a drive that is plugged into the same host bus adapter as another drive that is currently being erased with an hdparm secure erase command, the smart command will just 'hang' and not return (blocked) until the erasure of the other drive is finished. To make matters worse you can't cntrl-c out of it. Has anyone else had this issue? Is there another way to retrieve smart data from a drive, which doesn't block? I noticed that I can still use the udevadm command to retrieve the serial and model of the drive which is useful but doesn't appear to have any smart data. Any information relating to this matter is appreciated, especially if you can tell me another way to retrieve the S.M.A.R.T data that might work. Regards, Stuart

    Read the article

  • ?Oracle DB 11gR2 ?????????????????????????????????????!

    - by Yuichi.Hayashi
    Oracle Database????????????????????????????????????????????????????????????????????????·?????????????????????? ?????????/?????????????????????????????????????11g R2??????????????! ????????? Oracle Database?????????????????????????????????????CPU????·???????????????????????????????????????????????? ?????????????????????????????????????????????? ??????????????????????????????(?????????????·???????)????????????????????????????????????????????????????·?????????????????????????????????????????? ?????????????????????????????????????? ????11g R2??????????????????????????????????????????????? ????????????????? ???????????????????????????????Oracle?????????????????????????????????????? ???????????????????CPU????????????????????????????????????????! Oracle Database????????????????????????????? Oracle ?????? - ??(??), ??, ????? Database Smart Flash Cache Oracle Database??Hard Disk Drive(HDD)???????????????????????SQL??????????????????????????????????????????????????·?????·?????100%??????????????????????????????? ?????????????·??????????CPU????·???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????(????·?????·????????)???????·??????????????????????????? HDD????????????????(???)?????????????????????HDD??IO?????????????????????????? ?????????Solid State Drive/Device(SSD)??? SSD?HDD??????????????????????????????????OLTP????????·??????????????????????????????????????????????????????SSD???????????????????????????? ???11g R2???????????SSD???????????Database Smart Flash Cache????????????Database Smart Flash Cache??????·???????????????????????????(Hot Data)?Oracle?????SSD??????????? ????????!?????????SSD????????????????????SSD????????????????????? SSD???????????????????????????????????? Database Smart Flash Cache?????????????????????? SSD???Oracle???: Database Smart Flash Cache - ??(??), ??, ????? ?????????? ? ???????????????/????????????????!? ? ???????????????????????????????????!?

    Read the article

  • How to force a remap of sectors reported in S.M.A.R.T C5 (Current Pending Sector Count)?

    - by edgh
    The S.M.A.R.T C5 value of my Samsung HM640JJ Hard Drive (in an HP Pavilion dv6 laptop) is "yellow status = caution" C5 was 10 yesterday, and it's 21 today. C4 (Reallocation Event Count) = 0 and 05 (Reallocated Sectors Count) = 0 How can I force the firmware to reallocate them? I removed the partitions, recreated them again and formatted the entire drive. I ran chkdsk /r /f I ran the BIOS disk check utility and other diagnose/repair tools

    Read the article

  • Oracle Altimate Smart Tour

    - by swalker
    Altimate présente : The Smart Tour Tournée en Régions qui a démarré le 16 novembre Objectif : Rencontrer les Partenaires Oracle en Régions Format : 5 à 7 Contenu : Annonces majeures Oracle Open World Les messages clés pour vos clients : ODA, Exalytic, Pillar, T4… Les infos clés pour vous, partenaires : OMM, Produits Stratégiques… Altimate : vous avez dit valeur ajoutée ? Présence en Région Focus Oracle : Formation, Spécialisation, Génération de projets. Le LAB Altimate : Exadata, ExaStack, ODA ! Cocktail et échanges One to One avec les équipes Oracle et ALTIMATE >> 22 novembre à Lille >> 24 novembre à Aix en Provence >> 6 décembre à Toulouse >> 8 décembre à Nantes >> 6 décembre à Toulouse

    Read the article

  • How to implement smart card authentication with a .NET Fat client?

    - by John Nevermore
    I know very little about smart card authentication in general so please point out or correct me if anything below doesn't make sense. Lets say i have: A Certificate Authority "X"-s smart card (non-exportable private key) Drivers for that smart card written in C A smart card reader CA-s authentication OCSP web service A requirement to implement user authentication in a .NET fat client application via a smart card, that was given out by the CA "X". I tried searching info on the web but no prevail. What would the steps be ? My first thought was: Set up a web service, that would allow saving of (for example) scores of a ping pong game for each user. Each time someone tries to submit a score via the client application, he can only do so by inserting the smart card into the reader. Then the public key is read from the smart card by native c calls through .NET and sent to my custom web service, which in return uses the CA-s authentication OCSP web service to prove the validity of the public key/public certificate (?). If the public key is okay and valid, encrypt a random sequence of bytes with the public key and send it to the client application. If the client application sends back the correctly decrypted random sequence of bytes along with the score of the ping pong game, then the score is saved in the database for the given user. My question is, is this the correct way to do it ? What else should i know about smart card authentication ?

    Read the article

  • Installing Ubuntu on an Asus Vivotab Smart Windows 8 32-bit processor tablet

    - by Ikenna
    Good day, I just got an Asus Vivotab Smart with Windows 8 but the processor is actually a 32-bit type. I am kinda confused with the Ubuntu version to install (32-bit or 64-bit). I have read all the tips and guidelines on installing Ubuntu on a Windows 8 machine. I have disabled fast boot, quiet boot, secure boot, and still cannot boot from the usb. I tried this with Ubuntu 12.04.2, 12.10, and 13.04 (the 64-bit versions only). I am yet to try a 32-bit version but I'm reluctant since Canonical says only the 64-bit version was developed to handle the Windows 8 UEFI issues. Also, I have a boot-override field in my UEFI options which I think force-boots from the boot option one selects. I selected to force-boot from my pendrive containing Ubuntu, but the screen just blinks momentarily and nothing happens. Please help me to figure out how to load ubuntu on my machine. I don't really want the Windows 8......just Ubuntu on my tablet. Thank you.

    Read the article

  • Mac Mini drive problems but SMART verified: bad hard drive or controller?

    - by Zac Thompson
    I have a 3-year-old Intel Mac Mini at home. About a month ago, it stopped booting from the hard drive (internal, SATA, 80GB). I tried booting from the Install Disc to repair the filesystem but Disk Utility was unable to do so ("invalid node structure"). I was also unable to use the hard drive in the Terminal from the Install Disc nor from an Ubuntu boot CD ("DRDY err"). I could see the contents of some directories, but others would give an error and I would get failures when trying to copy files. At this point I was sure the filesystem was hosed and I'd want to reformat at least. DiskWarrior was able to let me retrieve the data files I was interested in, which are now copied to an external hard drive, but it reported a high number of problems ("speed reduced by disk malfunction" count was over 2000) when in the process of trying to rebuild the directory for the drive. It also would not let me use the rebuilt directory to replace the one on the drive; it claimed the disk errors prevented recovery in this way. Under normal circumstances I would now assume that the drive itself was going bad: DiskWarrior's "disk malfunction" error above is supposed to imply hardware problems. My initial plan was to buy a replacement for the internal 2.5" drive. However: Disk Utility, command-line tools and DiskWarrior had reported all along that the SMART status of the drive was okay/Verified. So I'm now worried that the drive hardware is actually fine, and that the problems were due to a disk controller that has gone "bad" somehow. If this is the case, I'll probably just replace the whole computer. Any advice on how I can tell what is to blame? I don't have a lot of extra hardware sitting around, so I don't have the option of simply dropping the drive in another machine or popping another hard drive inside the Mini.

    Read the article

  • Oracle Social Network and the Flying Monkey Smart Target

    - by kellsey.ruppel
    Originally posted by Jake Kuramoto on The Apps Lab blog. I teased this before OpenWorld, and for those of you who didn’t make it to the show or didn’t come by the Office Hours to take the Oracle Social Network Technical Tour Noel (@noelportugal) ran, I give you the Flying Monkey Smart Target. In brief, Noel built a target, about two feet tall, which when struck, played monkey sounds and posted a comment to an Oracle Social Network Conversation, all controlled by a Raspberry Pi. He also connected a Dropcam to record the winner just prior to the strike. I’m not sure how it all works, but maybe Noel can post the technical specifics. Here’s Noel describing the Challenge, the Target and a few other tidbit in an interview with Friend of the ‘Lab, Bob Rhubart (@brhubart). The monkey target bits are 2:12-2:54 if you’re into brevity, but watch the whole thing. Here are some screen grabs from the Oracle Social Network Conversation, including the Conversation itself, where you can see all the strikes documented, the picture captured, and the annotation capabilities: #gallery-1 { margin: auto;? } #gallery-1 .gallery-item { float: left; margin-top: 10px; text-align: center; width: 33%; } #gallery-1 img { border: 2px solid #cfcfcf; } #gallery-1 .gallery-caption { margin-left: 0; }    That’s Diego in one shot, looking very focused, and Ernst in the other, who kindly annotated himself, two of the development team members. You might have seen them in the Oracle Social Network Hands-On Lab during the show. There’s a trend here. Not by accident, fun stuff like this has becoming our calling card, e.g. the Kscope 12 WebCenter Rock ‘em Sock ‘em Robots. Not only are these entertaining demonstrations, but they showcase what’s possible with RESTful APIs and get developers noodling on how easy it is to connect real objects to cloud services to fix pain points. I spoke to some great folks from the City of Atlanta about extending the concepts of the flying monkey target to physical asset monitoring. Just take an internet-connected camera with REST APIs like the Dropcam, wire it up to Oracle Social Netwok, and you can hack together a monitoring device for a datacenter or a warehouse. Sure, it’s easier said than done, but we’re a lot closer to that reality than we were even two years ago. Another noteworthy bit from Noel’s interview, beginning at 2:55, is the evolution of social developer. Speaking of, make sure to check out the Oracle Social Developer Community. Look for more on the social developer in the coming months. Noel has become quite the Raspberry Pi evangelist, and why not, it’s a great tool, a low-power Linux machine, cheap ($35!) and highly extensible, perfect for makers and students alike. He attended a meetup on Saturday before OpenWorld, and during the show, I heard him evangelizing the Pi and its capabilities to many people. There is some fantastic innovation forming in that ecosystem, much of it with Java. The OTN gang raffled off five Pis, and I expect to see lots of great stuff in the very near future. Stay tuned this week for posts on all our Challenge entrants. There’s some great innovation you won’t want to miss. Find the comments. Update: I forgot to mention that Noel used Twilio, one of his favorite services, during the show to send out Challenge updates and information to all the contestants.

    Read the article

  • C++ destructor problem with boost::scoped_ptr

    - by bb-generation
    I have a question about the following code: #include <iostream> #include <boost/scoped_ptr.hpp> class Interface { }; class A : public Interface { public: A() { std::cout << "A()" << std::endl; } virtual ~A() { std::cout << "~A()" << std::endl; } }; Interface* get_a() { A* a = new A; return a; } int main() { { std::cout << "1" << std::endl; boost::scoped_ptr<Interface> x(get_a()); std::cout << "2" << std::endl; } std::cout << "3" << std::endl; } It creates the following output: 1 A() 2 3 As you can see, it doesn't call the destructor of A. The only way I see to get the destructor of A being called, is to add a destructor for the Interface class like this: virtual ~Interface() { } But I really want to avoid any Implementation in my Interface class and virtual ~Interface() = 0; doesn't work (produces some linker errors complaining about a non existing implementation of ~Interface(). So my question is: What do I have to change in order to make the destructor being called, but (if possible) leave the Interface as an Interface (only abstract methods).

    Read the article

  • How to include only BOOST smart pointer codes into a project?

    - by afriza
    What are best practices to include boost smart pointer library only without adding all boost libraries into the project? I only want boost smart pointer library in my project and I don't want to check in/commit 200 MB source codes (boost 1.42.0) into my project repository just for that. What more, my windows mobile project itself doesn't even reach 10% of that size!

    Read the article

  • Best way to build a SMART mySQL & PHP search engine?

    - by Kyle R
    What is the best way to build a mySQL & PHP search? I am currently using things like %term% I want it to be able to find the result even if they spell it slightly wrong, for example: Field value = "One: Stop Shop: They search: One Shop Stop OR One Stop Shop Etc.. I want a really smart search so they find the information even if they don't search the exact thing. What is the best way to build a smart search like this?

    Read the article

  • Quickly and Easily Create Folders in Windows By Dragging and Dropping Files

    - by Lori Kaufman
    If you use iOS or Android devices, you’re familiar with the drag-and-drop method of creating folders. If you like that method of grouping files, you can get the same functionality on your Windows PC using a free utility, called Smart Folders. Smart Folders helps you quickly organize your files, such as images, documents, and audio files, without having to create separate folders before you move the files. Simply drag one file on top of another file to create a new folder. To use Smart Folders to easily create folders, double-click on the .exe file you downloaded (see the link at the end of this article). Why Does 64-Bit Windows Need a Separate “Program Files (x86)” Folder? Why Your Android Phone Isn’t Getting Operating System Updates and What You Can Do About It How To Delete, Move, or Rename Locked Files in Windows

    Read the article

  • Do I need to be worried about these SMART drive temperatures?

    - by Steve Lorimer
    I have 5 hard drives in a machine sitting in a cupboard. /dev/sda is a 500GB Seagate drive, and is the boot disk. /dev/sd{b,c,d,e} are 2TB drives in a raid6 configuration. smartctl is showing significantly higher temperatures (like ~140 degrees celsius) on the raid drives than the boot drive. Do I need to be worried? /dev/sdb and /dev/sde are new Western Digital Black drives (new=1 week) /dev/sdc and /dev/sdd are 5 year old Hitachi drives /dev/sda [SAT], Temperature_Celsius changed from 40 to 39 /dev/sdc [SAT], Temperature_Celsius changed from 142 to 146 /dev/sdc [SAT], Temperature_Celsius changed from 146 to 142 /dev/sdd [SAT], Temperature_Celsius changed from 142 to 146 /dev/sda [SAT], Airflow_Temperature_Cel changed from 61 to 62 /dev/sda [SAT], Temperature_Celsius changed from 39 to 38 /dev/sde [SAT], Temperature_Celsius changed from 107 to 108 /dev/sdb [SAT], Temperature_Celsius changed from 108 to 109 /dev/sdc [SAT], Temperature_Celsius changed from 146 to 150 /dev/sdc [SAT], Temperature_Celsius changed from 146 to 150 /dev/sda [SAT], Airflow_Temperature_Cel changed from 62 to 61 /dev/sda [SAT], Temperature_Celsius changed from 38 to 39 Update: Adding detailed drive information as per request: /dev/sda =========================== smartctl 6.0 2012-10-10 r3643 [x86_64-linux-3.9.10-100.fc17.x86_64] (local build) Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Seagate Pipeline HD 5900.2 Device Model: ST3500312CS Serial Number: 5VV47HXA LU WWN Device Id: 5 000c50 02aad5ad6 Firmware Version: SC13 User Capacity: 500,107,862,016 bytes [500 GB] Sector Size: 512 bytes logical/physical Rotation Rate: 5900 rpm Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS T13/1699-D revision 4 SATA Version is: SATA 2.6, 1.5 Gb/s (current: 1.5 Gb/s) Local Time is: Tue Jun 3 10:54:11 2014 EST SMART support is: Available - device has SMART capability. SMART support is: Enabled /dev/sdb =========================== smartctl 6.0 2012-10-10 r3643 [x86_64-linux-3.9.10-100.fc17.x86_64] (local build) Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Device Model: WDC WD2003FZEX-00Z4SA0 Serial Number: WD-WMC1F1398726 LU WWN Device Id: 5 0014ee 003b8bd25 Firmware Version: 01.01A01 User Capacity: 2,000,398,934,016 bytes [2.00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Device is: Not in smartctl database [for details use: -P showall] ATA Version is: ACS-2 (minor revision not indicated) SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is: Tue Jun 3 10:54:11 2014 EST SMART support is: Available - device has SMART capability. SMART support is: Enabled /dev/sdc =========================== smartctl 6.0 2012-10-10 r3643 [x86_64-linux-3.9.10-100.fc17.x86_64] (local build) Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Hitachi Deskstar 7K3000 Device Model: Hitachi HDS723020BLA642 Serial Number: MN1220F30WSTUD LU WWN Device Id: 5 000cca 369cc9f5d Firmware Version: MN6OA580 User Capacity: 2,000,398,934,016 bytes [2.00 TB] Sector Size: 512 bytes logical/physical Rotation Rate: 7200 rpm Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS T13/1699-D revision 4 SATA Version is: SATA 2.6, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is: Tue Jun 3 10:54:11 2014 EST SMART support is: Available - device has SMART capability. SMART support is: Enabled /dev/sdd =========================== smartctl 6.0 2012-10-10 r3643 [x86_64-linux-3.9.10-100.fc17.x86_64] (local build) Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Hitachi Deskstar 7K3000 Device Model: Hitachi HDS723020BLA642 Serial Number: MN1220F30WST4D LU WWN Device Id: 5 000cca 369cc9f48 Firmware Version: MN6OA580 User Capacity: 2,000,398,934,016 bytes [2.00 TB] Sector Size: 512 bytes logical/physical Rotation Rate: 7200 rpm Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS T13/1699-D revision 4 SATA Version is: SATA 2.6, 6.0 Gb/s (current: 1.5 Gb/s) Local Time is: Tue Jun 3 10:54:11 2014 EST SMART support is: Available - device has SMART capability. SMART support is: Enabled /dev/sde =========================== smartctl 6.0 2012-10-10 r3643 [x86_64-linux-3.9.10-100.fc17.x86_64] (local build) Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Device Model: WDC WD2003FZEX-00Z4SA0 Serial Number: WD-WMC1F1483782 LU WWN Device Id: 5 0014ee 3002d235c Firmware Version: 01.01A01 User Capacity: 2,000,398,934,016 bytes [2.00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Device is: Not in smartctl database [for details use: -P showall] ATA Version is: ACS-2 (minor revision not indicated) SATA Version is: SATA 3.0, 6.0 Gb/s (current: 1.5 Gb/s) Local Time is: Tue Jun 3 10:54:11 2014 EST SMART support is: Available - device has SMART capability. SMART support is: Enabled

    Read the article

  • How to stop S.M.A.R.T check running for external hard drive

    - by gotqn
    I am using Windows 7 and I have enabled my "S.M.A.R.T" check, too. I have bought an external 1 TB USB hard drive. When it is connected with my computer, it delays my machine initial start with about 4-5 minutes. I was very confused at the begging, then disable the "S.M.A.R.T" check and see that the computer runs normally after restart. So, here is what I want to know: Why the check is turn for the external disk? Is there a way to use the "S.M.A.R.T" check only for my main hard drive? Why it takes 4 to 5 minutes more, as my both hard drives - internal/external are 1 TB?

    Read the article

  • EC2 instance store cloning or to ebs via guy management console

    - by devnull
    I have found similar questions here but the answer are either outdated or are from the command line. The case is this. I have an EC2 instance using instance store (this was the only AMI available for Debian 6 in Ireland). Now through the AWS GUI I can do a snapshot of the instance volume and/or even create a volume. But an image made from the snapshot doesn't boot. What is the best solution to either clone an EC2 instance that uses instance store OR from the created snapshot of the instance store to launch a new EBS instance (identical clone) FROM the gui aws management console and not command line ? Before turning this down consider that there is not similar question on how to do it via the aws management console. hint can't be done is not an appropriate answer. As you can create a snapshot of the instance store backed instance and/or a volume and create an AMI from that snapshot.

    Read the article

  • smarter OS X smart folder

    - by vectorizor
    Hi all, Smart folders on OS X are nice and all, but you can only access them from the Finder sidebar, and nowhere else (or am I wrong?). A better way would for them to appear as normal folder in the file system, so they are available from anywhere, say cmd line for isntance. Or if you have a smart folder to find movies/music in ~/Download, and add a shortcut to it in ~/movies, you could see your music/movies from Front Row). THe smart folder wouldnt have to be refreshed immediatly, maybe every hours or so from a cron/launchd job. Any way to do that? A

    Read the article

  • When RDP as a Domain User, Smart Card Requested

    - by Paul
    My W8 machine is connected to domain zen. If I rdp to the W8 machine, I can log in as a local user without problems. If I try to log in as a domain user, I am prompted for a smart card instead of a password. Any ideas why? Note that Interactive login: require smart card is disabled in group policy: And here is the output from rsop.msc: Some additional information on this one. If my connecting machine is on the same domain/network as the W8 machine, then I am prompted for a password as usual. If the machine is remote, on a different domain, then I am prompted for a smart card. In addition, the machine I am connecting from that gets the smartcard prompt is an XP box. I haven't isolated exactly which of these factors triggers the different response.

    Read the article

  • How to approach copying objects with smart pointers as class attributes?

    - by tomislav-maric
    From the boost library documentation I read this: Conceptually, smart pointers are seen as owning the object pointed to, and thus responsible for deletion of the object when it is no longer needed. I have a very simple problem: I want to use RAII for pointer attributes of a class that is Copyable and Assignable. The copy and assignment operations should be deep: every object should have its own copy of the actual data. Also, RTTI needs to be available for the attributes (their type may also be determined at runtime). Should I be searching for an implementation of a Copyable smart pointer (the data are small, so I don't need Copy on Write pointers), or do I delegate the copy operation to the copy constructors of my objects as shown in this answer? Which smart pointer do I choose for simple RAII of a class that is copyable and assignable? (I'm thinking that the unique_ptr with delegated copy/assignment operations to the class copy constructor and assignment operator would make a proper choice, but I am not sure) Here's a pseudocode for the problem using raw pointers, it's just a problem description, not a running C++ code: // Operation interface class ModelOperation { public: virtual void operate = (); }; // Implementation of an operation called Special class SpecialModelOperation : public ModelOperation { private: // Private attributes are present here in a real implementation. public: // Implement operation void operate () {}; }; // All operations conform to ModelOperation interface // These are possible operation names: // class MoreSpecialOperation; // class DifferentOperation; // Concrete model with different operations class MyModel { private: ModelOperation* firstOperation_; ModelOperation* secondOperation_; public: MyModel() : firstOperation_(0), secondOperation_(0) { // Forgetting about run-time type definition from input files here. firstOperation_ = new MoreSpecialOperation(); secondOperation_ = new DifferentOperation(); } void operate() { firstOperation_->operate(); secondOperation_->operate(); } ~MyModel() { delete firstOperation_; firstOperation_ = 0; delete secondOperation_; secondOperation_ = 0; } }; int main() { MyModel modelOne; // Some internal scope { // I want modelTwo to have its own set of copied, not referenced // operations, and at the same time I need RAII to work for it, // as soon as it goes out of scope. MyModel modelTwo (modelOne); } return 0; }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >