Questions tagged [policy]

Best practice and style are at the core of every program; there is always a better way to do something. Policy helps programmers determine how something should be written.

Policy is a more or less ambiguous way of describing the best way to do something in programming. This can often be described as "best practice" when writing a program. This can pertain to the way a method returns a value, the way inheritance is structured, and the way to exit a loop, among other things, and it can vary from language to language.

Many companies often have their own sets of internal documentation referred to as Coding Standards that enforce policies which they determine to be valuable for maintenance and readability purposes of their code base.

You can learn more about policy and programming paradigm here.

1311 questions
6
votes
4 answers

Policy inheritance and inaccessible protected members

It seems that a protected member from a template policy class is inaccessible, even with a class hierarchy which seems correct. For instance, with the following code snippet : #include using namespace std; template class A { …
benlaug
  • 2,691
  • 2
  • 17
  • 15
6
votes
2 answers

Amazon S3 Bucket Policy Referer

I'm trying to edit my S3 bucket configuration such that 3rd party sites can not link to content in it. Also an added benefit is that they can only access content from my domain rather than the supplementary s3bucket.amazon-east.amazonaws.com or…
npho
  • 111
  • 2
  • 5
6
votes
3 answers

Google play repetitive content

In Google play TOS and Content Policy there is a line that states Do not post repetitive content. If I have 2 identical apps(same code, same UI) but with 2 different names, am I in violation of Google Play Content Policy? Will one of the apps be…
user1965172
  • 63
  • 1
  • 3
5
votes
3 answers

Can i deny access to a jvm class by configuring java.policy file?

I wanted to add to my jdk6\jre\lib\security\java.policy file an interdiction to create some classes that are blacklisted by appengine. For example I want my local jvm to throw an exception when the application tries to instantiate…
raisercostin
  • 8,777
  • 5
  • 67
  • 76
5
votes
2 answers

Is there a TFS policy to allow only merges and not edits?

We have a baseline folder and development branches in TFS. We'd like to add a policy where changes can only be merged into the baseline from a development branch and not edited directly unless you override the policy. How can we do this?
adam0101
  • 29,096
  • 21
  • 96
  • 174
5
votes
4 answers

Whitelist or blacklist file extensions for uploads?

I'm making a newsletter editor which will allow file uploads (the sender of the newsletter can upload files to the server which will be linked to in the email). The site is set up so that only .do URIs are actually executed/handled by servlets so…
user684934
5
votes
2 answers

Policy report to view summary of all resources an account has access on GCloud

In GCloud, I would like to see what resources a service account can access but the console shows me the message The Selected project does not have any ancestors to run a policy report over. Anyone knows what does this mean and how to fix it?
Sam Kah Chiin
  • 4,375
  • 5
  • 25
  • 30
5
votes
1 answer

What is the difference between the `policy` and `collect_policy` of a tf-agent?

I am looking at tf-agents to learn about reinforcement learning. I am following this tutorial. There is a different policy used, called collect_policy for training than for evaluation (policy). The tutorial states there is a difference, but in IMO…
5
votes
1 answer

How to delete files from blob container that are older than 30 days?

I am looking for a way to delete stored files in a blob container called reports that are older than 30 days or set any other retention policy that would make sense As far as I see Microsoft only writes about retention policies for Logs and…
Yoda
  • 17,363
  • 67
  • 204
  • 344
5
votes
0 answers

Application. Received Google message received: Violation of Usage of Android Advertising

I have thé application on google play over 2 years this morning i received à mail from Google that tell me that application is deleted I only use Google admob sdk i have no autorization on manifest file here is the mail i received from Google Hi…
tamtoum1987
  • 1,957
  • 3
  • 27
  • 56
5
votes
2 answers

Is it a possible to call a lambda in different account from the cloudformation one?

I have a lambda on one account with this policy attached: { "Sid": "Id-123", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::115333656057:root"}, "Action": "lambda:InvokeFunction", "Resource":…
Massimo Ugues
  • 4,373
  • 8
  • 43
  • 56
5
votes
0 answers

Importing SAP WSDL with VS17 - Custom tool warning: The following Policy Assertions were not imported/was not handled

I am currently trying to import WSDL files that have been delivered to me by a SAP System. I import the files using the Visual Studio 2017 and add them as a service reference. After importing I get the following warnings: Custom tool warning: The…
user4571368
5
votes
1 answer

How to restrict the outbound traffic of user's pods in Kubernetes?

Now we're using Kubernetes to implement the PaaS service and users can ssh into the containers. Because container runs inside the network of Kubernetes, users can access the services like kube-apiserver. We want to restrict the outbound of the…
tobe
  • 1,671
  • 2
  • 23
  • 38
5
votes
1 answer

Use of AWS null condition to prevent empty or missing tags?

The goal of my policy document: Prevent resource creation if it does not have proper tags Require that certain values be given to specific tags (e.g. env tag must either be dev OR stg OR prd, etc) No. 2 works as expected; however, if the user…
Thleats
  • 111
  • 2
  • 7
5
votes
2 answers

How do I extract an ip address in the azure api management policy?

Is there an out of the box policy to extract the incoming ip address? I could not find one. Do I need to write code to do that? If so, how do I go about it? What are the other alternatives?
Raghu
  • 2,859
  • 4
  • 33
  • 65