abraham

1

votes
4

answer
44

views

How to fix " Python Return Method not returning the integer in a concatenated string

When the code is run it outputs, but not as required, it returns blank on all the percentages def income(): num= raw_input('Enter your Income: ') print 'Your income is: %d ' % int(num) return num income= income() def bills_expenses(): bills_kitty=0 bills_kitty=(income*(55/100)) return ('Your bills...
Wanjila Abraham
0

votes
1

answer
17

views

How to use multiple returned value from a python function in a robot file?

I have written a python function for fetching database credentials for different environments def database_creds(env): if env == 'staging' or env == 'qa': hostname = 'host1' username = 'user1' password = 'pass11' database = 'TestDb' elif env == 'production': hostname = 'host2' username = 'user2' pas...
Anju Abraham
1

votes
1

answer
93

views

Connecting to softlayer object storage using apache libcloud

Problem: Trying to connect to Softlayer Swift Object Storage using apache libcloud and I can't get it to work. I have tried passing in different options to the provider but no matter what I pass in I get the same error. I would appreciate any and all pointers to help me resolve this issue. Code: fro...
Abraham
1

votes
1

answer
88

views

Py2exe error converting tkinter to exe - 'module' object has no attribute 'tcldir'

I am having trouble converting a python3 script with tkinter into exe using py2exe. Without tkinter the program is successfully converted into exe. I have tried creating both normal and bundled exe but it throws the following exception everytime: running py2exe Traceback (most recent call las...
Melvin Abraham
1

votes
0

answer
58

views

How to Save .url files?

I want to create an app that is able to save urls in form of .url files, in the same way as some browsers do it, but on android. I intend it to work like those bookmark shortcuts that you can add to your homescreen. So these .url files will open a specific url even when clicked, even from a file exp...
Abin Abraham
0

votes
0

answer
5

views

Does the target_size parameter in Keras flow_from_directory reduce the image quality?

I am developing an edited image detector and to train the data I am using a CNN. While I was going through the code for CNN, I noticed that there is a parameter called target_size in flow_from_directory. Since my project involves feature detection using SURF, it requires images to be of the highest...
Abraham Jijo
1

votes
0

answer
30

views

How do I convert a waveform from arduino into a csv file that a user can download?

I am using the following code: void setup() { Serial.begin(9600); } void loop() { int val = analogRead(A0); Serial.println(val); } To plot the waveform onto the serial monitor. From there, I want to somehow convert the signal I receieve into a csv file for further analysis. What steps should I take?...
Abraham Dandekan
1

votes
1

answer
1.3k

views

How to get colourful integrated terminal (“cmd”) in VS Code

Recently after updating my VS Code I saw the following image in the Release Notes (in the Split terminal feature section) I can't figure out a way to add such Syntax Highlighting in my terminal. Obviously, this is bash in the integrated terminal. Well, I'm using Command prompt and I don't seem to...
Melvin Abraham
1

votes
1

answer
284

views

Providing user defined sample weights for knn classifier in scikit-learn

I am using the scikit-learn KNeighborsClassifier for classification on a dataset with 4 output classes. The following is the code that I am using: knn = neighbors.KNeighborsClassifier(n_neighbors=7, weights='distance', algorithm='auto', leaf_size=30, p=1, metric='minkowski') The model works correctl...
Jefferson Abraham
1

votes
2

answer
30

views

How to execute a callback with custom arguments in JavaScript

Is there a way in JS to execute a callback with custom argument(s) rather than no argument(s) at all, for example: btn.onclick = displayText OR operation.onComplete(displayText) Here, I want the callback displayText to be called with an argument like displayText('Hello World') rather than the defa...
Melvin Abraham
1

votes
1

answer
254

views

HLOOKUP with increasing row index number

Currently working on a way to export data from one program and import the data to a CRM using VBA. Using HLOOKUP, I'm able to consolidate several columns into one 'Contact Notes' section for each row of data. The HLOOKUP formula (below) is what works to consolidate the information: =$AU$3&': '& HLOO...
Abraham Walker
1

votes
0

answer
99

views

How to update total price based on number of quantity using javascript

I am building shopping cart using J2EE. What I need is how to update the total price when quantity changes? I have added product to the cart successfully but I couldn't update the price dynamically. Can anyone help me? var table = $('#cartTB'); $.each(data,function(i, value) { table.append ('× '+...
Abraham Arnold
1

votes
1

answer
111

views

SQL query result to XML - Orders, OrderDetails

I want to get all order details of a particular orderId. My table structure is I want the result 1 test1 10 1 1 Product1 5 2 1 Product2 5 My SQL query returns 1 test1 10 1 1 Product1 5 1 test1 10 2 1 Product2 5 My query is Select orde...
Jancy Abraham
1

votes
1

answer
99

views

How to generate all possible X sets of matchups for N teams split into N/2 pairs?

I wasn't sure how to word this question... Any suggestions or edits would be appreciated! I am trying to get all possibilities for a league schedule. I have 8 teams that are playing against each other for 12 weeks. Each week there are four time slots at which one pair of teams would play. How to spl...
Abraham
1

votes
0

answer
214

views

org.apache.http.client.HttpResponseException: Bad Request

I want to send JSON as a POST to my localhost server with LoopJ's AndroidAsyncHttp. When I run It gives this Error 400 - org.apache.http.client.HttpResponseException: Bad Request JSON data that I am sending {'username':'abraham','email':'[email protected]','password':'123'} Code public void invokeWS(JSO...
Abraham Arnold
1

votes
1

answer
40

views

send data that contains “/” with URL in Android

I am using web-services to insert data to the MySQL database. I have a String data that contains a path of an image like https://i.imgur.com/fmccR.jpg. And I am using LoopJ libarary to perform this task. String pic = 'https://i.imgur.com/fmccR.jpg'; client.get('http://0.0.0.0:8080/WebService/rest/i...
Abraham Arnold
1

votes
1

answer
329

views

Want to create a xml annotation files in VOC format using existing data from text annotation file. But cant do anything with the text within head

pls help me to create an xml as follows, images ss /Users/datitran/Desktop/raccoon/images/raccoon-1.jpg Unknown I could manage to get this given part. check the annotation in the above xml. images raccoon-1.jpg /**/raccoon/images/raccoon-1.jpg can you help me with the verified='yes' in annotatio...
Abraham Jose
1

votes
1

answer
58

views

The Label breaking with character - automatically in Redmi Note 4 device

I'm trying to display a label in my Redmi not Device. But the word is breaking with - at the end. I want the whole word to be displayed in next line instead of breaking the word. For example Welcome to Lighthouse, the PSAV online customer followup prog- ram designed to ensure a one-on-one approach t...
Judson Abraham
1

votes
0

answer
191

views

Bridge Class Functions in React Native

Say I have a class called ExampleClass. Say I then write code like so: @objc(ExampleClass) class ExampleClass: NSObject { @objc class func exampleFunc() -> Void { } } With an Objective-C file header like so: #import #import @interface RCT_EXTERN_MODULE(ExampleClass, NSObject) RCT_EXTERN_METHOD(exa...
Abraham P
1

votes
0

answer
25

views

Passing an argument to a function of class from C# using ironpython.

NET programming and I don't know how to pass an argument from .NET to a class function in python script supported by ironpython Here is my .cs script. using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; using IronPython.Hosting; namespace PrintToConsole { int...
Abraham Jose
1

votes
0

answer
480

views

How to install and run an apk file in Xamarin forms?

I want to install and run apk file in my SD card. I have code through which I'm trying to fetch the apk file but I have no clue how to install and open it. This is my code so far MainPage.Xaml.cs private void Button_Clicked(object sender, EventArgs e) { DependencyService.Get().ApkInstall(); } SDCar...
Judson Abraham
1

votes
2

answer
53

views

A javascript code dont work when I use it on a function

I'm starting to use javascript and my problem is that: I have this code, that works without problems: var btn = document.createElement('BUTTON');// Create a element btn.setAttribute('type', 'button'); // input element of type button btn.setAttribute('value', 'prueba'); btn.setAttribute('id', 0); va...
Abraham
1

votes
1

answer
135

views

Pass Optional JSON to Swift from react-native

Say I have the following Swift class: @objc(ExampleClass) class ExampleClass: NSObject { init() {} @objc func exampleMethod(_ message: String, _ properties: [String: Any]? = nil) -> Void {} } And the following Header: #import #import @interface RCT_EXTERN_MODULE(ExampleClass, NSObject) RCT_EXTERN_...
Abraham P
1

votes
1

answer
978

views

how extraction decision rules of random forest in python

I have one question though. I heard from someone that in R, you can use extra packages to extract the decision rules implemented in RF, I try to google the same thing in python but without luck, if there is any help on how to achieve that. thanks in advance!
abraham foto
1

votes
1

answer
171

views

Unresolved reference thread

I am attempting to spin up a new thread in kotlin for android, using kotlin.concurrency.thread However I keep getting: Unresolved reference: thread I thought this was in the standard library? Actual code: fun identify(userId: Integer) { thread() { CustomExceptionHandler(context) DoStuffClass.doStuff...
Abraham P
1

votes
2

answer
61

views

Perform TAB action until active element is the required element - Python

I want to perform TAB action until I have reached a particular web-element. Until the active element is the below mentioned element, TAB action has to be performed. >name = driver.find_element_by_name('name') >name.send_keys('ABC') >group = driver.find_element_by_name('group') >group.send_keys('DEF...
Abraham
1

votes
1

answer
57

views

When I take a python string that contains an &, and call upper() it changes the & to & Why?

This my first question here so let me know if I'm doing something wrong. I've just gotten into python, and I'm running into an issue with ampersands and upper(). That works just fine: print('a&a'.upper()) > A&A However, when taking a string out from a list of strings, and then running .upper(), the...
David Abraham
1

votes
1

answer
837

views

How to read a local JSON file in React JS + Typescript app and access the data?

I am trying to read a local JSON file in ReactJS + Typescript office add-in app. I created a typings.d.ts in the src folder and added the following. declare module '*.json' { const value: any; export default value; } declare module 'json!*' { let json: any; export default json; } I imported the file...
Joseph Abraham
1

votes
0

answer
305

views

Edit Data with pgAdmin 4

I have a table with over 5 million records. The view/edit data allows you to get all or first 100 or last 100 rows. How do I select a specific row to edit?
Abraham Bruck
1

votes
0

answer
86

views

How to find out why my query on postgreSQL is locked?

I have a query which I run it on my postgreSQL every 30 minutes and I expect postgresSQL to answer me in about 1 second (based on the size of the DB table). Almost all times I receive the query response in the expected time (~1 second). But sometimes I don't receive the answer and I don't receive an...
Abraham
1

votes
0

answer
172

views

FireSharp QueryBuilder return null

i hope this question afford all the standards.Im trying to do a notification service using Firebease with the firesharp library.Im able to connect my app and insert data into my firebase, and, if i ask for an specific object, im able to retrieve the content,but is not what i need.The idea is being c...
1

votes
1

answer
45

views

Yii2 Duplication of Model - row

when a model attributes are edited or updated I do not want that record to updated. Instead a new record should be created and the old record should be disabled. Also I have another log table where the old record is saved. My code is given below public function afterSave($insert, $changedAttributes)...
Ignatius Abraham
1

votes
1

answer
31

views

Using subdependencies in npm script

Say I have a private npm package, @myprivate/repo which has the following contents in its package.json: 'scripts': { 'example': 'db-migrate' }, 'bin': { 'foo': 'bin/foo' } Where bin/foo is: #!/bin/bash npm run example I now pull this into a parent repo with npm install: package.json: { 'dependencies...
Abraham P
1

votes
0

answer
98

views

Constraints created as NO CHECK are getting created as CHECK after publishing the dacpac

I was publishing my dacpac solution into a database. What i am seeing after the publish is that the constraints that were dropped and re-created in the publish process is created as CHECK constraints. On Googling about the issue i found that there was a property called 'Script Validation For New Con...
Anoop Abraham
1

votes
0

answer
23

views

Listview search filter result incorrect

When I click list item from search result, return to 0 position. How do I get original position from string? I have a list with personalized rows, the situation is that when I click on an item I get a good result, the problem is that when I search and click it, I do not get the result I expected. My...
Abraham Rodríguez
1

votes
1

answer
100

views

why is gcc linking dynamically when -l is used?

I did a 'Hello World' program using the pthread library. I compile it this simple way: $ gcc main.c -lpthread According to gcc Documentation ('Options for Linking' section): -llibrary [...] The linker searches a standard list of directories for the library, which is actually a file named liblibrary....
Abraham Sanchez
1

votes
0

answer
64

views

C3P0 dont work (org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider)

I recieved this warning when I execute my app: sep 22, 2018 5:59:36 PM org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator c3p0ProviderPresent WARN: HHH000022: c3p0 properties were encountered, but the org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider pr...
Abraham
1

votes
1

answer
151

views

Error while creating a python file executable

I have been using nuitka to compile python to create executable so that I do not have to share the source code with others. While this has been working well, recently I ran into issues with python programs using pandas When I run the following command: nuitka --recurse-on et.py I get a warning: Nuit...
Babuji Abraham
1

votes
0

answer
21

views

Can't find a module saved in another subdirectory

I have a Python file that I'm trying to import into a session. The file structure looks like the following -object_detection --__init__.py --export_inference_graphy.py --protos ---__init__.py ---pipeline_pb2.py From the export_inference_graph file, I'm trying to import pipeline_pb2. However, I ge...
Abraham Mathew
1

votes
0

answer
65

views

I can not directly access an url in Angular

I have a problem with a simple application. I already have it in production, but when I access a URL directly, I get an error: In firefox: In chrome: But if I access localhost:8080, it is redirected to /home correctly: I am using the following code: In app.routes.ts import { RouterModule, Routes } f...
Abraham Morales

View additional