|
Topic is "Lunisolar calendar function and for the Farsi speaking world deaths"
the text in the message is "To view this component and how can I see the site"
I have no idea myself.
|
|
|
|
|
This site is aimed at an English audience, and this is hardly advertising. It may even have a reverse effect, as it frustrates the hell out of people.
Your site looks good actually, and you've got a nice list of features there. Have you considered hiring trainees to translate your site and product? You target-audience could grow quite big
--edit--
Removed sig. Said "start learning English", but it translated back to "parasitic". That didn't make it sound like good advice anymore.
My apologies.
|
|
|
|
|
hi, MyFrinds.
Please Help me!
Read my Source Code :
{
...
System.Threading.Thread lengthyprocessthreadanbar =
new System.Threading.Thread(new
System.Threading.ThreadStart(RunLengthyProcessanbar));
lengthyprocessthreadanbar.IsBackground = true;
lengthyprocessthreadanbar.Start();
_pleasewaitdlg = new Anbar_PleaseWait();
_pleasewaitdlg.ShowDialog();
...
}
void RunLengthyProcessanbar()
{
SetupForm();
_pleasewaitdlg.shouldclosenow = true;
}
private void SetupForm()
{
SqlConnection cnA = new SqlConnection("ConnectionString...");
SqlCommand cmA=new SqlCommand ();
cmA.Connection = cnA;
cmA.CommandText = "Command Text ...";
int RowActive = 0;
if (cnA.State != ConnectionState.Open) cnA.Open();
SqlDataReader readA = cmA.ExecuteReader();
while (readA.Read())
{
dgvAnbar.Rows.Add(1);
dgvAnbar.Rows[RowActive].Cells[0].Value =
readA[0].ToString();
}
cnA.Close();
}
www.ggsoft.ir
mohsen5459@gmail.com
Thanks.
Welcome Mohsen Sabzaliyan
|
|
|
|
|
I read it!
I hope you feel better now!
Just as a comment I will use 'using' at the top of the file, so as to avoid long.class.name, will use shorter variable name with upper case at the top of each word.
That will increase readability which, in turn, will make the code easier to: understand / debug / maintain!
also I will use the other using to dispose of disposable resouce as is:
using(SqlConnection cnA = new SqlConnection("ConnectionString..."))
{
......
}
this is a lighter syntax than try {} finally {} which makes sure that disposable resource are disposed even in case of exception or misplaced return statement!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
|
|
hi
add this line to main function to disable CrossThread checks:
Control.CheckForIllegalCrossThreadCalls = false;
like this:
static class Program
{
[STAThread]
static void Main()
{
Control.CheckForIllegalCrossThreadCalls = false;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
|
|
|
|
|
And wait for the app to die at some point? These are 'illegal' cross thread calls and the warning is thown for a reason!
Removing the check just stops that, but doesn't solve the underlying problem. It's easy to fix so that the control is invoked when necessary.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Check out Luc's article here[^]
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
http://javaflowswithin.blogspot.com/2010/03/c-threadsafecontrol.html
|
|
|
|
|
How can I create a named range in a C# excel report for cells that aren't lined up next to eachother?
I've seen examples on how to create a named range for consecutive cells (i.e. A1:M1), however the cells I need to name are scattered throughout the report (i.e. A1, H3, J9, S17, etc).
In excel, I could just do this by holding CTRL + click, but how can I do this in c#?
Thanks.
|
|
|
|
|
You can Create list of Range insted
List<Range> myrng = new List<Range>(20);
myrng.Add(excelWorksheet.get_Range("A1", "B3"));
and for one cell use Range like this:
Range rng1 = excelWorksheet.get_Range("A1", "A1");
then set property of each in loop
|
|
|
|
|
hi
sorry this is a reposting , but im in need od solution ASAp.
i need to find a way to know which application/process is using my com1 port.
|
|
|
|
|
I think you're being quite rude - so why should you get help ? If people dont answer your question, its generally becuase
a) the way you asked it - using 'asap' for example was incorrect
b) they dont know the answer
c) they are too busy to respond right now (there are very few full time staff on CP, mainly editorial, not content) - the rest of us inmates are volunteers who have jobs elsewhere !
So in future, watch how you ask the question and try to be a little self sufficient. fwiw, You can use the process explorer tool from SysInternals (now owned by Microsoft) to search for open handles. In this case you would want to search for 'Serial' since it uses device names that may not map to com port numbers. (e.g. COM1 is \Device\Serial0 on my system).
Sysinternals also have a tool called 'portmon', but I think that has to be running before anything (else) access the com port.
http://technet.microsoft.com/en-us/sysinternals/bb795533.aspx[^]
That information comes to you via Google - so if you had done a little work on your own you'd probably have had the answer by now ....
'g'
|
|
|
|
|
Im soo sorry about that, i was a bit stressed out about my work....thanks garth for your answer.
but i cannot download any of these softwares...ive got to write a program to find it
thanks so much
ani
|
|
|
|
|
cant download from MS Technet ? I'd tell someone at your work to pull their head out of their butt and allow the access so you can get the tools you need to do the job
aniarun wrote: ive got to write a program to find it
yeah, its called a browser, and MS have done it already ! you shouldnt have to write a downloader ... gawd, I often think I have a tough life !
'g'
|
|
|
|
|
thanx garth
ya, i meant that i have to write a program to find the praocess which is using my port lol.
man makes hisife hard :P
good luck
|
|
|
|
|
Why can't you download the software you need to do your job? That's ridiculous!
If you'd like to have portmon, click the 'email' link and let me know. If I can download it I'll be happy to email it to you. That should get past any work-imposed download blocks, assuming they're not monitoring your emails, too. Of course, if your boss demands that you write it, this won't do you much good... But we can try.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Hi thanks for that but im in need of writing one
what is \\Device\\serial0 is it the device name?? how do i know the name of it on a unknown machine(that is if i duno the available ports. my laptop gave me \\Device\\winachsf0)
thank you soo much
|
|
|
|
|
I'm not sure what that means, other than it is most likely the Windows internal name for the first serial port on the machine. You might find it beneficial to spend some time researching device driver development on MSDN. I don't know how much information is available there, but MSDN often contains a lot of clues about internal workings of the Windows system. If you can find them, of course. Try Google first.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
I am creating a web service that will be called from a console application. I am having trouble creating objects in the console application in order to pass them to the web service.
I have Classes in the Web Site project that are similar to the following:
public class Product
{
//other product details
}
public class SubProduct : Product
{
//subproduct details
public innerObject io;
}
public class innerObject
{
//object details
}
The web service contains a function:
[WebMethod]
public string LoadProduct(Product[] p)
{
//does stuff here
if (p is SubProduct)
{
//do stuff specific to subproduct objects.
}
}
I want the console application to create an array of products and pass it to the web service. Each product in the array could be of type Product or SubProduct. The problem I am encountering is that SubProducts and the innerObject types are not a recognized or accessible in the console application. It seems like all that is imported from the web reference to the web service are the objects types that are listed in the parameter list of the web service methods.
Does anyone know how I can make the SubProduct and innerObject classes accessible from the web service code?
thanks.
|
|
|
|
|
Check the wsdl file to see if there are any additional attribute tags specified on SubProducts.
Note: A WSDL file can be viewed by entering the web service path followed by ? and wsdl (e.g. www.site.com/webmethod?wsdl).
There's nothing left in my right brain and nothing right in my left brain. |
|
|
|
|
|
Hey guys
I had this at the quick answers section but I'm moving it here cause this is more of a discussion than a particular problem.
I've only recently started looking at the .Net asynchronous programming model and I feel that I more or less get the concept. I've started throwing together a server & client that works more or less... But stress testing it yielded very strange results. I think there's something to this asynchronous model that I don't see
By stress testing I mean I have a single client(when this works I'll do the same with multiple clients) that sends plain text messages in an infinite loop. The loop has a counter so each message looks like this: 1: My plain text message \r\n[char 3] , [char 3] being the packet terminator.
I have a 2nd client that receives the messages and just appends them to a TextBox.
Notes:
0) I am using TCP so the packages are guaranteed, right?
1) The server, for now, is just an echo server... I takes a message and sends it to every
connected client except the one it originated from
2) All 3 apps are done using the asynchronous model
Now when I run all these apps I get very strange results as mentioned before. I see packet 1, 2, 3, 27, 127. Then much later on ill see packet 9 appearing after packet 20000 for example. Some packets are missing characters and some are repeated several times. Quite often the client moans that the server forcibly closed the connection...
Nagy Vilmos answered my quick answers question and said
Nagy Vilmos wrote: If you are expecting high volume then the first thing to do is make sure your receiver takes the data off the inbound queue PDQ and puts it onto a call stack that you manage on a different thread.
A regular mistake is to process data directly from the TCP/IP pipe and expext the world to be sunny.
I really hope he sees this cause I'd like to pick his brain! But if not perhaps someone else can clarify...
By make sure your receiver takes the data off the inbound queue PDQ and puts it onto a call stack that you manage on a different thread I think he means to NOT process the data in the DataReceivedCallBack... Which makes sense I guess, cause while im processing a piece of data, 20 other pieces arrived and somewhere along the line something HAS to give in... can someone confirm this assumption?
He also mentions to put it in a call stack and process it on a different thread... So I'm assuming he means to just dump it in some variable to get it out of the read buffers as not to clog them and process it later... can someone confirm this assumption? An example would be nice, and I'm after efficiency, this server and the client code needs to be very scalable so please bare that in mind.
Another thing I was pondering was the read buffer sizes... How big do i make them? As far as i can see a small buffer would maybe need to make 5 or 6 callbacks(for arguments sake) for a single packet and callbacks are expensive so performance is lost. A Big buffer wont be fully utilized so alot of ram will be wasted. So the sweet spot would be to figure out how big your largest packet might be and make the read buffer that size...Once again I'm assuming all of this so if someone could confirm it that would rock.
I've googled high load tcp servers & clients in C# but I cant seem to find an article that explains it completely... Most of the time it just explain the .Net asynchronous programming model.
If someone could share some knowledge, experiences, tips, links to good articles or anything i would be really greatful. I really want to understand this and not just copy and paste some code.
Thanks for taking the time to read this, if you read this far you r0ck \m/
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
I am new to C# and VS2008. I am trying to create a report with a subreport. I have searched Google not to find a good example of how to create a report with a subreport. Does anybody have a good link for showing an example of this?
Thanks!
sk
|
|
|
|
|
I have a form (form1.cs) that sends a transaction record variable (TranRec) to a program (Transporter.cs) by calling it using Transporter.ConnectToDMV(TranRec);.
Transporter.cs does what it needs to do and returns to form1.cs for the user to enter and submit another transaction. Here's part of the Transporter.cs code.
Transporter.cs
public partial class Transporter
{
public static void ConnectToDMV(string TranRec)
{ rest of code processing TranRec ...
What I also need Transporter.cs to do is return a variable (logLU) back to form1.cs. For this I am using the following code;
Transporter.cs
Form1 aForm = new Form1();
aForm.SetValue(logLU);
form1.cs
public void SetValue(string luValue)
{
logLU = luValue;
// for testing purposes
MessageBox.Show("Here's the value of (form1)luValue: " + luValue);
MessageBox.Show("Here's the value of (form1)logLU: " + logLU);
}
I can see both variables in the messageboxes so I know logLU gets to form1.cs but then it returns to null when I need it in other parts of form1.cs. What am I missing??? Similar code works in other parts of my program but not here. BTW, I'm a newbie to C# and this is my first application.
Any advise will be very much apprecaited.
|
|
|
|