|
did you visit the website? RTFD.
Yusuf
|
|
|
|
|
Yes, i install the imagemagick.exe et Ghostscript.exe, but i don't know how i excuste the 3 intructions, thank you verry mutch.
|
|
|
|
|
|
I must use MS-dos to excute the command? i use programe in c#, i have install the two exe, but i don't know how proced to convert, please help me, thank you verry mutch
|
|
|
|
|
yes it is seperate executable. you can start a process from within C# application
see documentation for ProcessStartInfo and Process
Yusuf
|
|
|
|
|
i have found the first instruction convert.exe in directory C:\ImageMagick-6.4.9-Q16\Convert.exe, but others i don't find, where i can find the two last instruction?
Thank you verry mutch.
|
|
|
|
|
It appears that you're too stupid for this task. If this is paid work, you are a thief. If it's homework, talk to your teacher. If it's your own project, buy a damn book and read it, and start with reasonable tasks.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
It reminds me that, longtime ago I took TCP/IP (Networking) programming class.
The instructor gave us a FULLY working code, and explicitly told what line of code to change and how to change it. The only hard part was, he gave a printed out paper and asked us to type it. His thought was as the students type it, they will understand the code.
The next week, about 50% of the class could not do it . literally his jaw fell to the floor. I don't understand why even they go to school.
Yusuf
|
|
|
|
|
In my year 11, our maths teacher gave us the exam and said, this is it. I will just change the numbers on the day. We were able to spend a month in class doing this exam, asking him questions. The exam was out of 120, and if you got 100-120 out of 120, you got 100%. You had a 20 point leeway. A lot of kids still failed. So, people have been dumb for a long time.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Here in Massachusetts, In the late 90's students were required to pass Comprehensive Standard Test in order to graduate high school.
The first year they had a pilot test, many students failed the exam. There were (and still are) many schools with large number of students who fail the test. A local newspaper published school by school test results and someone brought the paper to work. We were going through the list, which was very grim.
One of the senior engineers ( he was a bit old too ) laughed hysterically and then said, "I am so happy, this test result tells me my job is secured for life. I don't feel threatened by this kids coming off school and taking my position."
very sad, but true
Yusuf
|
|
|
|
|
abbd wrote: where i can find the two last instruction?
what instructions?
Look, before you start implementing something, give it sometime and RTFD. It is well documented. Before you start working on your C# application, interact with ImageMagick from the command line. Once you figured out everything you need then start coding.
If you have specific question, I am sure will find it in the documentation.
Yusuf
|
|
|
|
|
Hello,
It work, so how we add the quality of picture
Help me please, thank you verry mutch.
|
|
|
|
|
hello,
i try for -resize, but the quality is bad, please help me to have a best quality on transformation, thank you verry mutch.
|
|
|
|
|
Hi,
I have a datagrid and I want to populate it from the tables in MS Access. Also I want to get the combination of different columns from the 3 Tables and populate them by providing my own column names in DATA GRID.
I will be very thankful to you in this regards,
I am in need of it sooner please help...
Haroon
|
|
|
|
|
Connect to the database and get data into a dataset. All you need is a query to get the data from all the tables into one. (I am suspecting Union or join like scenario here.)You do have options of having your own column names. A bit of search in the documentation will help you.
Time is the best teacher; unfortunately it kills all of its students.
जय हिंद
|
|
|
|
|
Thanks..but I am not very expert and quick on wat y mentioned...Can you pls be more in steps if possible?
Regards,
|
|
|
|
|
There's an article here[^] about Microsoft Access and C#, featuring a loadDataGrid method.
Enjoy
I are troll
|
|
|
|
|
|
I am developing an application on Win mobile 5.0 emulator in C# using Visual studio 2008.
Can anyone let me know how to write an SQL statement in C# which returns the row count?
Is the parameter required to store the count value?
I will be greatefull if someone helps with the code snippet for the same.
I have tried the following code for the select statement(the select stmt does not return the row count value) and is working fine.
String uname_in='abc';
SqlCeConnection conn;
SqlCeCommand comm;
SqlCeDataAdapter adap = new SqlCeDataAdapter();
String connstring = @"Data Source=Program Files\signup\signupdb.sdf";
conn = new SqlCeConnection(connstring);
conn.Open();
comm = new SqlCeCommand();
comm.Connection = conn;
comm.CommandText = "select * from signuptbl where username =@uname";
SqlCeParameter para = new SqlCeParameter();
para.ParameterName = "@uname";
para.Value = uname_in;
comm.Parameters.Add(para);
adap.SelectCommand = comm;
System.Data.DataTable dt = new DataTable();
ap.Fill(dt);
psw1 = dt.Rows[0][1].ToString();
What changes should be done in the above code for writing a select stmt the return the number of rows selected?
thanks in advance 
|
|
|
|
|
Deepali Khalkar wrote: the select stmt does not return the row count value) and is working fine.
So, what you saying is the code works fine but your didn't get any rows returned
Deepali Khalkar wrote: comm.CommandText = "select * from
signuptbl where username =@uname";
What changes should be done in the above code for writing a select stmt the return the number of rows selected?
your select statement looks fine. And you mentioned it works. there is a condition on your statement
where username =@uname";
may be you don't have data that satisfied your condition.
Yusuf
|
|
|
|
|
Greetings,
I am developing an application that reads a DES encrypted password generated using Java in a properties file and decrypts it, using DESCryptoServiceProvider. I am provided with the key string originally generated with Java using DES.
Does anyone have an example or sample code that converts/uses a Java generated key to decrypt a Java generated password in C#? After removing the dashes, I get the "Specified key is not a valid size for this algorithm" exception.
I've tried both of these lines of code and get the same error:
static byte[] key = ASCIIEncoding.ASCII.GetBytes(dashKey.Replace("-", ""));
OR
static byte[] key = Encoding.ASCII.GetBytes(dashKey.Replace("-", ""));
The error occurrs at either of the below lines of code I tried:
cryptoProvider.Key = key;
OR
ICryptoTransform decryptor = cryptoProvider.CreateDecryptor(key, iv);
Thanks,
Karl
|
|
|
|
|
Have you tried with different CipherMode s?
Are you sure you are not removing to many dashes?
Calin
|
|
|
|
|
I figured it out. The key needed to be converted into an 8 byte array.
public static byte[] toBytes(string text)
{
char[] dash = { '-', '\n', '\r' };
String[] values = text.Split(dash);
byte[] keyArray = new byte[8];
for (int i = 0; i < values.Length; i++)
{
int elem = Convert.ToInt32(values[i]);
elem = elem & 0x00FF;
keyArray[i] = (byte)elem;
}
return keyArray;
}
Thanx,
Karl
|
|
|
|
|
Hello all,
Could anyone tell me how to setup orientation to landscape, and datetime , and tabname in footer when user print the excel sheet by default. i am sending my excel code.Could any one tell what i need to do i search in google but no luck I need In C#.
public static void excelprint(DataSet source, string fileName)
{
bool status = false;
try
{
System.IO.StreamWriter excelDoc;
excelDoc = new System.IO.StreamWriter(fileName);
const string startExcelXML = "<xml version>\r\n<Workbook " +
"xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n" +
" xmlns =\"urn:schemas-microsoft-com:office:office\"\r\n " +
"xmlns:x=\"urn:schemas- microsoft-com:office:" +
"excel\"\r\n xmlns:ss=\"urn:schemas-microsoft-com:" +
"office:spreadsheet\">\r\n <Styles>\r\n " +
"<Style ss:ID=\"Default\" ss:Name=\"Normal\">\r\n " +
"<Alignment ss:Vertical=\"Bottom\"/>\r\n <Borders/>" +
"\r\n <Font/>\r\n <Interior/>\r\n <NumberFormat/>" +
"\r\n <Protection/>\r\n </Style>\r\n " +
"<Style ss:ID=\"BoldColumn\">\r\n <Font " +
"x:Family=\"Swiss\" ss:Bold=\"1\"/>\r\n </Style>\r\n " +
"<Style ss:ID=\"StringLiteral\">\r\n <NumberFormat" +
" ss:Format=\"@\"/>\r\n </Style>\r\n <Style " +
"ss:ID=\"Decimal\">\r\n <NumberFormat " +
"ss:Format=\"0.00\"/>\r\n </Style>\r\n " +
"<Style ss:ID=\"Integer\">\r\n <NumberFormat " +
"ss:Format=\"0\"/>\r\n </Style>\r\n <Style " +
"ss:ID=\"DateLiteral\">\r\n <NumberFormat " +
"ss:Format=\"mm/dd/yyyy;@\"/>\r\n </Style>\r\n " +
"</Styles>\r\n ";
const string endExcelXML = "</Workbook>";
int rowCount = 0;
int sheetCount = 1;
excelDoc.Write(startExcelXML);
for (int worksheet = 0; worksheet < source.Tables.Count; worksheet++)
{
excelDoc.Write("<Worksheet ss:Name=\"" + source.Tables[worksheet].TableName + "\">");
excelDoc.Write("<Table>");
excelDoc.Write("<Row>");
for (int x = 0; x < source.Tables[worksheet].Columns.Count; x++)
{
excelDoc.Write("<Cell ss:StyleID=\"BoldColumn\"><Data ss:Type=\"String\">");
excelDoc.Write(source.Tables[worksheet].Columns[x].ColumnName);
excelDoc.Write("</Data></Cell>");
}
excelDoc.Write("</Row>");
for (int x = 0; x < source.Tables[worksheet].DefaultView.Count; x++)
{
rowCount++;
if (rowCount == 64000)
{
rowCount = 0;
sheetCount++;
excelDoc.Write("</Table>");
excelDoc.Write(" </Worksheet>");
excelDoc.Write("<Worksheet ss:Name=\"Sheet" + worksheet + "\">");
excelDoc.Write("<Table>");
}
excelDoc.Write("<Row>"); //ID=" + rowCount + "
for (int y = 0; y < source.Tables[worksheet].Columns.Count; y++)
{
System.Type rowType;
rowType = source.Tables[worksheet].DefaultView[x][y].GetType();
switch (rowType.ToString())
{
case "System.String":
//string XMLstring = x[y].ToString();
string XMLstring = source.Tables[worksheet].DefaultView[x][y].ToString();
XMLstring = XMLstring.Trim();
XMLstring = XMLstring.Replace("&", "&");
XMLstring = XMLstring.Replace(">", ">");
XMLstring = XMLstring.Replace("<", "<");
excelDoc.Write("<Cell ss:StyleID=\"StringLiteral\">" +
"<Data ss:Type=\"String\">");
excelDoc.Write(XMLstring);
excelDoc.Write("</Data></Cell>");
break;
case "System.DateTime":
// DateTime XMLDate = (DateTime)x[y];
DateTime XMLDate = (DateTime)source.Tables[worksheet].DefaultView[x][y];
string XMLDatetoString = "";
XMLDatetoString = XMLDate.Year.ToString() +
"-" +
(XMLDate.Month < 10 ? "0" +
XMLDate.Month.ToString() : XMLDate.Month.ToString()) +
"-" +
(XMLDate.Day < 10 ? "0" +
XMLDate.Day.ToString() : XMLDate.Day.ToString()) +
"T" +
(XMLDate.Hour < 10 ? "0" +
XMLDate.Hour.ToString() : XMLDate.Hour.ToString()) +
":" +
(XMLDate.Minute < 10 ? "0" +
XMLDate.Minute.ToString() : XMLDate.Minute.ToString()) +
":" +
(XMLDate.Second < 10 ? "0" +
XMLDate.Second.ToString() : XMLDate.Second.ToString()) +
".000";
excelDoc.Write("<Cell ss:StyleID=\"DateLiteral\">" +
"<Data ss:Type=\"DateTime\">");
excelDoc.Write(XMLDatetoString);
excelDoc.Write("</Data></Cell>");
break;
case "System.Boolean":
excelDoc.Write("<Cell ss:StyleID=\"StringLiteral\">" +
"<Data ss:Type=\"String\">");
//excelDoc.Write(x[y].ToString());
excelDoc.Write(source.Tables[worksheet].DefaultView[x][y].ToString());
excelDoc.Write("</Data></Cell>");
break;
case "System.Int16":
case "System.Int32":
case "System.Int64":
case "System.Byte":
excelDoc.Write("<Cell ss:StyleID=\"Integer\">" +
"<Data ss:Type=\"Number\">");
// excelDoc.Write(x[y].ToString());
excelDoc.Write(source.Tables[worksheet].DefaultView[x][y].ToString());
excelDoc.Write("</Data></Cell>");
break;
case "System.Decimal":
case "System.Double":
excelDoc.Write("<Cell ss:StyleID=\"Decimal\">" +
"<Data ss:Type=\"Number\">");
// excelDoc.Write(x[y].ToString());
excelDoc.Write(source.Tables[worksheet].DefaultView[x][y].ToString());
excelDoc.Write("</Data></Cell>");
break;
case "System.DBNull":
excelDoc.Write("<Cell ss:StyleID=\"StringLiteral\">" +
"<Data ss:Type=\"String\">");
excelDoc.Write("");
excelDoc.Write("</Data></Cell>");
break;
default:
throw (new Exception(rowType.ToString() + " not handled."));
}
}
excelDoc.Write("</Row>");
}
excelDoc.Write("</Table>");
excelDoc.Write(" </Worksheet>");
}
excelDoc.Write(endExcelXML);
excelDoc.Close();
status = true;
// MessageBox.Show("Data exported to excel file successfuly");
}
catch (Exception)
{
status = false;// MessageBox.Show("Error in exporting data to excel file");
}
}
|
|
|
|
|
Hi
I want to use Transactions with TableAdapter class which visual studio dataset designer create for each database objects (tables,...).
i found this article to do this : http://blah.winsmarts.com/2006/06/18/the-definitive-tableadapters--transactions-blog-post.aspx[^]
now u can use transactional tableAdapter like this :
CustomersTableAdapter tableAdap = new CustomersTableAdapter() ;
SqlTransaction tableAdapTran = null ;
SqlConnection tableAdapConn = null ;
try
{
tableAdapConn = tableAdap.OpenConnection() ;
tableAdapTran = tableAdapConn.BeginTransaction() ;
tableAdapTran.Commit() ;
}
catch (Exception)
{
tableAdapTran.Rollback() ;
}
finally
{
tableAdapConn.Close() ;
}
this works fine when u want working with a one TableAdapter. for multuple tableAdapters, u need extend each tableAdapter class for supporting Transactional operation.
In my scenario : i'm dealing with multiple tables (insert,update or delete to/from multiple tables) within a single transaction and i think above method does not correct for this operation. look at this code sample :
CustomersTableAdapter tableAdap = new CustomersTableAdapter() ;
SqlTransaction tableAdapTran = null;
SqlConnection tableAdapConn = null;
OrdersTableAdapter ordersAdapter = new OrdersTableAdapter();
SqlTransaction ordersAdapterTran = null;
SqlConnection ordersAdapterConn = null;
try
{
tableAdapConn = tableAdap.OpenConnection();
tableAdapTran = tableAdapConn.BeginTransaction();
ordersAdapterConn = ordersAdapter.OpenConnection();
ordersAdapterTran = ordersAdapterConn.BeginTransaction();
tableAdapTran.Commit();
}
catch (Exception)
{
tableAdapTran.Rollback();
}
finally
{
tableAdapConn.Close();
}
can anybody help me about this issue ?
Note : i don't want to use TransactionScope class.
thanks
modified on Tuesday, March 3, 2009 11:56 AM
|
|
|
|