Newest Questions

Q&A for professional and enthusiast programmers

How can I use one route53 record to point to two S3 buckets?

I have two buckets a and b with static websites enabled that redirect to original buckets A and B. I created two route53 record sets(A records) slave-1 and slave-2 pointing to each bucket a and b. I ...

Python matplotlib 3d projection error

I am trying to print 3d scattered plot in python. However when I use this line ax = fig.add_subplot(111,projection='3d') I get the following error: KeyError: u'_internal.classic_mode' For complete ...

HTML Table containing headers, table headers, body tag, and table data tag

I'm trying to make a 2x2 table so that the layout is "Mission Statement" and "Picture UMES" on one row then "2017" and the unordered list on the second row but can't seem to figure it out, it all ...

How to prevent two same divs in HTML from overlapping?

I am working on an HTML page that has two separated columns. And I need to print the texts in the two columns pair by pair becasue I am going to build a JSP based on this HTML. Now I run into some ...

Why isn't Xcode (Swift 3) flagging APIs from iOS 10+ when deployment target is 9.3?

The title covers it. Latest Xcode and using Swift 3. I'm probably using some stuff from 10+, but no messages, and then crashes on an iOS 9.3.5 system. My understanding is that the compiler would flag ...

Aspects not execut when running junit test

I have an aspect which should be executed before Dao.save and it works fine. But when I run junit test. The aspect is not being executed. How to config it for Junit tests? BaseModelAspect.java @...

Sort data based on conditions

I have a (x) data frame in R with 5 numeric columns and apart from this one information is sorting order to be followed in form of a vector i.e. 1, 0, 2, 4, 3 this vector define the sorting order ...

Ajax Jstree in Django

while searching for Ajax Jstree in Django I found this query.Tried this.but its not working on my pc.At the last author has mentioned the problem is "Seems the problem was I hadn't done both ...

Xamarin Android Screen with Stacked Tables of Data

I need to fit several tables of data on a screen. For small screens, I though the best way to handle this, as a simple solution, was to have them all stacked up on top of one another. And then just to ...

angular 2 changes of values from a parent component not reflecting in ngIf statement even though the child component actually gets the form

here is the parent component import { Component, OnInit } from '@angular/core'; import {ViewEncapsulation} from '@angular/core'; @Component({ selector: 'app-bukkacorporateform', templateUrl: './...

Is it possible to create an ASP .NET Core Migration with data in it?

I am working with migrations in ASP .NET Core and Entity Framework and everything works well to preserve the structure of tables. However, I would like (if possible) to also have data in migrations, ...

How to generate specific random numbers in Python?

I need help with generating a list of specific random numbers using Python. I know how to generate a list of random number like this import random number = random.sample(xrange(1,10), 3) which will ...

How to solve this using a subquery in a from clause?

Display author, title, retail and retail price of all books whose retail price is the highest for the specific author. I have the query below. I'm kinda confused how to do a subquery in a from clause....

Combining Flask Blueprints with Flask-JWT

I am developing a Flask 0.12 app with Blueprints and I am trying to use Flask-JWT (0.3.2) for authentication. None of the tutorials that I can see for Flask-JWT use Blueprints. There is a usually a ...

Trying to enable show/hide feature in asp.net

I am trying to enable show/hide password feature. I am creating an asp.net web form using C#. My code is. this is .cs file using System; using System.Collections.Generic; using System.Linq; using ...

Subset a long list of files

I have a first list of files (long list about 200000) A <- [11] "wd_010030902O.nc" "wd_010030903O.nc" [13] "wd_010030904O.nc" "wd_010030905O.nc" [15] "wd_010030906O....

import Gson.jar into Netbean project

I download gson-2.8.0.jar and try to import to NetBeans libraries. Here are the steps I import it: Tools > Libraries. for Libraries Name: "Absolute Layout" and I click "Add JAR/Folder". Select gson-2....

Is there a direct, fast way to “map” list<VectorXd> to MatrixXd?

I am looking for a direct, fast method to convert a list<VectorXd> to MatrixXd. How can I do that? Map<Eigen::MatrixXd> listV(list<VectorXd>) Doesn't compile.

make all possible pairs from different list in python

I used this way to make all combinations: import itertools lst = [1, 2, 3], [1,2,2,4] combs = [] for i in xrange(1, len(lst)+1): combs.append(i) els = [list(x) for x in itertools....

Run timer code from node endpoint in node/express

I apologize for the noob question but I'm pretty new to Node. I would like an express endpoint at /foo to immediately return a response to the caller but set up an interval to continue running on the ...

Conclusion: don't install laravel/framework v4.2.22

I am trying to spin up my old L4 site on Digital Ocean. After cloning everything, I tried running : sudo composer update Do not run Composer as root/super user! See https://getcomposer.org/root for ...

In android how to Resize and user crop image before uploading image as profile pic

I am beginner in Android, I searched a lot for user cropping image before uploading the image like in whattsapp and also minimise the size of the image interms of bytes, but i am not getting any ...

Spring - how to reference another property within the same bean?

I have the following definition in my configuration: <bean class="com.project.TimerBean"> <property name="delay" value="30000" /> <property name="interval" value="60000" /> ...

How to send data from directive to parent controller in my case?

Hi I am trying to control the html based on the value inside directive. I have a html like this: //myCtrl.isLoad was set to false <img ng-src="{{myCtrl.url}}" imageonload></img> <div ...

Destructor For A Dynamic Array [C++]

I'm working on a dynamic array problem right now and have created a destructor for it. The code compiles just fine, but because I haven't been provided with a test file, I'm not actually sure if the ...

C Programming - Difficulty with Parsing a Temp Folder

I'm having some trouble with parsing a temp.txt folder which contains the basenames of various files in a directory. I'd like to sort through this file, figure out what each of the file types are line ...

AttributeError: 'dict' object has no attribute 'user' during overriding “social-app-auth-django” create_user

I noticed that the SAAD fails to associate an existing user with the social-auth logged in user. This is creating multiple users with the same email address. I tried to override this by commenting out ...

How to create a grid of photos where you can over them and they will change into other photos?

I'm trying to create a grid of photos where you can hover over them and they will change into other images. I've tried placing the image on css as background image but when you hover, the other ...

Increment Number - jquery or php

a newbie here, what is the best solution to increment a number on the background? I've been searching about jquery countdown and was not lucky. So basically, you set the initial number, and it keeps ...

How can I compress a folder and all included files and sub folders to a ZIP file in android?

I hope to ZIP a folder and all included files and sub folders to a zip file, the code at How to zip and unzip the files? only ZIP files. ZIP Code public static void zip(String[] files, String ...

JAVA :How to determine the index of the next character in a string NOT equal to a set of delimiters

I don't think this question is very complicated to an experienced programmer, but I'm pretty new to it so I'm struggling. I have a list of delimiters declared before a java class as such: public ...

Session Configuration/Timeout with Slick 3

Is there a way to handle sessions explicitly in Slick 3? I currently have some code that looks like def findUserByEmail(email: String): Option[User] = { val users = TableQuery[Users] val ...

File streaming in C# over TCP

I reckon this may be a dumb question but I could not find anything helpful on SO. I have written a piece of code that transfers some file from one place to another over TCP. When I save the file on ...

Error with a custom folder

I've been working on this for days but still cannot figure out how to do this: creating a custom folder. Here's some information that I used: Source 1 Source 2 Source 3 The major difference between ...

gomobile command error “ No android NDK path is set ”

I am using Go version 1.7.5 in windows and when i am trying to use gomobile command either to install or bind or build . It displays this error- "gomobile: no Android NDK path is set. Please run ...

how to implement ng2-dragula in angular 2

how to implement ng2-dragula in angular 2. My code is shared below, ****viewer.component.ts**** import { Component, Input, Output, EventEmitter } from '@angular/core'; import { Injectable } from '@...

Python 3 Print links from Screen scrape

I've been going through tons of threads on here to see if I can find a way to fix this code but cant quite seem to get this to work. I'm trying to scrape links from a site then write to csv. Here's ...

Query to select 2 most recent dated records per grouping

Using R, I want to grab the two most recently dated entries for each UserID, assuming there is 1 or more entries per UserID. The key elements of my data would be an identifier (UserID), and a date, ...

jQuery not working in HTML file

I've tried multiple variations of importing jQuery, but nothing is working. When I run it, everything in the body shows up, but the jQuery function doesn't work. Here is my current code: <!DOCTYPE ...

Taking over a session from LoadRunner

I have a hunch that it may not be possible but what does it take for me to ask? Hey, "the fool didn't know it was impossible, so he did it." This question is env/tool/version agnostic. I target any ...

Variable of type enum is not a type name?

When running the following code, I recieve an error saying "shape" is not a type name. Can anyone help? #include <iostream> using namespace std; enum triangleType {scalene, isosceles, ...

i2cdetect -y 1 still reports device connected even though it's disconnected

So I'm connecting an Mbed (slave) to an I2C device (master), and when I run i2cdetect -y 1 on the master device regardless if the Mbed is plugged in or not I still see the slave device in the output ...

Flattening a complex combination of list and dataframe

From converting json, I get an object that looks something like this. It could possibly be any combination of lists or dataframes. There are 2 observations in this case. I'm looking for advice on ...

Creating templates in emacs

I need to create a weekly agenda that has the same outline. I currently have a Word template file that I use, but would like to convert it to emacs. I want the emacs "template" to pre-fill the ...

WSO2 APIMANAGER - How to get formdata from handleRequest method in customHandler

I using WSO2 APIMANAGER version 1.10.0. i made customHandler. The api specification is shown below. i want get file in handler and modify jsonConte parameter. how to get formdata from ...

submit form based on location on page load

I have a drop down menu that I am using as selector for the country to view our locations. The drop down is currently working but I want it to load users current country before they have to select ...

Json array adds an u character python

I'm loading an array from a bucket content in S3, but when I load the array and printed the string using the following code for obj_array in bucket_array.objects.all(): json_array = ...

Issues with javascript using html inputs as variables (Beginner!)

Hello Everyone! Im having some issues with a simple calculator type website. My issue involves using a javascript function to calculate an equation using variables from an HTML input form. Below is ...

Error when entering name on line 3

def newname(): info= {} info["fname"] = input("What is this contacts first name: ") info["lname"] = input("What is this contacts last name: ") info["address"] = input("What is this ...

Apache mod_rewrite to Nginx

Not sure how to change this to nginx mod_rewrite, tried http://winginx.com/en/htaccess but no success. Apache rewrite is : Options -MultiViews RewriteEngine On # Redirect ...
15 30 50 per page
Translating... 0%