Thursday, May 29, 2014

The Zen of Python



The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

Friday, May 16, 2014

Acomba Software

 Some software company that I was checking during my research for Accouting Software in the cloud.

 
http://www.acomba.com/Solutions/AcombaXSuiteComptabilite

probably a point of comparison for available services and products to get ideas from.

Tuesday, May 6, 2014

Messy Outlook Image for signatures



How unfriendly is to have to make a 3 steps process to insert images on an email.

Outlook 365

so here I am trying to insert a signature for my internship  mail.


Saturday, November 16, 2013

C++ pthread Error on Eclipse.

So here it is the path to configure the library that I was missing for my code to compile. Basic but if you don't know can be annoying.

right cklick on the project in the

project explorer -> properties -> c/c++ build

ONCE  you are in the  C/C++ Build settings. you proceed like this:

c/c++ build -> Settings -> linker -> libraries -> add -> pthread ->

once you add the library  you click OK and Rebuild

ok -> rebuild

That should do the trick for: pthread_create and the such.


Wednesday, March 13, 2013

new Iphone Game




       So to put up a code with an example of what I'm trying to achieve today is my new game..  whozapp with initially is going to make a game based on images that you have to guess.   

  Here is the code for the "viewcontroller.h"   
       
           #import

@interface ViewController : UIViewController{
    NSString *Answerstring;
}

//declaring the properties.

@property (weak, nonatomic) IBOutlet UITextField *AnswerText;

@property (weak, nonatomic) IBOutlet UIButton *AnswerButton;

@property (weak, nonatomic) IBOutlet UILabel *Answerlabel;

// need to declare the IBaction for the control we are passing the event.
- (IBAction)AnswerButtonClicked:(id)sender;


//declaring properties for the sports Category


@end
 



and the  code for the viewcontroller.m :

 (IBAction)AnswerButtonClicked:(id)sender {
   
    [AnswerText resignFirstResponder];

    Answerstring = AnswerText.text;
    //userTwoString = user2.text;
    
    if([Answerstring isEqual:@"George Bush"] ||  [Answerstring isEqual:@"George W. Bush"] ||
       [Answerstring isEqual:@"Bush"]        || [Answerstring isEqual:@"George"] ){
        Answerlabel.text = @"You are correct, continue!";
        Answerlabel.textColor = [UIColor whiteColor ];
       
        //Answerlabel.backgroundColor = [UIColor blueColor];
    }else{
        Answerlabel.text = @"Sorry Incorrect, hint:former President of USA ";
        Answerlabel.textColor = [UIColor whiteColor ];
        Answerlabel.backgroundColor = [UIColor magentaColor];
    }

is we see here is just validating the data with a plain, vulgar text on the condition but we are going to put this on a enum so we can have a cleaner elegant code.

   
   




 

Monday, November 5, 2012

netbeans and c++


Netbeans IDE can be used to create C/C++ Applications. Netbeans running on Linux Platforms dont require any additional configuration if the compilers are already available in the Linux distribution. But to get it working in Windows, a Linux-like environment will be required. 
Cygwin is a Linux-like environment for Windows.
Here is a step by step guide to configure Cygwin with Netbeans in Windows.
Step 1: Installing Netbeans
  • Install JDK. The latest version can be downloaded here
  • Download and install Netbeans. The latest version is Netbeans IDE 6.5. The latest version can be downloaded from http://www.netbeans.org. Make sure you download the bundle that has all technologies.
  • Select C/C++ option while installing. ( It is better to select all the options )
Step 2: Installing Cygwin
  • Cygwin can be downloaded from http://www.cygwin.com
  • Run the setup file.
  • Install from internet. Specify C:\cygwin as the root directory.
  • In the Select Packages dialog box, select the packages required. gcc-core, gcc-g++, gdb, and makepackages are most important. These are the C core, C++ core, the GNU Debugger and the GNU version of ‘make’ utility. These packages will be under the ‘Devel’ category.
  • Complete the installation.
Step 3: Testing Cygwin
  • To test whether Cygwin was installed properly, try the following by opening the bash shell:
  • cygcheck -c cygwin
    gcc --version
    g++ --version
    make --version
    gdb --version
  • If the version details are displayed for all these commands, the installation of Cygwin has been successful.
Step 4: Setting PATH
  • Right click on My Computer and select Properties. Goto Advanced System Settings.
  • Click on Environment Variables.
  • In system variables’ frame choose “Path” and click “edit” button.
  • Now in the variable value textbox give the path of your cygwin/bin directory. (i.e., probably c:\cygwin\bin)
  • Click OK
The setup is done.
Now new C/C++ Projects can be started:
  • Open Netbeans IDE
  • CLick New Project –> C/C++ –> C/C++ Application
  • Choose a Project Name and Location. Then select ‘Finish’.
  • Right click on Source Files under the current Project in the Projects pane on the left side.
  • Select New –> Empty C++ File
  • Type in the C++ Program.
  • Now go to Run –> Run Main Project or press F6 to run the program.

Saturday, October 20, 2012

Reverse vs. Forward Proxy

Now that I've been more in  to the infrastructure side I would like to go deep into concepts like Proxys.

here is clear good note on Forward Proxies.

But to put it simple:
Reverse Proxies: broker connections coming from the internet, to your app servers.
Forward Proxies:  filter connections going out to the internet, from clients sitting behind the firewall

key: A key component of Reverse Proxies is the ability to perform TCP Multiplexing. What this means is the incoming connections are terminated, pooled and new connections are established on the back-end using fewer number of server connections resulting in a TCP Multiplexing Ratio. A typical TCP Mux ratio is 10:1 – ten incoming connections to 1 back-end connection.