When I add Additional References to the "My Extensions" script in LINQPad these are available for all new queries, which is really handy for sharing them with other people. Is there a way to similarly share the default Additional Namespace Imports for new queries? I know I can click "Set as default for new queries", but that only saves them for me. (Where does this store them, anyway?)
Default namespaces for new queries are stored in %AppData%\LINQPad\DefaultQuery.xml
As of v5.06.02, LINQPad lets you copy/move this file into the LINQPad.exe directory, and if present, it will take precedence over the copy in %AppData%\LINQPad.
This means you can now share default namespaces with a team, as long as you run LINQPad.exe from the same shared folder. You can share other data in a similar manner, including queries, drivers, plug-ins, connections and default references.
Related
I have got Select2 working. Awesome, awesome component.
We have a db with some common elements which we inherit to databases. I would like to add Select2 to this db, so it will be easily available to databases, but don't know how to do that, as you have to put some items in the package explorer.
Any way to do this?
It is possible if you inherit the whole template:
create a database with all design elements you want to have as default in a database including Select2 parts in WebContent folder
define this database as template "CommonElements" (or another unique template name) in database properties
define the template "CommonElements" as "Inherit design from master template" in every database where those design elements are needed
and make sure that every additional design element has set "Prohibit design refresh"
or inherits from a design template.
In case you have additional elements in WebContent folder set "Prohibit design refresh" flag to those design elements with File > Application > Set Prohibit Refresh Properity... too
All design elements including all WebContent folders are inherited from master template when you execute File > Application > Refresh Design... or when designer process runs on server.
I don't think that is possible. You could set up a central "resources.nsf" with the select2 components and load all the resources you need (manually) from all other databases.
Unless your users do not have internet access (either fire-walled or offline) you may as well just use a CDN. That way all your users will have a cached version of the download library on all of your sites and you don't have to worry about hosting it somehow.
https://cdnjs.com/libraries/select2
for example
It might also be worth looking at the Import and Export from Domino Designer project on OpenNTF. It allows you to create an portlist.xml file, which tells the plugin which files to import. It still requires a manual action to import, but will allow you to overwrite files.
Although using plugins is the place to aim to get to, this is a perfectly valid and good practice method for handling copying all relevant files into an NSF. It's used in XPages OpenLog Logger project on OpenNTF, for the NSF-based option.
I am trying to develop a small utility program that will be deployed with other application that we already have. In order to make the utility work, I need to know the connectionString used by the application to access the database.
Since I have old and new applications, they have different ways to connect to the database. So I figured the way I would do it is something like that
All project will need to implement a dll named "Connect.dll"
This dll will include one public function name GetConnString. This function will return a string which correspond to the connection string to use to connect to the main database.
What I wanted to do was to simply include the utility in the same folder as the application and use the Connect.dll found within the folder. So far though, unless I copy the original dll found within my utility project, the utility will crash. Is there any way to do this ?
Regards,
Create a non signed assembly and enforce that all the clients use the same assembly version with (of course) the same signature.
In your utility set the property "Specific Version" to False.
This should do the trick.
I have have a solution that I created with the new modeler tools. This gave me
two full "endpoints" in a single solution.
Now when I run them through my automated build, I have two dlls in the same
folder that implement IConfigureThisEndpoint.
If I just run NServiceBus.Host.exe \install (to get a Windows Service), it gives
me the (expected) error that there is more than one class that can be used.
I did some searching and Udi states here:
http://tech.groups.yahoo.com/group/nservicebus/message/3937 that "You can
specify which class you want loaded and avoid these issues - as the server
project in the pub/sub sample shows".
I looked at the pub/sub sample and I can't see how I can specify my class (at
least not at the command line).
Is there a way to get around having to modify my build to put the files in
separate folders? (Not really an easy task for me.)
Add a config entry to your app settings with the key EndpointConfigurationType and the value being the assembly qualified name of the type.
In a VB project I can add a resource via the project properties resources tab, or I can right-click the project in the solution explorer, click add, then click add existing item.
What are the differences?
If I want to add a DLL file and include it as an embedded resource, do I have to add the file via both methods? Only one?
Thanks.
What you are describing is linked and embedded resources.
Check out this page which describes the differences:
Linked vs. Embedded Resources
From the MSDN link above:
Embedded Resources
Embedded resources are the best choice if you need to share application resource (.resx) files between multiple projects.
For example, if you have a common resource file that contains your company's logos, trademark information, and such, using embedded resources means you only have to copy the .resx file and not the associated resource data files.
You cannot edit embedded resources directly. If you try to edit an embedded resource, you will receive a message prompting you to convert the item to a linked resource in order to edit it; conversion is recommended but optional. You must export them, make your modifications in an external program, and then import them back into your project.
Linked Resources
Linked resources (the default) are the best choice for ease of use.
Resources can be edited directly inside the project, and you can easily add or remove resources as needed.
Edit
You would only need to add your DLL using one method. Which one you select depends on which method best fits your needs (as per the descriptions above)
Could anyone please describe how to use NHibernate Query Analyzer? I downloaded it and trying to build it but it fails, I am not quite sure how to use it.
I am using nHibernate with Sybase and WCF.
Any help is greatly appreciated.
Thanks
Setup NHibernate Query Analyzer (NHQA) Project
After downloading the tool, run Ayende.NHibernateQueryAnalyzer.exe and then:
File -> New -> Project
Click 'Add File(s)...' button and add the following files:
your NHibernate configuration file (i.e. *.cfg.xml, *.exe.config, or *.web.config file)
your assembly DLL (or DLLs) that contain the NHibernate mapped classes and also have the mapping file(s) as an embedded resource
your mapping files only if they have not been added as embedded resources to the DLLs in # 2
(note: in older versions of NHQA, it was necessary to copy the DLLs including its dependencies to the same directory as the NHibernateQueryAnalyzer.exe but that is no longer the case)
Click 'Build Project' button
If receive errors, then something needs to be fixed in either the configuration file, the mapping file(s), the classes in the DLL(s), or all of them. It is important to note the exception messages to help troubleshoot and identify which of the above is source of the problem.
Run Queries
After successfully building the NHQA project, you can create queries:
File -> New -> Query
Now, type in HQL statements. Entities' names and properties can be dragged and dropped from the tree view on the left to your HQL statements on the right. As you type, it provides on-the-fly checking and validation of your HQL statements in the 'Exceptions' tab and displays the auto generated SQL statements in the 'SQL' tab. A sidebar GUI is also available for dynamically defining named parameters.
Hit F5 to execute the query. If it executes successfully, you can view the results in tabular form in the 'DataBase Results' tab or as objects in the 'Object Graph' tab.
Configure Files
New Mapping files can be created by:
New -> Mapping (hbm.xml)
or existing ones can be edited directly:
Open -> Open Mapping...
Same for Configuration files:
New -> Configuration (cfg.xml)
Open -> Open Configuration...
References
Documentation on setup and usage tutorial for NHibernate Query Analyzer is quite sparse but hopefully the above helps.