text:
Q: Migration script failed for plsql query with Junit (h2 DB) Query working fine in,

*

*postgres

*add query in migration script when we started the application it get executed

But failing when i run through junit test case.
Below is the error
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "[*]DO $$\000d\000a  BEGIN\000d\000a\0009IF ((SELECT COUNT(id) FROM config)=0) Then\000d\000a\0009   insert into config (enabled, max_duration, min_duration, created_timestamp, modified_timestamp) values(false, 0, 0, now(), now());\000d\000a\0009   insert into config_version (config_id, enabled, max_duration, min_duration, created_timestamp, modified_timestamp, action) values((SELECT id FROM config LIMIT 1), false, 0, 0, now(), now(), 'create');\000d\000a\0009END IF;\0009\000d\000a   END\000d\000a$$"; expected "DELETE, DROP, DECLARE, DEALLOCATE"; SQL statement:
DO $$
  BEGIN
    IF ((SELECT COUNT(id) FROM config)=0) Then
       insert into config (enabled, max_duration, min_duration, created_timestamp, modified_timestamp) values(false, 0, 0, now(), now());
       insert into config_version (config_id, enabled, max_duration, min_duration, created_timestamp, modified_timestamp, action) values((SELECT id FROM config LIMIT 1), false, 0, 0, now(), now(), 'create');
    END IF;
   END
$$;


text:
Q: Enum class initialization with int I found out some interesting thing when I programming:
enum class Foo {
  FOO_THING,
  FOO_TOO
};

int main() {
  Foo foo{1};    // It is OK
  Foo foo2(1);   // It is an invalid
}

Could you tell me, why foo{1} is OK for compiler, and why foo2(1) is invalid ?
Compiler GCC (g++ (Ubuntu 7.3.0-21ubuntu1~16.04) 7.3.0) says:
$ g++ -Wall -std=c++17 foo.cpp

  error: cannot convert 'int' to 'Foo' in initialization
  Foo foo2(1);

I really want to know underlying mechanics. :)))
Edit: Maybe it is some compiler bug...

A: To understand the reasons why the two syntax are not both legit you must consider that scoped enums were introduced with standard c++11 to enforce static type checking and have scoped identifiers (i.e. no name pollution anymore).
Foo foo(1) is not working because implicit conversion from integer type to scoped enum is forbidden, otherwise you lose the benefit of scoped enums, and to avoid conflicts during overload resolution.
When using Foo foo{1} you are using list initialization that was introduced with c++11 too, but got an upgrade with c++17, that consist in implicit conversion from int value to enum as reported here, if a set of requirements are satisfied:

Both scoped enumeration types and unscoped enumeration types whose
underlying type is fixed can be initialized from an integer without a
cast, using list initialization, if all of the following is true:

*

*the initialization is direct-list-initialization

*the initializer list has only a single element

*the enumeration is either scoped or unscoped with underlying type fixed

*the conversion is non-narrowing.
This makes it possible to introduce new integer types (e.g. SafeInt) that enjoy the same existing calling conventions as their underlying integer
types, even on ABIs that penalize passing/returning structures by
value.

This syntax is safe and will not interfere with legacy code (written before c++11) because both scoped enums and list-initialization did not exist at the time. Furthermore, as reported in the quote, this enables the use of new integer types (like those of the SafeInt library) without the need to force a static cast for enum types in code that conforms to modern c++ syntax.

A: C++17-specific documentation has the following for braced initializer

Otherwise, if T is a enumeration type that is either scoped or
  unscoped with fixed underlying type, and if the braced-init-list has
  only one initializer, and if the conversion from the initializer to
  the underlying type is non-narrowing, and if the initialization is
  direct-list-initialization, then the enumeration is initialized with
  the result of converting the initializer to its underlying type.

So foo seems to be conforming valid C++17, but foo2 being not braced initialized is not valid.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Can I safely disable the Software Protection service The Software Protection service is Windows 8 has a long, unhelpful description:
Enables the download, installation and enforcement of digital licenses for Windows and Windows applications. If the service is disabled, the operating system and licensed applications may run in a notification mode. It is strongly recommended that you not disable the Software Protection service.
What does this even mean? Is there any consequence to disabling the service apart from MS wanting me to? I am definitely NOT interested in getting around intellectual property, I just don't want crapware running on my PC and slowing it down or possibly causing system instability.
On a separate note, the description of various services has become rather more vague compared with Windows XP...and there are many more of them. My best guess this is done to intimidate non-superusers from touching the service, whereas the description should really be about being informative and helpful. Users can then make up their own minds.

A: I would not disable this service.
The system files are checked if they are the same in system directory and in component store - this ensures system critical files are intact. Windows is constantly monitoring changes in system files (almost no overhead).
Update of system files is also a critical process as vulnerabilities in Windows are discovered almost every day and have to be patched if critical or your system would be exposed to threats.
Additionally running virus protection is also necessary which can be regarded as first line of defense against threats.
Driving fast is wonderful but it is better to drive carefully


text:
Q: Google Maps Android — Map no longer display after keystore change I had a working google maps v2 application, but due to certain circumstances, I had to change my debug keystore.
I have, of course, added the new SHA-1 fingerprint to the allowed Android device list in my Google API account.
The map no longer displays, only the zoom and center buttons on a grey background appear.
The following errors pop in ADB logs :
05-21 18:11:42.903: I/Google Maps Android API(15747): Failed to contact Google servers. Another attempt will be made when connectivity is established.
05-21 18:11:43.093: E/Google Maps Android API(15747): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).

I have browsed several similar questions here on stackoverflow, but none seem to solve my own problem.
Here is what I have done/checked :

*

*Add the new SHA-1 fingerprint to my original API key allowed Android devices

*Create a new API key with the new SHA-1 fingerprint

*Clear application data according to this post

*Uninstall and install application again

*Install on a brand new device

*Check, double check and update Google Play library dependency

*Check that "Google Maps Android API v2" service is enabled in my Google API account

I'd like to add that my old application version with the original debug keystore still works correctly.
Any help is appreciated.
Thanks !

A: I had the same issue..

*

*Set your new key on manifest.

*Disable automatic build in your IDE.

*Delete all resources on your project bin folder.

*Clean project.

*Build this.

I'ts worked for me.
Give a try.

A: I noticed when i changed my debug key that it took a few hours for the new key to function properly.

A: I had a similar problem and spent a ton of time trying to fix it. Try this:
Rename your debug.keystore file and then do a clean, and then build. this will generate a new debug.keystore. and a new SHA1 fingerprint. Plug that new fingerprint into the api console and try again.
The other thing you can check is to look at the "reports" section of the api console for the project you are trying to access the api from. If you have tried to run your project and have no traffic for that api, chances are either the SHA1 fingerprint or the package name you gave is wrong. In my case it was the fingerprint.


text:
Q: Select TD that contain A span in CSS If I have generated HTML:
123124124
not a number

From from Vue.js template:
{{ num | integer }}
{{ str }}

How to select td that contain a span.n using CSS? I want to align it to right

A: You are looking for parent selector that is not implemented in CSS yet (wait for CSSv4).
You can use js/jQuery to select parent:
$('span.n').closest('td').addClass('text-align-left')

If your text is wrapped in span and is only text that must be aligned in that td, than you can use such css:
td span.n {
    display: block;
    text-align: right;
}

It will remove span align as inline element, but will make it full width with text align to right.

A: You can do this easily using one of these lines:
td .n{float:right;}
td span.n{float:right;}
td > .n{float:right;}
td > span.n{float:right;}


text:
Q: laptop only has ubuntu, how do i delete it and install windows? i bought a asus 1015e laptop with ubuntu as it's OS by accident. i want to delete ubuntu partition and install windows. i went to gparted and i dont know which partition to delete. also asus sells this laptop with windows as well, so i think there is a partition with windows on it already. anyway to delete ubuntu and boot into windows?
if not do i delete all partitions? thank
http://i.imgur.com/h5C9ovW.jpg?1
so i boot into windows setup and delete all partitions, then i cant format the HD to install windows, it says cannot install windows, the disk is of GPT partition style. please help.
if i try to boot to ubuntu it says error: no such partition grub rescue

A: If you have both Windows and Ubuntu installed on your computer, install GRUB: it will give you a menu whenever you boot up your computer and allow you to choose which OS to boot into each time.
Otherwise, you can just install Windows and during the install it will reformat your hard drive on its own (it deletes everything during the install)
If you are curious about the partitions currently on your computer, post any info gparted gives you about them: the number of partitions, their sizes, any identifying names or types... usually you have a main partition and a small swap partition, unless someone made it fancy, or unless you do actually have both Windows and Ubuntu installed already.


text:
Q: Is there a PyTorch version capable of working with CUDA for NVIDIA Quadro K2100M? On my computer I have an NVIDIA Quadro KM2100M graphic card with the following main parameters (as reported by Cuda-Z tool):
Name: Quadro K2100M
Compute Capability: 3.0
Clock Rate: 666.5 MHz
PCI Location: 0:1:0
Multiprocessors: 3 (576 Cores)
Threads Per Multiproc.: 2048
Warp Size: 32
Regs Per Block: 65536
Threads Per Block: 1024
Threads Dimensions: 1024 x 1024 x 64
Grid Dimensions: 2147483647 x 65535 x 65535
Watchdog Enabled: Yes
...

I found out that installing PyTorch 1.8.1 results in answering that CUDA is enabled:
import torch
print(torch.__version__)
# returns 1.8.1+cu101

print(torch.cuda.is_available())
# returns True

At the first attempt to really use CUDA in PyTorch, however, I get immediately
UserWarning:
Found GPU0 Quadro K2100M which is of cuda capability 3.0.
PyTorch no longer supports this GPU because it is too old.
The minimum cuda capability that we support is 3.5.

and
RuntimeError: CUDA error: no kernel image is available for execution on the device

Is there a possibility to run ANY PyTorch version with NVIDIA Quadro K2100M?
(Compute Capability being the problem, I assume)?


text:
Q: Why does my legacy storage code work on some Android 11 devices? I have legacy code that calls Environment.getExternalStorageDirectory(), which shouldn't be accessible in Android 11 with scoped storage.
path = String.format("%s/%s", Environment.getExternalStorageDirectory(), MY_SUBFOLDER);
File directory = new File(path);

I've updated my targetSdkVersion=30, so scoped storage should prevent me from accessing the external storage directory.  This appears to function as described on some devices, the Google Play Pre Launch report shows my app crashing on a Galaxy S20 and Pixel 5 running Android 11.  It appears that directory is null in this case.  This is expected, and should happen with my legacy code.
I have a Moto Edge Plus running Android 11, and a Pixel 5 running Android 12.  My legacy code seems to run fine on these devices.
The question is, why am I able to open the directory on my physical devices?
The debugger shows me accessing the directory with no problem.  I've also tried enabling the FORCE_ENABLE_SCOPED_STORAGE App Compatibility flag, and everything still works.
How can I make the scoped storage allocation fail on my two physical devices?  Are there some Android 11/12 devices that don't enable Scoped Storage?  Is it disabled when connected to a debugger?  I'm curious why I can't reproduce the Scoped Storage protections.


text:
Q: Socket.IO 1.0.x: Get socket by id In the 0.9.x version, we can get socket by ID like this:
io.sockets.socket(socketId)

But in 1.0.x we can't. How to find a socket by id in 1.0.x?

A: Version 3.0.3
// in "of", you can put '/' or whatever namespace you're using

io.of('/').sockets.get(socketId)

Basically, sockets is no longer a simple Object.  It's a Map, so you have to use .get().

A: Socket.io Version 2.0.3+
    let namespace = null;
    let ns = _io.of(namespace || "/");
    let socket = ns.connected[socketId] // assuming you have  id of the socket

A: For socket.io 1.0 use:
io.sockets.connected[socketId]

For  0.9 its io.sockets.sockets[socketId] and not io.sockets.socket[socketId]

A: The most simlple way I tried is:
var socket1 = io.of("/").connected[socketId];

Then you can do
socket1.join("some room");
socket1.leave("some room");
socket1.emit();

or other things you want.

A: you can also use like:
io.to(socketid).emit();

A: Socket.io Version 4.0.0
io.sockets.sockets.get(socketId);


text:
Q: Does $\operatorname{Log}(1+i)^2 =2\operatorname{Log}(1+i)$ And similarly, does $\operatorname{Log}(1-i)^2=2\operatorname{Log}(1-i)$?
If we were dealing with real numbers, it would hold. But I'm guessing that the fact that there are imaginary numbers involved changes things?

A: The function $\mathrm{Log}$ is usually defined so as to be continuous on $D=\mathbb C\setminus\mathbb R_-$. Every point $z$ in $D$ can be uniquely written as $z=r\mathrm e^{\mathrm it}$ with $r$ and $t$ real, $r\gt0$ and $|t|\lt\pi$, then $\mathrm{Log}(z)=\log r+\mathrm it$.
For the identity $\mathrm{Log}(z^2)=2\,\mathrm{Log}(z)$ to hold for such a complex number $z=r\mathrm e^{\mathrm it}$, the condition is that the path $\gamma$ defined on $[1,2]$ by $\gamma(x)=\mathrm e^{\mathrm ixt}$ stays in $D$. One readily sees that this means that $|t|\lt\pi/2$.
If $z=1\pm\mathrm i$, then $r=\sqrt2$ and $t=\pm\pi/4$ hence $|t|\lt\pi/2$ and indeed $\mathrm{Log}(z^2)=2\,\mathrm{Log}(z)$ holds.
Likewise, for every integer $n\geqslant1$, the identity $\mathrm{Log}(z^n)=n\,\mathrm{Log}(z)$ holds if $z=r\mathrm e^{\mathrm it}$ with $|t|\lt\pi/n$. Still with $z=1\pm\mathrm i$,  $\mathrm{Log}(z^3)=3\,\mathrm{Log}(z)$ holds, $\mathrm{Log}(z^4)$ is undefined, and, for every $n\geqslant5$, either $\mathrm{Log}(z^n)$ is undefined (this happens when $n$ is in $4+8\mathbb N$) or $\mathrm{Log}(z^n)\ne n\,\mathrm{Log}(z)$.
The identities $\mathrm{Log}(z^u)=u\,\mathrm{Log}(z)$ with $u$ complex are still another story.

A: It is not easy to define a good notion of Logarithm in the complex numbers.  The problem is essentially the following: $\exp: \mathbb{R} \rightarrow \mathbb{R}^+$ is bijective but this is not true for $\exp: \mathbb{C} \rightarrow \mathbb{C} - \{0\}$. Indeed, you have the well-known identity $\exp(z) = \exp(z + 2i\pi)$.
Since we want $\log$ to be an inverse of $\exp$, we have troubles to define it. You can deal with this in three different ways. First, you can define the logarithm to be a multi-valued function; that is you define $\log(z)$ to be the set of ALL $w \in \mathbb{C}$ such that $\exp(w) = z$. If $w_0$ is such a solution, then $\log(z)$ is the set $w_0 + 2\pi i \mathbb{Z}$. A second way to do things is to choose a preferred solution of $\log(z)$. Writing $z = \rho e^{i\theta}$, you define $\log(z)$ to be $\log(\rho) + i\theta$, choosing $\theta$ in $[0, 2\pi[$. In this way, $\log$ is a genuine function but it is not continuous since $\lim_{\theta \rightarrow 2\pi^-} (e^{i\theta})$ is $2i\pi$ whereas $\lim_{\theta \rightarrow 2\pi^+}$ is $0$.
The third way in to define $\log$ to be a genuine function with values in some space, called a Riemann surface. This is the modern solution used to view $\log$ as a univalued function, which is also continuous (and even holomorphic).
Concerning your question, what you can say of general is that of $\log (a^b)$ and $b \log(a)$ (using the second definition, with $b$ real) is that they differ from a multiple of $2i \pi$. In you case: $1 + i = \frac{1}{\sqrt{2}} e^{i \pi/4}$ and $(1+i)^2 = \frac12 e^{i \pi/2}$ so that $\log((1+i)^2) = \log(1/2) + i\pi/2 = 2\log(1+i)$. So this works with THIS definition of logarithm.
But remark that $1 = (-1)^2$ and that $\log(1) = 0$, whereas, in this definition, $\log(-1) = i\pi$.

A: In general, $\DeclareMathOperator{\Ln}{Ln}\DeclareMathOperator{\Arg}{Arg}\Ln(a^b)\neq b\Ln(a)$ in $\mathbb{C}$. See the following example:
$$\Ln(e^i)=\ln|e^i|+i\Arg(e^i)=i(1+2k\pi)$$
$$i\Ln(e)=i[\ln(e)+i\Arg(e)]=i-2k\pi$$
So when dealing with complex number, we should be more careful.


text:
Q: PHP Adding multidimensional arrays together I have been wondering how to add 2 multidimensional arrays together, I have found similar solutions but it is not exactly what I am trying to go for. Maybe one of you guys could help me out. Yes I know the title is almost the same as other asked questions, but trust me, I have looked for my answer but I can't find it.
# array1
Array
(
    [0] => Array
        (
            [0] => Product1
            [1] => Description product 1
        )

    [1] => Array
        (
            [0] => Product2
            [1] => Description product 2
        )

    [2] => Array
        (
            [0] => Product3
            [1] => Description product 3
        )
)

# array2
Array
(
    [0] => Array
        (
            [0] => Price 1
            [1] => Something product 1
        )

    [1] => Array
        (
            [0] => Price 2
            [1] => Something product 2
        )

    [2] => Array
        (
            [0] => Price 3
            [1] => Something product 3
        )
)

#resultant array
Array
(
    [0] => Array
        (
            [0] => Product1
            [1] => Description product 1
            [3] => Price 1
            [4] => Something product 1
        )

    [1] => Array
        (
            [0] => Product2
            [1] => Description product 2
            [2] => Price 2
            [3] => Something product 2
        )

    [2] => Array
        (
            [0] => Product3
            [1] => Description product 3
            [2] => Price 3
            [3] => Something product 3
        )
)

As you can see I would like to add the 2 arrays together. I have seen several other answers but they use the build in php function array_merge(). If I use that it will result in something like this:
#resultant array
Array
(
    [0] => Array
        (
            [0] => Product1
            [1] => Description product 1
        )

    [1] => Array
        (
            [0] => Product2
            [1] => Description product 2
        )

    [2] => Array
        (
            [0] => Product3
            [1] => Description product 3
        )
    [3] => Array
        (
            [0] => Price 1
            [1] => Something product 1
        )

    [4] => Array
        (
            [0] => Price 2
            [1] => Something product 2
        )

    [5] => Array
        (
            [0] => Price 3
            [1] => Something product 3
        )
)
)

As you can see that is not what I am looking for unfortunately. I am hoping to find a solution for my problem.
Thanks for reading my post.
Cheers Cody

A: You can apply array_merge to each of your subarrays using array_map:
$result = array_map('array_merge', $array1, $array2);

For more information check the manual for array_map, especially example 3.

A: you can do this
$final = [];
foreach($arr1 as $key => $value){
// loop over the second array elements
 foreach($arr2[$key] as $key2 => $value2){
 // append the second array values to the first array
   $value[] = $value2;
 }
// append the new array to the final array
$final[] = $value;
}


text:
Q: Prevent WordPress automatically processing certain URL queries I'm coding a custom plugin for a client and I want to use certain $_GET variables in the URL in my custom pages, such as ?s=$1, ?p=$1 and ?paged=$1. With some of these variables, such as ?paged=$1, it redirects me to another URL: [PAGE_URL]/page/$1.
Are there any filter or action hooks that I can use to remove these functionalities for particular pages?

A: You should find alternatives, as noted on the codex article of "Reserved Terms" in WordPress (emphasis mine):

There is a complete set of reserved keywords, or terms, in WordPress
  that should not be used in certain circumstances as they may conflict
  with core functionality. You should avoid using any of these terms
  when:

*

*Passing a term through a $_GET or $_POST array

*Registering a taxonomy or post type slug

*Handling query variables

You could use ?search= in place of ?s= and ?pg= in place of ?page= for example.
Or, depending on what exactly you're doing, you could create a custom rewrite rule with add_rewrite_rule() and then you could name the underlying query vars whatever you wanted.


text:
Q: While loop in Spark SQL Is it possible to perform a while loop in spark sql (2.4), no PySpark answers please I already have some code that does in in PySpark and it's very slow due to the i/o with the jvm
DECLARE @Iteration INT
SET @Iteration = 1
WHILE @Iteration <= 10
BEGIN
    PRINT @Iteration
    SET @Iteration = @Iteration + 1
END

I would like to do something along the lines of this
SELECT 1 as orig, transform(array(1, 2, 3), (x, i) -> WHILE (x < 4) BEGIN (x+1) END) as test

A: Use sequence function.
Check below code.
spark.sql("select 1 as org,transform(ids, x -> array_max(sequence(x,4))) as data from test").show(false)
+---+---------+
|org|data     |
+---+---------+
|1  |[4, 4, 4]|
+---+---------+


text:
Q: Interpolating away from roads I have a raster layer of some roads and I want to interpolate it such that on the new layer, each cell has a value corresponding to how far it is from a road cell. The end result would look like a set of ridges (high values) for the roads, sloping away to low values as you move away from the roads.
What would be a suitable command for this processing? I believe 'interpolating' is the correct term but I am not certain as I am new to GIS.

A: To create a continuous surface, use r.grow.distance which generates a raster map containing distances to nearest raster features.
For an example, see
https://grass.osgeo.org/grass72/manuals/r.grow.distance.html#distance-from-the-streams-network


text:
Q: Stop automatic reordering of documents in mongo db When I add any subdocument to an existing document, the documents are rearranged in mongo db.
The result of the query is assigned to a model in angularjs code.Which results in changing of orders of data in view.
How do I stop this automatic rearranging of documents?
I can see these documents rearrange in Robomongo when ever I make any change.
So I can surely say that the objects are rearranged in disk when ever they are updated.
Am I doing something wrong or the documents are automatically rearranging.
Code:
Here allusersposts comes from controller when the page loads.
var basePost1 = Restangular.all('posts');

basePost1.getList().then(function(allusersposts) {
$scope.allusersposts = allusersposts;

});

Mark up:

{{usersposts.description}}

                {{eachcomment.description}}

            <textarea rows="3" data-ng-model='comment'></textarea>
            <button data-ng-click="saveComment(usersposts,comment)" >comment</button>

When comment is added to any post then I save the comment in db and then bring back all the posts again and assign it to $scope.allusersposts. Which causes view to order of the posts is not the same as before.The post to which comment was added moves to some other location in list.
$scope.saveComment=function(usersposts,comment){
    var post_id=usersposts._id;
    var basePost = Restangular.one('getSinglepost', post_id);

    basePost.get().then(function(receiveSinglePost) {
        var basePost = Restangular.one('getSinglepost', post_id);
        var makePutdata={
            'description':comment,
            'user_id':$stateParams._id

        }

        basePost.put(makePutdata).then(function(allPosts) {
            $scope.allusersposts=allPosts;

        });

    });
$scope.comment="";

};

A: It's down to disk storage allocation for that collection.  Mongo will attempt to replace the old document with the new one if it can do in the allocated space, but if it can't, it'll expire the old document and save the updated document onto the end of the collection on disk.
When you call find() on a collection, it will work from the beginning to the end of the disk storage, because this is most efficient.  There is no guarantee of this being the same as insertion order if you have subsequently modified any documents.
If you want to have consistent output, sort by some key like a createdTimestamp when you fetch from the collection.  You should probably also add an index on this field.


text:
Q: Which directories does macOS update while upgrading macOS? Install macOS Mojave.app is so large(6GB), and the following directories is all directories that macOS have, is that all these directories will be write new system files into? Cause services that I install by Homebrew in /usr/local/Cellar are all remain in there, they will not be override, I just curious about where on earth the updates writes into.
drwxrwxr-x+ 181 root  admin   5.7K  4 19 14:54 Applications
drwxr-xr-x+  66 root  wheel   2.1K  4 10 13:49 Library
drwxr-xr-x    2 root  wheel    64B  9 25  2018 Network
drwxr-xr-x@   5 root  wheel   160B  9 21  2018 System
drwxr-xr-x    6 root  admin   192B  9 25  2018 Users
drwxr-xr-x+   5 root  wheel   160B  4 19 14:54 Volumes
drwxr-xr-x@  37 root  wheel   1.2K  4  7 20:14 bin
drwxrwxr-t    2 root  admin    64B  9 25  2018 cores
dr-xr-xr-x    3 root  wheel   4.5K  4  7 20:16 dev
lrwxr-xr-x@   1 root  wheel    11B  9 25  2018 etc -> private/etc
dr-xr-xr-x    2 root  wheel     1B  4 19 14:45 home
-rw-r--r--    1 root  wheel   313B  8 18  2018 installer.failurerequests
dr-xr-xr-x    2 root  wheel     1B  4 19 14:45 net
drwxr-xr-x    6 root  wheel   192B  9 25  2018 private
drwxr-xr-x@  64 root  wheel   2.0K  4  7 20:14 sbin
lrwxr-xr-x@   1 root  wheel    11B  9 25  2018 tmp -> private/tmp
drwxr-xr-x@   9 root  wheel   288B  4  7 20:07 usr
lrwxr-xr-x@   1 root  wheel    11B  9 25  2018 var -> private/var

A: Not being glib here but to answer your question succinctly, any directory that needs to be updated.
It will vary from update to update depending on what Apple wants/needs to update in the version of the OS you have and what version you are updating.
Apple has a built in command line utility to examine packages
pkgutil
That can be used to examine the contents of packages, extract them, etc.
You can also right-click on the package and select "Show package contents..." and browse the contents of the updater in the Finder.
A bit of googling will turn up programs that let you examine packages via a GUI. That can be helpful as packages often have the updated binaries listed in the directory trees they will be going into.
Unfortunately there is no canonical list of what directories get changed when doing updates to macOS. That is purely dependent on what is being updated.


text:
Q: Convert array to comma separated values I'm using PHP.
I have the following array:
Array
(
[home] => 9
[pets] => 8
[dogs] => 7
[shampoo] => 7
[cover] => 6
)

I want to create a comma separated list which is:
home,pets,dogs,shampoo,cover

Here's what I'm trying but giving me blank string ($words is the array):
$myWords = implode(',',$words[0]);

Do I need to loop instead?

A: $string = implode(',', array_keys($words));

$words[0] does not exist in your array, because all of your keys are strings.

A: You're close. You just need the keys from that array. array_keys() will do that for you:
 $myWords = implode(',',array_keys($words));


text:
Q: C all the value changes with the pointer I am trying to write a method in C to read from a file.
I don't know how long the file will be but I know the structure.
The problem is that when I change the value of str, all my vars that refer to it are changed. Is there any way for me to keep the value of my vars unchanged? Sorry for the messy code.
HashMap read_Table(char* srcfilename){
    FILE* src = fopen(srcfilename, "r");
    if (src == NULL) {
        printf("READ FILE FAILED\n");
    }
    char str[256];
    if (fgets(str, 255, src) != NULL) {
    }
    fgets(str, 255, src);
   char* attribute_size = str;
    int a_size = atoi(attribute_size);
    char **outAttributes = malloc(sizeof(char *) * a_size);
    fgets(str, 255, src);
    for(int i = 0; i<a_size; i++){
        if (fgets(str,255,src) != NULL){
            outAttributes[i] = str;
        }
    }
    fgets(str, 255, src);
    //get key size:
    printf("!!!!!!\n%s", str);
    fgets(str, 255, src);
    //get key size number
    printf("!!!!!!\n%s", str);
    char* key_size = str;
    int k_size = atoi(key_size);
    if (fgets(str, 255, src) != NULL) {
        //get Key:
        printf("!!!!!!\n%s", str);
    }
    char **outKeyItem = malloc(sizeof(char *) * k_size);
    for(int i = 0; i<k_size; i++){
        if (fgets(str,255,src) != NULL){
            printf("!!!!!!\n%s", str);
            outKeyItem[i] = str;
        }
    }
    fgets(str, 255, src);
    //get Table:
    HashMap out_map = new_HashMap((void**)outAttributes, a_size ,(void**)outKeyItem, k_size);
    while (!feof(src)) {
        char** curr_tuple = malloc(sizeof(char *) * a_size);
        for(int i=0;i<a_size;i++){
            if(fgets(str, 255, src)!=NULL){
                curr_tuple[i] = str;
                printf("Tuple: %d %s",i, curr_tuple[i]);
            } else{
                break;
            }
        }
        if(feof(src)){
            break;
        }
        insert(out_map, (void**)curr_tuple);
    }

    printHashMap(out_map);
    printf("\n");
    return out_map;
}

A: You are assigning pointer instead of copying the contents.
        outAttributes[i] = str;
        outKeyItem[i] = str;

should be
       outAttributes[i] = strdup(str); //basically malloc and strcpy
       outKeyItem[i] = strdup(str);

Note:: strdup internally allocates the memory and copies the
  contents thus you need to free once done also strdup is not c
  standard.


text:
Q: A geometry problem about areas and lengths. Squares and polygons. An area inequality:
Let $ ABCD $ be a square, $ AB = 1 $. Let's consider a 4-sided polygon $ EFGH $, with a peak on each side of the square. The area of EFGH equals $ \frac{1}{2} $. Prove that it exists a line intersecting two of $ EFGH $'s sides, paralell to one of the polygon's sides, with it's length greater or equal then $ \frac{1}{2} $.
I have proved that one of the $ EG $, $ FH $ is parallel to the square's sides, using a geometrical area spliting -> the interior polygon made by the intersections of parallels from each of the $ E, F, G, H $ to the square's sides have area 0.

A: Consider square to have diagonal from $(0,0)$ to $(1,1)$. Let's denote with $L(x')$ the length of the cross-section of $EFGH$ with line $x=x'$.
If we assume that $\forall x: L(x)<\frac12$, then the area of $EFGH$:
$$
A_{EFHG} = \int_0^1L(x)dx<\int_0^1\frac12dx=\frac12,
$$
which is false by the problem setting. Thus $\exists x:L(x)\ge\frac12$
Edit: By the way, we never used the fact that $EFGH$ is a quadrilateral. So the result is true for any integrable shape that is anchored at opposite sides of a square and has simple-connected parallel cross-sections.


text:
Q: How can I limit what types are used for my generic interface? I have the following interface:
public interface IService<T>
    {
        void AddOrUpdate(T tab);
        bool Available();

Can I limit this interface so that it can only be used for certain types?
What's the significance of the parameter name "tab". Could this be any sensible name or is there a connection with where the interface is used?

A: you can use the where keyword to limit what types to be used for generic type.
Example:
public interface IService<T>where T:IComparable { }
{
        void AddOrUpdate(T tab);
        bool Available();

http://msdn.microsoft.com/en-us/library/bb384067.aspx
The letter 'T' has no significance. Just specifies type or template. You can use any letter.
'tab' is just a name. You can specify any meaningful name.

A: Look at following article about Constraints on Type Parameters. These constrains are defined using the where keyword.

A: You can say something like:
public interface IService<T> where T : Employee
{
            void AddOrUpdate(T tab);
            bool Available();
}

A:
Can I limit this interface so that it can only be used for certain types?

Yes, you can restrict generic type usage like so:
public interface IService<T> where T : IServicableType

In this case, T can only be a type that implements (or inherits from, be it a class) IServicableType.

Could this be any sensible name or is there a connection with where the interface is used?

No, the parameter name does not matter. The parameter name of the class's method does not need to reflect the parameter name of the interface. This is because parameter names do not effect a method's signature. Only the signatures must match.


text:
Q: Excel Help: Dynamic range + Data Validation I got a problem with some popular Excel question, dynamic ranges and data validation drop-downs and auto-populate. Lets say I got 2 sheets, and on one sheet I got drop-downs to choose from another sheet, and that is not a problem when I define cells and range using:

=OFFSET($A$19;;;COUNTA('0528 - info'!$E$2))

..but what about when I wanna add some new cells in between,so that they can be automatically recognized in which group they belong:
As you see for instance Column B has some "groups" where you can find more different "values" like in Column C, like Power Supply has MV1 and MV2... and so on. My drop-downs on the sheet 1 are called exactly like this "groups" and I did reference them manually using given function. But is it possible to populate my drop-downs automatically when I add for instance MV3 beneath MV2 in this table? Or RN7 on 14th row? Everytime I add new values I have to extend my dropdowns (what is fine..), but problem will be when I share this table to others, they gonna forget it 90%.

I hope you get my point, any suggest will be fine!
p.s. Indirect doesnt work in a way it should - It gives me all instances from the Column but not specific ones that I need.
=INDIRECT("Table4[VarEDS]")

Well this option gave me again what I already had before - all "matches" from the Column and still not ONLY matches that are for certain group. ...

A: If your Data Validation source is a "Table" as shown in your image then you can take advantage of "Table Column" Range which is dynamic. That means whenever you refer that column as NAMED range and if make changes to the column (Edit, Add, Delete) it will reflect in the referred cell.
You can use this technique even for ranges not in table. You need to NAME them with offset formula and make dynamic.
You can find dynamic address of your column as shown in the image below. Select entire column WITHOUT Header

Name your column data range with appropriate name as shown in image below

Then in Data Validation Window refer this name using F3 as shown in image below.

Then you can see... Even if you edit, add or delete any row in the column the data validation will change

Editing based on your comment below: If you want text from column B and Column C appear together in the validation dropdown list. Insert column in the table and join text from column B and C and then make data validation based on that column as shown in Colum D in image below

Finally I think I understood your question.
Watch this video
Excel: Find Multiple Matches & Dependent Drop Down List

A: After some days of searching and trying I got what I wanted - wasnt wasy job at all. Needed to combine more functions with the help of couple of videos from Leyla (Xelplus):
https://www.youtube.com/watch?v=gu4xJWAIal8
https://www.youtube.com/watch?v=7fYlWeMQ6L8&t=5s
First step was to make unique list of my values (text in my case) on separate sheet:
=IFERROR(INDEX(t_VarGroup[Vargrouptext];MATCH(0;INDEX(COUNTIF($J$2:J2;t_VarGroup[Vargrouptext]););0));"")

Then I needed to "extract" all the values that are belonging to the certain unique values:
=@IF($I3<COLUMNS($K$2:K$2);"";INDEX(t_EDS[[VarEDS]:[VarEDS]];AGGREGATE(15;3;(t_VarGroup[[Vargrouptext]:[Vargrouptext]]=$J3)/(t_VarGroup[[Vargrouptext]:[Vargrouptext]]=$J3)*(ROW(t_VarGroup[Vargrouptext])-ROW(t_VarGroup[[#Headers];[Vargrouptext]]));COLUMNS($K$2:K$2))))

FUrthermore, I created Unique drop down list:
=OFFSET($J$3;;;COUNTIF($J$3:$J$14;"?*"))

And then dependent drop down list nearby using:
=OFFSET($K$2;MATCH($H$2;$J$3:$J$17;0);;1;COUNTIF(OFFSET($K$2;MATCH($H$2;$J$3:$J$17;0);;1;20);"?*"))

And because I made it on other sheet, I had to reference them to an appropriate sheet name where my main sheet is - with drop downs, it is actually very useful for my future work and for everyone else who has struggling with drop downs but on a bit specific way =))
credits to: @Naresh Bhople  for suggestion about Youtube videos.


text:
Q: is it safe for the Apache to be the owner of the session directory (php) Since I have upgraded to php 5.3 I have issues with the session GC.
Seems he can't access the directory which is owned by root, Although I see sessions are being created there.
Is it safe to change the ownership of that directory to the Apache?

A: Depends on the directory you are talking about. Changing the permissions of the /tmp directory isn't a good idea for example. When you are using a separate directory for just PHP session files you can change the ownership to the Apache user and group.
If you are hosting multiple users on the same machine you may want to look into running PHP as a separate user for each VirtualHost or set the session.save_path to a private directory for each VirtualHost. Otherwise users can read each others PHP session files because they are owned by the Apache user.
What issues are you experiencing with GC?


text:
Q: how to send message to mailing list with apache mail? I am working on an application to send emails with javafx and apache mail commons, but it throws and error when i try to send the message.
Caused by: javax.mail.internet.AddressException: Illegal address in
string `` ''
at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:122)
at org.apache.commons.mail.Email.createInternetAddress(Email.java:1949)
... 59 more

Anyways i noticed when i initialize the array of strings with my recipients it sends it correctly, but if i take them from the database it throws the error i wrote above.
The way it works.
HtmlEmail email = new HtmlEmail();
...
String[] emails = {"email1@domain.com", "email2@domain.com"}
email.addTo(emails);

The way it doesn't work
HtmlEmail email = new HtmlEmail();
...
String[] emails = model.getEmailsBy(campaignName); //Returns a string[]
email.addTo(emails);

Important: model.getEmailsBy(campaignName); is not null.

A: there must be at least one blank or invalid email in the list of model.getEmailsBy(campaignName); and this is the reason of
 Illegal address in
string `` ''.


text:
Q: Where is C# Windows Form Application main() function In C# Windows Form Application,

*

*I have another class Race.

*I want to declare an Object of Race class

*And access this Object when a button is clicked

.
Race class:
class Race
{
    int player;
    int position;
}

Object creation:
Race Obj = new Race();

Accessing Object:
    private void button1_Click(object sender, EventArgs e)
    {
        Obj.position++;
    }

The question is, where to create Race class Object, so i can access it when button is clicked?

A: You'll need to declare it at the class level. In your case, that means it needs to be a field in your form:
public class Form1 : Form
{
    private Race race;

    public Form1()
    {
        race = new Race();
    }

    public void button1_Click(object sender, EventArgs e)
    {
        race.position++;
    }
}

A: You can add it as a private member in the form class and instanciate it there.
So something like
public class Form1
{
    private Race Obj = new Rate();

    private void button1_Click(object sender, EventArgs e)
    {
        Obj.position++;
    }
}

Also make sure that the class is accessible.


text:
Q: Has an order with this property a special name? If $a$ is an element in a preorder then you can eventually go 'a step back' (and repeat this) in the sense of finding an element with $b\leq a$ and not $a\leq b$.

Is there a special name for (pre)orders in which for every element such a route back can only contain a finite number of steps?

This question occurred when I was looking at factorization in irreducibles in an integral domain.


text:
Q: How to get type of multidimensional Numpy array elements in Python How can I get the type of a multidimensional array?
I treat arrays but considering data type:  string, float, Boolean, I have to adapt code so I would have to get the type regardless of dimension that can be one two dimensions or more.
Data can be 1d of real, 3D of string ...
I would like to recover type of Array,  is it a real , is it a string is it a boolean ...
without doing Array[0]  or Array [0][0][0][0]  because dimension can be various.
Or a way to get the first element of an array whatever the dimensions.
It works with np.isreal a bit modified , but I don't found equivalent like isastring or isaboolean ...

A: Use the dtype attribute:
>>> import numpy
>>> ar = numpy.array(range(10))
>>> ar.dtype
dtype('int32')

Explanation
Python lists are like arrays:
>>> [[1, 2], [3, 4]]
[[1, 2], [3, 4]]

But for analysis and scientific computing, we typically use the numpy package's arrays for high performance calculations:
>>> import numpy as np
>>> np.array([[1, 2], [3, 4]])
array([[1, 2],
       [3, 4]])

If you're asking about inspecting the type of the data in the arrays, we can do that by using the index of the item of interest in the array (here I go sequentially deeper until I get to the deepest element):
>>> ar = np.array([[1, 2], [3, 4]])
>>> type(ar)
<type 'numpy.ndarray'>
>>> type(ar[0])
<type 'numpy.ndarray'>
>>> type(ar[0][0])
<type 'numpy.int32'>

We can also directly inspect the datatype by accessing the dtype attribute
>>> ar.dtype
dtype('int32')

If the array is a string, for example, we learn how long the longest string is:
>>> ar = numpy.array([['apple', 'b'],['c', 'd']])
>>> ar
array([['apple', 'b'],
       ['c', 'd']],
      dtype='|S5')
>>> ar = numpy.array([['apple', 'banana'],['c', 'd']])
>>> ar
array([['apple', 'banana'],
       ['c', 'd']],
      dtype='|S6')
>>> ar.dtype
dtype('S6')

I tend not to alias my imports so I have the consistency as seen here, (I usually do import numpy).
>>> ar.dtype.type
<type 'numpy.string_'>
>>> ar.dtype.type == numpy.string_
True

But it is common to import numpy as np (that is, alias it):
>>> import numpy as np
>>> ar.dtype.type == np.string_
True

A: fruits = [['banana'], [1],  [11.12]]

for first_array in range(len(fruits)):
    for second_array in range(len(fruits[first_array])):
        print('Type :', type(fruits[first_array][second_array]), 'data:', fruits[first_array][second_array])

That show the data type of each values.


text:
Q: /v1/billing/subscriptions/I-XXXXXXXX/revise RESOURCE_NOT_FOUND cannot revise plan I am following this documentation:
https://developer.paypal.com/docs/platforms/subscriptions/customize/revise-subscriptions/
I can make a get subscription request and I do find the resource, so it does exists, I'm trying to change a plan for user with no success.
I have tried multiple subscriptions upgrades and keep getting this error:
{
    "name": "RESOURCE_NOT_FOUND",
    "message": "The specified resource does not exist.",
    "debug_id": "badd307417e54",
    "details": [
        {
            "issue": "INVALID_RESOURCE_ID",
            "description": "Requested resource ID was not found."
        }
    ],
    "links": [
        {
            "href": "https://developer.paypal.com/docs/api/v1/billing/subscriptions#RESOURCE_NOT_FOUND",
            "rel": "information_link",
            "method": "GET"
        }
    ]
}

I'm testing my personal user on production environment.
Request made using postman:
curl --location --request POST 'https://api-m.paypal.com/v1/billing/subscriptions/I-XXXXXX/revise' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX' \
--data-raw '{"plan_id":"P-XXXXXXXXXXXXXXX"}'

A: After posting here I have found other questions about the /revise endpoint, none was answered, after that we have initiated a communication with PayPal's merchant support and apparently there is a bug.
The issue was escalated to PayPal's engineers, not sure when it will be resolved.
If anyone else is having this issue at the moment and is looking to change a plan, we have found a functioning workaround:

*

*Create a new subscription - Users need approve the new price on PayPal

*You will have to manually calculate the first payment in case of an upgrade

*Once the new subscription activated - cancel the old subscription

We didn't find a way update an existing subscription plan
I hope it will help someone save some time

A: It appears the plan you are attempting to revise the subscription to (inexplicably obfuscated in your question as "P-XXXXXXXXXXXXXXX") is not valid.
Provide a valid Plan ID.


text:
Q: Hide base path before # in url in Angular I'm building a wordpress theme with angular as described here.
This is my index.html that is loaded by wordpress' index.php:
<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>TITLE</title>

  <base href="/wp-content/themes/TITLE/dist/">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
  <app-root>Loading...</app-root>
</body>
</html>

The url result is:
http://HOST/wp-content/themes/TITLE/dist/#/ , but should be http://HOST/#/
I need to set the  tag in my index.html to enable angular to find its resources. Is there a way to hide the /wp-content/themes/TITLE/dist part before the /#/ from angulars HashLocationStrategy?
I would prefer to hide it from the angular settings, but if a wordpress configuration in the admin view is necessary this would be fine, too.


text:
Q: Nested loop caused slow in performance foreach ($id_prs as $ids) {
   list($id_pr, $id_cart) = explode('-', $ids);
    foreach ($id_cart as $id) {
        $r = Cart::find($id);
                /// column to update value
                $r->save();
    }
}

This is how my loop looks like.
E.g. $id_prs consist of 10 data, while each id_prs may consist of 20 data etc.
From there, i found will take longer time to loop when a lots of data from each $id_cart.
How can i solve the performance issue, is there any solution?

A: This is known as n+1 problem, every time you iterate inside foreach additional query is created.
So this line is the evil, because it's querying data every iteration.
$r = Cart::find($id);

You can make it better like this:
$cart = Cart::all();
foreach ($id_prs as $ids) {
   list($id_pr, $id_cart) = explode('-', $ids);
    foreach ($id_cart as $id) {
        // Get it from collection rather than query it from database
        $cart->where('id', $id)->first()->save();
    }
}

Where you acctualy query all carts inside variable as a collection, and you just manipulating with that collection localy without touching database (only when you hit save method).

A: Your code and variables are not clear enough. But a better solution is:
foreach ($id_prs as $ids) {
   list($id_pr, $id_cart) = explode('-', $ids);
   $items = Cart::whereIn('id', $id_cart) -> get();

   foreach($items as $item) {
       Cart::where('id', $item -> id) -> limit(1) -> update([
           // Columns to update
       ]);
   }
}

A: If you want to update same value for all the records
$allIds = [];
foreach ($id_prs as $ids) {
   list($id_pr, $id_cart) = explode('-', $ids);
    foreach ($id_cart as $id) {
        $allIds[] = $id;
    }
}
$cart = Cart::whereIn('id',$allIds)->update(['columns'=>'value']);


text:
Q: Converting babel compiled code into regular js I got an example code from codepen and I wanted to understand it better. I noticed that the js code is compiled with Babel. Since I'm quite new to JS I would be more comfortable to look at a standard javascript code, so I wanted to ask you if there's some way to convert a babel js into a regular js. I did some research but I couldn't find anything
By the way, this is the Babel code

const parent = document.getElementById("projects");
const closeButton = document.getElementById("project-close");
const projectItems = document.querySelectorAll(".project-item");

closeButton.addEventListener("click", onProjectClose);
projectItems.forEach(item => item.addEventListener("click", onProjectClick));

function onProjectClick(event) {
  const { target } = event;
  const { width, height, top, left } = target.getBoundingClientRect();
  const clone = document.createElement("div");
  clone.style.height = height + "px";
  clone.style.width = width + "px";
  clone.style.top = top + "px";
  clone.style.left = left + "px";
  clone.style.position = "absolute";
  clone.style.zIndex = 10;
  clone.classList.add("project-item");
  clone.classList.add("clone");
  clone.innerHTML = target.innerHTML;
  document.body.appendChild(clone);

  gsap.timeline().
  to(clone, 1.5, {
    position: "fixed",
    top: 0,
    left: 0,
    width: "100%",
    height: "100vh",
    ease: Expo.easeInOut }).

  add(() => document.body.classList.add("project-page")).
  set(clone, {
    overflow: "auto" });

}

function onProjectClose() {
  document.body.classList.remove("project-page");
  const clone = document.querySelector(".clone");
  gsap.to(clone, 1, {
    clipPath: "inset(100% 0 100% 0)",
    ease: Sine.easeInOut,
    onComplete() {
      clone.remove();
    } });

  gsap.to(clone.querySelector("img"), 1, {
    scale: 0.7,
    ease: Sine.easeInOut });

}


text:
Q: Error: Unable to reach host: "api.twilio.com" I'm using node-twilio and I keep getting a "Error: Unable to reach host: "api.twilio.com" for every request. We've checked the packets via mtr and they are reaching api.twilio.com. Running on debian on GCE.

A: After days of digging around, found out that the node-twilio module shows many errors incorrectly as:

"Error: Unable to reach host: "api.twilio.com".

The following lines:
var error = null;
if (err || (response && (response.statusCode < 200 || response.statusCode > 206))) {
    error = {};
    // response is null if server is unreachable
    if (response) {
        error.status = response.statusCode;
        error.message = data ? data.message : 'Unable to complete HTTP request';
        error.code = data && data.code;
        error.moreInfo = data && data.more_info;
    } else {
        error.status = err.code;
        error.message = 'Unable to reach host: "'+client.host+'"';
    }
}

This happens because you have a self signed certificate in your chain and the underlying module twilio depends on is request, which is throwing the following error:
Error: SELF_SIGNED_CERT_IN_CHAIN but this is not the error being thrown by node-twilio (bad error propagation on their part)
There are 2 fixes:
1.Tell nodejs to ignore self signed certificates in chain by setting:
export NODE_TLS_REJECT_UNAUTHORIZED=0

*Find the self signed certificate and remove it from the chain. Here is an example using openssl: https://serverfault.com/questions/590870/how-to-view-all-ssl-certificates-in-a-bundle
References:
https://github.com/request/request
https://github.com/twilio/twilio-node/blob/45858420688854494c2ed476a1997773c33a32a0/lib/Client.js
Ignore invalid self-signed ssl certificate in node.js with https.request?

A: It may be because of your internet connection.
After couple of minutes, if you have internet, try again and it should work.


text:
Q: Where are my icons in Windows 7? In previous versions of Windows when I right click on a shortcut and dived in to change the icon the initial list populated with a whole catalog of default icons.
On Windows 7 (RTM) here is what I see:

I found those icons useful when making shortcuts to web applications.
Any idea where I can find them?! I had a little "Browse..." but couldn't find much.
Edit:
You've all so far provided excellent answers, thanks - unfortunately I can't pick you all as the right one! :( Three of the files you mentioned have had equally useful sets of DLLs:
%SystemRoot%\system32\imageres.dll
%SystemRoot%\system32\shell32.dll
%SystemRoot%\system32\DDORes.dll
%SystemRoot%\System32\moricons.dll (MS DOS Icons)

A: In the box that says "Look for icons in this file:", type or browse to:
    %SystemRoot%\system32\SHELL32.dll

A: The can be all over the place.  For example, browse to this location ...
C:\Windows\system32\imageres.dll

But, they can be in any DLL, EXE or ICO file. You can also download cool ones.

A: There are more than 1,000 icons in total in these files:

*

*C:\Windows\System32\Shell32.Dll

*C:\Windows\Explorer.Exe

*C:\Windows\System32\AccessibilityCpl.Dll

*C:\Windows\System32\Ddores.Dll

*C:\Windows\System32\GameUx.Dll

*C:\Windows\System32\imageres.dll

*C:\Windows\System32\MorIcons.Dll

*C:\Windows\System32\mmcndmgr.dll

*C:\Windows\System32\mmRes.Dll

*C:\Windows\System32\NetCenter.Dll

*C:\Windows\System32\netshell.dll

*C:\Windows\System32\networkexplorer.dll

*C:\Windows\System32\PifMgr.dll

*C:\Windows\System32\PniDui.Dll

*C:\Windows\System32\SensorsCpl.Dll

*C:\Windows\System32\SetupApi.Dll

*C:\Windows\System32\wmploc.DLL

*C:\Windows\System32\wpdshext.dll

*C:\Windows\System32\DDORes.dll

*C:\Windows\System32\compstui.dll

A: The real decade-long legendary MS-DOS icons secretly reside in pifmgr.dll dynamic library file with the description of Windows NT PIF Manager Icon Resources Library in System32 folder of root of Windows contained in %windir% environment variable, that's C:\Windows\System32 by default.

A: Additionally, lots of device icons are stored here:
%SystemRoot%\System32\DDORes.dll

and high res stuff from devices and printers (potentially) here:
%LOCALAPPDATA%\Microsoft\Device Metadata\dmrccache\

A: There are 113 additional icons in:
%SystemRoot%\System32\moricons.dll

A: Looking for a new ICON for an application on your Windows 7 screen? Goto the bottom of your screen and click on "Start".
In the Search Programs and Files box, enter *.ico. Above it, you will see - "see more results" -select it and then select "Computer". Your Windows 7 search engine will then find and show you EVERY ICON that's in your computer - sit back, this might take a minute or two (you've got Icons scattered all over your computer). To put them ALL in one place, after your search engine stops, copy them ALL into a single folder and they'll always be available for you. Have fun everyone...

A: Several good answers but no one seems to have the capitalization quite right (to make copy-paste actually work).
This was my path:
%SystemRoot%\System32\shell32.dll

A: the procedures are the same in Windows 7 and Windows 8.

*

*Create a folder named Taskbar Shortcuts.

*Move it to c:\Windows

*Create a shortcut for the desired item within this folder.

*Decide on the icon to be used for your Taskbar Shortcut
(you may have to go to step 5)
(do not try to apply the icon yet)

*Right-click and drag the shortcut without releasing.
(This may give you an idea of the true icon)
(do not do any more here)

*Icon Selection
A. To apply a specific icon to your shortcut right-click\
   properties\change icon
B. By default windows will offer you icons in the shell32.dll
   look through them to see if the desired icon is there.
   If it is then select it and click OK.
C. If you can't locate your specific icon then follow these steps:
1c. Open Windows Explorer
2c. Select Computer in the left pane.
3c. Type the following in the Search Bar: *.ico
4c. Once the progress bar stops scroll down the list to see
   if you can locate the desired icon.
5c. If unable to locate the icon then look at the following
   list of possible locations. Select one of the strings and press ctrl-c

          C:\Windows\Explorer.Exe
          C:\Windows\System32\AccessibilityCpl.Dll
          C:\Windows\System32\Ddores.Dll
          C:\Windows\System32\GameUx.Dll
          C:\Windows\System32\imageres.dll
          C:\Windows\System32\MorIcons.Dll
          C:\Windows\System32\mmcndmgr.dll
          C:\Windows\System32\mmRes.Dll
          C:\Windows\System32\NetCenter.Dll
          C:\Windows\System32\netshell.dll
          C:\Windows\System32\networkexplorer.dll  (Local Area Connection)
          C:\Windows\System32\PifMgr.dll
          C:\Windows\System32\PniDui.Dll
          C:\Windows\System32\SensorsCpl.Dll
          C:\Windows\System32\SetupApi.Dll
          C:\Windows\System32\wmploc.DLL
          C:\Windows\System32\wpdshext.dll
          C:\Windows\System32\DDORes.dll
          C:\Windows\System32\compstui.dll

6c. Select the shortcut & right-click\properties\change icon.
   Highlight the text in the location box and press ctrl-v and click OK.
7c. Repeat the process as necessary to locate your icon.

*Once the shorcut has the proper icon Select your shortcut and press ctrl-c

*Right-click in the Taskbar Shortcuts folder and select
NEW\SHORTCUT

*When the New Shortcut Wizard opens key in the following:
explorer
space
ctrl-v
(example: explorer "C:\windows\Taskbar Shortcuts\Local Connection)
click OK

*Give the new shorcut a similar but slightly different name from the original and click OK

*Drag and drop your new shorcut to the windows taskbar.

*If the new taskbar item needs right click functionality like Local Area Connection-Disable\Enable
then do this:
A. Taskbar right-click\toolbars\new toolbar...

B. Navigate to c:\Windows\Taskbar Shortcuts and click Select Folder

C. Go to the new Toolbar folder on the Taskbar right-click & uncheck Show Text & Show Title.


text:
Q: Why does flask app crash on heroku I'm creating a webcomic site for my friend using Heroku and Flask on Python 2.7
My code is inside this gist: https://gist.github.com/anonymous/e2b7623110479c61c87c
It works locally when I use foreman start or with the python interpreter, but when I push it to heroku, I get the Application Error page.
Heroku ps gives
web.1: crashed 2014/07/12 20:05:38 (~ 16m ago)

for no apparent reason. The project is structured as a module and since gist does not allow directories to be uploaded, I cannot do that.
Help will be appreciated.


text:
Q: Лагает скролл в React приложении Появились фризы при прокрутке сайта на Пк, на мобильных устройствах всё нормально. Сайт ещё в процессе разработки. Подскажите, что может вызывать эти фризы?
Вот ссылка на репозиторий с сайтом: ссылка
Вот сайт залитый на хостинг: ссылка

A: Лаги возникали из-за свойства filter: blur, которые размывало картинку на заднем фоне (в компоненте ourServers).


text:
Q: dynamically update d3js linegraph with JSON data I'm trying to figure out, how to dynamically update that linegraph with new data, moving the graph to the left and adding new data from right - you get it? the usual behaviour as you see in https://bost.ocks.org/mike/path/
Actually I am a beginner in d3 (javascript) and want to use external JSON data.
[
{"Values": ["1.59"], "Datetime": "2016-12-10 14:29:22.007"},
 {...}
{"Values": ["1.91"], "Datetime": "2016-12-10 14:29:23.230"},
 {...}
{"Values": ["0.52"], "Datetime": "2016-12-10 14:29:23.238"}
]

What I found on the web are examples of generated data or updating one file with another.
Maybe there is a solution for my problem by handling just one json datafile and manage to work with it by array methods?
Appreciate your help folks!
d3.json("https://api.myjson.com/bins/1814gv", function (error, data) {
if (error) throw error;
// format the data
data.forEach(function (d) {
    d.Datetime = parseTime(d.Datetime);
    d.Values = +d.Values;

});
...

Full-Code-Example on jsfiddle

A: Welcome to Stackoverflow! Your question is a bit vague, it sounds like you need to dig into the fundamentals of D3 a bit more to understand how data binding works.
There is an update pattern as shown in this block. When an array has elements added/updated/removed, then the related bound elements are added/updated/removed in the svg.
D3 uses the index of the array to decide where to add or update data by default, so if you want new data at the end of a line graph, you add it to the end of the array. If that is what you mean by transition to the right?
If you mean transition as visually changing from state to another, there is an example of this in the code you posted. The tooltip goes from opacity of 0 to 1 when a point is moused over.
The convention here is to mark an answer as correct if it solved, or you can upvote a helpful answer. Im not sure anyone will be able to answer your question as it is too broad


text:
Q: I am not able to compare two strings and obtain the expected output How would I get the strings "part1" to properly compare to "findF","findPLUS", and "findMINUS?" Currently it runs without any errors but it does not properly do the actions inside of the if then statement.
output is "F - F +"
public void arrayHolder(){
    String compare = ",F,-,F,+";
    for(int i=0;i<=(compare.length()/2);i++){

        String[] index = compare.split(",");

        String part1 = index[i];
        String findF = new String("F");
        String findPLUS = new String("+");
        String findMINUS = new String("-");

        if(part1 == findF){
            m.forward(25);
        }else if(part1 == findPLUS){
            m.turnLeft();
        }else if(part1 == findMINUS){
            m.turnRight();
        }
        System.out.println(part1);
    }
}


text:
Q: Export HTML to PDF (C++, Windows) I am looking for a redistributable component to convert HTML to PDF.
I would - at the moment - like to avoid using a "PDF printer", as this requires a printer installation and some user "playing around" in the printers panel might break that feature.
The HTML is available in a Browser control or as external file. The HTML is normally fairly simple, but customers can create their own templates, so a "good range" of HTML should be supported.
Should be accessible for an automated process from C++ - DLL / COM / external executable with command line support are all fine.
Commercial is fine, but in the thousands is not an option right now.
So, which components do you know or can you recommend?

A: PDFCreator can function as a virtual printer but it's also usable via COM. The default setup even includes COM examples.
You can check the COM samples in the SourceForge SVN repository right here: http://pdfcreator.svn.sourceforge.net/viewvc/pdfcreator/trunk/COM/

A: If you have Microsoft Word installed, I guess you could automate the whole process using the "save as pdf" plugin that can be downloaded from the Microsoft Office Site.
You would automate word then open the HTML document inside word, then output as PDF. Might be worth a shot, if you're developing in a Microsoft Environment.

A: You might want to have a look at PDFReactor


text:
Q: To handle special characters in SQL server database, which should be used varchar or nvarchar? I am asking a simple question that, to handle special  characters in my Mobile/Tablet web app, which data types should I use?

*

*Varchar

*NVarchar

*Text

*NText

EDIT:
IMPORTANT! ntext, text, and image data types will be removed in a future version of SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead. More Detail Here
Should we use nVarchar  as I read somewhere that some devices, such as mobile phones, still cannot correctly handle Unicode data.
Please give your expert suggestions?

A: 1 or 2 depending on the "special characters" you'll be saving. Just depends on how "special" they are.
I will say though, definitely not Text as it's deprecated.
https://learn.microsoft.com/en-us/sql/t-sql/data-types/ntext-text-and-image-transact-sql?view=sql-server-2017


text:
Q: AKSwiftSlideMenu adding more view controllers I found the AKSwiftSlideMenu code to create a slide menu. The example works great.
I figured out how to add more item in the side menu, but when I  click on the new items it will take me to my new viewcontroller but I don't have the '3 LINED MENU ICON' on the top.
SEE LINK TO VC3 BELOW
case 0:
            print("Home\n", terminator: "")
        self.openViewControllerBasedOnIdentifier("Home")

        break
    case 1:
        print("Play\n", terminator: "")

        self.openViewControllerBasedOnIdentifier("PlayVC")

        break
    case 2:
        print("x\n", terminator: "")

        self.openViewControllerBasedOnIdentifier("VC3")

        break
    default:
        print("default\n", terminator: "")
    }
}

What are the steps to add a new VC3, I know how to add a new vc to the main storyboard, but can't seem to get the new vc to have the navigation bar and the '3 line menu' at the top of my new VC.
thanks

A: Try this code:
Note: Below code has to go inside your BaseViewController.Make sure you set segue identifier and destinatinViewController on all viewController.
    func slideMenuItemSelectedAtIndex(index: Int32) {
    let topViewController : UIViewController = self.navigationController!.topViewController!

    switch(index){
    case 0:
        print("VC1\n", terminator: "")
        self.performSegueWithIdentifier("segueVC1", sender: nil)

        func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        self.performSegueWithIdentifier("segueVC1", sender: nil)
        segue.destinationViewController as! viewControllerOne
        }
        break

    case 1:
        print("VC2", terminator: "")
        self.performSegueWithIdentifier("segueVC2", sender: nil)

        func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        self.performSegueWithIdentifier("segueVC2", sender: nil)
        segue.destinationViewController as! viewControllerTwo
        }
        break

    case 2:
        print("VC3", terminator: "")
        self.performSegueWithIdentifier("segueVC3", sender: nil)

        func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        self.performSegueWithIdentifier("segueVC3", sender: nil)
        segue.destinationViewController as! viewControllerThree
        }
        break

    case 3:
        print("VC4", terminator: "")
        self.performSegueWithIdentifier("segueVC4", sender: nil)

        func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        self.performSegueWithIdentifier("segueVC4", sender: nil)
        segue.destinationViewController as! viewControllerFour
        }
        break

       default:
        print("default\n", terminator: "")
    }

Note : If you not using segue to connect VC's then you need a different approach.let me know.
Update:
Step1: Create a swift class for your newVC.
Step2: Drag newVC to your storyBoard and setup a custom class name.(newVc class name and VC custom class name should be match)
Step3: Connect AKSwiftSlideMenuVC to newVC and give name to your segueIdentifier.
Step 4: Goto BaseViewController update your case segueIdentifier and destVC...


text:
Q: How can I fix low resolution of my custom soft Keyboard View? I am developing a custom softkeyboard using softkeyboard sample of android SDK for 10 inches tablet PCs.
First question: I noticed that the resolution of my keyboard is very low on tablet that is obvious in the following images. Actually in my keyboard area, the resolution is same as Pocket PCs resolution.
How can I change its resolution to normal resolution of tablet PCs (10in)?
In my softkeyboard getMaxWidth(); returns 545 that is very low for tablet.
Second question: how can I change the font size of key labels?
Thanks a lot,

My keyboard View:

My desired View:

A: I found the answer of my first question:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"

    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true" />

</manifest>

My reference is this link.


text:
Q: Why mono sounds are preferred over stereo sounds when it comes to analyse acoustic parameters like intensity, RMS amplitude, fundamental frequency etc In phonetic analyses, while using software like Praat, I have seen people's liking mono sounds over stereo sounds. Even if the recordings were done using a stereo microphone, the audio files are often converted to stereo. Any reason besides saving up a lot of memory? Thanks.

A: I've gathered a bunch of sources that marginally comment on whether to use mono or stereo audio. The consensus seems to be that mono audio saves space, like you said. However, a few of the sources note some of the times when you'd want to use stereo audio.

*

*You want to record simultaneous electroglottograph data. Having both the audio and the electroglottograph data on one file as "stereo" audio keeps your data tidy.

*You want to record audio once, but also want to choose the better half of the audio after your recording is done.
Also, note that human language is pretty much produced as a mono signal. I don't know of any human language that depends on stereo audio in order to communicate meaningful information. This link mentions that some occupations involving emergency communication make use of different audio in each ear to get more information across at the same time, but that's as close of a resource as I can find concerning stereo uses of language.
It also appears that Praat can't work with multiple files when they aren't all mono or all stereo, so that might also be a reason to use mono audio. Duplicating mono audio into both ears isn't quite the same as reducing stereo audio to mono audio.
Here's the most useful sources I found:
From https://colangpraat.wordpress.com/part-3-how-to-record-using-praat/

In the menu bar of the Objects window, click NEW and RECORD MONO SOUND.  PRAAT also has the capability to record in stereo, but when it comes to gathering language data, mono files are preferred.

From https://web.stanford.edu/dept/linguistics/corpora/material/PRAAT_workshop_manual_v421.pdf

In most cases, you will record a single speech or voice sample and for that
purpose you can select 'Record mono Sound..'. If you want to make stereo
recordings, you obviously have to use "Record stereo Sound'. The latter option,
for example, can be used to digitize the stereo output signal of the EG-2 PC
Electroglottograph from Glottal Enterprises
(http://www.glottal.com/electroglottograph.html), thus giving you access to a
simultaneous recording of a speech and EGG signal.

From https://www.fon.hum.uva.nl/praat/manual/ExperimentMFC_2_2__The_stimuli.html

You can also use AIFF files, in which case stimulusFileNameTail would probably be ".aiff", or any other type of sound file that Praat supports. But all sound files must have the same number of channels (i.e. all mono or all stereo) and the same sampling frequency.

From https://www.fon.hum.uva.nl/david/LOT/sspbook.pdf

Before we go on, we repeat that a sound is represented in Praat as a matrix which means that
sounds are stored as rows of numbers. A mono sound is a matrix with only one row and many
columns. A stereo sound is a sound with two channels, each channel is represented in one row
of the matrix. A stereo sound is therefore a matrix with two rows and both rows have the same
number of columns. Each matrix cell contains one sample value. Whenever we want to use a
formula on a sound we can think about a sound as a matrix.

From https://person2.sol.lu.se/SidneyWood/praate/monstee.html

But make sure you have something to gain from merging the channels into one mono signal. It is simpler to use the Stereo recorder in Praat and take the best channel.


text:
Q: Mathematica can't Import data of NetCDF file with Datasets name including "." I have downloaded NetCDF data file EVE_L3_merged_1nm_2015323_005.ncdf from
http://lasp.colorado.edu/eve/data_access/evewebdata/products/merged/
and read it by Mathematica 10.0.2 on my windows 7.
Import["D:\\...\\EVE_L3_merged_1nm_2015323_005.ncdf", "Elements"]

gives {"Annotations", "Data", "DataFormat", "Datasets", "Dimensions",
"Metadata"}. the "Annotations",  "DataFormat",names of "Datasets", "Dimensions",
"Metadata" are all Imported correctly and
datsets =Import["D:\\...\\EVE_L3_merged_1nm_2015323_005.ncdf", "Datasets"];
Transpose@{Range@Length@datsets, datsets}

returns
{{1, "PRIMARY"}, {2, "PRIMARY_HEAD"}, {3, "LINESMETA_HEADER"}, {4,
  "BANDSMETA_HEADER"}, {5, "DIODEMETA_HEADER"}, {6,
  "SPECTRUMMETA_HEADER"}, {7, "MERGEDDATA_HEADER"}, {8,
  "LINESMETA.WAVE_CENTER"}, {9, "LINESMETA.WAVE_MIN"}, {10,
  "LINESMETA.WAVE_MAX"}, {11, "LINESMETA.LOGT"}, {12,
  "LINESMETA.NAME"}, {13, "LINESMETA.TYPE"}, {14,
  "LINESMETA.BLENDS"}, {15, "BANDSMETA.NAME"}, {16,
  "BANDSMETA.TYPE"}, {17, "DIODEMETA.NAME"}, {18,
  "DIODEMETA.TYPE"}, {19, "SPECTRUMMETA.WAVELENGTH"}, {20,
  "SPECTRUMMETA.IRRADIANCE_UNITS"}, {21, "MERGEDDATA.YYYYDOY"}, {22,
  "MERGEDDATA.CAPTURE"}, {23, "MERGEDDATA.SP_IRRADIANCE"}, {24,
  "MERGEDDATA.SP_STDEV"}, {25, "MERGEDDATA.SP_PRECISION"}, {26,
  "MERGEDDATA.SP_ACCURACY"}, {27, "MERGEDDATA.BAND_IRRADIANCE"}, {28,
  "MERGEDDATA.BAND_STDEV"}, {29, "MERGEDDATA.BAND_PRECISION"}, {30,
  "MERGEDDATA.BAND_ACCURACY"}, {31,
  "MERGEDDATA.DIODE_IRRADIANCE"}, {32, "MERGEDDATA.DIODE_STDEV"}, {33,
   "MERGEDDATA.DIODE_PRECISION"}, {34,
  "MERGEDDATA.DIODE_ACCURACY"}, {35,
  "MERGEDDATA.LINE_IRRADIANCE"}, {36, "MERGEDDATA.LINE_STDEV"}, {37,
  "MERGEDDATA.LINE_PRECISION"}, {38, "MERGEDDATA.LINE_ACCURACY"}, {39,
   "MERGEDDATA.AU_FACTOR"}}

notice that since 8th quantity the name of dataset contains "." by form "*.*"
If I Import the dataset whose name contains no "." by, for example,
Import["D:\\...\\EVE_L3_merged_1nm_2015323_005.ncdf", {"Datasets", "BANDSMETA_HEADER"}]

Import works well. However if I import  dataset whose name contains "." by
Import["D:\\...\\EVE_L3_merged_1nm_2015323_005.ncdf",   {"Datasets", "MERGEDDATA.YYYYDOY"}]

Import broke and suggested

File does not contain a dataset "MERGEDDATA.YYYYDOY"

This problem is not confined to this particular file but occurs every time I Import  NetCDF file with Datasets name including ".".
How could I Import data correctly?

A: So, as we can see here

So if the dataset name contains one of those characters, it needs to be escaped.  Try this, replacing "~/Downloads/" with "D:\...\" for the file
elementlist =
 StringReplace[#, "." -> "\\."] & /@
  Import["~/Downloads/EVE_L3_merged_1nm_2015323_005.nc", "Datasets"]
(* {"PRIMARY", "PRIMARY_HEAD", "LINESMETA_HEADER", \
"BANDSMETA_HEADER", "DIODEMETA_HEADER", "SPECTRUMMETA_HEADER", \
"MERGEDDATA_HEADER", "LINESMETA\\.WAVE_CENTER", \
"LINESMETA\\.WAVE_MIN", "LINESMETA\\.WAVE_MAX", "LINESMETA\\.LOGT", \
"LINESMETA\\.NAME", "LINESMETA\\.TYPE", "LINESMETA\\.BLENDS", \
"BANDSMETA\\.NAME", "BANDSMETA\\.TYPE", "DIODEMETA\\.NAME", \
"DIODEMETA\\.TYPE", "SPECTRUMMETA\\.WAVELENGTH", \
"SPECTRUMMETA\\.IRRADIANCE_UNITS", "MERGEDDATA\\.YYYYDOY", \
"MERGEDDATA\\.CAPTURE", "MERGEDDATA\\.SP_IRRADIANCE", \
"MERGEDDATA\\.SP_STDEV", "MERGEDDATA\\.SP_PRECISION", \
"MERGEDDATA\\.SP_ACCURACY", "MERGEDDATA\\.BAND_IRRADIANCE", \
"MERGEDDATA\\.BAND_STDEV", "MERGEDDATA\\.BAND_PRECISION", "MERGEDDATA\
\\.BAND_ACCURACY", "MERGEDDATA\\.DIODE_IRRADIANCE", \
"MERGEDDATA\\.DIODE_STDEV", "MERGEDDATA\\.DIODE_PRECISION", \
"MERGEDDATA\\.DIODE_ACCURACY", "MERGEDDATA\\.LINE_IRRADIANCE", \
"MERGEDDATA\\.LINE_STDEV", "MERGEDDATA\\.LINE_PRECISION", "MERGEDDATA\
\\.LINE_ACCURACY", "MERGEDDATA\\.AU_FACTOR"} *)

data = Import[
     "~/Downloads/EVE_L3_merged_1nm_2015323_005.nc", {"Datasets", #}]& /@ elementlist;

and you can check that everything imported fine by
Dimensions /@ data
(* {{1}, {1, 5}, {1, 53}, {1, 28}, {1, 27}, {1, 47}, {1,
  90}, {1, 39}, {1, 39}, {1, 39}, {1, 39}, {1, 39}, {1, 39}, {1,
  39}, {1, 20}, {1, 20}, {1, 6}, {1, 6}, {1, 100}, {1}, {1, 2029}, {1,
   2029}, {1, 2029, 100}, {1, 2029, 100}, {1, 2029, 100}, {1, 2029,
  100}, {1, 2029, 20}, {1, 2029, 20}, {1, 2029, 20}, {1, 2029,
  20}, {1, 2029, 6}, {1, 2029, 6}, {1, 2029, 6}, {1, 2029, 6}, {1,
  2029, 39}, {1, 2029, 39}, {1, 2029, 39}, {1, 2029, 39}, {1, 2029}} *)

This only works with periods, I wish there were a more robust way of treating the strings literally without escape characters, or a way of replacing them automatically.  Like when you past some text into a string, it asks you if you want to escape the characters.
Anyway, this is a usable workaround for your problem.

A: The issue has been fixed in V13.0 and no workarounds are needed:
In[2]:= Import["EVE_L3_merged_1nm_2022095_007.ncdf","/MERGEDDATA.YYYYDOY"]

Out[2]= NumericArray[<1,4353>, Integer32]


text:
Q: Comodo SAN positve SSL, where is the key Im just setting up my emailserver and want it to be SSL secured with a valid certificate, so I got a Comodo positivessl cert. As I use multiple domains, I needed a SAN cert, which I got. What is in the package I received after the process is:
<my_san_cert>.crt
AddTrustExternalCARoot.crt
COMODORSAAddTrustCA.crt
COMODORSADomainValidationSecureServerCA.crt

So from what I understood, I have to bundle the last three files, which I did, to a bundled file. Now I need to put it in the main.cf config.
smtpd_tls_cert_file = /some/path/yourdomain.crt
smtpd_tls_key_file = /some/path/yourdomain.key
smtpd_tls_CAfile = /some/path/ca.txt (bundle file)

(source: https://www.positivessl.com/ssl-certificate-support/email-certificate/postfix.php )
What I do not get, where is my keyfile? Is it the private key used for the request of the certificate?
Thanks in advance!

A:
Is it the private key used for the request of the certificate?

Yes.
To expand on this and perhaps state the obvious, your private key needs to be truly kept private. Anyone who is able to get their hands on it would be able to impersonate your website.
Your signed cert and the cert chain, on the other hand, are fully public, and can be freely downloaded by anyone.


text:
Q: Is there a way to limit per_process memory on a shared vgpu with Spacy, Torch, etc? I'm looking to to find the gpu memory fraction limiting parameters for:
spacy, torch, and other common models.
I know for tensorflow models we can set per_process_gpu_memory_fraction but is there in an equivalent in pytorch or spacy?
Bonus points if there's a way to allocate memory on shared vgpu to multiple different kinds of models simultaneously?
i.e Spacy models consume .20, Tensorflow models consume .40, and pytorch models consume .30 so we can avoid out of memory errors while serving all of our models on the same cluster with shared vgpu resources.
For a little more context, we're using this virtualgpu plugin
https://github.com/awslabs/aws-virtual-gpu-device-plugin with kubeflow.


text:
Q: Running Oracle IMP as SYSDBA I need to import an ORACLE 9 DMP file into a newly installed Oracle 11g.  I'm using the imp utility and using SYSMAN as the login.  I get to the point to restore and am told 'only a DBA can import a file exported by another DBA'.  When I try and use SYSDBA blank password does not work.  When I use SQLPLUS / as SYSDBA and then try and assign a new password I'm told SYSDBA does not exist.  If I try and log in as SYS I'm told to login as SYSDBA.

A: Try following syntax to use imp as sysdba:
imp \'sys/sys as sysdba\' file=/oracle/implog.dmp log=imp.log full=y

A: I used the syntax below:
imp userid='sys/password@host as sysdba' log=C:\dmp.log file=C:\dmp.dmp fromuser=userfrom touser=userto buffer=30720


text:
Q: Javascript function in loop without click event I'm trying to make a slideshow, which I have working, but I can't get it to loop. I can't even get it to loop.
i want to loop this script without click event
currently i m using on click event to restart this script
 window.CP.exitedLoop(0);function rotateInfo() {
       var tl = new TimelineMax();

       tl.add("likely");
       tl.to($(".p1"), 0.3, {
         scale: 1.3,
         transformOrigin: "50% 100%",
         fill: $blue,
         ease: Bounce.easeOut },
       "likely").
       to($effect, 0.3, {
         y: -10,
         ease: Circ.easeOut },
       "likely").
       to($eLine, 0.3, {
         ease: Sine.easeOut },
       "likely").
       fromTo($(".d1"), 0.3, {
         opacity: 0,
         scale: 0.7 },
       {
         opacity: 1,
         scale: 1,
         ease: Back.easeOut },
       "likely").
       to($m1, 0.3, {
         fill: $green,
         ease: Circ.easeOut },
       "likely");

       tl.to($(".p1"), 0.3, {
         scale: 1,
         transformOrigin: "50% 100%",
         fill: $reg,
         ease: Back.easeIn },
       "likely+=1.25").
       to($effect, 0.3, {
         y: 0,
         ease: Circ.easeIn },
       "likely+=1.25").
       to($eLine, 0.3, {
         ease: Sine.easeIn },
       "likely+=1.25").
       to($(".d1"), 0.3, {
         opacity: 0,
         scale: 0.7 },
       "likely+=1.25").
       to($m1, 0.3, {
         fill: $mReg,
         ease: Circ.easeIn },
       "likely+=1.25");
       tl.to($circ, 1, {
         rotation: -41 },
       "likely+=1.25");

       tl.timeScale(0.7);

       return tl;

     }
     var master = new TimelineMax();
     master.add(rotateInfo(), "rotateInfo");

     $(document).on('click', 'a.replay', function (e) {
       master.restart();
       e.preventDefault();
     });

please help me to put this script in loop without click event. i want to remove click button or replay button

A: use interval to do that . here is an example to use interval :
    setInterval(function(){

          master.restart();

    },1000); // repeat every 1s


text:
Q: View Model can be heavy if we use single activity based architecture As google suggests single activity based application. I have a situation where I need clarification.
I have one activity containing 3 fragments and each fragment is linked to different fragments having other screens.

*

*should I use only one viewmodel for each tabs or should I use one view model having different screens.

*As I have only one activity and view Model resides till activity is destroyed. Do all viewModel that I will create for each screen will contain data until activity is destroyed. If this is the case will it make my app heavy.

A:

*

*should I use only one viewmodel for each tabs or should I use one view model having different screens.

You should use the smallest scope for each ViewModel possible. Generally, this means that data associated with only one fragment should use a ViewModel associated with just that one fragment.

*As I have only one activity and view Model resides till activity is destroyed. Do all viewModel that I will create for each screen will contain data until activity is destroyed. If this is the case will it make my app heavy.

ViewModels live only as long as the ViewModelStore they're attached to is around. Therefore if you have a ViewModel associated with a fragment, it'll survive only as long as that fragment exists. For example, if that fragment gets popped off the back or you call remove(), then the ViewModel is destroyed. ViewModels only live as long as your activity if you specifically create them using the activity as the ViewModelStoreOwner (for example, by using ViewModelProvider(activity)).

A:
should I use only one viewmodel for each tabs or should I use one view
model having different screens?

In single activity architecture, you can use ViewModel with either Activity Scope or with Fragment scope. As @ianhanniballake suggested in his answer, use ViewModel with Fragment which means that each tab in your case will have its own ViewModel attached to fragment. This will provide separation of concerns for functionality in each tab.

As I have only one activity and view Model resides till activity is
destroyed. Do all viewModel that I will create for each screen will
contain data until activity is destroyed. If this is the case will it
make my app heavy.

Again answer to this question is connected to your first question and explanation provided to it.
While working with single activity architecture narrow down scope as much as possible. Use ViewModel associated with activity (lets call it Global ViewModel) only to keep data which is used across multiple fragments. This way viewmodel will contain data till activity is in backstack and fragments can use it when required.
This will provide you 2 advantages

*

*ViewModel will not contain additional data which you mentioned in your 2nd question

*And most importantly there will not be any data discrepancies while accessing fragment multiple times. For e.g. if you open any fragment, fetch data from api and keep it in Global ViewModel and fail to delete it when remove fragment from backstack then your fragment will show old/obsolete data when you will open fragment next time. To avoid this scenario it is better to keep this data in viewmodel with fragment scope.

I hope this will be useful.

A: *

*Each Fragment usually should have a ViewModel itself but in some cases where you want to share the same ViewModel instance, you can achieve it with having a ViewModel scoped to an activity.

*ViewModel objects are scoped to the Lifecycle passed to the ViewModelProvider when getting the ViewModel it is found on the docs and you might have to read other details there but technically you can scope a ViewModel to a Fragment or to an Activity.


text:
Q: Have nginx set header on response according to environment var I use a simple Nginx docker container to serve some static files. I deploy this container to different environments (e.g. staging, production etc) using Kubernetes which sets an environment variable on the container (let's say FOO_COUNT).
What's the easiest way of getting Nginx to pass the value of FOO_COUNT as a header on every response without having to build a different container for each environment?

A: Out-of-the-box, nginx doesn't support environment variables inside most configuration blocks. But, you can use envsubst as explained in the official nginx Docker image.
Just create a configuration template that's available inside your nginx container named, e.g. /etc/nginx/conf.d/mysite.template.
It contains your nginx configuration, e.g.:
location / {
    add_header X-Foo-Header "${FOO_COUNT}";
}

Then override the Dockerfile command with
/bin/bash -c "envsubst < /etc/nginx/conf.d/mysite.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"

If you're using a docker-compose.yml file, use command.
Kubernetes provides a similar way to override the default command in the image.

A: This was made possible in nginx 1.19+. This functionality is now builtin.
All you need to do is add your default.conf.template file (it looks for *.template suffix) to /etc/nginx/templates and the startup script will run envsubst on it, and output to /etc/nginx/conf.d.
Read more at the docs, see an example here https://devopsian.net/notes/docker-nginx-template-env-vars/


text:
Q: how to make a editable form. Using vue form generator Here I have used vue form generator. where I have written components for real Estate form where I have all the input fields. So this is a normal form and i want to make this component and schema as update form like if user clicks on edit button and He is able to edit the form. SO i want make this components as editable form. SO if anyone have an idea please let me know.
vue form generator

    <vue-form-g :schema="schema_Real_Estate:" :model="model" :options="formOptions"></vue-form-g>

   <button class="prev_next_btn" @click.prevent="prev()">Previous</button>
   <button class="prev_next_btn"@click.prevent="next()">Next</button>

new Vue({
 el: '#q-vikreya',

    components: {
        "vue-form-g": VueFormGenerator.component
    },
data() {
            return {
            model: {
                Basement:'',
                Bedrooms:'',
                SQFT:'',
                Lotsize:'',
                TotalRooms:'',
                Stories:'',
                YearBuilt:'',
                HOA:'',
                Garages:'',
                Roof:'',
                Exterior:'',
                Cooling:'',
                Heating:'',
                Elementary_school:'',
                Middle_school:'',
                High_school:'',
            },
schema_Real_Estate: {
            fields: [{
                type: "input",
                inputType: "number",
                placeholder: "Bedrooms",
                model: "Bedrooms",
                styleClasses: ["half-width col-xs-12 col-sm-6", "job_title"]
            }, {
                type: "input",
                inputType: "number",
                placeholder: "Bathrooms",
                required: true,
                model: "Bathrooms",
                styleClasses: ["half-width col-xs-12 col-sm-6", "Experience"]
            }, {
                type: "input",
                inputType: "number",
                placeholder: "SQFT",
                required: true,
                min: 18,
                model: "SQFT",
                styleClasses: ["half-width col-xs-12 col-sm-6", "job_title"]
            }, {
                type: "input",
                inputType: "number",
                placeholder: "Lot size",
                required: true,
                min: 18,
                model: "Lotsize",
                styleClasses: ["half-width col-xs-12 col-sm-6", "Experience"]
            }, {
                type: "input",
                inputType: "number",
                placeholder: "Total rooms",
                required: true,
                min: 18,
                model: "TotalRooms",
                styleClasses: ["half-width col-xs-12 col-sm-6", "job_title"]
            }, {
                type: "input",
                inputType: "number",
                placeholder: "Stories",
                required: true,
                min: 18,
                model: "Stories",
                styleClasses: ["half-width col-xs-12 col-sm-6", "Experience"]
            }, {
               type: "input",
                inputType: "number",
                placeholder: "Year Built",
                required: true,
                min: 18,
                model: "YearBuilt",
                styleClasses: ["half-width col-xs-12 col-sm-6", "job_title"]
            }, {
                type: "input",
                inputType: "number",
                placeholder: "HOA",
                required: true,
                min: 18,
                model: "HOA",
                styleClasses: ["half-width col-xs-12 col-sm-6", "Experience"]
            }, {
                type: "input",
                inputType: "number",
                placeholder: "Garages",
                required: true,
                min: 18,
                model: "Garages",
                styleClasses: ["half-width col-xs-12 col-sm-6", "job_title"]
            }, {
               type: "input",
                inputType: "text",
                placeholder: "Basement",
                required: true,
                min: 18,
                model: "Basement",
                styleClasses: ["half-width col-xs-12 col-sm-6", "Experience"]
            }, {
                type: "input",
                inputType: "text",
                placeholder: "Roof",
                required: true,
                min: 18,
                model: "Roof",
                styleClasses: ["half-width col-xs-12 col-sm-6", "job_title"]
            }, {
                type: "input",
                inputType: "text",
                placeholder: "Exterior",
                required: true,
                min: 18,
                model: "Exterior",
                styleClasses: ["half-width col-xs-12 col-sm-6", "Experience"]
            }, {
                type: "input",
                inputType: "text",
                placeholder: "Cooling",
                required: true,
                min: 18,
                model: "Cooling",
                styleClasses: ["half-width col-xs-12 col-sm-6", "job_title"]
            }, {
                type: "input",
                inputType: "text",
                placeholder: "Heating",
                required: true,
                min: 18,
                model: "Heating",
                styleClasses: ["half-width col-xs-12 col-sm-6", "Experience"]
            }, {
                type: "input",
                inputType: "text",
                placeholder: "Elementary school",
                required: true,
                min: '',
                model: "Elementary_school",
                styleClasses: ["half-width col-xs-12 col-sm-4", "job_title"]
            }, {
                type: "input",
                inputType: "text",
                placeholder: "Middle school",
                required: true,
                min: '',
                model: "Middle_school",
                styleClasses: ["half-width col-xs-12 col-sm-4", "Experience"]
            }, {
                type: "input",
                inputType: "text",
                placeholder: "High school",
                required: true,
                min: '',
                model: "High_school",
                styleClasses: ["half-width col-xs-12 col-sm-4", "job_title"]
            }]
        },

methods: {
    prev(currentStep) {
      if(this.checkForm()) {
          if (currentStep === 4) {
             this.step = 3
          } else {
             this.step--;
          }
      }
    },
    onlyForCurrency ($event) {
     // console.log($event.keyCode); //keyCodes value
     let keyCode = ($event.keyCode ? $event.keyCode : $event.which);

     // only allow number and one dot
     if ((keyCode < 48 || keyCode > 57) && (keyCode !== 46 || this.price.indexOf('.') != -1)) { // 46 is dot
      $event.preventDefault();
     }

     // restrict to 2 decimal places
     if(this.price!=null && this.price.indexOf(".")>-1 && (this.price.split('.')[1].length > 1)){
     $event.preventDefault();
     }
   },
    next(currentStep) {
      if(this.checkForm()) {
        if (currentStep === 4) {
          this.step = 5
        } else {
          this.step++;
        }
      },

    checkForm: function (e) {
      if (this.category && this.title && this.address && this.city && this.state && this.price && this.description) {
        return true;
      }

      this.errors = [];

      if (!this.category) {
        this.errors.push('Name required.');
      }
      if (!this.title) {
        this.errors.push('Age required.');
      }
      if (!this.address) {
        this.errors.push('Age required.');
      }
      if (!this.city) {
        this.errors.push('Age required.');
      }
      if (!this.state) {
        this.errors.push('Age required.');
      }
      if (!this.price) {
        this.errors.push('Age required.');
      }
      if (!this.description) {
        this.errors.push('Age required.');
      }
      if (!this.description) {
        this.errors.push('Age required.');
      }
      if (!this.model) {
        this.errors.push('Age required.');
      }
      e.preventDefault();
    },

      submitForm: function(){
            axios({
                method : "POST",
                url: "{% url 'PostAd' %}", //django path name
                headers: {'X-CSRFTOKEN': '{{ csrf_token }}', 'Content-Type': 'application/json'},
                data : {"category":this.category, "title":this.title,
                "address":this.address,
                "city": this.city,
                "state": this.state,
                "zip": this.zip,
                "price": this.price,
                "description": this.description,
                "radio_price": this.radio_price,
                "Job_title": this.model,
                },//data
              }).then(response => {
              localStorage.clear();
              console.log("response");
              console.log(response.data);
                  this.success_msg = response.data['msg'];
                 window.location.replace('{% url "classifieds" %}')  // Replace home by the name of your home view

              }).catch(err => {
                     this.err_msg = err.response.data['err'];
              console.log("response1");
              console.log(err.response.data);

              });

          },

  },

})


text:
Q: input current vs output current My old/new laptop adapter specs as given below. I understand the output current for new is 4.5A which is OK  when compared to old which provides 3.25A load since it can provide more load.
However, just cant seem to find any idea about input Ampere i.e 1.2A max vs 1.5A(1.5A) I am left with below questions.

*

*Does max in 1.2Amax mean anything.

*does the bracket (1,5A) mean anything.

*is the new adpater usable inplace of the old
NEW -
90W 20V
AC INPUT 100-240VAC 1.2A max
DC OUPUT 20V / 4.5A

OLD -
65W 20V
AC INPUT 100-240VAC 1.5A(1,5A)
DC OUPUT 20V / 3.25A(3,25A)

I think one of the questions regarding brackets probably might just be dot vs comma notation
3.25A(3,25A)

A: It probably means the new device is power factor corrected - it says it will not take more than 1.2 A and this compares favourably with the previous device that says it can take up to 1.5 A.
The previous device might not have PF correction circuits although this is a little speculative to say so.