Why does Unity show dark regions on a model with animation created using Blender?

I sculpted a model in blender, and I want to import that to Unity. When I import just the model(without animation), Unity shows as is. However, when I attach armature to the body and automatically assign weights to it with the intention of creating an animation, Unity import shows dark regions all over the model. All the face normals look fine. I am not sure what the issue is.

Model in Blender: Model in Blender:

Weights: Weights

Dark patches in Unity: Dark patches in Unity

Overlay the human model for virtual fit-on

I am doing a project based on virtual fit-on so, using o3n_male_female assets in unity. In the project first developing an avatar by using DNA controllers after that the 3D dress in the system have to overlay according to the body measurements and dress measurements. Ex: If user select a Medium size T-shirt if that user is an adult when he wear it that avatar should show that is tied. Any suggestions to develop it

Fit data to a model of two-variable differential equations

I am trying to fit some data to the solution of a differential equation. I am using "ParametricNDSolve" to create a model which should fit the data using "FindFit".

Now, the code I propose is very similar to the examples I have seen to solve similar problems. However, the equation of this case is a little more complicated that the examples of Mathematica manuals (because is a function of two variables, and the initials conditions involves two numeric integrals).

The code keeps running for hours, and it does not appear to solve the problems at all:

data = {{21/100, 0.260882276365091`}, {6/25, 0.330910580727009`}, {27/ 100, 0.271601829283246`}, {3/10, 0.294039749043066`}, {33/100,  0.373363616981994`}, {9/25, 0.467495450916`}, {39/100,  0.50972503848512`}, {21/50, 0.639300915026114`}, {9/20,  0.679672806174314`}, {12/25, 0.693446859556429`}, {51/100,  0.697043731283207`}, {27/50, 0.736147748563448`}, {57/100,  0.706580484286456`}, {3/5, 0.719128578284264`}, {63/100,  0.762276173639189`}, {33/50, 0.788753648395851`}, {69/100,  0.802107836002146`}, {18/25, 0.803992011056852`}, {3/4,  0.796349018322968`}, {39/50, 0.795845629380594`}, {81/100,  0.808805024532776`}, {21/25, 0.812210415525446`}, {87/100,  0.811677706096654`}, {9/10, 0.796614634731033`}, {93/100,  0.802573366818874`}, {24/25, 0.801851431134633`}, {99/100,  0.799762250401537`}, {51/50, 0.803234757269179`}, {21/20,  0.812346679044962`}, {27/25, 0.804974524275207`}, {111/100,  0.813054479870107`}, {57/50, 0.802494974488922`}, {117/100,  0.811124462792484`}, {6/5, 0.810259975308694`}, {123/100,  0.810910967136978`}, {63/50, 0.815891670404585`}, {33/25,  0.803843274767398`}, {69/50, 0.814778081357444`}, {36/25,  0.809686831953762`}, {3/2, 0.829532613157218`}, {9/5,  0.815351190536115`}, {21/10, 0.828143435644695`}, {12/5,  0.791269047273677`}, {27/10, 0.821321230878138`}, {3,  0.81153212440728`}, {33/10, 0.821798500231733`}, {18/5,  0.819594302125574`}, {39/10, 0.828629593518031`}};  model = ParametricNDSolveValue[{ D[v[x, t], t] == d1*D[v[x, t], x, x], v[-5, t] == 0, v[10, t] == flux, v[x, 0] == flux*NIntegrate[Cos[y]^n1, {y, ArcTan[-b1*(x + a1)], Pi/2}]/NIntegrate[Cos[y]^n1, {y, -Pi/2, Pi/2}]}, v, {x, -5, 10}, {t, 0, 2}, {d1, flux, n1, b1, a1}]  fit = FindFit[data,  (c*model[d1, flux, n1, b1, a1][x, 2])/((c - 1)*model[d1, flux, n1, b1, a1][x, 2] + 1), {{d1, 0.001}, {flux, 0.57}, {c, 3.2}, {n1, 2}, {b1,1}, {a1, -0.4}}, x] 

I guess that this code is computationally inefficient, but I need help to understand why.

Thank you all very much

Ps: english is obviously not my first lenguage, so I apologize for the grammar mistakes.

Requesting review of my logical data model

I am working on a personal project and I want to make sure that my data model is correct and following the best practices. Receiving feedback on my data model is important in improving my ability and knowledge of databases.

I am designing a stock market program of sorts. My model for it is pretty simple.

The workflow of my project:

  • A user creates a user account and enters their address
  • A user then can create an account for a specific stock at a share and USD amount

My plan is to make the account table a type two table. Valid from will be set to the date the account was created and valid to will be initially null. Valid to will be set to current date once the account is closed.

enter image description here

ADO.NET entity data model wizard crashes when creating a Postgresql data model

I am having trouble creating an ado.net data model from an existing Postgres database. I have used Npgsql and connected successfully but the wizard crashes without any error when I try to add a new entity data model. I have installed the Npgsql PostgreSQL Integration extension(Version 4.1.3.1) and the following packages:

<packages>   <package id="EntityFramework" version="6.2.0" targetFramework="net472" />   <package id="EntityFramework6.Npgsql" version="3.2.1.1" targetFramework="net472" />   <package id="Microsoft.Bcl.AsyncInterfaces" version="1.0.0" targetFramework="net472" />   <package id="Npgsql" version="4.1.3.1" targetFramework="net472" />   <package id="System.Buffers" version="4.5.0" targetFramework="net472" />   <package id="System.Memory" version="4.5.3" targetFramework="net472" />   <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />   <package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net472" />   <package id="System.Text.Encodings.Web" version="4.6.0" targetFramework="net472" />   <package id="System.Text.Json" version="4.6.0" targetFramework="net472" />   <package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />   <package id="System.ValueTuple" version="4.5.0" targetFramework="net472" /> </packages> 

The wizard crashes after clicking next on this window:

Entity Data Model wizard

Further technical details Npgsql version: Version 4.1.3.1 PostgreSQL version: 12.5 Operating system: Windows 10

Note:

  • I am using Npgsql -Version 4.1.3.1 instead of the latest stable version because the latest Npgsql PostgreSQL Integration extension in the VS marketplace is also of this version.
  • I am using EntityFramework6.Npgsql -Version 3.2.1.1 instead of the latest stable version because my project relies on EntityFramework -Version 6.2.0 and it is the latest version to have EntityFramework -Version 6.2.0 as the minimum dependency.
  • I have tried using all the latest stable versions of EntityFramework, Npgsql, and EntityFramework6.Npgsql and still had the same results

Thank you.

Fitting model to intensity plot

I am trying to fit a model to the following dataset to extract numerical values for 4 parameters $ J_x$ , $ J_y$ , $ J_z$ , and $ g$ . I also know that $ g \approx 2$ in this case. The dataset is a list of quadruples: {x, energy, intensity, error} as shown below

dataset = {{0.01299648, 0.01203211, 0.1263361, 0.005950636}, {0.01299648, 0.04910681, 0.0336076, 0.002947696}, {0.01299648, 0.09977061, 0.001322289, 0.000413821}, {0.01299648, 0.1508783, 0.000499663, 0.000258259}, {0.01299648, 0.2008796, 0.000419055, 0.00024877}, {0.01299648, 0.2510364, 0.000421737, 0.000272571}, {0.01299648, 0.3009251, 0.000178943, 0.000156955}, {0.01299648, 0.3508747, 0.0000992, 0.0000883}, {0.01299648, 0.3999321, 0.000430162, 0.000468312}, {0.01299648, 0.4489179, 0.001252234, 0.000846992}, {0.01299648, 0.5002585, 0.000617269, 0.000553035}, {0.01299648, 0.5509165, 0.001468457, 0.000842178}, {0.01299648, 0.6011173, 0.003723728, 0.001349723}, {0.01299648, 0.6498302, 0.004062989, 0.001265983}, {0.01299648, 0.6988636, 0.001993023, 0.000906512}, {0.01299648, 0.7499531, 0.000721637, 0.000587884}, {0.01299648, 0.8010127, 0.000252952, 0.000316284}, {0.05334629, 0.01203211, 0.1305249, 0.004184997}, {0.05334629, 0.04910681, 0.03503799, 0.002187056}, {0.05334629, 0.09977061, 0.001494748, 0.000322744}, {0.05334629, 0.1508783, 0.000631434, 0.000216124}, {0.05334629, 0.2008796, 0.000516482, 0.000212526}, {0.05334629, 0.2510364, 0.000452927, 0.000203133}, {0.05334629, 0.3009251, 0.00038714, 0.000173926}, {0.05334629, 0.3508747, 0.000419254, 0.000179236}, {0.05334629, 0.3999321, 0.000425151, 0.000310161}, {0.05334629, 0.4489179, 0.000511058, 0.000412408}, {0.05334629, 0.5002585, 0.000683154, 0.000400352}, {0.05334629, 0.5509165, 0.001937698, 0.000617178}, {0.05334629, 0.6011173, 0.003902016, 0.000892543}, {0.05334629, 0.6498302, 0.00309874, 0.000839511}, {0.05334629, 0.6988636, 0.001156821, 0.000561058}, {0.05334629, 0.7499531, 0.000876003, 0.000445513}, {0.05334629, 0.8010127, 0.000494271, 0.000353135}, {0.05334629, 0.8507249, 0.000468474, 0.000405826}, {0.05334629, 0.9009042, 0.000227273, 0.000284132}, {0.09946869, 0.01203211, 0.1314684, 0.002607759}, {0.09946869, 0.04910681, 0.03540794, 0.001393436}, {0.09946869, 0.09977061, 0.001480958, 0.000215194}, {0.09946869, 0.1508783, 0.000518701, 0.000144396}, {0.09946869, 0.2008796, 0.00039427, 0.000139293}, {0.09946869, 0.2510364, 0.000395253, 0.000148412}, {0.09946869, 0.3009251, 0.000357242, 0.000144663}, {0.09946869, 0.3508747, 0.000435539, 0.000173756}, {0.09946869, 0.3999321, 0.000440639, 0.000186949}, {0.09946869, 0.4489179, 0.000453975, 0.000189049}, {0.09946869, 0.5002585, 0.000817151, 0.000265822}, {0.09946869, 0.5509165, 0.002821699, 0.000522746}, {0.09946869, 0.6011173, 0.005799377, 0.000790837}, {0.09946869, 0.6498302, 0.003142505, 0.000619193}, {0.09946869, 0.6988636, 0.00089875, 0.000377157}, {0.09946869, 0.7499531, 0.000935933, 0.000440654}, {0.09946869, 0.8010127, 0.000741281, 0.00040915}, {0.09946869, 0.8507249, 0.000379727, 0.000311241}, {0.09946869, 0.9009042, 0.000452129, 0.000372186}, {0.09946869, 0.9499643, 0.000321497, 0.000298012}, {0.09946869, 0.9987899, 0.000216047, 0.000265462}, {0.09946869, 1.049146, 0.000321083, 0.000405456}, {0.09946869, 1.100007, 0.00007, 0.000197968}, {0.09946869, 1.151003, 0.000371132, 0.000898138}, {0.09946869, 1.20088, 0.001603127, 0.001909191}, {0.1513923, 0.01203211, 0.1271927, 0.002382964}, {0.1513923, 0.04910681, 0.03466543, 0.001207942}, {0.1513923, 0.09977061, 0.001471831, 0.000180972}, {0.1513923, 0.1508783, 0.000458085, 0.000108564}, {0.1513923, 0.2008796, 0.000323088, 0.0000968}, {0.1513923, 0.2510364, 0.000262988, 0.0000927}, {0.1513923, 0.3009251, 0.000208331, 0.0000952}, {0.1513923, 0.3508747, 0.000261884, 0.000132211}, {0.1513923, 0.3999321, 0.000318829, 0.000154663}, {0.1513923, 0.4489179, 0.000390393, 0.000170512}, {0.1513923, 0.5002585, 0.000796483, 0.000230864}, {0.1513923, 0.5509165, 0.003169181, 0.00045884}, {0.1513923, 0.6011173, 0.006016299, 0.000634249}, {0.1513923, 0.6498302, 0.002961305, 0.000479318}, {0.1513923, 0.6988636, 0.00089255, 0.00030299}, {0.1513923, 0.7499531, 0.000601942, 0.000292041}, {0.1513923, 0.8010127, 0.000622036, 0.000308231}, {0.1513923, 0.8507249, 0.00059582, 0.000311122}, {0.1513923, 0.9009042, 0.000342461, 0.000258311}, {0.1513923, 0.9499643, 0.000365842, 0.000264302}, {0.1513923, 0.9987899, 0.000383168, 0.000282596}, {0.1513923, 1.049146, 0.000158197, 0.000218464}, {0.1513923, 1.100007, 0.0000797, 0.0001487}, {0.1513923, 1.151003, 0.000272186, 0.000602807}, {0.1513923, 1.20088, 0.000791483, 0.000943182}, {0.1513923, 1.24981, 0.000810134, 0.000846855}, {0.1513923, 1.298876, 0.001098106, 0.000878741}, {0.1513923, 1.35012, 0.001020097, 0.00091243}, {0.1513923, 1.400843, 0.00099628, 0.001472998}, {0.1513923, 1.45113, 0.001696679, 0.002615917}, {0.1513923, 1.487999, 0.00068497, 0.001417412}, {0.200413, 0.01203211, 0.1251366, 0.002421743}, {0.200413, 0.04910681, 0.03396657, 0.001239589}, {0.200413, 0.09977061, 0.001455514, 0.000186787}, {0.200413, 0.1508783, 0.000471295, 0.000107087}, {0.200413, 0.2008796, 0.000356116, 0.0000954}, {0.200413, 0.2510364, 0.000255785, 0.0000834}, {0.200413, 0.3009251, 0.000192659, 0.0000751}, {0.200413, 0.3508747, 0.000195415, 0.000086}, {0.200413, 0.3999321, 0.000212672, 0.0000972}, {0.200413, 0.4489179, 0.000201986, 0.0000998}, {0.200413, 0.5002585, 0.000452148, 0.00014457}, {0.200413, 0.5509165, 0.002283648, 0.000302595}, {0.200413, 0.6011173, 0.005130702, 0.000435712}, {0.200413, 0.6498302, 0.002947664, 0.000341739}, {0.200413, 0.6988636, 0.000885883, 0.00019889}, {0.200413, 0.7499531, 0.000353508, 0.000142375}, {0.200413, 0.8010127, 0.000337989, 0.000159135}, {0.200413, 0.8507249, 0.000294789, 0.00016511}, {0.200413, 0.9009042, 0.000287179, 0.00017037}, {0.200413, 0.9499643, 0.000311635, 0.000194681}, {0.200413, 0.9987899, 0.000207756, 0.000158586}, {0.200413, 1.049146, 0.000158257, 0.00013942}, {0.200413, 1.100007, 0.000190184, 0.000146221}, {0.200413, 1.151003, 0.000213257, 0.000208235}, {0.200413, 1.20088, 0.000336925, 0.000306631}, {0.200413, 1.24981, 0.000487695, 0.000424801}, {0.200413, 1.298876, 0.000638927, 0.000549385}, {0.200413, 1.35012, 0.001054225, 0.000776587}, {0.200413, 1.400843, 0.001720866, 0.001358017}, {0.200413, 1.45113, 0.00200075, 0.001706196}, {0.200413, 1.487999, 0.001241234, 0.001336194}, {0.249747, 0.01203211, 0.1205826, 0.002361229}, {0.249747, 0.04910681, 0.03260196, 0.001191631}, {0.249747, 0.09977061, 0.001261705, 0.000170178}, {0.249747, 0.1508783, 0.000333223, 0.00009}, {0.249747, 0.2008796, 0.000305626, 0.0000888}, {0.249747, 0.2510364, 0.000248531, 0.0000826}, {0.249747, 0.3009251, 0.000227554, 0.0000828}, {0.249747, 0.3508747, 0.000242098, 0.0000856}, {0.249747, 0.3999321, 0.000213059, 0.0000796}, {0.249747, 0.4489179, 0.000171657, 0.0000691}, {0.249747, 0.5002585, 0.000269242, 0.0000875}, {0.249747, 0.5509165, 0.001302021, 0.000202058}, {0.249747, 0.6011173, 0.003488679, 0.000339568}, {0.249747, 0.6498302, 0.003051286, 0.000322039}, {0.249747, 0.6988636, 0.001461859, 0.000227405}, {0.249747, 0.7499531, 0.000595035, 0.000144464}, {0.249747, 0.8010127, 0.000388456, 0.000118404}, {0.249747, 0.8507249, 0.000291368, 0.00010498}, {0.249747, 0.9009042, 0.000241225, 0.000107813}, {0.249747, 0.9499643, 0.000237664, 0.00011481}, {0.249747, 0.9987899, 0.000151976, 0.0000917}, {0.249747, 1.049146, 0.000151201, 0.000093}, {0.249747, 1.100007, 0.000175435, 0.000106715}, {0.249747, 1.151003, 0.000146402, 0.00010687}, {0.249747, 1.20088, 0.000207344, 0.0001413}, {0.249747, 1.24981, 0.000247186, 0.00017871}, {0.249747, 1.298876, 0.000406102, 0.000266496}, {0.249747, 1.35012, 0.000704678, 0.00045794}, {0.249747, 1.400843, 0.000829369, 0.000665319}, {0.249747, 1.45113, 0.000937308, 0.000875315}, {0.249747, 1.487999, 0.001484896, 0.00116244}, {0.2999469, 0.01203211, 0.1134484, 0.002063204}, {0.2999469, 0.04910681, 0.03021775, 0.001057232}, {0.2999469, 0.09977061, 0.00106177, 0.000140285}, {0.2999469, 0.1508783, 0.00030537, 0.0000768}, {0.2999469, 0.2008796, 0.000213005, 0.0000649}, {0.2999469, 0.2510364, 0.000185747, 0.0000657}, {0.2999469, 0.3009251, 0.000164455, 0.000065}, {0.2999469, 0.3508747, 0.000142963, 0.0000636}, {0.2999469, 0.3999321, 0.000130967, 0.0000592}, {0.2999469, 0.4489179, 0.000167198, 0.0000687}, {0.2999469, 0.5002585, 0.000180923, 0.0000726}, {0.2999469, 0.5509165, 0.000541689, 0.000134283}, {0.2999469, 0.6011173, 0.001467756, 0.000226035}, {0.2999469, 0.6498302, 0.00203471, 0.000272955}, {0.2999469, 0.6988636, 0.001823599, 0.000254749}, {0.2999469, 0.7499531, 0.001339045, 0.000208357}, {0.2999469, 0.8010127, 0.0009652, 0.000182255}, {0.2999469, 0.8507249, 0.00046882, 0.000122285}, {0.2999469, 0.9009042, 0.000292738, 0.000102422}, {0.2999469, 0.9499643, 0.000180685, 0.0000821}, {0.2999469, 0.9987899, 0.000126662, 0.0000694}, {0.2999469, 1.049146, 0.000182039, 0.000087}, {0.2999469, 1.100007, 0.000243545, 0.0000985}, {0.2999469, 1.151003, 0.000167506, 0.0000907}, {0.2999469, 1.20088, 0.000221046, 0.000117207}, {0.2999469, 1.24981, 0.000266948, 0.000130003}, {0.2999469, 1.298876, 0.000361939, 0.000171356}, {0.2999469, 1.35012, 0.000423017, 0.000222659}, {0.2999469, 1.400843, 0.000497565, 0.000299089}, {0.2999469, 1.45113, 0.000841964, 0.00069896}, {0.2999469, 1.487999, 0.001636413, 0.001292695}, {0.351399, 0.01203211, 0.1023983, 0.001765024}, {0.351399, 0.04910681, 0.02760775, 0.000890958}, {0.351399, 0.09977061, 0.001013449, 0.000120122}, {0.351399, 0.1508783, 0.000314347, 0.0000681}, {0.351399, 0.2008796, 0.000218643, 0.0000587}, {0.351399, 0.2510364, 0.000145264, 0.0000501}, {0.351399, 0.3009251, 0.0000988, 0.0000431}, {0.351399, 0.3508747, 0.0000886, 0.0000424}, {0.351399, 0.3999321, 0.000078, 0.0000407}, {0.351399, 0.4489179, 0.000113312, 0.0000492}, {0.351399, 0.5002585, 0.0000947, 0.0000463}, {0.351399, 0.5509165, 0.000150304, 0.0000649}, {0.351399, 0.6011173, 0.000443105, 0.000115168}, {0.351399, 0.6498302, 0.000857112, 0.000160557}, {0.351399, 0.6988636, 0.001158728, 0.000179657}, {0.351399, 0.7499531, 0.001562672, 0.000200422}, {0.351399, 0.8010127, 0.001445169, 0.000188441}, {0.351399, 0.8507249, 0.000932427, 0.0001463}, {0.351399, 0.9009042, 0.00044006, 0.00010092}, {0.351399, 0.9499643, 0.000182093, 0.00007}, {0.351399, 0.9987899, 0.000100358, 0.0000596}, {0.351399, 1.049146, 0.000133863, 0.0000725}, {0.351399, 1.100007, 0.000144129, 0.000072}, {0.351399, 1.151003, 0.00010871, 0.0000655}, {0.351399, 1.20088, 0.000123393, 0.0000805}, {0.351399, 1.24981, 0.000193871, 0.000102966}, {0.351399, 1.298876, 0.000241517, 0.000134903}, {0.351399, 1.35012, 0.000296181, 0.000181252}, {0.351399, 1.400843, 0.00026523, 0.000220609}, {0.351399, 1.45113, 0.000646058, 0.000572446}, {0.351399, 1.487999, 0.000963321, 0.000939469}, {0.4027665, 0.01203211, 0.09461402, 0.001366129}, {0.4027665, 0.04910681, 0.0254652, 0.000706637}, {0.4027665, 0.09977061, 0.001031896, 0.0000992}, {0.4027665, 0.1508783, 0.000384627, 0.0000604}, {0.4027665, 0.2008796, 0.000268799, 0.0000534}, {0.4027665, 0.2510364, 0.000208381, 0.0000464}, {0.4027665, 0.3009251, 0.000199062, 0.0000445}, {0.4027665, 0.3508747, 0.000186287, 0.0000418}, {0.4027665, 0.3999321, 0.000159836, 0.0000416}, {0.4027665, 0.4489179, 0.000107729, 0.000037}, {0.4027665, 0.5002585, 0.0000923, 0.0000347}, {0.4027665, 0.5509165, 0.0000702, 0.0000317}, {0.4027665, 0.6011173, 0.000146609, 0.0000496}, {0.4027665, 0.6498302, 0.000280341, 0.0000714}, {0.4027665, 0.6988636, 0.000459356, 0.0000931}, {0.4027665, 0.7499531, 0.000744988, 0.00011817}, {0.4027665, 0.8010127, 0.001140008, 0.000143582}, {0.4027665, 0.8507249, 0.001200483, 0.000141774}, {0.4027665, 0.9009042, 0.000922343, 0.000119712}, {0.4027665, 0.9499643, 0.000375711, 0.0000757}, {0.4027665, 0.9987899, 0.000140653, 0.0000492}, {0.4027665, 1.049146, 0.000098, 0.0000461}, {0.4027665, 1.100007, 0.0000772, 0.0000404}, {0.4027665, 1.151003, 0.0000815, 0.0000407}, {0.4027665, 1.20088, 0.0000899, 0.0000479}, {0.4027665, 1.24981, 0.0000992, 0.0000589}, {0.4027665, 1.298876, 0.000142484, 0.0000848}, {0.4027665, 1.35012, 0.000189181, 0.000109538}, {0.4027665, 1.400843, 0.000172183, 0.000138258}, {0.4027665, 1.45113, 0.000275446, 0.000293852}, {0.4027665, 1.487999, 0.000381214, 0.000439755}, {0.4496463, 0.01203211, 0.1094655, 0.001215262}, {0.4496463, 0.04910681, 0.03120829, 0.000643984}, {0.4496463, 0.09977061, 0.001421187, 0.0000962}, {0.4496463, 0.1508783, 0.000589879, 0.0000633}, {0.4496463, 0.2008796, 0.000401797, 0.0000524}, {0.4496463, 0.2510364, 0.000392448, 0.0000514}, {0.4496463, 0.3009251, 0.000374653, 0.0000495}, {0.4496463, 0.3508747, 0.000443615, 0.0000546}, {0.4496463, 0.3999321, 0.000371195, 0.0000521}, {0.4496463, 0.4489179, 0.000203434, 0.0000406}, {0.4496463, 0.5002585, 0.000117548, 0.0000317}, {0.4496463, 0.5509165, 0.0000764, 0.000026}, {0.4496463, 0.6011173, 0.0000956, 0.0000299}, {0.4496463, 0.6498302, 0.000120406, 0.0000352}, {0.4496463, 0.6988636, 0.000175619, 0.000043}, {0.4496463, 0.7499531, 0.000325115, 0.0000604}, {0.4496463, 0.8010127, 0.0005661, 0.0000836}, {0.4496463, 0.8507249, 0.000928296, 0.000105136}, {0.4496463, 0.9009042, 0.001128707, 0.000111962}, {0.4496463, 0.9499643, 0.000719185, 0.0000871}, {0.4496463, 0.9987899, 0.000239313, 0.0000504}, {0.4496463, 1.049146, 0.0000817, 0.0000313}, {0.4496463, 1.100007, 0.0000617, 0.0000287}, {0.4496463, 1.151003, 0.0000532, 0.0000284}, {0.4496463, 1.20088, 0.0000802, 0.0000369}, {0.4496463, 1.24981, 0.000094, 0.0000454}, {0.4496463, 1.298876, 0.00010737, 0.0000566}, {0.4496463, 1.35012, 0.0000915, 0.0000647}, {0.4496463, 1.400843, 0.00016223, 0.000102268}, {0.4496463, 1.45113, 0.000256105, 0.000193461}, {0.4496463, 1.487999, 0.000406342, 0.000335206}, {0.4967034, 0.01203211, 0.1515964, 0.001494316}, {0.4967034, 0.04910681, 0.03684591, 0.000740697}, {0.4967034, 0.09977061, 0.001324794, 0.000099}, {0.4967034, 0.1508783, 0.000433766, 0.0000559}, {0.4967034, 0.2008796, 0.000275803, 0.0000457}, {0.4967034, 0.2510364, 0.000212638, 0.0000404}, {0.4967034, 0.3009251, 0.000196184, 0.0000388}, {0.4967034, 0.3508747, 0.000205123, 0.0000397}, {0.4967034, 0.3999321, 0.000232467, 0.0000434}, {0.4967034, 0.4489179, 0.000401981, 0.0000576}, {0.4967034, 0.5002585, 0.000176261, 0.0000392}, {0.4967034, 0.5509165, 0.0000896, 0.0000293}, {0.4967034, 0.6011173, 0.0000941, 0.0000303}, {0.4967034, 0.6498302, 0.000100446, 0.0000324}, {0.4967034, 0.6988636, 0.000110629, 0.0000342}, {0.4967034, 0.7499531, 0.000192725, 0.0000444}, {0.4967034, 0.8010127, 0.000359514, 0.0000619}, {0.4967034, 0.8507249, 0.000674937, 0.0000873}, {0.4967034, 0.9009042, 0.001039717, 0.000108854}, {0.4967034, 0.9499643, 0.000770872, 0.0000938}, {0.4967034, 0.9987899, 0.000225213, 0.0000509}, {0.4967034, 1.049146, 0.0000582, 0.000027}, {0.4967034, 1.100007, 0.0000442, 0.0000254}, {0.4967034, 1.151003, 0.0000482, 0.0000287}, {0.4967034, 1.20088, 0.0000665, 0.0000361}, {0.4967034, 1.24981, 0.0000707, 0.0000395}, {0.4967034, 1.298876, 0.0000618, 0.0000412}, {0.4967034, 1.35012, 0.0000937, 0.0000635}, {0.4967034, 1.400843, 0.000150926, 0.0000974}, {0.4967034, 1.45113, 0.000135016, 0.000147398}, {0.4967034, 1.487999, 0.000233144, 0.000242054}, {0.5504108, 0.01203211, 0.09064252, 0.0014725}, {0.5504108, 0.04910681, 0.02602461, 0.000745193}, {0.5504108, 0.09977061, 0.000835608, 0.0000957}, {0.5504108, 0.1508783, 0.000236157, 0.0000513}, {0.5504108, 0.2008796, 0.000142981, 0.0000427}, {0.5504108, 0.2510364, 0.000107481, 0.0000387}, {0.5504108, 0.3009251, 0.0000878, 0.0000356}, {0.5504108, 0.3508747, 0.0000884, 0.0000348}, {0.5504108, 0.3999321, 0.000127604, 0.0000402}, {0.5504108, 0.4489179, 0.000139343, 0.0000394}, {0.5504108, 0.5002585, 0.000122183, 0.0000388}, {0.5504108, 0.5509165, 0.0000747, 0.0000328}, {0.5504108, 0.6011173, 0.0000848, 0.0000356}, {0.5504108, 0.6498302, 0.000123968, 0.0000454}, {0.5504108, 0.6988636, 0.000148527, 0.0000523}, {0.5504108, 0.7499531, 0.000235699, 0.0000658}, {0.5504108, 0.8010127, 0.000372422, 0.0000797}, {0.5504108, 0.8507249, 0.000677797, 0.000105258}, {0.5504108, 0.9009042, 0.000967788, 0.000128001}, {0.5504108, 0.9499643, 0.000557506, 0.0000969}, {0.5504108, 0.9987899, 0.000136945, 0.0000475}, {0.5504108, 1.049146, 0.0000519, 0.0000324}, {0.5504108, 1.100007, 0.0000573, 0.0000335}, {0.5504108, 1.151003, 0.0000676, 0.0000375}, {0.5504108, 1.20088, 0.0000507, 0.0000342}, {0.5504108, 1.24981, 0.0000355, 0.0000311}, {0.5504108, 1.298876, 0.0000463, 0.0000433}, {0.5504108, 1.35012, 0.000113439, 0.0000779}, {0.5504108, 1.400843, 0.000125893, 0.0001}, {0.5504108, 1.45113, 0.000127608, 0.000143131}, {0.5504108, 1.487999, 0.000108575, 0.000174224}, {0.5999553, 0.01203211, 0.06634204, 0.001353167}, {0.5999553, 0.04910681, 0.01829561, 0.000704955}, {0.5999553, 0.09977061, 0.000690618, 0.0000958}, {0.5999553, 0.1508783, 0.000167709, 0.0000499}, {0.5999553, 0.2008796, 0.000126736, 0.0000463}, {0.5999553, 0.2510364, 0.0000828, 0.0000358}, {0.5999553, 0.3009251, 0.0000879, 0.0000358}, {0.5999553, 0.3508747, 0.0000923, 0.0000381}, {0.5999553, 0.3999321, 0.0000769, 0.0000375}, {0.5999553, 0.4489179, 0.0000776, 0.0000401}, {0.5999553, 0.5002585, 0.0000767, 0.0000387}, {0.5999553, 0.5509165, 0.0000877, 0.0000394}, {0.5999553, 0.6011173, 0.000166282, 0.0000555}, {0.5999553, 0.6498302, 0.000232257, 0.0000684}, {0.5999553, 0.6988636, 0.000360469, 0.0000907}, {0.5999553, 0.7499531, 0.00039869, 0.000098}, {0.5999553, 0.8010127, 0.00053909, 0.00010748}, {0.5999553, 0.8507249, 0.000729154, 0.000115996}, {0.5999553, 0.9009042, 0.000611591, 0.000102393}, {0.5999553, 0.9499643, 0.000244657, 0.000068}, {0.5999553, 0.9987899, 0.0000664, 0.0000389}, {0.5999553, 1.049146, 0.0000428, 0.0000316}, {0.5999553, 1.100007, 0.0000545, 0.0000332}, {0.5999553, 1.151003, 0.0000771, 0.0000403}, {0.5999553, 1.20088, 0.0000709, 0.0000418}, {0.5999553, 1.24981, 0.000079, 0.0000527}, {0.5999553, 1.298876, 0.0000836, 0.0000684}, {0.5999553, 1.35012, 0.000146739, 0.0000985}, {0.5999553, 1.400843, 0.000180494, 0.000125324}, {0.5999553, 1.45113, 0.000171035, 0.000194538}, {0.5999553, 1.487999, 0.000283511, 0.000326393}, {0.6503139, 0.01203211, 0.08897097, 0.002566025}, {0.6503139, 0.04910681, 0.02465827, 0.001434306}, {0.6503139, 0.09977061, 0.000902531, 0.00018245}, {0.6503139, 0.1508783, 0.00021565, 0.0000701}, {0.6503139, 0.2008796, 0.000186667, 0.0000717}, {0.6503139, 0.2510364, 0.000151591, 0.0000644}, {0.6503139, 0.3009251, 0.000120543, 0.0000513}, {0.6503139, 0.3508747, 0.000108839, 0.0000451}, {0.6503139, 0.3999321, 0.0000846, 0.0000418}, {0.6503139, 0.4489179, 0.000115256, 0.0000494}, {0.6503139, 0.5002585, 0.000128018, 0.0000502}, {0.6503139, 0.5509165, 0.000132044, 0.0000477}, {0.6503139, 0.6011173, 0.000235156, 0.0000634}, {0.6503139, 0.6498302, 0.000448416, 0.0000941}, {0.6503139, 0.6988636, 0.000524899, 0.000111871}, {0.6503139, 0.7499531, 0.000584105, 0.000120938}, {0.6503139, 0.8010127, 0.000550121, 0.000109041}, {0.6503139, 0.8507249, 0.000462607, 0.000095}, {0.6503139, 0.9009042, 0.000262414, 0.0000695}, {0.6503139, 0.9499643, 0.000116691, 0.000049}, {0.6503139, 0.9987899, 0.0000866, 0.0000478}, {0.6503139, 1.049146, 0.0000572, 0.0000395}, {0.6503139, 1.100007, 0.0000328, 0.0000283}, {0.6503139, 1.151003, 0.0000645, 0.0000398}, {0.6503139, 1.20088, 0.0000764, 0.0000465}, {0.6503139, 1.24981, 0.0000914, 0.0000615}, {0.6503139, 1.298876, 0.000131544, 0.0000916}, {0.6503139, 1.35012, 0.000152969, 0.000107919}, {0.6503139, 1.400843, 0.000160366, 0.000125925}, {0.6503139, 1.45113, 0.000227675, 0.000244772}, {0.6503139, 1.487999, 0.000410726, 0.000420443}, {0.6990286, 0.01203211, 0.1305426, 0.004546241}, {0.6990286, 0.04910681, 0.03146357, 0.002106031}, {0.6990286, 0.09977061, 0.001037019, 0.00026412}, {0.6990286, 0.1508783, 0.000231548, 0.000091}, {0.6990286, 0.2008796, 0.000298593, 0.000118439}, {0.6990286, 0.2510364, 0.000231503, 0.000103976}, {0.6990286, 0.3009251, 0.000136526, 0.0000669}, {0.6990286, 0.3508747, 0.000123731, 0.0000975}, {0.6990286, 0.3999321, 0.000157325, 0.000139099}, {0.6990286, 0.4489179, 0.000276389, 0.000156038}, {0.6990286, 0.5002585, 0.000241361, 0.000137575}, {0.6990286, 0.5509165, 0.000154788, 0.0000892}, {0.6990286, 0.6011173, 0.000268714, 0.0000745}, {0.6990286, 0.6498302, 0.000475129, 0.000104437}, {0.6990286, 0.6988636, 0.000607848, 0.000120112}, {0.6990286, 0.7499531, 0.000470629, 0.00011044}, {0.6990286, 0.8010127, 0.000318165, 0.0000894}, {0.6990286, 0.8507249, 0.000204583, 0.0000658}, {0.6990286, 0.9009042, 0.000127872, 0.0000515}, {0.6990286, 0.9499643, 0.0000904, 0.0000453}, {0.6990286, 0.9987899, 0.000180306, 0.0000659}, {0.6990286, 1.049146, 0.000121658, 0.000054}, {0.6990286, 1.100007, 0.000130731, 0.000056}, {0.6990286, 1.151003, 0.00015566, 0.0000637}, {0.6990286, 1.20088, 0.000097, 0.0000527}, {0.6990286, 1.24981, 0.0000895, 0.0000586}, {0.6990286, 1.298876, 0.00014314, 0.0000869}, {0.6990286, 1.35012, 0.000181547, 0.000118287}, {0.6990286, 1.400843, 0.000167488, 0.000131239}, {0.6990286, 1.45113, 0.000292798, 0.000288394}, {0.6990286, 1.487999, 0.000433997, 0.000458083}, {0.7477285, 0.3009251, 0.000053, 0.0000462}, {0.7477285, 0.3508747, 0.0000956, 0.000133103}, {0.7477285, 0.3999321, 0.000344739, 0.000279699}, {0.7477285, 0.4489179, 0.000390532, 0.000270478}, {0.7477285, 0.5002585, 0.000392541, 0.000259302}, {0.7477285, 0.5509165, 0.000149147, 0.000128412}, {0.7477285, 0.6011173, 0.000165453, 0.0000795}, {0.7477285, 0.6498302, 0.000452263, 0.000147439}, {0.7477285, 0.6988636, 0.000415388, 0.000125599}, {0.7477285, 0.7499531, 0.000297813, 0.000243738}, {0.7477285, 0.8010127, 0.000194161, 0.000304051}, {0.7477285, 0.8507249, 0.000154568, 0.00027359}, {0.7477285, 0.9009042, 0.000134434, 0.000251633}, {0.7477285, 0.9499643, 0.000110127, 0.00019129}, {0.7477285, 0.9987899, 0.000110382, 0.00010382}, {0.7477285, 1.049146, 0.000129385, 0.0000827}, {0.7477285, 1.100007, 0.000353017, 0.0000981}, {0.7477285, 1.151003, 0.000538544, 0.00013636}, {0.7477285, 1.20088, 0.00015782, 0.0000889}, {0.7477285, 1.24981, 0.0000696, 0.0000608}, {0.7477285, 1.298876, 0.000146578, 0.00013496}, {0.7477285, 1.35012, 0.000300833, 0.000205088}, {0.7477285, 1.400843, 0.000445233, 0.000245628}, {0.7477285, 1.45113, 0.000371585, 0.000403792}, {0.7477285, 1.487999, 0.00069879, 0.000703723}, {0.79343, 0.8010127, 0.000545414, 0.000697371}, {0.79343, 0.8507249, 0.000225278, 0.000428143}, {0.79343, 0.9009042, 0.000404924, 0.000554523}, {0.79343, 0.9499643, 0.000148193, 0.000297461}, {0.79343, 0.9987899, 0.000165649, 0.000213896}, {0.79343, 1.049146, 0.0000836, 0.000110634}, {0.79343, 1.100007, 0.000175279, 0.0000915}, {0.79343, 1.151003, 0.000331701, 0.000166089}, {0.79343, 1.20088, 0.000197516, 0.000136657}, {0.79343, 1.24981, 0.0000473, 0.0000663}, {0.79343, 1.298876, 0.000169997, 0.000187402}, {0.79343, 1.35012, 0.000461569, 0.000344723}, {0.79343, 1.400843, 0.000334411, 0.000273181}, {0.79343, 1.45113, 0.000547673, 0.000501559}, {0.79343, 1.487999, 0.000890756, 0.000845645}, {0.8292615, 1.35012, 0.000118945, 0.000182641}, {0.8292615, 1.400843, 0.000102903, 0.000170622}, {0.8292615, 1.45113, 0.000157944, 0.000294485}, {0.8292615, 1.487999, 0.000248875, 0.000441169}} 

My model yields the energy at a specific coordinate $ \boldsymbol{k} =\{k_x, k_y, k_z\}$ where $ \boldsymbol{k} = x(\boldsymbol{b}_1 + \boldsymbol{b}_2)$ . Here $ x$ is the first entry of each quadruple in the dataset, $ \boldsymbol{b}_1 = \{ 2 \pi, 2\pi/\sqrt{3}, 0 \}$ , and $ \boldsymbol{b}_2 = \{ 0, 4\pi/\sqrt{3}, 0 \}$

(* First obtain the measured energy values and store them in a list *) ω = DeleteDuplicates@*Flatten@dataset[[All, 2]]; b1 = {2π, (2π)/Sqrt[3], 0}; b2 = {0, (4π)/Sqrt[3], 0}; xKtoM = DeleteDuplicates@*Flatten@dataset[[All, 1]]; k = Table[xKtoM[[i]] (b1 + b2), {i, 1, Length[xKtoM]}]; 

I then go on to define my model

(* Bohr magneton μ in units of eV*T^-1 pulled from wikipedia*) μ = 5.7883818012*10^-5;  (* This is the model where we have taken the positive branch of the energy spectrum *) d[kx_, ky_, kz_, g_, Bz_, Jx_, Jy_, Jz_] := {1/2 (Jx + Jy) (Cos[k[[1]]] + Cos[k[[2]]] + Cos[k[[1]] + k[[2]]]) - 3 Jz + g \[Mu] Bz,  1/2 (Jx - Jy) (E^(-I 2 \[Pi]/3) Cos[k[[1]]] + E^(I 2 \[Pi]/3) Cos[k[[2]]] + Cos[k[[1]] + k[[2]]])};  spectrum[{kx_, ky_, kz_}] := Norm[d[kx, ky, kz, g, 4, Jx, Jy, Jz]]; (* Get the spectrum going from the high symmetry K \[Rule] M path using the k vector/list we defined above. This is the model we use for the dataset *) model = Map[spectrum, k]; 

From here I would have the energy values at 18 separate points if I had specified values for Jx, Jy, Jz, and g. I then thought to define a cost function that takes my model and subtracts the corresponding measured energy value and then try to find the minimum using the built-in FindMinimum function

(* Define a cost function between the model and the measured energy values Subscript[\[Omega], i] *) CostFunction[Jx_, Jy_, Jz_, g_] := Sum[Abs[model[[i]] - ω[[i]]]^2, {i, 1, Length[ω]}] (* Minimize this cost function to attempt to extract the parameters Jx, Jy, Jz, and g *) params = FindMinimum[model, {{Jx, 0.5}, {Jy, 0.5}, {Jz, 0.5}, {g, 2}}] 

My only issue with this is that

  1. My model is a list of functions while the measured energy values $ \omega$ is a list of real numbers
  2. Using FindMinimum yields quite a lot of errors

Is it possible to get around these issues using something like NonLinearModelFit or something similar? Let me know if I should clarify anything or add any additional info and thanks in advance!

SQL Server log file in “Simple” recovery model

Can someone please shed some light on log growth in simple recovery model. If I understand correctly, even in "Simple" recovery model the transaction log can grow? So if I have open transaction(s) (Update, Insert, Delete, Index Rebuilds, etc.) these start to re-use inactive VLF’s and if none are present the log will start growing based on log configuration until it reaches the configured size or hits disc space available limit? Can any of the active VLF’s be marked as "inactive" due to a checkpoint and\or full backups?

In short, it was requested that I change all databases to "Simple" recovery model and issue a "DBCC SHRINKFILE (N’LogName’ , 0, TRUNCATEONLY)" every hour. I received a Error 9002 and the Full database backup and dbcc shrink failed. I guess, eventually, the transactions completed and the checkpoint, full backup and dbcc shrinkfile were able to complete.

How to model inheritance in MySQL for adding and deleting users?

I currently have a MySQL database and our ERD has inheritance for various tables. One is User which has as children: administrators, students and professors. The tables look as follow:

CREATE TABLE `Users` (   `id_number` int DEFAULT NULL,   `First_name` varchar(50) DEFAULT NULL,   `Last_name` varchar(50) DEFAULT NULL,   `User_Type` varchar(14) DEFAULT NULL ) ENGINE=InnoDB CREATE TABLE `Advisor` (   `Faculty_id` varchar(2) DEFAULT NULL,   `Student_id` varchar(5) DEFAULT NULL,   `Date_Assigned` date DEFAULT NULL ) ENGINE=InnoDB  CREATE TABLE `Faculty` (   `Faculty_id` varchar(13) DEFAULT NULL,   `Room_id` varchar(2) DEFAULT NULL,   `Faculty_Speciality` varchar(16) DEFAULT NULL,   `Faculty_Rank` int DEFAULT NULL,   `Faculty_Type` varchar(9) DEFAULT NULL,   `user_type` varchar(13) DEFAULT NULL ) ENGINE=InnoDB 

I’m aware that things such as PRIMARY KEY are missing for the ids and REFERENCES for foreign keys. Similar is found on this post How to model inheritance of two tables MySQL. However, what I want to know is when adding users how to populate both tables (parent and children)? Meaning that both tables user and student get the same information? How would this work on data that gets over 3000 students?

non-linear model fit function not working

I have attempted to exercise a non-linear model fit to my data, dadtAbs, and got the following puzzle

nlm =    NonlinearModelFit[     Transpose[{Table[t, {t, 1, tmax}],dadtAbs}],      (1 - aaa)*bbb*NSPI[bbb, ddd, population, t] *        (1 - ddd)*(population - NSPI[bbb, ddd, population, t]),      {aaa, bbb, ddd},      t] 

where dadtAbs is a list, population is a known constant, aaa, bbb, ddd are the desired answers, and t is the variable.

When I queried nlm, I got

[0.] 

Here is the function NSPI:

NSPI[alpha_, delta_, population_, tt_] :=    population/(1 + (population - 1)*Exp[-alpha*population*(1 - delta)*tt]) 

population is a large constant, for example, 1000000