|
thanks so much ....^_^
i am still not understand..
why this coding error
"axMathworks_Strip1.AddXY(0, a, Convert.ToDouble(textBox1.Text));"
in video tutorial, error is not happening???
Convert.ToDouble(textBox1.Text)); error in this section....
and your coding
double coordinate;
if (double.TryParse(txtBox1.Text, out coordinate)
{
axMathworks_Strip1.AddXY(0, a, coordinate);
}
i add "a++" when i run, the program successfully executed....can u give me short explanation...sorry for my english..
|
|
|
|
|
The reason my version works and yours didn't is because of what TryParse does. Basically, if it cannot parse the value into a double then it will not execute the Add section. Using Convert.ToDouble will throw an exception if it cannot convert the value.
|
|
|
|
|
thanks for the enlightenment, it was so helping me ....
|
|
|
|
|
I tried to connect the data adc atmega 16 microcontroller application to C # that has been created with the help of the code that you help ..
private void timer1_Tick (object sender, EventArgs e)
{
double coordinate;
b ++;
if (double.TryParse (txtDataTerima.Text, out coordinate))
{
axMathworks_Strip1.AddXY (0, b, coordinate);
}
}
This code can only display data manually ..
I try to make it automatically with the help of serial ports
but in a textbox that I created
the data that I received with the help of data reception code:
string a;
private void serialPort_DataReceived (object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
txtDataTerima.BeginInvoke (new myDelegate (updateTextBox));
}
public delegate void myDelegate ();
public void updateTextBox ()
{
a = serialPort.ReadExisting ();
txtDataTerima.AppendText (a);
txtDataTerima.ScrollToCaret ();
}
textboxt data displayed through serial communication, data updates down when there are changes in the value of adc input of the microcontroller
I try again to change the code
acceptance of data updates
full program
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace GrafikADC
{
public partial class Form1 : Form
{
double b;
double apa;
string a;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
//—menset event handler untuk DataReceived event—
// serialPort.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler();
//—menampilkan nama serialport yang tersedia pada
// komputer—
string[] portNames = System.IO.Ports.SerialPort.GetPortNames();
for (int i = 0; i <= portNames.Length - 1; i++)
{
cbbCOMPorts.Items.Add(portNames[i]);
}
btnDisconnect.Enabled = false;
}
private void btnConnect_Click(object sender, EventArgs e)
{
//—menutup akses serialport apabila akses serialport terbuka—
if (serialPort.IsOpen)
{
serialPort.Close();
}
try
{
//—mengatur beberapa parameter untuk koneksi serial
// port—
serialPort.PortName = cbbCOMPorts.Text;
serialPort.BaudRate = 9600;
serialPort.Parity = System.IO.Ports.Parity.None;
serialPort.DataBits = 8;
serialPort.StopBits = System.IO.Ports.StopBits.One;
//—buka serial port—
serialPort.Open();
//—menampilkan status dari serial port dan
// enable/disable -kan tombol—
lblMessage.Text = cbbCOMPorts.Text + " connected.";
btnConnect.Enabled = false;
btnDisconnect.Enabled = true;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
private void btnDisconnect_Click(object sender, EventArgs e)
{
try
{
//—tutup serial port—
serialPort.Close();
//—menampilkan status dari serial port dan
// enable/disable -kan tombol—
lblMessage.Text = serialPort.PortName + " disconnected.";
btnConnect.Enabled = true;
btnDisconnect.Enabled = false;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
private void serialPort_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
txtDataTerima.BeginInvoke(new myDelegate(updateTextBox));
}
public delegate void myDelegate();
public void updateTextBox()
{
a = serialPort.ReadExisting();
txtDataTerima.AppendText(a);
txtDataTerima.ScrollToCaret();
txtDataTerima.Clear();
}
private void button3_Click(object sender, EventArgs e)
{
timer1.Start();
button3.Enabled = false;
}
private void timer1_Tick(object sender, EventArgs e)
{
double coordinate;
b++;
if (double.TryParse(txtDataTerima.Text, out coordinate))
{
axMathworks_Strip1.AddXY(0, b, coordinate);
}
}
}
}
This is a program I created delivery microcontroller :
#include <mega16.h>
#include <delay.h>
int a,b;
char riki[33];
// Alphanumeric LCD functions
#include <alcd.h>
// Standard Input/Output functions
#include <stdio.h>
#define ADC_VREF_TYPE 0x00
// Read the AD conversion result
unsigned int read_adc(unsigned char adc_input)
{
ADMUX=adc_input | (ADC_VREF_TYPE & 0xff);
// Delay needed for the stabilization of the ADC input voltage
delay_us(10);
// Start the AD conversion
ADCSRA|=0x40;
// Wait for the AD conversion to complete
while ((ADCSRA & 0x10)==0);
ADCSRA|=0x10;
return ADCW;
}
while (1)
{
// Place your code here
a = read_adc(2);
lcd_gotoxy(0,0);
sprintf(riki, "adc1=%d",a);
lcd_puts(riki);
delay_ms(50);
lcd_clear();
printf("%d\n", a);delay_ms(100);
}
}
|
|
|
|
|
I'm assuming it be due to the textbox value. Some countries use a dot as decimal seperator, others use a comma. In the background of the code this is not so. (always dot). To make sure that your textbox value parses to a double correctly look into the double.TryParse function.
|
|
|
|
|
thanks for the explanation..
but iam still not understand....
|
|
|
|
|
in that case you better start by picking a C# book and start reading from the start. This is very basic stuff.
A textbox gives the user's input as a piece of text, a string. a double is a certain type of number. Your computer is a machine and it only know 0 and 1. In this case the function expects a double, which is represented as a different series of 0 and 1's than a string, hence it doesn't understand the input. To make the input change from text to double you need to "parse" it. (parsing is like converting, you change the text value 1.123 into a double number 1.123 which is represented differently), but the "parsing" function makes some "assumptions" on the text it is given. (decimal operator is a . or , eg).
int, bool, double, float, string, char, ... they're all represented differently in the machine.
hope this clarifies things, but take the first sentence as advice, please.
|
|
|
|
|
thank you for your valuable input
|
|
|
|
|
How do I select, drag and align the controls like Visual Studio at the running time ?
|
|
|
|
|
You should look into how Drag and Drop works. You would have a "canvas" of some sort to lay out your controls. This would be the drop target. Your controls would be the drag source.
|
|
|
|
|
You also posted the same question in QA C#. Please do not cross-post.
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
|
|
|
|
|
I want to develop the application which send million of messages using SMPP (like N number of message per second) with maximum scalability (Like some monitoring system for queue and count of messages getting send) with queue-bsed messaging, with minimum of resources usage at best performance.
Thanks in advance.
Mack
Mack Macwan
modified 28-Sep-18 14:04pm.
|
|
|
|
|
Nothing but buzzwords. Can you translate what you need into normal English?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
This is best accomplished by syndicating dot-com portals and embracing real-time platforms in order to deploy turn-key e-commerce solutions. Assuming iterated e-business convergence, morphing enterprise solutions to generate clicks-and-mortar e-services will likely result in envisioneer B2C experiences. I recommend you innovate WAP Enabled e-markets in order to synthesize end-to-end content. Relevant B2C web-readiness models connected to disintermediate global infomediaries will allow you to exploit geo-processing services.
Further, if you mesh real-time monitoring niches and empower distributed partnerships, you will be in a position to seize B2C solutions. Growing out-of-the-box L-markets and enhanced scalable supply-chains are another way to reinvent value-added channels. I recommend streamlining asset tracking bandwidth and strategizing dynamic functionalities so that you can extend proactive mindshare. In my experience, transitioning next-generation infrastructures and maximizing integrated Related Interoperability are valuable endeavours.
IMHO, it's important to seek Bird-Dog visionary convergence and drive best-of-breed architectures to leverage frictionless methodologies. I also recommend you utilize killer channels, synergize e-business programs and reinvent impactful experiences. Scaling mobile programs and vision-oriented, well-modulated superstructures will enable an integrated heuristic application.
Hope you find this information helpful.
/ravi
|
|
|
|
|
Great! I'll order 500000 copies of that!
You coped with translating Willem Elsschot's "Lijmen" to the present era. Welcome, Mr. Boormans 2.0!
|
|
|
|
|
Can I get some Creamy Romano dressing for that Buzzword Salad?
|
|
|
|
|
Dave Kreskowiak wrote: Can I get some Creamy Romano dressing for that Buzzword Salad? Of course you can! Help yourself[^]!
/ravi
|
|
|
|
|
Awsome! I have a few emails I need to send now.
|
|
|
|
|
Hii thanks for reply but i have already developed service who process this thing but i want to create multiple instance of the service to load balance the queue of messages but its takes too much memory size and dbo operation which slow down my server speed and work and affects other services and site some time it shutdown whole server if queue is high i mean in billions so what will be the best way to accomplish this things.
Thanks very much
Mack Macwan
|
|
|
|
|
Thar really depends on what you're using for your queuing, but you really should look at distributing the queue across multiple redundant balanced nodes. You might want to consider Azure or Service Bus Queues. This[^] should get you started.
|
|
|
|
|
Hay thanks again may be this what i am looking for but can you share me some code sample please thanks in advance
|
|
|
|
|
The code really depends on which route you go, but you're concentrating on the wrong part. The issue is how you lay out the architecture - you need to decide that long before you even touch the code. You need to be aware of such things as do you want to support polling? How is the redundancy going to be handled? Do you need transactional support on your messages? These, and many more things, are the things you have to sort out first.
|
|
|
|
|
Well I certainly found it helpful. I am going to be able to start up and sell several multi-billion dollar companies in just the next two months based on just that.
|
|
|
|
|
mackmacwan wrote: Can anyone tell me how do i best practices
You start with a design that takes into account that actual real and expected growth of the system.
AFTER you have that design then you implement it.
AFTER that it shouldn't be necessary to attempt to solve performance problems but tuning it to get the best performance out of the existing hardware might help.
|
|
|
|
|
Please provide the programming to send Bulk/Mass email fetching the email ids from database. Table Column is as follows. Name, Phone, Email
|
|
|
|