1. 시뮬레이션 링크


    My curious lotto simulation program was the opportunity to break the lottery.
    Actually, I did not buy lots of lotto.
    If you pay more than once,
    I dreamed of shit last time, and I had a great time. It is 20,000 won.
    Actually, I do not buy it with the expectation of winning, but a little hope of the common people's life? Or the pleasure of swelling in expectation? As a wordless expression
    I was making a purchase.
    But how long do I have to waste my monetary rehabilitation due to my unruly lotto with my naive simple mind? It is my lotto simulation program that I made with a little curiosity.
    I tested one million won worth of matches a day.
    The result was shocking.
    3 in 1, 4 in 10, about 5 in the suckle ~
    The average recovery cost is 20%, that is, about 1 million won.
    There was nothing more to think about.
    If I had one week worth of 1 million won and had the chance to take one third,
    Actually, I was really lucky if I had a lot of 5,000 won in a week and one in five.
    It is a feeling that this fucking country is throwing the cold dream of hopes like the fluffy dream of the common people in the name of lotto, and eating the money like the metallurgical metallurgy.

    I actually sprinkled my friends and acquaintances to try the test.
    The answer that came back from them was a terrible mant.

    "This is the right thing to do, how is it?

    And I gave them the proper mantle.

    "Your face is buggy"

    It is a program that has both sufficient debugging and number testing. There is no bug! That's the odds! If it's a bug, it's your face!
    In the meantime, due to the fact that we do not buy lotto in 2017
    1 week => 5,000 won
    1 month => 20,000 won
    12 months => 240,000 won

    The savings of 240,000 won were saved. Of course, it is calculated based on the premise that it does not take one fifth.

    Your investment is like this.

    I do not fall into gambling myself in despair ~


    http://story84.com/page.php?menu_idx=22&actType=detail&bbsIdx=4
    0

    댓글 추가

  2. Lotto simulation was made.
    The moment of production is simple.

    - How much does it take automatically to get the first place?

    - What is the average recall cost?

    - Can a lotto really be the hope of my life?



    The result was terrible.

    It did not take the first place even if it scored 1 billion ㅜ;

    It means that it takes a half-day to turn the billions of billions automatically to the more tiring ...



    Put away all the skeptic words.

    Publish the source.

    I am a 100% Open Source developer because I am an open mind developer.



    I have not yet entered the recurrence amount calculation routine, but it is about 20%.

    In other words, if you pay 1 million won, 200 thousand won is collected.



    The next version will include information on how much and how many percent of the salvage amount calculation formula is included.



    Lotto simulation simulation

    http://story84.com/page.php?menu_idx=15




    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    <?php
        $today_lotto = "5 10 13 27 37 41 4";
    ?>
     
    <style type="text/css">
        .lotto_div { display:inline-block;margin:5px;width:30px;height:30px;line-height:30px; }
        .lotto_div_list { display:inline-block;margin:5px;width:30px;height:30px;line-height:30px; }
    </style>
     
    <script type="text/javascript">
     
        var Lotto = {
            "TodayLotto"    : "".split(" "),
            "LottoRoof"        : 0,
            "LottoRoofCnt"    : 0,
            "LottoTimeOut"    : null,
     
            "LottoGo" : function(Cnt) {
                if ( this.LottoTimeOut != null ) {
                    alert("시뮬레이션 중입니다....");
                    return;
                }
     
                this.LottoRoof = Cnt;
                if ( confirm(number_format(Cnt / 10+ "만원 시뮬레이션을 하시겠습니까?") ) {
                    $("#ResultBox").show(500);
     
                    for ( var i = 1; i <= 5; i++ ) { // 1등부터 5등까지
                        $("#Lotto_" + i).val(0);
                        $("#LottoList_" + i).html("");
                    }
     
                    this.LottoTimeOut = setInterval("Lotto.LottoProc()"10);
                }
            },
     
            "LottoProc" : function() {
                this.LottoRoofCnt++;
                if ( this.LottoRoofCnt > this.LottoRoof ) {
                    console.log("스톱");
                    clearTimeout(this.LottoTimeOut);
                    this.LottoTimeOut = null;
                    this.LottoRoofCnt = 0;
                    this.LottoRoof = 0;
     
                    var str = "";
                    str += "시뮬레이션이 종료되었습니다.";
                    for(var i = 1; i <= 5; i++){
                        str += "\n\n" + i + "등 : " + $("#Lotto_" + i).val();
                    }
     
                    var get_money = 0;
                    get_money += parseInt($("#Lotto_5").val()) * 5000;
                    get_money += parseInt($("#Lotto_4").val()) * 50000;
                    get_money += parseInt($("#Lotto_3").val()) * 1500000;
     
                    str += "\n\n3 ~ 5등 획득금액 : " + number_format(get_money) + "원";
                    str += "\n\n1 ~ 3등까지 계산공식 알면 제보좀 해주세용. 계산공식 못찾겠음 T^T";
                    alert(str);
                    return;
                }
     
                var LottoArray = this.LottoGet();
                var LottoString = "";
                var LottoOk = 0;
                var LottoBonus = false;
                var Len = this.TodayLotto.length - 1;
                for ( var key in LottoArray ) {
                    var BgColor = "black";
                    for ( var i = 0; i < Len; i++ ) {
                        if ( this.TodayLotto[i] == LottoArray[key] ) {
                            LottoOk++;
                            BgColor = "green";
                            break;
                        }
                    }
     
                    if ( LottoArray[key] == this.TodayLotto[this.TodayLotto.length - 1] ) { // 보너스 번호
                        LottoBonus = true;
                    }
     
                    LottoString += "
    "
     + LottoArray[key] + "
    "
    ;
                }
                LottoString = "
    "
     + LottoString + "
    ";
                console.log(this.LottoRoofCnt + "번째 시도 : " + LottoOk);
     
                var LottoRank = null;
                switch ( LottoOk ) {
                    case :
                        LottoRank = 5break;
                    case :
                        LottoRank = 4break;
                    case :
                        LottoRank = LottoBonus ? 3break;
                    case :
                        LottoRank = 1break;
                }
     
                $("#LottoBox").html(LottoString);
                if ( LottoRank != null ) {
                    $("#Lotto_" + LottoRank).val(parseInt($("#Lotto_" + LottoRank).val()) + 1);
                    $("#LottoList_" + LottoRank).html(LottoString.replace(/lotto_div/gi, "lotto_div_list"+ $("#LottoList_" + LottoRank).html());
                }
     
                var String = "";
                String += number_format(this.LottoRoof) + " 회중 ";
                String += number_format(this.LottoRoofCnt) + " 회 진행중
    "
    ;
                String += "진행률 = " + Math.round(this.LottoRoofCnt / this.LottoRoof * 100+ "%
    "
    ;
                String += "결제금액 = " + number_format(this.LottoRoofCnt * 1000+ "원";
                $("#LottoBoxCount").html(String);
            },
     
            "LottoGet" : function() {
                var Lotto = new Array();
                var Count = 0;
                while ( Count < ) {
                    var Flag = true;
                    var Number = parseInt( Math.random() * 45 + 1;
                    for ( var i = 0; i < Count; i++ ) {
                        if ( Lotto[i] == Number ) {
                            Flag = false;
                            break;
                        }
                    }
     
                    if ( Flag ) {
                        Lotto[Count] = Number;
                        Count++;
                    }
                }
     
                return Lotto;
            }
        };
     
    </script>
     
    <div style="text-align:center;min-height:100%;height:auto !important;height:100%;">
        <div class="w3-panel w3-pale-green w3-leftbar w3-border-green">
            <p></p>
            <p class="w3-serif">
                <i>"버그 없습니다. 의심좀 하지 마세요 T^T"</i>
            </p>
            <p>돈 없으면 가상으로라도 때려보자!</p>
        </div>
        <div class="w3-panel w3-pale-green">
            <style type="text/css">
                @media all and (max-width:767px){
                    /* 모바일 CSS 작성 */
                    .ok_lotto { line-height:25px; width:25px; height:25px; }
                }
                @media all and (min-width:768px) and (max-width:1024px){
                    /* 태블릿 및 노트북 CSS 작성 */
                    .ok_lotto { line-height:40px; width:40px; height:40px; }
                }
                 
                @media all and (min-width:1025px){
                    /* 데스크탑 CSS 작성 */
                    .ok_lotto { line-height:50px; width:50px; height:50px; font-size:20px; }
                }
           </style>
            <h4>지난주 로또 번호</h4>
            <?php
                $LottoArray = explode(" ", $today_lotto);
                foreach ( $LottoArray as $key => $number ) {
                    if ( $key == 6 ) {
                        echo "<div style='display:inline-block;font-weight:bold;margin:5px;'> + </div>";
                    }
     
                    echo "<div class='w3-circle w3-indigo ok_lotto' style='display:inline-block;font-weight:bold;margin:5px;'>".$number."</div>";
                }
            ?>
        </div>
        <div style="margin-top:30px;">
            <div style="margin-top:10px;">
                <input type="button" class="w3-btn black" style="font-size:13px;" value="10만원" onclick="Lotto.LottoGo('100');">
                <input type="button" class="w3-btn black" style="font-size:13px;" value="100만원" onclick="Lotto.LottoGo('1000');">
                <input type="button" class="w3-btn black" style="font-size:13px;" value="1,000만원" onclick="Lotto.LottoGo('10000');">
                <input type="button" class="w3-btn black" style="font-size:13px;" value="1억원" onclick="Lotto.LottoGo('100000');">
            </div>
        </div>
        <div id="ResultBox" style="display:none;">
            <div style="margin-top:30px;" id="LottoBox_score">
                <hr>
                <table align="center" style="width:100%;">
                <tr>
                    <td><input type="button" class="w3-btn w3-dark-gray" value="1등" style="width:99%;" /></td>
                    <td><input type="button" class="w3-btn w3-dark-gray" value="2등" style="width:99%;" /></td>
                    <td><input type="button" class="w3-btn w3-dark-gray" value="3등" style="width:99%;" /></td>
                    <td><input type="button" class="w3-btn w3-dark-gray" value="4등" style="width:99%;" /></td>
                    <td><input type="button" class="w3-btn w3-dark-gray" value="5등" style="width:99%;" /></td>
                </tr>
                <tr>
                    <td><input type="button" class="w3-btn" value="0" style="width:99%;font-weight:bold;font-size:18px;" id="Lotto_1" /></td>
                    <td><input type="button" class="w3-btn" value="0" style="width:99%;font-weight:bold;font-size:18px;" id="Lotto_2" /></td>
                    <td><input type="button" class="w3-btn" value="0" style="width:99%;font-weight:bold;font-size:18px;" id="Lotto_3" /></td>
                    <td><input type="button" class="w3-btn" value="0" style="width:99%;font-weight:bold;font-size:18px;" id="Lotto_4" /></td>
                    <td><input type="button" class="w3-btn" value="0" style="width:99%;font-weight:bold;font-size:18px;" id="Lotto_5" /></td>
                </tr>
                </table>
            </div>
            <div style="margin-top:30px;font-weight:bold;font-size:18px;" id="LottoBoxCount"></div>
            <div style="margin-top:30px;" id="LottoBox"></div>
            <div>
                <?php
                for($i = 5; $i >= 1; $i--){
                    if($i == 5 || $i == 3){
                        echo "<div class='row'>";
                    }
                ?>
                    <div class="col-md-= 4){echo "6";}else{echo "4";} ?>" style="padding-left:1px;padding-right:1px;margin-bottom:10px;">
                        <div class="w3-pale-green w3-bottombar w3-border-green w3-border">
                            <p style="margin:5px 0px;">=$i?>등 리스트</p>
                        </div>
                        <div id="LottoList_" style="min-height:100px;max-height:300px;overflow-y:auto;border:1px solid #4CAF50;"></div>
                    </div>
                <?php
                    if($i == 4 || $i == 1){
                        echo "
    ";
                    }
                }
                ?>
            </div>
        </div>
    </div>
    cs
    0

    댓글 추가

  3. Simple chat.
    It really does not work.
    Only chat.
    It is also the whole chat room.
    There is only one database table. Hehehehe ~
    Polling method. (Called every second)

    The controller source is made in php, and the database is mysql.
    If you want a table schema or controller source, I'll give it to you.

    <script type="text/javascript">
        var chating = new function(){
            var msgIng = false;
            var startLoading = true;
            var already_idx = new Array();
            this.send = function(){
                var content = $("#content").val();
                if(content.trim() == "" || msgIng == true){
                    return;
                }
     
                $("#content").val("메세지 전송중입니다...");
                $("#content").attr("disabled"true);
                msgIng = true;
     
                $.get("chating_send.php",{content : content},
                    function(res){
                        try{
                            if(res.result == true){
                                // 메세지 전송 성공
                                msgIng = false;
                                $("#content").attr("disabled"false);
                                $("#content").val("");
                                $("#content").focus();
                            }
                            else {
                                alert(res.msg);
                            }
                        }catch(e){
                            alert("Error!" + e);
                        }
                    },"json"
                );
            }
     
            this.recv = function(){
                $.post("chating_recv.php",{already_idx : already_idx.join(",")},
                    function(res){
                        try{
                            if(res.result == true){
                                var data = res.data;
                                var msgUse = false;
                                for ( var i in data ){
                                    var content = data[i].content;
                                    var msg_key = "msg_" + data[i].idx;
                                    if ( document.getElementById(msg_key) == undefined ){
                                        var user = null;
                                        if ( data[i]['sess_id'== "" ){
                                            user = "나의대화";
                                        }
                                        else {
                                            user = data[i]['sess_id'+ " 님의 대화";
                                        }
     
                                        $("#chating_box").append("
    [ "
    +user+" ] " + content + "
    "
    +data[i].reg_date+"
    ");
     
                                        already_idx.push(data[i].idx);
                                        msgUse = true;
                                    }
                                }
     
                                if(msgUse == true || startLoading == true){
                                    $("#chating_box").scrollTop($("#chating_box")[0].scrollHeight);
                                }
     
                                if(startLoading == true){
                                    startLoading = false;
                                    $("#chating_box").css("background-image""");
                                }
     
                                chating.recv_start();
                            }
                            else {
                                alert(res.msg);
                            }
                        }catch(e){
                            alert("Error!" + e);
                        }
                    },"json"
                );
            }
     
            this.recv_start = function(){
                setTimeout(this.recv, 1000);
            }
     
            this.get_sess_list = function(){
                $.get("chating_session_list.php",{},
                    function(res){
                        try{
                            if(res.result == true){
                                $("#sess_list").html("");
                                var sess_list = res.sess_list;
                                var html = "

    세션 리스트

    "
    ;
                                for(i in sess_list){
                                    if ( sess_list[i] == "" ) {
                                        html += "
    "
     + sess_list[i] + " [본인]
    ";
                                    }
                                    else{
                                        html += "
    "
    +sess_list[i]+"
    ";
                                    }
                                }
                                $("#sess_list").append(html);
                                console.log("세션갱신ok");
                                chating.get_sess_start();
                            }
                            else {
                                alert(res.msg);
                            }
                        }catch(e){
                            alert("Error!" + e);
                        }
                    },"json"
                );
            }
     
            this.get_sess_start = function(){
                setTimeout(this.get_sess_list, 1000 * 60);
            }
        }
     
        $(document).ready(function(){
            chating.recv_start();
            chating.get_sess_list();
            $("#content").focus();
        });
     
    </script>
    <style type="text/css">
        @media all and (max-width:767px){
            /* 모바일 CSS 작성 */
            #chating_box { height:300px; }
        }
        @media all and (min-width:768px) and (max-width:1024px){
            /* 태블릿 및 노트북 CSS 작성 */
            #chating_box { height:500px; }
        }
         
        @media all and (min-width:1025px){
            /* 데스크탑 CSS 작성 */
            #chating_box { height:500px; }
        }
    </style>
     
    <div class="row" style="border:1px solid #e1e1e1;">
        <div class="col-md-10" id="chating_box" style="overflow-y:scroll;"></div>
        <div class="col-md-2 hidden-xs hidden-sm hidden-md" id="sess_list"></div>
        <div>
            <div class="col-md-10" style="padding:0px;">
                <input type="text" id="content" placeholder="대화내용을 입력해주세요." class="form-control" onkeypress="if(event.keyCode==13){chating.send();}" />
            </div>
            <div class="col-md-2" style="padding:0px;">
                <input type="button" style="width:100%;" class="btn btn-success" value="전송" onclick="chating.send();" />
            </div>
        </div>
    </div>


    0

    댓글 추가

  4. I do not think there will be any meaning if I write it by lecture.
    Since the existing JSP Spring MVC bulletin board lecture materials are so many, the lecture seems to be meaningless.
    I do not really have the ability to lecture.

    As an existing PHP developer, starting with development and looking at the code ignorer framework experience,
    JSP Spring MVC When I created the bulletin board,
    It is easy to manage library and collaborative development, development due to complete MVC pattern separation, and separation of DB and design.

    In fact, PHP development has a different coding style for each developer, so I'm busy analyzing new projects every time I see them, and that's the echo of print_r.
    Is PHP actually a standard framework like JAVA? (Code igniter and la label are now available), I have not been able to standardize the coding,


    http://story84.com/page.php?menu_idx=25&actType=detail&bbsIdx=1

    0

    댓글 추가

  5. Non-smoking Day 5
    Is my patience great?

    It is really good ...

    Even when office members smash cigarettes, they are not so excited.

    Of course I want a defendant.

    The more fruit you burn, the sweeter it is, and the more likely it is to forget the pleasure of cigarettes.

    Have you not been drinking yet?

    If you eat alcohol, you will end up with a great deal.

    One of my current changes in my condition is that my throat is cool. There seems to be no change other than that.



    A cigarette that I chose to save money, not smell, to be healthy, to give up all this and not want to break up.



    Come on, come on.


    http://story84.com/page.php?menu_idx=23&actType=detail&bbsIdx=3
    0

    댓글 추가

  6. C # - Kiwoom Securities API real-time analysis program development log - Get real-time contract information

    Original article: http://story84.com/page.php?menu_idx=24&actType=detail&bbsIdx=1

    Organize your work so far
    1. Completed Kiwoom Securities login process using Kiwoom Securities API.
    2. After signing in, the list of stocks (KOSDAQ, KOSPI) is completed.
    3. Use the Access Database to save the list of interesting items.
    4. We have completed the process of importing real-time contract information.

    The next task is to concatenate information into imported data and create an information pattern analysis algorithm!
    It's a lonely, hard, and hard work. But it is not without fun. However, since I am in C # with php, I can not adapt it .;;


    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Data.OleDb;
    using System.Drawing;
    using System.Linq;
    using System.Windows.Forms;
     
    namespace Auto_Stock
    {
        public partial class MainForm : Form
        {
            private string LoginName;
            private string LoginId;
     
            private string accFileName = "stock_db.accdb";
            private string dbPasswd = "admin";
     
            public MainForm()
            {
                InitializeComponent();
     
                /*
                OleDbConnection conn = new OleDbConnection();
                OleDbCommand connCmd = new OleDbCommand();
                Console.WriteLine("mainform start");
                try
                {
                    Console.WriteLine("db access start");
                    conn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + this.accFileName + ";Mode=ReadWrite;Jet OLEDB:Database Password=" + this.dbPasswd;
                    conn.Open();
                    connCmd.Connection = conn;
                    connCmd.CommandText = "INSERT INTO favorite(usr_id) VALUES(@usr_id)";
                    connCmd.Parameters.Add(new OleDbParameter("@usr_id", "test"));
                    connCmd.ExecuteNonQuery();    // 입력
                    connCmd.CommandText = "SELECT * FROM favorite";
                    OleDbDataReader oleData = connCmd.ExecuteReader(CommandBehavior.CloseConnection);
                    while (oleData.Read())
                    {
                        Console.WriteLine(oleData["userId"].ToString());
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
                finally
                {
                    conn.Close();
                }
                */
            }
     
            private void database_proc(string sql, Dictionary<stringstring> param)
            {
                OleDbConnection conn = new OleDbConnection();
                OleDbCommand connCmd = new OleDbCommand();
                try
                {
                    conn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + accFileName + ";Mode=ReadWrite;Jet OLEDB:Database Password=" + dbPasswd;
                    conn.Open();
                    connCmd.Connection = conn;
     
                    //connCmd.CommandText = "INSERT INTO favorite(usr_id) VALUES(@usr_id)";
                    connCmd.CommandText = sql;
                    foreach (KeyValuePair<stringstring> row in param)
                    {
                        //connCmd.Parameters.Add(new OleDbParameter("@usr_id", "test"));
                        connCmd.Parameters.Add(new OleDbParameter(row.Key, row.Value));
                    }
                    connCmd.ExecuteNonQuery();    // 입력
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Exception 에러발생 : " + ex.Message);
                }
                finally
                {
                    conn.Close();
                }
            }
     
            private Dictionary<intDictionary<stringstring>> database_select(string sql, Dictionary<intstring> columns)
            {
                OleDbConnection conn = new OleDbConnection();
                OleDbCommand connCmd = new OleDbCommand();
                Dictionary<intDictionary<stringstring>> list = new Dictionary<intDictionary<stringstring>>();
                try
                {
                    Console.WriteLine("select start");
                    conn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + this.accFileName + ";Mode=ReadWrite;Jet OLEDB:Database Password=" + this.dbPasswd;
                    conn.Open();
                    connCmd.Connection = conn;
     
                    //connCmd.CommandText = "SELECT * FROM favorite";
                    connCmd.CommandText = sql;
                    OleDbDataReader oleData = connCmd.ExecuteReader(CommandBehavior.CloseConnection);
                    int i = 0;
                    while (oleData.Read())
                    {
                        //Console.WriteLine("usr_id = " + oleData["usr_id"].ToString());
                        Dictionary<stringstring> list_row = new Dictionary<stringstring>();
                        foreach(KeyValuePair<intstring> row in columns)
                        {
                            string column = row.Value;
                            list_row[column] = oleData[column].ToString();
                        }
                        list[i++= list_row;
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
                finally
                {
                    conn.Close();
                }
     
                return list;
            }
     
            //로그인 버튼 클릭
            private void ButtonLogin_Click(object sender, EventArgs e)
            {
                if(LoginName != null)
                {
                    MessageBox.Show("이미 로그인 하셨습니다.");
                    return;
                }
     
                long Result;
                Result = axKHOpenAPI1.CommConnect();
                if (Result != 0)
                {
                    Console.WriteLine("로그인창 열기 실패!");
                }
                else
                {
                    Console.WriteLine("로그인창 열기 성공!");
                }
            }
     
            //로그인 후 개인정보 가져오기
            private void axKHOpenAPI1_OnEventConnect(object sender, AxKHOpenAPILib._DKHOpenAPIEvents_OnEventConnectEvent e)
            {
                Console.WriteLine("개인정보 가져오기 성공!");
                string UserName = axKHOpenAPI1.GetLoginInfo("USER_NAME");
                string UserId = axKHOpenAPI1.GetLoginInfo("USER_ID");
                ButtonLogin.Text = UserName + "(" + axKHOpenAPI1.GetLoginInfo("USER_ID"+  ")";
                LoginName = UserName;
                LoginId = UserId;
            }
     
            //전체종목리스트에서 주식 row를 클릭하면 실행
            private void listBoxStock_SelectedIndexChanged(object sender, EventArgs e)
            {
            }
     
            //종목리스트 불러오기
            bool IsListCall = false;
            bool 전체종목리스트_초기체크 = true;
            private void ButtonListCall_Click(object sender, EventArgs e)
            {
                if (LoginName == null)
                {
                    MessageBox.Show("로그인이 필요합니다.");
                }
                else
                {
                    if(IsListCall == true)
                    {
                        //MessageBox.Show("이미 호출된 상태입니다.");
                        //return;
                    }
     
                    Dictionary<stringstring> favorite_list = listVIew1_select();
                    //Console.WriteLine(favorite_list);
     
                    IsListCall = true;
     
                    전체종목리스트_초기체크 = true;
                    listView1.Items.Clear();
                    ListViewStock.Items.Clear();
                    ListViewStock.CheckBoxes = true// 항목옆에 확인란을 표시할지 여부를 선택합니다.
                    //ListViewStock.Click += new EventHandler(ListViewCheckClick);
                    //ListViewStock.OwnerDraw = true;
     
                    //GetCodeListByMarket 메소드는 메소드의 인자로 시장 구분 코드를 문자열로 넘겨주면 메소드의 리턴 값으로 해당 시장에 속해 있는 종목들의 종목 코드 목록을 리턴
                    //sMarket – 0:장내, 3:ELW, 4:뮤추얼펀드, 5:신주인수권, 6:리츠, 8:ETF, 9:하이일드펀드, 10:코스닥, 30:제3시장
                    Console.WriteLine("종목 불러오기 시작");
                    string[] marketList = { "0""10" };
                    int InCnt = 0;
                    int OutCnt = 0;
                    int i = 0;
                    foreach (string MNumber in marketList)
                    {
                        string result = axKHOpenAPI1.GetCodeListByMarket(MNumber);
                        string[] stockList = result.Split(';');
     
                        if (MNumber == "0")
                        {
                            InCnt = stockList.Count();
                        }
                        else
                        {
                            OutCnt = stockList.Count();
                        }
     
                        int listView1_cnt = 0;
                        foreach (string code in stockList)
                        {
                            if (code != "")
                            {
                                string StockName = axKHOpenAPI1.GetMasterCodeName(code);
     
                                //전체종목리스트 ListView row 만들자
                                ListViewItem item = new ListViewItem(""0);
                                item.Checked = false// 체크박스는 일단 false
                                if (favorite_list.ContainsKey(code))
                                {
                                    item.Checked = true;
                                    listView1_add(listView1_cnt.ToString(), code, favorite_list[code]); //관심종목추가
                                    listView1_cnt++;
                                }
                                else
                                {
                                    item.Checked = false;
                                }
     
                                //SubItem
                                item.SubItems.Add(i.ToString());
                                item.SubItems.Add(StockName);
                                item.SubItems.Add(code);
     
                                ListViewStock.Items.Add(item);
                                i++;
                            }
                        }
                    }
     
                    전체종목리스트_초기체크 = false;
     
                    //axKHOpenAPI1.SetInputValue("종목코드", 000030.ToString());
                    //axKHOpenAPI1.CommRqData("000030_주식기본정보", "opt10001", 0, "0101");
                    //axKHOpenAPI1.SetRealReg("0120", "000030", "9001;302;10;11;25;12;13", "1");  // 000030 종목을 실시간 추가등록
                    axKHOpenAPI1.SetRealReg("0120""000030""20;15""1");
                }
            }
     
            //ListView의 이벤트는 [디자인]창에서 속성모드에서 function 명을 추가해서 사용하자.
            //[전체종목리스트] 체크박스 클릭시 발생
            private void ListViewStock_ItemChecked(object sender, ItemCheckedEventArgs e)
            {
                //Console.WriteLine("ListViewStock_ItemChecked");
                //Console.WriteLine(e.Item.Checked); //true or false
                if(전체종목리스트_초기체크 == false//초기로딩시에는 실행이 되면 안됨!
                {
                    //Console.WriteLine(e.Item.SubItems.Count); //라인의 컬럼개수(4개)
                    //Console.WriteLine(e.Item.Index); //라인 row index 번호
                    //Console.WriteLine(e.Item.SubItems[2].Text); //유한양행
                    if (e.Item.Checked == true)
                    {
                        string sql = "INSERT INTO favorite(usr_id, stock_code, stock_name) VALUES(@usr_id, @stock_code, @stock_name)";
                        Dictionary<stringstring> param = new Dictionary<stringstring>();
                        param["@usr_id"= LoginId;
                        param["@stock_code"= e.Item.SubItems[3].Text; //000060
                        param["@stock_name"= e.Item.SubItems[2].Text; //하이트진로
                        database_proc(sql, param);
                    }
                    else
                    {
                        string sql = "DELETE FROM favorite WHERE usr_id = @usr_id AND stock_code = @stock_code";
                        Dictionary<stringstring> param = new Dictionary<stringstring>();
                        param["@usr_id"= LoginId;
                        param["@stock_code"= e.Item.SubItems[3].Text; //000060
                        database_proc(sql, param);
                    }
     
                    listView1_loading();
                }
            }
     
            private Dictionary<stringstring> listVIew1_select()
            {
                Dictionary<intstring> columns = new Dictionary<intstring>();
                int ci = 0;
                columns[ci++= "stock_code";
                columns[ci++= "stock_name";
                Dictionary<intDictionary<stringstring>> list = database_select("SELECT * FROM favorite WHERE usr_id = '" + LoginId + "'", columns);
                Dictionary<stringstring> favorite_list = new Dictionary<stringstring>();
                foreach (KeyValuePair<intDictionary<stringstring>> row in list)
                {
                    Console.WriteLine(row.Value["stock_code"+ " => " + row.Value["stock_name"]);
                    favorite_list[row.Value["stock_code"]] = row.Value["stock_name"];
                }
     
                return favorite_list;
            }
     
            private void listView1_loading()
            {
                listView1.Items.Clear();
                Dictionary<stringstring> favorite_list = listVIew1_select();
                int i = 0;
                foreach (KeyValuePair<stringstring> row in favorite_list)
                {
                    string number = i.ToString();
                    listView1_add(number, row.Key, row.Value);
                    i++;
                }
            }
     
            //관심종목 추가
            private void listView1_add(string number, string code, string codeString)
            {
                ListViewItem item2 = new ListViewItem(number, 0);
                item2.SubItems.Add(code);
                item2.SubItems.Add(codeString);
     
                listView1.Items.Add(item2);
            }
     
            //실시간 시세 이벤트라는데 뭔지 잘 몰겠다.
            //이게 보니깐 주기적으로 호출이 된다... 아마도 특정초단위로 알아서 호출되는 건가보다...
            private void axKHOpenAPI1_OnReceiveRealData(object sender, AxKHOpenAPILib._DKHOpenAPIEvents_OnReceiveRealDataEvent e)
            {
                //Console.WriteLine("sRealKey : " + e.sRealKey);
                //Console.WriteLine("sRealType : " + e.sRealType);
                //Console.WriteLine("sRealData : " + e.sRealData);
     
                //e.sRealKey = 종목코드
                //e.sRealType = 리얼타입 (주식시세, 주식체결 등)
                //e.sRealData = 실시간 데이터 전문
     
                if (e.sRealType == "주식체결")
                {
                    Console.WriteLine("===============================================================");
                    Console.WriteLine("현재가" + axKHOpenAPI1.GetCommRealData(e.sRealKey, 10));       // 현재가
                    Console.WriteLine("체결시간" + axKHOpenAPI1.GetCommRealData(e.sRealKey, 20));     // 체결시간
                    Console.WriteLine("체결량" + axKHOpenAPI1.GetCommRealData(e.sRealKey, 15));       // 체결량
                    //Console.WriteLine("누적거래량" + axKHOpenAPI1.GetCommRealData(e.sRealKey, 13));   // 누적거래량
                    //Console.WriteLine("체결강도" + axKHOpenAPI1.GetCommRealData(e.sRealKey, 228));    // 체결강도
                }
            }
        }
    }
     
    cs
    0

    댓글 추가

  7. You were my friend since I was 20 years old.

    You are the only one who comforted me without any answer

    Even though you are so expensive, you never left my side

    Your name, which dominated both my body and mind,



    In fact, the first attempt to break up with this friend has been tried since 2008.

    But the man I have is a very deep man, so I needed time to prepare myself for leaving my old friend who has been with me for a long time.



    And five years later, the bell was announced to announce the year 2013.

    It was a sound to announce my age 30.

    And I declared a breakup with him.

    Failed.

    I was still a poor personality to leave him, and my body still wanted him.



    Yeah, we'll just stay together.



    And until now time he and I are still enjoying the hot kiss.



    In the long-awaited 2017, I re-proclaimed separation from him.

    I think that his ransom, which climbed and climbed endlessly, began to give (not to) (but) enough to hurt my life. I do not want to make a decision because I'm not good at it.



    In fact, it is January 6,

    But I will now declare it as one day.



    If there is a meeting, there is a separation, and if there is a separation, there is a meeting ...

    Maybe the meeting with you is done again ...

    My body wants you, but my wallet hates you.

    My body will lean on my wallet for a while or when I do not know when it will be ...

    http://story84.com/page.php?menu_idx=23&actType=detail&bbsIdx=1
    0

    댓글 추가

  8. The word "friend"
    While I have friends who have spent a very long time together,
    There are friends who have spent a little time together but do not get tired of seeing them often.
    If you have a good friend together,
    I have an uncomfortable friend with me.
    There are friends who think hard, friends who think when they are happy, and friends.

    Recently, there were friends who were very hard on personal matters.
    He made people around him very tired and embarrassed just because he was hard.
    The friend seems to have had a desire to understand himself without being concerned about people because of his hardness.
    For me, a friend who has spent a very long time together, but his behavior has become a very uncomfortable friend for me.

    friend. It is not such a fluent word.
    Friends do not live my life,
    Friends do not solve my troubles,
    My friend does not make money for me.
    I think that it is worth it to be able to enjoy and share memories with friends when they are together.

    In the drama "KAIST" I remember the ambassador Kim Jong Tae spoke.
    "If you have lived your life and met one true friend and one dearest reason, it is a successful life"
    Am I living a successful life?

    http://story84.com/page.php?menu_idx=22&actType=detail&bbsIdx=1
    0

    댓글 추가


  9. 이마트에서 4마리 3만원에 판매한 홍게
    이렇게 가성비가 좋은 게가 있다는 건 놀랍고 상큼한 경험이다.
    냠냠~
    0

    댓글 추가

  10. 에구 이 야밤에 무슨 부귀영화를 누리겠다고 내가 이런 삽질을 하고 있는지 ㅠㅠ;



    저장소 생성
    svnadmin create --fs-type SVN명

    저장소 체크아웃 폴더 지정
    svn checkout file:///D:/eGov/workspace/CROL/SVN명

    SVN 서버 가동
    svnserve -d -r D:\eGov\workspace\CROL
    0

    댓글 추가

로드 중