Archive for 2014
Posted by jpluimers on 2014/04/03
Switching between many different languages, I tend to forget the exact names and symbols of the PowerShell operators.
Most of the ones I use have to do with comparison and logic, o here they are:
| Operator |
Description |
| -eq |
Equal to |
| -lt |
Less than |
| -gt |
Greater than |
| -ge |
Greater than or Eqaul to |
| -le |
Less than or equal to |
| -ne |
Not equal to |
| Operator |
Description |
| -not |
Not |
| ! |
Not |
| -and |
And |
| -or |
Or |
I find it funny that you have ! and -not, but not -!. Oh well (:
Talking about logicals: PowerShell can coerce a couple of values to $false, but I’m ambivalent to use that: it does shorten code, but is very PowerShell specific.
Before I forget: an operator that is undervalued, is the -f operator that does formatting.
It uses the standard .NET formatting strings, so that is an easy way to put your .NET knowledge to use. Some further reading on the -f operator:
–jeroen
via: Conditional Logic | PowerShell Pro! :: PowerShell Pro!.
Posted in CommandLine, Development, PowerShell, PowerShell, Scripting, Software Development | Tagged: comparison operators, Logical operators, PowerShell | Leave a Comment »
Posted by jpluimers on 2014/04/03
Somehow I always forget this:
The PowerShell escape character is the backtick “`” character.
Use it for escaping quotes within quotes, or inserting special characters.
Don’t abuse it (see the great debate: do not use it as a line continuation).
Often you can avoid line continuation characters by using splatting, which is one of the “best kept secrets” in PowerShell.
–jeroen
via: Escaping in PowerShell.
Posted in CommandLine, Development, PowerShell, PowerShell, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2014/04/03
If I ever get “R cannot be resolved to a variable” in an Android project again, then I should read these posts:
One of the quotes was the culprit:
*Note: Eclipse sometimes likes to add an “import android.R” statement at the top of your files that use resources, especially when you ask Eclipse to sort or otherwise manage imports. This will cause your make to break. Look out for these erroneous import statements and delete them.*
–jeroen
Posted in Android, Development, Mobile Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/04/02
Wow, I totally missed the introduction of SETX.
From TechNet:
SETX:
Creates or modifies environment variables in the user or system environment, without requiring programming or scripting. The Setx command also retrieves the values of registry keys and writes them to text files.
Even better, is that it allows you take values from these sources so it is easy to get those into environment variables:
- Command-line parameter
- Registry key
- Text file (with some filtering/search options)
From a bit of searching around, I think it got introduced in a Windows Resource Kit, and got included by default starting Windows Vista.
Excellent addition to my toolset (:
–jeroen
via Setx.
Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Vista | Leave a Comment »
Posted by jpluimers on 2014/04/02
Every once in a while, someone hoses their computer far enough that it has to be reinstalled, but the original Microsoft product keys are misplaced, and some creepy anti-virus tool disallows the running of standard product key recovery tools like nirsoft’s.
Well, there is enough sourcecode that does recover it, just look for any of these strings:
Some hits:
The below full executables can trigger a virus warning (ordered from less often to most often):
–jeroen
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, CommandLine, Delphi, Development, PowerShell, Software Development | Leave a Comment »
Posted by jpluimers on 2014/04/01
Sample: Cast Media Player for Streaming with DRM
https://github.com/googlecast/CastMediaPlayerStreamingDRM
Flow Diagrams for Senders and Receivers
To help you decide which Google Cast options are right for your app, we have updated the Google Cast SDK documentation with two flow diagrams:
via Leon Nicholls – Google+ – Flow Diagrams for Senders and Receivers To help you decide….
via Shawn Shen – Google+ – * Sample: Cast Media Player for Streaming with DRM* ….
Posted in Chromecast, Development, Google, HTML, HTML5, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Development | Leave a Comment »
Posted by jpluimers on 2014/04/01
Stefan Glienke made the announcement earlier today:
Finally! #Spring4D is released in version 1.0 – no joke!
You can get it directly from bitbucket using git (master) or download the zip from the 1.0 tag (http://bitbucket.org/sglienke/spring4d/downloads).
There’s lots and lots of cross platform functionality in it. No UI stuff, just source. And tests for most of it. And there is build.exe to build/install everything.
You need at least Delphi 2010 (since there is a lot of generics stuff in it). Indeed: no non-Unicode Delphi versions and no Delphi 2009 support.
Oh and the containers to have common interfaces like IList and ICollection. That’s why Nick Hodges likes them so much (:
We are going to work to get it to build with AppMethod as well
To get started, download the about zip, unzip recursively, then run BUILD.EXE and have it integrate the packages in your Delphi version.
The master branch will always contain the youngest stable version.
A few directories and unit names:
- Source\Base
- Source\Core
- Source\Extensions
- Source\Base\Collections
- Source\Base\Reflection
- Source\Core\Container
- Source\Core\Services
- Source\Extensions\Cryptography
- Source\Extensions\Utils
with per directory unit names containing: Read the rest of this entry »
Posted in Delphi, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development | 1 Comment »
Posted by jpluimers on 2014/04/01
For my reminder list: lots of people forget to checkin/undo changes in TFS of stuff automatically checked out by Visual Studio when investigating a problem in their program.
This shows how to view changes made by other users (always in other workspaces because they are not you).
You can do it from Visual Studio, of with the tf command line tool.
View Pending Changes in Other Workspaces.
–jeroen
Posted in Development, Software Development, Source Code Management, TFS (Team Foundation System), Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2014/03/31
Posted in .NET, C#, Delphi, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Encoding, Software Development | Leave a Comment »