好吧,我已经创建了一个完美无缺的网站开膛手.但是我的一个用户询问他们是否可以显示网站树.想到的第一个想法是树视图.
http://i.stack.imgur.com/sZmqp.jpg
虽然树视图可以工作但它不是我想要放在我的程序中.我想在电话图表中添加一些东西(或者我认为它被称为).
http://img21.imageshack.us/img21/4889/treeview.jpg
我不知道怎么做到这一点?有什么建议?
编辑:我正在寻找的是电话链图表或电话树流程图
在Java中,可以在调用构造函数之前初始化编程变量.
public class StockGraph extends JPanel {
public boolean runUpdates = true;
double TickMarks = 18;
double MiddleTick = TickMarks / 2;
double PriceInterval = 5;
double StockMaximum;
double StockMinimum;
Random testStockValue;
DecimalFormat df = new DecimalFormat("#.000");
LinearEquation StockPriceY;
public StockGraph(int AreaInterval, int Time, int StockID) {
}
}
Run Code Online (Sandbox Code Playgroud)
这些变量的属性是什么?
MiddleTick变化时会动态TickMarks变化吗?
这些变量何时初始化?
特别是public boolean runUpdates = true;.因为不需要初始化因为可以调用StockGraph.runUpdates来访问变量吗?
在 flutter 中,您无法设置title要测试的变量,因为它Text不是常量。
class StockCard extends StatelessWidget {
String test;
StockCard(String t) {
test = t;
}
@override
Widget build(BuildContext context) {
return (
new Container(
margin: const EdgeInsets.all(10.0),
child: new Card(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const ListTile(
leading: Icon(Icons.trending_up),
title: Text(test), // ERROR: error: Evaluation of this constant expression throws an exception.
subtitle: Text('Apple Incorporated'),
),
],
),
),
)
);
}
}
Run Code Online (Sandbox Code Playgroud)
我将如何实现这一点,为什么颤振不允许这种情况发生?
我在c#中写了一些非常复杂的实时解析算法,速度是我程序成功的关键.如果我无法在一秒内保留45个更改数据的进程,那么TCP服务器另一端的PID控制循环将振荡.我可以重新调整PID循环以慢速"fps"运行,但这是不可能的.只是想到Ill告诉你,在你写出答案之前说"差异只有10ms所以没有真正的东西"因为那些10ms对我来说很重要.
如果使用这样的goto法规会更快.
if (GeneralDataDirection && UseMaxCandleData || GeneralDataDirection && !UseMaxCandleData)
{
Y1 = CandleStickWorkingData.Min();
X1 = Array.IndexOf(CandleStickWorkingData, Y1);
goto FirstPointCalculated;
}
if (!GeneralDataDirection && UseMaxCandleData || !GeneralDataDirection && !UseMaxCandleData)
{
Y1 = CandleStickWorkingData.Max();
X1 = Array.IndexOf(CandleStickWorkingData, Y1);
}
FirstPointCalculated:
Run Code Online (Sandbox Code Playgroud)
或者goto从第一个if子句中删除语句并让第二个if子句返回false 会更快吗?
考虑 C 编译器将执行填充的任意结构
struct node {
enum type;
size_t num_children;
void** nodes;
};
Run Code Online (Sandbox Code Playgroud)
C 会在第一个元素之前执行填充吗?我问这个是因为我需要做一些时髦的事情void*并要求
void* a = node->nodes[0];
enum type t = *(enum type*)(a);
Run Code Online (Sandbox Code Playgroud)
将始终正确评估。我知道我可以不强制填充,但宁愿不要。
我有一个全局变量
global.loggedInUsers = {};。这个对象被用作字典被唯一的key:value对占据。
键是唯一的,值是一个帐户对象。
function Account(hash, jsonData) {
this.hash = hash;
this.accountJson = JSON.parse(jsonData);
this.pongUpdate = 20;
setInterval(function() {
// Stuff happens here blah blah
}, 1000);
}
Account.protoype....
Run Code Online (Sandbox Code Playgroud)
在我的代码中的某个时刻,我最终调用了删除函数
delete(loggedInUsers.key);
Run Code Online (Sandbox Code Playgroud)
因为Account类包含setInterval调用,如果Account对象被删除, setInterval 会停止还是我必须将 setInterval 存储在变量中,在析构函数中处理它?
c# ×2
android ×1
c ×1
dart ×1
flutter ×1
java ×1
javascript ×1
node.js ×1
performance ×1
vb.net ×1