Questions Tagged with #Groovlet

"Could not find a part of the path" error message

I am programming in c# and want to copy a folder with subfolders from a flash disk to startup. Here is my code: private void copyBat() { try { string source_dir = "E:\\Debug\\VipBat"..

Replace String in all files in Eclipse

How can I search and replace a String in all files of my current project? Let's say I have the string "/sites/default/" now I want it to be "/public/sites/default/", but there are ..

How to stretch a fixed number of horizontal navigation items evenly and fully across a specified container

I'd like to stretch 6 nav items evenly across a 900px container, with an even amount of white space between. For instance... ---| 900px Container |--- ---| HOME ABOUT BASIC SERVICES SPECIA..

Get HTML inside iframe using jQuery

Here is my situation. I have a file called iframe.html, which contains the code to for a image slideshow. The code is somewhat like <html> <head> <!-- Have added title and js fi..

R Plotting confidence bands with ggplot

I would like to create a confidence band for a model fitted with gls like this: require(ggplot2) require(nlme) mp <-data.frame(year=c(1990:2010)) mp$wav <- rnorm(nrow(mp))*cos(2*pi*mp$year)+2..

Single Result from Database by using mySQLi

I am trying to use mySQLi for the first time. I have done it in case of loop. Loop results are showing but i am stuck when i try to show single record. Here is loop code that is working. <?php // ..

How can I render HTML from another file in a React component?

Is it possible to render HTML from another file in a React component? I have tried the following, but it does not work: var React = require('react'); /* Template html */ var template = require('./t..

How do I delete specific characters from a particular String in Java?

For example I'm extracting a text String from a text file and I need those words to form an array. However, when I do all that some words end with comma (,) or a full stop (.) or even have brackets at..

How can I make the Android emulator show the soft keyboard?

I'm debugging an issue with the soft keyboard display not displaying when it should. However, I don't have a device handy for testing. The problem is that the emulator never shows the soft keyboard...

Run parallel multiple commands at once in the same terminal

I want to run a few commands, each of which doesn't quit until Ctrl-C is pressed. Is there something I can run to run all of them at once, and Ctrl-C will quit them all? They can share the terminal ou..

error: No resource identifier found for attribute 'adSize' in package 'com.google.example' main.xml

When I followed the instructions to add an ad into my app by xml, I got the following errors: Description Resource Path Location Type error: No resource identifier found for attribute 'adSize' in pac..

concat yesterdays date with a specific time

I need to create a query that looks at yesterdays date but at a specific time. I would like the time portion to be in the 'hh24:mi:ss' format as this is how the search field is formated. when I run ..

How To Set Up GUI On Amazon EC2 Ubuntu server

I'm using an amazon Ubuntu EC2 instance which is only has a command line interface. I want to setup UI for that server to access using remote desktop tools. Is there any way to apply GUI to the EC2 in..

"Active Directory Users and Computers" MMC snap-in for Windows 7?

Is there an equivalent tool available for use in Windows 7? I just need to browse the membership of some small Active Directory groups that are deep within a huge hierarchy, so I can eventually write..

Using stored procedure output parameters in C#

I am having a problem returning an output parameter from a Sql Server stored procedure into a C# variable. I have read the other posts concerning this, not only here but on other sites, and I cannot g..

docker: Error response from daemon: Get https://registry-1.docker.io/v2/: Service Unavailable. IN DOCKER , MAC

I am having this issue in my Mac system 10.11.6 system3:postgres saurabh-gupta2$ docker build -t postgres . Sending build context to Docker daemon 38.91kB Step 1/51 : FROM registry.access.redhat.com..

ASP.NET MVC How to pass JSON object from View to Controller as Parameter

I have a complex JSON object which is sent to the View without any issues (as shown below) but I cannot work out how Serialize this data back to a .NET object when it is passed back to the controller ..

Route.get() requires callback functions but got a "object Undefined"

I am learning making Todo app. On the website, I am studying is https://coderwall.com/p/4gzjqw/build-a-javascript-todo-app-with-express-jade-and-mongodb I typed as instruction describes, [app.js] va..

SQL Sum Multiple rows into one

I need some help with the SUM feature. I am trying to SUM the bill amounts for the same account into one grand total, but the results I am getting show my SUM column just multiples my first column by..

I want to declare an empty array in java and then I want do update it but the code is not working

I want to declare an empty array in java and then I want do update it but the code is not working... public class JavaConversion { public static void main(String args[]) { int array[]..

How to check if a String is numeric in Java

How would you check if a String was a number before parsing it?..

nginx: connect() failed (111: Connection refused) while connecting to upstream

Trying to deploy my first portal . I am getting 502 gateway timeout error in browser when i was sending the request through browser when i checked the logs , i got this error 2014/02/03 09:00:32..

How to encode a string in JavaScript for displaying in HTML?

Possible Duplicate: How to escape HTML How can a string be converted to HTML in JavaScript? e.g. var unsafestring = "<oohlook&atme>"; var safestring = magic(unsafestring); whe..

How to get a value from the last inserted row?

Is there some way to get a value from the last inserted row? I am inserting a row where the PK will automatically increase, and I would like to get this PK. Only the PK is guaranteed to be unique in ..

Error creating bean with name 'entityManagerFactory

I am trying to run a dbtest but I get the following error : "Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in c..

Vendor code 17002 to connect to SQLDeveloper

I'm trying to connect to a database using SQLDeveloper and I get the following error: An Error was Encountered performing The requested operation: IO Error: Conection reset Vendor code 17002. Cou..

How do I write a correct micro-benchmark in Java?

How do you write (and run) a correct micro-benchmark in Java? I'm looking for some code samples and comments illustrating various things to think about. Example: Should the benchmark measure time/it..

How to simulate "Press any key to continue?"

I am trying to write a C++ program in which when user enter any character from keyboard and it should move to next line of code. Here is my code: char c; cin>>c; cout<<"Something"<&..

Install Node.js on Ubuntu

I'm trying install Node.js on Ubuntu 12.10 (Quantal Quetzal), but the terminal shows me an error about lost packages. I tried with this: sudo apt-get install python-software-properties sudo add-apt-r..

How to copy Outlook mail message into excel using VBA or Macros

I'm a newbie in VBA and Macros. If someone helps me with VBA code and macros, it will be helpful. Daily I'll receive around 50-60 mails with one standard subject: "Task Completed". I have created a r..

Git merge errors

I have a git branch called 9-sign-in-out with perfectly working code, and I want to turn it into the master. I'm currently on the master branch. $ git branch 9-sign-in-out * master I'm trying to sw..

How to see which flags -march=native will activate?

I'm compiling my C++ app using GCC 4.3. Instead of manually selecting the optimization flags I'm using -march=native, which in theory should add all optimization flags applicable to the hardware I'm c..

How to draw checkbox or tick mark in GitHub Markdown table?

I am able to draw checkbox in Github README.md lists using - [ ] (for unchecked checkbox) - [x] (for checked checkbox) But this is not working in table. Does anybody know how to implement checkbox ..

Plot a legend outside of the plotting area in base graphics?

As the title says: How can I plot a legend outside the plotting area when using base graphics? I thought about fiddling around with layout and produce an empty plot to only contain the legend, but I ..

Uncaught syntaxerror: unexpected identifier?

I can't seem to correct the error the console is talking about can anyone help me. My code is below. I created a web form that saves the data to local storage and displays it on screen then deletes al..

How can I store and retrieve images from a MySQL database using PHP?

How can I insert an image in MySQL and then retrieve it using PHP? I have limited experience in either area, and I could use a little code to get me started in figuring this out...

How do I print a list of "Build Settings" in Xcode project?

Alternate Titles List of Xcode build variables Print a list of Xcode Build Settings Clang Environment Variables Canonical list of Xcode Environment Variables Is there a Canonical list of Xcode Envir..

CreateProcess error=2, The system cannot find the file specified

I am writing a program in java which would execute winrar and unzip a jar file for me placed in h:\myjar.jar into the folder h:\new. My java code goes something like this import java.io.File; import ..

Axios get access to response header fields

I'm building a frontend app with React and Redux and I'm using axios to perform my requests. I would like to get access to all the fields in the header of the response. In my browser I can inspect the..

GC overhead limit exceeded

What is the sampling time JVM uses to throw 'java.lang.OutOfMemoryError : GC overhead limit exceeded'? I know you can control 98% and 2% with parameters GCTimeLimit and GCHeapFreeLimit but whats the ..

What methods of ‘clearfix’ can I use?

I have the age-old problem of a div wrapping a two-column layout. My sidebar is floated, so my container div fails to wrap the content and sidebar. <div id="container"> <div id="content"&g..

force css grid container to fill full screen of device

How do I force a css grid container take the full width and height of the device screen for a single page app? Modified example is from Mozilla: Firefox documentation _x000D_ _x000D_ .wrapper {_x000D..

Stop Excel from automatically converting certain text values to dates

Does anyone happen to know if there is a token I can add to my csv for a certain field so Excel doesn't try to convert it to a date? I'm trying to write a .csv file from my application and one of the..

Properties file with a list as the value for an individual key

For my program I want to read a key from a properties file and an associated List of values for the key. Recently I was trying like that public static Map<String,List<String>>categoryMap ..

How to import a .cer certificate into a java keystore?

During the development of a Java webservice client I ran into a problem. Authentication for the webservice is using a client certificate, a username and a password. The client certificate I received f..

AngularJS - add HTML element to dom in directive without jQuery

I have an AngularJS directive in which I want to add a svg tag to the current element of the directive. Right now I do this with the help of jQuery link: function (scope, iElement, iAttrs) { var..

Link to the issue number on GitHub within a commit message

Is it somehow possible to automatically have a link to GitHub issue number in the git commit message?..

How can I list all foreign keys referencing a given table in SQL Server?

I need to remove a highly referenced table in a SQL Server database. How can I get a list of all the foreign key constraints I will need to remove in order to drop the table? (SQL answers preferable..

Output a NULL cell value in Excel

Possible Duplicate: Return empty cell from formula in Excel I have an IF statement. If a cell = n, then do something, else output NULL =IF(A1=5, "Success", NULL) // #NAME? =IF(A1=5, "Suc..

How to fix Python Numpy/Pandas installation?

I would like to install Python Pandas library (0.8.1) on Mac OS X 10.6.8. This library needs Numpy>=1.6. I tried this $ sudo easy_install pandas Searching for pandas Reading http://pypi.python.org/s..

How to check string length with JavaScript

I want to get the string length when a key is pressed like StackOverflow does. I have tried to do this with onblur, but it's not working. How do I do this?..

NavigationBar bar, tint, and title text color in iOS 8

The background text in the status bar is still black. How do I change the color to white? // io8, swift, Xcode 6.0.1 override func viewDidLoad() { super.viewDidLoad() self.navigationControll..

CSS: Background image and padding

I want to add a background image on the right side of the list items, and want to have some padding from the right side as well, but I'm unable to do that. Please have a look at following example: HT..

Read next word in java

I have a text file that has following content: ac und accipio annehmen ad zu adeo hinzugehen ... I read the text file and iterate through the lines: Scanner sc = new Scanner(new File("translate.tx..

Facebook Android Generate Key Hash

Trying to create an android app with Facebook integration, I've gotten to the part in the docs where you have to generate a key hash file, it specifies to run the following code keytool -exportcert -..

Open firewall port on CentOS 7

I am using CentOS 7 and I have to ensure that ports 2888 and 3888 are open. I read this article but this did not work because on CentOS 7 OS there is no iptables save command. Someone told me that t..

Automating running command on Linux from Windows using PuTTY

I have a scenario where I need to run a linux shell command frequently (with different filenames) from windows. I am using PuTTY and WinSCP to do that (requires login name and password). The file is ..

How do I use MySQL through XAMPP?

I installed XAMPP v3.2.1 because I wanted to learn how to create database in MySQL and learn more about TOMCAT. However, I am a little confused about what to do now. I have read many blogs and the doc..

Lumen: get URL parameter in a Blade view

I'm trying to get a url parameter from a view file. I have this url: http://locahost:8000/example?a=10 and a view file named example.blade.php. From the controller I can get the parameter a with ..

"The specified Android SDK Build Tools version (26.0.0) is ignored..."

In Android Studio 3, I'm seeing this issue: The specified Android SDK Build Tools version (26.0.0) is ignored, as it is below the minimum supported version (26.0.2) for Android Gradle Plugin 3..

How to stick a footer to bottom in css?

I am having the classic problem for the positioning of a Footer on the bottom of the browser. I've tried methods including http://ryanfait.com/resources/footer-stick-to-bottom-of-page/ but to no good ..

"Cannot GET /" with Connect on Node.js

I'm trying to start serving some static web pages using connect like this: var connect = require("connect"); var nowjs = require("now"); var io = require("socket.io"); var app = connect.createServe..

Each for object?

I have object in JavaScript: var object = someobject; Object { aaa=true, bbb=true, ccc=true } How can I use each for this? object.each(function(index, value)) { console.log(value); } No..

What is the difference between Scrum and Agile Development?

What is the difference between Scrum and Agile Development? Are Sprint and Iterations the same?..

SQLSTATE[42S22]: Column not found: 1054 Unknown column - Laravel

I'm using the framework Laravel. I have 2 tables (Users and Members). When I want to login, I get the error message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_email' in 'wher..

C++ convert hex string to signed integer

I want to convert a hex string to a 32 bit signed integer in C++. So, for example, I have the hex string "fffefffe". The binary representation of this is 11111111111111101111111111111110. The sig..

Inversion of Control vs Dependency Injection

According to the paper written by Martin Fowler, inversion of control is the principle where the control flow of a program is inverted: instead of the programmer controlling the flow of a program, the..

Correct way to integrate jQuery plugins in AngularJS

I was wondering what is the correct way to integrate jQuery plugins into my angular app. I've found several tutorials and screen-casts but they seem catered to a specific plugin. For Example: http://..

How do you input command line arguments in IntelliJ IDEA?

I usually input command line arguments in Eclipse via run configuration. But I don't know how do achieve the same task in IntelliJ IDEA...

What is a stored procedure?

What is a "stored procedure" and how do they work? What is the make-up of a stored procedure (things each must have to be a stored procedure)?..

REST API Token-based Authentication

I'm developing a REST API that requires authentication. Because the authentication itself occurs via an external webservice over HTTP, I reasoned that we would dispense tokens to avoid repeatedly call..

Uncaught TypeError: data.push is not a function

I am trying to push data.push({"country": "IN"}); as new id and value to a json string. but it gives the following error Uncaught TypeError: data.push is not a function data{"name":"ananta","age..

How to kill a process on a port on ubuntu

I am trying to kill a process in the command line for a specific port in ubuntu. If I run this command I get the port: sudo lsof -t -i:9001 so...now I want to run: sudo kill 'sudo lsof -t -i:9001..

Convert number to month name in PHP

I have this PHP code: $monthNum = sprintf("%02s", $result["month"]); $monthName = date("F", strtotime($monthNum)); echo $monthName; But it's returning December rather than August. $result["month"..

How to convert JTextField to String and String to JTextField?

How to convert JTextField to String and String to JTextField in Java?..

Compiler error: "initializer element is not a compile-time constant"

When compiling this code, I get the error "initializer element is not a compile-time constant". Can anyone explain why? #import "PreferencesController.h" @implementation PreferencesController - (id..

How to get rows count of internal table in abap?

How do I get the row count of an internal table? I guess that I can loop on it. But there must be a saner way. I don't know if it makes a difference but the code should run on 4.6c version...

Javascript Debugging line by line using Google Chrome

How can I step through my javascript code line by line using Google Chromes developer tools without it going into javascript libraries? For example, I am heavily using jQuery on my site, and I just w..

SDK Location not found Android Studio + Gradle

I have seen this same thing posted quite a few times, but whenever I try to import my project to my new work laptop I keep getting this error. I have pulled the project from git (which his btw runnin..

CSS: Set Div height to 100% - Pixels

I have a header on my page which is just over 100px (111px to be exact) The div below it needs to extend to the bottom of the viewport, as if i had set the bottom to 0px. The problem lies in the fact ..

How can I get log4j to delete old rotating log files?

How can I get log4j to delete old rotating log files? I know I can set up automated jobs (cron for UNIX and scheduled task for Windows), but I want it cross platform, and I want it in our application..

how to do file upload using jquery serialization

So I have a form and I'm submitting the form through ajax using jquery serialization function serialized = $(Forms).serialize(); $.ajax({ type : "POST", cach..

How do I clear my Jenkins/Hudson build history?

I recently updated the configuration of one of my hudson builds. The build history is out of sync. Is there a way to clear my build history? Please and thank you..

Configure cron job to run every 15 minutes on Jenkins

How can I run a cron job every 15 mins on Jenkins? This is what I've tried : On Jenkins I have a job set to run every 15 mins using this cron syntax : 14 * * * * But the job executes every hour..

How to handle static content in Spring MVC?

I am developing a webapp using Spring MVC 3 and have the DispatcherServlet catching all requests to '/' like so (web.xml): <servlet> <servlet-name>app</servlet-name> <s..

Lost httpd.conf file located apache

How can I find where my httpd.conf file is located? I am running an Ubuntu Linux server from the Amazon Web Services EC2 (Elastic Compute Cloud) and I can't find my Apache config...

PostgreSQL delete all content

Hello I want to delete all data in my postgresql tables, but not the table itself. How could I do this?..

ToggleClass animate jQuery?

I have a section on my website that when a user clicks I would like it to expand, I'm using the jQuery's toggleClass for this... expandable: function(e) { e.preventDefault(); $(this).closest(..

Picasso v/s Imageloader v/s Fresco vs Glide

Findings: Difference between Picasso v/s ImageLoader here ... Info about the library GLIDE here ... Now recently Facebook released new image library called Fresco Questions: What is the differ..

Count all values in a matrix greater than a value

I have to count all the values in a matrix (2-d array) that are greater than 200. The code I wrote down for this is: za=0 p31 = numpy.asarray(o31) for i in range(o31.size[0]): for j in ..

Dump all documents of Elasticsearch

Is there any way to create a dump file that contains all the data of an index among with its settings and mappings? A Similar way as mongoDB does with mongodump or as in Solr its data folder is cop..

Is there a way to return a list of all the image file names from a folder using only Javascript?

I want to display all images from folder located in server in image gallery. Is there a way to return a list of all the image file names from a folder using only JavaScript or JQuery? Also I want to..

How do I store an array in localStorage?

If I didn't need localStorage, my code would look like this: var names=new Array(); names[0]=prompt("New member name?"); This works. However, I need to store this variable in localStorage and it's..

How to Select Columns in Editors (Atom,Notepad++, Kate, VIM, Sublime, Textpad,etc) and IDEs (NetBeans, IntelliJ IDEA, Eclipse, Visual Studio, etc)

How to select columns in Editors and IDEs to columnar delete, insert or replace some characters ? Editors: Atom Notepad++ Kate VIM Sublime Emacs Textpad Emerald Editor UltraEdit MCEdit jEdit Nedit ..

Angularjs dynamic ng-pattern validation

I have a form that if a checkbox is false enforces validation on a text input using the ng-required directive. If the checkbox is true, the field is hidden and the ng-required is set to false. The p..

Increase number of axis ticks

I'm generating plots for some data, but the number of ticks is too small, I need more precision on the reading. Is there some way to increase the number of axis ticks in ggplot2? I know I can tell g..

How to build PDF file from binary string returned from a web-service using javascript

I am trying to build a PDF file out of a binary stream which I receive as a response from an Ajax request. Via XmlHttpRequest I receive the following data: %PDF-1.4.... ..... ....hole data represent..

Why does integer division in C# return an integer and not a float?

Does anyone know why integer division in C# returns an integer and not a float? What is the idea behind it? (Is it only a legacy of C/C++?) In C#: float x = 13 / 4; //== operator is overridden he..

How to get the cookie value in asp.net website

I am creating a cookie and storing the value of username after succesfull login. How can I access the cookie when the website is opened. If the cookie exist I want to fill the username text box from t..

Adding Google Play services version to your app's manifest?

I'm following this tutorial: https://developers.google.com/maps/documentation/android/start#overview on how to add Google Maps to an app within the Android SDK. The only problem I seem to be having..

How to delete all instances of a character in a string in python?

How do I delete all the instances of a character in this string? Here is my code: def findreplace(char, string): place = string.index(char) string[place] = '' return string However, if ..

What is this spring.jpa.open-in-view=true property in Spring Boot?

I saw spring.jpa.open-in-view=true property in Spring Boot documentation for JPA configuration. Is the true default value for this property if it's not provided at all?; What does this really do? I ..

How to run a SQL query on an Excel table?

I'm trying to create a sub-table from another table of all the last name fields sorted A-Z which have a phone number field that isn't null. I could do this pretty easy with SQL, but I have no clue how..

How can I transform string to UTF-8 in C#?

I have a string that I receive from a third party app and I would like to display it correctly in any language using C# on my Windows Surface. Due to incorrect encoding, a piece of my string looks l..

Can I mask an input text in a bat file?

I am writing a batch file to execute some other programs. In this case I need to prompt for a password. Do I have any way to mask the input text? I don't need to print ******* characters instead of in..

PHP if not statements

This may be the way my server is set up, but I'm banging my head against the wall. I'm trying to say that if $action has no value or has a value that is not "add" or "delete" then have an error, else ..

Where can I find Android source code online?

Particularly, where can I browse the source code for any android source application(e.g.the contact application) ? Is the only way to go to download all there is?..

How can I include all JavaScript files in a directory via JavaScript file?

I have a bunch of JavaScript files that I would like to include in the page, but I don't want to have to keep writing <script type="text/javascript" src="js/file.js"></script> So is th..

How do I find the date a video (.AVI .MP4) was actually recorded?

properties> date created... I thought this meant the date the video was created, but finally realized that date changes every time I move, reorganize, even open a file. often, the date modified is ..

nil detection in Go

I see a lot of code in Go to detect nil, like this: if err != nil { // handle the error } however, I have a struct like this: type Config struct { host string port float64 } a..

How to get the position of a character in Python?

How can I get the position of a character inside a string in python?..

Spring 3.0: Unable to locate Spring NamespaceHandler for XML schema namespace

My setup is fairly simple: I have a web front-end, back-end is spring-wired. I am using AOP to add a layer of security on my rpc services. It's all good, except for the fact that the web app aborts ..

PostgreSQL JOIN data from 3 tables

I'm new to PostgreSQL and trying to get a query written. I'm pretty sure it's easy for someone who knows what they are doing - I just don't! :) Basically I have three tables. In the first, I store de..

Call a "local" function within module.exports from another function in module.exports?

How do you call a function from within another function in a module.exports declaration? app.js var bla = require('./bla.js'); console.log(bla.bar()); bla.js module.exports = { foo: function (..

add scroll bar to table body

I want to do this as easily as possible with out any additional libraries. In my very long table I want to add a scrollbar to the <tbody> tag so that the head is always visible but it wont wor..

Remove final character from string

Let's say my string is 10 characters long. How do I remove the last character? If my string is "abcdefghij" (I do not want to replace the 'j' character, since my string may contain multiple 'j' cha..

How do I do base64 encoding on iOS?

I'd like to do base64 encoding and decoding, but I could not find any support from the iPhone SDK. How can I do base64 encoding and decoding with or without a library?..

How can I declare a Boolean parameter in SQL statement?

How can I declare a Boolean parameter in SQL statement?..

What is the purpose of nameof?

Version 6.0 got a new feature of nameof, but I can't understand the purpose of it, as it just takes the variable name and changes it to a string on compilation. I thought it might have some purpose w..

Datetime in where clause

How can I select 12/20/2008 in where clause of sql? The server is SQL server 2005. select * from tblErrorLog where errorDate = '12/20/2008' ..

What is the correct syntax of ng-include?

I’m trying to include an HTML snippet inside of an ng-repeat, but I can’t get the include to work. It seems the current syntax of ng-include is different than what it was previously: I see many ex..

How do I remove the old history from a git repository?

I'm afraid I couldn't find anything quite like this particular scenario. I have a git repository with a lot of history: 500+ branches, 500+ tags, going back to mid-2007. It contains ~19,500 commits. ..

How to strip HTML tags with jQuery?

I want to remove HTML tags from a string. For example assume we have the string: <p> example ive got a string</P> How can I write a function that removes the <p><p> and ret..

generating variable names on fly in python

Is there a way I can generate variable names in python in a loop and assign values to them? For example, if I have prices = [5, 12, 45] I want price1 = 5 price2 = 12 price3 = 45 Can I do this in..

Edit and replay XHR chrome/firefox etc?

I've been looking for a way to alter a XHR request made in my browser and then replay it again. Say I have a complete POST request done in my browser, and the only thing I want to change is a small va..

How to change Vagrant 'default' machine name?

Where does the name 'default' come from when launching a vagrant box? $ vagrant up Bringing machine 'default' up with 'virtualbox' provider... Is there a way to set this?..

What properties does @Column columnDefinition make redundant?

I often specify my @Column annotations like this: @Column(columnDefinition="character varying (100) not null",length=100,nullable=false) As you can see I specify length and nullable even though the..

How can I initialize a MySQL database with schema in a Docker container?

I am trying to create a container with a MySQL database and add a schema to these database. My current Dockerfile is: FROM mysql MAINTAINER (me) <email> # Copy the database schema to the /da..

Add multiple items to already initialized arraylist in java

I'm googling it and can't seem to find the syntax. My arraylist might be populated differently based on a user setting, so I've initialized it ArrayList<Integer> arList = new ArrayList<Integ..

Is there a Mutex in Java?

Is there a Mutex object in java or a way to create one? I am asking because a Semaphore object initialized with 1 permit does not help me. Think of this case: try { semaphore.acquire(); //do st..

Search in all files in a project in Sublime Text 3

Is there a way to search for a string in all files inside a project in Sublime Text 3? The string is not a method...

Checking cin input stream produces an integer

I was typing this and it asks the user to input two integers which will then become variables. From there it will carry out simple operations. How do I get the computer to check if what is entered ..

Binding to static property

I'm having a hard time binding a simple static string property to a TextBox. Here's the class with the static property: public class VersionManager { private static string filterString; pu..

Cast object to T

I'm parsing an XML file with the XmlReader class in .NET and I thought it would be smart to write a generic parse function to read different attributes generically. I came up with the following functi..

Class JavaLaunchHelper is implemented in two places

Today I upgraded my Intellij Idea on macOS Sierra, and now, when I run apps in console I have this error: objc[3648]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachine..

How to send HTML-formatted email?

I could be able to let the web application sends automatic emails using Windows Task Scheduler. Now I want to send HTML-Formatted email using the following method that I wrote for sending emails. My ..

Rename a file using Java

Can we rename a file say test.txt to test1.txt ? If test1.txt exists will it rename ? How do I rename it to the already existing test1.txt file so the new contents of test.txt are added to it for l..

regex to remove all text before a character

Is there an easy way to remove all chars before a "_"? For example, change 3.04_somename.jpg to somename.jpg. Any suggestions for where to learn to write regex would be great too. Most places I check..

Primitive type 'short' - casting in Java

I have a question about the primitive type short in Java. I am using JDK 1.6. If I have the following: short a = 2; short b = 3; short c = a + b; the compiler does not want to compile - it says ..

UnicodeDecodeError: 'utf8' codec can't decode bytes in position 3-6: invalid data

how does the unicode thing works on python2? i just dont get it. here i download data from a server and parse it for JSON. Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-pa..

What are "res" and "req" parameters in Express functions?

In the following Express function: app.get('/user/:id', function(req, res){ res.send('user' + req.params.id); }); What are req and res? What do they stand for, what do they mean, and what do th..

Use of symbols '@', '&', '=' and '>' in custom directive's scope binding: AngularJS

I have read a lot about the use of these symbols in the implementation of custom directives in AngularJS but the concept is still not clear to me. What does it mean if I use one of the scope values in..

Quantile-Quantile Plot using SciPy

How would you create a qq-plot using Python? Assuming that you have a large set of measurements and are using some plotting function that takes XY-values as input. The function should plot the quanti..

How to set table name in dynamic SQL query?

I want to set table name in a dynamic SQL query. I tried successfully for parameter as following: /* Using sp_executesql */ /* Build and Execute a Transact-SQL String with a single parameter value U..

Creating a blurring overlay view

In the Music app of the new iOS, we can see an album cover behind a view that blurs it. How can something like that be accomplished? I've read the documentation, but did not find anything there. ..

How do I check form validity with angularjs?

I'm very new to angularjs. Say my app has a form. Using the inspector, I noticed that if angularjs thinks that the form is invalid, it adds an ng-invalid class to the form. Lovely. So it seems that i..

asp.net validation to make sure textbox has integer values

I have a required validation setup on a textbox, but I also have to make sure it is an integer. How can I do this?..

How can I insert into a BLOB column from an insert statement in sqldeveloper?

Is it possible to insert into a BLOB column in oracle using sqldeveloper? i.e. something like: insert into mytable(id, myblob) values (1,'some magic here'); ..

Understanding ASP.NET Eval() and Bind()

Can anyone show me some absolutely minimal ASP.NET code to understand Eval() and Bind()? It is best if you provide me with two separate code-snippets or may be web-links...

How to bind a List<string> to a DataGridView control?

I have a simple List<string> and I'd like it to be displayed in a DataGridView column. If the list would contain more complex objects, simply would establish the list as the value of its DataSou..

Javascript - Open a given URL in a new tab by clicking a button

I would like to have a button that redirects to a given URL and opens in a new tab. How can this be done?..

What is the HTML5 equivalent to the align attribute in table cells?

I'm refactoring an old site, and that maze is full of tables. We're moving to HTML5 and I need to fix a table full of <td align="center"> code. I found a partial solution by creating a class..

How to install Android SDK Build Tools on the command line?

I want to setup the Android dev environment from command line, and encounter the following issue: wget http://dl.google.com/android/android-sdk_r22.0.5-linux.tgz after extract the file, run tools/..

Unable to load Private Key. (PEM routines:PEM_read_bio:no start line:pem_lib.c:648:Expecting: ANY PRIVATE KEY)

I have a .key file which is PEM formatted private key file. I didn't make this file but I got this from somewhere. I wanted to see its MD5 hash with openssl tool like below command. openssl rsa -in ..

What is the JavaScript equivalent of var_dump or print_r in PHP?

I would like to see the structure of object in JavaScript (for debugging). Is there anything similar to var_dump in PHP?..

What is initial scale, user-scalable, minimum-scale, maximum-scale attribute in meta tag?

I was going through the source code of a website and found this piece of code. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=1.0, minimum-scale=1.0, maximum-s..

What does cmd /C mean?

I can understand cmd but not cmd /c. I was trying to invoke a java program from the current for which I use Runtime.getRuntime().exec("cmd /C java helloworld"); There arises my doubt...

SQL Server query to find all current database names

I need a SQL query to find the names of existing databases...

mvn command not found in OSX Mavrerick

Before marking this as duplicate, I went through these posts, but nothing helped. 'mvn' is not recognized as an internal or external command, Getting -bash: mvn: command not found, Can't ..

Change Activity's theme programmatically

In particular cases I need to remove dialog theme from my activity but it doesn't seem to be working. Here's an example First activity: public void onCreate(Bundle savedInstanceState) { super.on..

How do you change the datatype of a column in SQL Server?

I am trying to change a column from a varchar(50) to a nvarchar(200). What is the SQL command to alter this table? ..

Displaying unicode symbols in HTML

I want to simply display the tick (?) and cross (?) symbols in a HTML page but it shows up as either a box or goop ✔ - obviously something to do with the encoding. I have set the meta tag to sh..

JavaScript alert not working in Android WebView

In my application I am using WebView and in that I am using JavaScript alert( ) method but its not working, no pop-up appears. in my manifest file I have added <uses-permission android:name="and..

How can I get Docker Linux container information from within the container itself?

I would like to make my docker containers aware of their configuration, the same way you can get information about EC2 instances through metadata. I can use (provided docker is listening on port 4243..

Failed to instantiate module [$injector:unpr] Unknown provider: $routeProvider

I received this error upon upgrading from AngularJS 1.0.7 to 1.2.0rc1. ..

Git - Won't add files?

I'm having issues where I can't add files to my repository. I'm using GIT on windows, in Aptana Studio for some Ruby development. I've managed to push a few files up to GitHub, but then after this, ..

How to pass a variable to the SelectCommand of a SqlDataSource?

I want to pass variable from the code behind to the SelectCommand of a SqlDataSource? I don't want to use built-in parameter types (like ControlParameter, QueryStringParameter, etc) I need to pass a..

Project vs Repository in GitHub

In GitHub, what is the conceptual difference between a project (that can be created inside a repository) and a repository? I've seen several similar questions (here, here and here) in SO, but none o..

How to crop a CvMat in OpenCV?

I have an image converted in a CvMat Matrix say CVMat source. Once I get a region of interest from source I want the rest of the algorithm to be applied to that region of interest only. For that I thi..

How to check user is "logged in"?

I am using form authentication with below method in my ASP.NET application FormsAuthentication.RedirectFromLoginPage(txtUsername.Text, true); How do I check whether user is logged in or not? And ho..

What is (x & 1) and (x >>= 1)?

I am trying to do assignment: "Find the number of bits in an unsigned integer data type without using the sizeof() function." And my design is to convert the integer to bits and then to count them. F..

malloc an array of struct pointers

I have the following struct: typedef struct _chess { int **array; int size; struct _chess *parent; } chess; and I have: typedef struct _chess *Chess; Now, I want to create an array of d..

Use bash to find first folder name that contains a string

I would like to do this in Bash: in the current directory, find the first folder that contains "foo" in the name I've been playing around with the find command, but a little confused. Any suggesti..

How to horizontally center an element

How can I horizontally center a <div> within another <div> using CSS? <div id="outer"> <div id="inner">Foo foo</div> </div> ..

How to vertically align text with icon font?

I have a very basic HTML which mix plain text and icon fonts. The problem is that icons are not exactly rendered at the same height than the text: _x000D_ _x000D_ <div class="ui menu">_x000D_ ..

Press any key to continue

According to Microsoft's documentation, read-host lets the user type some input, and then press enter to continue. Not exactly the correct behavior if you want to have "Press any key to continue". (Wa..

Getting "type or namespace name could not be found" but everything seems ok?

I'm getting a: type or namespace name could not be found error for a C# WPF app in VS2010. This area of code was compiling fine, but suddenly I'm getting this error. I've tried removing the Proj..

How to determine the screen width in terms of dp or dip at runtime in Android?

I need to code the layout of the android widgets using dip/dp (in java files). At runtime if I code, int pixel=this.getWindowManager().getDefaultDisplay().getWidth(); this return the screen width..

How to use patterns in a case statement?

The man page says that case statements use "filename expansion pattern matching". I usually want to have short names for some parameters, so I go: case $1 in req|reqs|requirements) TASK="Function..

How to describe table in SQL Server 2008?

I want to describe a table in SQL Server 2008 like what we can do with the DESC command in Oracle. I have table [EX].[dbo].[EMP_MAST] which I want to describe, but it does not work. Error shown: ..

ARM compilation error, VFP registers used by executable, not object file

I have been having this problem for the last few days and I can't get my head around what is really happening here, or what is the problem. I have a makefile with these flags: CC = arm-linux-gnueabi..

wordpress contactform7 textarea cols and rows change in smaller screens

I used contactform7 to create the contact form for a wordpress site. I want to reduce the rows in a textarea on that form for smaller screen sizes. Is there any method I can use using contactform7's o..

React Native Error: ENOSPC: System limit for number of file watchers reached

I have setup a new blank react native app. After installing few node modules I got this error. Running application on PGN518. internal/fs/watchers.js:173 throw error; ^ Error: ENOSPC: System l..

JavaScript Extending Class

I have a base class: function Monster() { this.health = 100; } Monster.prototype.growl = function() { console.log("Grr!"); } That I want to extend and create another class with: function M..

Access to build environment variables from a groovy script in a Jenkins build step (Windows)

I'm using Scriptler plugin, so I can run a groovy script as a build step. My Jenkins slaves are running on windows in service mode. With scriptler, I don't need to use windows batch scripts. But I ha..

Why are exclamation marks used in Ruby methods?

In Ruby some methods have a question mark (?) that ask a question like include? that ask if the object in question is included, this then returns a true/false. But why do some methods have exclamatio..

Oracle comparing timestamp with date

I have a timestamp field and I just want to compare the date part of it in my query in Oracle How do I do that, SELECT * FROM Table1 WHERE date(field1) = '2012-01-01' ..

C++ template constructor

I wish to have a non-template class with a template constructor with no arguments. As far as I understand, it's impossible to have it (because it would conflict with the default constructor - am I ri..

Passing arguments to require (when loading module)

Is it possible to pass arguments when loading a module using require? I have module, login.js which provides login functionality. It requires a database connection, and I want the same database conne..

Show a child form in the centre of Parent form in C#

I create a new form and call from the parent form as follows: loginForm = new SubLogin(); loginForm.Show(); I need to display the child form at the centre of the parent. So,in the child form ..

What’s the best way to get an HTTP response code from a URL?

I’m looking for a quick way to get an HTTP response code from a URL (i.e. 200, 404, etc). I’m not sure which library to use...

100% width background image with an 'auto' height

I'm currently working on a mobile landing page for a company. It's a really basic layout but below the header there's an image of a product which will always be 100% width (the design shows it always ..

Obtain form input fields using jQuery?

I have a form with many input fields. When I catch the submit form event with jQuery, is it possible to get all the input fields of that form in an associative array?..

Using wget to recursively fetch a directory with arbitrary files in it

I have a web directory where I store some config files. I'd like to use wget to pull those files down and maintain their current structure. For instance, the remote directory looks like: http://mysit..

Detect key input in Python

(In 2013) I don't know why Python is that weird, you can't find this by searching in google very easily, but it's quite simple. How can I detect 'SPACE' or actually any key? How can I do this: print..

Adding padding to a tkinter widget only on one side

How can I add padding to a tkinter window, without tkinter centering the widget? I tried: self.canvas_l = Label(self.master, text="choose a color:", font="helvetica 12") self.canvas_l.grid(row=9, c..

Converting milliseconds to minutes and seconds with Javascript

Soundcloud's API gives the duration of it's tracks as milliseconds. JSON looks like this: "duration": 298999 I've tried many functions I found on here to no avail. I'm just looking for something to..

How to add row of data to Jtable from values received from jtextfield and comboboxes

I have a JFrame Form which has JTextFields, JCombobox etc. and I am able to receive those values to variables and now I want to add the received data to JTable in new row when user clicks Add or somet..

Are table names in MySQL case sensitive?

Are table names in MySQL case sensitive? On my Windows development machine the code I have is able to query my tables which appear to be all lowercase. When I deploy to the test server in our datacen..

jQuery checkbox checked state changed event

I want an event to fire client side when a checkbox is checked / unchecked: $('.checkbox').click(function() { if ($(this).is(':checked')) { // Do stuff } }); Basically I want it to happen f..