Questions Tagged with #Webex

Online webinar software created by Cisco

Hadoop MapReduce: Strange Result when Storing Previous Value in Memory in a Reduce Class (Java)

If I wish to store the current value of an iterator to compare to the next value of the iterator in a Reduce method, Hadoop requires that I clone it instead of simply assigning its reference to a temp..

Catching FULL exception message

Consider: Invoke-WebRequest $sumoApiURL -Headers @{"Content-Type"= "application/json"} -Credential $cred -WebSession $webRequestSession -Method post -Body $sumojson -ErrorAction Stop This throws th..

HTTP 415 unsupported media type error when calling Web API 2 endpoint

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..

Could not create SSL/TLS secure channel, despite setting ServerCertificateValidationCallback

I'm trying to establish SSL/TLS connection to test server with self-signed certificate. Communication through unsecure channel worked without issues. Here is my sample code, which I've written based ..

Calling async method on button click

I created Windows Phone 8.1 project and I am trying to run async method GetResponse(string url) on button click and waiting for the method to finish, but method is never finishing. Here is my code: p..

No connection could be made because the target machine actively refused it 127.0.0.1

I try to connect to a web service hosted on a different server using the WebRequest Class. The web service returns a string as a Response. While doing so I get an Error: "System.Net.Sockets.Socke..

System.Net.WebException: The remote name could not be resolved:

I am testing an endpoint that I am experiencing some issues with. I am simply using HttpClient in a loop that performs a request each hour. var httpClient = new HttpClient(); var message = httpClien..

Selenium Error - The HTTP request to the remote WebDriver timed out after 60 seconds

I've been using Selenium for a number of months, which we're using to automate some of our internal testing processes. The scripts have been passing fine. I've recently upgraded to C# 2.40.0 webdriver..

..The underlying connection was closed: An unexpected error occurred on a receive

I have the following code: private Uri currentUri; private void Form1_Load(object sender, EventArgs e) { currentUri = new Uri(@"http://www.stackoverflow.com"); HttpWebRequest myRequest = (Ht..

"An attempt was made to access a socket in a way forbidden by its access permissions" while using SMTP

I am trying to send an SMTP email when certain values in database crosses its threshold value. I have already allowed ports 25,587 and 465 in the Windows firewall and disabled the option of preventin..

Why I get 411 Length required error?

This is how I call a service with .NET: var requestedURL = "https://accounts.google.com/o/oauth2/token?code=" + code + "&client_id=" + client_id + "&client_secret=" + client_secret + "&re..

WCF error - There was no endpoint listening at

I am developing a WCF service, running IIS6 on Window server 2003. I have built a test client to talk to the WCF service and I am getting the error below. I have been looking at this error for days an..

The remote server returned an error: (403) Forbidden

I've written an app that has worked fine for months, in the last few days I've been getting the error below on the installed version only. If I run the source code in VS everything works fine. Also, ..

The content type application/xml;charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8)

I trying to consume a WCF web service using stand alone application. I am able to view this service using Internet Explorer also able to view in Visual studio service references. This is the error I..

HttpWebRequest-The remote server returned an error: (400) Bad Request

I am getting The remote server returned an error: (400) Bad Request error while running the following code. I am trying to upload xml file on the http server. My xml file contains tag for the username..

Powershell v3 Invoke-WebRequest HTTPS error

Using Powershell v3's Invoke-WebRequest and Invoke-RestMethod I have succesfully used the POST method to post a json file to a https website. The command I'm using is $cert=New-Object System.Securi..

How do I make calls to a REST API using C#?

This is the code I have so far: public class Class1 { private const string URL = "https://sub.domain.com/objects.json?api_key=123"; private const string DATA = @"..

System.Net.Http: missing from namespace? (using .net 4.5)

TL; DR: I'm new to this language and have no idea what I'm doing here is my class so far: using System; using System.Collections.Generic; using System.Net.Http; using System.Web; using System.Net; u..

how to solve Error cannot add duplicate collection entry of type add with unique key attribute 'value' in iis 7

I created a asp.net website and published it in iis 7. I deleted the default website option in the iis 7 and created the new website in the iis 7. When i click the default document I got the error lik..

How to print full stack trace in exception?

For example, in one place... //---------------a try { // some network call } catch(WebException we) { throw new MyCustomException("some message ....", we); } ...and in another place... //-..

System.Net.WebException HTTP status code

Is there an easy way to get the HTTP status code from a System.Net.WebException?..

How to get status code from webclient?

I am using the WebClient class to post some data to a web form. I would like to get the response status code of the form submission. So far I've found out how to get the status code if there is a exce..

No connection could be made because the target machine actively refused it?

Sometimes I get the following error while I was doing HttpWebRequest to a WebService. I copied my code below too. System.Net.WebException: Unable to connect to the remote server ---> System.Net.So..

The HTTP request is unauthorized with client authentication scheme 'Ntlm' The authentication header received from the server was 'NTLM'

I know there's a lot of questions on SO similar to this, but I couldn't find one for this particular issue. A couple of points, first: I have no control over our Sharepoint server. I cannot tweak any..

Why am I getting "(304) Not Modified" error on some links when using HttpWebRequest?

Any ideas why on some links that I try to access using HttpWebRequest I am getting "The remote server returned an error: (304) Not Modified." in the code? The code I'm using is from Jeff's post here ..

powershell 2.0 try catch how to access the exception

This is the try catch in PowerShell 2.0 $urls = "http://www.google.com", "http://none.greenjump.nl", "http://www.nu.nl" $wc = New-Object System.Net.WebClient foreach($url in $urls) { try { ..

WCF Error "This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case"

I'm having a problem using a WCF call from a Windows service to my WCF service running on my web server. This call has been working for a number of weeks, but then stopped working all of a sudden, an..

System.Net.WebException: The operation has timed out

I have a big problem: I need to send 200 objects at once and avoid timeouts. while (true) { NameValueCollection data = new NameValueCollection(); data.Add("mode", nat); using (var clien..

WCFTestClient The HTTP request is unauthorized with client authentication scheme 'Anonymous'

I've created one WCF service and deployed it on Server. When I browse this service it gives me positive response with ?wsdl URL. Now I'm trying to test the service through WCF Test client. It shows pr..

Large WCF web service request failing with (400) HTTP Bad Request

I've encountered this apparently common problem and have been unable to resolve it. If I call my WCF web service with a relatively small number of items in an array parameter (I've tested up to 50), ..

Setting Timeout Value For .NET Web Service

I have a web service written in C# that is living on a SharePoint site. I have modified the web.config with the following code: <configuration> <system.web> <httpRuntime executi..

How can the error 'Client found response content type of 'text/html'.. be interpreted

I'm using C# and connecting to a WebService via an auto-generated C# proxy object. The method I'm calling can be long running, and sometimes times out. I get different errors back, sometimes I get a S..

The POST method is not supported for this route. Supported methods: GET, HEAD. Laravel

I have a problem with my edit page. When I submit I get this error: The POST method is not supported for this route. Supported methods: GET, HEAD. I have no clue where it comes from as I am pre..

If input field is empty, disable submit button

I'm trying to disable submit button if the user hasn't provided any text. At first sight it looks that everything works just fine, but if user types some text, then deletes it, the submit button bec..

What is a good alternative to using an image map generator?

I have a large image and I want to make certain sections of the image clickable. I also want to specify the shape of the clickable area (square, circle, custom). Without relying on Javascript, how c..

How can I search (case-insensitive) in a column using LIKE wildcard?

I looked around some and didn't find what I was after so here goes. SELECT * FROM trees WHERE trees.`title` LIKE '%elm%' This works fine, but not if the tree is named Elm or ELM etc... How do I m..

What is SuppressWarnings ("unchecked") in Java?

Sometime when looking through code, I see many methods specify an annotation: @SuppressWarnings("unchecked") What does this mean?..

Draw line in UIView

I need to draw a horizontal line in a UIView. What is the easiest way to do it. For example, I want to draw a black horizontal line at y-coord=200. I am NOT using Interface Builder. ..

How to insert spaces/tabs in text using HTML/CSS

Possible ways: <pre> ... </pre> or style="white-space:pre" Anything else?..

How to export non-exportable private key from store

I need to export private key from Windows store. What should I do if the key is marked as non-exportable? I know that it is possible, program jailbreak can export this key. To export key I use Org.Bo..

how to break the _.each function in underscore.js

I'm looking for a way to stop iterations of underscore.js _.each() method, but can't find the solution. jQuery .each() can break if you do return false. Is there a way to stop underscore each()? _([..

How to count number of files in each directory?

I am able to list all the directories by find ./ -type d I attempted to list the contents of each directory and count the number of files in each directory by using the following command find ./ -..

Resource leak: 'in' is never closed

Why does Eclipse give me the warming "Resource leak: 'in' is never closed" in the following code? public void readShapeData() { Scanner in = new Scanner(System.in); System.out.println..

How to use CURL via a proxy?

I am looking to set curl to use a proxy server. The url is provided by an html form, which has not been a problem. Without the proxy it works fine. I have found code on this and other sites, but they ..

How to format html table with inline styles to look like a rendered Excel table?

I'm currently stuck setting borders in an html table. (I use inline styles for a better rendering in e-mail-clients) I have this piece of code: <html> <body> <table style="..

Numpy where function multiple conditions

I have an array of distances called dists. I want to select dists which are between two values. I wrote the following line of code to do that: dists[(np.where(dists >= r)) and (np.where(dists <..

How to create a Java / Maven project that works in Visual Studio Code?

I'm trying to create a maven project - so that I can compile Java files in the root folder and output the class files in another folder. I've already downloaded mvn. I'm trying to integrate with VS ..

How to use if-else logic in Java 8 stream forEach

What I want to do is shown below in 2 stream calls. I want to split a collection into 2 new collections based on some condition. Ideally I want to do it in 1. I've seen conditions used for the .map fu..

Find Oracle JDBC driver in Maven repository

I want to add the oracle jdbc driver to my project as dependency (runtime scope) - ojdbc14. In MVNrepository site the dependency to put in the POM is: <dependency> <groupId>com.oracle..

RandomForestClassfier.fit(): ValueError: could not convert string to float

Given is a simple CSV file: A,B,C Hello,Hi,0 Hola,Bueno,1 Obviously the real dataset is far more complex than this, but this one reproduces the error. I'm attempting to build a random forest classi..

Class Not Found Exception when running JUnit test

I am getting this error when running JUnit test in Eclipse: Class not found com.myproject.server.MyTest java.lang.ClassNotFoundException: com.myproject.server.MyTest at java.net.URLClassLoader$1...

How to fix 'Microsoft Excel cannot open or save any more documents'

I am running C# ASP.NET 4.5 web application on Windows 7 64-bit using IIS 7.5. The application pool it uses has the name 'ASP.NET v4.0' and its identity is ApplicationPoolIdentity. The application use..

pip install gives error: Unable to find vcvarsall.bat

Using pip install zipline on Windows 8 with Python 2.7 gives me the error: Downloading/unpacking six (from python-dateutil==2.1->delorean->zipline[all]) Running setup.py egg_info for package ..

CSS3 Spin Animation

I have reviewed quite a few demos and have no idea why I can't get the CSS3 spin to function. I am using the latest stable release of Chrome. The fiddle: http://jsfiddle.net/9Ryvs/1/ _x000D_ _x000D_..

Multi-key dictionary in c#?

I know there isn't one in the BCL but can anyone point me to a good opensource one? By Multi I mean 2 keys. ;-)..

When are you supposed to use escape instead of encodeURI / encodeURIComponent?

When encoding a query string to be sent to a web server - when do you use escape() and when do you use encodeURI() or encodeURIComponent(): Use escape: escape("% +&="); OR use encodeURI() / e..

Package Manager Console Enable-Migrations CommandNotFoundException only in a specific VS project

I tried to run the command 'Enable-Migrations' in a new project and I got the message: PM> Enable-Migrations The term 'Enable-Migrations' is not recognized as the name of a cmdlet, function, scrip..

How to upsert (update or insert) in SQL Server 2005

I have table in which I am inserting rows for employee but next time when I want to insert row I don't want to insert again data for that employee just want to update with required columns if it exits..

Using grep to search for hex strings in a file

I have been trying all day to get this to work. Does anyone know how to get grep, or something of the like, to retrieve offsets of hex strings in a file? I have a bunch of hexdumps that I need to che..

How to determine whether code is running in DEBUG / RELEASE build?

I am making an app that processes sensitive credit card data. If my code is running in debug mode I want to log this data to the console and make some file dumps. However on the final appstore ve..

How can I find the current OS in Python?

Possible Duplicate: Python: What OS am I running on? As the title says, how can I find the current operating system in python?..

How can I overwrite file contents with new content in PHP?

I tried to use fopen, but I only managed to append content to end of file. Is it possible to overwrite all contents with new content in PHP?..

ASP MVC href to a controller/view

I have this: <li><a href="/Users/Index)" class="elements"><span>Clients</span></a></li> Which works fine. But if I am already on this page or on the controller e..

decompiling DEX into Java sourcecode

How can one decompile Android DEX (VM bytecode) files into corresponding Java sourcecode?..

Connect Java to a MySQL database

How do you connect to a MySQL database in Java? When I try, I get java.sql.SQLException: No suitable driver found for jdbc:mysql://database/table at java.sql.DriverManager.getConnection(DriverM..

How to send a stacktrace to log4j?

Say you catch an exception and get the following on the standard output (like, say, the console) if you do a e.printStackTrace() : java.io.FileNotFoundException: so.txt at java.io.FileInputSt..

Return index of greatest value in an array

I have this: var arr = [0, 21, 22, 7]; What's the best way to return the index of the highest value into another variable?..

How to Call VBA Function from Excel Cells?

I am a VBA newbie, and I am trying to write a function that I can call from Excel cells, that can open a workbook that's closed, look up a cell value, and return it. So far I know how to write a macr..

Open links in new window using AngularJS

Is there a way to tell AngularJS that I want links to be opened in new windows when the user clicks on them? With jQuery I would do this: jQuery("a.openInNewWindow").click( function() { window.o..

How to serve all existing static files directly with NGINX, but proxy the rest to a backend server.

location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; if (-f $request_filename) { ac..

What should I set JAVA_HOME environment variable on macOS X 10.6?

Many Java applications that use shell scripts to configure their environment use the JAVA_HOME environment variable to start the correct version of Java, locate JRE JARs, and so on. In macOS X 10.6, ..

Oracle SQL : timestamps in where clause

I need to look up rows within a particular time frame. select * from TableA where startdate >= '12-01-2012 21:24:00' and startdate <= '12-01-2012 21:25:33' I.e.: I need to look up rows w..

Get value of div content using jquery

I have the following html and I want to get the value of the div which is "Other" How can I do this with jQuery? <div class="readonly_label" id="field-function_purpose"> Other </d..

The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

When I attempt to connect to a MySQL server from PHP, I see the following error: Deprecated: The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /path..

Convert string to integer type in Go?

I'm trying to convert a string returned from flag.Arg(n) to an int. What is the idiomatic way to do this in Go?..

Sending Windows key using SendKeys

I am working on shortcuts in C#. I succeed implementing Ctrl, Alt and Shift with SendKeys. Like this; Ctrl + C: System.Windows.Forms.SendKeys.SendWait("^c"); or Alt + F4: System.Windows.Forms.Se..

what is the size of an enum type data in C++?

This is a C++ interview test question not homework. #include <iostream> using namespace std; enum months_t { january, february, march, april, may, june, july, august, september, october,..

Local Storage vs Cookies

I want to reduce load times on my websites by moving all cookies into local storage since they seem to have the same functionality. Are there any pros/cons (especially performance-wise) in using local..

Running multiple commands with xargs

cat a.txt | xargs -I % echo % In the example above, xargs takes echo % as the command argument. But in some cases, I need multiple commands to process the argument instead of one. For example: cat a...

What is the difference between a "function" and a "procedure"?

Generally speaking, we all hear about the functions or procedures in programming languages. However, I just found out that I use these terms almost interchangeably (which is probably very wrong). So,..

How to count the number of true elements in a NumPy bool array

I have a NumPy array 'boolarr' of boolean type. I want to count the number of elements whose values are True. Is there a NumPy or Python routine dedicated for this task? Or, do I need to iterate over ..

Get current working directory in a Qt application

I'm writing a program in C++ using the Qt library. There is a symbolic link in my home bin directory to the executable. I would like the current working directory of my program to be the directory in ..

How do I use 'git reset --hard HEAD' to revert to a previous commit?

I know that Git tracks changes I make to my application, and it holds on to them until I commit the changes, but here's where I'm hung up: When I want to revert to a previous commit I use: git rese..

Java naming convention for static final variables

there is a rule which says: Names representing constants (final variables) must be all uppercase using underscore to separate words (taken from http://geosoft.no/development/javastyle.html) ..

What is the advantage of using REST instead of non-REST HTTP?

Apparently, REST is just a set of conventions about how to use HTTP. I wonder which advantage these conventions provide. Does anyone know? ..

OS X: equivalent of Linux's wget

How can I do an HTTP GET from a Un*x shell script on a stock OS X system? (installing third-party software is not an option, for this has to run on a lot of different systems which I don't have contro..

How to change an input button image using CSS?

So, I can create an input button with an image using <INPUT type="image" src="/images/Btn.PNG" value=""> But, I can't get the same behavior using CSS. For instance, I've tried <INPUT type..

How do I convert ticks to minutes?

I have a ticks value of 28000000000 which should be 480 minutes but how can I be sure? How do I convert a ticks value to minutes?..

Storing image in database directly or as base64 data?

The common method to store images in a database is to convert the image to base64 data before storing the data. This process will increase the size by 33%. Alternatively it is possible to directly sto..

How can I bring my application window to the front?

How to bring my application window to front? For example whan my app needs attention. This is for my personal program. I need that functionality. This is what I got. But it's NOT working 100% times...

What is the documents directory (NSDocumentDirectory)?

Can someone explain to me what the documents directory is on an iOS app and when to use it? Here is what I believe at present: To me, it seems to be a central folder where the user can store any fil..

Git: which is the default configured remote for branch?

I have a remote bare repository hub. I work only in the master branch. The last sentence of this error message below makes me wonder: How do I find out which is the "default configured remote for your..

What is Persistence Context?

I am new to the Java world and JPA. I was studying JPA and came across many new terms like Entity, persistence. While reading, I could not understand the exact definition for Persistence Context. Can..

Basic HTTP and Bearer Token Authentication

I am currently developing a REST-API which is HTTP-Basic protected for the development environment. As the real authentication is done via a token, I'm still trying to figure out, how to send two auth..

Origin is not allowed by Access-Control-Allow-Origin

I'm making an Ajax.request to a remote PHP server in a Sencha Touch 2 application (wrapped in PhoneGap). The response from the server is the following: XMLHttpRequest cannot load http://nqatalog...

CSS: Truncate table cells, but fit as much as possible

Meet Fred. He's a table: <table border="1" style="width: 100%;"> <tr> <td>This cells has more content</td> <td>Less content here</td> <..

How to display length of filtered ng-repeat data

I have a data array which contains many objects (JSON format). The following can be assumed as the contents of this array: var data = [ { "name": "Jim", "age" : 25 }, { "name": "Je..

How do I create delegates in Objective-C?

I know how delegates work, and I know how I can use them. But how do I create them?..

JavaScript/jQuery - "$ is not defined- $function()" error

I am trying to run a JavaScript/jQuery function and Firebug gets the error: $ is not defined $(function()". The JavaScript code is placed inside a file called core.js and referenced by index.php. W..

Creating an iframe with given HTML dynamically

I'm trying to create an iframe from JavaScript and fill it with arbitrary HTML, like so: var html = '<body>Foo</body>'; var iframe = document.createElement('iframe'); iframe.src = 'data:t..

Why is nginx responding to any domain name?

I have nginx up and running with a Ruby/Sinatra app and all is well. However, I'm now trying to have a second application running from the same server and I noticed something weird. First, here's my n..

How to get the request parameters in Symfony 2?

I am very new to symfony. In other languages like java and others I can use request.getParameter('parmeter name') to get the value. Is there anything similar that we can do with symfony2. I have seen..

JAXB :Need Namespace Prefix to all the elements

I am Using Spring WebServiceTemplate to make webservice call which uses JAXB to generate request XML. My requirement needs all the elements (including root) to have a namespace prefix (there is only a..

setOnItemClickListener on custom ListView

I have a custom ListView. This ListView contains 1 Image and 6 TextViews. To retrieve the value I have created a setOnItemClickListener(...). Whenever I click on the ListView how could I actually retr..

Using comma as list separator with AngularJS

I need to create a comma-separated list of items: <li ng-repeat="friend in friends"> <b ng-repeat="email in friend.email">{{email}}{{$last ? '' : ', '}}</b>... </li>..

get all the elements of a particular form

function getInputElements() { var inputs = document.getElementsByTagName("input"); } The above code gets all the input elements on a page which has more than one form. How do I get the input ele..

How to convert a column number (e.g. 127) into an Excel column (e.g. AA)

How do you convert a numerical number to an Excel column name in C# without using automation getting the value directly from Excel. Excel 2007 has a possible range of 1 to 16384, which is the number ..

Installing PHP Zip Extension

I'm attempting to install the PHP Zip extension. My server does not have external internet access, so I downloaded it myself from PECL: http://pecl.php.net/package/zip. I chose 1.10.2, the latest ..

Python - How to convert JSON File to Dataframe

How can I convert a JSON File as such into a dataframe to do some transformations. For Example if the JSON file reads: {"FirstName":"John", "LastName":"Mark", "MiddleName":"Lewis", "username":"..

How can you get the Manifest Version number from the App's (Layout) XML variables?

I would like to have a way to reference the project's manifest version number in the main part of the code. What I have been doing up until now is to link the version number in a String XML file to th..

HTML Button : Navigate to Other Page - Different Approaches

There are multiple ways to create a HTML button to navigate to other page. Method 1 <button id="btn_click">Click Me</button> <script> $('#btn_click').on('click', function() { windo..

How to compare arrays in C#?

Possible Duplicate: Easiest way to compare arrays in C# How can I compare two arrays in C#? I use the following code, but its result is false. I was expecting it to be true. Array.Equals(..

VBA Excel - Insert row below with same format including borders and frames

I want to build a macro that inserts a row below the selected cell with the same format. This is the code I have so far: Public Sub insertRowBelow() ActiveCell.Offset(1).EntireRow.Insert Shift:=xlDo..

How to call a parent method from child class in javascript?

I've spent the last couple of hours trying to find a solution to my problem but it seems to be hopeless. Basically I need to know how to call a parent method from a child class. All the stuff that I'..

How do you create a Distinct query in HQL

Is there a way to create a Distinct query in HQL. Either by using the "distinct" keyword or some other method. I am not sure if distinct is a valid keywork for HQL, but I am looking for the HQL equi..

Netbeans - Error: Could not find or load main class

So I'm making a java application in Neatbeans 7.4, been working at it for a while, everything was fine, running the project worked fine, but now when I hit run project, I get the error Error: Could ..

Query for documents where array size is greater than 1

I have a MongoDB collection with documents in the following format: { "_id" : ObjectId("4e8ae86d08101908e1000001"), "name" : ["Name"], "zipcode" : ["2223"] } { "_id" : ObjectId("4e8ae86d08101..

PYTHONPATH vs. sys.path

Another developer and I disagree about whether PYTHONPATH or sys.path should be used to allow Python to find a Python package in a user (e.g., development) directory. We have a Python project with a ..

Should URL be case sensitive?

I noticed that HTTP://STACKOVERFLOW.COM/QUESTIONS/ASK and http://stackoverflow.com/questions/ask both works fine - actually the previous one is converted to lowercase. I think that this makes..

Trigger change event <select> using jquery

is there anyway i could trigger a change event on select box on page load and select a particular option. Also the function executed by adding the trigger after binding the function to the event. I..

from unix timestamp to datetime

I have something like /Date(1370001284000+0200)/ as timestamp. I guess it is a unix date, isn't it? How can I convert this to a date like this: 31.05.2013 13:54:44 I tried THIS converter for 13700012..

Plotting images side by side using matplotlib

I was wondering how I am able to plot images side by side using matplotlib for example something like this: The closest I got is this: This was produced by using this code: f, axarr = plt.subpl..

CURL and HTTPS, "Cannot resolve host"

I'm trying to fetch the contents of a page using CURL. The page that is doing the fetching is https and the page it is trying to fetch is also https. I'm getting an error "Couldn't resolve host" wit..

How do I do redo (i.e. "undo undo") in Vim?

In Vim, I did too much undo. How do I undo this (that is, redo)?..

Collections.emptyList() returns a List<Object>?

I'm having some trouble navigating Java's rule for inferring generic type parameters. Consider the following class, which has an optional list parameter: import java.util.Collections; import java.util..

How do you test your Request.QueryString[] variables?

I frequently make use of Request.QueryString[] variables. In my Page_load I often do things like: int id = -1; if (Request.QueryString["id"] != null) { try { ..

jQuery add image inside of div tag

I have a div tag <div id="theDiv">Where is the image?</div> I would like to add an image tag inside of the div End result: <div id="theDiv"><img id="theImg" src="theImg.png"..

Why is list initialization (using curly braces) better than the alternatives?

MyClass a1 {a}; // clearer and less error-prone than the other three MyClass a2 = {a}; MyClass a3 = a; MyClass a4(a); Why?..

Eclipse "Server Locations" section disabled and need to change to use Tomcat installation

I have set up a dynamic web project in Eclipse with a Tomcat 5.5 installation. I want to be to set the server to us the Tomcat installation instead of the workspace metadata location, but when Eclips..

Bootstrap 3 Glyphicons CDN

PAY ATTENTION! The Bootstrap icons are back after this pull request merge. After going back and forth on this for the last couple weeks, I've decided to restore the Glyphicons icon ..

Send an Array with an HTTP Get

How can i send an Array with a HTTP Get request? I'm Using GWT client to send the request...

Maven plugin in Eclipse - Settings.xml file is missing

I installed the maven plugin for eclipse. Then tried updating the index and got the following error: Unable to update index for central|http://repo1.maven.org/maven2 While trying to edit the proxy s..

Background color of text in SVG

I want to color the background of svg text similar to background-color in css I was only able to find documentation on fill, which colors the text itself Is it even possible?..

docker: "build" requires 1 argument. See 'docker build --help'

Trying to follow the instructions for building a docker image from the docker website. https://docs.docker.com/examples/running_redis_service/ this is the error I get will following the instructions..

Including a .js file within a .js file

I'd like to know if it is possible to include a .js file within another .js file? The reason for me wanting to do this is to keep client includes to a minimum. I have several .js files already writte..

SQL - select distinct only on one column

I have searched far and wide for an answer to this problem. I'm using a Microsoft SQL Server, suppose I have a table that looks like this: +--------+---------+-------------+-------------+ | ID | ..

Check a collection size with JSTL

How can I check the size of a collection with JSTL? Something like: <c:if test="${companies.size() > 0}"> </c:if> ..

How does EL empty operator work in JSF?

In JSF an component can be rendered or not using the EL empty operator rendered="#{not empty myBean.myList}" As I've understood the operator works both as null-check, but also check checks if the ..

JPA COUNT with composite primary key query not working

In my db, I have a table (Defaults), and when I generate an entity from table, I get these two classes: @Entity public class Defaults implements Serializable { private static final long serialVer..

How to completely hide the navigation bar in iPhone / HTML5

I'm really new to HTML5 for mobile. I use jQuery Mobile for my current app and I have some problems hiding the navigation bar. I found this site: http://m.somethingborrowedmovie.warnerbros.com/. (I d..

From milliseconds to hour, minutes, seconds and milliseconds

I need to go from milliseconds to a tuple of (hour, minutes, seconds, milliseconds) representing the same amount of time. E.g.: 10799999ms = 2h 59m 59s 999ms The following pseudo-code is the only th..

adding css class to multiple elements

I have created a CSS class called 'button' and applied it to all of my INPUT tags by simply using : .button input { //css stuff here } <p class="button"> <input type="submit" Name='submit' ..

IOS - How to segue programmatically using swift

I'm creating an app that uses the Facebook SDK to authenticate users. I'm trying to consolidate the facebook logic in a separate class. Here is the code (stripped for simplicity): import Foundation ..

How to Query Database Name in Oracle SQL Developer?

How do I query the database name in Oracle SQL Developer? I have tried the following and they all fail: SELECT DB_NAME(); SELECT DATABASE(); Why do these basic MySQL queries fail in SQL Developer? ..

What exactly is the function of Application.CutCopyMode property in Excel

Well first of all I found couple of answers while googling but most of the forums are blocked in my Office Network hence asking this question here! One more intention is to get an answer in plain Engl..

How to Cast Objects in PHP

Ive some classes that share some attributes, and i would like to do something like: $dog = (Dog) $cat; is it possible or is there any generic work around? Its not a superclass, or a interface or r..

How can I disable the UITableView selection?

When you tap a row in a UITableView, the row is highlighted and selected. Is it possible to disable this so tapping a row does nothing?..

Cannot add or update a child row: a foreign key constraint fails

table 1 +----------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+-------------+------+-----+---------+--------..

How to query a CLOB column in Oracle

I'm trying to run a query that has a few columns that are a CLOB datatype. If i run the query like normal, all of those fields just have (CLOB) as the value. I tried using DBMS_LOB.substr(column) and..

How to comment lines in rails html.erb files?

Am a newbie to rails , please let me know the way to comment out a single line and also to comment out a block of lines in *.html.erb files...

Is it possible to define more than one function per file in MATLAB, and access them from outside that file?

When I was studying for my undergraduate degree in EE, MATLAB required each function to be defined in its own file, even if it was a one-liner. I'm studying for a graduate degree now, and I have to w..

TypeError: p.easing[this.easing] is not a function

When trying to show a div element with jQuery, i got this error: [23:50:35.971] TypeError: p.easing[this.easing] is not a function @ file:///D:/html5%20puzzle/jquery.js:2 The relevant function is t..

What is the difference between for and foreach?

What is the major difference between for and foreach loops? In which scenarios can we use for and not foreach and vice versa. Would it be possible to show with a simple program? Both seem the same ..

Reference — What does this symbol mean in PHP?

What is this? This is a collection of questions that come up every now and then about syntax in PHP. This is also a Community Wiki, so everyone is invited to participate in maintaining this list. Why ..

Check if a Postgres JSON array contains a string

I have a table to store information about my rabbits. It looks like this: create table rabbits (rabbit_id bigserial primary key, info json not null); insert into rabbits (info) values ('{"name":"He..

Flask SQLAlchemy query, specify column names

How do I specify the column that I want in my query using a model (it selects all columns by default)? I know how to do this with the sqlalchmey session: session.query(self.col1), but how do I do it w..

What to do with "Unexpected indent" in python?

How do I rectify the error "unexpected indent" in python?..

Does Internet Explorer 8 support HTML 5?

Is there any HTML5 support in IE8? Is it on the IE8 roadmap?..

How do I get the name of a Ruby class?

How can I get the class name from an ActiveRecord object? I have: result = User.find(1) I tried: result.class # => User(id: integer, name: string ...) result.to_s # => #<User:0x3d07cdc&g..

Is there a simple way to remove multiple spaces in a string?

Suppose this string: The fox jumped over the log. Turning into: The fox jumped over the log. What is the simplest (1-2 lines) to achieve this, without splitting and going into lists?..

How to read user input into a variable in Bash?

I'm trying to create a script that simplifies the process of creating a new user on an iOS device. Here are the steps broken down. fullname="USER INPUT" user="USER INPUT" group=$us..

How to find the minimum value of a column in R?

I am new in R and I am trying to do something really simple. I had load a txt file with four columns and now I want to get the minimum value of the second column. This is the code that I have: ## Ch..

How can I check if a background image is loaded?

I want to set a background image on the body tag, then run some code - like this: $('body').css('background-image','http://picture.de/image.png').load(function() { alert('Background image done lo..

How to check size of a file using Bash?

I've got a script that checks for 0-size, but I thought there must be an easier way to check for file sizes instead. I.e. file.txt is normally 100k; how to make a script check if it is less than 90k ..

How to list all dates between two dates

I would like list dates between two date in a SQL Server stored procedure. For example: Date1: 2015-05-28 Date2: 2015-05-31 Results : 2015-05-29 2015-05-30 How to calculate all dates between t..

Get the item doubleclick event of listview

What do I need to do in order to reference the double click event for a listview control?..

How do I get IntelliJ to recognize common Python modules?

I'm using IntelliJ 10 IDEA Ultimate Edition. I've created a new file Test.py, and IntelliJ has correctly switched to Python parsing mode. (I can confirm this by typing "d", it pops up "def" as a sug..

Else clause on Python while statement

I've noticed the following code is legal in Python. My question is why? Is there a specific reason? n = 5 while n != 0: print n n -= 1 else: print "what the..." ..

How to get value of checked item from CheckedListBox?

I have used a CheckedListBox over my WinForm in C#. I have bounded this control as shown below - chlCompanies.DataSource = dsCompanies.Tables[0]; chlCompanies.DisplayMember = "CompanyName"; chlCompan..

Parse JSON in C#

I'm trying to parse some JSON data from the Google AJAX Search API. I have this URL and I'd like to break it down so that the results are displayed. I've currently written this code, but I'm pretty lo..

Unable to execute dex: Multiple dex files define

I know this question has been asked here a few times before. But i haven't seen any possible solution yet. Before i make the project 'Run as Android Application' , if i do not clean it, i receive the..

Loading resources using getClass().getResource()

I am trying to load an image to use as an icon in my application. The appropriate method according to this tutorial is: protected ImageIcon createImageIcon(String path, String description) { jav..

java.lang.IllegalStateException: Fragment not attached to Activity

I am rarely getting this error while making an API call. java.lang.IllegalStateException: Fragment not attached to Activity I tried putting the code inside isAdded() method to check whether fragm..

Monitoring the Full Disclosure mailinglist

I develop web applications, which use a number of third party applications/code/services. As part of the job, we regularly check with the Full Disclosure mailing list http://seclists.org/fulldisclosu..

Cannot resolve symbol HttpGet,HttpClient,HttpResponce in Android Studio

I just copy all the jar files of Http but Android Studio cann't import all these jar files.It gives an error : Cannot resolve symbol HttpGet,HttpClient,HttpResponse. My Activity file is here:- publ..

Return generated pdf using spring MVC

I am using Spring MVC .I have to write a service that would take input from the request body, add the data to the pdf and returns the pdf file to the browser. The pdf document is generated using itext..

IndentationError expected an indented block

Here is the code: def myfirst_yoursecond(p,q): a = p.find(" ") b = q.find(" ") str_p = p[0:a] str_q = p[b+1:] if str_p == str_q: result = True else: result = False return..

How to move an element down a litte bit in html

That sounds weird I know, but I am having trouble getting a piece of text to move down a tiny bit so it's centered on the tab it's on. here's what it looks like: I want buy to be centered vertica..

pandas GroupBy columns with NaN (missing) values

I have a DataFrame with many missing values in columns which I wish to groupby: import pandas as pd import numpy as np df = pd.DataFrame({'a': ['1', '2', '3'], 'b': ['4', np.NaN, '6']}) In [4]: df.g..

C# LINQ find duplicates in List

Using LINQ, from a List<int>, how can I retrieve a list that contains entries repeated more than once and their values?..

What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

I'm currently working on a website, which triggers a net::ERR_HTTP2_PROTOCOL_ERROR 200 error on Google Chrome. I'm not sure exactly what can provoke this error, I just noticed it pops out only when ac..

MVC 4 - Return error message from Controller - Show in View

I am doing a C# project using Razor in VS2010 (MVC 4). I need to return an error message from Controller to View and show it to the user. What I have tried: CONTROLLER: [HttpPost] public ActionRes..

How to initialize a two-dimensional array in Python?

I'm beginning python and I'm trying to use a two-dimensional list, that I initially fill up with the same variable in every place. I came up with this: def initialize_twodlist(foo): twod_list = [..

How to run a shell script in OS X by double-clicking?

I have a shell script that has user execution permission on OS X, but when I double click on it, it opens in a text editor. How can I get it to run by double-clicking it?..

How to set maximum fullscreen in vmware?

I'm using VMware workstation 8 on windows 7 and having some Linux hosts such as Centos, Backtrack and ... on it. The problem is the screen of the virtual machines is not fixed with my screen. here is ..

Input and Output binary streams using JERSEY?

I'm using Jersey to implement a RESTful API that is primarily retrieve and serve JSON encoded data. But I have some situations where I need to accomplish the following: Export downloadable documents..

String to object in JS

I have a string as string = "firstName:name1, lastName:last1"; now I need one object obj such that obj = {firstName:name1, lastName:last1} How can I do this in JS?..

Docker - Bind for 0.0.0.0:4000 failed: port is already allocated

I am using docker for the first time and I was trying to implement this - https://docs.docker.com/get-started/part2/#tag-the-image At one stage I was trying to connect with localhost by this command -..

How do I get NuGet to install/update all the packages in the packages.config?

I have a solution with multiple projects in it. Most of the third party references are missing, yet there are packages.config file for each project. How do I get NuGet to install/update all the packa..

ReferenceError: describe is not defined NodeJs

I am trying to define some endpoints and do a test using nodejs. In server.js I have: var express = require('express'); var func1 = require('./func1.js'); var port = 8080; var server = express(); se..

How to remove old Docker containers

This question is related to Should I be concerned about excess, non-running, Docker containers?. I'm wondering how to remove old containers. The docker rm 3e552code34a lets you remove a single one, b..

Auto Increment after delete in MySQL

I have a MySQL table with a primary key field that has AUTO_INCREMENT on. After reading other posts on here I've noticed people with the same problem and with varied answers. Some recommend not using ..

BadImageFormatException. This will occur when running in 64 bit mode with the 32 bit Oracle client components installed

I am getting this error while on of my .Net application are trying to make a connection to oracle database. The error says that This problem will occur when running in 64 bit mode with the 32 bit Ora..

Angular 4 setting selected option in Dropdown

several questions about this and diffrent answeres. But none of them realy answeres the question. So again: Setting default of a Dropdown select by value isnt working in my case. why? This is from th..

How can I check if a checkbox is checked?

I am building a mobile web app with jQuery Mobile and I want to check if a checkbox is checked. Here is my code. <script type=text/javascript> function validate(){ if (remember.checked ==..

How should I set the default proxy to use default credentials?

The following code works for me: var webProxy = WebProxy.GetDefaultProxy(); webProxy.UseDefaultCredentials = true; WebRequest.DefaultWebProxy = webProxy; Unfortunately, WebProxy.GetDefaultProxy() i..

How to get length of a string using strlen function

I have following code that gets and prints a string. #include<iostream> #include<conio.h> #include<string> using namespace std; int main() { string str; cout << "Ente..

div hover background-color change?

How can I make it act as if a line of div is anchor so when I hover on it it returns to red CSS .e { width:90px; border-right:1px solid #222; text-align:center; float:left; paddi..

Spring Security with roles and permissions

I'm trying to set up role-based Security with permissions. I'm trying to do this together with Spring-Security. I don't want to set up ACL as it seems it's an overkill for my requirements. I just w..

<button> background image

I have got a little problem with setting a background image for <button>. Here is the html I have got on site: <button id="rock" onClick="choose(1)">Rock</button> And here is th..

How do I set the background color of my main screen in Flutter?

I'm learning Flutter, and I'm starting from the very basics. I'm not using MaterialApp. What's a good way to set the background color of the whole screen? Here's what I have so far: import 'package:..

X-UA-Compatible is set to IE=edge, but it still doesn't stop Compatibility Mode

I am quite confused. I should be able to set <meta http-equiv="X-UA-Compatible" content="IE=edge" /> and IE8 and IE9 should render the page using the latest rendering engine. However, I just..

How do I pretty-print existing JSON data with Java?

I have a compact JSON string, and I want to format it nicely in Java without having to deserialize it first -- e.g. just like jsonlint.org does it. Are there any libraries out there that provides thi..

PHP & MySQL: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given

I'm trying to Integrate HTML Purifier http://htmlpurifier.org/ to filter my user submitted data but I get the following error below. And I was wondering how can I fix this problem? I get the followin..

Casting int to bool in C/C++

I know that in C and C++, when casting bools to ints, (int)true == 1 and (int)false == 0. I'm wondering about casting in the reverse direction... In the code below, all of the following assertions he..

Http Basic Authentication in Java using HttpClient?

I am trying to mimic the functionality of this curl command in Java: curl --basic --user username:password -d "" http://ipaddress/test/login I wrote the following using Commons HttpClient 3.0 but s..

Get random boolean in Java

Okay, I implemented this SO question to my code: Return True or False Randomly But, I have strange behavior: I need to run ten instances simultaneously, where every instance returns true or false jus..

Java rounding up to an int using Math.ceil

int total = (int) Math.ceil(157/32); Why does it still return 4? 157/32 = 4.90625, I need to round up, I've looked around and this seems to be the right method. I tried total as double type, but ge..

How can I find all the subsets of a set, with exactly n elements?

I am writing a program in Python, and I realized that a problem I need to solve requires me, given a set S with n elements (|S|=n), to test a function on all possible subsets of a certain order m (i.e..

Python String and Integer concatenation

I want to create string using integer appended to it, in a for loop. Like this: for i in range(1,11): string="string"+i But it returns an error: TypeError: unsupported operand type(s) for +: 'i..

Any good, visual HTML5 Editor or IDE?

Well it looks like Dreamweaver CS5 will try to smoother the HTML5 thing for a few more years (weeks actually). Seems like the next rung down is right to Notepad! Anyone know a good HTML5 editor with ..

Erase the current printed console line

How can I erase the current printed console line in C? I am working on a Linux system. For example - printf("hello"); printf("bye"); I want to print bye on the same line in place of hello...

Changing permissions via chmod at runtime errors with "Operation not permitted"

When I use chmod() to change permissions at run time, it gives me the below message: Warning: chmod() [function.chmod]: Operation not permitted in /home/loud/public_html/readalbum.php How can I..

Javascript decoding html entities

Possible Duplicate: How to decode HTML entities using jQuery? I want to convert this text: "&lt;p&gt;name&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:xx-small;"..

Deleting queues in RabbitMQ

I have a few queues running with RabbitMQ. A few of them are of no use now, how can I delete them? Unfortunately I had not set the auto_delete option. If I set it now, will it be deleted? Is there a..

Convert UTC Epoch to local date

I have been fighting with this for a bit now. I’m trying to convert epoch to a date object. The epoch is sent to me in UTC. Whenever you pass new Date() an epoch, it assumes it’s local epoch. I tr..

How to increase the execution timeout in php?

How to increase transaction timeout? I want to upload videos, but large size of videos not uploaded? It throws error The process *** exceeded the timeout of 60 seconds...

Toolbar Navigation Hamburger Icon missing

I'm looking for a way to display the hamburger icon whitout using the Drawer/DrawerToggle and use the default icon included in Android By setting getSupportActionBar().setDisplayHomeAsUpEnabled(true..

How to detect a docker daemon port

I have installed Ubuntu and Docker. I am trying to launch Raik container: $ DOCKER_RIAK_AUTOMATIC_CLUSTERING=1 DOCKER_RAIK_CLUSTER_SIZE=5 DOCKER_RIAK_BACKEND=leveldb make start-cluster ./bin/start ..

How to consume a SOAP web service in Java

Can someone please help me with some links and other on how to consume a web service WSDL in Java?..

Disable password authentication for SSH

I'm looking for a way to disable SSH clients from accessing the password prompt as noted here. I am unable to disable the password: prompt for root login. I have change the sshd_config file to read: ..

For vs. while in C programming?

There are three loops in C: for, while, and do-while. What's the difference between them? For example, it seems nearly all while statements can be replaced by for statements, right? Then, what's the ..

How to check that a JCheckBox is checked?

How can I check if a JCheckBox is checked?..

Which TensorFlow and CUDA version combinations are compatible?

I have noticed that some newer TensorFlow versions are incompatible with older CUDA and cuDNN versions. Does an overview of the compatible versions or even a list of officially tested combinations exi..

How to select the last column of dataframe

I have done some searching for the answer to this question, but all I can figure out is this: df[df.columns[len(df.columns)-1]] which to me seems unweildy, and un-pythonic (and slow?). What is t..

jQuery UI autocomplete with JSON

Alright been racking my brain on this (im terrible at this) but yea ive tried reading all i can and still cant get it to work. trying to do autocomplete with jquery ui my json looks like this {"dea..

How do I sort strings alphabetically while accounting for value when a string is numeric?

I'm trying to sort an array of numbers that are strings and I'd like them to sort numerically. The catch is that I cannot convert the numbers into int. Here is the code: string[] things= new string..

How can I decrypt MySQL passwords

The developer who created a platform my company uses is no longer working for us and I don't know how I can retrieve the passwords from a custom PHP application When I look in the PHPmyAdmin the pas..

How to completely remove node.js from Windows

I uninstalled my previous version of node.js (0.8.11) and downloaded the latest, 0.10.24 from the node.js website and installed it. However, after running node --version, it still indicates that I'm r..

jQuery .get error response function?

Thanks to StackOverflow, I managed to get the following code working perfectly, but I have a follow up question. $.get('http://example.com/page/2/', function(data){ $(data).find('#reviews .card')...

VBA copy rows that meet criteria to another sheet

I am new to VBA...I want to copy a row from Sheet2 to Sheet1 if the first cell in this row says X and then do so for all the rows that meet this criteria. I have an error in the If condition...I don't..

How to convert SQL Server's timestamp column to datetime format

As SQL Server returns timestamp like 'Nov 14 2011 03:12:12:947PM', is there some easy way to convert string to date format like 'Y-m-d H:i:s'. So far I use date('Y-m-d H:i:s',strtotime('Nov 14 2011..