Categories
Mastering Development

I expect a mesh of quadrilateral polygons but unexpectedly get a straight line?

I am following: How can I plot 2d FEM results using matplotlib? to plot a 2D FEM result. My code is: import matplotlib.pyplot as plt import matplotlib.collections import numpy as np def showMeshPlot(x, y, elements, values): y = x z = y def quatplot(y,z, quatrangles, values, ax=None, **kwargs): if not ax: ax=plt.gca() yz = np.c_[y,z] […]

Categories
Mastering Development

Oracle text phrase error (DRG-50920). Query parsing and SYN function

I just started working with Oracle Text, already red the docs but I really struggle to find a solution. Currently using with progressive relaxation but I keep getting the following error: ORA-29902: error in executing ODCIIndexStart() routine ORA-20000: Oracle Text error: DRG-50920: part of phrase not itself a phrase or equivalence 29902. 00000 – “error […]

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
Development

find all substring in a string in python

how can I make it better? is there any algorithm/method to make it better and shorter? def sub_string_finder(string): given_string = string.upper() substring_of = [] length = len(given_string) # find all substring and put it in substring array for i in range(length): for j in range(i + 1, length + 1): substring_of.append(given_string[i:j]) return substring_of s = […]

Categories
Chrome Development Java Javascript jQuery

Line 14 of my JavaScript(

Line 14 of my JavaScript( inside HTML) code will not run automatically, It will only run in the chrome developer console manually. <script src=”https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js”></script> <center ><div id=”preloader”><iframe src=”preloader.html” height=”500″ width=”800″></iframe></div> </center> <center> <script> $(“#navbar”).load(“nav_bar.html”); var el = document.getElementById(“preloader”); var newEl = document.createElement(‘div’); newEl.innerHTML = ‘<div id=”raze2″></div>’; setTimeout(function(){ el.parentNode.replaceChild(newEl, el); }, 5200); $(“#raze2”).load(“flashmath2.github.io/Play%20Raze%202%20Unblocked%20Game%20online%20-%20Unblocked%20Games.html”); </script>

Categories
Development jQuery

puppeteer press Enter on input type search

I want to press key enter, after fill a input, but nothing happens, it is not a link or button to click <div class=”search-input”> <a class=”search machin” style=”display:none;z-index: 0;position: absolute;”></a> <input type=”search” id=”global-search”> //events jquery keypress and keyup <a class=”close-search” style=”z-index: 0;”> <i class=”m times”></i> </a> </div> jquery : function(t) { return “undefined” != typeof […]

Categories
Development

How do I generate tables simply and fast in R?

I’m not asking for the str() or glimpse()-commands but for a better way of generating tables. Let’s say I want to see if my background variable (gymnasiegrov) affects my result variable (totstatus_bin). I then write vettig_tabell<-table(fulldata$gymnasiegrov,fulldata$totstatus_bin) I then have to convert this do a data frame in order to make it easily readable in Rstudio: […]

Categories
Development JSON

Object.assign() for replacing objects of a json

I have JSON looks like this: { “ArrayInfo”: [ { “name”: “A”, “Id”: “1” }, { “name”: “B”, “Id”: “2” }, { “name”: “C”, “Id”: “3” }, { “name”: “D”, “Id”: “4” } ] } I want to replace an object of JSON with another object.For example I have this object : {“name”:”E”,”Id”:”5″} and it […]

Categories
Development Google

Google Active Script: using map in an array with 2 arguments

This works: Suppose I want to use in an ArrayFormula() the indirect() function, which doesn’t work. That is, supposed I type this in cell E1, =ArrayFormula(indirect(address(row(E:E),column(A:A)))), this will return the value of cell A1 in all the cells in column E. To circumvent this, I created the custom function below: function retValue(cell){ if(cell.map) { return […]

Categories
Development

Large Matrix for text classification model [on hold]

The dataset is composed by a very large products items and the goal is text classification (categories names as target -Multiclass-) based on product titles (More than 200.000 products with a 40 characters length in average & 7 words) This it´s a very interesting post for reference The result it´s a sparse matrix using text2vec […]