最新的兼容版本的hadoop和hbase(Latest compatible version of hadoop and hbase)
我必须在4台机器上安装hadoop和hbase。
我找到了最新版本的hadoop-2.6.0 and hbase-0.98.9-hadoop2-bin
。1)它们是否兼容?
2)我应该如何在4台机器上安装hbase和hadoop,即有多少主人和奴隶等?I have to install hadoop and hbase on 4 machines.
I have found latest version ofhadoop-2.6.0 and hbase-0.98.9-hadoop2-bin
.1)Are they compatible?
2)How I should install hbase and hadoop on 4 machines i.e. how many masters and slaves etc.?
原文:https://stackoverflow.com/questions/27798014
最满意答案
我们在Ext.form.Field上使用覆盖,它隐藏触发器等,然后我们添加一个css类。 然后我们设置组件的样式,因为ExtJS的禁用功能确实不够可读。
这是示例代码:
var originalRender = Ext.form.Field.prototype.onRender; Ext.override(Ext.form.Field, { UxReadOnly: false, UxDisplayOnly: function (displayOnly, cls) { // If no parameter, assume true var displayOnly = (displayOnly === false) ? false : true; if (displayOnly) { // If a class name is passed in, use that, otherwise use the default one. // The classes are defined in displayOnly.html for this example var cls = (cls) ? cls : 'x-form-display-only-field'; // Add or remove the class this.addClass(cls); // Set the underlying DOM element's readOnly attribute this.setReadOnly(displayOnly); this.editable = false; // Get this field's xtype (ie what kind of field is it?) var xType = this.getXType(); if (xType == 'combo' | xType == 'combobox' | xType == 'Ext.ux.Combo' | xType == 'Ext.ux.ComboSearch') { this.addClass('x-form-display-only-combo'); this.hideTrigger = true; this.on('expand', function (field) { if (field.hideTrigger) field.collapse(); }); } else if (xType == 'datefield') { this.addClass('x-form-display-only-datefield'); this.hideTrigger = true; this.on('expand', function () { if (this.hideTrigger) this.collapse(); }); this.editable = false; } //elseif for each component u want readonly enabled else { this.addClass('x-form-display-only-other'); } // For fields that have triggers (eg date,time,dateTime), // show/hide the trigger if (this.trigger) { this.trigger.setDisplayed(!displayOnly); } } else { this.UxFullField(cls); } }, afterRender: function () { var me = this; me.UxDisplayOnly(me.UxReadOnly, 'x-form-display-only-field'); this.callParent(arguments); }, UxFullField: function (cls) { // If a class name is passed in, use that, otherwise use the default one. // The classes are defined in displayOnly.html for this example var cls = (cls) ? cls : 'x-form-display-only-field'; this.removeCls(cls); // Set the underlying DOM element's readOnly attribute this.setReadOnly(false); this.editable = true; // Get this field's xtype (ie what kind of field is it?) var xType = this.getXType(); if (xType == 'combo' | xType == 'combobox' | xType == 'Ext.ux.Combo' | xType == 'Ext.ux.ComboSearch') { this.removeCls('x-form-display-only-combo'); this.setHideTrigger(false); } else if (xType == 'datefield') { this.removeCls('x-form-display-only-datefield'); this.setHideTrigger(false); this.editable = true; }//elseif for each component u want readonly enabled else { this.removeCls('x-form-display-only-other'); } // For fields that have triggers (eg date,time,dateTime), // show/hide the trigger if (this.trigger) { this.setHideTrigger(false); } } });
用css你隐藏边框之类的东西......
.x-form-display-only-field{} .x-form-display-only-other input, .x-form-display-only-other select { background: transparent !important; border: 1px solid transparent !important; cursor: pointer; cursor: default; font-weight: bold; background-image: none !important; background-color: transparent !important; } .x-form-display-only-combo input, .x-form-display-only-combo select { background: transparent !important; border: 1px solid transparent !important; cursor: pointer; cursor: default; font-weight: bold; background-image: none !important; background-color: transparent !important; } .x-form-display-only-datefield input, .x-form-display-only-datefield select { background: transparent !important; border: 1px solid transparent !important; cursor: pointer; cursor: default; font-weight: bold; background-image: none !important; background-color: transparent !important; } .x-form-display-only-file input, .x-form-display-only-file select { background: transparent !important; border: 1px solid transparent !important; cursor: pointer; cursor: default; font-weight: bold; background-image: none !important; background-color: transparent !important; } .x-form-display-only-checkbox { } .x-form-display-only-radiogroup { }
现在,您可以通过以下方式添加字段:
Ext.create('Ext.form.field.Text', { name: 'example', UxReadOnly: true });
We use an override on Ext.form.Field, which hides the triggers etc, and then we add a css class. We then style the component, because the disabled function of ExtJS is indeed not readable enough.
Here is example code:
var originalRender = Ext.form.Field.prototype.onRender; Ext.override(Ext.form.Field, { UxReadOnly: false, UxDisplayOnly: function (displayOnly, cls) { // If no parameter, assume true var displayOnly = (displayOnly === false) ? false : true; if (displayOnly) { // If a class name is passed in, use that, otherwise use the default one. // The classes are defined in displayOnly.html for this example var cls = (cls) ? cls : 'x-form-display-only-field'; // Add or remove the class this.addClass(cls); // Set the underlying DOM element's readOnly attribute this.setReadOnly(displayOnly); this.editable = false; // Get this field's xtype (ie what kind of field is it?) var xType = this.getXType(); if (xType == 'combo' | xType == 'combobox' | xType == 'Ext.ux.Combo' | xType == 'Ext.ux.ComboSearch') { this.addClass('x-form-display-only-combo'); this.hideTrigger = true; this.on('expand', function (field) { if (field.hideTrigger) field.collapse(); }); } else if (xType == 'datefield') { this.addClass('x-form-display-only-datefield'); this.hideTrigger = true; this.on('expand', function () { if (this.hideTrigger) this.collapse(); }); this.editable = false; } //elseif for each component u want readonly enabled else { this.addClass('x-form-display-only-other'); } // For fields that have triggers (eg date,time,dateTime), // show/hide the trigger if (this.trigger) { this.trigger.setDisplayed(!displayOnly); } } else { this.UxFullField(cls); } }, afterRender: function () { var me = this; me.UxDisplayOnly(me.UxReadOnly, 'x-form-display-only-field'); this.callParent(arguments); }, UxFullField: function (cls) { // If a class name is passed in, use that, otherwise use the default one. // The classes are defined in displayOnly.html for this example var cls = (cls) ? cls : 'x-form-display-only-field'; this.removeCls(cls); // Set the underlying DOM element's readOnly attribute this.setReadOnly(false); this.editable = true; // Get this field's xtype (ie what kind of field is it?) var xType = this.getXType(); if (xType == 'combo' | xType == 'combobox' | xType == 'Ext.ux.Combo' | xType == 'Ext.ux.ComboSearch') { this.removeCls('x-form-display-only-combo'); this.setHideTrigger(false); } else if (xType == 'datefield') { this.removeCls('x-form-display-only-datefield'); this.setHideTrigger(false); this.editable = true; }//elseif for each component u want readonly enabled else { this.removeCls('x-form-display-only-other'); } // For fields that have triggers (eg date,time,dateTime), // show/hide the trigger if (this.trigger) { this.setHideTrigger(false); } } });
With css you hide stuff like borders etc...
.x-form-display-only-field{} .x-form-display-only-other input, .x-form-display-only-other select { background: transparent !important; border: 1px solid transparent !important; cursor: pointer; cursor: default; font-weight: bold; background-image: none !important; background-color: transparent !important; } .x-form-display-only-combo input, .x-form-display-only-combo select { background: transparent !important; border: 1px solid transparent !important; cursor: pointer; cursor: default; font-weight: bold; background-image: none !important; background-color: transparent !important; } .x-form-display-only-datefield input, .x-form-display-only-datefield select { background: transparent !important; border: 1px solid transparent !important; cursor: pointer; cursor: default; font-weight: bold; background-image: none !important; background-color: transparent !important; } .x-form-display-only-file input, .x-form-display-only-file select { background: transparent !important; border: 1px solid transparent !important; cursor: pointer; cursor: default; font-weight: bold; background-image: none !important; background-color: transparent !important; } .x-form-display-only-checkbox { } .x-form-display-only-radiogroup { }
Now you can add your field the following way:
Ext.create('Ext.form.field.Text', { name: 'example', UxReadOnly: true });
相关问答
更多-
名称重定义Dim MM_conn_STRING[2024-01-17]
你引用了2次。看上面 -
他们都修改相同的属性。 setDisabled只是为了方便,例如,如果您将它用作切换信号的插槽。 使用setEnabled和setDisabled您可以通过切换按钮/动作/复选框来启用或禁用小部件,而不需要中间插槽来反转该值。 They both modify the same property. setDisabled is just for convenience, for example if you use it as a slot for a toggled signal. Using setEn ...
-
发现这个问题,这要归功于On Android模拟器(hw呢?)带有backgroundDimEnabled的活动样式也会使GLSurfaceView输出变暗 这个问题是由于SurfaceView被渲染的原因,所以将z顺序设置为top将修复此问题: (simpleExoPlayerView?.videoSurfaceView as SurfaceView)?.setZOrderOnTop(true) Found the issue, thanks to On Android emulator (hw too ...
-
import matplotlib.pyplot as plt import numpy as np fig = plt.figure(1) # This is as persistent as assigning to whatever function def init_axes(fig): fig.clear() return dict( t_ax = plt.subplot2grid((6,2),(1,0)), ...
-
尝试添加颜色作为背景,如android:background =“#ffffff”,并相应地添加文本颜色,这将是可见的像android:textColor =“#000000”。 Try to add color as background like android:background="#ffffff" and accordingly add the text color which will be visible like android:textColor="#000000".
-
ExtJS:setDisabled(true)使字段太暗/透明而无法读取(ExtJS: setDisabled(true) makes fields too dim / transparent to read)[2023-10-14]
我们在Ext.form.Field上使用覆盖,它隐藏触发器等,然后我们添加一个css类。 然后我们设置组件的样式,因为ExtJS的禁用功能确实不够可读。 这是示例代码: var originalRender = Ext.form.Field.prototype.onRender; Ext.override(Ext.form.Field, { UxReadOnly: false, UxDisplayOnly: function (displayOnly, cls) { // I ... -
背景昏暗不能正常工作(Background dim not working properly)[2023-09-20]
使用android Theme修复了这个问题问题是pca.inverse_transform()不应该将clusters作为参数。 事实上,如果您查看文档 ,应该将从PCA获得的数据 应用于原始数据,而不是使用KMeans获得的质心 。 The problem is that pca.inverse_transform()should not take clustersas argument. Indeed, if you look at the documentation, it should take the data obtained from ...使用actionbarsherlock进行昏暗,几乎透明的活动(Dim, almost transparent activity with actionbarsherlock)[2022-10-12]
找到解决方案: 在res/styles.xml创建自己的主题