Search Results

Search found 92 results on 4 pages for 'piers myers'.

Page 1/4 | 1 2 3 4  | Next Page >

  • Item 2, Scott Myers Effective C++ question

    - by user619818
    In Item2 on page 16, (Prefer consts, enums, and inlines to #defines), Scott says: 'Also, though good compilers won't set aside storage for const objects of integer types'. I don't understand this. If I define a const object, eg const int myval = 5; then surely the compiler must set aside some memory (of int size) to store the value 5? Or is const data stored in some special way? This is more a question of computer storage I suppose. Basically, how does the computer store const objects so that no storage is set aside?

    Read the article

  • Compile time Meta-programming, with string literals.

    - by Hassan Syed
    I'm writing some code which could really do with some simple compile time metaprogramming. It is common practise to use empty-struct tags as compile time symbols. I need to decorate the tags with some run-time config elements. static variables seem the only way to go (to enable meta-programming), however static variables require global declarations. to side step this Scott Myers suggestion (from the third edition of Effective C++), about sequencing the initialization of static variables by declaring them inside a function instead of as class variables, came to mind. So I came up with the following code, my hypothesis is that it will let me have a compile-time symbols with string literals use-able at runtime. I'm not missing anything I hope. template<class Instance> class TheBestThing { public: void set_name(const char * name_in) { get_name() = std::string(name_in); } void set_fs_location(const char * fs_location_in) { get_fs_location() = std::string(fs_location_in); } std::string & get_fs_location() { static std::string fs_location; return fs_location; } std::string & get_name() { static std::string name; return name; } }; struct tag {}; int main() { TheBestThing<tag> x; x.set_name("xyz"); x.set_fs_location("/etc/lala"); ImportantObject<x> SinceSlicedBread; }

    Read the article

  • NSMutableDictionary is being treated as an NSDictionary

    - by Marc Gelfo
    Hi, I have a simple class with an NSMutableDictionary member variable. However, when I call setObject:forKey I get an error ('mutating method sent to immutable object'). The source of the problem is obvious from the debugger -- my NSMutableDictionary is actually of type NSDictionary. I must be missing something incredibly simple but can't seem to fix it. Here is the relevant code: // Model.h @interface Model : NSObject { NSMutableDictionary *piers; } @property (nonatomic,retain) NSMutableDictionary *piers; @end // Model.m @implementation Model @synthesize piers; -(id) init { if (self = [super init]) { self.piers = [[NSMutableDictionary alloc] initWithCapacity:2]; [self createModel]; } return self; } -(void) createModel { [piers setObject:@"happy" forKey:@"foobar"]; } @end If I put a breakpoint anywhere in the code and investigate self.piers, it is of type NSDictionary. What am I missing so that it is treated as an NSMutableDictionary instead? Thanks!

    Read the article

  • Postfix/SMTPD Relay Access Denied when sending outside the network

    - by David
    I asked a very similar question some 4 or 5 months ago, but haven't tracked down a suitable answer. I decided to post a new question so that I can ... a) Post updated info b) post my most current postconf -n output When a user sends mail from inside the network (via webmail) to email addresses both inside and outside the network, the email is delivered. When a user with an email account on the system sends mail from outside the network, using the server as the relay, to addresses inside the network, the email is delivered. But [sometimes] when a user connects via SMTPD to send email to an external address, a Relay Access Denied error is returned: Feb 25 19:33:49 myers postfix/smtpd[8044]: NOQUEUE: reject: RCPT from host-68-169-158-182.WISOLT2.epbfi.com[68.169.158.182]: 554 5.7.1 <host-68-169-158-182.WISOLT2.epbfi.com[68.169.158.182]>: Client host rejected: Access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<my-computer-name> Feb 25 19:33:52 myers postfix/smtpd[8044]: disconnect from host-68-169-158-182.WISOLT2.epbfi.com[68.169.158.182] Sending this through Microsoft Outlook 2003 generates the above log. However, sending through my iPhone, with the exact same settings, goes through fine: Feb 25 19:37:18 myers postfix/qmgr[3619]: A2D861302C9: from=<[email protected]>, size=1382, nrcpt=1 (queue active) Feb 25 19:37:18 myers amavis[2799]: (02799-09) FWD via SMTP: <[email protected]> -> <[email protected]>,BODY=7BIT 250 2.0.0 Ok, id=02799-09, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as A2D861302C9 Feb 25 19:37:18 myers amavis[2799]: (02799-09) Passed CLEAN, [68.169.158.182] [68.169.158.182] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: yMLvzVQJloFV, Hits: -9.607, size: 897, queued_as: A2D861302C9, 6283 ms Feb 25 19:37:18 myers postfix/lmtp[8752]: 2ED3A1302C8: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=6.6, delays=0.25/0.01/0.19/6.1, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=02799-09, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as A2D861302C9) Feb 25 19:37:18 myers postfix/qmgr[3619]: 2ED3A1302C8: removed Outgoing Settings on Outlook 2003 match the settings on my iPhone: SMTP server: mail.my-domain.com Username: My full email address Uses SSL Server Port 587 Now, here's postconf -n. I realize the "My Networks" Parameter is a bit nasty. I have these IP addresses in here for just this reason, as others have been complaining of this problem too: alias_database = hash:/etc/postfix/aliases alias_maps = $alias_database append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix content_filter = amavisfeed:[127.0.0.1]:10024 daemon_directory = /usr/libexec/postfix debug_peer_level = 2 disable_vrfy_command = yes html_directory = no inet_interfaces = all mail_owner = postfix mail_spool_directory = /var/spool/mail mailbox_size_limit = 0 mailq_path = /usr/bin/mailq manpage_directory = /usr/share/man message_size_limit = 20480000 mydestination = $myhostname, localhost, localhost.$mydomain mydomain = my-domain.com myhostname = myers.my-domain.com mynetworks = 127.0.0.0/8, 74.125.113.27, 74.125.82.49, 74.125.79.27, 209.85.161.0/24, 209.85.214.0/24, 209.85.216.0/24, 209.85.212.0/24, 209.85.160.0/24 myorigin = $myhostname newaliases_path = /usr/bin/newaliases queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES receive_override_options = no_address_mappings recipient_delimiter = + relay_domains = $mydestination sample_directory = /usr/share/doc/postfix-2.3.3/samples sendmail_path = /usr/sbin/sendmail setgid_group = postdrop smtp_bind_address = my-primary-server's IP address smtpd_banner = mail.my-domain.com smtpd_helo_required = yes smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_type = dovecot smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/ssl/mailserver/postfix.pem smtpd_tls_key_file = /etc/ssl/mailserver/private/postfix.pem smtpd_tls_loglevel = 3 smtpd_tls_received_header = no smtpd_tls_session_cache_timeout = 3600s smtpd_use_tls = yes tls_random_source = dev:/dev/urandom unknown_local_recipient_reject_code = 554 virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf virtual_gid_maps = static:5000 virtual_mailbox_base = /var/vmail virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_minimum_uid = 5000 virtual_transport = dovecot virtual_uid_maps = static:5000 If anyone has any ideas and can help me finally solve this issue once and for all, I'd be eternally grateful.

    Read the article

  • PHP security regarding login

    - by piers
    I have read a lot about PHP login security recently, but many questions on Stack Overflow regarding security are outdated. I understand bcrypt is one of the best ways of hashing passwords today. However, for my site, I believe sha512 will do very well, at least to begin with. (I mean bcrypt is for bigger sites, sites that require high security, right?) I´m also wonder about salting. Is it necessary for every password to have its own unique salt? Should I have one field for the salt and one for the password in my database table? What would be a decent salt today? Should I join the username together with the password and add a random word/letter/special character combination to it? Thanks for your help!

    Read the article

  • Game development: Pre-production stage

    - by piers
    I´m starting up a new project. It´s going to be a web browser game, developed using HTML5, JavaScript and CSS3. I have some general questions regarding the process of game developing. Should you know everything about your game by the time you start writing the first lines of code? I mean should you know all the details, all the things the player can and can not do? Basically: should you be done writing down new ideas before you begin coding? I understand the pre-production process is about documenting, doing research etc. What does that mean? Does it mean I should open up Word and write down everything about the game? For example what should happen when you click on different things etc. Thanks for your help!

    Read the article

  • Proper password handling for login

    - by piers
    I have read a lot about PHP login security recently, but many questions on Stack Overflow regarding security are outdated. I understand bcrypt is one of the best ways of hashing passwords today. However, for my site, I believe sha512 will do very well, at least to begin with. (I mean bcrypt is for bigger sites, sites that require high security, right?) I´m also wonder about salting. Is it necessary for every password to have its own unique salt? Should I have one field for the salt and one for the password in my database table? What would be a decent salt today? Should I join the username together with the password and add a random word/letter/special character combination to it? Thanks for your help!

    Read the article

  • Understanding DeviceContext and Shaders in Direct3D/SlimDX

    - by Carson Myers
    I've been working through this tutorial about drawing triangles with SlimDX, and while it works, I've been trying to structure my program differently than in the tutorial. The tutorial just has everything in the main method, I'm trying to separate components into their own classes. But I'm not sure where certain components belong: namely, contexts and shaders. The tutorial (as it's just rendering one triangle) has one device, one swapchain, one device context and one set of shaders. intuition says that there is only one device/swapchain for one game, but with contexts I don't know. I made a Triangle class and put the vertex stuff in there. Should it also create a context? Should it load its own shaders? Or should I pass some global context and shaders to the triangle class when it is constructed? Or pass the shaders and construct a new context? I'm just getting started with 3D programming, so in addition to answering this question, if anyone knows of a tutorial or article or something about the larger-scale structure of a game, I'd be interested in seeing that as well.

    Read the article

  • gcc no longer works after up grade to latest Ubuntu

    - by Hugh S. Myers
    As an example: hsmyers@ubuntu:~/c_dev$ cat hello.c #include <stdio.h> int main(int argc,char **argv) { printf("Hello World!\n"); return 0; } hsmyers@ubuntu:~/c_dev$ gcc -c -o hello.o hello.c In file included from /usr/include/stdio.h:28:0, from hello.c:1: /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory compilation terminated. At a guess somewhere along the way after trying to fix the error message: /usr/bin/ld: cannot find crt1.o: No such file or directory I've munged things up completely. Could anyone please advise? --hsm

    Read the article

  • XNA GUI: Creating a 'scroll pane' widget

    - by Keith Myers
    I'm trying to create a simple GUI system and am currently stuck on how to implement a textarea with a scrollbar. In other words, the text is too large to fit into the view area. I want to learn how to do this, so I'd rather not use an already rolled API. I believe this could be done if the text were part of a texture, but if the game had a lot of unique dialog, this seems expensive. I researched creating a texture on the fly and writing to it, but came up with nothing. Any suggested strategies would be appreciated. I believe it boils down to: text in a texture and how? Or something I have not thought of...

    Read the article

  • Where can I start learning to build web applications in C#

    - by Carson Myers
    So far I've written web sites in PHP, except for a pet project of mine written in Python. I'd like to start learning C# for use on the web, but I have no idea where to start. I know nothing of .Net. Are there any good tutorials or online books etc. which give a brief intro to the .Net environment (specifically C#, and specifically for the web)? I'm not even sure what I need to install. Visual Studio I guess, but what else? Anything special, or will VS do the trick?

    Read the article

  • Impossible to install Ubuntu 10.10 dual boot with Windows 7 on new Acer desktop computer

    - by Don Myers
    My brother has a brand new Acer Desktop with Windows 7. I have done many installs (40+) of Ubuntu starting with 8.10, and have never run into this. I've spent three hours trying to do a dual boot install of 10.10. When you get to the place where you normally would choose to install as a dual boot or overwrite the existing information on the hard drive, that block is just blank. Nothing. No choices even to do a manual partition setup. If you try to go on you get the message "No root file system is defined. Please correct this from the partitioning menu." but there is nothing in the partitioning menu. I tried a good 10.04 disc also. Same thing happens with it. I ran a gparted live cd, and it shows the hard drive as sda with 3 partitions on the original. sda1 is a small partition called PQService. sda2 is another small partition called System Reserved, and GParted says it is the boot partition. sda3 is the main partation with the operating system (Windows 7) and all of the empty space. There is a little unallocated space at the very beginning and very end of the hard drive. If I go to places in the Live CD, it shows a 640 gb hard disk called Acer, but it also shows a 640 gb hard disk called system reserved. They are the same disk. There is just one hard drive. If you click properties in the System Reserved 640 gb, it shows all information as unknown. I had to change the boot order in the bios in order to run the live cd. The hard drive instead of being listed as such is listed as Raid:Raid Ready. Something the way this computer is set up is preventing Ubuntu from being able to identify the hard drive partitions at all to do an install, even if you were not doing a dual boot and just wanted to overwrite Windows. Is this a bug that needs reported? This is a major problem for me and my brother, but also for Ubuntu if new users want to Ubuntu and find they cannot install it.

    Read the article

  • Can't access Windos 7 OS in Ubuntu

    - by Myers
    When I try and Access my Windows 7 OS I get the following memo and I have no idea what to make of the code. Error mounting /dev/sda2 at /media/name/Windows7_OS: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda2" "/media/name/Windows7_OS"' exited with non-zero exit status 13: ntfs_attr_pread_i: ntfs_pread failed: Input/output error Failed to read NTFS $Bitmap: Input/output error NTFS is either inconsistent, or there is a hardware fault, or it's a SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows then reboot into Windows twice. The usage of the /f parameter is very important! If the device is a SoftRAID/FakeRAID then first activate it and mount a different device under the /dev/mapper/ directory, (e.g. /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation for more details. What should I do ?

    Read the article

  • How should I determine my rates for writing custom software?

    - by Carson Myers
    For a custom software that will likely take a year or more to develop, how would I go about determining what to charge as a consultant? I'm having a hard time coming up with a number, and searches online are providing vastly different numbers (between $55/hr and $300/hr). I don't want to shoot too low because it's going to take me so much time (and I'm deferring my education for this project). I also don't want to shoot too high and get unpleasant looks and demand for justification. FWIW I live in Canada, and have approx. 10 years of development experience. I've read the "take your salary and divide it by 1000" rule of thumb, but the thing is I don't have a salary. Currently I'm just doing fairly small programming tasks for a friend who is starting a marketing company, pricing each task fairly arbitrarily. I don't know what I would make over the course of a year doing it, but it would be incredibly low. My responsibilities for the project would be the architecture, programming, database, server, and UX to some degree. It's going to be a public facing web service so I will also need to put a lot of effort into security and scalability. Any advice or experience?

    Read the article

  • Running Visual Studio on OS X

    - by Piers
    So, my windows laptop is on its last legs and I'm thinking of shelling out for a Macbook Pro. However, I do some (but not a lot) of ASP.NET development, and so would need to install Visual Studio of some version using something like VMWare Fusion. Has anyone had any success doing this? I know that the sensible thing to do would be to take the money that I'd spend on a MBP and get a decent laptop, but since when is sensible fun?

    Read the article

  • sudo: cd: command not found when trying to get to /var/log/apache2

    - by Piers
    I'm running Ubuntu 10.04 and am having issues getting to the log files in /var/log/apache2 I can cd to most other places (I haven't tried every single file, obviously) but when I try to get to the above directory, I get the error message sudo: cd: command not found ... I've just tried something else and I can't cd when used in conjunction with sudo. I can use sudo when doing things like apt-get but it seems I can't change directory when using sudo. I haven't been on this server for a while but I know I used to be able to do this.

    Read the article

  • What am I missing out on when using msbuild to deploy?

    - by Piers Karsenbarg
    I'm trying to use msbuild/webdeploy with teamcity to deploy to IIS. However, I'm getting an ERROR_USER_UNAUTHORIZED error message and link pointing me to this page on iis.net. I'm using the Web Management Service to do this and I can verify that the username and password exist (I can log into the server with that combination), the site exists and the the user has IIS manager permissions: So what am I missing out? Edit: New screenshot to answer @dirt:

    Read the article

  • Anthony Lye Shows New Pharmaceutical Sales Solution: Turn the Screen Around

    - by charles.knapp
    Tomorrow, March 31, watch as senior vice president of CRM, Anthony Lye, and director of life sciences product strategy, Piers Evans, provide the first public look at Oracle's new Pharmaceutical Sales solution, powered by Oracle CRM On Demand 17 - Life Sciences Edition. You will see a next generation approach to sell more and report less. Register now for this informative global webcast on March 31, 9 AM PDT/4 PM GMT.

    Read the article

  • Anthony Lye: How Pharmaceutical Reps Can Sell More & Report Less

    - by charles.knapp
    On March 31, watch as senior vice president of CRM, Anthony Lye, and director of life sciences product strategy, Piers Evans, provide the first public look at Oracle's new Pharmaceutical Sales solution, powered by Oracle CRM On Demand - Life Sciences Edition. You will see a next generation approach to: • Increase sales effectiveness • Equip reps worldwide • Get the best value Register now for this informative GLOBAL webcast on March 31, 9 AM PDT/4 PM GMT.

    Read the article

  • Rumor Mill: New Features SQL 11

    - by Mike Femenella
    For those of you that remember the old Mike Myers SNL skit, talk amongst yourselves..I’ll give you a topic: This is purely based on 1 conversation with 1 person from the mothership (Microsoft). SQL 11 is in the works and supposedly includes readable mirrors and in the version beyond that read/write mirrors. Given the name I would assume that release would be (drum roll) 2011 some time. Discuss.

    Read the article

  • Global Webcast: Increase Pharmaceutical Sales Effectiveness

    - by charles.knapp
    See a next-generation approach to Pharmaceutical sales challenges! • Increase the quality of sales interactions with enhanced call planning and eDetailing • Improve sample management with electronic signature storage and inventory tracking on the go • Increase marketing effectiveness with closed loop marketing and personalized content delivery Watch as senior vice president of CRM, Anthony Lye, and director of life sciences product strategy, Piers Evans, provide the first public look at Oracle's new Pharmaceutical Sales On The Go solution, powered by Oracle CRM On Demand Release 17 -- Life Sciences Edition. Register now for this informative GLOBAL webcast on March 31, 9 AM PDT/4 PM GMT.

    Read the article

  • Creating an SQL variable character column > 255 characters supporting multiple databases

    - by Piers
    I have an application that stores data through an ODBC data source of the user's choosing. So far it has worked well on a range of database systems (e.g. JET, Oracle, SQL Server), as the SQL syntax is fairly simple. Now I am running into a problem where I need to store more than 255 characters in my strings. Previously I created the table using column type VARCHAR (255). Now if I try to create a table using, e.g. VARCHAR (512) then it falls over on Access databases. I know that I can use the MEMO type for Access, but this is non-standard SQL and will thus likely fail on other database systems (e.g. Oracle). Is there any widely supported SQL standard for creating text columns wider than 255 characters, or do I need to find another solution? The alternatives seem to me to be: 1) Profile the database system and customise the SQL CREATE TABLE command based on the database system. I don't like this as it defeats the purpose of using ODBC. 2) Add extra columns of 255 chars as required (e.g. LONGSTRING1, LONGSTRING2, ...) and concatenate after reading. I don't like this because it means the number of columns can vary between tables and it complicates read/write. Are there any other viable alternatives to these two options? Or is it possible to have an SQL compliant CREATE TABLE command supported by the majority of database vendors, that supports strings longer than 255 chars?

    Read the article

  • Changing folder names in Visual Studio when using SVN

    - by Piers Myers
    I am using VS2008/VS2010 with Resharper 5, TortoiseSVN 1.6.8.19260-x64, and AnkhSVN 2.1.8420.8. Most operations I do in Visual Studio are reflected fine in SVN, however, renaming folders in a project can cause problems when I try to submit my changes. Also all the namespaces in the C# source files under the renamed folder need to be updated to reflect the name change. What is the best way to rename the main project folder or any sub folders and ensure there are no issues with SVN? Should it be done outside Visual Studio? What is the best way to update all the namespace changes? Is search/replace the only way? Are there any best practices regarding folder names and their contents?

    Read the article

  • Generic TryParse

    - by Piers Myers
    I am trying to create a generic extension that uses 'TryParse' to check if a string is a given type: public static bool Is<T>(this string input) { T notUsed; return T.TryParse(input, out notUsed); } this won't compile as it cannot resolve symbol 'TryParse' As I understand, 'TryParse' is not part of any interface. Is this possible to do at all?

    Read the article

1 2 3 4  | Next Page >