- 博客(28)
- 收藏
- 关注
转载 多核危机:Scala vs Erlang
近来在博客上关于Scala与Erlang之间的争论越来越热。未来注定是多核的世界,问题在于如何去解决多核的危机。Scala和Erlang是两门渴望成为其解决方案的语言,但它们也有些许的不同。那么它们所采取的方式各有什么利弊呢? 引入问题 摩尔定律已经改变了。我们不再获得和以前一样的时钟频率增长,取而代之,我们得到了更多的(CPU)核心。今天,也许你的笔记本都已经是双核的了。 为了利用多核的特性,应用程序需要支持并发。如果你的客户买了一台八核的机器,要向他们解释清楚正常情况下应用程序只会用到12%的CPU能力
2010-06-06 10:31:00
625
转载 因并发而生 因云计算而热:Erlang专家访谈实录(1)
Erlang并行计算主持人 : 我们目前谈到了很多Erlang在语言特性方面的问题,我们知道Erlang最大的特点是分布式、并行计算的特性,有人说如果一门语言不能很好地处理并行计算的问题,将来很可能会失去生存的权利,二位对于这个观点怎么看?赵东炜 : 我分成两个部分来说,第一个是现在的计算环境已经到了云计算、多核计算、分布式,已经是一个常态,如果一个语言不能很好地处理并行计算的问题,它肯定会出问题。我觉得它不能够说是一个很伟大的语言,至少是不能够担当大任。第二个部分,未来也不是很绝对的,未来这个计算的模式会
2010-06-06 10:26:00
620
转载 Erlang,让我找到了云计算时代的编程语言
<br />从去年开始研究java并发编程,对java的多线程,各种锁,线程池都有一定的了解。再加上看了一部分周伟明老师的《多核计算与程序设计》和《多核编程艺术》,总感觉多核时代的编程模式让程序员很痛苦。程序员不对软件和硬件知识做深入了解,要开发出具有高性能,高可用,高伸缩性的程序不是那么容易,特别是同步,锁,原子性,程序活性让很多从事软件开发多年的资深程序员都搞得不太清楚。而云计算时代,多核,多任务,多系统交互,程序之间的独立性和依赖性都变得越来越强,如何系统之间的关系更简单,如何能充分系统的资源,如何让
2010-06-03 17:41:00
1065
转载 SWT:实现自我绘制的Button组件
<br />在所有SWT组件中,Button几乎是最常用的,其功能在对于一般的情况来说也足够丰富了。你可以为Button组件设置要显示在其中的文本或者图像、设定ToolTip,甚至只要修改一个风格样式就能得到一个看上去相当不错的方向箭头按钮。<br /><br /> 然而,我对Button组件还是不能感到满意。最大的遗憾就是:对它的外观,所能做的工作也就仅限于此了。如果你想让按钮拥有一个漂亮的、渐变色的背景和一些特殊的文字效果,怎么办呢?答案是没有办法。Button类里面似乎没有任何方法提供我想要的功能。
2010-06-01 13:50:00
518
1
原创 swt与swing的比较
<br />1. 组件体系:<br /> a) Swing:通过在父组件上动态调用add()和remove()方法,来对组件树进行动态维护,因此,可以存在没有父组件的子组件。<br /> b) SWT:通过在构造函数的参数中,指定父组件,因此,不可能存在没有父组件的子组件。<br />2. 组件绘制:<br /> a) Swing:通过调用组件的paint()方法来进行组件的绘制,组件进一步对他的子组件调用paint(),从而完成整棵组件树的绘制。通过子类化,重写paint()方法,可以完
2010-06-01 13:34:00
472
转载 App widgets
App Widgets are miniature application views that can be embedded in other applications (such as the Home screen) and receive periodic updates. These views are referred to as Widgets in the user interf
2009-12-05 19:45:00
687
转载 2D Graphics
Android offers a custom 2D graphics library for drawing and animating shapes and images. The android.graphics.drawable and android.view.animation packages are where youll find the common classes used
2009-12-05 19:44:00
820
转载 Graphics
Android graphics are powered by a custom 2D graphics library and OpenGL ES 1.0 for high performance 3D graphics. The most common 2D graphics APIs can be found in the drawable package. OpenGL APIs are
2009-12-05 19:43:00
466
转载 The AndroidManifest.xml File
Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest presents essential information about the application to the Android system, infor
2009-12-05 19:38:00
1397
转载 Security and Permissions
Android is a multi-process system, in which each application (and parts of the system) runs in its own process. Most security between applications and the system is enforced at the process level throu
2009-12-05 19:37:00
489
转载 Content Providers
Content providers store and retrieve data and make it accessible to all applications. Theyre the only way to share data across applications; theres no common storage area that all Android packages c
2009-12-05 19:36:00
702
转载 Data Storage
A typical desktop operating system provides a common file system that any application can use to store files that can be read by other applications (perhaps with some access control settings). Android
2009-12-05 19:35:00
515
转载 Intents and Intent Filters
Three of the core components of an application — activities, services, and broadcast receivers — are activated through messages, called intents. Intent messaging is a facility for late run-time bindin
2009-12-05 19:34:00
1055
转载 Available Resource Types
This page describes the different types of resources that you can externalize from your code and package with your application. For more details on how to use resources in your application, please s
2009-12-05 19:33:00
1063
转载 Resources and Internationalization
Resources are external files (that is, non-code files) that are used by your code and compiled into your application at build time. Android supports a number of different kinds of resource files, incl
2009-12-05 19:31:00
505
转载 How android draws views
When an Activity receives focus, it will be requested to draw its layout. The Android framework will handle the procedure for drawing, but the Activity must provide the root node of its layout hi
2009-11-11 10:39:00
362
转载 Common layout objects
This section describes some of the more common types of layout objects to use in your applications. Like all layouts, they are subclasses of ViewGroup.Also see the Hello Views tutorials for some
2009-11-11 10:38:00
447
转载 Build custom components
Android offers a sophisticated and powerful componentized model for building your UI, based on the fundamental layout classes: View and ViewGroup. To start with, the platform includes a variety of
2009-11-11 10:37:00
461
转载 Binding to data with AdapterView
The AdapterView is a ViewGroup subclass whose child Views are determined by an Adapter that binds to data of some type. AdapterView is useful whenever you need to display stored data (as opposed to
2009-11-11 10:37:00
408
转载 Notifying the user
Several types of situations may arise that require you to notify the user about an event that occurs in your application. Some events require the user to respond and others do not. For example:
2009-11-11 10:35:00
412
转载 Applying styles and themes
When designing your application, you can use styles and themes to apply uniform formatting to its various screens and UI elements. A style is a set of one or more formatting attributes that you
2009-11-11 10:35:00
495
1
转载 Handling UI events
On Android, theres more than one way to intercept the events from a users interaction with your application. When considering events within your user interface, the approach is to capture the eve
2009-11-11 10:34:00
385
转载 Create dialogs
A dialog is usually a small window that appears in front of the current Activity. The underlying Activity loses focus and the dialog accepts all user interaction. Dialogs are normally used for noti
2009-11-11 10:33:00
435
转载 Create menus
Menus are an important part of any application. They provide familiar interfaces that reveal application functions and settings. Android offers an easy programming interface for developers to provi
2009-11-11 10:32:00
488
转载 Declare layout
Your layout is the architecture for the user interface in an Activity. It defines the layout structure and holds all the elements that appear to the user. You can declare your layout in two ways:
2009-11-11 10:30:00
448
1
转载 User Interface
In an Android application, the user interface is built using View and ViewGroup objects. There are many types of views and view groups, each of which is a descendant of the View class.View object
2009-11-11 10:28:00
365
转载 android guide
Android applications are written in the Java programming language. The compiled Java code — along with any data and resource files required by the application — is bundled by the aapt tool into an And
2009-10-30 13:12:00
569
转载 java程序员面试必备的32个要点
很经典的东西,被转的到处都是, 先写原文: 第一,谈谈final, finally, finalize的区别。 final 用于声明属性,方法和类,分别表示属性不可变,方法不可覆盖,类不可继承。finally是异常处理语句结构的一部分,表示总是执行。finalize是 Object类的一个方法,在垃圾收集器执行的时候会调用被回收对象的此方法,可以覆盖此方法提供垃圾收集时的其他资源回收,例如关闭文
2009-01-12 15:25:00
282
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人