Profilo di
Rosaline
| Nome | Rosaline |
|---|---|
| Indirizzo email | n/a |
| Messaggi | 5 |
-
- 2023-04-19 14:07:19
- Problem with Longest Common Substring
- Forum >> Programmazione Python >> Web e Reti
- I'm having difficulty understanding the code for the Longest Common Substring problem on my regular resource. I'm not getting the desired output when I try to run the code. Here is the code I'm trying to use:
// Function to find Longest Common Substring // of two given strings string LCS(string X, string Y) { // Find lengths of given strings intm = X.length (); int n = Y.length(); // Declare the 2D array int L[m+1][n+1]; //Fill values in the array for (int i = 0; i <= m; i++) { for (int j = 0; j <= n; j++) { if (i == 0 || j == 0) Lj = 0; else if (X[i - 1] == Y[j - 1]) L j = L[i - 1][j - 1] + 1; else L j = max(L[i - 1]j, L [j - 1]); } } // Backtrack to find the substring int index = Lmn; // Create a string length index+1 string lcs(index+1, ' '); // Start from the right-most-bottom-most corner // and one by one store characters in lcs[] int i = m, j = n; while (i > 0 && j > 0) { // If current character in X[] and Y are same if (X[i - 1] == Y[j - 1]) { // Put current character into result lcs [index - 1] = X[i - 1]; // reduce values of i, j and index the--; j--; index--; } // If not same, then find the larger of two and // go in the direction of larger values else if (L[i - 1]j > L [j - 1]) the--; else j--; } // Return the result return lcs; }I'm hoping someone can help me figure out what's wrong with the code and help me get the desired output. Thanks in advance!
--- Ultima modifica di Rosaline in data 2023-04-19 14:08:33 ---
-
- 2023-02-02 13:17:07
- Re: Python / Flask
- Forum >> Programmazione Python >> Web e Reti
-
RESPONSES:
Yes, you are correct. To make this service available on other PCs, you will need to deploy it on a server and make it accessible through a common endpoint. The easiest way to do this is to use a cloud hosting provider like AWS or Azure. With a cloud hosting provider, you can easily spin up a virtual server, deploy your application on it, and make it accessible to the world. You will also need to register a domain name, create an SSL certificate, and point the domain to your server so that the service is accessible through a secure connection. Once these steps are completed, you should be able to access the service from any computer in the world. I hope this helps!
-
- 2023-02-02 06:47:22
- Re: Creazione Programma Python
- Forum >> Programmazione Python >> Web e Reti
- You can refer to this resource as well.
--- Ultima modifica di Rosaline in data 2023-02-02 06:48:16 ---
-
- 2023-02-01 14:34:49
- What kind of Python application project structure is ideal?
- Forum >> Programmazione Python >> Web e Reti
-
Consider that you wish to use Python to create a complex desktop (not web) application for end users. What folder hierarchy for the project would be the best?
Maintenance simplicity, IDE friendliness, suitability for source control branching/merging, and simplicity in creating install packages are all desired attributes.
more specifically
Where should the source be placed?
Scripts used to launch applications should go where?
Where should I store my IDE project clutter?
Where do you place the acceptance and unit tests?
Where should non-Python data, such configuration files, go?
Where should non-Python sources for pyd/so binary extension modules be placed, such as C++?
-
- 2023-01-31 15:20:46
- Re: Piccolo database condiviso online
- Forum >> Programmazione Python >> Database
- Per il database, puoi usare un database leggero come SQLite, che è gratuito e open-source e può essere utilizzato con Python. Per spostare il database tra i PC, puoi utilizzare una soluzione di cloud storage come Dropbox, Google Drive o Microsoft OneDrive. Puoi anche usare FTP e SFTP per trasferire il database da un computer all'altro.
Per accedere al database, puoi utilizzare un sistema di gestione di database come SQLiteStudio, oppure una libreria Python come SQLAlchemy o SQLite3 per accedervi direttamente dal codice Python.
