When a user clicks a button I need to create a .bmp file on the server. After the .bmp file is created I will load it into the html page. Would Ajax be the best way to accomplish this?
Is it possible via script/tool to generate a delete statement based on the tables fk relations.
i.e. I have the table: DelMe(ID) and there are 30 tables with fk references to its ID that I need to delete first, is there some tool/script that I can run that will generate the 30 delete statements based on the FK relations for me ?
(btw I know about cascade delete on the relations, I can't use it in this existing db)
I'm using Microsoft SQL Server 2008
Where do you get the best in-depth information for C# programming? I'm looking for tutorials, examples, blogs, specialized forums etc. dedicated to c#.
Can anyone please suggest some good C++ coverage tool. I am basically looking tool that really works fine when it comes to unit testing. The tool should work in the linux environment
Hey, take this as a challange, my informatics professor made it in less than 10 rows, it work perfectly and its very efficient. I'd like to "surprise" him giving a better/shorted version of it. Ofcourse i wouldn't take the credits, hah, u can trust in me.
It's a simple anagras finder! If you can.. write it in c++! thanks!
I have 40+ TextViews and I want to add click events on them, but I try to do it "shortly" :
final GridLayout myGL;
myGL = (GridLayout) v0725.findViewById( R.id.tab1 );
for( int i = 0; i < myGL.getChildCount(); i++ )
if ( getResources().getResourceEntryName(((TextView) myGL.getChildAt(i)).getId()).indexOf("v")==0 ) {
((TextView) myGL.getChildAt(i)).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Log.v("edf", getResources().getResourceEntryName(((TextView) myGL.getChildAt(i)).getId()));
}
});
};
But Eclipse stops me on the Log.v line, because i should be final (but I can't)
any tips?
i want to upload an excel file from the client to the server using asp .then it shud check the field name of the file with the oracle database table and then save its content in the database.
can somebody help me with this....??
In Java, I want to download some data asynchronously in a Thread (or Runnable) object, and have the Thread put it's data into an Object I've declared within my main Thread.
How could I do this please?
Can this be shortened/improved? I'm trying to make a password checker in python.
Could the if's be put into a for loop? And if so, how?
pw = input("Enter password to test: ")
caps = sum(1 for c in pw if c.isupper())
lower = sum(1 for c in pw if c.islower())
nums = sum(1 for c in pw if c.isnumeric())
scr = ['weak', 'medium', 'strong']
r = [caps, lower, nums]
if len(pw) < 6:
print("too short")
elif len(pw) > 12:
print("too long")
if caps >= 1:
if lower >= 1:
if nums >= 1:
print(scr[2])
elif nums < 1:
print("your password is " + scr[1])
elif lower < 1:
print("your password strength is " + scr[0])
elif caps < 1:
print("your password strength is " + scr[1])
Thanks for any suggestions :D
I need to generate a string of 7 chars that is based on the id of the row. So knowing the id of the image and a secret key, i should get the generated string.
the string must contain chars from "a" to "z" and numbers from 0 to 9.
I have a dir that contains photos like this
dir/p3/i2/s21/thumb.jpg
the generated string is p3i2s21, then is used to calculate the path of the image.
#include<stdio.h>
#include<math.h>
int main ()
{
FILE *fp;
fp=fopen("output","w");
float t,y=0,x=0,e=5,f=1,w=1;
for (t=0;t<10;t=t+0.01)
{
if( y==inf && y== nan)
break;
fprintf(fp,"%lf\t%lf\n",y,x);
y = y + ((e*(1 - x*x)*y) - x + f*cos(w*t))*t;
x = x + y*t;
}
return (0);
}
why is the ouput giving infinite and NAN values?
Hi,
The title says it all. But I don't know if I should go for static methods, just a header, a class, or something else?
What would be best practice? But, I don't want to have an instance of a utility class.
I want to add functions like:
Uint32 MapRGB (int r, int g, int b);
const char* CopyString(const char* char);
// etc. You know: utility methods...
Public Class A
{
public A()
{
system.out.println("con call");
}
static
{
system.out.println("static call");
}
{
system.out.println("ins call");
}
Public static void main(string[] args)
{
new A();
new A();
}
What is the "computer science" term for the practice of assigning a special meaning to one of a type's values. For example a numeric variable called "amount_to_transfer" where the special value "0" means "entire account balance" or a date value "spouse_date_of_birth" where "1/1/1800" means "unmarried".
I happen to feel that this is quite a bad "smell", but I'd like to have a name for it, and if possible, some blog post or article about why it's bad and how to fix it.
Given a generic type, including List, Nullable how do i get a generic name for C#?
var t = typeof(Nullable<DateTime>);
var s = t.GetGenericTypeDefinition().Name + "<" + t.GetGenericArguments()[0].Name + ">";
This yields
"Nullable`1<DateTime>"
, but i need
"Nullable<DateTime>"
.
I expect it should share a common description, like XmlSchema or IDL and should generate classes for target language.
I found Thrift and it's really nice solution, but it doesn't support structures polymorphism.
I would like to have collections of base class objects, where I could place instances of subclasses, serialize this and deserialize at the opposite side. Some mechanism of polymorphic behavior support, like Visitor, would be a perfect.
Does anybody know something suitable for these requirements?
I'm trying to decide if upgrading is viable given all the libraries we are using. The problem is some of these plugins arent being developed anymore so I'm not sure which of them is compatible with 1.4
Any thoughts on how to best approach this given legacy dependencies on older plugins?
hi, i've got two lists A and B, B = A + C - D. All elements are unique, no duplicates. How do i get the lists of:
(1) the new items added, C
(2) the old items removed, D
C and D aren't more than 10000 elements or so.