Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
You not only have to keep the parser alive but also the token stream, because the parse tree uses token references.I recommend to create a wrapper class holding all the parser related objects and keep that alive. This way all the references stay valid. You can always re-use the object for new parse runs.ForMySQL Workbe... | I have a function like this to get the the AST from a file.antlr4::tree::ParseTree *get_ast(std::string &filename) {
std::ifstream stream;
stream.open(filename);
antlr4::ANTLRInputStream input(stream);
Lexer lexer(&input);
antlr4::CommonTokenStream tokens(&lexer);
Parser parser(&tokens);
ant... | Antlr4 allocate ParseTree on heap |
You could do this as eithercron(0 1,7,13,19 * * ? *) or cron(0 1/6 * * ? *)The first option simply specifies the hours to run at, the second says to run every 6 hours with an offset of 1 hour.For more information about cron expressions with CloudWatch events read the docshere | I want a to write an AWS cloudwatch event rule that fires at 1:00, 7:00, 13:00 and 19:00 hrs every day, this can be a cron or rate expression.I also have a similar requirement for another event rule that fires every day at 2:00, 8:00, 14:00, 20:00 hrs# will be writing the expressions in terraform scripts like this
res... | How do I write a cron or rate expression as a CloudWatch event rule that runs at specific hours in a day? |
I solved my problem. If anyone face the same problem in the future, here is the answer.
My mistake was to call the server with http/https, while in the same (Docker) Network. So I changed:
final Uri tokenUri = Uri.https(urlList[index]['url']!, '');
to
final Uri tokenUri = Uri.parse('${urlList[index]['url']!}/');
One... |
I have a Linux Server. On that I have two Docker Containers.In the first one I am deploying my Flutter Web and in the other one I am running my RestAPI with FastAPI().
I set both the Docker containers in the same Network, so the communication should work. I also set origins with origins = ['*'] (Wildcard). I reverse p... | Can't reach RestAPI (FastAPI) from my Flutter web - Cross-Origin Request Blocked |
From the GUIclick on theTools > SettingsmenuSelectGit ConfigTick theLocal for current repositoryradio buttonFill in your name and emailClickApplyUsing the command line$ cd /path/to/your/local/project
$ git config user.name "Your name here"
$ git config user.email[email protected]This will store the identity to be used ... | I have 2 projects and on each project I want different profiles to commit. But I would not like to change the git config every time I need to switch. How to do that? | How to set a default user per repo in Git Extensions? |
You can access the status for a particular refGET https://api.github.com/repos/:owner/:repo/commits/:ref/statusesFor the value of:ref, you can use a SHA, a branch name, or a tag name. | TheGitHub APIprovides a lot of functionality, but is there a way to retrieve the build status for a commit? The GitHub UI provides information from the CI system we have configured, but I can't see this information exposed through the API? | get build status through github api |
You can use BackgroundScheduler() from APScheduler package (v3.5.3):
import time
import atexit
from apscheduler.schedulers.background import BackgroundScheduler
def print_date_time():
print(time.strftime("%A, %d. %B %Y %I:%M:%S %p"))
scheduler = BackgroundScheduler()
scheduler.add_job(func=print_date_time, tr... |
I have a Flask web hosting with no access to cron command.
How can I execute some Python function every hour?
| How to schedule a function to run every hour on Flask? |
You can put the following code inside your.htaccessfileRewriteEngine On
# ensure www.
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# ensure https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_UR... | How can I redirect HTTP to https include WWW using.htaccess?Example :redirecthttp://example.comtohttps://www.example.comredirecthttp://www.example.comtohttps://www.example.comredirecthttps://example.comtohttps://www.example.comI'm tryingRewriteEngine On
RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"' [OR]
RewriteCond... | Redirect http to https with www using .htaccess |
So, I figured it out ! After searching and tweaking the configuration, we were around 300 Inserts per Seconds, we disabled the innodb_flush_log_at_trx_commit (1 -> 0) and the sync_binlog (1 -> 0), and we went up to 1500-2000 Inserts per Second !!
Since we are ok losing the last transaction / commit if the db crash so ... |
I have a question regarding the insert of rows in RDS.
I am inserting in that example 301119 records in 1 table.
Here my log on those inserts batch :
Amazon :
2014-09-05 12:12:47,245 - Processing 30119 users
2014-09-05 12:15:01,508 - 5000 users updated in transaction
2014-09-05 12:17:29,672 - 10000 users updated i... | AWS RDS Slow Insert |
Try adding theNEflag:RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [L,NE] | I have the following .htaccess entry:RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [L]When linking tohttp://...../?f=83|71|42(which is URL-encoded by the browser tohttp://...../?f=83%7C71%7C42), it redirects tohttps://...../?f=83%257C71%257C42, encoding the%of%7Cto%25, thus leading to... | .htaccess encoding already encoded URL |
According to method definition@SuppressWarnings("unchecked")
@Nullable
public <T> T get(Object key, Class<T> type) {
Object value = this.headers.get(key);
if (value == null) {
return null;
}
if (!type.isAssignableFrom(value.getClass())) {
throw new IllegalArgumentException("Incorrect typ... | Sonar reports an Error onorg.springframework.messaging.MessageHeaders.get(). The following code:1. MessageHeaders foo = new MessageHeaders(Collections.emptyMap());
2. String bar = foo.get("foobar", String.class);
3. if (bar != null) {
4. return bar
5. }
6. ...Sonar tells about line 3: "Remove this expression which ... | Sonar about org.springframework.messaging.MessageHeaders.get() |
All you should need to do is add .svn to your .gitignore file, without the extra slashes and stars. Or better, add it to .git/info/exclude which serves the same purpose for your own use and doesn't get committed to your repository.
|
I'm using SVN and Git to version-control the same folder, and am committing to 2 separate repositories; one hosted on Google Code and the other on GitHub, respectively.
SVN creates .svn directories in every directory that it tracks. When I add my files and folders to Git, I use globbing and simply glob the folder that... | Using SVN and Git side-by-side |
From what I've found about it, SQL Server 2008's "auditing" feature is very lacking. It does not act as a traditional data audit trail, where you store a new row every time something changes (via Triggers), with complete information such as the user who made the change. It more or less just tells you something has chan... | I'm using SQL 2008 and have DELETE, UPDATE & INSERT auditing enabled on table XYZ. It works great other than when I query the data:SELECT * FROM fn_get_audit_file('H:\SQLAudits\*', default, default)It doesn't actually show me what was deleted or inserted or updated, only that a deletion, etc ... occurred. The statement... | SQL 2008 audit - show data deleted, etc |
The out of memory error may be caused by any number of reasons, based on how Windows virtual memory and how the .NET runtime works.
Do you really need to dump everything into the StringBuilder all at once? If you're writing to a file, you can do the operation in pieces at a time.
Use something like this as a start... |
I need to append lots of string in a loop and this will create a very long string.
1GB should be long enough to store the string, therefore I do this:
var sb = new StringBuilder(1024 * 1024 * 1024);
but receives this error
'System.OutOfMemoryException' was thrown
any advice to append long strings?
I'm writing a bac... | sb = new StringBuilder(1024*1024*1024) > 'System.OutOfMemoryException' was thrown |
Yo can use SonarCube with a plugin for Typescript and integrate SonarCube with Jenkins. This plugins works fine with Angular 2/4:SonarTsPlugin | Is there any tool to integrate with Jenkins?
I have the testing and coverage but I could't find any related with analysis code for Angular 2/4.Thanks | How to have code quality analysis for Angular in Jenkins? |
I believe it means your work isn't using the GPU. GPU and TPU runtimes are valued more than the "None" runtime. Colab only allows for two GPU runtime sessions at a time. None allows for approximatley five.
Also they only allow for twelve hours total use, and each session will be cumulative.
If you don't need or don't ... |
This warning has been going on for three weeks now. I would like to know this solution. this warning comes out.
| Anyone experienced the warning about Google colaboratory:You are connected to a GPU runtime, but not utilizing the GPU |
Actually you don't need to copy your private key to your container (and you better not do it).
All you need is the ssh-agent installed and launched on both: your host and your docker container then all you need to do is to mount the ssh-aget's socket file:
If you are using docker-compose:
environment:
- "SSH_AUTH_SO... |
I want to pull code from Github into my Docker image while building. I have a deploy key generated from the repository, but it seems to me the ssh-agent is not working on my Docker image.
What I did (my Dockerfile):
FROM python:2.7-stretch
ADD ./id_rsa /root/.ssh/id_rsa
RUN eval "$(ssh-agent -s)"
RUN ssh-add -K /root... | How to deploy code from Github using deploy key in Docker? |
Ok finally after lot of struggle I find the solution.So when ever K8s starts a pod it starts a sidecart container whose role is basically to provide network to pod containers.So while running docker build if I pass it's container ID as network then my intermediate contexts start getting internet connectivity via this c... | I have a kubernetes cluster that is running on AWS EC2 instances and weave as networking(cni). I have disabled the docker networking(ipmask and iptables) as it is managed by weave(to avoid network conflicts).I have deployed my Jenkins on this cluster as K8s pod and this jenkins uses jenkins kubernetes plugin to spawn d... | No internet connectivity inside docker container running inside kubernetes with weave as networking |
You can usedocker inspectto do this, I created a container with --name=test111, it appears as /test111, so if I dodocker inspect -f '{{if ne "test111" .Name }}{{.Name}} {{ end }}' $(docker ps -q)
/test111
/sezs
/jolly_galileo
/distracted_mestorf
/cranky_nobel
/goofy_turing
/modest_brown
/serene_wright
/fervent_... | I can find a docker container by name:docker ps --filter='name=mvn_repo'. Is there a way (without resorting to bash/awk/grep etc.) to negate this filter and list all containers except the one with the given name? | How to search for containers that don't match the result of "docker ps --filter"? |
There isn't a way to set up quota for all namespaces by default. Please file a feature request and describe your use case.ShareFollowansweredMar 1, 2016 at 21:57briangrantbriangrant83566 silver badges1313 bronze badgesAdd a comment| | I know Kubernetes manage resource quota on namespace level bykubectl create quota --namespace=xxx. But it needs manual work each time there is a new namespaces created.My question is, is there a way to set up a cluster level default resource quota which can apply to all namespaces automatically? | How to enable Kubernetes default resource quota for all namespaces? |
Silences exist entirely in the Alertmanager, Prometheus doesn't know anything about them. Thus there's no metric that'll let you know that the alert is silenced inside Prometheus.ShareFollowansweredAug 31, 2017 at 8:18brian-brazilbrian-brazil32.8k66 gold badges9797 silver badges8888 bronze badges4Thanks (both for the r... | I have successfully silenced an alert for a node that's currently down (and will be for a while before we have time to replace it physically).While I assume the silence will stop the alert from re-surfacing in the slack-channel I'd also like to get rid of it on the grafana dashboard we run over the top of prometheus. H... | PromQL: query whether an alert is silenced |
0
My advice would be to use XMLREADER for large (anything above 10mb) XML files.
XML Reader is a so called pull parser. Advantage of that is that you can start parsing without loading the entire fill into the memory (like SimpleXML or DOMDocument does).
Once you get to th... |
I'm stuck with a strange issue. Below my code:
$response = $client->__soapCall('ProcessXmlString', [['xmlRequest' => $xml]]);
XML is something like this:
<columns code="..">
<column id="..">
<field>...</field>
<label>test</label>
<visible>true</visible>
<ask>false</ask>
<op... | SOAP client produces memory error by large response |
Definitely node-inspector,I had to do the same for an app in microservices and clusters/workers
just in case you need it:clustered apps with node-inspectorShareFollowansweredJan 12, 2017 at 18:58jesusbv - user3085938jesusbv - user308593817411 silver badge44 bronze badges21node-inspector doesn't work with the most recen... | I have a NodeJs app running on a docker container on a remote server. I can access the app on the browser. I'm also able to deploy to my app using PhpStorm and its remote server connection.However, I tried to use the remote NodeJs debug tool of PhpStorm and it doesn't work. I always get connection refused.I know the de... | What's the best way to debug a NodeJs app running on a docker container in a remote host? |
You can only delete individual pipelines one by one in the UI.To do bulk deletions, you can use thepipelines APIto programmatically list and delete pipelines.In Python (with thepython-gitlablibrary) it might look something like this:import gitlab
project_id = 1234
gl = gitlab.Gitlab('https://gitlab.example.com', privat... | Is there an easy way to remove all the previous pipelines runned in Gitlab?I would like to clean up this section, but didn't find any options through the interface.Thanks a lot. | Clean up history in Gitlab Pipeline |
Virtual Node Pool requires the usage of the Advance Networking configuration of AKS which brings in AZURE CNI network plugin.The Default POD count per node on AKS when using AZURE CNI is 30 pods.https://learn.microsoft.com/en-us/azure/aks/configure-azure-cni#maximum-pods-per-nodeThis is the main reason why you are now ... | I wanted to install Kubeflow into the Azure, So I started off creating an Azure Kubernetes Cluster(AKS) with asingle node(B4MS virtual machine). During the installation, I didn't enable thevirtual node pooloption. After creating the AKS cluster, I ran the command "$ kubectl describe node aks-agentpool-3376354-00000" to... | AKS Cluster with virtual node enabled and without virtual node enabled |
Billing details per IAM entities or which IAM user has spent how much is NOT possible. Also, resources are owned by the account itself (not the user who creates it) and IAM users/roles/groups are not for billing purpose.
If you wish to analyze costs of different persons, then you can consider creating (or inviting) m... |
I have an AWS account with n number of IAM users. Each user will have access only to a specific list of services based on their role. Now I need to analyze the billing by each IAM user. This will provide the detailed view of each user for further cost optimization and other analysis.
But the AWS billing dashboard show... | How to generate cost explorer by IAM user in AWS? |
PHP Settings
Your PHP Settings are absolute correct are there is no error is the settings.
Uploading Error Not PHP
As per you picture posted the Error Code i.e. 7 which means
UPLOAD_ERR_CANT_WRITE - 7; Failed to write file to disk. Introduced in PHP 5.1.0
It means you uploading code is correct but at the time of writi... |
I have deployed an application in Elastic Beanstalk, changed some configuration so that I can upload larger files and restart nginx server.
When I upload one file less than 2 GB, it is uploaded successfully. However, when I upload a file more than 2 GB, it does not upload successfully. Below are the lines that I have ... | PHP AWS Elastic Beanstalk - Cannot post file more than 2GB |
I believe you would be better off making that gauge metric a histogram and usinghistogram_quantile()insteadSeePrometheus histogramsand step 3 of thistutorialfor more info. | I'm new to promethues. Is there a way to query timeseries based on label value i.e if it is greater or lesser than a label value ?eg: assume a gauge metric is {mountpoint='/test',usage='90%'} with value 1how to write promql query to get results with label 'usage' > 80% irrespective of gauge value? | prometheus-promql query based on label value |
It may very well be that port forwarding from appspot.com isn't performed, given that prior to the (relatively recent) release of managed VMs, the only traffic that went to appspot.com was on port 80 or 443. I'd suggest using the IP-of-instance method you found to work.
If you don't find that fully satisfying, you sh... |
I'm using the Managed VM functionality to run a WebSocket server that I'd like to expose to the Internet on any port (preferably port 80) through a URL like: mvm.mydomain.com
I'm not having much success yet.
Here are the relevant parts of various files I'm using to accomplish this:
Dockerfile:
EXPOSE 8080 8081
At the... | Exposing multiple ports from within a ManagedVM |
12
I don't see com.amazonaws.auth.profile.ProfileCredentialsProvider in the documentation. There is, however, org.apache.hadoop.fs.s3a.TemporaryAWSCredentialsProvider which allows you to use the key and secret along with fs.s3a.session.token which is where the token shoul... |
Assume I'm doing this:
import os os.environ['PYSPARK_SUBMIT_ARGS'] = '--packages "org.apache.hadoop:hadoop-aws:2.7.3" pyspark-shell' from pyspark import SparkConf from pyspark import SparkContext
from pyspark import SparkConf
from pyspark import SparkContext
conf = SparkConf() \
.setMaster("local[2]") \
... | How do I use an AWS SessionToken to read from S3 in pyspark? |
1
I am writing this answer if someone else faced this issue and had made a very amateur mistake like mine.
I faced this issue because I had <packaging>war</packaging> in my pom.xml and was trying to add a jar file in my docker context with a line like this (ADD ${JAR_FILE} ... |
I got the following issue while trying to create a docker image from openjdk base image.
ADD ${JAR_FILE} websocket-demo.jar
ADD failed: stat /var/lib/docker/tmp/docker-builder673702145/target/websocket-demo-0.0.1-SNAPSHOT.jar: no such file or directory
Actually I was following this tutorial and got this issue while ... | ADD failed: stat /var/lib/docker/tmp/docker-builder673702145/target/xxx.jar: no such file or directory |
docker run --rm -i -v=postgres-data:/tmp/myvolume busybox find /tmp/myvolumeExplanation: Create a minimal container with tools to see the volume's files (busybox), mount the named volume on a container's directory (v=postgres-data:/tmp/myvolume), list the volume's files (find /tmp/myvolume). Remove the container when t... | Docker 1.9 added named volumes, so I..docker volume create --name postgres-data
docker volume lsand I getlocal postgres-dataall good so far..so how do I see what is in the named volume? Is there a way to cd to it on the host system. Like I can for a mounted host directory? | How to list the content of a named volume in docker 1.9+? |
Yes, that's the only way according to the documentationhttps://docs.aws.amazon.com/cdk/latest/guide/cfn_layer.htmlHowever, this doesn't mean you can only create the construct using CfnXXX, you could do this with CDK constructscfn_policy = self.policy.node.default_child
cfn_policy.cfn_options.metadata = {
"cfn_n... | I'm need to add some Metadata into Cloudformation for a IAM Policy. How can I do this with CDK ?I'm using the CDK to synth a cloudformation and I need to include a metadata to suppress cfn-nag (https://github.com/stelligent/cfn_nag) warnings.I did the policy generation with the following statement:const cfnCustomPolicy... | How to add Metadata to IAM Policy using AWS CDK? |
You can gain insight into your delayed_job queue through the Delayed::Job model (I think the name of it might have changed in later versions). It's just an ActiveRecord model and you can do all the things you'd do to a normal one. Find all, find ones withfailed_atset, find ones withlocked_byset (currently being worked)... | I have been running delayed_job and was hitting some errors, but now I don't know what is sitting in the job queue or what's going on with them....How can I figure that out so I can debug whether it is able to execute what has been put in the queue?Here is where I call the job (it is part of a cron task) and the mailer... | How do I see what's going on with queued jobs using delayed_job? |
Technically, he is right - static int fields do cost some additional memory.
However, the cost is negligible. It's an int, plus the associated metadata for the reflection support. The benefits of using meaningfull names that make your code more readable, and ensure that the semantic of that number is well known and co... |
In my Android project, there are many constances to represent bundle extra keys, Handler's message arguments, dialog ids ant etc.
Someone in my team uses some normal number to do this, like:
handler.sendMessage(handler.obtainMessage(MESSAGE_OK, 1, 0));
handler.sendMessage(handler.obtainMessage(MESSAGE_OK, 2, 0));
han... | Someone told me that it is saving memory to use numbers directly instead of static final int fields, is that true? |
Use echo to store your command in the crontab file from the command line
$ echo "1 4 * * * /bin/sh /share/CACHEDEV1_DATA/your-backup-folder/backup.sh" >> /etc/config/crontab
This command will run backup.sh 4 minutes past 1 AM.
To make the crontab persistent during reboot, you have to execute this command
$ crontab ... |
i have a problem, executing my script by crontab on a qnap nas.
it is very confusing, because other test scripts work AND executing this script manually works, too.
here is the script:
#!/bin/sh
[[ ! -d /mnt/backup-cr/daily.0 ]] && mount -t nfs -o nolock 192.168.178.2:/volume1/backup-cr /mnt/backup-cr
#1
[[ -d /mnt/... | QNAP 4.1.0 & Using own backup script with crontab |
Seems like query string is added right after#order_nowby default.Here's a solution (by capturing query string and add it manually)RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^([^/\.]+)?$ /index.php?%1#$1 [R,NE,L] | Using mod-rewrite in a .htaccess how do you add a hash to a url while keeping the query string in front of it? Everything i have tried appends the query string to the end, which then makes it part of the hash.This is what i'm trying to do:http://example.com/order_now?utm_campaign=eblast082814redirected tohttp://example... | .htaccess redirect adding a hash while keeping the query string |
1
In your PredicateTestViewController's dealloc method, you should be releasing foos, not deallocating them.
// Your code in PredicateTestViewController.m
- (void)dealloc
{
[foos dealloc];
[super dealloc];
}
// Your new code in PredicateTestViewController.m
- (void... |
So I am trying to fix this really annoying bug. If I filter my array like the ideal version with NSPredicate, I will get EXC_BAD_ACCESS because it tries to call release on the object passed in as the delegate an extra time. If I filter with the working version, it works fine. I thought these two implementations were i... | NSPredicate Memory Issues |
It should be ********.ap-southeast-1.rds.amazonaws.com instead of ********.ap-southeast-1.rds.amazonaws.com:3306
You do not need the port number in the end.
|
I have created an e-commerce site in angular js. And I need to host the same in amazon web service.
So inorder to host the same I created an ec2 instance first. Now after that added an rds instance with a security group of VPC by allowing all ip's as outbound and inbound. While creating security group I specified for ... | ERROR 2005 (HY000): Unknown MySQL server host in aws |
I found the answer, according to Alexander Answer
Note that this approach has one drawback: it is currently not possible to re-import a full export, ie. from the root node and including the jcr:system subnode that contains the version storage, since the jcr:system part and especially the version storage are not wri... |
I'm working with Apache Jackrabbit using JCR API. I have exported current repository to a XML file:
session.exportSystemView("/", out, false, false);
Then, I imported the generated XML file to new instance of Jackrabbit:
session.importXML("/", in, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);
Now I can... | Apache Jackrabbit "web repository browser" do not show imported files |
In Xcode 5 choose Source Control > Working Copies > Switch to Branch to switch back to branch A3. The Working Copies menu item will have the name of your project and the current branch.
To remove branches B1 and B2, choose Source Control > Working Copies > Configure. A sheet opens. Click the Branches button to show al... |
I have a large project in Xcode and have created a branch via source-control for developing an idea I had, however the concept is not successful so I would like to abandon the branch altogether and go back to the point just before i branched. What procedure should I follow and what are the risks along the way? I need ... | how to discard a branch in Xcode source control |
git fetch origin-bitbucketshould work.Source | I have two remote repository in my project.git remote
origin
origin-bitbucketWhen I rungit fetchcommand, fetching my origin (github) repository. But I want to fetch origin-bitbucket repository. Which command should I use to?git remote -voutput:origin-bitbucket xxx.git (fetch)
origin-bitbucket xxx.git (push)... | How can I fetch another remote repository? |
2
The API Documentation does specify AccessPolicies to be defined as an Object but it's actually going to be a PolicyDocument type.
I have a java example here: https://github.com/cloudshiftstrategies/aws-cdk-examples/tree/master/elastic-search-java-app
It should translat... |
I'm trying to create an ElasticSearch instance using the CDK (CfnDomain). I just cannot figure out what needs to go into the AccessPolicies field. It's marked as "any" in the documentation (object in .NET which I am using). I tried putting in a string of Json similar to what is used here
which the CDK fails with:
Ama... | AWS CDK, how to define ElasticSearch Policies? |
It's useless to fiddle with anycomposer.jsonreplacement for this repository because it contains C software that needs to be compiled and installed as a PHP extension. Composer won't do this for you, it can only manage PHP source code. | I have been trying to install a git repository that does not have a composer.json file. I followed the instructions on the composer website and also found in this stackexchange post:Composer - adding git repository without composer.jsonHowever, I am still not able to get it to work. I keep getting an error stating: "... | Adding git repository with Composer for development branch where no composer.json present |
3
What your VCL is currently doing is removing Cookie from the request header and caching all requests. This causes the exact behavior you describe: the first page load is cached and all subsequent users get the cached content - no matter who makes the request. Generally yo... |
I installed varnish and everything works OK.
However, I have a need to cache logged-in users. This is what I have in my VCL:
backend default {
.host = "127.0.0.1";
.port = "8080";
}
sub vcl_recv {
unset req.http.Cookie;
if (req.http.Authorization || req.http.Cookie) {
return (lookup)... | Varnish - How to cache logged-in users |
4
Don't use arbitrary numbers.
The size argument passed to realloc is the new number of bytes to allocate. In your case it could be (counter + 1) * sizeof(char *) bytes. If the file contains more than around a thousand words then 5000 will not be enough. Not to mention you ... |
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help oth... | How to properly malloc and free char** when reading from file (unknown length)? [closed] |
SonarQube is telling you that this portion of the code contains duplicated logic. This doesn't necessarily mean that the code itself is copy-pasted, but that, conceptually, the exact same thing is happening at multiple places. In this case, the logic of returning aStringvalue with regard to theintvalue is clearly repea... | I just run sonar scanner on the sample Sonar project. It gives me the message that there is "duplicated code on lines 7-20". Can anyone explain this? | Where is the Sonar "duplicated code" here? |
That is how v1 works. If your upstream dataset fails, the second will stay in the waiting state until the first dataset has completed successfully.If you are using a schedule, you would want to fix the problem with the first activity and run the failed slice again. If you're working with a one-time pipeline, you have t... | I'm currently using Data Factory V1.I have a pipeline with 2 chained activities:. The first activity is a Copy Activity that extracts a table from SQLDB into a .tsv file in Data Lake Store. The second activity is a Data Lake Analytics U-SQL activity that collects the data in the previously created .tsv file and adds it... | Data Factory waiting timeout for upstream dependencies |
Nice... of course it does not find nothing, because this is the first commit, but I cannot check in my first commit... What can I do? (maybe switch to svn?)git status show this:On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: .bowerrc
new file: .gitignore... | Well this problem is very strange.
I created a new repository on Bitbucket and Github too.For example, the Github gives this information:git init
git add --all
git commit -m "Initial commit."
git remote add origin https://github.com/[myusername]/[myreponame].git
git push -u origin masterWell ok, I run thegit inittheadd... | Git - cannot push the first commit |
Unfortunately, abovekubectlconfig file is incorrect. It seems an error appeared due to manual formatting or something else.New line is missing in this part (name: mykubecontexts:):clusters:
- cluster:
server: https://<master-ip>:6443
name: mykubecontexts:
- context:
cluster: mykube
user: mykube-adm
name... | With a Kubernetes cluster up and running and the ability to go to the master over ssh with ssh-keys and run kubectl commands there; I want to run kubectl commands on my local machine. So I try to setup the configuration, following thekubectl config:kubectl config set-cluster mykube --server=https://<master-ip>:6443
kub... | Unable to kubectl connect my kubernetes cluster |
The latest AWS CLI has a CloudWatch Logs cli, that allows you to download the logs as JSON, text file or any other output supported by AWS CLI.
For example to get the first 1MB up to 10,000 log entries from the stream a in group A to a text file, run:
aws logs get-log-events \
--log-group-name A --log-stream-name a... |
I have managed to push my application logs to AWS Cloudwatch by using the AWS CloudWatch log agent. But the CloudWatch web console does not seem to provide a button to allow you to download/export the log data from it.
Any idea how I can achieve this goal?
| AWS Cloudwatch Log - Is it possible to export existing log data from it? |
You could change the return types from list to stream:private Stream<List<Long>> getFinalList() {
return chunkArrayList(getInitList(), 100);
}
private Stream<Long> getInitList() {
return LongStream.rangeClosed(500000000L, 570000000L).boxed();
}
public Stream<List<Long>> chunkArrayList(Stream<Long> str... | I need to get the list of all members returned by a public API.Issue is that I don't know any Ids but I know the first Id is starting after 500000000 and the last one is around 570000000. After a check, I know that those Ids are timestamp generated but I don't have any other informations.So my only solution is to fetch... | Out of Memory while creating chunks of a very large list |
So after speaking to AWS support about this, I found the issue.In short - if the FIRST request for a CloudFront resource (i.e. before it is cached) only supports gzip, then ALL future requests to that (now cached) resource will be served using gzip, even if the client specifies that it supports brotli.The reason this h... | I am reading the CloudFront documentation (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html, retrieved June 20, 2021) regarding CloudFront compression:The viewer includes the Accept-Encoding HTTP header in the request, and the header values include gzip, br, or both. This i... | Why does CloudFront sometimes serve gzip instead of br, when both are enabled? |
GitHub doesn't offer the ability to customize or filter webhook payloads. If you need a different behavior from the webhook payload, it's up to your application to either select the items you want, generate the missing data (e.g., with an API call), or otherwise manipulate it so it meets your needs. | I'm looking at adding a couple of other name/value pairs in the json payload that is sent when a webhook detects an event. Is there a way to add in a value to the payload that is sent?{
"ref": "release123",
"ref_type": "branch",
"master_branch": "develop",
"description": null,
"todaysdate": "Thursday",
"MyName": "John ... | GitHub webooks and custom payload |
1
I had to restart docker process to revive my container. There was nothing else I could do to solve it. used sudo service docker restart and then revived my container using docker run. I will try to build the dockerfile out of it in order to avoid future mishaps.
S... |
I have been running a nvidia docker image since 13 days and it used to restart without any problems using docker start -i <containerid> command. But, today while I was downloading pytorch inside the container, download got stuck at 5% and gave no response for a while.
I couldn't exit the container either by ctrl+d or ... | What to do if the docker container hangs and does not respond to any command other than ctrl+c? |
so I figured out two ways to do it ,I am a Posting it as it might help others
1)Use an Or Condition in the queryrate(src1_request1_counter1{job="$application",
instance="$instance"}[1m]) or
rate(src2_request2_counter2{job="$application",
instance="$instance"}[1m])2) Use Variables Ref:-Dynamically change the metric n... | I'm using prometheus and grafana. I wanted to change the metric based on the Source as a variable.
so If the source is source1 then I want the first metric else the second metricsrc1_request1_counter1{job='$job', instance=~"localhost:8080"}
src2_request2_counter2{job='$job', instance=~"localhost:9090"}Thanks In Advan... | Grafana Change Metric Dynamically |
0
So the only solution for the problem I could find is to invoke the garbage collection manually in the OnStop() method like this:
GC.Collect();
I don't like the approach very much, but it does the job and doesn't seem to cause any other problems.
Share
Improve t... |
I've started recently to play around with Xamarin-Android and discovered that when you use a ViewPager with an ImageView and Bitmap an OutOfMemoryError will occur very fast.
I've created 2 small test apps, which only have the goal to show this behaviour. One app is programmed with Xamarin in C#, the other one is an us... | Xamarin android - OutOfMemory at creating bitmaps and setting to ImageView in view pager |
It appears I was only impatient and all was fine. It takes a little while (~1/2 hour?) for the docs to go live even if the build is marked as "passed". | I'm failing to upload toreadthedocsthe documentation I prepared for my project and I'm trying to understand what's wrong. The documentation builds fine locally withmake htmlbut I cannot upload it.The GitHub project isASCIIGenomeand the documentation is in thedocs/dir (right now there are probably more readme.rst and in... | Autogenerated index file in readthedocs |
When I encountered same issue, this steps worked for me:1- Download required packages(you may need different versions):- pandas-1.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- python_dateutil-2.8.2-py2.py3-none-any.whl
- pytz-2022.1-py2.py3-none-any.whl
- numpy-1.21.5-cp38-cp38-manylinux_2_12... | I just uploaded a .zip file to AWS Lambda with all needed packages. I ran all right in my Mac using virtual environment with python 3.8. The AWS Lambda function also has python 3.8. But when I run in AWS Lambda I get this error:No module named 'numpy.core._multiarray_umath'I have changed the actual numpy version (1.20.... | No module named 'numpy.core._multiarray_umath' when using AWS Lambda |
rewriterule ^a55 /home/public_html/otherpage.phpThis matches any URL-path that simplystartsa55. The^is a start-of-string anchor. You also need an end-of-string anchor ($) to match just that URL-path. For example:RewriteRule ^a55$ /home/public_html/otherpage.php [L]You should also include theLflag, to prevent further pr... | I currently have /a1234 (any number after letter "a") rewriting to page.php?var=1234,
I have 1 particular page with number 55 I need to redirect elswehere.rewriterule ^a55 /home/public_html/otherpage.phpWhile this simple line works, it also redirects /a555, /a5555 etc... to otherpage.phpHow do I only have it redirect j... | Rewrite from a55 but not a555, a5555 etc |
If your data has been successfully stored in Parquet format, you would then create a table definition that references those files.
Here is an example statement that uses Parquet files:
CREATE EXTERNAL TABLE IF NOT EXISTS elb_logs_pq (
request_timestamp string,
elb_name string,
request_ip string,
request_port i... |
Athena creates a temporary table using fields in S3 table. I have done this using JSON data. Could you help me on how to create table using parquet data?
I have tried following:
Converted sample JSON data to parquet data.
Uploaded parquet data to S3.
Created temporary table using columns of JSON data.
By doing this ... | How to Query parquet data from Amazon Athena? |
3
regardless of 3G or WIFI you can use NSURLRequestReturnCacheDataElseLoad with your NSURLRequest which caches webpage otherwise load.. you could create a check for your 3G status
here is the usage of NSURLRequestReturnCacheDataElseLoad
NSURLRequest *request = [NSURLRequ... |
I'm trying to find a way to get a UIWebView to cache an entire web page while one wifi and view it from the cache while connected to 3G, but then reload and recache while on WiFi again.
Are the any APIs or anything to do this?
Cheers
| iOS Cache Content from a UIWebView |
I've worked with systems that useFabricto deploy to multiple servers | I have never actually worked for a company which is deploying a Django App (with a large user base), and am curious about what is the best way to do this.Right now I am hosting a Django App on EC2. The code for the app is sitting in my github account. I have nginx serving static content, and behind it a single apache s... | How Are Experienced Web Developers Deploying Django Into Production on EC2? |
recently I had sort of problems to run a cron job on a php script on localhost (WAMP server) in windows 7, when I was on a test to chronically fetch some links from www out there.
By the way I am sharing this for anyone that is on the same thing.
You will need a shellscript to run chronically, using Windows Task S... |
I have a php script and want to run it on an schedule. I am using local web server on windows (WAMP server) and need a way to run my_script.php every 10 min.
How to run a cron job on a PHP script, on localhost in windows?
| Run Cron Job on PHP Script, on localhost in Windows |
Looking at the Documentation, GCP seems to favor the K8s Standard way of adding SSL/TLS to your Cluster:https://cloud.google.com/kubernetes-engine/docs/concepts/ingress-xlbThis means, you have to configure your Ingress entity to use a TLS secret:apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: my-i... | Closed.This question is seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. It does not meetStack Overflow guidelines. It is not currently accepting answers.We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-si... | How to add a SSL/TLS certificate on Google Kubernetes [closed] |
2
find . -type f -name 'log*' -delete
Would be the most efficient way to do it
In most cases replacing -delete with-print would show you all the files which would be removed. In your case though I don't think that will help
@biffen points out that it will do sub dirs too
T... |
I had a logging process go haywire on one of my servers and I now have tons of files that I can't delete:
➜ logs ls -l | wc -l
11135951
➜ logs rm log*
-bash: fork: Cannot allocate memory
Ideas? I could just blow the server away but I'm genuinely curious about how to actually fix this.
| Folder filled with 10M+ log files and I can't delete them |
grr...
The problem got fixed after restarting my Mac computer.
|
I have been trying to push new changes to my existing repo, however, I am keep getting the following error:
-MacBook-Pro:spa $ git push origin master Username for XX Password for fatal: unable to access 'https://github.com/XXXX/': Empty reply from
server
I have even tried with the new repo but the result is same... | gits error on push Empty reply from server |
As far as I know, no, you can't. Because a Dockerfile is used for building the image, it is not packed with the image itself. That means you should reverse engineer it. You can usedocker inspecton an image or container, thus getting some insight and a feel of how it is configured. The layers an image are also visible, ... | I have the following docker images.$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest 48b5124b2768 2 months ago 1.84 kB
docker/whalesay latest 6b362a9f73eb 22 months ago 247 MBIs there a... | How can I see Dockerfile for each docker image? |
It should work like this: within your serverless.yml you can reference.envparameters with${env:keyname}and AWS Parameters using the${param:keyname}syntax.If you need to support both of them you just need to write${env:keyname, param:keyname}.Here's an example:provider:
...
environment:
ALLOWED_ORIGINS: ${env:AL... | I'm using Serverless framework and NodeJS to develop my AWS Lambda function. So far, I have used.envfile to store my secrets. So, I can get access to them inserverless.ymllike thisprovider:
...
environment:
DB_HOST: ${env:DB_HOST}
DB_PORT: ${env:DB_PORT}But now I need to use AWS Parameter Store instead of.e... | How to emulate AWS Parameter Store on local computer for lambda function development? |
Short answer : no there is not. Parameterized types are not provided as part of the semantic API.We already have in mind to provide this at some point :https://jira.sonarsource.com/browse/SONARJAVA-1871but no clear plan defined as of today. | While testing new rules I noticed that there is one bug. My rule is checking for method parameters and return type and is checking if those values owner has certain annotation.Previously I had problem of getting Array in method parameters and getting element type of that Array. But then I found solution:if (parameterTy... | Custom SonarQube rule - get List element type |
This appears to be the behavior of internal networking. Since the only network attached to the container is an internal network which doesn't permit external traffic, the container becomes isolated by design. To publish a port, you need the container to be attached to a non-internal bridged network. And as soon as you... |
I have created two docker networks
chnetwork
docker network create --subnet=172.19.0.0/16 chnetwork
Internal-network
docker network create --internal --subnet 10.1.1.0/24 internal-network
while create docker container I use chnetwork,
docker run -it -d --name containerone -h www.cone.net -v /var/www/html -p 3... | is port not common for all the docker networks? |
A StatefulSet does three big things differently from a Deployment:It creates a new PersistentVolumeClaim for each replica;It gives the pods sequential names, starting withstatefulsetname-0; andIt starts the pods in a specific order (ascending numerically).This is useful when the database itself knows how to replicate d... | I heard that StatefulSets are suitable for databases, but StatefulSet will create different PVCs for each pod. If I set thereplicas=3, then I get 3 Pods and 3 different PVCs with different data. For database users, they only need one database (consistent view), not 3 different views. So, it's clear we should not use St... | When should I use StatefulSet?Can I deploy database in StatefulSet? |
You can get today's date in whatever format you require via thedatecommand. For example,TODAY=$(date +%Y-%m-%d)You can loop over the subfolders you want with a simple wildcard match:for d in /path/to/backuptest/*/*; do
# ...
doneYou can strip the directory portion from a file name with thebasenamecommand:name=$(base... | Could someone help me on this.I have below folder structure as shown below .I want to loop through every folder inside the backuptest and delete all the folders except today date folder.i want it run as a cron job | Shell script to loop and delete |
The standard kubelet code has logic totranslate the downward API fields into environment variables. It is neither simple nor generic, though: at the bottom of the stack, only thespecific fields listed in the Kubernetes documentationare supported. It would be incomplete, but not wrong or inconsistent with standard Kub... | I want to get the values of the fields declared in thedownwardAPIsection of aPod.apiVersion: v1
kind: Pod
metadata:
name: sample
namespace: default
spec:
containers:
- image: rpa
imagePullPolicy: Always
name: testbot
volumeMounts:
- mountPath: /etc/pod-info
name: pod-info
volumes:
- do... | Access a property in the body of a kubernetes resource using a field path |
Judging from the error message, this is clearly due to the space in your interpreter path (the space in Github Repos). If you look at the contents of your pip executable, you'll see that the shabang line includes the full path to the python executable, wrapped in quotes if there's a space in the path, like this:
#!"/U... |
I am currently working on a team project and testing Twilio's API out in our project. I input "python3 run.py" in terminal and I got
"No Flask Module".
So I input "pip3 install flask" in my virtual environment and I got
-bash: /Users/(name)/Github Repos/(repo name)/development/bin/pip: "/Users/(name)/Github: bad ... | bad interpreter issue with Github |
I don’t think that you can use an underscore in the header name of a custom header as it’s a feature that’s disabled by default. More information can be foundhereYou could test this out by removing this from the header name. | I am sending a header along with a GET request to a PHP script but either Postman does not send the header or the PHP script does not receive it. I am using Nginx for the server (Apache2 gave almost the same result with api_token absent). I am not able to find what is wrong.The server side PHP code is as follows:$val){... | The header sent by Postman is not received in the PHP script |
19
Yes. Actually, you must include external images in your manifest, or some browsers will not load them at all even if a network connection is available! (Unless you provide a NETWORK section, which may cause the images to be fetched every time, bypassing the regular brows... |
I'm building an offline web application and want to use cache-manifest. Currently my cache-manifest looks like this:
CACHE MANIFEST
# Change the version number below each time we update a resource.
# Rev 1
index.html
photo.html
js/photo.js
css/photo.css
http://code.jquery.com/jquery-1.6.1.min.js
http://code.jquery.com... | Is it OK to include external files in cache-manifest? |
very late, but have you tried setting the transport service to local?adb shell bmgr list transportsprintsandroid/com.android.internal.backup.LocalTransport
* com.google.android.gms/.backup.BackupTransportServicechange it to the local oneadb shell bmgr transport android/com.android.internal.backup.LocalTransport | I am testing my custom BackupAgent. The below is my test in Simulator & Eclipse ADTTest 1 backup & restore using command ---- WORK WELLadb shell bmgr enabledadb shell bmgr backup app_packageadb shell bmgr run ---------------------- Run backup (BackupAgent.onBackup called)On the app, I deleted some dataadb shell bmgr re... | BackupAgent.onRestore not called when re-install app BUT called for bmgr restore command |
If you are asking about deleting a project from GitHub, open your project, click the "Admin" tab (or browse directly to https://github.com/username/project_name/edit) and on the bottom of the page, click "Delete This Repository". It'll ask you to confirm this, and then it's gone.
If you just want to erase a part of yo... |
Is there a way to entirely remove a directory and its history from GitHub?
| Removing code from GitHub |
To move your Name Servers to AWS Route 53 first you have to change the Name Servers in Bigrock follow this steps.http://support.hostgator.com/articles/hosting-guide/lets-get-started/dns-name-servers/how-to-change-name-servers-with-bigrockOnce that is done go to AWS Route 53 and create two record sets one for the "naked... | I have a simple question forpointingmy Bigrock Domain name to Amazone EC2.I haveCreated HostedZonefromHostedzone-create linkIgot 4 name servers.Now what?Suppose my domain name is example.com on Bigrock.com.Can anyone explain me how can i point that domain name to EC2?Iasked to Bigrock supportbut they told me something ... | Amazon EC2 link to Bigrock domain name |
-1
First, if you are cloning with GitHub for Windows, then the latest msysgit is included in it: you just need to open a shell from G4W.
Second, if the issue persists (from an independent up-to-date msysgit, or from G4W), then it should be some connection issue (network, fi... |
When trying to clone a remote repository to my machine I get the error:
"failed to clone the repository 'somerepo'"
"The process timed out. The repository is in an unknown state and likely corrupted. Trying deleting it and cloning it again"
This same error happened to someone else with the same environment and fixed ... | Github failed to clone repository on windows 7 application |
1
You can get a specific Project's runner registration token from the Get Single Project API operation. In the response, it will have an attribute called runners_token which matches the runner registration token for the queried project.
curl --location --request GET 'http... |
Context
To automate adding local GitLab runners to a local GitLab server instance running on docker, I wrote a boilerplate code that downloads and installs a Selenium browser that logs into GitLab and navigates to the GitLab runner section within the admin options, then clicks on "Register an instance runner" and sear... | Getting the GitLab runner registration token from the command line |
You don't need 2 rules and your 2nd rule has invalid regex anyway. Try this rule:Options -MultiViews
RewriteEngine On
RewriteBase /myproject/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^books/([^/]+)/?$ books.php?id=$1 [L,NC,QSA]
RewriteCond %{DOCUMENT_... | RewriteEngine On
RewriteBase /myproject/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ $1.php [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^books/([^/]+)/$ books.php?id=$1 [QSA]
Rewrite... | .htaccess add / support |
Are you expecting Prometheus to pick up the username and password to use for the request it makes to Alertmanager from theweb.config.file? I don't think that's a feature: that configuration is used when acting as a HTTPserver, not when acting as a HTTPclient. How would it even know which user name to pick?(Not to menti... | I've configured user & prod ("basic_auth_users") and passed those parameters as mentioned in the doc:
--web.config.fileAble to access Prometheus UI and Alert Manager UI independently(with provided credentials) but I'm seeing the following error in Prometheus logs and alerts aren't going out due to this.level=error ts=2... | Prometheus is throwing "bad response status 401 Unauthorized" - Even afer specificying right configs "basic_auth_users" |
Probably impossible to give a correct answer without more knowledge of the script and your system, so only general hints might be useful here:start with a minimal R script (a one liner) and confirm it works. By "works" I mean do something in the script you can check happened. Print a message to a log file, make a file ... | I'm attempting to schedule an R script that does a scrape, some calculations and then emails a small group of people twice a day. I've gotten the script working well but I can't seem to get the crontab to work. I've given full disk access to cron, I've put the script in a folder where I've expanded the access as much a... | Crontab fails but command works in terminal |
First, you should create a commit that removes this folder from git:
$ git rm -r bin
$ git commit -m "Removed bin folder"
$ git push origin master
After doing that, you can ensure this mistake won't happen again by adding the bin directory to your .gitignore file, and commit that change too:
$ echo "bin/" >> .gitigno... |
I accidentally pushed the bin folder of my Java program to GitHub, and now I wish to remove all those .class files.
How can I do that?
| Removing bin executable folder from GitHub |
I've chmoded my keypair to 600 in order to get into my personal instance last night,
And this is the way it is supposed to be.
From the EC2 documentation we have "If you're using OpenSSH (or any reasonably paranoid SSH client) then you'll probably need to set the permissions of this file so that it's only readable... |
I'm working to set up Panda on an Amazon EC2 instance.
I set up my account and tools last night and had no problem using SSH to interact with my own personal instance, but right now I'm not being allowed permission into Panda's EC2 instance.
Getting Started with Panda
I'm getting the following error:
@ WARNING... | WARNING: UNPROTECTED PRIVATE KEY FILE! when trying to SSH into Amazon EC2 Instance |
S1451is configured with the required/desired header. The easiest thing to do would be to look at the configuration of the rule in the profile that's being applied & copy/paste the configured header into your file. | I am using the sonar (v5.6.6) and c# plugin (v6.3)for code analysis. After sonar analysis execution. MyC# Codeviolated ruleS1451(Rule Name:Track lack of copyright and license headers).I tried many of the copyright formats, but no luck all fails to compliant with this rule.How to make the code to compliant with rule S1... | Issue on make the code compliant for sonar rule S1451 for C# |
You can use pandas to save the data frame as a csv file in the local folder that your GitHub repo is attached to;domains.to_csv("path_to_local_git_folder/domains.csv")More info about this function is on thepandas websiteThen once you have your csv file locally, you can add, commit and push to GitHub just like you would... | I have a dataframe named "domains". I want to save it as csv to my github project. How do I do that?Many thanks! | How to save a dataframe as csv to github repository python |
You can't run workflows from subdirectories:You must store workflow files in the.github/workflowsdirectory of your repository.Source:https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflowsYou can however usecomposite run steps actions(documentation)..github/workfl... | I have 3 directories in./github/workflows/lintersfunctionalTestsunitTestsIn each of these directories I have multiple workflow.ymlfiles for example inlinters/codeQuality.ymlMy issue is that when a pull request is made then only the workflows files in root are executed and not the workflow files in these diretories.How ... | How to run multiple GitHub Actions workflows from sub directories |
As long as the Web pages don't call LocalStorage.clear before they exit the data should be available in a SQLite database.
If my memory is correct is under 4.03 the path is something like /data/data//app_database/localstorage/file__0.localstorage
As the local storage data is saved in a SQLite table called ItemTable yo... |
I'm using WebView in my application and I need to pre-cache some webpages for later use. Since I want the caching process be less obnoxious, it have to be unnoticeable. So it's better to be implemented in a Service.
I don't know how to achieve this because WebView can only exist in an activity. Is there any method ... | External cache for WebView to load? |
-1This installation for IonCube worked just now for EC2 (hope it works as well for elastic beanstalk):PHP version installed is 5.5 - please change the 5.5 to your installed version if you have a different one ("php -v" gives you the currently installed one):# Download current version of IonCube loader
wget http://downl... | I have been trying to get one of these two loaders installed all evening without success. I have narrowed it down to creating a config file. I have put a .config file in a .ebextensions folder located in my root directory of my project, I'm not sure if it needs to be at the same level as my project. But in any case eve... | AWS Elastic Beanstalk Installing IonCube or Zend Loader |
To be blunt: You are flogging a dead horse. 1.x is not maintained any more and there are good reasons for that. In the case of OOM: Elasticsearchreplaced field datawherever possible with doc values and added more circuit breakers.What is further complicating the issue is that there is no more documentation for 1.1 on t... | I have an Elasticsearch 1.1.1 cluster with two nodes. With a configured heap of 18G each. (RAM on each node is 32G)
Totally we have 6 Shards and one replica for each shard. ES runs on a 64bit JVM on Ubuntu box.There is only one index in our cluster. Cluster health looks Green. Document count on each node is close to 20... | OOM issue in Elasticsearch Cluster 1.1.1 Environment |
Depending on your environment, this may not be politically feasible, but I'll answer ignoring politics:First, you need to set up a rule profile on your SonarQube server that's limited to just the rules you want to see - the Java 7 rules and assign it to your project so only those rules are used in analysis.Nowconnectyo... | I have installed SonarLint eclipse plugin. I would like to see only those issues which are compatible with Java 1.7. Is there an way to set a particular version for running sonar scan? I checked the options and couldn't find anything.Just to clarify, I don't want to know how to set java version for Sonar itself. I woul... | How do I set java version for a particular sonarlint scan? |
Yes they do. AMD even provides the specification up to the HD4000 series at the moment.
Take a look here at AMD's R700 instruction set reference guide.
There is also an open source project called Nouveau that does reverse engineering of the Nvidia instruction sets.
Note that Nvidia has a slightly different architectur... |
Do graphic cards have instruction sets of their own?
I assume they do, but I have been wondering if they are proprietary or if there is some sort of open standard.
Is every GPU instruction preceded by a CPU instruction or is it seamless?
That is, does OpenGL or DirectX call on the driver layer via the CPU which then s... | Do graphic cards have instruction sets of their own? |
Just rebuild node.js with openssl support. So now I use the same libs as curl.
Thank you everyoneShareFollowansweredAug 25, 2021 at 19:56danunafigdanunafig111 bronze badgeAdd a comment| | With OpenSSL and adding CA havecurl -X GET https://someserver.com -I --capath /etc/ssl/certs/working fine.curl -X GET https://someserver.com -I --cacert /etc/ssl/certs/someserver.pemworks as well.I would like to make the same call with node.js https.request()I've triednode --use-openssl-ca app.jswith SSL_CERT_DIR set t... | How do I get key and cert from --capath |
The issue has been resolved, the error was in the code(duplicate code), I was using another ingress in the same deployment but in another file with the same name of the existing ingress. | I'm using GCE ingress, and I need to redirect all HTTP traffic to HTPPS, I added a custom frontend configuration like the following:apiVersion: networking.gke.io/v1beta1
kind: FrontendConfig
metadata:
name: frontendconfig
spec:
redirectToHttps:
enabled: true
responseCodeName: MOVED_PERMANENTLY_DEFAULTI used... | GCE Ingress error 400 ensureRedirectUrlMap() redirect To Https |
Without preventing writing memory areas into the page file (or code dump), sensitive data (keys) might be left written onto disk and found by someone not intended to see/have the data. Whether it's necessary/useful depends on application. Not doing that could leave secret keys or unencrypted data lying around on lapto... |
I'm using libgcrypt 1.5.0 under GNU/Linux to develop a small aes256-cbc file encryption software.
I have a doubt regarding secure memory and data swapped out to disk.
Let's say I have this code:
char *crypto_key;
crypto_key = gcry_malloc_secure(256);
Is it useful and necessary to do also these two things?
1) to not a... | Memory management in C when using gcry_malloc_secure |
Mergemasterintonew feature #101first, clean up all merge conflicts, and then it will be a simple merge back into master (also easier to see the diff that way). | So say you branch off your master to create a "new feature #101" for your application. Now this feature isn't going to be pushed to the master until X months from now (we'll say 3 months). In that 3 month period, say we branch off other features pushed to the master, and even a few bug fixes directly to master. We n... | GitHub: Merging old branches |
The case number should be of the form:
\b((FogBug[sz]|Case|Bug[zs]*(?:ID)*):(\d+)
so
FogBugz:1234
FogBugs:1234
Case:1234
Bugz:1234
should all work.
I use FogBugzId:1234
|
So we have integrated fogbugz and github, the actual mechanism seems to work. (i.e. when pushing the "test" button on github, the message "payload delivered" is shown) Unfortunately, cannot find the documentation on what to put in the commit message to tie the bug to the commit.
I have tried
git commit -am 'fixing 9... | Github and Fogbugz |
Searching internet, there are multiple reason that this might happen.
On documentation is not clear where to look into.You should look at EC2 Auto Scaling Groups. There is an autoscaling group named after the compute environment. All of the errors for starting EC2 instances are in that auto scaling group.For my case wa... | I stragle to make a Batch process to run with GPU in AWS Batch.
I setCompute environment:
- Type: Managed
- Prov. model: EC2
- Instance type: g4dn.xlarge
- Status: Valid
- State: Enabled
- Min CPU: -
- Desired CPU: -
- Max CPU: 256
Job queue:
- state: Enabled
- status: Valid
- priority: 100
Job ... | AWS Batch: GPU process |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.