Categories
Mastering Development

Projecting eigenvectors for fisher’s linear discriminant analysis

I am trying to implement this feature selection method that also allows me to classify data. Following this: paper I have tried many workarounds and ways to implement this, but always my data gets weird. The public dataset that is made available has only to aquisition 1 and 4, to which i have extracted the […]

Categories
Mastering Development

Is there a way to read a file in C without a bunch of checks for sscanf and fgets?

In a program I’m writing, I’m currently doing the part of parsing an input file. I have to do input validation (to some degree), checking if sscanf parses the right number of variables and fgets isn’t null. But as a result, the main outline looks like this: int LINE_LENGTH = 100; int parseInput(FILE* fp, FILE* […]

Categories
Mastering Development

Want to assign language variable on GoogleTranslate startup

I’m using PHP and trying to assign a starting language variable ($lang) to Google Translate based on the country the visitor is coming from. Here is my code <?php if ($_SESSION[‘geoCountryName’]==”France”) { $userLang = “fr”; } ?> <script> /* example .. someone visiting from France */ var lang = “<?php echo $userLang; ?>”; function googleTranslateElementInit() […]

Categories
Mastering Development

How to hightlight the typed text in searchview in android

Hi in the MainActivity I was Implemented a Different Fragments.Now toolbar contains a searchview functionality I was added in my Activity. Now I search for text all the fragement are also searching for same text.But I want to clear the text which one i typed for last fragement. MainActivity: toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); setSearchtollbar(); public […]

Categories
Mastering Development

How can i find the playfield of a ludo game with OpenCV?

I am trying to find the play field of a ludo game. My output should looks like this (additional with points in middle of squares): output My output right now looks like this: actual Input image: input I can’t remove other contours from the image. I tried to do it with calculating areas. But the […]

Categories
Mastering Development

SQL JOIN query issue using ANY_VALUE provides inaccurate return

I have spend hours searching for this specific issue on the site though many are close not address it completely. Please link it if it exists and I will happily take down this question. I have two tables wb_states and wb_cities you can see by the keys: composite state_code+country_code & city_id are distinctive for their […]

Categories
Mastering Development

Stratified k-fold Cross Validation in R

Suppose I have a multiclass dataset (iris for example). I want to perform a stratified 10 fold CV to test model performance. I found a function in the package splitstackchange called stratified that gives me a stratified fold based on the proportion of the data I want. So if I want a testing fold it […]

Categories
User Help

OperationalError at /admin/products/product/add/ no such table: main.auth_user__old DJANGO [closed]

main.auth_user__old in django tutorial going through mosh created a web server.When saving some polls or products or set i get this error instead of going to be saved on the site. Heres the error OperationalError at /admin/products/product/add/ no such table: main.auth_user__old Request Method: POST Request URL: http://127.0.0.1:8000/admin/products/product/add/ Django Version: 2.1 Exception Type: OperationalError Exception Value: […]

Categories
Mastering Development

How to get a variable?

I want to insert a variable ttl into this conclusion: ‘rotate (‘”.c1″, 150, 100, “blue”, 60, “30 628″, -90);” instead of the number 628 after I insert the variable into the generation, the code stops working I inserted it that way. 1) rotate(“.c1”, 150, 150, 100, “blue”, 60, “30 ttl”, -90); 2) rotate(“.c1”, 150, 150, […]

Categories
Development

Given two functions, find a threshold such that one is always bigger than the other

I’ve implemented the following two functions in Python: def c(m, n): if m == 0: return 0 elif m == 1 and n >= 0: return n**2+n+1 elif m > 1 and n == 0: return c(m-1, 1) elif m > 1 and n > 0: return c(m-1, c(m, n-1)) def d(n): exp_num = n-1 […]