I have some numbers stored in a vector . I want to find which number appears most in the vector.
Is there any easy/fast algorithm (STL or whatever) that does this ?
I want to make a table that displays on a webpage, but one requirement is to make it easy to copy and paste into a spreadsheet. Normal HTML tables selection behavior is obviously different from how a spreadsheet like Excel selects -- when you select multiple rows it wraps around instead of selecting a rectangular area. Is there any way to make HTML table behave like a spreadsheet in this regard, or is the only way to resort to a Flash table or something similar?
Programming challenge: Given a set of integers [1, 2, 3, 4, 5] I would like to generate all possible k-combinations in ascending size order in Java; e.g.
[1], [2], [3], [4], [5], [1, 2], [1, 3] ... [1, 2, 3, 4, 5]
It is fairly easy to produce a recursive solution that generates all combinations and then sort them afterwards but I imagine there's a more efficient way that removes the need for the additional sort.
Hello.
I'm working on a 2D tiles-based games mixing 3D models, which I achieved using OpenGL and C++.
I would like to know what language should I use for creating a map editor, it needs to be easy-to-use and with a form designer or something alike, and with an easily embedded rendering engine.
Hello,
I am new to SVN. I want to check out a very large project over a slow connection which takes ages to download. I have zipped versions of project on both remote server and my local which are identical. Is there an easy and quick way to sync my local project with remote server without a full checkout?
Thanks
Resolving an xpath that includes namepsaces in Java appears to require the use of a NamespaceContext object, mapping prefixes to namespace urls and vice versa. But I can find no mechanism for getting a NamespaceContext other than implementing it myself. This seems counter-intuitive. Is there any easy way to acquire a NamespaceContext from a document, or to create one, or failing that, to forgo prefixes altogether and specify the xpath with fully qualified names?
Let's say I have
some_value = 23
I use the integer and the .times to loop.
Inside the iteration, is there an easy way, without keeping a counter, to see what iteration the loop is currently in?
Hello:
I'm looking for an easy-to-use graphics lib for python that can output to screen as well as pdf. So, I would use code to draw some stuff (simple prims like ovals, rectangles, lines and points) to screen and then when things look good, have it output to pdf.
Make sense?
Thanks!
Blue
I want to open files, which are doubleclicked in Explorer, in the same instance of my .Net application, e.g. in a new tab. How can I do this?
For now each file starts new instance of my application. Many programs can open files in the same instance, for example, Opera and Notepad++, so there is an easy way for sure.
I have a uri string like: http://example.com/file?a=1&b=2&c=string%20param
Is there an existing function that would convert query parameter string into a dictionary same way as ASP.NET Context.Request does it.
I'm writing a console app and not a web-service so there is no Context.Request to parse the URL for me.
I know that it's pretty easy to crack the query string myself but I'd rather use a FCL function is if exists.
I want to make a program similar to GLPaint using CGContext that is very smooth and easy to put images behind. I understand that GLPaint has no allowance for putting an Image behind the painting canvas, rather than having just a black one.
A have two keyboards in a pc.
One is used to type in TMemo1 and the other in TMemo2. Both are allowed to type at the same time. The problem is I cannot distinguish what keyboard-one has typed and what keyboard-two has typed.
Please help!
(My new to delphi and DLLs, so please go easy on the technical stuff.)
I have a python function that gets an array called row.
Typically row contains things like:
["Hello","goodbye","green"]
And I print it with:
print "\t".join(row)
Unfortunately, sometimes it contains:
["Hello",None,"green"]
Which generates this error:
TypeError: sequence item 2: expected string or Unicode, NoneType found
Is there an easy way to replace any None elements with ""?
With some HTML like this:
<p>Some Text</p>
Then some CSS like this:
p {
color:black;
}
p:hover {
color:red;
}
How can I allow a long touch on a touch enabled device to replicate hover? I can change markup/use JS etc, but can't think of an easy way to do this.
I've got a form that I downloaded, I'd like to prefill some content on the form (this is easy using cfpdfform).
Where it gets tricky is I would like to allow the user to modify the contents of that form, and then somehow have those modified contents accessible to me. I didnt build the source PDF so I dont know how to allow the user to "save" the new contents so they can be read.
Any ideas on where I might start on this one?
I was told that the assembly files made from C# and F# source is interoperable as they are compiled into .NET assembly.
Q1 : Does that mean that C# can call F# functions just like they are C# functions?
Q2 : How about the IronPython and IronRuby? I don't see any assembly dll from the IronPython/IronRuby.
Q3 : Is there any easy way to use IronPython/IronRuby functions from C# or F#?
I have place model & entry model that entry is parent
everything is fine but how can I delete the result row $categoryPlacements
in place model:
$entryModel = new Model_EntryModel();
$entryRow = $entryModel-find ( $entryId )-current ();
$categoryPlacements = $entryRow-findDependentRowset($this);
in this case i want to delete the $categoryPlacements result in place model
I can use categoryPlacements-toarray() and then delete but is another easy way?
Having two strings (start and end time) in such form "16:30", "02:13" I want to compare them and check if the gap is greater than 5 mins.
How can this be achieved in Javascript in an easy way?
Hi Folks , Here is Jagadeesh, New to the Iphone Development Platform , i need to know the Difference among the Templates for our Applications( like we have Navigation, view, window, Open Gl, Tab Bar, Utility type application)over there and there is a small description at the bottom of the pane , can anyone let me know the Complete description and Templates Screen shot(like View based aPpliction screen shot, Window based Screen Shot Etc..., ) so that as a beginner it is very easy to learn....
I have problem right now, i have using gettext in my PHP code, but i have a big problem, all my Javascript file's its now transelatete, can sombarby tell my a easy way to make defriend lang translate in Javascript?
tanks a lot all.
in this case I don't want to use the ticketing system or the wiki, simply connect it to browse multiple repos.
I would think it would be as easy as having a script update the repository link in its conf.ini file every time you wanted to look at a new repo, right?
I'm not a usability specialist, and I really don't care to be one.
I just want a small set of rules of thumb that I can follow while coding my User Interfaces so that my product has decent usability.
At first I thought that this question would be easy to answer "Use your common sense", but if it's so common among us developers we wouldn't, as a group, have a reputation for our horrible interfaces.
Any Suggestions?
I've done some googling and there seems to be a plethora of tools for reading excel 2007 spreadsheets using c#. I'd like to know which one performs best and is easy to use.
I think I'm going mad - this seemed like an easy thing to do but I can't find any info on it at all.
I have created a Custom List and added 4 columns to it. Created By and Modified By are already in the list but hidden from the view.
I want to add a Date Modified column (which is a built in field) to this Custom List. How do I do this programmatically?