Search Results

Search found 388 results on 16 pages for 'fred gustavo'.

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

  • C++ -- Is there an implicit cast here from Fred* to auto_ptr<Fred>?

    - by q0987
    Hello all, I saw the following code, #include <new> #include <memory> using namespace std; class Fred; // Forward declaration typedef auto_ptr<Fred> FredPtr; class Fred { public: static FredPtr create(int i) { return new Fred(i); // Is there an implicit casting here? If not, how can we return // a Fred* with return value as FredPtr? } private: Fred(int i=10) : i_(i) { } Fred(const Fred& x) : i_(x.i_) { } int i_; }; Please see the question listed in function create. Thank you // Updated based on comments Yes, the code cannot pass the VC8.0 error C2664: 'std::auto_ptr<_Ty::auto_ptr(std::auto_ptr<_Ty &) throw()' : cannot convert parameter 1 from 'Fred *' to 'std::auto_ptr<_Ty &' The code was copied from the C++ FAQ 12.15. However, after making the following changes, replace return new Fred(i); with return auto_ptr<Fred>(new Fred(i)); This code can pass the VC8.0 compiler. But I am not sure whether or not this is a correct fix.

    Read the article

  • SQLBeat Episode 11 – Ted the Fred Krueger Halloween SQL

    - by SQLBeat
    In this episode of the SQLBeat Podcast I speak conversationally (Ok I will just say I converse) with Ted Krueger about Elm Street, where he works as a DBA who stores nightmares in SQL Server database tables. The joke about it being BLOB storage is only one of several that may scare you away from this Halloween Special. If you like listening to two SQL guys talking about the bands they used to be in, rainbow trout and video games, come on in. Bwaaaa Haaaa Haaa…..Ok I will stop. Download the MP3

    Read the article

  • Unix users and permissions and how they interact with web files.

    - by Columbo
    Hello, When you issue the command ls in Linux you get this sort of thing: drwxr--r-- 1 fred editors 4096 drafts -rw-r--r-- 1 fred editors 30405 file1.php -r-xr-xr-x 1 fred fred 8460 file2.php I know that the rwxrwxrwx are the read, write and execute permissions for the current user. And I think I know that 'fred' is the user who owns the file. So I assume fred can write to file1 but no one else can. But what is the extra bit 'editors' and what is the difference between file1 and file2 with respect to one having an ownership of 'fred editors' and the other 'fred fred'? Also if a web user connects to one of the files, what is their user name and where is this decided? If the server decided that user connecting from the web was going to be fred, does this mean any web user could write to file1? Any information welcomed, I am resaerching this but just getting confused. Thanks

    Read the article

  • Unix users and permissions and how they interact with web files.

    - by Columbo
    Hello, When you issue the command ls in Linux you get this sort of thing: drwxr--r-- 1 fred editors 4096 drafts -rw-r--r-- 1 fred editors 30405 file1.php -r-xr-xr-x 1 fred fred 8460 file2.php I know that the rwxrwxrwx are the read, write and execute permissions for the current user. And I think I know that 'fred' is the user who owns the file. So I assume fred can write to file1 but no one else can. But what is the extra bit 'editors' and what is the difference between file1 and file2 with respect to one having an ownership of 'fred editors' and the other 'fred fred'? Also if a web user connects to one of the files, what is their user name and where is this decided? If the server decided that user connecting from the web was going to be fred, does this mean any web user could write to file1? Any information welcomed, I am resaerching this but just getting confused. Thanks

    Read the article

  • Why isnt the copy constructor of member class called?

    - by sandeep
    class member { public: member() { cout<<"Calling member constr"<<'\n'; } member(const member&) { cout<<"Calling member copy constr"<<'\n'; } }; class fred { public: fred() { cout<<"calling fred constr"<<'\n'; } fred(const fred &) { cout<<"Calling fred copy constr"<<'\n'; } protected: member member_; }; int main() { fred a; fred b=a; } Output: Calling member constr calling fred constr **Calling member constr** Calling fred copy constr

    Read the article

  • If I define a property to prototype appears in the constructor of object, why?

    - by Eduard Florinescu
    I took the example from this question modified a bit: What is the point of the prototype method? function employee(name,jobtitle,born) { this.name=name; this.jobtitle=jobtitle; this.born=born; this.status="single" } employee.prototype.salary=10000000; var fred=new employee("Fred Flintstone","Caveman",1970); console.log(fred.salary); fred.salary=20000; console.log(fred.salary) And the output in console is this: What is the difference salary is in constructor but I still can access it with fred.salary, how can I see if is in constructor from code, status is still employee property how can I tell for example if name is the one of employee or has been touch by initialization? Why is salary in constructor, when name,jobtitle,born where "touched" by employee("Fred Flintstone","Caveman",1970); «constructor»?

    Read the article

  • How to archive data from a table to a local or remote database in SQL 2005 and SQL 2008

    - by simonsabin
    Often you have the need to archive data from a table. This leads to a number of challenges 1. How can you do it without impacting users 2. How can I make it transactionally consistent, i.e. the data I put in the archive is the data I remove from the main table 3. How can I get it to perform well Points 1 is very much tied to point 3. If it doesn't perform well then the delete of data is going to cause lots of locks and thus potentially blocking. For points 1 and 3 refer to my previous posts DELETE-TOP-x-rows-avoiding-a-table-scan and UPDATE-and-DELETE-TOP-and-ORDER-BY---Part2. In essence you need to be removing small chunks of data from your table and you want to do that avoiding a table scan. So that deals with the delete approach but archiving is about inserting that data somewhere else. Well in SQL 2008 they introduced a new feature INSERT over DML (Data Manipulation Language, i.e. SQL statements that change data), or composable DML. The ability to nest DML statements within themselves, so you can past the results of an insert to an update to a merge. I've mentioned this before here SQL-Server-2008---MERGE-and-optimistic-concurrency. This feature is currently limited to being able to consume the results of a DML statement in an INSERT statement. There are many restrictions which you can find here http://msdn.microsoft.com/en-us/library/ms177564.aspx look for the section "Inserting Data Returned From an OUTPUT Clause Into a Table" Even with the restrictions what we can do is consume the OUTPUT from a DELETE and INSERT the results into a table in another database. Note that in BOL it refers to not being able to use a remote table, remote means a table on another SQL instance. To show this working use this SQL to setup two databases foo and fooArchive create database foo go --create the source table fred in database foo select * into foo..fred from sys.objects go create database fooArchive go if object_id('fredarchive',DB_ID('fooArchive')) is null begin     select getdate() ArchiveDate,* into fooArchive..FredArchive from sys.objects where 1=2       end go And then we can use this simple statement to archive the data insert into fooArchive..FredArchive select getdate(),d.* from (delete top (1)         from foo..Fred         output deleted.*) d         go In this statement the delete can be any delete statement you wish so if you are deleting by ids or a range of values then you can do that. Refer to the DELETE-TOP-x-rows-avoiding-a-table-scan post to ensure that your delete is going to perform. The last thing you want to do is to perform 100 deletes each with 5000 records for each of those deletes to do a table scan. For a solution that works for SQL2005 or if you want to archive to a different server then you can use linked servers or SSIS. This example shows how to do it with linked servers. [ONARC-LAP03] is the source server. begin transaction insert into fooArchive..FredArchive select getdate(),d.* from openquery ([ONARC-LAP03],'delete top (1)                     from foo..Fred                     output deleted.*') d commit transaction and to prove the transactions work try, you should get the same number of records before and after. select (select count(1) from foo..Fred) fred        ,(select COUNT(1) from fooArchive..FredArchive ) fredarchive   begin transaction insert into fooArchive..FredArchive select getdate(),d.* from openquery ([ONARC-LAP03],'delete top (1)                     from foo..Fred                     output deleted.*') d rollback transaction   select (select count(1) from foo..Fred) fred        ,(select COUNT(1) from fooArchive..FredArchive ) fredarchive The transactions are very important with this solution. Look what happens when you don't have transactions and an error occurs   select (select count(1) from foo..Fred) fred        ,(select COUNT(1) from fooArchive..FredArchive ) fredarchive   insert into fooArchive..FredArchive select getdate(),d.* from openquery ([ONARC-LAP03],'delete top (1)                     from foo..Fred                     output deleted.*                     raiserror (''Oh doo doo'',15,15)') d                     select (select count(1) from foo..Fred) fred        ,(select COUNT(1) from fooArchive..FredArchive ) fredarchive Before running this think what the result would be. I got it wrong. What seems to happen is that the remote query is executed as a transaction, the error causes that to rollback. However the results have already been sent to the client and so get inserted into the

    Read the article

  • Platform for Efficiency: Boeing Defense, Space & Security integrates supply chain processes using Oracle Business Process Management solutions. by Fred Sandsmark

    - by JuergenKress
    Like most companies, aerospace giant Boeing has its jargon - words and phrases that uniquely define its products and processes. Take the word platform. It is used at Boeing to mean a family of aircraft - the F/A-18 fighter, for example, or the 777 jetliner. Boeing Defense, Space & Security since August 2009, employees in the Global Services & Support (GS&S) division of Boeing Defense, Space & Security have been talking about a different sort of platform: a supply chain technology platform, based on Oracle Business Process Management (Oracle BPM) solutions and Oracle SOA Suite. That platform, built with the assistance of Oracle Diamond Partner Capgemini, is serving as a jumping-off point for Boeing's GS&S staff to deploy radically improved business processes supported by Oracle Fusion Applications to build a high-visibility, end-to-end supply chain. This business process-driven technology platform has ambitious goals: to help GS&S respond more quickly and accurately to its customers' needs, to make business processes at all GS&S sites more consistent and less expensive, and to create a foundation for further improvement and efficiency. Read the full article here. Want to publish your BPM11g success story - request for a partner/customer reference? BPM Center of Excellent & First 100 Days of BPM documents to our SOA Community Workspace MWD_bpm_si_Centre_of_Excellence_0811.pdf First 100 Days of BPM whitepaper.pdf Please visit our SOA Community Workspace (SOA Community membership required). SOA & BPM Partner Community For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit  www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center. Blog Twitter LinkedIn Mix Forum Technorati Tags: BPM,BPM reference,BPM Capgemini,BPM first 100 days,BPM center of Excellence,SOA Community,Oracle SOA,Oracle BPM,Community,OPN,Jürgen Kress

    Read the article

  • setting up a shared folder in linux

    - by Chris
    I'm trying to set up a folder in my home directory that will be shared with another user but for some reason it is not working this is what I've done, I have tried two different ways using ACL's and chown/chgrp etc I set up a group called say: sharedgroup and added both my user (john) and fred to it so when I run groups john john wheel sharedgroup groups fred sharedgroup fred mkdir /home/john/shared vim /home/john/shared/hello.txt (typed in some text saved it) chown -R :sharedgroup shared chmod -R o=-rwx shared ll drwxrwx--- 2 john sharedgroup 4096 Sep 9 21:14 shared ll shared -rw-rw-r-- 1 john sharedgroup 7 Sep 9 21:14 hello.txt (I also tried adding in the s permissions but that didn't help either) then when I log out of the server and log back in as fred and try these commands they fail vim /home/john/shared/hello.txt (won't allow me to write opens a blank file) cd /home/john/shared -bash: cd: /home/john/cis: Permission Denied ls /home/john/shared -ls: /home/john/shared: Permission Denied ls -lad /home/john/shared -ls: /home/john/shared: Permission Denied id fred uid=500(fred) gid=502(sharedgroup) groups=502(sharedgroup),500(fred) context=user_u:system_r:unconfined_t Any idea what I'm doing wrong??

    Read the article

  • Antlr question: cannot get Antlr tool to compile simple file from ANTLRWorks

    - by Don Henton
    Here is the grammar file: grammar fred; test : 'fred'; Here is the batch file to launch the tool: SET JAVA_HOME=C:\Program Files\Java\jdk1.6.0_24 SET PATH=%PATH%;%JAVA_HOME%\bin SET ANTLR_HOME=c:/users/don/workspace/antlrAssign/lib/ java -cp %ANTLR_HOME%/antlr-3.3-complete.jar antlr.Tool fred.g Here's the result: ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005 fred.g:1:1: unexpected token: grammar error: Token stream error reading grammar(s): fred.g:3:19: expecting ''', found 'r' fred.g:1:1: rule grammar trapped: fred.g:1:1: unexpected token: grammar TokenStreamException: expecting ''', found 'r' Prior postings refer to "org.antlr.Tool" but the 3.3 jar has it located as above. The idea was to create a debug version of a tree parser, and according to the documentation, you have to use the command line tool. Has anyone seen this before? Am I nuts? It's two lines long and its dying on the first word in the file. Of course this compiles in antlrworks. Any help appreciated, I can't afford any more adjustments to my medications.

    Read the article

  • xorg, nvidia, log-in all hosed - how can I completely reset graphics set-up/settings?

    - by Fred Hamilton
    I just did a fresh install of Mythbuntu 12.04.1 on my Intel MB with nVidia 9500GT graphics card. Hardware's been working great with 10.10 for about 2 years. Background: (optional - feel free to skip to question) I was trying to get my component video output to generate 720p, messing around with the nvidia drivers, and now the entire display system is hosed. I can SSH in and get a terminal. Depending on which nvidia package I install/remove, I get: Garbage on screen (after I "apt-get remove nvidia*") A low-res graphical log-in screen where I can log in as fred or guest. If I log in as fred, it displays some text mode status line then goes right back to the log-in screen. If I log in as guest, I actually get the full Ubuntu desktop, but I need to be able to log in as fred. Other times I get an error: "API mismatch: the NVIDIA kernel module has version 304.43, but this NVIDIA driver component has version 295.49." I've googled around, including trying this thread with the same error message, but to no effect. Question: How can I just reset x settings, drivers, everything display-related to the exact same way it was after a fresh install?

    Read the article

  • Someone is using the struct name as a variable name too. What does the code really say? (c++)

    - by EvilTeach
    This morning we found an old chunk of code that was causing a library call to crash. struct fred { int a; int b; int c; }; fred fred[MAX_SIZE+1]; memset( fred, 0, sizeof(fred) * MAX_SIZE+1 ); It appears that the sizeof(fred) may have been the full array size, rather than the structure size, as it was overwriting a great deal of memory. The fact that it compiled without warning on several different systems seemed odd. Is there a correct semantic for this case where the type and variable name are colliding? or is this some sort of undefined behavior? or just a defect? I haven't been been clever enough to find anything on Google or our language help. Thanks Evil

    Read the article

  • What is the point of the prototype method?

    - by Mild Fuzz
    I am reading through Javascript: The Good Parts, and struggled to get my head around the section on prototypes. After a little google, I came to the conclusion that it is to add properties to objects after the objects declaration. Using this script gleamed from w3schools, I noticed that removing the line adding the prototype property had no effect. So what is the point? //Prototyping function employee(name,jobtitle,born) { this.name=name; this.jobtitle=jobtitle; this.born=born; } var fred=new employee("Fred Flintstone","Caveman",1970); employee.prototype.salary=null; // <--- try removing this line fred.salary=20000; document.write(fred.salary);

    Read the article

  • Remove duplicates from a list of nested dictionaries

    - by user2924306
    I'm writing my first python program to manage users in Atlassian On Demand using their RESTful API. I call the users/search?username= API to retrieve lists of users, which returns JSON. The results is a list of complex dictionary types that look something like this: [ { "self": "http://www.example.com/jira/rest/api/2/user?username=fred", "name": "fred", "avatarUrls": { "24x24": "http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred", "16x16": "http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred", "32x32": "http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred", "48x48": "http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred" }, "displayName": "Fred F. User", "active": false }, { "self": "http://www.example.com/jira/rest/api/2/user?username=andrew", "name": "andrew", "avatarUrls": { "24x24": "http://www.example.com/jira/secure/useravatar?size=small&ownerId=andrew", "16x16": "http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=andrew", "32x32": "http://www.example.com/jira/secure/useravatar?size=medium&ownerId=andrew", "48x48": "http://www.example.com/jira/secure/useravatar?size=large&ownerId=andrew" }, "displayName": "Andrew Anderson", "active": false } ] I'm calling this multiple times and thus getting duplicate people in my results. I have been searching and reading but cannot figure out how to deduplicate this list. I figured out how to sort this list using a lambda function. I realize I could sort the list, then iterate and delete duplicates. I'm thinking there must be a more elegant solution. Thank you!

    Read the article

  • Using ToArgb() followed by FromArgb() does not result in the original color

    - by hayrob
    This does not work int blueInt = Color.Blue.ToArgb(); Color fred = Color.FromArgb(blueInt); Assert.AreEqual(Color.Blue,fred); Any suggestions? [Edit] I'm using NUnit and the output is failed: Expected: Color [Blue] But was: Color [A=255, R=0, G=0, B=255] [Edit] This works! int blueInt = Color.Blue.ToArgb(); Color fred = Color.FromArgb(blueInt); Assert.AreEqual(Color.Blue.ToArgb(),fred.ToArgb());

    Read the article

  • Copy Selective Data from Database to Invoice, Based on Certain Criteria

    - by Scott
    For starters, here is an example of a microsoft excel database I am working with: Month/Address/Name/Description/Amount January/123 Street/Fred/Painting/100 January/456 Avenue/Scott/Flooring/400 January/789 Road/Scott/Plumbing/100 February/123 Street/Fred/Flooring/600 February/246 Lane/Fred/Electrical/300 March/789 Road/Scott/Drywall/150 What I want to be able to do is selectively copy info from this databse to invoices (also excel). The invoice has three columns: Address/Description/Amount. I want to be able to automatically fill the invoices in as the database is filled in (either automatically, or if I have to actually manually run the macro to do it, that might be fine). Each name (Scott, Fred, etc.) will have their own set of 12 invoices for the year. So, e.g., I want to be able to produce a January invoice for all work done for Scott in January, showing the address, the description and the amount, line by line. So every time work on Scott's address(es) is done, the database is filled in, and i want it to "send" that information to the invoice on the next available line, filling in only the Address/Description/Amount columns from the database. Fred's invoice should fill in as any work is done on Fred's addresses. And once the month changes, the next invoice should start filling in. So first I need to filter the data by the month and the name (and there is actually one more column to filter by, but let's keep this example simpler). Then I need to list the remaining data on the invoice, but only certain cells from the rows that are now left. Help anyone?

    Read the article

  • Objective-C classes, pointers to primitive types, etc.

    - by Toby Wilson
    I'll cut a really long story short and give an example of my problem. Given a class that has a pointer to a primitive type as a property: @interface ClassOne : NSObject { int* aNumber } @property int* aNumber; The class is instantiated, and aNumber is allocated and assigned a value, accordingly: ClassOne* bob = [[ClassOne alloc] init]; bob.aNumber = malloc(sizeof(int)); *bob.aNumber = 5; It is then passed, by reference, to assign the aNumber value of a seperate instance of this type of class, accordingly: ClassOne* fred = [[ClassOne alloc] init]; fred.aNumber = bob.aNumber; Fred's aNumber pointer is then freed, reallocated, and assigned a new value, for example 7. Now, the problem I'm having; Since Fred has been assigned the same pointer that Bob had, I would expect that Bob's aNumber will now have a value of 7. It doesn't, because for some reason it's pointer was freed, but not reassigned (it is still pointing to the same address it was first allocated which is now freed). Fred's pointer, however, has the allocated value 7 in a different memory location. Why is it behaving like this? What am I minsunderstanding? How can I make it work like C++ does?

    Read the article

  • UIView drawRect; class variables out of scope

    - by Toby Wilson
    Short & sweet version of my last question in light of new information. I have a UIVIew with an init and a drawrect method (and another thread and a bunch of other stuff, but I'll keep it short & sweet). All of the class variables that I alloc and init in the -(id)init method are out of scope/nil/0x0 in the drawRect method, and I am unable to access them. For example; In the interface: NSObject* fred; In the implementation: -(id)init { if(self == [super init]) { fred = [[NSObject alloc] init]; } return self; } -(void)drawRect:(CGRect)rect { NSLog(@"Fred is retained %i times",[fred retainCount]); //FAIL NSLog(@"But his variable is actually just pointing at uninitialised 0x0, so you're not reading this in the debugger because the application has crashed before it got here." } Should add that init IS being called before drawRect also. Anyone have any ideas?

    Read the article

  • Getting a RichTextCtrl's default font size in wxPython

    - by Sam
    I have a RichTextCtrl, which I've modified to accept HTML input. The HTML parsing code needs to be able to increase and decrease the font size as it gets tags like <font size="-1">, but I can't work out how to get the control's default font size to adjust. I tried the following (where self is my RichTextCtrl): fred = wx.richtext.RichTextAttr() self.GetStyle(0,fred) print fred.GetFontSize() However, the final instruction fails, because GetStyle turns fred into a TextAttrEx and so I get AttributeError: 'TextAttrEx' object has no attribute 'GetFontSize'. Am I missing a vastly easier way of getting the default font size?

    Read the article

  • Using a member function pointer within a class

    - by neuviemeporte
    Given an example class: class Fred { public: Fred() { func = &Fred::fa; } void run() { int foo, bar; *func(foo,bar); } double fa(int x, int y); double fb(int x, int y); private: double (Fred::*func)(int x, int y); }; I get a compiler error at the line calling the member function through the pointer "*func(foo,bar)", saying: "term does not evaluate to a function taking 2 arguments". What am I doing wrong?

    Read the article

  • a little code to allow word substitution depending on user

    - by Fred Quimby
    Can anyone help? I'm creating a demo web app in html in order for people to physically see and comment on the app prior to committing to a proper build. So whilst the proper app will be database driven, my demo is just standard html with some javascript effects. What I do want to demonstrate is that different user group will see different words. For example, imagine I have an html sentence that says 'This will cost £100 to begin'. What I need to some way of identifying that if the user has deemed themselves to be from the US, the sentence says 'This will cost $100 to begin'. This requirement is peppered throughtout the pages but I'm happy to add each one manually. So I envisage some code along the lines of 'first, remove the [boot US] trunk' where the UK version is 'first remove the boot' but the code is saying that the visitor needs the US version. It then looks up boot (in an Access database perhaps) and sees that the table says for boot for US, display 'trunk'. I'm not a programmer but I can normally cobble together scripts so I'm hoping someone may have a relatively easy solution in javascrip, CSS or asp. To recap; I have a number of words or short sentences that need to appear differently and I'm happy to manually insert each one if necessary (but would be even better if the words were automatically changed). And I need a device which allows me to tell the pages to choose the US version, or for example, the New Zealand version. Thanks in advance. Fred

    Read the article

  • IPv6 tunnel broker setup

    - by fred basset
    I'm working on a solution to allow remote Linux nodes that are behind firewalls to be accessible for SSH and web server. Can anyone suggest an IPv6 tunnel scheme that would work with NAT firewalls? And what software would be needed on the remote nodes and the central server? Also I do not believe the ISP at either side does native IPv6. A solution where we could have static IPv6 addresses on the remote Linux nodes would be ideal. Thank you, Fred

    Read the article

  • WPF Resource Dictionary in a separate assembly

    - by Gustavo Cavalcanti
    I have resource dictionary files (MenuTemplate.xaml, ButtonTemplate.xaml, etc) that I want to use in multiple separate applications. I could add them to the applications' assemblies, but it's better if I compile these resources in one single assembly and have my applications reference it, right? After the resource assembly is built, how can I reference it in the App.xaml of my applications? Currently I use ResourceDictionary.MergedDictionaries to merge the individual dictionary files. If I have them in an assembly, how can I reference them in xaml? Thanks for your help! Gustavo

    Read the article

  • Monodevelop SVN 1.7 support

    - by Gustavo Rubio
    I'm trying to checkout an SVN repo and it does get checked out, however the solution is not opened by default. I then tried to simply open an already checked out folder and I do not get versioning support. I tried this in both Windows and Linux with no success with MonoDevelop 3.0.4 and 3.0.5 My guess is that since the .sln file is in the path /trunk/code/project/project.sln and the new 1.7 format keeps only one ".svn" folder at the top of the checked out folder (e.g. /home/gustavo/ProjectSrc/ ) hence MD not "finding" the versioned code. Anybody has had success using SVN 1.7 and MonoDevelop?

    Read the article

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