Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
If you don't want to display data to user you can use following folders and access the database from the same location which you use for storing//To access ApplicationSupport folder of your iOS machineNSString *appSupportDir = [NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) la... | I'm making ipad App using SQLite Database.I want to be able to add .sqlite files from iTunes to add db file freely and to back user_data up.So, I have to save files on /Documents folder.Then, I have a question.I don't want to be able to display some database files in iTunes.- (ex. like user memo db )What am I supposed ... | How to hide specific files in a folder. |
Is your instance behind the ELB running a web server ? If it is does it return an '200' (OK) ? If not then that's your problem.If you are running a web service that returns a 200, is your security group open to the ELB? Meaning the ELB's source security group has to allowed into your instance's security group. | I am facing a problem in AWS. I am creating and registering an instance with an ELB. Though it is getting registered, it is not passing through the health check and showing Out-of-Service. The error reason is "Instance has failed at least the Unhealthy Threshold number of health checks consecutively".My health check va... | AWS EC2 instances are "Out of Service" after getting registered with ELB |
A common way to do this is by storing versions of objects.If add a "version" and a "deleted" field to each table that you want to store an audit trail on, then instead of doing normal updates and deletes, follow these rules:Insert - Set the version number to 0 and insert as normal.Update - Increment the version number ... | I'm a J2EE developer & we are using hibernate mapping with a PostgreSQL database.We have to keep track of any changes occurs in the database, in others words all previous & current values of any field should be saved. Each field can be any type (bytea, int, char...)With a simple table it is easy but we a graph of objec... | How to keep historic details of modification in a database (Audit trail)? |
You should do whats is calledsquash.git rebase -i HEAD~100will open a dialog where you can squash all your pervious (100 commits in this sample) into a single commit.Click here for more info:git squash | I need delete all local commits from a Git project. I need to do so that I can commit everything as a single unique commit before sending it upstream. | How do I delete all the local Git commits I've made? |
This configuration is not support yet in SonarQube.But the good news is that this will change with SonarQube 6.4 (expect in early May 2017). See the following tickets:SONAR-6724SONARGRADL-5 | I need to make analyzing only root project, and ignore nested sub module, but it dSo I have this hierarchy:ProjectMain
-src
-subProjectAngular
settings.gradleMy configurationsettings.gradlerootProject.name="ProjectMain"
include 'subProjectAngular'I need to make analyzing only root project, and ignore nested sub ... | SonarQube not apply analyzing to the root project |
You should put your amazon rulesbeforeyour wordpress routing rules and add a leading slash to the rule's target making them absolute URL-paths:RewriteEngine on
RewriteRule ^amazon$ /$1/ [R,L]
RewriteRule ^amazon/(.*)(\.[a-z]+)$ /cgi-bin/cbooks/ca.pl?virtual=$2&virtual.dir=$1 [L]
RewriteRule ^amazon/(.*)$ /cgi-bin/cbook... | I have a conventional site to which I've added Wordpress which is installed in /wp and rewritten to root. I also have a perl program which needs a rewrite rule. I understand that I should not have two instances of RewriteBase but cannot see how to get the two sections working together. With the current setup, the virtu... | Multiple RewriteRules |
3
Your understanding of the parameter -Xmx10g isn't quite correct. It allows the JVM to ask the operating system for up to 10GB of memory for its heap. It doesn't guarantee that the JVM will get it. Indeed, if your system doesn't have sufficient memory (physical and paging)... |
-Xmx10g guarantees that the JVM gets 10G from OS for the process. Similarly, I want to guarantee particular amount of memory (say 4g) for my off heap usage.
If the RAM of my machine is 8GB and Xmx for my java process is 2G. Now, there may be other processes that may eat some memory. So, when I want to start my JVM, i ... | How to guarantee allotment of particular GB as off heap memory for a JVM |
Get help from @Philippe and @knight9631, I got the expect result.
Prerequisite
Do upstream change as described in @Philippe's reply.
$ git remote add upstream https://github.com/[orga]/[project].git
# add fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to .git/config in session origin
$ git fetch --all
Get the r... |
Work on a big open source repository in Github. There are more than 300 pull requests (PR) waiting the queue to be merged to master branch.
I'd like to add features in a file, before to do that, I need to make sure there are no exist PRs making the same change.
So how to find out the pull requests which include a cha... | How to find out the pull requests which include a change in a particular file? |
There is in-built integration between Amazon EC2 Auto-Scaling and Elastic Load Balancers. The Auto Scaling systems knows how to modify Target Groups to add/remove instances. However, it has no knowledge about your on-premises load balancer.You could useAmazon EC2 Auto Scaling lifecycle hooksto trigger additional code (... | I have an on-premises load balancer that I wish to use to distribute traffic on EC2s in an Autoscaling group(ASG).When AWS's Elastic Load Balancer(ELB) registers an ASG as a target, during a scale-out,new instances are automatically registered to ELB to route traffic to.Can the same functionality be achieved in any way... | Can an on-premises load balancer be used to connect to AWS EC2 Autoscaling group? |
1
You can backup your WordPress either from your hosting account (preferable) or from your WP dashboard.
You need to backup two things - all the files (the root of your Wordpress installation) and the database for your WP installation.
Since you only have access to the dash... |
I have never used wordpress before, My boss has given me access to a site which was created using wordpress. then He asked me how I am going to make sure I don't break the site accidentally, I told him I would create a backup on my local computer so that all my changes can be restored if I mess up.
I have the wordpre... | How to manually back up wordpress website |
Seethis answerfor more information, but the short answer is that it just doesn't work in gists :/.If you look at the source forthis gist post, all of the embedded images are actually hosted on imgur, even though the images are also attached to the gist. | I have a secret Github gist with a markdown document. I've created three simple.pngimages that need to be embedded in the document as it displays at the gist URL.I cloned my gist repo, added the image files, and pushed to master. Now, at the gist URL, I see the image files in addition to the markdown file.However, when... | Recommended steps for viewing image file in Github gist are not working |
This should work:RewriteCond %{REQUEST_URI} !^/?PAGEX.aspx$
RewriteRule .* http://destinationwebsite.com [R=301,L] | I want to forward everything on site X (http://example.com) to Site Y (http://destinationwebsite.com)
except "PAGEX.aspx"(http://example.com/PAGEX.aspx?callback=7259%2F7062434327_9fbc6da0cd) | htaccess: redirect if not match |
Whilecfs_write()is not a huge function on its own, it does call other functions. If you usecfs_write()from the application code, all these other functions are also linked in the executable.For example, if you're using the Coffee implementation of CFS (there are multiple implementations), it callsmerge_log(), which in t... | I am developing a Contiki application and I am running out of ROM memory. I want to use the Contiki File System (CFS) to write a small file (32 bytes long), so I add the following code:fd_write = cfs_open(filename, CFS_WRITE);
n = cfs_write(fd_write, message, sizeof(message)); //Message size is 32 bytes
cfs_close(fd_... | Why cfs_write() consumes too much ROM memory? |
At the time of this writing there is no high-level way to quickly check whether a bucket exists and you have access to it, but you can make a low-level call to the HeadBucket operation. This is the most inexpensive way to do this check:
from botocore.client import ClientError
try:
s3.meta.client.head_bucket(Bucke... |
For example, I have this code:
import boto3
s3 = boto3.resource('s3')
bucket = s3.Bucket('my-bucket-name')
# Does it exist???
| How can I easily determine if a Boto 3 S3 bucket resource exists? |
You certainly could, but I don't know if it's the best choice. A couple of questions come to mind. Is this a text-based document format or are you planning on doing your writing in something like MS Word? If the former then I think it could work well. If the latter I would say it may be less effective.
What about your... |
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
... | Can GitHub be used for writing a collaborative article? [closed] |
You can't get a "notification" (pushed or triggered).You can only poll for the status of existing invalidations using theGet Invalidationrequest from the CloudFront API.ShareFollowansweredAug 29, 2016 at 15:38Michael - sqlbotMichael - sqlbot174k2727 gold badges367367 silver badges440440 bronze badges6Anything new you'v... | Is there a way, where I can get notification using RESTAPI call, after the AWS Cloud-front invalidation is completed? | How to get a notification after AWS Cloudfront invalidation is completed? |
Reading your question I assume that once an error occurs, the metrics will be "1" until the the application is restarted. Or the status might be reset once the condition has been cleared by a user.If this is a status that will later be cleared, a Gauge will be thing to be used. If you want to report/alert on how many e... | I'm trying to collect an application's running status, if an error happens, then use alertmanager to alert.I read docs about metric types, it seems gauge vec is the only suitable type. Currently my metric definition is like(it's in Go, but you can get the idea):errored = prometheus.NewGaugeVec(
prometheus.GaugeOpts... | How to use Prometheus to alert specific error message? |
If you really want to avoid tight coupling I suggest you to simply implement and abstraction layer on top of the minimum set of features that are available on both types of storage.
But anyway, what you're trying to do doesn't really make sense to me. Cloud (non-relational) storage is so peculiar that trying to build ... |
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
... | Azure/AWS ORM Design Guidelines [closed] |
Assumingupstreamis the name of the original repository on github (not your fork)# Just to ensure to get the most actual commits too
git fetch --all
git checkout -b feature/newFeature upstream/master | I forked popular project on GitHub that i want to contribute to.Now i made some changes to my master branch and pushed them to my master branch and made a pull request.However my pull request is now being reviewed so i wanted to work on new feature until it gets merged.I create new branch, add those new features and th... | Git: made commits to my master branch i opened pull request and now can't implement new features |
I figured out the solution on my own. The variable that i wanted to pass wasvar-inst, the trick to use it is to create a custom template variable namedinstand give it a dummy value. After that is done i can use the passed value by using$inst. Note that in order for the variable to be passed i had to go back to my prima... | I am trying to make a detailed dashboard in grafana that opens on click. I do it by passing a variable to the dashboard debending on the clicked facility. When the dashboard opens it needs to display value using the passed url variable inst. I just cannot seem to get it working. Here is an example of my dashboard link.... | How to access variable, passed through URL in grafana? |
I've used migration tool of plesk (dont need to use backup files anymore) !!
|
I'm trying to perform data migration from server to server.
My hosting provider allow me a personal FTP to backup all my server data everyday.
I just installed the new server with a Plesk 11 panel manager as the old one (same version).
Now I want to use personal FTP to transfer data (databases, websites, domaines conf... | Restore plesk 11 via personal FTP |
The output that you show above needs to be evaluated. Very often this is done automatically by starting ssh-agent like eval `ssh-agent`. This causes
SSH_AUTH_SOCK=/tmp/ssh-tUlzwbxYNLaZ/agent.9516; export SSH_AUTH_SOCK;: the SSH_AUTH_SOCK environment variable to be set to the given value.
SSH_AGENT_PID=8992; export SS... |
I'm trying to add a new ssh key. I've started the service using "ssh-agent -s", and I get this response:
SSH_AUTH_SOCK=/tmp/ssh-tUlzwbxYNLaZ/agent.9516; export SSH_AUTH_SOCK;
SSH_AGENT_PID=8992; export SSH_AGENT_PID;
echo Agent pid 8992;
But when I do "ssh-add ~/.ssh/id_rsa" I get the error "Could not open a connecti... | ssh agent started but can't connect to authentication agent |
You have your sshclonestatement wrong:git clone username[email protected]:root/test.gitThat statement would try to clone a repository namedusernameinto the location relative to your current path,[email protected]:root/test.git.You want to leave outusername:git clone[email protected]:root/test.gitShareFolloweditedJul 4,... | When I do this:git clone https://example.com/root/test.gitI am getting this error:fatal: HTTP request failedWhen I use SSH:git clone username[email protected]:root/test.gitI am getting this error:Initialized empty Git repository in /server/user/[email protected]:root/test.git/.git/fatal: 'user' does not appear to be a ... | How can I clone a private GitLab repository? |
You're not using the username and the password you provided in your docker-compose file. Try this and then enter my_password:
docker exec -it container_id psql -U my_user -d my_db --password
Check the official documentation to find out about the PostgreSQL terminal.
|
I setup my django and postgres container on my local machine and all working fine. Local server is running, database running but I am not being able to connect to the created postgres db.
docker-compose.yml
version: '3'
services:
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
... | How to connect to a postgres database in a docker container? |
2
You can set up an Event in cloudwatch to monitor on "ECS Task State Change" and put condition on lastStatus. Here is the code for that-
{
"source": [
"aws.ecs"
],
"detail-type": [
"ECS Task State Change"
],
"detail": {
... |
I'm trying to set an Alarm using Cloudwatch to detect when a Task is killed in an ECS Cluster.
I followed this https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cloudwatch-metrics.html#cw_running_task_count to set up a metric to track the number of tasks running by a service.
This is my alarm :
**Namespace**... | Detect and generate a cloudwatch Alarm when a Task in ECS is killed or restarted |
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9]*)/$ /page.php?name=$1 [L]this is what you search forhttp://domain.com/testname/will be translated tohttp://domain.com/page.php?name=testname | Below is example a famous.htaccessRewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]What I know here, the result for URL will behttp://domain.com/about.php will be http://domain.com/about/
http://domain.com/contact.php will be http://domai... | Write a php code to be seo permalink url according to current htaccess |
It was an Apple issue. We installed the Mojave 10.14.6 supplemental update and the problem fixed itself. We're able to connect to the WebDav servers no problem. Thanks! | All Mac computers at my job were upgraded to macOS Mojave four days ago. Since then, no Mac users have been able to connect to any MarkLogic WebDav servers. PC users are able to connect no problem and so are Macs that are still running older versions of macOS.Also, now when trying to connect to the WebDav server throug... | Marklogic WebDav server connection not working after macOS Mojave upgrade |
1
Since your question, AWS has released some code to ease the use of distributed TensorFlow on an EC2 cluster.
See this github repository. Everything is described in the README.md but the short story is that it will create an AWS stack with
Security Groups
Elastic File S... |
I'm trying to run distributed tensorflow on an EMR/EC2 cluster but I don't know how to specify different instances in the cluster to run parts of the code.
In the documentation, they've used tf.device("/gpu:0") to specify a gpu. But what if I have a master CPU and 5 different slaves GPU instances running in an EMR clu... | How to run TensorFlow on an AWS cluster? |
12
I have figure out some different way to install Oracle instant client in ubuntu Docker, it might help others
Follow these simple steps:
Download oracle instant client (.rpm file) from oracle official download center
Convert into .deb (you can use apt-get install alien ... |
I am using alpine linux as a base image, and I need to install an oracle client native library. I believe you can download from here:
https://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
it looks like I have to login to download, does anyone know how to download a zip file of the client lib without l... | Install oracle client in docker container |
0
the easiest way is to use script
1) select records you need
2) put them in some form of dump
3) run delete from table with parameters you need
other constructions (triggers with stored procedures or else), IMHO, will shoot you in leg eventually
Share
Improve ... |
Is it possible to take daily backup (Only the records per day) for particular table in DB.Once the backup is done need to delete those records from table.
Is this scenario will work without using scripting language like php,perl...?
| How to take Mysql Backup without using script? |
docker stats $containerwon't exit when running, so yoursleep 5don't have chance to execute.For you, you should use next:--no-stream Disable streaming stats and only pull the first resultThen, you could use something like next fake code to control the rate:while xxx; do
docker stats $container --no-stream
... | I am runningdocker stats $CONTAINER_IDfrom a shell script to monitor my Docker container memory and CPU usage over a period of 1 hour. I have the below shell script.#!/bin/sh
# First, start the container
CONTAINER_ID=abcadsasdasd
# Then start watching that it's running (with inspect)
while [ "$(docker inspect -f {{.S... | Docker stats for n seconds period |
Although I'm not an nginx expert, I feel like I have a much better understanding of how to do this now. As I figure out more I'll update this answer.One possible solution to my original question is this:location ~* "^/[a-z0-9]{40}\.(css|js)$" {
root /home/ubuntu/app/bundle/programs/web.browser;
access_log off;
ex... | The site configuration for my meteor app has directives which look like the following:server {
listen 443;
server_name XXX;
ssl on;
ssl_certificate XXX;
ssl_certificate_key XXX;
location / {
proxy_pass http://localhost:3000;
proxy_set_header X-Real-IP $remote_addr; # http://wiki.nginx.org/HttpPro... | recommended nginx configuration for meteor |
While it is straightforward to update a FCT table from given large table (you have to select fact columns from big table and insert them into FCT table), updating a DIM table from a given big table poses one major problem - slowly changing dimensions.In the big table - It is theoretically possible to have different car... | I have very large table that contains repeated dimensions as strings and it has more than 40 million rows. This table is populated with millions of records every day.The facts and dimensions table would reflect the information inside the very large table. The facts and dimensions are updated with the new information in... | Efficiently sync/create a dimensions and facts tables from a very large table |
Here's how I did it eventually - proxy_pass instead of curl - based on this:https://github.com/vorodevops/nginx-analytics-measurement-protocol/tree/master/lua. The code assumes openresty or just lua installed. Not sure if the comments format is compatible (didn't test) so it may be best to delete them before using it.#... | Maybe this is trivial, but I haven't found anything meaningful or I didn't know where to look...(How) is it possible to to send a curl / whatever command as soon as a certain path is requested?Something along these lines, but that would actually work:location / {
curl --data 'v=1&t=pageview&tid=UA-XXXXXXXX-X&cid=123&dp... | Can a http request be sent with the nginx location directive? |
To Integrate Saml2aws with OKTA , you need to create a profile in saml2aws firstConfigure Profilesaml2aws configure \
--skip-prompt \
--mfa Auto \
--region <region, ex us-east-2> \
--profile <awscli_profile> \
--idp-account <saml2aws_profile_name>> \
--idp-provider Okta \
--username <your email> \
--rol... | I use saml2aws with Okta authentication to access aws from my local machine. I have added k8s cluster config as well to my machine.
While trying to connect to k8s suppose to list pods, a simplekubectl get podsreturns an error[Errno 2] No such file or directory: '/var/run/secrets/eks.amazonaws.com/serviceaccount/token' ... | SAML2AWS connecting to k8s issues |
There's really two issues in your question: how to get KaTeX (the TeX that vscode preview uses) to do what you want, and how to get github-flavored markdown (GHFM)'s TeX to do what you want.Let's look at KaTeX first.There are two ways I'm aware of to manually place subscripts under another symbol in KaTeX. The_under^ov... | I'm editing a markdown file intended for hosting on github in vscode and using the built-in preview functionality to see how it displays.I cannot get the subscripts to display properly for the Expectation symbol, as they do with$$ \sum_{x} $$.I've tried doing this with:$$ \mathop{{}\mathbb{E}}_{\mathcal{h \in H}} $$but... | How can I get subscripts centered below a mathematical symbol in github's markdown, e.g. get expectation to look like summation? |
Have you tried flush_all() function? Docs here. You'll need a bit of logic & state to detect a new deployment or have a special script to perform the flushing.
Updated: look at the absolute path of one of your script: this changes on every deployment. You can use http://shell.appspot.com/ to experiment:
import sys
... |
The title asks it all. The content on the site I'm building wont change very quickly at all and so Memcache could potentially store data for months except for when I put up an update. Is there a way to make it clear the cache every time I deploy the site? I'm using the Python runtime.
Update 1
Using jldupont's answer ... | How can I have Google App Engine clear memcache every time a site is deployed? |
Looks like that's not possible...From Sonatype blog postConfiguring Plugin Goals in Maven 3:The latest Maven release finally allows plugin users to configure
collections or arrays from the command line via comma-separated
strings.Plugin authors that wish to enable CLI-based configuration of
arrays/collections jus... | With Maven I can generate multiple different types of code coverage reports with Cobertura by changing the reporting section of my POM, ala ...<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<formats>
<format>html</format>
... | Generating multiple Cobertura report formats via Maven command line |
I'm not aware of anything like that built in.Sprigprovides most of the useful functions for helm templates but thedict functionsjust cover the primitives.You coulddefineanamed templatethat does the business and recurses down the config dict/map. Thenincludethe template where needed:{{- define "recurseFlattenMap" -}}
{{... | Is there a way to flatten a dictionary with helm? I want to provide environment variables to the application from the chart by flattening a YAML config located in values.yaml. The config can look like. (Not Actual)config:
server:
port: 3333
other:
setting:
name: testAnd would like to provide environment varia... | Flatten Dictionary with Helm |
0
I did it following way:
version: "3.8"
services:
mongodb:
image: mongo:latest
container_name: mongodb
environment:
- PUID=1000
- PGID=1000
volumes:
- /mongodb/cnf:/etc/mongo/
- /mongodb/data:/data/db
command: ["mongod", "--con... |
I am trying to run a MongoDB container on a DigitalOcean droplet and so created a new dir with mkdir -pv mongodb/data then inside mongodb I created a new file with touch mongodb.conf then edited it with nano mongodb.conf so that it looks like this:
systemLog:
destination: file
path: "/var/log/mongodb/mongod.log"... | Docker Compose MongoDB Config /etc/mongodb.conf: Is a Directory |
The best way to answer your question why will be to cite official documentation aboutmatter:vector1 and vector2results in a vector consisting of the elements ofvector1for which there are elements in vector2 with exactly matching label sets. Other elements are dropped. The metric name and values are carried over from th... | I am trying formulate a query to Prometheus. Assume there are three queries A, B and C. I need to return result of B if A>0, else return result of C.While trying this I found some unusual behavior i.e if doing(1 and 0)it's giving 1 and if doing(0 and 1)it's giving 0. Why? | Prometheus logical operators |
Because of the nature of git, where one typically downloads the complete history, large files are to be avoided. Especially large binaries: images, videos, and compressed files.
GitHub blocks files larger than 100 MB and suggests using git-lfs. If you're having trouble with git-lfs ask about that.
If the large file is... |
error report image
I successfully uploaded 1KB file to my github,but failed to upload 1GB file.That is the error report image.what could i do?please don`t use git lfs,because it also report many error.
| report error when i use github desktop to upload my 1GB files |
Try providing an absolute path, instead of a relative path:-v /home/projects/package.json:/user/src/app/package.json | I have the following command:docker run --privileged=true -it --rm \
-w /usr/src/app \
-v ./package.json:/usr/src/app/package.json \
-v .bowerrc:/usr/src/app/.bowerrc \
-v ./bower.json:/usr/src/app/bower.json \
-v ./build/npm.tmp/node_modules:/usr/src/app/build/npm.tmp/node_modules \
-v ./build/npm... | Docker volume command line option mistaking files for directories |
Had to use .yml filedocker buildargument--build-arg VARIABLE_NAME=variable_valueand in Dockerfile useARG VARIABLE_NAMEso the Dockerfile knows it needs to use variable from environment. | GitLab CI allows adding custom variables to a project.It allows to use a secret variable of typefilewhere I specify a Key that is the variable name and Value that is the content of a file(e.g. content of certificate)Then during execution of the pipeline the content will be saved as a temporary file and calling the vari... | How to pass GitLab CI file variable to Dockerfile and docker container? |
9
Yes, release assets on private repositories are private and require authentication to access or download. This is useful if you have an internal tool that you'd like to provide binaries for, but don't want to share with everyone else.
Share
Improve this answer
... |
I think this is a really stupid question but I can't find the answer.
I have a private repo on github. If I create a new release and "publish" it, does anything become public?
I want to keep it all private/internal and I'm not clear whether "release" means public release in any way.
| Github releases - are they private for private repo? |
+25Unfortunately the wp_schedule_event doesn't have 30 min and accepts only these intervals: hourly, twicedaily(12H), daily(24H).In my opinion is a bit strange to have a scheduled event that can change randomly, and probably you should look at a different implementation.
Without discussing your choice I am going to pro... | Is is possible to start the WP-Cron randomly between 30 and 60 minutes?What i haveadd_action('my_hourly_event', 'do_this_hourly');
function my_activation()
{
if(!wp_next_scheduled( 'my_hourly_event' ))
{
wp_schedule_event( current_time( 'timestamp' ), 'hourly', 'my_hourly_event');
}
}
add_action('w... | Wordpress wp_schedule_event randomly between 30 and 60 minutes |
I would check for documentation. Well advanced code should have associated documentation, while fledgling projects are too busy getting their code and architecture done to create documentation, which will probably have to change by the time they release anyway. Basically, writing documentation says to me that you think... | Closed. This question isopinion-based. It is not currently accepting answers.Want to improve this question?Update the question so it can be answered with facts and citations byediting this post.Closed8 years ago.Improve this questionWhen I browse github I have a hard time differentiating high quality code from half-fin... | What criteria do you use to quickly determine if a github project is finished/useable? [closed] |
The Sonar ANT task contains a section on how to configure Sonar to analysis a multi-module build:http://docs.codehaus.org/display/SONAR/Analyzing+with+Ant+Task | I am setting up Sonar through Jenkins Sonar plugin and I have a couple of questions about the way Sonar interprets the directories I give it.sources=srcDir1,srcDir2: from what I understand this is where I pass source dir of my project. My project is actually a multiproject with many source dirs inside. Is it okay to gi... | Passing source and binaries directories to Sonar |
0
There two cool examples (with working sample code) from Apple, that helped me to understand how keychain service works on iOS. I suggest you to look at them, and hope they will help you to resolve your issue:
Generic Keychain : This sample shows how to add, query for, ... |
I'm developing an application for an iPad2 that needs to write some items in Keychain but I don't want it replicates in every computer I plug, doing a backup/restore of the device. I'm using kSecAttrAccessible key to select the kind of accesibility I want with kSecAttrAccessibleWhenUnlockedThisDeviceOnly value to be s... | Do not restore passwords inserted in iOS Keychain issue |
That line in your logfile might matter later, but it's only a [warn] and it's not what handshake_failure means. Handshake_failure means that a cipher suite could not be negotiated -- no cipher suite is supported by both client and server. Look at what ciphers are supported by your server.Edit: I always forget that if... | After strictly following the SSL certificate authority documentation, I'm stumped to solve the reason for this error. When accessing my website via HTTPS Firefox spits out the following error:SSL peer was unable to negotiate an acceptable set of security parameters.
(Error code: ssl_error_handshake_failure_alert)I went... | SSL Cannot Make A Handshake |
Is it possible to limit the size of an android application? (say in Manifest)
Not really. The heap limit of an app is determined by the device, not the app. The only thing an app can do is have android:largeHeap to request a larger heap; there is no way to ask for a smaller-than-normal heap.
Also note that allocatio... |
Is it possible to limit the size of an android application? (say in Manifest)
The case is: The client want the app not to be exceed, say 20 MB. But available memory in device is, say 50 MB. The application is having Webview in one of Activities which keeps on increasing size and hence increases the overall app size.
... | Android Application running memory size limit |
I use that(along with plenty other htaccess security measures)with all my WordPress sites:I use:Options All -IndexesIn my root .htaccess file and have never had issues with either WordPress or search crawlers.I also have anadditional .htaccess filein my /uploads directory for additional security precautions. Some of it... | I noticed that if I go to mysite.com/wp-includes/ then it shows all the files in that folder and I would like to disable it (I think that it's a security vulnerability).After searching online I found an easy solution (adding Options –Indexes in the .htaccess file) but I'm wondering if this may cause any problems with W... | Should I use Options -Indexes with Wordpress? |
I want to label with login_failed/login_successThis is not recommended, track total attempts and failures instead as two separate metrics. It's easier to work with when calculating ratios.Second, is there a way to achieve this task?Have a look athttps://github.com/prometheus/client_java/blob/master/simpleclient/src/mai... | I want to have user login stats using Histograms on Prometheus.I create a timer when I enter the login method, and observe the duration at the end of the method, this is very simple and nice.What I miss is that, I want to label this measurementafterstarting the timer. For example:I want to label with login_failed/login... | Add Label to prometheus Histogram After Starting the timer |
You can embed one command within another, eg:aws ec2 start-instances --instance-ids `ANOTHER-COMMAND`So, try this:aws ec2 start-instances --instance-ids `aws ec2 describe-instances --filters "Name=tag:Env,Values=my_super_tag" --query 'Reservations[].Instances[].InstanceId' --output text` | I can list all machines:aws ec2 describe-instances --filters "Name=tag:Env,Values=my_super_tag" --query 'Reservations[].Instances[].[InstanceId]' --output textAnd then I wish to start all found machines - is the aws cli expression what allow that?The workaround can be applying next aws cli command for received output (... | AWS cli: how to start all machines found by tag |
The suggested solution from theAWS Developer Forums:It turns out that cron has the "from" address hard-coded in the source (q.v. "do_command.c" in the cron source), so one does not have influence over what cron transmits to sendmail (which in our case is symlinked to "/usr/bin/msmtp").However, due to the magic of Linux... | I have a crontab that includes a[email protected]. My server uses msmtp to forward the email to Amazon Simple Email Service. My problem is that output from cron commands never arrives in my mailbox. This is what the msmtp log says:Mar 06 14:26:02 host=email-smtp.us-east-1.amazonaws.com tls=on auth=on user=MY.SES.USER[e... | Crontab email through msmtp -> Amazon SES |
Yes, you can use multiple domains (each with its own SSL certificate) in nginx. You will need a separate server block for each domain in the nginx configuration file. Here's an older reference that can get you startedHow To Set Up Multiple SSL Certificates on One IP with Nginx on Ubuntu 12.04If you are looking to have ... | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Stack Exchange site, ... | Set up nginx to use multiple ssl certificates without having multiple servers [closed] |
You'll get a warning if a resource (e.g. a page) is delivered over HTTPS but it pulls in a resource (e.g. a script or frame) over HTTP.Read this:http://blogs.msdn.com/b/ie/archive/2011/06/23/internet-explorer-9-security-part-4-protecting-consumers-from-malicious-mixed-content.aspxDiffering certificate owner and cipher ... | I want to load an ssl secured page from a different domain (payment provider) into an iframe. As far as I know some (or all?) browsers would warn the user if parts of a page are secured and other not.Is that true?If so, would the user get a warning if the main site would also be secured (but with another owner of the c... | Embedding ssl secured page: browser warning |
You've mentioned that the version used to install the Logstash is v7.9.1, however in your 3rd step, the repository used to fetch the version is v6echo "debhttps://artifacts.elastic.co/packages/6.x/aptstable main"| sudo tee -a /etc/apt/sources.list.d/elastic-6.x.listAre you sure the package was fetched properly ? | I installed logstash 7.9.1 in ubuntu bionic 18.04 machine using following command1. wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
2. sudo apt-get install apt-transport-https ca-certificates -y
3. echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main"| sudo tee -a... | unable to find the directory logstash under '/etc/' after installing logstash |
1
You can use the SqlBulkCopy for copying large amounts of data. Havn't tried it with SQL lite but it should work.
Link 1
Link 2
Update :
Here is a good answer by Marc Gravell. how-to-do-a-bulk-insert-linq-to-entities
Share
Improve this answer
... |
I need insert to large amount of data to sqlite db.
I uses Linq to Entities.
I have problem to adding large amount of data 1M+.
Not enough memory or a very long time.
This code - fast, but requires a lot of memory:
// query - IQueryable of DbfRecord
// db - ObjectContext
int i = 0;
foreach (var item in query) {
db... | Linq and adding a large amount of data |
Use the right clone urlI tried: git clone[email protected]:my-username/other-user/repo.gitA repository url doesn't change based on who you are - it is always the same. When cloning via ssh the bit after:indicates the repository - i.e. the path to the repository on the remote system.If in doubt go tohttps://github.com/o... | What's the right url to use to clone someone else's repo?I can do:git clone https://github.com/other-user/repo.gitbut that
makes me enter my username/password when I push.I tried:git clone[email protected]:my-username/other-user/repo.gitbut it didn't work | Clone a shared repo |
I'm afraid you can not achieve this without changes in kubernetes-dashboard helm chart.According this code_helpers.tpl
...
{{ define "fullname" }}
{{- $name := default "kubernetes-dashboard" .Values.nameOverride -}}
{{ printf "%s-%s" .Release.Name $name | trunc 63 -}}
{{ end }}
...
svc.yaml
...
meta... | I am installing dashboard service using helm. Its create pods and service name like thiskubernetes-dashboard-kubernetes-dashboard. How can remove the duplicatekubernetes-dashboardword from the name.helm install stable/kubernetes-dashboard --name kubernetes-dashboard --namespace kube-systemoutputk get svc -n kube-sy... | Helm kubernetes-dashboard install remove repeated works in the pod and service name |
From Official GitHub:ReleasesareGitHub'sway of packaging and providing software to your users. You can think of it as a replacement to using downloads to provide software.WithReleases, you can provide links to binary files, as well as release notes describing your changes.At their core,Releasesare based onGit tags. Tag... | What is it exactly?For what is it used?How widespread is the usage?How is it usually used? | What exactly is a Release in GitHub? |
If you have enough information in your database to increase this resolution, you can change it in:Edit Graph >> Metrics >> Open your Query >> Min Step | Resolution | I am using Grafana to monitor Kubernetes cluster.
But I see that Grafana just get the metrics every 30s by default. I changed it to 15s (as the picture) but I can not change this to 1s or 2s.The peak in the picture is drawn every 15senter image description hereWho used to modify this one? can you help me? please!Thank ... | How to change interval time in Grafana to monitor Kubernetes? |
+25Only in 2.4, where there is an Nonfatal option to AllowOverride. | I'm in the unfortunate position of having an Apache staging server combined with a Zeus web server. (Not my choice).I'd like to be able to include a Zeus-specific directive in the .htaccess file (e.g. ContentCompressionEnabled) and, if possible, include the Apache equivalent (AddOutputFilterByType DEFLATE) in the same... | Is there a way for Apache to silently ignore unrecognized .htaccess directives? |
You can use, something as below, hereKUBECTL_EXTERNAL_DIFFis an env variable, to use a customdiffprogram with custom flags. So, basically, here we are tellingkubectlto usediff -qrfor displaying the difference. By default, kubectl usediff -u -N.KUBECTL_EXTERNAL_DIFF='diff -qr' kubectl diff -f .ShareFollowansweredMay 31,... | Is there a way to runkubectl diff -f .in that way so that output shows only file names that would be changed withkubectl apply -f .and not every single diff line...? | kubectl diff output to show only file names? |
4
mtrace is not "in C"; it's a utility provided by GLIBC, that has a C binding.
If you're still using GLIBC with your C++ applications, which you probably are, you can still use mtrace (unless you have some custom allocator that doesn't use malloc/free, but then that would ... |
I am a c programmer and I am new in c++. In c we have mtrace() function to trace information about allocation and deallocation memory.
Is there any similar function which could do that but in c++.
| Is there any similar function to glibc mtrace() function in c++? |
0
git remote add dompdf git://github.com/iamfiscus/Codeigniter-DOMPDF.git
git pull dompdf master
You create an additional remote with the first statement (naming it "dompdf").
Then, you pull the branch that you want (master?) from the dompdf repo into your branch.
... |
I've cloned the codeigniter repository https://github.com/EllisLab/CodeIgniter, which in particular creates the application and system folders.
The application folder has sub-folders, libraries and third-party, which are of interest right now.
I'd like to clone this repository : https://github.com/iamfiscus/Codeignite... | Git: How to add a remote, merged in a sub folder of a master repository? |
I have solved this issue by converting this.crtfile into a.pfxfile using following method.To convert.crtto.pfx, we need CSA certificate (Private Key) provided by hosting provider. Below are the steps to convert this:Download and install OpenSSL software from below link based on your system typehttps://slproweb.com/prod... | I want to install the '.crt' certificate I received from a certificate provider to my IIS 7.5 server.
I have tried many times to install the .crt file by clicking on the 'certificates', and it states that it is installed correctly. So I open IIS, select "my server", open "server certificate" which is available on the m... | How to convert .crt cetificate file to .pfx |
Use nginx'supstreamoption to define a pool of application servers; when you proxy_pass, you can proxy_pass to the named upstream:upstream my-upstream {
server 127.0.0.1:9000;
server 127.0.0.1:9001;
}
location / {
proxy_pass http://my-upstream;
}Unless you specify otherwise, requests will be round-robined between t... | How can one allow NGINX to buffer client requests for multiple Django App Servers that all run a WSGI server like Gunicorn? What do I need to change in the config files? | How to allow NGINX to buffer for multiple Django App Servers |
I believe your ingress definition to be almost correct:apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: foo.bar.com
http:
paths:
- path: /service1
backend:
serviceName: service1... | I have 2 questions:1) I have a kubernetes cluster with multiple services and I want to use ingress to dynamically redirect the traffic to the cluster.I expect the configuration to look something like this:apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test
annotations:
nginx.ingress.kubernetes.io/... | Dynamic redirect using ingress |
Load you heap Dump in Memory Analyzer (MAT).
Go to Histogram and see the big size Object.
Now right click on this and select Immediate dominators. It will open a dominator tree and u can identify what is holding your object.
Sometimes when the big size object is local variable you will not be able to see immediat... |
As i have some problems with OutOfMemoryErrors with an application i want to identify the root cause.
This i created a heap dump (PHD) from the IBM VM on the AIX server and tried to analyze it using IBM Support assistant 4.1 and its Memory Analyzer tool.
When the heap dump is parsed ISA asks me if i want to run the le... | How to identify holder of reference to object in Java Memory Analyzer using heap dump |
You can use it like..#!/bin/bash
status_code=$(curl --write-out %{http_code} --silent --output /dev/null https://www.my-site.com/)
if [[ "$status_code" -ne 200 ]] ; then
## do your stuff here
echo "Site status changed to $status_code"
else
exit 0
fiShareFollowansweredSep 22, 2021 at 9:31Vivek ChoudharyVivek C... | I need a cronjob, that check if a page is running.
I think by check if the HTTP response status code is "200".If the status code is not "200" a bash code must be executed.I hope someone can help me with this topic. I tried it by myself but I have no idea how to get the code working. | Cronjob to check if service is running, if not starting service |
You already have an upstream cloned locally so you don't need another clone. Just update your local clone from the upstream and push to the fork. To simplify things name your remote URLsupstreamandorigin. If your local clone already hasoriginrename it toupstreamand addoriginpointing to your fork. Something like this (n... | I know that a forked repocan be quickly synchronizedwith the upstream repo [am I using the correct term?] directly on the GitHub web page, using the button "Sync fork".I'd like to do essentially the same not via some browser, but from the command line, with some kind ofgit ...command. However, I'd like to avoid "clonin... | How to sync forked repo with upstream via command line but without cloning locally? |
This is not a Docker issue but a code issue:
You have: $db = new \PDO('mysql:host=db;dbname=demoName', 'demoUser', 'demoPass');
It should be: $db = new \PDO('mysql:host=db;port=3306;dbname=demoDb', 'demoUser', 'demoPass');
|
I want to get started with docker and created a simple container environment with an nginx container, a PHP-FPM container and a MySQL container.
While the link between the nginx and PHP-FPM container works well I can't seem to link the PHP application server with the database server.
I use docker-compose to minimize ... | Can't connect to MySQL docker container created via docker-compose |
Apparently, providing the DNS with format "DNS:PORT" as a parameter for AddContactPoint was not working. Using the method WithPort did the trick.var cluster = Cluster.Builder()
.WithPort(PORT)
.AddContactPoint("dns")
.WithCredentials("cassie", "some-pass")
.Build(); | Using theDatastax C# DriverI'm trying to connect to Cassandra which was deployed to Azure Kubernetes Services using a Bitnami helm chart.var cluster = Cluster.Builder()
.AddContactPoint("127.0.0.0") // example IP
.WithCredentials("cassie", "some-pass")
.Build();When trying this locally I usekubectl port-forwar... | How to use service name in DataStax and not IP? |
I was able to get ta-lib installed using the following run command.- run: |
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar xvfz ta-lib-0.4.0-src.tar.gz
cd ta-lib
./configure
make
sudo make installShareFollowansweredMar 13, 2022 at 22:37AndroidAndroid1,2501212 si... | My test suites is running on ubuntu-latest (20.04) has TA-Lib as one of its dependencies.Is there a way get GitHub Actions to install them before running my tests? | How do I get GitHub Actions to install TA-Lib in Ubuntu? |
I have found a solution that works and init your scripts when you docker composed up.pro TIP:
If you want to add more files and you have already init the airflow DB or your DB what you can do isdocker-compose down --volumewhat this will do will automatically remove all the data in the data directory. and for init to wo... | I am testing some stuff where I have to init my Postgres DB DDL into airflow Postgres DB when I compose-up it should automatically init for one time as it will be cached afterward as airflow DB works usually. Thanks | DOCKER - Airflow How can i Init my postgres scripts in Airflow DB when i docker compose |
No, it isn'tleakingmemory - it is just making the garbage collector work harder than it might. Actually, the MSDN article is slightly misleading: if the property created a newcollectionevery time it was called, it would be just as bad (memory wise) as with an array. Perhaps worse, due to the usual over-sizing of most c... | According to [MSDN: Array usage guidelines](http://msdn.microsoft.com/en-us/library/k2604h5s(VS.71).aspx):Array Valued PropertiesYou should use collections to avoid code inefficiencies. In the following code example, each call to the myObj property creates a copy of the array. As a result, 2n+1 copies of the array will... | Avoiding array duplication |
IP address ranges or you can check a key few of the top blocked websites... maybe Facebook, Google, Wall Street Journal? Choose a variety. | Because of issues reaching our normal endpoints hosted outside of China reliably when the user is behind the great firewall, we're looking for a way to reliably determine if the user is currently behind the great firewall and use a different set of endpoint urls hosted within China.What we would like to do is some kind... | How do you determine if a device is behind China's great firewall with the iOS SDK? |
You need to installDocker Machinefirst on your local machine. If you useUbuntu, just use this snippet (Update the version from theOfficial Repository Releasesif needed) :$ curl -L https://github.com/docker/machine/releases/download/v0.16.0/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine &&
chmod +x /tmp/docke... | who has ever tried following this tutorial aboutDocker Swarm?https://docs.docker.com/get-started/part4/There is a section called :Create a cluster. What I wanted to do was to create a couple of VMs using docker-machine. Since I use ubuntu16.0.4 so I used following commands to get VirtualBox.sudo apt-get update
sudo apt... | sudo: docker-machine: command not found |
As of May 15, 2019 you can run the Lambda as node version 10.x and the ApiGatewayManagementApi is included in the aws-sdk by default.
https://aws.amazon.com/about-aws/whats-new/2019/05/aws_lambda_adds_support_for_node_js_v10/
|
I am trying to use aws-sdk inside lambda but I can't seem to figure it out.
var AWS = require('aws-sdk');
AWS.config.update();
var DDB = new AWS.DynamoDB({ apiVersion: "2012-10-08" });
exports.handler = function (event, context, callback) {
var url_handler = event.requestContext.domainName + "/" + event.requestCo... | Using aws-sdk inside lambda? (AWS.ApiGatewayManagementApi is not a constructor at Response) |
An ingress controller can completely bypass kube-proxy. The haproxy controller for example,does this and goes straight to endpoints. However itdoesn't use the Ingress in the typical sense.You coulddo the same with the nginx controller, all you need to lookup endpoints and insert them instead of the DNS name it currentl... | I'd like to implement a sticky-session Ingress controller. Cookies or IP hashing would both be fine; I'm happy as long as the same client isgenerallyrouted to the same pod.What I'm stuck on: it seems like the Kubernetes service model means my connections are going to be proxied randomly no matter what. I can configure ... | In Kubernetes, how do I implement session affinity using an Ingress? |
Most config directives can live inside location blocks (i.e., they are not global-only) and it's very common to do this is practice. You should have no trouble setting this up using only 1 instance of nginx.One of the great things about this is that you can set it up this way initially and then change your mind later b... | I'm about to deploy a Django application on a nginx web server, and want to make sure I'm building the system correctly.It seems to be common wisdom that if you are deploying Django on an apache server, then you should still put an nginx server in front of the application to serve static files, at which nginx is more p... | nginx + FastCGI for django application---run two webservers or one? |
10
Okay. I figured it out. You must enable the alternate authentication credentials as described in the following article. After that the importer starts doing its job:
https://web.archive.org/web/20161204015026/https://www.visualstudio.com/en-us/docs/integrate/get-starte... |
I have a couple project in Visual Studio Online (VSO), which I would like to move to my GitHub account. In VSO all projects are not publicly-readable. You must be authenticated using Microsoft Account (MA).
I tried to use the GitHub Importer (https://import.github.com/new) to do that. The importer asked me for read-o... | How to import a project from Visual Studio Online to GitHub? |
You can wrap your app into systemd service and use post-start hook to call extra bash script which punches holes in firewall./path/to/python/app/assistant-ufw-hole-puncher#!/bin/bash
#extra sleep for prespawn script
sleep 2
#punch holes for TCP ports
ports=`sudo netstat -ntlp 2>&1 |grep yourapp | sed -r 's/(.*:)([0-9... | Written program in python, which chooses random port available for TCP and UDP communication. If I enable Linux firewall(ufw) by runningsudo ufw enable. where we can allow any port by givingsudo ufw allow port_number. As the program can take any random port on run, so can not tell ufw to allow any particular port. Is t... | How to enable Linux firewall(ufw) for custom program running on random port |
I believe it is by design that host cannot reach its own containers through a macvlan network. I leave it to others to explain why exactly this is so, but to verify that this is where your problem lies, you can try to ping your container at 192.168.2.74 from another host on the network or even from another container o... |
Im trying to understand the "macvlan" network from docker. I create a new network:
docker network create -d macvlan \
--subnet=192.168.2.0/24 \
--gateway=192.168.2.1 \
-o parent=eno1 \
pub_net
And start new container with the new network:
docker run --rm -d --net=pub_net --ip=192.168.2.74 --name=whoami -t jwi... | docker macvlan - no route to host (container) |
If you have an input variable declared like this:variable "description" {
type = string
}...then you can return its value as an output value like this, in the same module where you declared it:output "description" {
value = var.description
}ShareFollowansweredMar 18, 2022 at 2:10Martin AtkinsMartin Atkins67.8k88 go... | I have a custom terraform module which create an AWS EC2 instance, so it's relying on the aws provider.
This terraform custom module is used as a base to describes the instance i want to create, but I also need some other information that will be reused later.For example, i want to define a description to the VM as an ... | Terraform - How to output input variable? |
You don't allocate space for the file names; you should. You're writing over indeterminate memory. This would probably work better:
void backupf(char *namelist, char *dirname)
{
char in_filename[MAXPATHLEN];
char out_filename[MAXPATHLEN];
char line[MAXPATHLEN];
FILE *filenames = fopen(namelist,... |
My code compiles just fine but when I run it I get bus error: 10
void backupf(char *namelist, char *dirname)
{
char *in_filename;
char *out_filename;
char line[MAXPATHLEN];
FILE *filenames = fopen(namelist, "r");
if(filenames == NULL)
{
fprintf(stderr, "Cannot Open File\n");
exit(E... | Bus Error: 10 in C |
A few hours later I found the answer - seeCreating Badges for Private RepositoriesCreate a status API token, go to your Project’s Settings (present on the top right corner) > API Permissions and create a token scoped to Status.Include the token in the badge code:[.However looking on the published page on github.com, GitHub seems to c... | Is it possible to have a CI badge for a private repo on GitHub? |
The short answer is that you can not use API directly as a data source but you should build a pipeline to transform this into flat-file o populate a database table.The alternative answer is to use Python to connect to the REST API. You can choose to use TabPy or follow some pre-build solutionlike this one. Personally, ... | I need to use two data sources. One is SQL and another one is the response from a rest API.I tried to implement WDC, but it needs an HTML and user need to interact with UI and getting the response.But I don't want to create a html page.Is there any way to use an API response as a data source in Tableau? | How to connect API as data source in Tableau? |
When you edit a table view,
Just next to Query tab (below the table), there is Transfer tab.
You can :hide using "filter by name"reorder using "organize fields"
Works with 7.3.0 | Is it possible to order the columns in a Grafana Table?I have a Table(sourced from InfluxDB)but the columns are in a«wrong»order... I tried changing the order of the Group By clause in the InfluxQL but I get the exact same results. | Grafana - How to order columns in Tables |
Try to put this to your domain.com document root .htaccess:RewriteEngine On
RewriteBase /
RewriteRule ^assets/(.*)$ http://cdn.domain.com/$1 [L,R=301]ShareFollowansweredMay 9, 2011 at 7:26Yuri StukenYuri Stuken13.1k11 gold badge2828 silver badges2323 bronze badges12Although this does redirect all asset requests to the ... | This question already has an answer here:CDN Related : Rewrite Image URLs automatically from .htaccess(1 answer)Closed10 years ago.My existing developed site image url ishttp://domain.com/assets/at present we want to use CDN with pullmy CDN image url ishttp://cdn.cdndomain.com/how to use cdn for my existing site. We do... | Use htaccess with CDN [duplicate] |
As the banner clearly states, this is forStackOverflowCareers, which is invite-only. | I am new here in stackoverflow, and I saw this advert about importing our github project to stackoverflow profile:But really, I cannot find a way to do this. Any helps? thanks! | How to import github project to stackoverflow profile? |
I do not believe this is possible. However, one easy work around would be to split you model into sections that will fit into gpu memory along with your batch input.Send the first part(s) of the model to gpu and calculate outputsRelease the former part of the model from gpu memory, and send the next section of the mode... | From what I see, most people seem to be initializing an entire model, and sending the whole thing to the GPU. But I have a neural net model that is too big to fit entirely on my GPU. Is it possible to keep the model saved in ram, but run all the operations on the GPU? | PyTorch: Is there a way to store model in CPU ram, but run all operations on the GPU for large models? |
+500Per the documentation you linked tohere,Request caching is enabled by implementing thegetCacheKey()method on aHystrixCommandobject...You haven't implementedgetCacheKey(),@Override
protected String getCacheKey() {
return String.valueOf(id); // <-- changed from `value` in example
}Then you also need aHystrixReque... | I am trying to figure out howHystrix request cachingworks but am not following the wiki or end-to-end examples they provide in their docs.Essentially I have the followingHystrixCommandsubclass:public class GetFizzCommand extends HystrixCommand<Fizz> {
private Long id;
private Map<Long,Fizz> fizzCache = new Hash... | Hystrix Request Caching by Example |
Usexrangeinstead ofrange, most importantly inisprime, here:for x in xrange(3, int(n**0.5)+1, 2):xrangedoesn't create the whole list in memory, while range does, but you are not using the results after you iterated over them.Another tip: just test forisprime(n), there is no need to see if it is equal toTrue, that is wha... | I'm currently trying to find the largest prime number contained within another large number.maxlen = 1024
for i in range(1023, -1, -1):
maxlen -= 1
number = ""
for k in range(maxlen, -1, -1):
number = pi[k] + number
if isprime(number) == True:
print numberisprime(... | Memory error in Python for loops |
You can use a cron (ran every minute) to set a status field on the thread table to closed such as.UPDATE threads
SET status='closed'
WHERE lastPost+INTERVAL 3 DAY<NOW()Then in PHP something such asif($thread['status'] == 'closed')
{
// Put your HTML here.
} | Lets say there is a thread ( on forums ) which will be active for 3 days only. Now, after 3 days, I want this thread automatically closed.Can I use reference to time when this thread is created in database, and than makeifstatement if current date + days is bigger than date created, I will print out"<h2>Thread Closed f... | When do I need to use cron? |
Assuming you are using HTTP load balancing - based on the docs NGINX performs load balancing (as expected) on per-request basis and how it actually balances depends on the method selected. So for example if you are using IP Hash - then:
The server to which a request is sent is determined from the client IP address. I... |
I wonder how nginx load balances traffic in the following case:
CLIENT ---> NGINX ---> A GROUP OF SERVERS
Let's say that the client is a .NET app. .NET's HTTPClient maintains TCP connection forever by default (docs) (unless there's no traffic for around a minute, then it's dropped).
Then, assuming that the client sen... | nginx load balancer and long connections - is target always the same? |
"Lines to Cover" are the total lines in your "production" code that you should, in a so-called perfect world, have tests for. This is every line in source code files, which is not a comment, blank or similar non-code line.In the real world, your tests will only cover some of these. The lines that are missed are the "U... | I am looking at the Coverage report within the Measures tab of a SonarQube analysed C++ project. On that page my summary information is as follows:What are the differences between the "Lines to Cover" and "Uncovered Lines" metrics?I have looked onthe sonarqube website's Metric Definitions pagebut the two entries there... | In SonarQube what is the difference in meaning between the "Lines to Cover" and "Uncovered Lines" metrics? |
It doesn’t do both computations at the same time. There is no exposed mechanism to do it parallely. (there is an advanced mechanism using CUDA streams that allows to do this in pytorch, but it is too error-prone for most users) | Is there a way to do something with CPU (compute mean and variance of current mini-batch loss) while GPU is doing back-propagation?Something like this:for input, label in dataloader:
output = model(input)
losses = some_loss_function(output, label) # size = (batch_size,)
loss = losses.sum() / batch_size
# ======... | Pytorch CPU and GPU run in parallel |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.