如何在chrome控制台中增加字体大小?
似乎保罗爱尔兰人做到了:
http://www.youtube.com/watch?v=4mf_yNLlgic
UPDATE
以下是有关如何自定义主题的一些提示:https: //plus.google.com/115133653231679625609/posts/UZF34wPJXsL
有没有办法在OCaml中定义函数之前声明一个函数?我正在使用OCaml解释器.
我有两个功能:
let myFunctionA =
(* some stuff here..... *) myFunctionB (*some stuff *)
let myFunctionB =
(* some stuff here .... *) myFunctionA (* some stuff *)
Run Code Online (Sandbox Code Playgroud)
但这不起作用,因为myFunctionA在制作之前无法调用myFunctionB.
我做了一些谷歌搜索,但似乎找不到任何东西.我怎么能做到这一点?
ocaml functional-programming function mutual-recursion function-declaration
这似乎是一个常见的问题,但文档很难找到.我正在寻找示例,向我展示如何创建自己的视图组(最好通过扩展已存在的视图组),然后以编程方式添加视图.
谢谢.
当我单击Windows窗体表单上的按钮时,我想打开一个记事本窗口,其中包含窗体上TextBox控件的文本.
我怎样才能做到这一点?
我似乎对大多数人都有相反的问题.我有以下非常标准的代码,以查看用户是否想在关闭窗口之前进行一些保存:
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent ev) {
boolean close = true;
// check some files, asking if the user wants to save
// YES and NO handle OK, but if the user hits Cancel on any file,
// I want to abort the close process
// So if any of them hit Cancel, I set "close" to false
if (close) {
frame.dispose();
System.exit(0);
}
}
});
Run Code Online (Sandbox Code Playgroud)
无论我尝试什么,当我离开windowClosing时窗口总是关闭.将WindowAdapter更改为WindowListener没有任何区别.有点奇怪的是,文档明确说明"如果程序在处理此事件时没有明确隐藏或处理窗口,窗口关闭操作将被取消",但它对我来说不起作用.还有其他方法可以处理框架上的x吗?TIA
我是Rails的新手(即愚蠢,需要一些教学').
我有一个控制器(称之为ControllerFoo
)执行一个特定的任务(theMethod
),这可能在其他控制器(例如,从内部ControllerBar
)有用.所以,当然,该方法被定义为self.theMethod
在ControllerFoo
(这意味着它是一个类的方法,对吗?),并在访问ControllerBar
的ControllerFoo.theMethod
.困惑了吗?
这是问题:ControllerFoo.theMethod
使用会话数据,当调用时ControllerBar
,session是零.实际上,从自身调用时,似乎会话也是零.我想我说的是类方法无法访问会话数据?
<rant> 我讨厌如何在PHP </ rant>之类的任何地方简单地访问会话数据
所以现在,由于我不够聪明,不知道如何正确地做到这一点,我只是在我的应用程序中的几个地方重复了逻辑.但这根本不是干的,我讨厌它.
那么如何在控制器中创建一个可供其他控制器访问的方法,并且还可以访问会话数据?
class ControllerFoo < ApplicationController
def self.theMethod (greeting)
p "#{greeting} #{session[:user]}!"
end
end
class ControllerBar < ApplicationController
def show
ControllerFoo.theMethod("Hello,")
end
end
Run Code Online (Sandbox Code Playgroud) 我编写了自己的表格单元格编辑器,用于扩展AbstractCellEditor
和实现a TableCellEditor
,an ItemListener
和a MouseListener
.有没有办法让mouseClicked
方法在itemStateChanged
方法之前先执行?我正在尝试执行以下操作:
private int rowClicked;
private JTable table;
public void itemStateChanged(ItemEvent e) {
if (rowClicked == 5) {
// Do something to row 5.
}
}
public void mouseClicked(MouseEvent e) {
Point p = e.getPoint();
rowClicked = table.rowAtPoint(p);
}
Run Code Online (Sandbox Code Playgroud) 有这样的代码:
int tab[14][2];
int (*wskk)[2] = tab; // &tab makes error
int tab2[2];
wskk = &tab2; // tab2 makes error
Run Code Online (Sandbox Code Playgroud)
为什么可以使用一个指针指向两个不同维度的数组?
我想知道为延迟加载的对象加载嵌套值的最佳方法是什么.我提供了一个例子来帮助解释这个问题.
public class A{
private B b; //Lazy loaded
private C c; //Lazy loaded
private D d; //Lazy loaded
}
public class B{
private E e; //Lazy loaded
private F f; //Lazy loaded
}
public class C{
}
public class D{
}
Run Code Online (Sandbox Code Playgroud)
作为一个例子我想做:
System.out.println(a.getB().getE());
Run Code Online (Sandbox Code Playgroud)
如果我运行上面的语句,我会得到一个延迟加载异常.
我总能做到以下几点:
for (A a : somePossiblyLargeList) {
org.hibernate.Hibernate.initialize(a.getB().getE());
}
Run Code Online (Sandbox Code Playgroud)
但显然性能会很糟糕.
有没有办法可以编写自定义HQL查询,该查询返回预先填充了这些特定嵌套字段的对象?
谢谢!