Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
No, there is no direct equivalent. You would have to do the implementation yourself. Since a class reallyshouldn'tchange its size, this isn't really an issue. Move semantics can handle most of these cases.However, there are some classes that use header info + tail end allocated data. To code these 'properly' you wo... | In C, we havemalloc(),free(), andrealloc(). In C++ we havenew(),delete()and their array versions. Is there a C++reallocfunction? I'm implementing some low level stuff in embedded land and just realized there was noreallocfunction to pair up with the C++ functions and wanted to make sure I wasn't missing anything. I... | Is there a realloc equivalent in C++? |
No, there are no CUDA atomic intrinsics for unsigned short and unsigned char data types, or any data type smaller than 32 bits.
However, you could group together two shorts or four chars and perform a 32-bit atomic on them, processing multiple at once (assuming your computation permits this).
|
Are there some inbuilt functions in cuda for doing atomic operations on unsigned short or unsigned char?
| Cuda atomic operations on unsigned short |
Unfortunately, there is no built-in way to do this. To get around this, you would have to attach the disk to a container or VM and inspect its contentsYou need to add the pvc to a pod and copy the files using kubectl cp or list the files using kubectl exec to check the contents of PVC.A simpler way is to create an insp... | I'm having a pain point with Kubernetes and I hope someone can help me out. I'm trying to see the contents of a PVC (Persistent Volume Claim), but it seems that the only way to do so is to mount the PVC into a container and check what's inside.As you can imagine, this is quite cumbersome and not very practical. I was w... | How can I see the contents of a PVC in Kubernetes? |
Using Git as a database is generally a bad idea. It isn't especially optimized for this use case, since it writes more data than is typically required for a database transaction, generally wants the entire tree to be checked out, and is difficult to shard if you need to scale in the future. It also can't be operated in... | Git is essentially an implementation of an Event Store where the data stored are files in a directory structure. It is known to reliably solve the problems:Store history of changesTransfer minimal data to client to get most recent dataCan rollback to previous stateIt is possible to create an Event Store by writing a wr... | Abusing Git for implementation of Event Store architecture? |
You need to either exclude directories from your last rule OR add a trailing slash using a redirect rule to directories to avoid this behaviorOtherwise last rule rewrites directories without slash to/index.phpand due to missing slashmod_dirmodule redirects by appending a trailing slash.Also you should movewwwrule befor... | I rent an Apache web server. The folder architecture is like this:rootsrctemplatelesswwwcssjsjpegThe web server serves only thewwwdirectory. And I use a .htaccess to redirect to HTTPS, remove thewww.and redirect all request to theindex.phpexcept if a file exist in thewwwfolder.RewriteEngine On
# Redirect to HTTPS
Rewr... | Conflict with Redirect to index.php and folder |
(related tohttps://stackoverflow.com/a/42930963/132438)GitHub project names go through changes, so instead of querying by name it's safer to query by id. You could look for a project id in a separate query, or do it altogether in a query like this:SELECT
COUNT(*) naive_count,
COUNT(DISTINCT actor.id) unique_by_act... | My goal is to track the total number of stars of my repo. However, its repo.name changed over time. How to achieve this with thegithubarchivedataset? | BigQuery GitHub data: How to handle repo name changes? |
You don't want to ignore the entire folder, merely its contents.That will allow you to un-ignore the content item(s) of your choice.data/*
!data/data_file.csv | I have the following in my .gitignore:data/
!data/data_file.csvyet the data_file.csv is not being tracked and I get the following when I check the ignore rules:git check-ignore -v data/data_file.csv
.gitignore:2:data/ data/data_file.csvI have triedgit rm -r -f --cached .
git add -A
git commit -m "Some commit mes... | Why is .gitignore not tracking a file despite using the ! notation |
I fixed the issue byswapping the order of the rulesthanks to@LazyOneand adding the[OR]condition after the first RewriteCond that checks for the olddomain with the www'sRewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.olddomain\.co\.uk$ [NC,OR]
RewriteCond %{HTTP_HOST} ^olddomain\.co\.uk$ [NC]
RewriteRule ^(... | I'm trying to redirect all pages of an old domain to a page about that domain on a new domain.I have built countless sites using the first 3 lines of the code below which redirects anything that is not www.mydomain.co.uk to www.mydomain.co.uk.In the following 4 lines im trying to redirect all the pages of olddomain.co.... | htaccess 301 redirects with multiple domain RewriteCond and RewriteRule |
The following will plop thedevtree into a new commit onmaster(note: this isnotequivalent to a rebase, as @torek kindly points out below):git checkout dev && \
git reset --soft master && \
git commitNote that you should not have uncommitted pages or untracked files when doing this.Here's how it works:checkout d... | I am looking for a way to squash commits with git rebase, but non-interactively. My question is, can we use git merge-base to find the common ancestor to "merge down to" and then squash all commits that are not shared?E.g.:git init
# make changes
git add . && git commit -am "first"
git checkout -b dev
# make changes to... | Squash Git commits *non-interactively* with git rebase |
Your link shows that the current version is1.0.1Office Javascript API 1.0.1The Office JavaScript API includes objects, methods, properties, events, and enumerations that can be used from apps for Office to interact with Microsoft Office 2013 documents or mail items content.Looking at your error log that contains this l... | I have a github repo and a solution that's home to:Common C# Library for domain / shared infrastructureC# MVC 5 Web AppXunit Test ProjectOffice AppThis repo is connected to an azure site and automatically deploys the MVC Web App project.Since i've added the Office App to the solution, the automatic deployment is failin... | Azure Deployment of MVC site from Github fails when solution contains Office Application |
Joining two measurements in InfluxDB is generally an anti-pattern. In this case, the city name should be stored as a tag in the temperature measurement. Your points would then look something like this (in InfluxDB line protocol):temperature,city=denver,lat=1.0,long=2.0 value=32.0 1469923200000000000
temperature,city=ch... | Grafana is using InfluxDB as its data source. Each series in influx has two measurements: the true measurement ("temperature"), and a city name "denver". For each series, the city name never changes, but the series names themselves are geographic coordinates.I am able to plot the temperature for each city over time, ... | Naming a series from a measurement, grafana and influxdb |
If it isn't set already, try runninggit config --global user.name "Your Name"You should then see it ingit config --listGithub: Setting Your Username in Git | I am using following git command to get user name but it gives nothing at all.git config user.nameThen I triedgit config --listThat gives everything else but no username and user email details.
Any ideas what is going wrong here or which command should be used instead.
I have tried these command on Git bash for windows... | git command for showing user.name not giving any result |
primes, in your code, is not a function, but a constant, in haskellspeak known as a CAF. If it took a parameter (say, ()), you would get two different versions of the same list back if calling it twice, but as it is a CAF, you get the exact same list back both times;
As a ghci top-level definition, primes never become... |
I noticed that sometimes Haskell pure functions are somehow cached: if I call the function twice with the same parameters, the second time the result is computed in no time.
Why does this happen? Is it a GHCI feature or what?
Can I rely on this (ie: can I deterministically know if a function value will be cached)?
Ca... | How to tell whether Haskell will cache a result or recompute it? |
Try this:RewriteEngine on
RewriteRule 80X80-(.*)$ https://www.othersite.nl/imgs/prd/kln/$1
RewriteRule 150x150-(.*)$ https://www.othersite.nl/imgs/prd/std/$1 | I want to redirect all my product images to an external site using htaccess.
However I cant figure out how to use dynamic variables, the image-url looks like this:httpz://localhost/oc1505/image/80x80-10035.jpgWhere 80x80 is the height and the width, and the 10035.jpg is the link to the external image.
So in this case I... | .htaccess dynamic imageurl rewrite |
Looks like you never actually installed pytest.Try adding apip installto your pytest section:- name: Test with pytest
run: |
pip install pytest
pytest | I am getting error that pytest command not found. Below is my action file. I am using pipfile.lock to install dependencies.name: Python application
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
... | Github Action with Pytest |
This is just another version of this question:Using openssl to get the certificate from a serverOr put more bluntly:Usingcurl --certis wrong, it is for client certificates.First, get the the certs your server is using:$ echo quit | openssl s_client -showcerts -servername server -connect server:443 > cacert.pem(-servern... | I have a flask application running using a self signed certificate. I'm able to send in a curl request using:curl -v -k -H "Content-Type: application/json" -d '{"data":"value1","key":"value2"}' https://<server_ip>:<port>The verbose logs show that everything went alright.I wanted to avoid using the -k (--insecure) optio... | Use self signed certificate with cURL? |
If you are doing lots of inserts or updates at once, put them in a transaction.Also, if you are executing essentially the same SQL each time, use a parameterized statement.Have you looked at theSQLite Optimization FAQ(bit old).SQLite performance tuning and optimization on embedded systems | I am trying to use sqlite in my application as a sort of cache. I say sort of because items never expire from my cache and I am not storing anything. I simply need to use the cache to store all ids I processed before. I don't want to process anything twice.I am entering items into the cache at 10,000 messages/sec fo... | SQLite .Net Performance |
If device goes up and down within the same scan interval, this cannot be captured by Prometheus using a "gauge" meter. Is this the expected behavior?Yes, it is expected behavior.Prometheus, as most of the monitoring tools, don't provide real-time monitoring.or have I understood the concepts wrong and doing it wrongly?Y... | I have requirement to collect data of when a device goes up or down and then show that data in a nice graph along with some statistics like availability (%) in last 7 days or number of devices that had less than 95% availability in the last 7 days.I was thinking of using Prometheus with Graphana. But my research and de... | collecting and analyzing device availability data |
Try this if using Apache 2.2+:RewriteRule ^/stats(|/.*)$ - [last]
# After that the other rewrites...Prior to Apache 2.2, mod_rewrite doesn't seem to support '-' (dash) in the substitution pattern. In that case, use the following rule:RewriteRule ^/stats(|/.*)$ /stats$1 [last] | In addition to web access through my domain names, my ISP allows access to my website thruogh the following format:user.hostname.com, whereuseris my login name andhostnameis my ISP. I have written rewrite rules to automatically remapuser.hostname.comtowww.mydomain.com, and this works well. It turns out however for me... | Allow a url to avoid a mod_rewrite rule in .htaccess |
You should check the following module:
http://nginx.org/en/docs/http/ngx_http_split_clients_module.html
It was created exactly for A/B testing.
|
Is there a way to return 20% of the time a different page in Nginx for a given URL and User-Agent header (for the purpose of A/B testing)?
| Randomly returning a alternate page in Nginx for A/B testing |
I landed here in a search for a better GitHub online editing experience. I haven't found a direct answer, but there is a related question which suggests a url tag (not working?) and a Chrome extension, that may have some helpful guidance.In the meantime, I have posted a more general question and two online tools which ... | In GitHub's web app, there is a drop down menu to select which line wrap mode you want to edit with.Is there a way to set this option to 'soft wrap' by default so when I edit a new file, it is already on 'soft wrap'? | Setting GitHub's 'soft wrap' option to be on by default |
If you run the Python script from a Docker container, it does not have a tty by default, you have to add--tty,-twhen you are about to run your container,docker run -t yourimageYou could force Python to flush, if you do not want the container to do so, by adding the flush parameter in your print method.print("Begin", fl... | I want to execute multiple python scripts on Docker in same time.But I've found something strange in output order.Below is my test python script.import random
import time
print("start test")
# sleep time
rn = random.randint(30, 45)
# file number
rn_fn = random.randint(0, 10000000)
print("sleep %s seconds ..." % rn... | Execute multiple python scripts using docker |
perhaps you have to force, ssl certificat validation OFF, like :require 'open-uri'
require 'json'
require 'openssl'
result = JSON.parse(open("your URL in HTTPS", {:ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE, :http_basic_authentication=>['username', 'password']}).read)
puts "#{result}"ShareFolloweditedMar 7, 2014 at... | I am trying to hit an api to fetch data but getting this error:`connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)This is how I am doing it:require 'open-uri'
require 'json'
result = JSON.parse(open("https://xxx.xx.xx.:xxxx/xxx/xxx", :http... | SSL server certificate error |
The request will traverse the proxy in the source pod and will simply hit the destination pod directly. Shouldn't really affect anything, other than Linkerd won't be able to handle mTLS and you won't get client-side metrics on the destination. | I have many deployments in my Kubernetes cluster. How does the pathway for a HTTP/1.x request looks like from a pod injected with linkerd to another pod without linkerd injected ? | Request pathway from a linkerd injected deployment to a normal deployment |
Solved by deactivating/scripts/securetmp. For more information, look atthis post.I extracted the steps just in case the post disappears in the future.Run# /scripts/securetmpIs going to appear this:Would you like to secure /tmp & /var/tmp at boot time? (y/n)TypenIs going to appear this:securetmp will not be added to sys... | I am trying to make Elasticsearch start automatically when I restart the server by following the stepshere.The problem is that When I restart the server,/tmpis being mounted with thenoexecoption and I need to runmount -o remount,exec /tmpand manually start Elasticsarch again.Someone told me that I need to removenoexecf... | Elasticsearch does not start automatically when I restart the server |
How have you got the repository? I suspect it was
git clone https://github.com/syslogic/camera-samples.git
and you got the master branch. In master the code is def camerax_version = "1.0.0-alpha06"
To get to the branch 1.0.0-alpha08 you need to switch branches:
git checkout 1.0.0-alpha08
or its equivalent in Android... |
I clone a project with Github from https://github.com/syslogic/camera-samples/tree/1.0.0-alpha08 in Android Studio 3.5.3.
The web URL is https://github.com/syslogic/camera-samples.git
I'm very strange why the local content is different from remote content.
The remote content is located at https://github.com/syslogic/c... | Why is the local content different from the remote content after clone a project with Github in Android Studio 3.5.3? |
7
AWS Fargate at this moment is targeted to stateless container solutions only, but we never know, maybe AWS is already working in a solution for it.
Remember you are sharing the same host with other AWS Customers. Your instance could be terminated and restarted in anothe... |
I have 2 containers in a Fargate task definition. One of the containers is a database server. I'm wanting to persist the data directory. However, Fargate doesn't support the Source Path field when setting up a volume in the task definition. Does anyone know who to set up persistence in Fargate?
| Persistence in AWS Fargate Containers |
If you followed the EKS getting started guide, everything will work out of the box and you just have to specify the the full image name (e.g. ACCOUNT.dkr.ecr.REGION.amazonaws.com/imagename:tag) in the Pod definition (spec.containers.image field).
It works because Kubernetes has native support for ECR
and the CloudForm... |
I have created EKS Cluster. I also have docker image in ECR. I am not sure how to use the docker image in pod definition in YAML.
Is it required to give credentials in secret? or EKS IAM role should have permission for ECR?
Any changes in permission have to do for Image in ECR ?
| How to use Docker Image in ECR with AWS EKS |
Just use correct tools by correct way. Select "Ticket and Collaboration Tools for Github Repositories" on Assembla side as preconfigured space type instead of unrelated repo on Github and space with tickets on Assembla
|
We manage tickets through assembla and source-code through github.com
I do not want to close tickets automatically when I mention in a ticket number in a commit message. But what I want to be able to do is that when I click on a ticket number in assembla in github I want to be taken to corresponding ticket on assembl... | Github and assembla: link issue and tickets |
You should start by adding this to the .htaccess in your public folder:RewriteCond %{REQUEST_URI} ^/wordpress.*
RewriteRule .* - [L]However, this is not the whole story. You also need to edit /etc/apache2/sites-available/
with this addition (to tell Rails not to process anything in /blog as part of the app):<Location /... | I want to run an instance of wordpress within my rails app. I currently have wordpress files housed in public/wordpress, but I need to configure my .htaccess file to allow both types of requests. How do I do that? currently, .htaccess is:General Apache optionsAddHandler fcgid-script .fcgi
RewriteEngine On
RewriteRu... | How do I edit .htaccess to allow both rails and wordpress requests? |
It is a message bus. Don't write one yourself, there is probably a framework in your language.
|
Forgive me if I've missed an obvious answer, but I have looked around for this and I cannot find it. I am trying to build a multi-threaded program that uses mutexes as little as possible. The following is the basic design. I want to know if I'm recreating the wheel and, if I am, what design pattern/algorithm/approa... | What design pattern is this? It has to do with threads |
Add USER root to your Dockerfile:
FROM mcr.microsoft.com/mssql/server:2019-latest
USER root
SHELL ["/bin/bash", "-c"]
COPY ./CompanyCert.crt /usr/local/share/ca-certificates/CompanyCert.crt
RUN update-ca-certificates
|
I ran this command:
docker pull mcr.microsoft.com/mssql/server:2019-latest
I then made a dockerfile to use this container image as a base image for another container
# escape=`
FROM mcr.microsoft.com/mssql/server:2019-latest
SHELL ["/bin/bash", "-c"]
COPY ./CompanyCert.crt /usr/local/share/ca-certificates/CompanyC... | Switch to Root User in a Dockerfile |
If you don't have Tiller in your cluster and you don't want to install it - you can use installation method without Tiller (using only client Helm binary) -https://istio.io/docs/setup/kubernetes/install/helm/#option-1-install-with-helm-via-helm-templateFor example, to get full Istio YAML manifest you can dohelm templat... | We do not want to use Helm in our kubernetes cluster, but would like to have Istio. For me it looks like Isto can be installed on kubernetes only with Helm.I guess i can copy all helm charts and substitute the helm-variables to become a kubernetes ready yaml-files. But this is a lot of manual work i do not want to do (... | Is there any solution to deploy Istio in Kubernetes Cluster without Helm |
See here for an example -https://github.com/serverless/examples/blob/master/openwhisk-node-scheduled-cron/serverless.ymlYou can either give cron expression or rate not both. see here for details :https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html | I'm trying to upload a simple Lambda to Serverless however I keep getting :bad indentation of a mapping entry in ...
- schedule:
^The code :serverless.ymlservice: serverlesslambda
functions:
changeWeeklyStarterStatus:
handler:
handler.changeWeeklyStarterStatus
-... | Bad indentation of a mapping entry in Serverless AWS |
If you have Git itself installed (in addition of Eclipse which uses EGit/JGit), you can switch to a command-line and check what is going on:
cd /path/to/local/repository
git status
git remote -v
That way, you can see if:
a git remote -v does display remote repository B URL
a git add . would succeed in adding your fi... |
I clicked add to the index button but didn't work.
About how I made this remote repository:
There is A user, A repository and B user(me), B repository(remote repository).
we use A repository as origin repository.
A push to A repo -> B pull and push to B repo.
It worked so far.
I made clone of B repo in Eclipse and ... | i made github remote repository but i can't commit in remote repository |
Finally I fixed it, We need to point the Static IP to DNS in my case I have in GoDaddy, It took some time to point DNS and then it took time for my Google-managed SSL certificate to turn green.Once it's done I hade an issue with err_ssl_version_or_cipher_mismatch for this we need to add Policy to tell LB to use TLS 1.2... | I am working with Load Balancing to have https to my static website and I have my domain in GoDaddyI created a LoadBalancer withBackend configuration: To my Cloud storage buckets & enabled CDN.Frontend configuration: Https having static IP I have enabledGoogle-managed SSL certificatewith my domain example.com which is ... | How to set DNS records for my domain to reference the IP address of my load balancer also getting FAILED_NOT_VISIBLE in LB Google Cloud Console |
i found the both solution.it will show the commit when it is added .i have to manually update all to latest commit by this commandgit submodule foreach git pull origin master2.i am getting this error because i am not putting the command on the downloaded repo folder.i am putting command in out of it.thanks. | i have some apps and all the apps is in git repo with submodule.i added those repo by this commandgit submodule add https://github.com/rahmanshaber/abouti am getting some problems.1.when i click on the submodule it shows the old commit when it added it. i want the latest commit of the submodule.2.when i clone the suppe... | git submodule not showing latest commit |
You can amend your current PR (cwida/duckdbPR 249) simply by creating a new commit in your local PR branch, and pushing back to your current remote PR branch (the one from which you have opened the pull request)That will be enough to update yourexistingPR.And that would fix (following PaulMcKenzie's suggestion) theCyc... | I'm trying to make a contribution to duckdb (https://github.com/cwida/duckdb). But CodeFactor complains about a seemingly innocuous C++ function.Error given by CodeFactor: "Complex Method (complexity = 16)". More info at:https://www.codefactor.io/repository/github/cwida/duckdb/pull/249bool mod_matches_arguments(vector... | Github's CodeFactor complains about complexity of a simple function |
You will need to obtain a heap dump and inspect it. | Too many OutOfMemoryError has occurred and stopped cassandra service.WARN [New I/O worker #22] 2016-11-03 10:38:15,083 Slf4JLogger.java (line 76) Unexpected exception in the selector loop.
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:658)
at java.nio.DirectBy... | OutOfMemoryError in cassandra |
You need to use aRewriteCondto stop redirecting when query string is already there:Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} !(?:^|&)post= [NC]
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.+)$ http://%{HTTP_HOST}?post=$1 [L,R=302,QSA] | I'm trying to find a way to redirect these urls:http://example.com/some-directory-name/
http://example.com/some-directory-nameto this url:http://example.com?post=some-directory-nameSo far, I've got this:Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule ^(.*)$ http://example.com... | htaccess redirect directory to query string |
How are you trying to do it? If you go into the page text editor (not the visual editor) and paste this<img src="*The-link-to-your-image-here*.png"/>It should work just fine.I could then help you with formatting the images, or you can look into using classes for css to style the images with a resource such ashttps://ww... | I am new to website development and I'm using WordPress to create a website to upload real-time forecast results.The results are collected from an onsite device in a specific location that the model should be run on and is being uploaded to GitHub every 4 hours. The previous data will be replaced by the next one each t... | Uploading Images from GitHub to WordPress website |
that is the issue why this repo are showing "jenkinsDemo1.git" , already delated this repoMake sure tha new repository is accessible:git ls-remote https://github.com/atul****/nodejs-express-mysql.gitCheck your global configuration:git config --global -lIf you see anyinsteadOfdirective, that could explain why a github.c... | Windows 10 , loggit.exe clone --progress -v "https://github.com/atul****/nodejs-express-mysql.git" "H:\sts\Git\nodejs-express-mysql"
Cloning into 'H:\sts\Git\nodejs-express-mysql'...
remote: Repository not found.
fatal: repository 'https://github.com/atul*****/jenkinsDemo1.git/' not found | Git repository Error Repository not found |
Try replacing this condition:RewriteCond %{REQUEST_FILENAME}.php -fwithRewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.php -fbecause%{REQUEST_FILENAME}checks for path info and other possible matches for scripts. This circumvents adding a.phpto the end of the URI. | I have this .htaccess file (which I got from other answers on here and on the web):RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ ./$1.phpHowever, it seems that if the user manually enters an address that doesn't exist, it return a 500 I... | .htaccess - Clean URLs prevent 500 internal server error |
It looks like you are on GitHub Enterprise and trying to create a pre-receive hook script that rejects any unsigned commits - correct? If so, here is an open source GPG script from GitHub. If you are on GitHub.com, please note they do not support pre-receive hooks and instead you would want to set up a protected bra... |
I've a Github repository we share for our development. To ensure the integrity we decided to sign our commits and tags with GPG.
Now, how do I prevent developers from pushing unsigned commits to our repository in Github and also white-list GPG public keys to allow pushing commits singed with white-listed public keys
... | How to limit pushing operation to allow only commits that are signed with GPG in github |
You didn't say how you observed the process. I'll assume you used Taskmgr.exe. Beware that it's default view gives very misleading values in the Memory column. It shows Working set size, the amount of RAM that's being used by the process. That has nothing to do with the source of your problem, running out of virtu... |
I am investigating a strange problem with my application, where the behaviour is different on 2 versions of Windows:
Windows XP (32-bit)
Windows Server 2008 (64-bit)
My findings are as follows.
Windows XP (32-bit)
When running my test scenario, the XML parser fails at a certain point during the parsing of a very lar... | Process sizes and differences in behaviour on 32bit vs. 64bit Windows versions |
0
use this
System.runFinalization();
Runtime.getRuntime().gc();
System.gc();
Share
Improve this answer
Follow
answered Aug 27, 2017 at 14:00
Rasoul MiriRasoul Miri
11.6k11 ... |
I have problem with free up the memory from ImageView.
I test my application on Android 7 and I free memory by set imageView.setImageBitmap(null) and use System.gc() after that, but on Android 5 I see memory leak and I don't know what I can do, I try use bitmap.recycle() but it too doesn't work.
| Free up the memory used ImageView on Android 5 |
According to Azuredocs, you can't use10.0.0.0IP address. Try using a different address. I am assuming you are trying to execute thisscenario. Check the service details for any error information.kubectl describe svc -n ingress-private nginx-ingress-ingress-nginx-controllerRef:Are there any restrictions on using IP addre... | showing internal loadbalancer external IP is in pending, could someone help me on this issue to resolvehelm install nginx-ingress ingress-nginx/ingress-nginx --namespace=ingress-private --set rbac.create=true --set controller.service.loadBalancerIP="10.0.0.0" --set controller.replicaCount=2 --set controller.nodeSelecto... | Ngnix ingress controller for aks using internal loadbalancer |
Try this:for part in $(sed 's/#.*//' test.txt | while read t1 t2 t3 t4 t5 main; do echo $main; done); do
echo $part
done | grep / | grep -v ://For your example, this prints:/var/opx/cron-script/daily-email-reports/pingback_report.php
/var/opx/cron-script/failed_device_search.sh
/var/opx/cron-script/event-analysis/dai... | I am trying to backup the crontab entries structure and files running under crontab.But I am stuck with how do i search files incrontab -land copy the scripts running under it.My possible waysI have listedcrontab -l > test.txt
cat test.txtBut how can I search the files after listing.My entries are like:# daily pingba... | How do i backup all files listed in crontab |
Checking if the API is loaded, as Keith links above, is a good way to see if the loading has had any trouble.To minimize problems loading the API in China the Maps API FAQrecommendsloading the API fromhttp://maps.google.cn/maps/api/jsand not usinghttps. | I'm currently working on a platform that will be launched all over the world and I am working in Shanghai China and as you might know there is a very big Firewall policy here.The site contains a custom map view created with the Google Maps API this is because Google allows a lot of nice features to change the look and ... | Check Connectivity to Google Maps API (China Great Firewall) |
Git pull takes the following arguments:
git pull [<remote name>] [<refspec>]
or, to be more specific to your current problem:
git pull [<remote name>] [<branch to pull from>]
You're doing something like the following:
git pull [branch to pull from] [address of remote]
which won't work.
If you haven't already, you'l... |
I think this is easy to do, but the error is somewhere else in my structure... I've been searching but am stuck. I have tried
git pull collaboratorsbranch https://github.com/username/project.git
but I get
fatal: Invalid refspec https://github.com/username/project.git
I think there's something wrong with my origin/... | How do I pull a branch created by another collaborator in a shared repository? |
A bit late but have you tried adding platform: linux/amd64? Under both mariadb and wordpress
|
I have a docker-compose.yml file:
version: '1'
services:
mariadb:
image: 'docker.io/bitnami/mariadb:10.3-debian-10'
ports:
- '3307:3306'
volumes:
- ./db:/bitnami/mariadb
environment:
- MARIADB_USER=bn_wordpress
- MARIADB_DATABASE=bitnami_wordpress
- ALLOW_EMPTY_PASSWORD=... | Docker: Apache in Apple Silicon M1 |
find . -name "*show1*" -exec cp {} /mnt/main/data/tv/Show1 \;(Replace the . by the directory you want to look files into) | New to bash scripting, I'm writing a script to copy my TV shows accross from a download folder to an archive folder.So far I have this:find `*`show1`*`.avi | cp \"" $0 "\" "/mnt/main/data/tv/Show1"
find `*`show2`*`.avi | cp \"" $0 "\" "/mnt/main/data/tv/Show2"I understand this is not the best method, but my skills o... | Bash copying files with variables |
2
When you want to host a static website on Github Pages using Ruby language, it is only possible through Jekyll. So it's not possible to run a Rails server on Github Pages. If you want more details on how to do that, please take a look at this Setting up a GitHub Pages sit... |
I have my ruby on rails project on github and want to show it on pages but it only shows whats in the readme file.
I've read through other stack overflow questions about this but I don't really understand how to fix it. My rails app is on https://github.com/obvJones/railstesting/.
enter image description here
This is ... | GitHub Pages showing ReadMe file |
When pods are in terminating state, they could still be functioning. The pod could be delayed in termination due to many reasons (eg. could be that you have a PVC attached, other pods are being terminated at the same time, etc). You could test this by running the following on a pod with a PVC attached or another reason... | Curiously, I saw that a pod I had had both ready 1/1 status and statusterminatingwhen I rankubectl get pods. Are these states not mutually exclusive? Why or why not?For context, this was noticed immediately after I had killedskaffoldso these pods were in the middle of shutting down. | How can a pod have status ready and terminating? |
Prior to DaemonSet being available, you can also specify that you pod uses a host port and set the number of replicas in your replication controller to something greater than your number of nodes. The host port constraint will allow only one pod per host. | I have 4 nodes (kubelets) configured with a labelrole=nginxmaster ~ # kubectl get node
NAME LABELS STATUS
10.1.141.34 kubernetes.io/hostname=10.1.141.34,role=nginx Ready
10.1.141.40 kubernetes.io/hostname=10.1.141.40,role=nginx Ready
10.1.141.42 kubernetes.io/... | How to require one pod per minion/kublet when configuring a replication controller? |
My recommendation would be to useAWS Secrets Managerfor this. Secrets Manager allows you to store any type of credential/key, you can set up fine-grained cross account permissions to secrets, encryption at rest is used (via KMS), and secrets can be automatically rotated (by providing an expiration time and an AWS Lambd... | I need to develop a solution to store both symmetric and asymmetric keys securely in AWS. These keys will be used by applications that are running on EC2s and Lambdas. The applications will need to be set up with policies that will allow the application or lambda to pull the keys out of the key store. The key store sh... | How to manage Asymmetric (Public/Private) Keys in AWS |
This is definitely possible with mod_rewrite.Enable mod_rewrite and .htaccess throughhttpd.confand then put this code in your.htaccessunderDOCUMENT_ROOTdirectory:Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteRule ^/?browse/author/(.*) /by/$1 [L,R=301,NC] | I need some quick help cleaning up the following rules for htaccess file, as the list is getting quite long.This has occurred after a site move which makes author pages that previously came from/browse/author/NAME-HEREnow sit at/by/NAME-HERE.Surely there's a way to pattern match these or something?Redirect /browse/auth... | Pattern matching for htaccess rewrite rules involving one folder to another |
If the record does not exist, you can use this code:<?php
header("HTTP/1.0 404 Not Found");
echo 'This page was not found';
?>If you want to use an external 404 error page, you can use this instead:<?php
header("HTTP/1.0 404 Not Found");
include("404errorpage.php");
?>Alternatively, you can redirect to the 404 error pa... | How can I throw from php an error code 404?
In my htaccess I have a rule that redirect tags to categories, but if after search the category in the DB, if is not exist, how can I redirect to 404 error page and send the correct headers?RewriteRule ^([a-z]{2})/(.*)$ index.php?lang=$1&id=$2 [L]How can I handle this url?sit... | Throw 404 Not Found from PHP |
The changes are not committed, but they are staged. To see them, dogit diff --cached. To unstage them, dogit reset. | Folks,I am a little new to stashing in git so may be I missing something basic here, this is what I am doing:I am on my master branch and I have been working on a file app/models/medicine.rb , I want to pull changes from master pushed by my co-worker. So I do agit stashNow I do agit pull origin masterthis pulls all th... | stash and then pop in git does an auto commit |
Firstly about your problem:
vector<vector<double> > v;
cout<< v.max_size();
This piece of code giving me the output 268435455 and 768614336404564650 (when compiled for 64-bit). Moreover in my machine it is not throwing any compilation error, but the programs hangs (i.e. the allocation never happens in 32-bit). Though... |
I want to work with large size vectors. But these vectors allocated large size in memory and caused error..
size=10000;
//2D vector doubles
vector<vector<double>> vecA(size,vector<double>(size));
vector<vector<double>> vecB(size,vector<double>(size));
vector<vector<double>> vecC(size,vector<double>(size));
I want to... | work with large size vectors in c++ |
9
You can include a Pipeline step that runs git, to copy the repo over. Something like this:
steps:
- bash: |
git push --prune https://$(GITHUB_PAT)@github.com/$REPO_NAME \
+refs/remotes/origin/*:refs/heads/* +refs/tags/*:refs/tags/*
displayName: 'Copy to Gi... |
I have two repository, first on Azure DevOps, second on GitHub. I'd like to update GitHub repository to have the same code on both repositories. How can I do it without manually copying source code?
| How to synchronize Github and Azure DevOps repository? |
You can set vi as your default crontab editor using the command.
export EDITOR=viThen you can save and exit crontab using :wq. | I am new to linux centos ,i am trying to save and exit crontab in centos.I have used CLI.crontab -ewhen i press esc key from my keyboard it says ":quit to exit: and i press ":quit" and press enter key from keyboard crontab exit without saving. | unable to save crontab file using CLI |
1
Forks are – more or less – branches on a different server. If you need to base your branch off of third-branch, you have to clone the repository first which contains this branch:
git clone https://example.com/repository.git
Cloning fetches all branches and all commits (c... |
I'm trying to collaborate on a Git repo and confused about how to go about it:
Master repo: http://myrepo/prodcode
User1 created a fork: http://user1repo/prodcode
Updates made to branch: third-branch
I need to make updates to the third-branch but I'm being told to make my own branch from the third-branch. How would... | Confused about working with git branches and forks |
You can capture API calls by listing the output with verbose option inkubectl cluster-infocommand:kubectl cluster-info dump -v 9For example:curl -k -v -XGET -H "Accept: application/json,/" -H "User-Agent:
kubectl/v1.12.1 (linux/amd64) kubernetes/4ed3216"
'https://10.142.0.3:6443/api/v1/namespaces/kube-system/event... | Does kubernetes provide an API in its client library to get the cluster-info dump?
I went through its APIdocumentationand could find any API which could actually do this.What i do now:kubectl cluster-info dump --output-directory="dumpdir"What i want:Using client-go/kubernetes API libraries, make an API call to get this... | How do we take a kubernetes cluster-info dump using the kubernetes API |
The bin/accumulo command you're executing is a bash shell script that sources conf/accumulo-env.sh where you'd normally set some Java command-line options.
The provided launch scripts are a bit confusing in versions prior to Accumulo 2.x, but is anticipated to be much simpler and more direct/intuitive in 2.0.0 and lat... |
Currently running a big data job that is doing lots of small inserts into an accumulo table, however after running for about an hour will always get an OOM exception
2018-10-09 12:19:17,345 [rpc.CustomNonBlockingServer$CustomFrameBuffer] WARN : Got an IOException in internalRead!
java.io.IOException: Connection reset ... | How to increase memory on Accumulo Proxy server? |
Based on my experience writing, debugging, and supporting KCL-based applications, the second statement is more clear/accurate/useful for describing how you should consider error handling.First, a bit of background:KCL record processing is designed to run from multiple hosts. Say you have 3 hosts and 12 shards to proces... | According toAWS docs:The worker invokes record processor methods using Java ExecutorService tasks. If a task fails, the worker retains control of the shard that the record processor was processing. The worker starts a new record processor task to process that shard. For more information, see Read Throttling.According t... | Kinesis client library record processor failure |
1
You can analyze the heap dump with some tool like JProfiler or VisualVM (there are many other tools and just mentioning two options here) to identify what kind of objects consume the most memory. This will give you an idea on the number of instances, memory consumption of... |
How can i catch java.lang.OutOfMemoryError: Java heap space?
I have server which the work some times and after that throw java.lang.OutOfMemoryError: Java heap space. But I can not faind place in code where it occurs. In logs not iformation where it occurs.
We allocated 8 GB memory and error does not appear but serve... | how to find a place in the code where the memory leak? |
Basically connections are established to make requests using it. So for instance endpoint for given key may accept 5 connections per hour from given IP address. But it doesn't mean only 5 requests can be made but much more - if the connection is not closed after a request (from HTTP 1.1 it's by default kept alive).E.g.... | While I am configuring my nginx, I found two modules:ngx_http_limit_conn_moduleandngx_http_limit_req_moduleone is for limiting connection per defined key, and one for limiting request.My question is what is the relationship (and difference) between
a HTTP connection and a request.
It seems that multiple HTTP requests c... | What is the relationship between HTTP connection and a request? |
http://developer.github.com/v3/#rate-limiting says the following
We limit requests to 60 per hour for unauthenticated requests. For requests using Basic Authentication or OAuth, we limit requests to 5,000 per hour. You can check the returned HTTP headers of any API request to see your current status:
$ curl -i https:... |
i was wondering if github search API has limit on number of requests, and also i would like to know if is possible to save the retrieved data in my own databse, or there is some policy between.
Thank you.
| github API search - limits and policy |
The "shebang" line at the start of a script says what interpreter to use to run it. In your case, your script has specified #!/bin/bash, but Alpine-based Docker images don't typically include GNU bash; instead, they have a more minimal /bin/sh that includes just the functionality in the POSIX shell specification.
You... |
Dockerfile
FROM python:3.7.4-alpine
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV LANG C.UTF-8
MAINTAINER "[email protected]"
RUN apk update && apk add postgresql-dev gcc musl-dev
RUN apk --update add build-base jpeg-dev zlib-dev
RUN pip install --upgrade setuptools pip
RUN mkdir /code
WORKDIR /code
CO... | standard_init_linux.go:211: exec user process caused "no such file or directory"? |
First, try making a files subdirectory in your wiki, and putting your files in there.
I tried using an html anchor tag
<a href="files/file.csv" download="file.csv">download this</a>
instead of the markdown link syntax
[download this](files/file.csv)
but it seems that GitHub wiki strips out the download attribute f... |
When you link to a PDF file using:
[download this](file.pdf)
it downloads the pdf file. I have an excel workbook that I'd like to allow someone to download using:
[download this](file.xlsx)
When I click it, it takes me to create a new page in the wiki. Is there any markdown syntax I can add that identifies the link as... | Can I link to a file for downloading (other than PDF) in a GitHub wiki? |
validJSonshould have key and value between double quotesso you should have thepayloadattribute written aspayload='{"account":"100261334439", "region":"eu-west-1", "detail-type":"Scheduled Event", "source":"aws.events", "time":"2017-07-16T03:00:00Z", "id":"178710aa-6871-11e7-b6ef-e9b95183cfc9", "resources":["arn:aws:eve... | I want to test a lambda function via CLI instead of the AWS Management console. (Looking to automate function testing by making a bash script)I've read the documentation:http://docs.aws.amazon.com/cli/latest/reference/lambda/invoke.htmlI am trying to invoke the lambda function with a json event payload. My bashcode loo... | Test AWS lambda function via cli |
This sounds like your file hasn't been uploaded correctly or you're running on an old version of PHP (PHP 4) | My client is using Yahoo web hosting (ugh) and in order to have an SSL certificate on their servers, you have to create a folder and move all the files you want to be secure to this folder. I had all of theOpenCartfiles in a folder called shop, so I just moved that entire folder there so I wouldn't have a ton of updati... | Moved files and now I am receiving a parsing error in vqmod for opencart |
Try to open a new terminal window and use git from there. I assume that you are on windows so maybe this will help you.Open a new terminal window and navigate to your project directory.Type "git status" to check, if git has been installed correctly. If not, try to restart your system or reinstall git.Type "git reset HE... | I made a git using GitHub Desktop. It has the master branch and a development branch. In the development branch I accidentally added a library that was over 100mb. Now I can't push it anymore. I tried to push another commit, but that one is blocked as well.I already downloaded git for the cmd, but github desktop gives ... | GitHub Desktop remove last two commits |
External volumes must be created and removed by a docker volumes command. docker-compose up will not automatically create external volumes, and docker-compose down -v will not remove them.
Also external volumes can be mapped into multiple projects.
I use external volumes when I want extra control over their creation ... |
There are different custom installations of a variety of docker-compose applications. And often they use external volumes instead of the default ones directly in the compose file.
Here's an example of creation by install script (runs first): https://github.com/getsentry/onpremise/blob/master/install/create-docker-volu... | Differences between external and default volume in Docker Compose? |
3
I was able to get around this issue in PyCharm by adding a symbolic link to another directory which contained code for the layer
Share
Improve this answer
Follow
answered Apr 7, 2020 at 2:33
... |
How does one run locally a AWS Lambda Function with layers?
My environment:
Pycharm project for an AWS Lambda Function with Python 3.6 runtime.
AWS Toolkit
similar file/folder structure to create a Lambda Layer: https://aws.amazon.com/blogs/compute/working-with-aws-lambda-and-lambda-layers-in-aws-sam/ as follows:
... | AWS Python Layer Run Locally |
Place the following in your$PROFILEfile (open it for editing with, e.g.,notepad $PROFILE; if it doesn't exist, create it withNew-Item -Force $PROFILEfirst):Set-Alias k kubectl.exeIfkubectl.exeisn't in a directory listed in$env:PATH, specify the full path instead (substitute the real directory path below):Set-Alias k 'C... | When I run Kubernetes commands, Powershell is wanting me to use the path to the kubectl.exe instead of just using the command kubectl.I'm told using an Alias would work but I'm not sure how to do that in this case with Powershell and my attempts have come up fruitless.This is what I tried:How to make an alias for Kubec... | How do I use "kubectl" instead of the path to the kubectl.exe in Powershell |
You're using Python 3 but installing the Python 2 packages. Change yourDockerfileto the following:FROM python:3.5
ENV HOME /root
ENV PYTHONPATH "/usr/lib/python3/dist-packages:/usr/local/lib/python3.5/site-packages"
# Install dependencies
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get autoremove -y \... | I am trying to installscipyfrom aDockerfileand I cannot for the life of me figure out how.Here is theDockerfile:FROM python:3.5
ENV HOME /root
# Install dependencies
RUN apt-get update
RUN apt-get install -y gcc
RUN apt-get install -y build-essential
RUN apt-get install -y zlib1g-dev
RUN apt-get install -y wget
RUN a... | Can't install scipy |
It was problem regarding Minikube. It got solved.I followed the steps givenhere | I am going through thistutorial.My ambassador end point is not setting up after using this commandexport AMBASSADOR_LB_ENDPOINT=$(kubectl -n ambassador get svc ambassador -o "go-template={{range .status.loadBalancer.ingress}}{{or .ip .hostname}}{{end}}")If I try to printecho $AMBASSADOR_LB_ENDPOINTit returns empty.kube... | Issue with Ambassador Mapping |
It has little use caching the data provider after instantiating, since it's not actually doing any selecting on the database until it has been prepared. So you would actually be caching an empty object instance like it is now.If you have a very large set of records, call the dataProviders'prepare()in advance in the cac... | In my PostSearch model I have this code :public function search($params)
{
$query = Post::find()->where(['status' => 1]);
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort'=> ['defaultOrder' => ['id' => SORT_DESC]],
'pagination' => [
'pageSize' => 10,
... | Yii2 : how to cache active data provider? |
<div class="s-prose js-post-body" itemprop="text">
<p>After poking around, I found the certificate in /root/.dotnet/corefx/cryptography/x509stores/my/</p>
<p>Adding</p>
<pre><code>COPY --from=build /root/.dotnet/corefx/cryptography/x509stores/my/* /root/.dotnet/corefx/cryptography/x509stores/my/
</code></pre>
<p>to the... | <div class="s-prose js-post-body" itemprop="text">
<p>You can use <code>dotnet dev-certs https</code> to generate a self-signed certificate for use with ASP.NET as this dockerfile demontrates</p>
<pre><code>FROM mcr.microsoft.com/dotnet/sdk:5.0 as build
WORKDIR /src
RUN dotnet new webapi -o app
RUN dotnet dev-certs htt... | Using dotnet dev-certs with aspnet docker image |
If you're absolutely sure that
Now that my local version of the repo is exactly how I want it, how can I push this to the remote?
then you can do
git push -f remote-name branch-name
in your case
git push -f origin master
The -f indicates that you want to forcibly push the changes. This is not a good idea if you... |
I was cleaning up some tracking issues, and wanted to remove some files from tracking. I screwed up and deleted a bunch of files that I want to recover. Unknowingly, I pushed to my remote in this state.
Well, time to go back and fix things. Luckily, the commit that I wanted is in the history:
black-rainbows: scottn... | Can't revert git remote branch to an earlier commit |
$ git branch -l # just to show we're on develop branch and there's master branch as well
* develop
master
$ git merge masterWill getmastermerged intodevelop. | In the 'old' GitHub for Desktop application there was a button that would allow you to update from another branch.What this does, is takes any commits from the other branch that haven't been synced into the current branch and creates a commit for the merge.The new desktop application is missing this feature, but I use ... | Update one branch from another |
This code is Prepend the filephp_value auto_prepend_file "/dir/path/utilities.php"This code is Append file to bottom of the pagephp_value auto_append_file "/dir/path/templates/footer.php"I found this answer inhttp://samweby.blogspot.in/2013/07/prepend-and-append-htaccess-file.htmllink. | How to include php file using .htaccess? I google it but i cant find a good tutorial or code.Here is a php include code :<?php require('footer.php'); ?> | How to include php file in .htaccess? |
The IAM user can be referred to in policy documents by ${aws:username}.
There is a list of other IAM policy variables and their uses here:
http://docs.aws.amazon.com/IAM/latest/UserGuide/PolicyVariables.html
|
I am trying to write an IAM policy which will control access to EC2 instances. All EC2 instances will have a custom tag called username and only if the tag value matches the logged in user's user name, will that user have access to that EC2 instance. This is what I came up with:
{
"Version": "2012-10-12",
"Sta... | Can an aws IAM policy dynamically refer to the logged in username? |
Auto Backup Database Using Maintenance PlansSimple Step :Go To SQL Server Configuration Manager > SQL Server Services > Run SQL Server Agent (Set it to Run Automatically)Go To SQL Server Management Studio, Find TAB Management > Maintenance Plans. Right Click > Maintenance Plans Wizard.Text your maintenance plans, ex:... | Closed.This question is seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. It does not meetStack Overflow guidelines. It is not currently accepting answers.We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-si... | SQL Database automatic back up [closed] |
You are missing the docker:dind service.
The image you should use for the job is the normal docker:latest image.
image: docker
services:
- "docker:dind"
variables: # not strictly needed, depending on runner configuration
DOCKER_HOST: "tcp://docker:2375"
DOCKER_TLS_CERTDIR: ""
|
I am trying to build CI pipeline to build and publish my application docker image, however during build i am getting following error:
.gitlab-ci.yml:
image: "docker:dind"
before_script:
- apk add --update python3 py3-pip
- pip3 install -r requirements.txt
- python3 --version
...
docker-build:
stage: Docker
... | no such host error while doing docker build from gitlab CI |
I found a solution myself from one of AWS forum where a user was kind to share the solution he got from AWS support. I guess AWS does not want the world to know the solutions to the problems it creates so as to sell the support package. Anyway, here is the solution:In AWS Amplify console in 'Rewrites and Redirects' sec... | I have hosted my react app on AWS Amplify. On trying to access a protected route of the application I am getting the following error on screen
This XML file does not appear to have any style information associated with it. The document tree is shown below.<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Messag... | Access Denied Error from protected routes from react app hosted on AWS Amplify |
Unfortunately you left out the most important part: the name and location of the Razor view.
The Snaphot page is a fallback for when ServiceStack can't find the view it's looking for, in this case since you've specified [DefaultView("AboutUs")], ServiceStack will look for a view named "AboutUs.cshtml" in the /Views/ d... |
I've setup a site using http://razor.servicestack.net/.
I've created several views and matching services with an example as follows:
Service Example:
using ServiceStack.ServiceHost;
using ServiceStack.ServiceInterface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace webs... | Razor.ServiceStack - Views not rendering, just default "Snapshot" |
Installwebdriver-managerpackage and add to your requirements.txt file:pip install webdriver-managerand use like that:from selenium import webdriver
from webdriver_manager.firefox import GeckoDriverManager
driver = webdriver.Firefox(executable_path=GeckoDriverManager().install())with that package, you should worry abou... | I'm using this command to copy geckodriver to the path but I still encounter a problem- wget https://github.com/mozilla/geckodriver/releases/download/v0.29.0/geckodriver-v0.29.0-linux64.tar.gz
- echo "geckodriver downloaded successfully"
- tar -xvzf geckodriver*
- chmod +x geckodriver
- export PATH=$PATH:/usr/local/bin... | How to copy geckodriver to path /usr/local/bin/ in Gitlab pipeline? |
Literally moments after I posted this question, I stumbled uponthiswhile googling for how to whitelist IPs from a file in Nginx! Kind of funny considering I spent the last 2 hours googling for specific terms about rate limiting; talk about relevance, heh..limit_conn_zone $server_name zone=servers:1m;
limit_conn servers... | I am looking for a way to limit the number of maximum concurrent connections to 1.
I do not want a connection limit per IP, I already know this is supported.As far as I can see,max_connswould be exactly what I'm looking for, but unfortunately it's not available in the free version:Additionally, the following parameters... | Limit Nginx max concurrent connections |
There is not a way to exclude objects from rules that match them. Most likely, you will need to rearrange your objects using prefixes that meet your needs.There is a hack... which would involve copying the file into itself frequently enough that it never ages enough to match the rule, but that is obviously delicate. ... | I have a bucket that has a short lifecycle rule, everything older than 7 days gets deleted. The files that are added have dynamically generated names.There is one file in the bucket that I would like to exclude from this rule, is there a way to exclude this file from the rule so it is never deleted? | On AWS S3, can I exclude a file from lifecycle rule |
Need to rewrite your program. Use C++ AMP if you C++ or APARAPI if you Java.ShareFollowansweredMay 12, 2013 at 17:48isti_splisti_spl70666 silver badges1010 bronze badges2As the question says: "I am aware that there are libraries which will do this 'by magic' but I would like to understand what they are doing behind the... | We hear a lot about how certain types of calculation can be completed much more quickly by a GPU than by a CPU, but as a programmer I would have no idea how to force a calculation to be run in this way. Can anyone give a high-level explanation of how this is done?I am aware that there are libraries which will do this '... | How to write code which performs calculations using the GPU? |
After a couple of days I found it. I installed seperately LuaJIT with brew and used its libraries and header in building openresty.cd openresty-1.2.6.7
./configure --with-cc-opt="-I/usr/local/Cellar/pcre/8.32/include
-I/usr/local/Cellar/luajit/2.01/luajit2.0/include" \
--with--l... | I am trying to install Openresty v.1.2.6.7 under Mac OS X 10.6.
I am installing pcre with brew in order to satisfy the requirements
(pcre is version 8.32) and run the configure script with the pcre directories
specified and the --with-luajit option.cd openresty-1.2.6.7
./configure --with-cc-opt="-I/usr/local/Cellar/p... | Lua is not working in Openresty on Mac OS X |
1
I had a similar problem and after struggling for a while, I finally could make it work.
I'm using nginx 1.8 with thin server with gem 'faye-rails' and my mount point is /faye
My nginx config looked like this:
upstream thin_server {
server 127.0.0.1:3000;
}
map $http_... |
I'm trying to setup websockets on my rails application. My application works with iOS client that uses SocketRocker library.
As websockets backend i use faye-rails gem.
It is integrated to the rails app as rack middleware
config.middleware.delete Rack::Lock
config.middleware.use FayeRails::Middleware, mount: '/ws', se... | Websockets with the main application (nginx + passenger + faye) |
You are missing // in your href.
should be onclick="window.open('https://wa.me/085155448143?text=Halo%20saya%20ingin%20mengetahui%20info%20lebih%20lanjut%20tentang%20kursus%20di%20Auto%20Mitsuda', '_blank')">
`
|
Here is the problem, so I'm trying to deploy my website on Github Pages. It works, until I try to click my button which is when it got clicked will redirect to wa.me. It does redirect to wa.me when I try it in localhost, but it didn't work on my Github Pages. It came out looks like this
Here is the code:
<button clas... | HTML Button direct to others link didn't work on Github Pages |
As mentioned in a previous answer, you can use aRecord Filter, which is theNrparameter, to accomplish this. You can read more aboutRecord Filtersin theAdvanced Developer Guide.Since the question is specifically about configuring the pipeline to support this, it is worth pointing out that you have to explicitly enable p... | I need to filter a set of records based on a 'not equal to' (NEQ) condition.
For example if I want get all products where brand is not equal to say "X".
How to configure this situation in pipeline? | endeca filter not equal to condition |
If your script exits right away please try to addscheduler.joinat the end. Please note that it's different when running the script stand alone and via rails. See theREADMEfor detailled information.ShareFollowansweredMay 17, 2012 at 21:09iltempoiltempo15.9k88 gold badges6262 silver badges7373 bronze badgesAdd a comment| | I want to do something simple with the gem rufus-scheduler:https://github.com/jmettraux/rufus-schedulerbut, i can't get it to work.I have a regular rails app. I created a .rb file:# test_rufus_scheduler.rb
require 'rubygems'
require 'rufus/scheduler'
scheduler = Rufus::Scheduler.start_new
scheduler.in '1s' do
puts ... | Rufus Scheduler not running |
nginx will definitely work faster than Apache. I can't tell about fastcgi since I never used it with nginx but this solution seems to make more sense on several servers (one for static contents and one for fastcgi/PHP).If you are really targeting performance -and even consider C/C++- then you should give a try to G-WAN... | I currently have one server with nginx that reverse_proxy to apache (same server) for processing php requests. I'm wondering if I drop apache so I'd run nginx/fastcgi to php if I'd see any sort of performance increases. I'm assuming I would since Apache's pretty bloated up, but at the same time I'm not sure how reliabl... | nginx/apache/php vs nginx/php |
The technical documentation is itself subject to versioning and source control. I recommend making a separate repository for it. It can later be included as a submodule to each of the 4 projects.Here's an example of such documentation repo by Jetbrains:https://github.com/JetBrains/intellij-sdk-docsAlso, if you plan to ... | I have a project which includes 4 forked repos. I have kept these separate as they do quite different things, but work together across the project.The project requires all the repos and I want to keep all the documentation in one place so people have one single point for modification and configuration notes especially... | Where to put documentation relating to multiple git repos |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.