Example #1
0
        public static bool checkSQL(string content)
        {
            unchecked {
                                #line 14 "D:\\project\\sangong\\sangong\\src\\utils\\SQLRex.hx"
                if ((content == null))
                {
                                        #line 15 "D:\\project\\sangong\\sangong\\src\\utils\\SQLRex.hx"
                    return(false);
                }

                                #line 20 "D:\\project\\sangong\\sangong\\src\\utils\\SQLRex.hx"
                global::haxe.root.EReg r = new global::haxe.root.EReg("(delete)|(drop)|(;)|(--)|(insert)|(drop)|(count)|(\\*)|(select)|(where)|(when)|(\\s+)|(\\()|(\\))|(\")|(0x)|(,)|(offset)|(<)|(>)|(=)|(&)|(\\|)|(ike)|(%)|(!)|(CHAR)|(#)", "");
                                #line 22 "D:\\project\\sangong\\sangong\\src\\utils\\SQLRex.hx"
                bool result = r.match(content);
                                #line 24 "D:\\project\\sangong\\sangong\\src\\utils\\SQLRex.hx"
                if (result)
                {
                                        #line 25 "D:\\project\\sangong\\sangong\\src\\utils\\SQLRex.hx"
                    global::haxe.Log.trace.__hx_invoke2_o(default(double), global::haxe.lang.Runtime.concat("warning content\u6709\u6f0f\u6d1e", content), default(double), new global::haxe.lang.DynamicObject(new int[] { 302979532, 1547539107, 1648581351 }, new object[] { "checkSQL", "utils.SQLRex", "src/utils/SQLRex.hx" }, new int[] { 1981972957 }, new double[] { ((double)(25)) }));
                }

                                #line 27 "D:\\project\\sangong\\sangong\\src\\utils\\SQLRex.hx"
                return(result);
            }
                        #line default
        }
Example #2
0
 public override object __hx_invoke1_o(double __fn_float1, object __fn_dyn1)
 {
                 #line 331 "C:\\HaxeToolkit\\haxe\\std\\haxe\\io\\Path.hx"
     global::haxe.root.EReg v = (((__fn_dyn1 == global::haxe.lang.Runtime.undefined)) ? (((global::haxe.root.EReg)(((object)(__fn_float1))))) : (((global::haxe.root.EReg)(__fn_dyn1))));
                 #line 331 "C:\\HaxeToolkit\\haxe\\std\\haxe\\io\\Path.hx"
     return(global::haxe.lang.Runtime.concat("-x", global::haxe.lang.Runtime.toString(global::haxe.lang.StringExt.charCodeAt(v.matched(0), 0))));
 }
Example #3
0
 public static string escape(string path, object allowSlashes)
 {
                 #line 329 "C:\\HaxeToolkit\\haxe\\std\\haxe\\io\\Path.hx"
     bool allowSlashes1           = (((allowSlashes == default(object))) ? (false) : (global::haxe.lang.Runtime.toBool(allowSlashes)));
     global::haxe.root.EReg regex = ((allowSlashes1) ? (new global::haxe.root.EReg("[^A-Za-z0-9_/\\\\\\.]", "g")) : (new global::haxe.root.EReg("[^A-Za-z0-9_\\.]", "g")));
                 #line 331 "C:\\HaxeToolkit\\haxe\\std\\haxe\\io\\Path.hx"
     return(regex.map(path, (((global::haxe.io.Path_escape_331__Fun.__hx_current != null)) ? (global::haxe.io.Path_escape_331__Fun.__hx_current) : (global::haxe.io.Path_escape_331__Fun.__hx_current = ((global::haxe.io.Path_escape_331__Fun)(new global::haxe.io.Path_escape_331__Fun()))))));
 }
Example #4
0
 public static bool isTuning(string name)
 {
     unchecked
     {
         global::haxe.root.EReg regex = global::alphatab.model.Tuning.TuningRegex;
         return(regex.match(name));
     }
 }
Example #5
0
 public override object __hx_invoke1_o(double __fn_float1, object __fn_dyn1)
 {
     unchecked {
                         #line 326 "C:\\HaxeToolkit\\haxe\\std\\haxe\\io\\Path.hx"
         global::haxe.root.EReg regex1 = (((__fn_dyn1 == global::haxe.lang.Runtime.undefined)) ? (((global::haxe.root.EReg)(((object)(__fn_float1))))) : (((global::haxe.root.EReg)(__fn_dyn1))));
                         #line 326 "C:\\HaxeToolkit\\haxe\\std\\haxe\\io\\Path.hx"
         return(global::haxe.lang.StringExt.fromCharCode(((int)(global::haxe.lang.Runtime.toInt(global::haxe.root.Std.parseInt(regex1.matched(1)))))));
     }
                 #line default
 }
Example #6
0
        private static void __hx_ctor__EReg(global::haxe.root.EReg __hx_this, string r, string opt)
        {
            unchecked {
                                #line 35 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                int opts = ((int)(global::haxe.lang.Runtime.toInt(((object)(global::System.Text.RegularExpressions.RegexOptions.CultureInvariant)))));
                {
                                        #line 36 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                    int _g = 0;
                                        #line 36 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                    int _g1 = opt.Length;
                                        #line 36 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                    while ((_g < _g1))
                    {
                                                #line 36 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                        int i = _g++;
                                                #line 38 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                        switch (((int)(opt[i])))
                        {
                        case 103:
                        {
                                                                #line 42 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                            __hx_this.isGlobal = true;
                                                                #line 42 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                            break;
                        }


                        case 105:
                        {
                                                                #line 40 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                            opts |= ((int)(global::haxe.lang.Runtime.toInt(((object)(global::System.Text.RegularExpressions.RegexOptions.IgnoreCase)))));
                                                                #line 40 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                            break;
                        }


                        case 109:
                        {
                                                                #line 44 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                            opts |= ((int)(global::haxe.lang.Runtime.toInt(((object)(global::System.Text.RegularExpressions.RegexOptions.Multiline)))));
                                                                #line 44 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                            break;
                        }
                        }
                    }
                }

                                #line 52 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\EReg.hx"
                __hx_this.regex = new global::System.Text.RegularExpressions.Regex(((string)(r)), ((global::System.Text.RegularExpressions.RegexOptions)(((object)(opts)))));
            }
                        #line default
        }
Example #7
0
        public static void __hx_ctor__EReg(global::haxe.root.EReg __temp_me5, string r, string opt)
        {
            unchecked
            {
                int opts = ((int)(global::haxe.lang.Runtime.toInt(((object)(global::System.Text.RegularExpressions.RegexOptions.CultureInvariant)))));
                {
                    int _g1 = 0;
                    int _g  = opt.Length;
                    while ((_g1 < _g))
                    {
                        int i = _g1++;
                        {
                            int _g2 = default(int);
                            _g2 = ((int)(opt[i]));
                            switch (_g2)
                            {
                            case 105:
                            {
                                opts |= ((int)(global::haxe.lang.Runtime.toInt(((object)(global::System.Text.RegularExpressions.RegexOptions.IgnoreCase)))));
                                break;
                            }


                            case 103:
                            {
                                __temp_me5.isGlobal = true;
                                break;
                            }


                            case 109:
                            {
                                opts |= ((int)(global::haxe.lang.Runtime.toInt(((object)(global::System.Text.RegularExpressions.RegexOptions.Multiline)))));
                                break;
                            }


                            case 99:
                            {
                                opts |= ((int)(global::haxe.lang.Runtime.toInt(((object)(global::System.Text.RegularExpressions.RegexOptions.Compiled)))));
                                break;
                            }
                            }
                        }
                    }
                }

                __temp_me5.regex = new global::System.Text.RegularExpressions.Regex(global::haxe.lang.Runtime.toString(r), ((global::System.Text.RegularExpressions.RegexOptions)(((object)(opts)))));
            }
        }
Example #8
0
 public static string unescape(string path)
 {
                 #line 325 "C:\\HaxeToolkit\\haxe\\std\\haxe\\io\\Path.hx"
     global::haxe.root.EReg regex = new global::haxe.root.EReg("-x([0-9][0-9])", "g");
     return(regex.map(path, (((global::haxe.io.Path_unescape_326__Fun.__hx_current != null)) ? (global::haxe.io.Path_unescape_326__Fun.__hx_current) : (global::haxe.io.Path_unescape_326__Fun.__hx_current = ((global::haxe.io.Path_unescape_326__Fun)(new global::haxe.io.Path_unescape_326__Fun()))))));
 }
Example #9
0
        public static int getTuningForText(string str)
        {
            unchecked
            {
                int @base = 0;
                global::haxe.root.EReg regex = global::alphatab.model.Tuning.TuningRegex;
                if (regex.match(str.ToLower()))
                {
                    string note = regex.matched(1);
                    global::haxe.lang.Null <int> octave = global::Std.parseInt(regex.matched(2));
                    if (string.Equals(note, "c"))
                    {
                        @base = 0;
                    }
                    else
                    {
                        if (string.Equals(note, "db"))
                        {
                            @base = 1;
                        }
                        else
                        {
                            if (string.Equals(note, "d"))
                            {
                                @base = 2;
                            }
                            else
                            {
                                if (string.Equals(note, "eb"))
                                {
                                    @base = 3;
                                }
                                else
                                {
                                    if (string.Equals(note, "e"))
                                    {
                                        @base = 4;
                                    }
                                    else
                                    {
                                        if (string.Equals(note, "f"))
                                        {
                                            @base = 5;
                                        }
                                        else
                                        {
                                            if (string.Equals(note, "gb"))
                                            {
                                                @base = 6;
                                            }
                                            else
                                            {
                                                if (string.Equals(note, "g"))
                                                {
                                                    @base = 7;
                                                }
                                                else
                                                {
                                                    if (string.Equals(note, "ab"))
                                                    {
                                                        @base = 8;
                                                    }
                                                    else
                                                    {
                                                        if (string.Equals(note, "a"))
                                                        {
                                                            @base = 9;
                                                        }
                                                        else
                                                        {
                                                            if (string.Equals(note, "bb"))
                                                            {
                                                                @base = 10;
                                                            }
                                                            else
                                                            {
                                                                if (string.Equals(note, "b"))
                                                                {
                                                                    @base = 11;
                                                                }
                                                                else
                                                                {
                                                                    return(-1);
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    @base += (((octave.@value + 1)) * 12);
                }
                else
                {
                    return(-1);
                }

                return(@base);
            }
        }
Example #10
0
        protected static void __hx_ctor_hx_ws_WebSocket(global::hx.ws.WebSocket __hx_this, string uri)
        {
            unchecked {
                                #line 122 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                __hx_this._encodedKey = "wskey";
                                #line 121 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                __hx_this._key = "wskey";
                                #line 126 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                {
                                        #line 127 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    global::haxe.root.EReg uriRegExp = new global::haxe.root.EReg("^(\\w+?)://([\\w\\.-]+)(:(\\d+))?(/.*)?$", "");
                                        #line 129 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    if (!(uriRegExp.match(uri)))
                    {
                                                #line 130 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                        throw global::haxe.lang.HaxeException.wrap(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("Uri not matching websocket uri \"", uri), "\""));
                    }

                                        #line 132 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    string proto = uriRegExp.matched(1);
                    if ((proto == "wss"))
                    {
                                                #line 135 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                        throw global::haxe.lang.HaxeException.wrap("Secure sockets not implemented");
                    }
                    else if ((proto == "ws"))
                    {
                                                #line 142 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                        __hx_this._port = 80;
                        global::hx.ws.WebSocketCommon.__hx_ctor_hx_ws_WebSocketCommon(__hx_this, null);
                    }
                    else
                    {
                                                #line 145 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                        throw global::haxe.lang.HaxeException.wrap(global::haxe.lang.Runtime.concat("Unknown protocol ", proto));
                    }

                                        #line 148 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    __hx_this._host = uriRegExp.matched(2);
                    object parsedPort = global::haxe.root.Std.parseInt(uriRegExp.matched(4));
                                        #line 150 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    if ((((int)(global::haxe.lang.Runtime.toInt(parsedPort))) > 0))
                    {
                                                #line 151 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                        __hx_this._port = ((int)(global::haxe.lang.Runtime.toInt(parsedPort)));
                    }

                                        #line 153 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    __hx_this._uri = uriRegExp.matched(5);
                    if (((__hx_this._uri == null) || (__hx_this._uri.Length == 0)))
                    {
                                                #line 155 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                        __hx_this._uri = "/";
                    }

                                        #line 157 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    __hx_this._socket.setBlocking(true);
                                        #line 159 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    __hx_this._socket.connect(new global::sys.net.Host(((string)(__hx_this._host))), __hx_this._port);
                                        #line 162 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    __hx_this._socket.setBlocking(false);
                                        #line 181 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    global::hx.ws.WebSocket ws = __hx_this;
                    global::haxe.MainLoop.addThread(new global::hx.ws.WebSocket___hx_ctor_hx_ws_WebSocket_182__Fun(ws));
                                        #line 191 "D:\\project\\sangong\\sangong\\src\\hx\\ws\\WebSocket.hx"
                    __hx_this.sendHandshake();
                }
            }
                        #line default
        }