What is the most recommended free/public API for accessing financial market stats and stock quotes (preferrably real-time quotes)? I'm not too picky about how it's exposed (SOAP, REST, some proprietar..
I have written a REST web service in Netbean IDE using Jersey Framework and Java.
For every request the user needs to provide a username and a password, I know that this authentication is not a best..
I'm relative new to the webservices world and my research seems to have confused me more than enlighten me, my problem is that I was given a library(jar) which I have to extend with some webservice fu..
This is the error that I got when I created my first Axis2 web service using Eclipse. After I wrote the class, I created the web service with Apache Axis2. When I click the start server button in ecli..
Can somebody explain to me the differences between Document and RPC style webservices? Apart from JAX-RPC, the next version is JAX-WS, which supports both Document and RPC styles. I also understand d..
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), ..
I'm not a security expert by any means, but I favor creating REST-style web services.
In creating a new service which needs to have the data it transmits secure. We've entered a debate over which ..
What's the best tool that you use to monitor Web Service, SOAP, WCF, etc. traffic that's coming and going on the wire? I have seen some tools that made with Java but they seem to be a little crappy. W..
I am using the Postman Chrome extension for testing a web service.
There are three options available for data input.
I guess the raw is for sending JSON.
What is the difference between the other tw..
I've been reading about "web services" here on SO, on Wikipedia, Google, etc., and I don't quite understand what they are. What is the plain English definition/description?
If I make a simple websit..
Using Java tools,
wscompile for RPC
wsimport for Document
etc..
I can use WSDL to generate the stub and Classes required to hit the SOAP Web Service.
But I have no idea how I can do the same in RE..
I am returning a List<> from a webservice as a List of JSON objects. I am trying to use a for loop to iterate through the list and grab the values out of the properties. This is a sample of the ret..
I'm trying to find a simple (ha) SOAP example in JAVA with a working service, any I seem to be finding are not working.
I have tried this one from this example but it's just not working, it's asking ..
I'm trying to write a web service client in c# which the webservice is Java Axis 1.4.
Axis service requires the Authorization: Basic Base64EncodedToken header value in the HTTP Headers.
I can't find ..
I have been creating and consuming web services for years and always have been able to use Visual Studio to create a service reference from the client. I have a third party service I need to work with..
I am looking for a way to wrap APIs around default functions in my PHP-based web applications, databases and CMSs.
I have looked around and found several "skeleton" frameworks. In addition to the an..
Is there a list somewhere of recommendations of different Python-based REST frameworks for use on the serverside to write your own RESTful APIs? Preferably with pros and cons.
Please feel free to add..
I am sending a post request to a RESTFUL WCF service application. I am able to successfully send a POST request through Fiddler.
However when I do this through the jQuery Ajax method the function r..
I'm looking to make a service which I can use to make calls to a web-based REST API.
Basically I want to start a service on app init then I want to be able to ask that service to request a url and re..
My requirement is as follows:
I want to give actor name, start date, end date and get all the films he acted in that period.
For that reason, my service request is like this.
http://localhost:8..
Let's say my web service is located at http://localhost:8080/foo/mywebservice and my WSDL is at http://localhost:8080/foo/mywebservice?wsdl.
Is http://localhost:8080/foo/mywebservice an endpoint, i.e..
I am confused about how SOAP messages and WSDL fit together? I have started looking into SOAP messages such as:
POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; c..
I'm trying to make a simple web app in IntelliJ by following this tutorial:
http://wiki.jetbrains.net/intellij/Creating_a_simple_Web_application_for_Tomcat_in_IntelliJ_IDEA_12
I believe my Tomcat is ..
What is the difference between an XML Schema and WSDL?
The difference I noticed is that WSDL contains XSD and in WSDL we can declare operations, but not in XSD. Is that correct?..
I have a heavy traffic aspx page calling a web service upon every user`s request as follows.
string uri = "Path.asmx";
string soap = "soap xml string";
HttpWebRequest request = (HttpWebRequest)WebRe..
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..
Hy,
how can I create a asmx web service in Visual Studio 2013?
I have found this short tutorial about that, but when I follow this in Visual Studio 2013 I get an error that says "the type 'Service1'..
My application needs to talk to a web service that hasn't got an online WSDL definition. The developers however supplied me with a WSDL file.
With a public WSDL Visual Studio can generate this code f..
I have an requirement to pass a some values from mobile to server in a web service call and so I am planning to pass all the values in JSON format like the below
{
"nameservice": [
{
..
I must consume a PHP webservice which has a SSL certificate. My .net 3.5 Class library references the webservice with 'Add Service references' in Visualstudio 2010 (WCF right?).
When calling the main..
I've just started to develop REST services, but I've come across a difficult situation: sending files from my REST service to my client. So far I've gotten the hang of how to send simple data types (s..
How can I deploy an ASP.NET web service to IIS 7?
I have deployed my webservice to IIS-5 installed on windows server 2008. However, I am not well versed with configuration options in IIS-7.
For IIS-..
I have created a web service which is saving some data into to db. But I am getting this error:
Cannot open database "test" requested by the login. The login failed. Login failed for user 'xyz\ASP..
I am working towards an android application. I need to use a web service. I have a wsdl file but I want to convert that into java so that I can use its functions in my Java programs.
Is there any way..
When the user accesses this URL running on my flask app, I want the web service to be able to handle the parameters specified after the question mark:
http://10.1.1.1:5000/login?username=alex&pas..
I've created an app that loads a question from my web services, and it works fine. But, sometimes it crashes and I do not get the reason why this is happening, especially because I have also given it ..
I keep having some weird problems. The main one is that I keep getting the following error when trying to add a WSDL to a new project:
Error loading [https://.../token?wsdl]: java.lang.Exception: Fai..
i am getting data from restful api in String variable now i want to convert to JSON object but i am having problem while conversion it throws exception .Here is my code :
URL url = new URL("SOME URL"..
I am writing a web service the first time. I created a RESTful web service based on Jersey. And I want to produce JSON. What do I need to do to generate the correct JSON type of my web service?
Here'..
I'm currently having trouble connecting to my webservice on android. I use jackson-core/databind/annotation-2.2.4 and Spring RESTWebService. If I access the URL from the browser I can see the JSON res..
I am creating restful web service and i wanted to know how do we create a service with input parameters and also how to invoke it from a web browser.
For example
@Path("/todo")
public class TodoReso..
What's the maximum length of an HTTP GET request?
Is there a response error defined that the server can/should return if it receives a GET request that exceeds this length?
This is in the context of..
When I call a particular restful service method, which is built using CXF, I get the following error, anyone know why and how to resolve it?
JAXBException occurred : class
com.octory.ws.dto.Prof..
Is there a way to generate Request & Response XML formats from just a WSDL file - if the webservice is not live right now.
SoapUI doesn't give me the response unless it contacts the Webservic..
I am using the following code to update a listbox, this recieving a list from a Web service:
client.userKeywordsCompleted += new EventHandler<userKeywordsCompletedEventArgs>(client_userKeywords..
I've got a WCF Service running on my local IIS server. I've added it as a service reference to a C# Website Project and it adds fine and generates the proxy classes automatically.
However, when I try..
I am actually new to REST WS but really I don't get this 415 Unsupported Media Type.
I am testing my REST with Poster on Firefox and the GET works fine for me, also the POST (when it's a application..
I am new at RESTful webservices and was trying to update my @OneToMany relationship from a standalone client application, but I am not able to do that. I am using the Jersey implementation of JAX-RS t..
I need to configure a website to access a webservice on another machine, via a proxy. I can configure the website to use a proxy, but I can't find a way of specifying the credentials that the proxy r..
Starting web services in Netbeans just Hello World Program , but this Application Manager makes hectic on this to start ,
Facing this alert message in NetBeans also Tomcat Application Manager Messa..
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..
i have a NO-.net webservice from oracle
To access i need to add the soap header. How can i add the soap header in java?
Authenticator.setDefault(new ProxyAuthenticator("username", "password"));
..
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index:
0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:604)
in line of arraylist.java
private void rangeCheck(int in..
I just want to know, how to send JSON object to createTrackInJSON(Track track) method, with @Post annotation through postman rest client.
here,how to pass JSON object to createTrackInJSON(Track track..
I want to know which account running my Web Service/Application so that I can assign the read/write access to that account. I have researched and see most of the sources mentions about ASPNET account,..
Similar to this question here I am trying to monitor if a set of website links are up and running or not responding. I have found the same PowerShell script over the Internet.
However, instead of dir..
I am using ruby-1.8.7-p302/Rails 2.3.11. I am trying to use FQL (Facebook API) to get stats for a link. Here's my code:
def stats(fb_post_url)
url = BASE_URI + "?query=#{URI.encode("select like_cou..
I am having a lot of trouble finding good information on how to call a standard SOAP/WSDL web service with Android. All I've been able to find are either very convoluted documents and references to "k..
I generated a web-service client using JBoss utils (JAX-WS compatible)
using Eclipse 'web service client from a wsdl'.
So, the only thing I provided was a url to a web-service WSDL.
Now, the web ser..
I've created one web service which is of asmx type. And I'm using my web service in the .net windows application.
Web method from the web service receives byte array conversion of the object & ..
I am trying to post two parameters using curl, path and fileName:
curl --request POST 'http://localhost/Service' --data "path='/xyz/pqr/test/'&fileName='1.doc'"
I know something is wrong in thi..
I am totally confused between WCF and ASMX web services. I have used a lot of web services in my earlier stage, and now there is this new thing introduced called WCF. I can still create WCF that fun..
I've used JAXWS-RI 2.1 to create an interface for my web service, based on a WSDL. I can interact with the web service no problems, but haven't been able to specify a timeout for sending requests to t..
I have code that references a web service, and I'd like the address of that web service to be dynamic (read from a database, config file, etc.) so that it is easily changed. One major use of this wil..
I have a web service that contains this method:
[WebMethod]
public static List<string> GetFileListOnWebServer()
{
DirectoryInfo dInfo = new DirectoryInfo(HostingEnvironment.MapPath("~/Upload..
I'm writing a JSON service in C# (.ashx file). On a successful request to the service I return some JSON data. If the request fails, either because an exception was thrown (e.g. database timeout) or b..
I have a web service that is working fine in one environment but not in another.
The web service gets document meta data from SharePoint, it running on a server where I cant debug but with logging I ..
Is there an easy way (aka: not using a proxy) to get access to the raw request/response XML for a webservice published with JAX-WS reference implementation (the one included in JDK 1.5 and better) ?
B..
I need to call a method from a webservice, so I've written this code:
private string urlPath = "http://xxx.xxx.xxx/manager/";
string request = urlPath + "index.php/org/get_org_form";
WebRequest we..
Is there available any tool for PHP which can be used to generate code for consuming a web service based on its WSDL? Something comparable to clicking "Add Web Reference" in Visual Studio or the Eclip..
I have one HTML page in which I have 3 textbox fields name, address, age and I want to save data from these textboxes in my SQL server database.
I got one reference to perform this task by using web ..
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..
I'm trying to host a WCF web service on a separate Website in IIS with https at 443 as the only binding.
The following configurations works well when I use it in a website which uses both the bindin..
I am using the CXF rest client which works well for simple data types (eg: Strings, ints). However, when I attempt to use custom Objects I get this:
Exception in thread "main" org.apache.cxf.intercep..
I am trying to set up a simple Restful Web-Service which returns either JSON or XML according to the Accept header. I am using Spring, Maven and WebLogic Server. I took the example from this post http..
I have the following web service;
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
It's stock standard with no alterations to the class decorators.
I have t..
I currently figure out the similar is both using internet protocol (HTTP) to exchange data between consumer and provider.
The difference is:
SOAP is a XML-based message protocol, while REST is an ..
I have a web service I am trying to unit test. In the service it pulls several values from the HttpContext like so:
m_password = (string)HttpContext.Current.Session["CustomerId"];
m_userID = (stri..
I'm testing out some WCF services that send objects with Guids back and forth. In my web app test code, I'm doing the following:
var responseObject = proxy.CallService(new RequestObject
{
Data = ..
I am designing a RESTful web service that needs to be accessed by users, but also other web services and applications. All of the incoming requests need to be authenticated. All communication takes pl..
I want some usefull free public WebServices like Weather, Currency Converter, Mathematics etc.
Please tell me where I can get them
Thanks in advance!..
I'm using WS class and it gave me error when I run the application:
The type or namespace name 'Entity' does not exist in the namespace 'System.Data'
I have a reference to the System.Data; and to ..
I have a REST web service that currently exposes this URL:
http://server/data/media
where users can POST the following JSON:
{
"Name": "Test",
"Latitude": 12.59817,
"Longitude": 52.1287..
Under what conditions would one favor apps talking via a message queue instead of via web services (I just mean XML or JSON or YAML or whatever over HTTP here, not any particular type)?
I have to tal..
I would like to enable a ASP.NET classic (ASMX) web service for HTTP POST and GET requests. I realise this can be done on a machine or application level by adding ...
<webServices>
<prot..
I have tested my web services (wsdl/soap) with soapui. and i have the errors :
http/log : error 400 BAD REQUEST.
What can be the error please with my wsdl ?
error/log :
un Jun 05 14:10:37 CEST 2011..
How does one check whether a task is running in celery (specifically, I'm using celery-django)?
I've read the documentation, and I've googled, but I can't see a call like:
my_example_task.state() ==..
I have read articles about the differences between SOAP and REST as a web service communication protocol, but I think that the biggest advantages for REST over SOAP are:
REST is more dynamic, no ne..
EDIT:
After I modified the web.config and I don't get error that's good.... then I add a new page (html) and write this small code to consume the service like this:
$("#btn12").click(function (even..
I am getting this error:
Server Error in '/' Application.
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or &l..
I want to hide a div by clicking on the close link in it, or by clicking anywhere outside that div.
I am trying following code, it opens and close the div by clicking close link properly, but if I ha..
I am developing a web page using JavaScript and HTML, everything was working
good when I have received this list of errors from my HTML page:
The resource from “https://raw.githubusercontent.com/da..
Is it possible to set up the headers in a multicolumn listbox without using a worksheet range as the source?
The following uses an array of variants which is assigned to the list property of the list..
What is the pythonic way of looping through a range of numbers and skipping over one value? For example, the range is from 0 to 100 and I would like to skip 50.
Edit:
Here's the code that I'm using
..
I'm trying to process result from $data = curl_exec($ch); instead of printing it on the screen. In order to achieve that I set the option CURLOPT_RETURNTRANSFER to true like this:
curl_setopt($ch, CU..
I want to create unit tests easily by just selecting method. Is there a tool in eclipse that does that. It should support templates. I should be able to create positive test as well as negative tests...
Is there a way to scroll down to an anchor link using jQuery?
Like:
$(document).ready(function(){
$("#gotomyanchor").click(function(){
$.scrollSmoothTo($("#myanchor"));
});
});
?..
I have the feeling that I'm missing the obvious, but have not succeeded with man [curl|wget] or google ("http" makes such a bad search term). I'm looking for a quick&dirty fix to one of our webser..
I'm trying to create an asyncrhonous postback in ASP.NET using __doPostBack(), but I have no idea how to do it. I want to use vanilla JavaScript.
Something simple like a button click can cause the _..
I am trying to create a regex that will return false if the String pattern contains whitespace or is empty. So far I have this
[^\s]
I think that will make sure the string does not contain whitesp..
In PostgreSQL, how do I get the last id inserted into a table?
In MS SQL there is SCOPE_IDENTITY().
Please do not advise me to use something like this:
select max(id) from table
..
1) When an array is passed as an argument to a method or function, is it passed by reference, or by value?
2) When assigning an array to a variable, is the new variable a reference to the original ar..
What is the relationship between ACID and database transaction?
Does ACID give database transaction or is it the same thing?
Could someone enlighten this topic...
I'm trying to create a simple project on CLion. It uses CMake (I'm new here) to generate Makefiles to build project (or some sort of it)
All I need to is transfer some non-project file (some sort of ..
I have a .net core 2.0 console app. I'm trying to read files from TFS using the following:
How to get a file from TFS directly into memory (i.e., don't want to read from file system into memory..
I installed @angular/cli package via npm, using this command:
npm install -g @angular/cli
The version 1.4.2 of @angular/cli has been successfully installed. But that is not the Angular version, but..
Is there a clean way to remove undefined fields from an object?
i.e.
> var obj = { a: 1, b: undefined, c: 3 }
> removeUndefined(obj)
{ a: 1, c: 3 }
I came across two solutions:
_.each(query..
I'm using a Panel from Bootstrap however for the heading I want to use my own background color for the heading. When I don't put panel-heading class for the div, the layout gets screwed. So I thought ..
How to get the time for a given datetime value?
I have a datetime in database like this:
2010-09-06 17:07:28.170
and want only the time portion:
17:07:28.170
Is there a function for that or s..
I would like to upload a file asynchronously with jQuery.
_x000D_
_x000D_
$(document).ready(function () {_x000D_
$("#uploadbutton").click(function () {_x000D_
var filename = $("#file").v..
What is the simplest way to convert array to vector?
void test(vector<int> _array)
{
...
}
int x[3]={1, 2, 3};
test(x); // Syntax error.
I want to convert x from int array to vector in sim..
My MySQL database needs two users: appuser and support.
One of the application developers insists that I create four accounts for these users:
appuser@'%'
appuser@'localhost'
support@'%'
support@'loc..
Bit of an odd one on query performance... I need to run a query which does a total count of documents, and can also return a result set that can be limited and offset.
So, I have 57 documents in tota..
Can I make a multi-line selection of text all capitals in Visual Studio Code?
In full Visual Studio it's CTRL+SHIFT+U to do this.
The extension that exists that I have seen only do non-multi-line bl..
I'm getting this error when I try to start a windows service I've created in C#:
My Code so far:
private ServiceHost host = null;
public RightAccessHost()
{
InitializeComponent();
}
protecte..
I am trying to create a regex to have a string only contain 0-9 as the characters and it must be at least 1 char in length and no more than 45. so example would be 00303039 would be a match, and 03933..
For java.util.Date when I do
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd/MM/yyyy")
private Date dateOfBirth;
then in JSON request when I send
{ {"dateOfBirth":"01/01/2000"}..
I am trying to perform some DDL on a table and SHOW PROCESSLIST results in a " Waiting for table metadata lock " message.
How can I find out which transaction is not yet closed?
I'm using MySQL v5.5..
I have bin deployed an MVC4 application to my hosting provider, based on advice given here and one or two on-the-fly fixes, but the most immediately apparent problem is that the bundling for css doesn..
I've tried to add the Canonical Partner repository, but I still can't find the sun-java6-jdk package. What is the right way to install the Oracle Sun JDK instead of OpenJDK on Ubuntu 10.10 (Maverick M..
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?..
I'm trying to implement Dynamic Forms in Angular 2. I've added additional functionalities like Delete and Cancel to the dynamic forms.
I've followed this documentation: https://angular.io/docs/ts/late..
Ok, so you know what a spreadsheet looks like when you open a new on in Excel; the borders are a light blue. These are only on the screen though, if you print the sheet it will not have borders. Say y..
I'm trying to filter data between September 1st, 2010 and August 31st, 2013 in a Hive table. The column containing the date is in string format (yyyy-mm-dd). I can use month() and year() on this colum..
I want to add some space to the right of an <input type="text" /> so that there's some empty space on the right of the field.
So, instead of , I'd get .
So, same behavior just some empty space..
In /var/log/secure every time a user logs in or logs out I notice the messages shown below stating Unregistered and Registered Authentication Agent. I have not been able to figure out why these messag..
I have stored procedure that I created in MySQL and want PHP to call that stored procedure. What is the best way to do this?
-MySQL client version: 4.1.11
-MySQL Server version: 5.0.45
Here is my..
I have a site with the navbar fixed on top and 3 divs underneath in the main content area.
I'm trying to use scrollspy from the bootstrap framework.
I have it succesfully highlighting the different ..
I am setting up a development server in my flat. I have set up an Ubuntu DNS server on it and have added the zone weddinglist (just weddinglist - no TLD. It's just an internal domain.)
This works fin..
I have this tail recursive function here:
def recursive_function(n, sum):
if n < 1:
return sum
else:
return recursive_function(n-1, sum+n)
c = 998
print(recursive_function..
Google changed its map API for Android and introduced API V2. The previous codes for drawing path are not working with API V2.
I have managed to draw a path with API V2. I had searched a lot for the ..
I have the following DIV
<div id="products">
</div>
#products
{
height: 102px; width: 84%;
padding:5px; margin-bottom:8px;
border: 1px solid #EFEFEF;
}
Now inside the DIV,..
I have a Dockerfile that is supposed to build an Ubuntu image. But whenever I run
docker build -t ubuntu-test:latest ./Dockerfile
it shows the following error on the console
unable to prepare contex..
I need to get a tr element which contains a td element which contains specific text. The td will contain that text and only that text (so I need text = 'foo' not text contains 'foo' logic).
So I need..
How can I open multiple Eclipse workspaces at the same time on the Mac?
On other platforms, I can just launch extra Eclipse instances, but the Mac will not let me open the same application twice. Is ..
asyncio.gather and asyncio.wait seem to have similar uses: I have a bunch of async things that I want to execute/wait for (not necessarily waiting for one to finish before the next one starts). They u..
The default width for my navbar is too wide 1170px. I would like to reduce it down to 940px - but I want to keep the responsiveness.
I tried to change the container width in CSS and it looks ok with ..
How do I exclude values in a DateTime column that are Saturdays or Sundays?
For example, given the following data:
date_created
'2009-11-26 09:00:00' -- Thursday
'2009-11-27 09:00:00' -- Friday
'2..
I have a program in Fortran that saves the results to a file. At the moment I open the file using
OPEN (1, FILE = 'Output.TXT')
However, I now want to run a loop, and save the results of each iter..
I have built an application using Spring with Eclipse IDE. When I launch the project from Eclipse IDE everything is fine but when I package the maven project as a war file and deployed to separate tom..
Hi I just want to receive ajax request, but the problem is that jquery is not defined in React. React version is 14.0
Error message
Uncaught ReferenceError: $ is not defined
I have two files :
i..
Is there anything out of the box that bootstrap supports to render a "regular" defacto drop down list select box? That is, where the drop down box is a list of values and if selected populate the con..
The following command is correctly changing the contents of 2 files.
sed -i 's/abc/xyz/g' xaa1 xab1
But what I need to do is to change several such files dynamically and I do not know the file nam..
The following Dockerfile contains four COPY layers:
COPY README.md ./
COPY package.json ./
COPY gulpfile.js ./
COPY __BUILD_NUMBER ./
How to copy these files using one layer instead? The following ..
The situation is somewhat like-
var someVar = some_other_function();
someObj.addEventListener("click", function(){
some_function(someVar);
}, false);
The problem is that the value of someVar is..
Are there better ways to read an entire html file to a single string variable than:
String content = "";
try {
BufferedReader in = new BufferedReader(new FileReader("mypage.html"));
..
What's the JavaScript equivalent to this C# Method:
var x = "|f|oo||";
var y = x.Trim('|'); // "f|oo"
C# trims the selected character only at the beginning and end of the string!..
I'm new to Java EE and I know that something like the following three lines
<%= x+1 %>
<%= request.getParameter("name") %>
<%! counter++; %>
is an old school way of coding..
I would like to get just the folder path from the full path to a file.
For example T:\Data\DBDesign\DBDesign_93_v141b.mdb and I would like to get just T:\Data\DBDesign (excluding the \DBDesign_93_v141..
Let's say I have an SQL statement that's syntactically and semantically correct so it executes.
In Management Studio (or any other query tool) how can I test SQL statements, and if I notice that the..
I tried to use cURL but it seems that by default (Debian) is not compiled with HTTPS support and I dont want to build it myself.
wget seems to have SSL support but I found no information on how to ge..
I need a map function. Is there something like this in Java already?
(For those who wonder: I of course know how to implement this trivial function myself...)..
What would be the easiest way to check if an input is required? I have been trying stuff along these lines but always comes up with all required (only 4/6 are).
$('form#register').find('input').each(..
Having a Linux Bash on Windows 10 is pretty cool, but as far as I've got to struggle with the not-so-good terminal provided from Microsoft I'm gonna get stuck with Ubuntu for everything.
Anyway, is t..
Hey I am new to python and am using tkinter for my gui. I am having trouble using the "after" method.
The goal is to make a random letter appear every 5 seconds.
Here is my code:
import random
impor..
I have a phone number(string), e.g. "+123-456-7890", that I want to turn into a list that looks like: [+, 1, 2, 3, -, ...., 0].
Why? So I can go iterate through the list and remove all the symbols, ..
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...
var map = L.map('map');
var marker = L.marker([10.496093,-66.881935]).on('click', onClick);
function onClick(e) {alert(e.latlng);}
marker.addTo(map)
When I do click in the marker, the alert message ..
MySQL runs with timezone "GMT+8", but Tomcat with "GMT". When I save datetime to my database, everything seems to be OK, but when I check the datetime value in the database, I see the "GMT" value.
Al..
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..
I'm trying to write a script that will check two error flags, and in case one flag (or both) are changed it'll echo-- error happened. My script:
my_error_flag=0
my_error_flag_o=0
do something.....
if..
I am looking to replace an element in the DOM.
For example, there is an <a> element that I want to replace with a <span> instead.
How would I go and do that?..
I have created an app in App Store Connect and it has been in the "prepare for submission" state for more than 3 days. When I try to archive my app, and submit it to the app store it, displays this me..
I started as a C++ programmer, and Visual studio has worked splendedly for me. However, I recently have wanted to branch out to C# and Java. Visual studio supports C# and I now have some experience wi..
I have the following JavaScript code:
$('a.button').click(function(){
if (condition == 'true'){
function1(someVariable);
function2(someOtherVariable);
}
else {
doT..
I am a little confused about the JPA 2.0 orphanRemoval attribute.
I think I can see it is needed when I use my JPA provider's DB generation tools to create the underlying database DDL to have an ON D..
Possible Duplicate:
Do you use NULL or 0 (zero) for pointers in C++?
Is it a good idea to use NULL in C++ or just the value 0?
Is there a special circumstance using NULL in C code calling ..
to install java I have always used the classic way from the terminal.
I would like to install java manually.
I placed the folder of the JDK on the desk and I set environment variables (PATH, CLASSPATH..
You can see what I'm trying (but failing) to do with the following code:
protected T GetObject()
{
return new T();
}
Any help would be greatly appreciated.
EDIT:
The context was as follows. ..
I am new to Jquery.I am trying to read data from "sampleXML.xml" file and display that data in Html "li" elements. so far I have done is, I have created html file as follows:file name-"Cloudtags.html"..
I haven't seen anything here or on MDN. I'm sure I'm just missing something. There's got to be some documentation on this somewhere?
Functionally, it looks like it allows you to nest a variable insid..
I want to show an image in imageview so I made a folder - drawable in res and put my image there. Something like apple.png. Then I use this code:
ImageView iv= (ImageView)findViewById(R.id.img_select..
There doesn't appear to be an easy way to get the length of a string in a batch file. E.g.,
SET MY_STRING=abcdefg
SET /A MY_STRING_LEN=???
How would I find the string length of MY_STRING?
Bonus p..
I've searched online and couldn't find anything that resembled to my issue.
I created an empty C++ project and added a main.cpp with a return and I can't get it to build. Here is the message I receiv..
I'm running SQL that needs rounding up the value to the nearest whole number.
What I need is 45.01 rounds up to 46. Also 45.49 rounds to 46. And 45.99 rounds up to 46, too. I want everything up one w..
Familiar with Java but unfamiliar with IntelliJ, how does one "get started" with JUnit integration?
Inspired by Looking for a tutorial on using JUnit with Intellij IDEA 9.x which didn't answer my que..
Hi I have a table with a date field and some other information.
I want to select all entries from the past week, (week start from Sunday).
table values:
id date
2 2011-05-14 09:17:25
5 2011-05-..
If I say:
select max(length(Name))
from my_table
I get the result as 18, but I want the concerned data also. So if I say:
select max(length(Name)),
Name
from my_table
...it does n..
I'm relatively new in Mac OS. I've just installed XCode (for c++ compiler) and Anaconda with the latest Python 3 (for myself). Now I'm wondering how to install properly second Anaconda (for work) with..
According to yaml.org, the official file extension is .yaml.
Quote:
Is there an official extension for YAML files?
Please use ".yaml" when possible.
However there seems to be a disagreem..
I am aware of CocoaMySQL but I have not seen a Mac GUI for SQLite, is there one?
My Google search didn't turn up any Mac related GUI's which is why I'm asking here rather than Google...
I'm getting the following errors:
ISO C++ forbids declaration of ttTreeInsert with no type
ISO C++ forbids declaration of ttTreeDelete with no type
ISO C++ forbids declaration of ttTreePrint with no ..
Is it possible to set an element of an array to NaN in Python?
Additionally, is it possible to set a variable to +/- infinity? If so, is there any function to check whether a number is infinity or no..
I am planning to insert a PHP variable which holds the directory path for a file stored on my Windows machine. How can I include this variable in the a href tag inside my php script such that when the..
Just downloaded Android Studio which is based off of the Intellij Idea.
How would one create tests?
I notice there is a option for create a Test Module but this doesn't seem to do anything, only cre..
I would like to add 24 hours to the timestamp for now. How do I find the unix timestamp number for 24 hours so I can add it to the timestamp for right now?
I also would like to know how to add 48 ho..
Is there a way I can launch a tab (not a new Window) in Google Chrome with a specific URL loaded into it from a custom app? My application is coded in C# (.NET 4 Full).
I'm performing some actions v..
I am trying to control HTML5 videos using JQuery. I have two clips in a tabbed interface, there are six tabs in total, the others just have images. I am trying to make the video clips play when their ..
I am attempting to split a list into a series of smaller lists.
My Problem: My function to split lists doesn't split them into lists of the correct size. It should split them into lists of size 30 bu..
I got strange error message when tried to save first_name, last_name to Django's auth_user model.
Failed examples
user = User.object.create_user(username, email, password)
user.first_name = u'Rytis'..
I have some HTML code on a page that I don't want to erase, but make inactive for the short term. How can I make the browser ignore parts of the page in the same way the // works in some programming l..
I wanted to ask that how to mention this in my interface
public class find(int x) throws A_Exception, B_Exception{
----
----
---
}
i want to say that i can mention One exception in an interface bu..
Such a simple question, but I cannot find the answer (Google, MS help, SO):
How can I check by VBA whether an unbound checkbox on an Access form is checked by the user or not? Can't find the right pr..
How could I do something like this:
<script type="text/javascript">
$(document).ready(function () {
if(window.location.contains("franky")) // This doesn't work, any suggestions?
{
..
Right now I have two view controllers. My problem is I don't know how to hide the back button after transitioning to the second view controller. Most references that I found are in Objective-C. How do..
I wrote some c# code that uses PSexe.
I want it to run a remote exe on a machine connected to my LAN.
That exe creates a new local user.
When I run that exe locally on the remote machine (after right..
I am trying to clear a components state but can't find a reference for the es6 syntax. I was using:
this.replaceState(this.getInitialState());
however this does not work with the es6 class synta..
I have a scenario where a user wants to apply several filters to a Pandas DataFrame or Series object. Essentially, I want to efficiently chain a bunch of filtering (comparison operations) together th..
My dictionary looks like this(Dictionary within a dictionary):
{'0': {
'chosen_unit': <Unit: Kg>,
'cost': Decimal('10.0000'),
'unit__name_abbrev': u'G',
'supplier__supplier': u"..
How do I add a UISegmentedControl to a UITableView? Similar to the image found here: http://cdn.imore.com/sites/imore.com/files/styles/large/public/field/image/2012/08/iHomework-for-iPhone-managing-as..
Possible Duplicate:
How can I find the method that called the current method?
I'd like to write a method which obtains the name of the calling method, and the name of the class containing t..
I'm struggling with some PHP/MySQL code. I am reading from 1 table, changing some fields then writing to another table, nothing happens if inserting and one of the array values is null when I would l..
suppose we have a pdf link "http://manuals.info.apple.com/en/iphone_user_guide.pdf"(just for example and to let u know that file is not on my server, i only have the link)...now i have to provide a bu..
I have a ArrayList made up of different elements imported from a db, made up of strings, numbers, doubles and ints. Is there a way to use a reflection type technique to find out what each type of data..
I am using Xcode 6,
1) Firstly I am creating a dynamic library (CoreLibrary). This library contain RequestPoster.h file.
2) Then I create a Cocoa Touch Framework and added this dynamic library (Core..
How would I get the path to the script in Node.js?
I know there's process.cwd, but that only refers to the directory where the script was called, not of the script itself. For instance, say I'm in /h..
This might seem redundant but I was unable to find a correct solution.
I was unable to login to mysql using the mysql console.It is asking for a password and I have no clue what I actually entered.(I..
I have the jButton1 private member of JFrame and i wanted to close the frame when the button is clicked.
jButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ..
Why won't my input resize when I change the type to type="number" but it works with type="text"?
EXAMPLE
Email: <input type="text" name="email" size="10"><br/>
number: <input ty..
I am able to do this:
<div id="myDiv">
<div class="foo"></div>
</div>
myDiv = getElementById("myDiv");
myDiv.querySelectorAll("#myDiv > .foo");
That is, I can succes..
I've just imported a bunch of data to a MySQL table and I have a column "GUID" that I want to basically fill down all existing rows with new and unique random GUID's.
How do I do this in MySQL ?
I t..
I wrote the following small program to print out the Fibonacci sequence:
static void Main(string[] args)
{
Console.Write("Please give a value for n:");
Int16 n = Int16.Parse(Console.ReadLine(..
I have an arraylist A of Integer type. I created it as:
ArrayList<Integer> A = new ArrayList<Integer>();
Now, I want to pass it as an argument to function AnalyseArray().
How can I a..
I have an input form on my website where HTML is allowed and I'm trying to add instructions about the use of HTML tags. I'd like the text to
<strong>Look just like this line - so then know how ..
I have my form like this:
<form name="myForm">
<input name="myText" type="text" ng-model="mytext" required />
<button disabled="{{ myForm.$invalid }}">Save</button>
&l..
I have looked at the different questions regarding this issue, but couldn't find anything that works due to limitations in my markup.
My markup looks like so (unfortunately as this is generated by so..
how can I make a column take up 100% height of the browser w bootstrap 4?
See the following: https://codepen.io/johnpickly/pen/dRqxjV
Note the yellow div, I need this div/column to take up a height ..
In mysql I am able to do this:
SELECT *
FROM table
WHERE auth_user.lastactivity > NOW() - 100
now in postgresql I am using this query:
SELECT *
FROM table
WHERE auth_user.lastactivity > CURR..
I am looking for the definition of when I am allowed to do forward declaration of a class in another class's header file:
Am I allowed to do it for a base class, for a class held as a member, for a c..
I know that it's possible to get any XML node using C# if you know the node name, but I want to get the root node so that I can find out the name. Is this possible?
Update: I'm using XMLTextReader to..
I am using Primefaces 3.4.2.
I have the following in my JSF page
<p:selectOneMenu id="emp" value="#{mymb.emp.employeeName}"
valueChangeListener="#{mymb.handleChange}"
required="..
I need these 2 packages installed on RHEL 6 linux system.
They are required by several other programs.
When I do:
sudo yum install glibc-devel
this is output:
Loaded plugins: product-id, securit..
I'm creating a web request in ASP.NET and I need to add a bunch of data to the body. How do I do that?
var request = HttpWebRequest.Create(targetURL);
request.Method = "PUT";
response = (HttpWebRespo..
I have used xuggle library in my project to trans code the video from mp4 to flv.
I have used slf4j libraries also to support logging end.
import com.xuggle.mediatool.IMediaReader;
import com.xuggle...
I want to use Oracle SQL Developer to generate an ER diagram for my DB tables but I am new to Oracle and this tool.
What is the process for creating an ER diagram in SQL Developer?..
To implement a status bar like below:
[========== ] 45%
[================ ] 60%
[==========================] 100%
I want to this to be printed out to stdout, and keep refr..
I hope this question is not considered too basic for this forum, but we'll see. I'm wondering how to refactor some code for better performance that is getting run a bunch of times.
Say I'm creating a..
If i have two tables that are identical in structure, how can i move a set of rows from 1 table to the other?
The set of rows will be determined from a select query.
for example:
customer table
pe..
I want to delete a News from database and when I hit the delete button all data from database deleted but the image is remains in upload folder.
So, how do I this to work.
thanks
This is my functio..
Using jQuery, how can I clear the input text after I made a click? By default, the value remains in the input field.
For example, I have an input text and the value is TEXT. When I perform a click, I..
I have a simple actionmethod, that returns some json. It runs on ajax.example.com. I need to access this from another site someothersite.com.
If I try to call it, I get the expected...:
Origin http:..
I am trying to call getCallCapablePhoneAccounts() method of android.telecom.TelecomManager class. Though i have added required user-permission, i am getting Security exception.
Here is the line of co..
I'm trying to get the current date into a variable inside a SQL stored procedure using the following commands
DECLARE @LastChangeDate as date
SET @LastChangeDate = SELECT GETDATE()
This gives me th..
I am in a MySQL terminal session but I don't know what server I am connected to, or what database I am connected to.
Is there a MySQL command that will tell me the host, port, and username and datab..
I am trying to pass values from servlet to jsp page using the code below:
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
Pr..
In .NET I can provide both \r or \n string literals, but there is a way to insert
something like "new line" special character like Environment.NewLine static property?..
ls /home/user/new/*.txt prints all txt files in that directory. However it prints the output as follows:
[me@comp]$ ls /home/user/new/*.txt
/home/user/new/file1.txt /home/user/new/file2.txt /ho..
I am using xCode 4.3.1. After i created a project, i build it and tried to Archive. Then i got an error saying; (This is my first project in xCode 4.3.1)
CodeSign error: code signing is required f..
I'm having a bit of a problem. I'm using FireFox 3.6 and have the following DOM structure:
<div class="view-row">
<div class="view-type">Type</div>
<div class="view-name"..
I'm designing an app that has a recurring task of sending presence to a dedicated server as long as the app is in foreground.
In my searches across the web I saw a few different approaches and wanted..
I am trying to calculate the height of a UILabel based on different String lengths.
func calculateContentHeight() -> CGFloat{
var maxLabelSize: CGSize = CGSizeMake(frame.size.width - 48, CGFlo..
Hi I have simply select and works great:
select 'CARAT Issue Open' issue_comment, i.issue_id, i.issue_status, i.issue_title, i.ISSUE_summary ,i.issue_description, i.severity,
gcrs.Area_name, gcrs.sec..
I clone my repository with:
git clone ssh://xxxxx/xx.git
But after I change some files and add and commit them, I want to push them to the server:
git add xxx.php
git commit -m "TEST"
git push or..
I have a Java based web service client connected to Java web service (implemented on the Axis1 framework).
I am getting following exception in my log file:
Caused by: org.xml.sax.SAXParseException:..
I use pandas to write to excel file in the following fashion:
import pandas
writer = pandas.ExcelWriter('Masterfile.xlsx')
data_filtered.to_excel(writer, "Main", cols=['Diff1', 'Diff2'])
writer.s..
I have such Python code:
import numpy as np
import matplotlib.pyplot as plt
def f(x):
return np.int(x)
x = np.arange(1, 15.1, 0.1)
plt.plot(x, f(x))
plt.show()
And such error:
TypeError: onl..
Does anyone know how I can get the index position of duplicate items in a python list?
I have tried doing this and it keeps giving me only the index of the 1st occurrence of the of the item in the lis..
I have this data frame diamonds which is composed of variables like (carat, price, color), and I want to draw a scatter plot of price to carat for each color, which means different color has different..
In WebForms, I would normally have code like this to let the browser present a "Download File" popup with an arbitrary file type, like a PDF, and a filename:
Response.Clear()
Response.ClearHeaders()
..
I've done some research, and I seem to be missing one small part of this algorithm. I understand how a Breadth-First Search works, but I don't understand how exactly it will get me to a specific path,..
Can I use a <video> or <audio> tag to play a playlist, and to control them?
My goal is to know when a video/song has finished to play and take the next and change its volume...
I want to execute my program without using an IDE.
I've created a jar file and an exectuable jar file. When
I double click the exe jar file, nothing happens, and when I try to use the command in cmd..
I have bitmaps which are squares or rectangles. I take the shortest side and do something like this:
int value = 0;
if (bitmap.getHeight() <= bitmap.getWidth()) {
value = bitmap.getHeight();
}..
I'm trying to build my own service by following the example in the documentation for the factory methodology. I think I've done something wrong however because I continue to get the unknown provider ..
How do I assign vertical center alignment to the text inside a TextBlock? I found TextAlignment property but it is for horizontal text alignment. How do I do it for vertical text alignment?..
How to split the string when it contains pipe symbols | in it.
I want to split them to be in array.
I tried
echo "12:23:11" | awk '{split($0,a,":"); print a[3] a[2] a[1]}'
Which works fine. If my ..
How do I change the MySQL root password and username in ubuntu server? Do I need to stop the mysql service before setting any changes?
I have a phpmyadmin setup as well, will phpmyadmin get updated..
What is getSource? and what does it return?
and what is getActionCommand() and what does it return??
I am getting confused between these two can anyone give or differentiate them to me? what's the u..
I'm using an MVC 4 web API and asp.net web forms 4.0 to build a rest API. It's working great:
[HttpGet]
public HttpResponseMessage Me(string hash)
{
HttpResponseMessage httpResponseMessage;
L..
In Python, is there a way to check if a string is valid JSON before trying to parse it?
For example working with things like the Facebook Graph API, sometimes it returns JSON, sometimes it could re..
I'm making a form where the user can enter a dollar amount using an html number input tag. Is there a way to have the input box always display 2 decimal places?..