Categories
Mastering Development

modalPresentationStyle not updating the data

The below code can show the ratings screen using modal or i can push it. if i use modal i can see the animation effect and not in pushed controller method, the animation are defined in a view class separately, but in case of pushed i can see the ratings gets updated instantly but not […]

Categories
Game Creation Mastering Development

Who is you?.. you is two

I’m working on a game design.. it’s about split brain people not split personality it’s not psychological it’s physical. watched brain on fire and I did a lot of research please help me with the story and give me some ideas <3 and this is what I came up with: Who is you?.. you is […]

Categories
Mastering Development

Unresolved reference (vars) in Fragment class, MVVM, Viewmodel

Sup guys. Beginner here, let s do it. I’m following UDACITY free course on developing Android apps with Kotlin and I’m actually at the Viewmodel/MVVM part of the lesson, ie implementing Viewmodel classes for a better separation of concerns. So anyway, Im blocked right now. The exercise I’m on is about creating the Viewmodel class […]

Categories
Development

Why does ADODB.connection object swallow errors?

When I create a connection to a database using the ADODB.Connection object to create a connection to a SQLServer database, I expect that when I use a throw statement I expect to have records in the conn.Errors collection. Instead, if I do any of the following two, the Errors collection will be empty: Return any […]

Categories
Development

ValueError: Tensor Tensor(“activation_11/Softmax:0”, shape=(?, 5), dtype=float32) is not an element of this graph

When I run my model in a separate file it runs fine but when I run my model with flask code it gives me an error don’t know why am I facing this problem. I have tried some solution from StackOverflow itself which says to try adding these lines after loading the model and prediction […]

Categories
Development

Plotting and labeling each bin in a histogram

I have a dataset that contains categories (labels) of different emotions. You can see which categories from the “labels” variable defined in the code below. Each of these categories has a different amount of data available in this dataset, and I’m trying to represent the distribution of the dataset through histogram bins. import matplotlib.pyplot as […]

Categories
Development

amcharts doesn’t represent data in right format

I’m retrieving value from database and pushing it to amchart (XYChart) the value of x Axes not working correctly. this is the chart code var chart5; function generateChart5(json) { chart5 = am4core.create(“chart5-data”, am4charts.XYChart); chart5.data = json; var dateAxis = chart5.xAxes.push(new am4charts.DateAxis()); dateAxis.renderer.minGridDistance = 50; function createAxisAndSeries(field, name, opposite, bullet) { var valueAxis = chart5.yAxes.push(new am4charts.ValueAxis()); […]

Categories
Development Java Javascript

What is the best way to show the ‘closest’ value based on a number in Javascript? (e.g. 1=Happy, 2=Sad, if 1.6, return Sad)

As the topic states what is the best way to show the closest value based on a number in javascript? Assume that ‘Glad’ is the same thing as ‘Happy’, and ‘Down’ is the same thing as ‘Sad’. I have the following code, but it just seems incredibly lengthy and gets bloated with more states (i.e. […]

Categories
Development

How can I get unique words from a DataFrame column of strings?

I’m looking for a way to get a list of unique words in a column of strings in a DataFrame. import pandas as pd import numpy as np df = pd.read_csv(‘FinalStemmedSentimentAnalysisDataset.csv’, sep=’;’,dtype= {‘tweetId’:int,’tweetText’:str,’tweetDate’:str,’sentimentLabel’:int}) tweets = {} tweets[0] = df[df[‘sentimentLabel’] == 0] tweets[1] = df[df[‘sentimentLabel’] == 1] the dataset I’m using is from this link: http://thinknook.com/twitter-sentiment-analysis-training-corpus-dataset-2012-09-22/ […]

Categories
Development

Error with Python For Loop within Function

So I am trying to better understand functions and using for loops to select from multiple lists. Here is the basic function that I created and it does work: def my_function(person, feeling): print(‘Hello, %s, how are you? It seems that you are feeling %s!’ %(person, feeling)) my_function(‘Matthew’, ‘rejuvinated’) But to take this further, I would […]