Related to : PIL import png pixels as single value instead of 3 values vector

Scaling a Single Column Vector of a Matrix in R 
You can assign it to the columns that is being changed
A[,1] < A[,1]*10
A
# [,1] [,2]
#[1,] 10 2
#[2,] 30 4
data
A < matrix(c(1,3,2,4), ncol=2)

How can I plot a surface using a function with a single vector or array input using matplotlib? 
If the input x is a 3D array representing a regular mesh, you can do,
assuming a shape (2, m, n):
def f(x, sign=1.0):
x1 = x[0, :]
x2 = x[1, :]
# Objective function
out = sign*(x1**3 + 3*x1**2  2*x1*x2 + 3*x1 + x2**3 + 3*x2**2 +
3*x2)
return out
such that out will be a 2D array with shape (m, n), ready to be plot
with matplotlib:
ax.plot_surface(x[0, :], x[1, :], f(x), c

how to know if there is a consecutivly increasing five values in a vector 
Use diff to compute changes and conv to accumulate over a window of
n=5 consecutive values:
n = 5;
result = any(conv(double(diff(A)>0), ones(1,n), 'valid')==n);
The variable result will be 1 (true) if the condition is met, and 0
(false) otherwise.
You may want to replace > by >=.
If you need to know the starting indices of each run of n consecutive
positive changes, use find instead

How can I format values from std::vector to std::string efficiently? 
This should be trivial to write efficiently. Try this:
#include <algorithm>
#include <cstdint>
#include <iterator>
#include <string>
#include <vector>
std::string to_hex(std::vector<uint8_t> const & v)
{
std::string result;
result.reserve(4 * v.size() + 6);
for (uint8_t c : v)
{
static constexpr char alphabet[] = "0123456789ABCDEF"

Using Scanner to import enum values 
You will have to convert string into your enum manually. For example:
public static Weekday getWeakdayForString(String s)
{
switch (s) {
case "monday": return Weekday.MONDAY;
case "tuesday": return Weekday.TUESDAY;
...
case "sunday": return Weekday.SUNDAY;
default: throw new IllegalArgumentException();
}
}
In Java 8, there is predefined DayOfWeek

