`
studyworks
  • 浏览: 16774 次
  • 性别: Icon_minigender_1
  • 来自: 西安
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表

ubuntu识别真机

    博客分类:
  • java
sudo vim /etc/udev/rules.d/50-android.rules  # add SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" sudo chmod a+rx /etc/udev/rules.d/50-android.rules  #go to tools of android sdk  sudo ./adb kill-server sudo ./adb devices
sudo apt-get install zlib1g-dev ruby extconf.rb make && sudo make install。  public void static main(String[] args){ System.out.println("xxxxxxxx"); }  

visibility vs display

当visibility被设置为"hidden"的时候,元素虽然被隐藏了,但它仍然占据它原来所在的位置,而且width和height属性不为空       display设为"none"后width和height属性为空。         可以通过 设置 visibility为"hidden", 并且设置position为absolute, 让他不占据原来的位置并且保留width和height属性    
mouseenter/mouseleave prevent the event bubbling
1. Marks     m{a-z}   在光标处设置标记, 然后通过`{a-z}回到标记处, 或'{a-z}回到标记的行首.     例如用mm来标记,然后用‘m跳回标记处。    :help :mark 可以了解更多高级用法。     2.  Grep      下载Grep.vim(http://www.vim.org/scripts/script.php?script_id=311 )       然后使用:Grep -r pattern dir,  -r 表示recursive. 如果pattern中有空格,只能通过Grep ...
instance_exec allows you pass arguments to the block which is to be evaluated in the new self: o = Struct.new(:val).new("Hello") o.instance_exec("World!"){|arg| val + " " + arg} # => Hello World!  reference: http://eigenclass.org/hiki.rb?instance_exec
Moving lines up or down in a file From Vim Tips Wiki Tip 646 Previous Next created 2004 · complexity basic · author Frank Butler · version 6.0 The following mappings in your vimrc provide a quick way to move lines of text up or down. The mappings work in normal, insert and visual modes, all ...
   首先定义模型, User和Article为一对多的双向关联。   @Entity public class User { @Id @GeneratedValue private int id; private String name; @OneToMany(mappedBy = "user", cascade = CascadeType.ALL)   @Entity public class Article { @Id @GeneratedValue private int id; private String title; @ManyToOne ...
  功能和外观和fins的ecside差不多,  最大的不同是: 分页、查询等操作是 在页面中(tag)进行的,而不是在controller中进行,有些callback的味道.   这样做最大的优点在于web层代码非常简单,  在spring mvc中: //创建FilterList(一个用于收集查询条件的类)的帮助方法,并将DataProvider(用于在列表标签中查询数据)存储在ModelMap中。 FilterList newFilterList(Class<?> entityClass, ModelMap mm){ FilterList fl = new Fil ...
download the latest vim (vim-7.1.293) source code (see http://www.vim.org/download.php), and compiled it:   cd vim7   ./configure --with-features=huge   make   make install if "You need to install a terminal library; for example ncurses." show after `./configure --with-features=huge`, type ...
persist() is well defined. It makes a transient instance persistent. However, it doesn't guarantee that the identifier value will be assigned to the persistent instance immediately, the assignment might happen at flush time. The spec doesn't say that, which is the problem I have with persist(). pers ...
模型如下: @Entity public class Topic { @Id @GeneratedValue private int id; private String title; private Date createdAt; ....... }      用法如下: public interface TopicDao { @Find Topic find(int id); @Find(load = true) Topic load(int id); @Save void save(Topic topic); @Delete voi ...
    :delete_all is much faster than :destroy_all, it doesn't trigger any destroy callbacks on the associated object.        :destroy_all iteratively call the associated objects's destroy method
Notice that the second time I invoke the association via user, the object_id remains the same. The related object has been cached. However, passing true to the accessor reloads the relationship and I get a new instance. >> ts = Timesheet.find :first => #<Timesheet:0x3454554 @attributes={ ...
1. << is transactional, create is not 2. << method triggers the :before_add and :after_add callbacks, but the create method does not 3. << method returns operation_success ? association_proxy : false, while the create method returns the new instance created.
Global site tag (gtag.js) - Google Analytics