This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct LinearProgram { | |
| let objective: [Double] | |
| let constraints: [[Double]] | |
| let sense: [Character] | |
| let rhs: [Double] | |
| } | |
| func simplex(lp: LinearProgram) -> [Double]? { | |
| var tableau = lp.constraints | |
| tableau.append(lp.objective) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const onSubmit = (values) => { | |
| console.log(ingredient, values); | |
| cache.modify({ | |
| id:cache.identify(ingredient), | |
| fields: { | |
| rcpNutrients(existNts, {readField}){ | |
| const index = existNts.findIndex(el => ingdNutrient.id === readField("id",el)); | |
| const newNts = [...existNts]; | |
| newNts[index] = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DO BEGIN | |
| DECLARE varDateTo VARCHAR(10); | |
| varDateTo := {?DateTo@}; | |
| tbResult = | |
| SELECT T0.* | |
| FROM "_SYS_BIC"."sap.{?Package@}.ar.case/CustomerReceivableAgingFact" | |
| (PLACEHOLDER."$$P_AgingDate$$" => :varDateTo) T0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dd.mm.yy | |
| to excel date | |
| =DATE("20"&RIGHT(B2,2),MID(B2,4,2),LEFT(B2,2)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ความแตกต่างระหว่าง docker run กับ docker exec | |
| docker run | |
| - docker run #{image} sh | |
| - จะมีการสร้าง temporary container ขึ้นมาเพื่อรัน command เมื่อรันเสร็จจะหยุด container แต่ไม่ terminate | |
| -- ดังนั้นจะมี container id ค้างอยู่ในระบบ | |
| docker exec | |
| - docker exec #{container} sh | |
| - จะใช้ container ที่มีอยู่แล้วในการรัน |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT * FROM _SYS_BIC."sap.db1.stock/InventoryTransactionDocumentsQuery"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Formik } from 'formik'; | |
| import * as Yup from 'yup'; | |
| class SignInScreen extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| username: null, | |
| password: null, | |
| rememberMe: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * ปกติการ ใช้ registerJs("") ของ yii2 จะทำให้การเขียน script ค่อนข้างยาก | |
| * ดังนั้นจึงเขียน javascript ในลักษณะนี้จะจัดการได้ง่ายกว่า ไม่ต้องคอยกังวลกับปัญหา "", '' | |
| */ | |
| <script type="text/javascript"> | |
| var obj = { | |
| init:function(){ | |
| $('#po-product_uom_qty').on('change',function(e){ | |
| obj.calculateAmount(); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ต้องใช้ทุกบรรทัดไล่ลงไป | |
| # git ignore wordpress but except themes-name | |
| wordpress/* | |
| !wordpress/wp-content | |
| wordpress/wp-content/* | |
| !wordpress/wp-content/themes | |
| wordpress/wp-content/themes/* | |
| !wordpress/wp-content/themes/twentyseventeen-child |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $( "#form-memberRegister" ).validate( { | |
| errorClass: "error", | |
| rules: { | |
| "formatted-citizenID": { | |
| required:true, | |
| remote:{ | |
| url: "action/checkCitizenID", | |
| type: "post", | |
| dataType:'json', | |
| data: { |
NewerOlder