Questions Tagged with #Vertica

Vertica is a column-based database that runs on clusters of Linux servers. The Vertica Analytics Platform was part of HP Software's Big Data Platform called HP Haven and moved to Micro Focus. It is also available as a SaaS based solution called Vertica OnDemand. See the "hp-haven" tag for more related questions.

Highlight Anchor Links when user manually scrolls?

I apologize for the long post. I wanted to include everything that might be helpful. I have a single page website that consists of several divs stacked vertically. I'm using a floating nav bar and so..

strange error in my Animation Drawable

A strange error when trying to start Activity. i think the error in my Animation Drawable LogCat: 12-31 06:37:45.138: E/AndroidRuntime(922): FATAL EXCEPTION: main 12-31 06:37:45.138: E/Andr..

Uncaught Invariant Violation: Too many re-renders. React limits the number of renders to prevent an infinite loop

I'm trying to add a snackBar in order to display a message whenever a user signIn or not. SnackBar.jsx: import React from "react"; import PropTypes from "prop-types"; import classNames from "classnam..

Flutter: RenderBox was not laid out

I'm trying to create a ListView but when I import the list_form.dart class i get this error. Maybe I made some mistakes with the layout because if I try to run it inside the main file I don't get this..

Center content vertically on Vuetify

Is there a way to center content vertically in Vuetify? With the text-xs-center helper class, the content gets centered horizontally only: <v-container grid-list-md text-xs-center> <v-lay..

Flutter - The method was called on null

I'm programming an app that displays two media streams in the same view via one horizontal listView and one vertical listView. I'm currently working on implementing information into the bottom listVie..

Flutter : Vertically center column

How to vertically center a column in Flutter? I have used widget "new Center". I have used widget "new Center", but it does not vertically center my column ? Any ideas would be helpful.... @override ..

Flutter: Setting the height of the AppBar

How can I simply set the height of the AppBar in Flutter? The title of the bar should be staying centered vertically (in that AppBar)...

How do I center text vertically and horizontally in Flutter?

I'd like to know how to center the contents of a Text widget vertically and horizontally in Flutter. I only know how to center the widget itself using Center(child: Text("test")) but not the..

Failed linking file resources

This is the java file that is giving the error package com.example.daksh.timetable; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import androi..

How to Set/Update State of StatefulWidget from other StatefulWidget in Flutter?

For Example in the below code plus button works and able to update the text but the minus button does not. But if we press FloatingActionButton then the State is refreshed . The minus button is chang..

No provider for HttpClient

After upgrading from angular 4.4 to 5.0 and after updating all HttpModule and Http to HttpClientModule I started to get this error. I also added HttpModule again to be sure it's not due to some depe..

How to create a stacked bar chart for my DataFrame using seaborn?

I have a DataFrame df: df = pd.DataFrame(columns=["App","Feature1", "Feature2","Feature3", "Feature4","Feature5", "Feature6","Feature7","Feature8..

Bootstrap 4 - Inline List?

I migrated a site from Bootstrap 4 alpha 6 to Bootstrap 4 Beta 1. <ul class="nav navbar-nav list-inline"> <li class="list-inline-item"><a class="social-icon text-xs-center" target="..

Constraint Layout Vertical Align Center

How to vertically align and center objects in constraint layout? It is possible to align vertically or horizontally but I have not found a way to center at the same time beside constraining the views ..

Flutter - Wrap text on overflow, like insert ellipsis or fade

I'm trying to create a line in which center text has a maximum size, and if the text content is too large, it fits in size. I insert the TextOverflow.ellipsis property to shorten the text and inserti..

Failed to load AppCompat ActionBar with unknown error in android studio

Below is my xml file. In preview there is two error'Failed to load AppCompat ActionBar with unknown error' & 'Failed to instaniate more than one class'. How ever am able to run the app.But the app..

Error: the entity type requires a primary key

I would like to expand the question asked on this thread Binding listbox to observablecollection by giving it an ability to persistent the data. The structure is mostly the same except I installed E..

Bootstrap 4 Center Vertical and Horizontal Alignment

I have a page where only form exists and I want form to be placed in the center of the screen. <div class="container"> <div class="row justify-content-center align-items-center"> &l..

Vertical Align Center in Bootstrap 4

I am trying to center my Container in the middle of the page using Bootstrap 4. I have been unsuccessful thus far. Any help would be appreciated. I have built it at Codepen.io so you guys can play wi..

VSCode: How to Split Editor Vertically

In Visual Studio code, a while ago, when I used View->Split Editor, it would split vertically. (One file on the left and one file on the right.) I updated Visual Studio Code and when when I do View->..

Simple Android RecyclerView example

I've made a list of items a few times using Android's RecyclerView, but it is a rather complicated process. Going through one of the numerous tutorials online works (this, this, and this are good), bu..

Sublime text 3. How to edit multiple lines?

I was using Notepad++ and now I want to use the same cool features in Sublime but I don't know how. I want to edit multiple lines at the same time like this: But I don't want to Ctrl+Click at each ..

how to set start value as "0" in chartjs?

here is my code. i need to set initial value as "0" in both x and y axis scales. I have tried latest version scales option. graphOptions = { ///Boolean - Whether grid l..

This view is not constrained vertically. At runtime it will jump to the left unless you add a vertical constraint

New Layout editor in Android Studio 2.2 keeps showing this error on views like EditText and Buttons. kindly help.Also, any links that help in onboarding with the new constraint layout would be appreci..

ReactNative: how to center text?

How to center Text in ReactNative both in horizontal and vertical? I have an example application in rnplay.org where justifyContent="center" and alignItems="center" is not working: https://rnplay.or..

Change Spinner dropdown icon

The solutions I found to change the spinner dropdown icon where all: 1. create a custom drawable <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/a..

CSS3 100vh not constant in mobile browser

I have a very odd issue... in every browser and mobile version I encountered this behavior: all the browsers have a top menu when you load the page (showing the address bar for example) which slide ..

How to draw a line with matplotlib?

I cannot find a way to draw an arbitrary line with matplotlib Python library. It allows to draw horizontal and vertical lines (with matplotlib.pyplot.axhline and matplotlib.pyplot.axvline, for exampl..

How to remove title bar from the android activity?

Can someone please help me with the issue.I want my activity as full screen and want to remove title from the screen.I have tried several ways but not able to remove it. Activity Code : public clas..

How to add colored border on cardview?

I am new to Android and this is my first question here. I am trying to add a colored vertical border at the beginning of the cardview. How can I achieve it on xml ? I tried adding it with empty textv..

android: data binding error: cannot find symbol class

I am getting started for using DataBinding feature. I am facing problem with it. Error:(21, 9) error: cannot find symbol class ContactListActivityBinding build.gradle(Module: app) apply plugi..

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

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

How to add a recyclerView inside another recyclerView

I'm planning to develop an app that shows some dynamic data inside a recyclerCardView. So i decided add a recyclerView called CheckBoxRecyclerView inside my main recyclerView. This is my code for my a..

android : Error converting byte to dex

So, I am getting the following error while running the project after upgrading build.gradle (Project) from dependencies { classpath 'com.android.tools.build:gradle:2.0.0-alpha2' // N..

Bootstrap 4 - Responsive cards in card-columns

I'm playing with Bootstrap 4 and I can't find a solution to add responsiveness to cards while in a div with class="card-columns" (this class applies a Masonry-like effect to the cards inside..

RecyclerView - Get view at particular position

I have an activity with a RecyclerView and an ImageView. I am using the RecyclerView to show a list of images horizontally. When I click on an image in the RecyclerView the ImageView in the activity s..

Chrome / Safari not filling 100% height of flex parent

I want to have a vertical menu with a specific height. Each child must fill the height of the parent and have middle-aligned text. The number of children is random, so I have to work with dynamic va..

In android how to set navigation drawer header image and name programmatically in class file?

In android studio 1.4.1, I have created new Navigation Drawer Project which is default.My issue is in this project there is nav_header_main.xml file which is for navigation header image and name. I wa..

Shrink to fit content in flexbox, or flex-basis: content workaround?

I have a webapp with which I'm using flexbox for layout. I'm trying to both fill the screen (it's an app, not a document), and as far as possible to not specify any fixed widths or heights as the con..

Recyclerview inside ScrollView not scrolling smoothly

For my app I am using a RecyclerView inside a ScrollView where the RecyclerView has a height based on its content using this library. Scrolling is working but it's not working smoothly when I scroll o..

In CSS Flexbox, why are there no "justify-items" and "justify-self" properties?

Consider the main axis and cross axis of a flex container:                        &..

Android:java.lang.OutOfMemoryError: Failed to allocate a 23970828 byte allocation with 2097152 free bytes and 2MB until OOM

I want to show the Bitmap image in ImageView from sd card which is stored already. After run my application is crash and getting OutOfMemoryError error of: (java.lang.OutOfMemoryError: Failed to a..

Changing text color of menu item in navigation drawer

I'm trying to add a night theme for my app and I've wasted nearly three hours just trying to make the text and icons in my navigation drawer turn white along with the dark background. Here is the way ..

Does React Native styles support gradients?

I see that someone made this for it: https://github.com/brentvatne/react-native-linear-gradient But is there support for it in RN itself? Something like style = StyleSheet.create({ backgroundGra..

RecyclerView and java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder in Samsung devices

I have a recycler view that works perfectly on all devices except Samsung. On Samsung, I'm get java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionView..

How do I change a tab background color when using TabLayout?

This is my code in the main activity public class FilterActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState)..

How to update RecyclerView Adapter Data?

Trying to figure out what is the issue with updating RecyclerView's Adapter. After I get a new List of products, I tried to: Update the ArrayList from the fragment where recyclerView is created, s..

How can a divider line be added in an Android RecyclerView?

I am developing an android application where I am using RecyclerView. I need to add a divider in RecyclerView. I tried to add - recyclerView.addItemDecoration(new DividerItemDecoration(getActiv..

How to use RecyclerView inside NestedScrollView?

How to use RecyclerView inside NestedScrollView? RecyclerView content is not visible after setting adapter. UPDATE layout code updated. <android.support.v4.widget.NestedScrollView xmlns:android="..

Change the color of a checked menu item in a navigation drawer

I am using the new Android Design Support library to implement a navigation drawer in my application. I can't figure out how to change the color of a selected item! Here is the xml of the menu : &l..

Error inflating class android.support.design.widget.NavigationView

I followed a tutorial of new component NavigationView in Support Design Library and can't get through this error message : Error inflating class android.support.design.widget.NavigationView I tried..

Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference

The problem is as follows. I have a login activity (in Android Studio) which worked fine a few days before. I don't remember changing anything but when I run this one the previous time the app closed ..

How can I scroll a div to be visible in ReactJS?

I have a popup list which is a div that contains a vertical list of child divs. I have added up/down keyboard navigation to change which child is currently highlighted. Right now, if I press the dow..

RecyclerView: Inconsistency detected. Invalid item position

Our QA has detected a bug: when rotating the Android device (Droid Turbo), the following RecyclerView-related crash happened: java.lang.IndexOutOfBoundsException: Inconsistency detected. Inv..

Vertical rulers in Visual Studio Code

How can vertical rulers (note the plural) be configured in Visual Studio Code? In Sublime Text 2 I can do "rulers": [72, 80, 100, 120] How does this work in Visual Studio? "editor.ruler": 80 p..

Change the Arrow buttons in Slick slider

I want to change the arrows in my slick slider but it does not change. I want the next and previous button as an image. I have tried putting it in a <style> but it still not working. Where can I..

Toolbar overlapping below status bar

I want to have appcompat v21 toolbar in my activity. But the toolbar I'm implementing is overlapping below status bar. How can I fix it? Here is the activity layout xml: <LinearLayout xmlns:and..

setSupportActionBar toolbar cannot be applied to (android.widget.Toolbar) error

I've been looking for an answer and I've tried many possible solutions, but nothing seems to work.. I'm trying to setup a Material Action Bar following this tutorial. Here's my code: tool_bar.xml: ..

How to make custom dialog with rounded corners in android

What I am trying to do: I am trying to make a custom dialog in android With rounded corners. What is happening: I am able to make custom dialog but it doesn't have rounded corners. I tried adding a s..

java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getImportantForAccessibility()' on a null object reference

I'm trying to put together a shopping list app, based on input fields, ArrayList, and ListView. The app will be based on Fragments. However, I have encountered a problem and I do not know how to solve..

How to center div vertically inside of absolutely positioned parent div

I am trying to get blue container in the middle of pink one, however seems vertical-align: middle; doesn't do the job in that case. <div style="display: block; position: absolute; left: 50px; top:..

Null pointer Exception on .setOnClickListener

I am having an issue with a click listener for a login modal submit button. This is the error. Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button..

The specified child already has a parent. You must call removeView() on the child's parent first (Android)

I have to switch between two layouts frequently. The error is happening in the layout posted below. When my layout is called the first time, there doesn't occur any error and everything's fine. When ..

How to clear/delete the contents of a Tkinter Text widget?

I am writing a Python program in TKinter on Ubuntu to import and print the name of files from particular folder in Text widget. It is just adding filenames to the previous filnames in the Text widget,..

Vertical align in bootstrap table

I am trying to display a table with 4 columns, one of which is an image. Below is the snapshot:- I want to vertically align the text to the center position, but somehow the css doesn't seem to work. ..

Programmatically Add CenterX/CenterY Constraints

I have a UITableViewController that doesn't display any sections if there is nothing to show. I've added a label to indicate to the user that there is nothing to display with this code: label = UILa..

CardView not showing Shadow in Android L

My Cardview inside Listview is not showing shadow in Android L(Nexus 5). Also the round edges are not properly shown. Here is the code for Listview's Adapter View : <?xml version="1.0" encoding="u..

Android "elevation" not showing a shadow

I have a ListView, and with each list item I want it to show a shadow beneath it. I am using Android Lollipop's new elevation feature to set a Z on the View that I want to cast a shadow, and am alread..

How do I make WRAP_CONTENT work on a RecyclerView

I have a DialogFragment that contains a RecyclerView (a list of cards). Within this RecyclerView are one or more CardViews that can have any height. I want to give this DialogFragment the correct h..

What's the difference between display:inline-flex and display:flex?

I am trying to vertically align elements within an ID wrapper. I gave the property display:inline-flex; to this ID as the ID wrapper is the flex container. But there is no difference in presentation...

App crashing when trying to use RecyclerView on android 5.0

I'm trying to mess with the new RecyclerView and whenever I try to run it, my app immediately crashes. It gives me NullPointerException for trying to access methods from android.support.v7.widget.Recy..

NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference

I'm a newbie to Fragments and custom ListView adapters. Can anyone give me a hand please? I've got my Fragment where I have my ListView public class RecordingListFragment extends Fragment implements..

How to add buttons like refresh and search in ToolBar in Android?

I have made a ToolBar, but when I add menu items in menu.xml it always shows as an overflow. How do I add it separately? Moreover the Title is shown in the middle (vertically), how do I show it at t..

Nested Recycler view height doesn't wrap its content

I have an application that manage collections of books (like playlists). I want to display a list of collection with a vertical RecyclerView and inside each row, a list of book in an horizontal Recyc..

No shadow by default on Toolbar?

I'm updating my app with the new Toolbar from the support library v21. My problem is that the toolbar does not cast any shadow if I don't set the "elevation" attribute. Is that the normal behavior or ..

Error inflating class android.support.v7.widget.Toolbar?

I am trying to get Material Design for my App by following this method. Whenever I run the App it shows the following error: Error inflating class android.support.v7.widget.Toolbar. I checked..

Is there an addHeaderView equivalent for RecyclerView?

I'm looking for an equivalent to addHeaderView for a recycler view. Basically I want to have an image with 2 buttons be added as a header to the listview. Is there a different way to add a header view..

Error in styles_base.xml file - android app - No resource found that matches the given name 'android:Widget.Material.ActionButton'

Ok, so im a beginner in android development and I just created the hello world app. But it's giving me errors in styles_base.xml file of appcompat_v7 library. error: Error retrieving parent for i..

Toolbar navigation icon never set

I'm trying the new Toolbar component and having some trouble with the navigation icon. I want to implement a custom icon for back navigation : In my manifest i set a parent to my activity : <activi..

In android app Toolbar.setTitle method has no effect – application name is shown as title

I'm trying to create simple application using android-support-v7:21 library. Code snippets: MainActivity.java public class MainActivity extends ActionBarActivity { Toolbar mActionBarToolbar; ..

Android RecyclerView addition & removal of items

I have a RecyclerView with an TextView text box and a cross button ImageView. I have a button outside of the recyclerview that makes the cross button ImageView visible / gone. I'm looking to remove a..

How to make a view with rounded corners?

I am trying to make a view in android with rounded edges. The solution I found so far is to define a shape with rounded corners and use it as the background of that view. Here is what I did, define a..

UICollectionView Self Sizing Cells with Auto Layout

I'm trying to get self sizing UICollectionViewCells working with Auto Layout, but I can't seem to get the cells to size themselves to the content. I'm having trouble understanding how the cell's size ..

CSS flexbox vertically/horizontally center image WITHOUT explicitely defining parent height

With only the parent div and the child img elements as demonstrated below how do I vertically and horizontally center the img element while explicitly not defining the height of the parent div? <d..

Bootstrap how to get text to vertical align in a div container

What is the best/proper way to vertically align the text in the middle of its column? The image height is statically set in the CSS. I have tried setting an outer div to display: table and an inner d..

Unity 2d jumping script

Does anyone have a good jumping script for 2d games in unity? The code I have works but still is far from jumping, it looks like it is flying. using UnityEngine; using System.Collections; public cla..

How to vertically align text inside a flexbox?

I would like to use flexbox to vertically align some content inside an <li> but not having great success. I've checked online and many of the tutorials actually use a wrapper div which gets the..

Android: Creating a Circular TextView?

My current simple XML is below, however i would like the 3 TextViews within it to be circular, rather than rectangular. How can I change my code to do so? <?xml version="1.0" encoding="utf-8"?>..

Fill remaining vertical space with CSS using display:flex

In a 3-row layout: the top row should be sized according to its contents the bottom row should have a fixed height in pixels the middle row should expand to fill the container The problem is that ..

Column/Vertical selection with Keyboard in SublimeText 3

I'm on a Mac. I have 7 columns in Sublime Text 3, each 300 lines each. If possible, I would like to select only the 4th column using a single keyboard shortcut. Unsuitable options ctrl + shift + u..

Flexbox not giving equal width to elements

Attempting a flexbox nav that has up to 5 items and as little as 3, but it's not dividing the width equally between all the elements. Fiddle The tutorial I'm modeling this after is http://www.sitepo..

Scrolling to an Anchor using Transition/CSS3

I have a series of links which are using an anchor mechanism: <div class="header"> <p class="menu"><a href="#S1">Section1</a></p> <p class="menu"><a hre..

How to include a font .ttf using CSS?

I have a problem with my code. Because I want to include a global font for my page and I downloaded a .ttf file. And I include it in my main CSS but my font wont change. Here's my simple code: @font..

How to draw vertical lines on a given plot in matplotlib

Given a plot of signal in time representation, how to draw lines marking corresponding time index? Specifically, given a signal plot with time index ranging from 0 to 2.6(s), I want to draw vertical ..

iOS 8 removed "minimal-ui" viewport property, are there other "soft fullscreen" solutions?

(This is a multi-part question, I will try my best to summarise the scenario.) We are currently building a responsive web app (news reader) that allow users to swipe between tabbed content, as well a..

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 do I force a vertical scrollbar to appear?

My site has both very short and longer pages. Since I center it in the viewport with margin: 0 auto, it jumps around a few pixels when switching from a page that has a scrollbar to one that hasn't and..

How to add dividers and spaces between items in RecyclerView?

This is an example of how it could have been done previously in the ListView class, using the divider and dividerHeight parameters: <ListView android:id="@+id/activity_home_list_view" andr..

In Bootstrap 3,How to change the distance between rows in vertical?

I have two rows a and b,I think the distance between the two rows in vertical is too small. I want to make the distance more bigger,I know I can change the distance in horizontal by col-md-offset-*.B..

How to check if a view controller is presented modally or pushed on a navigation stack?

How can I, in my view controller code, differentiate between: presented modally pushed on navigation stack Both presentingViewController and isMovingToParentViewController are YES in both cases, s..

Fill remaining vertical space - only CSS

I need to fill the remaining vertical space of #wrapper under #first with #second div. I need an only CSS solution. _x000D_ _x000D_ #wrapper {_x000D_ width: 300px;_x000D_ height: 100%;_x000D_ }_..

How can I change the width and height of slides on Slick Carousel?

http://kenwheeler.github.io/slick/ A friend suggested that I use Ken Wheeler's Slick carousel and I decided to give it a try. I am having a couple of problems with it. The first is that the slides ..

How can I make my flexbox layout take 100% vertical space?

How can I tell a flexbox layout row consume the remaining vertical space in a browser window? I have a 3-row flexbox layout. The first two rows are fixed height, but the 3rd is dynamic and I would li..

Android button with icon and text

I have some buttons like this in my app: <Button android:id="@+id/bSearch" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddi..

Bootstrap push div content to new line

Somehow I can not get out how to finish my code which I formatted as a list and need to format it as grid too which is switched by javascript. My HTML Code below is used to list a content: <div c..

How to make div same height as parent (displayed as table-cell)

I got a container div containing three child divs (vary in content) - each as tall as the tallest one. I managed this by setting the container to display:table and the child divs to display:table-cell..

CSS : center form in page horizontally and vertically

How can i center the form called form_login horizontally and vertically in my page ? Here is the HTML I'm using right now: <body> <form id="form_login"> <p> ..

Couldn't load memtrack module Logcat Error

I am getting an error Couldn't load memtrack module (No such file or directory) failed to load memtrack module: -2 at run time. StackTrace Error: E/SoundPool(1280) : error loading /system/med..

How to vertically align text with icon font?

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

Move div to new line

I'm pretty new to CSS and it is still magic for me. I want to have my div movie_item_content_plot on a new line. Currently I use <br> in HTML and this works fine. When I replace the <br> w..

Android adding simple animations while setvisibility(view.Gone)

I have designed a simple layout.I have finished the design without animation, but now I want to add animations when textview click event and I don't know how to use it. Did my xml design looks good or..

Python FileNotFound

I am fairly new to python. I am trying to make a script that will read sudoku solutions and determent if they are correct or not. Things I need: 1] Prompt the user to enter a file/file path which i..

height: 100% for <div> inside <div> with display: table-cell

Here is 2 column markup using display: table and display: table-cell CSS declarations: _x000D_ _x000D_ .table {_x000D_ display: table;_x000D_ }_x000D_ _x000D_ .cell {_x000D_ border: 2px solid bla..

How to vertically center a container in Bootstrap?

I'm looking for a way to vertically center the container div inside the jumbotron and to set it in the middle of the page. The .jumbotron has to be adapted to the full height and width of the screen..

Detect merged cells in VBA Excel with MergeArea

I'm having quite an issue with this one - I have to detect horizontally and vertically merged cells from an excel table. I have to store the first cell coords, and the lenght of the merged area. I ite..

CSS how to make scrollable list

I am trying to create a webpage which is made up of a header and bellow the header a list of items. I want the list of items to be vertically scrollable. I also would like the webpage to take up the e..

Concatenate two NumPy arrays vertically

I tried the following: >>> a = np.array([1,2,3]) >>> b = np.array([4,5,6]) >>> np.concatenate((a,b), axis=0) array([1, 2, 3, 4, 5, 6]) >>> np.concatenate((a,b), ax..

Binding an Image in WPF MVVM

I am having some trouble binding in Image to my viewmodel. I finally got rid of the XamlParseException, but the image does not come up. I even hard coded the image in the ViewModel. Can someone see wh..

TypeError: got multiple values for argument

I read the other threads that had to do with this error and it seems that my problem has an interesting distinct difference than all the posts I read so far, namely, all the other posts so far have th..

Button button = findViewById(R.id.button) always resolves to null in Android Studio

I'm new to Android development and Android Studio, so pardon my ignorance. findViewById of a button I added always resolves to null. Hence if I try to setonClickListener it fails the whole Activity...

Reactjs - setting inline styles correctly

I am trying to use Reactjs with a kendo splitter. The splitter has a style attribute like style="height: 100%" With Reactjs, if I have understood things correctly, this can be implemented using an ..

Bootstrap 3 Horizontal and Vertical Divider

I am having trouble to put in horizontal and vertical lines on my website. Not sure what's wrong with this. I tried using borders but I am not sure if I am doing it right. I would like to achieve a ..

Onclick CSS button effect

I'm creating a CSS button and I'm trying to make an onclick effect: when the user clicks on the button it would push down the button text by 1px. My problem here is that it's pushing the whole bottom ..

Example on ToggleButton

I am developing an application using a toggle button, I entered 1 or 0 in EditText. When button is clicked, the toggle button has to change if I enter 1 the toggle button shows TOGGLE ON, if I enter 0..

Android Fragment onClick button Method

I'm trying to invoke the method in my onClick (View v) XML, but does not work with Fragment. This is the error. 01-17 12:38:36.840: E/AndroidRuntime(4171): java.lang.IllegalStateException: Could not..

Responsive timeline UI with Bootstrap3

How can I create a UI with a vertical timeline bar where on desktop it shows as timeline-bar in middle and event boxes on both sides. On smaller mobile screen, the timeline-bar on the left and all eve..

Properly embedding Youtube video into bootstrap 3.0 page

I need to embed a YouTube video into my responsive site but it's not scaling correctly, especially on mobile. It looks fine on desktop and tablets but once you get below a viewport width of 600, the ..

ImageView rounded corners

I wanted image to have rounded corners. I implement this xml code and use this in my image view. but image overlap the shape. I am downloading the image through async task. <?xml version="1.0" enc..

Maintain aspect ratio of div but fill screen width and height in CSS?

I have a site to put together that has a fixed aspect ratio of approximately 16:9 landscape, like a video. I want to have it centred and expand to fill the available width, and the available height,..

How to fix Uncaught InvalidValueError: setPosition: not a LatLng or LatLngLiteral: in property lat: not a number?

I'm trying to port my googlemaps v2 functions to v3. But somehow i stuck in a strange error and i could not find, what i'm doing wrong. Error : Uncaught InvalidValueError: setPosition: not a LatL..

How do I vertically center an H1 in a div?

First of all, my apologies. I know there are various solutions posted for this issue here, but for the life of me I can't get any of them to work. For a responsive website I'm trying to center an h1..

vertical-align with Bootstrap 3

I'm using Twitter Bootstrap 3, and I have problems when I want to align vertically two div, for example — JSFiddle link: _x000D_ _x000D_ <!-- Latest compiled and minified CSS -->_x000D_ <l..

<select> HTML element with height

Does anyone know of a way to style an HTML select element so that it has a certain height and looks good across browsers? I've tried simply setting height in CSS but the text inside the box is vertic..

Vertical align middle with Bootstrap responsive grid

I have a very simple problem on vertical middle a span using Bootstrap 2.3.2. Requirements: There are two columns, left column has a fixed height 300px because there is 300x300 image inside. Right ..

How to set an button align-right with Bootstrap?

I am learning Bootstrap. The structure is a container within some context. At the bottom of the container, I put a button next to an description. Now, I want to set the button align to the right with..

Grid of responsive squares

I'm wondering how I would go about creating a layout with responsive squares. Each square would have vertically and horizontally aligned content. The specific example is displayed below... ..

How to set dropdown arrow in spinner?

I tried to set spinner with drop down arrow but i couldn't fix it can anyone help me with this? I have attached the source code. my class file: import android.os.Bundle; import android.view...

Adjust plot title (main) position

I have been unable to find a way to adjust the (vertical) distance between plot and main title in R using par. In this example: plot(1, 1, main = "Title") I can adjust the position of the axis titl..

Android Layout Animations from bottom to top and top to bottom on ImageView click

I have created a view in Android and I need to animate it from bottom to top and vice-versa. when I clicked on ImageView I need to animate the complete RelativeLayout from bottom to top and it is succ..

Submit button not working in Bootstrap form

I have a form in Bootstrap 3 that's inside a modal. There's a button called "submit" where when it's clicked the stuff that was entered in the form should be sent to an email address. Although when I ..

How to align linearlayout to vertical center?

I'm trying to align LinearLayout's vertical center which shows following pic (skycolor border) to delete button's vertical center. so I set the gravity of id:groupNumbers to center_vertical. but no ..

android.content.res.Resources$NotFoundException: String resource ID #0x0

I'm developing an Android app which reads data from MySQL database and I faced this error. I have this XML layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http..

How can I use onItemSelected in Android?

package org.example.mbtiapplication; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.view.View; import android.widget.AdapterView; import android.widge..

Twitter Bootstrap 3, vertically center content

I know this has been asked a thousand time but I can't find a way to make the text and image to be centered vertically. I'm using Twitter Bootstrap 3 with dynamic content so therefor, I do not know t..

How can I parse a local JSON file from assets folder into a ListView?

I'm currently developing a physics app that is supposed to show a list of formulas and even solve some of them (the only problem is the ListView) This is my main layout <LinearLayout xmlns:an..

Bootstrap 3 : Vertically Center Navigation Links when Logo Increasing The Height of Navbar

I'm new to the bootstrap framework. Logo Increasing Height of NavBar: In my navigation bar, I have inserted a logo that has a height of 50px. This obviously makes the navbar taller. I have not adjus..

Custom height Bootstrap's navbar

I want a header with a height of 150px which contains a navbar. The navbar should be vertically centered in the header. HTML: <header> <div class="navbar navbar-static-top"> ..

Bootstrap 3 scrollable div for table

I am using Bootstrap 3 with a navbar at the top and a page that displays a table formatted using Bootstrap 3's table class. I would like the table (which is sitting in its own div) to be the only par..

Implement Validation for WPF TextBoxes

I have 3 TextBoxes (Id1,Name and Salary). Id and Salary should contain integers and Name should only contain characters. I need validations for my TextBox, it should show errors as I enter wrong chara..

Add Items to ListView - Android

This is my first experience with android. I'm trying to add items to my ListView. I use Tabs, and the only way to see that the item was added is to change tab and then come back to the first tab. I s..

How to center an element horizontally and vertically

I am trying to center my tabs content vertically, but when I add the CSS style display:inline-flex, the horizontal text-align disappears. How can I make both text alignments x and y for each of my ta..

How to make all controls resize accordingly proportionally when window is maximized?

When I clicked on the maximize button the window is maximized but the controls are not resized proportionally. What is the best way to make the controls resize accordingly? I am using MVVM. Here is m..

Flexbox Not Centering Vertically in IE

I have a simple web page with some Lipsum content that is centered on the page. The page works fine in Chrome and Firefox. If I reduce the size of the window, the content fills the window until it can..

The specified child already has a parent. You must call removeView() on the child's parent first

I create this post, because i am new at this, and i need a little help. I am doing a little exercise about a application you that put your name, and it returns "hello (the name you put)". But after i ..

HTTP Status 500 - org.apache.jasper.JasperException: java.lang.NullPointerException

I deployed my project on the production server and getting the below error. It's a live project so , after getting error i replaced this with previous version that was running fine but now that is al..

Horizontal scroll css?

I want to have one <div> with id that has horizontal scroll, but the problem is it has to be responsive, not with fixed width. html, body {margin: 0; padding: 0;} #myWorkContent{ width:530..

How do I set vertical space between list items?

Within a <ul> element, clearly the vertical spacing between lines can be formatted with the line-height attribute. My question is, within a <ul> element, how do I set the vertical spacing..

Body set to overflow-y:hidden but page is still scrollable in Chrome

I'm having an issue with the overflow-y property in Chrome. Even though I've set it to hidden, I can still scroll the page with the mouse wheel. Here is my code: _x000D_ _x000D_ html,_x000D_ body {..

Vertical divider doesn't work in Bootstrap 3

I opened the Nav example which comes with the standard Bootstrap download (bootstrap-3.0.0\examples\navbar\index.html) and added vertical dividers between two of the links. However, it doesn't seem t..

Center align with table-cell

I'm trying to use the table-cell way to center a div vertically and horizontally. It works when I use the following code: div { display: table; } .logo { display: table-cell; position: ..

Adding custom radio buttons in android

I am trying to get radiobutton effect for regular buttons in android I have a simple android radio button below Code for this is :: activity_main.xml <RelativeLayout xmlns:android="http://sc..

Center icon in a div - horizontally and vertically

I'm having issues centering icons (both vertically and horizontally) in a parent div. I have many parent divs on my page that are different sizes, so I want to be able to proportionally place icons i..

Android draw a Horizontal line between views

I have My Layout like below: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" androi..

Placing a textview on top of imageview in android

I have a listview, that has a single imageview which is scrollable vertically I am trying to place a textview on top of Imageview Both the views must be visible Is it possible ? If yes, How to d..

Bootstrap 3 Gutter Size

I've only just started working with bootstrap and unsure about how to achieve my goal. I would like the gutters to all be even, like they are in this image: by default, they look like this, the ve..

Flexbox: center horizontally and vertically

How to center div horizontally, and vertically within the container using flexbox. In below example, I want each number below each other (in rows), which are centered horizontally. _x000D_ _x000D_ .f..

Android translate animation - permanently move View to new position using AnimationListener

I have android translate Animation. I have an ImageView with random generated position (next1, next2). I am calling void every 3 seconds. It generates new position of the View and then make animation ..

Button Listener for button in fragment in android

I am new to Android and trying to learn on my own. But I am having a tough time with Fragments. I am creating a simple application to learn fragments. I think it may seem silly but I really can't get ..

How to center and crop an image to always appear in square shape with CSS?

I need to always crop a random-sized image to a square 160x160 using only CSS. The images should stay centered when cropped. My markup should be: <a href="#" class="cropper"> <img src="i..

A div with auto resize when changing window width\height

I've looked everywhere . and still couldn't come up with sample code of a very "basic" idea: A div that is taking 90% of the screen size and it is adjusting itself whenever the browser size changes ..

vertical align middle in <div>

I want to keep the height of #abc div at 50px and text to align vertically in the middle of the div. _x000D_ _x000D_ body{_x000D_ padding: 0;_x000D_ margin: 0;_x000D_ margin: 0px auto;_x000D_ }..

Decreasing height of bootstrap 3.0 navbar

I am trying to decrease bootstrap 3.0 navbar height which is used with fixed top behavior. Here i am using code. HTML <div class="tnav"> <div class="navbar navbar-fixed-top" role="banner"&g..

Prevent scroll-bar from adding-up to the Width of page on Chrome

I have a small issue trying to keep my .html pages at a consistent width on Chrome, For example I have a page (1) with lots of contents that overflows the viewport's (right word?) height, so there's a..

How to vertically align label and input in Bootstrap 3?

How to vertically align label and input in Bootstrap 3? I would like both the label and input on same line. I have played around with different classes and custom CSS but nothing seems to work. The..

Vertically align an image inside a div with responsive height

I have the following code which sets up a container which has a height that changes with the width when the browser is re-sized (to maintain a square aspect ratio). HTML <div class="responsive-co..

Android findViewById() in Custom View

I've written my custom View and i want to update some other views after interacting with my custom view. Main Layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="..

Responsive Image full screen and centered - maintain aspect ratio, not exceed window

So I want an img to be displayed as big as possible (filling the width when it is landscape / height when it is portrait) no crop no skew or stretch (original aspect ratio) centred both vertically ..

Stacked Tabs in Bootstrap 3

I am trying to implement left-aligned stacked tabs using the Tab jquery plugin in Bootstrap 3 where tabs are rendered vertically to the left of tab content, rather than on top. When I try the followin..

Bootstrap 3 modal vertical position center

This is a two part question: How can you position the modal vertically in the center when you don't know the exact height of the modal? Is it possible to have the modal centered and have overflow:au..

OnItemClickListener using ArrayAdapter for ListView

I want to have an OnItemClickListener for a ListView I create using an ArrayAdapter This is the code I use to create it: List<Comment> values = datasource.some_search("Wednesday","11"); ..

Android list view inside a scroll view

I have an android layout which has a scrollView with a number of elements with in it. At the bottom of the scrollView I have a listView which is then populated by an adapter. The problem that I am ex..

SSIS - Text was truncated or one or more characters had no match in the target code page - Special Characters

I have a text file with Vertical Bar{|} separated values and I am using a Flat File source to read the values which fails with the above error. I have a Flat File Connection Manager, where I set the ..

Show Error on the tip of the Edit Text Android

I want to show error if the user enters blank value in the edittext.But i am not getting the way how could i do this .This is how i want like this: This is my xml that i have created <Relativ..

Adding Table rows Dynamically in Android

I am trying to create a layout where I need to add table rows dynamically. Below is the table layout xml <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_..

How to use vertical align in bootstrap

Simple problem: How do I vertically align a col within a col using bootstrap? Example here (I want to vertically align child1a and child1b): http://bootply.com/73666 HTML <div class="col-lg-12"..

How can I add a vertical scrollbar to my div automatically?

I want to add a vertical scrollbar to my <div>. I've tried overflow: auto, but it is not working. I've tested my code in Firefox and Chrome. I'm pasting the div style code here: float: left; ..

Android getting value from selected radiobutton

I have a piece of code with three RadioButtons within a RadioGroup. I want to set an onCheckedListener that will show the value of the RadioButton in a Toast. However what I have gotten so far is not ..

Scale Image to fill ImageView width and keep aspect ratio

I have a GridView. The data of GridView is request from a server. Here is the item layout in GridView: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_..

Column order manipulation using col-lg-push and col-lg-pull in Twitter Bootstrap 3

I'm now reading documentation on Twitter Bootstrap 3, and tried to follow column ordering as shown in this page but hit the wall. I don't understand why such a code works nor how to correctly specif..

Vertically centering Bootstrap modal window

I would like to center my modal on the viewport (middle) I tried to add some css properties .modal { position: fixed; top:50%; left:50%; } I'm using this example http://jsfiddle.net/rniemeyer/..

How to center the content inside a linear layout?

I'm trying to center an ImageView inside a LinearLayout horizontally and vertically, but I just can't do it. The main reason why I'm not using a RelativeLayout for that is because I need the layout_we..

draw diagonal lines in div background with CSS

I have a div for a preview box: HTML: <div class="preview-content">PREVIEW</div> CSS: .preview-content { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYA..

How to remove padding around buttons in Android?

In my Android app, I have this layout: <?xml version="1.0" encoding="utf-8" ?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pa..

DynamoDB vs MongoDB NoSQL

I'm trying to figure it out what can I use for a future project, we plan to store from about 500k records per month in the first year and maybe more for the next years this is a vertical application s..

HTML Form Redirect After Submit

This is my form code: <form enctype="multipart/form-data" name="upload-file" method="post" action="http://example.com/upload"> <div class="formi"> <input id="text-link-inp..

get parent's view from a layout

I have a FragmentActivity with this layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.andr..

Vertically aligning text next to a radio button

This is a basic CSS question, I have a radio button with a small text label after it. I want the text to appear centered vertically but the text is always aligned with the button of the radio button i..

Why is width: 100% not working on div {display: table-cell}?

I'm trying to vertically and horizontally center some content overlaying an image slide (flexslider). There were some similar questions to this one, but I couldn't find a satisfactory solution that a..

CSS getting text in one line rather than two

I have a small issue with a title where I would like text to display on a single line rather than split onto two as im trying to arrange these blocks as a grid jsFiddle html <div class="garage-r..

How to change Maven local repository in eclipse

I'm importing a multiple-module Maven project from the root directory on a shared drive on another server A. On server A, mvn install will run successfully, and Maven is set up properly with repositor..

List method to delete last element in list as well as all elements

I have an issue with clearing lists. In the current program, I have a method that clears a certain number of lists. This is rather inconvenient since during one part of the program where this method i..

Creating pdf files at runtime in c#

Is there a pdf library attached/that can be attached to .NET 3.5 that allows creation of pdf files at runtime i.e opening a new pdf file, writing to it line by line, embedding images, etc and closing ..

Windows ignores JAVA_HOME: how to set JDK as default?

How do I persuade Windows to use the JDK instead of a JRE? This question has been asked before, here and elsewhere: How do I set the default Java installation/runtime (Windows)? The trouble is that..

Iterate through a C array

I have an array of structs that I created somewhere in my program. Later, I want to iterate through that, but I don't have the size of the array. How can I iterate through the elements? Or do I need..

Add characters to a string in Javascript

I need to add in a For Loop characters to an empty string. I know that you can use the function concat in Javascript to do concats with strings var first_name = "peter"; var last_name = "jones"; v..

How to rollback a specific migration?

I have the following migration file db\migrate\20100905201547_create_blocks.rb How can I specifically rollback that migration file? ..

Getters \ setters for dummies

I've been trying to get my head around getters and setters and its not sinking in. I've read JavaScript Getters and Setters and Defining Getters and Setters and just not getting it. Can someone clear..

How do you view ALL text from an ntext or nvarchar(max) in SSMS?

How do you view ALL text from an NTEXT or NVARCHAR(max) in SQL Server Management Studio? By default, it only seems to return the first few hundred characters (255?) but sometimes I just want a quick ..

How to get full width in body element

How would I be able to get a website to auto-fit in the page? It's a landscape design which needs no scrolling...

How can I find which tables reference a given table in Oracle SQL Developer?

In Oracle SQL Developer, if I'm viewing the information on a table, I can view the constraints, which let me see the foreign keys (and thus which tables are referenced by this table), and I can view t..

Android, How to limit width of TextView (and add three dots at the end of text)?

I have a TextView that I want to limit characters of it. Actually, I can do this but the thing that I'm looking for is how to add three dots (...) at the end of string. This one shows the text has con..

Enabling HTTPS on express.js

I'm trying to get HTTPS working on express.js for node, and I can't figure it out. This is my app.js code. var express = require('express'); var fs = require('fs'); var privateKey = fs.readFileSync..

window.onload vs document.onload

Which is more widely supported: window.onload or document.onload?..

How to cast an Object to an int

How can I cast an Object to an int in java?..

How to break/exit from a each() function in JQuery?

I have some code: $(xml).find("strengths").each(function() { //Code //How can i escape from this block based on a condition. }); How can i escape from the "each" code block based on a conditi..

Load jQuery with Javascript and use jQuery

I am appending the jQuery library to the dom using: var script = document.createElement('script'); script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'; script.type = 't..

ssh: connect to host github.com port 22: Connection timed out

I am under a proxy and I am pushing in to git successfully for quite a while. Now I am not able to push into git all of a sudden. I have set the RSA key and the proxy and double checked them, with no ..

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

I am doing spring + hibernate application. When I run the application on tomcat server I am getting some exceptions. INFO : org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'appSe..

Detect click outside React component

I'm looking for a way to detect if a click event happened outside of a component, as described in this article. jQuery closest() is used to see if the target from a click event has the dom element as ..

In Java, what purpose do the keywords `final`, `finally` and `finalize` fulfil?

In Java, what purpose do the keywords final, finally and finalize fulfil? ..

Convert HTML string to image

I have a string variable which holds HTML markup. This HTML markup basically represents the email content. Now I want to create an image from this string content which actually holds the HTML markup...

How do I handle too long index names in a Ruby on Rails ActiveRecord migration?

I am trying to add an unique index that gets created from the foreign keys of four associated tables: add_index :studies, ["user_id", "university_id", "subject_name_id", "subject_type_id"], :uniq..

How to send 100,000 emails weekly?

How can one send an email to 100,000 users on a weekly basis in PHP? This includes mail to subscribers using the following providers: AOL G-Mail Hotmail Yahoo It is important that all e-mail actua..

Why do I get a SyntaxError for a Unicode escape in my file path?

The folder I want to get to is called python and is on my desktop. I get the following error when I try to get to it >>> os.chdir('C:\Users\expoperialed\Desktop\Python') SyntaxError: (unico..

Use of exit() function

I want to know how and when can I use the exit() function like the program in my book: #include<stdio.h> void main() { int goals; printf("enter number of goals scored"); scanf("%d"..

Delete rows with foreign key in PostgreSQL

I would like to delete rows which contain a foreign key, but when I try something like this: DELETE FROM osoby WHERE id_osoby='1' I get this statement: ERROR: update or delete on table "osoby"..

Escaping quotes and double quotes

How do I properly escape the quotes in the -param value in the following command line? $cmd="\\server\toto.exe -batch=B -param="sort1;parmtxt='Security ID=1234'"" Invoke-Expression $cmd This of co..

Default optional parameter in Swift function

When I set firstThing to default nil this will work, without the default value of nil I get a error that there is a missing parameter when calling the function. By typing Int? I thought it made it op..

Activate tabpage of TabControl

I am using TabControl in #.NET application. By default first tab page of TabControl is showing in form loading. I want to activate/show other tab pages in form loading. Programmatically, how can I sho..

AngularJS Uploading An Image With ng-upload

I am trying to upload a file in AngularJS using ng-upload but I am running into issues. My html looks like this: <div class="create-article" ng-controller="PostCreateCtrl"> <form ng-..

Which programming languages can be used to develop in Android?

Possible Duplicate: Which programming languages can I use on Android Dalvik? Mostly, Android applications are written in Java. But i heard that its also possible to use Scala or some other ..

How to upgrade Angular CLI to the latest version

Using ng --version I got: @angular/cli: 1.0.0 which is not the latest release available. Since I have Angular CLI globally installed on my system, in order to upgrade it I tried: npm update an..

Android Canvas: drawing too large bitmap

I'm running Ubuntu 16.04. And on Android Studio when I try to run my application in the emulator I get the following error: FATAL EXCEPTION: main Process: project name here, PI..

Selecting an element in iFrame jQuery

In our application, we parse a web page and load it into another page in an iFrame. All the elements in that loaded page have their tokenid-s. I need to select the elements by those tokenid-s. Means -..

Check free disk space for current partition in bash

I am writing an installer in bash. The user will go to the target directory and runs the install script, so the first action should be to check that there is enough space. I know that df will report a..

Unit testing click event in Angular

I'm trying to add unit tests to my Angular 2 app. In one of my components, there is a button with a (click) handler. When the user clicks the button a function is called which is defined in the .ts cl..

How do I prevent site scraping?

I have a fairly large music website with a large artist database. I've been noticing other music sites scraping our site's data (I enter dummy Artist names here and there and then do google searches ..

ComboBox.SelectedText doesn't give me the SelectedText

I am building a String and the code looks like String status = "The status of my combobox is " + comboBoxTest.SelectedText I am using WinForm in VS2010 The result looks like "The status of my ..

Maven: add a folder or jar file into current classpath

I am using maven-compile plugin to compile classes. Now I would like to add one jar file into the current classpath. That file stays in another location (let's say c:/jars/abc.jar . I prefer to leave ..

Get raw POST body in Python Flask regardless of Content-Type header

Previously, I asked How to get data received in Flask request because request.data was empty. The answer explained that request.data is the raw post body, but will be empty if form data is parsed. Ho..

How to build a DataTable from a DataGridView?

I may well be looking at this problem backwards but I am curious none the less. Is there a way to build a DataTable from what is currently displayed in the DataGridView? To be clear, I know you can..

How to do a non-greedy match in grep?

I want to grep the shortest match and the pattern should be something like: <car ... model=BMW ...> ... ... ... </car> ... means any character and the input is multiple lines. ..

Implementing two interfaces in a class with same method. Which interface method is overridden?

Two interfaces with same method names and signatures. But implemented by a single class then how the compiler will identify the which method is for which interface? Ex: interface A{ int f(); } in..

Can I have onScrollListener for a ScrollView?

I am using a HorizontalScrollView in a layout and I need to identify the user have reached the start and end point of the scroll. For ListView I have tried a the onScrollListener and it is possible t..

Delete a single record from Entity Framework?

I have a SQL Server table in Entity Framework named employ with a single key column named ID. How do I delete a single record from the table using Entity Framework?..

Java program to find the largest & smallest number in n numbers without using arrays

I could get the largest without using arrays but, unable to get the smallest one. public static void main(String[] args) { int smallest=0; int large=0; int num; ..

Android Studio Stuck at Gradle Download on create new project

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

Why an interface can not implement another interface?

What I mean is: interface B {...} interface A extends B {...} // allowed interface A implements B {...} // not allowed I googled it and I found this: implements denotes defining an implemen..

Why is 22 the default port number for SFTP?

Why is 22 the default port number for SFTP? Is there any specific reason for this?..

Converting Object to JSON and JSON to Object in PHP, (library like Gson for Java)

I am developing a web application in PHP, I need to transfer many objects from server as JSON string, is there any library existing for PHP to convert object to JSON and JSON String to Objec, like Gs..

How to get and set the current web page scroll position?

How can I get and set the current web page scroll position? I have a long form which needs to be refreshed based on user actions/input. When this happens, the page resets to the very top, which is a..

How can I play sound in Java?

I want to be able to play sound files in my program. Where should I look?..

Dockerfile copy keep subdirectory structure

I'm trying to copy a number of files and folders to a docker image build from my localhost. The files are like this: folder1 file1 file2 folder2 file1 file2 I'm trying to make the ..

What is the equivalent of Java static methods in Kotlin?

There is no static keyword in Kotlin. What is the best way to represent a static Java method in Kotlin?..

Can the :not() pseudo-class have multiple arguments?

I'm trying to select input elements of all types except radio and checkbox. Many people have shown that you can put multiple arguments in :not, but using type doesn't seem to work anyway I try it. f..

Laravel - Form Input - Multiple select for a one to many relationship

One of the requirements in an application that I am building is for a form input which takes in a varying number of items for a single field. For instance, sports that I play are ('Soccer','Tennis','C..

How to make an AlertDialog in Flutter?

I am learning to build apps in Flutter. Now I have come to alert dialogs. I have done them before in Android and iOS, but how do I make an alert in Flutter? Here are some related SO questions: How ..

What does FETCH_HEAD in Git mean?

git pull --help says: In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD. What is this FETCH_HEAD and what is actually merged during git pull?..

How do I install the ext-curl extension with PHP 7?

I've installed PHP 7 using this repo, but when I try to run composer install, it's giving this error: [package] requires ext-curl * -> the requested PHP extension curl is missing from your syst..

Injecting content into specific sections from a partial view ASP.NET MVC 3 with Razor View Engine

I have this section defined in my _Layout.cshtml @RenderSection("Scripts", false) I can easily use it from a view: @section Scripts { @*Stuff comes here*@ } What I'm struggling with is how..

Backup a single table with its data from a database in sql server 2008

I want to get a backup of a single table with its data from a database in SQL Server using a script. How can I do that?..

How to convert a unix timestamp (seconds since epoch) to Ruby DateTime?

How do you convert a Unix timestamp (seconds since epoch) to Ruby DateTime?..

SSIS Excel Import Forcing Incorrect Column Type

I'm trying to import a spreadsheet to our database using SSIS. For some reason SSIS wants to believe two of the columns are of type Double, when they contain character data. I've tried remapping the..

Prevent redirect after form is submitted

I have an HTML form that submits an email with PHP, and when it submits, it redirects to that PHP page. Is there a way to prevent this redirect from happening? I built an animation with jQuery that I ..

How to insert blank lines in PDF?

I am creating a PDF using iText. I want to insert blank lines between paragraphs and tables. How can I achieve this?..

How to "properly" create a custom object in JavaScript?

I wonder about what the best way is to create an JavaScript object that has properties and methods. I have seen examples where the person used var self = this and then uses self. in all functions to ..

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 + new.id got..

Convert a python dict to a string and back

I am writing a program that stores data in a dictionary object, but this data needs to be saved at some point during the program execution and loaded back into the dictionary object when the program i..

How do I add a Maven dependency in Eclipse?

I don't know how to use Maven at all. I've been developing for a couple years with Eclipse and haven't yet needed to know about it. However, now I'm looking at some docs that suggest I do the follow..

Gradle sync failed: failed to find Build Tools revision 24.0.0 rc1

As of today I've been running into an error setting up new projects in Android Studio. Right after creating a blank project the log mentions "Gradle sync failed: failed to find Build Tools revision 2..

Delete all documents from index/type without deleting type

I know one can delete all documents from a certain type via deleteByQuery. Example: curl -XDELETE 'http://localhost:9200/twitter/tweet/_query' -d '{ "query" : { "term" : { "user" : "kimc..

IE11 Document mode defaults to IE7. How to reset?

My Internet Explorer 11 on my Windows 8.1 Surface tablet defaults to document mode 7, causing a lot of websites to render wrongly. When I open the Developer tools, it states that it defaults to docum..

How to set the project name/group/version, plus {source,target} compatibility in the same file?

I intend to generalize the use of gradle for my projects and would like to reuse the same build file everywhere. Unfortunately, I have trouble trying to define the properties mentioned in $subject in ..

Is it possible to get an Excel document's row count without loading the entire document into memory?

I'm working on an application that processes huge Excel 2007 files, and I'm using OpenPyXL to do it. OpenPyXL has two different methods of reading an Excel file - one "normal" method where the entire ..

Scanner doesn't read whole sentence - difference between next() and nextLine() of scanner class

I'm writing a program which allows the user to input his data then outputs it. Its 3/4 correct but when it arrives at outputting the address it only prints a word lets say only 'Archbishop' from 'Arch..

Generate Json schema from XML schema (XSD)

Does anybody know how to generate a JSON schema from a existing XML schema (XSD file)? Are there any tools available for this?..

jQuery callback for multiple ajax calls

I want to make three ajax calls in a click event. Each ajax call does a distinct operation and returns back data that is needed for a final callback. The calls themselves are not dependent on one anot..

Ajax Success and Error function failure

I am having trouble getting my jQuery ajax to work properly. It directs to the PHP page to update the database, but never returns back to the script for the success or error options. My code is below..

How do I convert a number to a letter in Java?

Is there a nicer way of converting a number to its alphabetic equivalent than this? private String getCharForNumber(int i) { char[] alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray(); if (..

How can I use numpy.correlate to do autocorrelation?

I need to do auto-correlation of a set of numbers, which as I understand it is just the correlation of the set with itself. I've tried it using numpy's correlate function, but I don't believe the re..

HTTP Basic: Access denied fatal: Authentication failed

I use GitLab Community Edition 9.1.3 2e4e522 on Windows 10 Pro x64. With Git client. Error Cloning into 'project_name'... remote: HTTP Basic: Access denied fatal: Authentication failed for 'http://m..

Java: how to initialize String[]?

Error % javac StringTest.java StringTest.java:4: variable errorSoon might not have been initialized errorSoon[0] = "Error, why?"; Code public class StringTest { public static voi..

Check if input value is empty and display an alert

How is it possible to display an alert with jQuery if I click the submit button and the value of the input field is empty? <input type="text" id="myMessage" name="shoutbox_..

MessageBodyWriter not found for media type=application/json

I am facing issues while consuming JAX-RS services as JSON. Below I have added my code. This is my service class: //Sets the path to base URL + /hello @Path("/hello") @Consumes(MediaType.APPLICATI..

How to get current time in python and break up into year, month, day, hour, minute?

I would like to get the current time in Python and assign them into variables like year, month, day, hour, minute. How can this be done in Python 2.7?..

In jQuery, how do I get the value of a radio button when they all have the same name?

Here is my code: <table> <tr> <td>Sales Promotion</td> <td><input type="radio" name="q12_3" value="1">1</td> <td><input type="r..

Upgrading React version and it's dependencies by reading package.json

I have an existing project, which has react@15 and all it's dependencies according to that. But now I have to upgrade to react@16 along with it's dependencies. Now, the problem is - there are a lot of..

How do I remove  from the beginning of a file?

I have a CSS file that looks fine when I open it using gedit, but when it's read by PHP (to merge all the CSS files into one), this CSS has the following characters prepended to it:  PHP remove..

Cannot open backup device. Operating System error 5

Below is the query that I am using to backup (create a .bak) my database. However, whenever I run it, I always get this error message: Msg 3201, Level 16, State 1, Line 1 Cannot open backup de..

How do I find if a string starts with another string in Ruby?

What the best way to find if a string starts with another in Ruby (without rails)?..

C++ calling base class constructors

#include <iostream> #include <stdio.h> using namespace std; // Base class class Shape { public: void setWidth(int w) { width = w; } void setHeight(in..

Get querystring from URL using jQuery

I have the following URL: http://www.mysite.co.uk/?location=mylocation1 I need to get the value of location from the URL into a variable and then use it in jQuery code: var thequerystring = "get..

How do I split an int into its digits?

How can I split an int in c++ to its single numbers? For example, I'd like to split 23 to 2 and 3...

how to convert string into dictionary in python 3.*?

I want to convert the following string into dictionary without using eval() function in Python 3.5. d="{'Age': 7, 'Name': 'Manni'}"; Can anybody tell me the good way than using the eval() function?..

How to force an entire layout View refresh?

I want to force the main layout resource view to redraw / refresh, in say the Activity.onResume() method. How can I do this ? By main layout view, I mean the one ('R.layout.mainscreen' below) that i..

Fill remaining vertical space with CSS using display:flex

In a 3-row layout: the top row should be sized according to its contents the bottom row should have a fixed height in pixels the middle row should expand to fill the container The problem is that ..

No connection could be made because the target machine actively refused it 127.0.0.1:3446

I'm using the WCF4.0 template -REST. I'm trying to make a method that uploads a file using a stream. The problem always occur at Stream serverStream = request.GetRequestStream(); Class for streami..

What does "for" attribute do in HTML <label> tag?

I wonder what is the difference between the following two code snippets: <label>Input here : </label> <input type='text' name='theinput' id='theinput'/> and <label for='theinput'..

git status shows fatal: bad object HEAD

I have a problem with git on Windows Azure. Git status shows - "fatal: bad object HEAD" and I tried running: git fsck --full git gc But git fsck shows: broken link from commit 739df633f185ce5d..

Could not load file or assembly System.Web.Http.WebHost after published to Azure web site

I created a web project and it runs well in Visual studio. However, I got the following error after published it to azurewebsites. What can cause the issue? Could not load file or assembly 'System..

Sending "User-agent" using Requests library in Python

I want to send a value for "User-agent" while requesting a webpage using Python Requests. I am not sure is if it is okay to send this as a part of the header, as in the code below: debug = {'verbose..

Renaming the current file in Vim

How should I rename my current file in Vim? For example: I am editing person.html_erb_spec.rb I would like it renamed to person.haml_spec.rb I would like to continue editing person.haml_spec.rb H..

Catching "Maximum request length exceeded"

I'm writing an upload function, and have problems catching "System.Web.HttpException: Maximum request length exceeded" with files larger than the specified max size in httpRuntimein web.config (max si..

Plain Old CLR Object vs Data Transfer Object

POCO = Plain Old CLR (or better: Class) Object DTO = Data Transfer Object In this post there is a difference, but frankly most of the blogs I read describe POCO in the way DTO is defined: DTOs are s..

How do I get the last inserted ID of a MySQL table in PHP?

I have a table into which new data is frequently inserted. I need to get the very last ID of the table. How can I do this? Is it similar to SELECT MAX(id) FROM table?..

How to use underscore.js as a template engine?

I'm trying to learn about new usages of javascript as a serverside language and as a functional language. Few days ago I heard about node.js and express framework. Then I saw about underscore.js as a ..

Comparing strings by their alphabetical order

String s1 = "Project"; String s2 = "Sunject"; I want to compare the two above string by their alphabetic order (which in this case "Project" then "Sunject" as "P" comes before "S"). Does anyone know..

How to get first record in each group using Linq

Considering the following records: Id F1 F2 F3 ------------------------------------------------- 1 Nima 1990 10 2 Nim..

Compression/Decompression string with C#

I am newbie in .net. I am doing compression and decompression string in C#. There is a XML and I am converting in string and after that I am doing compression and decompression.There is no compilation..

HTML checkbox - allow to check only one checkbox

I have some checkboxes in each row in my table. Each one checkbox has name='myName' because I want to select only one checkbox in each row. But something I'm missing because I'm able to check all of t..

Python, Unicode, and the Windows console

When I try to print a Unicode string in a Windows console, I get an error . UnicodeEncodeError: 'charmap' codec can't encode character .... I assume this is because the Windows console does not accept..

Git on Bitbucket: Always asked for password, even after uploading my public SSH key

I uploaded my ~/.ssh/id_rsa.pub to Bitbucket's SSH keys as explained, but Git still asks me for my password at every operation (such as git pull). Did I miss something? It is a private repository (fo..

Changing column names of a data frame

I have a data frame called "newprice" (see below) and I want to change the column names in my program in R. > newprice Chang. Chang. Chang. 1 100 36 136 2 120 -33 ..

How to call a View Controller programmatically?

I have looked at all the tutorials I can find on this one, and I still don't have the answer. I need to call another view from the code. I am using UIStoryboards. I have changed the view many times..

Add left/right horizontal padding to UILabel

I need to create a UILabel with a background color, and I'd like to add some left/right leading/trailing horizontal padding. But every solution I've found seems like a nasty hack. What is the 'standar..

Stretch child div height to fill parent that has dynamic height

As it can be seen in the following fiddle, I have two divs, contained in a parent div that have stretched to contain the big div, my goal is to make those child divs equal in height. http://fiddle.js..

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required?

I want to send an email from my application and i have written following code for sending mail MailMessage msg = new MailMessage(); msg.From = new MailAddress("mymailid"); msg.To.Add("re..

How to show soft-keyboard when edittext is focused

I want to automatically show the soft-keyboard when an EditText is focused (if the device does not have a physical keyboard) and I have two problems: When my Activity is displayed, my EditText is fo..

Twitter Bootstrap - how to center elements horizontally or vertically

is there any way to center html elements vertically or horizontally inside the main parents?..

What is the best way to tell if a character is a letter or number in Java without using regexes?

What is the best and/or easiest way to recognize if a string.charAt(index) is an A-z letter or a number in Java without using regular expressions? Thanks...

Changing the CommandTimeout in SQL Management studio

How can I change the CommandTimeout in SQL Management Studio?..

Position Absolute + Scrolling

With the following HTML and CSS _x000D_ _x000D_ .container {_x000D_ position: relative;_x000D_ border: solid 1px red;_x000D_ height: 256px;_x000D_ width: 256px;_x000D_ overflow: auto;_x000D..

How do I get the total Json record count using JQuery?

I couldn't find anything about getting the total JSON record count using jQuery. Here is the JSON returned: {"Email":"Please enter your Email.","Password":"Please enter a password."} Here is my cod..

How can I show dots ("...") in a span with hidden overflow?

My CSS: #content_right_head span { display:inline-block; width:180px; overflow:hidden !important; } Now it's showing content content But I want to show like content content ... I need to s..

How to create a css rule for all elements except one class?

I have created a CSS stylesheet for my project. Is there any way I can create a css rule that applies to all table elements EXCEPT table elements belonging to the class "dojoxGrid"? Something like: ...

Import Excel Data into PostgreSQL 9.3

I've developed a huge table in excel and now facing problem in transferring it into the postgresql database. I've downloaded the odbc software and I'm able to open table created in postgresql with exc..

Why is visible="false" not working for a plain html table?

The visible property of html table does not work. Why do they have that property if its defective? I had to use style="visibility:hidden" in order to hide a table. Please explain why. I am very cu..

GetType used in PowerShell, difference between variables

What is the difference between variables $a and $b? $a = (Get-Date).DayOfWeek $b = Get-Date | Select-Object DayOfWeek I tried to check $a.GetType $b.GetType MemberType : Method OverloadD..

How to redirect from one URL to another URL?

How can I redirect to another URL in a web page using JavaScript?..

Test if string is a number in Ruby on Rails

I have the following in my application controller: def is_number?(object) true if Float(object) rescue false end and the following condition in my controller: if mystring.is_number? end The c..

How to convert webpage into PDF by using Python

I was finding solution to print webpage into local file PDF, using Python. one of the good solution is to use Qt, found here, https://bharatikunal.wordpress.com/2010/01/. It didn't work at the beginn..

Decoding JSON String in Java

I am new to using the json-simple library in Java and I've been through both the encoding and decoding samples. Duplicating the encoding examples was fine, but I have not been able to get the decoding..

Convert floats to ints in Pandas?

I've been working with data imported from a CSV. Pandas changed some columns to float, so now the numbers in these columns get displayed as floating points! However, I need them to be displayed as int..

What is Java EE?

I realize that literally it translates to Java Enterprise Edition. But what I'm asking is what does this really mean? When a company requires Java EE experience, what are they really asking for? Exper..

How can I declare dynamic String array in Java

I am using String Array declare as zoom z[]=new String[422];. But this array stores value from 0 to 32, so I got null pointer exception after looping value 32. How to solve this problem in java? Ho..

Using :after to clear floating elements

I have a list and the li's have a float:left;. The contents after the <ul> should be aligned correctly. Therefore i can build the following: http://jsfiddle.net/8unU8/ I thought, that I can re..

How To Accept a File POST

I'm using asp.net mvc 4 webapi beta to build a rest service. I need to be able to accept POSTed images/files from client applications. Is this possible using the webapi? Below is how action I am cu..

Apache gives me 403 Access Forbidden when DocumentRoot points to two different drives

I am getting an 403 access forbidden when attempting to open a page under a vhost where the document root is sitting on a different drive than where apache is sitting. I installed using the apachefrie..

How to inherit constructors?

Imagine a base class with many constructors and a virtual method public class Foo { ... public Foo() {...} public Foo(int i) {...} ... public virtual void SomethingElse() {...} ... ..

Creating a batch file, for simple javac and java command execution

It is a really simple thing but I cannot get my head around it. I have looked at plenty of StackOverFlow post and as well as on internet. My goal is to create a .bat which will open cmd and execute m..

How to modify existing XML file with XmlDocument and XmlNode in C#

I already implemented to create the XML file below with XmlTextWriter when application initialization. And know I don't know how to update the childNode id value with XmlDocument & XmlNode. I..

Colon (:) in Python list index

I'm new to Python. I see : used in list indices especially when it's associated with function calls. Python 2.7 documentation suggests that lists.append translates to a[len(a):] = [x]. Why does one ..

How can I run a html file from terminal?

I have a html file that titled test.html this is the file: <!DOCTYPE html> <html> <body onload="document.getElementById('saveForm').click();"> <form method="post" enctype="multip..

How to parse XML using shellscript?

I would like to know what would be the best way to parse an XML file using shellscript ? Should one do it by hand ? Does third tiers library exist ? If you already made it if you could let me know..

Apache could not be started - ServerRoot must be a valid directory and Unable to find the specified module

I'm using xampp portable server and I'm having some trouble with Apache http server, it says "ServerRoot must be a valid directory" Command line output: Please close this command only for Shutdown A..

How can I fill a column with random numbers in SQL? I get the same value in every row

UPDATE CattleProds SET SheepTherapy=(ROUND((RAND()* 10000),0)) WHERE SheepTherapy IS NULL If I then do a SELECT I see that my random number is identical in every row. Any ideas how to generate uniqu..

CSS Layout - Dynamic width DIV

I have a pretty common layout issue that I have traditionally used a table to solve, but would like some advice on getting it done with CSS. I have 3 images that makeup a 'container'. The left and rig..

How to use Sublime over SSH

I'm trying to use Sublime Text 2 as an editor when I SSH in to my work server, and I'm stumped. I found this http://urbangiraffe.com/2011/08/13/remote-editing-with-sublime-text-2/ (among many other p..

How to include route handlers in multiple files in Express?

In my NodeJS express application I have app.js that has a few common routes. Then in a wf.js file I would like to define a few more routes. How can I get app.js to recognize other route handlers def..

Error: [ng:areq] from angular controller

This is a long shot, but has anyone seen this error before? I am trying to add 'Transporters' using express, angular and mongoDB. I get this error whenever I access a page ruled by the transporters co..

No Android SDK found - Android Studio

I have a problem with Android 0.4.2 Studio, when creating a new application, it tells me there is a problem with the rendering and shows me the following problem: Renderering Problems No Android SDK ..

How to hide only the Close (x) button?

I have a modal dialog, and need to hide the Close (X) button, but I cannot use ControlBox = false, because I need to keep the Minimize and Maximize buttons. I need to hide just Close button, is ther..

Codeigniter: does $this->db->last_query(); execute a query?

Does query execution happen at the get_where() clause of the following codeigniter active record statement? $this->db->select('*'); $q = $this->db->get_where('Contacts', array('id' =&..

Getting only Month and Year from SQL DATE

I need to access only Month.Year from Date field in SQL Server...

How to play only the audio of a Youtube video using HTML 5?

Is it possible to play only the audio from a YouTube video using HTML 5 and Javascript?..

How to insert multiple rows from array using CodeIgniter framework?

I'm passing a large dataset into a MySQL table via PHP using insert commands and I'm wondering if it's possible to insert approximately 1000 rows at a time via a query other than appending each value ..

Parsing JSON from XmlHttpRequest.responseJSON

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

Getting all types that implement an interface

Using reflection, how can I get all types that implement an interface with C# 3.0/.NET 3.5 with the least code, and minimizing iterations? This is what I want to re-write: foreach (Type t in this.Ge..

To compare two elements(string type) in XSLT?

i am new to XSLT ,can any one please suggest to me how to compare two elements coming from xml as string their values are: <OU_NAME>Vision Operations</OU_NAME> --XML code <OU_ADDR1>..

Adding elements to a C# array

I would like to programmatically add or remove some elements to a string array in C#, but still keeping the items I had before, a bit like the VB function ReDim Preserve...

Angularjs: Get element in controller

I am new to angularjs, I know that $scope represent a connection between the controller and the view, But is there a way besides looking for class="ng-scope" to get the scope element, I mean something..

The conversion of the varchar value overflowed an int column

For some value of @nReservationID: SELECT @phoneNumber= CASE WHEN ISNULL(rdg2.nPhoneNumber ,0) = 0 THEN ISNULL(rdg2.nMobileNumber, 0) ELSE ISNULL(rdg2.nPhoneNumber ,0) END from tblRe..

get all the images from a folder in php

I am using WordPress. I have an image folder like mytheme/images/myimages. I want to retrieve all the images name from the folder myimages Please advice me, how can I get images name...

How to create a pivot query in sql server without aggregate function

I am using MS SQL SERVER 2008 and I have following data: select * from account; | PERIOD | ACCOUNT | VALUE | ---------------------------- | 2000 | Asset | 205 | | 2000 | Equity | 365 | |..

SQL query to group by day

I want to list all sales, and group the sum by day. Sales (saleID INT, amount INT, created DATETIME) NOTE: I am using SQL Server 2005...

How to find all links / pages on a website

Is it possible to find all the pages and links on ANY given website? I'd like to enter a URL and produce a directory tree of all links from that site? I've looked at HTTrack but that downloads the wh..

ActivityCompat.requestPermissions not showing dialog box

if (ContextCompat.checkSelfPermission(RegisterActivity.this, Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_DENIED){ ActivityCompat.requestPermissions(this, ..

How do I catch a PHP fatal (`E_ERROR`) error?

I can use set_error_handler() to catch most PHP errors, but it doesn't work for fatal (E_ERROR) errors, such as calling a function that doesn't exist. Is there another way to catch these errors? I am..

embedding image in html email

I'm trying to send a multipart/related html email with embedded gif images. This email is generated using Oracle PL/SQL. My attempts have failed, with the image showing up as a red X (in Outlook 200..

What's the equivalent of Java's Thread.sleep() in JavaScript?

What's the equivalent of Java's Thread.sleep() in JavaScript?..

Android Studio build fails with "Task '' not found in root project 'MyProject'."

I get this error when trying to build my project after changing laptop and updating to Android Studio version 0.8.2. FAILURE: Build failed with an exception. What went wrong: Task '' not..

How to empty a list in C#?

I want to empty a list. How to do that?..

How to iterate through range of Dates in Java?

In my script I need to perform a set of actions through range of dates, given a start and end date. Please provide me guidance to achieve this using Java. for ( currentDate = starDate; currentDate &l..

How do I count the number of occurrences of a char in a String?

I have the string a.b.c.d I want to count the occurrences of '.' in an idiomatic way, preferably a one-liner. (Previously I had expressed this constraint as "without a loop", in case you're wonde..

How to upload a file to directory in S3 bucket using boto

I want to copy a file in s3 bucket using python. Ex : I have bucket name = test. And in the bucket, I have 2 folders name "dump" & "input". Now I want to copy a file from local directory to S3 "d..

How to use a TRIM function in SQL Server

I cannot get this TRIM code to work SELECT dbo.COL_V_Cost_GEMS_Detail.TNG_SYS_NR AS [EHP Code], dbo.COL_TBL_VCOURSE.TNG_NA AS [Course Title], LTRIM(RTRIM(FCT_TYP_CD)& ') AND (' & ..

Pass a PHP string to a JavaScript variable (and escape newlines)

What is the easiest way to encode a PHP string for output to a JavaScript variable? I have a PHP string which includes quotes and newlines. I need the contents of this string to be put into a JavaSc..

Call a Javascript function every 5 seconds continuously

Possible Duplicate: Calling a function every 60 seconds I want to Call a Javascript function every 5 seconds continuously. I have seen the setTimeOut event. Will it be working fine if I wan..

Java read file and store text in an array

I know how to read a file with Java using Scanner and File IOException, but the only thing I don't know is how to store the text in the files as an array. Here is a snippet of my code: public stat..

How to create a signed APK file using Cordova command line interface?

I made a sample application named checkStatus. Now I want to create a signed APK file. So I can install it in different devices for my testing. For this, I Googled and found this documentation. As p..

How to convert hex string to Java string?

For logging purpose we are converting the logs to byte array and then to hex string. I want to get it back in a Java String, but I am not able to do so. The hex string in log file looks something lik..

List to array conversion to use ravel() function

I have a list in python and I want to convert it to an array to be able to use ravel() function...

What is a reasonable code coverage % for unit tests (and why)?

If you were to mandate a minimum percentage code-coverage for unit tests, perhaps even as a requirement for committing to a repository, what would it be? Please explain how you arrived at your answer..

javax.naming.NameNotFoundException

I am running an example of ejb using JBoss5 Container. I am using an example from here(Part one). In the example I deployed bean in JBoss and an application in Tomcat(to acces the bean from JBoss). I..

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

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

Image re-size to 50% of original size in HTML

I'm trying to re-size a image in HTML, it's got width 314px and height 212px. I want to re-size it to 50%... but using this I still get a bigger image instead of a half-size image. <img src="ima..

How do I set a background-color for the width of text, not the width of the entire element, using CSS?

What I want is for the green background to be just behind the text, not to be 100% of the page width. Here is my current code: _x000D_ _x000D_ h1 { _x000D_ text-align: center; _x000D_ backgro..

Handling onchange event in HTML.DropDownList Razor MVC

I'm handling an onchange event with a selected value by simple HTML like this: <select onchange="location = this.value;"> <option value="/product/categoryByPage?PageSize=15" select..

Finding modified date of a file/folder

I am very new to PowerShell, and I was hoping I could get some help creating a script that tells me the modified date of a file. I wish I knew more about PowerShell, as I feel like I am asking a lot ..

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 can I add a string to the end of each line in Vim?

I want to add * to the end of each line in Vim. I tried the code unsuccessfully :%s/\n/*\n/g ..

CodeIgniter PHP Model Access "Unable to locate the model you have specified"

I have been trying to load some models for this website I am building. However, for an unknown reason, it will bring the following error : An Error Was Encountered Unable to locate the model you hav..

JQuery Datatables : Cannot read property 'aDataSort' of undefined

I created this fiddle to and it works well as per my requirements: Fiddle However, when I use the same in my application I get an error in the browser console saying Cannot read property 'aDataSort' ..

In Perl, how to remove ^M from a file?

I have a script that is appending new fields to an existing CSV, however ^M characters are appearing at the end of the old lines so the new fields end up on a new row instead of the same one. How do I..

How can I get file extensions with JavaScript?

See code: var file1 = "50.xsl"; var file2 = "30.doc"; getFileExtension(file1); //returns xsl getFileExtension(file2); //returns doc function getFileExtension(filename) { /*TODO*/ } ..

Run bash command on jenkins pipeline

Inside a groovy script (for a jenkins pipeline): How can I run a bash command instead of a sh command? I have tried the following: Call "#!/bin/bash" inside the sh call: stage('Setting the variable..

Generate sql insert script from excel worksheet

I have a large excel worksheet that I want to add to my database. Can I generate an SQL insert script from this excel worksheet?..

Adding a leading zero to some values in column in MySQL

I have a CSV file sent to me in CSV. The field of interest is 8 digits. Some of those started with a 0. The field was sent numeric. So, I now have dropped some leading zeros. I already converted the ..

Fetch first element which matches criteria

How to get first element that matches a criteria in a stream? I've tried this but doesn't work this.stops.stream().filter(Stop s-> s.getStation().getName().equals(name)); That criteria is not wo..