Batch equivalent of “source” on Windows: how to run a Python script from a virtualenv

I’d say you just need to prepend ‘call’ to your activate.bat invocation, to ensure that the current batch file is resumed after activate is executed: call %~dp0env\Scripts\activate.bat Consider doing the same for deactivate.bat. Furthermore, if you want to ensure that the current cmd.exe environment is not polluted by a call to your batch file, consider … Read more

Which programming languages can be used to develop in Android? [duplicate]

At launch, Java was the only officially supported programming language for building distributable third-party Android software. Android Native Development Kit (Android NDK) which will allow developers to build Android software components with C and C++. In addition to delivering support for native code, Google is also extending Android to support popular dynamic scripting languages. Earlier … Read more

Giving the script tag an ID

It’s fine in all current browsers. The only browser that got <script id> wrong was Netscape 4, which we stopped caring about a long, long time ago. That quirksmode page seems to be badly out of date, what with its use of language attributes, script <!– hiding, and application/x-javascript. Its advice about avoiding <script> in … Read more

find difference between two text files with one item per line [duplicate]

grep -Fxvf file1 file2 What the flags mean: -F, –fixed-strings Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. -x, –line-regexp Select only those matches that exactly match the whole line. -v, –invert-match Invert the sense of matching, to select non-matching lines. -f FILE, –file=FILE Obtain … Read more

Copy all files and folders using msbuild

I was searching help on this too. It took me a while, but here is what I did that worked really well. <Target Name=”AfterBuild”> <ItemGroup> <ANTLR Include=”..\Data\antlrcs\**\*.*” /> </ItemGroup> <Copy SourceFiles=”@(ANTLR)” DestinationFolder=”$(TargetDir)\%(RecursiveDir)” SkipUnchangedFiles=”true” /> </Target> This recursively copied the contents of the folder named antlrcs to the $(TargetDir).

Counter increment in Bash loop not working

First, you are not increasing the counter. Changing COUNTER=$((COUNTER)) into COUNTER=$((COUNTER + 1)) or COUNTER=$[COUNTER + 1] will increase it. Second, it’s trickier to back-propagate subshell variables to the callee as you surmise. Variables in a subshell are not available outside the subshell. These are variables local to the child process. One way to solve … Read more