Jump to content

55143681

uniGUI Subscriber
  • Posts

    670
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by 55143681

  1. 4 minutes ago, Farshad Mohajeri said:

    You must put PDF file either under application files folder or application cache folder.

    Please see our PDFViewer demo.

    Thanks,Every One.

    1.Set ServerModule->filesFolder=e:\fileHome\

    2.UniSession->SendFile(UniServerModule()->FilesFolder+"aaa\\test.pdf");  works well.

    3.UniPDFFrame1->PdfURL=UniServerModule()->FilesFolderURL+"aaa\\test.pdf";   works well.

     

  2. 22 hours ago, Farshad Mohajeri said:

    It depends on account your app is running. There is no difference between a unigui app & other Delphi apps.

    For Windows Service and IIS ISAPI check the account which is used to run your app. For example, normally it is Local System for Windows Services.

    As you say,my web.exe can read and write the files everywhere,

    but,if I need download the file with URL,

    then I will meet a missing file error.

    Such as UniPdfFrame->pdfFile  and Session->sendfile().

    How to read and write "e:\\abc\\test.pd" not within my web home path?

    2023-11-15_154255.png.da9209448beb4ec1e45a5e0421d85e37.png

  3. 18 hours ago, Abaksoft said:

    - A simple Unigui as Service,  HyperServer.

    - No more than 10 users 

    I would have really wanted to launch a new project with 1000 users in real time and exploit farm server for load balancing (what you are currently using with your 3 servers) but my plan failed.

    Maybe you should review the structure of your program.

    - use frames that open and close.

    - Free up Dataset resources (RAM) immediately.

    - minimize size of exe file 

    - use Pool connection to avoid braking RDB system

    _ etc...

     

    MY project in my office network,

    about seventy users,

    a *.exe runs fast.

  4. 11 hours ago, Sherzod said:

    UniSyntaxEdit is based on CodeMirror 0.8
    UniSyntaxEditEx is based on CodeMirror 5.25 ...

    I use UniEdit in all my project,

    I don't know what new in UniSyntaxEdit and UniSyntaxEditEx?

    Is there some new function with the *Syntax* controls?

  5. Just now, 55143681 said:

    exe,standalone,use hyperserver.

    See the image:

    I have two windows server,names server-a and server-b,every server run a unigui standlone server,

    the program is web.exe,the two server read/write the same oracle rac database,

    and I want the two server can read/write the same files Store(NAS channel),

    that is :

    Server-a and server-b have their web home "d:\",and they can ask  the same file path "e:\filesHome"

    How to do that?

    2023-11-14_081528.png.fdf054b2f5d854a0f3f1db9c965e5da2.png

  6. On 10/31/2023 at 3:05 AM, SMARAM said:

    The same code in C++ Builder, if someone needs it.

    	TStringList *lstSessions = new TStringList();
    	TUniGUISessions *S = UniServerModule()->SessionManager->Sessions;
    	int nr = S->SessionList->Count;
    
    	S->Lock();
    	// Using Lock on session manager should be used with extreme care.
    	// We should keep this "Lock" active as short as we can. Session Manager stops working until lock is released.
    	// Excessive use of lock/unlock or keeping the lock active for a long period will make uniGUI server slow/unresponsive.
    
    	try
    	{
    	   // Here we do a fast copy of list to another array for later use.
    	   for (int i=0; i<nr; i++)
    	   {
    		   TUniGUISession *U = (TUniGUISession*)S->SessionList->Items[i];
    		   lst->Add("SessionId: " + U->SessionId);
    		   lst->Add("RemoteIP: " + U->RemoteIP);
    		   lst->Add("LastTimeStamp: " + U->LastTimeStamp);
    	   }
    	}
    	__finally
    	{
    		S->Unlock(); // ... and finally don't forget to release lock!
    	}

     

    How to kill a session?

  7. On 11/10/2023 at 12:17 AM, emin said:

    This issue has been asked many times in the forum, but there seems to be no solution. How can we detect whether the row is selected or deselected to create our own list instead

     

    On 2/3/2016 at 4:49 PM, Farshad Mohajeri said:

     

    Currently selections are not persistent. A persistent mode will be added.

    A persistent mode will be added.

    If the property have come out?

    • Like 1
  8. On 11/6/2023 at 11:42 PM, Farshad Mohajeri said:

    It seems that slow down occurs when peak request is above 300. It indicates that requests are coming faster than the speed system can process them. It can be the database back-end which is not able process too many concurrent requests as fast as it must be done.

     

    On 11/6/2023 at 10:15 PM, Muhammad Idris said:

    image.png.420975137778a38afac1240542a3c584.png

    If you are using mysql database,you need to card the "slow query problem",

    what means that if your sql operation on the field not be indexed,

    the query will be  very slowly.

  9. 10 hours ago, 55143681 said:

    Dear:

    In my project  a.exe,

    I set ServerModule->filesFolder=abc\,

    and In another form ,I call "UniPDFFrame1->PdfURL=UniServerModule()->FilesFolderURL+"/123.pdf"  to show a pdf file.

    the problem is :

    If i run a.exe,the function works well. the function will link to "abc\123.pdf".

    but :

    If i run hyper-server.exe to call a.exe,the function works abnomal,the function will link to "files\123.pdf".

    that is say:

    I should set something to hyper-server.cfg to change the fileUrl  to "abc",How to do that?

    Dear Sherzod:

    Can you help me?

  10. Dear:

    In my project  a.exe,

    I set ServerModule->filesFolder=abc\,

    and In another form ,I call "UniPDFFrame1->PdfURL=UniServerModule()->FilesFolderURL+"/123.pdf"  to show a pdf file.

    the problem is :

    If i run a.exe,the function works well. the function will link to "abc\123.pdf".

    but :

    If i run hyper-server.exe to call a.exe,the function works abnomal,the function will link to "files\123.pdf".

    that is say:

    I should set something to hyper-server.cfg to change the fileUrl  to "abc",How to do that?

  11. I use html2canvas.min.js to snap the form.

    1.Add javaScript\html2canvas.min.js to serverModule's customFiles.

    2.Add  function "canvasSaveAs"  to MainForm's Script.

    function canvasSaveAs(uri, filename) {
        var link = document.createElement('a');
        if (typeof link.download === 'string') {
            link.href = uri;
            link.download = filename;
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
        } else {
            window.open(uri);
        }
    }

    3. call the function from my form.

    void __fastcall TUniFormAlterMakePdf2::UniBitBtn1Click(TObject *Sender)
    {

    String   fName;
    fName = "111capture" + FormatDateTime("yyyyMMddhhnnss", Now());
    UniPanel1->JSInterface->JSCode(
        "html2canvas(document.querySelector(\"#"+ UniPanel1->JSId +"\")).then(function(canvas) {"
        +"   canvasSaveAs(canvas.toDataURL(), \""+ fName +"\");"
        +    "});"
        );
    }

     

    Problem:

    In my new create project(http),that run normal,

    but in my another project(https),that run with nothing,

    why?

     

     

     

    2023-02-04_231554.jpg

    2023-02-04_231515.jpg

    2023-02-04_231650.jpg

×
×
  • Create New...