JSTL (JSP Standard Tag Library) is a JSP based standard tag library which offers tags to control the flow in the JSP page, date/number formatting and internationalization facilities and several utility EL functions.
How can I validate if a String is null or empty using the c tags of JSTL?
I have a variable of name var1 and I can display it, but I want to add a comparator to validate it.
<c:out value="${var1}..
I don't know what I've done incorrectly, but I can't include JSTL. I have jstl-1.2.jar, but unfortunately I get exception:
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/js..
I have a value set in the request object like the following,
String[] categoriesList=null;
categoriesList = engine.getCategoryNamesArray();
request.setAttribute("categoriesList", categoriesList );
..
I have a Map keyed by Integer. Using EL, how can I access a value by its key?
Map<Integer, String> map = new HashMap<Integer, String>();
map.put(1, "One");
map.put(2, "Two");
map.put(3, "..
I have an Enum called Status defined as such:
public enum Status {
VALID("valid"), OLD("old");
private final String val;
Status(String val) {
this.val = val;
}
public..
I'm trying to only show something based on if a string is not equal to:
<c:if test="${content.getContentType().getName() != "MCE"}">
<li><a href="#publish-history" id="publishHistoryTa..
I am trying to access a session attribute from a jsp page which is set and dispatched by a servlet, but I am getting the error message "jsp:attribute must be the subelement of a standard or custom act..
What's the best way to do a simple if-else in Thymeleaf?
I want to achieve in Thymeleaf the same effect as
<c:choose>
<c:when test="${potentially_complex_expression}">
<h2>H..
I've got a variable from an object on my JSP page:
<%= ansokanInfo.getPSystem() %>
The value of the variable is NAT which is correct and I want to apply certain page elements for this value. H..
I am using a JSP page to print an array of values. I'm trying to use JSTL <c:forEach> for this.
<c:forEach items="${objects}" var="object">
<td>${object.name} </td>
</c..
I need to hide an element if certain values are present in the JSP
The values are stored in a List so I tried:
<c:if test="${ mylist.contains( myValue ) }">style='display:none;'</c:if>..
In the same context i have another query
<select multiple="multiple" name="prodSKUs">
<c:forEach items="${productSubCategoryList}" var="productSubCategoryList">
<..
I managed to do it with the next code but there must be an easier way.
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/j..
Writing a JSP page, what exactly does the <c:out> do? I've noticed that the following both has the same result:
<p>The person's name is <c:out value="${person.name}" /></p>
&l..
How to set the JSTL variable value in java script?
<script>
function function1()
{
var val1 = document.getElementById('userName').value;
<c:set var="user" value=""/> // how do..
I added an external CSS stylesheet to my project and placed in the WEB-CONTENTS folder of my project in Eclipse. When I deployed it on the Tomcat, the stylesheet was not applied. When I debugged it in..
I am creating a drop down list of all languages. The default language selection for the list will be determined by information added by the user:
<select>
<c:forEach items="${languages}..
I would like to concatenate a string within a ternary operator in EL(Expression Language).
Suppose there is a variable named value. If it's empty, I want to use some default text. Otherwise, I need t..
When I am run my application after entering the URL, this exception is coming.I am using Eclipse and Tomcat7.0.35. I also added Jstl.jar and jstl1.2.jar
My code is
java.lang.ClassNotFoundException: ..
I'm looking to have JSTL loop through a Map<String, String> and output the value of the key and it's value.
For example I have a Map<String, String> which can have any number of entries, ..
I am using JDK 1.7, Apache Tomcat 7.0.23 and I have placed JSTL core library(1.2) and STANDARD jar in WEB_INF lib folder it is not giving me any warning but when I will try to run the code
<%@ ta..
I want to get the value of HashMap based on key.
HashMap<String, ArrayList<String>> map
= new HashMap<String, ArrayList<String>>();
ArrayList<String> arrayList = ne..
I'm trying to use JSTL, but I get the following error:
Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"
How is this caused and how can I solve it? ..
I want to use the count from the JSTL forEach loop, but my code doesnt seem to work.
<c:forEach items="${loopableObject}" var="theObject" varStatus="theCount">
<div id="divIDNo${theCount..
This question is related to my previous question :
Jsp iterate trough object list
I want to insert counter that starts from 0 in my for loop, I've tried several combinations so far :
1.
<c:forE..
I have results from
Query query = session.createQuery("From Pool as p left join fetch p.poolQuestion as s");
query and I would like to display it on JSP.
I have loop:
<c:forEach items="${pools..
I have an if statement that I am trying to perform with JSTL.
My code is below (the variables values is an ArrayList that contains a user defined object and type is a private property of that object,..
Currently I use:
<%
final String message = (String) request.getAttribute ("Error_Message");
%>
and then
<%= message %>
However I wonder if the same can be done with EL or JSTL instea..
If I have a JSF backing bean return an object of type ArrayList, I should be able to use <c:foreach> to iterate over the elements in the list. Each element contains a map and although the quest..
I have a condition where I have an enrollment form in which if userid is 0 it should show the dummy image and when I edit user from any update, I check for if userid which is not equal to 0 then displ..
I want to output some HTML code based on some condition in a JSP file.
if (condition 1) {
Some HTML code specific for condition 1
}
else if (condition 2) {
Some HTML code specific for conditi..
I've been trying to evaluate if this array list is empty or not but none of these have even compiled:
<c:if test="${myObject.featuresList.size == 0 }">
<c:if test="${myObj..
I am working on a project to try and teach myself spring and struts. I am currently stuck on a JSP page. I have a pojo class with variables eid and ename with getters/setters, I also have a table in s..
I saw some code like the following in a JSP
<c:if test="<%=request.isUserInRole(RoleEnum.USER.getCode())%>">
<li>user</li>
</c:if>
My confusion is over the "=" tha..
I have SortedMap in Servlet to populate drop down values in JSP and I have the following code
SortedMap<String, String> dept = findDepartment();
request.setAttribute("dept ", dept);
a..
I am trying to convert decimal to binary numbers from the user's input using Java.
I'm getting errors.
package reversedBinary;
import java.util.Scanner;
public class ReversedBinary {
public stat..
Is there any way to create a virtual directory in IIS express? I know that Cassini can't do this and it would be nice to be able to do this without using a full version of IIS.
I've got it so far tha..
I have an existing Web API 2 service and need to modify one of the methods to take a custom object as another parameter, currently the method has one parameter which is a simple string coming from the..
My server is running PHP 5.3 and my WordPress install is spitting these errors out on me, causing my session_start() to break.
Deprecated: Assigning the return value of new by reference is deprecat..
Update: The best performing algorithm so far is this one.
This question explores robust algorithms for detecting sudden peaks in real-time timeseries data.
Consider the following dataset:
Example o..
I am trying to define a basic function in python but I always get the following error when I run a simple test program;
>>> pyth_test(1, 2)
Traceback (most recent call last):
File "<py..
I use hover, active and disabled to style Buttons.
But the problem is when the button is disabled the hover and active styles still applies.
How to apply hover and active only on enabled buttons?..
This is a batch file in Windows.
Here is my .bat file
@echo off
copy "C:\Remoting.config-Training" "C:\Remoting.config"
"C:\ThirdParty.exe"
This works fine except the .bat file leaves the..
I'm making a search page, where you type a search query and the form is submitted to search.php?query=your query. What PHP function is the best and that I should use for encoding/decoding the search q..
Is there a Shortcut for
echo "<pre>";
print_r($myarray);
echo "</pre>";
It is really annoying typing those just to get a readable format of an array...
How can I use this:
<!--[if lt IE 8]>
<style type='text/css'>
#header ul#h-menu li a{font-weight:normal!important}
</style>
<![endif]-->
If I remove <..
Possible Duplicate:
Intellij Idea 9/10, what folders to check into (or not check into) source control?
I started using WebStorm for web development and am not sure what to add and what to e..
I'm working on a site which contains a whole bunch of mp3s and images, and I'd like to display a loading gif while all the content loads.
I have no idea how to achieve this, but I do have the animat..
I'm currently making a simple calculator app on Android. Im trying to set up the code so that when a number button is pressed it updates the calculator screen with that number. Currently I'm doing it ..
I am new to rails. What I see that there are a lot of ways to find a record:
find_by_<columnname>(<columnvalue>)
find(:first, :conditions => { <columnname> => <columnvalue..
I need to make the first character of every word uppercase, and make the rest lowercase...
manufacturer.MFA_BRAND.first.upcase
is only setting the first letter uppercase, but I need this:
ALFA ROM..
Python 3.2.3. There were some ideas listed here, which work on regular var's, but it seems **kwargs play by different rules... so why doesn't this work and how can I check to see if a key in **kwargs ..
Notepad++ keeps inserting tabs which later messes up my code. This doesn't just happen when I hit the tab key, but other times as well. I want it to use 4 spaces instead of tabs.
How can I make Notep..
I have an array that is made up of AnyObject. I want to iterate over it, and find all elements that are array instances.
How can I check if an object is of a given type in Swift?..
I know this is probably a simple question, but I'm attempting a tweak in a plugin & js is not my expertise and I got stumped on how to do the following:
I have an array that can contain a number ..
I suppose it's a very simple thing but I just can't get behind it.
All I want is to show an image over an ImageView linked to fxml.
Here is my code:
package application;
import java.io.File;
import..
I have a very large 2D array which looks something like this:
a=
[[a1, b1, c1],
[a2, b2, c2],
...,
[an, bn, cn]]
Using numpy, is there an easy way to get a new 2D array with, e.g., 2 random rows..
I was just wondering who knows what programming languages Windows, Mac OS X and Linux are made up from and what languages are used for each part of the OS (ie: Kernel, plug-in architecture, GUI compon..
I have a collection of Boost unit tests I want to run as a console application.
When I'm working on the project and I run the tests I would like to be able to debug the tests, and I would like to hav..
I have installed PostgreSQL on my Mac OS Lion, and am working on a rails app. I use RVM to keep everything separate from my other Rails apps.
For some reason when I try to migrate the db for the firs..
I was wondering how can I add extra whitespace in php is it something like \s please help thanks.
Is there a tutorial that list these kind of things thanks...
I'm working in (formerly Twitter) Bootstrap 2 and I wanted to style buttons as though they were normal links. Not just any normal links, though; these are going in a <ul class="nav nav-tabs nav-sta..
I am using this code to get the value of currently selected radio button, but it doesn't work.
var mailcopy = document.getElementById('mailCopy').value;
How to get the currently selected radio but..
I would like to change the TIMEZONE value in a Java Calendar instance at runtime.
I tried below. But the output is the same in both instances:
Calendar cSchedStartCal = Calendar.getInstance(TimeZ..
I have a form with many input fields.
When I catch the submit form event with jQuery, is it possible to get all the input fields of that form in an associative array?..
How to disable auto-play for video when src is from my local pc?
<iframe width="465" height="315" src="videos/example.mp4"></iframe>
I have tried the following, but it doesn't work:
..
I have a UITextView in my iOS Application, which displays a large amount of text.
I am then paging this text by using the offset margin parameter of the UITextView.
My problem is that the padding of..
I'm working on web application that needs to render a page and make a screenshot on the client (browser) side.
I don't need the screenshot to be saved on the local HDD though, just kept it in RAM an..
I'm switching from MySQL to PostgreSQL and was wondering how I can do autoincrement values. I saw in the PostgreSQL docs a datatype "serial", but I get syntax errors when using it (in v8.0)...
I have a script like that
genhash --use-ssl -s $IP -p 443 --url $URL | grep MD5 | grep -c $MD5
I want to get stream generated by genhash in a variable. How do I redirect it into a variable $hash to..
If I have a csv file, is there a quick bash way to print out the contents of only any single column? It is safe to assume that each row has the same number of columns, but each column's content would..
I cannot find exact network performance details for different EC2 instance types on Amazon. Instead, they are only saying:
High
Moderate
Low
What does this even mean? I especially want to know the..
I have a very large database (50+ GB). In order to free space in my hard drive, I tried deleting old records from one of the tables . I ran the command:
delete from Table1 where TheDate<'2004-01-0..
I tried to use marginBottom on the listView to make space between listView Item, but still the items are attached together.
Is it even possible? If yes, is there a specific way to do it?
My code is ..
I'm trying to use cURL in a script and get it to not show the progress bar.
I've tried the -s, -silent, -S, and -quiet options, but none of them work.
Here's a typical command I've tried:
curl -s ..
C++ inherited arrays from C where they are used virtually everywhere. C++ provides abstractions that are easier to use and less error-prone (std::vector<T> since C++98 and std::array<T, n>..
How can I change an SQLite database from read-only to read-write?
When I executed the update statement, I always got:
SQL error: attempt to write a readonly database
The SQLite file is a writea..
How can I change color of a section header in UITableView?
EDIT: The answer provided by DJ-S should be considered for iOS 6 and above. The accepted answer is out of date...
What is the difference between these two declarations?
Declaration 1:
ArrayList<String> arrayList = new ArrayList<String>();
Declaration 2:
List<String> arrayList = new ArrayLis..
This is my view, and I wish to change layout_width to "10dip". How do I do so programmatically?
Note, this is not a LinearLayout, it's a View.
<View
android:id="@+id/nutrition_bar_filled"
..
I have stacked into the question: I need to plot the image with DPI=1200 and specific print size.
By default the png looks ok...
png("test.png",width=3.25,height=3.25,units="in",res=1200)
par(mar=c..
In a script where I create many figures with fix, ax = plt.subplots(...), I get the warning RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (matplot..
I have a jQuery ajax function and would like to submit an entire form as post data. We are constantly updating the form so it becomes tedious to constantly update the form inputs that should be sent i..
I need an algorithm to find shortest path between two points in a map
where road distance is indicated by a number.
what is given:
Start City A
Destination City Z
List of Distances between Cities:
..
How can I use the DISTINCT clause with WHERE? For example:
SELECT * FROM table WHERE DISTINCT email; -- email is a column name
I want to select all columns from a table with distinct email addresse..
In the Chrome's developer pane, I can see these css settings of an element.
As far as I can see, every single font-family value is inherit.
How can I find what is the actual value of the font fam..
I would really appreciate some help on this.
I tried tons of solutions as posted in this forum, but I cannot get it to work.
My ajax call is something like
$(document).ready(function() {
$("#co..
I want to group my dataframe by two columns and then sort the aggregated results within the groups.
In [167]:
df
Out[167]:
count job source
0 2 sales A
1 4 sales B
2 6 sales C
3 ..
I'm trying to run an Excel macro from outside of the Excel file. I'm currently using a ".vbs" file run from the command line, but it keeps telling me the macro can't be found. Here is the script I'm t..
How can one modify the format for the output from a groupby operation in pandas that produces scientific notation for very large numbers?
I know how to do string formatting in python but I'm at a lo..
I have a string like AxxBCyyyDEFzzLMN and I want to replace all the occurrences of x, y, and z with _.
How can I achieve this?
I know that echo "$string" | tr 'x' '_' | tr 'y' '_' would work..
I have not yet been able to figure out how to get a substring of a String in Swift:
var str = “Hello, playground”
func test(str: String) -> String {
return str.substringWithRange( /* What goe..
I've got some code below, that is supposed to be checking if a value is in an Array or not.
Sub test()
vars1 = Array("Examples")
vars2 = Array("Example")
If IsInArray(Range("A1").Value, v..
I need to pass a file path name to a module. How do I build the file path from a directory name, base filename, and a file format string?
The directory may or may not exist at the time of call.
For..
I am trying to learn the best way to write queries. I also understand the importance of being consistent. Until now, I have randomly used single quotes, double quotes, and backticks without any real t..
I am trying to convert a DataTable to an IEnumerable. Where T is a custom type I created. I know I can do it by creating a List<T> but I was thinking if there is a slicker way to do it using IEn..
I was wondering, how do you close a connection with Requests (python-requests.org)?
With httplib it's HTTPConnection.close(), but how do I do the same with Requests?
Code:
r = requests.post("http..
I have a transdate column of varchar2 type which has the following entrees
01/02/2012
01/03/2012
etc.
I converted it in to date format in another column using to_date function. This is the format..
I realize session and REST don't exactly go hand in hand but is it not possible to access session state using the new Web API? HttpContext.Current.Session is always null...
Given a JavaScript array of objects, how can I get the key and value of each object?
The code below shows what I'd like to do, but obviously doesn't work:
var top_brands = [ { 'Adidas' : 100 }, { 'N..
I'm trying to call a number not using specific numbers but a number that is being called in a variable or at least tell it to pull up the number in your phone. This number that is being called in a va..
I have the following code which easily connects to the FTP server and opens a zip file. I want to download that file into the local system. How to do that?
# Open the file for writing in binary mode
..
I need to do select data from a table based on some kind of priority like so:
select product, price from table1 where project = 1
-- pseudo: if no price found, do this:
select product, price from ta..
I have a list of objects and I want to remove all objects that are empty except for one, using filter and a lambda expression.
For example if the input is:
[Object(name=""), Object(name="fake_name..
What does the % in a calculation? I can't seem to work out what it does.
Does it work out a percent of the calculation for example: 4 % 2 is apparently equal to 0. How?..
I created a 4D scatter plot graph to represent different temperatures in a specific area. When I create the legend, the legend shows the correct symbol and color but adds a line through it. The code I..
I was just wondering what the best way to remove the white space from all the elements of a list would be.
For example if I had String [] array = {" String", "Tom Selleck "," Fish "}
How could I ge..
I have a date field in php which is using this code:
$date = mysql_real_escape_string($_POST['intake_date']);
How do I convert this to MySql format 0000-00-00 for inclusion in db. Is it along the ..
I have a GridView which i programmatically bind using c# code.
The problem is, the columns get their header texts directly from Database, which can look odd when presented on websites. So basically, i..
Since I just discovered that RFC 5425 requires TLS 1.2 to be used, and that .NET doesn't yet support it, I wonder if there are any implementation, possibly open source, of TLS 1.2 protocol, as defined..
I'm learning Docker. For many times I've seen that Dockerfile has WORKDIR command:
FROM node:latest
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app/
RUN npm install
COPY..
I am getting the following tool tip in AndroidManifest.xml:
App is not indexable by Google Search; consider adding at least one
Activity with an ACTION-VIEW intent-filler. See issue explanation for
m..
According to the beginner guide, to setup the ADT Plugin, one of the procedures is
http://developer.android.com/sdk/eclipse-adt.html#installing
For the SDK Location in the main
panel, click Bro..
I was using Google guice in my project and now I tried to convert the framework to SpringBoot totally.
I configured the Bean for persistence.xml like below in
@Autowired
@Bean(name = "transactionMan..
Variable used in lambda expression should be final or effectively final
When I try to use calTz it is showing this error.
private TimeZone extractCalendarTimeZoneComponent(Calendar cal, TimeZone..
I have a variable, x, and I want to know whether it is pointing to a function or not.
I had hoped I could do something like:
>>> isinstance(x, function)
But that gives me:
Traceback (mos..
The plotting code below gives Error: Discrete value supplied to continuous scale
What's wrong with this code? It works fine until I try to change the scale so the error is there... I tried to figure ..
I am trying to pass a string array as an argument to the constructor of Wetland class;
I don't understand how to add the elements of string array to the string array list.
import java.util.ArrayList..
I'm trying to run a PowerShell script inside cmd command line. Someone gave me an example and it worked:
powershell.exe -noexit "& 'c:\Data\ScheduledScripts\ShutdownVM.ps1'"
But the problem is ..
I'm trying to install pip3, but I'm not having any luck. Also, I tried sudo install and it did not work. How could I install pip3 on my Mac?
sudo easy_install pip3
Password:
Searching for pip3
Reading..
Consider a data frame with row names that aren't a column of their own per se, such as the following:
X Y
Row 1 0 5
Row 2 8 1
Row 3 3 0
How would I extract the name of these rows ..
I want to make sure I'm not inserting a duplicate row into my table (e.g. only primary key different). All my fields allow NULLS as I've decided null to mean "all values". Because of nulls, the foll..
I have multiple lists of measurements. In each list have the timestramp formated as a string ("2009-12-24 21:00:07.0") and I know that each measurement in the list is separated by 5 seconds.
I want to..
I have a problem binding a DataTable to a DataGrid. I have already searched for solutions but just can't get rid of the error. The binding works fine when using WindowsForms, so the DataTable is corre..
Our webpage background images are having problems in FireFox as well as Safari in iOS on iPads/iPhones with white space showing up on the right side of the page.
The background images extend fine on..
I want to check whether the "user" key is present or not in the session hash. How can I do this?
Note that I don't want to check whether the key's value is nil or not. I just want to check whether th..
I'm confused on how to generate a model that belongs_to another model. My book uses this syntax to associate Micropost with User:
rails generate model Micropost user_id:integer
but http://guides.ru..
I have an external JavaScript file and whether in FireFox or Chrome, whether all browsing data is cleared, it will NOT update no matter what. I believe something happened when I made a backup of my fi..
Currently I am working on a python project that contains sub modules and uses numpy/scipy. Ipython is used as interactive console. Unfortunately I am not very happy with workflow that I am using right..
I want to place some SVG images before some selected elements. I am using jQuery but that is irrelevant.
I would like to have the :before element to be as:
#mydiv:before {
content: '<svg.. code h..
I am using telnet to port 8089 on remote server.
Can any tell me which of the following commands are true.
telnet 74.255.12.25 8089
or
telnet 74.255.12.25 89
Thanks in Advance...
I want to add a column to an existing legacy database and write a procedure by which I can assign each record a different value. Something like adding a column and autogenerate the data for it.
Like,..
I have an object that holds alerts and some information about them:
var alerts = {
1: { app: 'helloworld', message: 'message' },
2: { app: 'helloagain', message: 'another message' }
}
In a..
I'm trying to extract a certain (the fourth) field from the column-based, 'space'-adjusted text stream. I'm trying to use the cut command in the following manner:
cat text.txt | cut -d " " -f 4
Unf..
Say we have a table 'data' containing Strings in several columns. We want to find the indices of all rows that contain a certain value, or better yet, one of several values. The column, however, is un..
I have a problem with some groupy code which I'm quite sure once ran (on an older pandas version). On 0.9, I get No numeric types to aggregate errors. Any ideas?
In [31]: data
Out[31]:
<class 'pa..
I have been trying to run my python files in Git Bash but I keep getting an error and can't figure out how to fix it. My command as follows in the git bash executable python filename.py then it says ..
On Android 1.0 there was a com.google.googlenav namespace for driving directions:
Route - Improved Google Driving Directions
But in newer SDK it was removed by some reason...
Android: DrivingDirection..
What is the difference between creating cookies on the server and on the client? Are these called server side cookies and client side cookies? Is there a way to create cookies that can only be read on..
I need to use mapview control in android and I can't seem to understand how to run keytool.
Is it installed with eclipse? I can't seem to find a download link.
Thanks..
What are the main differences between Objective-C and C++ in terms of the syntax, features, paradigms, frameworks and libraries?
*Important: My goal is not to start a performance war between the two ..
Primitive Data Types - oracle doc says the range of long in Java is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
But when I do something like this in my eclipse
long i = 12345678910;
it..
I'm running a nohup process on the server. When I try to kill it my putty console closes instead.
this is how I try to find the process ID:
ps -ef |grep nohup
this is the command to kill
kill -..
What is the easiest way to get key associated with the max value in a map?
I believe that Collections.max(someMap) will return the max Key, when you want the key that corresponds to the max value...
I am just a noob in C#, and I've got this question to ask you.
I have here a form that asks for login details. It has two textfields:
Username
Password
What I want is to get the strings entered ..
I would like to iterate a TypeScript an enum type and get each enumerated symbol name, e.g.:
enum myEnum { entry1, entry2 }
for (var entry in myEnum) {
// use entry's name here, e.g., "entry1"
..
Looking to pass a list of User IDs to return a list names. I have a plan to handle the outputed names (with a COALESCE something or other) but trying to find the best way to pass in the list of user I..
Maybe it looks silly to ask this but I am confused. I referred to Configuring Log4j property but it doesn't seem to help.
I have written a simple web service HelloWorld. And while running it I am get..
I have a directory on my machine where I store all projects from GitHub. I opened one of them and made changes locally on my machine. Project got messed up and now I want to discard all the changes I ..
I am doing some scripts in python. I create a string that I save in a file. This string got lot of data, coming from the arborescence and filenames of a directory.
According to convmv, all my arboresc..
After updating Android Studio from Canary 3 to Canary 4, the following error is thrown at the build time.
Android dependency 'com.android.support:support-support-v4' has different version for the ..
I want a PHP script which allows you to ping an IP address and a port number (ip:port). I found a similar script but it works only for websites, not ip:port.
<?php
function ping($host, $port, $ti..
is there a more efficient way to take an average of an array in prespecified bins? for example, i have an array of numbers and an array corresponding to bin start and end positions in that array, and ..
I need to quickly implement a very small C or C++ TCP server/client solution. This is simply to transfer literally an array of bytes from one computer to another - doesn't need to be scalable / over-c..
I want to clone a GIT repo and NOT end up with a .git directory. In other words I just want the files. Is there a way to do this?
git clone --no-checkout did the exact opposite of what I want (gave ..
I am trying to simplify the following code.
The basic steps that the code should carry out are as follows:
Assign String a default value
Run a method
If the method returns a null/empty string lea..
On Macs and iOS devices, in Safari, a <select> element with a background color generates a gloss over itself. This does not seem to happen in other operating systems.
For example, I have a sel..
Are table names in MySQL case sensitive?
On my Windows development machine the code I have is able to query my tables which appear to be all lowercase. When I deploy to the test server in our datacen..
Before I wrote in urls.py, my code... everything worked perfectly. Now I have problems - can't go to my site. "cannot import name patterns"
My urls.py is:
from django.conf.urls import patterns, incl..
If I didn't need localStorage, my code would look like this:
var names=new Array();
names[0]=prompt("New member name?");
This works. However, I need to store this variable in localStorage and it's..
Often I will have a JavaScript file that I want to use which requires certain variables be defined in my web page.
So the code is something like this:
<script type="text/javascript" src="file.js"..
In my PHP page I should display two different text contents according to whether the page run under mobile or desktop browser. Is there a way to perform this control in PHP?..
I was writing a simple script in the school computer, and committing the changes to Git (in a repo that was in my pendrive, cloned from my computer at home). After several commits I realized I was com..
I'm need to check if memory_limit is at least 64M in my script installer. This is just part of PHP code that should work, but probably due to this "M" it's not reading properly the value. How to fix t..
I have an old dll that was compiled against the .NET framework and deployed. I am not sure which version of the .NET framework it was compiled against. I am wondering how I can determine which versi..
UPDATE FIXED 1/18/15
After we recently updated to MySQL 5.6.27 (from the Ubuntu repo), this option now works. So this appears to have been a problem with the previous version of MySQL.
ORIGINAL QUES..
I need a runtime for SAP Crystal Reports for .Net 4.0 (64-bit). I have been searching from the web but not getting any success. Can I get the URL from where can i download this..
I am creating a session when a user logs in like so:
$_SESSION['id'] = $id;
How can I specify a timeout on that session of X minutes and then have it perform a function or a page redirect once it h..
I have a UIScrollView with only horizontal scrolling allowed, and I would like to know which direction (left, right) the user scrolls. What I did was to subclass the UIScrollView and override the touc..
I have a set of HTML files and a SQLite database, which I would like to access from the browser, using the file:// scheme. Is it possible to access the database and create queries (and tables) using J..
I want to dynamically parse an object tree to do some custom validation. The validation is not important as such, but I want to understand the PropertyInfo class better.
I will be doing something like..
I've been trying to install both OpenCV and cv2 from both Pycharm and from the terminal as suggested using:
pip install --user opencv
pip install --user cv2
but I'm getting the following error for ..
I've seen a few COM controls which wrap the Gecko rendering engine (GeckoFX, as well as the control shipped by Mozilla - mozctlx.dll). Is there a wrapper for Webkit that can be included in a .NET Winf..
I had this construction error when trying to creating a new DateTime object using a timestamp:
Exception: DateTime::_construct(): Failed to parse time string (1372622987) at position 8 (8): Unexpe..
I am using code $enrypt=md5($pass) and inserting $encrypt to database. I want to find out a way to decrypt them. I tried using a decrypting software but it says the hash should be of exactly 16 bytes..
How can you beta test an iPhone app? I can get it on my own device, and anyone that gives me a device, I can run it on theirs, but is there a way to do a limited release via the app store for beta te..
What's the regular expression to check if a string starts with "mailto" or "ftp" or "joe" or...
Now I am using C# and code like this in a big if with many ors:
String.StartsWith("mailto:")
String.St..
Under which circumstances would you want to use code of this nature in c++?
void foo(type *&in) {...}
void fii() {
type *choochoo;
...
foo(choochoo);
}
..
I am new to Java, usually work with PHP.
I am trying to convert this string:
Mon Mar 14 16:02:37 GMT 2011
Into a Calendar Object so that I can easily pull the Year and Month like this:
String ..
I'm now doing it this way:
[root@~]# echo Aa|hexdump -v
0000000 6141 000a
0000003
[root@~]# echo -e "\x41\x41\x41\x41"
AAAA
But it's not exactly behaving as I wanted,
..
I'm trying to put an existing project under Git source control, but I'm unclear on several things.
I have set up a 'Team Foundation Service' Git account online.
I currently have an ASP.NET MVC 4 sol..
This command works with HiveQL:
insert overwrite directory '/data/home.csv' select * from testtable;
But with Spark SQL I'm getting an error with an org.apache.spark.sql.hive.HiveQl stack trace:
j..
I am trying to send an object as JSON to my webservice in Flask that is expecting JSON in the request data.
I have tested the service manually by sending JSON data and it works fine. However, when I ..
Which is better to use for timing in Python? time.clock() or time.time()? Which one provides more accuracy?
for example:
start = time.clock()
... do something
elapsed = (time.clock() - start)
vs.
..
I have a table that has a column with a default value:
create table t (
value varchar(50) default ('something')
)
I'm using a stored procedure to insert values into this table:
create procedur..
I have a Windows application which will run in Windows XP and newer (i.e. Vista/7). According to the Vista UI Guidelines, the standard sizes are 16x16, 32x32, 48x48, 256x256 (XP standard sizes do not ..
I just started learning my first real programming language, Python. I'd like to know how to constrain user input in a raw_input to certain characters and to a certain length. For example, I'd like to ..
Given I have the below clients hash, is there a quick ruby way (without having to write a multi-line script) to obtain the key given I want to match the client_id? E.g. How to get the key for client_i..
I want to set a default value for my html <textarea>. I read from a material that to add default value you have to do something like <textarea>This is default text</textarea>. I did ..
I'm learning more details in table variable. It says that temp tables are always on disk, and table variables are in memory, that is to say, the performance of table variable is better than temp table..
I have multiple strings in different cells like
CO20: 20 YR CONVENTIONAL
FH30: 30 YR FHLMC
FHA31
I need to get the substring from 1 to till index of ':' or if that is not available till ending..
Normally I would start a command like
longcommand &;
I know you can redirect it by doing something like
longcommand > /dev/null;
for instance to get rid of the output or
longcommand 2&g..
I'm using CKEditor. I am saving the form values with ajax using page methods.
But the content of CKEditor value cannot be saving into the table.
I dont postback the page.
What can I do for that?..
I would like to get the name of a variable or parameter:
For example if I have:
var myInput = "input";
var nameOfVar = GETNAME(myInput); // ==> nameOfVar should be = myInput
void testName([Typ..
I'm just started to learn HTML. Doing an alert() on one of my variables gives me this result [object HTMLInputElement].
How to get the data, that were added in text field, where my input type is tex..
I have a dark blue page and when the image is loading (or missing) the ALT text is black and difficult to read (in FF).
Could I style it (with CSS) to be white?..
I am trying to run a sshpass command inside a bash script but it isn't working.
If I run the same command from the terminal it works fine but running it in a bash script it doesn't.
#! /bin/bash
ss..
I have a select box that calls window.open(url) when an item is selected. Firefox will open the page in a new tab by default. However, I would like the page to open in a new window, not a new tab. ..
I tried this
SELECT convert(datetime, '23/07/2009', 111)
but got this error
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
However
SELECT convert..
I'm trying to install LESS on my machine and have installed node already. However, when I enter "node install -g less" I get the following error and am not sure what to do?
FPaulMAC:bin paul$ npm ins..
I need to redirect every http://test.com request to http://www.test.com. How can this be done.
In the server block I tried adding
rewrite ^/(.*) http://www.test.com/$1 permanent;
but in browser ..
Is there a way to use LIKE and IN together?
I want to achieve something like this.
SELECT * FROM tablename WHERE column IN ('M510%', 'M615%', 'M515%', 'M612%');
So basically I want to be able to m..
How to turn on the anti-aliasing on an canvas.
The following code doesn't draw a smooth line:
var context = mainCanv.getContext("2d");
if (context) {
context.moveTo(0,0);
context.lineTo(100,75..
I've just installed xampp, and am using command line to write mySQL.
I am using 'root' with no password and can connect to mysql but cannot CREATE DATABASE as I get the error 1044 access denied for us..
why doesn't this display ibm.com into a 400x500px modal? The section appears to be correct, but it doesn't cause the popup modal to appear.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN..
I am getting this exception:
The communication object,
System.ServiceModel.Channels.ServiceChannel,
cannot be used for communication
because it is in the Faulted state.
The WCF service us..
I have one activity which is the main activity used throughout the app and it has a number of variables. I have two other activities which I would like to be able to use the data from the first activi..
I have a DataFrame with 4 columns of which 2 contain string values. I was wondering if there was a way to select rows based on a partial string match against a particular column?
In other words, a fu..
I've been working on an iPhone project with iOS 4.0. I just downloaded Xcode 3.2.4 with iOS SDK 4.1 so that I can work with the updated iOS. Upon opening the project in the udpated Xcode, I found that..
I am currently creating an application in Visual Studio 2010. After building the project to generate the output of my application, I find that the .exe is built with the default icon.
Is there any w..
Amazon recently added the wonderful feature of tagging EC2 instances with key-value pairs to make management of large numbers of VMs a bit easier.
Is there some way to query these tags in the same wa..
I am trying to set up a VPN with a Raspberry Pi, and the first step is gaining the ability to ssh into the device from outside my local network. For whatever reason, this is proving to be impossible a..
Which version of the UUID should you use? I saw a lot of threads explaining what each version entails, but I am having trouble figuring out what's best for what applications...
Is there any easy way to remove all HTML tags or ANYTHING HTML related from a string?
For example:
string title = "<b> Hulk Hogan's Celebrity Championship Wrestling &nb..
Using ps -ef | grep tomcat I found a tomcat server that is running. I tried kill -9 {id} but it returns "No such process." What am I doing wrong?
Here's an example:
Admins-MacBook-Pro:test-parent t..