Почему бы не использовать его?
$scope.get_location=function(url_str){
var parser = document.createElement('a');
parser.href =url_str;//"http://example.com:3000/pathname/?search=test#hash";
var info={
protocol:parser.protocol,
hostname:parser.hostname, // => "example.com"
port:parser.port, // => "3000"
pathname:parser.pathname, // => "/pathname/"
search:parser.search, // => "?search=test"
hash:parser.hash, // => "#hash"
host:parser.host, // => "example.com:3000"
}
return info;
}
alert( JSON.stringify( $scope.get_location("http://localhost:257/index.php/deploy/?asd=asd#asd"),null,4 ) );
Я использую для этого параметра добавления:
import numpy as np
matrix_1 = np.random.uniform(1, 10, (256, 1))
matrix_2 = np.random.uniform(1, 10, (256, 1))
print(matrix_1.shape)
print(matrix_2.shape)
print('-------------')
out_matrix = np.append(matrix_1, matrix_2, axis=1)
print(out_matrix.shape)