Questions Tagged with #Hyperion

Hyperion is a set of performance management applications purchased by Oracle in 2007.

Git: Could not resolve host error while cloning remote repository in git

What I did: I have created a remote repository on Github and I am trying to clone the remote repository on my local machine. While cloning I am providing the clone URL & target folder. But every ..

Python Graph Library

I'm writing a python application that will make heavy use of a graph data structure. Nothing horribly complex, but I'm thinking some sort of graph/graph-algorithms library would help me out. I've goog..

Regex Email validation

I use this @"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$" regexp to validate the email ([\w\.\-]+) - this is for the first-level domain (many letters and numbers, also point and hyphen) ([\w\-]+) - th..

What is the id( ) function used for?

I read the Python 2 docs and noticed the id() function: Return the “identity” of an object. This is an integer (or long integer) which is guaranteed to be unique and constant for this object d..

Nested attributes unpermitted parameters

I have a Bill object, which has many Due objects. The Due object also belongs to a Person. I want a form that can create the Bill and its children Dues all in one page. I am trying to create a form us..

json_encode/json_decode - returns stdClass instead of Array in PHP

Observe this little script: $array = array('stuff' => 'things'); print_r($array); //prints - Array ( [stuff] => things ) $arrayEncoded = json_encode($array); echo $arrayEncoded . "<br />"..

Creating Duplicate Table From Existing Table

Possible Duplicate: SELECT INTO using Oracle I have one table in my oracle database. I want to create one table with another name, but containing same data. How to achieve this ?..

Xcode swift am/pm time to 24 hour format

I am trying to convert a am/pm format time to a 24 hour format time 6:35 PM to 18:35 I tried this piece of code on playground but it doesnt seem to work if I put the time alone let dateAsString = ..

Laravel Eloquent groupBy() AND also return count of each group

I have a table that contains, amongst other columns, a column of browser versions. And I simply want to know from the record-set, how many of each type of browser there are. So, I need to end up with ..

How to format numbers as currency string?

I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00" What's the best way to do this?..

How to break lines at a specific character in Notepad++?

I have a text file containing text like: ['22APR2012 23:10', '23APR2012 07:10', 1, 3, 0], ['22APR2012 23:10', '23APR2012 07:20', 1, 3, 0], ['22APR2012 23:15', '23APR2012 06:40', 0, 1, 0], ['22APR2012..

How to submit a form on enter when the textarea has focus?

When filling out a form's textarea, the default behavior when the enter key is hit is to move to the next line. How can I change the behavior of the form so it will submit upon user hitting enter even..

How to ignore certain files in Git

I have a repository with a file, When I compile it, an additional Hello.class file is generated. I created an entry for Hello.class in a .gitignore file. However, the file still appears t..

How to remove duplicate values from a multi-dimensional array in PHP

How can I remove duplicate values from a multi-dimensional array in PHP? Example array: Array ( [0] => Array ( [0] => abc [1] => def ) [1] => Array (..

Android Studio error: "Environment variable does not point to a valid JVM installation"

When trying to run Android Studio on my computer, I get the following error: The Environment variable JAVA_HOME (with a value of C:\Program Files(x86)\Java\jdk1.7.0_51\bin) does not point to a va..

Visual studio equivalent of java System.out

What do I use in Visual Studio (C#) to perform the equivalent of Java's System.out.println( /*stuff*/ ) ? Does the output from the command show in the Output window in the IDE? I have a button on a ..

Maven: Command to update repository after adding dependency to POM

I've added a new dependency to my POM. Is there a simple command I can run to download this dependency to my repository?..

How do I add BundleConfig.cs to my project?

I have an ASP.Net MVC project and I want to implement bundling, but everything I can find on the internet directs me to open BundleConfig.cs in App_Start - however this file does not exist in my proje..

how to change listen port from default 7001 to something different?

Can anyone tell me how to change the default listening port of Weblogic 10.3 to something different? I saw some posts on discussion boards which say that change it under ...//config/config.xml. Even I..

ERROR in ./node_modules/css-loader?

I was trying to run an angular project in windows 10. It is the same project that I am doing in Ubuntu. When I clone the repository and install all the node packages I encountered this error. ERRO..

If a folder does not exist, create it

I use a FileUploader control in my application. I want to save a file to a specified folder. If this folder does not exist, I want to first create it, and then save my file to this folder. If the fol..

How to display databases in Oracle 11g using SQL*Plus

With help of this command show databases; I can see databases in MySQL. How to show the available databases in Oracle?..

Filename too long in Git for Windows

I'm using Git-1.9.0-preview20140217 for Windows. As I know, this release should fix the issue with too long filenames. But not for me. Surely I'm doing something wrong: I did git config core.longpath..

Is there a command line utility for rendering GitHub flavored Markdown?

I'm wondering if there is a command line utility for taking a GitHub flavored Markdown file and rendering it to HTML. I'm using a GitHub wiki to create website content. I've cloned the repository on ..

Python add item to the tuple

I have some object.ID-s which I try to store in the user session as tuple. When I add first one it works but tuple looks like (u'2',) but when I try to add new one using mytuple = mytuple + got..

LISTAGG function: "result of string concatenation is too long"

I'm using Oracle SQL developer version 3.0.04. I attempted to use the function LISTAGG to group the data together.. CREATE TABLE FINAL_LOG AS SELECT SESSION_DT, C_IP, CS_USER_AGENT, lista..

CodeIgniter: 404 Page Not Found on Live Server

I have been developing a small web application with CodeIgniter. After testing it out locally I went to put it on my web server to allow a couple other people test out some features. While navigating..

How to do a subquery in LINQ?

Here's an example of the query I'm trying to convert to LINQ: SELECT * FROM Users WHERE Users.lastname LIKE '%fra%' AND Users.Id IN ( SELECT UserId FROM CompanyRolesToUsers ..

How to find prime numbers between 0 - 100?

In Javascript how would i find prime numbers between 0 - 100? i have thought about it, and i am not sure how to find them. i thought about doing x % x but i found the obvious problem with that. this i..

My prerelease app has been "processing" for over a week in iTunes Connect, what gives?

I used Xcode 6.1.1 to upload a new version of a prerelease app to iTunes Connect so I could distribute it to my external beta testers. I've done this with two versions of the same app previously and i..

PostgreSQL next value of the sequences?

I am using PostgreSQL for my Codeigniter website. I am using grocery crud for add, edit and delete operations. While doing an edit or add, I want to rename an uploaded file dynamically based on the id..

How do you specifically order ggplot2 x axis instead of alphabetical order?

I'm trying to make a heatmap using ggplot2 using the geom_tiles function here is my code below: p<-ggplot(data,aes(Treatment,organisms))+geom_tile(aes(fill=S))+ scale_fill_gradient(low = "black"..

Android TabLayout Android Design

I'm trying to get the new TabLayout in the android design library working. I'm following this post: and the docum..

Convert ndarray from float64 to integer

I've got an ndarray in python with a dtype of float64. I'd like to convert the array to be an array of integers. How should I do this? int() won't work, as it says it can't convert it to a scalar. Ch..

How can I get a value from a map?

I have a map named valueMap as follows: typedef std::map<std::string, std::string>MAP; MAP valueMap; ... // Entering data. Then I am passing this map to a function by reference: void functio..

Reverse Y-Axis in PyPlot

I have a scatter plot graph with a bunch of random x, y coordinates. Currently the Y-Axis starts at 0 and goes up to the max value. I would like the Y-Axis to start at the max value and go up to 0. p..

DateTime.Now.ToShortDateString(); replace month and day

I need to change format of this.TextBox3.Text = DateTime.Now.ToShortDateString(); so it returns (for example) 25.02.2012, but I need 02.25.2012 How can this be done?..

SQL not a single-group group function

When I run the following SQL statement: SELECT MAX(SUM(TIME)) FROM downloads GROUP BY SSN It returns the maximum sum value of downloads by a customer, however if I try to find the social security n..

When do I have to use interfaces instead of abstract classes?

I was wondering when I should use interfaces. Lets think about the following: public abstract class Vehicle { abstract float getSpeed(); } and : public interface IVehicle { float getSpeed();..

Apache and IIS side by side (both listening to port 80) on windows2003

What are some good ways to do this? Is it even possible to do cleanly? Ideally I'd like to use packet headers to decide which server should handle requests. However, if there is an easier/better way..

How can I check that JButton is pressed? If the isEnable() is not work?

How can I check that JButton is pressed? I know that there is a method that its name is "isEnabled" So I try to write a code to test. this code have 2 Jbuttons which are "Add" Button and "Checkout"..

How can I select all options of multi-select select box on click?

This is my HTML <select name="countries" id="countries" MULTIPLE size="8"> <option value="UK">UK</option> <option value="US">US</option> <option value="Canad..

what is Promotional and Feature graphic in Android Market/Play Store?

What does it mean and need whether we are uploading our app into the market? Please Explain or give me a related links...

What's the difference between primitive and reference types?

This is a past exam question and I was wondering what a primitive type and reference type are first off? With an array I know the a reference type is where the array is composed of objects or variable..

What's the difference between echo, print, and print_r in PHP?

I use echo and print_r much, and almost never use print. I feel echo is a macro, and print_r is an alias of var_dump. But that's not the standard way to explain the differences...

Removing items from a ListBox in

I have two ListBox1 and ListBox2. I have inserted items into a ListBox2 with the following code by selecting ListBox1 item: da6 = New SqlDataAdapter("select distinct(component_type) from component wh..

Change font color and background in html on mouseover

I'm using a small piece of inline HTML code to change the background of a cell color in a table on mouse hover. I use this on specific table cells only, so not all cells need this to happen. <td ..

Remove icon/logo from action bar on android

I've been trying to find some way of removing the icon/logo from the action bar but the only thing I've found after an hour of searching SO, Android's documentation and Google is how to remove the tit..

How to display default text "--Select Team --" in combo box on pageload in WPF?

In a WPF app, in MVP app, I have a combo box,for which I display the data fetched from Database. Before the items added to the Combo box, I want to display the default text such as " -- Select Tea..

Why does C++ code for testing the Collatz conjecture run faster than hand-written assembly?

I wrote these two solutions for Project Euler Q14, in assembly and in C++. They implement identical brute force approach for testing the Collatz conjecture. The assembly solution was assembled with: n..

Android SDK Manager gives "Failed to fetch URL" error when selecting repository

I'm trying to install a platform but when I open Android Manager then I click Available Software then select the repository I get this erro..

How to select all instances of selected region in Sublime Text

Is there a shortcut key or single-step menu option to find and select all instances of a highlighted selection in Sublime Text?..

How to get the system uptime in Windows?

I am using windows 7 and xp. I want to know the uptime of the system. What is the command / procedure for getting the uptime?..

How do I call the base class constructor?

latley I spent much programming in Java. There you call the class you Inherited from with super(); (you all probably know that) Now I have a class in C++ which has a default constructor which takes s..

How to write a:hover in inline CSS?

I have a case where I must write inline CSS code, and I want to apply a hover style on an anchor. How can I use a:hover in inline CSS inside the HTML style attribute? E.g. you can't reliably use CSS..

C++ String Declaring

I have been working with VB for a while now. Now I'm giving C++ a shot, i have came across strings, i cant seem to find a way to declare a string. For example in VB: Dim Something As String = "Some ..

Referencing in Visual Studio

I am beginning to look into the PowerShell model and snap-in development. The first thing I notice is to reference However in Visual Studio, the .NET tab does not hav..

'ls' in CMD on Windows is not recognized

When I tried to use list ls on a Windows command prompt, the system doesn't recognize it. I already added C:\Windows\System32 in the path...

How to select unique records by SQL

When I perform "SELECT * FROM table" I got results like below: 1 item1 data1 2 item1 data2 3 item2 data3 4 item3 data4 As you can see, there are dup records from column2 (item1 are dupped). So how ..

How do I check what version of Python is running my script?

How can I check what version of the Python Interpreter is interpreting my script?..

jQuery UI Dialog individual CSS styling

I'm looking to style a modal dialog (using UI Dialog) with unique CSS that is separate from the traditional dialog, so in essence to have two jQuery dialogs that each look different. I've styled one,..

How to loop through a checkboxlist and to find what's checked and not checked?

I'm trying to loop through items of a checkbox list. If it's checked, I want to set a value. If not, I want to set another value. I was using the below, but it only gives me checked items: foreach (D..

How to get jQuery to wait until an effect is finished?

I am sure I read about this the other day but I can't seem to find it anywhere. I have a fadeOut() event after which I remove the element, but jQuery is removing the element before it has the chance t..

Tomcat 7.0.43 "INFO: Error parsing HTTP request header"

I use Tomcat 7.0.43 with a websocket application. My app works fine in Tomcat 7.0.42 but with 43 I get the following output when I try to access my server on websockets: Sep 16, 2013 3:08:34 AM org.a..

pip install returning invalid syntax

I've just installed python 3.6 which comes with pip However, in Windows command prompt, when I do: 'pip install bs4' it returns 'SyntaxError: invalid syntax' under the install word. Typing 'python' ..

How to make return key on iPhone make keyboard disappear?

I have two UITextFields (e.g. username and password) but I cannot get rid of the keyboard when pressing the return key on the keyboard. How can I do this? ..

Reason: no suitable image found

dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /var/mobile/Containers/Bundle/Application/3FC2DC5C-A908-42C4-8508-1320E01E0D5B/ Reason: no suitable image fo..

Installation of VB6 on Windows 7 / 8 / 10

I have been having problems installing VB6 on Windows 7. I realize it is a legacy IDE and my research on the net hasn't been that much of help. Every time I attempt to install VB6 on Windows 7, beside..

How to properly override clone method?

I need to implement a deep clone in one of my objects which has no superclass. What is the best way to handle the checked CloneNotSupportedException thrown by the superclass (which is Object)? A cow..

How to select first and last TD in a row?

How can you select the first and the last TD in a row? tr > td[0], tr > td[-1] { /* styles */ } ..

Parsing JSON from XmlHttpRequest.responseJSON

I'm trying to parse a JSON response in javascript. I get the JSON via XmlHttpRequest. var req = new XMLHttpRequest; req.overrideMimeType("application/json");'GET', BITLY_CREATE_..

Best way to select random rows PostgreSQL

I want a random selection of rows in PostgreSQL, I tried this: select * from table where random() < 0.01; But some other recommend this: select * from table order by random() limit 1000; I ha..

HashMap to return default value for non-found keys?

Is it possible to have a HashMap return a default value for all keys that are not found in the set?..

shuffling/permutating a DataFrame in pandas

What's a simple and efficient way to shuffle a dataframe in pandas, by rows or by columns? I.e. how to write a function shuffle(df, n, axis=0) that takes a dataframe, a number of shuffles n, and an ax..

Error - "UNION operator must have an equal number of expressions" when using CTE for recursive selection

At this moment I have a table tblLocation with columns ID, Location, PartOfID. The table is recursively connected to itself: PartOfID -> ID My goal is to have a select output as followed: > F..

How to find and return a duplicate value in array

arr is array of strings: ["hello", "world", "stack", "overflow", "hello", "again"] What would be an easy and elegant way to check if arr has duplicates, and if so, return one of them (no matter whi..

What is the difference between `throw new Error` and `throw someObject`?

I want to write a common error handler which will catch custom errors thrown on purpose at any instance of the code. When I did throw new Error('sample') like in the following code try { throw n..

Sorting 1 million 8-decimal-digit numbers with 1 MB of RAM

I have a computer with 1 MB of RAM and no other local storage. I must use it to accept 1 million 8-digit decimal numbers over a TCP connection, sort them, and then send the sorted list out over anothe..

phpMyAdmin access denied for user 'root'@'localhost' (using password: NO)

I am unable to connect to my MySQL in xampp I have this error: MySQL said: Documentation 1045 - Access denied for user 'root'@'localhost' (using password: NO) mysqli_real_connect(): (HY0..

Accessing items in an collections.OrderedDict by index

Lets say I have the following code: import collections d = collections.OrderedDict() d['foo'] = 'python' d['bar'] = 'spam' Is there a way I can access the items in a numbered manner, like: d(0) #..

How to change a PG column to NULLABLE TRUE?

How can I accomplish this using Postgres? I've tried the code below but it doesn't work: ALTER TABLE mytable ALTER COLUMN mycolumn BIGINT NULL; ..

Get the name of an object's type

Is there a JavaScript equivalent of Java's class.getName()?..

How to fit in an image inside span tag?

I have an image inside a span tag. But the problem is the image doesn't fit inside the span tag. Instead a part of the image goes out of the span tag. <span style="padding-right:3px; padd..

Android Studio Gradle Already disposed Module

I have installed Android Studio version 1.0.1. I have imported my projects from eclipse and it works fine. Then I deleted a module and reimported it into my Android Studio project. The gradle build sa..

Expanding a parent <div> to the height of its children

I have a page structure similar to this: <body> <div id="parent"> <div id="childRightCol"> /*Content*/ </div> <div id="childLeftCol"> /*Content..

C# Clear Session

Question #1 I want to know when am I supposed to use: Session.Abandon() // When I use this during tracing and after calling it- I find the session still has a value. And when am I supposed to ..

Python - How to concatenate to a string in a for loop?

I need to "concatenate to a string in a for loop". To explain, I have this list: list = ['first', 'second', 'other'] And inside a for loop I need to end with this: endstring = 'firstsecondother' ..

How to check if a std::thread is still running?

How can I check if a std::thread is still running (in a platform independent way)? It lacks a timed_join() method and joinable() is not meant for that. I thought of locking a mutex with a std::lock_g..

How to center body on a page?

I'm trying to center the body element on my HTML page. Basically, in the CSS I set the body element to be display: inline-block; so that it is only as wide as its contents. That works fine. However..

failed to load ad : 3

I'm setting an ad to my Android application using DoubleClick and can't manage to show the final ad, can someone help me? When I test an ad by adding ".addTestDevice("xxx...")" I g..

Create a date from day month and year with T-SQL

I am trying to convert a date with individual parts such as 12, 1, 2007 into a datetime in SQL Server 2005. I have tried the following: CAST(DATEPART(year, DATE)+'-'+ DATEPART(month, DATE) +'-'+ DATE..

Rails Active Record find(:all, :order => ) issue

I seem to be unable to use the ActiveRecord::Base.find option :order for more than one column at a time. For example, I have a "Show" model with date and attending columns. If I run the following c..

Excel Formula to SUMIF date falls in particular month

I have excel data in following format. Date Amount 03-Jan-13 430.00 25-Jan-13 96.00 10-Jan-13 440.00 28-Feb-13 72.10 28-Feb-13 72.30 I need to sum the amount field only if the..

How to generate the JPA entity Metamodel?

In the spirit of type safety associated with the CriteriaQuery JPA 2.0 also has an API to support Metamodel representation of entities. Is anyone aware of a fully functional implementation of this A..

Show pop-ups the most elegant way

I have this AngularJS app. Everything works just fine. Now I need to show different pop-ups when specific conditions become true, and I was wondering what would be the best way to proceed. Currently..

Convert digits into words with JavaScript

I am making a code which converts the given amount into words, heres is what I have got after googling. But I think its a little lengthy code to achieve a simple task. Two Regular Expressions and two ..

Select option padding not working in chrome

Select option padding not working in chrome <style> select option { padding:5px 0px; } </style> <select> <option>1</option> <option>2</option> <option..

Docker-Compose persistent data MySQL

I can't seem to get MySQL data to persist if I run $ docker-compose down with the following .yml version: '2' services: # other services data: container_name: flask_data image: mysql:lat..

Launch custom android application from android browser

Can anybody please guide me regarding how to launch my android application from the android browser? ..

JavaScript - Get minutes between two dates

If I have two dates, how can I use JavaScript to get the difference between the two dates in minutes?..

Open JQuery Datepicker by clicking on an image w/ no input field

I want to have the JQuery Datepicker open when the user clicks on an image. There is no input field where the selected date appears afterwards; I'm just going to save the entered date to the server vi..

How to create a jQuery plugin with methods?

I'm trying to write a jQuery plugin that will provide additional functions/methods to the object that calls it. All the tutorials I read online (have been browsing for the past 2 hours) include, at th..

How to generate all permutations of a list?

How do you generate all the permutations of a list in Python, independently of the type of elements in that list? For example: permutations([]) [] permutations([1]) [1] permutations([1, 2]) [1, 2]..

git stash blunder: git stash pop and ended up with merge conflicts

I did a git stash pop and ended up with merge conflicts. I removed the files from the file system and did a git checkout as shown below, but it thinks the files are still unmerged. I then tried replac..

Determine Whether Two Date Ranges Overlap

Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges overlap? As an example, suppose we have ranges denoted by DateTime variables StartDate1 to E..

How to correctly use the ASP.NET FileUpload control

I'm trying to use the FileUpload control in ASP.NET Here's my current namespace setup: using System; using System.IO; using System.Collections.Generic; using System.Linq; using System.Text; using S..

In bootstrap how to add borders to rows without adding up?

I'm using bootstrap version 3.0.1 to make a grid and when I add a border to the rows of the grid I can see that the rows that are together add up there borders, I get a thicker border. This is my cod..

What is the best way to delete a component with CLI

I tried using "ng destroy component foo" and it tells me "The destroy command is not supported by Angular-CLI" How do we properly delete components with Angular CLI?..

round() for float in C++

I need a simple floating point rounding function, thus: double round(double); round(0.1) = 0 round(-0.1) = 0 round(-0.9) = -1 I can find ceil() and floor() in the math.h - but not round(). Is it..

Substitute multiple whitespace with single whitespace in Python

I have this string: mystring = 'Here is some text I wrote ' How can I substitute the double, triple (...) whitespace chracters with a single space, so that I get: mystring = 'Here is s..

How to use random in BATCH script?

How to use random in BATCH script?..

Convert NULL to empty string - Conversion failed when converting from a character string to uniqueidentifier

Using SQL Server 2005 how do I get the below statement or rather the output as i want it to be. SELECT Id 'PatientId', ISNULL(ParentId,'') 'ParentId' FROM Patients ParenId is a uniqueiden..

Visual C++: How to disable specific linker warnings?

I'm using a library from CGAL which during the linking stage of my code compilation produces a lot of linking warnings of this form: warning LNK4099: PDB 'vc80.pdb' was not found with 'gmp-vc80-mt-sg..

Check if a column contains text using SQL

I have a column which is called studentID, but I have millions of records and somehow the application has input some arbitrary text in the column. How do I search: SELECT * FROM STUDENTS WHERE ST..

Conversion failed when converting date and/or time from character string while inserting datetime

I was trying to create a table as follows, create table table1(date1 datetime,date2 datetime); First I tried inserting values as below, insert into table1 values('21-02-2012 6:10:00 PM','01-01-200..

Chart won't update in Excel (2007)

I have an Excel document (2007) with a chart (Clustered Column) that gets its Data Series from cells containing calculated values The calculated values never change directly, but only as a result of ..

swift 3.0 Data to String?

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {} I want deviceToken to string but: let str = String.init(data: deviceToken, enc..

Compiling a java program into an executable

Possible Duplicate: How do I create an .exe for a Java program? I've just made a simple program with Eclipse and I want to compile it into an executable, but simply can't seem to find out h..

Integration Testing POSTing an entire object to Spring MVC controller

Is there a way to pass an entire form object on mock request when integration testing a spring mvc web app? All I can find is to pass each field separately as a param like this: mockMvc.perform(post(..

Preloading images with jQuery

I'm looking for a quick and easy way to preload images with JavaScript. I'm using jQuery if that's important. I saw this here ( function complexLoad(config, fileNames) { for..

What does "var" mean in C#?

In C#, how does keyword var work?..

How to prevent "The play() request was interrupted by a call to pause()" error?

I made a website where if the user clicks, it plays a sound. To prevent the sound from overlapping, I had to add the code: n.pause(); n.currentTime = 0;; But that causes the error: The pl..

?: operator (the 'Elvis operator') in PHP

I saw this today in some PHP code: $items = $items ?: $this->_handle->result('next', $this->_result, $this); I'm not familiar with the ?: operator being used here. It looks like a ternary ..

numpy array TypeError: only integer scalar arrays can be converted to a scalar index

i=np.arange(1,4, a=np.arange(9).reshape(3,3) and a >>>array([[0, 1, 2], [3, 4, 5], [6, 7, 8]]) a[:,0:1] >>>array([[0], [3], [6..

org.glassfish.jersey.servlet.ServletContainer ClassNotFoundException

I have been getting a ClassNotFoundException with org.glassfish.jersey.servlet.ServletContainer but it peculiarly started last night when I tried to start/re-start my Tomcat server (v7) with Eclipse J..

Invalid length parameter passed to the LEFT or SUBSTRING function

I've seen a few of these questions asked but haven't spotted one that's helped!! I'm trying to select the first part of a postcode only, essentially ignoring anything after the space. the code i am us..

Linq to SQL how to do "where [column] in (list of values)"

I have a function where I get a list of ids, and I need to return the a list matching a description that is associated with the id. E.g.: public class CodeData { string CodeId {get; set;} str..

How to save Excel Workbook to Desktop regardless of user?

I have an Excel Workbook that on Form Button click I need to save a copy of the workbook to the user's Desktop. Originally everything was going to be on a shared Network folder, but now I have about ..

How to fetch data from local JSON file on react native?

How can I store local files such as JSON and then fetch the data from controller?..

How do I comment out a block of tags in XML?

How do I comment out a block of tags in XML? I.e. How can I comment out <staticText> and everything inside it, in the code below? <detail> <band height="20"> <static..

How do you create a yes/no boolean field in SQL server?

What is the best practice for creating a yes/no i.e. Boolean field when converting from an access database or in general?..

Remove "whitespace" between div element

This is my HTML code <div id="div1"> <div></div><div></div><div></div><br/><div></div><div></div><div></d..

How can I remove the last character of a string in python?

I have a file path as a string and trying to remove the last '/' from the end. my_file_path = '/home/ro/A_Python_Scripts/flask-auto/myDirectory/scarlett Johanson/1448543562.17.jpg/' I've been tryin..

Python `if x is not None` or `if not x is None`?

I've always thought of the if not x is None version to be more clear, but Google's style guide and PEP-8 both use if x is not None. Is there any minor performance difference (I'm assuming not), and is..

Get and Set Screen Resolution

How can I collect and change screen resolution using Visual C#?..

How to get page content using cURL?

I would like to scrape the content of this Google search result page using curl. I've been trying setting different user agents, and setting other options but I just can't seem to get the content of t..

Converting pfx to pem using openssl

How to generate a .pem CA certificate and client certificate from a PFX file using OpenSSL...

Oracle: how to INSERT if a row doesn't exist

What is the easiest way to INSERT a row if it doesn't exist, in PL/SQL (oracle)? I want something like: IF NOT EXISTS (SELECT * FROM table WHERE name = 'jonny') THEN INSERT INTO table VALUES ("jon..

C# getting its own class name

If I have a class called MyProgram, is there a way of retrieving "MyProgram" as a string?..

Replace last occurrence of a string in a string

Anyone know of a very fast way to replace the last occurrence of a string with another string in a string? Note, the last occurrence of the string might not be the last characters in the string. Examp..

How to copy directories with spaces in the name

I am trying to use robocopy but am unable to make it work because of spaces in the directory names. I am trying to copy 3 directories: My Documents, My Music and My Pictures to 'C:\test-backup' but wa..

pass post data with window.location.href

When using window.location.href, I'd like to pass POST data to the new page I'm opening. is this possible using JavaScript and jQuery?..

How can I connect to MySQL in Python 3 on Windows?

I am using ActiveState Python 3 on Windows and wanted to connect to my MySQL database. I heard that mysqldb was the module to use. I can't find mysqldb for Python 3. Is there a repository available w..

php $_GET and undefined index

A new problem has arisen for me as I tried to run my script on a different PHP Server. ON my old server the following code appears to work fine - even when no s parameter is declared. <?php if..

What does the "at" (@) symbol do in Python?

I'm looking at some Python code which used the @ symbol, but I have no idea what it does. I also do not know what to search for as searching Python docs or Google does not return relevant results when..

How do I detect "shift+enter" and generate a new line in Textarea?

Currently, if the person presses enter inside the text area, the form will submit. Good, I want that. But when they type shift + enter, I want the textarea to move to the next line: \n How can I do..

List comprehension on a nested list?

I have this nested list: l = [['40', '20', '10', '30'], ['20', '20', '20', '20', '20', '30', '20'], ['30', '20', '30', '50', '10', '30', '20', '20', '20'], ['100', '100'], ['100', '100', '100', '100'..

javascript - pass selected value from popup window to parent window input box

I am building an order form with PHP and MySQL. The PHP Form has an input box where the user types in a product code. In the event that the user does not know the product code, I want them to click o..

You are trying to add a non-nullable field 'new_field' to userprofile without a default

I know that from Django 1.7 I don't need to use South or any other migration system, so I am just using simple command python makemigrations However, all I get is this error: You are tryi..

python exception message capturing

import ftplib import urllib2 import os import logging logger = logging.getLogger('ftpuploader') hdlr = logging.FileHandler('ftplog.log') formatter = logging.Formatter('%(asctime)s %(levelname)s %(mess..

How to Identify Microsoft Edge browser via CSS?

I'm developing web application and I need to identify Microsoft Edge's browser separately from others, to apply unique styling. Is there a way to identify Edge by using CSS? Just like, <!--[if IE ..

Is there any JSON Web Token (JWT) example in C#?

I feel like I'm taking crazy pills here. Usually there's always a million library and samples floating around the web for any given task. I'm trying to implement authentication with a Google "Service ..

How do I iterate over a range of numbers defined by variables in Bash?

How do I iterate over a range of numbers in Bash when the range is given by a variable? I know I can do this (called "sequence expression" in the Bash documentation): for i in {1..5}; do echo $i; d..

How to check if directory exist using C++ and winAPI

How do I check whether a directory exists using C++ and windows API?..

How to install a Python module via its in Windows?

I downloaded dateutil which comes with a file but it throws an error when I try to open it. What's the proper way to install this module? This is the error: error: no commands supplied ..

vue.js 'document.getElementById' shorthand

Does vue.js have a shorthand for document.getElementById('#id') like JQuery's $('#id')? If so, where is the reference for this in the docs so I can locate other information?..

How can I fix the Microsoft Visual Studio error: "package did not load correctly"?

I installed Visual Studio 2012 and DevExpress 13.1. As Visual Studio started, it generated an error shown by this attached image, The 'Microsoft.VisualStudio.Editor.Implementation.Editor..

JavaScript function to add X months to a date

I’m looking for the easiest, cleanest way to add X months to a JavaScript date. I’d rather not handle the rolling over of the year or have to write my own function. Is there something built in t..

How to rotate x-axis tick labels in Pandas barplot

With the following code: import matplotlib'ggplot') import matplotlib.pyplot as plt import pandas as pd df = pd.DataFrame({ 'celltype':["foo","bar","qux","woz"], 's1':[5,9,1,7]..

How to enable scrolling on website that disabled scrolling?

How to quickly re-enable scrolling on a website that has disabled scrolling with Javascript? window.scrollBy(0, 100) works fine just can't seem to figure out how to bind this to keys or mouse scroll...

Get week of year in JavaScript like in PHP

How do I get the current weeknumber of the year, like PHP's date('W')? It should be the ISO-8601 week number of year, weeks starting on Monday...

How to exit from ForEach-Object in PowerShell

I have the following code: $project.PropertyGroup | Foreach-Object { if($_.GetAttribute('Condition').Trim() -eq $propertyGroupConditionName.Trim()) { $a = $project.RemoveChild($_); ..

HTML 5 Video "autoplay" not automatically starting in CHROME

I have the following code: <video controls autoplay> <source src="video/myVideo.mp4" type="video/mp4"> <source src="video/myVideo.webm" type="video/webm"> <source src="vid..

Padding zeros to the left in postgreSQL

I am relatively new to PostgreSQL and I know how to pad a number with zeros to the left in SQL Server but I'm struggling to figure this out in PostgreSQL. I have a number column where the maximum num..

Maintain/Save/Restore scroll position when returning to a ListView

I have a long ListView that the user can scroll around before returning to the previous screen. When the user opens this ListView again, I want the list to be scrolled to the same point that it was pr..


I apologize, but this is kind of a two part question. I'm extremely new to SQL and am trying to develop a time clock application for the small office that I work in. I'm playing around with the SQL b..

Margin while printing html page

I am using a separate style-sheet for printing. Is it possible to set right and left margin in the style-sheet which set the print margin (i.e. margin on paper). Thanks. ..

Reading Xml with XmlReader in C#

I'm trying to read the following Xml document as fast as I can and let additional classes manage the reading of each sub block. <ApplicationPool> <Accounts> <Account> ..

How to declare and initialize a static const array as a class member?

Pretty self-explanatory. The array is of an integral type, the contents are known and unchanging, and C++0x isn't allowed. It also needs to be declared as a pointer. I just can't seem to find a syn..

How to write multiple conditions in with "else if"

I want to compile my project with autoconf/automake. There are 2 conditions defined in my AM_CONDITIONAL(HAVE_CLIENT, test $enable-client -eq 1) AM_CONDITIONAL(HAVE_SERVER, test $enable-..

Is there an easy way to convert jquery code to javascript?

Is there an easy way to convert jQuery code to regular javascript? I guess without having to access or understand the jQuery source code...

Exponentiation in Python - should I prefer ** operator instead of math.pow and math.sqrt?

In my field it's very common to square some numbers, operate them together, and take the square root of the result. This is done in pythagorean theorem, and the RMS calculation, for example. In numpy..

PHP: HTML: send HTML select option attribute in POST

I want to send the selected item value along with some attribute (stud_name) value. Is there any functionality in PHP to do so? Here is the example one. <form name="add"> Age: ..

Best way to handle multiple constructors in Java

I've been wondering what the best (i.e. cleanest/safest/most efficient) way of handling multiple constructors in Java is? Especially when in one or more constructors not all fields are specified: pub..

Escape regex special characters in a Python string

Does Python have a function that I can use to escape special characters in a regular expression? For example, I'm "stuck" :\ should become I\'m \"stuck\" :\\...

What is the difference between connection and read timeout for sockets?

3 questions: What is the difference between connection and read timeout for sockets? What does connection timeout set to "infinity" mean? In what situation can it remain in an infinitive loop? and w..

How to make Twitter Bootstrap tooltips have multiple lines?

I am currently using the below function to create text that will be displayed using Bootstrap’s tooltip plugin. How come multiline tooltips only work with <br> and not \n? I prefer that there ..

How to check if a registry value exists using C#?

How to check if a registry value exists by C# code? This is my code, I want to check if 'Start' exists. public static bool checkMachineType() { RegistryKey winLogonKey = Registry.LocalMachine.Ope..

Get the ID of a drawable in ImageView

I have one ImageView and set a drawable on it. Now I need to get the ID of the drawable on click event of ImageView dynamically. How can I get it? imgtopcolor = (ImageView) findViewById(

Python extract pattern matches

Python 2.7.1 I am trying to use python regular expression to extract words inside of a pattern I have some string that looks like this someline abc someother line name my_user_name is valid some mor..

org.springframework.beans.factory.BeanCreationException: Error creating bean with name

I'm having the following error: 11/Ago/2011 14:04:48 org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production..

How to cherry-pick from a remote branch?

I'm having trouble performing a cherry-pick. On my local machine, I'm currently on my "master" branch. I want to cherry-pick in a commit from another branch, named "zebra". The "zebra" branch is a rem..

HTML5 Canvas Rotate Image

jQuery('#carregar').click(function() { var canvas = document.getElementById('canvas'); var image = document.getElementById('image'); var element = canvas.getContext("2d"); eleme..

What is the difference between the GNU Makefile variable assignments =, ?=, := and +=?

Can anybody give a clear explanation of how variable assignment really works in Makefiles. What is the difference between : VARIABLE = value VARIABLE ?= value VARIABLE := value VARIABLE += valu..

Change Tomcat Server's timeout in Eclipse

When I try to run my Tomcat I get a message: Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server e..

How to set a variable inside a loop for /F

I made this code dir /B /S %RepToRead% > %FileName% for /F "tokens=*" %%a in ('type %FileName%') do ( set z=%%a echo %z% echo %%a ) echo %%a is working fine but echo %z% returns "ec..

What does 'index 0 is out of bounds for axis 0 with size 0' mean?

I am new to both python and numpy. I ran a code that I wrote and I am getting this message: 'index 0 is out of bounds for axis 0 with size 0' Without the context, I just want to figure out what this m..

Print DIV content by JQuery

suppose i have many div's in my page but i want to print the content of specific div using jquery. i found there is a plugin for that. jQuery Print Element using this plugin we can easily print div ..

How to find my Subversion server version number?

I want to know if my server is running Subversion 1.5. How can I find that out? Also would be nice to know my SVN client version number. svn help hasn't been helpful. Note: I don't want my project'..

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2)

I'm getting this error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2) even though I have managed to start mysql via command line in ubuntu ..

Dictionary of dictionaries in Python?

From another function, I have tuples like this ('falseName', 'realName', positionOfMistake), eg. ('Milter', 'Miller', 4). I need to write a function that make a dictionary like this: D={realName:{fal..

How do I replace a character at a particular index in JavaScript?

I have a string, let's say Hello world and I need to replace the char at index 3. How can I replace a char by specifying a index? var str = "hello world"; I need something like str.replaceAt(0,"h"..

How to determine a user's IP address in node

How can I determine the IP address of a given request from within a controller? For example (in express):'/get/ip/address', function (req, res) { // need access to IP address here }) ..

blur vs focusout -- any real differences?

Is there any difference between JS events blur vs focusout? I have two textboxes: pwd and confirm pwd. I want to check password match when user tabs out of the confirm pwd textbox, for example. In th..

Append a single character to a string or char array in java?

Is it possible to append a single character to the end of array or string in java. Example: private static void /*methodName*/ () { String character = "a" String otherStr..

How do I get a div to float to the bottom of its container?

I have floated images and inset boxes at the top of a container using float:right (or left) many times. Recently I hit a need to float a div at the bottom right corner of another div with the normal t..

Converting String to Int using try/except in Python

So I'm pretty stumped on how to convert a string into an int using the try/except function. Does anyone know a simple function on how to do this? I feel like I'm still a little hazy on string and ints..

Difference between "enqueue" and "dequeue"

Can somebody please explain the main differences? I don't have a clear knowledge about these functions in programming for any language...

javac : command not found

I have installed java in my CentOS release 5.5 machine using the command yum install java. But I am unable to compile a class using javac. Do I need to install any other package? I have tried to lo..

MySQL: How to copy rows, but change a few fields?

I have a large number of rows that I would like to copy, but I need to change one field. I can select the rows that I want to copy: select * from Table where Event_ID = "120" Now I want to copy al..

What is the suggested way to install brew, node.js, io.js, nvm, npm on OS X?

I am trying to use homebrew as much as possible. What's the suggested way to install the following on OS X? node.js io.js nvm npm and hopefully supports development for: ionic ngCordova ..