我正在用fragments 在Android 3.0 中做一些事情。在其中一个片段中,我需要滚动条。我尝试使用 a ScrollView
,但它没有为我提供片段的滚动条。
如何获得片段的滚动条?
android scrollbar scrollview android-fragments android-3.0-honeycomb
我在C#中定义了两个接口,如下所示:
[Guid("4938540B-3DB2-452c-A061-59EC499657E7")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IRADevice
{
Void FA();
}
/// <summary>
/// IRADevice interface represents a given RADevice.
/// </summary>
[Guid("4938540B-3DB2-452c-A061-59EC499657E8")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IRADevice2 : IRADevice
{
void FB();
}
Run Code Online (Sandbox Code Playgroud)
在c ++代码中,我使用以下命令导入上面接口生成的tlb
#import "device.tlb" raw_interfaces_only
Run Code Online (Sandbox Code Playgroud)
创建的tlh文件如下:
struct __declspec(uuid("4938540b-3db2-452c-a061-59ec499657e7"))
IRADevice : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall FA ( ) = 0;
};
struct __declspec(uuid("4938540b-3db2-452c-a061-59ec499657e8"))
IRADevice2 : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall FB ( …
Run Code Online (Sandbox Code Playgroud) 它看起来像JTable
构造喜欢String[][]
...但我喜欢使用更智能的容器,直到我必须使用其他东西.一直在使用ArrayList<ArrayList<String>>
,现在我需要JTable
开心String[][]
.
我找到了一种简单的方法来转换ArrayList<String>
为String[]
使用toArray()
,但没有找到多维数组的简易转换器.
我想从去ArrayList<ArrayList<String>>
到String[][]
的行数最少的.
我一直在搜索图书馆,似乎无法找到这个转换器,并希望有人可以建议一个很好的解决方案.
提前致谢.
我是一个VB人而不是c#所以我在c#中有这个代码:
MouseGesture _mg;
public Form1()
{
InitializeComponent();
// b) Load a file with the commands and keys once in your application
MouseGestureData.Instance.Commands.ReadFile(
Environment.CurrentDirectory + @"\MouseGestureCommands.xml" );
// c) For each Form you want to use mouse gestures...
_mg = new MouseGesture( this, null );
_mg.MouseGestureEntered += new MouseGestureEventHandler(
OnMouseGestureEntered );
}
private void OnMouseGestureEntered( object sender, MouseGestureEventArgs e )
{
// d) In your registered MouseGestureEventHandler, handle the commands
// you want
MessageBox.Show( string.Format( "OnMouseGestureEntered:\n" +
" Command:\t{0}\n" +
" …
Run Code Online (Sandbox Code Playgroud) 我经常看到开源或“专业”python 代码中的注释——比如 webapp2 或 webob,看起来很间隔。评论似乎超过了代码。我注意到个别开发人员也在他们自己的应用程序中这样做。大间距,大量注释,然后是每隔一段时间写几行代码。
我想我喜欢这种风格,它确实感觉更有条理。现在我是用 python 做的更大的项目,我想知道我是否应该像我看到其他人所做的那样,用代码和注释来组织一个大项目。我认为这可能会使它更具可读性和可维护性,并且可能使我成为一个更好的编码员——因为事情会更清楚。
只是想:这个问题在代码审查上更好吗?听就是服从
目前我只是这样评论,例如:
#U - Idempotent. b-atching requests
# which can be PUT, DELETE or GET.
#@control.access.collector_or_owner
def patch(s,*a,**k):
s.resolve(*a,**k)
for mod in s.requested_modifications:
method = mod.get('method') or 'PUT'
point = s.current_point+mod.get('point') or ''
body = mod.get('body') or ''
s.say('Will execute %s on %s for %s\n' % (method,point,body))
# create the in-app request
mod_request = webapp2.Request.blank(point)
mod_request.body = str(body)
mod_request.method = method
mod_request.app = s.app
# then find the handler and report …
Run Code Online (Sandbox Code Playgroud) 以下是我的界面:
public interface IBaseService
{
List<ExceptionPairs> Exceptions { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
另一个接口是继承它:
public interface IClassStudentsService: IBaseService
{
}
Run Code Online (Sandbox Code Playgroud)
我在下面的类中实现了这个接口:
public class CSService : IClassStudentsService
{
public List<ExceptionPairs> Exceptions
{
get;set;
}
}
Run Code Online (Sandbox Code Playgroud)
我创建了一个CSService对象,并尝试访问List 'Exceptions'
但收到错误" Object reference not set to an instance of an object.
"
你能指导我需要做什么实例化吗?