Aman..

1

votes
3

answer
80

views

Generate lexicographic series efficiently in Python

I want to generate a lexicographic series of numbers such that for each number the sum of digits is a given constant. It is somewhat similar to 'subset sum problem'. For example if I wish to generate 4-digit numbers with sum = 3 then I have a series like: [3 0 0 0] [2 1 0 0] [2 0 1 0] [2 0 0 1] [1 2...
Aman_X
1

votes
2

answer
4.2k

views

Renaming workspace root path in perforce

I have two perforce workspace roots in the same directory on Windows. For example: C:\Perforce_windows_workspaces\wkspc1 C:\Perforce_windows_workspaces\wkspc2 I need to rename the folder 'Perforce_windows_workspaces' to something smaller (say p4wkspcs), so that the new paths to the roots will be: C:...
aman
1

votes
1

answer
23

views

pandas splitting a string in columns into multiple records

I have a dataframe as df col1 col2 col3 a;b;c w;x 1 d;e;f x;y 2 g;h;i z;u;v 3 I want to split each of the string in columns col1 and col2 into separate records, so that the dataframe looks something like this col1 col2 col3 a w 1 b x 1 c NaN 1...
Aman Singh
1

votes
0

answer
187

views

NLTK: Auto suggestion for query completion using grammar

I want to implement Auto-Suggestion for question completion (Refer Section 3.2) for my FCFG using nltk APIs. E.g. Consider the following CFG grammar: S -> NP VP NP -> Det NN | PropN VP -> V NP | V V -> 'eats' | 'sleeps' | 'ate' Det -> 'a' | 'an' | 'the' NN -> 'police' | 'horse' | 'apple' | 'potato'...
Aman Gill
1

votes
0

answer
46

views

Transferring Data from CollectionView inside TableView to a New ViewController

So I have a main ViewController that has Horizontal Scrolling CollectionViews inside a TableView. When you click on an Item in the CollectionView it transfers all the data from the Item to a new ViewController to display it properly. The problem I am facing is when you click on the item in the Coll...
Aman Chawla
1

votes
1

answer
1.1k

views

How to FCM send notifications using node.js to a particular package name [duplicate]

This question already has an answer here: How can I send a Firebase Cloud Messaging notification without use the Firebase Console? [closed] 11 answers I have been working on a project for quite a while and I have been using Firebase in it. I have implemented every Firebase stuff that is required by...
Aman
1

votes
0

answer
1.2k

views

Getting an error certificate signed by unknown authority

I am trying the 'Deploying a Hyperledger Composer blockchain business network to Hyperledger Fabric (multiple organizations)' tutorial and I am stuck at the composer network ping stuff. The ping commands fails giving this error 'Error: Error trying to ping. Error: Error trying to query business netw...
Aman C
1

votes
1

answer
85

views

Not able to select any other column except the first 1 in pandas dataframe

Searched alot on the internet to understand the issue. Tried most of it but in vain. I am reading a tsv file which is tab delimited. import pandas as pd df = pd.read_csv('abc.tsv',delimiter='\t', engine='python', encoding='UTF-8') When I print the columns, I am getting this: Index(['date', '​time...
Aman Rathi
1

votes
0

answer
187

views

After running count query on influxdb entire system gets freeze and influx memory spikes up high

I have 50 million rows in influxdb table, when i tried to run count query to get number of rows in my existing table, all other process gets killed because of OOM and finally influx gets shutdown with same reason. please suggest me a solution why it's hapenning? Edit: json_body_part = { 'measurement...
Aman Jain
1

votes
0

answer
198

views

How to create a dynamic reporting platform using .net framework

I recently saw a reporting application in a small firm that would enable them to create and share reports very easily in few simple steps listed below: --Create a procedure in the database to get the relevant data for the new report. --Login to the reporting platform as an admin. --Choose your newly...
Aman Kumar
1

votes
2

answer
323

views

Tomcat In-Memory Caching - replication on Cluster

I have a question on Tomcat clustering. I have a java application in which we have implemented in-memory caching. So basically when Tomcat starts, it loads a few objects from the database. These objects are stored in the tomcat memory like static objects. so whenever we update something from the app...
Aman Mohammed
1

votes
1

answer
145

views

find polygon which contains the point using postgis/postgres

I have 2 tables and both of them contain 2 columns. The first table contains 50 million rows while 2nd table contains 50 rows Table1 - Columns: point_coord (datatype: point), id (integer) Table2 - columns: region (datatype: geometry - they are polygons), id (integer) The id column in the 1st table i...
Aman
1

votes
1

answer
192

views

JqGrid: Autocomplete in form fields

I am using free version (latest) of jqgrid with MVC c#. I have form fields setup. When the user clicks add in the footer button (add) it shows a modal popup with all the form fields. I want my first textbox in the form field to autocomplete, ie when they start typing their empployee number in the t...
aman
1

votes
0

answer
126

views

pygame.error: display Surface quit

I am creating a python proram where we can play the classical snake xenzia game using our hand gestures and not keyboard. In this as soon as my snake gets hit on the border it the pygame window is destroyed. I then re initialize in the game function but that doesnt seem to do the trick and throws an...
aman
1

votes
1

answer
62

views

Teamcity not excluding folder

I am using Teamcity version 2017.2 (build 50574) I am trying to create a zip archive artifact after successful build of my WPF app to be deployed using ClickOnce However, teamcity is not excluding the folder and I still see it in the zip Here are rules in my artifact paths section of teamcity: //put...
Aman B
1

votes
1

answer
61

views

SQL Query to extract Average Quantity

I want to calculate the average quantity customer purchases in one basket (Where 1 Basket = Multitple purchases in 1 day) from the table transaction and update it into cust360.average_basket_Qty Transactions:- Trasactions_ID cust_id Tran_date Qty Total_amt 80712190438...
Aman kashyap
1

votes
0

answer
30

views

Show progress status of each dowloaded files

I'm developing an application where I have to download some large files (approx 200MB -250MB) and show it's real time download progress status on web even if window is closed and reopened.It should also update the file status if downloading became fail of individual file Something like this name...
Aman Maurya
1

votes
3

answer
65

views

Extract state with maximum count from subquery

Select a.states,MAX(a.cnt) from (Select ci_location.state as states,Count(CI_Location.State) Cnt from Fact_Transactions ft Inner join CI_Location on ft.ID_Location = CI_Location.ID_Location Where id_model like 'smsg%' Group by State)a Group by a.states,a.Cnt Output:- State Count Alabama...
Aman kashyap
1

votes
1

answer
170

views

Memory issue with mongo in node

I am facing memory issues with my node app. Took some heapdumps and saw a lot of mongo objects being held in the memory which is causing the node app to run out of memory. I have the following setup for my app. MongoDB 3.4.13 Mongoose 4.11.10 (tried 4.13.11 and 5.0.7 also) Node 8.9.4 config.js const...
Aman Agarwal
1

votes
1

answer
122

views

How do I create a mirror having multiple images in threejs?

I try the code of creating mirror in three.js from official website. It uses Reflector.js which can show only one reflection of object. I want to show multiple images when two mirrors are placed at different angles. How can I achieve it? Please help me. The code of creating mirror is - Mirror 1 - v...
Aman
1

votes
1

answer
333

views

Create SSL endpoint on port 443 for self-hosted OWIN listener

I am using a self-hosted OWIN listener for a Web API implementation that runs in a local process. However, I am unable to listen on port 443 successfully. The following works: var startOptions = new StartOptions(); startOptions.Urls.Add('http://127.0.0.1:9866'); startOptions.Urls.Add('https://127.0....
aman
1

votes
1

answer
65

views

Minimize the profit, job scheduling with deadline

I am facing problem in calculating minimum profit for given 5 jobs with deadline. Profits are (P1,P2...P5)=(20,15,10,1,6) and deadlines are (2,2,1,3,3) respectively. My solution for this question is: +----------+----+-----+---------+ | Deadline | 1 | 2 | 3 | +----------+--------+---------...
Aman Sharma
1

votes
1

answer
236

views

how to reduce time complexity of fibonacci series to n in c

calculating fibonacci no. using recursion fib(n): if n==0 or n==1: return 1 else return fib(n-1)+fib(n-2) In PYTHON it takes time complexity between (sq.root 2)^n and 2^n but using dictionary we can reduce it to n. So, my question is there something in C PROGRAMMING to reduce the time complexity
Aman Garg
1

votes
2

answer
233

views

Extract and plot data from a file in python

I have some data stored in a file (xyz.dat) in the following format: 1 0.997790664988225E+000 0.100177762164687E+001 0.100034262755073E+001 2 0.997788473973293E+000 0.100177969047903E+001 0.100034273413754E+001 3 0.997782981718032E+000 0.100178486093194E+001 0.10003...
Aman_X
1

votes
2

answer
96

views

ui.position.left not working with css margin: 0 auto

I want to build a scrollable menu that should use margin: 0 auto; Below is my codepen where it is working fine because I didn't use css margin: 0 auto (refer css panel .wrap class). But this has two issues: It is not scrolling end to end - Codepen url: codepen.io/VK009/pen/PRKmNP While using margin:...
Aman verma
1

votes
2

answer
75

views

Implement an interface defined in a Library

I have my Android Library which defines an Interface for registering the library to get callbacks. I need my application to implement the interface. But this leads to circular dependency, how can this be achieved without invoking circular Dependancy. Project Structure: MyApp-/ . class LibraryImpl im...
Aman Mishra
1

votes
0

answer
149

views

Hangfire: Check the status of Windows service

We have created hangfire background job as the windows service. Sometimes what happens is the windows service goes down with some reason or the other as its a shared server. I wanted to know if there is any way to check the state of the windows service from hangfire to see if the service is running...
aman
1

votes
0

answer
49

views

LineBox is misaligned when emoji is present

Running this code: import urwid icon = u'\U0001F600' top = urwid.Padding( urwid.LineBox( urwid.Filler(urwid.Text(icon, align='center') )), width=10) urwid.MainLoop(top).run() Displays this: Why is the LineBox misaligned? Any ideas or solution?
Aman Agrawal
1

votes
2

answer
40

views

sql query: how to pick only 1 row with highest value of column2 after doing ORDER by on column1

I've a table like: col1, col2, col3 8 6 xyz 8 4 abc 9 2 def 4 3 ghi 9 5 jkl I'd like to write a query which picks highest value of col2 for each unique col1 value, i.e. col1, col2, col3 4 3 ghi 8 6 xyz 9 5 jkl I...
Aman Jain
1

votes
0

answer
113

views

cursor: pointer not working in mac safari in ::before without anchor tag

I am using cursor:pointer to show hand when mouse over on light-grey box inside in dark-grey box by using check::before css, its working fine in chrome but not in mac safari. I don't want to use anchor tag for this. Below is my code:- div.check{ width:300px; height:300px; background: grey; posit...
Aman verma
1

votes
1

answer
460

views

Laravel php artisan config:cache throws Uncaught RuntimeException: A facade root has not been set. After installing new composer package

My laravel project was working all fine in its development environment after including a php dependency Shopify/shopify-php: ^0.11.0 and doing a php artisan config cache. Everything went fine until i pulled the same branch into a different directory and did a composer install for new dependency to r...
Aman
1

votes
1

answer
51

views

Consume Spring Boot REST service in JBOSS Seam Application

I was interested to know if a Spring Boot REST service can be consumed in a JBOSS Seam Application. If yes, what would be the steps. Thank you in anticipation.
Aman
1

votes
0

answer
214

views

Getting the gradients of multiple outputs in TensorFlow and not their addition

As mentioned in the documentation, if I have multiple outputs say y1, y2.. yn, tf.gradients returns d(y1 + y2 + ... yn)/dx. But is there a way to get the individual gradients dy1/dx, dy2/dx, ... dyn/dx in one go without iterating through each output? Trying to be more precise, if I have 10 inputs, a...
Aman Dalmia
0

votes
1

answer
20

views

Get variable of Class inside onclick function

I'm getting a problem where I cannot access the national variables of a Class inside the onclick function of another variable of the same Class. I have made a small demo where I assign a message and return a button which should show the message, but it keeps printing undefined because it can't find...
Aman
1

votes
1

answer
483

views

ReactNative: Disable the Activity Indicator only after navigation to a new page is completed

I'm new to React Native. I have coded a Login page and Profile page. On Login.js page I have state: this.state = { email: '', password: '', authenticating: false, } Once you hit the Login button after entering correct details, loginUser function gets executed: loginUser = (email, password) => { this...
Aman Deep Sharma
1

votes
1

answer
26

views

space in style css in Angular-2+ animations

https://angular.io/guide/animations in angular 4 animations in state style why prefix is not supported? in this plunker https://plnkr.co/edit/ALfIp5nfno2uxBgXEBST when i am trying to add css style animation-delay: 2s; in state style state('visible', style({ left: '0', transition: '650ms ease-in-out'...
Aman
1

votes
1

answer
63

views

Set different style for each text view inside a custom relative layout view

I have created a custom view with multiple child text view and image view. Each child view has its own style. But I am struggling to set the custom style to these child views programmatically. Here I have created the three styles InfoBoxTitle, InfoBoxDescription, InfoBoxExtraDetail. public class In...
Aman Jain
1

votes
1

answer
81

views

Random Number Generator in C++ for skipList

I wanted a random number generator for skiplist implementation and got the following logic. Can I get an explanation of how here random numbers are getting generated. I see use of bit wise operator but not able to understand the logic. #include #include using namespace std; typedef unsigned int...
Aman
1

votes
2

answer
1.1k

views

Does Kafka broker store metadata?

Does Kafka broker store metadata which producer API uses (e.g. which partitions are leader for a topic etc.)? As per my understanding this metadata is stored in Zookeeper , is it correct? If it is true then how Brokers are updated by Zookeeper with latest information?
Aman

View additional