Here i am going to write a simple process about how to detect whether your laptop running on battery or current. For this i create a simple windows form application.
A button is placed on the form. I just want to show the system so nothing added without this.
Double click on the button and on its click event write these codes:
private void button1_Click(object sender, EventArgs e)
PowerLineStatus status = SystemInformation.PowerStatus.PowerLineStatus;
if (status == PowerLineStatus.Offline)
MessageBox.Show(“Running on Battery”);
MessageBox.Show(“Running on Power”);
Its done. So simple. Try this.
Fun with code.
1. Setting limited number after decimal point in java:
double relativeSpeed =3.125878;
java.text.DecimalFormat df = new java.text.DecimalFormat();
String r = df.format(relativeSpeed);
Unable to update the EntitySet ‘yourTableName’ because it has a DefiningQuery and no element exists in the element to support the current operation.
Recently i am switching to MVC4 with Razor view engine for ASP.NET, C# web application. Tomorrow i was developing a blogging site where there were some works related to database. There i have created a table with 4 columns but none of them were made primary key.
When i tried to run the application the visual studio 2012 shows the error “Unable to update the EntitySet ‘UserTable’ because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element to support the current operation.” Here UserTable was my table name.
The database was sql server compact edition of visual studio 2012. I became confused about the error because this type of table with no primary key works well before. After a while i came to know that the problem was because of the lacking of primary key in the table. when i mark one of the columns as a primary key then the project run without error. This type of error was new to me so i thought to write down here so later on it may be helpful to someone like me.
Summary of the error and solution:
Problem: No primary key in the table
Solution: Add a primary key in the table
Bikash, Software Engineer.
Find your GrameenPhone account balance or remaining MegaBytes for internet uses using Modem insted of Mobile phone
Most of us feel too much burden when we have to see our account balance or remaining megabytes because of changing simcard from modem to mobile phone. That’s why, to remove our burden we can use USSD activator plugins for GrameenPhone modem software. By using this we can find our account balance or remaining megabytes from the software. Then we do not need any mobile phone for knowing these necessary information. We can also know other information entering appropriate USSD numbers. This is an useful plugins for the GP users. Anyone can try this for better feelings.
To download the plugins click here. Install the plugins then restart the modem software. Then you will find USSD tab. Click on the that tab and start using.
Thanks for reading this post.
On line learning or stochastic learning:
Stochastic learning occurs when the neuron weights are updated after each individual piece of data is passed through the system. The Feed Forward Neural Network therefore changes with every piece of data and is in a constant state of change during training.
Batch Learning on the other hand stores each neuron weight change when it occurs, and only at the end of each epoch does it update the weights with the net change over the training set. This means the neural network will only update once at the end of each epoch.
Error01: Unable to find manifest sigining certificate in the certification store.
To get rid of from this error right click on the project name in the solution explorer (not in solution) and click in the properties. Then go to the Signing.
Then uncheck the checkbox>> Sign the ClickOnce manifests. Its done.
Click on the Button Select from Store. A box will pop up name Windows Security. Click ok. Its done.
Now your program will run without error.