Questions Tagged with #Smartsvn

SmartSVN is a commercial cross-platform graphical Subversion client developed by WANdisco.

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

I been strugling with this for 2 days now without comming any closer to solution. I have read 20-30 threads alteast and stil can not resolve this. Please help me out. I have disable anonymous authen..

Adding an identity to an existing column

I need to change the primary key of a table to an identity column, and there's already a number of rows in table. I've got a script to clean up the IDs to ensure they're sequential starting at 1, wo..

'Conda' is not recognized as internal or external command

I installed Anaconda3 4.4.0 (32 bit) on my Windows 7 Professional machine and imported NumPy and Pandas on Jupyter notebook so I assume Python was installed correctly. But when I type conda list and c..

Using reCAPTCHA on localhost

I'm developing a website using PHP and I want to make a human verification in one of the sessions. For the development, I'm initially running the system locally and when it is ready, I'm gonna make pu..

How can I set a DateTimePicker control to a specific date?

How can I set a DateTimePicker control to a specific date (yesterday's date) in C# .NET 2.0?..

Object cannot be cast from DBNull to other types

Object cannot be cast from DBNull to other types. I have a following function which throws the above error. I am handling all nulls in store procedure and in the C# code. So where is it getting this..

How to position a Bootstrap popover?

I'm trying to position a Bootstrap popover for a trigger that sits on the far top-right corner of a 960px wide web page. Ideally, I'd position it on the bottom and move the arrow with CSS (so the arr..

Setting table row height

I have this code: <table class="topics" > <tr> <td style="white-space: nowrap; padding: 0 5px 0 0; color:#3A5572; font-weight: bold;">Test</td> <td sty..

Removing an item from a select box

How do I remove items from, or add items to, a select box? I'm running jQuery, should that make the task easier. Below is an example select box. <select name="selectBox" id="selectBox"> <..

Map.Entry: How to use it?

I'm working on creating a calculator. I put my buttons in a HashMap collection and when I want to add them to my class, which extends JPanel, I don't know how can I get the buttons from my collection...

How do I detect if a user is already logged in Firebase?

I'm using the firebase node api in my javascript files for Google login. firebase.initializeApp(config); let provider = new firebase.auth.GoogleAuthProvider(); firebase.auth().signInWithPopup(provid..

C++ - unable to start correctly (0xc0150002)

I'm trying to run an OpenCV application through Microsoft Visual C++ 2010 Express, and get the following message: How can I solve this issue?..

How to check if a key exists in Json Object and get its value

Let say this is my JSON Object { "LabelData": { "slogan": "AWAKEN YOUR SENSES", "jobsearch": "JOB SEARCH", "contact": "CONTACT", "video": "ENCHANTING BEACHSCAPES", "createprofil..

Android Studio Stuck at Gradle Download on create new project

I have installed the new Android Studio. Everything was working fine but when I try to create a new project it gets stuck at downloading Gradle. Is there any way to install the Gradle required by And..

SQL Server - In clause with a declared variable

Let say I got the following : DECLARE @ExcludedList VARCHAR(MAX) SET @ExcludedList = 3 + ', ' + 4 + ' ,' + '22' SELECT * FROM A WHERE Id NOT IN (@ExcludedList) Error : Conversion failed when conv..

SSL certificate is not trusted - on mobile only

My site is working great over SSL in my desktops (chrome) I have a green lock near the address bar saying "Identity verified" But using a mobile mobile browser (Chrome/Safari)I see the following mess..

rand() between 0 and 1

So the following code makes 0 < r < 1 r = ((double) rand() / (RAND_MAX)) Why does having r = ((double) rand() / (RAND_MAX + 1)) make -1 < r < 0? Shouldn't adding one to RAND_MAX make..

powershell - list local users and their groups

I'd like to have a report with all the local users and their relative groups (users, power users, administrators and so on. I get the users in this way: $adsi = [ADSI]"WinNT://." $adsi.psbase.childr..

Check if property has attribute

Given a property in a class, with attributes - what is the fastest way to determine if it contains a given attribute? For example: [IsNotNullable] [IsPK] [IsIdentity] [SequenceNameAtt..

Eventviewer eventid for lock and unlock

What is the event id in Event Viewer for lock, unlock for a computer in Windows XP, Windows 7, Windows Vista and Windows Server 2008?..

Passing parameters to a JDBC PreparedStatement

I'm trying to make my validation class for my program. I already establish the connection to the MySQL database and I already inserted rows into the table. The table consists of firstName, lastName an..

Java: Get last element after split

I am using the String split method and I want to have the last element. The size of the Array can change. Example: String one = "Düsseldorf - Zentrum - Günnewig Uebachs" String two = "Düsseldorf ..

List directory in Go

I've been trying to figure out how to simply list the files and folders in a single directory in Go. I've found filepath.Walk, but it goes into sub-directories automatically, which I don't want. All..

Django Admin - change header 'Django administration' text

How does one change the 'Django administration' text in the django admin header? It doesn't seem to be covered in the "Customizing the admin" documentation...

SSL certificate rejected trying to access GitHub over HTTPS behind firewall

I'm stuck behind a firewall so have to use HTTPS to access my GitHub repository. I'm using cygwin 1.7.7 on Windows XP. I've tried setting the remote to https://[email protected]/username/ExcelANT.g..

Access files stored on Amazon S3 through web browser

Current Situation I have a project on Github that builds after every commit on Travis-CI. After each successful build Travis uploads the artifacts to an S3 bucket. Is there some way for me to easily ..

How can I check what version/edition of Visual Studio is installed programmatically?

I could read registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0. However, it doesn't give me any information about the edition of it - Professional/Ultimate or whatever. How can I get ..

Batch Files - Error Handling

I'm currently writing my first batch file for deploying an solution. I've been Googling a bit for a general error handling approach and can't find anything really useful. Basically if any thi..

How to check if a URL exists or returns 404 with Java?

String urlString = ""; URL url = new URL(urlString); if(/* Url does not return 404 */) { System.out.println("exists"); } else { S..

How to convert a Java String to an ASCII byte array?

How to convert a Java String to an ASCII byte array?..

Content Security Policy: The page's settings blocked the loading of a resource

I am using CAPTCHA on page load, but it is blocking because of some security reason. I am facing this problem: Content Security Policy: The page's settings blocked the loading of a resource a..

Cross-platform way of getting temp directory in Python

Is there a cross-platform way of getting the path to the temp directory in Python 2.6? For example, under Linux that would be /tmp, while under XP C:\Documents and settings\[user]\Application setti..

Clicking HTML 5 Video element to play, pause video, breaks play button

I'm trying to get the video to be able to play and pause like it does YouTube (Using both the play and pause button, and clicking the video itself.) <video width="600" height="409" id="videoPlayer..

.Contains() on a list of custom class objects

I'm trying to use the .Contains() function on a list of custom objects This is the list: List<CartProduct> CartProducts = new List<CartProduct>(); And the CartProduct: public class Ca..

How does += (plus equal) work?

I'm a bit confused with the += sign. How does it work? 1 += 2 // equals ? and this var data = [1,2,3,4,5]; var sum = 0; data.forEach(function(value) { sum += value; }); sum = ? ..

Formatting a number with exactly two decimals in JavaScript

I have this line of code which rounds my numbers to two decimal places. But I get numbers like this: 10.8, 2.4, etc. These are not my idea of two decimal places so how I can improve the following? Ma..

How to convert an NSString into an NSNumber

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

Right pad a string with variable number of spaces

I have a customer table that I want to use to populate a parameter box in SSRS 2008. The cust_num is the value and the concatenation of the cust_name and cust_addr will be the label. The required fiel..

Paste Excel range in Outlook

I want to paste a range of cells in Outlook. Here is my code: Sub Mail_Selection_Range_Outlook_Body() Dim rng As Range Dim OutApp As Object Dim OutMail As Object Set rng = Nothing On Error Resume..

Serializing and submitting a form with jQuery and PHP

I'm trying to send a form's data using jQuery. However, data does not reach the server. Can you please tell me what I'm doing wrong? My HTML form: <form id="contactForm" name="contactForm" method..

Test if object implements interface

This has probably been asked before, but a quick search only brought up the same question asked for C#. See here. What I basically want to do is to check wether a given object implements a given inte..

Can Linux apps be run in Android?

Android is based on Linux; can native Linux applications be run on Android?..

How do I install jmeter on a Mac?

We want to use JMeter. I've downloaded the production version as directed in the user manual at But how do I get started and install the software..

How to enable/disable bluetooth programmatically in android

I want to enable/disable bluetooth through the program. I have the following code. BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); if (!mBluetoothAdapter.isEnabled()) {..

ShowAllData method of Worksheet class failed

I notice my VBA script doesn't work when there's an autofilter already on. Any idea why this is? wbk.Activate Set Criteria = Sheets("Sheet1").Cells(i, 1) Set rng = Sheets("Sheet1").Range..

How to call getClass() from a static method in Java?

I have a class that must have some static methods. Inside these static methods I need to call the method getClass() to make the following call: public static void startMusic() { URL songPath = getC..

(grep) Regex to match non-ASCII characters?

On Linux, I have a directory with lots of files. Some of them have non-ASCII characters, but they are all valid UTF-8. One program has a bug that prevents it working with non-ASCII filenames, and I ha..

How to increase Java heap space for a tomcat app

There are lots of questions that ask this or a similar question. They all give the command that has to be executed, what I don't understand is where do I write this command. I want to permanently inc..

How to compile C program on command line using MinGW?

What command does one have to enter at the command line in Windows 7 to compile a basic C program? Like I am literally wondering what you type in the command prompt, to compile a .c file. I tried: ..

What is sr-only in Bootstrap 3?

What is the class sr-only used for? Is it important or can I remove it? Works fine without. Here's my example: <div class="btn-group"> <button type="button" class="btn btn-info btn-md"&..

What's the best way of scraping data from a website?

I need to extract contents from a website, but the application doesn’t provide any application programming interface or another mechanism to access that data programmatically. I found a useful thir..

How can I create an object and add attributes to it?

I want to create a dynamic object (inside another object) in Python and then add attributes to it. I tried: obj = someobject obj.a = object() setattr(obj.a, 'somefield', 'somevalue') but this didn..

Reference an Element in a List of Tuples

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

Can a website detect when you are using Selenium with chromedriver?

I've been testing out Selenium with Chromedriver and I noticed that some pages can detect that you're using Selenium even though there's no automation at all. Even when I'm just browsing manually just..

Merge two Excel tables Based on matching data in Columns

I've been working on a excel problem, that I need to find an answer for I'll explain it below. I've Table01 with the Columns : Group No Name Price I've Table02 with the columns: Group No City C..

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Nuwanst\package.json'

I just want to install to my project which is located on folder. But when I run following command it shows following Warnings.And its not created a node_modules directory inside my pr..

How to get value by class name in JavaScript or jquery?

i wan to retrive all the value of this code using class name it possible in jquery . i want to retrive only the text within a div or number of div may be change the next form <span class="..

How (and why) to use display: table-cell (CSS)

I have a site with a very active background (I'm talking 6 or so different z-indexes here 2 with animations). I wanted a in the foreground that had content but wanted a "window" through to the backgr..

Display loading image while post with ajax

I know there are thousands of examples on the internet, but I want for the script I already have to display a loading gif image while the data is retrievedd. My java knowledge are poor, therefore I'm ..

How can I check a C# variable is an empty string "" or null?

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

jQuery change input text value

I can't find the right selector for: <input maxlength="6" size="6" id="colorpickerField1" name="sitebg" value="#EEEEEE" type="text"> I want to change the value to = 000000. I need the selecto..

Why doesn't adding CORS headers to an OPTIONS route allow browsers to access my API?

I am trying to support CORS in my Node.js application that uses the Express.js web framework. I have read a Google group discussion about how to handle this, and read a few articles about how CORS wor..

Fetching distinct values on a column using Spark DataFrame

Using Spark 1.6.1 version I need to fetch distinct values on a column and then perform some specific transformation on top of it. The column contains more than 50 million records and can grow larger. ..

Margin on child element moves parent element

I have a div (parent) that contains another div (child). Parent is the first element in body with no particular CSS style. When I set .child { margin-top: 10px; } The end result is that top of ..

Does `anaconda` create a separate PYTHONPATH variable for each new environment?

I am starting to work with the Python Anaconda distribution from to do scipy work. I have been able to get Anaconda up and running, but I cannot tell whether Anaconda creates a new PYTHON..

Open a link in browser with java button?

How can I open a link in default browser with a button click, along the lines of button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { open("

Download File Using Javascript/jQuery

I have a very similar requirement specified here. I need to have the user's browser start a download manually when $('a#someID').click(); But I cannot use the window.href method, since it replaces t..

MVC 5 Access Claims Identity User Data

I am developing an MVC 5 web application using Entity Framework 5 Database First approach. I am using OWIN for the authentication of Users. Below shows my Login method within my Account Controller. p..

Change application's starting activity

I have created the meat and guts of my application but I want to add a different activity that will be the starting point (sort of a log-in screen). Couple questions: 1 I have a fairly decent handl..

getResourceAsStream returns null

I'm loading a text file from within a package in a compiled JAR of my Java project. The relevant directory structure is as follows: /src/initialization/Lifepaths.txt My code loads a file by calling..

How can I get the current screen orientation?

I just want to set some flags when my orientation is in landscape so that when the activity is recreated in onCreate() i can toggle between what to load in portrait vs. landscape. I already have a lay..

Firebase (FCM) how to get token

It's my first time using FCM. I download a sample from firebase/quickstart-android and I install the FCM Quickstart. But I can't get any token from the log even hit the LOG TOKEN button in the app. Th..

error C2039: 'string' : is not a member of 'std', header file problem

I am having problems with a class I am writing. I have split the class into a .h file that defines the class and an .cpp file that implements the class. I receive this error in Visual Studio 2010 Exp..

How to add a new row to an empty numpy array

Using standard Python arrays, I can do the following: arr = [] arr.append([1,2,3]) arr.append([4,5,6]) # arr is now [[1,2,3],[4,5,6]] However, I cannot do the same thing in numpy. For example: arr..

Limit Get-ChildItem recursion depth

I can get all sub-items recursively using this command: Get-ChildItem -recurse But is there a way to limit the depth? If I only want to recurse one or two levels down for example?..

Replace new line/return with space using regex

Pretty basic question for someone who knows. Instead of getting from "This is my text. And here is a new line" To: "This is my text. And here is a new line" I get: "This is my text.And her..

How to use multiple LEFT JOINs in SQL?

Is it possible to use multiple left joins in sql query? LEFT JOIN ab ON ab.sht = cd.sht i want to add to attach one more query like this to it? will it work? LEFT JOIN..

Should I use SVN or Git?

I am starting a new distributed project. Should I use SVN or Git, and why?..

Opacity of div's background without affecting contained element in IE 8?

I want to set Opacity of div's background without affecting contained element in IE 8. have a any solution and don't answer to set 1 X 1 .png image and set opacity of that image because I am using dyn..

How can I rename a project folder from within Visual Studio?

My current solution for renaming the project folder is: Remove the project from the solution. Rename the folder outside Visual Studio. Re-add the project to the solution. Is there a better way?..

What Scala web-frameworks are available?

I've just started learning Scala, and the first thing I'm going to implement is a tiny web application. I've been using Erlang for the last year to implement server-side software, but I've never wrote..

XAMPP - Port 80 in use by "Unable to open process" with PID 4! 12

I have been trying to figure out how to fix this problem for two days. I'm new to this kind of thing so I would appreciate it if someone could tell me how to fix it. I've tried deleting skype but tha..

Nginx 403 error: directory index of [folder] is forbidden

I have 3 domain names and am trying to host all 3 sites on one server (a Digital Ocean droplet) using Nginx. Only 1 of them works. The other two result in 403..

React-router v4 this.props.history.push(...) not working

I'm trying to route programatically using this.props.history.push(..) but it doesn't seem to work. Here's the router: import { BrowserRouter as Router, Route } from 'react-router-dom'; <Route..

How to pass parameters to a partial view in ASP.NET MVC?

Suppose that I have this partial view: Your name is <strong>@firstName @lastName</strong> which is accessible through a child only action like: [ChildActionOnly] public ActionResult Fu..

Edit line thickness of CSS 'underline' attribute

Since you can underline any text in CSS like so: h4 { text-decoration: underline; } How can you also then edit the 'line' that is drawn, the color you get on the line is easily specified as color..

SQL Server Service not available in service list after installation of SQL Server Management Studio

I have Windows 7 Home edition SP1 installed on my system, and downloaded SQL Server 2008 R2 Management Studio and got it installed. But when I try to connect via .\SQLEXPRESS, SSMS shows error A netw..

memory error in python

Traceback (most recent call last): File "/run-1341144766-1067082874/", line 27, in main() File "/run-1341144766-1067082874/", line 11, in main if len(s[i:j+1]) > 0: MemoryErr..

How to allow Cross domain request in apache2

This is my configuration file. <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName localhost:80 DocumentRoot /var/www/XXX <Directory /> Options None ..

How to use curl to get a GET request exactly same as using Chrome?

I have a web api and I want to use GET to get the response body. This is my command: curl "" Of course, it fails and gives an error message. When ..

Highlight the difference between two strings in PHP

What is the easiest way to highlight the difference between two strings in PHP? I'm thinking along the lines of the Stack Overflow edit history page, where new text is in green and removed text is in..

Split Div Into 2 Columns Using CSS

I have been attempting to split a div into two columns using CSS, but I have not managed to get it working yet. My basic structure is as follows: <div id="content"> <div id="left"> ..

Single line if statement with 2 actions

I'd like to do a single line if statement with more than 1 action. Default is this: (if) ? then : else userType = (user.Type == 0) ? "Admin" : "User"; But I don't need an "else" only, I need an "..

Get list from pandas DataFrame column headers

I want to get a list of the column headers from a pandas DataFrame. The DataFrame will come from user input so I won't know how many columns there will be or what they will be called. For example, if..

PostgreSQL: how to convert from Unix epoch to date?

The statement gives me the date and time. How could I modify the statement so that it returns only the date (and not the time)? SELECT to_timestamp( TRUNC( CAST( epoch_ms AS bigint ) / 1000 ) ); ..

How To Change DataType of a DataColumn in a DataTable?

I have: DataTable Table = new DataTable; SqlConnection = new System.Data.SqlClient.SqlConnection("Data Source=" + ServerName + ";Initial Catalog=" + DatabaseName + ";Integrated Security=SSPI; Connect..

How to post object and List using postman

I am using postman packaged app to send a post request. I want to request the following controller. How to send a post requestbody using postman object(with values) and a list using the raw format? ..

How to make space between LinearLayout children?

I am programatically adding custom views to a vertical LinearLayout, and I would like there to be some space between the views. I have tried adding: setPadding(0, 1, 0, 1) to my CustomView constructo..

how to log in to mysql and query the database from linux terminal

I am using debian linux. I have a linux machine on which mysql is install. I can log in to my linux machine using root user as well as other user. I can connect to mysql database on linux machine from..

R: numeric 'envir' arg not of length one in predict()

I'm trying to predict a value in R using the predict() function, by passing along variables into the model. I am getting the following error: Error in eval(predvars, data, env) : numeric 'envir..

How to send a stacktrace to log4j?

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

EditText underline below text property

I would like to change the blue colour below the edit text, i don't know what property it is. I tried using a different background colour for it but it didn't work. I've attached an image below: ..

List(of String) or Array or ArrayList

Hopefully a simple question to most programmers with some experience. What is the datatype that lets me do this? Dim lstOfStrings as *IDK* Dim String0 As String = "some value" Dim String1 As Strin..

EXEC sp_executesql with multiple parameters

How to pass the parameters to the EXEC sp_executesql statement correctly? This is what I have now, but i'm getting errors: alter PROCEDURE [dbo].[usp_getReceivedCases] -- Add the parameters for..

What's the difference between IFrame and Frame?

Looking at options for embedding the 3D Secure page inside my own order form, I came across the following: "Some commerce sites will devote the full browser page to the authentication rather than usi..

How can I hide select options with JavaScript? (Cross browser)

This should work: $('option').hide(); // hide options It works in Firefox, but not Chrome (and probably not in IE, not tested). A more interesting example: <select> <option class="hi..

how to make a new line in a jupyter markdown cell

md $S$: a set of shops $I$: a set of items M wants to get I'd like to make a new line between this two sentences. We usually put " (space)" after the first sentence before a new line, but it doesn't..

Remove not alphanumeric characters from string

I want to convert the following string to the provided output. Input: "\\test\red\bob\fred\new" Output: "testredbobfrednew" I've not found any solution that will handle special characters like \r..

ConcurrentHashMap vs Synchronized HashMap

What is the difference between using the wrapper class, SynchronizedMap, on a HashMap and ConcurrentHashMap? Is it just being able to modify the HashMap while iterating it (ConcurrentHashMap)?..

Setting up a websocket on Apache?

So I'm doing some research on websockets, and I have a few questions I can't seem to find a definitive answer for: How can I set up a web socket on my Linux server? Is there an Apache module? Would ..

Now() function with time trim

So the function =Now() there a way I can use this and only get the date, not the time? or is there just a function for this idea?..

Fill DataTable from SQL Server database

This one is a mystery for me, I know the code I took it from others, in my case the datatable it returns is empty conSTR is the connection string, set as a global string public DataTable fillDataTab..

ResultSet exception - before start of result set

I'm having trouble getting data from a ResultSet object. Here is my code: String sql = "SELECT type FROM node WHERE nid = ?"; PreparedStatement prep = conn.prepareStatement(sql); int meet..

How to insert new row to database with AUTO_INCREMENT column without specifying column names?

I have a table with the following columns: id - INT UNSIGNED AUTO_INCREMENT name - VARCHAR(20) group - VARCHAR(20) I know that I can add a row like this: INSERT INTO table_name (name, group) VALU..

How to know if an object has an attribute in Python

Is there a way in Python to determine if an object has some attribute? For example: >>> a = SomeClass() >>> a.someProperty = value >>> Traceback (most recent ca..

CSS /JS to prevent dragging of ghost image?

Is there a way to prevent the user from seeing a ghost of the image they are trying to drag (not concern about security of the images, but the experience). I've tried this which fixes the problem wit..

Convert list to array in Java

How can I convert a List to an Array in Java? Check the code below: ArrayList<Tienda> tiendas; List<Tienda> tiendasList; tiendas = new ArrayList<Tienda>(); Resources res = this.g..

Bootstrap 4 img-circle class not working

I'm writing a website in HTML5 and Bootstrap 4 and I'm trying to turn a square image into a circle. In Bootstrap 3 this was easily do-able with .img-circle, but now I can't seem to get it to work and ..

What does '?' do in C++?

int qempty() { return (f == r ? 1 : 0); } In the above snippet, what does "?" mean? What can we replace it with?..

How get permission for camera in android.(Specifically Marshmallow)

Hey I am designing an app in android studio. In which i require permission of camera. I have included <uses-permission android:name="android.permission.CAMERA" /> in the the AndroidManifest.x..

Javascript Error Null is not an Object

Im getting a error in the Web Inspector as shown below: TypeError: 'null' is not an object (evaluating 'myButton.onclick = function() { var userName = myTextfield.value; greetUser(userName); return ..

Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v

Here's the console output: sergio@sergio-VirtualBox:~$ rvm list rvm rubies ruby-1.9.3 [ i386 ] sergio@sergio-VirtualBox:~$ rvm use 1.9.3 Using /usr/share/ruby-rvm/gems/ruby-1.9.3 sergio@sergio..

The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32'

I am building My first MVC application, I have a table in database containing 3 columns: Id ? primary key Username password When I am clicking on edit link edit a record, its throwing following ex..

how to run vibrate continuously in iphone?

In my application I'm using following coding pattern to vibrate my iPhone device Include: AudioToolbox framework Header File: #import "AudioToolbox/AudioServices.h" Code: AudioServicesPlaySystem..

sorting a List of Map<String, String>

I have a list variable created like this: List<Map<String, String>> list = new ArrayList<Map<String, String>>(); In my Android application, this list gets populated. just a..

Build Maven Project Without Running Unit Tests

How do you build a Maven project without running unit tests? Currently restructuring some code I have for a Servlet and would like to try it out in my web browser (which means running mvn install to ..

Sharing url link does not show thumbnail image on facebook

I have some example url that provide for facebook sharing. But the image inside the url page does not show on facebook comment box. I have already inserted Meta tag like this <meta property="fb:ap..

Reading rows from a CSV file in Python

I have a CSV file, here is a sample of what it looks like: Year: Dec: Jan: 1 50 60 2 25 50 3 30 30 4 40 20 5 10 10 I know how to read the file in and print each ..

How to insert an object in an ArrayList at a specific position

Suppose I have an ArrayList of objects of size n. Now I want to insert an another object at specific position, let's say at index position k (is greater than 0 and less than n) and I want other object..

React.js: Set innerHTML vs dangerouslySetInnerHTML

Is there any "behind the scenes" difference from setting an element's innerHTML vs setting the dangerouslySetInnerHTML property on an element? Assume I'm properly sanitizing things for the sake of sim..

jQuery Validation plugin: disable validation for specified submit buttons

I have a form with multiple fields that I'm validating (some with methods added for custom validation) with Jörn Zaeffere's excellent jQuery Validation plugin. How do you circumvent validation with s..

What is the hamburger menu icon called and the three vertical dots icon called?

Google and some other developers have introduced us to what some have called the hamburger menu button and now the 3 vertical dots button or vertical ellipsis. What is the official name of these butt..

Angular 2 Date Input not binding to date value

trying to get a form set up but for some reason, the Date input in my html is not binding to the object's date value, despite using [(ngModel)] html: <input type='date' #myDate [(ngModel)]='demoU..

Scroll to the top of the page using JavaScript?

How do I scroll to the top of the page using JavaScript? The scrollbar instantly jumping to the top of the page is desirable too as I'm not looking to achieve smooth scrolling...

How do I compare two string variables in an 'if' statement in Bash?

I'm trying to get an if statement to work in Bash (using Ubuntu): #!/bin/bash s1="hi" s2="hi" if ["$s1" == "$s2"] then echo match fi I've tried various forms of the if statement, using [["$s1" ..

Graph implementation C++

I was wondering about a quick to write implementation of a graph in c++. I need the data structure to be easy to manipulate and use graph algorithms(such as BFS,DFS, Kruskal, Dijkstra...). I need this..

How do I send an HTML email?

I have successfully sent email in my web application using JMS, but the result only displays in plain text. I want the content to be able to display html. How do I do it? Here is roughly what I have: ..

Matching a Forward Slash with a regex

I don't have much experience with JavaScript but i'm trying to create a tag system which, instead of using @ or #, would use /. var start = /#/ig; // @ Match var word = /#(\w+)/ig; //@abc Match Ho..

JS - window.history - Delete a state

Using the html5 window.history API, I can control the navigation pretty well on my web app. The app currently has two states: selectDate(1) and enterDetails(2). When the app loads, I replaceState an..

jQuery Datepicker close datepicker after selected date

HTML: <div class="container"> <div class="hero-unit"> <input type="text" placeholder="click to show datepicker" id="example1"> </div> </div> jQuery: <scrip..

Adding options to select with javascript

I want this javascript to create options from 12 to 100 in a select with id="mainSelect", because I do not want to create all of the option tags manually. Can you give me some pointers? Thanks functi..

How to create the pom.xml for a Java project with Eclipse

I already have a small Java project. I want to move it to Maven, so I want to create the pom.xml using Eclipse so that I can build it using pom from a command prompt. I have not worked with Maven befo..

Is there a Google Keep API?

Is there a API for Google Keep? I want to make a windows 8 app for Google Keep, so that it synchronizes with your phone. I looked into the Drive SDK because Google Keep is a extension of Google Driv..

How can I get the size of an std::vector as an int?

I tried: #include <vector> int main () { std::vector<int> v; int size = v.size; } but got the error: cannot convert 'std::vector<int>::size' from type 'std::vector<in..

How to filter Android logcat by application?

How can I filter Android logcat output by application? I need this because when I attach a device, I can't find the output I want due to spam from other processes...

What does "The following object is masked from 'package:xxx'" mean?

When I load a package, I get a message stating that: "The following object is masked from 'package:xxx' For example, if I load testthat then assertive, I get the following: library(testthat) libra..

React Native TextInput that only accepts numeric characters

I need to have a React Native TextInput component that will only allow numeric characters (0 - 9) to be entered. I can set the keyboardType to numeric which almost gets me there for input except for t..

Using Apache httpclient for https

I have enabled https in tomcat and have a self-signed certificate for server auth. I have created an http client using Apache httpClient. I have set a trust manager loading the server certificate. The..

Check if a string is html or not

I have a certain string for which I want to check if it is a html or not. I am using regex for the same but not getting the proper result. I validated my regex and it works fine here. var htmlRegex ..

File uploading with Express 4.0: req.files undefined

I'm attempting to get a simple file upload mechanism working with Express 4.0 but I keep getting undefined for req.files in the body. Here is the relevant code: var bodyParser = require('bo..

Set the table column width constant regardless of the amount of text in its cells?

In my table I set the width of the first cell in a column to be 100px. However, when the text in one of the cell in this column is too long, the width of the column becomes more than 100px. How could ..

Javascript Regex: How to put a variable inside a regular expression?

So for example: function(input){ var testVar = input; string = ... string.replace(/ReGeX + testVar + ReGeX/, "replacement") } But this is of course not working :) Is there any way to do..

PHP Error: Function name must be a string

I added the following lines to the top of my PHP code, but it throws an error: Fatal error: Function name must be a string in /home/reg.php on line 2 <?php if ($_COOKIE('CaptchaResponseValue'..

Naming Classes - How to avoid calling everything a "<WhatEver>Manager"?

A long time ago I have read an article (I believe a blog entry) which put me on the "right" track on naming objects: Be very very scrupulous about naming things in your program. For example if my app..

How to add a margin to a table row <tr>

I have a table containing many rows. Some of these rows are class="highlight" and signify a row that needs to be styled differently and highlighted. What I'm trying to do is add some extra spacing bef..

Async await in linq select

I need to modify an existing program and it contains following code: var inputs = events.Select(async ev => await ProcessEventAsync(ev)) .Select(t => t.Result) ..

Adding an onclick event to a div element

I saw a few similar topics which did help but I have specific problem and didn't manage to solve it alone so if anyone can help out I would appreciate it I want to add onclick event to a div element...

Easy way to convert a unicode list to a list containing python strings?

Template of the list is: EmployeeList = [u'<EmpId>', u'<Name>', u'<Doj>', u'<Salary>'] I would like to convert from this EmployeeList = [u'1001', u'Karick', u'14-12-2020'..

Javascript Append Child AFTER Element

I would like to append an li element after another li inside a ul element using javascript, This is the code I have so far.. var parentGuest = document.getElementById("one"); var childGuest = documen..

python request with authentication (access_token)

I am trying to get an API query into python. The command line curl --header "Authorization:access_token myToken" gives some json output. myToken is a hexadecimal variable tha..

How to prepend a string to a column value in MySQL?

I need a SQL update statement for updating a particular field of all the rows with a string "test" to be added in the front of the existing value. For example, if the existing value is "try" it shoul..

Timestamp with a millisecond precision: How to save them in MySQL

I have to develop a application using MySQL and I have to save values like "1412792828893" which represent a timestamp but with a precision of a millisecond. That is, the amount of milliseconds since ..

How to import a Python class that is in a directory above?

I want to inherit from a class in a file that lies in a directory above the current one. Is it possible to relatively import that file?..

Is a LINQ statement faster than a 'foreach' loop?

I am writing a Mesh Rendering manager and thought it would be a good idea to group all of the meshes which use the same shader and then render these while I'm in that shader pass. I am currently us..

How can I get an object's absolute position on the page in Javascript?

I want to get an object's absolute x,y position on the page in Javascript. How can I do this? I tried obj.offsetTop and obj.offsetLeft, but those only give the position relative to the parent elemen..

How to export a table dataframe in PySpark to csv?

I am using Spark 1.3.1 (PySpark) and I have generated a table using a SQL query. I now have an object that is a DataFrame. I want to export this DataFrame object (I have called it "table") to a csv fi..

jQuery.parseJSON throws “Invalid JSON” error due to escaped single quote in JSON

I’m making requests to my server using and my server is returning JSON objects (like { "var": "value", ... }). However, if any of the values contains a single quote (properly escaped l..

Add space between cells (td) using css

I am trying to add a table with space between cell as the background colour of the cell is white and the background color of the table is blue, you can easily see that padding and margin are not worki..

What exactly is an instance in Java?

What is the difference between an object, instance, and reference? They say that they have to create an instance to their application? What does that mean?..

SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'

I just installed Ubuntu 16.04 and installed web server on it. Everything works well, but I cannot access database. Even if I create new user and grant all privileges, I can't create database In PHP I'..

How do I download a file with Angular2 or greater

I have a WebApi / MVC app for which I am developing an angular2 client (to replace MVC). I am having some troubles understanding how Angular saves a file. The request is ok (works fine with MVC, and ..

C++ error 'Undefined reference to Class::Function()'

I was wondering if anyone could help me out with this - I'm only new to C++ and it's causing me a fair amount of troubles. I'm trying to make relatively simple Deck and Card class objects. The erro..

onKeyPress Vs. onKeyUp and onKeyDown

What is the difference between these three events? Upon googling I found that: The onKeyDown event is triggered when the user presses a key. The onKeyUp event is triggered when the user relea..

Android Studio Gradle DSL method not found: 'android()' -- Error(17,0)

I am attempting to run my project in Android Studio but the error appears below: I have followed many sources just to get this to run and have wound up here, but do not know what else to do. How ..

What is the difference between '/' and '//' when used for division?

Is there a benefit to using one over the other? In Python 2, they both seem to return the same results: >>> 6/3 2 >>> 6//3 2 ..

How to check if a Unix .tar.gz file is a valid file without uncompressing?

I have found the question How to determine if data is valid tar file without a file?, but I was wondering: is there a ready made command line solution?..

How to delete specific rows and columns from a matrix in a smarter way?

Let's say t1 is : t1 <- array(1:20, dim=c(10,10)) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 11 1 11 1 11 1 11 1 11 [2,] 2 12 2 12 2 ..

CALL command vs. START with /WAIT option

How is the START command with a WAIT option START /wait notepad.exe START /wait notepad.exe ...any different from using a CALL command? CALL notepad.exe CALL notepad.exe Is there a situati..

MySQL Database won't start in XAMPP Manager-osx

I downloaded XAMPP about a month ago and it was working just fine. Today I installed a voice recognition software and then restarted my computer. Ever since, MySQL won't start in my manager-osx applic..

E11000 duplicate key error index in mongodb mongoose

Following is my user schema in user.js model - var userSchema = new mongoose.Schema({ local: { name: { type: String }, email : { type: String, require: true, unique: true }, ..

How can I add an empty directory to a Git repository?

How can I add an empty directory (that contains no files) to a Git repository?..

Codeigniter's `where` and `or_where`

I'm trying to specify a query in my model $this->db ->select('*') ->from('library') ->where('library.rating >=', $form['slider']) ->where('library.vo..

.prop() vs .attr()

So jQuery 1.6 has the new function prop(). $(selector).click(function(){ //instead of: this.getAttribute('style'); //do i use: $(this).prop('style'); //or: $(this).attr('style..

Return values from the row above to the current row

I am trying to do simple thing: I just need to set some cells to values that are on the previous rows. I have tried =A(Row()-1) but it does not work...

How to make a owl carousel with arrows instead of next previous

Yesterday I presented a website to a customer. I always use Owl carousel since it's responsive. The client, however, hated the previous, next words, and wanted to change them to arrows. So hence I u..

Is mongodb running?

I have installed mongodb and the php drivers on my unix server. My question is how can I tell if mongodb is running? Is there a simple command line query to check status? If I start it once from the s..

Using JQuery - preventing form from submitting

How do I prevent a form from submitting using jquery? I tried everything - see 3 different options I tried below, but it all won't work: $(document).ready(function() { //option A ..

How to make execution pause, sleep, wait for X seconds in R?

How do you pause an R script for a specified number of seconds or miliseconds? In many languages, there is a sleep function, but ?sleep references a data set. And ?pause and ?wait don't exist. The in..

Python: Removing list element while iterating over list

I'm iterating over a list of elements in Python, do some action on it, and then remove them if they meet certain criteria. for element in somelist: do_action(element) if check(element): ..

TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable

I am trying to map from a service call but getting an error. Looked at subscribe is not defined in angular 2? and it said that in order to subscribe we need to return from inside the operators. I have..

Base64 Java encode and decode a string

I want to encode a string into base64 and transfer it through a socket and decode it back. But after decoding it gives different answer. Following is my code and result is "77+9x6s=" import javax..

How to get Database Name from Connection String using SqlConnectionStringBuilder

I never want to split connection string using string manipulation and get server,database,uid and password. I read the following link and read the accepted answer , I found that is the best way to ge..

Adding HTML entities using CSS content

How do you use the CSS content property to add HTML entities? Using something like this just prints &nbsp; to the screen instead of the non-breaking space: .breadcrumbs a:before { content: '..

Configure Nginx with proxy_pass

I'm trying to configure Nginx to proxy stuff on a subdomain: I want to be proxied to IP:8080, and to be proxied to IP:7990 Here's my current config file se..

Generics in C#, using type of a variable as parameter

I have a generic method bool DoesEntityExist<T>(Guid guid, ITransaction transaction) where T : IGloballyIdentifiable; How do I use the method in the following way: Type t = entity.GetType()..

'invalid value encountered in double_scalars' warning, possibly numpy

As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin. ..

Comment out HTML and PHP together

I have this code, <tr> <td><?php echo $entry_keyword; ?></td> <td><input type="text" name="keyword" value="<?php echo $keyword; ?>" /></td..

Adding class to element using Angular JS

I know how to add a class on click of a button in 'jQuery' $('#button1').click(function(){ $('#div1').addClass('alpha'); }); I want to achieve same thing by angular js. I have a controller - myCon..

How to set environment variables in Jenkins?

I would like to be able to do something like: AOEU=$(echo aoeu) and have Jenkins set AOEU=aoeu. The Environment Variables section in Jenkins doesn't do that. Instead, it sets AOEU='$(echo aoeu)'. ..

Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Widget.ActionBar.Title'

I am implementing ActionBar to set the color for text using this style script in xml but getting error when I run my application time does anybody have idea what I have missing this is my style.xml f..