OTP is a set of useful middle-ware, libraries and tools written in Erlang. It is an integral part of the open source distribution of Erlang. (For the one-time passwords, use [tag:one-time-password])
Getting error when script move to other server.
(node:15707) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.alloc..
I am getting the following error while building the project. haven't used CoordinatorLayout in this project. just added as a dependency in build.gradle :
I am using Android Studio 3.2 Canary 4.
Log..
I have this error when I compile my code in node.js, how can I fix it?
RefernceError: fetch is not defined
This is the function I am doing, it is responsible for recovering information from a spec..
I know about this questions:
Failed to resolve: com.android.support:cardview-v7:26.0.0 android
Could not resolve com.android.support:appcompat-v7:26.1.0 [duplicate]
And I've read this documentation..
After upgrading from angular 4.4 to 5.0 and after updating all HttpModule and Http to HttpClientModule I started to get this error.
I also added HttpModule again to be sure it's not due to some depe..
I have Android Studio Beta. I created a new project with compile my old modules but when I tried launching the app it did not launch with the message:
Error:Execution failed for task ':app:transformD..
I 'm Following this guide in order to set up a pod using minikube and pull an image from a private repository hosted at: hub.docker.com
When trying to set up a pod to pull the image i see CrashLoopBa..
I update the gradle plugin to the latest : com.android.tools.build:gradle:3.0.0-alpha1 and this error occured :
export TERM="dumb"
if [ -e ./gradlew ]; then ./gradlew test;else gradle test;fi
FAILU..
After accepting to update the project to new version of gradle I get this error:
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute meta-data#android.supp..
When I make a request, I get a response in XML, but what I need is JSON. In the doc it is stated in order to get a JSON in return: Use the Accept: application/json HTTP Header.
Where do I find the HT..
When I today update Android Studio it write: Minimum supported Gradle version is 3.3. Current version is 3.2 how can I solve this problem?
Here is my build.gradle
// Top-level build file where you ..
I got the following Error in android Studio 2.2.3 when I sync gradle.
Error:Cause: unable to find valid certification path to requested target
How can I fix this issue
I am Adding my Gradle file al..
I am using Laravel Framework 5.4.10, and I am using the regular authentication that
php artisan make:auth
provides. I want to protect the entire app, and to redirect users to /themes after login.
..
I am getting the below exception on app launch.
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find cla..
I have gone through configuration documentation on ASP.NET core. Documentation says you can access configuration from anywhere in the application.
Below is Startup.cs created by template
public clas..
I am using Spring MVC and this is my method:
/**
* Upload single file using Spring Controller.
*/
@RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
public @ResponseBody ResponseEnti..
I've been trying to import a project to Android Studio and this is where I am stuck, there is a similar question on Stack Overflow but it did not provide a solution to my particular error.
This is m..
I'm not able to install pip in Docker.
Here's my Dockerfile:
FROM ubuntu:14.04
# Install dependencies
RUN apt-get update -y
RUN apt-get install -y git curl apache2 php5 libapache2-mod-php5 php5-mcr..
I want to compile an open source android project (Netguard) using gradel (gradlew clean build) But I encountered this Error:
A problem occurred configuring project ':app'.
> Exception thrown while..
I've got a major brainteaser.
I want to open a file in classic ASP. I'm using various variables because things can change but the outcome is correct. I know this because I've tested the outcome by co..
I am working on an Android App, in which the server sends an OTP and the user needs to enter this OTP in the App, to SignUp for my App. What I want is, that my App should be able to automatically read..
I am running Python3.4 on Windows 7. I am trying to use the Python interface for graphviz. This is a script I intend to run:
from graphviz import Digraph
import pydotplus
dot = Digraph(comment='The ..
I want to give spacing between buttons is there a way to give spacing using bootstrap so that they will be consistent for different screen resolutions.
I tried using margin-left But is it the correct..
I have a row in Bootstrap 3 and 3 columns in that row. I want to align two of the columns to the bottom of the row and keep the first column at the top. When I use the traditional approach with positi..
I am new to python and am trying to plot multiple lines in the same figure using matplotlib.
Value of my Y axis is stored in a dictionary and I make corresponding values in X axis in my following code..
I'm having problem with setting bootstrap3 navbar transparency or opacity color. I didin't change anything in bootstrap.css or bootstrap-theme.css
In my menu I'm Trying to put image under that and se..
I have an AngularJS application created by using yeoman, grunt and bower.
I have a login page that has a controller that checks for authentication. If the credentials are correct I reroute to home pa..
Is there a way to give a div element some padding INSIDE its border? For example, currently all the text inside my main div element goes right to the edge of the element's border. I'd like, as a gener..
When styling a form <select> element in Bootstrap 3, it renders an ugly button on the in Firefox on OS X:
(http://bootply.com/98385)
This has apparently been a known issue for a while, and t..
I'm using Bootstrap 3 and trying to setup the following accordion/collapse structure:
Onload: Each accordion panel in a group is fully collapsed and functions as documented/expected.
Button click: E..
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 know this has been asked a thousand time but I can't find a way to make the text and image to be centered vertically.
I'm using Twitter Bootstrap 3 with dynamic content so therefor, I do not know t..
I'm trying to get input and select option inline attached with each other like this demo using Bootstrap 2 (dead link).
Following Bootstrap 3 guidelines I manage to do this:
<div class="container..
I have been encountering problems like this on the current bootstrap 3 for a while now. I have managed to fix them in the past in one way or another but have no clue of how to fix it this time.
I nee..
As you can see here, I have a button that launches a modal. Setting an href url for the button this url is automatically loaded into modal by Bootstrap 3.
The fact is this page is loaded into modal ro..
In case #1 works, in case #2 it do not works. Check the code bellow:
<div class="container">
<div class="row">
<h1>Radio Group #1</h1>
<label class="rad..
I am using Bootstrap 3 and I would like to add some buttons in panel header, on top-right corner. When trying to add them, they are show below title baseline.
Code : http://bootply.com/82631
What ar..
I need to make Bootstrap 3.0 Carousel to display a slide of thumbnails. How can I do this?
This is an image of what I´m looking for:
This is a working example for Bootstrap 2, but I need this for ..
I'm testing on Windows, trying to simulate POST requests (with different form variables) for load testing. I have tried all kinds of load testing software but failed to get it working.
For GET reques..
here is sample link: http://bootply.com/76369
this is html i use.
<div class="row">
<div class="col-md-6">.col-md-6</div>
<div class="col-md-6">.col-md-6</div>
<..
I am migrating from bootstrap 2.3 to bootstrap 3 and everything works well. But when I tried to add some icons, the icon font doesn't displayed properly. I tried to look over here http://bootply.com/6..
Simple problem: How do I vertically align a col within a col using bootstrap? Example here (I want to vertically align child1a and child1b):
http://bootply.com/73666
HTML
<div class="col-lg-12"..
Updated for 2020, I've linked my article where I compare the memory footprints of different approaches to hosting HTML WebView in a basic Windows Desktop application:
MSEdge WebView2 WPF
Chromely/Cef..
Does anybody please know, what is wrong with the very simple HTML file below?
I am just trying to use an array of objects as the data source for DataTables:
tests.html:
<html>
<head>
..
I am new to the OpenFileDialog function, but have the basics figured out. What I need to do is open a text file, read the data from the file (text only) and correctly place the data into separate text..
I am running a (bio)python script which results in the following error:
from: can't read /var/mail/Bio
seeing as my script doesn't have anything to with mail, I don't understand why my script is lo..
First of all say apology to ask this repeated Question..
Actually in my spring Application i have user.jsp and professional.jsp
here is my User.jsp:
<form:form action="profile/user" modelAttri..
I'm running OpenLDAP 2.4-28 on XUBUNTU 12.04.
I'm reading "Mastering OpenLDAP" and configuring along with the book.
When I try to perform the following search (page 47):
$ ldapsearch -x -W -D 'cn=M..
The following code:
Class.forName("com.mysql.jdbc.Driver");
Connection m_connection = DriverManager.getConnection("jdbc:mysql://localhost","root","root");
Throws this exception on getConnection():
..
I am using code sample from Making Sense of Multitouch
for zooming image view. On ScaleListener I added ScaleGestureDetector.getFocusX() and getFocusY()for content to zoom about the focal point of the..
So if I have a directory stored in a variable, say:
$scriptPath = (Get-ScriptDirectory);
Now I would like to find the directory two parent levels up.
I need a nice way of doing:
$parentPath = Spl..
After migrating to Mavent 3.0.3 Parent poms in several Projects cannot be resolved anymore.
The Projects are structured in a default manner, so I set
parent.relativePath to "../pom.xml"
supe..
I'm currently setting all of the values of my class object Record.
This is the code that I'm using to populate the record at the moment, property by property.
// Loop through each field in the resul..
I have come across an Oracle problem for which I have so far been unable to find the cause.
The query below works in Oracle SQL developer, but when running in .NET it throws:
ORA-01008: not all va..
I am in the process of moving all my private an public repo's over to github. One of the decisions I have made is to only use the console as it means a smaller tooling footprint if I ever need to chan..
I am trying to search how to pass parameters in a Bash function, but what comes up is always how to pass parameter from the command line.
I would like to pass parameters within my script. I tried:
myB..
I have implemented a password recovery functionality in django. With my method, the new password will be sent to the email id entered. It works fine when given the correct email (e-mail id which exist..
I am looking for a drag & DROP plugin that works on touch devices.
I would like similar functionality to the jQuery UI plugin which allows "droppable" elements.
The jqtouch plugin supports dragg..
How can I remove a line (or lines) of a matplotlib axes in such a way as it actually gets garbage collected and releases the memory back? The below code appears to delete the line, but never releases..
I have two field nnmu and nnmi ,
if nnmu is equal to 1, I need to return naziv_mesta from **mesto_istovara**,
else if it's =0 I need to return naziv_mesta from mesto_utovara table
and reverse,
if ..
I'm using Glassfish 3.0.1, JVM 1.6.0_21 on Windows XP Pro;
I don't know exactly what has changed in my environment but I get this stacktrace as soon as I try to deploy an enterprise application (ejb ..
In tests that I write, if I want to assert a WebElement is present on the page, I can do a simple:
driver.findElement(By.linkText("Test Search"));
This will pass if it exists and it will bomb out i..
I'm currently using GCC, but I discovered Clang recently and I'm pondering switching. There is one deciding factor though - quality (speed, memory footprint, reliability) of binaries it produces - if ..
I used to love .NET Reflector back in the day, but ever since Red Gate Software took over it has gone downhill dramatically. Now it forces me to update (which is absolutely ridiculous), half the time ..
Are there any compelling performance reasons to choose static linking over dynamic linking or vice versa in certain situations? I've heard or read the following, but I don't know enough on the subject..
I've been asked by a number of unfortunate iPhone users to help them restore data from their iTunes backups. This is easy when they are unencrypted, but not when they are encrypted, whether or not the..
I need to check the condition of keyboard visibility in my iOS app.
Pseudocode:
if(keyboardIsPresentOnWindow) {
//Do action 1
}
else if (keyboardIsNotPresentOnWindow) {
//Do action 2
}
How..
I wish to have an internal (non window) dialog to ask for member input. I would like the dialog to be placed centrally on an existing JPanel.
I have looked at layeredpanes and these seem unusable due ..
I have variable length character data and want to store in SQL Server (2005) database. I want to learn some best practices about how to choose TEXT SQL type or choose VARCHAR SQL type, pros and cons i..
When should you use struct and not class in C#? My conceptual model is that structs are used in times when the item is merely a collection of value types. A way to logically hold them all together in..
Is there local file manipulation that's been done with JavaScript? I'm looking for a solution that can be accomplished with no install footprint like requiring Adobe AIR.
Specifically, I'd like to re..
.NET has a lot of complex data structures. Unfortunately, some of them are quite similar, and I'm not always sure when to use one and when to use another. Most of my C# and Visual Basic books talk abo..
Consider this - a base class A, class B inheriting from A, class C inheriting from B. What is a generic way to call a parent class initialiser in an initialiser? If this still sounds too vague, here's..
Possible Duplicate:
Changing Java platform on which Netbeans runs
Here is an image of my default JDK (which is 1.6) and the JDK I want to set as default (which is 1.7)
http://tinypic.com/v..
Before the confusion begins, this question is about Code, the new lightweight Visual Studio Editor.
You can get it from here: https://code.visualstudio.com/
I have a textfile (.txt) with CSS in it an..
I am writing a RESTful service for a customer management system and I am trying to find the best practice for updating records partially. For example, I want the caller to be able to read the full rec..
i have gwt application connect to postgres DB at the backend, and a java class 'Judgement' mapping the table 'judgements' in DB, when i tried to persistent a judgement into db, it threw the following ..
I beg some leniency here, I'm just starting with the Android SDK tutorials and I'm attempting something out of interest that's not in the tutorial itself, but I would hope would be easy.
I am trying ..
I've had a look over here but didn't find any details on the best file permissions. I also took a look at some of WordPress's form's questions over here too but anybody that suggests 777 obviously ne..
In PHP, strings are concatenated together as follows:
$foo = "Hello";
$foo .= " World";
Here, $foo becomes "Hello World".
How is this accomplished in Bash?..
Possible Duplicate:
How to make a varchar2 field shorter in Oracle?
In Oracle(9i and above)
Alter table employee
MODIFY ename varchar2(10);
I want to alter the column ename of table ..
So, i've been trying to save a jupyter notebook as PDF but i just can't figure out how to do this. The first thing i try is from the file menu just download as PDF, but doing that results in:
nbconve..
How to disable Instant Run in Android Studio 2.0 Preview. When I go to the settings I see it:
and I can not remove the tick from "Enable Instant Run..."
I use Android Studio 2.0 Preview 9, but thi..
I have a visual studio solution.
I have many projects in the solution.
There is one main project which acts as the start up and uses other projects.
There is one project say "ProjectX". Its reference ..
I am attempting to delay the swapping of text in a div. It should operate like a slider/carousel for text.
I must have the code wrong, as the final text replacement never happens.
Also, how would I ..
I did like below in xml
<TableRow>
<TextView android:id="@+id/address1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="..
I have a largish table in an Excel worksheet:
Column_1 | Column_2 | Column_3
ValueA ValueB ValueC
....
What I need is a function that will take as input the range and an SQL-like query S..
In C, if I wanted to create a matrix struct, I would use:
struct matrix {
int col, row;
double data[1]; // I want the matrix entries stored
// right after this struct
}
Then I..
I'm working on a routine that compares strings, but for better efficiency I need to remove all characters that are not letters or numbers.
I'm using multiple REPLACE functions now, but maybe there is..
We'd be interested to hear any experiences with the pros and cons of ActiveMQ vs RabbitMQ vs ZeroMQ. Information about any other interesting message queues is also welcome...
I have to search through a list and replace all occurrences of one element with another. So far my attempts in code are getting me nowhere, what is the best way to do this?
For example, suppose my li..
In AssemblyInfo there are two assembly versions:
AssemblyVersion: Specify the version of the assembly being attributed.
AssemblyFileVersion: Instructs a compiler to use a specific version number for..
I want to clear a element from a vector using the erase method. But the problem here is that the element is not guaranteed to occur only once in the vector. It may be present multiple times and I need..
My current application runs on iOS 5 and 6.
The navigation bar is having an orange color and the status bar is having a black background color with white text color. However, when I run the same app..
I have an array:
$array = array(1,2,3,4,5);
If I were to dump the contents of the array they would look like this:
array(5) {
[0] => int(1)
[1] => int(2)
[2] => int(3)
[3] => i..
If I have the following array of objects:
[ { id: 1, username: 'fred' }, { id: 2, username: 'bill' }, { id: 2, username: 'ted' } ]
Is there a way to loop through the array to check whether a partic..
This command works with HiveQL:
insert overwrite directory '/data/home.csv' select * from testtable;
But with Spark SQL I'm getting an error with an org.apache.spark.sql.hive.HiveQl stack trace:
j..
I have a C++/Obj-C background and I am just discovering Python (been writing it for about an hour).
I am writing a script to recursively read the contents of text files in a folder structure.
The pro..
I have a Bash script that builds a string to run as a command
Script:
#! /bin/bash
matchdir="/home/joao/robocup/runner_workdir/matches/testmatch/"
teamAComm="`pwd`/a.sh"
teamBComm="`pwd`/b.sh"
inc..
I'm trying to read an Excel file (Office 2003). There is an Excel file that needs to be uploaded and its contents parsed.
Via Google, I can only find answers to these related (and insufficient topics..
I have two input dates taking from Date Picker control. I have selected start date 2/2/2012 and end date 2/7/2012. I have written following code for that.
I should get result as 6 but I am getting 5...
I checked in a project on one computer, checked out on another, and find that the binaries installed by NuGet are missing. I could check them in to source control as well, but it looks like there's a..
when I tried to run my application its show the error below
Error running Dashboard: The activity must be exported or contain an intent-filter
How can I solve this error?..
In the remote server I have a post-receive hook set up in order to make a git checkout of my repository:
#!/bin/sh
GIT_WORK_TREE=/var/www/<website> git checkout -f
But when I make a push from..
I'm executing an external script, using a <script> inside <head>.
Now since the script executes before the page has loaded, I can't access the <body>, among other things. I'd like t..
I would like to delete the database file from the Android file system programatically? Can I have a shell script launch adb which in turns runs a shell script in the Android space to do the database ..
I'm trying to pass an array (or IEnumerable) of ints from via AJAX to an MVC action and I need a little help.
the javascript is
$.get('/controller/MyAction', { vals: arrayOfValues }, function (dat..
I'm getting results from a database and want to output the data as a table in Java's standard output
I've tried using \t but the first column I want is very variable in length.
Is there a way to dis..
I've googled and there are several very long threads on this topic and none of them seem to help. I think I'm doing something wrong.
I have a branch called Test_Branch. When I try to delete it using t..
For a drawing application, I'm saving the mouse movement coordinates to an array then drawing them with lineTo. The resulting line is not smooth. How can I produce a single curve between all the gat..
I got an error:
Parse error: syntax error, unexpected end of file in the line
With this code:
<html>
<?php
function login()
{
// Login function code
..
I am providing search functionality in my website, when user searches a record then I want to display the time the query taken to get the results same as google does. When we search anything then goog..
I would like to have my main title and axis title have the same font size as the annotated text in my plot.
i used theme_get() and found that text size is 12, so I did that in my theme statement - th..
What's the difference between an URI, URL and URN? I have read a lot of sites (even Wikipedia) but I don't understand it.
URI: http://www.foo.com/bar.html
URL: http://www.foo.com/bar.html
URN: bar.ht..
Possible Duplicate:
Return empty cell from formula in Excel
I have an IF statement. If a cell = n, then do something, else output NULL
=IF(A1=5, "Success", NULL) // #NAME?
=IF(A1=5, "Suc..
I have created an ASP.NET MVC 3 project, and am using IIS Express as the web server when developing. When I try to debug, I get the error message below.
How can this be solved?
Server Error in '/..
I am using MySQL with Spring JDBC template for my web application. I need to store phone number with only digits (10). I am little bit confused about data type using data type.
What is preferable da..
My source data is in a TSV file, 6 columns and greater than 2 million rows.
Here's what I'm trying to accomplish:
I need to read the data in 3 of the columns (3, 4, 5) in this source file
The fifth..
I have one html div on my jsp page, on that i have put one anchor tag, please find code below for that,
<div class="expandable-panel-heading">
<h2>
<a id="ancherComplaint..
I am trying to understand the advantages of multiprocessing over threading. I know that multiprocessing gets around the Global Interpreter Lock, but what other advantages are there, and can threading ..
I understand why var takes that name - it is variable, const - it is a constant, but what is the meaning behind the name for let, which scopes to the current block? Let it be?..
I want to create one proc like below but it has error on syntax.
Could anyone pointing out the problem?
Create PROCEDURE [dbo].[my_proc] AS
BEGIN
DISABLE TRIGGER dbo.tr_name ON dbo.table_name
-- s..
I have searched the internet for days now on how to implement a video streaming feature from an android phone to another android phone over a WiFi connection but I can't seem to find anything useful. ..
I'm trying to exclude several folders on the "Explore" tab in Visual Studio Code. To do that I have added a following jsconfig.json to the root of my project:
{
"compilerOptions": {
"targ..
If I have two lists of type string (or any other type), what is a quick way of joining the two lists?
The order should stay the same. Duplicates should be removed (though every item in both links are..
I know a little bit about TextWatcher but that fires on every character you enter. I want a listener that fires whenever the user finishes editing. Is it possible? Also in TextWatcher I get an instanc..
I have been searching for an answer and trying different things without success. Could someone kindly let me know how to put spaces between two objects by using PHP code? (Please note: I use WordPress..
Here is my code:
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String question;
question = in.next();
if (question.equalsIgnoreCase("howdoyoulikeschool?") )
..
I have a Latex document where I need to change the margins of only a few pages (the pages where I'm adding a lot of graphics).
In particular, I'd like to change the top margins (\voffset). I've tried..
Is there a performance hit if we use a loop instead of recursion or vice versa in algorithms where both can serve the same purpose? Eg: Check if the given string is a palindrome.
I have seen many prog..
I am facing an issue while debugging c# API Coding in Visual studio 2017. Debugging not started and showing a error message like
Any idea about this error message? ..
I have a form that I would like all fields to be filled in. If a field is clicked into and then not filled out, I would like to display a red background.
Here is my code:
$('#apply-form input').blu..
Some days ago I began to study this Spring Hello World Tutorial: http://viralpatel.net/blogs/spring-3-mvc-create-hello-world-application-spring-3-mvc/
In this tutorial Spring DispatcherServlet is con..
I have a website which must be responsive for mobile phones. I've created it using my desktop. When I adjust browser windows it's working perfectly for mobile phone but when I check it on my real mobi..
I'm an FPGA noob trying to learn Verilog. How can I "assign" a value to a reg in an always block, either as an initial value, or as a constant. I'm trying to do something like this in the code below..
I have problem in asp.net button control.
I define a button in form, onclick event of button is not firing when I click on the button.
<asp:Button ID="btn_QuaSave" runat="server" Text="SAVE" OnCl..
I keep getting this HttpMediaTypeNotAcceptableException error for AJAX requests when using with Spring MVC and JSON.. full stack trace of the error is..
org.springframework.web.HttpMediaTypeNotAcce..
I want the value of JavaScript variable which i could access using PHP.
I am using the code below but it doesn't return value of that variable in PHP.
// set global variable in javascript
profil..
We write a software that create PDF files. How we can check if the resulting pdf files are PDF/A compatible? Are there any test suite for it available?..
How would I return the column names of a table using SQL Server 2008? i.e. a table contains these columns- id, name, address, country and I want to return these as data...
Is it possible in pure css, that is without adding additional html tags, to make a line break like <br>? I want the line break after the <h4> element, but not before:
HTML
<li>
T..
I have a data frame df and I use several columns from it to groupby:
df['col1','col2','col3','col4'].groupby(['col1','col2']).mean()
In the above way I almost get the table (data frame) that I need..
While creating a component in Reactjs with input fields error occurs
Error: Parse Error: Line 47: Expected corresponding JSX closing tag for input at http://localhost/chat-react/src/script.js:47:20 &l..
How do you concatenate characters in java? Concatenating strings would only require a + between the strings, but concatenating chars using + will change the value of the char into ascii and hence givi..
I have two cells in Excel. one has a string and the other one has a date. in the third cell I want to put the date and the string together. For example:
A1 = "This "
A2 = "03/03/1982"
I want A3 to..
After checking if a cell value exists in a column, I need to get the value of the cell next to the matching cell. For instance, I check if the value in cell A1 exists in column B, and assuming it matc..
Is it possible in PHP to do something like this? How would you go about writing a function? Here is an example. The order is the most important thing.
$customer['address'] = '123 fake st';
$customer[..
Im trying to use the movingBoxes plugin with my asp.net mvc site and it is not working (obviously).
I have the movingboxes.js imported in my head tag in the site.master like so
<script src="&..
I would like to make a structure with the condition (if-else) RadioButton
I want that when the Radiobutton RB1 is selected, this function is active:
regAuxiliar = ultimoRegistro;
And when the radi..
I am new in AngularJs, ng-click is not working as expected. I searched on the internet , Follow the tutorial , (that was working) - but this is not working!!!
My Code:
<div class="row" ng:repeat..
Let's assume a service offers some funcionality that I can use like this:
GET /service/function?param1=value1¶m2=value2
Is it right to say that I can use it with a POST query?
POST /servic..
I've been looking around for a decent jQuery plugin that can handle both dates and times. The core UI DatePicker is great, but unfortunately I need to be able to take time in as well.
I've found a f..
I'm using Spring Boot and json-schema-validator. I'm trying to read a file called jsonschema.json from the resources folder. I've tried a few different ways but I can't get it to work. This is my code..
I have a text file which contains a time stamp on each line. My goal is to find the time range. All the times are in order so the first line will be the earliest time and the last line will be the lat..
I'm working on a drupal site and when debugging, I am always having to read through long, nested arrays. As a result, a large portion of my life is spent using the arrow, return, and tab keys, to spli..
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'm not asking for the SHOW COLUMNS command.
I want to create an application that works similarly to heidisql, where you can specify an SQL query and when executed, returns a result set with rows and..
I am trying to style my buttons in a way that the hover makes the button a lighter shade instead of a darker shade. I tried bootstrap customization page(http://getbootstrap.com/customize/) and it does..
I just hit a huge brick wall with Paypal. I had created a regular C# project to create some wrapper classes using their WSDL.
If you create a non-web project, the only option you get to add a wsdl i..
I have downloaded and installed SQL Server 2014 Express
(from this site: http://www.microsoft.com/en-us/server-cloud/products/sql-server-editions/sql-server-express.aspx#Installation_Options).
The pr..
This is what I want the output to look like:
Employee Emp# Manager Mgr#
BLAKE 7698 KING 7839
CLARK 7782 KING 7839
JONES 7566 KING 7839
MARTIN 7654 BLAKE 7698
A..
My question is simple: I have a python script that generates figures using matplotlib. Every time i run it it generates new windows with figures. How can I have the script close windows that were open..
The question of whether P=NP is perhaps the most famous in all of Computer Science. What does it mean? And why is it so interesting?
Oh, and for extra credit, please post a proof of the statement's t..
<script type="text/javascript">
/* ... */
</script>
vs.
<script language="Javascript">
/* ... */
</script>
Which should be used and why?
Or, the third alternative..
I have a function which I want to take, as a parameter, a 2D array of variable size.
So far I have this:
void myFunction(double** myArray){
myArray[x][y] = 5;
etc...
}
And I have decla..
I have just installed XAMPP and everything works fine except that I can't get apache to run. It seems that port 80 is the problem, I have disabled Skype to use port 80 but it doesn't seem to fix it. ..
I'm trying to work out an appropriate singleton model for usage in Swift. So far, I've been able to get a non-thread safe model working as:
class var sharedInstance: TPScopeManager {
get {
..
true.ToString()
false.toString();
Output:
True
False
Is there a valid reason for it being "True" and not "true"? It breaks when writing XML as XML's boolean type is lower case, and also isn't comp..
Hi I just started learning Python but I'm sort of stuck right now.
I have hash.txt file containing thousands of malware hashes in MD5, Sha1 and Sha5 respectively separated by delimiters in each line..
I am tasked with implementing single sign-on for our customers as part of our next release. The flow exists as follows:
User logs into their school's main portal system using a student id/password..
If I had: ArrayList<Double> m = new ArrayList<Double>();
with the double values ??inside, how should I do to add up all the ArrayList elements?
public double incassoMargherita()
{
double..
I just installed Vue and have been following some tutorials to create a project using the vue-cli webpack template. When it creates the component, I notice it binds our data inside of the following:
..
This question may have been asked before but no it was not definitively answered. How exactly does one post raw whole JSON inside the body of a Retrofit request?
See similar question here. Or is this..
I've got a html5 video element on a modal window. When I close the window the video continues to play. I'm a total newbie to JS. Is there an easy way to tie a video playback stop function to the wi..
I need to write a standalone ruby script that is supposed to deal with database. I used code given below in rails 3
@connection = ActiveRecord::Base.establish_connection(
:adapter => "mysql2",
:ho..
hear is my code
public function viewdeletedrecords()
{
if($this->session->userdata('applicant_firstname') == '')
{
redirect('papplicant/login') ;
}
$profile = $this-..
I'm learning Spring 3 and I don't seem to grasp the functionality behind <context:annotation-config> and <context:component-scan>.
From what I've read they seem to handle different annota..
Someone suggested I use an ORM for a project that I'm designing, but I'm having trouble finding information on what it is or how it works.
Can anyone give me a brief explanation of what an ORM is an..
I just developed my first program in C++ and I wanted to show it with one of my friends. Sadly, when he tries to open the exe it gets an error which says "MSVCP140.dll is missing". Why is this issue h..
From what I've read in the past, you're encouraged not to change the priority of your Windows applications programmatically, and if you do, you should never change them to 'Realtime'.
What does the 'R..
I'm a little bit confused about something. I was under the impression that the correct way of reading a C string with scanf() went along the lines of
(never mind the possible buffer overflow, it's ju..
#define STR1 "s"
#define STR2 "1"
#define STR3 STR1 ## STR2
Is it possible to concatenate STR1 and STR2, to "s1"?
You can do this by passing args to anoth..
Is it legitimate to use items() instead of iteritems() in all places? Why was iteritems() removed from Python 3? Seems like a terrific and useful method. What's the reasoning behind it?
Edit: To clar..
Upload.php:
<?php
//This is the directory where images will be saved
$target = "pics";
$target = $target . basename( $_FILES['Filename']['name']);
//This gets all the other information f..
My code just scrapes a web page, then converts it to Unicode.
html = urllib.urlopen(link).read()
html.encode("utf8","ignore")
self.response.out.write(html)
But I get a UnicodeDecodeError:
Traceb..
Yet another list-comparing question.
List<MyType> list1;
List<MyType> list2;
I need to check that they both have the same elements, regardless of their position within the list. Each My..
A script takes a URL, parses it for the required fields, and redirects its output to be saved in a file, file.txt. The output is saved on a new line each time a field has been found.
file.txt
A Cat..
Edit:
From another question I provided an answer that has links to a lot of questions/answers about singletons: More info about singletons here:
So I have read the thread Singletons: good design o..
I have been trying to figure out this problem i have with html/css sticky header + scrollbars. We are creating a program that requires scrollbars to show up once the containersize reaches a certain po..
I've been trying to push an item to an associative array like this:
$new_input['name'] = array(
'type' => 'text',
'label' => 'First name',
'show' => true,
'required' =>..
How can I generate a class from a SQL Server table object?
I'm not talking about using some ORM. I just need to create the entities (simple class). Something like:
public class Person
{
..
I'm trying to understand the structure of a URL, and I'm seeing a lot of %2C. I'm guessing this is a result of some encoding. What does that stand for?..
I have a Symfony2 project. I updated my php to 5.5.7 today and since then, I am getting the
Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *r..
I have to compare two Integer objects (not int). What is the canonical way to compare them?
Integer x = ...
Integer y = ...
I can think of this:
if (x == y)
The == operator only compares refere..
I have been pretty much fascinated by these two data types. According to Oracle Docs, they are presented as follows :
BLOB : Variable-length binary large object string that can be up to 2GB (2,147,48..
I have:
var array = new Array();
array.push("A");
array.push("B");
array.push("C");
I want to be able to do something like:
array.remove("B");
but there is no remove function. How do I accomplish..
I often use python to process directories of data. Recently, I have noticed that the default order of the lists has changed to something almost nonsensical. For example, if I am in a current directory..
I'm trying to organize my state by using nested property like this:
this.state = {
someProperty: {
flag:true
}
}
But updating state like this,
this.setState({ someProperty.flag: false ..
Any good rules of thumb on how to decide which of the two to use?
And, if you take over an Sqlite database, and the system is expected to "get much larger", how to decide whether to stick with it or ..
I am getting this message when I run my web application. It runs fine but I get this message during shutdown.
SEVERE: A web application registered the JBDC driver [oracle.jdbc.driver.OracleDriver]..
I'd like to show a clock in cell A1 of Excel 2007. I'm familiar with NOW() and TODAY() but it doesn't refresh itself every 1 minute like I want it to. You know, like a running clock. I just want th..
I've a script which reads temperature data:
def get_temp(socket, channels):
data = {}
for ch in channels:
socket.sendall('KRDG? %s\n' % ch)
time.sleep(0.2)
temp = soc..
I have a component setup that is essentially a launcher for an application. It is configured like so:
@Component
public class MyLauncher {
@Autowired
MyService myService;
//other methods..
I have the following data frame in R:
> str(df)
'data.frame': 545227 obs. of 15 variables:
$ ykod : int 93 93 93 93 93 93 93 93 93 93 ...
$ yad : Factor w/ 42 levels "BAKUGAN","BARBIE",..: ..
I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.
Since the values are not unique, I find myself converting the keySet into an array, and sorting ..
I'm doing some statistical analysis about Google Play, comparing different languages. Every time I visit the site (http://play.google.com/store), it always opens in my language. I want to change the l..
How does python handle generic/template type scenarios? Say I want to create an external file "BinaryTree.py" and have it handle binary trees, but for any data type.
So I could pass it the type of..
Is there any way to tell whether a string represents an integer (e.g., '3', '-17' but not '3.14' or 'asfasfas') Without using a try/except mechanism?
is_int('3.14') == False
is_int('-7') == True
..
I am in the process of building a Chrome extension, and for the whole thing to work the way I would like it to, I need an external JavaScript script to be able to detect if a user has my extension ins..
I want to load an image and some other actions after I click a certain DOM element, but I want to load them AFTER the clicking action finished.
Here is a code example:
$("#message_link").click(func..
I have a text file containing unwanted null characters (ASCII NUL, \0). When I try to view it in vi I see ^@ symbols, interleaved in normal text. How can I:
Identify which lines in the file contain ..
I have statements like this that are timing out:
DELETE FROM [table] WHERE [COL] IN ( '1', '2', '6', '12', '24', '7', '3', '5')
I tried doing one at a time like this:
DELETE FROM [table] WHERE [CO..
I am creating a jQuery plugin.
How do I get the real image width and height with Javascript in Safari?
The following works with Firefox 3, IE7 and Opera 9:
var pic = $("img")
// need to remove the..
I have a struct:
typedef struct user {
string username;
vector<unsigned char> userpassword;
} user_t;
I need to initialize userpassword with an empty vector:
struct user r={"",?};
..
Is there a way to use the Now() function in SQL to select values with today's date?
I was under the impression Now() would contain the time as well as date, but today's date would have the time set ..
How can I convert a NSString containing a number of any primitive data type (e.g. int, float, char, unsigned int, etc.)? The problem is, I don't know which number type the string will contain at runti..
${parameter:=word}
Assign Default Values. If parameter is unset or null, the
expansion of word is assigned to
parameter. The value of parameter is
then substituted. Posit..
In postgresql, how do I replace all instances of a string within a database column?
Say I want to replace all instances of cat with dog, for example.
What's the best way to do this?..
What is the purpose of using IBOutlets and IBActions in Xcode and Interface Builder?
Does it make any difference if I don't use IBOutlets and IBActions?
Swift:
@IBOutlet weak var textField: UITex..
ArrayList or List declaration in Java has questioned and answered how to declare an empty ArrayList but how do I declare an ArrayList with values?
I've tried the following but it returns a syntax err..
Is it possible to pass arguments when loading a module using require?
I have module, login.js which provides login functionality. It requires a database connection, and I want the same database conne..
As the title, I have an existing table which is already populated with 150000 records. I have added an Id column (which is currently null).
I'm assuming I can run a query to fill this column with inc..
I need to convert minutes to hours, rounded off to 2 decimal places.I also need to display only up to 2 numbers after the decimal point. So if I have minutes as 650.Then hours should be 10.83
Here's ..
I have a span with class="span" and a hidden field class="dropdown".
The span text changes, and I need to grab the text and set it as the value of the hidden field's value.
I will then use php (I a..
If we can get data from two tables without having primary and foreign key relation, then why we need this rule? Can you please explain me clearly, with suitable example?
It's a test database, don't mi..
I'm implementing an example from https://github.com/moroshko/react-autosuggest
Important code is like this:
import React, { Component } from 'react';
import suburbs from 'json!../suburbs.json';
fu..
I am doing some penetration testing on my localhost with OWASP ZAP, and it keeps reporting this message:
The Anti-MIME-Sniffing header X-Content-Type-Options was not set to
'nosniff'
This c..
How to declare a variable in mysql, so that my second query can use it?
I would like to write something like:
SET start = 1;
SET finish = 10;
SELECT * FROM places WHERE place BETWEEN start AND fini..
I have this model:
public class SearchModel
{
[DefaultValue(true)]
public bool IsMale { get; set; }
[DefaultValue(true)]
public bool IsFemale { get; set; }
}
But based on my researc..
Update 20140702:
The solution
Detailed answer as a blog post
(but I'm marking one of the other answers as accepted instead of my own,
as it got me halfway there, and to reward the effort)
It ap..
When trying to run an executable I've been sent in Mac OS X, I get the following error
dyld: Library not loaded: libboost_atomic.dylib
Referenced from: /Users/"Directory my executable is in"
Reas..
I've tried all three of these to no avail:
<meta name=”viewport” content=”width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;” />
<meta name=”viewport” co..
Is it possible to have one controller use another?
For example:
This HTML document simply prints a message delivered by the MessageCtrl controller in the messageCtrl.js file.
<html xmlns:ng="htt..
Given this HTML snippet:
<div id="box" style="overflow:auto; width:200px; height:200px; border:1px solid black;">
1<br>2<br>3<br>4<br>5<br>6<br>7<br>8&..
I've looked at the previously-posted jQuery/MVC questions and haven't found a workable answer.
I have the following JavaScript code:
$.ajax({
type: "POST",
url: '@Url.Action("Search","Controller")..
I want to show all columns in a dataframe in a Jupyter Notebook. Jupyter shows some of the columns and adds dots to the last columns like in the following picture:
How can I display all columns? ..
I can't seem to correct the error the console is talking about can anyone help me. My code is below. I created a web form that saves the data to local storage and displays it on screen then deletes al..
I was looking for a way to run an external process from python script and print its stdout messages during the execution.
The code below works, but prints no stdout output during runtime. When it exit..
In the Heroku free apps the dynos seem to keep idling - my app has very low traffic but it's also not really acceptable in my case that my users have to wait 20+ seconds to spin up a new dyno.
Frank..
I have been staring at this code for hours now and I cannot figure out where my mistake is. I know this syntax error usually comes up because of some missing or out of place curly brace or some issue ..
I am not even sure I am asking the right question. Let me explain my situation:
This is about Git on Windows 7.
My company sets up the Windows user directory on a network drive, not on the loca..
I'm using Python's max and min functions on lists for a minimax algorithm, and I need the index of the value returned by max() or min(). In other words, I need to know which move produced the max (at ..
In Lollipop, the download functionality works fine in my app, but when I upgraded to Marshmallow, my app crashes and gives this error when I try to download from the internet into the SD card:
Neith..
I'm new to Python. I need to query items from a dict and save the result to a text file. Here's what I have:
import json
import exec.fullog as e
input = e.getdata() #input now is a dict() which has ..
What is the use of the yield keyword in Python, and what does it do?
For example, I'm trying to understand this code1:
def _get_child_candidates(self, distance, min_dist, max_dist):
if self._lef..
I've got a table that collects forms submitted from our website, but for some reason, when they created the table, they didn't put a timestamp in the table. I want it to enter the exact date and time ..
Possible Duplicates:
Check if text is in a string
JavaScript: string contains
I'm trying to check if a string I import into my application has a certain piece of text. I know how to do th..
I was trying to find a solution for my problem.
Input:
This is the sample title | mypcworld
Output:
This is the sample title
I want to remove everything comes after " | " using simple regex on..
I have this code which is supposed to cout in console the information from the .csv file;
while(file.good())
{
getline(file, ID, ',');
cout << "ID: " << ID << " " ;
g..
How can I convert this string:
This string contains the Unicode character Pi(p)
into an escaped ASCII string:
This string contains the Unicode character Pi(\u03a0)
and vice versa?
The curren..
I am trying to do a go get:
go get github.com/go-sql-driver/mysql
and it fails with the following error:
package github.com/go-sql-driver/mysql: cannot download, $GOPATH not set. For more details ..