Sid Sid
1540 questions
1
votes
2
answer
91
views
What's a shorter way of writing this code?
I have made this excel VBA code through a macro recording and would like to know a shorter way of writing it with some sort of input loop maybe?
The sheet has two inputs which vary with respect to time, these are found in cells (B5:Y5) and (B8:Y8). The code picks up the first input (B5) and pastes i...
1
votes
2
answer
647
views
Angular 2 app not working - Blank page
I am using Chrome browser, Angular 2 with TypeScript. Following is my code;
index.html
Angular 2 - Simple Reddit
System.import('app.js')
.then(console.log('app.js Loaded!!'), console.error.bind(console));
app.ts:
import { Component } from '@angular/core';
import { NgModule } from '@angular/core';...
1
votes
1
answer
358
views
How to deploy golang application on gcloud
Hi i am trying to deploy a golang application on gcloud using command on ubuntu:-
gcloud app deploy app.yaml index.yaml
But i am getting an error as follow:-
ERROR: (gcloud.app.deploy) Error Response: [9] Deployment contains files that cannot be compiled: Compile failed: /work_dir/github.com/stretch...
1
votes
0
answer
301
views
Profiling GPU code for power draw and resource utilization
I am trying to calculate the power consumption of different kernels of my OpenCL code for my MJPEG decoder. I used the following command to calculate the power consumption and resource utilization of various kernels by using the following command (This is just an example):
nvidia-smi -q -d POWER,UTI...
1
votes
0
answer
118
views
Unable to generate property of type JSON using hibernate reverse engineering
I am using MySQL 5.7 inno DB and have a DB table with one column of type JSON. When i use hibernate reverse engineering to create POJOs, the entity java class is created for the table but the property type is Character. How do i get JSONObject or String type property for JSON column using hibernate...
1
votes
2
answer
1.5k
views
How to close http client connection after getting the response?
I am using http client to send a request. I want to make sure I am closing the connection after the response is received.
code:
public class WebserviceCall extends AsyncTask {
// interface for response
AsyncResponse delegate;
private final MediaType URLENCODE = MediaType.parse('application/json;char...
1
votes
0
answer
103
views
Trouble in translating C code into an OpenCL kernel
I have been unsuccessful in translating the following C function into an OpenCL kernel.
void Function2(int32_t *input, uint8_t *output, int32_t input_inter[64])
{
int32_t Y[64];
for (int i = 0; i < 64; i++)
Y[i]= input_inter[i];
int32_t k, l;
for (k= 0; k < 8; k++)
{
idct_1d(&Y(k,0));
}
for (l=0; l...
1
votes
0
answer
363
views
Python: Read multiple excel sheets, add column and append it to one dataframe
I have a All Fields Data frame with all the columns(headers) in it.
I have to read a excel workbook which have 25 sheets but i only have to read 10 sheets out of it. So i am passing the list of the files in a nested for loop to read the sheets and name of the sheets are like 'Labour M1','Travel M1',...
1
votes
1
answer
443
views
saveAsTable for column with spaces failing
I have a piece of pyspark code the converts a dataframe into a physical table:
df.write.mode('overwrite).saveAsTable('sometablename')
In case the dataframe, df, contains columns which have spaces in their names it fails with the following error:
18/03/08 10:33:29 ERROR CreateDataSourceTableAsSelectC...
1
votes
1
answer
159
views
How to add a new navigation button in telerik radwizard
I want to add a new navigation button in telerik radwizard(reference). Is there any way to do so in ASP.NET, I read all the documents shared by telerik but couldn't find a way to achieve it. Any help would be appreciated.
1
votes
1
answer
146
views
Installing python packages in a different location than default by pip or conda
How do you use a Python package such as Tensorflow or Keras if you cannot install the package on the drive on which pip always saves the packages?
I'm a student at a university and we don't have permission to write to the C drive, which is where pip works out of (I get a you don't have write permiss...
1
votes
1
answer
576
views
Settings to use Chrome with tor proxy?
I am having a strange issue. I have used the below code for a while to launch a anonymous wedriver instance, however somehow my settings of Chrome have refreshed and now the traffic is not going through the proxy. I tried making changes to the code and the chrome options but I can't figure out what...
1
votes
2
answer
36
views
Adding zero filled nd-array to existing image returns a modified image
So for some ml work I am doing, I need to be able to generate random images and add them to existing images. For testing, I am generating these random images and multiplying them by zero, then adding them to my existing images. I would expect to receive a new image which is identical to the original...
1
votes
0
answer
42
views
MySQL allows creating a table using JSON and traditional data types? Is it a good design
In my project, I am creating table using traditional data types like INT, VARCHAR and mixing it with columns of JSON datatype.
E.g Create table EMP as EMPID INT, EMPProfile data JSON.
What are the pros and cons of this approach?
I am inclined to use JSON as the data in it is very specific to the u...
1
votes
2
answer
32
views
1
votes
0
answer
49
views
Copy unique row to pandas dataframe?
I have an excel workbook with multiple sheets with some sales data. I am trying to sort them so that each customer has a separate sheet(different workbook), and has the item details. I have created a dictionary with all customernames.
for name in cust_dict.keys():
cust_dict[name] = pd.DataFrame(colu...
1
votes
0
answer
203
views
Stub request when request body is different
Hi I am working on RoR project with ruby-2.5.0 and Rails 5. I am stubbing an http request with stub_request. This http request is basically a mailjet api request to send email.
So, I can not just reuse the snippet, rspec spits out to me, because body differs on every execution.
Stub request
stub_re...
1
votes
4
answer
336
views
Autolayout to Dynamically Resize UILabel not working
I tried to create dynamic UILabel with every possible way but its not working for me.
I have created UITableViewCell with .xib file as below :
And Loading above cell on tab table view cell click with dynamic height by using UITableViewAutomaticDimension.
It working well but I want UIlabel with yello...
1
votes
0
answer
118
views
Keycloak authentication on socket io
I am trying to find out how to authenticate a socket io connection with keycloak. I have used successfully keycloak.protect() function as a middle ware in express, but I am at loss when it comes to socket io.
I want something similar to this.
app.get('/examples',keycloak.protect(), function(req, re...
1
votes
0
answer
113
views
Fractional maxpool makes runtime die on google colab
So I am trying to use fractional max pool in Keras with Lambda wrappers on CIFAR-10,but whenever I try to train the model the runtime dies. Any clues on what's happening? I am using Keras v2.0 with tensorflow backend.
def frac_max_pool(x):
return tf.nn.fractional_max_pool(x,[1.0,1/sqrt(2),1/sqrt(2),...
1
votes
0
answer
39
views
StringWrite built using a JAXB Marshaller shows “<” rather than “<” when viewed using POSTMAN
I'm building a web service and application project. Service stores the data within a local XML file containing bookInfo. Web service has a method to view all the booksInfo stored inside this XML file. Therefore, to read the XML, I'm using JAXB and unmarshalling it to POJO
UnMarshalling
AllItems item...
1
votes
1
answer
32
views
how to send Windows to commands to a job which is running inside a pipleline
Hi i have a jenkins job called Handler which need these windows commands to get libraries and to execute sucessfully
nuget sources Add -Name library -Source url
nuget restore c:\jenkins\workspace\ELD-Workspace\Handler
Where ELD-Workspace is a Repo in jenkins
Handler is a job inside this Repo
Im wri...
1
votes
0
answer
141
views
No handler found for uri [/<index>/<type>/] and method [POST]
Hi i am working on a RoR project with ruby-2.4.0 and rails 5. I am using elasticsearch for searching in my app. I have a model venue_details as follows:-
class VenueDetail < ActiveRecord::Base
include Tire::Model::Search
include Tire::Model::Callbacks
settings index: {
number_of_shards: 1,
number_...
1
votes
3
answer
48
views
GridView item height is mismatched with other
I am using a grid view. It shows issue in some devices. One item of the grid view looks shorter in height than others.
It looks like this in some devices, and in some its fine.
Layout :
Item layout
EDIT : Added item layout of the grid view.
How can I manage the height of each item? What is the solut...
0
votes
0
answer
6
views
Regular expression for duplicating conditions in every if statement
I'm writing a Regular Expression in Notepad++ to duplicate and modify certain if conditions.
For instance:
if (variable1 == '') should become
if (variable1 == '' or len(variable1) == 0)
The key things I need to match are the variable names until the =='' so I can duplicate them for the or condition...
1
votes
0
answer
468
views
java.lang.IllegalStateException: SinchClient not started
I am following the tutorial (https://www.sinch.com/tutorials/android-app-to-app-voip-tutorial/) to develop an Android app-to-app voice calling feature.
Please let me know suggestions to fix this.
Thanks
Siddharth
Scenario Details
For calling side I created an app via this tutorial : github.com/sinch...
1
votes
0
answer
181
views
Read password protected pdf in python?
I am trying to read a password protected pdf, I have the password.
I tried the following
from PyPDF2 import PdfFileReader, PdfFileWriter
input_path = r'D:\report.pdf'
output_path = r'D:\report'
output_file = 'report_test.pdf'
passowrd = 'REDACTED'
def decrypt_pdf(input_path, output_path, password):...
1
votes
0
answer
28
views
how to change variable value inside runnable? or how to reset data counter by button press?
I was working with trafficstats app from the below link:
datastats app github
The above app when run gives traffic data from when the device was booted.
I need the data traffic in the last hour or so.
So is there a way to initialise the counter to 0 by pressing button? So far I am stuck at this:
pub...
1
votes
0
answer
15
views
How can i capture the account and date field data and include them as columns using python
We get a lot of excel files which have data sets like below (Image1):
In this data the first set of data belongs to account number 12314234 dated 2019 and the second set of data belongs to account number 2345345 dated 2018. The main issue in this type of data is to capture these account numbers and...
1
votes
0
answer
351
views
CSS: How to show color picker in dropdown or select?
I am using Vue.js (which I don't think have anything to do with this issue) and a color picker package vue-color. What I want to achieve is following:
A button or rectangle element have color as selected color when clicked show a menu type dropdown with color picker. User can pick color here, and wh...
1
votes
1
answer
338
views
includePath in VSCode w/ MSYS2
Try as I might, I simply cannot get VSCode to find ANY headers I've specified in includePath and browse->path. Here is my c_cpp_properties.json file. Surely VSCode should be able to find curses.h after this:
{
'configurations': [
{
'name': 'MSYS2',
'includePath': [
'C:/msys64/mingw64/include/ncurses...
1
votes
0
answer
499
views
jupyter Kernel is busy all the time, How to debug
Whenever I create or run any notebook, the kernel keeps loading. I reinstalled the Miniconda and anaconda both as well but the kernel doesn't get set. Tried to change the browser as well.
I'm not able to debug the issue.
jupyter notebook screenshot.
Here is the bug report I got:
[D 14:09:37.864 No...
1
votes
0
answer
485
views
Why do I get <built-in method title of str object at 0x7fb554f9f238> instead of the value ?
I am trying to retrieve the title attribute from book_title but I get instead. I have passed the book_title as a parameter to the route book and have assigned the respective value of book_title in booktitle.html
Here, is my route
@app.route('/search//',methods=['GET','POST'])
def btitle(title):
bo...
1
votes
0
answer
37
views
How can I make a newly created row clickable to a URL? (DataTables) [duplicate]
This question already has an answer here:
How to add an onclick event on a newly added row (DataTables)?
1 answer
How to make datatable row or cell clickable?
5 answers
make column data as hyperlink (dataTable JQUERY)
3 answers
dataTables make clickable to link
1 answer
$.getJSON('/stData/' + a...
1
votes
1
answer
355
views
How to Show Laravel Vue Js Errors
I am learning Vue.js I have successfully made this registration form and its working fine
but I'm having a problem in showing errors.
register.vue page
Name
Email Address
{{ errors.email }}
Password
Confirm Password
Register
This is my scripts in register.vue page working registration fine
export de...
1
votes
1
answer
80
views
Desktop Bridge Application Launch & Localization Issues
I have a legacy win32 application which I tried converting using the DAC providing the .msi from the application installer and the application works as is post conversion. But I have few queries below.
I used the same Base Image as my OS version for the conversion. But the converted application isn'...
1
votes
0
answer
181
views
How to calculate estimated standard error in R for survey data without using survey design?
I want to know how you generate estimates of standard error without using survey design for the given examples.
library(survey)
data(api)
dstrat
1
votes
2
answer
35
views
Fetch key inside a json object in php jquery
I am returning a json data to jquery using php. what i want is to access the keys inside the json. i followed a tutorial and used json stringify but im not able to access the keys.
json data :
[
{'id':'1','movie_name':'spiderman','releases_on':'20th August 2018'},
{'id':'2','movie_name':'batman',...
1
votes
0
answer
126
views
Get CellID & Location Area Code(LAC) in iOS using Swift
I managed to get mcc, mnc values from CoreTelephony framework. But no luck with getting cellID & LAC. Any idea how to get those values in Swift?
1
votes
1
answer
30
views
how to write unit test for spring integration xml code
Im new to spring integration,I want to write unit test cases for my application. I'm working on an application where integration interface will be called by other system with XML input we transform the input XML using XSLT and will make a call to different system and the response will be sent to the...