我正准备进行演示,我有一些3D matplotlib数字的示例图.但是,网格线太亮,无法在投影图像上看到.
我尝试使用适用于2D数字的网格方法:
points = (5*np.random.randn(3, 50)+np.tile(np.arange(1,51), (3, 1))).transpose()
fig = plt.figure(figsize = (10,10))
ax = fig.add_subplot(111, projection='3d')
ax.scatter(points[:,0], points[:,1], points[:,2])
ax.view_init(elev=0., azim=0)
ax.set_ylim([0, 60])
ax.set_zlim([0, 60])
ax.set_xlim([0, 60])
ax.set_zlabel('Cytokine')
ax.set_ylabel('Parameter')
ax.grid(linewidth=20)
Run Code Online (Sandbox Code Playgroud)
但这似乎不适用于3D数字.有什么建议?
众所周知,在使用AngularJS时,必须在指令内操作DOM元素.
但是,在某些用例中,似乎可以接受在服务中操作DOM.Misko Hevery在这里谈论这个.您还可以在Bootstrap UI对话框中找到示例.
Misko的解释相当含糊,所以我想知道你如何确定何时需要将DOM放在服务中而不是指令中.
我想在单击按钮时更改标题的颜色.这是我的代码,但它不起作用,我无法弄清楚为什么不...
<div id="about">About Snakelane</div>
<input type="image" src="http://www.blakechris.com/snakelane/assets/about.png" onclick="init()" id="btn">
Run Code Online (Sandbox Code Playgroud)
和我的js ......
var about;
function init() {
about = document.getElementById("about").innerHTML;
about.style.color = 'blue';
}
Run Code Online (Sandbox Code Playgroud)
提前致谢!
Some browsers (Firefox, Chrome) by design doesn't clean session cookies when you close them, if you set some kind of remember me switch (for example in FF go to Options->General->When Firefox starts->Show my windows and tabs from last time). It is a problem for our client (government agency...) while I do have absolute control over http server, I have no control over browser settings. The scenario is - they're used to share computer accounts, however they shouldn't be able to …
我有以下要在F#中使用的C#类
using System;
using System.Collections.Generic;
using System.Text;
namespace DataWrangler.Structures
{
public enum Type { Trade = 0, Ask = 1, Bid = 2 }
public class TickData
{
public string Security = String.Empty;
public uint SecurityID = 0;
public object SecurityObj = null;
public DateTime TimeStamp = DateTime.MinValue;
public Type Type;
public double Price = 0;
public uint Size = 0;
public Dictionary<string, string> Codes;
}
}
Run Code Online (Sandbox Code Playgroud)
我想在F#中创建它的一个实例.我用来执行此操作的代码位于f#脚本文件中
#r @"C:\Users\Chris\Documents\Visual Studio 2012\Projects\WranglerDataStructures\bin\Debug\WranglerDataStructures.dll"
open System
open System.Collections.Generic;
open System.Text;
open DataWrangler.Structures …
Run Code Online (Sandbox Code Playgroud) 我想为某些JPanel
s 添加填充.我找到了这个答案:https://stackoverflow.com/a/5328475/1590323
它适用于没有边框的面板.但是,我如何为已经有边框的面板做到这一点?(TitledBorder
在这种情况下是A )
我试过了:
JPanel mypanel = new MyPanel(); // Panel that I am going to add a TitledBorder to, but needs padding
mypanel.setBorder(new EmptyBorder(10,10,10,10));
JPanel mypanel_container = new JPanel();
TitledBorder border = BorderFactory.createTitledBorder(BorderFactory.createRaisedBevelBorder(), "My panel");
border.setTitleJustification(TitledBorder.LEADING);
mypanel_container.setBorder(border);
mypanel_container.add(mypanel);
this.add(mypanel_container);
Run Code Online (Sandbox Code Playgroud)
(简而言之:在EmptyBorder
应该具有a的TitledBorder
面板中TitledBorder
添加,然后使用该面板创建另一个面板并将第一个面板添加到该面板,然后使用该面板)
但后来我得到了太大的填充,忽略了构造函数的值EmptyBorder
.
那么如何在带图形边框的JPanel中添加填充?
我在我的Cocoa应用程序中做了一个简单的文件打开面板.我启用了权利和应用沙盒.但是在OS X 10.9上,当应用程序使用时打开一个对话框时NSOpenPanel
,它会崩溃:
特定于应用程序的信息:
因未捕获的异常'NSObjectNotAvailableException'而终止应用程序,原因:'service com.apple.appkit.xpc.openAndSavePanelService无法代表由于{"proxy-communications-error"="错误而初始化NSOpenPanelService的实例Domain = NSCocoaErrorDomain代码= 4099 \"\ U041d\U0435\U0443\U0434\U0430\U043b\U043e\U0441\U044c\U0443\U0441\U0442\U0430\U043d\U043e\U0432\U0438\U0442\U044c\U0441\U0432\U044f\U0437\U044c\U0441\U043f\U0440\U043e\U0433\U0440\U0430\U043c\U043c\U043e\U0439-\U043f\U043e\U043c\U043e\U0449\U043d\U0438\U043a\U043e\U043c. \"(连接在此过程中无效.)UserInfo = 0x61000047dc00 {NSDebugDescription =此过程中的连接无效.}"; }"
资源:
self.panel = [NSOpenPanel openPanel];
panel.delegate = self;
panel.canChooseDirectories = YES;
panel.canChooseFiles = NO;
panel.canCreateDirectories = YES;
panel.allowsMultipleSelection = NO;
[self.panel beginSheetModalForWindow:contextWindow completionHandler:^(NSInteger returnCode) {
...
}];
Run Code Online (Sandbox Code Playgroud)
谁看过这个吗?
我正在尝试javac
永久地为它的java vm 设置堆大小.我已经把我的JAVA_OPTS
给-Xmx64m
我打电话伟大的工程java
,但没有javac
.我仍然遇到堆大小问题.我可以在.bashrc中设置一个不同的变量来永久更改吗?
当我运行javac -J-Xmx64m
它时效果很好.所以我只需要一种方法使该-J-Xmx64m
选项永久化.
仅供参考 - 我正在使用OpenJDK 1.7运行Ubuntu 11.10
所以我正在做一些重构,我真的很烦恼,我没有预先得到所有的错误.如何增加限制或删除限制,以便编译器输出它可以找到的所有错误?
我有以下代码,我希望只在我的浏览器中加载页面,用IIS 7运行它.
<%@ Page Language="C#" Debug="true" %>
<%
using System;
protected string callRotate()
{
ProcessStartInfo info = new ProcessStartInfo();
string[] arguments = { "arg1" , "arg2" };
info.FileName = "ConsoleApplication1";
Process process = Process.Start(info.FileName, arguments);
Process.Start(info);
}
%>
Run Code Online (Sandbox Code Playgroud)
这是我在浏览器中遇到的错误:
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1513: } expected …
Run Code Online (Sandbox Code Playgroud)