myeclipse激活码生成器+代码自动提醒

myeclipse 设置代码自动提醒功能

设置eclipse/myEclipse代码提示可以方便开发者,不用在记住拉杂的单词,只用打出首字母,就会出现提示菜单。如同dreamweaver一样方便。

设置超级自动提示:

1.菜单window->Preferences->Java->Editor->Content Assist-右边-auto-activaction栏下-Enable auto activation 选项要打上勾

2.Auto Activation triggers for java 后面 直接写入(新版eclipse可以直接写入长字符)“.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,([{”

3.设置反映时间,Auto activation delay 默认为200,一般设置为20~50 4.*此时设置完还没有达到超级提示,软件对类和接口还有很好的提示。

4.继续设置window->Preferences->Java->Editor->Content Assist展开->Advanced   上面的选项卡Select the proposal kinds contained in the 'default' content assist list: 中把7个选项全部勾上!此时设置结束,无论是语句,类,接口,关键字,还是方法,都能自动提示。


激活码生成器

public class GenerateRatings {


  public static void main(String[] args) throws IOException, ParserConfigurationException, SAXException {
    File out = new File("c:/1.txt");
    File docIds = new File("c:/movies.xml");
    Writer writer = new FileWriter(out); 
    writer.write("#The ratings, format is: user id, movie id, preference value\n");
    
    InputSource is = new InputSource(new FileInputStream(docIds));
    SAXParserFactory factory = SAXParserFactory.newInstance();
    factory.setValidating(false);
    SAXParser sp = factory.newSAXParser();
    Random random = new Random(0);//try the same seed for now
    DefaultHandler handler = new DocIdContentHandler(writer, random);
    //write out the randomly generated ratings
    sp.parse(is, handler);
    writer.flush();
    writer.close();
  }


  static class DocIdContentHandler extends DefaultHandler {
    private boolean inDocId;
    private StringBuilder builder = new StringBuilder();
    private Writer writer;
    private Random random;


    DocIdContentHandler(Writer writer, Random random) {
      this.writer = writer;
      this.random = random;
    }


    @Override
    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
      if (qName.equals("str") && attributes.getValue("name") != null && attributes.getValue("name").equals("docid")){
        inDocId = true;
      }


    }


    @Override
    public void characters(char[] chars, int offset, int len) throws SAXException {
      if (inDocId == true){
        builder.append(chars, offset, len);
      }
    }


    @Override
    public void endElement(String uri, String local, String qName) throws SAXException {
      if (inDocId == true){
        try {


          String itemId = builder.toString();
          //Randomly rate the item for some random number of users
          Set<String> seenUsers = new HashSet<String>();
          int numUsers = random.nextInt(100);
          for (int i = 0; i < numUsers; i++){
            //Pick a user out of the 990 available
            String userId = String.valueOf(random.nextInt(990));


            if (seenUsers.contains(userId) == false) {
              seenUsers.add(userId);
              writer.write(userId);
              writer.write(',');
              writer.write(itemId);
              writer.write(',');
              float pref = random.nextFloat() * 5;
              int p=Math.round(pref);
              writer.write(String.valueOf(p));
              writer.write('\n');
            }
          }
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
      }
      builder.setLength(0);
      inDocId = false;
    }
  }


}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值