Solving another error related to Entity Data Framework…

Indo Expatriate

It is frustrating if even after you have done unit testing to your program, there will be always another type of error when you try to execute it in real environment. After testing for around 2 weeks, I still deal with type of error which is probably first time to me. This morning when I created new console application in Visual C#, I encountered error stated An entity object cannot be referenced by multiple instances of IEntityChangeTracker.

It turned out that this error related to adding new record using Entity Data Framework. I actually have known how to add new instance into EDF before around 1 year ago. It just happened that after that, I never touched this thing since my last company only used .NET 2.0 for their website.

It took me quite a while before I realized the source of the error in the code below:

Adding EDF instance into DB

The commented…

View original post 86 more words

Review of Programming Languages Course from Coursera

Informatech CR Blog

I just finished taking the course Programming Languages by Dan Grossman from the University of Washington in Coursera and this post is a review of the course from my perspective.

Programming Languages is a course intended to teach many important principles in programming with a strong emphasis in functional programming.

Among the most interesting concepts are the contrasts between static and dynamic typing (and type inference), and the contrasts between functional programming and object-oriented programming. But The course covers other fundamental concepts like mutability / immutability, algebraic data types and pattern matching, recursion and tail recursion, first-class functions and closures, high-order programming, currying, modules, parametric polymorphism, thunks and lazy evaluation, streams, memoization, macros, object-oriented inheritance, mixins, and many other interesting topics.

Every week a set of topics is covered in great detail in a series of videos that may have a length between 10 to 20 minutes. The material is…

View original post 1,148 more words

CREATING MYSQL DATABASE DYNAMICALLY USING CODE

All About Technology

I  have come across a project in which i have to create database and its associated user dynamically.

Let us store our cpanel settings in variable

$box_num = 000;
$cPanel_user = ‘XXXXXXX’ ;  // cpanel username
$cPanel_pass = urlencode(‘YYYYYYYY’); // cpanel password

//Database to create

$userDb = ‘test’;
$db = $cPanel_user.’_’. $userDb; //  e.g XXXXXXX_test

$db_user = $cPanel_user.’_myuser’;  // username to be created
$db_pass = ‘mypass’;  // password to be created

//Permission must stay in uppercase. This will give the user full permissions. Remove the ones that you don’t want.

$permissions = array(‘SELECT’ => ‘SELECT’, ‘INSERT’ => ‘INSERT’, ‘UPDATE’ => ‘UPDATE’, ‘DELETE’ => ‘DELETE’, ‘CREATE’ => ‘CREATE’, ‘ALTER’ => ‘ALTER’, ‘DROP’ => ‘DROP’, ‘LOCKTABLES’ => ‘LOCK’,                 ‘INDEX’ => ‘INDEX’, ‘REFERENCES’ => ‘REFERENCES’, ‘CREATETEMPORARYTABLES’ => ‘TEMPORARY’,
‘CREATEROUTINE’ => ‘CREATEROUTINE’);

Now let us define the host path, replace domain name with your domain name

$host = ‘http://’ . $cPanel_user . ‘:’ …

View original post 136 more words

An Inspired Designer

globaldinteriors

Inspiration is being mentally stimulated to do or feel something, especially something creative.

We as designers should be taking inspiration from everywhere and not just the flowing trends we see!

When given a new brief, our designers go on an inspirational journey and completely embrace the project. A few tips from our team are:

– Immerse yourself in the Worlds of the people who will use and encounter the space.

– Keep asking: “What is really going on here?” – like a detective

– Focus totally on what people will be doing in the spaces and places you are designing  (next year, in five years, in 20).

– Ask off-piste questions. What if this staff canteen were an indoor Astroturf picnic area? Why not turn this extra meeting room that is rarely used into two split phone booths for private calls and Skype conferences?

– Gather inquisitive and reflective people around you. The…

View original post 67 more words

Disable Windows sleep and hibernate while downloading files

RaedSelim

In this post I will explain how to disable MS Windows sleep and hibernatemodes  and lock your PC if you don’t want anyone to access your computer while you’re away.

Using CMD

  • You’ll have to use cmd command powercfg
  • Run the following commands in cmd (or use bash file) to disable hibernate and sleep (link)
  • To undo the previous action and restore default powercfg, Run the following command
  • To prevent anyone from using your PC while you’re downloading press (Ctrl+Alt+Del) then choose lock computer, view the following link.
  • View this link for bash script that changes and restores powercfg.
  • View this link for more info.

Another alternative

Have a nice day 🙂

View original post

The Same Name Problem

The Anonymous Widower

The two names I habitually use aren’t the most uncommon and I’ve met more than a few individuals, who use the same pair of names. I also own the .com domain for the names, which must give me a certain precedence.

But at registration for my P&O cruise, I found that I was not alone and because of this my account was changed to the first name that only my mother, my passport, HMRC and the DWP use. It worked after a fashion, although some staff seemed confused that I was travelling under a different name. But checking my statement after the cruise, there doesn’t seem to be any charges that I hadn’t made.

It did give me a bit of a problem with the wi-fi, as my Samsung tablet computer has my used name in its memory and always used that, which meant, there was a lot of typing…

View original post 70 more words

Luís Bastião ( only a few words)

Hi folks!

In the last few months, we’ve been working on DICOM Router based on Cloud resources. We’ve been publishing several papers and deployed the solution. This software is used to Scientific article entitle as “DICOM relay over the cloud”: http://www.springerlink.com/content/h8w7ur91xur03510/.

The main motivation to create these system was to connect geo distributed repositories. For instance, if you want to connect to the PACS archive located in the hospital from home. You can do it easily without complex setups. In the figure, you can see a overview of the general architecture.

DCMcloud

There are other references regarding this paper, like for instance, “Portuguese develop interinstitutional DICOM cloud-based relay“.

Our development team entered an agreement with BMD Software for the company to commercialize the product. Check out out on: BMD Software, www.bmd-software.com. If you want to know more about it, do not hesitate to contact me!

View original post

Learning to Program

BONNIE ZHOU

Recently I’ve taken on the daunting task of learning how to write code in hopes of someday creating my own computer programs/apps. Most of its incentive stems from my admiration of the works produced by my fellow colleagues. Math and computer science are closely related and I often see my peers writing their own websites/games/apps or catch a glimpse of the long list of proficient programming languages on their resume. Sometimes it’s just because I’m tired of constantly being lost in their technical computer-related conversations. I know that programming is about more than knowing languages, although that certainly is a good starting point. Computer science is truly about solving problems, which I suppose is the real reason why I took an interest to it.

I remember both of my first year CS courses, where they introduced it to us as complete beginners who barely even knew what code was. In high…

View original post 722 more words

C++ | Loops introduction

The Techtopz

Introduction

This tutorial will give a introduction to loops in c++. There are 3 types of loops mainly, for loop, while loop and do-while loop. The first program prints 1 to 10 using for loop. The next one uses while loop. The last one uses do-while loop. You can extend the program by just replacing the 10 by the limit. So enjoy the program. Lets begin………………

View original post 212 more words