Tag: Software

SVN Basic

subversionA colleague made a pretty cool blog post about svn basic on his blog. Subverion is a software versioning and a revision control system. At work all our program code and scripts, every little piece of code is going in your Subversion repository. This allows you to get back to earlier revisions of the code or simply share and work on code with other employees. Even your documentation is going into the Subversion repository.

On his blog post (German) he shows the basics of subversion, doing a checkout of e repository, adding files, changing files, removing files and more.

Here is a basic list of svn commands, if you need more information you should check the Subversion Homepage or try the Blog post from tspycher.com

svn checkout  http://svn.colab.company.com # SVN checkout
svn commit -m "My Message and Changes" # SVN committing changes and new files
svn add /files/*.* # Adding Files to the SVN Repository after this you have to commit that
svn update # Update your local copy

A lot of IDE’s (Integrated Development Environment) like Visual Studio or Xcode have SVN integrated.



Simple Bean Machine program done in Powershell

Powershell Header

In the last article I posted the C++ Code for a simple Bean Machine output. Now I did the same in Powershell. I know this is not really a fantastic Powershell script, but its good to show others how things get done in Powershell.

Like in the C++ bean machine it works like this:

Bean MachineAnd the Output should look like this:

Bean Machine outputAnd here is how you do this in Powershell:

#Config
[int]$ballCount = 100
[array]$box = @(0, 1, 2, 3, 4, 5)
[string]$line = " +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-->"
[string]$numbers = " 0 5 10 15 20 25 30 35 40 45 50"
[object]$random = New-Object System.Random
 
#count
for([int]$i = 0; $i -lt $ballCount; $i++){
[int]$counter = 0
 
for([int]$j = 0; $j -lt 5; $j++){
$leftorright = $random.next(0,2)
$counter = $counter + $leftorright
}
$box[$counter] = $box[$counter] + 1
}
 
#Output
Write-Host $numbers
Write-Host $line
for ([int]$t = 0; $t -lt 6; $t++){
[string]$Statusline = ""
for ([int]$u = 0; $u -lt $box[$t]; $u++){
[string]$Statusline += "#"
}
Write-Host $t "|" $Statusline $box[$t]
Write-Host $line
}


Simple C++ dec2bin program @KTSI

This is a very simple dec2bin program done for KTSI.

#include 
#include 
#include 
 
using namespace std;
 
string dec2bin (int v) {
	if (v > 255) {
		return "";
	}
	else { 
		string bin;
		int oneorzero;
		for(int i=8;i>0;i--) {
			oneorzero = v % 2;
			if (oneorzero == 1) {
				bin = "1" + bin;
			}
			else {
				bin = "0" + bin;
			}
			v /= 2;
 
		}
 
	return bin;
 
	}
}
 
int main(){
    int v;
    do {
        cout << "Wert(ende = -1) = "; if (!(cin >> v)) {
            return 0;
        }
        if (v < 0) break;
        string s = dec2bin(v);
        cout << s << endl; //system("PAUSE"); } while(v >= 0);
    cout << "bye" << endl;
    //system("PAUSE");
    return 0;
}


GForge gets support for iOS

Good news for GForge users. GForge gets mobile support for iPhone and iPad. This was something I missed for a long time. This will make working with GForge even better.

Gforge

Here is the Blog post:

We are currently developing a client GForge Application for one of the most popular mobile devices platforms, iPhone and iPad. GForge mobile application will have the following features:

  • User management
  • Project Browser
  • Tracker Browser
  • Tracker Item View and Modification
  • Tracker Item Creation

Fast communication and information sharing are the keystones of GForge tools. Today’s mobile devices and smart phones provide a new way to take these two features to a higher level, allowing people to stay in touch even while they are on the road or away from a regular computer.

Since GForge Community opinions and feedback has been always very important for us we would like to know what other cool features you would like to see on this release.