Skip to content

Instantly share code, notes, and snippets.

View kenmori's full-sized avatar
🏠
Working from home

KenjiMorita kenmori

🏠
Working from home
View GitHub Profile
@kenmori
kenmori / UserEntity.java
Created January 7, 2017 11:45
【glassFish】これが出たら疑う箇所Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.EntityManagerSetupException
@Entity
@SecondaryTables({
@SecondaryTable(name = "zipcode_tbl"),//not much!!
@SecondaryTable(name = "address_tbl"),
})
@Table(name="user_data_2")
public class UserEntity02 implements Serializable {
@Id @NotNull
private String id;
private String name;
@kenmori
kenmori / persistence.xml
Created January 7, 2017 12:30
【JavaDB/glassFish】解決!Internal Exception: java.sql.SQLSyntaxErrorException: 表またはビュー'[TABLE_NAME]'は存在しません。
<properties>
<!--add this code, if you use eclipselink -->
<property name="eclipselink.ddl-generation" value="create-tables"/>
@kenmori
kenmori / uninstall.sh
Created January 8, 2017 00:57
【Rust/rustup/multirust】uninstallしたい!「rustup cannot be installed alongside [Rust|multirust]. Please uninstall first」rustcが邪魔してrustupがinstallできない場合1つの方法
sudo /usr/local/lib/rustlib/uninstall.sh
@kenmori
kenmori / index.md
Created February 5, 2017 02:07
イベントデリゲーション

問321

イベントデリゲーションに関して。 こちらのDOMの

<ul id="todo-app">
  <li class="item">Walk the dog</li>
  <li class="item">Pay bills</li>
  <li class="item">Make dinner</li>
@kenmori
kenmori / Child-keys-must-be-unique.js
Last active February 10, 2017 12:43
keyを持つコードとkeyを持たないコード【React】これ。Warning: flattenChildren(...): Encountered two children with the same key, `keyName`. Child keys must be unique; when two children share a key, only the first child will be used.
////////no key////////keyを持たないで返しているコード///
const users = this.state.users.map(function (user){
return <User id={user.id} name={user.name} />;
});
////////add key//////keyを設定して返しているコード///
const users = this.state.users.map(function (user){
return <User id={user.id} key={user.id} name={user.name} />;
});
@kenmori
kenmori / gist:6c3cb9d5d6a15205a9a54a15e7fad37e
Last active February 15, 2017 12:00
flowtype/react. Required module not found
import React, { Component } from 'hogehogefolder/react';//error react. Required module not found
const MailToBtn = ({mailAddress, addClass, children }: Props) => (
<a className='block w100 ' href={mailAddress}>
<button className={`${addClass} appearanceNone outlineNone btnMain btnShadow1 size1 type1 btn100 pad0`} type='button'>
{children}
</button>
</a>
)
export default MailToBtn
[ignore]
.*/node_modules/.*
[include]
./resources/es6
[libs]//add flowtyed folder
./resources/decls
[options]
@kenmori
kenmori / enterns.js
Created February 15, 2017 12:08
add flowtyped js file to folder after set libs in .flowtype.config 【flowtype】これ。react. Required module not found
declare module 'hogehogefolder/react' {
declare module.exports: any;
}
@kenmori
kenmori / Required-module-not-found.txt
Created February 15, 2017 12:12
react. Required module not found
resources/es6/hogehoge/components/stateless/Button/MailToBtn.js:3
3: import React, { Component } from 'tel_fortune_lib/react';
^^^^^^^^^^^^^^^^^^^^^^^ hogehogefolder/react. Required module not found
@kenmori
kenmori / flowtype.js
Created February 18, 2017 11:19
【flowtype/React/Class】これ。how to fix 「Covariant property `[fn]` incompatible with contravariant use in ``` assignment of property `[fn]`」
////error
this._increment = this._increment.bind(this);
^^^^^^^^^^ property `_increment`. Covariant property `_increment` incompatible with contravariant use in
27: this._increment = this._increment.bind(this);
^^^^^^^^^^^^^^^ assignment of property `_increment`
/////// code ////////
constructor(props: Props){
super(props);
this.state = {