Is there something equivalent to the command-line parameters for the AjaxMinTask? - microsoft-ajax-minifier

I would like to use the -res switch for the ajaxmintask in the proj file. However, I can't find any documentation on how this can be done. I know how to do it via command line but if there is a way to add switches via the proj file that would be an ideal solution.

There task has a catch-all "Switches" property. It's a string property you can set almost all of the command-line switches for the task. The -res switch is one of the supported switches.

Related

Vim specify syntax file (not syntax type)?

Hi looking to be able to do something like:
vim syntaxfile=custom_c.vim
I do not want to set a syntax type, I want to specify a syntax file by pathname.
Please assist / give pointers.
Willing to write c code to achieve this.
Sure you can, you use:
set syntax=custom_c
This will then look for a file called custom_c.vim in one of the syntax paths.
i.e.
~/.vim/syntax/custom_c.vim
Or
~/.vim/after/syntax/custom_c.vim
The answer here is really good, and goes into more details generally.
Somewhere to look in the help system would be:
:help mysyntaxfile
To automate you could use an autogroup to detect if file is in a given path and set the syntax= setting accordingly.

Run with stdin in CLion

I would like to ask if there is any possibility to run code with custom parameters in CLion. And where to put the file.txt in project folder.
Something equivalent to ./program <file.txt
It seems as if redirection of stdin for the program to be run or debugged is still not implemented. See the issue "Add an option to specify default input and output streams for console applications" at JetBrain's bugtracker.
Other IDEs like Eclipse can do this.
In CLion, go to your Run/Debug Configurations. There's a field named Program arguments. This field allows you to set "a custom parameter":
You can find the corresponding documentation here.
An excerpt from the documentation to help finding the correct dialog:
With the Navigation bar visible (View | Appearance | Navigation Bar), the available run/debug configurations are displayed in the run/debug configuration selector in the Run area:
Note that this of course only works for executable targets (or non executable targets that have an executable set).
Also note that this will most likely not allow you to do any shell redirection. Setting the field to < myfile.txt will not have the effects you are looking for. It will literally copy the strings < and myfile.txt as input arguments 1 and 2 (0 being the binary name).
If you want to pass file contents in this manner you'll have to just pass the file path using this method and then open & load the file in your application.
This is now possible.
In the Run/Debug Configuration, you’ll find a new field called
Redirect input from. Enable it, and fill in the file path/name:
Source: https://blog.jetbrains.com/clion/2020/03/clion-2020-1-eap-input-redirection-config-macros/#input_redirection

Using bukhantsov.org command line query output with options

I am trying to use the tool here business objects query builder output
And there are virtually no examples, so I'm struggling to make it work. It produces no errors, but outputs no file in the directory where the batch file is, that I can see.
Here is the code inside querybuilder.bat:
set lib=c:\Program Files\Business Objects\Common\4.0\java\lib
java -cp "querybuilder.jar;poi-3.8-20120326.jar;%lib%\*" org.bukhantsov.querybuilder.Program %*
Here is the code inside what I am running, which I've named RunQuery_ALLACTIVE.bat, except of course with my Server, Username, and Password changed for the purpose of this post.
I have this all on one line, with no line breaks.
querybuilder.bat -cms:SERVER -username:OURUSERNAME -password:OURPASSWORD -query:"SELECT * FROM CI_INFOOBJECTS where SI_SCHEDULE_STATUS = 9 order by SI_NAME" -auth:windowsad -excel "Output.xls"
Can't tell if the - options go on different LINES ?
Can't tell if I'm supposed to put output file in quotes, or if it should be an existing file or not?
can't tell if for Windows AD (which we use), I would put "Windows AD" or WindowsAD, I'm assuming no spaces obviously.
Tons of unanswered questions on this tool - it LOOKS cool, but has anyone actually successfully used it? Can't really find comments or history on the 'net..
To answer your questions:
The options go on the same line, not on different ones
As Joe said, you'll need to specify the output file as -excel:"Output.xls"
If you want to use Windows AD, you'll probably need to specify secWinAD (case-sensitive).
If you're not sure about the command line options, I suggest you build up gradually: first only specify the required options, then add the optional ones one by one so you know which one is giving you problems.
Also, I noticed that the download page contains a version compiled for XI3.x and BI4. Make sure you use the correct version, corresponding to the version of BusinessObjects you're using. Also, verify the path in the batch file to see if it points to a valid folder containing the JAR files for the BusinessObjects environment.
Update:
I just noticed that the same author/developer created another application (GUI, not command line) that might be a bit easier to use. Have a look here.

How to merge two files using Diff on some selected points?

I have a file of about 19500+ lines of code. I am doing work on this, and also my friend. We are not using SVN, Git or else.. Now i had done my changes.. How i merge my friends file in my file using Diff (or you suggest me) on some selected highlighted points. I want to ignore some changes from friend.
You can use KDiff3 to do the merge operation. By default it will accept the changes done by both of your, but you can interactively select which version you want. If the common base you both have been working with is named original.c, your version your.c and your friend's friend.c, then the command
kdiff3 -o out.c original.c your.c friend.c
will start an interactive merge where you can select which of the changes you want to have or not.

Win32API function to join directories?

Does the Win32 API have a function for joining two paths?
I can't find it, so I thought I'd ask before rolling my own.
Maybe you want the functionality of PathCombine from Shell Path Handling Functions.
I'm not sure what you mean by joining two paths, but you can use CreateSymbolicLink to link one directory to another. Another option is CreateHardLink which is a way to gives files more than one name. There are also junctions available which are yet another way to link directories.
Note that all of these are yet different from the more user-friendly shortcut (*.lnk) files that get interpreted by the shell.
If you don't have to do this from code, use SysInternals' (now Microsoft's) Junction utility.

Resources