ExtJS學習------Ext.define的繼承extend,用javascript實作類別似Ext的繼承,extjsext.define(1)Ext.define的繼承extend具體執行個體:Ext.onReady(function(){//Sup Class 父類Ext.define('Person',{config:{name:'bjsxt'} ,constructor:function(config){var me = this
演算法學習,演算法學習網站PriorityQuenue優先隊列就是作業調度類的ADT,這裡用二元堆積來實現。優先隊列最少有兩個操作:插入(Insert)和刪除最小者(DeleteMin)。插入操作圖解:圖片來源:www.educity.cn刪除操作圖解:圖片來源:www.cfanz.cn代碼實現:<pre name="code" class="cpp">//// main.cpp// binaryHeap//// Created by
解讀Unity中的CG編寫Shader系列一,解讀unitycgshaderCG=C for Graphics 用於電腦圖形編程的C語言超集前提知識點:1.CG代碼必須用CGPROGRAM。。。ENDCG括起來2.頂點著色器與片段著色器的主函數名稱可隨意,但需要再#pragma vert 與#pragma fragment中聲明並且與主函數名完全符合,shader才會找到入口3.float4是一種壓縮數組,float4 vert與float
HDU,hdu.edu.cnProblem DescriptionNumber theory is interesting, while this problem is boring.Here is the problem. Given an integer sequence a1, a2, …, an, let S(i) = {j|1<=j<i, and aj is a multiple of ai}. If S(i) is not empty, let f(i) be the
hdu 4960 Another OCD Patient(記憶化),hdu4960題目連結:hdu 4960 Another OCD Patient題目大意:給定一個長度為n的序列,然後再給出n個數ai,表示合成i個數的代價。每次可以將連續的子序列和成一個數,即為序列中各個項的和。要求將給定長度n的序列變成一個迴文串,一個數字只能被合成一次。解題思路:dp[l][r]表示從l到r被和成迴文串的最小代價,dp[l][r]=min(val(r−l+1),val(r−i+1)+
HDU 4965 Fast Matrix Calculation(矩陣快速冪),hdu4965HDU 4965 Fast Matrix Calculation題目連結矩陣相乘為AxBxAxB...乘nn次,可以變成Ax(BxAxBxA...)xB,中間乘nn - 1次,這樣中間的矩陣一個只有6x6,就可以用矩陣快速冪搞了代碼:#include <cstdio>#include <cstring>const int N = 1005;const int M =
SPOJ 1043 Can you answer these queries I 求任意區間最大連續子段和 線段樹,spojqueries題目連結:點擊開啟連結維護區間左起連續的最大和,右起連續的和。。#include <cstdio>#include <iostream>#include <algorithm>#include <string.h>#include <math.h>#include
Java基礎- super 和 this 解析,javasuper1. super關鍵字表示超(父)類的意思。this變數代表對象本身。2. super訪問父類被子類隱藏的變數或覆蓋的方法。當前類如果是從超類繼承而來的,當調用super.XX()就是調用基類版本的XX()方法。其中超類是最近的父類。3.調用super()