• <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++高級(jí)工程師 Android高級(jí)軟件工程師 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 閱讀(1421) | 評(píng)論 (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 閱讀(2396) | 評(píng)論 (0)編輯 收藏
             
            常規(guī)無法做到,使用setCellWidget(i,j,new QLabel(text));即可
            posted @ 2017-03-29 21:00 ccsdu2009 閱讀(2490) | 評(píng)論 (0)編輯 收藏
             
            setAlternatingRowColors ( bool enable );
            posted @ 2017-03-29 13:34 ccsdu2009 閱讀(1761) | 評(píng)論 (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 閱讀(252) | 評(píng)論 (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 閱讀(267) | 評(píng)論 (0)編輯 收藏
             
            QTextCursor cursor = textCursor();
            cursor.movePosition(QTextCursor::Start);
            setTextCursor(cursor);
            posted @ 2016-10-16 10:12 ccsdu2009 閱讀(726) | 評(píng)論 (0)編輯 收藏
             
            如下:
                foreach(QCPAxis* axis,mMacdRect->rangeDragAxes(Qt::Horizontal))
                    connect(mCustomPlot->xAxis,SIGNAL(rangeChanged(QCPRange)),axis,SLOT(setRange(QCPRange)));

            很簡(jiǎn)單
            posted @ 2016-10-09 11:55 ccsdu2009 閱讀(1885) | 評(píng)論 (0)編輯 收藏
             
            posted @ 2016-10-08 15:15 ccsdu2009 閱讀(5572) | 評(píng)論 (0)編輯 收藏
             
            MACD計(jì)算代碼
            參數(shù)設(shè)置為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;
                   }
               }
            };
            炒股的同學(xué)可以加入蝸牛選股群:297919841 驗(yàn)證碼為來自博客園
            posted @ 2016-08-30 14:45 ccsdu2009 閱讀(5344) | 評(píng)論 (0)編輯 收藏
            僅列出標(biāo)題
            共38頁: First 2 3 4 5 6 7 8 9 10 Last 
             
            亚洲色欲久久久综合网东京热| 丁香五月综合久久激情| 中文精品久久久久人妻| 少妇被又大又粗又爽毛片久久黑人| 日韩中文久久| 精品永久久福利一区二区 | 亚洲AV伊人久久青青草原| 99久久香蕉国产线看观香| 69久久夜色精品国产69| 亚洲精品综合久久| 91久久婷婷国产综合精品青草 | 精品国产99久久久久久麻豆| 国产精品美女久久久久| 伊人久久大香线蕉无码麻豆 | 亚洲国产精品成人久久蜜臀| 久久亚洲精品成人av无码网站| 久久精品国产亚洲av瑜伽| 久久久亚洲欧洲日产国码二区| 伊人久久综合热线大杳蕉下载| 97精品伊人久久久大香线蕉| 久久久久国产| 一本大道加勒比久久综合| 狠狠色丁香久久婷婷综合| 一本色道久久88综合日韩精品| 精品久久久久久久| 久久精品国产第一区二区三区 | 久久精品成人一区二区三区| 久久精品国产亚洲AV高清热| 97久久国产露脸精品国产| 久久人人爽人人爽人人片AV麻豆| 91超碰碰碰碰久久久久久综合| 国产精品一久久香蕉国产线看| 亚洲欧洲日产国码无码久久99| 国产69精品久久久久观看软件 | 久久久久九国产精品| 久久精品成人欧美大片| 国产成人无码精品久久久免费| 久久综合欧美成人| 99久久亚洲综合精品成人| 国产激情久久久久影院小草| 国产午夜精品久久久久九九|