• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            Cpper
            C/C++高級工程師 Android高級軟件工程師 IT集成工程師 音頻工程師 熟悉c,c++,java,c#,py,js,asp等多種語言 程序猿

            void toString(QString& buffer)
            {
                QRegExp rx(
            "(\\\\u[0-9a-fA-F]{4})");
                
            int pos = 0;
                
            while ((pos = rx.indexIn(buffer, pos)) != -1) {
                    buffer.replace(pos
            ++6, QChar(rx.cap(1).right(4).toUShort(016)));
                }
            }
            posted @ 2017-04-27 19:52 ccsdu2009 閱讀(1410) | 評論 (0)編輯 收藏
             
            class KDJ:
                history 
            = []
                code 
            = ''
                min 
            = 99999.99
                max 
            = 0.0
                k 
            = 0.0
                d 
            = 0.0
                rsv 
            = 0.0

                
            def __init__(self,code):
                    self.code 
            = code

                
            def checkMinAndMax(self,n):
                    min 
            = 99999.9
                    max 
            = 0.0
                    
            for item in self.history:
                        
            if item[3< min:
                            min 
            = item[3]
                        
            if item[4> max:
                            max 
            = item[4]
                    
            return [min,max]

                
            def update(self,date,start,close,low,high,n):
                    self.history.append([date,start,close,low,high])
                    
            if len(self.history) < n:
                        self.min 
            = min(self.min,low)
                        self.max 
            = max(self.max,high)

                        
            return [date,self.k,self.d,0,start,close,low,high]
                    
            else:
                        
            if len(self.history) > n:
                            
            del self.history[0]
                        
                        p 
            = self.checkMinAndMax(n)
                        
                        rsv 
            = (close - p[0])/(p[1]-p[0])*100.0

                        oldk 
            = self.k
                        oldd 
            = self.d

                        self.k 
            = (rsv + 2*oldk)/3.0
                        self.d 
            = (self.k + 2*oldd)/3.0

                        self.k 
            = min(100,max(self.k,0))
                        self.d 
            = min(100,max(self.d,0))
                        j 
            = 3*self.k - 2*self.d
                        j 
            = min(100,max(j,0))

                        
            return [date,self.k,self.d,j,start,close,low,high]
            posted @ 2017-04-01 14:57 ccsdu2009 閱讀(2380) | 評論 (0)編輯 收藏
             
            常規無法做到,使用setCellWidget(i,j,new QLabel(text));即可
            posted @ 2017-03-29 21:00 ccsdu2009 閱讀(2485) | 評論 (0)編輯 收藏
             
            setAlternatingRowColors ( bool enable );
            posted @ 2017-03-29 13:34 ccsdu2009 閱讀(1747) | 評論 (0)編輯 收藏
             
            以前還真沒用到過
            #include <iostream>
            #include 
            <algorithm>
            #include 
            <vector>
            #include 
            <queue>

            using namespace std;

            int main()
            {
                
            int arr[] = {2,3,4,5,8,2,9};
                std::priority_queue
            <int> data(arr,arr+7);
                std::cout
            <<"count:"<<data.size()<<std::endl;

                
            while(!data.empty())
                {
                    std::cout
            <<data.top()<<" ";
                    data.pop();
                }
                
            return 0;
            }
            posted @ 2017-03-26 10:30 ccsdu2009 閱讀(246) | 評論 (0)編輯 收藏
             
            #include <iostream>
            #include 
            <algorithm>

            using namespace std;

            template
            <class I,class F>
            get(I from,I to,F f)
            {
                I ret 
            = to;
                std::sort(from,to,f);
                
            while(from != to)
                {
                    
            if(*from != *(from+1))
                    {
                        ret 
            = from+1;
                        
            break;
                    }
                    from 
            ++;
                }
                
            return ret;
            }

            template
            <class T>
            bool isLessThen(T a,T b)
            {
                
            return a < b;
            }

            int main()
            {
                
            int arr[] = {2,3,4,5,8,2,9};
                
            int* itr = get(arr,arr+7,isLessThen<int>);
                cout 
            <<*itr<< endl;
                
            return 0;
            }
            posted @ 2017-03-26 09:43 ccsdu2009 閱讀(261) | 評論 (0)編輯 收藏
             
            QTextCursor cursor = textCursor();
            cursor.movePosition(QTextCursor::Start);
            setTextCursor(cursor);
            posted @ 2016-10-16 10:12 ccsdu2009 閱讀(717) | 評論 (0)編輯 收藏
             
            如下:
                foreach(QCPAxis* axis,mMacdRect->rangeDragAxes(Qt::Horizontal))
                    connect(mCustomPlot->xAxis,SIGNAL(rangeChanged(QCPRange)),axis,SLOT(setRange(QCPRange)));

            很簡單
            posted @ 2016-10-09 11:55 ccsdu2009 閱讀(1874) | 評論 (0)編輯 收藏
             
            posted @ 2016-10-08 15:15 ccsdu2009 閱讀(5539) | 評論 (0)編輯 收藏
             
            MACD計算代碼
            參數設置為12,23.9

            struct Macd
            {
               Macd():m12(
            0.0f),m26(0.0f),diff(0.0f),dea(0.0f),bar(0.0f),index(-1){}
               
            float m12;
               
            float m26;
               
            float diff;
               
            float dea;
               
            float bar;
               
            int index;

               
            void update(float value)
               {
                   index 
            ++;
                   
            if(index == 0)
                   {
                       m12 
            = value;
                       m26 
            = value;
                   }
                   
            else
                   {
                       m12 
            = m12 + (value - m12) * 2.0f/13.0f;
                       m26 
            = m26 + (value - m26) * 2.0f/27.0f;
                       diff 
            = m12 - m26;
                       
            if(index == 1)
                           dea 
            = 0.2*diff;
                       
            else
                           dea 
            = dea*0.8 + diff*0.2;
                       bar 
            = 2 * (-dea + diff);
                       std::cout
            <<diff<<" "<<dea<<" "<<bar<<std::endl;
                   }
               }
            };
            炒股的同學可以加入蝸牛選股群:297919841 驗證碼為來自博客園
            posted @ 2016-08-30 14:45 ccsdu2009 閱讀(5331) | 評論 (0)編輯 收藏
            僅列出標題
            共38頁: First 2 3 4 5 6 7 8 9 10 Last 
             
            国产精品久久久久AV福利动漫| 国产精品18久久久久久vr| 97热久久免费频精品99| 一本综合久久国产二区| 久久伊人色| 久久国产精品一区| 久久99精品国产一区二区三区| 看久久久久久a级毛片| 久久精品国产第一区二区三区| 人妻无码αv中文字幕久久琪琪布 人妻无码精品久久亚瑟影视 | 久久久久亚洲av成人无码电影| 日韩精品久久久久久| 91精品国产91久久| 99久久婷婷国产一区二区| 青青青青久久精品国产h久久精品五福影院1421 | 欧洲国产伦久久久久久久| 久久人与动人物a级毛片| 久久精品国产清自在天天线 | 中文字幕人妻色偷偷久久| 亚洲狠狠婷婷综合久久久久| 99久久中文字幕| 久久久国产精品| 亚洲精品乱码久久久久久久久久久久 | 久久www免费人成看片| 久久亚洲精品人成综合网| 2020久久精品国产免费| 久久久WWW免费人成精品| 国产毛片欧美毛片久久久| 亚洲狠狠久久综合一区77777| 色欲综合久久躁天天躁| 91精品国产91久久久久福利| 久久精品亚洲欧美日韩久久| 中文字幕日本人妻久久久免费| 久久精品国产免费| 久久精品国产免费观看三人同眠| 精品永久久福利一区二区| 亚洲婷婷国产精品电影人久久| 日韩人妻无码精品久久免费一 | 久久久久亚洲AV无码观看| 久久免费高清视频| 精品一二三区久久aaa片|