Hi,
I want to create a unique hash (16 chars long) of an arbitrary length String. Is there a good library that implements MD5 or SHA-1 for C++ with which I can achieve this? (and possibly an example of how to use it)
Hello,
I can easily draw the projection of a 3D set of points onto the plane with normal vector (1,1,1), by using the matrix
(-sqrt(3)/2 sqrt(3)/2 0)
(-1/2 -1/2 1).
I want to do the same thing, but for a projection onto an arbitrary plane with normal vector (a,b,c) instead of (1,1,1). How to find the matrix?
Thanks in advance!
hello.
Disclaimer, I not do anything in particular with regards this question, just curious.
Is it possible to take address of instruction or block in C? in essence, is there jump equivalent in C?
for example:
void function() {
int k;
{ // is a possible to go to this address from arbitrary point in code?
int i, j;
k += j+i;
}
}
thank you
Surround.vim is a nifty vim extension that allows you to surround blocks of text with , brackets, braces, and pretty much any arbitrary "surround" character. It supports paragraph and word surround, but I frequently use it in visual mode.
I'm playing around with Emacs and wondering if there's something similar; something that will let me highlight a region and then have the marked region (or rectangle) enclosed with braces, brackets or tags.
There are a lot of 3d game engines around, does anyone with experience with them have advice on which one would likely be able to handle these (arbitrary) requirements?
opengl
mac/pc
1000x1000km terrain
1000 towns varying in size from 10
to 1000 buildings
128 people in any one location
MMO type networking (no solo play)
physics engine including airfoil
c++ with optional scripting
Is it something specific, with a definite structure, or just an arbitrary data file with some form of encryption to hold keys, and potentially other secret information? Can someone please explain the term or point me to a link.
I have database with oracle number type. Could there any possible issues with using java Double when updating table with numeric column. Should i switch BigDecimal or Double is approriate type.
As I fas as I know, BigDecimal is used when arbitrary precision required, when deal with prices for example.
Consider simple API updatePrice(Double d) Should i persist double as is or BigDecimal.valueOf(d) is preferable ?
I'm developing a website that uses some complex computations (NLP-related). My customer wants to have "debugging" webpages for some of these computations where he can run them with arbitrary input and see all the intermediate results that occur during computation.
Before this request all of the computations were encapsulated in beans and intermediate results were logged into general log.
What is the best way to capture all these results on Java level to render them as webpage?
Is there any Python library that allows me to parse an HTML document similar to what jQuery does?
i.e. I'd like to be able to use CSS selector syntax to grab an arbitrary set of nodes from the document, read their content/attributes, etc.
The only Python HTML parsing lib I've used before was BeautifulSoup, and even though it's fine I keep thinking it would be faster to do my parsing if I had jQuery syntax available. :D
How do I set the width and height of my swf in AS3?
This is my code so far:
package {
import flash.display.Sprite;
public class Game extends Sprite {
}
}
Right now, when loaded it is at some arbitrary default size.
If I can't change the size this way, is there any easy work around that will be consistent?
I was wondering if there's an implementation of a XML schema reader that for an arbitrary node in XML schema provides list of nodes which are supposed to be present as child nodes of given node, restrictions on nodes and so on.
I'm planning to program it for my purposes but I would like to know if it isn't solved somewhere. I really need only a small subset what I described above.
Thanks for tips!
I'm working with xna in C# and in my game I will have a variety of space ships flying all over the place. They will each have an arbitrary rotation, size and position in space and I need a method to determine when they collide. Ideally the method would take two Rectangles, two doubles and two Vector2s for size, rotation and position respectively and return a boolean that indicates whether they have intersected or not.
In python zip function accepts arbitrary number of lists and zips them together.
>>> l1 = [1,2,3]
>>> l2 = [5,6,7]
>>> l3 = [7,4,8]
>>> zip(l1,l2,l3)
[(1, 5, 7), (2, 6, 4), (3, 7, 8)]
>>>
How can I zip together multiple lists in haskell?
I have text cells of arbitrary length in Excel's column A. Using a private key, I want to generate digital signature for data in column A into the cell in column B.
I'm looking for a macro implementation for the digital signature algorithm - I don't think one ships with Excel, but is there an addon available?
It must be possible to easily verify correctness of the signature in other environments as well.
I use to write code like this:
void fun(char *buff, unsigned size)
{
std::strstream str(buff, size);
str << "hello world: " << 5;
}
so I can use stream output over an arbitrary buffer. I've found this technique both efficient (no allocations) and useful (streams!). Now that std::strstream is deprecated, how can I get the same speed+flexibility that I can get with this code?
Assume I've got some arbitrary layout of splits in vim.
____________________
| one | two |
| | |
| |______|
| | three|
| | |
|___________|______|
Is there a way to swap one and two and maintain the same layout? It's simple in this example, but I'm looking for a solution that will help for more complex layouts.
It's possible to do interesting things with what would ordinarily be thought of as typesetting languages. For example, you can construct the Mandelbrot set using postscript.
It is suggested in this MathOverflow question that LaTeX may be Turing-complete. This implies the ability to write arbitrary programs (although it may not be easy!). Does anyone know of any concrete example of such a program in LaTeX, which does something highly unusual with the language?
I am looking for a main memory database with a C++ interface. I am looking for a database with a programmatic query interface and preferably one that works with native C++ types. SQLLite, for example, takes queries as string and needs to perform parsing ... which is time consuming. The operations I am looking for are:
Creation of tables of arbitrary dimensions (number of attributes) capable of storing integer types.
Support for insertion, deletion, selection, projection and (not a priority) joins.
I have a rectangle of any arbitrary width and height. I know X,Y, width, and height. How do I solve the upper right hand coordinates when the rectangle is rotated N degrees? I realized if it were axis aligned I would simply solve for (x,y+width). Unforunatly this doesn't hold true when I apply a transform matrix on the rectangle to rotate it around its center.
Suppose I have an arbitrary function:
void someFunc(int, double, char);
and I call someFunc(8, 2.4, 'a');, what actually happens? How does 8, 2.4, and 'a' get memory, moved into that memory, and passed into the function? What type of optimizations does the compiler have for situations like these? What if I mix and match parameters, such like someFunc(myIntVar, 2.4, someChar);?
What happens if the function is declared as inline?
I'm trying to extend a Java Swing component in Clojure, i.e. I want to extend a javax.swing.JComponent and add some custom methods implemented in pure Clojure in addition to all the standard inherited methods.
I've tried using "proxy" which works great if I just want a single instance (in the same way as an anonymous inner class). However I'd really like a named class so that I can generate an arbitrary number of instances.
What's the recommended way of doing this?
A certain variable might contain a relative path or an absolute path. Either way, I need to be able to pull the filename from the variable:
http://www.somesite.com/dir1/dir2/filename.gif
/dir1/dir2/filename.gif
The directory structure is also arbitrary. So basically given either of the url's above (with arbirtrary directory structure) I need to pull 'filename.gif'. Thanks in advance
in book algorithm in c++ by robert sedgewick
there is such kind of problem
how many parallel steps would be required to sort n records that are distributed on some k disks(let say k=1000 or any value ) and using some m processors the same m can be 100 or arbitrary number
i have questions
what we should do in such case? what are methods to solve such kind of problems?
and what is answer in this case?
Does anyone know of an easy way to escape HTML from strings in jQuery? I need to be able to pass an arbitrary string and have it properly escaped for display in an HTML page (preventing JavaScript/HTML injection attacks). I'm sure it's possible to extend jQuery to do this, but I don't know enough about the framework at the moment to accomplish this.
Say a simple structure
struct abc
{
int a;
char b;
}
I got some value in a variable defined as its structure and now I want to print below
a = [some value]
b = [some character]
What is the best way to achieve this for an arbitrary structure without having to write a dump...(...) function for each of the structure I encounter?