How to set java_home on Windows 7?

How to set java_home on Windows 7?

I went to the Environment Variables in 'System' in the control panel and made two new variables, one for user variables and one for system variables. Both were named JAVA_HOME and both pointing to C:\Sun\SDK\jdk\binBut for some reason, I s

Identity increment is jumping in SQL Server database

Identity increment is jumping in SQL Server database

In one of my tables Fee in column "ReceiptNo" in SQL Server 2012 database identity increment suddenly started jumping to 100s instead of 1 depending on the following two things.if it is 1205446 it is jumps to 1206306, if it is 1206321, it j

How do I view the SQL generated by the Entity Framework?

How do I view the SQL generated by the Entity Framework?

How do I view the SQL generated by entity framework ?(In my particular case I'm using the mysql provider - if it matters) 1:You can do the following:IQueryable query = from x in appEntities where x.id = 32 select

Any workaround for ignoring unexpected elements in Apache Axis 1.4?

Any workaround for ignoring unexpected elements in Apache Axis 1.4?

The problem was asked before "Apache AXIS Ignore/Skip additional element while parsing" in 2012 for Apache Axis 2. Is there no workaround yet for Axis 1.4?Problem DefinitionFor instance;1- We have a soap response definition('ResponseGetCust

xaml what is “local:”?

xaml what is “local:”?

What is local: in XAML, and what parameters in a C# class can be called local: ?In some code I am looking at, I see xmlns:local="clr-namespace:AskLocal". What does this mean? 1:In XAML the local alias is commonly used when referring to t

How to use “setup.cfg” instead of setup.py with Python 2.7

How to use “setup.cfg” instead of setup.py with Python 2.7

It seemed to me, that instead of the whole plethora of named keyword-arguments forthe distutils.core.setup function, one can use a setup.cfg file in the same directoryas the setup.py file and all these keywords will be read from the setup.c

Is it necessary to use template parameters to refer to same class inside definition?

Is it necessary to use template parameters to refer to same class inside definition?

Is this necessary: template class A{ T*point; A someFunction(){} //instead of returning just "A", not "A" }Will someFunction implicitly return the A of the same type as the class being defined? Because outside the class, you can only r

how to generate Html.ActionLink with icon

how to generate Html.ActionLink with icon

I'm starting to learn ASP.NET MVC, and have a problem, how generate code with Html.ActionLink like this: Create please. 1:Html.ActionLink() only supports plain-text links.You should use for more-complex lin

how to check if device has flash light led android

how to check if device has flash light led android

How can I check if a device has a camera led (flashlight). I am talking about devices with android OS?I have seen solutions some solutions which talks about how to turn the led on and off but what will happen if the device doesn't even has

Bootstrap 3.1 visible-xs and visible-sm not working together

Bootstrap 3.1 visible-xs and visible-sm not working together

I have a div that I want to show on sm and xs devices, it looks like this: Item 1 Item 2 Item 3My bootstrap is loading from cdn without any customization.This is supposed to show this div on xs and sm as stated on classes but the resu

What does the @Valid annotation indicate in Spring?

What does the @Valid annotation indicate in Spring?

In the following example, the ScriptFile parameter is marked with an @Valid annotation.What does @Valid annotation [email protected](value = "/scriptfile", method = RequestMethod.POST) public String create(@Valid ScriptFile scriptFile,

Is there a “String.Format” that can accept named input parameters instead of index placeholders? [du

Is there a “String.Format” that can accept named input parameters instead of index placeholders? [du

This question already has an answer here: C# variables in strings 4 answers Whats a good way of doing string templating in .NET?

Bluetooth device not discoverable

Bluetooth device not discoverable

I'd like to establish a Bluetooth communication between an Android phone and a remote device. The class of the remote device is a basic one just a simple Bluetooth adapter. When I use the Bluetooth scan devices function, the phone recognize

Constructor Chaining in Java

Constructor Chaining in Java

I hava slight doubt regarding the Output of the Program of Constructor Chaining I showed Below:class Cube { int length; int breadth; int height; public int getVolume() { return (length * breadth * height); } Cube()

Convert function from recursion to iteration

Convert function from recursion to iteration

I have this function that I wrote that is abysmally slow since php does not handle recursion well. I am trying to convert it to a while loop, but am having trouble wrapping my head around how to do it.Can anyone give me some tips? publi

How to filter IEnumerable based on an entity input parameter

How to filter IEnumerable based on an entity input parameter

I'm using now Entity framework- but it's a problem "shared" between all ORM's and even IEnumerable.Let's say I have a method in MVC looks like this:[HttpPost]public ActionResult Foo(FooModel model){ var context = new Context(); -- The EF

Symfony2 FOSUserBundle – Validate against “user active” flag on login

Symfony2 FOSUserBundle – Validate against “user active” flag on login

I have a flag on my users for 'active' and if set to zero or null, I will not allow login.I have tried a couple of approaches and come up short.If I do the logout route the flash message is not preserved, so the user sees nothing.I looked i

Why does the Gamma distribution in SciPy have three parameters?

Why does the Gamma distribution in SciPy have three parameters?

Usually, the Gamma distribution has two parameters: shape and scale (or alternatively shape and rate). However, it seems that in SciPy the Gamma distribution has three parameters: two shape parameters and a location parameter.Does anyone kn

Capturing image from gallery & camera in android

Capturing image from gallery & camera in android

First thing I know this is repeated question but I don't have problem in capturing image from gallery or camera. I created on dummy project to check my code here it's working fineBut when I used same code in my project & here it's not worki

how to propery specify a gradient function for use in optim() or other optimizer

how to propery specify a gradient function for use in optim() or other optimizer

I have an optimization problem that the Nelder-Mead method will solve, but that I would also like to solve using BFGS or Newton-Raphson, or something that takes a gradient function, for more speed, and hopefully more precise estimates. I wr

How do you get and set cookies in Zope and Plone?

How do you get and set cookies in Zope and Plone?

Documentation, and more importantly, some code examples would be very useful. I would prefer this to not be in protected scripts, but in the code that goes into modern packages. 1:Use the response.setCookie() method. You can reach the re

Is it possible for a function to return two values?

Is it possible for a function to return two values?

Is it possible for a function to return two values?Array is possible if the two values are both the same type, but how do you return two different type values? 1:Can a function return 2 separate values? No, a function in C# can only ret

Using Applescript to Execute a Complicated Keystroke

Using Applescript to Execute a Complicated Keystroke

I'm trying to write an Applescript in Automator that will press the left arrow button while holding down control, option, and command. The code I have so far is:on run {input, parameters} tell application "System Events" tell app

API requires POST arguments in a query string?

API requires POST arguments in a query string?

I'm playing with the Twitter API and noticed something funny- For updates, they require POST methods but expect the arguments in the query string. (See for example, the status/update call in their developer console here.) Obviously this is

sklearn GridSearchCV with Pipeline

sklearn GridSearchCV with Pipeline

I'm new to sklearn's Pipeline and GridSearchCV features. I am trying to build a pipeline which first does RandomizedPCA on my training data and then fits a ridge regression model. Here is my code:pca = RandomizedPCA(1000, whiten=True)rgn