|
You're right, thanks.
|
|
|
|
|
Thanks. I must admit this had me doubting myself and scratching my head.
This space for rent
|
|
|
|
|
If I were wiser, would I doubt you, or Marc, or Richard, or Luc, or OG, and others here, speak from profound knowledge+experience ?
I doubt it. I scratch my head often, but the right kind of doubt does not come.
cheers, Bill
«When I consider my brief span of life, swallowed up in an eternity before and after, the little space I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which know me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then.» Blaise Pascal
|
|
|
|
|
Bill, you should doubt everything I say.
Especially this.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I found a really great description of dotNet garbage collection in CLR via C#[^].
That book turned me around about automatic garbage collection. At least half a dozen times I said to myself something like "Hey, that's smart! I would never have thought of that if I were to manage the heap myself!" I used to be sceptical about automatic GC - now I am sceptical to those who claim they can do better themselves. It is like an optimizing compiler vs. assembly code: The optimizer will discover a lot of tricks that the assembler coder wont.
The only problem remaining now is that you believe that you have removed the last reference to that 1 Gbyte data structure, and you are waiting for ages for it to go away, forgetting that you still have a reference to it in some static struct holding, say, user preferences. (Maybe you needed that reference e.g. during initialization, but never after that.) This is similar to, say, forgetting to close files.
(There was a similar situation in old style Unix file systems, where anyone with read access to a file could create another link to it, preventing it from being deleted: When the creator/owner removed his last link, he lost control over it; your 'secret' link might be the only access path to the file, keeping it alive, keeping disk space from being released. But the owner is still the same, so he will have to pay for the disk storage! - I think remedies for handling this was introduced many years ago, but in the first years of Unix, it was a real problem.)
|
|
|
|
|
Write recursive function, that counts ones in the mass. For example...
The first parameter was given to facilitate recursion
|
|
|
|
|
|
We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
As programmer, your job is to create algorithms that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better.
When you just ask for the solution, it is like trying to learn to drive a car by having someone else training.
Creating an algorithm is basically finding the maths and make necessary adaptation to fit your actual problem.
The idea of "development" is as the word suggests: "The systematic use of scientific and technical knowledge to meet specific objectives or requirements." BusinessDictionary.com[^]
That's not the same thing as "have a quick google and give up if I can't find exactly the right code".
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
how to get the tracing information in a c# function call using zipkin .
please try to give reply as soon as possible if you know .it is very important for me
i am unable to get anything .i tried combining several codes together .but it's not working .please try to make some video on this topic that is how to connect a c# program with zipkin
|
|
|
|
|
Plz send videoz! That's a new one!
Why not ask on the Zipkin chat channel? openzipkin/zipkin - Gitter
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
i already asked there but didn't get any proper reply from there
|
|
|
|
|
If I were you, I'd look at using something like this[^].
This space for rent
|
|
|
|
|
Standard, High Definition or ULTRA High Definition?
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
I have some problem for- transfer xml file from one server to another using ip address ,same network is working fine,but different network is not working,cant able to connect,anybody can help me to solve this
|
|
|
|
|
How are you trying to do the transfer? Also, what connection problems are you getting, could it be firewall blocking access?
|
|
|
|
|
Can you provide us with more details? What have you tried so far ?
Post your code here.
When you say different network , how do you connect to the network? Do you have permission to connect to the network? ( Credentials etc).
|
|
|
|
|
Yes thats the problem how to connect remote system using ip address using coding
|
|
|
|
|
Show us some code
Tell us where the code breaks
What works
What dosen't
We're not claivoiant
|
|
|
|
|
private void FileSave()
{
SqlConnection con = new SqlConnection(connstr);
SqlCommand cmd = new SqlCommand("Sp_Rep", con);
cmd.CommandType = CommandType.Text;
con.Open();
string val = cmd.ExecuteScalar().ToString();
XmlDocument xmldoc = new XmlDocument();
xmldoc.LoadXml(val);
xmldoc.Save("C://Shankar//Shankar.xml");
FromLocal();
ToRemote();
con.Close();
}
public void FromLocal()
{
try
{
//string hostName = Dns.GetHostName(); // Retrive the Name of HOST
// Get the IP
//string myIP = Dns.GetHostByName(hostName).AddressList[0].ToString();
Console.WriteLine("That program can transfer small file. I've test up to 850kb file");
Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
// m_socWorker = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
//String szIPSelected = "172.31.1.111";
//String szPort = "80";
String szIPSelected = "10.2.2.28";
String szPort = "580";
int alPort = System.Convert.ToInt16(szPort, 10);
System.Net.IPAddress remoteIPAddress = System.Net.IPAddress.Parse(szIPSelected);
System.Net.IPEndPoint ipEnd = new System.Net.IPEndPoint(remoteIPAddress, alPort);
sock.Connect(ipEnd);
//IPEndPoint ipEnd = new IPEndPoint(IPAddress.Any);
// Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
///Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
// sock.Bind(ipEnd);
sock.Listen(100000);
//clientSock is the socket object of client, so we can use it now to transfer data to client
if(ipEnd != null)
{
Socket clientSock = sock.Accept();
string fileName = "Shankar.xml";
string filePath = "C://Shankar//Shankar.xml";//Your File Path;
byte[] fileNameByte = Encoding.ASCII.GetBytes(fileName);
byte[] fileData = System.IO.File.ReadAllBytes(filePath + fileName);
byte[] clientData = new byte[4 + fileNameByte.Length + fileData.Length];
byte[] fileNameLen = BitConverter.GetBytes(fileNameByte.Length);
fileNameLen.CopyTo(clientData, 0);
fileNameByte.CopyTo(clientData, 4);
fileData.CopyTo(clientData, 4 + fileNameByte.Length);
clientSock.Send(clientData);
Console.WriteLine("File:{0} has been sent.", fileName);
clientSock.Close();
Console.ReadLine();
}
}
catch (Exception ex)
{
Console.WriteLine("File Receiving fail." + ex.Message);
}
}
public void ToRemote()
{
try
{
Console.WriteLine("That program can transfer small file. I've test up to 850kb file");
IPAddress[] ipAddress = Dns.GetHostAddresses("localhost");
IPEndPoint ipEnd = new IPEndPoint(ipAddress[0], 5656);
Socket clientSock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
clientSock.Connect(ipEnd);
byte[] clientData = new byte[1024 * 5000];
string receivedPath = "C://Shankar//Shankar.xml";
int receivedBytesLen = clientSock.Receive(clientData);
int fileNameLen = BitConverter.ToInt32(clientData, 0);
string fileName = Encoding.ASCII.GetString(clientData, 4, fileNameLen);
Console.WriteLine("Client:{0} connected & File {1} started received.", clientSock.RemoteEndPoint, fileName);
BinaryWriter bWrite = new BinaryWriter(System.IO.File.Open(receivedPath + fileName, FileMode.Append)); ;
bWrite.Write(clientData, 4 + fileNameLen, receivedBytesLen - 4 - fileNameLen);
Console.WriteLine("File: {0} received & saved at path: {1}", fileName, receivedPath);
bWrite.Close();
clientSock.Close();
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine("File Sending fail." + ex.Message);
}
}
|
|
|
|
|
|
can you send me the c# code as how to add a click event for the notification text that appears in the notification window to "[DELETED]@gmail.com"
[edit]Email removed - OriginalGriff[/edit]
modified 10-May-17 14:03pm.
|
|
|
|
|
We don't write code to order here.
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
|
Yeah .. sorry about that.
This is actually the "no free" Code Project.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Nope. And do yourself a favour: Never post your email address in any forum, unless you really like spam! If anyone replies to you, you will receive an email to let you know.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Did you mean to post this in a forum at the bottom of an article? You are more likely to get an answer to your question if you post in the appropriate place. We have no idea what notification window you are referring to
|
|
|
|
|