I'm facing this error for multiple variables even treating missing values.
For example:
le = preprocessing.LabelEncoder()
categorical = list(df.select_dtypes(include=['object']).columns.values)
for c..
I am totally new to python and I am trying to implement quicksort in it.
Could someone please help me complete my code?
I do not know how to concatenate the three arrays and printing them.
def sort..
Is it possible to embed animated GIFs in PDFs? And how might I go about such a thing? are there any dangers I should be aware of?
For some more details on why I think it's a good thing and how it help..
What are the use cases when a particular sorting algorithm is preferred over others - merge sort vs QuickSort vs heapsort vs 'intro sort', etc?
Is there a recommended guide in using them based on the..
Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5.
I need he..
I have a sorted JavaScript array, and want to insert one more item into the array such the resulting array remains sorted. I could certainly implement a simple quicksort-style insertion function:
va..
When implementing Quicksort, one of the things you have to do is to choose a pivot. But when I look at pseudocode like the one below, it is not clear how I should choose the pivot. First element of li..
I'm looking for a decent sort implementation for arrays in VBA. A Quicksort would be preferred. Or any other sort algorithm other than bubble or merge would suffice.
Please note that this is to work ..
I would like to get the path to the execution directory of a Windows Forms application. (That is, the directory in which the executable is located.)
Does anyone know of a built-in method in .NET to d..
I want to run a script remotely. But the system doesn't recognize the path. It complains that "no such file or directory". Am I using it right?
ssh kev@server1 `./test/foo.sh`
..
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 want to iterate through the methods in a class, or handle class or instance objects differently based on the methods present. How do I get a list of class methods?
Also see:
How can I list the me..
Within li tags, I am placing a checkbox and label input.
If label text is larger than label, the text goes to the next line.
I wrapped the label text but it's not aligning the checkbox and label in ..
OK, so what I need is fairly straightforward.
I have set up a navbar with some dropdown menus in it (using class="dropdown-toggle" data-toggle="dropdown"), and it works fine.
The thing is it works "..
I downloaded dateutil which comes with a setup.py file but it throws an error when I try to open it. What's the proper way to install this module?
This is the error:
error: no commands supplied
..
I have a React component
export default class Archive extends React.Component {
...
}
componentDidMount and onClick methods partially use the same code, except for slight change in parameters.
..
I have a table called provider. I have three columns called person, place, thing. There can be duplicate persons, duplicate places, and duplicate things, but there can never be a dupicate person-place..
I have Hudson as continuous integration server and I want to use option 'Publish JUnit test result report'. But I don't use xUnit tools for testing, instead of that i have shell scripts which run test..
I am a web developer and usually use PHP, JavaScript or MySQL.
I have heard lot about Python. But I have no idea where it is used and why it is used.
Just like PHP, ASP, ColdFusion, .NET are used to..
I am getting a 'Type of expression is ambiguous without more context ' on this part of code from a project I am trying to upgrade to latest Swift version. I can't seem to figure it out. I tried differ..
Why does the following work fine?
String str;
while (condition) {
str = calculateStr();
.....
}
But this one is said to be dangerous/incorrect:
while (condition) {
String str = calcula..
I have query:
SELECT name
FROM (
SELECT name FROM
Hist_answer
WHERE id_city='34324' AND datetime >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH)
UNION ALL
SELECT name FROM
Hist_internet
WHERE id_cit..
I have a problem in VBA with a line throwing back an error.
What the macro is intended to do is find a particular cell then paste data into it.
The code is as following:
'To find Column of Custome..
I'm almost certain you cannot do this within the context of the case statement, and I haven't been able to find any documentation about it, but is it possible to do the following:
SELECT CASE WHEN te..
I am trying to load a simple iframe into one of my web pages but it is not displaying. I am getting this error in Chrome:
Refused to display 'https://cw.na1.hgncloud.com/crossmatch/index.do' in a fr..
I am working on Asp.net MVC 2 app with c# by using vs 2010.I am having below mentioned error when I run my app locally under debug mode.
Error message image is as below :
Error message text is as..
I have a ScrollView that surrounds my entire layout so that the entire screen is scrollable. The first element I have in this ScrollView is a HorizontalScrollView block that has features that can be ..
When I start a new ASP.NET project in Visual Studio, I can create an ASP.NET Web Application or I can create an ASP.NET Web Site.
What is the difference between ASP.NET Web Application and ASP.NET We..
I managed to do it with the next code but there must be an easier way.
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/j..
I have read other similar posts but I just don't understand what I've done wrong. I think my declaration of the vectors is correct. I even tried to declare without size but even that isn't working.Wha..
I am developing a tabbed application.
When I create a new view controller and link it to the tab bar controller, unlike the other two default view controllers, this one has no viewcontroller.swift fi..
I generate normal links like: <a href="/path/to/image"><img src="/path/to/image" /></a> in a web app.
When I click on the link, it displays the picture in a new page. If you want to..
I've read the similar posts on this topic, and can't for the life of me figure out how to do this properly.
I checked in about 1000 files that I don't want, and I'd rather not have to go through 1by1..
I have to include some images (company logo's etc) in email signatures. I've had all sorts of issues using the embedded images produced by the email system in question (they get sent as attachments ge..
PrinterLabel = Printer + PrinterNumber
If Floors = 1 And (PrinterLabel) > 127 Then
Wscript.Echo "Invalid Printer11 Selection "
Wscript.Quit
End If
If Floors = 2 And PrinterLabel >..
I've been having some trouble with react router (i'm using version^4.0.0).
this is my index.js
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.c..
When I am trying debug application on Android Studio gives this log output :
The APK file
/Users/MyApplicationName/app/build/outputs/apk/app-debug.apk does not
exist on disk.
I restarted An..
I want to create new divs as the page loads. These divs will appear as an ordered group which changes depending upon external data from a JSON file. I will need to do this with a for loop because ther..
Assuming I have 5 machines I want to run an elasticsearch cluster on, and they are all connected to a shared drive. I put a single copy of elasticsearch onto that shared drive so all three can see it...
I'm trying to make a program that consists of an array of 10 integers which all has a random value, so far so good.
However, now I need to sort them in order from lowest to highest value and then pri..
In jQuery you can get the top position relative to the parent as a number, but you can not get the css top value as a number if it was set in px.
Say I have the following:
#elem{
position:relative..
I am new to AngularJS, and I am a little confused of how I can use angular-"ui-router" in the following scenario:
I am building a web application which consists of two sections. The first section is ..
The following code compiles with gcc 4.5.1 but not with VS2010 SP1:
#include <iostream>
#include <vector>
#include <map>
#include <utility>
#include <set>
#include <a..
I am generating a key and need to store it in DB, so I convert it into a String, but to get back the key from the String. What are the possible ways of accomplishing this?
My code is,
SecretKey key ..
Is it possible to do this?
double variable;
variable = 5;
/* the below should return true, since 5 is an int.
if variable were to equal 5.7, then it would return false. */
if(variable == int) {
..
The following link is for sharing a page on Twitter:
http://twitter.com/share
Is there a similar option for Facebook that doesn't require JavaScript?
I know about http://facebook.com/sharer.php, bu..
I'd like for Jenkins to automagically fetch data from my private repository hosted on Github.
But I have no idea how to accomplish that task.. Tried the documentation, generating ssh-key for jenkins u..
I'm trying to do this:
h = [0.2,0.2,0.2,0.2,0.2]
Y = np.convolve(Y, h, "same")
Y looks like this:
While doing this I get this error:
ValueError: object too deep for desired array
Why is this..
I am learning how to create UI elements. I have created a few EditText input fields. On the click of a Button I want to capture the content typed into that input field.
<EditText android:id="@+id/..
I use this method:
def getRandomNumber(int num){
Random random = new Random()
return random.getRandomDigits(num)
}
when I call it I write println getRandomNumber(4)
but I have an error
No sig..
I've been trying to change what seems to be the default background color of my canvas from black to transparent / any other color - but no luck.
My HTML:
<canvas id="canvasColor">
My CSS:
&..
I'm trying to refresh the same page but it isn't working. This is my HTML code:
<html>
<head>
<title>HTML in 10 Simple Steps or Less</title>
<meta http-..
I am trying to install Visual Studio 6 on a Windows 7 32bit machine.
The OS intall was from bare metal.
I followed the instructions mentioned here (which I have used before)
The install went fine w..
I have a target array ["apple","banana","orange"], and I want to check if other arrays contain any one of the target array elements.
For example:
["apple","grape"] //returns true;
["apple","banan..
I have a program which sends text to an LED sign.
prismcom.exe
To use the program to send "Hello":
prismcom.exe usb Hello
Now, I wish to, for example use a command program called Temperature.
te..
I am newbie for DataTables. I want to add button on each row for edit and delete(like below image)
I have tried with code:
Test.cfm
<table id="myDataTable" class="table table-striped table-bo..
We currently have a major issue using Microsoft Access Database Engine 2010. The engine comes in 64-bit and 32-bit forms, which is good. However, apparently you need to always install the 32-bit versi..
Is it possible to use If Else conditional in a LINQ query?
Something like
from p in db.products
if p.price>0
select new
{
Owner=from q in db.Users
select q.Name
}
else
select new
{
O..
Sometimes when making conditionals, I need the code to do nothing, e.g., here, I want Bash to do nothing when $a is greater than "10", print "1" if $a is less than "5", otherwise, print "2":
if [ "$a..
I'm trying to work out if it's possible to use percentage positions/sizes when creating a layout. What I want is something like this...
^
|
|
| 68%
|
|
v
Gallery (height equivalent of 16% total scree..
Whatever I type after adb shell it fails with Permission denied:
D:\android-sdk-windows\platform-tools>adb shell find /data -name *.db
find: permission denied
D:\android-sdk-windows\platform-tools..
I need to change render function and run some sub render function when a specific state given,
For example:
render() {
return (
<View style={styles.container}>
if (..
What are the differences between YAML and JSON, specifically considering the following things?
Performance (encode/decode time)
Memory consumption
Expression clarity
Library availability, ease of use..
I'm new to Angular and trying to figure out how to do things...
Using AngularJS, how can I inject a controller to be used within another controller?
I have the following snippet:
var app = angular...
I want to do this dynamically in java. I know how to insert values in single dimensional array. I am bit confused in two dimensional array.
static final String shades[][] = {
// Shades of grey
..
I search for a good way to copy a file (binary or text). I've written several samples, everyone works. But I want hear the opinion of seasoned programmers.
I missing good examples and search a way wh..
I have a UIWebView in my app which I want to use to display an image which will link to another url.
I'm using
<img src="image.jpg" /> to load the image.
The problem is that the image doesn'..
I have this script which compares files in two areas of the disk and copies the latest file over the one with the older modified date.
$filestowatch=get-content C:\H\files-to-watch.txt
$adminFiles=..
I was reading a good book on JavaScript.
It started with:
Boolean type take only two literal values: true and false. These are distinct from numeric values, so true is not equal to 1, and false..
We're developing a Python web service and a client web site in parallel. When we make an HTTP request from the client to the service, one call consistently raises a socket.error in socket.py, in read..
I am having a hard time using the MySQLdb module to insert information into my database. I need to insert 6 variables into the table.
cursor.execute ("""
INSERT INTO Songs (SongName, SongArtis..
<button type="button" class="btn btn-primary" ng-click="openTab()">new tab</button>
openTab = function () {
$http.post('www.google.com');
}
What I want is post a require and open the ..
I am uploading a file to S3 using Java - this is what I got so far:
AmazonS3 s3 = new AmazonS3Client(new BasicAWSCredentials("XX","YY"));
List<Bucket> buckets = s3.listBuckets();
s3.putObject..
I want to import an SQL file (size > 500MB) into a database. I have wamp on my PC. Phpmyadmin does not work well with this size. I changed all parameters in php.ini (max_upload_size etc.). But it does..
Is there an Swift equivalent of NSLocalizedString(...)?
In Objective-C, we usually use:
NSString *string = NSLocalizedString(@"key", @"comment");
How can I achieve the same in Swift? I found a func..
I am trying to wrap my head around observables. I love the way observables solve development and readability issues. As I read, benefits are immense.
Observables on HTTP and collections seem to be s..
Sorry in advance, but I'm new to Python. I have a list of tuples, and I was wondering how I can reference, say, the first element of each tuple within the list. I would think it's something like
f..
I am currently trying to learn JSP. My question is, at present I used to include the header and footer of the page using:
<%@include file="includes/header.jsp" %>
and
<%@include file="in..
So I have a complex form for creating an entity and I want to use it for editing as well I am using new angular forms API. I structured the form exactly as the data I retrieve from the database so I w..
How do I find out the last month and its year in Java?
e.g. If today is Oct. 10 2012, the result should be Month = 9 and Year = 2012. If today is Jan. 10 2013, the result should be Month = 12 and Year..
I have a table with several records. There is an id field. I would like to select the record with the most recent id (i.e. the highest id).
Any ideas?..
I have an HTML string from a Ajax loaded source. I would like to get some attributes from an object (image) in this string, before I put the HTML into the document.
I've got something like:
$.ajax(..
I've been using Apache POI for some time to read existing Excel 2003 files programmatically. Now I have a new requirement to create entire .xls files in-memory (still using Apache POI) and then write ..
AM using MySQL 5.7.13 on my windows PC with WAMP Server
Here my Problem is While executing this query
SELECT *
FROM `tbl_customer_pod_uploads`
WHERE `load_id` = '78' AND
`status` = 'Active'
GR..
What am I missing?
This query is returning duplicate data over and over again. The count is correct for a complete total, but I am expecting one row, and yet I am getting the value repeated about 40..
Unable to create Android Virtual Device
i follwed this link.
I installed all ARM images for each Android more than 4.0.
I installed intel & MIPs as well.
But, still my AVD Manager is saying "NO..
I wrote the following code to work normalize an image using NORM_L1 in OpenCV. But the output image was just black.How to solve this ?
import cv2
import numpy as np
import Image
img = cv2.imread('im..
I've got the following two tables (in MySQL):
Phone_book
+----+------+--------------+
| id | name | phone_number |
+----+------+--------------+
| 1 | John | 111111111111 |
+----+------+--------------..
Instead of running an external program with its path hardcoded, I would like to get the current Project Dir. I'm calling an external program using a process in the custom task.
How would I do that? A..
I have a multi-threading Python program, and a utility function, writeLog(message), that writes out a timestamp followed by the message. Unfortunately, the resultant log file gives no indication of wh..
How do I reset a setInterval timer back to 0?
var myTimer = setInterval(function() {
console.log('idle');
}, 4000);
I tried clearInterval(myTimer) but that completely stops the interval. I want i..
I'm trying to connect to a service that requires a certificate for authorization. The process is that I send the service a CSR file. The service signs the CSR and sends me a certificate that I use for..
I would like my Bash script to print an error message if the required argument count is not met.
I tried the following code:
#!/bin/bash
echo Script name: $0
echo $# arguments
if [$# -ne 1];
t..
I am looking for a way to get a list of all resource names from a given classpath directory, something like a method List<String> getResourceNames (String directoryName).
For example, given a c..
I'm trying to use the jquery validate plugin to validate a form and submit the contents with an ajax request.
This code is in the head of my document.
$(document).ready(function() {
$('#contact..
I would like to override following CSS styling defined for all tables:
table {
font-size: 12px;
width: 100%;
min-width: 400px;
display:inline-table;
}
I have..
I am getting a C++ error with threading:
terminate called without an active exception
Aborted
Here is the code:
#include <queue>
#include <thread>
#include <mutex>
#include <c..
I am trying to feed my Django page with some resource I am getting from somewhere else.
Inside the feed, I have YouTube videos with URL like: https://www.youtube.com/watch?v=A6XUVjK9W4o
Once I adde..
I am trying to compile a small .c file that has the following includes:
#include <openssl/ssl.h>
#include <openssl/rsa.h>
#include <openssl/x509.h>
#include <openssl/evp.h>
..
How do I check if there isn't a class. For example, I know how to check to see if it has the class "test", but how do I check to see if it doesn't have the class "test"?
if($(this).hasClass("test")){..
So I've been getting some mysterious uninitialized values message from valgrind and it's been quite the mystery as of where the bad value originated from.
Seems that valgrind shows the place where th..
I am trying to include Boost libraries in my project and have been facing issues in the same. I am on Ubuntu 12.10 with Codeblocks IDE and tried installing the libraries manually reading instructions ..
I have XML documents that I need to parse and/or I need to build XML documents and write them to text (either files or memory). Since the C++ standard library does not have a library for this, what sh..
Here is my c# code
Employee objEmp = new Employee();
List<Employee> empList = new List<Employee>();
foreach (DataRow dr in ds.Tables[0].Rows)
{
empList.Add(new Employee { Name = Conve..
I did a lot of searching and also read the PHP $_SERVER docs. Do I have this right regarding which to use for my PHP scripts for simple link definitions used throughout my site?
$_SERVER['SERVER_NAME..
I'm trying to update my PHP (currently v:5.3.3 to the latest stable PHP build) but it's not playing ball and it's saying there is nothing to update.
Any help would be useful.
Keeps saying:
No Pa..
What is the best method for date of birth selector?
3 text inputs (month / day / year) or one mask input. User MUST use keyboard
3 select boxes. User can use keyboard or mouse.
One nice datepicker...
I have developed an application and installed it on a client computer. In my application I need to get its installation path. My application has a registry entry at:
HKEY_LOCAL_MACHINE\SOFTWARE\MyAp..
I'm trying out LINQ to entities.
I have a problem with the following:
I want it to do this:
SELECT
T_Benutzer.BE_User
,T_Benutzer_Benutzergruppen.BEBG_BE
FROM T_Benutzer
LEFT JOIN T_Benut..
Is it possible to install packages using pip from the local filesystem?
I have run python setup.py sdist for my package, which has created the appropriate tar.gz file. This file is stored on my syste..
Ok, what I have:
Visual Studio 2010 RC, W7 x64, started a new project type of Silverlight application. Hosting the Silverlight application in a ASP.NET Web Application Project. Silverlight Version 3..
Questions
What is the proper signature of the main function in C++?
What is the correct return type, and what does it mean to return a value from main?
What are the allowed parameter types, and wha..
I want to create a search function for my web app.
here are the looks on FF & IE, it is ok without strange border
Firefox
IE
and here are the look on Chrome & Safari, it has strange bo..
I have a text link. When the user hovers over the text link, I want an image to be displayed elsewhere on the page. I want to do this using css. I thought it could be done simply with a single line of..
I have managed to corrupt my npm install, and whenever I try to install packages using npm install, I receive error messages along these lines:
Unhandled rejection Error: EACCES: permission denied..
How do I create a readonly textbox in ASP.NET MVC3 with the Razor view engine?
Is there an HTMLHelper method available to do that?
Something like the following?
@Html.ReadOnlyTextBoxFor(m => m.u..
I am trying to check if a dictionary is empty but it doesn't behave properly. It just skips it and displays ONLINE without anything except of display the message. Any ideas why ?
def isEmpty(self, dic..
I am having trouble with my jquery script below, this is a basic stripped down version and even it will not work, I have the php file that the jquery script makes a call to, I have it set to encode a..
In class we are doing sorting algorithms and, although I understand them fine when talking about them and writing pseudocode, I am having problems writing actual code for them.
This is my attempt in ..
I have the following asp.net textbox control.
<asp:TextBox ID="txtAdd" runat="server" />
After the user writes something in this textbox and presses the ENTER key, I want to run some code fro..
I've spent a lot of time figuring out why my search is not working in my custom made template. So far I was able to figure out how to include searchform.php file in my header, created search.php file ..
When trying to understand a program, or in some corner-cases, it's useful to be able to actually find out what type something is. I know the debugger can show you some type information, and you can us..
So I have a webapplication where I select a value from a dropdownlist. When this value is selected, I want to load another page in a new window.
I tried this:
ScriptManager.RegisterStartupScript(Pag..
I have a web application which uses Bootstrap (2.3.2 - corporate policy, we cannot upgrade to 3.0 without lots of testing across several web applications). We have several long pages within this appli..
I have string like this
"hello
java
book"
I want remove \r and \n from String(hello\r\njava\r\nbook). I want the result to be "hellojavabook". How can I do this?..
Possible Duplicate:
c# - How do I round a decimal value to 2 decimal places (for output on a page)
I want to truncate the decimals like below
i.e.
2.22939393 -> 2.229
2.22977777 -> 2.229..
I have a simple gradle project in my eclipse. I update the build.gradle to include a few apache http jars...
dependencies {
compile group: 'commons-collections', name: 'commons-collections', vers..
How do I perform the SQL Join equivalent in MongoDB?
For example say you have two collections (users and comments) and I want to pull all the comments with pid=444 along with the user info for each. ..
I'm learning php and built an experimental form-based calculator (also using html & POST method) that returns values to a table. The calculator is functional when I enter my values and click submi..
I want to evaluate a string with a switch but when I read the string entered by the user throws me the following error.
#include<iostream>
using namespace std;
int main() {
string ..
I got an error about dbpath (/data/db/) does not exist, but /etc/mongodb.conf named it dbpath = /var/lib/mongodb.
So, which is the default dbpath for MongoDB?..
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..
I want to have a map with duplicate keys.
I know there are many map implementations (Eclipse shows me about 50), so I bet there must be one that allows this. I know it's easy to write your own map th..
Network analysis by Chrome when page loads
I would like to export this data to Microsoft Excel so that I will have a list of similar data when loaded at diffrent times. Loading a page one time do..
So I have a Windows Phone solution that has an ad in it. When my Solution References Microsoft.Advertising.SDK Advertising.Mobile Advertising.Mobile.UI Everything works fine and I get ads. Unfortu..
I'm looking to style a modal dialog (using UI Dialog) with unique CSS that is separate from the traditional dialog, so in essence to have two jQuery dialogs that each look different.
I've styled one,..
UPDATE
I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions.
UPDATE END
I h..
I was reading a Java article, but found no differences in the declaration and was confused over. Can anyone list me out this?
Added the Article
http://www.theparticle.com/javadata2.html..
I am looking to open one aspx page (test.aspx) in two different popup windows at the same time.
what I have till now second replace first one and page recreate in first.
I think it require more clar..
My .htaccess redirects all requests to /word_here to /page.php?name=word_here. The PHP script then checks if the requested page is in its array of pages.
If not, how can I simulate an error 404?
I tr..
I am looking for the simplest way to do a check. I have a variable that can be equal to "" or null. Is there just one function that can check if it's not "" or null?..
I have some nodes coming from a script that I want to map on to a graph. In the below, I want to use Arrow to go from A to D and probably have the edge colored too in (red or something).
This is basi..
I am following the Artifactory 1-min Setup. I have Artifactory up and running on my localhost, and now I am trying to integrate it with Intellij/Gradle.
The artifactory webapp gives a gradle.properti..
What is the difference between # and . when declaring a set of styles for an element and what are the semantics that come into play when deciding which one to use?..
I have a view which is selecting rows from a table in a different database. I'd like to grant select access to the view, but not direct access to the base table. The view has a where clause restrict..
How can I programatically get the path to MSBuild from a machine where my .exe is running?
I can get the .NET version from the Environment but is there a way of getting the correct folder for a .NET ..
I'm running MySQL version 8 on PHP 7.0.
I'm getting the following error when I try to connect to my database from PHP:
Connect Error: SQLSTATE[HY000] [2054] The server requested authentication me..
I can select the first customer node and change its company name with the code below.
But how do I select customer node where ID=2?
XDocument xmldoc = new XDocument(
new XDeclaration("1...
Currently, I have put this in the body tag to disable text selections:
body {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
However, my inpu..
I know that this Question is repeated but I can't find the answer in Internet.
I want to call a method from another class.
I've Class1 and Class2.
In Class 2 I've that method:
public void UpdateEm..
How to create a list of unique/distinct objects (no duplicates) in Java?
Right now I am using HashMap<String, Integer> to do this as the key is overwritten and hence at the end we can get Hash..
I added over 9000 photos by accident to my project folder. And committed them. Then deleted them from disk. Committed.
Now I try to push changes to git server. But it takes too long and tries to se..
Is there a way to hide the browse button and only leave the text box that works in all browsers?
I have tried setting the margins but they show up different in each browser..
I have a vector for example
a = [0 1 0 3]
I want to turn a into b which equals b = [1 3].
How do I perform this in general? So I have a vector with some zero components and I want to remove the ze..
I have the following TextView defined:
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="@string/txtCredits"
android:autoLink="web" android:..
I'm trying to wrap my head around Views, Listeners etc. I have an Activity with 2 Buttons: buttonplay and buttonstop. My problem is I can't wrap my head around the Views and Listeners completely eno..
I would like list dates between two date in a SQL Server stored procedure.
For example:
Date1: 2015-05-28
Date2: 2015-05-31
Results :
2015-05-29
2015-05-30
How to calculate all dates between t..
I have an array with 301 values, which were gathered from a movie clip with 301 frames. This means 1 value from 1 frame. The movie clip is running at 30 fps, so is in fact 10 sec long
Now I would lik..
Why can't do you this if you try to find out whether an int is between to numbers:
if(10 < x < 20)
Instead of it, you'll have to do
if(10<x && x<20)
which seems like a bit of..
I wrote this SQL in a stored procedure but not working,
declare @tableName varchar(max) = 'TblTest'
declare @col1Name varchar(max) = 'VALUE1'
declare @col2Name varchar(max) = 'VALUE2'
declare @value1..
I want to read a file line by line in PowerShell. Specifically, I want to loop through the file, store each line in a variable in the loop, and do some processing on the line.
I know the Bash equival..
I just ran the following command:
pip install -U steem
and the installation worked well until it failed to install pycrypto.
Afterwards I did the
pip install cryptography
command because I thought i..
I've been updating some of my old code and answers with Swift 3 but when I got to Swift Strings and Indexing it has been a pain to understand things.
Specifically I was trying the following:
let st..
I created a 4D scatter plot graph to represent different temperatures in a specific area. When I create the legend, the legend shows the correct symbol and color but adds a line through it. The code I..
I have't coded in c++ for some time and I got stuck when I tried to compile this simple snippet:
class A
{
public:
void f() {}
};
int main()
{
{
A a;
a.f(); // works fine
}
{
..
In our project we are writting a test to check if the controller returns the right modelview
@Test
public void controllerReturnsModelToOverzichtpage()
{
ModelAndView modelView = new M..
I'm developing an Android app with the Android Developer Tool.
Now I tried the new Android Studio, everything works fine if connect my smartphone with the PC and directly run the program in the Androi..
Is there a (roughly) SQL or XQuery-like language for querying JSON?
I'm thinking of very small datasets that map nicely to JSON where it would be nice to easily answer queries such as "what are all t..
I'm using jquery and moment.js for a custom calendar.
I have a date object in a variable myDate like :
Object { date="2014-12-23 14:00:00", timezone_type=3, timezone="Europe/Paris"}
I want, usin..
Here's the link of my data.
My target is to assign "NA" to all blank cells irrespective of categorical or numerical values. I am using na.strings="". But it's not assigning NA to all blank cells.
#..
I'm using factorplot(kind="bar") with seaborn.
The plot is fine except the legend is misplaced: too much to the right, text goes out of the plot's shaded area.
How do I make seaborn place the legend..
I have a time.Time value obtained from time.Now() and I want to get another time which is exactly 1 month ago.
I know subtracting is possible with time.Sub() (which wants another time.Time), but tha..
Rails defines a bunch of magic with named routes that make helpers for your routes. Sometimes, especially with nested routes, it can get a little confusing to keep track of what URL you'll get for a g..
I'm having a bit of trouble getting a Python regex to work when matching against text that spans multiple lines. The example text is ('\n' is a newline)
some Varying TEXT\n
\n
DSJFKDAFJKDAFJDSAKFJADS..
I'm trying to create a soap connection to Magento's web services, however I'm getting an error when I try and create an instance of the soap client class. I can view the wsdl file in firefox without ..
I've looked everywhere and i can't find a real precise answer or a tutorial on how, if it is possible, to do this.
is it possible to pull in any way a database of an Android device without having to ..
I'm new to pandas and trying to figure out how to add multiple columns to pandas simultaneously. Any help here is appreciated. Ideally I would like to do this in one step rather than multiple repeat..
How do I find how many rows and columns are in a 2d array?
For example,
Input = ([[1, 2], [3, 4], [5, 6]])`
should be displayed as 3 rows and 2 columns...
I am trying to use functional programming to create a dictionary containing a key and a function to execute:
myDict={}
myItems=("P1","P2","P3",...."Pn")
def myMain(key):
def ExecP1():
p..