Questions Tagged with #Rsyslog

Rsyslog is enhanced syslogd with lot of enhanced features

Understanding the Linux oom-killer's logs

My app was killed by the oom-killer. It is Ubuntu 11.10 running on a live USB with no swap and the PC has 1 Gig of RAM. The only app running (other than all the built in Ubuntu stuff) is my program ..

Fatal error: Class 'Illuminate\Foundation\Application' not found

I am getting following error when I open my site which is made using laravel 5 Fatal error: Class 'Illuminate\Foundation\Application' not found in C:\cms\bootstrap\app.php on line 14 I have trie..

IIS Request Timeout on long ASP.NET operation

I am experiencing a request timeout from IIS when I run a long operation. Behind the scene my ASP.NET application is processing data, but the number of records being processed is large, and thus the o..

Page redirect after certain time PHP

There is a certain PHP function for redirecting after some time. I saw it somewhere but can't remember. It's like the gmail redirection after logging in. Please, could anyone remind me?..

Pretty printing XML with javascript

I have a string that represents a non indented XML that I would like to pretty-print. For example: <root><node/></root> should become: <root> <node/> </root> ..

Determine the number of rows in a range

I know the range name of the start of a list - 1 column wide and x rows deep. How do I calculate x? There is more data in the column than just this list. However, this list is contiguous - there is ..

Gulp command not found after install

I installed gulp(globally) and it looks like it worked because it ran this code: +-- [email protected] +-- [email protected] +-- [email protected] +-- depr[email protected] +-- [email protected] +-- [email protected] ..

Node.js server that accepts POST requests

I'm trying to allow javascript to communicate with a Node.js server. POST request (web browser) var http = new XMLHttpRequest(); var params = "text=stuff"; http.open("POST", "http://someurl.net:808..

Sending HTML Code Through JSON

I've got a php script which generates HTML content. Is there a way to send back that HTML content through JSON to my webpage from the php script?..

How to show data in a table by using psql command line interface?

Is there a way to show all the content inside a table by using psql command line interface? I can use \list to show all the databases, \d to show all the tables, but how can I show all the data in a ..

How do I set an ASP.NET Label text from code behind on page load?

I can't seem to find an answer out there for this. Here's the scenario: I have an ASP.NET project using C#. I'm loading data (Username, email, etc...) from a sqlite database with C# (using ADO). I'll ..

How to use protractor to check if an element is visible?

I'm trying to test if an element is visible using protractor. Here's what the element looks like: <i class="icon-spinner icon-spin ng-hide" ng-show="saving"></i> When in the chrome cons..

How to get a list of all files that changed between two Git commits?

Due to bureaucracy, I need to get a list of all changed files in my repository for a report (I started with existing source code). What should I run to get this list?..

Encapsulation vs Abstraction?

Here are the brief definitions of encapsulation and abstraction. Abstraction: The process of abstraction in Java is used to hide certain details and only show the essential features of the obje..

Python memory leaks

I have a long-running script which, if let to run long enough, will consume all the memory on my system. Without going into details about the script, I have two questions: Are there any "Best Pract..

mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socket 'MySQL' (2)

I get this error when I try to connect to the mysql database using php mysqli class. Using following code: $db = new MySQLi("localhost","kamil","*****"); if (mysqli_connect_errno()) { echo "An er..

How to use not contains() in xpath?

I have some XML that is structured like this: <whatson> <productions> <production> <category>Film</category> </production> <production&g..

Image vs zImage vs uImage

What is the difference between them? I know that u-boot needs a kernel in uImage format. The system I use first boots from stage 1 loader and then it calls u-boot. I want to discard u-boot and direc..

tsql returning a table from a function or store procedure

This is more of a syntax question I'm trying to write a store procedure or function that I can embed into a query such as: select * from MyBigProcOrFunction I'm trying to define a tabular function ..

how to hide the content of the div in css

I have this html code <div id="mybox"> aaaaaaa </div> and this is my css #mybox{ background-color:green; } #mybox:hover{ background-color:red; } the question is how to hide th..

jQuery.click() vs onClick

I have a huge jQuery application, and I'm using the below two methods for click events. First method HTML <div id="myDiv">Some Content</div> jQuery $('#myDiv').click(function(){ ..

Disable submit button ONLY after submit

I have the following HTML and jquery: <html dir="ltr" lang="en"> <head> </head> <body> <h2>Test disabling submit button for 1 minute...</h2> <br/> <p s..

Why is it that "No HTTP resource was found that matches the request URI" here?

I have code in my controller like so: [Route("api/deliveryitems/InsertIntoPPTData/{stringifiedRecord}")] ...and I'm calling it via Postman like so: http://localhost:21609/api/deliveryitems/Ins..

How to find the nearest parent of a Git branch?

Let's say I have the following local repository with a commit tree like this: master --> a \ \ develop c --> d \ \ feature..

How to get UTC timestamp in Ruby?

How to get UTC timestamp in Ruby?..

Windows batch files: .bat vs .cmd?

As I understand it, .bat is the old 16-bit naming convention, and .cmd is for 32-bit Windows, i.e., starting with NT. But I continue to see .bat files everywhere, and they seem to work exactly the sam..

How to create a floating action button (FAB) in android, using AppCompat v21?

I would like to create a floating action button (to add items to a listview), like google calendar, maintaining compatibility with pre-lollipop Android versions (before 5.0). I created this layout: ..

Best way to make a shell script daemon?

I'm wondering if there is a better way to make a daemon that waits for something using only sh than: #! /bin/sh trap processUserSig SIGUSR1 processUserSig() { echo "doing stuff" } while true; do ..

PHP Array to JSON Array using json_encode();

I've encoded an Array I've made using the inbuilt json_encode(); function. I need it in the format of an Array of Arrays like so: [["Afghanistan",32,12],["Albania",32,12]] However, it is returning ..

Is there an alternative to string.Replace that is case-insensitive?

I need to search a string and replace all occurrences of %FirstName% and %PolicyAmount% with a value pulled from a database. The problem is the capitalization of FirstName varies. That prevents me fro..

How to turn off caching on Firefox?

During development I have to "clear cache" in Firefox all the time in order to make it use the latest version of JavaScript files. Is there some kind of setting (about:config) to turn off caching com..

How to execute a command in a remote computer?

I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that? What services need to be running on the server to make that work? Some details: Only C# ..

Best way to encode text data for XML in Java?

Very similar to this question, except for Java. What is the recommended way of encoding strings for an XML output in Java. The strings might contain characters like "&", "<", etc...

Mockito verify order / sequence of method calls

Is there a way to verify if a methodOne is called before methodTwo in Mockito? public class ServiceClassA { public void methodOne(){} } public class ServiceClassB { public void methodTwo(){..

How can I connect to Android with ADB over TCP?

I am attempting to debug an application on a Motorola Droid, but I am having some difficulty connecting to the device via USB. My development server is a Windows 7 64-bit VM running in Hyper-V, and so..

How to stop a setTimeout loop?

I'm trying to build a loading indicator with a image sprite and I came up with this function function setBgPosition() { var c = 0; var numbers = [0, -120, -240, -360, -480, -600, -720]; fu..

What do multiple arrow functions mean in javascript?

I have been reading a bunch of react code and I see stuff like this that I don't understand: handleChange = field => e => { e.preventDefault(); /// Do something here } ..

Read a file in Node.js

I'm quite puzzled with reading files in Node.js. fs.open('./start.html', 'r', function(err, fileToRead){ if (!err){ fs.readFile(fileToRead, {encoding: 'utf-8'}, function(err,data){ ..

Add another class to a div

I have a function that checks the age of a form submission and then returns new content in a div depending on their age. Right now I am just using getElementById to replace the HTML content. BUt I thi..

Setting focus on an HTML input box on page load

I'm trying to set the default focus on an input box when the page loads (example: google). My page is very simple, yet I can't figure out how to do this. This is what I've got so far: <html> &..

Fastest way to check a string is alphanumeric in Java

What is the fastest way to check that a String contains only alphanumeric characters. I've got some code that is going to chew up a lot of CPU and I wonder if there is going to be a quicker way than ..

Checking if a character is a special character in Java

Possible Duplicate: JAVA: check a string if there is a special character in it I am a novice programmer and am looking for help determining if a character is a special character. My program..

How to set ANDROID_HOME path in ubuntu?

How to set ANDROID_HOME path in ubuntu? Please provide the steps...

Send multipart/form-data files with angular using $http

I know there are a lot of questions about this, but I can't get this to work: I want to upload a file from input to a server in multipart/form-data I've tried two approaches. First: headers: { 'C..

How do you specify a byte literal in Java?

If I have a method void f(byte b); how can I call it with a numeric argument without casting? f(0); gives an error...

How to make a JSONP request from Javascript without JQuery?

Can I make a cross-domain JSONP request in JavaScript without using jQuery or other external library? I would like to use JavaScript itself and then parse the data and make it an object so I could use..

Java String array: is there a size of method?

I come from a php background and in php, there is an array_size() function which tells you how many elements in the array are used. Is there a similar method for a String[] array? Thanks...

MySQL Cannot Add Foreign Key Constraint

So I'm trying to add Foreign Key constraints to my database as a project requirement and it worked the first time or two on different tables, but I have two tables on which I get an error when trying ..

String to HashMap JAVA

I have a Java Property file and there is a KEY as ORDER. So I retrieve the VALUE of that KEY using the getProperty() method after loading the property file like below.: String s = prop.getProperty("O..

How to set a fixed width column with CSS flexbox

CodePen: http://codepen.io/anon/pen/RPNpaP. I want the red box to be only 25 em wide when it's in the side-by-side view - I'm trying to achieve this by setting the CSS inside this media query: @medi..

Can't compile project when I'm using Lombok under IntelliJ IDEA

I'm trying to use Lombok in my project that I'm developing using IntelliJ IDEA 11. I've installed 3rd-party plugin for IDEA and it seems working fine because IDEA sees all autogenerated methods/fields..

Specify sudo password for Ansible

How do I specify a sudo password for Ansible in non-interactive way? I'm running Ansible playbook like this: $ ansible-playbook playbook.yml -i inventory.ini \ --user=username --ask-sudo-pass ..

How to force table cell <td> content to wrap?

Heres the entire page * wrappable is defined in a main.css file /* Wrappable cell * Add this class to make sure the text in a cell will wrap. * By default, data_table tds do not wrap. */ td.wrappable..

Maven Jacoco Configuration - Exclude classes/packages from report not working

I have a maven multi-module project and I'm using jacoco-maven for code coverage reports. Some classes should not be reported, as they're Spring configuration and I'm not interested in them. I have d..

unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.9

I am trying to run Selenium tests on Debian 7 but without success. The error is: unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.9.248316,platform=Linux 3.2.0..

How can I merge the columns from two tables into one output?

I have two tables with similar information. Let's call them items_a and items_b. They should be one, but they are coming from different sources, so they aren't. When I full-join the two table, some ro..

No Spring WebApplicationInitializer types detected on classpath

My Eclipse project is suddenly no longer deploying properly. I can't trace it to any particular change I've made to the environment. I have tested with multiple source-controlled projects and they a..

MySQL update CASE WHEN/THEN/ELSE

I am trying to update a LARGE MyISAM table (25 million records) using a CLI script. The table is not being locked/used by anything else. I figured instead of doing single UPDATE queries for each reco..

Call static method with reflection

I have several static classes in the namespace mySolution.Macros such as static class Indent{ public static void Run(){ // implementation } // other helper methods } So..

Remove URL parameters without refreshing page

I am trying to remove everything after the "?" in the browser url on document ready. Here is what I am trying: jQuery(document).ready(function($) { var url = window.location.href; url = url.sp..

Why powershell does not run Angular commands?

I have started to learn Angular but I note that powershell in Windows gives me an error whenever I make an angular command like: ng new new-app or ng serve this is the error what I got: ng : Fi..

case statement in where clause - SQL Server

I'm trying to add a case or if statement in the where clause of my SQL query. I have a table of journey times with a start and end date, and a boolean field for each day to signify where the journey h..

Get first day of week in SQL Server

I am trying to group records by week, storing the aggregated date as the first day of the week. However, the standard technique I use for rounding off dates does not appear to work correctly with week..

Using psql how do I list extensions installed in a database?

How do I list all extensions that are already installed in a database or schema from psql? See also Finding a list of available extensions that PostgreSQL ships with ..

Split a vector into chunks

I have to split a vector into n chunks of equal size in R. I couldn't find any base function to do that. Also Google didn't get me anywhere. Here is what I came up with so far; x <- 1:10 n <- 3 ..

@POST in RESTful web service

I have been trying to understand @POST in RESTful web service using Jersey. I have gone through http://www.vogella.com/articles/REST/article.html for the same and was able to get some information abou..

jQuery $.cookie is not a function

I am trying to set a cookie using jQuery: $.cookie("testCookie", "hello"); alert($.cookie("testCookie")); But when I load my page, I receive the error "$.cookie is not a function". Here is what I k..

Cannot declare instance members in a static class in C#

I have a public static class and I am trying to access appSettings from my app.config file in C# and I get the error described in the title. public static class employee { NameValueCollection app..

jQuery vs. javascript?

I recently stumbled upon some javascript forums (sadly, link is lost somewhere in the universe), where you could feel real hate against jQuery for not being... any good? Most arguments seem to make se..

Prevent screen rotation on Android

I have one of my activities which I would like to prevent from rotating because I'm starting an AsyncTask, and screen rotation makes it restart. Is there a way to tell this activity "DO NOT ROTATE th..

Conda version pip install -r requirements.txt --target ./lib

What is the conda version of this? pip install -r requirements.txt --target ./lib I've found these commands: while read requirement; do conda install --yes $requirement; done < requirements.txt..

MySQL Event Scheduler on a specific time everyday

Here's my query CREATE EVENT RESET ON SCHEDULE AT TIMESTAMP DO UPDATE `ndic`.`students` SET `status` = '0'; How can I update status to "0" at 1 pm every day. What can I use instead of TIM..

mysql-python install error: Cannot open include file 'config-win.h'

I am trying to run pip install mysql-python connector but it keeps giving me an error "Cannot open include file: 'config-win.h'". The installation works fine on my Mac and another Windows machine, bu..

XMLHttpRequest cannot load XXX No 'Access-Control-Allow-Origin' header

tl;dr; About the Same Origin Policy I have a Grunt process which initiates an instance of express.js server. This was working absolutely fine up until just now when it started serving a blank page wi..

Plotting a 3d cube, a sphere and a vector in Matplotlib

I search how to plot something with less instruction as possible with Matplotlib but I don't find any help for this in the documentation. I want to plot the following things: a wireframe cube cente..

Disable form auto submit on button click

I have a HTML form where I use several buttons. The problem is that no matter which button I click, the form will get submitted even if the button is not of type "submit". e.g. Buttons like :<butt..

What are naming conventions for MongoDB?

Is there a set of preferred naming conventions for MongoDB entitites such as databases, collections, field names? I was thinking along these lines: Databases: consist of the purpose (word in singul..

Check if string has space in between (or anywhere)

Is there a way to determine if a string has a space(s) in it? sossjjs sskkk should return true, and sskskjsk should return false. "sssss".Trim().Length does not seem to work...

If table exists drop table then create it, if it does not exist just create it

I'm stumped, I don't know how to go about doing this. Basically I just want to create a table, but if it exists it needs to be dropped and re-created, not truncated, but if it doesn't exist just crea..

The name 'InitializeComponent' does not exist in the current context

If I create a new project in Visual Studio 2010 SP1 and select "WPF Application" and tries to build the generated application, I get the error The name 'InitializeComponent' does not exist in the ..

How to change the default encoding to UTF-8 for Apache?

I am using a hosting company and it will list the files in a directory if the file index.html is not there, it uses iso-8859-1 as the default encoding. If the server is Apache, is there a way to set ..

SQL Server: UPDATE a table by using ORDER BY

I would like to know if there is a way to use an order by clause when updating a table. I am updating a table and setting a consecutive number, that's why the order of the update is important. Using t..

iPad Web App: Detect Virtual Keyboard Using JavaScript in Safari?

I'm writing a web app for the iPad (not a regular App Store app - it's written using HTML, CSS and JavaScript). Since the keyboard fills up a huge part of the screen, it would make sense to change the..

Bigger Glyphicons

How do I make bigger Glyphicons in twitter bootstrap 3.0 (not 2.3.x). This code will make my glyphicons big: <button type="button" class="btn btn-default btn-lg"> <span class="glyphicon..

Managing jQuery plugin dependency in webpack

I'm using Webpack in my application, in which I create two entry points - bundle.js for all my JavaScript files/codes, and vendors.js for all libraries like jQuery and React. What do I do in order to ..

new Runnable() but no new thread?

I'm trying to understand the code here , specifically the anonymous class private Runnable mUpdateTimeTask = new Runnable() { public void run() { final long start = mStartTime; long millis = Sy..

Creating a button in Android Toolbar

How can I create a button inside Android's Toolbar that looks like this iOS example? ..

Subtract two dates in Java

Possible Duplicate: Calculating the Difference Between Two Java Date Instances I know this might be a duplicate thread. But I am trying to figure out a way to compute the difference between..

Python: avoiding pylint warnings about too many arguments

I want to refactor a big Python function into smaller ones. For example, consider this following code snippet: x = x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 Of course, this is a trivial example. I..

Pandas df.to_csv("file.csv" encode="utf-8") still gives trash characters for minus sign

I've read something about a Python 2 limitation with respect to Pandas' to_csv( ... etc ...). Have I hit it? I'm on Python 2.7.3 This turns out trash characters for = and - when they appear in strin..

Sum values in a column based on date

I have written this function that will give me a monthly sum for two columns: one has the date of each order, one has the cost of each order. =SUMIF($C$1:$C$1000,">="&DATE(2010,6,1),$D$1:$D$10..

Add column to dataframe with constant value

I have an existing dataframe which I need to add an additional column to which will contain the same value for every row. Existing df: Date, Open, High, Low, Close 01-01-2015, 565, 600, 400, 450 N..

Call fragment from fragment

i have an activity with button on it and when a click i call the fragment with another button on fragment. but when click on fragment's button i cant call a second fragment. this is my source, pretty ..

Email & Phone Validation in Swift

i am using the following code for phone number validation. But i am getting the following error. I cant able to proceed further. Help us to take it forward. class PhoneNumberValidation: Validation { ..

Add the loading screen in starting of the android application

My app is loading the start page in 10 seconds. In that time of 10 sec android screen is blank. In that time I want to add the loading screen. How to add it? And tell me in app how to know the starti..

What is the difference between XML and XSD?

What is the difference between Extensible Markup Language (XML) and XML Schema (XSD)?..

Stop form from submitting , Using Jquery

I'm trying to stop my form from submitting if a validation fails. I tried following this previous post but I doesn't work for me. What am I missing? <input id="saveButton" type="submit" value="Sav..

Java SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'") gives timezone as IST

I have SimpleDateFormat constructor as SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'") and I am parsing string "2013-09-29T18:46:19Z". I have read that here Z represents the GMT/UTC timezone. but w..

How to get the current loop index when using Iterator?

I am using an Iterator to iterate through a collection and I want to get the current element's index. How can I do that?..

How much faster is C++ than C#?

Or is it now the other way around? From what I've heard there are some areas in which C# proves to be faster than C++, but I've never had the guts to test it by myself. Thought any of you could expl..

Android Fragment handle back button press

I have some fragments in my activity [1], [2], [3], [4], [5], [6] And on Back Button Press I must to return from [2] to [1] if current active fragment is [2], or do nothing otherwise. What is the ..

What is the use of System.in.read()?

What is the use of System.in.read() in java? Please explain this...

How to check if a number is a power of 2

Today I needed a simple algorithm for checking if a number is a power of 2. The algorithm needs to be: Simple Correct for any ulong value. I came up with this simple algorithm: private bool IsPo..

Print second last column/field in awk

I want to print the second last column or field in awk. The number of fields is variable. I know that I should be able to use $NF but not sure how it can be used. And this does not seem to work: awk..

Java keytool easy way to add server cert from url/port

I have a server with a self signed certificate, but also requires client side cert authentication. I am having a rough time trying to get the raw CA server cert so I can import it into a keystore. Any..

Remove All Event Listeners of Specific Type

I want to remove all event listeners of a specific type that were added using addEventListener(). All the resources I'm seeing are saying you need to do this: elem.addEventListener('mousedown',specif..

How do I view the list of functions a Linux shared library is exporting?

I want to view the exported functions of a shared library on Linux. What command allows me to do this? (On Windows I use the program depends)..

How to convert hex to rgb using Java?

How can I convert hex color to RGB code in Java? Mostly in Google, samples are on how to convert from RGB to hex...

SQLAlchemy create_all() does not create tables

I'm trying to integrate PostgreSQL and SQLAlchemy but SQLAlchemy.create_all() is not creating any tables from my models. My code: from flask import Flask from flask.ext.sqlalchemy import SQLAlc..

XAMPP Start automatically on Windows 7 startup

XAMPP Version 3.2.1 installed on Windows 7. It didn't get started automatically on Windows boot. Tried: looking in service, it shows neither Apache nor MySQL...

Remove all files except some from a directory

When using sudo rm -r, how can I delete all files, with the exception of the following: textfile.txt backup.tar.gz script.php database.sql info.txt ..

Can I target all <H> tags with a single selector?

I'd like to target all h tags on a page. I know you can do it this way... h1, h2, h3, h4, h5, h6 { font: 32px/42px trajan-pro-1,trajan-pro-2; } but is there a more efficient way of doing this usi..

PHP string concatenation

I need to know if its possible to concatenate strings, as follows ? and if not, what is the alternative of doing so ? while ($personCount < 10) { $result+= $personCount . "person "; } echo $resul..

Connect to mysql in a docker container from the host

(It's probably a dumb question due to my limited knowledge with Docker or mysql administration, but since I spent a whole evening on this issue, I dare to ask it.) In a nutshell I want to run mysql ..

Missing Microsoft RDLC Report Designer in Visual Studio

In Visual Studio 2015, I cannot find the designer for RDLC reports anymore. Does anyone know if this is only a bug and if it is provided later on or if Microsoft wants to kill the RDLC or if they want..

How many spaces will Java String.trim() remove?

In Java, I have a String like this: " content ". Will String.trim() remove all spaces on these sides or just one space on each?..

Best practices for SQL varchar column length

Every time is set up a new SQL table or add a new varchar column to an existing table, I am wondering one thing: what is the best value for the length. So, lets say, you have a column called name of..

How to convert a Java 8 Stream to an Array?

What is the easiest/shortest way to convert a Java 8 Stream into an array?..

SQL Server Group by Count of DateTime Per Hour?

create table #Events ( EventID int identity primary key, StartDate datetime not null, EndDate datetime not null ) go insert into #Events (StartDate, EndDate) select '2007-01-01 12:44:1..

PHP function to generate v4 UUID

So I've been doing some digging around and I've been trying to piece together a function that generates a valid v4 UUID in PHP. This is the closest I've been able to come. My knowledge in hex, decimal..

Handlebars/Mustache - Is there a built in way to loop through the properties of an object?

As the title of question says, is there a mustache/handlebars way of looping through an object properties? So with var o = { bob : 'For sure', roger: 'Unknown', donkey: 'What an ass' } Can ..

Why is git push gerrit HEAD:refs/for/master used instead of git push origin master

I've just started using gerrit and I want to know why we need to do git push gerrit HEAD:refs/for/master instead of doing git push origin master If I do git push origin master I get the error saying ..

Python conditional assignment operator

Does a Python equivalent to the Ruby ||= operator ("set the variable if the variable is not set") exist? Example in Ruby : variable_not_set ||= 'bla bla' variable_not_set == 'bla bla' variable_s..

Passing variables to the next middleware using next() in Express.js

Well, my question is I want to pass some variable from the first middleware to another middleware, and I tried doing this, but there was "req.somevariable is a given as 'undefined'". //app.js .. ap..

How can I selectively merge or pick changes from another branch in Git?

I'm using Git on a new project that has two parallel -- but currently experimental -- development branches: master: import of existing codebase plus a few modifications that I'm generally sure of exp..

Ignore .classpath and .project from Git

I keep myself telling me and others not to commit .classpath and .project files and use Maven. Somehow, Junior developers always ignore certain rules and commits those files and it's much bette..

Get the column number in R given the column name

Possible Duplicate: Get column index from label in a data frame I need to get the column number of a column given its name. Supose we have the following dataframe: df <- data.frame(a=r..

How do I import a .dmp file into Oracle?

I have a .dmp file that I would like to import into Oracle 9i. How do I do that?..

How do I post button value to PHP?

I want use A-Z buttons on a html page like shown below (only sample and few words) <INPUT TYPE="BUTTON" VALUE=" A " ONCLICK="A"> <INPUT TYPE="BUTTON" VALUE=" B " ONCLICK="B"> <INPUT TY..

Rename MySQL database

I created a database with the name of hrms. Now I need to change database name to sunhrm. But, It is disabled in MySQL workbench. Can I do that on the Linux server itself?..

Must JDBC Resultsets and Statements be closed separately although the Connection is closed afterwards?

It is said to be a good habit to close all JDBC resources after usage. But if I have the following code, is it necessary to close the Resultset and the Statement? Connection conn = null; PreparedStat..

How to add smooth scrolling to Bootstrap's scroll spy function

I've been trying to add a smooth scrolling function to my site for a while now but can't seem to get it to work. Here is my HTML code relating to my navigation: <div id="nav-wrapper"> <di..

JavaScript or jQuery browser back button click detector

Could someone please share experience / code how we can detect the browser back button click (for any type of browsers)? We need to cater all browser that doesn't support HTML5..

Difference between Eclipse Europa, Helios, Galileo

What is the difference between versions of Eclipse (Europa, Helios, Galileo)? Which is the best for desktop application?..

How to configure encoding in Maven?

When I run maven install on my multi module maven project I always get the following output: [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!..

Session variables in ASP.NET MVC

I am writing a web application that will allow a user to browse to multiple web pages within the website making certain requests. All information that the user inputs will be stored in an object that ..

python multithreading wait till all threads finished

This may have been asked in a similar context but I was unable to find an answer after about 20 minutes of searching, so I will ask. I have written a Python script (lets say: scriptA.py) and a script..

Vue.js unknown custom element

I'm a beginner with Vue.js and I'm trying to create an app that caters my daily tasks and I ran into Vue Components. So below is what I've tried but unfortunately, it gives me this error: vue.js:1..

nullable object must have a value

There is paradox in the exception description: Nullable object must have a value (?!) This is the problem: I have a DateTimeExtended class, that has { DateTime? MyDataTime; int? otherdata; }..

Web Reference vs. Service Reference

I just hit a huge brick wall with Paypal. I had created a regular C# project to create some wrapper classes using their WSDL. If you create a non-web project, the only option you get to add a wsdl i..

Cannot implicitly convert type 'string' to 'System.Threading.Tasks.Task<string>'

I am new to asynchronous programming, so after going through some async sample codes, I thought of writing a simple async code I created a simple Winform application and inside the Form I wrote the f..

GIT vs. Perforce- Two VCS will enter... one will leave

So I'm in the process of getting GIT sold at work. First thing I need is to convince everyone that GIT is better at what they're already used to doing. We currently use Perforce. Anybody else go throu..

How different is Objective-C from C++?

What are the main differences between Objective-C and C++ in terms of the syntax, features, paradigms, frameworks and libraries? *Important: My goal is not to start a performance war between the two ..

How to sort ArrayList<Long> in decreasing order?

How to sort an ArrayList<Long> in Java in decreasing order?..

Get absolute path to workspace directory in Jenkins Pipeline plugin

I'm currently doing some evaluation on the Jenkins Pipeline plugin (formerly know as Workflow plugin). Reading the documentation I found out that I currently cannot retriev the workspace path using en..

How do you connect to multiple MySQL databases on a single webpage?

I have information spread out across a few databases and want to put all the information onto one webpage using PHP. I was wondering how I can connect to multiple databases on a single PHP webpage. ..

How to insert a picture into Excel at a specified cell position with VBA

I'm adding ".jpg" files to my Excel sheet with the code below : 'Add picture to excel xlApp.Cells(i, 20).Select xlApp.ActiveSheet.Pictures.Insert(picPath).Select 'Calgulate new picture size With xlAp..

Configure nginx with multiple locations with different root folders on subdomain

I'm looking to serve the root url of a subdomain and directory of a subdomain to two different folders on my server. Here is the simple set-up that I have and is not working... server { index in..

RelativeLayout center vertical

I want to make a list row layout. This layout has a imageview in the most left, a textview right next to the imageview, and a imageview in the most right. I want all of them are center vertical. <..

Permanently add a directory to PYTHONPATH?

Whenever I use sys.path.append, the new directory will be added. However, once I close python, the list will revert to the previous (default?) values. How do I permanently add a directory to PYTHONPAT..

How to do if-else in Thymeleaf?

What's the best way to do a simple if-else in Thymeleaf? I want to achieve in Thymeleaf the same effect as <c:choose> <c:when test="${potentially_complex_expression}"> <h2>H..

Jdbctemplate query for string: EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0

I am using Jdbctemplate to retrieve a single String value from the db. Here is my method. public String test() { String cert=null; String sql = "select ID_NMB_SRZ from codb_owner..

Replace invalid values with None in Pandas DataFrame

Is there any method to replace values with None in Pandas in Python? You can use df.replace('pre', 'post') and can replace a value with another, but this can't be done if you want to replace with Non..

Cell spacing in UICollectionView

How do I set cell spacing in a section of UICollectionView? I know there is a property minimumInteritemSpacing I have set it to 5.0 still the spacing is not appearing 5.0. I have implemented the flowo..

How to normalize a 2-dimensional numpy array in python less verbose?

Given a 3 times 3 numpy array a = numpy.arange(0,27,3).reshape(3,3) # array([[ 0, 3, 6], # [ 9, 12, 15], # [18, 21, 24]]) To normalize the rows of the 2-dimensional array I thought..

How to sort a HashSet?

For lists, we use the Collections.sort(List) method. What if we want to sort a HashSet?..

Errors: "INSERT EXEC statement cannot be nested." and "Cannot use the ROLLBACK statement within an INSERT-EXEC statement." How to solve this?

I have three stored procedures Sp1, Sp2 and Sp3. The first one (Sp1) will execute the second one (Sp2) and save returned data into @tempTB1 and the second one will execute the third one (Sp3) and sav..

Git submodule update

I'm not clear on what the following means (from the Git submodule update documentation): ...will make the submodules HEAD be detached, unless --rebase or --merge is specified... How does --rebas..

Use .corr to get the correlation between two columns

I have the following pandas dataframe Top15: I create a column that estimates the number of citable documents per person: Top15['PopEst'] = Top15['Energy Supply'] / Top15['Energy Supply per Cap..

remove item from array using its name / value

I have the following array var countries = {}; countries.results = [ {id:'AF',name:'Afghanistan'}, {id:'AL',name:'Albania'}, {id:'DZ',name:'Algeria'} ]; How can I remove an item fro..

How to determine if object is in array

I need to determine if an object already exists in an array in javascript. eg (dummycode): var carBrands = []; var car1 = {name:'ford'}; var car2 = {name:'lexus'}; var car3 = {name:'maserati'}; var..

Spring Boot + JPA : Column name annotation ignored

I have a Spring Boot application with dependency spring-boot-starter-data-jpa. My entity class has a column annotation with a column name. For example: @Column(name="TestName") private String testNam..

Get Today's date in Java at midnight time

I need to create two date objects. If the current date and time is March 9th 2012 11:30 AM then date object d1 should be 9th March 2012 12:00 AM date object d2 should contain the current dat..

Proper use of errors

I'm using TypeScript for a reasonably large project, and am wondering what the standard is for the use of Errors. For example, say I hand an index out of bounds exception in Java: throw new IndexOutO..

How do I select text nodes with jQuery?

I would like to get all descendant text nodes of an element, as a jQuery collection. What is the best way to do that?..

Is there an onSelect event or equivalent for HTML <select>?

I have an input form that lets me select from multiple options, and do something when the user changes the selection. Eg, <select onChange="javascript:doSomething();"> <option>A</opt..

How to send a "multipart/form-data" with requests in python?

How to send a multipart/form-data with requests in python? How to send a file, I understand, but how to send the form data by this method can not understand...

What is a provisioning profile used for when developing iPhone applications?

What is the purpose of a provisioning profile and why is it needed when developing an iPhone application? If I don't have a provisioning profile, what happens?..

implementing merge sort in C++

I have studied the theory of the merge sort but don't have any idea of how to implement it in C++. My question is, merge sort creates arrays in recursion. But when implementing, how do we create array..

How to capture a backspace on the onkeydown event

I have a function that is triggered by the onkeydown event of a textbox. How can I tell if the user has hit either the backspace key or the del key?..

How to change the port of Tomcat from 8080 to 80?

I want to execute my web app as http://localhost...

How to submit form on change of dropdown list?

I am creating a page in JSP where I have a dropdown list and once the user selects a value he has to click on the go button and then the value is sent to the Servlet. </select> ..

Form Submit jQuery does not work

I have that form <form action="deletprofil.php" id="form_id" method="post"> <div data-role="controlgroup" data-filter="true" data-input="#filterControlgroup-input"> ..

How to add 'libs' folder in Android Studio?

I need help in creating the 'libs' folder in Android Studio for my project (It is not auto-generated in my project). When I want to create a folder, it gives me lots of options, like AIDL, Assets, JN..

How to kill a child process after a given timeout in Bash?

I have a bash script that launches a child process that crashes (actually, hangs) from time to time and with no apparent reason (closed source, so there isn't much I can do about it). As a result, I w..

SQL state [99999]; error code [17004]; Invalid column type: 1111 With Spring SimpleJdbcCall

Hi All I am using spring simple JDBC template to call the oracle procedure the below are my code. The procedure create or replace PROCEDURE get_all_system_users( pi_client_code IN VARCHAR2, po_syste..

Composer Update Laravel

A developer has sent me his project to work with, but when ever I try to update or install my vendors everything works great until the very end and it outputs the message bellow. C:\xampp\htdocs\BigW..

Send string to stdin

Is there a way to effectively do this in bash: /my/bash/script < echo 'This string will be sent to stdin.' I'm aware that I could pipe the output from the echo such as this: echo 'This string w..

How can I get the current date and time in UTC or GMT in Java?

When I create a new Date object, it is initialized to the current time but in the local timezone. How can I get the current date and time in GMT?..

How to load up CSS files using Javascript?

Is it possible to import css stylesheets into a html page using Javascript? If so, how can it be done? P.S the javascript will be hosted on my site, but I want users to be able to put in the <head..

Removing character in list of strings

If I have a list of strings such as: [("aaaa8"),("bb8"),("ccc8"),("dddddd8")...] What should I do in order to get rid of all the 8s in each string? I tried using strip or replace in a for loop but ..

How do I view the Explain Plan in Oracle Sql developer?

I have few SQL queries which has very low query running performance and I want to check the query execution plan for this query. I am trying to execute the below query but its not showing any query ex..

How to get current instance name from T-SQL

How can I get the SQL Server server and instance name of the current connection, using a T-SQL script?..

Is it possible to iterate through JSONArray?

Possible Duplicates: JSON Array iteration in Android/Java JSONArray with Java Is it possible to iterate through JSONArray object using Iterator?..

Changing an AIX password via script?

I am trying to change a password of a user via script. I cannot use sudo as there is a feature that requires the user to change the password again if another user changes their password. AIX is runni..

Jquery UI Datepicker not displaying

UPDATE I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. UPDATE END I h..

JAXB Exception: Class not known to this context

When I call a particular restful service method, which is built using CXF, I get the following error, anyone know why and how to resolve it? JAXBException occurred : class com.octory.ws.dto.Prof..

String contains another string

How can I check if a string contains another string instead of using "==" to compare the whole string? Regards..

Get json value from response

{"id":"2231f87c-a62c-4c2c-8f5d-b76d11942301"} If I alert the response data I see the above, how do I access the id value? My controller returns like this: return Json( new { id = indic..

what is Array.any? for javascript

I'm looking for a method for javascript returns true or false when it's empty.. something like Ruby any? or empty? [].any? #=> false [].empty? #=> true ..

How can I modify a saved Microsoft Access 2007 or 2010 Import Specification?

Does anyone know how to modify an existing import specification in Microsoft Access 2007 or 2010? In older versions there used to be an Advanced button presented during the import wizard that allowed..

How to import an existing directory into Eclipse?

I am on a mac, but I don't think it will make a difference. I have a directory that I want to fully import/add into Eclipse. What I did is this: Right click import General → Existing Projects ..

jQuery detect if textarea is empty

I am trying to determine if a textarea is empty if a user deletes what is already pre-populated in the textarea using jQuery. Anyway to do this? This is what I have and its not working $(textarea)...

Git push rejected after feature branch rebase

OK, I thought this was a simple git scenario, what am I missing? I have a master branch and a feature branch. I do some work on master, some on feature, and then some more on master. I end up with so..

Extract digits from a string in Java

I have a Java String object. I need to extract only digits from it. I'll give an example: "123-456-789" I want "123456789" Is there a library function that extracts only digits? Thanks for the answ..

Keystore change passwords

I currently have a keystore, with a particular password that only I should know. I now need to give access to that keystore to someone else, so I would like to either: 1) Change the password, so I ca..

using lodash .groupBy. how to add your own keys for grouped output?

I have this sample data returned from an API. I'm using Lodash's _.groupBy to convert the data into an object I can use better. The raw data returned is this: [ { "name": "jim", ..

How to split a string in Ruby and get all items except the first one?

String is ex="test1, test2, test3, test4, test5" when I use ex.split(",").first it returns "test1" Now I want to get the remaining items, i.e. `"test2, test3, test4, test5". If I use ex.spl..

Center a column using Twitter Bootstrap 3

How do I center a div of one column size within the container (12 columns) in Twitter Bootstrap 3? _x000D_ _x000D_ .centered { background-color: red; }_x000D_ <!-- Latest compiled and minified C..

..The underlying connection was closed: An unexpected error occurred on a receive

I have the following code: private Uri currentUri; private void Form1_Load(object sender, EventArgs e) { currentUri = new Uri(@"http://www.stackoverflow.com"); HttpWebRequest myRequest = (Ht..

Visual Studio: LINK : fatal error LNK1181: cannot open input file

I've been encountering a strange bug in Visual Studio 2010 for some time now. I have a solution consisting of a project which compiles to a static library, and another project which is really simple ..