karan

0

votes
0

answer
3

views

Vuex store unable to update component data

I am trying to create a HN clone in 2 panes, but for some reason my vuex store is unable to update the component data. This is the project link since there are too many files involved. https://github.com/karansinghgit/hn-vue This is what it looks like. My aim is to click on one of the articles on th...
Karan Singh
0

votes
1

answer
21

views

Using multiple operators with operator overloading gives strange error

I have a single class called FloatTensor. I have overloaded operators for + and * in that. Here is the code. class FloatTensor { public: float val; // value of tensor float grad; // value of grad Operation *frontOp =NULL, *backOp =NULL; FloatTensor* two; FloatTensor() { // default } FloatTensor(flo...
Karan Chahal
0

votes
0

answer
3

views

Get a count of bugs group by user (who is assigned to story to which bug is raised/related)

I like to know the count of bugs group by the user who worked on the user story to which the bug is raised or related in Azure DevOPs(VSTS). I am able to write a query in vsts which is a type of "Work item and Direct Query". It gives me the list work items and shows the bugs as child items. But char...
Amitava Karan
1

votes
1

answer
990

views

Getting entities of a certain type using entity frameworks return error - LINQ to Entities does not recognize the method 'System.Type GetType()'

I am trying to filter out entities of a certain type. I am using Entity Framework, and I have a parent entity, and various children that inherit from the parent entity. I am trying to filter out one of these children. For example, I have the following structure: Address : Entity PostCode : Address...
Karan
1

votes
3

answer
24

views

Create bean of legacy classes without modification and without xml configuration

I have some existing legacy helper class without bean annotation and without xml configuration. I want to create beans for same classes without modification (without adding annotations) and without any extra configuration in xml. Is it possible?
Karan Rajput
5

votes
0

answer
21

views

How does it send slight different emails to multiple recipients, though having them in common 'to' section?

So I was trying mixmax - the chrome extension and got to know it tracks email open event even though the same mail is sent to multiple recipients and it is able to identify receivers properly. I checked and found that it adds different pixel URLs for all receivers, mail looks same (that's not my con...
Karan Shah
1

votes
1

answer
180

views

How does $all operator works with $elemMatch in mongoDB?

please provide explanation of this mongoDB query. db.inventory.find({ qty : { $all : [ { $elemMatch : { size: "M", num : { $gt : 40},color : "green" }} ,{ $elemMatch : { num :100 , color : "green"}} ]}}).pretty()
Karan Patel
1

votes
1

answer
804

views

Kendo angular grid column pass dataitem in ng-template

I am using Angular 5.2 with Kendo controls. Inside the grid i have a button with a click property. I want to pass the PID value into the showwindow function as a parameter. Here is the code sample:- Here is the button click handler i want to change :- Please suggest the solution.
Karan
1

votes
2

answer
62

views

Firebase dependencies causing error at runtime

Error: Type com.google.android.gms.common.internal.zzf is referenced as an interface from com.google.android.gms.internal.zzbwa gradle(app) implementation 'com.google.firebase:firebase-storage:16.0.5' implementation 'com.google.firebase:firebase-auth:16.1.0' implementation 'com.google.firebase:fireb...
Karan Khurana
1

votes
1

answer
875

views

Split the text file in python

I have a text file with some records having similar fields. name: Class: Subject: name: Class: Subject: As above mentioned this file can have any number of records and I want to separate each record with respective fields. Following is how far I could reach in order to pursue this problem. def count...
Karan
1

votes
1

answer
76

views

Updating a column in mysql with help of another table

I have two tables in the database: First Table: Students Field Type Null Key Default id int(11) NO PRI NULL class_id int(11) NO PRI NULL admission_id int(11) NO PRI NULL school_id int(11) NO PRI...
Karan
1

votes
1

answer
336

views

How to compute vector product if there are imaginary numbers, in Prolog?

I am trying to multiply two vectors in Prolog but, if those vectors contain imaginary numbers, I can't get it to work. My code so far: vector_product([X|Xs],[Y|Ys],OP) :- inner(Xs,Ys,OP1), OP is X*Y+OP1. vector_product([],[],0).
Karan Gurnani
1

votes
4

answer
1.4k

views

Search from a table using values of a column of another table

Suppose i have two tables. table one: | col1 | - - - - - | do | | big | | gone | table two | col1 | col2 | col3 | col4 | - - - - - - - - - - - - - - - | do | blah | blah | big | | big | do | blah | gone | | blah | blah | blah | blah | how do i search from table two such that rows which are...
Karan Jit Singh
1

votes
3

answer
1.6k

views

Why is my code printing 'None'?

My code can be found here: https://github.com/thekarangoel/HackerNewsAPI/blob/master/hn.py The test case is this: from hn import HN hn = HN() for story in hn.get_top_stories()[:10]: print story.print_story() print '*' * 50 print '' This prints my output like so: ..... ..... ..... *******************...
Karan Goel
1

votes
1

answer
994

views

How to perform a click on alertDialog PositiveButton programatically?

I have this code in which I want to programmatically click the positive Button of an AlertDialog that was shown before the current AlertDialog. Down below is the code: ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterfac...
karan singh
1

votes
1

answer
1.3k

views

How to set autolayout constraint for UITextView

I have tried a lot to set auotolayout constraint for UITextView. But when i run , i get blank screen . I tried the same way in UIButton , that worked !!!!! Is there any property to be set to assign constraint for UITextView ???? UITextView *text1; text1=[[UITextView alloc]initWithFrame:CGRectMake(50...
Karan Alangat
1

votes
1

answer
187

views

Cannot Install ruby-audio on OSX-10.9.2 Mavericks

I recently update my OSX version to 10.9.2. The ruby-audio gem is failing with the following warnings and errors. What can I do so that libFLAC.8.dylib can be found? gem install ruby-audio -v '1.6.1' 31 warnings generated. compiling ra_soundinfo.c compiling rubyaudio_ext.c linking shared-object ruby...
Karan Verma
1

votes
1

answer
233

views

Convert dataset datatables into IList<DataTable> type

I have a dataset which contains multiple datatables. Now i want to copy over these datatable into IList object. var tables = new[] { DT1, DT2 }; //I want to change this line of code to pull the datatables from the dataset. bool test = Funx(tables); private bool Funx(IList tbls) { ///some operatio...
Karan
1

votes
2

answer
3.8k

views

What is need of Assign/Deassign in Verilog?

I am here giving here 2 Verilog modules, which during simulation behaves same. But I don't understand that why to use assign/deassign in these modules, i.e. what is the difference between these 2 codes? // Code 1 - Without assign-deassign module dff (q,qbar,clk,reset,d) input clk, reset, d; output r...
Karan Shah
1

votes
3

answer
643

views

Typecasting integer to pointer to integer in c

I saw somewhere in a pthreads program something like this... #include #include void *fxn(void * t) { //some code } int main() { //some code pthread_create(&thread,NULL,fxn,(int *)5); //some code } Here, what is (int *)5 doing? and why is it not generating a warning/error? Also, how is it different f...
Karan
1

votes
1

answer
261

views

Upload a file ruby using selenium

I want to upload a file from remote url in ruby using selenium My tools:- watir-webdriver selenium-webdriver Upload a file:- browser.file_field(:id, 'file').set("https://www.google.co.in/logos/doodles/2015/holi-festival-2015-5124794139803648-hp.gif") Error:- Errno::ENOENT: No such file or directory...
karan
1

votes
1

answer
5.1k

views

Control 'txtUserName' of type 'TextBox' must be placed inside a form tag with runat=server

I have this error - Control 'txtUserName' of type 'TextBox' must be placed inside a form tag with runat=server. I am unable to get rid of it, my text box is placed inside a form tag with runat=server. The page which I am getting this on is my 'reset password' page I want the users to be able to ent...
Karan Ramchandani
1

votes
2

answer
3k

views

How to run maven tests sequentially

I have different class with each class have one or more tests. I want to run the maven tests with each class in a sequential order using testing.xml testing.xml When i ran below command , its runs all the test. But i want to run the test specified in testing.xml one by one on sequential order. mvn -...
karan
1

votes
1

answer
3.5k

views

How to find id in Android App Using UIAutomator Viewer

I am writing automation test for Android/ios Mobile Apps. If someone has references to it.Let me know the sample code. I have an Android app in which the Text elements is drawn It extends View And its drawn in onDraw method using Canvas Where will the text present in the UIAutomator snapshot Snapsho...
karan
1

votes
1

answer
2.7k

views

Creating a altjs flux store for fetching data from API

I'm stuck trying to figure out how to write a flux store and action that works in just fetching data from my express API using altjs import $ from 'jquery'; const utils = { myProfile: () => { return $.ajax({ url: '/myProfile', type: 'GET' }); } }; This is how I believe I should write my GET request...
Karan
1

votes
1

answer
1.8k

views

How to delete url in git

I am pushing data to github. When I push data i am facing problem.I am pushing data using this. git init touch README.md git add . git commit -m "initial commit" git remote add origin https://github.com/YourAccount/firstPush.git git push -u origin master Actuall I run git remote add origin https://...
Karan Kumar
1

votes
1

answer
149

views

Writing code for multiple Api versions for those variables and methods which are deleted in newer versions

According to these changes on Android 6.0 I am unable to compile my code as this line Browser.BOOKMARKS_URI generates cannot resolve symbol error. I have tried writing code like this if(Build.VERSION.SDK_INT < Build.VERSION_CODES.M){ mCur = ctx.getContentResolver().query(Browser.BOOKMARKS_URI, Brows...
Karan Nagpal
1

votes
2

answer
46

views

why can't I give separate declaration and defintion of a variable in global scope in c++

#include using namespace std; int temp; int b=2; temp = b; int main(){ cout
Karan Gogna
1

votes
2

answer
446

views

How does this code use promises to sequentially fetch urls and load it sequentially to html?

I am new to javascript promises, I read a tutorial on promises at JavaScript Promises.The given code appears under the heading "Creating a sequence". Basically story is a JSON object which has chapterUrls array containing links to various chapter JSON objects.getJSON(url) makes a GET request and on...
Karan Joisher
1

votes
1

answer
495

views

What is memory -cache in memory plugin of collectd?

In the memory plugin of collectd , there are four attributes - Memory used Memory Free Memory buffer Memory cache What does each of them mean ?
karan sindwani
1

votes
2

answer
68

views

Python extraction of variable length text from a file

I have a text file which has data like Tweet_id:"123456789", "text":"What an episode", "truncated":"false",Tweet_id:"12345678910", "text":My number is fascinating", "truncated":false I want to extract only the text field Tweet_id:"123456789", **"text":"What an episode", "truncated"**:"false",Tweet_i...
Karan Jain
0

votes
0

answer
5

views

How to make quicksight visualizations dynamic

I started to play around with quicksight recently. While creating my very first dashboard I realized that the the dashboard is not dynamic. By dynamic I mean suppose I select one attribute within a table eg a manager name all other graphs should also adjust automatically like how it happens with tab...
Karan Kashyap
0

votes
0

answer
13

views

Angular 5 - Dynamic base reference is causing duplicate loading of chunks

I am using Angular 5.2 version in the project. I am setting the base reference dynamically in the index.html to satisfy the different URL for different clients. The app main page url looks like this :- http://example.com/client1/app/login http://example.com/client2/app/login http://example.com/cli...
Karan
2

votes
2

answer
521

views

Best code structure for arcade games [closed]

I've developed a few arcade games so far and have the following structure in almost all of them: I have 1 file which contains a class called kernel with the following functions: init() welcome_screen() menu_screen() help_Screen() play_game() end_screen() And another file, called Game, which basica...
Karan
2

votes
1

answer
604

views

Hidden Markov Models instead of FSM in a first person shooter game

I have been working on a course project in which we implemented an FPS using FSMs, by showing a top 2d view of the game, and using the bots and players and circles. The behaviour of bots was deterministic. For example, if the bot's health drops to below a threshhold, and the player is visible, the b...
Karan
2

votes
1

answer
2k

views

How to Use Array.Exists with the Multi-dimensional string array

I have a multi-dim string array something like this:- string[,] names = new string[2, 2] { {"Rosy",""}, {"Peter","Albert"} }; Now i want to check the existence if the second index (Albert) holding the string is non-empty in the whole array. I just to check the existence of the non-empty string value...
Karan
1

votes
2

answer
1.9k

views

GO: Object in another file (same package) throws undefined error

File: $GOPATH/src/scratch_go_code/main/main.go package main import "fmt" func main() { fmt.Println("Hello World") cloud := Cloud{} cloud.Say() } file $GOPATH/src/scratch_go_code/main/cloud.go package main import "fmt" type Cloud struct{} func (Cloud) Say() { fmt.Println("I'm a cloud in the main pack...
Karan
1

votes
4

answer
1.2k

views

Counting words starting with a character

Write a function that accepts a string and a character as input and returns the count of all the words in the string which start with the given character. Assume that capitalization does not matter here. You can assume that the input string is a sentence i.e. words are separated by spaces and consis...
Karan Thakkar
1

votes
4

answer
51

views

get most recent record from json having epoch time

I am creating app using angularjs.I have json like: { "dps": { "1455719820": 0, "1455720150": 0, "1455720480": 0, "1455720810": 0, "1455721140": 0, "1455721470": 0, "1455721800": 0, "1455722130": 0 } } I want to get the value of most recent time from json. I don't know how can i do this.
Karan
1

votes
2

answer
3.6k

views

How to know Storage Account is associated with Azure VM or HDInsight Cluster

I have create more than 3 storage account and 3 VM and 3 Clusters. Storage Accounts: Storage Account 1 Storage Account 2 Storage Account 3 I want to know Storage Account 1 is associated with how many VM and Clusters. How can I find it via Azure Portal ?
karan

View additional