Accessing Multiple Trac projects with IIS using isapi_wsgi [closed] - iis

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm a newbie in the bug tracking system world.
I managed to install Trac 0.12 in Windows Server 2003 and was able to serve the project using IIS through an isapi_wsgi extension using the procedure found here: http://trac.edgewall.org/wiki/TracOnWindowsIisIsapi
I installed the Trac project in c:\Trac\Project1, generated the cgi-bin and htdocs directories and placed them in c:\Trac\Project1\.
Now I want to create other projects at the same level than Project1 (c:\Trac\Project2, c:\Trac\Project3 and so on).
How can I change the trac_wsgi.py and use URLs as follows: "http://localhost/Project1", "http://localhost/Project2", and so on?
I have basic experience with IIS and no experience at all with Python.
Any help would be appreciated.
Thanks

You've chosen what seems like a good installation instruction. If I understand correctly, your answer is already in the example given there:
# Setup the virtual directories - this is a list of directories our
# extension uses - in this case only 1.
So you'll want to register multiple virtual directories by copying the example with a list of directories like so (untested):
vd1 = VirtualDirParameters(Name="Project1",
Description = "ISAPI-WSGI Trac",
ScriptMaps = sm,
ScriptMapUpdate = "replace"
)
vd2 = VirtualDirParameters(Name="Project2",
Description = "ISAPI-WSGI Trac",
ScriptMaps = sm,
ScriptMapUpdate = "replace"
)
...
params.VirtualDirs = [vd1, vd2, ...]
I don't know, if you really want to get rid of the ENV_PARENT_DIR in the path. Would it hurt to have 'http://localhost/trac/Project1' instead of 'http://localhost/Project1'? This is the common and expected layout of a multiple projects Trac installation. Just my 2ct.

Related

Regex version number out of package names [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 months ago.
Improve this question
I have a folder with a bunch of packages, each with their version in their name. Im trying to use regex to create a list with those versions to be used later.
Some examples:
Input:
libpci-dev_3.5.2-1_amd64.deb
libpcre3-dev_8.39-12_amd64.deb
libaprutil1-ldap_1.6.1-4_amd64.deb
nftables_0.9.6-1~bpo10+1_amd64.deb
libkdb5-9_1.17-3+deb10u3_amd64.deb
libc-dev-bin_2.28-10+deb10u1_amd64.deb
libboost-locale1.67.0_1.67.0-13+deb10u1_amd64.deb
I want to delete the front of the package name as well all the amd64 and .deb as well as the _ or - surrounding the versions and then just leave the version of the package in the list
Expected output:
3.5.2-1
8.39-12
1.6.1-4
0.9.6-1~bpo10+1
9_1.17-3+deb10u3
2.28-10+deb10u1
1.67.0_1.67.0-13+deb10u1
I managed to select only the numbers, but im having issues with the last examples, where there is also letters involved
Versions are started after _, so 9_1.17-3+deb10u3 should be 1.17-3+deb10u3, and you can extract those using the following regex.
_(.*)_amd64\.deb
Python Example
import re
packages = """libpci-dev_3.5.2-1_amd64.deb
libpcre3-dev_8.39-12_amd64.deb
libaprutil1-ldap_1.6.1-4_amd64.deb
nftables_0.9.6-1~bpo10+1_amd64.deb
libkdb5-9_1.17-3+deb10u3_amd64.deb
libc-dev-bin_2.28-10+deb10u1_amd64.deb
libboost-locale1.67.0_1.67.0-13+deb10u1_amd64.deb"""
versions = re.findall(r"_(.*)_amd64\.deb", packages)
print(*versions, sep="\n")
OUTPUT
3.5.2-1
8.39-12
1.6.1-4
0.9.6-1~bpo10+1
1.17-3+deb10u3
2.28-10+deb10u1
1.67.0-13+deb10u1

How to run 100 csv File in script file from a folder (One file at once)? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I have to run the below script code for multiple files from a folder, one at once, I have change CSV file name at every iteration, file names are like D8.csv, D16.csv etc.
java -Xmx10G -jar dist/wikifier-3.0-jar-with-dependencies.jar -annotateData data/Splited_WikiQA_dev/**D8.csv** data/output_Splited_WikiQA_dev/ false configs/STAND_ALONE_NO_INFERENCE.xml
Use a for loop that processes all the files matching a wildcard.
for file in data/Splited_WikiQA_dev/*.csv
do
java -Xmx10G -jar dist/wikifier-3.0-jar-with-dependencies.jar -annotateData "$file" data/output_Splited_WikiQA_dev/ false configs/STAND_ALONE_NO_INFERENCE.xml
done

Best way of transferring Excel to ABAP and vice versa [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
What is the latest way to export and import data to/from Excel from SAP ABAP? I used some old OLE libraries but they have some limitations. One other thing I found was the SOFFICEINTEGRATION package, but that looks like was developed in the early 00's. Are there any new developments or should I just stick with OLE or SOFFICEINTEGRATION?
As far as I know, the official SAP solution is the two you described above. However there is abap2xlsx, as a freeware. This has to be implemented separately in your system (probably someone responsible in your company won't agree, implementing "random" stuff in productive business system). You can read more about it here:
https://wiki.scn.sap.com/wiki/display/ABAP/abap2xlsx
(I used it only once, creating an xlsx file and worked very well.)
Share some of my experience about Excel handling in ABAP.
1.Excel download from internal table.
data:
lo_table type ref to cl_salv_table,
lx_xml type xstring.
try.
cl_salv_table=>factory(
importing
r_salv_table = lo_table
changing
t_table = lt_data ). "lt_data is your internal table
catch cx_salv_msg.
endtry.
lx_xml = lo_table->to_xml( xml_type = '10' ). "XLSX
call function 'XML_EXPORT_DIALOG'
exporting
i_xml = lx_xml
i_default_extension = 'XLSX'
i_initial_directory = ''
i_default_file_name = 'export.XLSX'
i_mask = 'Excel (*.XLSX)|*.XLSX'
exceptions
application_not_executable = 1
others = 2.
2.Excel upload to internal table.
Function module ALSM_EXCEL_TO_INTERNAL_TABLE. See the example link here.

How to export database schema in Oracle to a dump file [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a database schema on Oracle server installed on a Linux machine. I need to export the schema related information in a dump file.
How to do this ?
It depends on which version of Oracle? Older versions require exp (export), newer versions use expdp (data pump); exp was deprecated but still works most of the time.
Before starting, note that Data Pump exports to the server-side Oracle "directory", which is an Oracle symbolic location mapped in the database to a physical location. There may be a default directory (DATA_PUMP_DIR), check by querying DBA_DIRECTORIES:
SQL> select * from dba_directories;
... and if not, create one
SQL> create directory DATA_PUMP_DIR as '/oracle/dumps';
SQL> grant all on directory DATA_PUMP_DIR to myuser; -- DBAs dont need this grant
Assuming you can connect as the SYSTEM user, or another DBA, you can export any schema like so, to the default directory:
$ expdp system/manager schemas=user1 dumpfile=user1.dpdmp
Or specifying a specific directory, add directory=<directory name>:
C:\> expdp system/manager schemas=user1 dumpfile=user1.dpdmp directory=DUMPDIR
With older export utility, you can export to your working directory, and even on a client machine that is remote from the server, using:
$ exp system/manager owner=user1 file=user1.dmp
Make sure the export is done in the correct charset. If you haven't setup your environment, the Oracle client charset may not match the DB charset, and Oracle will do charset conversion, which may not be what you want. You'll see a warning, if so, then you'll want to repeat the export after setting NLS_LANG environment variable so the client charset matches the database charset. This will cause Oracle to skip charset conversion.
Example for American UTF8 (UNIX):
$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
Windows uses SET, example using Japanese UTF8:
C:\> set NLS_LANG=Japanese_Japan.AL32UTF8
More info on Data Pump here: http://docs.oracle.com/cd/B28359_01/server.111/b28319/dp_export.htm#g1022624

adding phpdoc to new files [duplicate]

This question already has answers here:
A tool to add and complete PHP source code documentation [closed]
(9 answers)
Closed 9 years ago.
im looking for a way to add some docblocks to a new .php file, so i can have it add the description, package name, author , etc to a new file.
i have been searching for a couple days and I dont see any results on how to add just to 1 .php file, maybe a console command or another utility?
Some sort of generator
Try PHP_DocBlockGenerator from PEAR -- http://pear.php.net/package/PHP_DocBlockGenerator

Resources