After reading command design pattern, I have a couple of question -
Why we are creating concrete command and receiver object on client. Can't this initialization on invoker class?
I think client should create invoker and pass it's request to invoker. Invoker should take care of all the stuff.
By doing this,
We have less dependency on client.
The design of class diagram is totally different from actual design.
I'm developing an iPad application using Core Data, and was hoping someone could clarify something about Core Data.
Right now, I populate my table by making a fetch request for all of my data in viewDidLoad. I'd rather make individual fetch requests in my tableView:cellForRowAtIndexPath:. Can anyone tell me which is more efficient, and why? In other words, is it much less efficient to make lots of small requests as opposed to one big request?
This is more of a data structure question rather than a coding question.
If I am fetching a data stream, i.e, I keep receiving float numbers once at a time, how should I keep track of the top K frequent numbers? Here my memory is 4G and I prefer to have less communication with hard drive unless necessary.
I think heap is good for updating the max and min.
How should I design the data structure? Thanks
You see a fair bit (in the Geek community anyway) about OpenID. It seems like a good idea. I'm developing a website that will be targeted at a somewhat less geeky audience (but not quite Mom and Pops either) so I have to wonder if OpenID is going to be "too hard" for some audiences.
What do you think? That aside, are there any other technical or non-technical reasons NOT to use OpenID?
Which PHP framework should I choose between ZendFramework or YII?
Points I need to consider:
Performance (assuming an accelerator is used)
Documentation
stability of framework
less to code.
I have found that if I move a message using IMAPIFolder::CopyMessages (using the MESSAGE_MOVE flag) the message gets a new entry ID. However I do not see any reliable way of getting the entry ID of the message in its new location, or otherwise getting a reference to it.
The best suggestion I have had so far involves tagging the message with the old custom property before moving, and then doing a search afterwards, but I was wondering if there is a less convoluted solution.
The shared library is causing much trouble for me, and disk space is far less expensive than the trouble itself.
How can I convert all shared libs(.dll) to static libs(.lib) and make my programe use them instead of using shared libs?
Note some .dlls are not directly refered to by my programe,e.g. my programe requires libpng,and libpng requires zlib.dll.
Is there a solution that wraps up all these cases?
I am new to the lower level useful functions of JavaScript, and I find myself needing to compare two date objects, but within an hourly range. For example, if Date1 is less then two hours until (or from) Date2. How could this be done?
I currently have a std::vector which holds std::vector of double. I'd want to sort it by the second element of the double vectore. ex:
instead of sorting by MyVec[0] or myvec[1] I wat it to sort myVec[0] and myvec[1] based on myvec[0][1] myvec[1][1]. Basically sort by a contained value, not the objects in it.
so if myvec[0][1] is less than myvec[1][1] then myvec[0] and myvec[1] will swap.
Thanks
PostgreSQL has allowed me to name a column "campaign_$". I like the name because it's short and to the point, and other potential names like "campaign_receipts" seem longer and less clear.
BUT, I wonder if I'll eventually regret putting a $ symbol in a column name, either in PHP or in some other distant part of the architecture. Should I just stick to letters and underscores?
Thanks!
I have a table of purchases containing a user_id and a date_of_purchase.
I need to be able to select all the users who have made 2 purchases within 12 months of each other. The dates can be any point in time as long as they are less than 12 months apart.
e.g.
user_id date_of_purchase
123 01/Jan/2010
124 01/Aug/2010
123 01/Feb/2010
124 05/Aug/2008
In this example i want user_id 123
To define constants, what is the more common and correct way? What is the cost, in terms of compilation, linking, etc., of defining constants with #define? It is another way less expensive?
I Have a list with "a" and "b" and the "b"'s are somewhat of a path and "a"'s are walls. Im writing a program to make a graph of all the possible moves. I got the code running to check the first "b" for possible moves, but i have NO Idea how im going to find all "b"'s , even less check them all without repeating.
Major issue im having is getting the tuple coordinates of the "b"'s out of the list.
Any pointers/tips?
I sweated over the question above. The answer I'm going to supply took me a while to piece together, but it still seems hopelessly primitive and hacky compared to what one could do were completion to be redesigned to be less staticky. I'm almost afraid to ask if there's some good reason that completion logic seems to be completely divorced from the program it's completing for.
When you have a circular buffer represented as an array, and you need the index to wraparound (i.e., when you reach the highest possible index and increment it), is it "better" to:
return (i++ == buffer.length) ? 0: i;
Or
return i++ % buffer.length;
Has using the modulo operator any drawbacks? Is it less readable than the first solution?
Why to use local pipes instead of sockets for programs communication inside one computer? Has Any one FRESH stats on who is faster and how nmuch, what is more sequre or less?
Is there a mod_rewrite equivalent for IIS 7.0 that's
a) more or less complete
b) suitable for a production environment, i.e. battle-tested/dependable/secure
Do you have an experience-based recommendation?
$this->totplpremium is 2400
$this->minpremiumq is 800
So why would this ever return true?!
if ($this->totplpremium < $this->minpremiumq){
The figures are definitely correct and I am definitely using the 'less than' symbol. I can't work it out.
What are helpful CSS properties which can be helpful for table?
I have to make so many complex tables which have different type of colors in columns, thead, borders, padding, alternate row and column colors etc. I want to use as less as possible of css classes.
How to make complex tables design with combination of as much as possible of HTML tags and CSS properties? and should look identical in all browsers.
More or less I want to execute two functions in parallel.
One way as I see is doing through SetTimeOut function.
I have not completely gone through the ReactiveExentension, although it looks promising but may be overkill for my needs.
Is there any framework which supports parallelism ?
My use case is trivial, but I would like to know if anybody heavily needed parallelism in Java Script ?
Thanks, Biswanath.
When you break into the debugger in VS and open the disassembly window, each assembly fragment is displayed below it's corresponding code section (more or less). GCC with -S outputs only the stripped down assembly.
Is there an option in GCC to show some correspondence to the original code?
Source code is C++.
When building objects that make use of data stored in a RDBMS, it's normally pretty clear what you're getting back, as dictated by the tables and columns being queried. However, when dealing with NoSQL, document-based systems, it's less clear what is being retrieved.
What are common methods of keeping track of structure in which data is stored?