|
It sounds like the resource classes and the remoting classes should be independent of one another. When the service starts it can create and manage whatever resources it's designed to manage and then use remoting simply as a message channel that clients can use to connect and issue commands to the service.
|
|
|
|
|
Hello,
I need to produce Hammersley sequence for n-dim in C#. Does anyone have any expertise?
Thanks
|
|
|
|
|
|
Hi all,
I want to calculate the homography assuming i have 4 points in the original image and 4 points in the resulted image.
x' = xH where x' is the points in the resulted image, H is the homography and x is points in the original image. Please help! Thanks!
|
|
|
|
|
What are points (in this context), what's the function, what have you tried so far?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I am trying to distort the image to my preference. In this case, the points are simply (x1,y1) to (x4,y4). These points will be mapped to my preferred points. Hence calculating the Homograph. The problem here is I couldn't get the 3x3 Homograph.
|
|
|
|
|
|
Take a look at this, particularly slide 14. The effect I hope to get is the same as the ppt provided.
www.csd.uwo.ca/courses/CS837b/lectures/cs837_lec03_mosaic.ppt
Thanks.
|
|
|
|
|
I haven't seen an article here at CP that does this sort of thing (which doesn't mean it doesn't exist). Basically you could pick any image warping algorithm and modify it in a way that does the image retification thing.
I don't have any samples, though
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
As the presentation explains rather well, there are two ways to solve this:
- analytically (slides 15-20), which is fine in a perfect world;
- by optimization, e.g. least square approximation, (slides 21-23) which is best if the input isn't very accurate.
It will take some math and some programming skills to create a working solution.
I don't know an out-of-the-box solution. Google may know one.
|
|
|
|
|
yup, tried that. somehow somewhere it goes wrong. i'm not very expert in c#. hence, required some help any expert willing to help?
Thanks!
|
|
|
|
|
The problem can be programmed in any language you choose; there is nothing particular about it that makes it a better or worse fit for C#.
You could visit Jeffrey Martin's web site and find his contact info there. I trust he has code in whatever language that solves it.
|
|
|
|
|
I'm not sure how to help you without just doing all the work for you. You've provided a ppt that has all the maths you need. If you can't work out how to turn this math into code, then I guess this is beyond you for now. But, it's really pretty easy, you just need to sit down and think it through.
If you posted your code, I'd be happy to look at it and compare it to the algorithm provided.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i m trying to configure db in remote server through C# , locally it is configuring but in Remote Server db is is not creating. Following is the code
public bool createDB(object sServerName, String sDBName,object sAdminUname,object sAdminPwd)
{
object objServerName;
objServerName = sServerName;
SQLDMO.SQLServer gSQLServerDMO = new SQLDMO.SQLServer();
SQLDMO.Database nDatabase = new SQLDMO.Database();
SQLDMO.DBFile nDBFileData = new SQLDMO.DBFile();
SQLDMO.LogFile nLogFile = new SQLDMO.LogFile();
try
{
gSQLServerDMO.Connect(objServerName, sAdminUname, sAdminPwd);
nDatabase.Name = sDBName;
nDBFileData.Name = sDBName;
nDBFileData.PhysicalName = gSQLServerDMO.Registry.SQLDataRoot + "\\DATA\\" + sDBName + "_Data.mdf";
nDBFileData.PrimaryFile = true;
nDBFileData.Size = 2;
nDBFileData.FileGrowthType = SQLDMO.SQLDMO_GROWTH_TYPE.SQLDMOGrowth_MB;
nDBFileData.FileGrowth = 1;
//Adding DBFile object
nDatabase.FileGroups.Item("PRIMARY").DBFiles.Add(nDBFileData);
nLogFile.Name = sDBName + "_Log";
nLogFile.PhysicalName = gSQLServerDMO.Registry.SQLDataRoot + "\\DATA\\" + sDBName + "_Log.ldf";
nLogFile.Size = 2;
nDatabase.TransactionLog.LogFiles.Add(nLogFile);
gSQLServerDMO.Databases.Add(nDatabase);
return true;
}
catch (Exception sqlDBException)
{
String errSqlDBexception = sqlDBException.Message;
return false;
}
finally
{
gSQLServerDMO.DisConnect();
}
}
//Section for creating the database login and user in the above created Database.//
public bool Createdatabaselogin(String sDataSource, string databsename, String sScriptName, String sUserId, String sPwd, string loginName, string loginpass)
{
try
{
string sqlConnectionString = "Data Source=" + sDataSource + ";Initial Catalog=" + databsename + ";USER ID=" + sUserId + "; PWD=" + sPwd + ";Persist Security Info=True";
SqlConnection conn = new SqlConnection(sqlConnectionString);
Server server = new Server(new ServerConnection(conn));
string sqlquerylogin = "EXEC sp_addlogin '" + loginName + "','" + loginpass + "'";
string sqlqueryuser = "EXEC sp_adduser '" + loginName + "','" + loginName + "','db_owner'";
if (!server.Logins.Contains(loginName))
{
server.ConnectionContext.ExecuteNonQuery(sqlquerylogin);
}
server.ConnectionContext.ExecuteNonQuery(sqlqueryuser);
return true;
}
catch (Exception ex)
{
String error_str = ex.ToString();
return false;
}
}
What is wrong in this , can anyone suggest some idea?
|
|
|
|
|
hi friends
how to get current console application path
thanks
|
|
|
|
|
l.laxmikant wrote: how to get current console application path
That is very vague. Are you looking for the startup directory or the current working directory? The latter can be found in the Environment class.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Environment.CurrentDirectory
Environment.CommandLine
Simon
|
|
|
|
|
I have A query From Which I Want To Seperate Columns And Values
I Had Written Code For This.
My Query------
Insert Into DEPARTMENT_MASTER(DPM_ID,DPM_CM_COMP_ID,DPM_BM_ID,DPM_NAME)
values(-2147483614,'2','2','abc,xyz')
Code:--------
//// string StrQue Contains Above Query////////////////////////
string StrQue=Query.ToUpper();
String[] Arr1 = Regex.Split(StrQue.Trim(), "INTO");
String[] Arr2 = Arr1[1].ToString().Split('(');
String[] Arr3 = Arr2[1].ToString().Split(')');
String[] Arr4 = Arr2[2].ToString().Split(')');
String[] ArrCol = Arr3[0].ToString().Split(',');
String[] ArrVal = Arr4[0].Split(',');
But With Above Code Problem Is That In ArrCol I am Getting Correct 4 columns but
In ArrVal I am Getting 5 Values because it is Spliting coma(,) from last
value('abc,xyz') Thats whay I am getting 5 Values but I want 4 Values.
Can anyone give me solution. Its urgent
Thanks,
|
|
|
|
|
You need to parse the string manually.
Use a for loop to iterate down every character in the string. Keep a track of all the characters parsed so far. Every time you hit a , character, store the characters parsed so far in your array, clear and continue. Set a flag to false when you encounter a ' character, and then ignore all , characters until you pass another ' character, when you can set the flag back to true again.
Simon
|
|
|
|
|
Thanks For Reply.
But Simon,What If my insert query contains 70 columns and their values in that case it become time taking process to process that query charater by character.
|
|
|
|
|
Firstly, it's really not going to be time consuming to parse a few hundred characters. Unless your parsing 10's of thousands just don't worry.
Secondly. Use a Regex like Christian says.
(That's better than my suggestion anyway)
Simon
|
|
|
|
|
ArifShaikh wrote: Can anyone give me solution. Its urgent
I just checked, and it turned out it's not urgent at all. But, if it was, then you'd think you'd do what I already told you, to use a regex to parse this string.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
Sorry i am not having code.
i want to develop a web page. in this i am designing one page with some fields.this field will be entered by the user.and this full format should save in pdf file and again it should disply online. please can any one help me.
i want the code in C#.Net.
thanks in advance,
kavita
|
|
|
|
|
You need to get a PDF library to help you generate the PDF file. ItextSharp[^] is one example. There are others out there if you google.
So you take the user input, you use ItextSharp to generate your PDF file, then you return it to the client for display.
Simon
|
|
|
|
|
Hello,
while inserting arabic value into mydatabse , i have to put N before each field value to help sql to handle arabic language, is it any properties to give to the table in sql and help me to not put an N before fields.
best regards
dghdfghdfghdfghdgh
|
|
|
|