2018-10-22         Eunice

Training H2O Stacked Ensemble Models using exported Mojo and Binary Models

I am trying to build stacked ensemble models using H2O Java APIs. For this, I trained 2 modelsA GBM Model A DRF ModelI exported these models in both Mojo and Binary format. For exporting models, I used the following code snippet:For Mojo Format Export: water.api.ModelsHandler modelsHandler = new ModelsHandler(); water.api.StreamingSchema streamingSchema = modelsHandler.fetchMojo(3, modelsV3); //water.api.schemas3.ModelsV3For Binary format Export: water.api.ModelsHandler modelsHandler = new ModelsHandler(); modelsHandler.exportModel(3, modelExport...

 java                     1 answers                     49 view
 2018-10-22         Eunice

How can invoke a shell to make a new environment to run a make inside another make?

I would like in my GNUmakefile to have a target rule that invokes a new shell and then with the clean slate of the new shell invokes a new make.What is the syntax to do this?I tried this but it didn't work:.PHONY: setupsetup: shell cd myDir; make; cd ..It gets infinite repeat of the following error:make[1]: Entering directory `/disk4/home/user/parent'shell cd myDir; make; cd ../bin/sh: shell: command not foundmake[1]: Entering directory `/disk4/home/user/parent'shell cd myDir; make; cd ../bin/sh: shell: command not found[...] The parens are not necessary. Every line in a...

 recursion                     3 answers                     82 view
 2018-10-22         Eunice

Understanding "Access Denied" in spring security with custom authentication

I am trying to get a grasp of Spring Security andafter quite some work (and help on SO) I was able to implement some custom authentication mechanism in spring security but now I have some authorization issue I don't really understand. If I make a POST-request to localhost:8080/login?username=admin&password=sesamOeffneDich&secondSecret=youNeedMe I receive 403 access denied.If someone could explain why, I would be thankful.My configuration is as follows:@Configuration@EnableWebSecurity@EnableWebMvc@ComponentScanpublic class AppConfig extends WebSecurityConfigurerAdapt...

 java                     1 answers                     52 view
 2018-10-22         Eunice

Combine all printed string get from text file in to one list

I am trying to Combine all printed string get from text file in to one listMy Textfile: https://drive.google.com/open?id=18tYvYs43vA7ib3br1h1VD75OUU5ho1u8My Full Code:allinstall = open("save_all_install.txt", "r",encoding="UTF-8")search_words = ["'DisplayName'"]for line in allinstall: if any(word in line for word in search_words): # Get the front Display Name Part k=line.split('\n')[0] #Get the Position I want for excat display name print(k[17:-5]) list = k[17:-5].split(',') # How do I modified here? list.extend(list) ...

 python                     1 answers                     86 view
 2018-10-22         Eunice

add 2 hours in current time in Python and print the time in timestamp

How to get the current time and return that in timestamp format after adding 2 hours in it like 1535020200000i tried the following but I am not getting the expected resultcurrent_time + timedelta(hours=2)(datetime.now()).split('.')[0] + timedelta(hours=2)since the second one returns a string, addition operation cannot be done I would recommend the following from datetime import datetime, timedeltatwo_hours_from_now = datetime.now() + timedelta(hours=2)print(two_hours_from_now.timestamp()) [XXX]If you need a timestamp, use time.time:current_plus_2_hours = time.time() +...

 python                     4 answers                     71 view
 2018-10-22         Eunice

Properly using environment.ts in my angular4 application with angular-cli

I use Intellij Ultimate to code my angular 4 application.I created a new Angular 4 project, it contains environment.ts and environment.prod.ts and the environments are properly configured in angular-cli.json.how do I import it in my code? Since actually when I build it I state which environment to use. How does it work? Do I need to compile something with Intellij?I tried googling and found many examples when people actually imported a specific environment.ts file. but that's not good, right? Since it will use the same environment.ts file even if I build for a different env...

 angular                     4 answers                     96 view
 2018-10-22         Eunice

uninitialised value and clang optimizations

I have created a program to print "Hello World" string as bellow:#include <stdio.h>#include <stdlib.h>#include <string.h>static void callString(char *_string);int main() { char *myString;// Allocating memory myString = (char *)malloc( (unsigned long)strlen(myString) * sizeof(char) ); myString = "Hello World!"; callString(myString); // should I free(myString) here? return 0;}static void callString(char *_string) { printf("%s\n", _string);}Compiling and running reports:$ clang -Wall -Weverything -g hello.c -o hello$ ./hello...

 c                     1 answers                     27 view
 2018-10-22         Eunice

Setting persistent cookie from Java doesn't work in IE

All,Although I see related topics on the forum, but I don't see a clear solution on this issue.I am trying to set a javax.servlet.http.Cookie with an expiration time (so that it persists across browser sessions). Code:public void respond(HttpServletRequest req, HttpServletResponse resp) { int expiration = 3600; Cookie cookie = new Cookie("TestCookie", "xyz"); cookie.setDomain(""); cookie.setVersion(0); cookie.setPath("/"); cookie.setMaxAge(expiration); cookie.setSecure(false); resp.addCookie(cookie);}I don't see this cookie being set when I check in ...

 cookies                     3 answers                     52 view
 2018-10-22         Eunice

ORA-06502: character string buffer too small. Even though the string size is under declared size limit

FOR this_loop IN (SELECT field_A, field_B FROM TABLE_NAME WHERE num = i_num) LOOP IF this_loop.field_B BETWEEN 1 AND 3 THEN v_A := v_A || ' ' || this_loop.field_A; ELSIF this_loop.field_B BETWEEN 4 AND 8 THEN v_field_A := v_field_A || ' ' || this_loop.field_A; -- Error is at this line ELSIF this_loop.field_B BETWEEN 9 AND 15 THEN v_B := v_B || ' ' || this_loop.field_A; END IF; END LOOP;Variable decalared asv_field_A VARCHAR2 (100);What I know -Variable v_field_A cannot hold value more...

 sql                     5 answers                     16 view
 2018-10-22         Eunice

Unit test and SQL database Connection

I am having a problem with a unit test I have created. First time doing this so I am not sure why I am getting this error<DeploymentItem("ETDS.exe")> <DataSource("System.Data.SqlClient", "Data Source=Foo;Initial Catalog=FooDB;Integrated Security=True", "User_Names", DataAccessMethod.Sequential)> <TestMethod()> _Public Sub ValidateUserNameTest() Dim target As Login_Accessor = New Login_Accessor ' TODO: Initialize to an appropriate value Dim expected As Boolean = True ' TODO: Initialize to an appropriate value Dim actual As Boolean actual = targe...

 sql-server                     3 answers                     30 view
 2018-10-22         Eunice

Starting a dead node of Percona XTradb cluster

We have a Xtradb cluster with three nodes. There is one node, which was not properly stopped and won't start. The other two nodes are correctly working and responding. The only thing in logs is this:-- Unit mysql.service has begun starting up.Aug 25 04:40:45 percona-prod-perconaxtradb-vm-0 /etc/init.d/mysql[2503]: MySQL PID not found, pid_file detected/guessed: /var/run/mysqlAug 25 04:40:52 percona-prod-perconaxtradb-vm-0 mysql[2462]: Starting MySQL (Percona XtraDB Cluster) database server: mysqld . . . . .Aug 25 04:40:52 percona-prod-perconaxtradb-vm-0 mysql[2462]: failed!...

 percona                     1 answers                     9 view
 2018-10-22         Eunice

Can't Unzip Files in Docker VM (Boot2Docker) / Windows 7 / CRC Error

Moin moin,I'm unable to unzip files like eclipse.tar.gz with e.g gunzip.Neither in DockerFiles with ADD url nore when I use wget on the File.$ wget http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/neon/1a/eclipse-jee-neon-1a-linux-gtk.tar.gz&mirror_id=96 $ gunzip eclipse-jee-neon-1a-linux-gtk.tar.gzI always get a CRC error. When I unzip the File with Windows there is no CRC error. They have the same CRC and the same MD5sum. I already changed the baseimage (debian/ubuntu), I used tar/gunzip and it happens when I build the images and wh...

 docker                     1 answers                     103 view
 2018-10-22         Eunice

How to install Ruby on Rails alongside WampServer?

Is is possible to install Ruby on Rails alongside WampServer (and keep WampServer's Apache/MySQL installs)? I installed Ruby on Rails alongside WampServer. Here is how to do it:Replace C:\wamp\ in the following text by your own WampServer's install repository.Installing Ruby:Download Ruby. Use the Windows binary version, not the "one click installer" because it contains MySQL and Apache which we don't need.Extract the zip to C:\wamp\ruby\.Add Ruby's bin repository in your PATH environment variable:Right click "Computer / Properties".Click "Advanced System Settings".Advan...

 ruby-on-rails                     4 answers                     93 view
 2018-10-22         Eunice

Connect Azure Data Marketplace to SQL Server 2008 R2

Is there a way to connect SQL Server 2008 R2 to the Azure Data Marketplace to enable data import? Are there any ODBC or JDBC drivers for the Azure Data Marketplace? I'm a bit confused by the question. Is this about publishing data through the Windows Azure Marketplace and sourcing it from SQL Server? Or is it about accessing published data from an application and bringing that data into your own app?If the former: You may choose to host your data in SQL Server. When you sign up for data hosting in the Windows Azure Marketplace, you'll provide the requisite connection str...

 azure                     1 answers                     32 view
 2018-10-22         Eunice

What when mysqldump becomes utterly slow

Currently my database is almost 20 GB big and still growing.I'm taking a daily backup with mysqldump and it's getting really slow.So slow that in the meanwhile new connections stack up and eventually cause this error:SQLSTATE[HY000] [1040] Too many connections(I could improve the amount of connections that's accepted but that won't do anything because the connections are still just frozen, waiting for the backup to complete, which will lead to timeout)I've been reading up on some options to improve the speed and this is what I've found:option --quick (Will probably help)opt...

 mysql                     1 answers                     16 view
 2018-10-22         Eunice

Argument of type 'any[]' is not assignable to parameter of type 'A'. Property 'a' is missing in type 'any[]'

I'm a very beginner in TypeScript and now I'm trying to understand how interfaces works in a Class Method of React Component. I created a simple case for it, but it does not work. I always gets an error like in this post title.I'll be pleased for any help.import React, { Component } from 'react'interface A { a: any[]}class Test extends Component { _getName = (a: A) => { return a } render() { const a = [] return ( <div>{this._getName(a)}</div> ) }}export default Test this._getName(a) expects a to be of type A. A is defined as an object...

 javascript                     3 answers                     24 view

Page 1 of 144  |  Show More Pages:  Top Prev Next Last