I come from a c++ background and I find myself constantly doing this in java:
SomeClass sc=new SomeClass();
if(null!=sc)
{
sc.doSomething();
}
What I want to know is what will be in the variable sc if the constructor fails for some reason (like maybe not enough memory). I can'
t find a straight answer, and I am worried that I am...
// Create test video frame
void CreateFrame(char * buffer, int w, int h, int bytespan)
{
int wxh = w * h;
static float seed = 1.0;
for (int i = 0; i < h; i ++)
{
char* line = buffer + i * bytespan;
for (int j = 0; j < w; j ++)
{
// RGB
line[0] = 255 * sin(((float)i / wxh * seed) * 3.14);
line[1] = 25...
Could someone please help me understand how salting works?
So far I understand the following:
Validate password
Generate a random string
Hash the password and the random string and concat them, then store them in the password field...
How do we store the salt, or know what it is when a user logs in? Do we store it in its own field? ...
Is there a reason why Visual Studio won't let me create a WPF window in a DLL project?
I "solved" it by creating a window in an Application Project and copying it to my DLL project.
I also found that I could just create a UserControl and change the base class to "Window".
But if I had to do it this way, it's maybe because I shouldn't d...
I see lots of info and tutes on how to use some XLIFF translators, and how to create .po files, but how do I create an XLIFF file?
It seems XLIFF editors allow you to open and translate an XLIFF file, but not create one.
Be gentle, I'm just a programmer. I don't know about human languages... :P
...
Okay, I'm rewriting this post because I had a really specific question but I think it might be more useful to just explain what I want to do :)
I'm working in WPF with SlimDX.
The target is a program that initializes a Direct3D device, and is able to render cool D3D11 gfx to an offscreen rendertarget.
Users can add output-windows, and ...
Hi,
I have a List grid where elements are being added dynamically after fetching from server. But to add each element in the grid it takes around 40mili seconds, which is too slow. To add 300 elements it takes around 10/12 seconds in Firefox(3.6) and IE(8), but opera does it faster.
Please help me.
Thanks,
Kisor
...
I was wondering if there are job titles like "Test Data Creator". Seems like the lack of data is a real hinderage to the development process. In fact, some programmers have remarked that is actually the hardest part of a project. Is there a fundamental process limitation that makes this impractical?
Like for any company, once an employe...
I want to write a add-in for Visual Studio 2008. It will provide a friend UI to show and edit bitmap image when I'm debugging projects about image process.
I know how to access IDebugger interface in VC6, but I don't know how to do it in VS 2008. And I prefer to C/C++ guide other than C#. Thanks.
I found it: Debugger Object(http://m...
I know that adding
"hbm2ddl.auto"=create
Hibernate will create the tables automatically reading the mapping from the hbm / the annotation. Please let me know that if this is a good practice to follow and why?
...
I'm preparing for an exam in Java and one of the questions which was on a previous exam was:"What is the main difference in object creation between Java and C++?"
I think I know the basics of object creation like for example how constructors are called and what initialization blocks do in Java and what happens when constructor of one cl...
I would like to create an Access database from a script. Ideally, I would love something similar to the way SQL scripts can be used to create a SQL database.
Is this possible at all? Is there anything that would leverage the SQL scripts I already have? I want to create the same database structure as my SQL database.
Let me know if you...
I want to create a polymorphic structure that can be created on the fly with minimum typing effort and be very readable. For example:
a.b = 1
a.c.d = 2
a.c.e = 3
a.f.g.a.b.c.d = cucu
a.aaa = bau
I do not want to create an intermediate container such as:
a.c = subobject()
a.c.d = 2
a.c.e = 3
My question is similar to this one:
http...
I search for a round-trip programming solution which does generate PHP and SQL code from a UML Model
It sould also include state and activity diagrams which were compiled into PHP/SQL.
Or does someone know some software who offers the possibility to create my own PHP / UML interpreter?
thanx in advance
...