我想在屏幕上以一个带脚本的用户"XYZ"启动一个程序.这是我的简短形式的脚本:
# replace <newuser> with the user you wish to run teamspeak 3 with.
USER="teamspeak"
# Do not change this path
PATH=/bin:/usr/bin:/sbin:/usr/sbin
# The path to the teamspeak 3 server/scripts . example = /home/teamspeak3/teamspeak3-server
DIR=/home/teamspeak/voiceserver/teamspeak3
DAEMON=$DIR/ts3server_startscript.sh
# Change all PARAMS to your needs. I required the ini so teamspeak used MySQL
PARAMS="inifile=ts3server.ini"
#Name = The screen will be named from this.
NAME=teamspeak3
DESC="Teamspeak Server 3"
case "$1" in
start)
echo "Starting $DESC"
script -q -c "su $USER -l -c \"screen …Run Code Online (Sandbox Code Playgroud) 我试着<br />在我的网页上获得高度.我用这个片段.
br_size = $('br').height();
console.log(br_size);
Run Code Online (Sandbox Code Playgroud)
但只有Mozilla Firefox像这样的代码,所有其他浏览器回馈0.是否有一个简短的JS代码,给我正确的高度回来?
PS:我使用这种方法,因为我知道所需的尺寸X是X= other_size - 4*br_size
我想将字符串转换为位图或我可以在像素框中显示的内容.
我的字符串看起来像这样:
string rxstring = "010010010020020020030030030040040040050050050060060060070070070080080080090090090100100100110110110120120120130130130140140140150150150160160160“
Run Code Online (Sandbox Code Playgroud)
擦除字符串中的RGB代码没有问题
("01002003004005060070080090100110120130140150160");
Run Code Online (Sandbox Code Playgroud)
我只需要它来表明,这并不重要[原文如此]
IDE:VS2010 C#
我试图用 C# 与 Arduino Due 进行通信。通信工作得很好,但我的 DataReceived 处理程序需要大约 1 秒才能做出反应。这是我的问题,因为我必须发送多达 10 亿 (1*10E9) 个命令。
如果我在 Arduino 中激活 DEBUG 设置,它会告诉我命令需要 64 毫秒。我认为 C# 应用程序应该在发送后 80 毫秒内收到它。
这是代码的一部分:
StopWatch s1 = new StopWatch();
private void Open_Port()
{
string port = null;
int baud = 0;
bool ERR = false;
if ((COM_cb.SelectedItem != null) | (BAUD_cb.SelectedItem != null))
{
port = this.COM_cb.GetItemText(this.COM_cb.SelectedItem);
baud = Convert.ToInt32(this.BAUD_cb.GetItemText(this.BAUD_cb.SelectedItem));
ERR = false;
}
else
{
ERR = true;
System.Windows.Forms.MessageBox.Show("Error Msg");
}
if (ERR == false)
{
serialPort1.PortName …Run Code Online (Sandbox Code Playgroud) c# ×2
.net ×1
bitmap ×1
css ×1
debian ×1
gnu-screen ×1
height ×1
html ×1
javascript ×1
jquery ×1
linux ×1
performance ×1
serial-port ×1
shell ×1
string ×1