Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
Add the QSA flag, which means "query-string append" to be sure the existing query string is ported into the rewritten URL.RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !^page-(.*)$
RewriteRule ^page-(.*)$ size-content.php?sef=$1 [L,QSA] | I'am redirecting about 100 hmtl pages to a single PHP page (example.php) using .htaccess. It is working perfectly.I've pagination on that page (example.php) but I am using the original HTML page URL (example.html?page=2&limit=20)so example.html, example1.html, example2.html, example3.html are all redirecting to example... | Can't access post or get from a php page after redirecting |
Probably port 1433 is disabled, so enable it using MS WIndows firewall.or just usenetsh firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = SUBNET profile = CURRENTProbably MS SQL Server Browser Service is not running. So go to Services and start it.or just execute under Run menu%wi... | I am using MS Server 2008 with MSSQL 2008 R2 as database server.Each time for some work I have to login to server via Remote connection. I tried to configure the SQL Server remote connection on, followed the following steps..Created Inbound and outbound rules for TCP port 1433.In SQL Server configuration manager ,all i... | Firewall Port 1433 not opening |
2
I also observed the same behavior on XP. I am trying to clear IE cache programmatically using WinInet APIs. The code at the following MSDN link works perfectly fine on Win7/Vista but deletes cache files in batches(multiple runs) on XP. On debugging I found that API FindN... |
I got a ERROR_INSUFFICIENT_BUFFER error when invoking FindNextUrlCacheEntry(). Then I want to retrieve the failed entry again, using a enlarged buffer. But I found that when I invoke FindNextUrlCacheEntry(), it seems I was retrieving the one next to the failed entry. Is there any approach I can go back to retrieve the... | If FindNextUrlCacheEntry() fails, how can I retrieve info of the failed entry again? |
If your local drive is accessible by the remote server, you can create your backup directly to your drive. Not to be able to create backups on a network share is just a restriction of the GUI. Use the T-SQL BACKUP command and it will work.
Greets
Flo
|
I can connect to remote SQL Server database and I want to create a local database copy on my system. How can I do it? When i try backup through Management studio I cannot copy backup file on my hard drive only on remote system hard drive. Copy database command also doesn't work because I have express version of SQL S... | Backup SQL Server database |
I recommend storing your PHP code in a repository such as SVN, and writing a script that checks the latest code out of the repository and redeploys it when you want to upgrade. You could also have this script run on instance startup so that you get the latest code whenever you spin up a new instance; saves on having ... |
This question is for anyone who has actually used Amazon EC2. I'm looking into what it would take to deploy a server there.
It looks like I can start in VirtualBox, setup my server and then export the image using the provided ec2-tools.
What gets tricky is if I actually want to make configuration changes to my running... | Deploying on EC2 |
1
The use case is that sometimes there is a small issue like a typo or style fix, and it's easier for the maintainer to modify the commit or apply an additional commit and push to that branch than it is to ask the user to fix their commit message or amend their commit to re... |
Why did GitHub allow maintainers to be able to modify pull request?
What is the use case?
| What is the use case for "Github Pull Request allowed to be modified by maintainers"? |
Thanks, guys! I found the problem! I first published my solution directly from Visual Studio to Azure. Then, all functions became read-only, so build process did executed with success, but the files aren't updated.
I erased my functions app and recreated manually, and configured deployment with Kudu, getting from GitH... |
I created an Azure Functions 2.0 (C#) project in VS 2017 and put it in GitHub. If I publish to Azure directly from VS, it works just fine. Then I accessed Azure Portal in order to configure Azure Functions, and there is this option to deploy from GitHub. I configured this option and when I commit something to GitHub, ... | How to configure an Azure Functions (C#) project in GitHub to be deployed automatically? |
Only theupcoming 1.10docker updatecommandwould be able to (eventually) do that (cancel a--rmoption)But the 1.10 version of that command only supports resource configs.It will be extended though in the future.So for now, this does not seem possible.You would have to stop it and relaunch it with the right set of options.... | Is there a quick way to save the state of a docker container started with the --rm flag, as if you didn't specify it? | I started a docker container with --rm Is there an easy way to keep it, without redoing everything? |
Okay, this is probably a little intense for most people's purposes, but here's what I ended up doing.I'm running Linux andwarning:this makes the Python process unkillable by disabling the keyboard for the duration of the script.import time, subprocess
keyboard_id = 11 # find this by running "xinput -list"
# disable... | My alarm clock is a python script that's triggered with Cron. It plays music for an hour usingpygame, gradually increasing the volume.Recently, a weak-willed, semi-conscious version of myself has learned how to turn off the script usingpkill -f alarm.py.Is there a way I configure my Python script or Cron task to preven... | How to create unkillable python script? |
Yourcronjob will run underrootuser and will createEnterprise.txtin the/rootfolder. However, you application runs underwebappuser and operates in/var/app/current. This explains why you can't findEnterprise.txtcreated by thecron(it will be in/root).To rectify the issue, you could change your cron script as follows (I can... | I am trying to deploy a website using Elastic Beanstalk.After crawling every hour and saving it as a .txt file, when the user accesses it, the .txt file loads but it doesn't seem to work.When connected, only the .txt file from the initial deployment is loaded.The current .zip configuration is-.ebextensions
>cron-l... | elastic beanstalk cron seem dosen't working |
A Job is something like you would run only a Pod, it's not managed by a Deployment/ReplicaSet.From the Documentation:A Job creates one or more Pods and will continue to retry execution of
the Pods until a specified number of them successfully terminate.https://kubernetes.io/docs/concepts/workloads/controllers/job/The s... | All Jobs and CronJobs ultimately run as Pods. Apart from stand alone pods other pods are managed by deployments/replicasets. But for Job and CronJob I don't see any deployment or ReplicaSet though the job/cronjob pods have same nomenclature as of a RS managed POD like [deployment.replicaset-name]-XXX.Who manages these ... | Which Kubernetes Object manages Job and CronJob workloads? |
0
I think you can do that with providing several Project Recognizers with different names, for example:
Project Recognizers
=========================================
**Pipeline Jenkinsfile**
Script Path: pipeline/workflow1.Jenkinsfile (or path to the file tha... |
When you create a Github Organisation or a Bitbucket Team/Project, one of the configuration items is:
Project Recognizers: Pipeline Jenkinsfile
There are no other options other than "Pipeline Jenkinsfile", however the fact that the option is even there suggests that the developers envisage people writing their own c... | Custom Project Recognisers for Jenkins Multi-branch Pipelines |
When you run git clone <repo_url> to clone a repository, the default remote origin is created automatically. If the repository is created by git init, there is no default remote, no origin. You need to set it up by yourself.
git remote add origin <repo_url>
repo_url is the path to an existing remote repository which ... |
I created a remote repo then create a local one locally:
git init
then added the files i need using git add then git commit -m "something"
finally git push origin master
I got this error fatal:
'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have t... | fatal- 'origin' does not appear to be a git repository |
You probably need to add your certificate to CA Root.High level plan:Export SSL certificate from IIS.Import that SSL certificate into CA Root.Here isa blog postthat explains everything in detail and with screenshots.If you use Google Chrome, you might need to close and re-open it after installing a new SSL certificate ... | When I run the project with SSL I get a warning in the browser, in every browser: firefox, IE, edge, chrome. When I launch the project it doesn't show me the warning dialog and I don't know if I have any certificate installed.How to check if I have the certificate installed and if not, how to install it? | Certificate error while setting SSL enabled for my Asp.Net MVC project |
It's happening because the static resources are unpacked in your /tmp directory and something else is cleaning up files older than x number of days old in there.Refer toJenkins issue 17526for more info. | I run Jenkins for my continuous integration and I have the following problem. After a couple of days Jenkins is running totally fine, the URL for static files stop being served and the CSS, JavaScript and global look of Jenkins looks broken when it actually runs the jobs as expected.Any idea why?Example of an URL:http:... | Jenkins stop serving static files after a couple of days |
The credentials you use to authenticate your user when logging into the GUI Gitlab or GitHub are not necessarily the same credentials that the Git client program on your computer uses to authenticate when pushing/pulling from the respective remote repositories.I'm going to assume that SSH is being used here. Not overtl... | My predicament:I use Visual Studio and Brackets. Both can have Git integrated into it, however, lets say Visual Studio talks to a repository on GitLab, and Brackets talks to a repository on Github.How does each application know that I can push to the master branch for each repository, even though the accounts for each ... | How does a Git integrated application know that I can push to the master branch? |
UDP is much faster. TCP is slow as it requires 3 way handshake. The load on DNS servers is also an important factor. DNS servers (since they use UDP) don’t have to keep connections.DNS requests are generally very small and fit well within UDP segments.UDP is not reliable, but reliability can be added on application lay... | Why DNS uses UDP as the transport layer protocol? | Why DNS uses UDP as the transport layer protocol? |
None of them should be saving with Unicode endings.Perhaps you are mixing the conceptscharacter encodingandline endings.If you compare the two versions of the file, you will notice that they are both UTF-8 encoded, so no issue there. As others have suggested the issue is with the line endings. Some how with that last c... | Whenever I commit from a different computer than the last commit (same account, different SSH keys though, all using Github for Windows), I get results like the following, where the differences show the entire file as being rewritten.https://github.com/Yttrium-tYcLief/Scrotter/commit/0c012c51bae0db198a10a5fc73294c2eb04... | Multiple computers commiting to GitHub |
You are probably best off installing using Homebrew if you can. That's the simplest and easiest way, and it will also keep you up to date automatically if you normally update Homebrew.If not, then you can install using the script, but you'll need to mark it executable first (e.g.,chmod +x install.sh). That's because,... | I try to install git large file storage on my mac and followed the instructions, but somehow don't manage. I already triedsudo ./install.shbut still receive the message: permission denied. Someone who has experience with installing git lfs on github desktop for mac?Thanks for your help. | git large file storage / github desktop for mac |
It depends a bit on how / where you spin up your clusters. When using Kubernetes, you can useKubernetes SD configurationsto discover your targets or use thePrometheus Operator(see alsohere).If running on EMR you could use bootstrap actions to configure thenode_exporterandjmx_exporter. Seethisfor an example how to do so... | How can I use Prometheus (Which uses a 'pull' approach) to monitor my Spark clusters when I spin up a new cluster every time I need, which means I don't have one steady monitoring endpoint. | Monitoring a lot of small Spark clusters with Prometheus |
Check if this is similar tomicrosoft/vscode issue 80855:I think this is just how the errors where something blockswinptyfrom creating the process show themselves now.You need to get your admins to whitelistc:\Apps\vscode\resources\app\node_modules.asar.unpacked\node-pty\build\Release\winpty-agent.exeSome anti-virus sof... | I have been trying to launch my terminal in vscode but the error below keeps popping. I have check to make sure that my internal integrated configurations is correct but it still not working.
nThe terminal process failed to launch: A native exception occurred during launch (Error launching WinPTY agent: winpty-agent C... | I cannot launch terminal in vscode |
1
It looks like the affinity rules are preventing the pods from starting. In production, you want to make sure the Zookeeper pods (and other pod groups like BookKeeper) don't run on the same worker node, which is why those rules are configured that way. You can increase you... |
Trying to deploy pods in my kubernetes cluster and some of the pods are giving me an error of some storage problems. Screen shot is given below:
I am sure the problem is with one of my worker node. its not a problem with pulsar i think. i'll also share the YAML file here just for a clear view of what the problem is.
... | Apache pulsar on Kubernetes cluster (Local Environment) |
You cannot push single files to directories inside remote repositories. Git works with full directory snapshots and you can only push commits (history).So, to get your file into your repository, you have to create a commit containing the file:git clone https://github.com/Gouravchawla/PyCodeFiesta
cd PyCodeFiesta
cp 'F:... | I have a file in my local repo that I want to push to a directory in my Github repo.I have the following file:F:\Development\Python\Workspace\StringCalculator.pyI need to push this file to the following path of my repo:https://github.com/Gouravchawla/PyCodeFiesta/tree/master/GUIHow do I push the file to this location?I... | Pushing a local file to a directory in github repo |
2
std::copy_n is a template function that performs copy operations. For trivially copyable types (C style structs should all be trivially copyable) it is the same as memcpy - and should have the same performance.
Also, memcpy is not suitable for non-copyable types unlike st... |
In dealing with legacy C code, I need to read and copy the memory location of a C-style struct.
Given a pointer to the struct, should I better use the C-style std::memcpy or the C++ std::copy_n? Or are they equivalent?
To have a concrete, albeit trivial, example:
#include <cstring>
#include <algorithm>
struct Ctype {... | std::memcpy vs std::copy_n for legacy c structs |
I think your code is not nestedloopsmore than 3, is more than 3 nestedif.
Maybe you can improve your getIds() method that never returns null, that's for some reason method should not return null. If is should be null,Then you could use return or break to end the program like :if(list == null)
return;Finally, you can ... | I am working on a java application. Sonar is complaining about the nested loops for having more than 3 nested loops.Code:if(someCondition){
List<Integer> list = getIds();
if(list != null){
for(int id : list){
String str1 = someObject.getStr();
String str2 = someObject.getString();
i... | Reduce the nested loops and improve readability in Java |
I ended up creating a decorator leveraging the Prometheus Pushgateway featuredef push_metric_to_prometheus(function):
registry = CollectorRegistry()
Gauge(f'{function.__name__}_last_successful_run', f'Last time {function.__name__} successfully finished',
registry=registry).set_to_current_time()
... | I am trying to collect application-specific Prometheus metrics in Django for functions that are called by django-background-tasks.In my applicationmodels.pyfile, I am first adding a custom metric with:my_task_metric = Summary("my_task_metric ", "My task metric")Then, I am adding this to my function to capture the times... | Observing django-background-tasks metrics with Prometheus |
Not yet, Docker is too new and changing a bit often for there to be an established convention or standard, apart from using the "latest" tag for well, the latest. | Is there a agreed-upon or official style for tagging Docker images?i.e a docker style of Semantic Versioninghttp://semver.org/ | What is the standard for tagging Docker images? |
Have you triedgit branch -a?This shows you all branches, remote and local. | I am looking for a git command that will show me the branches that are deleted in the remote and hence are obsolete in my local. | Is there anyway i can get to know which of my local git branch has been deleted or removed from remote |
It is likely that your problem is caused bySONAR-8995, which is addressed in 6.3.1 (out soon), and 6.4.In brief, this is a bad interaction between issue exclusions and some updates to the way files are indexed for analysis in 6.3. | I have a project where SonarQube crashes during completion of the analysis for no reason (as far as I can see). We have many other projects which work fine with the same build steps.The completion complains about:ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Unable to read the source ... | SonarQube - java.lang.IllegalStateException: Unable to read the source file - x.jpg with the charset : 'UTF-8' |
*/5 * * * * blctrl /home/blctrl/code/perl/tt01.plThat looks like the syntax for/etc/crontab, the system-wide crontab file. The first 5 words indicate when to run the command, the 6th is the account under which to run it, and the rest of the line is the command to execute.(The clue was that the command is under/home/bl... | I maintained a database (MySQL), I would like back up some data to the database using a perl script. To save my trouble, I would like cron to do it for me, I inserted the following using crontab*/5 * * * * blctrl /home/blctrl/code/perl/tt01.plHowever, cron never does its job, any suggestions to get it done? The Linux i... | Perl script executed by Cron failed |
It turns out that this is not caused by the code itself, but caused by an extra compilation flag. There was a compile flag "managed" used before. By removing this flag, the code does what is expected. | I am currently writing some codes in C and want to utilize GPUs to do the calculation. My code has a test function like this:void test_func(int *x, int N){
// x is allocated using x = malloc(N*(sizeof *x)) elsewhere. It's done on cpu.
// N is a parameter unknown at compile time.
printf("CPU pointer x %p\n",x);
... | Why OpenMP Doesn't Offload Arrays to GPU? |
This can be solved in linear time with linear memory requirements in the following way:
def answer(heights):
minLeft = [0] * len(heights)
left = 0
for idx, h in enumerate(heights):
if left < h:
left = h
minLeft[idx] = left
minRight = [0] * len(heights)
right = 0
for... |
Supposed my input is [1, 4, 2, 5, 1, 2, 3] . Then we can create a
structure like this:
...X...
.X.X...
.X.X..X
.XXX.XX
XXXXXXX
1425123
When water is poured over the top at all places and allowed to runoff,
it will remain trapped at the 'O' locations:
...X...
.XOX...
.XOXOOX
.XXXOXX
XXXXXXX
1425123
we have to find a ... | Calculate trapped water in a structure |
In Chrome Developer Tools switch to the Network tab and on the Size column it will either give you the size of the downloaded content or say (from disk/memory cache).
|
In Google Chrome, how you can check which files are served from the browser cache, and which comes from the server?
| Check whether network response is coming from server or Chrome cache |
Try something like this:
restore verifyonly from disk = 'D:\sample.bak';
|
Is there a short T-SQL query or command line option to check the integrity of a SQL Server backup created with "compressed" option?
I need it to make sure I downloaded it correctly from network.
| How to check the integrity of a SQL Server compressed backup? |
Needed to add authSource
(https://pymongo.readthedocs.io/en/stable/examples/authentication.html#default-database-and-authsource)db_uri = "mongodb://" + usr + ":" + pwd + "@" + \
url + "/test_db?authSource=admin&retryWrites=true&w=majority" | Curious thing, I am running SLS Python Lambdas in a Docker container with the MongoDB instance in a separate container. I am able to authenticate from an exposed port on my host to connect to the instance.However, from inside SLS container for whatever reason it does not want to connect :S# mongodb://root:password@mong... | PyMongo Auth Failure: {'ok': 0.0, 'errmsg': 'Authentication failed.', 'code': 18, 'codeName': 'AuthenticationFailed' |
kubectl delete pvc es-local-pvc1if you see any problem, most likely that the pvc is protected from deletion.finalizers:
- kubernetes.io/pvc-protectionyou need to edit the pvc and verify that finalizers under metadata is set to null using the below patch.kubectl patch pvc <pvc-name> -p '{"metadata":{"finalizers":null}... | i try delete pvc but i cantkubectl get --all-namespaces pvc
NAMESPACE NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
test-logging es-local-pvc1 Terminating es-local-pv1 450Gi RWO 21d | how can i delete kubernetes's pvc |
I think I found a workaround:
The new version of the site only appears when the index.html file changes.
(the first file to be loaded)
If you leave the index.html and only change some js in other files then the site doesn't load the new version.
|
I've run into a problem where I add a web app to my iPad home screen (iOS 5.0.1 iPad 2), and when I open it it appears to be caching something behind the scenes, independent of Safari.
I've cleared out everything from Safari that's available in Settings (Clear History and Clear Cookies & Data), and when I navigate to... | How do you force an iPad home screen bookmarked web app to refresh? |
It sounds to me wrong design. You will have many issues with sqlite, also how will it scale? The main idea of kubernetes is ability to scale with sqlite you could do it but you will spend lots of time on making it work..I would recommend you to useApplication Insightsservice. When it comes to logs its not only storing... | I am evaluating if it makes sense and is even possible to use an SQLite database inside a Kubernetes cluster that runs on Azure.I have little to no experience with Kubernetes and Azure. I have some experience with Docker and I imagine running an SQLite database would be as simple as defining a volume that contains the ... | Running SQLite inside an Azure Kubernetes Cluster |
the manpagehttp://duplicity.nongnu.org/duplicity.1.html#sect22says to give the settings filename as the GOOGLE_DRIVE_SETTINGS env var. locationwise i would guess it would be placed in the current user's home folder. alternatively try setting an absolute path to the file.make sure that the file is formatted as the manpa... | I'm trying to backup to Google Drive with Duplicity, and I can't seem to figure it out. I run this:GOOGLE_DRIVE_SETTINGS=gdrive duplicity / pydrive+gdocs://*******[:*********]@other.host/server-backupand I get this:File "/usr/local/lib/python2.7/dist-packages/pydrive/auth.py", line 314, in LoadClientConfigFile
rais... | Backing Up To Google Drive with Duplicity Not Working |
It would be easier to help you if you were giving the code which is actually analyzed and the precise issue you get in SonarQube. I couldn't reproduce any issue with the code you posted, but I could reproduce one withreturnstatements in everyifblock (based on the note at the end of your message).function test(searchQue... | I just found one misleading issue in the SonarQube,
we have code as follows (JS){…}
function test(searchQuery, role) {
console.log("inputs: " +searchQuery + ", " + role );
if (!searchQuery && role) {
console.log("first");
}
if (searchQuery && !role) {
console.log("sec");
}
if (sear... | Javascript IFs (sonar false positive?) |
You have a trailing dot in the domain name, this leads to the assumption that markovic-q9 is already a third level domain. The setup allows only lower case alphanummeric characters in the subdomain. | I am trying to setup Kubernetes cluster on AWS
I have hosted zone created by Route53 RegistrarWhen i try
kops create cluster --zones "eu-central-1a","eu-central-1b" --master-count 3 --master-size=t2.micro --node-count 2 --node-size=t2.micro --name=marinche.markovic-q9.com.markovic-q9.com. is my Hosted ZoneAlthough I ed... | Which cluster name is valid DNS name? |
For TCP, it does keep track of connections.For UDP, each outgoing packet creates (or refreshes) a temporary rule to forward inbound packets back to the local source of the outgoing UDP packet. | When a firewall lets packets sent in response to a request pass, how does it know that certain packets are associated with a request sent from inside the network?
Does it keep track of TCP connections or does it use some kind of a session?For example, my browser makes a request that goes through the firewall in the rou... | How does a firewall know not to block response packets? |
The output declaration should be:output:
tuple id, input_for_a, input_for_b, input_for_a_b into(downstream_a, downstream_b)In alternative, you may want to consider using DLS2 which does not have anymore the single-channel usage requirement. Read more about ithere.ShareFollowansweredJul 7, 2020 at 9:19pditommasopditomma... | I'm implementing a Nextflow workflow where each process can give multiple outputs that may be needed downstream on different processes.process multiple_outputs {
input:
tuple id, input from previous_process
output:
tuple id, input_for_a, input_for_b, input_for_a_b into downstream
}Nextflow documentation st... | How do I send a process output to multiple channels in Nextflow? |
Use Git for source control and get yourself a free (or $7/month if you want private repos)GitHubaccount (an online repository where you can push your changes).This way you'll get the benefits of a modern source control system, plus free online backup and online availability of your source code.Even for a lone developer... | As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened,visit the help ... | Backing up your code to the cloud [closed] |
This can happen when you don't have SSM agent installed on the instance you're trying to access. For a list of instances where you can run SSM commands, run:
aws ssm describe-instance-information --output text
From there, you can grab an instance ID and then run the send_command command with that instance.
|
I'm trying to use boto3 to run ssh commands on EC2 instances.
I read this guide:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/troubleshooting-remote-commands.html
and I did everything of what they wrote there but I keep get error message:
>>>import boto3
>>> ec2 = boto3.client('ssm')
>>> a = ec2.send_command(Ins... | SSM send command to EC2 instance Failed |
Assuming you have thefopen HTTP wrapperenabled...$fp = fopen(
'http://somedomain.com/index.php?option=csome_option&view=some_view&key=some_key&format=some_format',
'rb');
if ($fp !== false) {
fclose($fp);
} | I would like to know if, and how, I can call or execute what otherwise would be known as a cron jobIf I were to enter this crontab through my host cron manager interface it would look like:wget "http://somedomain.com/index.php?option=csome_option&view=some_view&key=some_key&format=some_format"Is it possible to run this... | execute http (otherwise know cron job) whenver page is loaded (php) |
Kubernetes provideslabels and selectorswhich can be used to select the role assigned to a node.To select controlplane nodes, use a selector to select that role:# kubectl get nodes --selector 'node-role.kubernetes.io/controlplane'
NAME STATUS ROLES AGE VERSION
cp01 Ready controlplane,etcd 90d v1.26... | How via command line can I detect if a Kubernetes node is a master/control plane or not? Is there an environment variable I can check? | Programmatically detect if a Kubernetes node is a master/control plane |
What are you using in section:String SMTP_USERNAME = "smtp_username";
String SMTP_PASSWORD = "smtp_password";The Sending authorization policy looks correct and more ever it is not required if your ses-smtp-user and SES verified domain in the same account, you need to make sure that you're using the credentials you crea... | I'm running the C# code listed athttps://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-net.html, trying to send a test email from an EC2 instance. I can easily run the equivalent code using the gmail SMTP server, but when I use SES as my SMTP server I an SmtpException with the error message:The SMTP se... | "Authentication required" SmtpException trying to send mail from EC2 instance |
6
Yes, in main() you assign what _array() allocates to *a but never free it. To fix it, you need to delete a;.
Share
Follow
answered Sep 28, 2022 at 7:53
lorrolorro
10.8k2323 silver badges36... |
Is there any memory leak in the below code section. I have a class A and a method that returns a pointer to vector of type A.
class A{
public:
shared_ptr<int> a;
};
vector<A>* _array(){
// some code
return new vector<A>();
}
int main(){
vector<A> *a = _array();
}
| Memory leak with type vector<A>* in cpp |
You can do it this way:import boto3
s3 = boto3.resource("s3")
s3_object = s3.Object("your_bucket", "your_object_key")
print(s3_object.last_modified) | According to this answer:https://stackoverflow.com/a/9688496/13067694>>> import boto
>>> s3 = boto.connect_s3()
>>> bucket = s3.lookup('mybucket')
>>> for key in bucket:
print key.name, key.size, key.last_modified
index.html 13738 2012-03-13T03:54:07.000Z
markdown.css 5991 2012-03-06T18:32:43.000Z
>>>I can do so... | find last modified date of a particular file in S3 |
0
Basically context is not for passing an object, just to pass an identifier (such as an address) so that the specific item can be identified.
This is different from NSNotification that can pass an object declared as: object:(id)anObject, not context:(void *)context.
From... |
Under ARC, I create a NSDictionary which I assign to a property. Then I set it as the void* context parameter of KVO:
[obj addObserver:self
forKeyPath:kp
options:NSKeyValueObservingOptionNew
context:(void*)dict];
The KVO programming guide states that:
Note: The key-value observing addObser... | How to deal with a void* cast under ARC? |
1
Here it's been discussed in detail. What you'll need to do is use Memory Profiling and periodically check which the memory Heap to see what's allocated when it shouldn't be.
How to debug running out of memory on Windows Phone
Share
Improve this answer
... |
I am working on Windows Phone 8 app.
I am working on Coverflow feature, i am trying to load 600 items but it always shows Out of Memory Error
Code:
<DataTemplate x:Key="DataTemplate1">
<Grid VerticalAlignment="Center" HorizontalAlignment="Center">
<Grid.RowDefinitions>
<... | WP8 Out of Memory error while loading Images |
So the path is the URL which will be exposed by the Nginx to world outside. What happens to that path internally depends on the action's sub attributes, some examples:Here the/coffeeis what end user sees but the request is sent to root of coffee service. So if the coffee would be a service in K8S running at 8080, the r... | I am abit confused on the kubernetes nginx virtual subroute.https://docs.nginx.com/nginx-ingress-controller/configuration/virtualserver-and-virtualserverroute-resources/#virtualserverroute-subroute"In the case of a prefix, the path must start with the same path as the path of the route of the VirtualServer that referen... | kubernetes nginx virtual server subroute |
While there are other ways to do this, the cron will look like:* * * * * /usr/bin/curl "https://xxxxxxxxx.com/scheduled_messages".One of those other ways could berufus-scheduler. | I need a cron job to write into my crontab that every after one minute calls a URL of rails application that triggers a method and runs a scheduled job.I did not use whenever gem because it reboots the environment and i think it will strain my application. So i preferred to run a full system cron job independent of the... | Cron job that calls a url for a rails app every 1 minute |
This error message means that either your repository or the remote repository is broken in some way.
When Git performs a fetch, it negotiates which objects it already has with the remote server. The remote server then sends a pack that contains deltas (that is, sets of changes) against either other objects in the pac... |
I have a Django webapp running on a WebFaction Linux server. Up until two days ago I could use git as I expected to: changing the files locally, and then pulling the code in the server.
However, today this happened when trying to pull in my server:
remote: Enumerating objects: 69, done.
remote: Counting objects: 100% ... | Git fatal error: can't pull code to my server |
Enabling the Firewall/Security Groups/ does not DOWN the server, it is still up and running but maybe inaccessible to you, as you might have locked yourself from it.This is exactly the reason why the EC2 Security Groups are there, so you can block access to specific ports and allow access only from specific ports for m... | Few days ago I configured firewall on EC2 in AWS. But, the problem was when I configure firewall in EC2, that server went down. Then when I remove this firewall, then the server went up again. but after restarting the server, it was down. then when I disabled firewall from the server it gone up, then remains ok also af... | firewall configuring on EC2 in AWS |
It was always possible to share a repo using HTTP with a fairly minimal web server setup. Or you could set up an SSH server. Or use a shared folder (though you would still want to put a bare repo on the file share, and then make clones for each developer's local).
(You also could transfer info back and forth on di... |
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 5 years ago.
... | how did developers share git repos before GitHub? [closed] |
The URL has the time it expires at.
Signature Version 2
htt ps://bucket.s3.amazonaws.com/foo.txt?AWSAccessKeyId=AKIAABCDEFGHIJK&Expires=1508608760&Signature=xxxxxxxxxxx
Expires gives the time in Unix timestamp (in seconds) and Coordinated Universal Time (UTC) .
$ date -d @1508608760
Sat Oct 21 17:59:20 UTC 2017
You... |
If I have a generated Presigned URL that expired, should I be doing get_headers() (in PHP) to see if a 403 Forbidden error is thrown, otherwise use that same URL? Or is that a bad idea because it's an unnecessary GET request? Should I always just regenerate a new Presigned URL every time? I'm a little confused because... | Amazon S3 - How to Check if Presigned URL is Expired? |
FIXED! My issues were related to my desktop folder syncing with iCloud!This posthelped.At some point, I may have upgraded my OS or changed iCloud settings and it seems to have auto-converted my desktop “coding” folder to an iCloud-enabled folder. THis allowed git to work right away for a short time, but I assume after ... | Today, I created a new Rails 7.1.2 app and and a new remote Github repo calledgardening_by_zip. After a few successful git commits and git pushes, I suddenly got errors and warnings when working in Git:When I run:git branch -aI get:warning: ignoring ref with broken name refs/heads/main 2Where is the "main 2" ref coming... | Git Issues with a new project: ref with broken name refs/heads/main 2 |
Instead of running let's encrypt on the host, you should do everything inside Docker. And the best is there is already a solution for that: https://hub.docker.com/r/nginxproxy/acme-companion
This enables the proxy to automatically obtain and renew certificates.
|
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
... | Letsencrypt + Docker - the best way to handle symlink? [closed] |
You can used symbolic link.Remove the current php executable fileThen.ln -s /path/to/php7.0 php (location of php executable file) | This question already has answers here:How to get CRON to call in the correct PATHs(15 answers)Closed7 years ago.I'm using a cron job that runs a PHP script like this:* * * * * php /path/to/script schedule:run >> /dev/null 2>&1But is running with older version of PHP. When I runwhich PHPI get/path/to/php7.0, and I need... | How to change default PHP path used by cron [duplicate] |
4
Nothing will happen, the entire result set is not loaded into memory. The maximum available memory will be used and re-used as needed while the result is prepared and will spill over to disk as needed.
See PostgreSQL resource documentation for more info.
Specifically, ... |
I want to set up a Postgres server on AWS, the biggest table will be 10GB - do I have to select 10GB of memory for this instance?
What happens when my query result is larger than 10GB?
| What happens when a SQL query runs out of memory? |
5
This is set in the .gitconfig file You want
[init]
defaultBranch = main
Through tortoisegit you would do settings→Git→Edit systemwide gitconfig and change defaultBranch from "master" to "main". This requires admin. Alternatively you could edit the global .gitconfig a... |
In keeping with the times, GitHub has changed terminology from master to main,
but my TortoiseGit still uses master as the name of the main branch.
So when I push my local repo to Github, there are now 2 branches in GitHub (main and master) which causes confusion.
How to make TortoiseGit change to using main as the de... | How to change terminology from 'master' to 'main' for TortoiseGit? |
Grafana requiresld-linux-x86-64.so.2. However Alpine doesn't have this dynamic library. You need to installlibc6-compat.lddlet you know which library grafana needs.ldd /grafana/bin/grafana-serverHow to installld-linux-x86-64.so.2apk add libc6-compatorapk update && apk add | I am on Alpine Linux and am trying to launch grafana. I downloaded it using the following commands:wget https://dl.grafana.com/oss/release/grafana-7.3.7.linux-amd64.tar.gz
tar -zxvf grafana-7.3.7.linux-amd64.tar.gz
mv grafana-7.3.7 grafanaWhen I try to run the executable./grafana/bin/grafana-serverit shows the error:sh... | Grafana executable not working - error file not found |
Have you tried to run:eksctl get clusters --region [region]What's your default region configured, probably you have it set up to a different one than the one where you created the cluster, e.g.:$ eksctl get clusters
No clusters found
$ eksctl get clusters --region eu-west-2
NAME REGION
eksworkshop-eksct... | I am currently trying out aws eks and I am havin a problem managing my cluster via eksctl. Now creating a cluster via eksctl works just fine usingeksctl create cluster --region [region] --name my-clusterThe cluster comes up correctly and it also shows in the AWS console Web GUI but if I try to get it witheksctl get clu... | eksctl "no clusters found" |
In my experiments, thebeforecursor is ignored.In v4 you can search forward by pages, as in thisquery.graphqlgist.history(first: 100, after: "d1b7ccc044be72490525a3fe1b819440f4927cba 0") {
...
}In v3 you might be able to use theSearch Commits APIthat is being previewed. However, it only searches the default branch. | Is there a way in Github v4 API to get all the commits after a given commit?I have tried this, but it doesn't give me any result.{
repository(owner: "karthikeayan", name: "puhar-petti") {
ref(qualifiedName: "master") {
target {
... on Commit {
history(last: 100, before: "d1b7ccc044be724905... | GraphQL - How to get all the commits after a given commit? |
You are almost there. Similar to how you created multiple dictionaries forSVCmodel, create a list of dictionaries for the pipeline.Try this example:from sklearn.datasets import fetch_20newsgroups
from sklearn.pipeline import pipeline
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.svm import SV... | Suppose I have thisPipelineobject:from sklearn.pipeline import Pipeline
pipe = Pipeline([
('my_transform', my_transform()),
('estimator', SVC())
])To pass the hyperparameters to my Support Vector Classifier (SVC) I could do something like this:pipe_parameters = {
'estimator__gamma': (0.1, 1),
'estimator... | Using Pipeline with GridSearchCV |
On an EC2 environment, go to AWS Cloud9 > Preferences > (in the Preferences tab) Project Settings > scroll down to Stop my environment (or click EC2 Instance in Project Settings section on the sidebar) | While setting up the AWS Cloud9 EC2 instance, I selected 30 mins for auto-hibernation. I would like to change this toNever. How do I do that? | Changing the auto-hibernate settings on a AWS Cloud9 EC2 Instance |
You could useJob Status Check Functionswithdependencies between jobs.For example:jobs:
job1:
continue-on-error: true
# Do your stuff here
job2:
if: ${{ always() }}
# Execute your post run command hereI've created a sample workflow to showsomething similar working hereusingcontinue-on-errorwith this ... | Is there a way to execute a command post-run, no matter if the previous status was a success or failed something similar to post and always syntax in jenkinsfileI have triedcontinue-on-error: truebut this will make failed step as passed | How to execute command Post run in github actions? |
Use thecrlcommand from OpenSSL:openssl crl -in file.crl -textFor more information seethe documentation. | Closed. This question needs to be morefocused. It is not currently accepting answers.Want to improve this question?Update the question so it focuses on one problem only byediting this post.Closed10 years ago.Improve this questionI have a problem with certificate revocation list for ssl certificates.How can I check expi... | How to check expiration date of crl file [closed] |
After some testing (with v1.20) I see that env variables in Pod template are updated immediately (it's just a reference to external values).However the container does not see the new env variables... You need at least to restart it (or otherwise delete and recreate the pod). | Suppose that I have aDeploymentwhich loads the env variables from aConfigMap:spec.template.spec.containers[].envFrom.configMapRefNow suppose that I change the data inside the ConfigMap.When exactly are the Pod env variables updated?(i.e. when the app running in a pod sees the new env variables)For example (note that we... | Kubernetes: when exactly envFrom imports the values from ConfigMap? |
About the first warning message this is not an error but a warning : since Sonar 3.5 this is possible to get the code coverage relating to each unit test. Here the message just says that this feature is not activated which is expected by default. Nevertheless I do agree that this warning message can be misleading.About... | Maybe, this question is silly but I'm very new. I try to search without luck.I got two errors when building maven project with sonar:No information about coverage per test.Although I had test code and these testing classes cover the code.The global property 'sonar.doxygen.deploymentPath' is not set. Set it in SONAR and... | set configuration properties in sonar |
UPDATE January 2024:Amazon SNS now supports Google FCM v1 API. It is now possible to create AWS SNS Android mobile push notifications via FCM v1 API when creating new SNS platform application. You can also upgrade your existing applications with a single call to the Amazon SNSSetPlatformApplicationAttributesAPI action.... | I'm currently using FCM (legacy) to send push notifications to my customers' Android devices from AWS SNS by adding FCM as a platform endpoint.I've recently received notification from Firebase that I need to update my application to the latest Firebase Cloud Messaging API, and migrate away from the legacy HTTP protocol... | Firebase Cloud Messaging API (V1): AWS SNS Platform Application |
You "check out" the version you want: git checkout dd2cf7a782f89 should do it (i.e. you can use just part of the changeset hash).
|
How do I rollback my local files to a previous Git commit from the Terminal? I've read the other similar questions but being a newbie to GitHub I'm still a little puzzled.
My previous commit I want to rollback my local files back to is called
dd2cf7a782f89ba274a748e0cd704d4c2eb82ce6
| Rollback local files to a previous Github commit |
Thanks to the comment about the Github emoji api I was able to figure out something for this. Here is my solution but I will keep this open for a little bit if anyone has any other ideas or improvements.(I used local storage to not spam the API but I dont think that works in the SO sandbox)https://jsfiddle.net/sushik/... | I am working on formatting a response from the github api and commits sometimes use the colon type:shortcode:to display emoji, for example::bug:=> 🐛Does anyone know of a javaScript library or a method I can use to convert those shortcodes back to display the emoji... I guess convert them to unicode? | How to display the pictograph emoji from a colon shortcode value? |
You would need to use theGitHub Review APIin order to list the reviews on a PR:GET /repos/:owner/:repo/pulls/:number/reviewsThat can be part on awebhookthat you manage, triggered onpull-request review event.If you detect 2 reviews, you call thePR API for merging.PUT /repos/:owner/:repo/pulls/:number/mergeSo in short, I... | I want to ask github to detect if a pull request has two approval. If it does not, the merge will be rejected. Is there a way to do it?
Thanks | Is there a way to config merging pull request only after at least two approval for Github? |
As you can see it from thesource, view cache is enabled by default only onproductionenvironment. If you don't need caching ondevelopment(or other environments) you can omit setting it explicitly.How view caching works instead is pretty simple. If enabled, express stores compiled template in process memory and renders t... | Express API:view cache: Enables view template compilation caching, enabled in production by defaultI have 2 questions:In app.jsview cacheisn't explicitly set in the development block, should it be?How does this caching mechanism work; is it analagous to memcache? | When using Express with NodeJS - How Does View Cache Work? |
1
The heroku-18 stack only supports Ruby 2.4.5 and 2.5.3.
See https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
You should upgrade Ruby in your app, or downgrade to the heroku-16 stack.
Obviously, upgrading is always better than downgrading.
Shar... |
I am fairly new to programming and would like some assistance with a problem.
I am currently facing with Heroku. I'm trying to push my Ruby on Rails app to Heroku using Git push Heroku master, but I keep getting 2 errors stating:
An error occurred while installing ruby-2.3.0
! This version of Ruby is not availa... | Ruby On Rails Error While Pushing To Heroku |
At first glance it might be done following this steps:Create new cluster in the new zoneDeploy apps to the new clusterCheck everything is started successfullyRedirect traffic to the new cluster via switching NAT/Load Balancer/DNSShut down/Destroy old clusterShareFollowansweredOct 3, 2018 at 10:22Konstantin VustinKonsta... | We have a working kubernetes cluster in one zone on aws, we want to move it to another zone.The k8s cluster is installed with the help of kops.We don't need zero down time. | How to move kubernetes cluster to another aws zone |
Amazon itself only provides the basic platform where you can run your services on. Therefore there is no existing pre-built solution from Amazon available to monitor services.
However there are some alternatives to consider:
You can use Amazon Cloudwatch custom metrics to monitor your services
...or you use monit to... |
Currently I have a server - Amazon EC2 instance type. Through AWS console, we can monitor our instances (server) CPU utilization, disk read etc..
Is there any way through which I can monitor my application services - like tomcat, mysql, apache etc.. Basically, whenever the tomcat or mysql is stopped, I need an email ... | Monitor production services (tomcat, MSQL and apache) using amazon ec2 |
There is very little difference between the syntax and usage oftermVSphrase. However, search behavior in handlingphrasescan be customized in waystermscannot, which can be used to improve performance:allowed operatorsphraseFieldsphraseSlopTermsare intended for matching text fields, wherephrasesare intended for more comp... | How arephraseandtermdifferent in aStructuredquery?I have this data in my CloudSearch domain:{
"guid": 9,
"operating_systems": [
"12345", "123"
],
"manufacturer": "sealand",
"model": "gaming tree whale plum",
"identifier": "gaming tree whale plum",
"type": "computer",
"created_at"... | What is the difference between phrase and term in structured queries? |
Docker's default networking option, --net=bridge introduces overhead due to NAT packet rewriting, noticeable with high packet rates.
Network performance can be improved by using --net=host, instructing Docker to not create a separate network stack for the container, allowing full access to the host network interfaces... |
Has anyone else seen performance issues with running Redis in a Docker container environment?
Here's what I've noticed...
Setup A: Local machine, traditional Redis install
Setup B: Local machine, using canonical Redis image https://registry.hub.docker.com/_/redis/
I've got an identical HTTP server on my local machine ... | Running Redis with Docker (performance issue) |
You don't have any suitable column (numeric type, e.g. int, float, ...) inzf1_tabletable, so that's a reason why editor is not offering any column in the select section.Or very likely you don't have proper permissions:https://grafana.com/docs/grafana/latest/datasources/postgres/#database-user-permissions-importantSo us... | I am using Grafana for visualisation for my Mariadb and Postgres databases. On Mariadb, there are suggestions in the query builder for the column row but not on Postgres. If I type the name myself, it shows the data correctly but no suggestion is shown. Can anyone help? | Grafana Column no value suggestion in query builder |
http://mherman.org/blog/2013/09/16/managing-multiple-github-accounts/This blog post does a great job of detailing a way to manage both accounts.Basically, you'll create an ssh config file and switch between them withssh -T <profileName>You'll need to store the keys in seperate files, however. | I have a personal account and a work account on github, and I want to be able to push and pull to whichever I want.Github won't let me use the same SSH key for both accounts, so how should I play this?If I try to generate another SSH key, it either overwrites the old one, or doesn't create a new one - should I just sav... | Easy way to have 2 GitHub profiles on my computer? |
The change isn't only in the parameter name it's also a change to Mount syntax.
You should replace
volumes=['/home/airflow/scripts:/opt/airflow/scripts','/home/airflow/data:/opt/airflow/data']
with:
mounts=[
Mount(source="/home/airflow/scripts", target="/opt/airflow/scripts", type="bind"),
Mount(source="/home... |
We have Airflow running (using Docker compose) with several DAG's active. Last week we updated our Airflow to version 2.1.3.
This resulted in an error for a DAG where we use DockerOperator:
airflow.exceptions.AirflowException: Invalid arguments were passed to DockerOperator (task_id: t_docker). Invalid arguments were:... | Airflow DockerOperator volumes and mounts |
2
In /etc/nginx/nginx.conf
add the variables you need using:
passenger_env_var VARIABLE_NAME "value";
Share
Improve this answer
Follow
answered Mar 25, 2015 at 16:52
NilAndNullNilAndNull
8... |
I have deployed my Rails 4.2.0 app into a Ubuntu 14.04 VPS using NGINX, Unicorn and Capistrano. Everything works fine except by the missing of my secret_key_base in production environment.
Here is my secrets.yml production block:
production:
secret_key_base: <%= ENV["APP1_SECRET_KEY_BASE"] %>
In my ~/.bashrc in the... | Rails, NGINX, Unicorn and Capistrano: Missing `secret_token` |
You could try theMicrosoft Enterprise Library Caching Application Block.Example utility function for caching on demand with a sliding timeout:static T GetCached<T>(string key, TimeSpan timeout, Func<T> getDirect) {
var cache = CacheFactory.GetCacheManager();
object valueCached = cache[key];
if(valueCached !... | I want to be able to cache a few objects without referencing System.Web. I want sliding expiration and little more... Is there really no where to go but to build my own using a Dictionary and some selfmade expiration of objects - or are there something in the .NET framework I've totally missed out on? | Caching in C# without System.Web |
What I'm trying to understand here is is seems that passing in a parameter or vector expression into an aggregator is optional - and if it is, what is queried when you omit the vector expression?If you don't pass an explicit by/without clause it's the same asby().Is this format an artifact of the Go programming languag... | I'm new to Prometheus, I'm trying to understand the syntactic rules of a PromQL query. From the docs, it states<aggr-op>([parameter,] <vector expression>) [without|by (<label list>)], which makes sense given the examples they show.However from the Robust Perception blog he shows some queries likesum without (cpu)(rate... | Understanding the structure of a PromQL Aggregation? |
-2This can't be done using a single expression. At least not by the legacy Unix (i.e., POSIX) cron implementations since they have no concept of "first monday" (or any related concept; e.g., "second tuesday"). You'll have to explicitly specify the dates of interest. For example,0 0 3 jul * # july 2023
0 0 2 oct * # oct... | I wrote following cron expression but aws say invalid cron expression. Im trying to setup schedule of glue job.0 0 11 ? 1/3 2#1 *tried following cron expression but its showing as invalid in aws0 0 11 ? 1/3 2#1 *0 11 ? 1/3 2#1 * | what should be the cron expression if job should run first monday of every quarter(jan, apr,july, oct) at 11:00 am EST? |
That actually seems supported on GitLab only now (Jan. 2021):
Users can now click at the beginning of a line and drag the comment marker across multiple lines to highlight and reference multiple lines when leaving feedback in an MR.
See GitLab 13.8 (January 2021)
Click and drag multiline merge request comments
Commen... |
I want to comment multiple lines in a commit. I googled for that and found multiple instructions that all mention that one have to click the blue plus icon like here or at How to select/comment on a range of lines in github pull request?:
However, when I hove over this section with my mouse, no blue icon appears. I t... | comment multiple lines in gitlab without blue icon? |
You cannot modify it once you launch RDS instance.If you really want to change it, then take a snapshot of your instance & create new instance with that snapshot for your required DB name. | I had only one Schema called "Test". It shows up in Dashboard next toDB Name(in yellow in the image below):I added another Schema to my instance via MySQLWorkbench, lets say its called "NewDB".How do I change theDB Nameto my new Schema, "NewDB", in my Dashboard? | AWS: RDS Instance change DB Name |
Short answer: no. The webserver can't directly access files outside of the document root. If you think about it, there would be quite a security problem if it could. What you can do is rewrite to a file within the document root that includes or reads from the file that is located outside of the root. (Moved from commen... | Here is a representation of my directory structure:/var/www
/html/site
.htaccess
/secret
file.phpI'd like to use the.htaccessfile to rewrite url requests made tohttp://example.com/files/1234to the codefile.phpsitting outside of the webroot. This is for security reasons, the other developers I'm working with... | .htaccess, use mod_rewrite to rewrite to a file OUTSIDE the web root |
I have never worked with the windows server before it should be the same as a docker in Linux VM.First, you need to pull docker images for deepstreamdocker pull nvcr.io/nvidia/deepstream:5.0-dp-20.04-tritonand then try to run sample apps provided in the docker image.Referthisfor the procedure.if you are interested in p... | System: I've a Windows Server 2019 OS installed with aNVIDIA Tesla T4 Tensor Core GPU.Goal: Planning to read real time streaming videos from an IP camera and to further process frame by frame. Goal is to leverage NVIDIA DeepStream SDK, but issue is, itisn't availablefor Windows OS. So, I'm thinking on the docker lines,... | Can I run NVIDIA DeepStream SDK in Windows Server 2019? |
1
The default is to allow the WiredTiger cache to use slightly less than half of the total RAM on the system.
The process normally determines the total RAM automatically by querying the underlying operating system.
In the case of a Docker container which has been allocated... |
We run MongoDB mongod processes inside Docker containers in Kubernetes with clear memory limits.
I am trying to configure the mongod processes correctly for the imposed memory limits.
These are the information I could collect from the docs:
The memory usage of MongoDB is correlated to the WiredTiger cache size. Its i... | How do i calculate WiredTiger cache size in a docker container? |
You can use GitHub API V3 to search issues and PRs. For example, if I want to search all issues on the reponodejs/nodecreated for the durationOctober 6, 2017 – October 13, 2017you can make the following request -https://api.github.com/search/issues?q=repo:nodejs/node+created:2017-10-06..2017-10-13.
From the JSON searc... | I want to get statistics for the number of issues opened/closed for a repository during a specified period of time. I can view this information in GitHub by clicking the insights tab.For example:https://github.com/nodejs/node/pulseCan I pull any of this information via the GitHub Rest API v3? I was looking through the ... | Is there any way to get repository insights via the GitHub Rest API v3 |
i personally like thegit archive command. it pulls out a given commit and saves it. no version control, just the files that make up said commitexamplezipcommand:git archive --format=zip --output /full/path/to/zipfile.zip masterexampletar.gzcommand:git archive --format=tar --output /full/path/to/zipfile.zip master | gzi... | I have just readVersion Control is not a BaCkUp system(pdf).and I wonder if there is a good way to backup my code into a remote server at the end of the day (in case something happens to my laptop), with all my temporary changes that definitely shouldn't be committed. | A good way to backup code with git |
Yes, if you are OK with reloading bitmap next time your activity is restarted, it is better to recycle it in onStop. Otherwise GC will not collect it - it is attached to a view, view is attached to the activity, why would GC recycle it?ShareFollowansweredJun 7, 2013 at 23:36mshmsh2,72011 gold badge1818 silver badges232... | I'm running into some memory issues that are causing my app to crash. On my MainActivity, I have a large bitmap in an ImageView, but the crashes are happening when I'm in other activities that also have large bitmaps.When leaving my MainActivity to go to another Activity, should I be setting my bitmap to null?@Override... | What should I do with ImageView when leaving an Activity? |
Are you going to use it as an index? If not you dont need those columns there, even your template will fails that saying you have a column that not used in any indexes. Because Dynamo isschemaless. Unless you can useBOOLtypeas the data type. | I am trying to use AWS CloudFormation for creating an AWS DynamoDB table,I am confused as to what to specify for a Boolean data type in the table,in the template file.My data on the table shows as type Boolean -Also got a List type data -But on the Doc it shows it has only 3 types to specify -I am following this CloudF... | AWS CloudFormation AttributeType for DynamoDb Boolean and List data types |
Here's my solution:root /some/path;
if ($uri ~ ^/(books/\d+/\d+)$) {
set $path $1;
}
if (-f "/some/path/$path.jpg") {
return 301 "$path.jpg";
}
if (-f "/some/path/$path.png") {
return 301 "$path.png";
}
if (-f "/some/path/$path.gif") {
return 301 "$path.gif";
}It's not pretty, but it works.ShareFoll... | I have a bunch of images (95% JPEG, 4.9% PNG, and 0.1% GIF) which are numbered sequentially, but sometimes have non-uniform extensions (1.jpg, 2.jpg, 3.png, 4.jpg, ...).I'd like to be able to request an imagewithoutspecifying the extension and have nginx make the appropriate redirect. I'm currently usingtry_files, but ... | Making `try_files` redirect instead of serve |
3
You should use PBO(Pixel Buffer Object) for this operation.
Data transferring operation is very fast using PBO
https://www.khronos.org/opengl/wiki/Pixel_Buffer_Object
GLuint w_pbo[2];
// Create pbo objects and than
// Do your drawings.
int w_readIndex = 0;
int w_writ... |
I built a simulator in C++ with a pybind11 interface to run deep learning in Python using PyTorch. At each time step, I draw certain things from the simulator's scene using the SFML library (wrapper around openGL). I draw that on a texture, then get the pixels from that texture as follows:
glBindTexture(GL_TEXTURE_2D,... | Transfer OpenGL image on GPU from C++ to Python for deep learning |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.