I need 2 different colours: Yellow, Green. Is it smart to use Quartz filters on standard progress bar, because sometimes I can see rendering problems after doing so.
A "traditional" C++ class (just some random declarations) might resemble the following:
class Foo
{
public:
Foo();
explicit Foo(const std::string&);
~Foo();
enum FooState
{
Idle, Busy, Unknown
};
FooState GetState() const;
bool GetBar() const;
void SetBaz(int);
private:
struct FooPartialImpl;
void HelperFunction1();
void HelperFunction2();
void HelperFunction3();
FooPartialImpl* m_impl; // smart ptr
FooState m_state;
bool m_bar;
int m_baz;
};
I always found this type of access level specification ugly and difficult to follow if the original programmer didn't organize his "access regions" neatly.
Taking a look at the same snippet in a Java/C# style, we get:
class Foo
{
public: Foo();
public: explicit Foo(const std::string&);
public: ~Foo();
public: enum FooState
{
Idle, Busy, Unknown
};
public: FooState GetState() const;
public: bool GetBar() const;
public: void SetBaz(int);
private: struct FooPartialImpl;
private: void HelperFunction1();
private: void HelperFunction2();
private: void HelperFunction3();
private: FooPartialImpl* m_impl; // smart ptr
private: FooState m_state;
private: bool m_bar;
private: int m_baz;
};
In my opinion, this is much easier to read in a header because the access specifier is right next to the target, and not a bunch of lines away. I found this especially true when working with header-only template code that wasn't separated into the usual "*.hpp/*.inl" pair. In that scenario, the size of the function implementations overpowered this small but important information.
My question is simple and stems from the fact that I've never seen anyone else actively do this in their C++ code.
Assuming that I don't have a "Class View" capable IDE, are there any obvious drawbacks to using this level of verbosity?
Any other style recommendations are welcome!
im trying to work through some questions and im not sure how to do the following
Q:Find the hard drive sizes that are equal among two or more PCs.
its q15 on this site
http://www.sql-ex.ru/learn_exercises.php#answer_ref
The database scheme consists of four tables:
Product(maker, model, type)
PC(code, model, speed, ram, hd, cd, price)
Laptop(code, model, speed, ram, hd, screen, price)
Printer(code, model, color, type, price)
any pointers would be appreciated.
I have recently been getting my feet wet in MongoDB using Mongoid w/ Rails 3, but I'm now interested in learning the low level MongoDB features using only the Ruby driver, and trying some map/reduce that would not be possible through Mongoid (afaik)
I'm not entirely sure where in Rails I should be setting up the db connections etc, and any pointers would be much appreciated!
I'm just starting out with x64 compilation.
I have a couple of char*'s, and I'm subtracting them.
With a 32-bit compile, this works:
char * p1 = ....
char * p3 = ...
int delta = p3 - p1;
But if I compile for x64 I get a warning:
warning C4244: 'initializing' : conversion from '__int64' to 'int',
possible loss of data
What is the correct type to use, to represent a difference between two pointers, that works in both x86 and x64 compiles?
Hi,
Did any one over here work in "VisIt" visualization software? I have a dataset where the x, y, z coordinates are stored in separate bin files, i don't know how to visualize these files in VisIt, which would be the best file format to use.
Till now, we were using Advanced Visual System (AVS) .fld files to read the data in AVS, now we have to switch to VisIt, don't know how to do it. Would appreciate if anyone can give some pointers in this direction.
I've got a number of S3 objects that are available to my customers. Since I'd like to bill my customers by usage, I wondered if there is any smart kind of way to get the number of times a given file has been downloaded?
Alternatively, I suppose I could parse the log files provided by S3, but with 10m+ fetches per customer this might be bit of a task.
Any ideas?
Is there anyway to stop automatic DataContext inheritance in Silverlight?
I Set my DataContext on my parent UserControl in code. As a result all the xaml bindings inside the UserControl try to bind to the new DataConext they get (through the automatic DataContext Inheritance).
The DataContext's for the children elements (actually they are children of children of children) of the UserControl is something I need to set in the UserControl's code... I don't want them being all smart because they end up binding to the wrong data object! :-)
Hi,
I am using
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ return YES; }
to allow rotation, which works fine - except that the landscape view jumps backwards up the page that is being displayed. I can't figure out what I should be looking at to fix it. I just want the page to rotate where it is.
Any pointers would be great. Am a noob, as is probably clear.
Thanks
Jonathan
I'm trying to implement sub surface scattering at isosurfaces and looked up how a BSDF works mathematically.
Implementing the reflective and diffuse part seems to be quite easy as i just have to evaluate phong at the isosurface intersection, but how do you I apply the transmissive part of the BSDF? In what way do i have to modify the ray direction.
Any pointers to a practical implementation are welcome.
Thanks and So long!
I have three integer values. I need to represent these data as a chart. What should i do. Will iReports be the right option. If so give some pointers to tutorials for the IReports.
Hi all,
I'd like to use a JS regex to take a string such as the following:
'http://www.somedomain.com/some_directory/some_other_directory/some_image.jpg'
And turn it into this:
'http://www.some_other_domain.com/another_directory/yet_another_directory/size1_some_image.jpg'
Any hints? Additionally, any pointers for books or other resources that give a gentle introduction to mastering regexes in JS and other languages?
Silverlight provides only Touch.FrameReported event and doesnt provide any events for the UIElements like it does for mouse events(ex: MouseDown, MouseUp). Is there any touch library available for the silverlight which provides these touch events and supports gestures.
Google did not help me much or may be my search terms are not correct. Any pointers will be appreciated.
I'm hoping there are some Cell Phone Operator gurus here today.
Would anyone be able to explain how Operators achieve the Visual Voicemail feature on the iPhone (and I assume other newer smart phones)?
If a new cell phone operator that distributed SIM cards wanted to utilise the visual voicemail feature on unlocked iPhone's what services need to be in place to be able to support it?
Is there an open spec or is it completely proprietary?
I'm trying to wrap a standard sequence of steps in a shell script (linux/bash) and can't seem to figure out how to tell of the execution of svn status returned anything. For example
~/sandbox/$svn status
? pat/foo
~/sandbox/$echo $?
0
If I delete the foo file, then the
svn status
return nothing, but the echo $? is still 0
I want to not do some steps if there are uncommitted changes.
Pointers greatly appreciated.
I remember quickly adopting given .. when, say, //, and the smart matching operator when Perl 5.10 came around.
What do you consider the most useful fixes and features introduced with Perl 5.12.0?
I am interested in Examine for building searching in a standalone desktop app for searching db tables as well as office/.pdf files
This looks like an excellent scenario for Lucene/examine
However the doc there is minimal and while i have plenty of experience with SQL full text search, Lucene is a different beast altogether and hence looking for help/pointers on how/where to start
And yes, i did a google search but did not find any resources as the terms are fairly common ( lucene examine tutorial etc. )
I have created a number of forms using various Joomla components which have more or less worked successfully.
Recently I have attempted to create mult-page forms - the forms work...but they are slow as molasses. Having spent a couple of weeks trying to resolve this and not seeing any signs of improvement ......
I wonder if anyone has experience of using hosted forms services in Joomla either using a wrapper or as a static page within a Joomla site.
Any pointers or recommendations would be appreciated.
Hi Folks,
When you click the "Click an element on the page to inspect" arrow with FireBug, it puts a Blue Border around the target element, and also returns the DOM Id.
I am building an application and that feature would be awesome to add. Be able to hover over elements and highlight the target, upon clicking return the DOM Id or CSS selector to the application.
Is there a jquery plugin that does this magic? Some other smart way?
Thanks!,
Jonathan
Hi all,
Im currently scouting for a plugin for Wordpress which will show a certain amount of comments for each blog entry on the home page and under each category.
For example on the home page:
Entry #3
Blog content
Comment
Comment
Comment
Entry #2
Blog content
Comment
Comment
Comment
Entry #1
Blog content
Comment
Comment
Comment
I hope Ive explained clearly. I havent found what Im looking for yet, maybe Im searching the wrong phrases!
Any pointers would be appreciated, thanks for your time!
Hi,
I'm looking to import one of the Shapefiles supplied with the Ordnance Survey Boundary-Line opensource set into Oracle XE.
http://data.gov.uk/dataset/os-boundary-line
Unfortunately I'm completely unsure how to go about this, despite much Googling.
Anyone got any pointers or tips or a link to a guide?
Cheers
James
Hello everyone,
What do you consider a better programming practice: passing objects as pointers or references to functions. What do you do for input validation?
Thanks.
I am not sure whether audio units can work as codecs in a streaming audio scenario on the iPhone.
I've read in various places that it can be done, but I haven't seen any examples or proper documentation for that. Instead, I find that most of the apps released have utilised ffmpeg and libmms.
I appreciate any help or pointers you can give me.
Hi
No thread about use or unuse of obfuscusion please ^^
Just share creative approaches how to obfuscate in php the really smart way plz.
plain md5 and base64_decode is too static ..
what you think regarding hash, salt
what about dynamic Variables (even for the same $var).
Thx for any creative input
Hi,
I've a little problem, I don't really understand if I can use addEventListener more than one time on the same object (and same callback function) if this case can I have a problem of overflow, or simple flex is so smart to not add again in the same stack same function
for examples:
var t:CServiceObj =
_rModel.userGetBoardJoined();
t.addEventListener(EDataService.DATA_AVAILABLE,onDataOk);
t.addEventListener(EDataService.DATA_AVAILABLE,onDataOk);
t.addEventListener(EDataService.DATA_AVAILABLE,onDataOk);
thanks