IIS Log files are not getting generated for the “SharePoint Web Services” webapplication in SharePoint – 2010?

IIS Log files are not getting generated for the “SharePoint Web Services” webapplication in SharePoint – 2010, even though Logging is enabled at the IIS level.

Is that an expected behavior? or this there nothing can be done to trace IIS logs for the “SharePoint Web Services” webapplication?

How to generated random waves

I want to generate a set of $ N$ random waves, where the wave vector and phase are random numbers, this is my code

 `Nwaves = 3;    theta := 2*Pi*RandomReal[];   phi := ArcCos@RandomReal[{-1, 1}] ; alpha :=  RandomReal[{0, 1}]; u = Sum[ Sin[ Cos[theta] Sin[phi]  x +  Sin[theta] Sin[phi]  y  +        Cos[theta] z + alpha], {Nwaves}] v = Sum[-Cos[ Cos[theta] Sin[phi]  x +  Sin[theta] Sin[phi]  y  +        Cos[theta] z + alpha], {Nwaves}]`  

This code changes the parameters for each N. And the problem needs to have the same values for cosine, sine, and alpha. And after each iteration they have to change as N varies.

`google-drive` pattern of generated Google Drive folder ID

$   gdrive list  Id                                  Name                                       Type   Size      Created 1tqeNnGiZqy4EMj8p6d_LG7Js0aD9ao37   9b69f5168c0aa4bbe9cd5f1546169cf3           dir              2019-09-16 14:16:18 1ule-XdDb1JrvAEwqwN80JLs7LGuLGUxC   subFile                                    bin    5.0 B     2019-09-16 14:16:25 1ndFenMDcQbJFpQb3ScpaumdlITzf6Tc3   subFile~                                   bin              2019-09-16 14:16:24 1iTo4NUBe01tWODnFwT9SOQuVARd9nV85   example                                    dir              2019-09-16 14:16:23 1FDxjPDWLnP89miUTVjJ_0WMwdDDy_o5_   README.md                                  bin    96.0 B    2019-09-16 14:16:22 146N7bhF2Ev5kvJwprpedSu9EWkYPz1ic   run.sh                                     bin    197.0 B   2019-09-16 14:16:21 

Id of each file is generated as 33 characters and contains non-alphabetic characters.

=> Is it possible to compress it into 32 characters using base decoding.

I realize that all Id of listed each file starts with 1. So could I assume this pattern on the creation of the Id, where all of them starts with 1 and could I discard the 1 at the beginning.

For social media posts, is it better to post the Constant Contact generated URL or your website URL?

In social media posts, is it better to post the link to your website that advertises a specific event, or the URL to your Constant Contact (or other mass mail program) e-blast that advertises said event?

The details: our company often sends e-blasts out via Constant Contact to advertise training conferences that we produce, with the ultimate goal of increasing registration/attendance. These e-blasts are well-designed and often contain multiple elements pertaining to the conference: a…

For social media posts, is it better to post the Constant Contact generated URL or your website URL?

Running code generated in realtime in JavaScript with eval()

Consider a front-end JavaScript application where menu items needed to be shown or hidden based on somewhat simple logic (roles that user has and some other logical state).

A simple language was introduced to define this logic in a concise human-readable way and every menu item was assigned a string condition, which looks like this: "isLoggedIn() AND NOT role(PARTNER)".

In order to actually check this condition, a simple compiler was implemented, which translates this language into a valid JavaScript code string and executes it using eval() returning the boolean result in the end.

The compiler works by replacing some constructs, like AND, OR and NOT with valid JavaScript equivalents like &&, || and ! using simple regular expressions:

private compileExpression(expression: string) {    // Adding commas around function arguments (to make them strings)   expression = expression.replace(/(\w+)\((.*?)\)/g, `$  1('$  2')`);    // Replacing "AND"   expression = expression.replace(/\sAND\s/g, ' && ');    // Replacing "OR"   expression = expression.replace(/\sOR\s/g, ' || ');    // Replacing "NOT"   expression = expression.replace(/(\s|^)NOT\s/g, ' !');    // Prefixing predicates   expression = expression.replace(/(\w+)\((.*?)\)/g, 'Π.$  1($  2)');    return expression;  } 

This turns "isLoggedIn() AND NOT role(PARTNER)" into "Π.isLoggedIn() && !Π.role('PARTNER)", which is then executed by eval():

public matchCondition = (condition: string): boolean => {    // Using greek letter "P" for predicate (for shortness and uniqueness)   // noinspection NonAsciiCharacters   const Π = this.predicates;    const expression = this.compileExpression(condition);    const result = eval(expression);    return result;  } 

The Π is an object with simple predicate functions, which return boolean values like isLoggedIn(): boolean and role(roleName: string): boolean.

The expressions, that are being translated and executed are stored statically in local object as strings and are not accessible from global context. Also, all expressions are written by the developers and are not coming from users of the application in any way.

Is it safe to use eval() this way or should it be avoided at all costs (e.g. “eval is evil”, “never use eval”, etc)?

What are the possible attack vectors, that could be used to compromise such eval usage?

If expression strings will be loaded from the HTTPS server using XHR/Fetch, will it change the situation security-wise?

How to handle mapping of generated classes with identical fields?

We have a large number of classes that is generated by JAXB. There are a couple that have identical fields and I want to see if there is a clean way to map class A to class B.


public static class ParentA  implements ... {     public static class A implements ... {       protected String name;    } } 
public static class ParentB  implements ... {     public static class B implements ... {       protected String name;    } } 

I want to take an incoming A and map it to B but there are many other classes that I want to map A to. How can I handle this? I see that there is a copyTo method, but it only copies A to another A.

Will Magento generated MicroData interfere with JSON-ld structured data in Magento 1.9?

I see that Magento 1.9 generates MicroData for it products.

Before I realized this I started using JSON-LD to build out some of those same objects.

My questions are one;

  • Will Google penalize me for using both MicroData and JSON-ld?
  • Will the search engine become confused between witch to use?
  • Is there a way to turn off MircoData in Magento 1.9?

Thank you so much for your time, professional advice and expertise.

Get the exact SQL query that get_posts() generated

I am working on a wordpress that someone else started and then disappeared. She created a few of custom content types and variables using different plugins and I now want to access the data sets in the functions she created for her template.

$  args = array(                 'suppress_filters' => 0,                 'posts_per_page' => -1,                 'sort_order' => 'ASC',                 'sort_column' => 'post_title',                 'post_type' => 'inst',                 'post_status' => 'publish' ); $  content = get_posts($  args); 

I have been looking around and different findings suggested using the following variable to get the SQL used:

echo $  GLOBALS['wp_query']->request; 

However what this returns is not the query that shows the post data appearing on the page. When I run that in MySQL directly, it returns exactly 1 result and I think it’s the whole page? Because I defined two datasets and there are two fields appearing on the page but only 1 row in the query that’s echoed by above line.

I need to know the exact attributes of the WP_Query object in $ content but var_dump($ content) also doesn’t contain the fields I defined. I need to get the image that’s in the content type set, but I can only get the name of the set accessing $ content->post_title.

Is there a way to dig into what get_posts() gets from the database and how I can access the attributes I need?

In AWS EKS, how should Kubernetes certificates be generated?

This article from 2018 states (emphasis mine):

It is common practices for Kubernetes clusters to self-signed their digital certificates. I often get from Security Practictioners the hairy eyeball when this fact is discussed. Why not use “real” certificates, that are signed by trusted CAs. Well, some people do that, but for the rest of us, you are simply not gaining any signficant security benefits, and you are creating more work for yourself. You see, Kubernetes clusters use many digital certificates in all aspects of managaging a cluster. For example, each node has its own digital certificate to verify its authenticity.'[1]

Is it still the correct approach to just allow EKS managed Kubernetes to create and deploy its own certificates?

[1] https://www.nickaws.net/aws/2018/08/16/Verifying-digital-certificates.html