Jump to content

itognet

Members
  • Posts

    73
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by itognet

  1. In my eyes, it is a bad way to handle large files relying on server memory. Just imagine 10 concurrent users each uploading large files. It can easely blow the unigui server with out of memory. Suggestion to unigui: Just do blockwrites and it is all solved.
  2. itognet

    A mini-guide

    Looks like the wikispaces.com is closed for good. But you can see the lastest version of the unigui wiki here: https://web.archive.org/web/20171014225514/http://unigui.wikispaces.com:80/ Maybe somebody else is interrested in creating a new Wiki ?
  3. I did some tests with the MUpload example. These are my results: Test 1: 548 files, sizes from 1 kb to 22 mb, total size is 1,22 GB Upload time is 16m 30 sec. from one ssd to another ssd / Upload speed is around ~1,19 MB / sec Notes: Then MUpload were very slow building the queue up, at least 1 min. Notes: The MUpload transfers ~100 files at the same times, when 1 file finished it starts another one from the queue. Notes: Maximum memory usage were ~ 24 MB of system memory. Perfect ------- Test 2 20 files, sizes 30 MB to 40 MB each, total size is 630 MB Upload time is 3 min. from one ssd to another ssd / Upload speed is around ~3,60 MB / sec Notes: Larger files means faster transfer. Notes: Maximum memory usage were 800 MB of system memory. Why? Notes: Every time a file finished MUpload peaked at 600-800 MB of system memory from ~150 to 200 mb. ------- Test 3 10 files, sizes 50 MB to 60 MB each, total size is 531 MB Upload time is 2m 30 sec. from one ssd to another ssd / Upload speed is around ~3,60 MB / sec Notes: Maximum memory usage were 1 GB of system memory. Why? Notes: Every time a file finished MUpload peaked at around 800 MB of system memory from ~150 to 200 mb. ----- Test 4 3 files, all ~100 MB, total size is 300 MB It fails with out of memory, it even fails with only 1 file. I have 16 GB memory with at least 8 GB free. ----- Other having the same issues with large files?
  4. Yes, still on trial. Hoping that unigui soon will be strong enough so it can replace intraweb. I have written a another thread about how uploading files is badly handled by unigui compared to intraweb. Hopefully you one day will look at that issue.
  5. from time to time I update to newest version (unigui). Do you know how I attach images? It ask me for specifying an url for image, I was looking for a attach/upload function?
  6. Thank you about reminding me about an old project that I totally forgot about, a test on how easy a webshop could be acomplished in unigui. I am still just fooling around with unigui, waiting for unigui getting even better so I can migrate from intraweb. Anyway, I did make a test webshop running with 30.000 products (just a csv file converted to database) with no images and no full description. The webshop just shows a table with the filtered products based on 4 categories. If the webshop does not already have the product image, it auto download it on the fly and also shows a product info. stock info and price. If you click a product, it shows a full description with serveral pictures and can be shown in at least 5 languages retrieved externally on the fly based on part and ean number. All this took me less than 3 days, I am writing this to inspire anyone. It is not difficult at all to create a webshop in unigui. Sadly, I cant attach a image here ?
  7. DavidIzadaR. I took your idea and changed it alittle :p How about, a little service or a system tray application that does the following: UniPrint monitors the default download folder for Internet Explorer, Firefox, Chrome and other known browsers. If a downloaded file appears and match this pattern eg. uniprint_[filename].* then print the file to default printer and delete the file afterwards.
  8. DavidIzadaR. I see your idea here But it require software installation at enduser and maintenance of that software. But it could work Ronny Encarnacion. I cannot see how you can use Websockets for remote printing, unless your websockets is based on Davids idea. Will you go in details of your idea, please
  9. I see many asking for direct printing. Direct print can be done like this. Note, it works only in some scenarios. Scenario 1: One location with serveral users using your unigui project. Scenario 2: Your Windows Unigui server is located on same LAN as the clients. Scenario 1 - Over internet: Client printer has to be a network printer and you have to NAT the printer port 9100 at the gateway/firewall/router at client side. Install the Client printer on the Windows Standalone Unigui server using tcpip, use the wan IP for the client (has to be static) and the NATted printer port. (if you have serveral locations, you could install a printer for each location, and install the printers on the unigui server) Scenario 2 - As Intranet, where Unigui server is located on same LAN as clients: Install the Client printer on the Windows Standalone Unigui server using tcpip, use the printer IP for the printer (has to be static) I dont know if this works if you run your Unigui as ISAPI, I believe that you could do something similar. With the above aproach, you can from your Unigui project print direct to end user network printer, assuming that you have done the NATting right.
  10. I am able to filter a uniDBGrid on normal columns. Works fine. But I cannot filter the grid based on a db-lookup-field-column. The lookup-field-column shows the data fine in the grid, the filter is just not working. The lookup field is created as a lookup field in the FDQuery component, eg. It lookup/shows the Countryname based on countrycode It is a bug or what am I missing?
  11. Place IWFileUploader1 componemt on IWForm1 procedure TIWForm1.IWFileUploader1AsyncUploadCompleted(Sender: TObject; var DestPath, FileName: string; var SaveFile, Overwrite: Boolean); var AlreadyDownloaded: Boolean; begin AlreadyDownloaded := False; if not AlreadyDownloaded then IWFileUploader1.SaveToFile(FileName, 'c:\temp\'+FileName, True); // Inform IWFileUploader that we are taking care of file saving ourselves SaveFile := False; end; Run. Drag and drop 1 or more files to the colored IWFileUploader1. Or just click it and select your files. and upload. When files is uploaded, you get status per file. Works even with very large files (>2GB).
  12. I am using intraWebs uploader function. I find it alot more stable and flexible, and multi fileupload with ease. I hope one day that uniGui will expand its fileupload function, so I can convert many of my intrawebs projects. For your question. I dont see a problem using the uniServer as it does threading. Admin uploads is just about controlling the login, right.
  13. you can implement a chatclient, https://www.tawk.to/in about 2 minutes
  14. maybe someone will make an uniGui + Dropzonejs example to share
  15. mohammad:Don't waste your time in learning datasnap, it will disappoint you as backend in real life example... That is not neccesary true, the built-in datasnap in Delphi is very powerfull. Try both, and see what suit your needs best.
  16. Here you go Add PaxCompiler, PaxPascalLanguage and PaxInterpreter to UniForm. Add UniButton16 to UniForm Add UniMemo2 to UniForm Contents of UniMemo2: begin UniButton16.Caption := 'Greets to Farshad'; end. procedure TMainForm.UniButton16Click(Sender: TObject); var I, H_TButton: Integer; begin PaxCompiler1.Reset; PaxCompiler1.RegisterLanguage(PaxPascalLanguage1); H_TButton := PaxCompiler1.RegisterClassType(0, TUniButton); PaxCompiler1.RegisterVariable(0, 'UniButton16', H_TButton, @UniButton16); PaxCompiler1.AddModule('1', PaxPascalLanguage1.LanguageName); PaxCompiler1.AddCode('1', UniMemo2.Lines.Text); if PaxCompiler1.Compile(PaxInterpreter1) then PaxInterpreter1.Run else for I:=0 to PaxCompiler1.ErrorCount - 1 do ShowMessage(PaxCompiler1.ErrorMessage); end;
  17. bump. have you any results of trying the pax compiler ?
  18. I havnt tried this, so it is straight from my memory you could copy an addon folder in uni\codemirror-x.x\contrib to a new folder. then modify Ext.ux.CodeMirror.js in folder uni\codemirror-x.x\js to support your new folder, look for cases section. change UniSyntaxEditEx (if possible) to what you wrote in the case if you cannot change UniSyntaxEditEx to your own addon, then you can edit an existing addon and make your changes. Remember to clear browser cache when testing this. good luck.
  19. You could use the unifileupload component and drag'n'drop the file.
  20. Hi, I am looking at the servermodule.logger function. How do I retrieve the filename of the active logfile (eg. A2017-09-04.log) ?
  21. you can easily translate this into unigui uses ComObj; function Xls_To_StringGrid(AGrid: TStringGrid; AXLSFile: string): Boolean; const xlCellTypeLastCell = $0000000B; var XLApp, Sheet: OLEVariant; RangeMatrix: Variant; x, y, k, r: Integer; begin Result := False; // Create Excel-OLE Object XLApp := CreateOleObject('Excel.Application'); try // Hide Excel XLApp.Visible := False; // Open the Workbook XLApp.Workbooks.Open(AXLSFile); // Sheet := XLApp.Workbooks[1].WorkSheets[1]; Sheet := XLApp.Workbooks[ExtractFileName(AXLSFile)].WorkSheets[1]; // In order to know the dimension of the WorkSheet, i.e the number of rows // and the number of columns, we activate the last non-empty cell of it Sheet.Cells.SpecialCells(xlCellTypeLastCell, EmptyParam).Activate; // Get the value of the last row x := XLApp.ActiveCell.Row; // Get the value of the last column y := XLApp.ActiveCell.Column; // Set Stringgrid's row &col dimensions. AGrid.RowCount := x; AGrid.ColCount := y; // Assign the Variant associated with the WorkSheet to the Delphi Variant RangeMatrix := XLApp.Range['A1', XLApp.Cells.Item[X, Y]].Value; // Define the loop for filling in the TStringGrid k := 1; repeat for r := 1 to y do AGrid.Cells[(r - 1), (k - 1)] := RangeMatrix[K, R]; Inc(k, 1); AGrid.RowCount := k + 1; until k > x; // Unassign the Delphi Variant Matrix RangeMatrix := Unassigned; finally // Quit Excel if not VarIsEmpty(XLApp) then begin // XLApp.DisplayAlerts := False; XLApp.Quit; XLAPP := Unassigned; Sheet := Unassigned; Result := True; end; end; end; procedure TForm1.Button1Click(Sender: TObject); begin if Xls_To_StringGrid(StringGrid1, 'C:\Table1.xls') then ShowMessage('Table has been imported!'); end;
  22. Well, you can do it by saving/reading form data from a database.
×
×
  • Create New...