Skullcode
-
Content Count
35 -
Joined
-
Last visited
Posts posted by Skullcode
-
-
can you guide me on how to update the memo safely in that case ? i am expecting to receive a lot of data
-
is it safe to access VCL Controls directly from Twsocket DataAvailable event. or it needs to be synchronized ?
as example
procedure Tchatu.wsocketDataAvailable(Sender: TObject; ErrCode: Word); var datastr : string; begin datastr := wsocket.ReceiveStrW(CP_UTF8); memo1.lines.add(datastr); end;
is it safe that way ?
-
Looping </>
in VCL
You should use the code blocks and insert the code within the forum, posting screen shots of the code wont help
You should think twice before using TMEMO as a list handler
You can create an object that holds your preferred variables and add the object to a list and use it accordingly
-
current i use this function is it fine or more correction needed ?
Function Checkstr(const astr: string):Boolean; var Regexs : TRegEx; i : integer; svalue : string; Allowed : string; begin svalue := Trim(astr); for i := 1 to Length(svalue) do begin if Regexs.IsMatch(svalue[i], '^[ء-يA-Za-z0-9$&+=?@#~<>.^*()%!\s]+$') then begin Allowed := 'YES'; end else begin Allowed := 'NO'; Break; end; end; if Allowed = 'YES' then begin Result := True; end else begin Result := False; end; end;
-
30 minutes ago, Mahdi Safsafi said:For curiosity, why are you mixing arabic with latin letters. Does such ArabicLatin word make sense for you?
i am trying to validate an input that will be written by a client and trying to prevent special charcters and allow only alphabets arabic and english
-
i have create this function in order to allow arabic and english letters and numbers only in a string
var Regexs : TRegEx; begin if Regexs.IsMatch(astr, '[ء-ي-A-Z-a-z-0-9 ]+') then begin Result := True; end else begin Result := False; end;
if i type the string as example abcdefgÄ the result returned True and i did not specfiy Ä in the regex pattern
how to make regex match return true with the given pattern only ?
-
Is there any known component for rtmp camera publish to rtmp server ?
-
i have tested the component you provide
but there is some downfalls
1 Stereomix device produce a huge noise
2 when change audio level during play the whole app freezes
unless i am doing something wrong
here is a demo you can test
-
The following component is quite old and its seems that the author stopped from upgrading it and released it to source forge as open source
It is compile and installed on delphi rio but with many warnings any idea on how to make this component friendly with delphi rio and above?
Twsocket Tcp Client miss some packets
in VCL
Posted
i am using Twsocket as a TcpClient to communicate with a tcpserver
the server sends a packet in loop that should be received by the connected Client
but Twsocket doesnt read all packets that sent by the server
it reads one and miss another and read again and miss one again .
is it a normal behavior by Twsocket ? i tested with TidtcpClient and it reads all packets normally no matter what