我有一个datetimepicker,在加载windows窗体时显示'MM-dd-yyyy'中的格式,
如下:

我想要它dd-MM-yyyy.
我尝试了以下方法:
设置自定义格式: "dd-MM-yyyy"
但它没有改变.
可能是什么问题呢?
请帮我.
不是我的工作,我对SQL知之甚少,我的问题是如何解决这个问题.我希望这个问题不太通用或毫无意义:
我在db中有几个表.其中很少是基本表,国家列表,客户列表等.这些基本表用于支持其他网格上的dropDownLists中的值,其中用户对某些字段使用预设值,并且还手动填写其他字段.像这样的东西:

现在,我正在制作一个动态报告,指向我需要获取实际值而不是参考的表.
正如我所说,我遇到的问题是我正在处理的特定表中的那些预设值是id_references(id_Country,id_Customer,..),而我需要它们代表的实际值.我该怎么做才能得到实际值?如果我将报告指向不同的表格,我会忽略记录之间的含义/链接.
我正在使用Visual Studio 2010中的标准图表库.图表工作正常,但我无法更改轴网格线样式.这些是已在Form1.Designers.cs中设置的属性
chartArea3.Name = "ChartArea1";
this.chart1.ChartAreas.Add(chartArea3);
legend3.Name = "Legend1";
this.chart1.Legends.Add(legend3);
this.chart1.Location = new System.Drawing.Point(12, 68);
this.chart1.Name = "chart1";
series5.ChartArea = "ChartArea1";
series5.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series5.Color = System.Drawing.Color.Red;
series5.Legend = "Legend1";
series5.Name = "Temp";
series6.ChartArea = "ChartArea1";
series6.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series6.Color = System.Drawing.Color.Blue;
series6.Legend = "Legend1";
series6.Name = "Umid";
this.chart1.Series.Add(series5);
this.chart1.Series.Add(series6);
this.chart1.Size = new System.Drawing.Size(647, 182);
this.chart1.TabIndex = 8;
this.chart1.Text = "chart1";
this.chart1.ChartAreas[0].AxisY.Interval=5;
Run Code Online (Sandbox Code Playgroud)
我想要轴网格类型点或点.我尝试过:
this.chart1.ChartAreas[0].AxisX.LineDashStyle.??????
Run Code Online (Sandbox Code Playgroud)
但后来我不知道如何分配属性和/或上述部分代码行是否正确.
假设我在服务器上有一个工作的memcached deamon.假设这个服务器能够处理服务器端Javascript(在我的情况下是APE).
在服务器上使用一些Javascript访问memcached应该很容易(我的意思是,在我看来......).
但我承认我的想法已经不合时宜......
"帮助PLZ"?:)
谢谢
编辑:
这是有效的:
Ape.registerCmd("CMD", true, function(params, infos) {
Ape.log("cmd called");
var socket = new Ape.sockClient("11211", "127.0.0.1", {flushlf: true});
socket.onConnect = function() {
Ape.log("Connected to Memcached");
Ape.log("Issued 'stats' commande to Memcached...");
this.write("stats\n");
this.onRead = function(data) {
Ape.log("Data from memcached : " + data);
}
}
//data = ...
infos.sendResponse('return', {'data':data});
});
Run Code Online (Sandbox Code Playgroud) 这是我第一次遇到这样的问题.这不是我的职业,而只是我的爱好,我以前没有参考.在我的程序中,我逐一添加了几个控制机器的功能.在我添加了最后一个功能(温度测量)后,我开始遇到其他功能的问题(大约有8个一起运行.我遇到的问题是在图表上(电机的RPM)与此无关你可以看到这两个图表在有和没有温度测量运行的情况下的差异.两个图表中电机的实际速度是相同的,但在第二个图表中,由于应用程序运行缓慢下.
没有温度功能.
具有温度功能

特别是这个功能扰乱了上述控制,我认为是因为工作负载对于应用程序来说变得很重,或者因为我需要采样所以有一些时间等待它们:
private void AddT(decimal valueTemp)
{
sumTemp += valueTemp;
countTemp += 1;
if (countTemp >= 20) //take 20 samples and make average
{
OnAvarerageChangedTemp(sumTemp / countTemp);
sumTemp = 0;
countTemp = 0;
}
}
private void OnAvarerageChangedTemp(decimal avTemp)
{
float val3 = (float)avTemp;
decimal alarm = avTemp;
textBox2.Text = avTemp.ToString("F");
if (alarm > 230)
{
System.Media.SoundPlayer player = new System.Media.SoundPlayer();
player.Stream = Properties.Resources.alarma;
player.Play();
timer4.Start();
}
else
{
timer4.Stop();
panel2.BackColor = SystemColors.Control;
}
}
Run Code Online (Sandbox Code Playgroud)
我想知道在不同的线程上运行此函数是否可以解决问题以及如何做到这一点?或者,如果有不同的方法来解决问题.将赞赏示例代码.
更新,添加方法调用.
这就是我调用AddT方法的方法 …
当我在我的导航器中使用以下URL" http://www.tuto3d.netai.net/wordpress/ "时,我通常会访问我的wordpress网站,但是当我使用 http://www.tuto3d.netai.net/时,我得到了而不是文件夹的索引和wordpress文件夹的链接.我想将我的.htaccess http://www.tuto3d.netai.net/重定向到" http://www.tuto3d.netai.net/wordpress/ "
这是我的.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress
Run Code Online (Sandbox Code Playgroud)
先感谢您
我在类中有一个方法,从/向Form1接收和返回多个参数.我需要使用定时事件来使用这些参数执行一些代码.我已经安排了这个简化的代码来显示动态:
class Motor
{
public static System.Timers.Timer _timer;
int valReg = 30;
public void PID(decimal _actualSpeed, Decimal _speedRequest, out Decimal _pwmAuto, out decimal _preValReg)
{
_timer = new System.Timers.Timer();
_timer.Interval = (3000);
_timer.Elapsed += new System.Timers.ElapsedEventHandler(_timerAutoset);
_timer.Enabled = true;
// {....}
_pwmAuto = valReg;
_preValReg = valReg - 1;
}
static void _timerAutoset(object sender, System.Timers.ElapsedEventArgs e)
{
/* here I need to work with:
_actualSpeed
_speedRequest
_pwmAuto
_preValReg
and send back the last two variables
*/
}
}
Run Code Online (Sandbox Code Playgroud)
这是我从Form1按钮传递和接收变量的方法:
private …Run Code Online (Sandbox Code Playgroud) 我不确定这两个变量是怎么回事."milliV"是双倍的,"param1a"是双倍的,param1a = 65,我应该得到1.588.我得到的结果是= 0.怎么可能?
double milliV=0.0;
milliV= (5/1023*param1a/200*1000);
Run Code Online (Sandbox Code Playgroud)

如何在此上下文中格式化两个字符串Data和Somma?
SqlConnection con = new SqlConnection(strConnString);
con.Open();
str = "select * from Pagamenti ORDER BY [Data] DESC";
com = new SqlCommand(str, con);
sqlda = new SqlDataAdapter(com);
ds = new DataSet();
sqlda.Fill(ds, "Pagamenti");
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
DropDownList1.Items.Add(ds.Tables[0].Rows[i]["Id"] +
" --|-- " + ds.Tables[0].Rows[i]["Data"].ToString() +
" --|-- " + ds.Tables[0].Rows[i]["Somma"]);
}
con.Close();
Run Code Online (Sandbox Code Playgroud)
ToString()没有任何东西,我需要分别"dd/MM/yyyy"和"R#.###".
我有一个方法将字符串传递给类.出于测试原因,我现在使用了一个按钮.我在论坛中搜索了类似的问题,但他们提到了php和其他我无法理解的情况.该类从字符串中删除几个字符,并根据标题将值分配给3个不同的字符串.我需要将这3个字符串返回给调用者,并将其编码为以下内容.
呼叫者:
private void button4_Click(object sender, EventArgs e)
{
string a, b, c;
string invia = textBox8.Text.ToString();
Stripper strp = new Stripper();
strp.Distri(invia, out a, out b, out c);
textBox7.Text = a;
textBox7.Text = b;
textBox7.Text = c;}
Run Code Online (Sandbox Code Playgroud)
类:
class Stripper
{
public void Distri (string inArrivo, out string param1, out string param2, out string param3)
{
string corrente="";
string temperatura="";
string numGiri="";
string f = inArrivo;
f = f.Replace("<", "");
f = f.Replace(">", "");
if (f[0] == 'I')
{ …Run Code Online (Sandbox Code Playgroud)