Poular Questions

4

answers

BSTR to std::string (std::wstring) and vice versa

While working with COM in C++ the strings are usually of BSTR data type. Someone can use BSTR wrapper like CComBSTR or MS's CString. But because I can't use ATL or MFC in MinGW compiler, is there stan..

10

answers

How to override equals method in Java

I am trying to override equals method in Java. I have a class People which basically has 2 data fields name and age. Now I want to override equals method so that I can check between 2 People objects. ..

8

answers

Why use a ReentrantLock if one can use synchronized(this)?

I'm trying to understand what makes the lock in concurrency so important if one can use synchronized (this). In the dummy code below, I can do either: synchronized the entire method or synchronize t..

5

answers

Reload child component when variables on parent component changes. Angular2

I have a MasterComponent which loads header, footer, sidebar etc. On the header there is a dropdown whose options are set once the user is logged in. I want the header to be constant even if I navigat..

10

answers

Detecting value change of input[type=text] in jQuery

I want to execute a function every time the value of a specific input box changes. It almost works with $('input').keyup(function), but nothing happens when pasting text into the box, for example. $in..

9

answers

How to calculate the sum of the datatable column in asp.net?

I have a DataTable which has 5 columns: ID Name Account Number Branch Amount The DataTable contains 5 rows. How can I show the sum of the Amount Column in a Label Control as "Total Amount"?..

2

answers

Align text to the bottom of a div

I tried to align my text to the bottom of a div from other posts and answers in Stack Overflow I learned to handle this with different CSS properties. But I can't get it done. Basically my HTML code i..

3

answers

How to convert a NumPy array to PIL image applying matplotlib colormap

I have a simple problem, but I cannot find a good solution to it. I want to take a NumPy 2D array which represents a grayscale image, and convert it to an RGB PIL image while applying some of the mat..

7

answers

How to center a <p> element inside a <div> container?

I want my <p> element to be at the center of a container <div>, as in perfectly centered -- the top, bottom, left and right margins split the spaces equally. How can I achieve that? _x00..

3

answers

Get table name by constraint name

Oracle constraint name is known. How do I find the name of the table for which this constraint is applied?..

11

answers

Javascript - Regex to validate date format

Is there any way to have a regex in JavaScript that validates dates of multiple formats, like: DD-MM-YYYY or DD.MM.YYYY or DD/MM/YYYY etc? I need all these in one regex and I'm not really good with it..

7

answers

How to escape indicator characters (i.e. : or - ) in YAML

In a config file, I have a key to which I wish to assign a URL. The problem is that YAML interprets : and - characters as either creating mappings or lists, so it has a problem with the line url: ht..

1

answers

R Language: How to print the first or last rows of a data set?

I can print first n rows by the following command: > dataset[1:n, ] Is there a more elegant way to do this? Also, how can I print the last rows of a data set?..

11

answers

What does numpy.random.seed(0) do?

What does np.random.seed do in the below code from a Scikit-Learn tutorial? I'm not very familiar with NumPy's random state generator stuff, so I'd really appreciate a layman's terms explanation of th..

6

answers

Check if a input box is empty

How can I check if a given input control is empty? I know there is $pristine property on the field which tells that if a given field is empty initially but what if when someone fill the field and yank..

16

answers

Custom bullet symbol for <li> elements in <ul> that is a regular character, and not an image

I realize one can specify a custom graphic to be a replacement bullet character, using CSS attribute: list-style-image And then giving it a URL. However, in my case, I just want to use the '+' sym..

38

answers

Error: Could not find or load main class in intelliJ IDE

I'm a beginner in Java and am trying to run my code using IntelliJ that I just installed as my IDE with JDK 1.7. The following piece of code keeps does not even compile and keeps giving me the error:..

6

answers

How to write multiple line string using Bash with variables?

How can I write multi-lines in a file called myconfig.conf using BASH? #!/bin/bash kernel="2.6.39"; distro="xyz"; echo <<< EOL line 1, ${kernel} line 2, line 3, ${distro} line 4 line ... EO..

8

answers

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

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

13

answers

While variable is not defined - wait

I have a click event that is triggered from another place automatically for the first time. My problem is that it runs too soon, since the required variables are still being defined by Flash and web s..

6

answers

How to pass an object into a state using UI-router?

I'd like to be able to transition to a state and a pass an arbitrary object using ui-router. I'm aware that usually $stateParams is used, but I believe this value is inserted into the URL, and I don'..

6

answers

Could not resolve '...' from state ''

This is first time i am trying to use ui-router. Here is my app.js angular.module('myApp', ['ionic']) .run(function($ionicPlatform) { $ionicPlatform.ready(function() { // Hide the accessory b..

5

answers

How to add element into ArrayList in HashMap

How to add element into ArrayList in HashMap? HashMap<String, ArrayList<Item>> Items = new HashMap<String, ArrayList<Item>>(); ..

6

answers

python inserting variable string as file name

I'm trying to create a file file a unique file name, every time my script is ran, it's only intended to be weekly or monthly. so I chose to use the date for the file name. f = open('%s.csv', 'wb') %..

5

answers

How can I add a username and password to Jenkins?

When I go to mydomain.com:8080 there is no authorization mechanism by default. I have had look at the configuration area but cannot find anywhere to add a basic username and password..

32

answers

Format a number as 2.5K if a thousand or more, otherwise 900

I need to show a currency value in the format of 1K of equal to one thousand, or 1.1K, 1.2K, 1.9K etc, if its not an even thousands, otherwise if under a thousand, display normal 500, 100, 250 etc, u..

30

answers

Iterate through object properties

_x000D_ _x000D_ var obj = {_x000D_ name: "Simon",_x000D_ age: "20",_x000D_ clothing: {_x000D_ style: "simple",_x000D_ hipster: false_x000D_ }_x000D_ }_x000D_ _x000D_ fo..

11

answers

React JS - Uncaught TypeError: this.props.data.map is not a function

I'm working with reactjs and cannot seem to prevent this error when trying to display JSON data (either from file or server): Uncaught TypeError: this.props.data.map is not a function I've looked a..

3

answers

Calling a rest api with username and password - how to

I am new to rest api's and calling them via .NET I have an api: https://sub.domain.com/api/operations?param=value&param2=value The notes for the api say that to authorize I need to use the basic..

26

answers

Eclipse JUnit - possible causes of seeing "initializationError" in Eclipse window

I know this question is pretty general but I haven't found any hints on why this error may show up. What are possible causes of seeing initalizationError in Eclipse window? I get no useful information..

3

answers

How to use SqlClient in ASP.NET Core?

I am trying to use SQLClient library in the ASP.net Core but cant seem to get it working. I found this article online advising how to setup but its not working for me: http://blog.developers.ba/using..

8

answers

How to implement static class member functions in *.cpp file?

Is it possible to implement static class member functions in *.cpp file instead of doing it in the header file ? Are all static functions always inline?..

17

answers

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

8

answers

Python 2: AttributeError: 'list' object has no attribute 'strip'

I have a small problem with list. So i have a list called l: l = ['Facebook;Google+;MySpace', 'Apple;Android'] And as you can see I have only 2 strings in my list. I want to separate my list l by '..

6

answers

How to show first commit by 'git log'?

I have a project which has long history. I want to show the first commit on git. How do I do this?..

5

answers

C/C++ NaN constant (literal)?

Is this possible to assign a NaN to a double or float in C/C++? Like in JavaScript you do: a = NaN. So later you can check if the variable is a number or no...

31

answers

Chrome DevTools Devices does not detect device when plugged in

I cannot seem to get the DevTools Devices feature to work on my Samsung Galaxy S4 even after following the steps outlined at https://developers.google.com/chrome-developer-tools/docs/remote-debugging ..

11

answers

Deep copy in ES6 using the spread syntax

I am trying to create a deep copy map method for my Redux project that will work with objects rather than arrays. I read that in Redux each state should not change anything in the previous states. ex..

8

answers

Java Object Null Check for method

I need to create a null check in this formula for the books[i] and I am not entirely sure how to go about this as I am not greatly familiar with null checks and very new at programming. Any and all he..

7

answers

Moving up one directory in Python

Is there a simple way to move up one directory in python using a single line of code? Something similar to cd .. in command line..

5

answers

Laravel Update Query

I am trying to update a User on the basis of the email not there id, is there a way of doing this without raw queries. Currently the error {"error":{"type":"ErrorException","message":"Creating ..

11

answers

Get environment value in controller

In my .env file I have the following: IMAP_HOSTNAME_TEST=imap.gmail.com [email protected] IMAP_PASSWORD_TEST=mypw Now I would like to use them in my controller. I've tried this, ..

8

answers

Simplest way to wait some asynchronous tasks complete, in Javascript?

I want to drop some mongodb collections, but that's an asynchronous task. The code will be: var mongoose = require('mongoose'); mongoose.connect('mongo://localhost/xxx'); var conn = mongoose.connec..

4

answers

Vue-router redirect on page not found (404)

I'm trying to redirect to 404.html on page not found using the router.beforeEach global hook, without much success (using Vueand Vue-Router 1.0): router.beforeEach(function (transition) { if (tra..

5

answers

Assign a synthesizable initial value to a reg in Verilog

I'm an FPGA noob trying to learn Verilog. How can I "assign" a value to a reg in an always block, either as an initial value, or as a constant. I'm trying to do something like this in the code below..

42

answers

PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value

After typing cordova run android in terminal, I'm getting this error: Waiting for emulator to start... PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [/Users/username/Library/Androi..

3

answers

error C4996: 'scanf': This function or variable may be unsafe in c programming

I have created a small application to find max number by using user-defined function with parameter. When I run it, it shows this message Error 1 error C4996: 'scanf': This function or variab..

3

answers

AngularJS $watch window resize inside directive

I have revealing module pattern which looks like this: 'use strict'; angular.module('app', []) .directive('myDirective', ['SomeDep', function (SomeDep) { var linker = function (scope, elem..

2

answers

How to transform currentTimeMillis to a readable date format?

I want to use currentTimeMillis twice so I can calculate a duration but I also want to display Time and Date in user readable format. I'm having trouble as currentTimeMillis is good for the calculatio..

6

answers

Get key and value of object in JavaScript?

Given a JavaScript array of objects, how can I get the key and value of each object? The code below shows what I'd like to do, but obviously doesn't work: var top_brands = [ { 'Adidas' : 100 }, { 'N..

7

answers

How can JavaScript save to a local file?

There's already a solution for writing file JSON online but I want to save json file locally. I've tried to use this example http://jsfiddle.net/RZBbY/10/ It creates a link to download the file, using..

6

answers

How to implement a ViewPager with different Fragments / Layouts

When I start an activity which implements viewpager, the viewpager created various fragments. I want to use different layouts for each fragment, but the problem is that viewpager shows only two layout..

10

answers

How to execute only one test spec with angular-cli

I have Angular2 project build with Angular-CLI (beta 20). Is there a way to run tests against only one selected spec file? I used to have a project based on Angular2 quick start, and I could manual..

2

answers

Loop through array of values with Arrow Function

Lets say I have: var someValues = [1, 'abc', 3, 'sss']; How can I use an arrow function to loop through each and perform an operation on each value?..

9

answers

Is there a color code for transparent in HTML?

I'm building a new website, and I'm looking for a transparent navigation bar so the background is visible...

3

answers

jQuery Data vs Attr?

What is the difference in usage between $.data and $.attr when using data-someAttribute? My understanding is that $.data is stored within jQuery's $.cache, not the DOM. Therefore, if I want to use $...

14

answers

Select option padding not working in chrome

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

5

answers

How to get javax.comm API?

I'd recently downloaded a project on SMS sending, but when I tries to compile the code it gives error on line import javax.comm.*;. Can anybody tell me where to find javax.comm and where to place s..

9

answers

How to lowercase a pandas dataframe string column if it has missing values?

The following code does not work. import pandas as pd import numpy as np df=pd.DataFrame(['ONE','Two', np.nan],columns=['x']) xLower = df["x"].map(lambda x: x.lower()) How should I tweak it to ge..

1

answers

How to display image with JavaScript?

I am trying to display image, through JavaScript, but i can't figure out how to do that. I have following function image(a,b,c) { this.link=a; this.alt=b; this.thumb=c; } function show_image()..

3

answers

What is the path for the startup folder in windows 2008 server

Is there a folder to keep programs to run while doing starting of the system. As like this "C:\Users\All Users\Microsoft\Windows\Start Menu\Programs\Startup"??. Thanks, Varun..

11

answers

How to set selected value from Combobox?

I use combobox in c# windows form. I bound the item list as below: var employmentStatus = new BindingList<KeyValuePair<string, string>>(); employmentStatus.Add(new KeyValuePair<string..

15

answers

How to enable production mode?

I was reading related questions and I found this one, but my question is how can I switch from development to production mode. There are some differences between the modes which are pointed out here. ..

7

answers

Is it possible to capture the stdout from the sh DSL command in the pipeline

For example: var output=sh "echo foo"; echo "output=$output"; I will get: output=0 So, apparently I get the exit code rather than the stdout. Is it possible to capture the stdout into a pipeline..

10

answers

How to add and remove classes in Javascript without jQuery

I'm looking for a fast and secure way to add and remove classes from an html element without jQuery. It also should be working in early IE (IE8 and up)...

13

answers

How to zero pad a sequence of integers in bash so that all have the same width?

I need to loop some values, for i in $(seq $first $last) do does something here done For $first and $last, i need it to be of fixed length 5. So if the input is 1, i need to add zeros in front ..

6

answers

Working Soap client example

I'm trying to find a simple (ha) SOAP example in JAVA with a working service, any I seem to be finding are not working. I have tried this one from this example but it's just not working, it's asking ..

16

answers

Composer killed while updating

I got a problem, I tried to install a new package to my Laravel 4 project. But when I run php composer.phar update I get this: Loading composer repositories with package information Updating dependen..

10

answers

How to start working with GTest and CMake

I have recently been sold on using CMake for compiling my C++ projects, and would now like to start writing some unit tests for my code. I have decided to use the Google Test utility to help with this..

14

answers

Artisan migrate could not find driver

I am trying to install Laravel. I have installed Xampp, but when I try to setup my database using php artisan migrateI get the error: [Illuminate\Database\QueryException] could not find driver (..

8

answers

Accuracy Score ValueError: Can't Handle mix of binary and continuous target

I'm using linear_model.LinearRegression from scikit-learn as a predictive model. It works and it's perfect. I have a problem to evaluate the predicted results using the accuracy_score metric. This is ..

14

answers

Convert True/False value read from file to boolean

I'm reading a True - False value from a file and I need to convert it to boolean. Currently it always converts it to True even if the value is set to False. Here's a MWE of what I'm trying to do: wi..

6

answers

Installing J2EE into existing eclipse IDE

I have Eclipse Galileo (Version: 3.5.2), which I use to develop Jave SE applications. I want to learn Java EE. How do I incorporate Java EE? Or do I need to install a Java EE specific Eclipse IDE? Fo..

11

answers

Regex pattern inside SQL Replace function?

SELECT REPLACE('<strong>100</strong><b>.00 GB', '%^(^-?\d*\.{0,1}\d+$)%', ''); I want to replace any markup between two parts of the number with above regex, but it does not seem t..

6

answers

jQuery UI: Datepicker set year range dropdown to 100 years

Using the Datepicker the year drop down by default shows only 10 years. The user has to click the last year in order to get more years added. How can we set the initial range to be 100 years so that ..

2

answers

Understanding timedelta

Given the python code below, please help me understand what is happening there. start_time = time.time() time.sleep(42) end_time = time.time() uptime = end_time - start_time human_uptime = str(date..

5

answers

background-size in shorthand background property (CSS3)

I'm trying to mix background-image and background-size properties in a shorthanded background property. Based on W3C documentation background-size should come after background-position property separa..

13

answers

iOS Launching Settings -> Restrictions URL Scheme

I've recently discovered the awesome iOS5 custom Settings URL Scheme, which can be explained in detail at this great website. I've found this to work, directing the user to the Settings app from my a..

3

answers

How to convert interface{} to string?

I'm using docopt to parse command-line arguments. This works, and it results in a map, such as map[<host>:www.google.de <port>:80 --help:false --version:false] Now I would like to conca..

1

answers

VBA for filtering columns

I have a big database-like sheet, first row contains headers. I would like a subset of rows of this table based on column values. Two issues: 1) VBA-wise I would like to loop through the columns, whe..

6

answers

grunt: command not found when running from terminal

I'm new to Grunt. I'm trying to configure Grunt on my Mac OSX Lion. I followed the instructions here and then created a project folder that contains the files below. When I try to run by typing "gru..

11

answers

How to update Ruby Version 2.0.0 to the latest version in Mac OSX Yosemite?

I need to update my ruby version from 2.0.0 to the latest version, I can not use some gems because my version is not updated. I had used Homebrew to install Ruby some time ago, How can i update my Rub..

8

answers

converting list to json format - quick and easy way

Let's say I have an object MyObject that looks like this: public class MyObject { int ObjectID {get;set;} string ObjectString {get;set;} } I have a list of MyObject and I'm looking to convert ..

8

answers

I cannot start SQL Server browser

I can't start the SQL Server browser from SQL Service Configuration Manager 2008 version. There are absolutely no options to start the service. It's disabled as image shown below. How should I start t..

16

answers

Scala how can I count the number of occurrences in a list

val list = List(1,2,4,2,4,7,3,2,4) I want to implement it like this: list.count(2) (returns 3)...

16

answers

How to get the full url in Express?

Let's say my sample url is http://example.com/one/two and I say I have the following route app.get('/one/two', function (req, res) { var url = req.url; } The value of url will be /one/two..

2

answers

How to set IntelliJ IDEA Project SDK

I just installed IntelliJ IDEA and when I try to create my first Project it asks for me to set up the Project SDK. When I click on "JDK" it asks for me to select the home directory of the JDK as shown..

7

answers

How to reject in async/await syntax?

How can I reject a promise that returned by an async/await function? e.g. Originally: foo(id: string): Promise<A> { return new Promise((resolve, reject) => { someAsyncPromise().then((va..

23

answers

Using Python, find anagrams for a list of words

If I have a list of strings for example: ["car", "tree", "boy", "girl", "arc"...] What should I do in order to find anagrams in that list? For example (car, arc). I tried using for loop for each st..

9

answers

Automating running command on Linux from Windows using PuTTY

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

7

answers

javascript setTimeout() not working

Hi I'm trying to use the function setTimeout() in javascript except it's not working. Thanks in advance to anyone who can help. <!DOCTPYE html> <html> <head> <script> ..

4

answers

How to count the number of true elements in a NumPy bool array

I have a NumPy array 'boolarr' of boolean type. I want to count the number of elements whose values are True. Is there a NumPy or Python routine dedicated for this task? Or, do I need to iterate over ..

9

answers

UICollectionView auto scroll to cell at IndexPath

Before loading the collection view user sets the number of image in the array of collection view. All of the cells don't fit on the screen. I have 30 cells and only 6 on the screen. The question: How..

4

answers

DataTables: Uncaught TypeError: Cannot read property 'defaults' of undefined

When using the Bootstrap integration for DataTables, I see the following error in the console: Uncaught TypeError: Cannot read property 'defaults' of undefined (dataTables.bootstrap.js:20) This caus..

20

answers

Can I change the color of Font Awesome's icon color?

I have to wrap my icon within an <a> tag for some reason. Is there any possible way to change the color of a font-awesome icon to black? or is it impossible as long as it wrapped within an <a..

2

answers

Reference to a non-shared member requires an object reference occurs when calling public sub

I have a Public Class "General" in which is a Public Sub "updateDynamics". When I attempt to reference it in the code-behind for a page like so: updateDynamics(get_prospect.dynamicsID) I get the fo..

6

answers

DateTime.ToString("MM/dd/yyyy HH:mm:ss.fff") resulted in something like "09/14/2013 07.20.31.371"

I have a WP8 app, which will send the current time to a web service. I get the datetime string by calling DateTime.ToString("MM/dd/yyyy HH:mm:ss.fff") For most users it works great and gives me t..

10

answers

Show Current Location and Update Location in MKMapView in Swift

I am learning how to use the new Swift language (only Swift, no Objective-C). To do it, I want to do a simple view with a map (MKMapView). I want to find and update the location of the user (like in t..

14

answers

Visual Studio 2013 Install Fails: Program Compatibility Mode is on (Windows 10)

I want to install Visual Studio Ultimate 2013 on my Windows 10 but I have this error: I have done these two things (they have solved the problem on Windows 8) but still I cannot install it. ..

3

answers

Google API for location, based on user IP address

I am looking for a way to get the user's current location (city) based on is IP address using the Google Maps APIs. Something similar to http://freegeoip.net/json but only using the Google Maps APIs...

6

answers

Change content of div - jQuery

How is it possible to change the content of this div, when one of the LINKS is clicked? <div align="center" id="content-container"> <a href="#" class="click cgreen">Main Balance</a..

7

answers

CSS text-align: center; is not centering things

I have the following html: <div id="footer"> <ul id="menu-utility-navigation" class="links clearfix"> <li class="menu-685 menu-site_map fi..

4

answers

RESTful Authentication via Spring

Problem: We have a Spring MVC-based RESTful API which contains sensitive information. The API should be secured, however sending the user's credentials (user/pass combo) with each request is not desir..

34

answers

How to enable CORS in ASP.net Core WebAPI

What I am trying to do I have a backend ASP.Net Core Web API hosted on an Azure Free Plan (Source Code: https://github.com/killerrin/Portfolio-Backend). I also have a Client Website which I want to..

10

answers

Email address validation using ASP.NET MVC data type attributes

I have some problems with the validation of a Email. In my Model: [Required(ErrorMessage = "Field can't be empty")] [DataType(DataType.EmailAddress, ErrorMessage = "E-mail is not valid")] public str..

6

answers

Namespace for [DataContract]

I can't find the namespace to use for [DataContract] and [DataMember] elements. According to what I've found, it seems that adding the following should be enough, but in my case it is not. using Syst..

6

answers

A formula to copy the values from a formula to another column

I have a column of values created from a formula, I know I can copy the values over to another column by using the clipboard. BUT...I want my spreadsheet to be automatic whilst avoiding the use of VBA..

19

answers

How can I clear console

As in the title. How can I clear console in C++?..

9

answers

How to find which columns contain any NaN value in Pandas dataframe

Given a pandas dataframe containing possible NaN values scattered here and there: Question: How do I determine which columns contain NaN values? In particular, can I get a list of the column names co..

22

answers

Printing prime numbers from 1 through 100

This c++ code prints out the following prime numbers: 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97. But I don't think that's the way my book wants it to be written. It menti..

4

answers

Invalid shorthand property initializer

I wrote the following code in JavaScript for a node project, but I ran into an error while testing a module. I'm not sure what the error means. Here's my code: var http = require('http'); // makes an..

17

answers

How do I call Objective-C code from Swift?

In Swift, how does one call Objective-C code? Apple mentioned that they could co-exist in one application, but does this mean that one could technically re-use old classes made in Objective-C whilst ..

2

answers

Excel: Can I create a Conditional Formula based on the Color of a Cell?

I'm a beginner and trying to create a formula that modifies the contents of Cell A1 based on the color of the cell in B2; If Cell B2 = [the color red] then display FQS. If Cell B2 = [the color yello..

4

answers

MVC3 DropDownListFor - a simple example?

I'm having trouble with DropDownListFor in my MVC3 app. I was able to use StackOverflow to figure out how to get them to appear on the View, but now I don't know how to capture the values in its cor..

9

answers

What is the benefit of zerofill in MySQL?

I just want to know what is the benefit/usage of defining ZEROFILL for INT DataType in MySQL? `id` INT UNSIGNED ZEROFILL NOT NULL ..

8

answers

Javascript/jQuery: Set Values (Selection) in a multiple Select

I have a multiple select: <select name='strings' id="strings" multiple style="width:100px;"> <option value="Test">Test</option> <option value="Prof">Prof</option>..

8

answers

How to stop a PowerShell script on the first error?

I want my PowerShell script to stop when any of the commands I run fail (like set -e in bash). I'm using both Powershell commands (New-Object System.Net.WebClient) and programs (.\setup.exe)...

8

answers

How to display the function, procedure, triggers source code in postgresql?

How to print functions and triggers sourcecode in postgresql? please let me know if any one know the query to display the function, triggers source code...

1

answers

Select Row number in postgres

How to select row number in postgres. I tried this: select row_number() over (ORDER BY cgcode_odc_mapping_id)as rownum, cgcode_odc_mapping_id from access_odc.access_odc_mapping_tb order by..

24

answers

How to remove single character from a String

For accessing individual characters of a String in Java, we have String.charAt(2). Is there any inbuilt function to remove an individual character of a String in java? Something like this: if(Strin..

4

answers

Call JavaScript function from C#

Javascript.js function functionname1(arg1, arg2){content} C# file public string functionname(arg) { if (condition) { functionname1(arg1,arg2); // How do I call the JavaScript funct..

2

answers

Jquery function return value

I've created a function to iterate through a UL/LI. This works perfectly, my problem is returning the value to another variable. Is this even possible? What's the best method for this? Thanks! functi..

6

answers

How to find the users list in oracle 11g db?

How to find out the users list, which is all created in the oracle 11g database. Is there any command to find out the users list which we can execute from the Command line interface! ..

6

answers

Remove IE10's "clear field" X button on certain inputs?

It's a useful feature, to be sure, but is there any way to disable it? For instance, if the form is a single text field and already has a "clear" button beside it, it's superfluous to also have the X...

6

answers

Tar archiving that takes input from a list of files

I have a file that contain list of files I want to archive with tar. Let's call it mylist.txt It contains: file1.txt file2.txt ... file10.txt Is there a way I can issue TAR command that takes myli..

6

answers

Why calling react setState method doesn't mutate the state immediately?

I'm reading Forms section of reactjs documentation and just tried this code to demonstrate onChange usage (JSBIN). var React= require('react'); var ControlledForm= React.createClass({ getInitial..

10

answers

Sequelize, convert entity to plain object

I'm not very familiar with javascript, and stunning, because i can't add new property, to object, that fetched from database using ORM names Sequelize.js. To avoid this, i use this hack: db.Sensors...

6

answers

Android - Package Name convention

For the "Hello World" example in android.com, the package name is "package com.example.helloandroid;" Is there any guideline/standard to name this package? (references would be nice)..

11

answers

get next and previous day with PHP

I have got two arrows set up, click for next day, next two days, soon and previous day, two days ago, soon. the code seem not working? as it only get one next and previous day. <a href="home.php?d..

10

answers

CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False

I'm using Django 1.6.5 with the setting: DEBUG = True When I change to DEBUG = False and run manage.py runserver, I get the following error: CommandError: You must set settings.ALLOWED_HOSTS if DEBUG..

20

answers

load scripts asynchronously

I am using several plugins, custom widgets and some other libraries from JQuery. as a result I have several .js and .css files. I need to create a loader for my site because it takes some time to load..

4

answers

Wait until an HTML5 video loads

I have a video tag, that I dynamically change its source as I am letting the user to choose from a number of videos from the database. The problem is that when I change the src attribute the video doe..

6

answers

DTO pattern: Best way to copy properties between two objects

In my application's architecture I usually send the object or list of objects from the data access layer to the web layer via the service layer, in which these objects get transformed from a DAO objec..

3

answers

How to multiply a BigDecimal by an integer in Java

How do you multiply a BigDecimal by an integer in Java? I tried this but its not correct. import java.math.BigDecimal; import java.math.MathContext; public class Payment { int itemCost; int ..

10

answers

AppStore - App status is ready for sale, but not in app store

Status of app ready for sale still 9 June.. Like in there https://discussions.apple.com/message/8147141 App link : https://itunes.apple.com/us/app/yupek-mebel/id884771427?ls=1&mt=8..

17

answers

Why do I get "'property cannot be assigned" when sending an SMTP email?

I can't understand why this code is not working. I get an error saying property can not be assigned MailMessage mail = new MailMessage(); SmtpClient client = new SmtpClient(); client.Port..

6

answers

How to amend older Git commit?

I have made 3 git commits, but have not been pushed. How can I amend the older one (ddc6859af44) and (47175e84c) which is not the most recent one? $git log commit f4074f289b8a49250b15a4f25ca4b4601745..

3

answers

Open file with associated application

i want to ask for help with opening a file from c# app with associated app. I tried this: ProcessStartInfo pi = new ProcessStartInfo(file); pi.Arguments = Path.GetFileName(file); pi...

7

answers

How do I make a comment in a Dockerfile?

I am writing a Dockerfile. Is there a way to make comments in this file? Does Docker have a comment option that takes the rest of a line and ignores it?..

4

answers

Custom header to HttpClient request

How do I add a custom header to a HttpClient request? I am using PostAsJsonAsync method to post the JSON. The custom header that I would need to be added is "X-Version: 1" This is what I have don..

7

answers

linq query to return distinct field values from a list of objects

class obj { int typeId; //10 types 0-9 string uniqueString; //this is unique } Assume there is list with 100 elements of obj, but only 10 unique typeIDs. Is it possible to do write a LINQ q..

8

answers

CSS table td width - fixed, not flexible

I have a table and I want to set a fixed width of 30px on the td's. the problem is that when the text in the td is too long, the td is stretched out wider than 30px. Overflow:hidden doesn't work eithe..

22

answers

Eclipse C++ : "Program "g++" not found in PATH"

I have gpp installed in my Windows 7 (32 bit) as shown in the picture. PATH variable gas g++ "%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\..

3

answers

Add multiple items to a list

static class Program { static void Main(string carMake, string carModel, string carColour, string bikeModel, string bikeMake, string bikeColour, string truckMake, string truckModel, string truckCo..

6

answers

Can I limit the length of an array in JavaScript?

I want to display the product browsing history, so I am storing the product ids in a browser cookie. Because the list of history is limited to 5 items, I convert the cookie value to an array, then ch..

21

answers

Can't connect to local MySQL server through socket homebrew

I recently tried installing MySQL with homebrew (brew install mysql) and when I try to run it I get the following error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tm..

5

answers

Chrome Fullscreen API

According to this article Google Chrome 15 has a fullscreen JavaScript API. I have tried to make it work but failed. I have also searched for official documentation in vain. What does the fullscreen..

11

answers

sprintf like functionality in Python

I would like to create a string buffer to do lots of processing, format and finally write the buffer in a text file using a C-style sprintf functionality in Python. Because of conditional statements, ..

7

answers

JPA: unidirectional many-to-one and cascading delete

Say I have a unidirectional @ManyToOne relationship like the following: @Entity public class Parent implements Serializable { @Id @GeneratedValue private long id; } @Entity public class..

1

answers

Excel VBA, error 438 "object doesn't support this property or method

I have this code in which I've been getting help with a bit, but I've run into an issue, or what I think is an issue. The last lookup, I am being told that the object doesn't support this property or ..

9

answers

Copy output of a JavaScript variable to the clipboard

I have no knowledge of JavaScript, but I managed to put this code together using bits and bolts from various Stack Overflow answers. It works OK, and it outputs an array of all selected checkboxe..

3

answers

execute shell command from android

I'm trying to execute this command from the application emulator terminal (you can find it in google play) in this app i write su and press enter, so write: screenrecord --time-limit 10 /sdcard/MyVid..

9

answers

How can I pass a member function where a free function is expected?

The question is the following: consider this piece of code: #include <iostream> class aClass { public: void aTest(int a, int b) { printf("%d + %d = %d", a, b, a + b);..

16

answers

Where to find htdocs in XAMPP Mac

I cannot find the htdocs directory anywhere on XAMPP for Mac. Many videos on YouTube show people just clicking a button that says "Go to application folder" but on my user interface, it reads: "Go to..

5

answers

Ruby Regexp group matching, assign variables on 1 line

I'm currently trying to rexp a string into multiple variables. Example string: ryan_string = "RyanOnRails: This is a test" I've matched it with this regexp, with 3 groups: ryan_group = ryan_string..

7

answers

An example of how to use getopts in bash

I want to call myscript file in this way: $ ./myscript -s 45 -p any_string or $ ./myscript -h #should display help $ ./myscript #should display help My requirements are: getopt here to ge..

2

answers

Numpy, multiply array with scalar

Is it possible to use ufuncs https://docs.scipy.org/doc/numpy/reference/ufuncs.html In order to map function to array (1D and / or 2D) and scalar If not what would be my way to achieve this? For examp..

1

answers

Multiple rows to one comma-separated value in Sql Server

I want to create a table valued function in SQL Server, which I want to return data in comma separated values. For example table: tbl ID | Value ---+------- 1 | 100 1 | 200 1 | 300 1 | 400 ..

11

answers

Resolving require paths with webpack

I'm still confused how to resolve module paths with webpack. Now I write: myfile = require('../../mydir/myfile.js') but I'd like to write myfile = require('mydir/myfile.js') I was thinking tha..

7

answers

How can I select rows by range?

Possible Duplicate: Select statement in SQLite recognizing row number For example, SELECT * FROM table WHERE [row] BETWEEN x AND y How can this be done? I've done some reading but haven't ..

7

answers

How to read file with async/await properly?

I cannot figure out how async/await works. I slightly understands it but I can't make it work. function loadMonoCounter() { fs.readFileSync("monolitic.txt", "binary", async function(err, data) { ..

9

answers

Spring Data: "delete by" is supported?

I am using Spring JPA for database access. I am able to find examples such as findByName and countByName, for which I dont have to write any method implementation. I am hoping to find examples for del..

5

answers

The 'packages' element is not declared

When using asp.net mvc 3 project with vs 2010 I have lots of warnings like the ones below: I wonder if I did something wrong and I need to change something, because this is the out of the box project..

4

answers

Open File in Another Directory (Python)

I've always been sort of confused on the subject of directory traversal in Python, and have a situation I'm curious about: I have a file that I want to access in a directory essentially parallel to th..

19

answers

pip installation /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory

I don't know what's the deal but I am stuck following some stackoverflow solutions which gets nowhere. Can you please help me on this? Monas-MacBook-Pro:CS764 mona$ sudo python get-pip.py The d..

5

answers

Jersey client: How to add a list as query parameter

I'm creating a Jersey client for a GET service that has a List as query parameter. According to the documentation, it's possible to have a List as a query parameter (this information is also at @Query..

18

answers

intelliJ IDEA 13 error: please select Android SDK

I have installed Android SDK 22.3 and JDK 1.7 update 21 on Win7 x64. Now I created an empty android application project using intelliJ 13.0.1 (also use Emulator as target device) and tried to build th..

3

answers

Go to next item in ForEach-Object

I have a PowerShell script that does some checks on all Domain Admins in a number of domains. For each user account a number of checks are preformed. When one of them fails the script should go to the..

2

answers

Difference between save and saveAndFlush in Spring data jpa

I am trying to learn spring data JPA by testing some CRUD operation via JpaRepository. I came across two methods save and saveAndFlush. I don't get the difference between these two. On calling save a..

13

answers

Make HTML5 video poster be same size as video itself

Does anyone know how to resize the HTML5 video poster such that it fits the exact dimensions of the video itself? here's a jsfiddle which shows the problem: http://jsfiddle.net/zPacg/7/ here's that ..

7

answers

Why use 'git rm' to remove a file instead of 'rm'?

On SVN, removing something from the filesystem directly (rather than using svn) created a load of headaches. I haven't found this to be an issue when using git, but I notice that git has it's own rm ..

7

answers

PHP remove commas from numeric strings

In PHP, I have an array of variables that are ALL strings. Some of the values stored are numeric strings with commas. What I need: A way to trim the commas from strings, and ONLY do this for nume..

7

answers

Facebook Graph API v2.0+ - /me/friends returns empty, or only friends who also use my application

I am trying to get my friend name and ids with Graph API v2.0, but data returns empty: { "data": [ ] } When I was using v1.0, everything was OK with the following request: FBRequest* friendsRe..

5

answers

Rails filtering array of objects by attribute value

So I perform a query to the db and I have a complete array of objects: @attachments = Job.find(1).attachments Now that I have an array of objects I don't want to perform another db query, but I wou..

10

answers

How can I get seconds since epoch in Javascript?

On Unix, I can run date '+%s' to get the amount of seconds since epoch. But I need to query that in a browser front-end, not back-end. Is there a way to find out seconds since Epoch in JavaScript?..

6

answers

how to concat two columns into one with the existing column name in mysql?

I want to concatenate two columns in a table with a existing column name using mysql. An example: I am having a column FIRSTNAME and LASTNAME and so many columns also. I want to concatenate these tw..

8

answers

Conda update failed: SSL error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

I found out that there was a problem when I tried doing conda update <package> Terminal output conda update bokeh Fetching package metadata: SSL verification error: [SSL: CERTIFICATE_V..

2

answers

React img tag issue with url and class

I have the following simple react code in my JSX file: /** @jsx React.DOM */ var Hello = React.createClass({ render: function() { return <div><img src='http://placehold.it/400x2..

3

answers

ErrorActionPreference and ErrorAction SilentlyContinue for Get-PSSessionConfiguration

My case: $ErrorActionPreference = "Stop"; "1 - $ErrorActionPreference;" Get-ChildItem NoSuchFile.txt -ErrorAction SilentlyContinue; "2 - $ErrorActionPreference;" Get-ChildItem NoSuchFile.txt -ErrorAc..

23

answers

How to fix 'Object arrays cannot be loaded when allow_pickle=False' for imdb.load_data() function?

I'm trying to implement the binary classification example using the IMDb dataset in Google Colab. I have implemented this model before. But when I tried to do it again after a few days, it returned a ..

10

answers

What is the difference between a stored procedure and a view?

I am confused about a few points: What is the difference between a stored procedure and a view? When should I use stored procedures, and when should I use views, in SQL Server? Do views allow the cr..

6

answers

How to parse a String containing XML in Java and retrieve the value of the root node?

I have XML in the form of a String that contains <message>HELLO!</message> How can I get the String "Hello!" from the XML? It should be ridiculously easy but I am lost. The XML isn't ..

4

answers

How to consume a SOAP web service in Java

Can someone please help me with some links and other on how to consume a web service WSDL in Java?..

7

answers

How to export library to Jar in Android Studio?

I have downloaded some library sources and would like to export it as a Jar file using Android Studio. Is there a way to export to jar file using Android studio ? edit: The library I want to expor..

4

answers

Filtering a pyspark dataframe using isin by exclusion

I am trying to get all rows within a dataframe where a columns value is not within a list (so filtering by exclusion). As an example: df = sqlContext.createDataFrame([('1','a'),('2','b'),('3','b'),(..

34

answers

Could not load NIB in bundle

I am trying to integrate Janrain Engage as custom module with Appcelerator Titanium. I have created a sample module and dragged the JREngage folder to the sample module xcodeproj as indicated in the J..

5

answers

How to hide reference counts in VS2013?

Visual Studio 2013 introduced a new feature where it shows you how many times each of your methods are used. I don't find it very useful, and it messes up the spacing of my file. How do I disable i..

9

answers

How to round a Double to the nearest Int in swift?

I'm trying to make a calculator of growth rate (Double) that will round the result to the nearest Integer and recalculate from there, as such: let firstUsers = 10.0 let growth = 0.1 var users = first..

15

answers

Global constants file in Swift

In my Objective-C projects I often use a global constants file to store things like notification names and keys for NSUserDefaults. It looks something like this: @interface GlobalConstants : NSObject..

5

answers

How can I install an older version of a package via NuGet?

I want to install an older version of a package (Newtonsoft.Json). But NuGet rolls back: PM> Install-Package Newtonsoft.Json -Version 4.0.5 Successfully installed 'Newtonsoft.Json 4.0.5'. Install f..

8

answers

How do I use cascade delete with SQL Server?

I have 2 tables: T1 and T2, they are existing tables with data. We have a one to many relationship between T1 and T2. How do I alter the table definitions to perform cascading delete in SQL Server w..

20

answers

Notification bar icon turns white in Android 5 Lollipop

I have an app showing custom notifications. The problem is that when running in Android 5 the small icon in the Notification bar is shown in white. How can I fix this?..

7

answers

Get Bitmap attached to ImageView

Given ImageView image = R.findViewById(R.id.imageView); image.setImageBitmap(someBitmap); Is it possible to retrieve the bitmap?..

8

answers

Bin size in Matplotlib (Histogram)

I'm using matplotlib to make a histogram. Is there any way to manually set the size of the bins as opposed to the number of bins?..

11

answers

Select multiple columns from a table, but group by one

The table name is "OrderDetails" and columns are given below: OrderDetailID || ProductID || ProductName || OrderQuantity I'm trying to select multiple columns and Group By ProductID while having SU..

4

answers

PHP PDO with foreach and fetch

The following code: <?php try { $dbh = new PDO("mysql:host=$hostname;dbname=$dbname", $username, $password); echo "Connection is successful!<br/>"; $sql = "SELECT * FROM users"; ..

10

answers

Jar mismatch! Fix your dependencies

Steps to reproduce: create a android project "MyApp" import ActionBarSherlock(ABS),Directional ViewPager(DVP), or any other open source library which use android support library. Add the libraries t..

5

answers

How to get just the date part of getdate()?

I have a SQL table that has a CreationDate field. I have getdate() in the computed column specification formula. I would like to know how to get just the date portion, that is, '2012-08-24' instead ..

10

answers

how to implement a long click listener on a listview

I want to add OnLongClickListener on my list view. Whenever the user long press the item in list some action should be performed, But my code does not catch this listener. Please let me know where I a..

9

answers

How to INNER JOIN 3 tables using CodeIgniter

Can someone Tell me how to join 3 table with php? Example SELECT FROM table1, table2,table on INNERJOIN ------------------- let I have 3 table.(question table ,answer table and category table) Here..

10

answers

How to create an array for JSON using PHP?

From PHP code I want to create an json array: [ {"region":"valore","price":"valore2"}, {"region":"valore","price":"valore2"}, {"region":"valore","price":"valore2"} ] How can I do this?..

5

answers

Simple int to char[] conversion

I have a simple question How to simply convert integer (getting values 0-8) to char, e.g. char[2] in C? Thanks..

9

answers

How to get HTTP Response Code using Selenium WebDriver

I have written tests with Selenium2/WebDriver and want to test if HTTP Request returns an HTTP 403 Forbidden. Is it possible to get the HTTP response status code with Selenium WebDriver?..

5

answers

How to populate options of h:selectOneMenu from database?

I am creating a web application, where you have to read a list of objects / entities from a DB and populate it in a JSF <h:selectOneMenu>. I am unable to code this. Can someone show me how to do..

2

answers

excel vba getting the row,cell value from selection.address

For i = 1 To 20 '' select the cell in question Cells.Find(...).Select '' get the cell address CellAddr = Selection.Address(False, False, xlR1C1) Next The above is my code for searchin..

9

answers

How do I run Google Chrome as root?

I have installed Google Chrome in Ubuntu 10.10. When I try to use in normal user, it is working fine. Now if I want to use as a root it gives the following error: Google Chrome does not run as ro..

10

answers

How to resolve conflicts in EGit

I am using EGit on Eclipse v4.3 (Kepler). I want to commit and push my changes. I do a pull first and one file is conflicting. After manually resolving the conflict (local and remote are the same..

8

answers

How do I print bytes as hexadecimal?

I know in C# you can use String.Format method. But how do you do this in C++? Is there a function that allows me to convert a byte to a Hex?? Just need to convert a 8 byte long data to Hex, how do I d..

9

answers

Actionbar notification count icon (badge) like Google has

Is there a android standard badge or method to show action bar notification icon with a count like on Google examples? If not, then what is the best way to make it? I'm new to android, please help...

9

answers

jQuery, simple polling example

I'm learning jQuery, and I'm trying to find a simple code example that will poll an API for a condition. (ie, request a webpage every few seconds and process the results) I'm familiar with how to do..

1

answers

How to enable mbstring from php.ini?

I have real difficulties with enabling mbstring extension on my localhost. I'm using XAMPP 1.7.4, for Windows, which has PHP 5.3.5, and tried to edit my php.ini file according to the documentation a..

8

answers

"The certificate chain was issued by an authority that is not trusted" when connecting DB in VM Role from Azure website

I am experiencing error when connecting MY DB which is in VM Role(I have SQL VM Role) from Azure Website. Both VM Role and Azure Website are in West zone. I am facing following issue: SqlException..

11

answers

Principal Component Analysis (PCA) in Python

I have a (26424 x 144) array and I want to perform PCA over it using Python. However, there is no particular place on the web that explains about how to achieve this task (There are some sites which j..

8

answers

What is the equivalent of Java's System.out.println() in Javascript?

I am writing some tests for Javascript code and I need to dump some messages during the compile process when errors are encountered. Is there any equivalent to Java's System.out.println() in Javascri..

3

answers

Laravel assets url

I have installed Laravel and began trying to write an app. I made some directories for my assets in the same directory as /app. But when I try to visit an image in my localhost for example: http://lo..

7

answers

Change div height on button click

What I do wrong? Why div height didn't change? <html> <head> </head> <body > <button type="button" onClick = "document.getElementById('chartdiv').style.height ..

5

answers

How to install SQL Server Management Studio 2012 (SSMS) Express?

I just installed SQL Server 2012 Express, I can connect with database from VS2012RC. Database is working :) I use Win7 SP1 64bit. I download program from page I choose ENU\x64\SQLManagementStudio_x..

10

answers

How to set a DateTime variable in SQL Server 2008?

SQL Server 2008 is not doing what I expected with DateTime. It doesn't let me set DateTime variables, no matter what date format I use. When I execute: DECLARE @Test AS DATETIME SET @Test = 2011-02-..

18

answers

Set active tab style with AngularJS

I have routes set in AngularJS like this: $routeProvider .when('/dashboard', {templateUrl:'partials/dashboard', controller:widgetsController}) .when('/lab', {templateUrl:'partials/lab', contr..

9

answers

Correct way to use Modernizr to detect IE?

I wanted to use the Modernizr JS library to detect for some browser properties to determine what content to show or not show. I have an app called Pano2VR which outputs both HTML5 and SWF. I need the ..

10

answers

Converting a date string to a DateTime object using Joda Time library

I have a date as a string in the following format "04/02/2011 20:27:05". I am using Joda-Time library and would like to convert it to DateTime object. I did: DateTime dt = new DateTime("04/02/2011 20..

12

answers

Ajax post request in laravel 5 return error 500 (Internal Server Error)

This is my test ajax in laravel 5 (refer below) $("#try").click(function(){ var url = $(this).attr("data-link"); $.ajax({ url: "test", type:"..

8

answers

Redirect output of mongo query to a csv file

I am using MongoDB 2.2.2 for 32-bit Windows7 machine. I have a complex aggregation query in a .js file. I need to execute this file on the shell and direct the output to a CSV file. I ensure that the ..

10

answers

Thread pooling in C++11

Relevant questions: About C++11: C++11: std::thread pooled? Will async(launch::async) in C++11 make thread pools obsolete for avoiding expensive thread creation? About Boost: C++ boost thread r..

23

answers

git recover deleted file where no commit was made after the delete

I deleted some files. I did NOT commit yet. I want to reset my workspace to recover the files. I did a git checkout .. But the deleted files are still missing. And git status shows: # On b..

3

answers

Find the index of a char in string?

I have a string that goes like "abcdefg..." I would like to find the index where the letter d is at, so I can get the number 3. I managed to do it by looping through each letter in the string, but t..

12

answers

Android/Eclipse: how can I add an image in the res/drawable folder?

I am completely new with Android/Eclipse. I can't figure out how to add an image in the /res/drawable folder of my Android Eclipse project...

17

answers

React "after render" code?

I have an app where I need to set the height of an element (lets say "app-content") dynamically. It takes the height of the "chrome" of the app and subtracts it and then sets the height of the "app-co..

6

answers

SSRS expression to format two decimal places does not show zeros

I am using the following expression to format my value to show only two decimal points. Which Works fine if the value is not 0. However when the value is 0 it does not show 0. eg. Expression used =..

3

answers

Iterating through directories with Python

I need to iterate through the subdirectories of a given directory and search for files. If I get a file I have to open it and change the content and replace it with my own lines. I tried this: impor..

6

answers

Error Message : Cannot find or open the PDB file

I tried running sample programs provided at NVIDIA's official site. Most of the programs ran smoothly except few where I get similar error messages. How can I fix that? Here's a sample of error messag..

33

answers

Spring Boot - Cannot determine embedded database driver class for database type NONE

This is the error that is thrown when trying to run my web app: [INFO] WARNING: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.b..

2

answers

scp from remote host to local host

I am trying to copy a file from a remote machine to the local machine I am using. Whenever I run this command I get prompted to enter a password. I am not sure what to enter for the password as I neve..

10

answers

How to convert a String to a Date using SimpleDateFormat?

I have this code snippet: DateFormat formatter1; formatter1 = new SimpleDateFormat("mm/DD/yyyy"); System.out.println((Date)formatter1.parse("08/16/2011")); When I run this, I get this as the output..

4

answers

If Radio Button is selected, perform validation on Checkboxes

I'm trying to work this form so when the first radio button is selected, run a certain validation. When the second radio button is selected, run a different validation, etc. Currently using Alerts to ..

9

answers

How to send a “multipart/form-data” POST in Android with Volley

Has anyone been able to accomplish sending a multipart/form-data POST in Android with Volley yet? I have had no success trying to upload an image/png using a POST request to our server and am curious ..

7

answers

Adding delay between execution of two following lines

I need to add delay between the execution of two lines in a(same) function. Is there is any favorable options to do this? Note: I don't need two different functions to do this, and the delay must not..

7

answers

Better way to sort array in descending order

I have a array of int which I have to sort by descending. Since I did not find any method to sort the array in descending order.Currently I am sorting the array in descending order as below int[] a..

14

answers

Disable double-tap "zoom" option in browser on touch devices

I want to disable the double-tap zoom functionality on specified elements in the browser (on touch devices), without disabling all the zoom functionality. For example: One element can be tapped multi..

16

answers

nvm is not compatible with the npm config "prefix" option:

I am trying to run another NodeJS version with nvm but getting this error: $ nvm use v4.2.4 nvm is not compatible with the npm config "prefix" option: currently set to "/Users/z/.npm-global" Run..

6

answers

Initializing array of structures

Here's initialization I just found in somebody else's question. my_data data[]={ { .name = "Peter" }, { .name = "James" }, { .name = "John" }, { .name = "Mike" } }; I never saw some..

16

answers

Casting interfaces for deserialization in JSON.NET

I am trying to set up a reader that will take in JSON objects from various websites (think information scraping) and translate them into C# objects. I am currently using JSON.NET for the deserializat..

4

answers

How to query values from xml nodes?

i have a table that contains an XML column: CREATE TABLE Batches( BatchID int, RawXml xml ) The xml contains items such as: <GrobReportXmlFileXmlFile> <GrobReport> &l..

8

answers

remove space between paragraph and unordered list

<p>Text</p> <ul> <li>One</li> </ul> <p>Text 2</p> How do i remove the vertical space between paragraph and the list. To be more specific - how do..

18

answers

How to apply a CSS filter to a background image

I have a JPEG file that I'm using as a background image for a search page, and I'm using CSS to set it because I'm working within Backbone.js contexts: background-image: url("whatever.jpg"); I want..

13

answers

Limit number of characters allowed in form input text field

How do I limit or restrict the user to only enter a maximum of five characters in the textbox? Below is the input field as part of my form: <input type="text" id="sessionNo" name="sessionNum" /&g..

5

answers

CMake: How to build external projects and include their targets

I have a Project A that exports a static library as a target: install(TARGETS alib DESTINATION lib EXPORT project_a-targets) install(EXPORT project_a-targets DESTINATION lib/alib) Now I want to use..

3

answers

Undo a git stash

I just did a stash in a project that I haven't commit. Is there a way to go back to the state before I stashed? How could I do this? I've closed the terminal and my laptop is shut down. I've done some..

7

answers

Creating instance list of different objects

I'm tring to create an arraylist of different class instances. How can I create a list without defining a class type? (<Employee>) List<Employee> employees = new ArrayList<Employee>..

5

answers

How can I get sin, cos, and tan to use degrees instead of radians?

When I'm working with math in JS I would like its trig functions to use degree values instead of radian values. How would I do that?..

6

answers

ValueError: unsupported format character while forming strings

This works: print "Hello World%s" %"!" But this doesn't print "Hello%20World%s" %"!" the error is ValueError: unsupported format character 'W' (0x57) at index 8 I am using Python 2.7. Why woul..

3

answers

Minimum and maximum date

I was wondering which is the minimum and the maximum date allowed for a Javascript Date object. I found that the minimum date is something like 200000 B.C., but I couldn't get any reference about it. ..

6

answers

Connecting to TCP Socket from browser using javascript

I have a vb.net application that opens a socket and listens on it. I need to communicate via this socket to that application using a javascript running on a browser. That is i need to send some data..

18

answers

List all the files and folders in a Directory with PHP recursive function

I'm trying to go through all of the files in a directory, and if there is a directory, go through all of its files and so on until there are no more directories to go to. Each and every processed item..

4

answers

How can I access a hover state in reactjs?

I have a sidenav with a bunch of basketball teams. So I would like to display something different for each team when one of them is being hovered over. Also, I am using Reactjs so if I could have a va..

15

answers

REACT - toggle class onclick

I am trying to figure out how to toggle an active class onClick to change CSS properties. I have taken many approaches, and read many SO answers. Using jquery it would be relatively simple , however,..

35

answers

ADB Android Device Unauthorized

Since I reinstalled Eclipse (simply deleted and downloaded it again) I can't debug my applications on Samsung Galaxy i9001 (with CyanogenMod - Android 4.4.2). It worked fine before reinstallation. Un..

5

answers

INSERT INTO from two different server database

I am trying to copy the data of testdabse.invoice table to basecampdev.invoice table. testdabse is a local database while basecampdev is in the server. My query for copying data to another table do..

8

answers

Convert Rows to columns using 'Pivot' in SQL Server

I have read the stuff on MS pivot tables and I am still having problems getting this correct. I have a temp table that is being created, we will say that column 1 is a Store number, and column 2 is a..

11

answers

Virtualbox shared folder permissions

I'm using Windows and Virtualbox with RedHat, putting it simple: I've created a shared folder so I can use Eclipse on my Windows OS and do some testing in Linux. However, I can't access the shared fo..

18

answers

Check if a process is running or not on Windows with Python

I am trying to create a python script which I will later run as a service. Now I want to run a particular part of the code only when iTunes is running. I understand from some research that polling the..

3

answers

Create intermediate folders if one doesn't exist

I am trying to create a folder for each username a user logs in as. Currently I have private String destination = "C:/Users/Richard/printing~subversion/fileupload/web/WEB-INF/uploaded/"; // main loca..

4

answers

difference between iframe, embed and object elements

HTML5 defines several embedded content elements, which, from a bird's-eye view, seem to be very similar to the point of being largely identical. What is the actual difference between iframe, embed an..

6

answers

How to resolve "gpg: command not found" error during RVM installation?

I have a new mac pro (OS X 10.9.5) that I get to set up from scratch. I want to install RVM and the first thing it says to do is: Install mpapis public key (might need gpg2 and or sudo) gpg --ke..

8

answers

How to convert an OrderedDict into a regular dict in python3

I am struggling with the following problem: I want to convert an OrderedDict like this: OrderedDict([('method', 'constant'), ('data', '1.225')]) into a regular dict like this: {'method': 'constant..

14

answers

Angular routerLink does not navigate to the corresponding component

My routing in the angular2 apps works well. But I am going to make some routeLink based on this: Here is my routing: const routes: RouterConfig = [ { path:'home' , component: FormComponent }, ..

5

answers

Splitting a string into separate variables

I have a string, which I have split using the code $CreateDT.Split(" "). I now want to manipulate two separate strings in different ways. How can I separate these into two variables?..

4

answers

Twitter Bootstrap scrollable table rows and fixed header

Does anyone know how to make a table with a fixed header row and scrollable body rows? I'm using twitter bootstrap if that matters. This is an example of what I'm trying to create: http://www.sitee..

4

answers

String to Binary in C#

I have a function to convert string to hex as this, public static string ConvertToHex(string asciiString) { string hex = ""; foreach (char c in asciiString) { int tmp = c; ..

1

answers

Using form input to access camera and immediately upload photos using web app

I came across this answer which is brilliant: In iPhone iOS6 and from Android ICS onwards, HTML5 has the following tag which allows you to take pictures from your device: <input type="fi..

2

answers

Class is not abstract and does not override abstract method

So I've been working on a homework on abstraction for my programming class and fell into a problem. The goal for me right now is to be able to use abstraction, then later be able to draw with rectangl..

10

answers

enabling cross-origin resource sharing on IIS7

I recently ran into with posting Javascript requests to another domain. By default XHR posting to other domains is not allowed. Following the instructions from http://enable-cors.org/, I enabled th..

7

answers

Oracle SQL: Update a table with data from another table

Table 1: id name desc ----------------------- 1 a abc 2 b def 3 c adf Table 2: id name desc ----------------------- 1 x 123 2 y 345 ..

5

answers

Can I use wget to check , but not download

Can I use wget to check for a 404 and not actually download the resource? If so how? Thanks..

3

answers

List only stopped Docker containers

Docker gives you a way of listing running containers or all containers including stopped ones. This can be done by: $ docker ps # To list running containers Or by $ docker ps -a # To list running..

5

answers

Python display text with font & color?

Is there a way I can display text on a pygame window using python? I need to display a bunch of live information that updates and would rather not make an image for each character I need. Can I blit..

9

answers

What is the best way to know if all the variables in a Class are null?

This would mean that the class was initialized, but the variables were not set. A sample Class: public class User { String id = null; String name = null; public String getId() { ..

8

answers

How to check if that data already exist in the database during update (Mongoose And Express)

How to do validations before saving the edited data in mongoose? For example, if sample.name already exists in the database, the user will receive a some sort of error, something like that, here's my..

6

answers

What is the most efficient way to check if a value exists in a NumPy array?

I have a very large NumPy array 1 40 3 4 50 4 5 60 7 5 49 6 6 70 8 8 80 9 8 72 1 9 90 7 .... I want to check to see if a value exists in the 1st column of the array. I've got a bunch of homegrown..

2

answers

How to receive POST data in django

I've been trying to integrate a payment gateway into my site in django. I'm having trouble getting the response data from the payment gateway. The payment gateway has sample docs for php which looks ..

6

answers

What order are the Junit @Before/@After called?

I have an Integration Test Suite. I have a IntegrationTestBase class for all my tests to extend. This base class has a @Before (public void setUp()) and @After (public void tearDown()) method to estab..

6

answers

Mailto on submit button

Is it possible to implement mailto: function on submit button like <input type="submit" />? I use ASP.NET MVC. Maybe there is some tricky controller action result to achieve this. Could you plea..

11

answers

Create a table without a header in Markdown

Is it possible to create a table without a header in Markdown? The HTML would look like this: <table> <tr> <td>Key 1</td> <td>Value 1</td> </tr> <..

7

answers

Removing index column in pandas when reading a csv

I have the following code which imports a CSV file. There are 3 columns and I want to set the first two of them to variables. When I set the second column to the variable "efficiency" the index colu..

13

answers

Refresh a page using PHP

How can I refresh a page using PHP periodically? If I can not do it by PHP, what is the best recommended scenario?..

1

answers

How are SSL certificate server names resolved/Can I add alternative names using keytool?

These may be phrased as separate questions for clarity, but they are all related to the same issue. How are SSL certificate server names resolved? Why do browsers seem to use the CN field of the cer..

3

answers

"VT-x is not available" when I start my Virtual machine

I have created a virtual machine using the VMWare software and getting an error while starting the Virtual Machine. It says "VT-x is not available: 00:00:03.916 NAT: zone(nm:mbuf_cluster, used:0) 00:..

3

answers

Play local (hard-drive) video file with HTML5 video tag?

I want to achieve the following. <video src="file:///Users/username/folder/video.webm"> </video> The intent is that the user will be able to select a file from his/her hard drive. And ..

10

answers

Is it possible to use jQuery .on and hover?

I have a <ul> that is populated with javascript after the initial page load. I'm currently using .bind with mouseover and mouseout. The project just updated to jQuery 1.7 so I have the option ..

6

answers

How to parse JSON without JSON.NET library?

I'm trying to build a Metro application for Windows 8 on Visual Studio 2011. and while I'm trying to do that, I'm having some issues on how to parse JSON without JSON.NET library (It doesn't support t..

7

answers

How can a Jenkins user authentication details be "passed" to a script which uses Jenkins API to create jobs?

I have a script that delete and re-create jobs through curl HTTP-calls and I want to get rid of any hard-coded "username:password". E.g. curl -X POST $url --user username:password Considerations: J..

7

answers

How to create a readonly textbox in ASP.NET MVC3 Razor

How do I create a readonly textbox in ASP.NET MVC3 with the Razor view engine? Is there an HTMLHelper method available to do that? Something like the following? @Html.ReadOnlyTextBoxFor(m => m.u..

3

answers

macro run-time error '9': subscript out of range

I found a macro on the web to protect a worksheet with a password. It works fine, but when I save the file I get the message: run-time error '9': subscription out of range. I have never programmed ..

6

answers

Installing Apple's Network Link Conditioner Tool

I have installed xcode 4.3.1 on my machine running Lion. I can't find the Network Link Conditioner tool anywhere. I have checked the utilities folder, also the xcode/contents/developer/* directorie..

4

answers

Comparing two columns, and returning a specific adjacent cell in Excel

I am using a combination of if, vlookup, match, iserror functions, and unfortunately I've not been able to find the right formula. Comparing two columns for matches is easy enough. the tough part has..

7

answers

jquery remove "selected" attribute of option?

Why doesn't this work in IE8 to deselect all options in a multiline selectbox? $("#myselect").children().removeAttr("selected"); Is there a workaround? Nothing I could think of (attr("selected","")..

7

answers

Calling an API from SQL Server stored procedure

Calling an API from ASP.NET Web Form is very easy. WebClient wc = new WebClient(); string urlData = wc.DownloadString("http://xxx.xxx.xx.xx/sssss/getResponse.do?ID=testing"); But can we call an API..

8

answers

APK signing error : Failed to read key from keystore

I'm developing android app under intellij and gradle. and using following way to generate keystore file: keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 20..

9

answers

Java: How to convert String[] to List or Set

How to convert String[] (Array) to Collection, like ArrayList or HashSet?..

3

answers

What is the technology behind wechat, whatsapp and other messenger apps?

I am eager to know about the architecture of different real-time messenger apps. Are they using any generic protocol/architecture?..

28

answers

how to reset <input type = "file">

I am developing a metro app with VS2012 and Javascript I want to reset the contents of my file input: <input type="file" id="uploadCaptureInputFile" class="win-content colors" accept="image/*" /&..

6

answers

Suppress/ print without b' prefix for bytes in Python 3

Just posting this so I can search for it later, as it always seems to stump me: $ python3.2 Python 3.2 (r32:88445, Oct 20 2012, 14:09:50) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or..

11

answers

Python 3.4.0 with MySQL database

I have installed Python version 3.4.0 and I would like to do a project with MySQL database. I downloaded and tried installing MySQLdb, but it wasn't successful for this version of Python. Any suggesti..

3

answers

How to hide .php extension in .htaccess

Possible Duplicate: Remove .php extension with .htaccess I'm trying to hide the .php file extension but for some reason can't get it to work. My latest attempt was the following: <IfMod..

7

answers

How to switch between frames in Selenium WebDriver using Java

I am using java with WebDriver.I have to switch between two frames. I have recorded the test case in selenium IDE and in that I got the values as selectFrame relative=top select Frame=middle Frame Bu..

20

answers

Swipe to Delete and the "More" button (like in Mail app on iOS 7)

How to create a "more" button when user swipe a cell in table view (like mail app in ios 7) I have been looking for this information both here and in the Cocoa Touch forum, but I cannot seem to find ..

29

answers

What is the (function() { } )() construct in JavaScript?

I used to know what this meant, but I'm struggling now... Is this basically saying document.onload? (function () { })(); ..

6

answers

How to style a div to be a responsive square?

I want my div to adapt its height to always equal its width. The width is percental. When the parent's width decreases, the box should decrease by keeping its aspect ratio. How to do this is CSS?..

3

answers

Apply style to cells of first row

It should be very simple but I can't figure it out. I have a table like this : <table class="category_table"> <tr><td> blabla 1</td><td> blabla 2 </td></tr>..

13

answers

Android - Share on Facebook, Twitter, Mail, ecc

I need to develop an app that has the share function. I have to share on Facebook, twitter, email and maybe other services. How can I do this? There a library on the net? For the iOS development the..

11

answers

Wait .5 seconds before continuing code VB.net

I have a code and I want it to wait somewhere in the middle before going forward. After the WebBrowser1.Document.Window.DomWindow.execscript("checkPasswordConfirm();","JavaScript") I want it to wait ...

2

answers

AngularJS ui router passing data between states without URL

I am facing this problem of passing data between two states without exposing the data in the url, it's like user cannot really directly land on this state. For example. I have two states "A" and "B"...

4

answers

How to randomize Excel rows

How can I randomize lots of rows in Excel? For example I have an excel sheet with data in 3 rows. 1 A dataA 2 B dataB 3 C dataC I want to randomize the row order. For example 2 B dataB 1 A dataA ..

11

answers

Use basic authentication with jQuery and Ajax

I am trying to create a basic authentication through the browser, but I can't really get there. If this script won't be here the browser authentication will take over, but I want to tell the browser ..

6

answers

Send multiple checkbox data to PHP via jQuery ajax()

I want to submit a POST form that contains a textarea field and an input field(s) (type="checkbox" with an arbitrary/variable number of checkboxes) on my website via jQuery's .ajax(). PHP receives the..

8

answers

Don't understand why UnboundLocalError occurs (closure)

What am I doing wrong here? counter = 0 def increment(): counter += 1 increment() The above code throws an UnboundLocalError...

5

answers

how can I see what ports mongo is listening on from mongo shell?

If I have a mongo instance running, how can I check what port numbers it is listening on from the shell? I thought that db.serverStatus() would do it but I don't see it. I see this "connections" : { ..

5

answers

How to securely save username/password (local)?

I'm making a Windows application, which you need to log into first. The account details consist of username and password, and they need to be saved locally. It's just a matter of security, so other p..

7

answers

How to allow only one radio button to be checked?

{% for each in AnswerQuery %} <form action={{address}}> <span>{{each.answer}}</span><input type='radio'> <span>Votes:{{each.answercount}}</span>..

13

answers

How to calculate the number of occurrence of a given character in each row of a column of strings?

I have a data.frame in which certain variables contain a text string. I wish to count the number of occurrences of a given character in each individual string. Example: q.data<-data.frame(number..

8

answers

Angular ui-grid dynamically calculate height of the grid

I am using : https://github.com/angular-ui/ui-grid.info/tree/gh-pages/release/3.0.0-RC.18 <div ui-grid="gridOptions" style="height:765px"></div> When I hard code the value, as shown ab..

4

answers

Java unsupported major minor version 52.0

I can not launch my java application as a web applet in HTML (I am using HTML 4.01, I know it doesn't work in html5). The error message it returns is: java : Unsupported major.minor version 52.0 ..

8

answers

T-SQL split string based on delimiter

I have some data that I would like to split based on a delimiter that may or may not exist. Example data: John/Smith Jane/Doe Steve Bob/Johnson I am using the following code to split this data into F..

4

answers

Embedding VLC plugin on HTML page

I have a html file (getStream.html) that takes a stream from a certain url and show it. The code is the following: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org..

8

answers

What is the correct syntax of ng-include?

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

8

answers

How do I get a button to open another activity?

I've added a button to my activity XML file and I can't get it to open my other activity. Can some please tell me step by step on how to do this?..

3

answers

Any good boolean expression simplifiers out there?

I was refactoring old code and encountered several IF conditions that were way too complex and long and I'm certain they can be simplified. My guess is that those conditions grew so much because of la..

2

answers

Imshow: extent and aspect

I'm writing a software system that visualizes slices and projections through a 3D dataset. I'm using matplotlib and specifically imshow to visualize the image buffers I get back from my analysis code..

6

answers

Rich Text box scroll to the bottom when new data is written to it

My program calls Java and then redirects stdout to a RichTextBox. My problem is that the vertical scrollbar always stays at the top of the box every time data is written. Even if you scroll to the bo..

11

answers

Is it possible to save HTML page as PDF using JavaScript or jquery?

Is it possible to save HTML page as PDF using JavaScript or jquery? In Detail: I generated one HTML Page which contains a table . It has one button 'save as PDF'. If user clicks that button then tha..

9

answers

Find most frequent value in SQL column

How can I find the most frequent value in a given column in an SQL table? For example, for this table it should return two since it is the most frequent value: one two two three ..

5

answers

How to add hours to current date in SQL Server?

I am trying to add hours to current time like -- NOT A VALID STATEMENT -- SELECT GetDate(DATEADD (Day, 5, GETDATE())) How can I get hours ahead time in SQL Server?..

2

answers

Pass multiple parameters in Html.BeginForm MVC

I have something like this: public ActionResult Create(int clubid) { var club = db.Clubs.Single(c=>c.Id == clubid); ViewBag.Club = club; Competition comp = db.Competitions.Create(); return..

10

answers

Rename multiple files in cmd

If I have multiple files in a directory and want to append something to their filenames, but not to the extension, how would I do this? I have tried the following, with test files file1.txt and file2..

3

answers

How to implement a confirmation (yes/no) DialogPreference?

How can I implement a Preference that displays a simple yes/no confirmation dialog? For an example, see Browser->Setting->Clear Cache...

10

answers

how to run two commands in sudo?

Is there any way how I can run two Db2 commands from a command line? (They will be called from a PHP exec command.) db2 connect to ttt (note that we need to have the connection live for the second c..

11

answers

How to sort an array of objects in Java?

My array does not contain any string. But its contains object references. Every object reference returns name, id, author and publisher by toString method. public String toString() { return (..

15

answers

Why does this code using random strings print "hello world"?

The following print statement would print "hello world". Could anyone explain this? System.out.println(randomString(-229985452) + " " + randomString(-147909649)); And randomString() looks like this..

6

answers

Fixing a systemd service 203/EXEC failure (no such file or directory)

I'm trying to set up a simple systemd timer to run a bash script every day at midnight. systemctl --user status backup.service fails and logs the following: backup.service: Failed at step EXEC spawn..

3

answers

Does Arduino use C or C++?

Coming from Python, the whole C/C++ thing is kind of alien to begin with... and then I see in one place that Arduino uses 'standard' C, and in another that it uses 'standard' C++, so on and so forth. ..

10

answers

PHP CSV string to array

I'm trying to parse a CSV string to an array in PHP. The CSV string has the following attributes: Delimiter: , Enclosure: " New line: \r\n Example content: "12345","Computers","Acer","4","Varta","..

6

answers

python how to pad numpy array with zeros

I want to know how I can pad a 2D numpy array with zeros using python 2.6.6 with numpy version 1.5.0. Sorry! But these are my limitations. Therefore I cannot use np.pad. For example, I want to pad a w..

20

answers

How to print a dictionary's key?

I would like to print a specific Python dictionary key: mydic = {} mydic['key_name'] = 'value_name' Now I can check if mydic.has_key('key_name'), but what I would like to do is print the name of th..

6

answers

How to run a cronjob every X minutes?

I'm running a PHP script in a cronjob and I want to send emails every 5 minutes My current (crontab) cronjob: 10 * * * * /usr/bin/php /mydomain.in/cromail.php > /dev/null 2>&1 The cronma..

3

answers

Disable click outside of angular material dialog area to close the dialog (With Angular Version 4.0+)

I am currently working on password reset page of an Angular 4 project. We are using Angular Material to create the dialog, however, when the client clicks out of the dialog, it will close automaticall..

8

answers

javascript functions to show and hide divs

Hello I have the following 2 JavaScript functions to open up a div and to close it. <script> function show() { if(document.getElementById('benefits').style.display=='none') { ..

11

answers

Resolving IP Address from hostname with PowerShell

I am trying to get the ipaddress from a hostname using Powershell, but I really can't figure out how. Any help?..

3

answers

Making HTML page zoom by default

I've designed a page, where buttons look good when the browser zoom is at 90%, but by default other users view it at 100/125%+ in their browser which is resulting an overlap in buttons and input forms..

7

answers

Increase bootstrap dropdown menu width

wondering if anyone has any tips on how to increase the dropdown width? I have a row containing two columns with a a bit of javascript that slides the dropdown up and down when selected. The problem ..

7

answers

Isn't the size of character in Java 2 bytes?

I used RandomAccessFile to read a byte from a text file. public static void readFile(RandomAccessFile fr) { byte[] cbuff = new byte[1]; fr.read(cbuff,0,1); System.out.println(new String(c..

5

answers

PHP Get URL with Parameter

I want to get a URL and its parameters. Example: www.someweb.com/somepage.php?id=10 How to get only somepage.php?id=10? I'm already tried REQUEST_URI and PHP_SELF but it only gives me www.someweb...

6

answers

how to fetch data from database in Hibernate

This is my class to fetch data from database package com.javatpoint.mypackage; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Tra..

8

answers

Can I get div's background-image url?

I have a button of which when I click it I want to alert the background-image URL of #div1. Is it possible?..

18

answers

How to stop mongo DB in one command

I need to be able to start/stop MongoDB on the cli. It is quite simple to start: ./mongod But to stop mongo DB, I need to run open mongo shell first and then type two commands: $ ./mongo use admin ..

3

answers

how to iterate through dictionary in a dictionary in django template?

My dictionary looks like this(Dictionary within a dictionary): {'0': { 'chosen_unit': <Unit: Kg>, 'cost': Decimal('10.0000'), 'unit__name_abbrev': u'G', 'supplier__supplier': u"..

3

answers

Knockout validation

I have asp.net mvc3 project where I do a bulk edit on a table with knockout binding. I want to do validations like required and number validations while saving data. Is there any easier way to do knoc..

4

answers

In git how is fetch different than pull and how is merge different than rebase?

I just cant understand this. I been reading a lot on the web and books and something is just not staying in my head. Can someone please give me the dummy version of the following: git fetch vs pull ..

5

answers

Can I execute a function after setState is finished updating?

I am very new to ReactJS (as in, just started today). I don't quite understand how setState works. I am combining React and Easel JS to draw a grid based on user input. Here is my JS bin: http://js..

8

answers

Clear text input on click with AngularJS

How can I clear a text input on click of a button using angularJS? The X is a seperate link, on which I would like to trigger a function. HTML <input type="text" class="form-control" data-ng-m..

12

answers

Check if Key Exists in NameValueCollection

Is there a quick and simple way to check if a key exists in a NameValueCollection without looping through it? Looking for something like Dictionary.ContainsKey() or similar. There are many ways to s..

4

answers

How to change the current URL in javascript?

On my website: http://mywebsite.com/1.html I want to use the window.location.pathname to get the last part of the url: 1.html and since I have all my webpages in numbers I want to add 1 to t..

3

answers

Cursor adapter and sqlite example

Hello I am looking for sample code in which cursor adapter is used with sqlite?..

2

answers

What do hjust and vjust do when making a plot using ggplot?

Every time I make a plot using ggplot, I spend a little while trying different values for hjust and vjust in a line like + opts(axis.text.x = theme_text(hjust = 0.5)) to get the axis labels to lin..

3

answers

Removing ul indentation with CSS

I cannot seem to remove the indent from my unordered list when long lines in my list wrap around. Here is what my list looks like: Windows users can use putty Mac users can use the Terminal.app Linu..

14

answers

I don't have "Dynamic Web Project" option in Eclipse new Project wizard

I have download the Eclipse IDE for Java developer, HELIOS. I click 'File -> New -> Project...', but I only have "General, CVS, Java project, Examples". I would like to be able to create "dynamic web ..

14

answers

How to fix corrupted git repository?

I tried cloning my repository which I keep on my Ubuntu one folder to a new machine and I got this: [email protected]:~/source/personal$ git clone ~/Ubuntu\ One\ Side\ Work/projects.git/..

5

answers

How do I wrap text in a span?

I've got a span that's 350 pixels wide. If there's more text than that, it just goes straight out to the right off to the side of the span. How do I force the text to wrap down into a paragraph? I've ..

4

answers

How can I generate an INSERT script for an existing SQL Server table that includes all stored rows?

I'm looking for a way to generate a "Create and insert all rows" script with SQL Management Studio 2008 R2. I know that I can create a "create table" script. I can also create an "insert in" script,..

18

answers

Google Maps Android API v2 Authorization failure

My steps: got SHA1 code from debug.keystore create app in google apis console enabled google map api v2 input SHA1;my.package.name get API key created AndroidManifest file: ..

7

answers

Excel VBA Check if directory exists error

I have a spreadsheet that upon clicking a button will duplicate itself by copying/pasting everything to a new workbook and save the file with a name that is dependent upon some variable values (taken ..

2

answers

What are the retransmission rules for TCP?

The Wikipedia article on TCP indicates that the IP packets transporting TCP segments can sometimes go lost, and that TCP "requests retransmission of lost data". What exactly are the rules for request..

9

answers

mailto link with HTML body

I have a couple of mailto links in a HTML document. <a href="mailto:etc..."> Can I insert HTML formatted body in the mailto: part of the href? <a href="mailto:[email protected]?subject=Me&bod..

7

answers

How do I get cURL to not show the progress bar?

I'm trying to use cURL in a script and get it to not show the progress bar. I've tried the -s, -silent, -S, and -quiet options, but none of them work. Here's a typical command I've tried: curl -s ..

6

answers

Tuple unpacking in for loops

I stumbled across the following code: for i,a in enumerate(attributes): labels.append(Label(root, text = a, justify = LEFT).grid(sticky = W)) e = Entry(root) e.grid(column=1, row=i) entri..

11

answers

Simplest way to download and unzip files in Node.js cross-platform?

Just looking for a simple solution to downloading and unzipping .zip or .tar.gz files in Node.js on any operating system. Not sure if this is built in or I have to use a separate library. Any ideas?..

12

answers

How to convert a string to integer in C?

I am trying to find out if there is an alternative way of converting string to integer in C. I regularly pattern the following in my code. char s[] = "45"; int num = atoi(s); So, is there a bette..

7

answers

POST: sending a post request in a url itself

I have been given a url .. www.abc.com/details and asked to send my name and phone number on this url using POST. They have told me to set the content-type as application/json and the body as valid JS..

4

answers

docker build with --build-arg with multiple arguments

According to the documentation, it's possible to define multiple args for the flag --build-arg, but I can't find out how. I tried the following: docker build -t essearch/ess-elasticsearch:1.7.6 --bui..

5

answers

Change div width live with jQuery

Is it possible to change a div's width live with jQuery? And if it is, how? What I want is to change its width depending on the browser's window width in real time, so if/when the user changes the br..

8

answers

How to convert an ASCII character into an int in C

How can I convert an ASCII character into an int in C?..

13

answers

How to check size of a file using Bash?

I've got a script that checks for 0-size, but I thought there must be an easier way to check for file sizes instead. I.e. file.txt is normally 100k; how to make a script check if it is less than 90k ..

20

answers

Error CS1705: "which has a higher version than referenced assembly"

I've been looking into this for a bit now and haven't gotten it resolved. I get the following error message: Compiler Error Message: CS1705: Assembly 'My.Model, Version=1.1.4422.23773, Culture=neutra..

4

answers

Live-stream video from one android phone to another over WiFi

I have searched the internet for days now on how to implement a video streaming feature from an android phone to another android phone over a WiFi connection but I can't seem to find anything useful. ..

12

answers

Vim: insert the same characters across multiple lines

Sometimes I want to edit a certain visual block of text across multiple lines. For example, I would take a text that looks like this: name comment phone email And make it look like this vendor_na..

4

answers

Install MySQL on Ubuntu without a password prompt

How do I write a script to install MySQL server on Ubuntu? sudo apt-get install mysql will install, but it will also ask for a password to be entered in the console. How do I do this in a non-intera..

3

answers

CSS On hover show another element

I want to use CSS to show div id='b' when I hover over div id='a', but I cannot figure out how to do it because the div 'a' is inside another div that div 'b' is not in. <div id='content'> ..

17

answers

How do I access previous promise results in a .then() chain?

I have restructured my code to promises, and built a wonderful long flat promise chain, consisting of multiple .then() callbacks. In the end I want to return some composite value, and need to access m..

2

answers

How to call a VbScript from a Batch File without opening an additional command prompt

I have a VBScript file which I am trying to call from a Batch file. The following code I coped to a notepad and saved as MyScript.vbs (http://gallery.technet.microsoft.com/scriptcenter/8bbed56f-a7aa-..

9

answers

Using PUT method in HTML form

Can I use a PUT method in an HTML form to send data from the form to a server?..

7

answers

Do Git tags only apply to the current branch?

I'm currently working with a repository that has multiple branches. When I create a tag, does that tag refer to the then-current branch? In other words: Whenever I create a tag, do I need to switch ..

7

answers

Error executing command 'ant' on Mac OS X 10.9 Mavericks when building for Android with PhoneGap/Cordova

Today I tried PhoneGap/Cordova with Mac OS X Mavericks. Building for iOS went just fine, but building for Android wasn't without some guesswork. I installed Android 4.2.2 via the Android SDK Manager ..

10

answers

Using custom font in android TextView using xml

I have added a custom font file to my assets/fonts folder. How do I use it from my XML? I can use it from code as follows: TextView text = (TextView) findViewById(R.id.textview03); Typeface tf = ..

1

answers

how to exit a python script in an if statement

I'm using Python 3.2 and trying to exit it after the user inputs that they don't want to continue, is there code that will exit it in an if statement inside a while loop? I've already tried using exit..

8

answers

Jenkins returned status code 128 with github

With GitHub command I have: ssh -T [email protected] Hi (MyName)! You've successfully authenticated, but GitHub does not provide shell access. My connection with GitHub is ok (no problem), but with Je..

3

answers

How to do a SUM() inside a case statement in SQL server

I want to add some calculation inside my case statement to dynamically create the contents of a new column but I get the error: Column 'Test1.qrank' is invalid in the select list because it is no..

8

answers

Why is the time complexity of both DFS and BFS O( V + E )

The basic algorithm for BFS: set start vertex to visited load it into queue while queue not empty for each edge incident to vertex if its not visited load into queue ..

5

answers

HTML5 video won't play in Chrome only

some background I've tested my video in FF and Safari (including iDevices) and it plays properly, but it will not play in the Chrome browser. As you can see in the code below, I've created mp4, m4v, w..

9

answers

The request was rejected because no multipart boundary was found in springboot

As I am trying this with spring boot and webservices with postman chrome add-ons. In postman content-type="multipart/form-data" and I am getting the below exception. HTTP Status 500 - Request proces..

12

answers

Cannot run emulator in Android Studio

I just got done installing Android studio and trying to take it for a test run. When I try to run my app I get the following error message emulator: ERROR: This AVD's configuration is missing a kern..

6

answers

In TensorFlow, what is the difference between Session.run() and Tensor.eval()?

TensorFlow has two ways to evaluate part of graph: Session.run on a list of variables and Tensor.eval. Is there a difference between these two?..

5

answers

Declare an array in TypeScript

I'm having trouble either declaring or using a boolean array in Typescript, not sure which is wrong. I get an undefined error. Am I supposed to use JavaScript syntax or declare a new Array object? W..

8

answers

Compare two columns using pandas

Using this as a starting point: a = [['10', '1.2', '4.2'], ['15', '70', '0.03'], ['8', '5', '0']] df = pd.DataFrame(a, columns=['one', 'two', 'three']) Out[8]: one two three 0 10 1.2 4.2 1 ..

6

answers

How to set scope property with ng-init?

I am trying to set the value of a $scope property using ng-init, and I am unable to access that value in the controller's javascript. What am I doing wrong? Here is a fiddle: http://jsfiddle.net/uce..

9

answers

export html table to csv

I am trying to add a feature of csv download option in my website. It should convert the html table present in the website in to csv content and make it downloadable. Ive been searching through intern..

5

answers

How do I parse JSON with Objective-C?

I am new to iPhone. Can anyone tell me the steps to follow to parse this data and get the activity details, first name, and last name? { "#error": false, "#data": { "": { ..

3

answers

extracting days from a numpy.timedelta64 value

I am using pandas/python and I have two date time series s1 and s2, that have been generated using the 'to_datetime' function on a field of the df containing dates/times. When I subtract s1 from s2 ..

6

answers

How do I select the "last child" with a specific class name in CSS?

<ul> <li class="list">test1</li> <li class="list">test2</li> <li class="list">test3</li> <li>test4</li> </ul> How do I sel..

6

answers

SQL Server converting varbinary to string

I want to do conversion in T-SQL from a varbinary type to string type Here is an example : First I got this varbinary 0x21232F297A57A5A743894A0E4A801FC3 And then I want to convert it to 21232f2..

22

answers

8080 port already taken issue when trying to redeploy project from Spring Tool Suite IDE

I have strange thing when I try to modify Spring project inside my Spring Tool Suite. On the first load (deploy) everything is fine, application compiles and runs on localhost:8080 When I change som..

17

answers

How can I generate an apk that can run without server with react-native?

I've built my app, I can run it on my local emulator (and also on my android device within the same network by changing debug server). However, I want to build an APK that I can send to someone witho..

13

answers

"Invalid form control" only in Google Chrome

The code below works well in Safari but in Chrome and Firefox the form will not submit. Chrome console logs the error An invalid form control with name='' is not focusable. Any ideas? Note that whi..

8

answers

Check for special characters in string

I want to check if a string contains special characters like [email protected]#$%^&*.,<>/\'";:? and return true if the string contains atleast one of those chars. I tried with the following regex,script: va..

10

answers

How to create a link for all mobile devices that opens google maps with a route starting at the current location, destinating a given place?

I rather thought this would not be so hard to find out but appearantly it is not easy to find an awesome cross device article, like you'd expect. I want to create a link which opens either the mobile..

2

answers

check if variable is dataframe

when my function f is called with a variable I want to check if var is a pandas dataframe: def f(var): if var == pd.DataFrame(): print "do stuff" I guess the solution might be quite sim..

6

answers

How to check if a .txt file is in ASCII or UTF-8 format in Windows environment?

I have converted a .txt file from ASCII to UTF-8 using UltraEdit. However, I am not sure how to verify if it is in UTF-8 format in Windows environment. Thank you!..

4

answers

How to sort Counter by value? - python

Other than doing list comprehensions of reversed list comprehension, is there a pythonic way to sort Counter by value? If so, it is faster than this: >>> from collections import Counter >..

9

answers

Storing Python dictionaries

I'm used to bringing data in and out of Python using CSV files, but there are obvious challenges to this. Are there simple ways to store a dictionary (or sets of dictionaries) in a JSON or pickle file..

11

answers

Datatables - Search Box outside datatable

I'm using DataTables (datatables.net) and I would like my search box to be outside of the table (for example in my header div). Is this possible ?..

10

answers

Use python requests to download CSV

Here is my code: import csv import requests with requests.Session() as s: s.post(url, data=payload) download = s.get('url that directly download a csv report') This gives me the access to ..

6

answers

Expected block end YAML error

When pasting this YAML file into an online yaml parser, I got an expected block end error: ADDATTEMPTING: 'Tentative d ajout ' ATTEMPTINGTOGIVE: 'Tenter de donner ' ATTEMPTINGTOSET1: 'Tentative de d..

10

answers

How to execute UNION without sorting? (SQL)

UNION joins two results and remove duplicates, while UNION ALL does not remove duplicates. UNION also sort the final output. What I want is the UNION ALL without duplicates and without the sort. Is t..

5

answers

How to open a new window and insert html into it using jQuery?

I am trying to open a new window from javascript but nothing is being inserted into the html: var callScriptText = $('#callScriptText').html(); var url = '/Action/CallScript/?callScript='; // Open t..

3

answers

Display SQL query results in php

I'm tring to diplay results in php from sql database MySQL statement is correct and does what i want in phpMyAdmin but for some reason my code breaks in the webpage here is the code require_once(..

3

answers

How to draw a rectangle around a region of interest in python

I'm having trouble with import cv in my python code. My issue is I need to draw a rectangle around regions of interest in an image. How can this be done in python? I'm doing object detection and woul..

13

answers

Running Facebook application on localhost

I am planning to connect to Facebook chat from my localhost. I will need to get the session key from Facebook. When I give the site URL as localhost:8080 or ip-address:8080 it does not work. I read ..

8

answers

Run Excel Macro from Outside Excel Using VBScript From Command Line

I'm trying to run an Excel macro from outside of the Excel file. I'm currently using a ".vbs" file run from the command line, but it keeps telling me the macro can't be found. Here is the script I'm t..

4

answers

JQuery - Call the jquery button click event based on name property

I have one HTML button like, <input type="button" id="btnSubmit" name="btnName" class="btnclass" value="Click Me" /> I want to call JQuery button click event based on id property means, we us..

12

answers

PHP 7 simpleXML

I'm testing PHP7, and have a weird issue after a recent update. SimpleXML should be enabled by default, and my phpinfo page shows that it is available: However, the functions are not available: &l..

8

answers

How to check if a symlink exists

I'm trying to check if a symlink exists in bash. Here's what I've tried. mda=/usr/mda if [ ! -L $mda ]; then echo "=> File doesn't exist" fi mda='/usr/mda' if [ ! -L $mda ]; then echo "=>..

2

answers

Nginx subdomain configuration

I have nginx acting as a reverse proxy to apache. I now need to add a new subdomain that will serve files from another directory, but at the same time I want all location and proxy_pass directives tha..

14

answers

CSS Background image not loading

I have followed all of the tutorials, which all say the say thing. I specify my background inside of body in my css style sheet, but the page just displays a blank white background. Image is in the s..

8

answers

How to allow all Network connection types HTTP and HTTPS in Android (9) Pie?

From Android 9 Pie now, requests without encryption will never work. And by default, the System will expect you to use TLS by default.You can read this feature here So if you only make requests via HT..

3

answers

Ubuntu says "bash: ./program Permission denied"

I am running Ubuntu on computer 1 and computer 2. I compiled a C++ program on computer 1, and I can execute it from the terminal using ./program_name. It runs fine. However, when I try to do this on ..

4

answers

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

10

answers

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

4

answers

How to calculate Average Waiting Time and average Turn-around time in SJF Scheduling?

In SJF (Shortest Job First) Scheduling method. How to calculate Average Waiting Time and average Turn-around time? Is Gannt Chart correct ? ..

5

answers

Submit a form in a popup, and then close the popup

This seemed so trivial when I started off with it! My objective is this: When user clicks on a button, open up a form in a new window. Once the form is submitted, close the popup and return to the ..

2

answers

Rendering partial view on button click in ASP.NET MVC

The problem I will be describing is very similar to ones I already found (e.g. this post with nearly identical name) but I hope that I can make it into something that is not a duplicate. I have creat..

5

answers

How to create a hash or dictionary object in JavaScript

I want to create a map object in javascript. I came to the following idea: var a = new Array(); a["key1"] = "value1"; a["key2"] = "value2"; but then how I can find if a particular key exists or ..

4

answers

PHP remove all characters before specific string

I need to remove all characters from any string before the occurrence of this inside the string: "www/audio" Not sure how I can do this...

4

answers

Backbone.js fetch with parameters

Following the documentation, I did: var collection = new Backbone.Collection.extend({ model: ItemModel, url: '/Items' }) collection.fetch({ data: { page: 1} }); the url turned out ..

17

answers

Get Folder Size from Windows Command Line

Is it possible in Windows to get a folder's size from the command line without using any 3rd party tool? I want the same result as you would get when right clicking the folder in the windows explorer..

12

answers

How to set image width to be 100% and height to be auto in react native?

I am trying to display list of images in a scrollview. Width should be 100%, while height should be automatic, keeping aspect ratio. The searches I did pointed to various solutions which give fullscr..

4

answers

BEGIN - END block atomic transactions in PL/SQL

This information should be easy to find, but I haven't had any luck. When I have a BEGIN - END block in a PL/SQL, does it behave as an atomic transaction, that will try to commit on hitting the END b..

5

answers

SQL datetime format to date only

I am trying to select the DeliveryDate from sql database as just date. In the database, i am saving it as datetime format. How is it possible to get just date?? SELECT Subject, DeliveryDate from Ema..

5

answers

C# ASP.NET Single Sign-On Implementation

I am tasked with implementing single sign-on for our customers as part of our next release. The flow exists as follows: User logs into their school's main portal system using a student id/password..

4

answers

json_encode() escaping forward slashes

I'm pulling JSON from Instagram: $instagrams = json_decode($response)->data; Then parsing variables into a PHP array to restructure the data, then re-encoding and caching the file: file_put_cont..

5

answers

libstdc++.so.6: cannot open shared object file: No such file or directory

I want to run Cilkscreen command with a cilk++ program but I'v got this error /usr/local/cilk/bin/../lib32/pinbin: error while loading shared libraries: libstdc++.so.6: cannot open shared objec..

7

answers

Table column sizing

In Bootstrap 3, I could apply col-sm-xx to the th tags in the thead and resize table columns at will. However this doesn't work in bootstrap 4. How can I achieve something like this in bootstrap 4? ..

5

answers

Android: No Activity found to handle Intent error? How it will resolve

No Activity found to handle Intent error? How it will resolve. Preference customPref = (Preference) findPreference("DataEntryScreen"); customPref .setOnPreferenceClickListener(new OnPrefe..

6

answers

HTML-Tooltip position relative to mouse pointer

How to align the tooltip the natural style: right bottom of the mouse pointer? <!DOCTYPE html> <html> <head> <title>Tooltip with Image</title> <meta charset="UTF-..

12

answers

How to make a PHP SOAP call using the SoapClient class

I'm used to writing PHP code, but do not often use Object-Oriented coding. I now need to interact with SOAP (as a client) and am not able to get the syntax right. I've got a WSDL file which allows me ..

5

answers

unexpected T_VARIABLE, expecting T_FUNCTION

I am expecting this to be a basic syntax error I overlooked, but I can't figure it out. In a PHP script, I keep getting the following error. Parse error: syntax error, unexpected T_VARIABLE, expecti..

8

answers

Which SchemaType in Mongoose is Best for Timestamp?

I'm using Mongoose, MongoDB, and Node. I would like to define a schema where one of its fields is a date\timestamp. I would like to use this field in order to return all of the records that have bee..

4

answers

accessing a docker container from another container

i created two docker containers based on two different images. one of db and another for webserver. both containers are running on my mac osx. i can access db container from host machine and same wa..

7

answers

pandas: How do I split text in a column into multiple rows?

I'm working with a large csv file and the next to last column has a string of text that I want to split by a specific delimiter. I was wondering if there is a simple way to do this using pandas or pyt..

17

answers

SSRS Query execution failed for dataset

Have just deployed my Project on to my reporting Server. I have multiple datasets which are referencing views which exist on the db on that server. When I try to go into any report part I am getting..

9

answers

surface plots in matplotlib

I have a list of 3-tuples representing a set of points in 3D space. I want to plot a surface that covers all these points. The plot_surface function in the mplot3d package requires as arguments X,Y a..

7

answers

"Missing return statement" within if / for / while

I have a question regarding return statements used within if() while() or for() statements. As you can see in the following method, it is expecting that I return a String value. The problem is that if..

46

answers

How can I delete all Git branches which have been merged?

I have many Git branches. How do I delete branches which have already been merged? Is there an easy way to delete them all instead of deleting them one by one?..

3

answers

React JS get current date

I want to output the current date in my componnent. In the console my code works, but the React console says: "bundle.js:14744 Uncaught RangeError: Maximum call stack size exceeded" My component loo..

10

answers

how to toggle attr() in jquery

I have a simple add attribute function: $(".list-toggle").click(function() { $(".list-sort").attr('colspan', 6); }); My question is: how can I turn this into a toggle, so colspan="6" is removed..

6

answers

How to check the gradle version in Android Studio?

When compiling this official project with Android Studio 0.82, it shows error note: Error:The project is using an unsupported version of the Android Gradle plug-in (0.9.2) After some searching, I dec..

10

answers

How to copy text from a div to clipboard

Here is my code for when the user clicks on this button: <button id="button1">Click to copy</button> How do I copy the text inside this div? <div id="div1">Text To Copy</div&g..

15

answers

Git: How to squash all commits on branch

I make new branch from master with: git checkout -b testbranch I make 20 commits into it. Now I want to squash those 20 commits. I do that with: git rebase -i HEAD~20 What about if I don't kno..

11

answers

DOM element to corresponding vue.js component

How can I find the vue.js component corresponding to a DOM element? If I have element = document.getElementById(id); Is there a vue method equivalent to the jQuery $(element) ..

12

answers

Two models in one view in ASP MVC 3

I have 2 models: public class Person { public int PersonID { get; set; } public string PersonName { get; set; } } public class Order { public int OrderID { get; set; } public int Tota..

10

answers

Retrofit 2 - Dynamic URL

With Retrofit 2, you can set a full URL in the annotation of a service method like : public interface APIService { @GET("http://api.mysite.com/user/list") Call<Users> getUsers(); } Howev..

3

answers

How to open SharePoint files in Chrome/Firefox

In Internet Explorer, I can open Sharepoint files directly from their links so the file in Sharepoint is automatically updated when I save it. But in Chrome, it asks to download the file instead of ju..

4

answers

How can I create my own comparator for a map?

typedef map<string, string> myMap; When inserting a new pair to myMap, it will use the key string to compare by its own string comparator. Is it possible to override that comparator? For examp..

3

answers

Sending string via socket (python)

I have two scripts, Server.py and Client.py. I have two objectives in mind: To be able to send data again and again to server from client. To be able to send data from Server to client. here i..

6

answers

Multiple submit buttons in the same form calling different Servlets

First, here is the code: <form action="FirstServlet" method="Post"> Last Name: <input type="text" name="lastName" size="20"> <br><br> <input type="submit" value..

9

answers

No templates in Visual Studio 2017

After a Visual Studio 2017 (RC) installation from scratch, I can't find a standard list of templates. I'm specifically interested in the Console Application (C#) template and the Windows Form (C#) tem..

6

answers

Can I apply multiple background colors with CSS3?

I know how to specify multiple background images using CSS3 and modify how they are displayed using different options. Currently I have a <div>, which needs to have a different color for about ..

4

answers

How to properly add cross-site request forgery (CSRF) token using PHP

I am trying to add some security to the forms on my website. One of the forms uses AJAX and the other is a straightforward "contact us" form. I'm trying to add a CSRF token. The problem I'm having is ..

2

answers

How to update MySql timestamp column to current timestamp on PHP?

I want to update the columns of data type timestamp manually through my PHP code. Can you please tell me how to do that?..

5

answers

Do on-demand Mac OS X cloud services exist, comparable to Amazon's EC2 on-demand instances?

Amazon's EC2 service offers a variety of Linux and Windows OS choices, but I haven't found a service offering a similar "rent by the hour" service for a remote Mac OS X virtual machine. Does such a s..

6

answers

Batch script to find and replace a string in text file within a minute for files up to 12 MB

I have written a batch script to replace a string in text file. Following is the script. @echo off &setlocal set "search=%1" set "replace=%2" set "textfile=Input.txt" set "newfile=Output.txt" (f..

8

answers

Spring RestTemplate timeout

I would like to set the connection timeouts for a rest service used by my web application. I'm using Spring's RestTemplate to talk to my service. I've done some research and I've found and used the ..

4

answers

JavaScript Editor Plugin for Eclipse

Is there an Eclipse plugin available for JavaScript that allows for syntax checking and autosuggestions for .js files in Eclipse?..

7

answers

org.xml.sax.SAXParseException: Premature end of file for *VALID* XML

I am getting very strange "Premature end of file." exception for last few days on one of our servers. The same configuration XML works fine on another server. We are using Tomcat 5.0.28 on both these ..

27

answers

Registry key Error: Java version has value '1.8', but '1.7' is required

While running sencha app build production I am getting the following error: Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' i..

4

answers

Java Spring - How to use classpath to specify a file location?

How can I use the classpath to specify the location of a file that is within my Spring project? This is what I have currently: FileReader fr = new FileReader("C:\\Users\\Corey\\Desktop\\storedProced..

4

answers

how to set "camera position" for 3d plots using python/matplotlib?

I'm learning how to use mplot3d to produce nice plots of 3d data and I'm pretty happy so far. What I am trying to do at the moment is a little animation of a rotating surface. For that purpose, I need..

8

answers

Java Could not reserve enough space for object heap error

I have Java7 running on 32-bit Windows and 4 GB RAM, but: java -Xmx4G -Xms4G -jar Minecraft.jar java -Xmx3G -Xms3G -jar Minecraft.jar java -Xmx2G -Xms2G -jar Minecraft.jar ...still does not work...

4

answers

UnmodifiableMap (Java Collections) vs ImmutableMap (Google)

Context I need to return a reference to a map that I'm using for a data cache, and I'd like to make sure nobody can modify their reference. Question I've seen lots of references to UnmodifiableMap ..

9

answers

How to convert int to float in C?

I am trying to solve: int total=0, number=0; float percentage=0.0; percentage=(number/total)*100; printf("%.2f", percentage); If the value of the number is 50 and the total is 100, I should get 50..

5

answers

Get current working directory in a Qt application

I'm writing a program in C++ using the Qt library. There is a symbolic link in my home bin directory to the executable. I would like the current working directory of my program to be the directory in ..

6

answers

Is it possible to run CUDA on AMD GPUs?

I'd like to extend my skill set into GPU computing. I am familiar with raytracing and realtime graphics(OpenGL), but the next generation of graphics and high performance computing seems to be in GPU c..

4

answers

How to convert between bytes and strings in Python 3?

This is a Python 101 type question, but it had me baffled for a while when I tried to use a package that seemed to convert my string input into bytes. As you will see below I found the answer for my..

11

answers

HTML: How to center align a form

I have the following HTML code and i want to make my form aligned in center. <form action="advsearcher.php" method="get"> Search this website:<input align="center" type="text" name="sear..

8

answers

How to upgrade rubygems

I need to upgrade gems to 1.8 i tried installing the respective debian packages but it seems its not getting upgraded [email protected]:~$ dpkg -l |grep -i rubygem ii rubygems ..

18

answers

Synchronous request in Node.js

If I need to call 3 http API in sequential order, what would be a better alternative to the following code: http.get({ host: 'www.example.com', path: '/api_1.php' }, function(res) { res.on('data',..

12

answers

How to trim white spaces of array values in php

I have an array as follows $fruit = array(' apple ','banana ', ' , ', ' cranberry '); I want an array which contains the values without the white spaces on either sides but it can..

9

answers

Can't clone a github repo on Linux via HTTPS

I'm trying to do a simple git clone https://github.com/org/project.git on a CentOS box but get: error: The requested URL returned error: 401 while accessing https://github.com/org/project.git/in..

10

answers

get dictionary value by key

How can I get the dictionary value by key on function my function code is this ( and the command what I try but didn't work ): static void XML_Array(Dictionary<string, string> Data_Array) { ..

6

answers

sys.path different in Jupyter and Python - how to import own modules in Jupyter?

In Jupyter my own little module is not loaded but in python/bpython is everything is fine. When typing import sys print(sys.path) the path to my module will not in show in Jupyter but in python/bpy..

12

answers

converting date time to 24 hour format

The time I get from the server is like Jul 27, 2011 8:35:29 AM. I want to convert it to yyyy-MM-dd HH:mm:ss. I also want the converted time to be in 24 hour format. Can any one give solution to th..

9

answers

Convert String into a Class Object

I am storing a class object into a string using toString() method. Now, I want to convert the string into that class object. How to do that? Please help me with source code...

11

answers

django order_by query set, ascending and descending

How can I order by descending my query set in django by date? Reserved.objects.all().filter(client=client_id).order_by('check_in') I just want to filter from descending all the Reserved by check_in..

3

answers

inverting image in Python with OpenCV

I want to load a color image, convert it to grayscale, and then invert the data in the file. What I need: to iterate over the array in OpenCV and change every single value with this formula (it migh..

2

answers

SSL certificate is not trusted - on mobile only

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

10

answers

not:first-child selector

I have a div tag containing several ul tags. I'm able to set CSS properties for the first ul tag only: div ul:first-child { background-color: #900; } However, my following attempts to set CSS ..

7

answers

How to tell if node.js is installed or not

I've recently installed node.js and I have no idea how to run applications. I installed node.js but couldn't find further instructions. What does one really need to do? I wanted to see if it was actua..

5

answers

Can a JSON value contain a multiline string

I am writing a JSON file which would be read by a Java program. The fragment is as follows... { "testCases" : { "case.1" : { "scenario" : "this the case 1.", "result" : "this ..

4

answers

Clone Object without reference javascript

I have a big object with much data. And i want to clone this in other variable. When i set some param of the instance B has the same result in the original object: var obj = {a: 25, b: 50, c: 75}; va..

26

answers

Generate class from database table

How can I generate a class from a SQL Server table object? I'm not talking about using some ORM. I just need to create the entities (simple class). Something like: public class Person { ..

4

answers

mysql count group by having

I have this table: Movies (ID, Genre) A movie can have multiple genres, so an ID is not specific to a genre, it is a many to many relationship. I want a query to find the total number of movies whi..

11

answers

How can I get the count of milliseconds since midnight for the current?

Note, I do NOT want millis from epoch. I want the number of milliseconds currently on the clock. So for example, I have this bit of code. Date date2 = new Date(); Long time2 = (long) (((((date2.get..

4

answers

How to add image background to btn-default twitter-bootstrap button?

I try to design a bootstrap v3.3.5 button by using the existing class btn-default, below are the sample of codes of what I had done. _x000D_ _x000D_ <!-- Latest compiled and minified CSS -->_x0..

2

answers

Unpacking a list / tuple of pairs into two lists / tuples

Possible Duplicate: A Transpose/Unzip Function in Python I have a list that looks like this: list = (('1','a'),('2','b'),('3','c'),('4','d')) I want to separate the list in 2 lists. li..

8

answers

Maximum value for long integer

How can I assign the maximum value for a long integer to a variable, similar, for example, to C++'s LONG_MAX...

10

answers

How to get the text node of an element?

<div class="title"> I am text node <a class="edit">Edit</a> </div> I wish to get the "I am text node", do not wish to remove the "edit" tag, and need a cross browser so..

17

answers

Getting Current date, time , day in laravel

I need to get the current date, time, day using laravel I tried to echo $ldate = new DateTime('today'); and $ldate = new DateTime('now'); But it is returning 1 always. How can i get the current da..

11

answers

List of installed gems?

Is there a Ruby method I can call to get the list of installed gems? I want to parse the output of gem list. Is there a different way to do this?..

9

answers

How to set a selected option of a dropdown list control using angular JS

I am using Angular JS and I need to set a selected option of a dropdown list control using angular JS. Forgive me if this is ridiculous but I am new with Angular JS Here is the dropdown list control..

4

answers

Negation in Python

I'm trying to create a directory if the path doesn't exist, but the ! (not) operator doesn't work. I'm not sure how to negate in Python... What's the correct way to do this? if (!os.path.exists("/usr..

9

answers

Pure JavaScript Send POST Data Without a Form

Is there a way to send data using the POST method without a form and without refreshing the page using only pure JavaScript (not jQuery $.post())? Maybe httprequest or something else (just can't find ..

4

answers

how to use font awesome in own css?

I'm using bootstrap and Font Awesome. In a custom css class I'm working on I tried to include Font Awesome icons instead of using images. Here is my code before Font Awesome. .data .close { display..

24

answers

Vertically centering a div inside another div

I want to center a div which is added inside another div. <div id="outerDiv"> <div id="innerDiv"> </div> </div> This is the CSS I am currently usin..

5

answers

how to get login option for phpmyadmin in xampp

when i open localhost/phpmyadmin/ in xampp it opens directly the home page with root as user but not a login page. My page looks same as in here in this link how can I get a login page, what are the s..

3

answers

MySql Table Insert if not exist otherwise update

UPDATE AggregatedData SET datenum="734152.979166667", Timestamp="2010-01-14 23:30:00.000" WHERE datenum="734152.979166667"; It works if the datenum exists, but I want to insert this data as a new ..

9

answers

What's the fastest way in Python to calculate cosine similarity given sparse matrix data?

Given a sparse matrix listing, what's the best way to calculate the cosine similarity between each of the columns (or rows) in the matrix? I would rather not iterate n-choose-two times. Say the input..

2

answers

ERROR 403 in loading resources like CSS and JS in my index.php

I'm in Linux, Elementary OS, and installed lampp in opt. My CSS and JS won't load. When I inspect my page through browser. The console says Failed to load resource: the server responded with a status..

6

answers

How to set default value for HTML select?

I have a HTML select like this: <select> <option>a</option> <option>b</option> <option>c</option> </select> and I have a variable named..

21

answers

A failure occurred while executing com.android.build.gradle.internal.tasks

I am getting this error while I am building APK. Cause 1: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.interna..

2

answers

Spring MVC How take the parameter value of a GET HTTP Request in my controller method?

In this period I am studing the Spring MVC showcase example (downloadable from STS dasboard) and I have some simple question about the Request Mapping examples: 1) In my home.jsp page I have this lin..

6

answers

Laravel Soft Delete posts

in our project we must be use soft delete for each posts. in laravel document i think we can only use this feature for tables. can we use that for posts on table such as $id = Contents::find($id); ..

6

answers

CardView background color always white

I am using RecyclerView with GridLayoutManager and I have each item as CardView. Unfortunately, the CardView here does not seem to change its background color. I tried in layout and programmatically ..

10

answers

Python executable not finding libpython shared library

I am installing Python 2.7 on CentOS 5. I built and installed Python as follows ./configure --enable-shared --prefix=/usr/local make make install When I try to run /usr/local/bin/python, I get this..

9

answers

how to remove the bold from a headline?

I have a headline: <h1>THIS IS A HEADLINE</h1> How do i make the phrase "THIS IS..." not to be bold and the rest without a change? couldn't find any relevent tag in text-decoration...

2

answers

Overriding css style?

I look on Stack Overflow, and didn't find the solution, I know how to override style if style exists, just change its property. But now I have a strange style to override Here is an example of what ..

7

answers

CSS change button style after click

I was wondering if there was a way to change a button's style, in css, after it's been clicked, so not a element:active. Thanks!..

5

answers

Converting dict to OrderedDict

I am having some trouble using the collections.OrderedDict class. I am using Python 2.7 on Raspbian, the Debian distro for Raspberry Pi. I am trying to print two dictionaries in order for comparison (..

9

answers

Multiple ping script in Python

I'm unable to find any good easy to learn documentation on python and networking. In this instance, I'm just trying to make a easy script which I can ping a number of remote machines. for ping in ra..

17

answers

Http 415 Unsupported Media type error with JSON

I am calling a REST service with a JSON request and it responds with a HTTP 415 "Unsupported Media Type" error. The request content type is set to ("Content-Type", "application/json; charset=utf8")...

8

answers

How do I execute cmd commands through a batch file?

I want to write a batch file that will do following things in given order: Open cmd Run cmd command cd c:\Program files\IIS Express Run cmd command iisexpress /path:"C:\FormsAdmin.Site" /port:8088 /..

8

answers

How to display length of filtered ng-repeat data

I have a data array which contains many objects (JSON format). The following can be assumed as the contents of this array: var data = [ { "name": "Jim", "age" : 25 }, { "name": "Je..

18

answers

Convert an ISO date to the date format yyyy-mm-dd in JavaScript

How can I get a date having the format yyyy-mm-dd from an ISO 8601 date? My  8601 date is 2013-03-10T02:00:00Z How can I get the following? 2013-03-10 ..

7

answers

How to cast from List<Double> to double[] in Java?

I have a variable like that: List<Double> frameList = new ArrayList<Double>(); /* Double elements has added to frameList */ How can I have a new variable has a type of double[] from t..

1

answers

How to access parameters in a RESTful POST method

My POST method looks like this: @POST @Consumes({"application/json"}) @Path("create/") public void create(String param1, String param2){ System.out.println("param1 = " + param1); System.out.p..

7

answers

JSON forEach get Key and Value

I have the following forEach loop over a JSON object called obj: Object.keys(obj).forEach(function(){}); How can I make it console.log both key and value of each item inside the object? Something lik..

3

answers

How to create jobs in SQL Server Express edition

Could anyone please explain to me how to create jobs in SQL Server Express edition?..

18

answers

How can I print variable and string on same line in Python?

I am using python to work out how many children would be born in 5 years if a child was born every 7 seconds. The problem is on my last line. How do I get a variable to work when I'm printing text eit..

6

answers

Declare and initialize a Dictionary in Typescript

Given the following code interface IPerson { firstName: string; lastName: string; } var persons: { [id: string]: IPerson; } = { "p1": { firstName: "F1", lastName: "L1" }, "p2": { firstNa..

2

answers

Server returned HTTP response code: 401 for URL: https

I'm using Java to access a HTTPS site which returns the display in an XML format. I pass the login credentials in the URL itself. Here is the code snippet: DocumentBuilderFactory dbf = DocumentBuilde..

23

answers

Exception : AAPT2 error: check logs for details

Task :processDebugResources Failed to execute aapt com.android.ide.common.process.ProcessException: Failed to execute aapt at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilde..

1

answers

Implement specialization in ER diagram

I want to implement this specialization relationship. Knowing that I will have different attributes for each account type. Here's my try: accounts(account_id, email, username, password, ...) user_a..

8

answers

Matching strings with wildcard

I would like to match strings with a wildcard (*), where the wildcard means "any". For example: *X = string must end with X X* = string must start with X *X* = string must contain X Also, some comp..

11

answers

What is the best way to trigger onchange event in react js

We use Backbone + ReactJS bundle to build a client-side app. Heavily relying on notorious valueLink we propagate values directly to the model via own wrapper that supports ReactJS interface for two wa..

3

answers

.net Core 2.0 - Package was restored using .NetFramework 4.6.1 instead of target framework .netCore 2.0. The package may not be fully compatible

I have a .net core 2.0 console app. I'm trying to read files from TFS using the following: How to get a file from TFS directly into memory (i.e., don't want to read from file system into memory..

10

answers

Getting a browser's name client-side

Is there any object or method that returns data about the browser, client-side? For example, I need to detect if the browser is IE (Interner Explorer). Following is the code snippet. function isIntern..

3

answers

Displaying a Table in Django from Database

How do you display the information from a database table in a table format on a webpage? Is there a simple way to do this in django or does it require a more complicated approach. More specifically, h..

6

answers

datetimepicker is not a function jquery

I working with datetimepicker jquery ui, when code below html , datetimepicker is not displaying and when i inspect with firebug console it displayed an error `` $("#example1").datetimepicker is not ..

12

answers

Word wrapping in phpstorm

How can I enable Word wraping in phpstorm? I need to enable it only for some of my files (with extension .txt). Is is possible?..

4

answers

How to solve SQL Server Error 1222 i.e Unlock a SQL Server table

I am working in a database where I load data in a raw table by a data loader. But today the data loader got stuck for unknown reasons. Then I stopped the data loader from windows task manager. But the..

6

answers

500 Internal Server Error for php file not for html

My site having 4-5 static pages only. index.html & index.php both are there. index.html is working fine. If I change to index.php, it's giving 500 Internal Server Error. I don't know where is my m..

11

answers

Run C++ in command prompt - Windows

I know that everyone uses an IDE nowadays, but I just find it simpler to write my code in notepad++, compile it using a command prompt command, and run it from there too. At least that works for Java ..

11

answers

This certificate has an invalid issuer Apple Push Services

I have created certificate to enable Push Services in my app, but every time I try to add certificate in my Keychain, after adding certificate it shows me following error: This certificate has an inv..

6

answers

How to concat string + i?

for i=1:N f(i) = 'f'+i; end gives an error in MatLab. What's the correct syntax to initialize an array with N strings of the pattern fi? It seems like even this is not working: for i=1:4 f(i)..

5

answers

Codeigniter - no input file specified

I am a beginner in Codeigniter and I saw a CI tutorial and was just trying to do a simple thing. I downloaded the CI and added this file to controller directory, but it won't work. <?php class si..

2

answers

How do I configure php to enable pdo and include mysqli on CentOS?

PHP Version 5.3.3 on CentOS (x86_64, RHEL 6) Apparently my PHP installation was configured to exclude Mysqli and disable PDO for some reason. Therefore, I believe this is what's causing them to not w..

5

answers

How does Google reCAPTCHA v2 work behind the scenes?

This post refers to Google ReCaptcha v2 (not the latest version) Recently Google introduced a simplified "captcha" verification system (video) that enables users to pass the "captcha" just by clickin..

8

answers

React Hook Warnings for async function in useEffect: useEffect function must return a cleanup function or nothing

I was trying the useEffect example something like below: useEffect(async () => { try { const response = await fetch(`https://www.reddit.com/r/${subreddit}.json`); const json = a..

1

answers

$.browser is undefined error

Possible Duplicate: Is jQuery $.browser Deprecated? jQuery latest $.browser In a code I am using JQuery is loading. I have gone through all the files that should be loaded, but I can't fi..

3

answers

Can I animate absolute positioned element with CSS transition?

I want to animate an element's position change with CSS transition, but it is not working even when I use the transition on all properties, as in the example here: http://jsfiddle.net/yFy5n/3/ Howeve..

15

answers

How to open mail app from Swift

Im working on a simple swift app where the user inputs an email address and presses a button which opens the mail app, with the entered address in the address bar. I know how to do this in Objective-C..

8

answers

Selenium WebDriver findElement(By.xpath()) not working for me

I've been through the xpath tutorials and checked many other posts, hence I'm not sure what I'm missing. I'm simply trying to find the following element by xpath: <input class="t-TextBox" type="e..

8

answers

Change Background color (css property) using Jquery

I want to Change the background colour on click . This is my code work that i tried.pls help me out :) <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> $(docu..

15

answers

How to disable a input in angular2

In ts is_edit = true to disable... <input [disabled]="is_edit=='false' ? true : null" id="name" type="text" [(ngModel)]="model.name" formControlName="name" class="form-control" minlength="2"> ..

30

answers

Blurry text after using CSS transform: scale(); in Chrome

Seems like there has been a recent update to Google Chrome that causes blurry text after doing a transform: scale(). Specifically I'm doing this: @-webkit-keyframes bounceIn { 0% { opacity: 0; ..

15

answers

Count how many files in directory PHP

I'm working on a slightly new project. I wanted to know how many files are in a certain directory. <div id="header"> <?php $dir = opendir('uploads/'); # This is the directory it will co..

8

answers

How to get DataGridView cell value in messagebox?

How can I get DataGridView cell value to be written in the MessageBox in C#?..

6

answers

Java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException

I have updated my dependecies like you said in your comment and i have this now : org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org...

7

answers

Make a hyperlink textview in android

I want to make a link for a textview text like Google. Is there anyway to make link like this. (i.e) When clicking on the word Google it should open the appropriate link. Any ideas are welcome...

6

answers

What does "|=" mean? (pipe equal operator)

I tried searching using Google Search and Stack Overflow, but it didn't show up any results. I have seen this in opensource library code: Notification notification = new Notification(icon, ticke..

7

answers

How to check if a string starts with one of several prefixes?

I have the following if statement: String newStr4 = strr.split("2012")[0]; if (newStr4.startsWith("Mon")) { str4.add(newStr4); } I want it to include startsWith Mon Tues Weds Thurs Friday etc...

10

answers

RadioGroup: How to check programmatically

I create a RadioGroup from XML <RadioGroup android:id="@+id/option" android:layout_width="match_parent" android:orientation="horizontal" android:checkedButton="@+id/b..

4

answers

Declaring an HTMLElement Typescript

In the default TypeScript HTML app from visual studio, I added HTMLElement to the first line of the window.onload event handler, thinking that I could provide a type for "el". thus: class Gree..

5

answers

Fitting a histogram with python

I have a histogram H=hist(my_data,bins=my_bin,histtype='step',color='r') I can see that the shape is almost gaussian but I would like to fit this histogram with a gaussian function and print the va..

9

answers

How to index characters in a Golang string?

How to get an "E" output rather than 69? package main import "fmt" func main() { fmt.Print("HELLO"[1]) } Does Golang have function to convert a char to byte and vice versa?..

4

answers

MVC [HttpPost/HttpGet] for Action

I am using MVC C#. Can somebody give an example on why one would use [HttpPost/HttpGet] for an Action. How can an active have both - what is the practical use? ..

7

answers

C# : Passing a Generic Object

I want to have a generic print function...PrintGeneric(T)...in the following case, what am I missing? As always your help/insight is appreciated... public interface ITest {} public class MyClass1 :..

17

answers

Add line break to 'git commit -m' from the command line

I am using Git from the command line and am trying to add a line break to the commit message (using git commit -m "") without going into Vim. Is this possible?..

11

answers

Nginx: Permission denied for nginx on Ubuntu

I am new to system administration. After installing nginx via puppet on Ubuntu I get the following output: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permiss..

6

answers

Woocommerce, get current product id

I'm currently working on a WooCommerce theme and attempting to add a sidebar to the product detail page. I've been able to get the sidebar added (specifically, this one: http://woocommerce.wp-a2z.org..

2

answers

Display special characters when using print statement

I would like to display the escape characters when using print statement. E.g. a = "Hello\tWorld\nHello World" print a Hello World Hello World I would like it to display: "Hello\tWorld\nHello..

10

answers

Import an existing git project into GitLab?

I have an account of a Gitlab installation where I created the repository "ffki-startseite" Now I want to clone the repository git://freifunk.in-kiel.de/ffki-startseite.git into that repository with ..

7

answers

Removing "NUL" characters

I have got characters like that in my notepad++ When i am trying to copy whole line, i am actually copying everything until "NUL": File:1 What i want to do, is replace those null, to be nothing,..

3

answers

How do I bind the enter key to a function in tkinter?

I am a Python beginning self-learner, running on MacOS. I'm making a program with a text parser GUI in tkinter, where you type a command in a Entry widget, and hit a Button widget, which triggers my p..

6

answers

Does file_get_contents() have a timeout setting?

I am calling a series of links using the file_get_contents() method in a loop. Each link may take more than 15 minutes to process. Now, I worry about whether PHP's file_get_contents() has a timeout pe..

12

answers

Compare two objects in Java with possible null values

I want to compare two strings for equality when either or both can be null. So, I can't simply call .equals() as it can contain null values. The code I have tried so far : boolean compare(String str1,..

3

answers

Disable button after click in JQuery

My button uses AJAX to add information to the database and change the button text. However, I wish to have the button disabled after one click (or else the person can spam the information in the dataa..

17

answers

How to remove provisioning profiles from Xcode

Does anyone know how to remove previously installed provisioning profiles from Xcode? I have seen this link, but I am not able to find that location in my system. So I think there must be some other..

3

answers

'module' has no attribute 'urlencode'

When I try to follow the Python Wiki's example related to URL encoding: >>> import urllib >>> params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0}) >>> f = urllib.u..

3

answers

Why is this error, 'Sequence contains no elements', happening?

I am getting an Invalid Operation Exception, the stack is down below. I think it is because db.Responses.Where(y => y.ResponseId.Equals(item.ResponseId)).First(); is not returning any results. I ch..

8

answers

How do I properly force a Git push?

I've set up a remote non-bare "main" repo and cloned it to my computer. I made some local changes, updated my local repository, and pushed the changes back to my remote repo. Things were fine up to th..

18

answers

Getting "Lock wait timeout exceeded; try restarting transaction" even though I'm not using a transaction

I'm running the following MySQL UPDATE statement: mysql> update customer set account_import_id = 1; ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction I'm not using a tra..

4

answers

ProgressDialog spinning circle

I want to implement ProgressDialog like this one, without additional frame.: But I'm getting this one. How could I change that? Here is my code for ProgressDialog. Thanks in advance private Pr..

14

answers

How to make remote REST call inside Node.js? any CURL?

In Node.js, other than using child process to make CURL call, is there a way to make CURL call to remote server REST API and get the return data? I also need to set up the request header to the remot..

8

answers

How to manually set REFERER header in Javascript?

I want to set Referer header of my webpage. Currently it displays "xyz" and I want to set it to "abc". Viewed referer using javascript:alert(document.referer)..

10

answers

Retrieve specific commit from a remote Git repository

Is there any way to retrieve only one specific commit from a remote Git repo without cloning it on my PC? The structure of remote repo is absolutely same as that of mine and hence there won't be any c..

21

answers

Unstaged changes left after git reset --hard

After git reset --hard, git status gives me files within the Changes not staged for commit: section. I've also tried git reset ., git checkout -- . and git checkout-index -f -a, to no avail. So, how..

6

answers

How to run a command as a specific user in an init script?

I'm writing an init script which is supposed to execute a single command as a user different than root. This is how I'm doing it currently: sudo -u username command This generally works as expected ..

9

answers

Phone Number Validation MVC

I am trying to use a regular expression to validate a phone number and return an error when an invalid number or phone number is submitted. MVC Code: <ol class="row"> <li class="cell" ..

15

answers

'Java' is not recognized as an internal or external command

When trying to check the current version of Java in which I am running, I received the error "java is not recognized as an internal or external command, operable program or batch file.". I a..

7

answers

What causes a Python segmentation fault?

I am implementing Kosaraju's Strong Connected Component(SCC) graph search algorithm in Python. The program runs great on small data set, but when I run it on a super-large graph (more than 800,000 no..

17

answers

Remove all special characters, punctuation and spaces from string

I need to remove all special characters, punctuation and spaces from a string so that I only have letters and numbers...

5

answers

Go: panic: runtime error: invalid memory address or nil pointer dereference

When running my Go program, it panics and returns the following: panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x38 pc=0x26df] goroutine 1 [runnin..

3

answers

How can I add a background thread to flask?

I'm busy writing a small game server to try out flask. The game exposes an API via REST to users. It's easy for users to perform actions and query data, however I'd like to service the "game world" ou..

2

answers

getting the error: expected identifier or ‘(’ before ‘{’ token

Getting this error : expected identifier or ‘(’ before ‘{’ token on the first bracket after the #include before the int main. No clue why! Doing an assignment for an introductory programming c..

1

answers

How to get a reference to an iframe's window object inside iframe's onload handler created from parent window

Before I paste any code, here's the scenario: I have an HTML document that creates an empty iframe using JavaScript The JavaScript creates a function and attaches a reference to that function to the ..

52

answers

You need to use a Theme.AppCompat theme (or descendant) with this activity

Android Studio 0.4.5 Android documentation for creating custom dialog boxes: http://developer.android.com/guide/topics/ui/dialogs.html If you want a custom dialog, you can instead display an Activit..

18

answers

How To fix white screen on app Start up?

I have an android app which displays a white screen for 2 seconds on startup. My other apps don't do this, but this one does. I have also implemented a splashscreen with the hope that it would fix thi..

3

answers

Include .so library in apk in android studio

I am trying my hands on developing a simple android application in which I am trying to use sqlcipher, which uses .so libraries internally. I have read the documentation on how to use sqlcipher with a..

5

answers

Makefile ifeq logical or

How do you perform a logical OR using make's ifeq operator? e.g., I have (simplified): ifeq ($(GCC_MINOR), 4) CFLAGS += -fno-strict-overflow endif ifeq ($(GCC_MINOR), 5) CFLAGS += -fno-stric..

3

answers

How to get the host name of the current machine as defined in the Ansible hosts file?

I'm setting up an Ansible playbook to set up a couple servers. There are a couple of tasks that I only want to run if the current host is my local dev host, named "local" in my hosts file. How can I d..

2

answers

Convert an enum to List<string>

How do I convert the following Enum to a List of strings? [Flags] public enum DataSourceTypes { None = 0, Grid = 1, ExcelFile = 2, ODBC = 4 }; I couldn't find this exact question, t..

8

answers

getting "No column was specified for column 2 of 'd'" in sql server cte?

I have this query, but its not working as it should, with c as (select month(bookingdate) as duration, count(*) as totalbookings from entbo..

5

answers

Getting an Embedded YouTube Video to Auto Play and Loop

I am trying to get a basic Youtube video to auto play and auto loop embedded on a page, but I'm having no luck. <div style="text-align: center; margin: auto"><object type="application/x-shoc..

8

answers

Cannot use Server.MapPath

What I must do to make Server.MapPath work? I have using System.Web; what else? When I type Server there is no quick result option (intelli-sense) for Server. Any help?..

11

answers

Get folder name from full file path

How do I get the folder name from the full path of the application? This is the file path below, c:\projects\root\wsdlproj\devlop\beta2\text Here "text" is the folder name. How can I get that fol..

1

answers

Undefined Symbols for architecture x86_64: Compiling problems

So I am trying to start an assignment, my professor gives us a Main.cpp, Main.h, Scanner.cpp, Scanner.h, and some other utilities. My job is to create a Similarity class to compare documents using th..

6

answers

How to create a md5 hash of a string in C?

I've found some md5 code that consists of the following prototypes... I've been trying to find out where I have to put the string I want to hash, what functions I need to call, and where to find the ..

11

answers

JavaScript Chart.js - Custom data formatting to display on tooltip

I have looked at various documentation and similar questions on here, but cannot seem to find the particular solution. Apologies if I have missed anything obvious or have repeated this question! As a..

10

answers

Can Twitter Bootstrap alerts fade in as well as out?

When I first saw the alerts in Bootstrap I thought they would behave like the modal window does, dropping down or fading in, and then fading out when closed. But it seems like they are always visible...

7

answers

RE error: illegal byte sequence on Mac OS X

I'm trying to replace a string in a Makefile on Mac OS X for cross-compiling to iOS. The string has embedded double quotes. The command is: sed -i "" 's|"iphoneos-cross","llvm-gcc:-O3|"iphoneos-cross..

11

answers

How to create a laravel hashed password

I am trying to create an hashed password for Laravel. Now someone told me to use Laravel hash helper but I can't seem to find it or I'm looking in the wrong direction. How do I create a laravel hash..

11

answers

How can I pretty-print JSON using Go?

Does anyone know of a simple way to pretty-print JSON output in Go? The stock http://golang.org/pkg/encoding/json/ package does not seem to include functionality for this (EDIT: it does, see accepted..

6

answers

Cannot deserialize the current JSON array (e.g. [1,2,3])

I am trying to read my JSON result. Here is my RootObject public class RootObject { public int id { get; set; } public bool is_default { get; set; } public string name { get; set; } public int quant..

7

answers

How do I remove my IntelliJ license in 2019.3?

I have JetBrains IntelliJ installed, how do I remove the license settings? I can find the license details in Help > Register... menu but that does not allow me to remove license settings or to ente..

6

answers

Difference between size and length methods?

What is the difference between .size() and .length ? Is .size() only for arraylists and .length only for arrays? ..

5

answers

foreach loop in angularjs

I was going through the forEach loop in AngularJS. There are few points that I did not understood about it. What is the use of the iterator function? Is there any way to go without it? What is the s..

14

answers

javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"Group")

unexpected element (uri:"", local:"Group"). Expected elements are <{}group> Meet an exception when unmarshalling from xml JAXBContext jc = JAXBContext.newInstance(Group.class); Unmarshaller ..

8

answers

Chrome says my extension's manifest file is missing or unreadable

I'm a new chrome extension developer, and I was going through the Chrome tutorial on making a "Hello World" extension, here's my code: { "name": "My First Extension", "version": "1.0..

6

answers

Where is the IIS Express configuration / metabase file found?

Where can the IIS Express configuration / metabase file be found?..

10

answers

What is Bootstrap?

There are a lot of questions here related to Bootstrap. I see a lot of people using it. So I tried to research it, and I found the official Bootstrap site, but there was only a download section and a ..

3

answers

How to get the number of columns in a matrix?

Suppose I specify a matrix A like A = [1 2 3; 4 5 6; 7 8 9] how can I query A (without using length(A)) to find out it has 3 columns?..

10

answers

Sublime Text 2 - Show file navigation in sidebar

I just switched to Sublime Text as my new editor. If I open the sidebar it shows the opening file, but what I want is a file navigation sidebar, is it possible to change that without downloading plugi..

13

answers

Django: OperationalError No Such Table

I'm building a fairly simple application, research, in my Django project that uses Django-CMS. (It's my first ground-up attempt at a project/application.) It's main purpose is to store various intel..

7

answers

Format a Go string without printing?

Is there a simple way to format a string in Go without printing the string? I can do: bar := "bar" fmt.Printf("foo: %s", bar) But I want the formatted string returned rather than printed so I can ..

4

answers

Using member variable in lambda capture list inside a member function

The following code compiles with gcc 4.5.1 but not with VS2010 SP1: #include <iostream> #include <vector> #include <map> #include <utility> #include <set> #include <a..

9

answers

$(document).ready not Working

I am trying to run jQuery and WebMethods with ASP.NET; I have added a ScriptManager to the master page, and a content on the content page <asp:Content ID="ch" ContentPlaceHolderID="cHead" runat="s..

11

answers

OCI runtime exec failed: exec failed: (...) executable file not found in $PATH": unknown

I have dockerized an app which has ffmpeg installed in it via libav-tools. The app launches without problem, yet the problem occured when fluent-ffmpeg npm module tried to execute ffmpeg command, whic..

11

answers

Find maximum value of a column and return the corresponding row values using Pandas

Using Python Pandas I am trying to find the Country & Place with the maximum value. This returns the maximum value: data.groupby(['Country','Place'])['Value'].max() But how do I get the corr..

5

answers

How to check the function's return value if true or false

I have a function here that validate fields in a form if they are empty. function ValidateForm() { jQuery('span.error_msg').hide(); var success = true; jQuery("#shippingF input").each(func..

7

answers

Bootstrap - How to add a logo to navbar class?

I would like to add a logo to the top navbar within the navbar-brand. I would like it to scale with the viewport size so I'm using img-responsive2 class. It appear that both the image and the text in..

8

answers

How to configure PHP to send e-mail?

I need to send mail to the users of my website using php script. I have tried using mail function in php. My code is as follows: $to = "[email protected]"; $subject = "Test mail"; $message = "My ..

35

answers

Android Material and appcompat Manifest merger failed

I have next grade dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0-rc01' implementation 'com.android.su..

31

answers

Unable to execute dex: Multiple dex files define

I know this question has been asked here a few times before. But i haven't seen any possible solution yet. Before i make the project 'Run as Android Application' , if i do not clean it, i receive the..

5

answers

Check if datetime instance falls in between other two datetime objects

I would like to know a simple algorithm to check if the given instance of datetime lies between another two instances in C#. Note: I skimmed though this How do I check if a given datetime object is &q..

6

answers

Why is the minidlna database not being refreshed?

I am developing a MiniDLNA server to stream media over WiFi. Existing files are shown properly. However, when I add new files to media folders the changes are not updated across MiniDLNA clients. I h..

10

answers

Bootstrap 3 grid with no gap

I am trying to create a 2 column grid, with literally a 50% with no margins or padding. How do I achieve this with Bootstrap 3 I tried this but end up with negative margins at tablet/desktop break p..

5

answers

What does the fpermissive flag do?

I'm just wondering what the -fpermissive flag does in the g++ compiler? I am getting: error: taking address of temporary [-fpermissive] which I can solve by giving the -fpermissive flag to the ..

5

answers

How do I write a custom init for a UIView subclass in Swift?

Say I want to init a UIView subclass with a String and an Int. How would I do this in Swift if I'm just subclassing UIView? If I just make a custom init() function but the parameters are a String and..

19

answers

How do I make an HTTP request in Swift?

I read The Programming Language Swift by Apple in iBooks, but cannot figure out how to make an HTTP request (something like cURL) in Swift. Do I need to import Obj-C classes or do I just need to impor..

26

answers

No resource found that matches the given name: attr 'android:keyboardNavigationCluster'. when updating to Support Library 26.0.0

I've got this issue while updating to the latest Support Library version 26.0.0 (https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-0): Error:(18, 21) No resource f..

5

answers

Multiplying Two Columns in SQL Server

How can I perform operations such as Multiplying and Subtracting two columns in SQL Server? Payment PK - PaymentID FK - PaymentTypeID FK - OccupiedApartmentID **- InitalPayment - MonthlyRate ..

15

answers

Why docker container exits immediately

I run a container in the background using docker run -d --name hadoop h_Service it exits quickly. But if I run in the foreground, it works fine. I checked logs using docker logs hadoop there wa..

2

answers

How to undo the last commit in git

By mistake, I did git add . and git commit in the develop branch. But luckily, I did not do git push. So I wanted to revert it back to original state. I tried git reset --soft and git reset HEAD --h..

16

answers

Gunicorn worker timeout error

I have setup gunicorn with 3 workers 30 worker connections and using eventlet worker class. It is setup behind Nginx. After every few requests, I see this in the logs. [ERROR] gunicorn.error: WORKER ..

6

answers

How to set value in @Html.TextBoxFor in Razor syntax?

I have created an text-box using Razor and trying to set value as follows. @Html.TextBoxFor(model => model.Destination, new { id = "txtPlace", value= "3" }) I have tried appending value with @ ..

2

answers

c++ boost split string

I'm using the boost::split method to split a string as this: I first make sure to include the correct header to have access to boost::split: #include <boost/algorithm/string.hpp> then: vect..

2

answers

python filter list of dictionaries based on key value

I have a list of dictionaries and each dictionary has a key of (let's say) 'type' which can have values of 'type1', 'type2', etc. My goal is to filter out these dictionaries into a list of the same di..

11

answers

Android - set TextView TextStyle programmatically?

Is there a way to set the textStyle attribute of a TextView programmatically? There doesn't appear to be a setTextStyle() method. To be clear, I am not talking about View / Widget styles! I am talkin..

20

answers

inject bean reference into a Quartz job in Spring?

I managed to configure and schedule a Quartz job using JobStoreTX persistent store in Spring. I do not use Spring's Quartz jobs, because I need to schedule them dynamically, at run time, and all exam..

9

answers

File uploading with Express 4.0: req.files undefined

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

3

answers

Add and remove multiple classes in jQuery

I'm trying to add and remove multiple classes on a text field by clicking different radio buttons. I'm not able to remove the unwanted classes while switching between different radio buttons. My code..

4

answers

Onclick on bootstrap button

Ok I'm new to bootstrap themes and all, so was trying to fire a javascript onclick method on the below bootstrap button but couldn't figure out how to do so.. <a class="btn btn-large btn-success"..

7

answers

Django optional url parameters

I have a Django URL like this: url( r'^project_config/(?P<product>\w+)/(?P<project_id>\w+)/$', 'tool.views.ProjectConfig', name='project_config' ), views.py: def ProjectCon..

3

answers

How to reference a method in javadoc?

How can I use the @link tag to link to a method? I want to change: /** * Returns the Baz object owned by the Bar object owned by Foo owned by this. * A convenience method, equivalent to getFoo().g..

8

answers

How to read lines of a file in Ruby

I was trying to use the following code to read lines from a file. But when reading a file, the contents are all in one line: line_num=0 File.open('xxx.txt').each do |line| print "#{line_num += 1} #..

6

answers

What is a callback URL in relation to an API?

I've been scouring the net, and can't seem to wrap my head around the idea of a callback URL. In my case I have a few callback URLs that I have to define myself. A popular one is a "default callback U..

6

answers

ValueError: could not convert string to float: id

I'm running the following python script: #!/usr/bin/python import os,sys from scipy import stats import numpy as np f=open('data2.txt', 'r').readlines() N=len(f)-1 for i in range(0,N): w=f[i].s..

6

answers

Get HTML code using JavaScript with a URL

I am trying to get the source code of HTML by using an XMLHttpRequest with a URL. How can I do that? I am new to programming and I am not too sure how can I do it without jQuery...

11

answers

How to split a dataframe string column into two columns?

I have a data frame with one (string) column and I'd like to split it into two (string) columns, with one column header as 'fips' and the other 'row' My dataframe df looks like this: row 0 ..

7

answers

Concatenate String in String Objective-c

I want to place a string within a string. Basically in pseudo code: "first part of string" + "(varying string)" + "third part of string" How can I do this in objective-c? Is there a way to easily c..

4

answers

PHP Convert String into Float/Double

I have list of string (size in bytes), I read those from file. Let say one of the string is 2968789218, but when I convert it to float it become 2.00. This is my code so far : $string = "2968789218"..

5

answers

HTTP Get with 204 No Content: Is that normal

Is it a normal occurrence for an HTTP GET Request to have a response with status code 204 - No Content? Like, is this semantically correct concerning what an HTTP GET is supposed to accomplish? I know..

3

answers

How to get response body using HttpURLConnection, when code other than 2xx is returned?

I have problem with retrieving Json response in case when server returns error. See details below. How I perform the request I use java.net.HttpURLConnection. I setup request properties, then I do: ..

9

answers

Download file from web in Python 3

I am creating a program that will download a .jar (java) file from a web server, by reading the URL that is specified in the .jad file of the same game/application. I'm using Python 3.2.1 I've manage..

27

answers

How to remove old and unused Docker images

When running Docker for a long time, there are a lot of images in system. How can I remove all unused Docker images at once safety to free up the storage? In addition, I also want to remove images pu..

9

answers

Changing the git user inside Visual Studio Code

The user for my git commits has changed, but I am not able to change that inside of Visual Studio Code. I changed the global settings in git, but when I want to push or sync via Visual Studio Code in..

5

answers

How to add an image to an svg container using D3.js

I've created a sample Asp.Net MVC 4 application where I've used D3.js to append an SVG element and then inside the SVG I've appended a text element (see code below). This all works fine until I try t..

12

answers

OS X Terminal shortcut: Jump to beginning/end of line

I know that I can jump to the beginning and end of a line inside the OS X terminal with Ctrl+A and Ctrl + E. But I'm so used to jumping with Cmd+Right arrow and Cmd+Left arrow from my editor, that I w..

12

answers

Gradle Build Android Project "Could not resolve all dependencies" error

I'm trying to build my first project with Gradle and I think my gradle files and settings are correct. I'm using only one module and Support V4 + AppCompatBar libraries. Project - build.gradle allp..

2

answers

HTTP post XML data in C#

I need to HTTP post XML data to a URL that has Textarea with the name of XMLdata. My XMl data is ready and is inside of XDocument Sendingxml = xml; but the post code that I have tried is not workin..

17

answers

Navigation bar with UIImage for title

I want to customize my app's look by using a logo image as the navigation bar's title, instead of plain text. When I use this code let logo = UIImage(named: "logo.png") self.navigationItem.titleView ..

14

answers

Kill a Process by Looking up the Port being used by it from a .BAT

In Windows what can look for port 8080 and try to kill the process it is using through a .BAT file?..

7

answers

How to update PATH variable permanently from Windows command line?

If I execute set PATH=%PATH%;C:\\Something\\bin from the command line (cmd.exe) and then execute echo %PATH% I see this string added to the PATH. If I close and open the command line, that new string ..

9

answers

how to evenly distribute elements in a div next to each other?

This is meant for a menu. For example I have a div element with 3 spans in it, all of which have some margin, max-width and float (left or right). It is positioned starting from the left side and goes..

9

answers

Android Volley - BasicNetwork.performRequest: Unexpected response code 400

Problem statement: I am trying to access an REST API that will return a JSON object for various HTTP status codes (400, 403, 200 etc) using Volley. For any HTTP status other than 200, it seems the '..

9

answers

Git: Cannot see new remote branch

A colleague pushed a new remote branch to origin/dev/homepage and I cannot see it when I run: $ git branch -r I still see preexisting remote branches. I assume this is because my local remote ref..

2

answers

Angular2 - TypeScript : Increment a number after timeout in AppComponent

I want to create a simple Angular2 Application using TypeScript. Seems, pretty simple, but I am not able to achieve what I wanted to. I want to show a property value in the template. And I want to up..

14

answers

Most efficient conversion of ResultSet to JSON?

The following code converts a ResultSet to a JSON string using JSONArray and JSONObject. import org.json.JSONArray; import org.json.JSONObject; import org.json.JSONException; import java.sql.SQLExce..

9

answers

How can I set / change DNS using the command-prompt at windows 8

How can I set my DNS settings using the command-prompt or bat file at windows 8 I tried this: netsh interface ip set dns name="Local Area Connection" source=static addr=none but not worked...

8

answers

How to search for a string in cell array in MATLAB?

Let's say I have the cell array strs = {'HA' 'KU' 'LA' 'MA' 'TATA'} What should I do if I want to find the index of 'KU'?..

3

answers

how to hide a vertical scroll bar when not needed

I have a textarea which is contained in a div as I have jquery hint and wanted to use opacity without changing the border. There is a visible vertical scroll bar how I only want this displayed when I ..

3

answers

CMD command to check connected USB devices

I would like to obtain by a command prompt a list of all USB devices connected to my computer (O.S. Windows 10). I've googled to find such a command, but all results seems useless to me or worse workl..

26

answers

Caesar Cipher Function in Python

I'm trying to create a simple Caesar Cipher function in Python that shifts letters based on input from the user and creates a final, new string at the end. The only problem is that the final cipher te..

4

answers

Is there something like Codecademy for Java

Does anyone know of a site like Codecademy that focuses on teaching programming with Java? (Codeacademy.com uses guided lessons in JavaScript, HTML and CSS, and Python)..

4

answers

How to get the stream key for twitch.tv

I write an app for broadcasting to twitch.tv using C++. For that streaming I need to know the user stream key, usually an user gets that key from the page, http://www.twitch.tv/user_name/dashboard/s..

2

answers

Error:attempt to apply non-function

I'm trying to run the following code in R, but I'm getting an error. I'm not sure what part of the formula is incorrect. Any help would be greatly appreciated. > censusdata_20$AGB93 = WD * exp(-1..

14

answers

How to get 30 days prior to current date?

I have a start calendar input box and an end calendar input box. We want defaults start calendar input box 30 days prior to current date and the end calendar input box to be the current date. Here is ..

3

answers

Enable PHP Apache2

I can find the php5 mod in the mods-available directory, but I'm not sure how to get it into the mods-enabled directory. Also, I just wanted to check that this is the way to enable php on my device....

4

answers

urllib2.HTTPError: HTTP Error 403: Forbidden

I am trying to automate download of historic stock data using python. The URL I am trying to open responds with a CSV file, but I am unable to open using urllib2. I have tried changing user agent as s..

5

answers

How do I format {{$timestamp}} as MM/DD/YYYY in Postman?

In Postman, the dynamic variable {{$timestamp}} inserts the current Unix Time Stamp into a request. (Represented as the number of seconds since January 1, 1970) "currentTime": "1510934784" However,..

5

answers

Text file in VBA: Open/Find Replace/SaveAs/Close File

Here is pseudocode for what I am hoping to do: Open text File Find "XXXXX" and Replace with "YYYY" Save text File As Close text file This is what I have so far Private Sub CommandButton1_Click(..

11

answers

Moment JS start and end of given month

I need to calculate a JS date given year=2014 and month=9 (September 2014). I tried this: var moment = require('moment'); var startDate = moment( year+'-'+month+'-'+01 + ' 00:00:00' ); v..

12

answers

What is the Python equivalent of Matlab's tic and toc functions?

What is the Python equivalent of Matlab's tic and toc functions?..

4

answers

Load HTML file into WebView

I have a local html page along with several other resources pointed by it (css files and Javascript libraries) that I would like to load into a WebView . How could this be achieved ? Perhaps not the ..

12

answers

Can we pass an array as parameter in any function in PHP?

I have a function to send mail to users and I want to pass one of its parameter as an array of ids. Is this possible to do? If yes, how can it be done? Suppose we have a function as: function sende..

11

answers

Why do we assign a parent reference to the child object in Java?

I am asking a quite simple question, but I am bit confused in this. Suppose I have a class Parent: public class Parent { int name; } And have another class Child: public class Child extends Pare..

2

answers

How Should I Declare Foreign Key Relationships Using Code First Entity Framework (4.1) in MVC3?

I have been searching for resources on how to declare foreign key relationships and other constraints using code first EF 4.1 without much luck. Basically I am building the data model in code and usin..

6

answers

Is it possible to start activity through adb shell?

I want to start activity through adb shell. So that I can launch a specific activity that is needed..

14

answers

How do I get a background location update every n minutes in my iOS application?

I'm looking for a way to get a background location update every n minutes in my iOS application. I'm using iOS 4.3 and the solution should work for non-jailbroken iPhones. I tried / considered follo..

4

answers

"Proxy server connection failed" in google chrome

My Google Chrome has stopped working & I don’t know why. proxy server part is unchecked & Automatically detect settings part of LAN setting is checked. But when I want to load any site on it..

13

answers

"psql: could not connect to server: Connection refused" Error when connecting to remote database

I am trying to connect to a postgres database installed in a remote server using the following command: psql -h host_ip -U db_username -d db_name This the error that occurs: psql: could not conn..

5

answers

Convert a date format in epoch

I have a string with a date format such as Jun 13 2003 23:11:52.454 UTC containing millisec... which I want to convert in epoch. Is there an utility in Java I can use to do this conversion?..

1

answers

Changing line colors with ggplot()

I don't use ggplot2 that much, but today I thought I'd give it a go on some graphs. But I can't figure out how to manually control colors in geom_line() I'm sure I'm overlooking something simple, but..

11

answers

How can I bind to the change event of a textarea in jQuery?

I want to capture if any changes happened to <textarea>. Like typing any characters (deleting,backspace) or mouse click and paste or cut. Is there a jQuery event that can trigger for all those ..

23

answers

How can I wait In Node.js (JavaScript)? l need to pause for a period of time

I'm developing a console script for personal needs. I need to be able to pause for an extended amount of time, but, from my research, Node.js has no way to stop as required. It’s getting hard to rea..

6

answers

How to enable relation view in phpmyadmin

When working in XAMPP with phpmyadmin, after creating a table I have the option to click "relation view" after clicking on the structure tab. See below: However anytime when I create a table with m..

5

answers

relative path in BAT script

Here is my own program folder on my USB drive: Program\ run.bat bin\ config.ini Iris.exe library.dll etc. I would like to use run.bat to start Iris.ex..

7

answers

How to center a component in Material-UI and make it responsive?

I don't quite understand the React Material-UI grid system. If I want to use a form component for login, what is the easiest way to center it on the screen on all devices (mobile and desktop)?..

9

answers

Node.js setting up environment specific configs to be used with everyauth

I am using node.js + express.js + everyauth.js. I have moved all my everyauth logic into a module file var login = require('./lib/everyauthLogin'); inside this I load my oAuth config file with the ..

5

answers

HTML5 Dynamically create Canvas

Hi there I have a question about dynamically creating a canvas using javascript. I create a canvas like this: var canvas = document.createElement('canvas'); canvas.id = "CursorLayer"; canvas.wid..

6

answers

How to split page into 4 equal parts?

I want to divide my page into four equal parts, each of same height and width (50-50%). I don't want to use JavaScript. I want blocks (<div>s) to be resized automatically (and relatively) if th..

5

answers

Get current date, given a timezone in PHP?

I want to get todays date given a time zone in Paul Eggert format(America/New_York) in PHP? ..

6

answers

Building a fat jar using maven

I have a code base which I want to distribute as jar. It also have dependency on external jars, which I want to bundle in the final jar. I heard that this can be done using maven-assembly-plug-in, b..

3

answers

How to reset index in a pandas dataframe?

I have a dataframe from which I remove some rows. As a result, I get a dataframe in which index is something like that: [1,5,6,10,11] and I would like to reset it to [0,1,2,3,4]. How can I do it? T..

6

answers

Hive: Filtering Data between Specified Dates when Date is a String

I'm trying to filter data between September 1st, 2010 and August 31st, 2013 in a Hive table. The column containing the date is in string format (yyyy-mm-dd). I can use month() and year() on this colum..

10

answers

How to backup Sql Database Programmatically in C#

I want to write a code to backup my Sql Server 2008 Database using C# in .Net 4 FrameWork. Can anyone help in this...

4

answers

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

21

answers

TransactionRequiredException Executing an update/delete query

Hi I am using hibernate JPA with spring and mongodb and i am running my application on Glassfish-4.0. My service class is : @Component public class Test { @PersistenceContext EntityManager e..

14

answers

Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA

I am not able to run my script in any of the browsers. Below is the error i get for firefox. The location where firefox is installed is correct. Dont know what is wrong. I am using Firefox 15. Seleni..

9

answers

VBA - Select columns using numbers?

I'm looking for an alternative to this code, but using numbers. I want to select 5 columns, the start column is a variable, and then it selects 5 columns from this. Columns("A:E").Select How do I u..

9

answers

How do I setup the InternetExplorerDriver so it works

I am using WebDriver and I have downloaded the InternetExplorerDriver and was wondering what I do with it after it is downloaded? This says to put the driver in my path. Not really certain what exact..

12

answers

JavaScript code to stop form submission

One way to stop form submission is to return false from your JavaScript function. When the submit button is clicked, a validation function is called. I have a case in form validation. If that conditi..

11

answers

How to use pip on windows behind an authenticating proxy

My computer is running windows behind a proxy on a windows server (using active directory), and I can't figure out how to get through it with pip (in python3). I have tried using --proxy, but it stil..

79

answers

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

I installed LAMP on Ubuntu 12.04 LTS (Precise Pangolin) and then set root password on phpMyAdmin. I forgot the password and now I am unable to login. When I try to change password through termina..

6

answers

SQL Server 2008- Get table constraints

Could you help me frame a query that retrieves the constraints in all the tables, the count of constraints in each table, and also display NULL for tables that do NOT have any constraints. This is wha..

9

answers

How to convert comma separated string into numeric array in javascript

I have a one-dimensional array of integer in JavaScript that I'd like to add data from comma separated string, Is there a simple way to do this? e.g : var strVale = "130,235,342,124 ";..

11

answers

How should I call 3 functions in order to execute them one after the other?

If I need call this functions one after other, $('#art1').animate({'width':'1000px'},1000); $('#art2').animate({'width':'1000px'},1000); $('#art3').animate({'width':'1000px'},1000); ..

6

answers

How to correctly represent a whitespace character

I wanted to know how to represent a whitespace character in C#. I found the empty string representation string.Empty. Is there anything like that that represents a whitespace character? I would like ..

5

answers

Locating child nodes of WebElements in selenium

I am using selenium to test my web application and I can successfully find tags using By.xpath. However now and then I need to find child nodes within that node. Example: <div id="a"> <..

7

answers

Explain why constructor inject is better than other options

In a Pro Spring 3 Book, Chapter 4 - Introduction IOC and DI in Spring - Page 59, In "Setter Injection vs. Constructor Injection" section, a paragraph says Spring included, provide a mechanism for ..

4

answers

How to get the id of the element clicked using jQuery

<div class="main_div"> <div id="inner_div"> <span id="d1" class="get_clicked">click to get id</span> </div> </div> How to get the id of the cl..

25

answers

Convert seconds into days, hours, minutes and seconds

I would like to convert a variable $uptime which is seconds, into days, hours, minutes and seconds. Example: $uptime = 1640467; Result should be: 18 days 23 hours 41 minutes ..

6

answers

HTML button onclick event

This might be a very basic question; believe me I found very hard to find the answer to this question on the internet. I have 3 HTML pages stored in my server (Tomcat locally) & i want to open t..

9

answers

how to run command "mysqladmin flush-hosts" on Amazon RDS database Server instance?

I got a database server failure, says host is blocked because of many connection errors. It ask me to unblock with 'mysqladmin flush-hosts' how and where should I run this command to our amazon rds ..

11

answers

How to read from standard input in the console?

I would like to read standard input from the command line, but my attempts have ended with the program exiting before I'm prompted for input. I'm looking for the equivalent of Console.ReadLine() in C#..

6

answers

Where does Chrome store cookies?

Let's say I set a cookie using the setcookie() function in PHP: setcookie('name','foo',false,'/',false); I can see it in: chrome://settings/cookies However, I can not find the actual file store..

7

answers

What is the difference between a string and a byte string?

I am working with a library which returns a byte string and I need to convert this to a string. Although I'm not sure what the difference is - if any. ..

10

answers

How do you create a Swift Date object?

How do you create a date object from a date in swift xcode. eg in javascript you would do: var day = new Date('2014-05-20');..

6

answers

How to send a simple email from a Windows batch file?

I'm running Windows 2003 Service Pack 2. I have a batch file that runs on demand. I want to have an email sent every time the batch file runs. The email is simple, just a sentence indicating that the ..

11

answers

Simple PHP calculator

I'm creating a basic PHP calculator that lets you enter two values and chose your operator then displays the answer. Everything is working fine except it's not outputting the answer to the browser. H..

10

answers

What are the most-used vim commands/keypresses?

I'm a Ruby programming trying to switch from Textmate to MacVim, and I'm having trouble wading through the gargantuan lists of things you can do in VIM and all of the keypresses for them. I'm tired of..

3

answers

What are the differences between Pandas and NumPy+SciPy in Python?

They both seem exceedingly similar and I'm curious as to which package would be more beneficial for financial data analysis. ..

9

answers

Spring Boot REST API - request timeout?

I have a Spring Boot REST service that sometimes call third party services as a part of a request. I would like to set a timeout on all my resources (let's say 5 seconds), so that if any request handl..

12

answers

CodeIgniter - how to catch DB errors?

Is there a way to make CI throw an exception when it encounters a DB error instead of displaying a message like: A Database Error Occurred Error Number: 1054 Unknown column 'foo' in '..

18

answers

How to get the current logged in user Id in ASP.NET Core

I've done this before with MVC5 using User.Identity.GetUserId() but that doesn't seem to work here. The User.Identity doesnt have the GetUserId() method I am using Microsoft.AspNet.Identity..

14

answers

Using the HTML5 "required" attribute for a group of checkboxes?

When using the newer browsers that support HTML5 (FireFox 4 for example); and a form field has the attribute required='required'; and the form field is empty/blank; and the submit button is clicked; t..

3

answers

R programming: How do I get Euler's number?

For example, how would I go about entering the value e^2 in R?..

16

answers

Python Anaconda - How to Safely Uninstall

I installed Python Anaconda on Mac (OS Mavericks). I wanted to revert to the default version of Python on my Mac. What's the best way to do this? Should I delete the ~/anaconda directory? Any other ch..

16

answers

How to truncate the time on a DateTime object in Python?

What is a classy way to way truncate a python datetime object? In this particular case, to the day. So basically setting hour, minute, seconds, and microseconds to 0. I would like the output to als..

5

answers

Getting value of HTML text input

Say I have an HTML form like this to collect an email from a website visitor: <form name="input" action="handle_email.php" method="post"> Email: <input type="text" name="email" /> <inp..

2

answers

cannot be cast to java.lang.Comparable

import java.util.HashMap; import java.io.*; import java.util.*; public class Fegan implements Comparable{ HashMap<String, Integer> cart = new HashMap<String, Integer>(); List list = new Ar..

7

answers

when I try to open an HTML file through `http://localhost/xampp/htdocs/index.html` it says unable to connect to localhost

I have installed XAMPP , there is a htdocs folder and inside it index.html file , when I try to open it in my browser through http://localhost/xampp/htdocs/index.html it says unable to connect to l..

4

answers

How to use bitmask?

How do i use it in C++ ? when is it useful to use ? Please give me an example of a problem where bitmask is used , how it actually works . Thanks!..

9

answers

Table scroll with HTML and CSS

I have a table like that which i fill with a data <table id="products-table" style="overflow-y:scroll" > <thead> <tr> <th>Product (Parent Product)<..

4

answers

Python convert tuple to string

I have a tuple of characters like such: ('a', 'b', 'c', 'd', 'g', 'x', 'r', 'e') How do I convert it to a string so that it is like: 'abcdgxre' ..

3

answers

How to connect with Java into Active Directory

I am using Weblogic, Ejb3.0. Java 1.6 I need to access Active Directory via Java code. I read about several ways (Kerberos, LDAP) Anyone could advice me on comfortable way of doing so? where could I..

6

answers

Selecting Multiple Values from a Dropdown List in Google Spreadsheet

The Google Spreadsheet looks like can only select one value in the dropdown list. Is there any way to select multiple values from a dropdown list in google spreadsheet?..

5

answers

Summarizing multiple columns with dplyr?

I'm struggling a bit with the dplyr-syntax. I have a data frame with different variables and one grouping variable. Now I want to calculate the mean for each column within each group, using dplyr in R..

5

answers

How to make clang compile to llvm IR

I want clang to compile my C/C++ code to LLVM bytecode rather than binary executable. How can I achieve that? And if I get the LLVM bytecode, how can I take it to further compile it to binary executab..

14

answers

Create an ArrayList of unique values

I have an ArrayList with values taken from a file (many lines, this is just an extract): 20/03/2013 23:31:46 6870 6810 6800 6720 6860 6670 6700 6650 6750 6830 34864 34..

2

answers

a = open("file", "r"); a.readline() output without \n

I am about to write a python script, that is able to read a txt file, but with readline() there is always the \n output. How can i remove this from the variable ? a = open("file", "r") b = a.readlin..

5

answers

Match linebreaks - \n or \r\n?

While writing this answer, I had to match exclusively on linebreaks instead of using the s-flag (dotall - dot matches linebreaks). The sites usually used to test regular expressions behave differen..

16

answers

`node-pre-gyp install --fallback-to-build` failed during MeanJS installation on OSX

I just bought myself a mac book after using Windows for a long time. I was trying to work on a MeanJS project that I had been working on. Doing npm install on the project throws error Failed to exe..

6

answers

Google Spreadsheet, Count IF contains a string

I have a column like this: What devices will you be using? iPad Kindle & iPad No Tablet iPad iPad & Windows How do I count the amount of people that said iPad? This formula does work fo..

9

answers

How to use a jQuery plugin inside Vue

I'm building a web application inside VueJS but I encounter a problem. I want to use a jQuery extension (cropit to be specific) but I don't know how to instantiate/require/import it the right way with..

9

answers

How to use/install gcc on Mac OS X 10.8 / Xcode 4.4

I have install Mountain Lion (Mac OS X 10.8) and now gcc doesn't seem to be available anymore. I've also installed Xcode 4.4 so there is no more /Developer directory. I need gcc both for mac ports a..

6

answers

How to change css property using javascript

I want to change css property of class using javascript. What i actually want is when a div is hoverd, another div should become visible. My css is like.. .left, .right{ margin:10px; float:l..

7

answers

How to properly use the "choices" field option in Django

I'm reading the tutorial here: https://docs.djangoproject.com/en/1.5/ref/models/fields/#choices and i'm trying to create a box where the user can select the month he was born in. What I tried was MO..

5

answers

CSS performance relative to translateZ(0)

A number of blogs have expressed the performance gain in 'tricking' the GPU to think that an element is 3D by using transform: translateZ(0) to speed up animations and transitions. I was wondering if ..

2

answers

Initialize value of 'var' in C# to null

I want to assign a variable to an initial value of null, and assign its value in the next if-else block, but the compiler is giving an error, Implicitly-typed local variables must be initialized. ..

3

answers

JQuery window scrolling event?

I have an ad in my header and a fixed ad at the bottom of my page that is always there. I want the fixed ad to appear only if the user has scrolled under the header ad. I looked into the JQuery docume..

11

answers

What does $ mean before a string?

I was going to use verbatim string but i mistakenly typed $ instead of @. But the Compiler didn't give me any Error and Compiled successfully. I want to know what it is and what it does. I searched ..

6

answers

Facebook how to check if user has liked page and show content?

I am trying to create a Facebook iFrame app. The app should first show an image and if the user likes the page, he will get access to some content. I use RoR, therefore I can't use the Facebook PhP S..

12

answers

LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1

LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1 I know "52e" code is when username is valid, but password is invalid. I am using the ..

15

answers

Javascript "Not a Constructor" Exception while creating objects

I am defining an object like this: function Project(Attributes, ProjectWidth, ProjectHeight) { this.ProjectHeight = ProjectHeight; this.ProjectWidth = ProjectWidth; this.ProjectScale = th..

15

answers

How do I read a large csv file with pandas?

I am trying to read a large csv file (aprox. 6 GB) in pandas and i am getting a memory error: MemoryError Traceback (most recent call last) <ipython-input-58-67a72687..

9

answers

Transaction marked as rollback only: How do I find the cause

I am having issues with committing a transaction within my @Transactional method: methodA() { methodB() } @Transactional methodB() { ... em.persist(); ... em.flush(); log("OK..

9

answers

How to set $_GET variable

How do i set the variable that the $_GET function will be able to use, w/o submitting a form with action = GET?..

18

answers

jquery disable form submit on enter

I have the following javascript in my page which does not seem to be working. $('form').bind("keypress", function(e) { if (e.keyCode == 13) { e.preventDefault(); return false..

8

answers

Load resources from relative path using local html in uiwebview

I have a very simple iOS app with a uiwebview loading a very simple test page (test.html): <html> <body> <img src="img/myimage.png" /> </body> </html> I load this test..

8

answers

nginx server_name wildcard or catch-all

I have an instance of nginx running which serves several websites. The first is a status message on the server's IP address. The second is an admin console on admin.domain.com. These work great. Now I..

4

answers

jQuery ajax request being block because Cross-Origin

How to get content from remote url via ajax? jQuery ajax request being block because Cross-Origin Console Log Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote ..

4

answers

Convert String to Type in C#

If I receive a string that contains the name of a class and I want to convert this string to a real type (the one in the string), how can I do this? I tried Type.GetType("System.Int32") for exampl..

22

answers

How to serialize an Object into a list of URL query parameters?

Without knowing the keys of a JavaScript Object, how can I turn something like... var obj = { param1: 'something', param2: 'somethingelse', param3: 'another' } obj[param4] = 'yetanother'; ..

10

answers

Simplest way to throw an error/exception with a custom message in Swift 2?

I want to do something in Swift 2 that I'm used to doing in multiple other languages: throw a runtime exception with a custom message. For example (in Java): throw new RuntimeException("A custom me..

10

answers

pdftk compression option

I use pdftk to compress a pdf using the following command line pdftk file1.pdf output file2.pdf compress It works as the weight of my file decreased. Are there [options] to change the compression..

12

answers

Functional style of Java 8's Optional.ifPresent and if-not-Present?

In Java 8, I want to do something to an Optional object if it is present, and do another thing if it is not present. if (opt.isPresent()) { System.out.println("found"); } else { System.out.printl..

29

answers

Invalidating JSON Web Tokens

For a new node.js project I'm working on, I'm thinking about switching over from a cookie based session approach (by this, I mean, storing an id to a key-value store containing user sessions in a user..

4

answers

how to create a cookie and add to http response from inside my service layer?

I am creating a custom authentication service in my spring mvc application: @Service public class AuthenticationServiceImpl implements AuthenticationService { @Autowired UserService userServic..

8

answers

Align text in a table header

It seems align is not working for the th element. Here is my HTML: _x000D_ _x000D_ <div style="width: 100%; height: 175px; overflow: auto;">_x000D_ <table class="grid" id="table">_x000D..

6

answers

Spring,Request method 'POST' not supported

First of all say apology to ask this repeated Question.. Actually in my spring Application i have user.jsp and professional.jsp here is my User.jsp: <form:form action="profile/user" modelAttri..

8

answers

What are the options for (keyup) in Angular2?

The following works great when the enter key is released. What other options are available for the keyup in addition to keyup.enter? <input #inputstring (keyup.enter)="doSomething(inputstring.valu..

12

answers

Removing Java 8 JDK from Mac

So I installed the beta of JDK 8 a while ago to look at some of the examples. I thought for sure by now, it's easy to change between versions. Doing some Play development with IntelliJ. For some rea..

2

answers

Can you blur the content beneath/behind a div?

I'm creating a new web design in Photoshop at the moment, but I'd like to know if it's possible to blur the content beneath a div? I'd like to create a half transparent nav bar on my page that's fixe..

2

answers

How to make a variable accessible outside a function?

I am fetching data from a json file using $.getJSON to get an id of a character and then use $.getJSON to fetch it from another page using the id that I go previously. However, in the console it says..

6

answers

Insert NULL value into INT column

How can I insert NULL value into INT column with MySQL? Is it possible?..

8

answers

How to call webmethod in Asp.net C#

I want to call a web method in asp.net c# application using the following code Jquery: jQuery.ajax({ url: 'AddToCart.aspx/AddTo_Cart', type: "POST", data: "{'quantity' : " + total_qty + ..

3

answers

Determine if JavaScript value is an "integer"?

Possible Duplicate: Check if a variable contains a numerical value in Javascript? How do I check if variable is an integer in jQuery? Example: if (id == int) { // Do this } Im using th..

7

answers

How to hide command output in Bash

I want to make my Bash scripts more elegant for the end user. How do I hide the output when Bash is executing commands? For example, when Bash executes yum install nano The following will show up ..

9

answers

Pentaho Data Integration SQL connection

I am using Pentaho Data Integration and I am trying to connect to my database via MySQL but when I do I get this error..... Error connecting to database [devdb2] : org.pentaho.di.core.exception.Kettl..

9

answers

Accessing items in an collections.OrderedDict by index

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

4

answers

How does Java deal with multiple conditions inside a single IF statement

Lets say I have this: if(bool1 && bool2 && bool3) { ... } Now. Is Java smart enough to skip checking bool2 and bool2 if bool1 was evaluated to false? Does java even check them from ..

7

answers

SHA-256 or MD5 for file integrity

I know that SHA-256 is favored over MD5 for security, etc., but, if I am to use a method to only check file integrity (that is, nothing to do with password encryption, etc.), is there any advantage of..

14

answers

Regex Match all characters between two strings

Example: "This is just\na simple sentence". I want to match every character between "This is" and "sentence". Line breaks should be ignored. I can't figure out the correct syntax...

1

answers

How can I generate a self-signed certificate with SubjectAltName using OpenSSL?

I am trying to generate a self-signed certificate with OpenSSL with SubjectAltName in it.While I am generating the csr for the certificate, my guess is I have to use v3 extensions of OpenSSL x509. I a..

4

answers

Filter rows which contain a certain string

I have to filter a data frame using as criterion those row in which is contained the string RTB. I'm using dplyr. d.del <- df %>% group_by(TrackingPixel) %>% summarise(MonthDelivery = as...

24

answers

Gradle Error:Execution failed for task ':app:processDebugGoogleServices'

I am following this link to integrate Google sign-in in my android app.https://developers.google.com/identity/sign-in/android/start-integrating As given in last step on the above given page we have t..

3

answers

Table border left and bottom

I need to create border as per the below example. HTML: <table width="770"> <tr> <td>picture (border only to the left and bottom ) </td> <td>text</td>..

16

answers

How can I set the default timezone in node.js?

How do I set the default timezone in node.js? ..

11

answers

Required maven dependencies for Apache POI to work

I want to use Apache POI library to parse excel files (old versions and newer versions of excel). So I was wondering what jars do i need to include from the Apache POI because in following link: http..

5

answers

java howto ArrayList push, pop, shift, and unshift

I've determined that a Java ArrayList.add is similar to a JavaScript Array.push I'm stuck on finding ArrayList functions similar to the following Array.pop Array.shift Array.unshift I'm leaning tow..

4

answers

Select from one table matching criteria in another?

I'd really appreciate some help with an SQL query across tables. I realise this sort of thing is asked constantly, but I can't find a similar enough question to make sense of the answers. I want to s..

1

answers

How can I get a List from some class properties with Java 8 Stream?

I have a List<Person>. I need to get a List from a property of Person. For example, I have a Person class: class Person { private String name; private String birthDate; public Stri..

9

answers

How to find NSDocumentDirectory in Swift?

I'm trying to get path to Documents folder with code: var documentsPath = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory:0,NSSearchPathDomainMask:0,true) but Xcode gives error: Cannot co..

3

answers

Appending to list in Python dictionary

Is there a more elegant way to write this code? What I am doing: I have keys and dates. There can be a number of dates assigned to a key and so I am creating a dictionary of lists of dates to repres..

3

answers

Dropdown using javascript onchange

I have a simple drop down and I want to have it so that if the user selects Have a Baby the message changes to Have a Baby, but for any other selection. The message stays the same (nothing), but this..

5

answers

Extract Month and Year From Date in R

I have tried a number of methods to no avail. I have data in terms of a date (YYYY-MM-DD) and am trying to get in terms of just the month and year, such as: MM-YYYY or YYYY-MM. Ultimately, I would li..

13

answers

When to use single quotes, double quotes, and backticks in MySQL

I am trying to learn the best way to write queries. I also understand the importance of being consistent. Until now, I have randomly used single quotes, double quotes, and backticks without any real t..

4

answers

HTTP Error 401.2 - Unauthorized You are not authorized to view this page due to invalid authentication headers

i want to allow access to Anonymous.aspx page to all user, i have set Basic Authentication to Enabled, and Connect as to specific user. my problem is when trying to access http://MyIPAddress/MyAlias/..

11

answers

jQuery's jquery-1.10.2.min.map is triggering a 404 (Not Found)

I'm seeing error messages about a file, min.map, being not found: GET jQuery's jquery-1.10.2.min.map is triggering a 404 (Not Found) Screenshot Where is this coming from?..

15

answers

Android Studio rendering problems

I'm using Android Studio 0.2.3 and when opened an activity layout normally, the preview should appear on the right side, so that I can switch between Text and Design mode, which should again show the ..

13

answers

Cosine Similarity between 2 Number Lists

I need to calculate the cosine similarity between two lists, let's say for example list 1 which is dataSetI and list 2 which is dataSetII. I cannot use anything such as numpy or a statistics module. I..

19

answers

How to convert an entire MySQL database characterset and collation to UTF-8?

How can I convert entire MySQL database character-set to UTF-8 and collation to UTF-8?..

2

answers

How to add a new column to an existing sheet and name it?

Suppose I have the worksheet below: Empid EmpName Sal 1 david 100 2 jhon 200 3 steve 300 How can I insert a new column named "Loc"? Empid EmpName Loc Sal 1 ..

5

answers

Difference between _self, _top, and _parent in the anchor tag target attribute

I know _blank opens a new tab when used with the anchor tag and also, there are self-defined targets I use when using framesets but I will like to know the difference between _parent, _self and _top...

10

answers

How do I configure different environments in Angular.js?

How do you manage configuration variables/constants for different environments? This could be an example: My rest API is reachable on localhost:7080/myapi/, but my friend that works on the same co..

7

answers

Converting VS2012 Solution to VS2010

I'm working in VB project with VS 2012 and after finish I try to add setup project. I didn't find it (because the Setup Project was discontinued after VS2010) so I switched to VS2010 but the problem..

6

answers

Update Top 1 record in table sql server

My Query UPDATE TOP (1) TX_Master_PCBA SET TIMESTAMP2 = '2013-12-12 15:40:31.593' WHERE SERIAL_NO IN ('0500030309') ORDER BY TIMESTAMP2 DESC with serial_No Column in TX_Master_PCBA table i hav..

8

answers

How do I export html table data as .csv file?

I have a table of data in an html table on a website and need to know how to export that data as .csv file. How would this be done?..

12

answers

Is there a wikipedia API just for retrieve content summary?

I need just to retrieve first paragraph of a Wikipedia page. Content must be html formated, ready to be displayed on my website (so NO BBCODE, or WIKIPEDIA special CODE!)..

6

answers

How to obtain the location of cacerts of the default java installation?

I am looking on how how to obtain the location of cacerts of the default java installation, when you do not have JAVA_HOME or JRE_HOME defined. I need a solution that works at least for OS X and Linu..

9

answers

Remove last characters from a string in C#. An elegant way?

I have a numeric string like this 2223,00. I would like to transform it to 2223. This is: without the information after the ",". Assume that there will be only two decimals after the ",". I did: st..

10

answers

Android fade in and fade out with ImageView

I'm having some troubles with a slideshow I'm building. I've created 2 animations in xml for fade in and fade out: fadein.xml <?xml version="1.0" encoding="UTF-8"?> <set xmlns:a..

16

answers

HAProxy redirecting http to https (ssl)

I'm using HAProxy for load balancing and only want my site to support https. Thus, I'd like to redirect all requests on port 80 to port 443. How would I do this? Edit: We'd like to redirect to the ..

33

answers

Angular2 QuickStart npm start is not working correctly

I know Angular2 beta has just been released but I can't reproduce the steps from their official site tutorial ( https://angular.io/guide/quickstart ). Maybe someone has had similar issues and knows ..

7

answers

raw_input function in Python

What is the raw_input function? Is it a user interface? When do we use it?..

7

answers

Pandas: sum DataFrame rows for given columns

I have the following DataFrame: In [1]: import pandas as pd df = pd.DataFrame({'a': [1,2,3], 'b': [2,3,4], 'c':['dd','ee','ff'], 'd':[5,9,1]}) df Out [1]: a b c d 0 1 2 dd 5 1 2 3 ee ..

10

answers

Angular2 module has no exported member

For a website with authentication in Angular2, I want to use a component of the authentication submodule in the main app component. However, I keep getting the following error: app/app.component.ts(..

6

answers

Using the "animated circle" in an ImageView while loading stuff

I am currently using in my application a listview that need maybe one second to be displayed. What I currently do is using the @id/android:empty property of the listview to create a "loading" text. ..

8

answers

How can I add private key to the distribution certificate?

Well, I've got my Developer Certificate linked with it's private key. Works Fine. I've downloaded my iOS Profile of distributor, but it says Valid signing identity not found. So I checked my certifi..

6

answers

jQuery get the image src

I hope when I click the button, I can get the specific img src and show the img src in the div class img-block block. HTML <button class="button">Click</button> <div class="img1"> ..

33

answers

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

I included these in the Build Path: all Spring libs Apache Tomcat 7.0 library The project still fails during startup: SEVERE: Error configuring application listener of class org.springframework.w..

4

answers

Background service with location listener in android

I am creating a background service that will run in its own process. It should allow me to listen if the device location has changed. I should be able to change criteria like the distance moved befor..

16

answers

Working Copy Locked

I'm developing a web using subversion as version control, but got "working directory locked" error message Here's the story: I have PC-A: Windows XP Pro VisualSVN 2.5.2 Tortoise SVN 1.7.3 PC-..

4

answers

Javascript decoding html entities

Possible Duplicate: How to decode HTML entities using jQuery? I want to convert this text: "&lt;p&gt;name&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:xx-small;"..

8

answers

How to change default format at created_at and updated_at value laravel

I am new in Laravel. I am creating a application with laravel. When i creating a post then the values of "created_at" and 'updated_at" are look like this: 2014-06-26 04:07:31 2014-06-26 04:07:31 Bu..

8

answers

Is there a Mutex in Java?

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

3

answers

javascript object max size limit

I'm trying to pass a JavaScript variable to the server-side using jquery.ajax method. I'm trying to create a json string, but when the length of variable reaches 10000, no more data is appended to th..

13

answers

What is an optional value in Swift?

From Apple's documentation: You can use if and let together to work with values that might be missing. These values are represented as optionals. An optional value either contains a value or conta..

5

answers

How to pass data using NotificationCenter in swift 3.0 and NSNotificationCenter in swift 2.0?

I'm implementing socket.io in my swift ios app. Currently on several panels I'm listening to the server and wait for incoming messages. I'm doing so by calling the getChatMessage function in each pa..

6

answers

Shortcut key for commenting out lines of Python code in Spyder

I recently changed from the Enthought Canopy Python distribution to Anaconda, which includes the Spyder IDE. In Canopy's code editor, it was possible to comment and uncomment lines of code by pressin..

8

answers

How to clean up R memory (without the need to restart my PC)?

I am running my code in R (under Windows) which involves a lot of in-memory data. I tried to use rm(list=ls()) to clean up memory, but seems the memory is still occupied and I cannot rerun my code. I ..

7

answers

Numpy ValueError: setting an array element with a sequence. This message may appear without the existing of a sequence?

Why do I get this error message? ValueError: setting an array element with a sequence. Thank you Z=np.array([1.0,1.0,1.0,1.0]) def func(TempLake,Z): A=TempLake B=Z return A*B Nlayers=..

6

answers

Adding maven nexus repo to my pom.xml

I have installed nexus on my local machine. I want my pom file to point to this repo. How can I add my custom repository to my pom.xml file? ..

7

answers

Https to http redirect using htaccess

I'm trying to redirect https://www.example.com to http://www.example.com. I tried the following code in the .htaccess file RewriteEngine On RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule ^(..

6

answers

http post - how to send Authorization header?

How do you add headers to your http request in Angular2 RC6? I got following code: login(login: String, password: String): Observable<boolean> { console.log(login); console.log(password..

11

answers

How to save a dictionary to a file?

I have problem with changing a dict value and saving the dict to a text file (the format must be same), I only want to change the member_phone field. My text file is the following format: memberID:m..

3

answers

How to display raw JSON data on a HTML page

Possible Duplicate: JSON pretty print using JavaScript I'd like to display my raw JSON data on a HTML page just as JSONview does. For example, my raw json data is: { "hey":"guy", "..

2

answers

Creating an empty bitmap and drawing though canvas in Android

I'd like to create an empty bitmap and set a canvas to that bitmap and then draw any shape on the bitmap...

4

answers

How to use If Statement in Where Clause in SQL?

I need to use if statement inside where clause in sql. Select * from Customer WHERE ([email protected] OR @ISClose is NULL) AND (C.FirstName like '%'[email protected]+'%' or @ClientName is NULL ) ..

6

answers

How to print the current time in a Batch-File?

I need to print time in a batch file but command prompt tells me that the syntax is incorrect. Here is the code i have so far: @echo %time% ping -n 1 -w 1 127.0.0.1 1>nul @echo %time% pause cls ..

8

answers

How to append to the end of an empty list?

I have a list: list1=[] the length of the list is undetermined so I am trying to append objects to the end of list1 like such: for i in range(0, n): list1=list1.append([i]) But my output ke..

7

answers

How to sort the letters in a string alphabetically in Python

Is there an easy way to sort the letters in a string alphabetically in Python? So for: a = 'ZENOVW' I would like to return: 'ENOVWZ' ..

4

answers

Proper use of errors

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

8

answers

Android: How to change the ActionBar "Home" Icon to be something other than the app icon?

My application's main icon consists of two parts in one image: a logo and a few letters below it. This works well for the launcher icon for the app, but when the icon appears on the left edge of the A..

4

answers

How to pass parameters to $http in angularjs?

Assume that I have two input boxes with corresponding ng-model as fname and lname. If I call http request as : $http({method:'GET', url:'/search', params:{fname: fname, lname: lname}}) will it call..

12

answers

How to remove text from a string?

I've got a data-123 string. How can I remove data- from the string while leaving the 123?..

9

answers

SimpleDateFormat returns 24-hour date: how to get 12-hour date?

I want current time in millis and then to store it in 12 hour format but with this piece of code I am getting 24 hour format time. long timeInMillis = System.currentTimeMillis(); Calendar cal1 = Cale..

6

answers

How do I increase memory on Tomcat 7 when running as a Windows Service?

I am trying to run Tomcat 7 as a Windows Service (XP and Windows 7). I see places to set the -Xmx and -Xms jvm args in catalina.bat, but I'm not sure how to do it when using $CATALINA_HOME/bin/servic..

7

answers

Pip freeze vs. pip list

A comparison of outputs reveals differences: [email protected]:~$ pip list feedparser (5.1.3) pip (1.4.1) setuptools (1.1.5) wsgiref (0.1.2) [email protected]:~$ pip freeze feedparser==5.1.3 ws..

3

answers

Example of waitpid() in use?

I know that waitpid() is used to wait for a process to finish, but how would one use it exactly? Here what I want to do is, create two children and wait for the first child to finish, then kill the s..

1

answers

Parameter binding on left joins with array in Laravel Query Builder

I trying to do a left join with where IN clause search. But I couldn't able to bind the array to the query. $query = DB::table('offers'); $query->select('id', 'business_id', 'address_id',..

5

answers

Parsing JSON Array within JSON Object

I have some JSON with the following structure: {"source":[ {"name":"john","age":20}, {"name":"michael","age":25}, {"name":"sara", "age":23} ] } I have name..

7

answers

How to convert string values from a dictionary, into int/float datatypes?

I have a list of dictionaries as follows: list = [ { 'a':'1' , 'b':'2' , 'c':'3' }, { 'd':'4' , 'e':'5' , 'f':'6' } ] How do I convert the values of each dictionary inside the list to int/float? S..

4

answers

Cannot execute RUN mkdir in a Dockerfile

This is an error message I get when building a Docker image: Step 18 : RUN mkdir /var/www/app && chown luqo33:www-data /var/www/app ---> Running in 7b5854406120 mkdir: cannot create directo..

8

answers

Pandas count(distinct) equivalent

I am using pandas as a db substitute as I have multiple databases (oracle, mssql, etc) and I am unable to make a sequence of commands to a SQL equivalent. I have a table loaded in a DataFrame with so..

17

answers

Remove all unused resources from an android project

I want to remove all unused layouts, strings, drawables, colors, etc from my Android res directory. Are there any tools that will give me a list of files and I can remove from my repository and elemen..

8

answers

Android - get children inside a View?

Given a View how can I get the child views inside it? So I have a custom View and debugger shows that under mChildren there are 7 other views. I need a way to access these views but it doesn't seem l..

21

answers

Facebook Android Generate Key Hash

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

4

answers

How to identify a strong vs weak relationship on ERD?

A dashed line means that the relationship is strong, whereas a solid line means that the relationship is weak. On the following diagram how do we decide that the relationship between the Room and Clas..

31

answers

ImportError: numpy.core.multiarray failed to import

I'm trying to run this program import cv2 import time cv.NamedWindow("camera", 1) capture = cv.CaptureFromCAM(0) while True: img = cv.QueryFrame(capture) cv.ShowImage("camera..

7

answers

sqlite3.OperationalError: unable to open database file

I get this error when setting up a server in Django. It is sqlite3 which means it should create the .db file but it doesn't seem to be doing so. I've stipulated SQLite as the backend and an absolute f..

7

answers

java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to com.testing.models.Account

I'm getting below error: java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to com.testing.models.Account with below code final int expectedId = 1; Test newTest = create(); int..

5

answers

Vertical and horizontal align (middle and center) with CSS

I am practicing CSS and I am so confused about how can I force my div element to be center (vertically and horizontally) at my page (mean which way or ways for cross browser compatibility)? Best rega..

4

answers

Java Programming: call an exe from Java and passing parameters

I'm figuring out a mechanism to call an exe from Java and passing in specific parameters. How can I do? Process process = new ProcessBuilder("C:\\PathToExe\\MyExe.exe").start(); InputStream is = proc..

5

answers

How can I get argv[] as int?

i have a piece of code like this: int main (int argc, char *argv[]) { printf("%d\t",(int)argv[1]); printf("%s\t",(int)argv[1]); } and in shell i do this: ./test 7 but the first printf res..

13

answers

How to convert text to binary code in JavaScript?

Text to Binary Code I want JavaScript to translate text in a textarea into binary code. For example, if a user types in "TEST" into the textarea, the value "01010100 01000101 01010011 0..

9

answers

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

3

answers

Why my regexp for hyphenated words doesn't work?

I'm writting a regular expression for match with simple words and single hyphenated words using re module of python, so for example in: test_case_input = """the wide-field infrared survey explorer is..

15

answers

How to set 'X-Frame-Options' on iframe?

If I create an iframe like this: var dialog = $('<div id="' + dialogId + '" align="center"><iframe id="' + frameId + '" src="' + url + '" width="100%" frameborder="0" height="'+frameHeightF..

5

answers

Check if item is in an array / list

If I've got an array of strings, can I check to see if a string is in the array without doing a for loop? Specifically, I'm looking for a way to do it within an if statement, so something like this: ..

5

answers

How to get HttpClient returning status code and response body?

I am trying to get Apache HttpClient to fire an HTTP request, and then display the HTTP response code (200, 404, 500, etc.) as well as the HTTP response body (text string). It is important to note tha..

7

answers

How to drop rows from pandas data frame that contains a particular string in a particular column?

I have a very large data frame in python and I want to drop all rows that have a particular string inside a particular column. For example, I want to drop all rows which have the string "XYZ" as a su..

4

answers

Syntax error "syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError)"

I can't run my Rspec user_spec.rb test due to a syntax error. Too many "end" perhaps in 2 different files? I've added and deleted 'end' in certain places without success. Syntax error "syntax error,..

8

answers

Importing a long list of constants to a Python file

In Python, is there an analogue of the C preprocessor statement such as?: #define MY_CONSTANT 50 Also, I have a large list of constants I'd like to import to several classes. Is there an analogue of..

8

answers

How to move an element down a litte bit in html

That sounds weird I know, but I am having trouble getting a piece of text to move down a tiny bit so it's centered on the tab it's on. here's what it looks like: I want buy to be centered vertica..

20

answers

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

20

answers

Laravel PHP Command Not Found

I have installed Laravel using composer without problems, but when I try to execute "laravel" in my terminal I have this typical error: -bash: laravel: command not found If I read the documentat..

14

answers

Failed to resolve: com.google.android.gms:play-services in IntelliJ Idea with gradle

I'm trying to add google play services to my libGDX project in IntelliJ Idea. I've followed the setup guide here: https://developers.google.com/android/guides/setup which looks pretty straightforward..

4

answers

jQuery: outer html()

imagine what we have something like this: <div id="xxx"><p>Hello World</p></div> if we call .html function in this way: $("#xxx").html(); we will get: <p>Hello Wor..

9

answers

Using a Python subprocess call to invoke a Python script

I have a Python script that needs to invoke another Python script in the same directory. I did this: from subprocess import call call('somescript.py') I get the following error: call('somescript.p..

12

answers

How to position two elements side by side using CSS

I want to position a paragraph to the right of an <iframe> of a Google map. I do not know how to show my code, so here is a screenshot of what I want: ..

11

answers

How to override Bootstrap's Panel heading background color?

I'm using a Panel from Bootstrap however for the heading I want to use my own background color for the heading. When I don't put panel-heading class for the div, the layout gets screwed. So I thought ..

1

answers

URL format with GET parameters?

Is there a specification somewhere listing the correct way to pass GET variables to a URL? Normally I do it like this (first variable indicated by ?, second and subsequent indicated by &: http:/..

13

answers

Laravel use same form for create and edit

Am quite new to Laravel and I have to create a form for create and a form for edit. In my form I have quite some jquery ajax posts. Am wondering whether Laravel does provide for an easy way for me to ..

6

answers

How to select current date in Hive SQL

How do we get the current system date in Hive? In MySQL we have select now(), can any one please help me to get the query results. I am very new to Hive, is there a proper documentation for Hive that ..

3

answers

How to start color picker on Mac OS?

I am a complete newbie at Mac. It so happened that now I'm working on it. I have an weird issue - I can't find how to start default Color Picker?..

8

answers

How to get just the responsive grid from Bootstrap 3?

I need to add responsive design features to my web application using Twitter Bootstrap. I just want the responsive behavior, I'm not interested in the typography, components or any other stuff include..

7

answers

Bash loop ping successful

I'm thinking that this needs to be changed to a while clause, at the moment it'll wait till all 10000 pings are done, I need it to return when the ping is successful. The program "say" is on OSX it ma..

8

answers

How to get numeric position of alphabets in java?

How to get numeric position of alphabets in java ? Suppose through command prompt i have entered abc then as a output i need to get 123 how can i get the numeric position of alphabets in java? Thank..

18

answers

How to make <a href=""> link look like a button?

I have this button image: I was wondering whether it would be possible to make a simple <a href="">some words</a> and style that link to appear as that button? If it is possible, how do..

3

answers

Python setup.py develop vs install

Two options in setup.py develop and install are confusing me. According to this site, using develop creates a special link to site-packages directory. People have suggested that I use python setup.py..

7

answers

Gridview get Checkbox.Checked value

I have a GridView that has 10 columns populated by CheckBoxes. But instead of using FindControl() is there a way to get the CheckBox.Checked value by using a loop? Current Code: if (e.CommandName ==..

4

answers

SELECT CONVERT(VARCHAR(10), GETDATE(), 110) what is the meaning of 110 here?

When we convert or cast date in sql, see below sql code SELECT CONVERT(VARCHAR(10), GETDATE(), 110) AS [MM-DD-YYYY] it works fine, I just want to know the meaning of 110 in above code. what it doe..

3

answers

How to run an application as "run as administrator" from the command prompt?

I have a batch file called test.bat. I am calling the below instructions in the test.bat file: start /min powershell.exe %sysdrive%\testScripts\testscript1.ps1 When I run this through the command p..

3

answers

Getting "The remote certificate is invalid according to the validation procedure" when SMTP server has a valid certificate

This seems a common error but while I've found a work-around (see below) I can't pin down the reason I'm getting it in the first place. I am writing SMTP functionality into our application and I'm at..

3

answers

What is the use of the init() usage in JavaScript?

What is the meaning and usage of the init() function in JavaScript?..

7

answers

Difference between request.getSession() and request.getSession(true)

I understand the difference between request.getSession(true) and request.getSession(false). But request.getSession() & request.getSession(true) look very similar! Both "return the current session..

5

answers

Overlay a background-image with an rgba background-color

I have a div with a background-image. I want to overlay the background-image with an rgba color (rgba(0,0,0,0.1)) when the user hovers the div. I was wondering if there's a one-div solution (i.e. not..

38

answers

Chrome net::ERR_INCOMPLETE_CHUNKED_ENCODING error

For the past two months, I have been receiving the following error on Chrome's developer console: net::ERR_INCOMPLETE_CHUNKED_ENCODING Symptoms: Pages not loading. Truncated CSS and JS files. Pag..

12

answers

Session state can only be used when enableSessionState is set to true either in a configuration

I am working on Asp.net MVC 2 app with c# by using vs 2010.I am having below mentioned error when I run my app locally under debug mode. Error message image is as below : Error message text is as..

8

answers

Easy way to make a confirmation dialog in Angular?

Is there any not-so-complicated way to make a confirm dialog in angular 2, the idea is to click on an item and then show a popup or modal to confirm its deletion, I tried angular 2 modals from here an..

3

answers

How to add an element to a list?

From this.. data = json.loads(urlopen('someurl').read()) ...I will get: {'list': [{'a':'1'}]} I want to add {'b':'2'} into the list. Any idea how to do it?..

11

answers

Efficiently finding the last line in a text file

I need to extract the last line from a number of very large (several hundred megabyte) text files to get certain data. Currently, I am using python to cycle through all the lines until the file is em..

13

answers

"unexpected token import" in Nodejs5 and babel?

In js file, i used import to instead of require import co from 'co'; And tried to run it directly by nodejs since it said import is 'shipping features' and support without any runtime flag (https:/..

6

answers

Redirect stderr to stdout in C shell

When I run the following command in csh, I got nothing, but it works in bash. Is there any equivalent in csh which can redirect the standard error to standard out? somecommand 2>&1 ..

15

answers

Maven fails to find local artifact

Occasionally maven complains that a particular dependency, which is built and packaged locally, cannot be found in the local repository while building another project that has it as a dependency. We ..

5

answers

Updating a dataframe column in spark

Looking at the new spark dataframe api, it is unclear whether it is possible to modify dataframe columns. How would I go about changing a value in row x column y of a dataframe? In pandas this would..

6

answers

Create controller for partial view in ASP.NET MVC

How can I create an individual controller and model for a partial view? I want to be able to place this partial view any where on the site so it needs it's own controller. I am current rendering the p..

5

answers

Wget output document and headers to STDOUT

I'm trying to output the document body and its headers to STDOUT by doing wget -S -O - http://google.com ...but it shows only the HTML document. Update: Got it to work with wget --save-headers --outp..

16

answers

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

13

answers

How to convert PDF files to images

I need to convert PDF files to images. If the PDF file is multi-page,I just need one image that contains all of the PDF pages. Is there an open source solution which is not charged like the Acrobat p..

17

answers

Fatal error: Call to undefined function pg_connect()

I am trying to connect to my database (remote server) which has PostgreSQL installed in it. My PHP code is trying to connect to the database using pg_connect(), but I get the error saying:- "Fatal err..

4

answers

What Does This Mean in PHP -> or =>

Possible Duplicate: where we use object operator “->” in php Reference - What does this symbol mean in PHP? I see these in PHP all the time but I don't have a clue as to what they ..

12

answers

react-router (v4) how to go back?

Trying to figure out how can I go back to the previous page. I am using [react-router-v4][1] This is the code I have configured in my first landing page: <Router> <div> <Link to..

2

answers

Python if-else short-hand

Possible Duplicate: Ternary conditional operator in Python I want to do the following in python: while( i < someW && j < someX){ int x = A[i] > B[j]? A[i++]:B[j++]; ..

19

answers

Warning :-Presenting view controllers on detached view controllers is discouraged

In my app, I am using a navigation controller. Later on in some view I am using presentViewController for showing a zoomed image. Also I am not using a Storyboard or nib. I am getting this error in ..

7

answers

jQuery $.cookie is not a function

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

3

answers

Using an instance of an object as a key in hashmap, and then access it with exactly new object?

I have a hasmap with a key object, HashMap<Key, Object> test; and make new Key("the same") as key.. so its like..: test.put(new Key("the same"), someObject); (without storing that key in..

10

answers

Netbeans how to set command line arguments in Java

I am trying to set command line arguments in a Netbeans 7.1 Java project on Windows 7 64 bit. Netbeans is not passing the arguments I give it. I go to Project --> Properties --> Run --> and type th..

15

answers

How to get the public IP address of a user in C#

I want the public IP address of the client who is using my website. The code below is showing the local IP in the LAN, but I want the public IP of the client. //get mac address NetworkInterface[] nic..

5

answers

PowerShell To Set Folder Permissions

I am trying to use the "default" options in applying folder permissions; by that, I mean that using the "Full Controll, Write, Read, etc" in the 'Properties' for a folder. The following script works ..

10

answers

Why does the html input with type "number" allow the letter 'e' to be entered in the field?

I have the following html5 input element: <input type="number"> Why does this input allow for the character 'e' to be entered in the input field? No other alphabet character is able to be ent..

6

answers

Python, remove all non-alphabet chars from string

I am writing a python MapReduce word count program. Problem is that there are many non-alphabet chars strewn about in the data, I have found this post Stripping everything but alphanumeric chars from ..

10

answers

ENOENT, no such file or directory

I'm getting this error from my node app: ENOENT, no such file or directory '~/Desktop/MyApp/newversion/partials/navigation.jade' I know the file is there because when I try to open the file using t..

10

answers

Get specific line from text file using just shell script

I am trying to get a specific line from a text file. So far, online I have only seen stuff like sed, (I can only use the sh -not bash or sed or anything like that). I need to do this only using a bas..

5

answers

How to read files and stdout from a running Docker container

How would I go about starting an application in my host machine in order to read files and stdout from a running docker container? Essentially I want to do this: docker start containerid ./myapp..

4

answers

How can I see all the "special" characters permissible in a varchar or char field in SQL Server?

Where can I see all the non-visible characters stored on a varchar or char field in SQL Server? e.g. \n (new-line), \r (carriage return) and other "non-printable" characters? How to print th..

4

answers

shorthand c++ if else statement

So I'm just curious if there is a short hand statement to this: if(number < 0 ) bigInt.sign = 0; else bigInt.sign = 1; I see all these short hand statements for if a < b and such. I'm no..

3

answers

Declaring a python function with an array parameters and passing an array argument to the function call?

I am a complete newbie to python and attempting to pass an array as an argument to a python function that declares a list/array as the parameter. I am sure I am declaring it wrong, here goes: def d..

14

answers

WCF Service, the type provided as the service attribute values…could not be found

When I right click on Eval.svc within Visual Studio 2012 and view in browser, I get the following - The type 'EvalServiceLibary.Eval', provided as the Service attribute value in the ServiceHost d..

19

answers

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver in Eclipse

What is wrong with the code there are lots of error while debugging. I am writing a code for a singleton class to connect with the database mysql. Here is my code package com.glomindz.mercuri.util; ..

4

answers

Twitter Bootstrap: div in container with 100% height

Using twitter bootstrap (2), I have a simple page with a nav bar, and inside the container I want to add a div with 100% height (to the bottom of the screen). My css-fu is rusty, and I can't work this..

2

answers

Mosaic Grid gallery with dynamic sized images

I have just received the following design for a project, for an image grid gallery, with dynamic width & height images (user submitted images). (Screenshot at the end of post) I have tried jQuery..

21

answers

How to get a list of installed Jenkins plugins with name and version pair

How can I get a list of installed Jenkins plugins? I searched the Jenkins Remote Access API document, but it was not found. Should I use Jenkins' CLI? Is there a document or example?..

22

answers

Running Python code in Vim

I am writing Python code using Vim, and every time I want to run my code, I type this inside Vim: :w !python This gets frustrating, so I was looking for a quicker method to run Python code inside V..

8

answers

submit the form using ajax

I'm developing an application (a kind of social network for my university). I need to add a comment (insert a row in a specific database). To do this, I have a HTML form in my html page with various f..

18

answers

What USB driver should we use for the Nexus 5?

As of the time of this writing, Google does not provide a USB driver (for Windows) for the Nexus 5. The usual link (http://developer.android.com/sdk/win-usb.html) shows Windows USB drivers for several..

3

answers

multiprocessing.Pool: When to use apply, apply_async or map?

I have not seen clear examples with use-cases for Pool.apply, Pool.apply_async and Pool.map. I am mainly using Pool.map; what are the advantages of others?..

3

answers

Understanding Bootstrap's clearfix class

.clearfix { *zoom: 1; &:before, &:after { display: table; content: ""; // Fixes Opera/contenteditable bug: // http://nicolasgallagher.com/micro-clearfix-hack/#comment-369..

7

answers

Get the string within brackets in Python

I have a sample string <alpha.Customer[cus_Y4o9qMEZAugtnW] active_card=<alpha.AlphaObject[card] ...>, created=1324336085, description='Customer for My Test App', livemode=False> I only wa..

7

answers

Reading a huge .csv file

I'm currently trying to read data from .csv files in Python 2.7 with up to 1 million rows, and 200 columns (files range from 100mb to 1.6gb). I can do this (very slowly) for the files with under 300,0..

11

answers

Is key-value pair available in Typescript?

Is key,value pair available in typescript? If yes how to do that. Can anyone provide sample example links...

8

answers

How to join two sets in one line without using "|"

Assume that S and T are assigned sets. Without using the join operator |, how can I find the union of the two sets? This, for example, finds the intersection: S = {1, 2, 3, 4} T = {3, 4, 5, 6} S_int..

4

answers

Create a asmx web service in C# using visual studio 2013

Hy, how can I create a asmx web service in Visual Studio 2013? I have found this short tutorial about that, but when I follow this in Visual Studio 2013 I get an error that says "the type 'Service1'..

9

answers

How to change the minSdkVersion of a project?

I have been building a project and testing it on the Android emulator. I realized that I set the minSdkVersion to 10. Now, I have a phone to test the program on, but its sdk version is 7. I tried ..

2

answers

Python: How to convert datetime format?

Possible Duplicate: How to convert a time to a string I have a variable as shown in the below code. a = "2011-06-09" Using python, how to convert it to the following format? "Jun 09,201..

4

answers

No space left on device

I am getting the error "No space left on device" when i tried to scp some files to a centos machine, tried to check: [[email protected]]# df -h Filesystem Size Used Avail Use% Mounted on ..

13

answers

java.net.BindException: Address already in use: JVM_Bind <null>:80

I am getting binding exception while starting the Tomcat server. I tried to kill the process that which is using '80' as couple of processes are using it. Getting error, while killing process id is ..

6

answers

Convert Decimal to Varchar

I have a decimal column in a table defined as decimal(8,3). I would like to include this column in a Select statement, convert it to a Varchar and only display two decimal places. I can't seem to find..

3

answers

Javascript counting number of objects in object

I have an object something like: Object {0=Object, 1=Object, 2=Object} // Output from console.log(obj.Data); But there is no way that I can count the number of objects in object, then finally get t..

2

answers

Array copy values to keys in PHP

I have this array: $a = array('b', 'c', 'd'); Is there a simple method to convert the array to the following? $a = array('b' => 'b', 'c' => 'c', 'd' => 'd'); ..

21

answers

Chrome javascript debugger breakpoints don't do anything?

I can't seem to figure out the Chrome debugging tool. I have chrome version 21.0.1180.60 m. Steps I took: I pressed ctrl-shift-i to bring up the console. Clicked on Sources then select the relevan..

1

answers

What is POCO in Entity Framework?

I just started learning POCO but cannot understand its use and advantage. Even following link of stackoverflow did not help me. what is Entity Framework with POCO Can anybody explain the usage of PO..

6

answers

How to resolve TypeError: can only concatenate str (not "int") to str

I decided to make some kind of secret code for testing purposes with Unicode. I've done that by adding numbers to Unicode so it would be kind of secret. I've been getting this error, but I don't know..

3

answers

How to get a web page's source code from Java

I just want to retrieve any web page's source code from Java. I found lots of solutions so far, but I couldn't find any code that works for all the links below: http://www.cumhuriyet.com.tr?hn=2987..

10

answers

List all employee's names and their managers by manager name using an inner join

The following is my CREATE TABLE script: create table EMPLOYEES (EmpID char(4) unique Not null, Ename varchar(10), Job varchar(9), MGR char(4), Hiredat..

10

answers

How can I read inputs as numbers?

Why are x and y strings instead of ints in the below code? (Note: in Python 2.x use raw_input(). In Python 3.x use input(). raw_input() was renamed to input() in Python 3.x) play = True while play:..

11

answers

how to implement Pagination in reactJs

I am new to ReactJS and am creating a simple TODO application in it. Actually, it is a very basic app with no db connection, tasks are stored in an array. I added Edit and Delete functionality to it n..

6

answers

Checking session if empty or not

I want to check that session is null or empty i.e. some thing like this: if(Session["emp_num"] != null) { if (!string.IsNullOrEmpty(Session["emp_num"].ToString())) { /..

11

answers

Axios get access to response header fields

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

3

answers

Bootstrap 3 Multi-column within a single ul not floating properly

I have been encountering problems like this on the current bootstrap 3 for a while now. I have managed to fix them in the past in one way or another but have no clue of how to fix it this time. I nee..

5

answers

What is pipe() function in Angular

Pipes are filters for transforming data (formats) in the template. I came across the pipe() function as below. What does this pipe() function exactly mean in this case? return this.http.get<Hero..