我注意到我浏览过的Firebug和其他一些插件需要安装和运行Firefox才能安装它们.
鉴于我的开发机器没有连接到互联网,这有点不方便.有没有办法使用闪存驱动器下载和安装插件?
给定LISP eval函数的以下定义 - 添加defmacro函数需要什么?(甚至只是评估一个宏)
(defun null. (x)
(eq x '()))
(defun and. (x y)
(cond (x (cond (y 't) ('t '())))
('t '())))
(defun not. (x)
(cond (x '())
('t 't)))
(defun append. (x y)
(cond ((null. x) y)
('t (cons (car x) (append. (cdr x) y)))))
(defun list. (x y)
(cons x (cons y '())))
(defun pair. (x y)
(cond ((and. (null. x) (null. y)) '())
((and. (not. (atom x)) (not. (atom y)))
(cons (list. (car …Run Code Online (Sandbox Code Playgroud) 我喜欢Androids新动画,你触摸一个控件(listviewitem,按钮等等),它做了一个像这样的整洁动画:

我想知道如何在全局范围内为WPF中的所有"可点击"控件实现这一点.
我特别需要帮助的是如何在控件上创建圆圈.我唯一想到的是为每个其他控件(按钮,单选按钮等)创建自己的用户控件,其中我有椭圆的父级以及原始控件本身.
<UserControl>
<Grid MouseLeftButtonDown="handler">
<Button/> <--- this would be the button which you normally would place
</Grid >
</UserControl>
Run Code Online (Sandbox Code Playgroud)
而在handler-method随后创建点的椭圆e.GetPosition(handler)使用保证金性质,后来制作动画.该解决方案将正常工作.但是,对于我希望产生连锁反应的每一个控件来说,这样做会很麻烦.基本上是这样的:
void handler(object sender, MouseButtonEventArgs e)
{
Grid parent = (Grid)sender;
Ellipse ellipse = new Ellipse();
ellipse.Height = 10; // would be animated
ellipse.Width = 10; // would be animated
Point p = e.GetPosition(parent);
ellipse.Margin = new Thickness(p.X, p.Y, 0, 0);
parent.Children.Add(ellipse);
// do the animation parts to later remove the ellipse
} …Run Code Online (Sandbox Code Playgroud) 我搜索示例或示例以通过文本框过滤WPF DataGrid列元素.
同样的事情也到这个(给定的例子使用WPFToolkit ...通过微软显然放弃了...)
XAML
<Canvas>
<DataGrid Height="200" Name="dataGrid1" Width="200" Canvas.Top="23" />
<TextBox Name="textBox1" Width="120" />
</Canvas>
Run Code Online (Sandbox Code Playgroud)
CS:
public partial class MainWindow : Window
{
private List<Personne> persons;
ICollectionView cvPersonnes;
public MainWindow()
{
InitializeComponent();
persons = new List<Personne>();
persons.Add(new Personne() { Id = 1, Nom = "Jean-Michel", Prenom = "BADANHAR" });
persons.Add(new Personne() { Id = 1, Nom = "Gerard", Prenom = "DEPARDIEU" });
persons.Add(new Personne() { Id = 1, Nom = "Garfild", Prenom = "THECAT" }); …Run Code Online (Sandbox Code Playgroud) 我目前正在使用Kramdown从Ruby中的Markdown生成HTML.我知道我可以使用kramdown生成一个latex文件,并将其转换为pdf美国命令行实用程序.但我想要一个纯粹的红宝石解决方案.
有没有办法在不使用命令行实用程序的情况下仅使用ruby将markdown转换为pdf?
我有一个除了一些字符串之外什么都没有的网页.没有图像,没有背景颜色或任何东西,只是一些长度不是很长的纯文本.
我只是想知道,什么是最好的(通过这种方式,我的意思是最快和最有效)的方式来传递网页中的字符串,以便我可以用它来做其他事情(例如在文本框中显示)?我知道WebClient,但我不确定它是否会做我想做的事情,而且即使它确实有效,我也不想尝试它,因为我上次做的时间大约需要30秒一个简单的操作.
任何想法,将不胜感激.
我正在使用Twitter Bootstrap来设计一个iPad优化的网站,并在iOS5的Mobile Safari中遇到一个有趣的错误.
点击固定位置导航栏中的锚链接后,它正确地将我带到该锚点.但是,在滚动页面之前,我无法单击导航栏中的任何其他链接.
问题似乎出现在Bootstrap本身,因为Bootstrap站点有同样的问题:http://twitter.github.com/bootstrap/
有关如何解决这个问题的任何建议?
下面的代码重现了这个问题.请注意,如果单击"Test JS"或"Test jQuery"(两种不同类型的滚动,直接JS或基于jQuery),则在手动移动页面之前,您将无法再次单击.
这是基本的演示代码(.jsp):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
#testDiv {
position: fixed;
bottom: 0;
right: 0;
background: gray;
padding: 20px;
}
#jsDiv,
#jQueryDiv {
width: 200px;
display: block;
height: 40px;
background-color: red;
}
#jQueryDiv {
background-color: yellow;
}
</style>
<script type="text/javascript">
function testScroll() {
alert("JS");
scroll(0, 5000);
}
function testjqScroll() {
alert("JQuery");
$(window).scrollTop(500);
}
</script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.js"></script>
</head>
<body>
<%for (int i …Run Code Online (Sandbox Code Playgroud) 我是服务器端开发的新手.我想处理一个应用程序,我需要通过我的应用程序从我的Android设备上录制Helix Server上的视频.我在Windows Server PC上安装了Helix Server.
在Android应用程序中,我正在尝试在Helix服务器上传录制的视频.我已经实现了在SD卡上录制视频的应用程序,但我想直接在Helix Server上录制并保存该视频.我已经实现了我的Android应用程序如下:
public class NewRecordingVideo extends Activity implements SurfaceHolder.Callback {
private MediaRecorder recorder;
boolean flag = false;
boolean startedRecording = false;
boolean stoppedRecording = false;
SurfaceHolder mHolder;
SurfaceView videoSView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
setContentView(R.layout.activity_main);
recorder = new MediaRecorder();
recorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_RECOGNITION);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
videoSView = ((SurfaceView)findViewById(R.id.surfaceView1));
mHolder=videoSView.getHolder();
mHolder.addCallback(this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
((Button)findViewById(R.id.startBtn)).setOnClickListener(
new OnClickListener() {
@Override
public void onClick(View arg0) {
if(startedRecording == false) {
recorder.start();
startedRecording = true;
Toast.makeText(NewRecordingVideo.this,
"Your video …Run Code Online (Sandbox Code Playgroud) 我dnu build在Mac上使用命令构建我的控制台应用程序.输出是MyApp.dll.
事实并非如此MyApp.exe,我如何在Windows上甚至在Mac上执行它?
代码是:
using System;
class Program
{
public static void Main()
{
Console.WriteLine("Hello from Mac");
}
}
Run Code Online (Sandbox Code Playgroud)