Questions Tagged with #Rtcp

**RTP Control Protocol** (RTCP) is a helper protocol for *Real-time Transport Protocol* (RTP).

Create Log File in Powershell

I have the below code and currently it loads all the information on screen. I want it to log to a log file on D:\Apps\Logs. The log file needs to have the name of the computer it is loading against -..

Swift double to string

Before I updated xCode 6, I had no problems casting a double to a string but now it gives me an error var a: Double = 1.5 var b: String = String(a) It gives me the error message "double is not conv..

Making TextView scrollable on Android

I am displaying text in a TextView that appears to be too long to fit into one screen. I need to make my TextView scrollable. How can I do that? Here is the code: final TextView tv = new TextView(this..

Reload a DIV without reloading the whole page

I have a Div Tag that has a php include to fill that div with information what I want to do is make it so that the page is called every 15s so it can update the information there without having to rel..

Counter exit code 139 when running, but gdb make it through

My question sounds specific, but I doubt it still can be of a C++ debug issue. I am using omnet++ which is to simulate wireless network. omnet++ itself is a c++ program. I encountered a queer phenom..

Convert Python program to C/C++ code?

is it possible to convert a Python program to C/C++? I need to implement a couple of algorithms, and I'm not sure if the performance gap is big enough to justify all the pain I'd go through when doin..

How do I get this javascript to run every second?

How do I get this javascript to run every second? source code: <script type="text/javascript"> $(function() { //More Button $('.more').live("click",function() { .. - Add blank item at top of dropdownlist

Why is the dropdown not showing my blank item first? Here is what I have drpList.Items.Add(New ListItem("", "")) With drpList .DataSource = myController.GetList(userid) .DataTextField = "Nam..

echo key and value of an array without and with loop

This is an array i have <?php $page['Home']='index.html'; $page['Service']='services.html'; ?> How do i get to echo something like this for individual one like Home is at index.html and ag..

Trim Whitespaces (New Line and Tab space) in a String in Oracle

I need to trim New Line (Chr(13) and Chr(10) and Tab space from the beginning and end of a String) in an Oracle query. I learnt that there is no easy way to trim multiple characters in Oracle. "trim" ..

When does a process get SIGABRT (signal 6)?

What are the scenarios where a process gets a SIGABRT in C++? Does this signal always come from within the process or can this signal be sent from one process to another? Is there a way to identify ..

How can I add the sqlite3 module to Python?

Can someone tell me how to install the sqlite3 module alongside the most recent version of Python? I am using a Macbook, and on the command line, I tried: pip install sqlite but an error pops up...

How to split elements of a list?

I have a list: my_list = ['element1\t0238.94', 'element2\t2.3904', 'element3\t0139847'] How can I delete the \t and everything after to get this result: ['element1', 'element2', 'element3'] ..

Get values from a listbox on a sheet

I have a listbox named ListBox1 on Sheet1 of an Excel workbook. Every time the user selects one of the items in the list, I need to copy its name to a variable named strLB. So, if I have Value1, Va..

Add Keypair to existing EC2 instance

I was given AWS Console access to an account with 2 instances running that I cannot shut down (in production). I would, however, like to gain SSH access to these instances, is it possible to create a ..

Remove privileges from MySQL database

Before you think this is a duplicate question, I believe I have a unique, even if it is somewhat dim-witted, case. A few days ago, I upgraded the version of MySQL on my Ubuntu 10.04 server to 5.3.3 (..

Lightweight workflow engine for Java

Is it better to write a new workflow engine or to use an existing BPM engine: jBPM 5, Activiti 5? My application is a web based application and performance is important. My doubt is whether using jBP..

How do you debug MySQL stored procedures?

My current process for debugging stored procedures is very simple. I create a table called "debug" where I insert variable values from the stored procedure as it runs. This allows me to see the value ..

How to create own dynamic type or dynamic object in C#?

There, is for example, ViewBag property of ControllerBase class and we can dynamically get/set values and add any number of additional fields or properties to this object, which is cool .I want to use..

Count items in a folder with PowerShell

I'm trying to write a very simple PowerShell script to give me the total number of items (both files and folders) in a given folder (c:\MyFolder). Here's what I've done: Write-Host ( Get-ChildItem c..

Convert an NSURL to an NSString

I have an app where the user can choose an image either from the built-in app images or from the iphone photo library. I use an object Occasion that has an NSString property to save the imagePath. N..

How to set text color to a text view programmatically

How can I set Text Color of a text view to #bdbdbd programatically?..

How to check if a file exists from inside a batch file

I need to run a utility only if a certain file exists. How do I do this in Windows batch?..

How to compare two colors for similarity/difference

I want to design a program that can help me assess between 5 pre-defined colors which one is more similar to a variable color, and with what percentage. The thing is that I don't know how to do that ..

How to start IDLE (Python editor) without using the shortcut on Windows Vista?

I'm trying to teach Komodo to fire up IDLE when I hit the right keystrokes. I can use the exact path of the shortcut in start menu in the Windows Explorer location bar to launch IDLE so I was hoping ..

Border around each cell in a range

I am trying to create a simple function that will add borders around every cell in a certain range. Using the wonderful recording this generates a ton of code which is quite useless. The code below wi..

How to start Spyder IDE on Windows

I downloaded spyder using the pip install spyder in my windows 10 32-bit operating system, but i dont see any desktop icons or exe files to start running the IDE. I downloaded spyder 3, any my pyth..

Syntax for an If statement using a boolean

I just recently joined the python3 HypeTrain. However I just wondered how you can use an if statement onto a boolean. Example: RandomBool = True # and now how can I check this in an if statement? L..

Accessing certain pixel RGB value in openCV

I have searched internet and stackoverflow thoroughly, but I haven't found answer to my question: How can I get/set (both) RGB value of certain (given by x,y coordinates) pixel in OpenCV? What's impo..

ReactJS - Does render get called any time "setState" is called?

Does React re-render all components and sub components every time setState() is called? If so, why? I thought the idea was that React only rendered as little as needed - when state changed. In the fol..

Bubble Sort Homework

In class we are doing sorting algorithms and, although I understand them fine when talking about them and writing pseudocode, I am having problems writing actual code for them. This is my attempt in ..

How to detect chrome and safari browser (webkit)

I am trying to detect the chrome and safari browser using jquery or javascript. I thought we are not supposed to use jQuery.browser. Are there any suggestions here? Thanks a lot!..

Put text at bottom of div

I have 4 DIV's right next to each other, and they're all centered in the middle of the screen. I have 2 words in each div, but I don't want them at the top, I want them to appear in the bottom right h..

How to use Python's "easy_install" on Windows ... it's not so easy

After installing Python 2.7 on Windows XP, then manually setting the %PATH% to python.exe (why won't the python installer do this?), then installing setuptools 0.6c11 (why doesn't the python installer..

What is the difference between an int and a long in C++?

Correct me if I am wrong, int is 4 bytes, with a range of values from -2,147,483,648 to 2,147,483,647 (2^31) long is 4 bytes, with a range of values from -2,147,483,648 to 2,147,483,647 (2^31) What ..

When is it practical to use Depth-First Search (DFS) vs Breadth-First Search (BFS)?

I understand the differences between DFS and BFS, but I'm interested to know when it's more practical to use one over the other? Could anyone give any examples of how DFS would trump BFS and vice ve..

Reference requirements.txt for the install_requires kwarg in setuptools file

I have a requirements.txt file that I'm using with Travis-CI. It seems silly to duplicate the requirements in both requirements.txt and, so I was hoping to pass a file handle to the install_..

How can I develop for iPhone using a Windows development machine?

Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows? The only other way I can think of doing this is to run a Mac VM image on a ..

How to add an element at the end of an array?

I want to know how to add or append a new element to the end of an array. Is any simple way to add the element at the end? I know how to use a StringBuffer but I don't know how to use it to add an ele..

Using GroupBy, Count and Sum in LINQ Lambda Expressions

I have a collection of boxes with the properties weight, volume and owner. I want to use LINQ to get a summarized list (by owner) of the box information e.g. **Owner, Boxes, Total Weight, Total Vol..

What's the best way to cancel event propagation between nested ng-click calls?

Here's an example. Let's say I want to have an image overlay like a lot of sites. So when you click a thumbnail, a black overlay appears over your whole window, and a larger version of the image is ..

How to print the values of slices

I want to see the values which are in the slice. How can I print them? projects []Project ..

How to define an empty object in PHP

with a new array I do this: $aVal = array(); $aVal[key1][var1] = "something"; $aVal[key1][var2] = "something else"; Is there a similar syntax for an object (object)$oVal = ""; $oVal->key1->..

Find child element in AngularJS directive

I am working in a directive and I am having problems using the parameter element to find its childs by class name. .directive("ngScrollList", function(){ return { restrict: 'AE', ..

Grouping switch statement cases together?

I may be over looking something but is there a simple way in C++ to group cases together instead of writing them out individually? I remember in basic I could just do: SELECT CASE Answer CASE 1, 2, 3..

Compare dates in MySQL

I want to compare a date from a database that is between 2 given dates. The column from the database is DATETIME, and I want to compare it only to the date format, not the datetime format. SELECT * F..

How to find where javaw.exe is installed?

So, for a project I am working on, I need to find out where a javaw.exe is located on a user's machine. How do I do that? Assuming that user is on Windows machine The method that I used is limited ..

How to make vim paste from (and copy to) system's clipboard?

Unlike other editors, vim stores copied text in its own clipboard. So, it's very hard for me to copy some text from a webpage and paste it into the current working file. It so happens I have to either..

Programmatically get height of navigation bar

I know that the presence of the more view controller (navigation bar) pushes down the UIView by its height. I also know that this height = 44px. I have also discovered that this push down maintains ..

Java resource as file

Is there a way in Java to construct a File instance on a resource retrieved from a jar through the classloader? My application uses some files from the jar (default) or from a filesystem directory sp..

Turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server

I have a WCF service that has been working perfectly, and something has changed and I don't know what. I get this exception: System.ServiceModel.FaultException: The server was unable to process t..

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

Are all Spring Framework Java Configuration injection examples buggy?

I'm wondering if it's only me or are most examples of Spring's Java Configuration flawed? Like here for example: http://sp..

HttpListener Access Denied

I am writing an HTTP server in C#. When I try to execute the function HttpListener.Start() I get an HttpListenerException saying "Access Denied". When I run the app in admin mode in windows 7 ..

Convert a bitmap into a byte array

Using C#, is there a better way to convert a Windows Bitmap to a byte[] than saving to a temporary file and reading the result using a FileStream?..

java comparator, how to sort by integer?

Im trying to learn comparator in java and I have found this great example online, my question is how would this code be changed so that the pet names are ordered by age and in descending order so that..

How to print binary tree diagram?

How can I print a binary tree in Java so that the output is like: 4 / \ 2 5 My node: public class Node<A extends Comparable> { Node<A> left, right; A data; publ..

How do I change a TCP socket to be non-blocking?

How do you make a socket non-blocking? I am aware of the fcntl() function, but I've heard it's not always reliable...

@UniqueConstraint and @Column(unique = true) in hibernate annotation

What is difference between @UniqueConstraint and @Column(unique = true)? For example: @Table( name = "product_serial_group_mask", uniqueConstraints = {@UniqueConstraint(columnNames = {"mask",..

Is it possible that one domain name has multiple corresponding IP addresses?

For example, when we connect to, at first we try to connect to And if first try fails, then we try Is it possible? Can we register multiple backup IP addresses..

Ant build failed: "Target "build..xml" does not exist"

When I run the ant file in verbose mode, I got an error like the one below. Does anyone have any ideas what is going wrong? I am new to this] Could not load definitions fr..

How abstraction and encapsulation differ?

I am preparing for an interview and decided to brush up my OOP concepts. There are hundreds of articles available, but it seems each describes them differently. Some says Abstraction is "the proce..

Converting Varchar Value to Integer/Decimal Value in SQL Server

How to convert the value of records in a table with data type varchar to integer or decimal so I can get the sum of the value. I use SQL Server 2005. Say that I have table structure like this: ID in..

How to get user name using Windows authentication in

I want to get user name using Windows authentication Actually I implemented "Sign in as different user",when click this button Windows security will appear there we can give credentials. In that tim..

How to find memory leak in a C++ code/project?

I am a C++ programmer on the Windows platform. I am using Visual Studio 2008. I usually end up in the code with memory leaks. Normally I find the memory leak by inspecting the code, but it is cumber..

Mixing C# & VB In The Same Project

Can you mix vb and c# files in the same project for a class library? Is there some setting that makes it possible? I tried and none of the intellisense works quite right, although the background comp..

UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only

I have this scenario: fetch (read and delete) a record from IncomingMessage table read record content insert something to some tables if an error (any exception) occurred in steps 1-3, insert an err..

Generate an integer that is not among four billion given ones

I have been given this interview question: Given an input file with four billion integers, provide an algorithm to generate an integer which is not contained in the file. Assume you have 1 GB..

How To Launch Git Bash from DOS Command Line?

I've got what I'm hoping is a simple question, but I haven't been able to find the answer yet. I would like to launch Git Bash from a DOS batch file. Here is what I tried so far: Launched Git Bash..

Your project path contains non-ASCII characters android studio

I was installing android studio, but I have this problem when the program is starting: Error:(1, 0) Your project path contains non-ASCII characters. This will most likely cause the build to fail..

How to initialize an array in one step using Ruby?

I initialize an array this way: array = array << '1' << '2' << '3' Is it possible to do that in one step? If so, how?..

changing default x range in histogram matplotlib

I would like to change the default x range for the histogram plot. The range of the data is from 7 to 12. However, by default the histogram starts right at 7 and ends at 13. I want it to start at 6.5 ..

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

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

How to make a JFrame Modal in Swing java

I have created one GUI in which I have used a JFrame. How should I make it Modal?..

How do I change the default schema in sql developer?

I don't see any tables in the tables section of a database that I've linked to w/ SQL developer. The DB admin says I need to change the default schema in SQL developer. How do I do that? ..

How do I suspend painting for a control and its children?

I have a control which I have to make large modifications to. I'd like to completely prevent it from redrawing while I do that - SuspendLayout and ResumeLayout aren't enough. How do I suspend painti..

Error java.lang.OutOfMemoryError: GC overhead limit exceeded

I get this error message as I execute my JUnit tests: java.lang.OutOfMemoryError: GC overhead limit exceeded I know what an OutOfMemoryError is, but what does GC overhead limit mean? How can I solv..

How to display images from a folder using php - PHP

It would be great if someone could help me figure out why the browser cannot load the images (error 404). The code works, and the image source is correct, but I cannot figure out what is wrong. (using..

Need to install urllib2 for Python 3.5.1

I'm running Python 3.5.1 for Mac. I want to use urllib2 module. I tried installing it but I was told that it's been split into urllib.request and urllib.error for Python 3. My command (running from ..

C# DataTable.Select() - How do I format the filter criteria to include null?

This doesn't work DataTable myNewTable = myDataTable.Select("Name <> 'n/a'").CopyToDataTable(); myDataTable has a row named Name. I would like to select the rows from this table where Name is..

Generate a UUID on iOS from Swift

In my iOS Swift app I want to generate random UUID (GUID) strings for use as a table key, and this snippet appears to work: let uuid = CFUUIDCreateString(nil, CFUUIDCreate(nil)) Is this safe? Or ..

"Cannot update paths and switch to branch at the same time"

I sometimes use the checkout -b option to create a new branch, check it out at the same time and set up tracking in one command. In a new environment, I get this error: $ git checkout -b test --trac..

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

need to add a class to an element

here's my code: <body> <header> <h1>Html quiz</h1> </header> <article> <h2>What color is this?&nbsp;&nbsp; #00ff00 <ul> <li> <..

MySQL Stored procedure variables from SELECT statements

I'm trying to create a stored procedure. Here's what I have so far (not working): DELIMITER | CREATE PROCEDURE getNearestCities(IN cityID INT) BEGIN DECLARE cityLat FLOAT; DECLARE..

What's the difference between MyISAM and InnoDB?

I understand that this question has been asked before, but most of the time it is asked in relation to a specific database or table. I cannot find an answer on this site that describes the two engines..

Python function as a function argument?

Can a Python function be an argument of another function? Say: def myfunc(anotherfunc, extraArgs): # run anotherfunc and also pass the values from extraArgs to it pass So this is basically..

Spring Maven clean error - The requested profile "pom.xml" could not be activated because it does not exist

I'm trying to build a Spring-Boot *.war with maven, but I keep getting: [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] -------------------..

Favicon dimensions?

I have a favicon with the dimensions of height=26px / width=20px named favicon.png <link href= rel="shortcut icon" /> However, in my browser, my favic..

alert a variable value

How do I display the value of a variable in javascript in an alert box? For example I've got a variable x=100 and alert(x) isn't working. the script used in grease monkey is here var inputs = docum..

How can I combine multiple nested Substitute functions in Excel?

I am trying to set up a function to reformat a string that will later be concatenated. An example string would look like this: Standard_H2_W1_Launch_123x456_S_40K_AB Though sometimes the "S" doesn'..

SQL Developer is returning only the date, not the time. How do I fix this?

Here's what SQL Develoepr is giving me, both in the results window and when I export: CREATION_TIME ------------------- 27-SEP-12 27-SEP-12 27-SEP-12 Here's what another piece of software r..

How to fix "unable to open stdio.h in Turbo C" error?

Whenever I compile my program, I get the error above. ..

Why doesn't the Scanner class have a nextChar method?

This is really a curiosity more than a problem... Why doesn't the Scanner class have a nextChar() method? It seems like it should when you consider the fact that it has next, nextInt, nextLine etc me..

TypeError: cannot perform reduce with flexible type

I have been using the scikit-learn library. I'm trying to use the Gaussian Naive Bayes Module under the scikit-learn library but I'm running into the following error. TypeError: cannot perform reduce ..

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

I been strugling with this for 2 days now without comming any closer to solution. I have read 20-30 threads alteast and stil can not resolve this. Please help me out. I have disable anonymous authen..

Connection string using Windows Authentication

I am creating a website, but in the database I use windows authentication. I know that you use this for SQL authentication <connectionStrings> <add name="NorthwindContex" conne..

css 100% width div not taking up full width of parent

I have two divs on a page. a grid-container that takes a background and an internal grid that needs to be positioned in the center of the other grid. My css: html, body{ margin:0; padding:0; w..

Position of a string within a string using Linux shell script?

If I have the text in a shell variable, say $a: a="The cat sat on the mat" How can I search for "cat" and return 4 using a Linux shell script, or -1 if not found?..

css3 text-shadow in IE9

Is there an easy way to have css3 text-shadow's working in IE9? At least a single text shadow would be great. I guess ideally IE8 is supported as well. I'm hoping there's a simple jquery plugin or ..

Correlation between two vectors?

I have two vectors: A_1 = 10 200 7 150 A_2 = 0.001 0.450 0.0007 0.200 I would like to know if there is correlation between these two vectors. I ..

How do you use the ? : (conditional) operator in JavaScript?

In simple words, what is the ?: (conditional, "ternary") operator and how can I use it?..

The value violated the integrity constraints for the column

I am trying to import the data from Excel file into SQL Server database. I am unable to do so because I am getting following errors in the log file. Please help. The log erros are as as follows:- [OL..

List files ONLY in the current directory

In Python, I only want to list all the files in the current directory ONLY. I do not want files listed from any sub directory or parent. There do seem to be similar solutions out there, but they don'..

Simple way to create matrix of random numbers

I am trying to create a matrix of random numbers, but my solution is too long and looks ugly random_matrix = [[random.random() for e in range(2)] for e in range(3)] this looks ok, but in my impleme..

Java - Relative path of a file in a java web application

I want to read a file from a java web application. I don't want to give the absolute path of the file. I just want to put the file in some directory of my web application. Or It can be placed along ..

Unable to Connect to For Cloning

I am trying to clone the angular-phonecat git repository, but I am getting the following message when I enter the command in my Git Bash: $ git clone git:// C..

Is it possible to have SSL certificate for IP address, not domain name?

I want my site to use URLs like and for static content to avoid unnecessary cookies in request AND avoid additional DNS request. Is there any way to obtain ..

How to get the caller's method name in the called method?

Python: How to get the caller's method name in the called method? Assume I have 2 methods: def method1(self): ... a = A.method2() def method2(self): ... If I don't want to do any chan..

getElementById in React

Getting this error at the moment: Uncaught TypeError: Cannot read property 'value' of null I call this in my render function below: <input type="submit" className="nameInput" id="name" value="cp..

"Could not find a version that satisfies the requirement opencv-python"

I am struggling with Jetson TX2 board (aarch64). I need to install python wrapper for OpenCV. I can do: $ sudo apt-get install python-opencv But I cannot do: $ sudo pip install opencv-python I..

Integer value in TextView

How can I display an Integer value in TextView? When I try, I get an error android.content.res.Resources$NotFoundException: String resource ID..

mysql alphabetical order

i am trying to sort mysql data with alphabeticaly like A | B | C | D when i click on B this query runs select name from user order by 'b' but result showing all records starting with a or c..

iOS: present view controller programmatically

I'm using the presentViewController:animated:completion: method to go to another view controller. This is my code: AddTaskViewController *add = [[AddTaskViewController alloc] init]; [self presentVie..

ASP.NET Core Identity - get current user

To get the currently logged in user in MVC5, all we had to do was: using Microsoft.AspNet.Identity; [Authorize] public IHttpActionResult DoSomething() { string currentUserId = User.Identity.GetUs..

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

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

How can I uninstall an application using PowerShell?

Is there a simple way to hook into the standard 'Add or Remove Programs' functionality using PowerShell to uninstall an existing application? Or to check if the application is installed?..

SQL 'like' vs '=' performance

This question skirts around what I'm wondering, but the answers don't exactly address it. It would seem that in general '=' is faster than 'like' when using wildcards. This appears to be the conve..

What's the yield keyword in JavaScript?

I heard about a "yield" keyword in JavaScript, but I found very poor documentation about it. Can someone explain me (or recommend a site that explains) its usage and what it is used for?..

Can't connect to MySQL server on 'localhost' (10061) after Installation

I installed MySQL using mysql-installer- on Windows 7. From the cmd window, I run "mysqlshow -u root -p". It asked for a password, then returned this error: "Can't connect to MySQL server ..

How do you get a directory listing in C?

How do you scan a directory for folders and files in C? It needs to be cross-platform...

How to create dynamic href in react render function?

I am rendering a list of posts. For each post I would like to render an anchor tag with the post id as part of the href string. render: function(){ return ( <ul> { ..

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

How do I test if a variable does not equal either of two values?

I want to write an if/else statement that tests if the value of a text input does NOT equal either one of two different values. Like this (excuse my pseudo-English code): var test = $("#test").val()..

What is <=> (the 'Spaceship' Operator) in PHP 7?

PHP 7, which will come out in November this year will introduce the Spaceship (<=>) operator. What is it and how does it work? This question already has an answer in our general reference question..

Cannot obtain value of local or argument as it is not available at this instruction pointer, possibly because it has been optimized away

Visual Studio 2010 kills (there is no other word) data in one of the arguments of the function in the unsafe block. What could cause this error? The following message shows by the debugger. Cannot o..

How to write a shell script that runs some commands as superuser and some commands not as superuser, without having to babysit it?

I want to write a shell script to automate a series of commands. The problem is some commands MUST be run as superuser and some commands MUST NOT be run as superuser. What I have done so far is someth..

Unlimited Bash History

I want my .bash_history file to be unlimited. e.g. So I can always go back and see how I built/configured something, or what that nifty command was, or how some command broke something weeks ago. How ..

How can I echo a newline in a batch file?

How can you you insert a newline from your batch file output? I want to do something like: echo hello\nworld Which would output: hello world ..

Postgresql SELECT if string contains

So I have a in my Postgresql: TAG_TABLE ========================== id tag_name -------------------------- 1 aaa 2 bbb 3 ccc To simplify my pro..

`col-xs-*` not working in Bootstrap 4

I have not encountered this before, and I am having a very hard time trying to find the solution. When having a column equal to medium in bootstrap like so: <h1 class="text-center">Hello, world..

How to convert Hexadecimal #FFFFFF to System.Drawing.Color

Possible Duplicate: How to get Color from Hex color code using .NET? I want to convert a string like #FFFFFF to System.Drawing.Color. How do you do that?..

Change color of bootstrap navbar on hover link?

I want to know how to change the color of the links when you hover over them in the nav bar, as currently they are an ugly color. Thanks for any suggestions? HTML: <div class="container"> ..

PHP Warning: Module already loaded in Unknown on line 0

On Mac OSX Mavericks using homebrew php55 whenever I run a a php command I get the following error message (everything runs fine it's just annoying) PHP Warning: Module 'intl' already loaded in Unkn..

How do I get the current location of an iframe?

I have built a basic data entry application allowing users to browse external content in iframe and enter data quickly from the same page. One of the data variables is the URL. Ideally I would like to..

C++ pointer to objects

In C++ do you always have initialize a pointer to an object with the new keyword? Or can you just have this too: MyClass *myclass; myclass->DoSomething(); I thought this was a pointer allocate..

How to parse a date?

I am trying to parse this date with SimpleDateFormat and it is not working: import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Formaterclass { ..

Android Facebook style slide

The new Facebook application and its navigation is so cool. I was just trying to see how it can be emulated in my application. Anyone has a clue how it can be achieved? On clicking the the top le..

PHP Email sending BCC

I know there are a few similar questions to this but I just can't get it working. Ok, I have a list of emails grabbed from my database in a variable called $emailList. I can get my code to send an e..

How do you run a script on login in *nix?

I know I once know how to do this but... how do you run a script (bash is OK) on login in unix?..

How to delete row based on cell value

I have a worksheet, I need to delete rows based on cell value .. Cells to check are in Column A .. If cell contains "-" .. Delete Row I can't find a way to do this .. I open a workbook, copy all co..

"cannot resolve symbol R" in Android Studio

In every instance in all of my classes where I reference, the R is in red and it says "cannot resolve symbol R". Also every time there is R.layout.something it is underlined in red and..

Easiest way to toggle 2 classes in jQuery

If I have class .A and class .B and want to switch in between on button click, what's a nice solution for that in jQuery? I still don't understand how toggleClass() works. Is there an inline solution..

error: pathspec 'test-branch' did not match any file(s) known to git

I am a new user of Git. I have forked a repository called Spoon-Knife (available for practicing forking with Git). Then, I cloned it locally by running git clone

How to apply CSS page-break to print a table with lots of rows?

I have a dynamic table in my web page that sometimes contains lots of rows. I know there are page-break-before and page-break-after CSS properties. Where do I put them in my code in order to force pa..

What is a good way to handle exceptions when trying to read a file in python?

I want to read a .csv file in python. I don't know if the file exists. My current solution is below. It feels sloppy to me because the two separate exception tests are awkwardly juxtaposed. Is there..

Visual Studio Copy Project

I would like to make a copy of my project. I would rather not start doing it from scratch by adding files and references, etc. Please note that I don't mean copy for deployment. Just plain copy. Is t..

Spring MVC Missing URI template variable

I have a Controller class with a function that saves a record to the Database. I am passing several parameters to the Controller function however i think i may be writing the @RequestMapping incorrect..

I am getting Failed to load resource: net::ERR_BLOCKED_BY_CLIENT with Google chrome

I am getting white page after running my project but its work with .net Client properly Do I need any settings in the browser? and the link will come after the error Failed to load resource: net::ERR..

Command prompt won't change directory to another drive

I'm trying to compile some java (learning java currently), and to do so I need to change command-prompt's directory (using javac). C:\...\Admin> cd D:\Docs\Java C:\...\Admin> cd C:\...\Admin ..

Show hide div using codebehind

I have a DropDownList for which I am trying to show a div OnSelectedIndexChanged but it says OBJECT REQUIRED. I am binding the DataList in that div: aspx: <asp:DropDownList runat="server" ID="ls..

How do you fix a bad merge, and replay your good commits onto a fixed merge?

I accidentally committed an unwanted file (filename.orig while resolving a merge) to my repository several commits ago, without me noticing it until now. I want to completely delete the file from the ..

Difference between Convert.ToString() and .ToString()

What is the difference between Convert.ToString() and .ToString()? I found many differences online, but what's the major difference?..

jQuery: Get height of hidden element in jQuery

I need to get height of an element that is within a div that is hidden. Right now I show the div, get the height, and hide the parent div. This seems a bit silly. Is there a better way? I'm using jQu..

How to convert ActiveRecord results into an array of hashes

I have an ActiveRecord result of a find operation: tasks_records = TaskStoreStatus.find( :all, :select => "task_id, store_name, store_region", :conditions => ["task_status = ? and store_i..

The PowerShell -and conditional operator

Either I do not understand the documentation on MSDN or the documentation is incorrect. if($user_sam -ne "" -and $user_case -ne "") { Write-Host "Waaay! Both vars have values!" } else { Write..

cor shows only NA or 1 for correlations - Why?

I'm running cor() on a data.framewith all numeric values and I'm getting this as the result: price exprice... price 1 NA exprice NA 1 ... So it's either 1 or NA for each va..

Compare every item to every other item in ArrayList

I'm having trouble with what I thought should be a pretty simple problem. I need to compare every item in an arrayList with every other item in the the list without comparing items to themselves. It'..

restrict edittext to single line

possible duplicate : android-singleline-true-not-working-for-edittext <EditText android:id="@+id/searchbox" android:layout_width="fill_parent" android:layout_height="wrap_content" ..

How to read a specific line using the specific line number from a file in Java?

In Java, is there any method to read a particular line from a file? For example, read line 32 or any other line number...

Split a string by another string in C#

I've been using the Split() method to split strings, but this only appears to work if you are splitting a string by a character. Is there a way to split a string, with another string being the split b..

How do check if a parameter is empty or null in Sql Server stored procedure in IF statement?

I read this: How do I check if a Sql server string is null or empty but it not helped me in this situation. The piece of code from my stored procedure: IF (@item1 IS NOT NULL) OR (LEN(@item1) > 0..

Angular2 use [(ngModel)] with [ngModelOptions]="{standalone: true}" to link to a reference to model's property

Let's say I have a typescript object of type Mailtype like following: export class Mailtype { constructor( public name?: string, public locale?: string, public email?: string, publi..

where is create-react-app webpack config and files?

I create a ReactJS project with the create-react-app package and that worked well, but I cannot find webpack files and configurations. How does react-create-app work with webpack? Where are the webpa..

Best font for coding

Possible Duplicate: Recommended Fonts for Programming? What font do you use when writing code? Specifically, this font should be: Freely available Easily installable on multiple platforms ..

Return in Scala

I am a newbie scala programmer and came across a weird behavior. def balanceMain(elem: List[Char]): Boolean = { if (elem.isEmpty) if (count == 0) true; else false; if (..

Provide schema while reading csv file as a dataframe

I am trying to read a csv file into a dataframe. I know what the schema of my dataframe should be since I know my csv file. Also I am using spark csv package to read the file. I trying to specify the ..

Spring @ContextConfiguration how to put the right location for the xml

In our project we are writting a test to check if the controller returns the right modelview @Test public void controllerReturnsModelToOverzichtpage() { ModelAndView modelView = new M..

Using WGET to run a cronjob PHP

I tried to do a cron and run a url every 5 mintues. I tried to use WGET however I dont want to download the files on the server, all I want is just to run it. This is what I used (crontab): */5 * *..

Removing newline after <h1> tags?

I am having a problem with removing linebreaks after the <h1> tag, as everytime it prints, it adds a line break straight after it, so something like <h1>Hello World!</h1> <h2>H..

How to create bitmap from byte array?

I searched all question about byte array but i always failed. I have never coded c# i am new in this side. Could you help me how to make image file from byte array. Here is my function which stores ..

Conditional logic in AngularJS template

I have an angular template which looks like this... <div ng-repeat="message in data.messages" ng-class="message.type"> <div class="info"> <div class="type"></div>..

Automatically start a Windows Service on install

I have a Windows Service which I install using the InstallUtil.exe. Even though I have set the Startup Method to Automatic, the service does not start when installed, I have to manually open the servi..

Pandas: Return Hour from Datetime Column Directly

Assume I have a DataFrame sales of timestamp values: timestamp sales_office 2014-01-01 09:01:00 Cincinnati 2014-01-01 09:11:00 San Francisco 2014-01-01 15:22:00 Chicago 2014..

MongoDB: Is it possible to make a case-insensitive query?

Example: >{"foo":"bar"}); > db.stuff.find({"foo":"bar"}).count(); 1 > db.stuff.find({"foo":"BAR"}).count(); 0 ..

Is it possible to have multiple statements in a python lambda expression?

I am a python newbie trying to achieve the following: I have a list of lists: lst = [[567,345,234],[253,465,756, 2345],[333,777,111, 555]] I want map lst into another list containing only the seco..

Run a task every x-minutes with Windows Task Scheduler

I'm trying to get Windows Task Scheduler to run a particular .exe every 10 minutes or so, but the options only allow for once a day execution. Is there a way I can get it to run a .exe every 10 or 20..

Why does Vim save files with a ~ extension?

I've found that while using Vim on Windows Vim saves the file, a .ext.swp file that's deleted on closing the Vim window and a .ext~ file. I assume the .ext.swp file is a session backup in case Vim c..

R Not in subset

Possible Duplicate: Standard way to remove multiple elements from a dataframe I know in R that if you are searching for a subset of another group or matching based on id you'd use something..

Facebook share button and custom text

Is there any way to make facebook share button which post custom text on the wall or news feed?..

How do I move focus to next input with jQuery?

I am using the autocomplete plugin with jQuery and it is working fine. However, in IE, when the user selects an item in the autocomplete, the focus does not then move to the next input field. Naturall..

IF...THEN...ELSE using XML

I have a program that uses XML formatted rules to create executable code for run-time. I have to define some actions and logical constructs using my own dialect. I have OR, AND, and NOT constructs and..

How to use onResume()?

Can anyone give me an example that uses onResume() in Android? Also, if I want to restart the activity at the end of the execution of another, which method is executed—onCreate() or onResume()? An..

phpmyadmin "no data received to import" error, how to fix?

I am using XAMPP on a pc atwork to host a database. I exported a backup ("bintra.sql") using phpmybackuppro. I use xampp on a mac at home, and when I try to import the sql file located on my desktop..

Responsively change div size keeping aspect ratio

When I give an image a percent width or height only it will grow/shrink keeping its aspect ratio, but if I want the same effect with another element, is it possible at all to tie the width and the hei..

Remove the last character in a string in T-SQL?

How do I remove the last character in a string in T-SQL? For example: 'TEST STRING' to return: 'TEST STRIN' ..

Android Preventing Double Click On A Button

What is the best way to prevent double clicks on a button in Android? ..

Change label text using JavaScript

Why doesn't the following work for me? <script> document.getElementById('lbltipAddedComment').innerHTML = 'Your tip has been submitted!'; </script> <label id="lbltipAddedComment"&g..

What is the difference between .yaml and .yml extension?

I read them on YAML-wikipedia but not really understood the main difference between them. I saw there are someone using .yaml extension, however, Symfony2 use .yml extension. YAML is a human-readabl..

How do I prevent Eclipse from hanging on startup?

I am using Eclipse 3.3 ("Europa"). Periodically, Eclipse takes an inordinately long time (perhaps forever) to start up. The only thing I can see in the Eclipse log is: !ENTRY

base64 encode in MySQL

I want to select a blob col from one table, base64 encode it and insert it into another tables. Is there any way to do this without round tripping the data out of the DB and through my app?..

Pinging servers in Python

In Python, is there a way to ping a server through ICMP and return TRUE if the server responds, or FALSE if there is no response?..

How do I handle the window close event in Tkinter?

How do I handle the window close event (user clicking the 'X' button) in a Python Tkinter program?..

Delete files or folder recursively on Windows CMD

How do I delete files or folders recursively on Windows from the command line? I have found this solution where path we drive on the command line and run this command. I have given an example with a..

Unable to read data from the transport connection : An existing connection was forcibly closed by the remote host

I have a server app and sometimes, when the client tries to connect, I get the following error: NOTE: the "couldn't get stream from client or login failed" is a text that's added by me in catch st..

How to import multiple csv files in a single load?

Consider I have a defined schema for loading 10 csv files in a folder. Is there a way to automatically load tables using Spark SQL. I know this can be performed by using an individual dataframe for ea..

Purge Kafka Topic

Is there a way to purge the topic in kafka? I pushed a message that was too big into a kafka message topic on my local machine, now I'm getting an error: kafka.common.InvalidMessageSizeException: in..

HTML5 Canvas background image

I'm trying to place a background image on the back of this canvas script I found. I know it's something to do with the context.fillstyle but not sure how to go about it. I'd like that line to read som..

npm install doesn't create node_modules directory

I am trying to do a homework for a mongodb uni course. They gave us some files, instructions are: run npm install mongodb then node app.js for some reason npm install does not create a node_modules ..

Best practices for API versioning?

Are there any known how-tos or best practices for web service REST API versioning? I have noticed that AWS does versioning by the URL of the endpoint. Is this the only way or are there other ways to ..

How to deploy a React App on Apache web server

I have created a basic React App from here , I want to run this test code on Apache based server, I know that I need to create a distributable bu..