精华内容
下载资源
问答
  • Hibernate07_Hibernate Query Language

    万次阅读 2020-08-06 18:09:54
    Hibernate07_Hibernate Query Language 例1: String hql = "from People"; Query query = session.createQuery(hql); List<People> list = query.list(); for(People people : list) { System.out.println...

    Hibernate07_Hibernate Query Language


    例1:

    String hql = "from People";
    Query query = session.createQuery(hql);
    List<People> list = query.list();
    for(People people : list) {
    	System.out.println(people);
    }
    
    People(id=1, name=张三, money=1000.0)
    People(id=2, name=李四, money=2000.0)
    People(id=3, name=王五, money=3000.0)
    People(id=4, name=小明, money=4000.0)
    People(id=5, name=小红, money=3000.0)
    People(id=6, name=小李, money=2000.0)
    People(id=7, name=BLU, money=3500.0)
    People(id=8, name=lily, money=4500.0)
    People(id=9, name=mary, money=5500.0)
    

    例2(分页查询)
    分页查询可以通过调用query的方法来完成:

    setFirstResult()	设置起始下标(从0开始)
    setMaxResult()	设置截取长度
    
    String hql = "from People";
    Query query = session.createQuery(hql);
    query.setFirstResult(1);
    query.setMaxResults(3);
    List<People> list = query.list();
    for(People people : list) {
    	System.out.println(people);
    }
    
    People(id=2, name=李四, money=2000.0)
    People(id=3, name=王五, money=3000.0)
    People(id=4, name=小明, money=4000.0)
    

    例3(where条件查询)

    String hql = "from People where id = 7";
    Query query = session.createQuery(hql);
    People people = (People) query.list().get(0);
    System.out.println(people);
    
    People(id=7, name=BLU, money=3500.0)
    

    注:通过以下两种方式都可以查出一条结果的值,但是用 list() 方法查出来的值不能为空,否则会报数组越界异常:java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

    People people = (People) query.list().get(0);
    
    People people = (People) query.uniqueResult();
    

    例4(模糊查询)

    String hql = "from People where name like '%小%'";
    Query query = session.createQuery(hql);
    List<People> list = query.list();
    for(People people : list) {
    	System.out.println(people);
    }
    
    People(id=4, name=小明, money=4000.0)
    People(id=5, name=小红, money=3000.0)
    People(id=6, name=小李, money=2000.0)
    

    例5(order by)asc/desc

    String hql = "from People order by id desc";
    Query query = session.createQuery(hql);
    List<People> list = query.list();
    for(People people : list) {
    	System.out.println(people);
    }
    
    People(id=9, name=mary, money=5500.0)
    People(id=8, name=lily, money=4500.0)
    People(id=7, name=BLU, money=3500.0)
    People(id=6, name=小李, money=2000.0)
    People(id=5, name=小红, money=3000.0)
    People(id=4, name=小明, money=4000.0)
    People(id=3, name=王五, money=3000.0)
    People(id=2, name=李四, money=2000.0)
    People(id=1, name=张三, money=1000.0)
    

    例6(查询实体属性)

    String hql = "select name from People where id = 7";
    Query query = session.createQuery(hql);
    String name = (String) query.uniqueResult();
    System.out.println(name);
    
    BLU
    

    例7(占位符)

    String hql = "from People where name = :name";
    Query query = session.createQuery(hql);
    query.setString("name", "BLU");
    People people = (People) query.uniqueResult();
    System.out.println(people);
    
    People(id=7, name=BLU, money=3500.0)
    

    例8(级联查询)

    String hql1 = "from Customer where name = :name";
    Query query1 = session.createQuery(hql1);
    query1.setString("name", "张三");
    Customer customer = (Customer) query1.uniqueResult();	
    String hql2 = "from Orders where customer = :customer";
    Query query2 = session.createQuery(hql2);
    query2.setEntity("customer", customer);
    List<Orders> list = query2.list();
    for(Orders orders : list) {
    	System.out.println(orders);
    }
    
    Orders [id=1, name=订单1]
    Orders [id=2, name=订单2]
    Orders [id=4, name=订单3]
    
    展开全文
  • Language ID

    千次阅读 2015-08-26 11:15:55
    Language IDLanguage ID and Code Pages Language ID and Code Page are different concept. The language determines the text and data formatting conventions. A code page is a character set, which can ...

    Language ID

    Language ID and Code Pages

    • Language ID and Code Page are different concept.
    • The language determines the text and data formatting conventions.
    • A code page is a character set, which can include numbers, punctuation marks, and other glyphs.
    • Different languages might use different code pages.
    • Different languages can use the same code pages: For example, the ANSI code page 1252 is used for English and most European languages.

    Language Identifiers

    A language identifier is constructed using the MAKELANGID macro.

    +-------------------------+-------------------------+
    |     SubLanguage ID      |   Primary Language ID   |
    +-------------------------+-------------------------+
    15                    10  9                         0   bit
    +-------------------------+-------------------------+

    Language ID in resource file

    LANGUAGE Primary Language ID, SubLanguage ID   

    Sample:

    LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED

    Language ID Constants

    $(WindowsSdkDir)Include\WinNT.h

    Common Use Language ID

    ID Dec. Primary language Prim. lang. symbol Sublanguage Sublang. symbol Code Page
    0x0804 2052 Chinese (zh) LANG_CHINESE_SIMPLIFIED Simplified (Hans) SUBLANG_CHINESE_SIMPLIFIED 936
    0x0404 1028 Chinese (zh) LANG_CHINESE_TRADITIONAL Traditional (Hant) SUBLANG_CHINESE_TRADITIONAL 950
    0x0405 1029 Czech (cs) LANG_CZECH Czech Republic (CZ) SUBLANG_CZECH_CZECH_REPUBLIC 1250
    0x0406 1030 Danish (da) LANG_DANISH Denmark (DK) SUBLANG_DANISH_DENMARK 1252
    0x0413 1043 Dutch (nl) LANG_DUTCH Netherlands (NL) SUBLANG_DUTCH 1252
    0x0409 1033 English (en) LANG_ENGLISH United States (US) SUBLANG_ENGLISH_US 1252
    0x040B 1035 Finnish (fi) LANG_FINNISH Finland (FI) SUBLANG_FINNISH_FINLAND 1252
    0x040c 1036 French (fr) LANG_FRENCH France (FR) SUBLANG_FRENCH 1252
    0x0407 1031 German (de) LANG_GERMAN Germany (DE) SUBLANG_GERMAN 1252
    0x0408 1032 Greek (el) LANG_GREEK Greece (GR) SUBLANG_GREEK_GREECE 1253
    0x040E 1038 Hungarian (hu) LANG_HUNGARIAN Hungary (HU) SUBLANG_HUNGARIAN_HUNGARY 1250
    0x040D 1037 Hebrew (he) LANG_HEBREW Israel (IL) SUBLANG_HEBREW_ISRAEL 1255
    0x0410 1040 Italian (it) LANG_ITALIAN Italy (IT) SUBLANG_ITALIAN 1252
    0x0411 1041 Japanese (ja) LANG_JAPANESE Japan (JP) SUBLANG_JAPANESE_JAPAN 932
    0x0412 1042 Korean (ko) LANG_KOREAN Korea (KR) SUBLANG_KOREAN 949
    0x0414 1044 Norwegian (no) LANG_NORWEGIAN Bokmål, Norway (NO) SUBLANG_NORWEGIAN_BOKMAL 1252
    0x0415 1045 Polish (pl) LANG_POLISH Poland (PL) SUBLANG_POLISH_POLAND 1250
    0x0416 1046 Portuguese (pt) LANG_PORTUGUESE Brazil (BR) SUBLANG_PORTUGUESE_BRAZILIAN 1252
    0x0816 2070 Portuguese (pt) LANG_PORTUGUESE Portugal (PT) SUBLANG_PORTUGUESE 1252
    0x0419 1049 Russian (ru) LANG_RUSSIAN Russia (RU) SUBLANG_RUSSIAN_RUSSIA 1251
    0x040A 1034 Spanish (es) LANG_SPANISH Spain, Traditional Sort (ES) SUBLANG_SPANISH 1252
    0x041D 1053 Swedish (sv) LANG_SWEDISH Sweden (SE) SUBLANG_SWEDISH 1252
    0x041F 1055 Turkish (tr) LANG_TURKISH Turkey (TR) SUBLANG_TURKISH_TURKEY 1254

    Reference Document

    展开全文
  • language model

    千次阅读 2015-12-01 16:38:08
    ARPA format language model http://www.statmt.org/book/slides/07-language-models.pdf Toolkits: - SRILM - IRSTLM

    Back-off model:

    S(wi|wi1ik+1)=C(wiik+1)C(wi1ik+1)αS(wi|wi1ik+2)ifC(wi1ik+1)>0otherwise

    Toolkits:

    Libraries:

    • NGram
    Create and manipulate n-gram language models encoded with weighted FSTs.
    • Thrax
    compile regular expressions and content-dependent rewrite grammars into weighted FSTs.
    展开全文
  • Language Type

    2012-08-03 17:31:15
    Statically typed language: A language in which types are fixed at compile time. Most statically typed languages enforce this by requiring you to declare all variables with their datatypes before usin

    Statically typed language:

    A language in which types are fixed at compile time. Most statically typed languages enforce this by requiring you to declare all variables with their datatypes before using them. Java and C are statically typed languages.

    Dynamically typed language:

    A language in which types are discovered at execution time; the opposite of statically typed. VBScript and Python are dynamically typed, because they figure out what type a variable is when you first assign it a value.

    Strongly typed language:

    A language in which types are always enforced. Java and Python are strongly typed. If you have an integer, you can't treat it like a string without explicitly converting it.

    Weakly typed language:

    A language in which types may be ignored; the opposite of strongly typed. VBScript is weakly typed. In VBScript, you can concatenate the string '12' and the integer 3 to get the string '123', then treat that as the integer 123, all without any explicit conversion.


    "Dive Into Python" 2.2.1



    展开全文
  • Larger-Context Language Modeling TLDR; The authors propose new ways to incorporate context (previous sentences) into a Recurrent Language Model (RLM). They propose 3 ways to model the context, and 2 w...
  • 资源文件 Language ID

    2018-09-03 10:59:32
    Language ID Language ID and Code Pages Language ID and Code Page are different concept. The language determines the text and data formatting conventions. A code page is a character set, which can ...
  • Language Server Protocol

    千次阅读 2019-01-15 03:11:08
    上个月,苹果公司 在 Swift.org 论坛上宣布,正在着手为 Swift 和 C 语言支持 Language Server Protocol(语言服务器协议,LSP)。 对于苹果公司而言,为所有 Swift 开发者 —— 包括非苹果平台上的 —— 提供高质....
  • Exploring the Limits of Language Modeling TLDR; The authors train large-scale language modeling LSTMs on the 1B word dataset to achieve new state of the art results for single models (51.3 -> 30 Pe...
  • Natural Language Processing

    2016-08-18 14:21:03
    Natural Language Processing Libraries for working with human languages. NLTK - A leading platform for building Python programs to work with human language data.Pattern - A web mining module ...
  • Language Identifiers

    千次阅读 2008-11-08 13:01:00
    Language Identifiers A language identifier is a standard international numeric abbreviation for the language in a country or geographical region. Each language has a unique language identifier (LANG
  • Character-Aware Neural Language Models TLDR; The authors build an LSTM Neural Language model, but instead of using word embeddings as inputs, they use the per-word outputs of a character-level CNN, pl...
  • 面向任务:Natural Language Understanding and Generation 论文地址:https://arxiv.org/abs/1905.03197 论文代码:暂未 0-1. 摘要 本文提出一个能够同时处理自然语言理解和生成任务UNIfied pre-trained Language M...
  • Multilingual Language Processing From Bytes TLDR; The authors train a deep seq-2-seq LSTM directly on byte-level input of several langauges (shuffling the examples of all languages) and apply it to NE...
  • IDEA language level 介绍

    千次阅读 2019-07-06 21:41:46
    IDEA 中 language level 介绍 转自“https://blog.csdn.net/ckc_666/article/details/79100804” 感谢这位兄台的博客。
  • 《The Swift Programming Language》中文文档

    千次下载 热门讨论 2015-01-24 19:14:09
    Hi大家好, 鉴于《The Swift Programming Language》中文文档版本繁杂,避免大家因为版本问题引起学习不便。@未来眼之老码团队 会定期发布最新的中文文档。大家有任何问题欢迎垂询! BR OldCoder Team
  • 【问题思考】Long-tail language

    万次阅读 2019-12-13 11:26:02
    远程分享工具Long-tail language是什么? long-tail其实是一种统计学的概率分布 指少部分样本在分布中占大量的比例,而其他的大部分样本只占了很少的部分。 有点像28定律。 在语言中,90%以上的人只使用少数的几个...
  • DSL(domain specific language

    千次阅读 2017-05-16 11:48:57
    领域专用语言(domain specific language / DSL)  首先给出Martin对DSL的定义:  Domain-Specific Language:A computer programming language of limited expressiveness focused on a particular domain   ...
  • Natural Language Comprehension with the EpiReader TLDR; The authors prorpose the “EpiReader” model for Question Answering / Machine Comprehension. The model consists of two modules: An Extractor ...
  • android Language
  • Recurrent Memory Network for Language Modeling TLDR; the authors present Recurrent Memory Network. These networks use an attention mechanism (memory bank, MB) to explicitly incorporate information abo...
  • Process Language Model

    2013-04-21 07:34:27
    Language Model分为两种,Process Language Model跟Sequence Language Model。 Sequence Language Model:所有长度的字符串所有的可能性,概率和为1. Process Language Model:对于任何一种长度的字符串所有的...
  • Ubuntu 设置中文 languagesupport

    千次阅读 2019-09-06 11:11:34
    Ubuntu 设置中文 languagesupport; 想设置系统为中文显示,发现在系统设置里的languagesupport里的中文是灰色的,并且拖动到列表最上面也不起作用,查了网上有说法 直接设置/etc/default/locale 如下: LANG=...
  • The Swift Programming Language中文完整版

    热门讨论 2014-06-13 09:18:11
    The Swift Programming Language中文完整版,内容整理自互联网翻译教程
  • HTTP头Accept-Language信息

    万次阅读 2018-10-28 10:43:54
    Content-Language 是一个 entity header (实体消息首部),用来说明访问者希望采用的语言或语言组合,这样的话用户就可以根据自己偏好的语言来定制不同的内容。 举个例子,假如设置了这样一条消息首部( "...
  • 对TexStudio配置拼写和语法检查LanguageTool功能

    万次阅读 多人点赞 2017-01-17 15:35:24
    对TexStudio配置拼写和语法检查LanguageTool功能 摘要 英文语法检查功能对写作英文paper具有很大的帮助意义,而且能节省很多时间。本文介绍了使用TexStudio写作latex格式的paper时,如何配置语法检查插件实现...
  • Strategies for Training Large Vocabulary Neural Language Models TLDR; The authors evaluate softmax, hierarchical softmax, target sampling, NCE, self-normalization and differentiated softmax (novel tec...
  • https://www.lifewire.com/compiled-language-2184210 参考外网解释,打不开就看我个人通俗的理解吧 解释性就是运行时候一步一步转换为机器语言,直接运行。 编译性就是先得把所有的转换为机器语言,运行时再运行...
  • 首先使用的studio的install flutter下载的flutter,默认下载的是flutter的beta分支,环境变量等设置好之后,可以成功创建项目,这个时候切换分支为stable,run创建好的项目会报如下错误(The specified language ...
  • The Swift Programming Language 中文版 更新到3.0

    千次下载 热门讨论 2016-09-23 12:37:08
    The Swift Programming Language 中文版 更新到3.0,官方文档翻译。
  • HTTP头--Accept-Language

    千次阅读 2020-02-11 14:54:37
    Accept-Language:表示浏览器所支持的语言。 当我们在开发国际化的网站时,后端接口的信息需要根据用户所使用的语言返回对应的内容。作为后端我需要前端在请求头的Accept-Language属性声明需要返回的语言。 格式 ...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 300,433
精华内容 120,173
关键字:

language