Using if-else in JSP

It’s almost always advisable to not use scriptlets in your JSP. They’re considered bad form. Instead, try using JSTL (JSP Standard Tag Library) combined with EL (Expression Language) to run the conditional logic you’re trying to do. As an added benefit, JSTL also includes other important features like looping. Instead of: Use: Also, unless you plan on using response.jsp … Read more

How to use EOF to run through a text file in C?

How you detect EOF depends on what you’re using to read the stream: Check the result of the input call for the appropriate condition above, then call feof() to determine if the result was due to hitting EOF or some other error. Using fgets(): Using fscanf(): Using fgetc(): Using fread(): Note that the form is the same for all of them: … Read more

Segmentation fault: 11 in OS X

This is a bug in the readline compatibility in python, related to changes introduced in OSX10.9. This weekend, release candidates for Python2.7.6 and Python3.3.3 were released which fix this bug. The download links are below. http://python.org/download/releases/2.7.6/ http://python.org/download/releases/3.3.3/ Here’s the issue, quoting from Ned Deily, writing on the python-dev email list. On Tuesday, Apple released OS X … Read more

When running WebDriver with Chrome browser, getting message, “Only local connections are allowed” even though browser launches properly

This is an informational message only. What the message is telling you is that the chromedriver executable will only accept connections from the local machine. Most driver implementations (the Chrome driver and the IE driver for sure) create a HTTP server. The language bindings (Java, Python, Ruby, .NET, etc.) all use a JSON-over-HTTP protocol to … Read more

Function definition not found for a function declared inside unnamed namespace – how to resolve? (Visual Studio 2015)

The green squiggles don’t tell you that there’s an error, they tell you that there’s an opportunity for the new refactoring tools to do something. (Red squiggles indicate an error.) In this case, they’re informing you that there is no definition matching the declaration of test2, so the IDE is offering to generate one. This happens … Read more

Install Plotly in Anaconda

If you don’t care which version of Plotly you install, just use pip. pip install plotly is an easy way to install the latest stable package for Plotly from PyPi. pip is a useful package and dependency management tool, which makes these things easy, but it should be noted that Anaconda’s conda tool will do the same thing. pip will install … Read more

Java path..Error of jvm.cfg

this should be an internal file of JRE and in general you shouldn’t deal with it when you’re running/compiling java. Here you can find an explanation of what exactly this file is intended for. Bottom line, your Java installation is somehow corrupted, so as a first resort to resolve this issue, I suggest you to re-install … Read more