I'm trying to use the Snippets functionality in SQL Server.
I'm testing out adding new snippets to SQL Server 2014 following the instruction here.
Everything works fine except that after I added the snippet, it doesn't show up in the IntelliSense. Even more, I realized that not all build-in Snippets are showing up.
I wonder if anyone else has the same experience, and knows how to resolve this?
This is a list of build-in snippets under Function
And this is what I see from IntelliSense (3 of them are missing)
The issue is likely in the definition of the snippets.
If you inspect your snippets you should see a section like:
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
Or
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
These indicate where the snippet can and will be used from.
In a query window you have 2 options when you right click:
Insert snippet
Surround with
Which give you the different options as you can see here:
This explains why you're not seeing the missing options when you try to insert a snippet.
Related
I have reinstalled the last version of IntelliJ IDEA and then when I try to format an SQL file, it orders all the lines as shown on the image.
However, I have not made any settings for SQL formatting in the previous versions and the format was OK as shown on my current setting preview as shown below:
So, is there anything default to format SQL properly? There are lots of choices in the settings, but I just want to use a default one available on the settings (I tried but it format almost the same).
Faced same issue. Settings/Languages&Frameworks/SQL Dialects, there you can find the dialect of file. Change it to what you use.
That's how I solved problem, even though you apply global or project SLQ Dialect, somehow the file may not be updated.
As you see from the image, Generic SQL causes problem here.
VS Code is colorizing the script in my .sql files, but with what seem to be some errors. For example I would expect "RENAME" to be colorized here:
I've tried using a few extensions, but I can't fix this problem. I don't know if it's because I'm using postgreSQL and it's reading some other SQL dialect? Any assistance appreciated.
Figure it out. At the bottom right of VS Code, click the button that says 'Postgres' as shown here:
You can then select/search whichever language you want to use. Mine was on SQL, and I changed it to postgresql.
we're currently customizing iNotes for a customer (platform currently is Domino 9). We almost reached our goals, but one thing that's on our todo list I can't really figure out: they want us to also customize any possible error pages; see the following example screenshot:
This and other similar pages seem to come from the central Forms9.nsf which I'd love to leave as it is. We so far tried domcfg.nsf mappings, but as this is an iNotes internal error it obviously can't work; I also tried to figure out a way to put seomething into our customized Forms9_x.nsf but without any hint this is too abstract for me.
So my questions are:
has anyone ever done this?
what options do we have (apart from "hacking" Forms9.nsf)?
Many thanks in advance...
Update:
After continuing to play with domcfg mappings I suddenly saw a first result; not sure what's the difference to the first attempts, though; maybe moving the error form to Forms9_x.nsf did the trick? I'll keep investigating and post an answer if I can find one...
Alright, this has been an afternoon of wild guessing and hacking along, but finally I think I found it:
first of all, my playing around with domcfg mappings didn't have to do with solving the problem; instead, I just by chance had put my error page form into my Forms9_x.nsf and named it $$ReturnGeneralError (that's simply the name used in Forms9.nsf...; I completely had forgotton about those 4 pre-defined form names back from Domino 5 times).
What did not work was the old method of simply including a text file named MessageString to display the exact error message returned from the server; obviously iNotes is handling those error strings differently.
After a few hours of testing, and comparing codes between the standard iNotes error page and mine I finally found it: include some iNotes specific computed text into the page, in my case that is
#{{MessageString}; html}
See this document for some details (last row in the table)
Hopefully this can help someone else as well...
I'm trying to learn Cucumber. After poking around a bit on SO I found a link to this tutorial. It was very helpful (and I recommend it highly!), but, for a beginner like myself, a couple of the early steps were opaque. I thought I'd explain these two pitfalls here, to spare future Cucumber students the head-scratching they caused me.
The two problems both came up in this section:
Starting the fail-fix cycle
I run it using cucumber features, and it fails on the first line –
Given I go to the new book page – because cucumber doesn’t know where
the “new book page” is. So I add that to the cucumber paths helper.
when /the new book page/
new_book_path
I had trouble interpreting this section and running her code.
My first question was: where do I find the cucumber paths helper file?
Once I figured it out and ran cucumber features, I got a syntax error.
My second question was how do I debug the syntax error that her code raises? I've tried to answer these two questions below.
First Gotcha: where the heck is the `cucumber paths helper'?
First off, she talks about adding a step to the cucumber paths helper. I struggled for a while to figure out where this file was located. I couldn't find anything with a similar name in my app, and google searches didn't yield any useful results. What was going on?
It turns out that I couldn't find the file because it's not automatically generated -- you need to create it yourself. Furthermore, the name of the file is totally arbitrary: it doesn't need to be called cucumber_paths_helper. That's why my google searches were fruitless.
For her code snippet to be executed it just needs to be in some file living in the features/support folder. All of the code in this directory is executed before any cucumber tests are run. The solution? I put her code into a new file at features/support/manage_books_steps.rb.
Ok, one down...
Second Gotcha: syntax error, unexpected keyword_when
The next problem showed up when I tried to run cucumber features. I got this:
/Users/dB/myApp/features/support/manage_books_steps.rb:1: syntax error, unexpected keyword_when
when /the new book page/
^ (SyntaxError)
For some reason my system couldn't parse this code. I'm not sure why exactly, but I'm guessing that Sarah was using some gem or tool to preprocess her code that I didn't have installed, and she unfortunately didn't go into detail about her gemset in the article. (Maybe she wrote it before cucumber's training wheels came off?) In any case, after consulting some other cucumber tutorials I tried reformatting her snippet like so.
When /^I go to the new book page$/ do
visit new_book_path
end
This worked.
After getting past those two little obstacles, the rest of the tutorial was a synch.
Anyway, I hope this helps someone somewhere down the line. And thanks, Sarah, for a great tutorial.
Edits/comments/corrections are welcome.
On my last machine I had created a way to see a GUID variable while debugging by hovering over it. I don't remember what it was (a visualizer?).
I have a new 64 bit machine with vs2008 - is there anyway to mouseover a guid value and have it appear? What makes guid's so special that their value doesn't show like most variables?
I wrote a blog article on how to do this awhile back. It doesn't require a visualizer and the results will just show up automatically.
http://blogs.msdn.com/vbteam/archive/2007/09/28/customizing-displays-in-the-debugger-for-system-types.aspx
Also, this is fixed in VS2010 such that the GUID will always display inline by default. No extra steps necessary.
You might be looking for this visualizer:
http://devmatter.blogspot.com/2006/04/guid-debugger-visualizer-for-visual.html
Unfortunately, it doesn't look like it works in Visual Studio 2008.
EDIT: Here is the posting from the developers site: http://www.codechimp.org/Blog/post/New-Download-GUID-Visualizer-for-Visual-Studio-2005.aspx Doesn't look like he has worked on it since then.