ibm-cloud

Cannot add Foreign Key on tables in DashDB / DB2 on Bluemix

与世无争的帅哥 提交于 2019-12-11 03:34:07
问题 When I create a table in DashDB (DB2) on Bluemix like this: CREATE TABLE DEPARTMENT ( depname CHAR (10) UNIQUE NOT NULL , phone INTEGER ) ; ALTER TABLE DEPARTMENT ADD CONSTRAINT DEPARTMENT_PK PRIMARY KEY ( depname ) ; CREATE TABLE EMPLOYEE ( "EmpNr" NUMERIC (3) UNIQUE NOT NULL , empname CHAR (20) , depname CHAR (10) , EMPLOYEE2_title CHAR (20) ); ALTER TABLE EMPLOYEE ADD CONSTRAINT EMPLOYEE_PK PRIMARY KEY ( "EmpNr" ) ; ALTER TABLE EMPLOYEE ADD CONSTRAINT EMPLOYEE_DEPARTMENT_FK FOREIGN KEY

How do I manage org and space users in bluemix using cf command line?

橙三吉。 提交于 2019-12-11 03:26:28
问题 Bluemix provides a CF command line for download to manage applications. We want to use CF (or any other command line tools ) to manage Organization and Space users. This will allow us to programmatically sync the user list. Specifically I am looking for cf enroll-user cf add-user cf remove-user cf unenroll-use the cf command already lists the users for a given ORG and SPACE. 回答1: The simple answer is to read the docs. See "Creating and Managing Users with the cf CLI." It documents commands

IBM DevOps Pipeline: How to Access Artifacts from Previous Job?

不打扰是莪最后的温柔 提交于 2019-12-11 03:15:21
问题 I have a build stage as shown below with two build jobs, a frontend and a backend job. How do I directly access the Build Archive Directory of the frontend job from the backend job's build script? I need to access the frontend build artifacts in order to properly build the final archive. And I can see all the artifacts show up in the Artifacts tab for the frontend build. But how do I access that from the second job, i.e. backend build? I saw here that there is an Environment variable to

How could I prohibit anonymous access to my NodeRed UI Dashboard on IBM Cloud(Bluemix)?

。_饼干妹妹 提交于 2019-12-11 03:05:14
问题 I'm working with node-red , on boilerplate IBM cloud. I know that there is a way, changing the value of enviroments variables(NODE_RED_USERNAME and NODE_RED_PASSWORD), to change username and password of the editor flow. But, what about UI dashboard? I mean using dashboard nodes. Forbid access to https://noderedservicename.mybluemix.net/ui/ I know that on the code, changing the variable httpNodeAuth on the file settings.js I can do what I want. What is the way for doing that on IBM Cloud?

how to connect a Java app ( java code ) to cloudant?

 ̄綄美尐妖づ 提交于 2019-12-11 02:17:38
问题 I've java code in eclipse and I've done all the set up required between eclipse and IBM bluemix cloudant service I am not sure how to update my code to enable cloudant in eclipse can someone please help ? 回答1: you need to add a piece of code in CloudantClient.java file under source directory of your project. Please add these lines in CloudantClient class: String VCAP_SERVICES = System.getenv("VCAP_SERVICES"); JSONObject vcap; vcap = (JSONObject) JSONObject.parse(VCAP_SERVICES); cloudant =

Publishing commands to device in IBM IoT using MQTT in Java

你说的曾经没有我的故事 提交于 2019-12-11 02:15:10
问题 I am currently trying to publish a command to a specific topic in the IBM IoT Foundation MQTT Broker using a Java web application. My application is already able to listen to device events and act on them, however publishing commands to the device is a problem. I know for sure that my device is listening to the proper topic for commands, so what could be the problem? More specifically, here is the command I call to publish to the topic (from my Java app): publish("iot-2/cmd/" + MQTTUtil

How can I train an intent in Watson conversation to accept any number?

你离开我真会死。 提交于 2019-12-11 01:47:56
问题 How can we train an intent to accept numbers and identify it as that particular state? For example, I'm training an intent to accept a price. If I type: What about 560? It accepts 560 but if I just type 560 it does not identify. 回答1: If you wanna combine the intent and the entity, you can simply ADD one more condition, e.g: if bot recognizes #yourIntent AND @sys-number response: "Do you want information about @sys-number?" Or, if you want to identify the number even ONLY it is entered by the

Watson visual recognition, classify against multiple classifiers in java

陌路散爱 提交于 2019-12-11 01:07:42
问题 I found this curl command in API document that can classify an image against multiple classifiers: curl -u "{username}":"{password}" \ -X POST \ -F "images_file=@batch1.zip" \ -F "classifier_ids=<classifierlist.json" \ "https://gateway.watsonplatform.net/visual-recognition-beta/api/v2/classify?version=2015-12-02" I wondered if it is possible to do this in java since I'm working on an android program using Watson's visual recognition service. thank you 回答1: Use this tutorial to set your Java

In Node-RED, how do I upload to a node with the given configuration and retrieve the configuration later?

旧巷老猫 提交于 2019-12-11 00:44:46
问题 I am using Node-RED on Bluemix, I want to let the user upload a document, here is the relevant code fragment in a function/template of a flow <form action="/upload" method="POST"> <h1>Upload PDF</h1> <input type="file" name="myFile" /> <input type="submit" /> </form> When I run it, I chose a file and press 'submit', but then comes the message Cannot POST /upload Then I went to http://flows.nodered.org/node/node-red-contrib-http-multipart , in the example there it says You can upload to a node

How to extract the values that return from the createRecognizeStream() method?

走远了吗. 提交于 2019-12-11 00:42:58
问题 Using Watson Speech to Text Services How to extract the values that return from the createRecognizeStream() method? Here is a chunk of the sample code. I am trying to see in the terminal the interim results but all i get is this. How do I set the options for the results to appear? { results: [ { alternatives: [Object], final: false } ], result_index: 0 } { results: [ { alternatives: [Object], final: false } ], result_index: 0 } { results: [ { alternatives: [Object], final: false } ]... they