text:
Q: Time differences for multiple entries for same ID in R For each ID that is the same, I would like to add an end time and then calculate the time differences between each entry for that user ID.
This is the code I have so far:
user <- user %>% group_by(user$userdata.user_id) %>% arrange(user$hours) %>% mutate(time.interval= user$hours - lag(user$hours, default = first(user$hours))) %>% mutate(time.interval = round(time.interval/86400, digits = 2))
I was trying to use the diff time() function, however since I am trying to calculate the time difference with a preset end date  ('02-20-2020' = 7), I am unable to attain the following results:
id      hours      time.decimal    time.interval
123     03:32:12    1.200           3.3 (4.5 - 1.2)
123     12:37:56    4.500           2.5 (7 - 4.5)
140     09:46:33    6.300           0.7 (7 - 6.3)
**Note: the above is an example of what I want to achieve. 7 in the time interval column is the time decimal version of the given end date.
Any help would be greatly appreciated.

A: You may use lead to get next value of time.decimal with default value as 7.
library(dplyr)

user %>%
  group_by(id) %>%
  mutate(time.interval = lead(time.decimal, default = 7) - time.decimal) %>%
  ungroup() -> user

df

#     id hours    time.decimal time.interval
#  <int> <chr>           <dbl>         <dbl>
#1   123 03:32:12          1.2           3.3
#2   123 12:37:56          4.5           2.5
#3   140 09:46:33          6.3           0.7

Or in data.table :
library(data.table)

setDT(user)[, time.interval := shift(time.decimal, type = 'lead', fill = 7) - time.decimal, id]

data
user <- structure(list(id = c(123L, 123L, 140L), hours = c("03:32:12",
"12:37:56", "09:46:33"), time.decimal = c(1.2, 4.5, 6.3)),
class = "data.frame", row.names = c(NA, -3L))


text:
Q: SLD style not imported in geoserver while publishing it through REST API
I am using REST APIs to publish and change the default style of layers
published in GeoServer. When I copy the SLD and paste it directly in
the GeoServer styles it works fine. but while using REST API it omits
the complete symbology and no style is assigned. imported symbology is
as follows

<sld:PolygonSymbolizer>
            <sld:Fill/>
            <sld:Stroke/>
          </sld:PolygonSymbolizer>

following script loads sld from local file and publishes it using REST API:

async function loadSld(urls) {
  try {
    const response = await fetch(urls);
    sld = await response.text();
  } catch (err) {
    console.error(err, 'error loading sld');
  }

  const url = "http://localhost:8080/geoserver/rest/styles";
    await fetch(url, {
      method: "POST",
      headers: {
        "Content-type": "application/vnd.ogc.sld+xml",
        "Access-Control-Allow-Origin": "*",
        "Access-Control-Allow-Methods": "POST, GET, OPTIONS",
        Authorization: "Basic YWRtaW46Z2Vvc2VydmVy",
      },
      body: sld,
    })
      .then((response) => {
        res = response;
        console.log(res, 'response after sld');
        console.log(sld, 'sld');
        if (res.statusText !== "Created") {
         console.log(res, 'response');
        }
      })
      .catch((error) => {
        console.error("Error:", error);
      });
}

the sld is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1.0" xmlns:se="http://www.opengis.net/se">
  <NamedLayer>
    <se:Name>Pakistan_with_Kashmir</se:Name>
    <UserStyle>
      <se:Name>Pakistan_with_Kashmir</se:Name>
      <se:FeatureTypeStyle>
        <se:Rule>
          <se:Name>0 - 1.6</se:Name>
          <se:Description>
            <se:Title>0 - 1.6</se:Title>
          </se:Description>
          <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
            <ogc:And>
              <ogc:PropertyIsGreaterThanOrEqualTo>
                <ogc:PropertyName>PROVINCE_C</ogc:PropertyName>
                <ogc:Literal>0</ogc:Literal>
              </ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyIsLessThanOrEqualTo>
                <ogc:PropertyName>PROVINCE_C</ogc:PropertyName>
                <ogc:Literal>1.60000000000000009</ogc:Literal>
              </ogc:PropertyIsLessThanOrEqualTo>
            </ogc:And>
          </ogc:Filter>
          <se:PolygonSymbolizer>
            <se:Fill>
              <se:SvgParameter name="fill">#ffffff</se:SvgParameter>
            </se:Fill>
            <se:Stroke>
              <se:SvgParameter name="stroke">#232323</se:SvgParameter>
              <se:SvgParameter name="stroke-width">1</se:SvgParameter>
              <se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
            </se:Stroke>
          </se:PolygonSymbolizer>
        </se:Rule>
        <se:Rule>
          <se:Name>1.6 - 3.2</se:Name>
          <se:Description>
            <se:Title>1.6 - 3.2</se:Title>
          </se:Description>
          <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
            <ogc:And>
              <ogc:PropertyIsGreaterThan>
                <ogc:PropertyName>PROVINCE_C</ogc:PropertyName>
                <ogc:Literal>1.60000000000000009</ogc:Literal>
              </ogc:PropertyIsGreaterThan>
              <ogc:PropertyIsLessThanOrEqualTo>
                <ogc:PropertyName>PROVINCE_C</ogc:PropertyName>
                <ogc:Literal>3.20000000000000018</ogc:Literal>
              </ogc:PropertyIsLessThanOrEqualTo>
            </ogc:And>
          </ogc:Filter>
          <se:PolygonSymbolizer>
            <se:Fill>
              <se:SvgParameter name="fill">#ffbfbf</se:SvgParameter>
            </se:Fill>
            <se:Stroke>
              <se:SvgParameter name="stroke">#232323</se:SvgParameter>
              <se:SvgParameter name="stroke-width">1</se:SvgParameter>
              <se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
            </se:Stroke>
          </se:PolygonSymbolizer>
        </se:Rule>
        <se:Rule>
          <se:Name>3.2 - 4.8</se:Name>
          <se:Description>
            <se:Title>3.2 - 4.8</se:Title>
          </se:Description>
          <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
            <ogc:And>
              <ogc:PropertyIsGreaterThan>
                <ogc:PropertyName>PROVINCE_C</ogc:PropertyName>
                <ogc:Literal>3.20000000000000018</ogc:Literal>
              </ogc:PropertyIsGreaterThan>
              <ogc:PropertyIsLessThanOrEqualTo>
                <ogc:PropertyName>PROVINCE_C</ogc:PropertyName>
                <ogc:Literal>4.79999999999999982</ogc:Literal>
              </ogc:PropertyIsLessThanOrEqualTo>
            </ogc:And>
          </ogc:Filter>
          <se:PolygonSymbolizer>
            <se:Fill>
              <se:SvgParameter name="fill">#ff8080</se:SvgParameter>
            </se:Fill>
            <se:Stroke>
              <se:SvgParameter name="stroke">#232323</se:SvgParameter>
              <se:SvgParameter name="stroke-width">1</se:SvgParameter>
              <se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
            </se:Stroke>
          </se:PolygonSymbolizer>
        </se:Rule>
        <se:Rule>
          <se:Name>4.8 - 6.4</se:Name>
          <se:Description>
            <se:Title>4.8 - 6.4</se:Title>
          </se:Description>
          <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
            <ogc:And>
              <ogc:PropertyIsGreaterThan>
                <ogc:PropertyName>PROVINCE_C</ogc:PropertyName>
                <ogc:Literal>4.79999999999999982</ogc:Literal>
              </ogc:PropertyIsGreaterThan>
              <ogc:PropertyIsLessThanOrEqualTo>
                <ogc:PropertyName>PROVINCE_C</ogc:PropertyName>
                <ogc:Literal>6.40000000000000036</ogc:Literal>
              </ogc:PropertyIsLessThanOrEqualTo>
            </ogc:And>
          </ogc:Filter>
          <se:PolygonSymbolizer>
            <se:Fill>
              <se:SvgParameter name="fill">#ff4040</se:SvgParameter>
            </se:Fill>
            <se:Stroke>
              <se:SvgParameter name="stroke">#232323</se:SvgParameter>
              <se:SvgParameter name="stroke-width">1</se:SvgParameter>
              <se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
            </se:Stroke>
          </se:PolygonSymbolizer>
        </se:Rule>
        <se:Rule>
          <se:Name>6.4 - 8</se:Name>
          <se:Description>
            <se:Title>6.4 - 8</se:Title>
          </se:Description>
          <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
            <ogc:And>
              <ogc:PropertyIsGreaterThan>
                <ogc:PropertyName>PROVINCE_C</ogc:PropertyName>
                <ogc:Literal>6.40000000000000036</ogc:Literal>
              </ogc:PropertyIsGreaterThan>
              <ogc:PropertyIsLessThanOrEqualTo>
                <ogc:PropertyName>PROVINCE_C</ogc:PropertyName>
                <ogc:Literal>8</ogc:Literal>
              </ogc:PropertyIsLessThanOrEqualTo>
            </ogc:And>
          </ogc:Filter>
          <se:PolygonSymbolizer>
            <se:Fill>
              <se:SvgParameter name="fill">#ff0000</se:SvgParameter>
            </se:Fill>
            <se:Stroke>
              <se:SvgParameter name="stroke">#232323</se:SvgParameter>
              <se:SvgParameter name="stroke-width">1</se:SvgParameter>
              <se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
            </se:Stroke>
          </se:PolygonSymbolizer>
        </se:Rule>
      </se:FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

A: You are posting a SLD 1.1 to GeoServer, but telling it, via the mime type, it's a SLD 1.0 instead.
Try using the SLD 1.1 mime type instead: application/vnd.ogc.se+xml

redpajama_set_name: RedPajamaStackExchange


text:
Q: How to prevent adding extra empty lines before documented items during code formatting in IDEA/Kotlin? I am using IntelliJ IDEA for Kotlin and have a nice enum with documented items:
enum class TestEnum {
  /** A comment for the item #1. */
  ITEM1,
  /** A comment for the item #2. */
  ITEM2,
  /** A comment for the item #3. */
  ITEM3
}

It look nice and pretty. But when I use automatic code formatting it make it like this:
enum class TestEnum {
  /** A comment for item #1. */
  ITEM1,

  /** A comment for item #2. */
  ITEM2,

  /** A comment for item #3. */
  ITEM3
}

It an an adds empty line before every comment. If there are a lot of items and especially if it's a nested enum it's starting to look ugly and hard to read. The same this happens with documented properties or methods.
Is there any setting to prevent that?

A: This behavior was implemented recently in the Kotlin plugin 1.3.70. I created a request to disable it: https://youtrack.jetbrains.com/issue/KT-37420. Please follow this issue for updates.
The workaround is to use an older version of Kotlin plugin (1.3.61).


text:
Q: rich.table prints unicode when I want ascii I am trying to print MAC address using python rich library. Below is code. The ":cd" in the MAC address get converted to an actual CD disk emoji. How to prevent that from happening?
from rich.console import Console
from rich.table import Table

table = Table(safe_box=True)
table.add_column("MAC address")
table.add_row("08:00:27:cd:af:88")
console = Console()
console.print(table)

Output:
┏━━━━━━━━━━━━━━━━━┓
┃ MAC address     ┃
┡━━━━━━━━━━━━━━━━━┩
│ 08:00:27af:88 │
└─────────────────┘

I tried using safe_box=True option to not print Unicode but that did not work.
I want the final output to look like
┏━━━━━━━━━━━━━--━━━━┓
┃ MAC address       ┃
┡━━━━━━━━━━━━━━━--━━┩
│ 08:00:27:cd:af:88 │
└───────────--──────┘

A: The documentation describes this.  You use backslash to escape characters that would otherwise be recognized.
table.add_row("08:00:27\\:cd:af:88")

If you have a string, do
s = s.replace(':cd','\\:cd')

https://rich.readthedocs.io/en/stable/markup.html
FOLLOWUP
I looked at the full emoji list in the source code.  There are two possible paths.
First, they look for the Unicode "zero-width joiner" as a way to interrupt the emoji search.  So, you could do:
s = s.replace(':cd',':\u200dcd')

Second, "cd" is, in fact, the only two-letter emoji code in their list that is also a hex number.  So, you can add this at the top, and this also works:
from rich._emoji_codes import EMOJI
del EMOJI["cd"]

I've tested both of these.  What a very strange problem.


text:
Q: Is the kernel of a Moore Matrix in $\mathbb F_{q^n}$ determined by the linear dependencies of the generators over $\mathbb{F}_q$? Consider the matrix
$$
M=\begin{bmatrix}
\alpha_1 & \alpha_2 & \dots & \alpha_m \\
\alpha_1^q & \alpha_2^q & \dots & \alpha_m^q \\
\alpha_1^{q^2} & \alpha_2^{q^2} & \dots & \alpha_m^{q^2} \\
\vdots & \vdots & \ddots & \vdots \\
\alpha_1^{q^{m-1}} & \alpha_2^{q^{m-1}} & \dots & \alpha_m^{q^{m-1}} \\
\end{bmatrix}
$$
over $\mathbb F_{q^n}$ for some prime power $q$.
Such a matrix is sometimes called a Moore Matrix.
It is a classically know result that $M$ is nonsingular if and only if $a_1, \ldots, a_m$ is linearly independent over $\mathbb F_q$ (see, for instance, [Lidl and Niederreiter][1] lemma 3.51).
My question is a strengthening of this result: do the linear dependencies of
$\{a_1, \ldots, a_m\}$ over $\mathbb F_q$ completely determine the kernel of $M$
(i.e. the linear dependencies of the columns of $M$ over $\mathbb F_{q^n}$)?
More precicely, do we have the equality
$$ \mathrm{ker}M = \mathrm{span}_{\mathbb F_{q^n}}
  \{ v \in {\mathbb (F_q)}^n | Mv = 0 \}
  $$
Note that this requires identifying $\mathbb F_q$ as a subset of $\mathbb
F_{q^n}$ in some way, which may introduce ambiguities/issues, but I am primarily interested in a case where $q$ is prime where this is not a problem.
Of course, one inclusion is trivial, but I have been unable to arrive at the other.
For my purposes I am specifically interested in the case of $q=2$, for
which I have been unable to find a counterexample with a brute force search in
sage. In this case the hypothesis is equivalent to asking whether there exists
some basis for $\mathrm{ker}M$ whose entries are all either $0$ or $1$.
Any leads are appreciated.
[1]: Rudolf Lidl and Harald Niederreiter. Introduction to finite fields and their applications. Cambridge university press. 1986.

A: Consider the vector $(\alpha_1,\ldots,\alpha_m)$ as the $\mathbf{F}_q$-linear transformation $T:(\mathbf{F}_q)^m\to \mathbf{F}_{q^n}$ given by
$$ (\beta_1,\ldots,\beta_m) \mapsto \sum \beta_i\alpha_i. $$
Then $\ker(M)$ is the $\mathbf{F}_{q^n}$-span of $\ker(T)$ in $(\mathbf{F}_{q^n})^m$.
To see this, note that $\ker(T)<\ker(M)$ and compare dimensions.


text:
Q: Creating an "Ambient Context" (UserContext) for an ASP.NET application using a static factory Func I have found out that I need the current logged in user data in nearly every class (controllers, view, HTML helpers, services and so on). So I thought about to create an "Ambient Context" instead of injecting an IUserService or the User directly.
My approach looks something like that.
public class Bootstrapper
{
    public void Boot()
    {
        var container = new Container();
        // the call to IUserService.GetUser is cached per Http request
        // by using a dynamic proxy caching mechanism, that also handles cases where we want to
        // invalidate a cache within an Http request
        UserContext.ConfigureUser = container.GetInstance<IUserService>().GetUser;
    }
}

public interface IUserService
{
    User GetUser();
}

public class User
{
    string Name { get; set; }
}

public class UserContext : AbstractFactoryBase<User>
{
    public static Func<User> ConfigureUser = NotConfigured;

    public static User ActiveUser { get { return ConfigureUser(); } }
}

public class AbstractFactoryBase<T>
{
    protected static T NotConfigured()
    {
        throw new Exception(String.Format("{0} is not configured", typeof(T).Name));
    }
}

Example usage:
public class Controller
{
     public ActionResult Index()
     {
         var activeUser = UserContext.ActiveUser;
         return View();
     }
}

Is my approach correct or do I missing something? Do you have better solutions in mind?
UPDATE:
More Detail of the User class:
public class User
{
   string Name { get; set; }
   bool IsSuperUser { get; set;}
   IEnumerable<AzManOperation> Operations { get; set}
}

In Controllers we need to check if an User is a SuperUser to only provide the SuperUser some extra functionality.
public class BaseController : Controller
{
    private readonly IUserService _userService;

    BaseControler(IUserService userService)
    {
        _userService = userService
    }

    public User ActiveUser
    {
        get { return _userService.GetUser(); }
    }
}

In Views we check Operations to only show an edit or delete button if the user has the right to do so. A view never uses the DependencyResolver, but ViewBag or ViewModel. My idea here is to implementing a custom ViewBasePage and providing an ActiveUser property, so that Views have an easy accesss.
In HtmlHelpers we render controls depending on IsSuperUser and Operations (passing in the User object or using DependencyResolver).
In Service Classes we need those properties too. For instance to decide if a basket is valid or not (check if the User is allowed to buy articles that are not in a standard list). So the Service class depends on IUserService and calling GetUser().
In Action Filters to force the user to change his password (only if it is not a SuperUser and User.ForcePasswordChange is true). Here we use the DependencyResolver.
My wish is to have a more easily way to get the User object, instead of using DependencyResolver.Current.GetService().GetUser() or using things like ViewBag.ActiveUser = User.
The User object is an object that is almost everywhere needed to check permissions or the like.

A:

In Views we check Operations to only show an edit or delete button if the user has the right to do so.

The view should not do this check. The Controller should return a view model to the view that contains boolean properties that state whether those buttons should be visible. Returning a bool with IsSuperUser already moves to much knownledge into the view. The view shouldn't know that it should show a certain button for a super user: that's up to the controller. The view should only be told what to display.
If almost all views have this code, there are ways to extract repetitive parts out of your views, for instance with partial views. If you're finding yourself repeating those properties over many view models, perhaps you should define an envelope view model (a generic view model that wraps the specific model as T). A controller can create its view model, while you create a service or cross-cutting concern that wraps it in your envelope.

In Service Classes we need those properties too. For instance to decide if a basket is valid or not

In this case you are talking about validation, which is a cross-cutting concern. You should use decorators to add this behavior instead.

A: This is MVC, right?
You're reinventing the wheel.
Add this method to your Global.asax.cs:
protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{
    var authCookie = Request.Cookies[FormsAuthentication.FormsCookieName];
    if (authCookie != null)
    {
        var ticket = FormsAuthentication.Decrypt(authCookie.Value);
        var user = ticket.Name;
        var identity = new GenericIdentity(user, "Forms");
        var principal = new GenericPrincipal(identity, null);
        Context.User = principal;
    }
}

This example shows forms authentication which you can strip if you're using another mechanism.  The key is these three lines:
    var identity = new GenericIdentity(user, "Forms");
    var principal = new GenericPrincipal(identity, null);
    Context.User = principal;

GenericIdentity and GenericPrincipal can be replaced with anything you want as long as they implement the (trivial) IIdentity and IPrincipal interfaces.  You can create your own implementations of these classes with whatever extra properties you need.
You can then access the authenticated user from all the things you listed - controllers, views, etc. - via HttpContext.Current.User (which is static).
If you created your own implementation of IPrincipal you can just cast that reference to your custom type.
You'll note that IPrincipal has a method called IsInRole, so you'd say:
if (HttpContext.Current.User.IsInRole("SuperUser"))

TL;DR - you are overengineering something ASP.NET has already solved, and I'd have an aneurysm if I saw the types you're proposing in a production application.

A: I think the easiest and maintainable solution is to create a static class CurrentUserProvider which has only one method Get(HttpContextBase) that returns the current user, behind the scene you can use the DependencyResolver to get the service that actually returns the user. Then where you need the CurrentUser you can call CurrentUserProvider.Get(context) and do whatever custom logic you need to perform.
The other solution that you are trying to do is injecting the service in the base controller constructor which is okay if you have handful of controllers, it would become an issue if you have quite a number of controllers and not all of the controllers requires that service. Writing tests for those controller would be such pain in the neck, because you have to create stubs/mocks for that service for all your controller tests. Maybe you can use property injection instead of constructor to address it.
You can use the same property injection for Filters too.
Now, the remaining two are the view and the helper. For View you can create special base class that inherits from WebViewPage/ViewPage and use the IViewActivator to inject the service and the same applies for the helpers, create helpers that inherits from system helpers and use those in your base controllers and views.
I think the second approach is bit cumbersome and it does not add that much value to do all those custom things.
So my suggestion is to go with the first.


text:
Q: Setting style for Console.log within a string variable? I am trying to set up a nicer console log output on a javascript script I'm running by using the available styling options.
In this case:
s=`Title 1 \n This is some text that follows the first title`;
s=`${s} \n Title 2 \n This is some other text that follows`;
console.log(s);

I would like to have an output as:
Title 1
This is some text that follows the first title
Title 2
This is some other text that follows
But given the examples I've found for styling, I can't find how to do so, as
console.log(`%c ${s}`, 'font-weight:bold');

would bolden everything inside.
Can I have some advice?
Thanks!

A: If you want to apply different styles to different parts of the log, you must use multiple %c and add multiple style arguments.
console.log(`%cTitle 1 \n %cThis is some text that follows the first title`, 'font-weight:bold', 'font-weight: normal');

As far as I know, this is the only way to accomplish this.
https://hackernoon.com/styling-logs-in-browser-console-2ec0807dc91a

A: Just log multiple times then:
 console.log(`%c Title 1`, 'font-weight:bold');
 console.log("content");

A: I know this question is up here for a while, but I was doing performance logging and found this.

var totalTime = 0.634563;
console.log("Widget Modal Performance Update:  Total Operation Time = %c" + totalTime.toFixed(2) + " seconds.", " font-weight: bold; color: #000099");

You just have to make sure that %c preceeds the variable in the string addition.


text:
Q: Unity: visual scripting package import error I have erorrs while unity loading.I use unity 2021.3.5f1 Personal. Now i just removed visual scripting package, but its compromise. I tried unistall and install unity, removed floder of package, its in all projects
List of errors:
>The .meta file Packages/com.unity.visualscripting/Editor/VisualScripting.Core/IconMap/SceneVariables.png.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete
>The .meta file and it will be recreated correctly

>The .meta file Packages/com.unity.visualscripting/Editor/VisualScripting.Core/IconMap/State@32x.png.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete
>The .meta file and it will be recreated correctly

>The .meta file Packages/com.unity.visualscripting/Editor/VisualScripting.Core/IconMap/StateMachine@32x.png.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete
>The .meta file and it will be recreated correctly

>The .meta file Packages/com.unity.visualscripting/Editor/VisualScripting.Core/IconMap/UnityMessageListener@32x.png.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete
>The .meta file and it will be recreated correctly

>The .meta file Packages/com.unity.visualscripting/Editor/VisualScripting.Core/IconMap/VariablesAsset@32.png.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete
>The .meta file and it will be recreated correctly

>The .meta file Packages/com.unity.visualscripting/Editor/VisualScripting.Core/IconMap/VariablesSaver@32x.png.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete
>The .meta file and it will be recreated correctly

>Asset Packages/com.unity.visualscripting/Editor/SettingsProvider has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Dependencies/ReorderableList/Internal/SerializedPropertyUtility.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Documentation/XmlDocumentationTags.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Inspection/Primitives/UintInspector.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Inspection/Primitives/UlongInspector.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Inspection/Primitives/UshortInspector.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Inspection/Unity has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Interface/Colors/SkinnedColor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Serialization has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/SerializedProperties has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/System.Threading.defines has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Threading has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Unity.VisualScripting.Core.Editor.asmdef has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Utilities has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Utilities/WarningLevel.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Variables has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Widgets has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Windows has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Windows/Sidebars has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Windows/SinglePageWindow.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Windows/TabbedPage.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Windows/UpdateWizard has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Windows/WebView.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Windows/WebWindow.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Windows/WindowClose.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Windows/Wizard.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Windows/WrappedEditorWindow.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/YamlDotNet.defines has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Flow has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Flow/Framework/Nesting/SuperUnitDescriptor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Flow/Framework/Nesting/SuperUnitEditor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Flow/Framework/Nesting/SuperUnitWidget.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Flow/Framework/Nesting/UnitPortDefinitionUtility.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Flow/Units/UnitEditor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Flow/Units/UnitInspector.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Flow/Units/UnitWidget.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Shared has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Shared/Unity.VisualScripting.Shared.Editor.asmdef has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/Description/StateMachineDescriptor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/Description/StateMacroDescriptor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/States/StateAnalysis.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/States/StateDescription.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/States/StateDescriptor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/States/StateEditor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/States/StateTransitionAnalysis.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/States/StateWidget.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/States/SuperStateDescriptor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/States/SuperStateEditor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/States/SuperStateWidget.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/Transitions/StateTransitionEditor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/Transitions/StateTransitionWidget.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.State/Transitions/TriggerStateTransitionWidget.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Graphics/SetupSelector.afphoto has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Graphics/Structure_16x.ai has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Graphics/Variables.afphoto has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Events/MessageListeners/MonoBehaviourMessageListeners/UnityOnTriggerEnterMessageListener.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Events/MessageListeners/MonoBehaviourMessageListeners/UnityOnTriggerExit2DMListener.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Events/MessageListeners/MonoBehaviourMessageListeners/UnityOnTriggerStay2DMListener.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Events/MessageListeners/MonoBehaviourMessageListeners/UnityOnTriggerStayMListener.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Events/MessageListeners/UIEventsInterfacesListeners has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Events/MessageListeners/UIEventsInterfacesListeners/UnityOnPointerExitMessageListener.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Events/MessageListeners/UIEventsInterfacesListeners/UnityOnScrollMessageListener.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Events/MessageListeners/UIEventsInterfacesListeners/UnityOnSelectMessageListener.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Events/MessageListeners/UIEventsInterfacesListeners/UnityOnSubmitMessageListener.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Events/MessageListeners/UIEventsListeners has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Reflection/Operators/UnaryOperatorHandler.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Reflection/Optimization/StaticPropertyAccessor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/SerializedProperties/SerializedPropertyProvider.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/SerializedProperties/SerializedPropertyProviderAttribute.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Variables/VariablesAsset.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Core/Variables/VariablesSaver.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/SelectOnInteger.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/SelectOnString.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/SelectUnit.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/SelectUnit_T.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/Sequence.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/SwitchOnEnum.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/SwitchOnInteger.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/SwitchOnString.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/SwitchUnit.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/Throw.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/ToggleFlow.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/ToggleValue.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/TryCatch.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Control/While.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector2/Vector2Normalize.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector2/Vector2PerSecond.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector2/Vector2Project.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector2/Vector2Round.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector2/Vector2Subtract.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector2/Vector2Sum.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector3/Vector3MoveTowards.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector3/Vector3Multiply.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector3/Vector3Normalize.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector3/Vector3PerSecond.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector3/Vector3Project.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector3/Vector3Round.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector3/Vector3Subtract.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector3/Vector3Sum.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector4/Vector4Subtract.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Math/Vector4/Vector4Sum.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Framework/Variables/Obsolete/VariableUnit.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.Flow/Ports/ValuePortDefinition.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Runtime/VisualScripting.State has no meta file, but it's in an immutable folder. The asset will be ignored.

>The .meta file Packages/com.unity.visualscripting/Editor/VisualScripting.Core/IconMap/SceneVariables.png.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete
>The .meta file and it will be recreated correctly

>The .meta file Packages/com.unity.visualscripting/Editor/VisualScripting.Core/IconMap/State@32x.png.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete
>The .meta file and it will be recreated correctly

>The .meta file Packages/com.unity.visualscripting/Editor/VisualScripting.Core/IconMap/StateMachine@32x.png.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete
>The .meta file and it will be recreated correctly

>The .meta file Packages/com.unity.visualscripting/Editor/VisualScripting.Core/IconMap/UnityMessageListener@32x.png.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete
>The .meta file and it will be recreated correctly

>The .meta file Packages/com.unity.visualscripting/Editor/VisualScripting.Core/IconMap/VariablesAsset@32.png.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete
>The .meta file and it will be recreated correctly

>The .meta file Packages/com.unity.visualscripting/Editor/VisualScripting.Core/IconMap/VariablesSaver@32x.png.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete
>The .meta file and it will be recreated correctly

>Asset Packages/com.unity.visualscripting/Editor/SettingsProvider has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Dependencies/ReorderableList/Internal/SerializedPropertyUtility.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Documentation/XmlDocumentationTags.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Inspection/Primitives/UintInspector.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Inspection/Primitives/UlongInspector.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Inspection/Primitives/UshortInspector.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Inspection/Unity has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Interface/Colors/SkinnedColor.cs has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/Serialization has no meta file, but it's in an immutable folder. The asset will be ignored.

>Asset Packages/com.unity.visualscripting/Editor/VisualScripting.Core/SerializedProperties has no meta file, but it's in an immutable folder. The asset will be ignored.


text:
Q: A counterexample in measure theory on $\sigma$-infinite spaces Usually measure theory books include the following theorem (citing Proposition 5.1.3 in Cohn's measure theory book)

Let $(X, \mathcal A , \mu )$ and $(Y, \mathcal B, \nu )$ be $\sigma$-finite measure spaces. If $E$ belongs to the $\sigma$-algebra $\mathcal{A}\times\mathcal{B}$, then the function $x\mapsto\nu(E_x)$ is $\mathcal{A}$-measurable
  and the function $y\mapsto\mu(E^y)$ is $\mathcal{B}$-measurable.

where $E_x=\{y\in Y\mid (x,y)\in E\}$ and $E^y=\{x\in X\mid (x,y)\in E\}$ are the slices of $E$. I'm looking for an example of two spaces (with at least one of them necessarily not $\sigma$-finite) for which this theorem fails.
I believe one of the two needs to be not only $\sigma$-infinite but also s-infinite. If this is not the case I would be very interested in an example involving an s-finite but not $\sigma$-finite space.


text:
Q: Unbind service in android.app.Application In the application in onCreate() I bind to InAppBillingService. There is no onDestroy() method in the Application class.
How to implement the call to unbindService() after the application is closed?

A: If the Application object is destroyed, then your service should also be destroyed. You cannot have one of your application components running without an instance of your Application object.
If you prefer to explicitly unbind from the service, you can have your Activities bind to it in onStart and unbind from it in onStop instead.

A: Probably this is not the best approach. It is not a good practice to this because this way your service will live as long as your application which is not the best scenario.
My advice is to use the binding in a concrete activity. This way you can unbind when the activity is paused and rebind when it is resumed. If you need to bind in more than one activities, create a super class that does this and extend it with your concrete activity classes.
If you need a service that will run through the whole application's life, the right approach is to use a foreground service. It has the highest priority so it won't be killed first when the OS starts to free resources. The other benefit of this approach is that this way your application lives as long as your service but not the opposite. The control of the lifetime is in the Service but not in the application which is the right way.

A: According to Google's documentation at http://developer.android.com/google/play/billing/billing_integrate.html#billing-service:

Important: Remember to unbind from the In-app Billing service when
  you are done with your Activity. If you don't unbind, the open service
  connection could cause your device's performance to degrade. This
  example shows how to perform the unbind operation on a service
  connection to In-app Billing called mServiceConn by overriding the
  activity's onDestroy method.

That means that having the service bind to the Application object is a bad idea, since it will be eating resources the entire time your application is running. Instead bind to an Activity or a Fragment and then unbind in their onDestroy method.


text:
Q: VueJs input previsualization, does not change my data inside FileReader listener I'm new to VueJs and currently designing a image picker component. I'm struggling with the file uploaded event, as my mutable properties doesn't want to update inside the event listener.
There's a part of the template code:
<input @change="handleUpload" type="file" :name="imageName" />
<img :src="mutableImageString" alt="Image" class="img-responsive" />

And the logic :
handleUpload: function (e) {
    var reader = new FileReader();
    var file = e.target.files[0];

    reader.onload = function () {
        this.mutableImageString = file;
    }
    if (file) {
        reader.readAsDataURL(file);
    }
},

mutableImageString isn't updated, however if I take it out of the onload event, it's updated but with an empty value. Any idea? Thanks!
PS: Sorry about my poor english :c


text:
Q: Form validation in MVC 3 without attribution I have multiple MVC 3 forms that need form validation on certain fields (mostly to test empty submission). Some of my view models come directly from an ORM classes, so I don't have access to attribute required fields. Do I need to create additional classes (i.e., make a mega-ViewModel above the ORM class) to populate so I can attribute these or do other options exist (such as jQuery)?

A:
Some of my view models come directly from an ORM classes

So those are not real view models but models. I would recommend you defining specific view models for each view/form. The view model should contain only the properties used by the view and be decorated with the necessary validation attributes for this particular view. This way you can handle validation as you like. So my advice is to always create and use view models which are specifically tailored to the requirements of a given view and map them to and from the domain models.
You may take a look at the following answer for some ideas.

A: Viewmodels are the recommendation - however many projects choose not to use them as their basic functionality for some reason - maybe simplicity.
So to answer the question specifically though - you can define metadata classes that then contain the same properties as your existing classes.
Best practice is to use view models - but you can indeed do this with your existing models
Something like this

//Defines that you are going to use CustomerMetaData as the class to define the rules.
//This is named the same as your ORM class and doesnt need to contain anything in it.
[MetadataType(typeof(CustomerMetaData))]
public partial class Customer
{
//Don't need anything here
}

public class CustomerMetaData
{
  [Required()]
   public string CustomerName {get;set;}
}


text:
Q: install4j 7.0.6: Cancel installation from "Replacement script for language code" We have a use case which requires cancelling the installation from the "Replacement script for language code" - General Customization Option of the Installer.
Is there a way to achieve this either programatically or by configuration?

A: You can call
context.finish(1);

in that script.


text:
Q: Suma de valores en una columna de una tabla con símbolo monetario distintos(DataTables - laravel) Cordial saludos tengo un inconveniente ya que poseo un proyecto donde en una tabla donde tengo valores numéricos que deseo realizar la suma total de esa columna pero el problema es que en esa columna posee dos tipos de valores monetarios(dólares y soles) como se ve en la imagen

Lo que deseo es separar esos valores  que solo sume los totales dependiendo del símbolo monetario en este caso solo el total de los montos en soles y el total de montos en dólares de esa columna
uso datatables y hasta el momento e usado un código para hacer la suma total pero lo suma en general y  no se como dividirlos.
<script>
 $(document).ready(function(){
   var table = $('#servicios').DataTable({
     processing: true,
     serverSider: true,
     ordering: true,
     stateSave: true,
     "order": [[ 2, "asc" ]],
    });
     //SUMA
     var arrSalePriceOne = table.column(4).data().sum();
     $("#tblProfit").text((+arrSalePriceOne));
   </script>

Agradecería mucho si me podrían ayudar


text:
Q: What is meant by a primitive data type? My understanding of a primitive datatype is that

It is a datatype provided by a language implicitly (Others are user defined classes)

So different languages have different sets of datatypes which are considered primitive for that particular language. Is that right?
And what is the difference between a "basic datatype" and "built-in datatype". Wikipedia says a primitive datatype is either of the two.
PS - Why is "string" type considered as a primitive type in SNOBOL4 and not in Java ?

A: A primitive is a basic data type that's not built out of other data types.  It can only represent one single value.  All primitives are built-in data types by necessity, (the compiler has to know about them,) but not all built-in data types are primitives.
In some languages, the compiler has built-in knowledge of certain types that are built out of other things, because it has to be able to treat them in a special way.  Examples would be the Variant in Delphi and Visual Basic (and the Boo equivalent, "Duck") and the base object class in most OO languages.

A:
Why is "string" type considered as a primitive type in SNOBOL4 and not in Java ?

Because the Java Language Specification very clearly specifies what the word "primitive" means in the context of Java, and Java's String doesn't conform to this specification, whereas the SNOBOL4 Language Specification defines what "primitive" means in the context of SNOBOL4 and SNOBOL4's string conforms to that specification.
There's really nothing more to it. The specification of the respective language defines what certain words mean and something either fits that description or it doesn't. For example, the C Language Specification defines the meaning of the word "function" to be something which is very clearly not what the word "function" usually means, but that's the way the word is used inside the C community.

A: It kind of depends on the language.
For example, in languages like C and C++, you have a number of built-in scalar types - int, float, double, char, etc.  These are "primitive" in the sense that they cannot be decomposed into simpler components.  From these basic types you can define new types - pointer types, array types, struct types, union types, etc.
Then you have a language like old-school Lisp, where everything is either an atom or a list.  Again, by the above definition, an atom is "primitive" in the sense that it cannot be decomposed into something simpler.
Edit
As far as I'm concerned, the terms "primitive", "basic", and "built-in" are pretty much interchangeable.  If you want to get really pedantic, though, you can distinguish between types that are "built-in" (those explicitly provided by the language definition) and types derived from the built-in types that are still "primitive" or "basic" in that they cannot be decomposed into simpler elements.  C's typedef facility allows you to create new type names for existing types.  Ada allows you to create new scalar types that have constraints on them.  For example, you can derive a Latitude type from the built-in floating type, with the constraint that it can't take on values outside the range [-90.0, 90.0].  It's still a primitive or basic type in that it cannot be broken down into any simpler components, but since it's user-defined, it's not considered a "built-in" type.
Again, these concepts are a little fuzzy, and it really depends on context.  For example, the notion of a "built-in" type is meaningless for a typeless language like BLISS.

A: From the Java perspective:
In Java, there is a very clear distinction between primitive and non-primitive types.
A variable of a primitive type directly contains the value of that type (in other words, they are value types).
A variable of a non-primitive type doesn't contain the value directly; instead, it is a reference (similar to a pointer) to an object. (It is not possible in Java to create user-defined value types).
Java has eight primitive types: byte, short, int, long, char, boolean, float and double. Anything else is a non-primitive type.

A: A 'primitive' data type means that you have a value stored in memory--this value has no methods or internal structure. A primitive can only be operated on by external operations.
In Java, primitives are numbers (int, long, etc.) and char. http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
If your value has structure (I'm thinking of struts here) then it is not a primitive. If it has methods (an object or class) it is not a primitive.

A: I came across some information and felt it would aid the other answers . So want to share it -
Wikipedia says -
In computer science, primitive data type is either of the following:
A basic type is a data type provided by a programming language as a basic building block. Most languages allow more complicated composite types to be recursively constructed starting from basic types.
A built-in type is a data type for which the programming language provides built-in support.
In most programming languages, all basic data types are built-in. In addition, many languages also provide a set of composite data types("string" type in Java).
I would like to say it this way -
A basic datatype is a datatype which cannot be further broken down ("string" type can be made from "char", but char cannot be 'broken down' into any datatype (In most of Programming languages) . So it is basic datatype)
String type , in SNOBOL4 is considered primitive .Though I dont know the exact reason why . It's both basic as well as built-in in SNOBOL4 .
Java specification clearly mentions the list of datatypes it considers to be primitive type . Because the string type is not in their specification , it's not a primitive datatype in Java , inspite of being a built-in type .

A: Primitives are fundamental data types provided by the language itself. Example in C language are int, float, char data types. It is provided as fundamental part of the language.
Non primitives are user defined variables or objects. For example you can define an object which store data or you can use struct in C to define you own variables. These are not primitive because you had to define them first in order to used them.

Examples: Employee, Student,
  a_very_large_number_that_you_defined_yourself

Edit with more explanation and addressing the comment
I think of primitive as variables that came originally with the language and not variables like String in C++ which you have to declare using the New keyword. That makes it an object so a String would not be a primitive.
Answer you comment: It probably has to do with implementation of the variable. If it was part of language core, it is primitive. If not it is not. Example is String in C++. This is not a core variable and is declared using New keyword. So it is not primitive.

A: For better understanding the concept of primitive types and user-defined datatypes all that the other answers lacks is the concept of compiler.
If you understand the concept of lexemes getting selected as tokens, you will come to know that primitives are the only datatypes that a compiler knows by itself.


text:
Q: Joint Hypothesis Testing in Multivariate Regression I am fitting the following model to my data $y = \beta_0 + \beta_1 x_1 + \beta_2 x_2$ and the claim I want to be able to make is that $\beta_1 = 0$ and $\beta_2 \neq 0$. I am going to use bootstrapping for this purpose. However, I don't know how to set up a test statistic for my claim since I have $\beta_1 \neq 0$ in my null hypothesis.
On a higher level what I want to show is that my output $y$ is not affected by $x_1$ whereas the variable $x_2$ helps me predict this output.
My apologies in advance if my question is ill-posed or silly. I am still in the process of coming up with a precise formulation of my problem. So any constructive feedback is appreciated.

A: One reasonable way to approach something like that would be to abandon the notion of a null of the real line minus a mere single point (i.e. a point alternative, which would yield not chance of rejection) and instead to do equivalence testing on the second parameter, perhaps along with an ordinary hypothesis test on the first parameter.
There are numerous posts on site relating to equivalence testing.


text:
Q: Why is the result of $-2^2 = -4$ but $(-2)^2 =4$? I am really new into math, why is $-2^2 = -4 $ and $(-2)^2 = 4 $?

A: The order of operations is a convention that give us what operation should we do before. In the given examples there are three operations (given in the priority):operation in parenthesis, power,multiplication  and subtraction so we have
$$-2^2=-4\leftarrow\text{the power has the priority before the subtraction}$$
$$(-2)\cdot(-2)=4\leftarrow\text{the subtraction in the parenthesis has the priority }$$
before the multiplication.

A: Because $-2^2$ means that you take the number $2$, raise it to the second power ($^2$), and then you consider its additive inverse ($-$). So, $2$ raised to the second power is $4$, whose additive inverse is $-4$. This is because exponentiation has a higher priority and it is the first thing you have to do; hence you compute the power before doing anything else, and then you deal with the minus sign.
On the other hand, brackets can change the meaning of a mathematical expression: here $(-2)^2$ simply means that you have to raise $-2$ to the second power, and elementary algebra tells us that $(-2) \cdot (-2) = 4$.

A: It is true that $-2^2$ is ambiguous (unless you know the convention), because $-(2^2) \ne (-2)^2$.  (And, indeed, some calculators or programing languages may do it using their own convention, different from the mathematicians' convention.) The mathematicians' convention is $-2^2 = -(2^2)$.  Why?  Presumably because we often need to write $-(2^2)$.  But if you ever need to write $(-2)^2$ you can just write $2^2$ instead.

A: Universally, exponentiation is agreed to be evaluated before subtraction.
However, there are two opposing wishes that go into the design of a grammar:

*

*Negation is evaluated at the same time as subtraction, to avoid irregularities

*Unary operators are all evaluated before binary operators, to keep things simple

In the first case, $-2^2 = -4$.  In the second case, $-2^2 = 4$.  Most mathematical publications and mathematics forums will use the first case.  However, some software (I believe Haskell like grammars are an example) use the second case.

A: $ -2^2 = - \left( 2^2 \right) = -4 $, whereas $ \left( -2 \right)^2 = \left( -2 \right) \cdot \left( -2 \right) = 4 $, because the negatives cancel.

A: By convention brackets are evaluated first, then exponentiation, division/multiplication, and finally addition/subtraction. Think of the unary negation operator as a shorthand for "multiply by -1". These rules are usually remembered by students with the BEDMAS acronym.
I prefer to think of the rules as those such that the number of brackets are minimized when writing out a polynomial. For example, consider
$$x^4+5x^3-3x^2+2x+6$$
Were multiplication to have a higher precedence than exponentiation, the expression would look like this
$$x^4+5(x^3)-3(x^2)+2x+6$$
Were the expression just evaluated left to right (no precedence rules), the expression would look like this
$$(x^4)+(5(x^3))-(3(x^2))+(2x)+6$$
Obviously the first example is the easiest to read.
Another approach is to evaluate the "strongest" operations first. Exponentiation is defined as repeated multiplication, so exponentiation is higher on the pecking order. Similarly, multiplication and divisions are defined as repeated additions (or subtractions), so multiplication and divisions would be evaluated before the additions/subtractions. If we need to change the order of operations, we use brackets as follows.
$$x^3-4x^2-11x+30 = (x-2)(x+3)(x-5)$$
Notice how the brackets force us to evaluate the additions and subtractions before the multiplications.


text:
Q: Как присвоить значение элементу двумерного динамического массива, созданного с помощью контейнера  Массив задается следующим образом
vector < vector <int> > v;

Затем, когда я пытаюсь присвоить значения элементам массива, для вот такого присвоения
v[a][b] = i;

Компилятор выдает вот такое сообщение
error: invalid types 'gnu_cxx::alloc_traits::value_type {aka int}[int]' for array subscript
А при присвоении с помощью функции
v[a].push_back(i);

error: request for member 'push_back' in 'v.std::vector::operatora))', which is of non-class type 'gnu_cxx::alloc_traits::value_type' {aka 'int'}
v[a].push_back(i);
Как исправить эту ошибку, чтобы можно было присваивать значения и прямым обращением к элементу массива, и с помощью функции push_back(x)?
Если что, переменные a, b и i являются переменными типа int и имеют значения не более 10

A: vector< vector<int> > v1(2 * a, vector<int>(2 * b));
v1[a][b] = i;

или
vector< vector<int> > v2;
for (int i = 0; i < 2 * a; ++i)
    v2.push_back(vector<int>(2*b));
v2[a][b] = i;

у вас вектор был пустой, потому вы не можете присвоить значение какому то элементу, а вектор нужно заполнять соответствующим типом элементов. В вашем случаи  тип значения является вектором
Дополнение:
если a <= 10 и b <= 10, то  можно использовать это условие:
vector< vector<int> > v1(11, vector<int>(11));
    v1[a][b] = i;

vector< vector<int> > v2;
for (int i = 0; i < 11; ++i)
    v2.push_back(vector<int>(11));
v2[a][b] = i;


text:
Q: Open documents in tabs in Word Is it possible to open documents in tabs in Microsoft Word, in the same manner as tabbed browsing in browsers?

A: Something like this will do it, it's called Office Tabs.  Though, I have read there are some crashes during certain feature uses.
Hope that helps.


text:
Q: Creating virtual host with Apache2 I'm trying to get Apache2 to host my Django project located in /var/www/tbg/. I get an Internal Server Error (500). I have already installed libapache2-mod-wsgi and
My files are as follows:
project.wsgi file: /var/www/tbg/django.wsgi
import os
import sys
sys.path = ['/var/www/tbg'] + sys.path
os.environ['DJANGO_SETTINGS_MODULE'] = 'tbg.settings'
import django.core.handlers.wsgi
XSendFile On
application = django.core.handlers.wsgi.WSGIHandler()

sites-available/127.0.0.1 file:
<VirtualHost *:80>
WSGIScriptAlias / /var/www/tbg/django.wsgi

ServerName 127.0.0.1
Alias /static /usr/local/lib/python2.6/dist-packages/django/contrib/admin/static/
Alias /media /var/www/tbg/media/

XSendFile On

<Directory /var/www/tbg/>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

httpd.conf file:
WSGIScriptAlias / /var/www/tbg/tbg/wsgi.py
WSGIPythonPath /var/www/tbg

Alias /static /var/www/tbg/static/
Alias /media /var/www/tbg/media/

XSendFile On

<Directory /var/www/tbg/>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>

I think those are all of the important files. Let me know what more information you need.

A: You need to setup error reporting so you could see error messages about what exactly is wrong. You may find this thread useful: https://stackoverflow.com/questions/8007176/500-error-without-anything-in-the-apache-logs.


text:
Q: I want to reverse a text using these functions but i dont know what went wrong #include <iostream>
#include <string.h>
using namespace std;

void reverse_Text(char* str);

int main()
{
    int i, j, Text, revText;
    const int [arrSize] = 101;
    char Text[arrSize], revText[arrSize];

    cout << "Please enter a sentence: ";
    cin >> Text;

    reverse_Text(Text);

    cout << "The reversed text is " << Text << endl;
    return 0;

}

int reverse_Text(char ori_str, char rev_str)
{
    int i = 0;
    for(j = strlen(ori_str)-i, j >= 0, j--){
        rev_str[i] = ori_str[j];
        rev_str[i+1] = '0';
        i += 1;
    }
}

I cant seem to find the error, im still a newbie in coding, it says that text and revtext are not declared, i cant find the next error when there is already an error at the top

A: int reverse_Text(char ori_str, char rev_str)

This function takes two characters as parameters. You actually need to pass the addresses of the characters.
int reverse_Text(const char* ori_str, char* rev_str)

Notice that I've declared the first parameter as const. This tells the compiler that the original string is not supposed to be changed. The compiler will then generate an error if any code inside the function tries to modify any character in the original string.
You will need to pass both parameters, not just one, when you call the function.
reverse_Text(Text, revText);

This is actually passing the address of the first character in each string.


text:
Q: For Android App c# is better or java? i want to start Android Developing. I Can Use c# or Java to start for Android
Developing.
I am a  .NET developer.
My Question is which language is better for android programming. which limitation these language have?
what is their power in android programming?Can I develop full apps in .NET without learning java?

A: You can use Xamarin if you want to develop mobile apps with c#. However, when I ask mobile developers, they prefer to write native apps.
With Xamarin you will have the option of using VS which I think is very good, but you have to consider that it is usable for develop both Android and IOS apps. You have to consider performance and size of the app.
I have to add that Xamarin is now free if you have Visual Studio 2015
So my advice in total would be:
If you need only Android or IOS: go with native
If you need both Android and IOS and it is a small company or if the budget is limited, then go with Xamarin
If not again go with native

There is also a project called Apache Cordova which will do the same using javascript


text:
Q: Can't start speech recognition in service I am trying to run the speech recognition api in a service with the code provided here and I'm having trouble doing so.
My activity has these lines:
protected void onCreate(Bundle savedInstanceState) {
......

Intent startConstantSR = new Intent("MyService.class");
        getApplicationContext().startService(startConstantSR);
....
}

and the Service's onCreate looks like this
public void onCreate()
    {super.onCreate();
        mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
        mSpeechRecognizer = SpeechRecognizer.createSpeechRecognizer(this);
        mSpeechRecognizer.setRecognitionListener(new SpeechRecognitionListener());
        mSpeechRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
        mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                                         RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
        mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE,
                                         this.getPackageName());
      mSpeechRecognizer.startListening(mSpeechRecognizerIntent);
 }

I have set up a Toast in onReadyForSpeech and onBeginningOfSpeech to show up so I know that I am on the right path - but no kind of toast is fired.
What am I doing wrong? I can't find out because I'm just barely acquainted with services.

A: You have to either override onStartCommand in the service to send a listening message or bind to the service and send a listening message
@Override
public int onStartCommand(Intent intent, int flags, int startId)
{

    Message msg = Message.obtain(null, MSG_RECOGNIZER_START_LISTENING);

    try
    {
        mServerMessenger.send(msg);
    }
    catch (RemoteException e)
    {

    }
    return START_STICKY;
}

For the bind implementation see Android Speech Recognition Continuous Service


text:
Q: How to add R^2 using plotly in R? I wonder how I can add regression line equation and R^2 value on the plot using plotly.
library(plotly)

x=c(1518,1655,3000,1720,1998,3455,2329,2868,2674,3207,3044,3301,3606,4700,3724,5111,3684,5586,4534,3313,3000,4340,5269, 6568)
y=c(1609,1776,2999,1908,2024,3489,2424,2931,2779,3224,3098,3356,3571,4861,3632,5522,3722,5698,4361,3399,3000,4086,5063,6246)
reg = lm(y ~ x)
modsum = summary(reg)
R2 = summary(reg)$r.squared

# plot
plot_ly(x = x, y = y, type = "scatter", mode = "markers", themes="Catherine")
add_trace(y = reg$fitted.values, type = "scatter", mode = "lines", name = "reg", line = list(width = 2))

A: What about this?
plot_ly(x = x, y = y, type = "scatter", mode = "markers", themes="Catherine")
add_trace(y = reg$fitted.values, type = "scatter", mode = "lines", name = "reg", line = list(width = 2)) %>%
  layout(
    showlegend = F,
    annotations = list(x = x, y = y, text = "R2=0.9870744", showarrow = T)
  )


text:
Q: Complex differentiability implies real differentiability First, we think of $\mathbb{R}^2$ as related to the complex plane by the following: $(x,y) \leftrightarrow x+iy$.
Show that if $f(x,y)=(u(x,y),v(x,y))$ is complex differentiable at $z_0$, then $f$ is differentiable at $z_0$.  Also, at $z_0$ establish the Cauchy Riemann equations.
I have not taken Complex analysis, but I am familiar with the definition of complex differentiable.
Suppose $f$ is complex differentiable.  Then $\lim\limits_{z \to z_0}\frac{f(z)-f(z_0)}{z-z_0}=a+bi=\beta$.  Then $\lim\limits_{z \to z_0}|\frac{f(z)-f(z_0)-\beta(z-z_0)}{z-z_0}|=0$.
At the above step, do I just sub in $z=x+yi$ and $z_0=x_0+iy_0$ to show real differentiability?

A: When our domain is a field ($\mathbb R$ or $\mathbb C$) we have the luxury of defining derivative as the limit of divided differences. Not so in $\mathbb R^2$ (and in other vector spaces), where there is no division of vector by another vector. Thus, we should use the more flexible definition of derivative (equivalent to the usual one in $\mathbb R$ and $\mathbb C$): a function $f:\mathbb R^2\to\mathbb R^2$ is $\mathbb R$-differentiable at  $\vec x\in\mathbb R^2$ if there exists a $2\times 2$ matrix $A$ such that
$$\lim_{\vec h\to 0}\frac{1}{|\vec h|}\left|f(\vec x+\vec h)-f(\vec x)-A\vec h\right|=0 \tag1$$
Let us also rewrite the divided-difference definition of complex differentiability in a manner similar to (1): a function $f:\mathbb C\to\mathbb C$ is $\mathbb C$-differentiable at  $\vec z\in\mathbb C$ if there exists a complex number $a$ such that
$$\lim_{h\to 0}\frac{1}{| h|}\left|f(z+ h)-f(z)-ah\right|=0 \tag2$$
Thinking of complex numbers as vectors in $\mathbb R^2$, we can represent the linear map $h\mapsto ah$ by the matrix
$$A=\begin{pmatrix} \operatorname{Re}\,a & -\operatorname{Im}\,a \\ \operatorname{Im}\,a & \operatorname{Re}\,a \end{pmatrix} \tag3$$
With this interpretation, (2) is clearly a special case of (1).

It is also instructive to consider the path from (1) to (2). If the matrix $A$ happens to be antisymmetric with constant diagonal, then we can form the complex number $a$ as in (3), which, according to (2), is the complex derivative $f'(z)$. Thus, the following are equivalent:

*

*$f$ is $\mathbb C$-differentiable at $z$

*$f$ is $\mathbb R$-differentiable at $z$, and its derivative matrix is antisymmetric with constant diagonal

Of course, "antisymmetric with constant diagonal" says precisely that the Cauchy-Riemann equations $u_x=v_y$ and $u_y=-v_x$ hold at the point of interest.


text:
Q: 59Hz option gone from Intel driver settings With the new UI update to the Intel Graphics Control Panel, the 59Hz option for my second monitor is gone. 60Hz makes it report the wrong resolution which results in unwanted scaling and blurring of the image.
How can I fix this?
Intel HD 4000 + HDMI 1.4

A: I figured it out, there's a custom resolution option in the Intel graphics control panel. I just added a 1280x800 resolution with 59Hz refresh rate and now when I choose that resolution, there's also 59Hz option alongside 60Hz.


text:
Q: How to deal with bazaar error UnprintableException I've been trying to commit changes in my repo, but constantly get th following:
    bzr: ERROR: Unprintable exception LockContention: dict={'msg': IOError(11,
'\xd0\xa0\xd0\xb5\xd1\x81\xd1\x83\xd1\x80\xd1\x81
\xd0\xb2\xd1\x80\xd0\xb5\xd0\xbc\xd0\xb5\xd0\xbd\xd0\xbd\xd0\xbe
\xd0\xbd\xd0\xb5\xd0\xb4\xd0\xbe\xd1\x81\xd1\x82\xd1\x83\xd0\xbf\xd0\xb5\xd0\xbd'), 'lock':
u'/home/mikhail/bzrrep/DLP/.bzr/checkout/dirstate'}, fmt='Could not acquire lock "%(lock)s":
%(msg)s', error=UnicodeDecodeError('ascii', '[Errno 11]
\xd0\xa0\xd0\xb5\xd1\x81\xd1\x83\xd1\x80\xd1\x81
\xd0\xb2\xd1\x80\xd0\xb5\xd0\xbc\xd0\xb5\xd0\xbd\xd0\xbd\xd0\xbe
\xd0\xbd\xd0\xb5\xd0\xb4\xd0\xbe\xd1\x81\xd1\x82\xd1\x83\xd0\xbf\xd0\xb5\xd0\xbd', 11, 12,
'ordinal not in range(128)')

How to resolve it?

A: This error normally means that there is another bzr process running that still holds the lock for the repository (possibly put in the background with Ctrl-Z).
You should find that process and resume or kill it. This should release the lock.
If you are absolutely, 100% positive that there is no such process (this shouldn't really happen on a local repository, because locks are automatically released when the bzr process terminates), you can try bzr break-lock to break the lock regardless.
Note that breaking a lock should only be done as a last resort; if you forcibly break a lock and another process did still have access, then two bzr instances may be accessing the repository concurrently and corrupt the repository files. Breaking a lock should generally only be necessary when accessing a remote repository via a "dumb" protocol (sftp and friends). If you break a lock, it can be a good idea to back up the branch/repository first.
That the error message is not humanly readable is a known bug, I believe.


text:
Q: apache-calculating ServerLimit based on buff/cache, available memory? or both? I have been reading many articles to understand how to configure apache server for a high traffic website. the article here tries to calculate Thrashing point-where swapping occurs-and then calculates an initial estimate for the number of ServerLimit parameter for mpm_event based on that:
Thrashing Point=(buff/cache - reserved)/(Avg. Apache)

in the Buff/Cache Memory section of the article, the writer says:

Don't be fooled by the column labeled "available." We are solely looking at the memory we can reappropriate, which is the buff/cache column

this is what confuses me. in the article example, there is about 700 MB of buffer/cache and about 700 MB of available memory, but only the 700 MB of buffere/cache is taken into account for calculating the maximum number of apache children (ServerLimit). my question is that why the remained 700 MB of available memory is not considered while it is large and unused, and if taken into account can increase ServerLimit significantly?!


text:
Q: trying to use a state variable to make string uppercase I am not understanding how this useState from react works. I am just trying to make a button which updates the title using the .toUpperCase but it is failing. I don't understand how >> const  [Title, setTitle] = useState(title) << this  line is suppose to be. I tried looking at the docs but can't seem to grasp it.
import React, { useState } from 'react';
    import ReactDOM from 'react-dom';
    import './index.css';

    const Unit = (props) =>{

      return (

Unit code = {props.unitcode}, Title = {props.title}

      )
    }

    const App = () => {

      const unitcode = ['COMP1010', 'COMP1750']
      const title = ['Fundamentals of Computer Science','Introduction to Business Information Systems']
      const  [Title, setTitle] = useState(title)

      return (

             <Unit unitcode = {unitcode[0]} title = {title[0]} />
              <button onClick={() => setTitle(title.toUpperCase)}>
                    UP
              </button>
             <Unit unitcode = {unitcode[1]} title = {title[1]} />

      )
    }

    ReactDOM.render(
      <React.StrictMode>
        <App />
      </React.StrictMode>,
      document.getElementById('root')
    )

A: You cannot call toUpperCase() on an array. It only works on string type. Also, if you wish to invoke toUpperCase(), you are missing ().

A: In addition to using parenthesis with toUpperCase() and calling it on a string instead of array, this might be closer to what you want:
const App = () => {
    const unitcode = ["COMP1010", "COMP1750"];
    const titles = [
        "Fundamentals of Computer Science",
        "Introduction to Business Information Systems"
    ];
    const [titleOne, setTitleOne] = useState(titles[0]);
    const [titleTwo, setTitleTwo] = useState(titles[1]);

    return (

          <Unit unitcode={unitcode[0]} title={titleOne} />
          <button onClick={() => setTitleOne(titleOne.toUpperCase())}>UP</button>
          <Unit unitcode={unitcode[1]} title={titleTwo} />

    );
};


text:
Q: iOS 5 Sorting of list of playlists First, a little background. I listen to my iPhone in two cars, a Honda and a BMW. The Honda uses the Aux In, and I have a Bluetooth speakerphone, through which I use Voice Control to start playlists. In the BMW, I use the built-in iPod integration.
I primarily listen to a handful of playlists while in either car, but have dozens more on the phone. I can't use Voice Control in the BMW, so I use the iDrive interface to kick off playlists. As such, I want the playlists I listen to in the car at the top. I prefixed my car playlists with underscores, and everything was great. On iOS 4, they showed up on the iPhone (and iDrive) as follows:
_First Car Playlist
_Second Car Playlist
Another Playlist
Playlist Not For Car

They showed up at the top of the BMW's playlists, and Voice Control still found them with no trouble.
And along came iOS 5, which seems to trim all non-alphanumeric characters from the beginning of each title before sorting. On iOS 5, they show up as follows (on the iPhone and iDrive):
Another Playlist
_First Car Playlist
Playlist Not For Car
_Second Car Playlist

I tried numerous symbols (.$!,?), all of which were ignored. I can't use numbers, because numbers sort to the bottom of the list, and it's not practical to number every playlist. For now I've renamed them as follows:
a First Car Playlist
a Second Car Playlist
Another Playlist
Playlist Not For Car

This works, but it's ugly (less legible), and though Voice Control gets it right when I say "First Car Playlist", it reads it back with the leading "A", which annoys me. Can anyone else come up with another solution?

A: Oh brother ... I just spent about an hour trying to figure this out myself. I had my playlists in a nice order before this enforced alpha sorting. I hope there will be an update that will allow for some better customization.
Good news is ... I did find one leading symbol that will push your faves to the top! Without looking too ugly! And the voice command lady doesn't pronounce it!
Here it is:   ª
... copy and paste!
It's a superscript 'a' used as an ordinal counter in spanish.
It'll sort as an 'a' but it's so tiny it doesn't look like much, at least on the ipod screen it's kinda just a speck.
eta: don't know about iDrive or how it might look in the car display

A: Have you tried simply sorting them numerically?

*

*First Car Playlist

*Second Car Playlist

*Another Playlist

*Playlist Not For Car

Hopefully Voice Control picks them up correctly here as well.

A: Thanks for posting this.  It was very frustrating that I couldn't get a couple of my smart playlists that I use the most to be at the top of my Playlists list.
The only addition I made to your solution was to make it a double a superscript because if you have any other playlists that begin with the full size letter A then not all of the superscript lists go to the top because it's still sorting it alphabetically, starting with a.  For example, three different lists:
Business
Asanas
Study
When using a single superscript a gets sorted liked this:
ªBusiness
Asanas
ªStudy
Because it's sorting those three items as:
abu
asa
ast
However, when I added a second a to the superscript, it came out fine.
ªªBusiness
Asanas
ªªStudy
Sorted into:
ªªBusiness
ªªStudy
Asanas
Because it was then sorting the three items as:
aab
aas
asa


text:
Q: Test if a property is an ICollection in Portable class library iam trying to test if a property of my object is a collection or not but encounter problem since in portable class library many method are not avaible
this is my method:
public virtual bool Equals(TObject other) // where TObject : class
{
    if (other == null)
        return false;

    Type t = GetType();
    Type otherType = other.GetType();

    TypeInfo typeInfo = t.GetTypeInfo();

    if (t != otherType)
        return false;

    IEnumerable<FieldInfo> fields = typeInfo.DeclaredFields;
    foreach (FieldInfo field in fields)
    { ...

now i have to test if field is an Icollection or not but

*

*ImplementedInterfaces is not avaible

*IsAssignableFrom is not avaible

*GetInterfaces() is not avaible

*GetGenericTypeDefinition() is not avaible

maybe this is because i have FieldInfo and not TypeInfo?
is there something i can do?

A: i solved it excludind this type via linq Linq
IEnumerable<FieldInfo> fields = typeInfo.DeclaredFields.Where(x => x.FieldType.Name != typeof(ICollection<>).Name);


text:
Q: .nativeElement Unit test code coverage - Jasmine I'm trying to Unit test a method in my Angular application. I have written a test that passes and checks two elements - the global variable returns true and the method is called. I am not sure what else I could test here but the line is still not covered.
stackBlitz
.ts file
  clickout(event) {
    this.isActive = this.eRef.nativeElement.contains(event.target); //not covered!
  }

.html file
<div (document:click)="clickout($event)" id="clickout" class="actions__container">
click me
</div>

.spec file
it('should call func and return true', fakeAsync(() => {
    component.isActive = true;
    fixture.detectChanges();
    spyOn(component, 'clickout');
    let btn = fixture.debugElement.nativeElement.querySelector('#clickout');
    btn.click();
    tick();
    fixture.detectChanges();
    expect(component.clickout).toHaveBeenCalled();
    expect(component.isActive).toBe(true);
}));

How can I firm up this test? I assume its because I am not looking to see if .nativeElement is containing something? Any help appreciated. I have created this stackBlitz example with jasmine installed.

A: Cool StackBlitz link, it can come handy.
The reason why it is not covered is because spyOn(component, 'clickout') gets rid of the implementation details of clickout. Once we spy on the method, we are saying stub this method (don't call it when it is called) but we get access to if it was called, with what arguments it was called, and how many times it was called.
To get the best of both worlds, you have to tack on a .and.callThrough() on the spyOn to not lose the implementation details.
it('should call func and return true', fakeAsync(() => {
    component.isActive = true;
    fixture.detectChanges();
    // spy on the method and call its actual implementation when it is called
    spyOn(component, 'clickout').and.callThrough();
    let btn = fixture.debugElement.nativeElement.querySelector('#clickout');
    btn.click();
    tick();
    fixture.detectChanges();
    expect(component.clickout).toHaveBeenCalled();
    expect(component.isActive).toBe(true);
}));

With the .and.callThrough(), the line that is not covered should now be covered. That being said, it might cause an error of nativeElement or contains of undefined.


text:
Q: Filling Map<> using Java8 style I like the functional style. So would like to convert String to Map<Position, Character> using Java-8(If it's possible done in java-8). Where:

*

*key should be character Position,

*value should be Character's ignore white spaces.
String str = "a b c\nc d e\na b c"; // note \n (new line)

Map<Position, Character> map;
     // key     value
     // (0,0)   'a'
     // (0,1)   'b' <= skip spaces
     // (0,2)   'c'
     // (1,0)   'c' <= reset at new line
     // ...
     // (2,2)   'c'

So far I came up with smth like this(probably it's all wrong):
map = str.chars()
         .filter(ch -> ch != ' ')
         .reduce((Map<Position, Character> m, int ch) -> {
             // put magic here.
             m.put(new Position(x, y), ch);
         });

Sorry if a similar question was asked, but my 1h searching didn't give me clear enough answer.

A: Here is an option:
Map<Integer, Char> stringMap = IntStream.range(0, str.length()).filter(x -> ! str[x].equals(' ')).collect(Collectors.toMap(x -> x, y -> str[y])
// Code should be something like this. Not sure it compiles as is

My java is a little rusty but I think that syntax still works.
I am a little concerned why you would do this though and not use String::charAt. Are you looking for mutability? Java Strings are pretty optimized for memory efficiency


text:
Q: Setting datacontext inside datatemplate not working Facing issue in setting datacontext.
I have telerik radgridview with Itemsource = itemsource1 - which is there in viewmodel1 (datacontext for the UserControl "UC1"). See below:
 public ObservableCollection<RadioCallData> itemsource1
        {
            get
            {
                return this.Get<ObservableCollection<Class1>>("itemsource1");
            }

            set
            {
                this.Set("itemsource1", value);
            }
        }

xaml:
UserControl: UC1
<telerik:RadGridView x:Name="Radgrid1"

                                     ItemsSource="{Binding itemsource1}">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn Width="4*" DataMemberBinding="{Binding Property1OfClass1}">

                                <telerik:GridViewDataColumn.CellTemplate>
                                    <DataTemplate>
                                        <local:UC2 ParentSource = "{Binding <context of viewmodel1>}"/>
                                    <DataTemplate>

Created another view UC2 having controls which is set accourding to items in the observablecollection.
Now requirement is to get the datacontext of viewmodel1.cs in UC2 to Bind few Commands for some buttons.
My approach:enter code here
In codebehind   UC2.xaml.cs one dependency propety is created  "ParentSource" of type object. I am trying assign the context UC1 i.e. viewmodel1 to DP "ParentSource" so that
using this we can bind command to control and get the implementation in viewmodel1.
I tried few ways but unable to set the DP. May be missing something. Please give directions.

A: Try this
<local:UC2 ParentSource = "{Binding DataContext,RelativeSource={RelativeSource AncestorType={x:Type Window}}}"/>


text:
Q: Strikeout text in Windows phone 7 Is there a way to strikeout text in windows phone 7?

A: There is no built-in way to do this.
The only alternative is to draw a line in the same position as the text yourself.

A: A little simple example:
<Grid HorizontalAlignment="Left" VerticalAlignment="Top">
            <Grid.RowDefinitions>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>
        <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Some text" VerticalAlignment="Top" Grid.RowSpan="2"/>
        <Border BorderThickness="0,0,0,1" BorderBrush="#FF949494" >
        </Border>
        </Grid>

A: Read this thread, someone also posted a solution there.


text:
Q: python list constructor for custom type - length called twice Consider the following python code:
class View:
    pass

v = View()
print(list(v))

When run, this gives the following error:
Traceback (most recent call last):
  File "testing.py", line 35, in <module>
    print(list(v))
TypeError: 'View' object is not iterable

Makes sense. Let's add the __iter__ to View
class View:
    def __iter__(self):
        for i in range(5):
            yield i

This works now, and correctly produces [0, 1, 2, 3, 4]
However, consider what happens if View has __len__ method defined:
class View:
    def __len__(self):
        print("len called")
        return 2

    def __iter__(self):
        for i in range(5):
            yield i

v = View()
print(list(v))

When run, this produces:
len called
len called
[0, 1, 2, 3, 4]

Not only __len__ is called twice, it seems it is also not "respected" (I am returning 2 as length, but my __iter__ produces 5 values, and the list correctly composes of 5 values)
What is going on? (Note that this is not an idle curiosity. In my application, I have an expensive __len__ method and calling it twice is slowing down my initialization time)

A: Per Why does list ask about __len__? the __len__ method is called to get an approximation of how much space needs to be allocated to the list. Note it's just an approximation, whether you're iterating using __iter__ or __getitem__ that length is not binding:
>>> class GetItemIter:
...     def __len__(self):
...             return 2
...     def __getitem__(self, index):
...             return [0, 1, 2][index]
...
>>> list(GetItemIter())
[0, 1, 2]
>>> class IterIter:
...     def __len__(self):
...             return 2
...     def __iter__(self):
...             return iter([0, 1, 2])
...
>>> list(IterIter())
[0, 1, 2]

From Python 3.8 the list constructor is checking the length twice. This is in the bug tracker, but may be considered an implementation detail:

The number of times we can __len__ on the constructor is an
implementation detail. The reason is called now twice is because there
is an extra check for the preallocation logic...


text:
Q: Как сделать, чтобы когда листался слайдер, то он постоянно пролистывался на 400px,а не один раз Есть слайдер, нужно чтобы по нажатию на кнопку он пролистывал 400px постоянно, но у меня получается только один раз сделать, а дальше он стоит на месте. Вот код:
function slidesFieldTransform() {
    slidesField.style.transform = `translateX(-${400}px)`;
}

A: Чтобы Ваш слайдер не заканчивал работу, вам нужно запускать код функции внутри "вечного" цикла. К примеру, вариант с while:
function slidesFieldTransform() {
    while (true) {
      setTimeout(function(){
         slidesField.style.transform = `translateX(-${400}px)`;
       }, 1000)
    }
}

Таким образом, у Вас будет вечная прокрутка с интервалом в одну секунду, Вы можете изменить количество миллисекунд интервала, либо же применить собственное решение для красивой работы слайдера.
Либо же вы можете использовать setInterval для постоянной прокрутки:
function slidesFieldTransform() {
    setInterval(function(){
         slidesField.style.transform = `translateX(-${400}px)`;
    }, 1000)
}