Categories
Ask Mathematics

How can one solve this differential equation? (Optical Fibers with a tanh(x) index)

The differential equation for a optical fiber with a refractive index $n(r)$ is given as $$\nabla^{2}_{\perp}A(r,\theta)+(k^{2}n(r)^2-\beta^2)A(r,\theta)=0.$$ which is separable in cylindrical coordinates, $A(r,\theta)=R(r)\Theta(\theta)$. The radial DE follows as $$ r^{2}R”+rR’+[r^{2}(k^{2}n(r)^{2}-\beta^{2})-m^{2}]R=0. $$ For a step function index ($n_{0}>n_{1}$, $\Delta \equiv n_{0}-n_{1}$), $$n(r)=\cases{n_{0} : r\leq a\\n_{1}:r>a} \implies R(r)=\cases{c_{1}J_{m}(r\sqrt{k^{2}n_{0}-\beta^{2}}) : r\leq a\\c_{2}K_{m}(r\sqrt{\beta^{2}-k^{2}n_{1}}):r>a}$$ the radial part becomes a Bessel […]

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

Problems with shape files

I want to make a map with the coronavirus infected people by state in US . So the idea is to visualize a map with all states of US and see a range of infected people( i.e 500-2000 , etc) in all the map. This should be represented by different shades of one color. The […]

Categories
Development

Nested decode in where clause

I have a cursor that fetches address for the id passed, based on the latest activity date. CURSOR get_address_upd_c ( id t1.id%TYPE ) IS SELECT street_line1, street_line2, city, stat_code, zip, activity_date, atyp_code FROM addr WHERE addr_im = ‘1’ AND status_ind IS NULL AND from_date < SYSDATE AND DECODE (TO_DATE, NULL, SYSDATE, TO_DATE) >= SYSDATE ORDER […]

Categories
Development

r table listing multiple categorical variables with frequencies

library(“tidyverse”) library(“papaja”) df <- structure(list(investment_type = structure(c(3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 3L, 3L, 3L, 3L), .Label = c(“angel”, “pre_seed”, “seed”), class = “factor”), gender_d = c(1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, […]

Categories
Development

PoLCA ALERT: at least one manifest variable contained only one outcome category, and has been removed from the analysis

I am running PoLCA on RStudio: f <- cbind( B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF, AG, AH, AI, AJ, AK, AL, AM, AN, AO, AP, AQ, AR, AS, AT, AU, […]

Categories
Development

Showing Weekly totals

I am trying to create a report that shows the total time used in a week. I have only been successful in showing the total used by day using the formula below: select left(report_date, 11) as week_start, case when id is null then ‘Enterprise’ else id end id, case when id in (‘CN’,’NQ’,’AR’,’DA’,’PR’,’FM’) then ‘West’ […]

Categories
Development

ggnet grouping nodes in network (using an adjacency matrix)

In ggnet, I want to group character vectors that indicate the nodes in the network, but cannot figure out how to do it. I have an undirected adjacency matrix. Now I use the vertex attribute, and tried to set it like this: devtools::install_github(“briatte/ggnet”) library(sna) library(network) library(ggnet) adj = read.delim(“data.txt”, row.names = 1) net = network(adj, […]

Categories
Development

Getting Duplicate Labeled Points on Scatterplot in R

I am trying to use kmeans to show what states have similar statistics with one another from the Lahman database, my code is as follows: battingInfo <- Batting %>% filter(yearID >= 1999) total <- merge(battingInfo,People,by=”playerID”) totalN <- total[,-c(24,25,28:47)] filterByState <- totalN %>% group_by(birthState) %>% summarise(players = length(playerID)) newMerge <- merge(totalN, filterByState, by=”birthState”) newTest <- newMerge […]

Categories
Android Development Linux

Ffmpeg- Split video into 30 seconds parts in android

I am working on a project. In which I want to split the video into 30 sec equal parts. If the video is 45 sec long than ideally in 30 and 15-sec parts. I already created a method which takes the starting and the ending point and run the Ffmpeg command to cut the video. […]