Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
Usually, you create a WebSocket connection within a SharedWorker when you want multiple tabs or windows of the same browser instance to be able to share that connection. So, if you open multiple tabs on the same site (in this case, GitHub), one single WebSocket connection will be enough for them all.
For example, we u... |
I got curious how GitHub rerender components when issue updated and found they use WebSocket in SharedWorker.
But why do they use it inside of SharedWorker, not in main thread? What's the main benefit from using WebSocket with one more thread?
| Why GitHub use SharedWorker for WebSocket |
The answer today is basically the same: Squashing these commits is possible, but rewriting shared history is something to be strongly avoided in Git.
Imagine that you and I each have a copy of some repository that also exists on GitHub:
A---B---C
You notice that commits B and C should really have been committed toget... |
I'm working with a github repo where a lot of commits historically have been "bugfix", "bugfix for real this time", "ok final bugfix", "finally fixed".
These were committed directly to master. How can I squash them?
Fromt his post a year ago - it basically sounds like this is bad, want to squash multiple commits in g... | Github repo squash commits on master |
A simple solution would be to store 1/4th of the image in 4 separate memories. First memory contain every 4th line, second every 4th line, starting from second line, etc. I would use 4 even if you need 3 lines, since 4 evenly divides 480 and every other standard resolution. Also, finding a binary number modulo 4 is tri... | I am currently trying to develop a Sobel filter in VHDL. I am using a 640x480 picture that is stored in a BRAM. The algorithm uses a 3x3 matrix of pixels of the image for processing each output pixel. My problem is that I currently only know of putting an image into a BRAM where each address of the BRAM holds one pixel... | Image Processing Pipelining in VHDL |
You can simply push it back to the repository by committing it with one of the actions available on Marketplace:- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Changed filesAlternatively, you can upload your data as an artifact to your workflow:https://github.com/actions/upload-artifact- u... | I am trying to use pandoc to convert markdown files pushed to my repo into pdfs. But, not sure how to save the output to my repo.Here's my code:name: pandoc
on: push
jobs:
convert_via_pandoc:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: convert md to pdf
uses: docker://pa... | How to save github actions output to the repo? |
I see' https://git.heroku.com/damp-reef-82414.git'with a space at the beginning.Just in case this is some kind of typo, try:cd /path/to/my/local/repo
git remote set-url heroku https://git.heroku.com/damp-reef-82414.gitThe same command can be used to switch tohttps://git.heroku.com/lit-earth-17372.gitif needed. | I am getting this error on running:git push heroku master
fatal: Invalid refspec ' https://git.heroku.com/damp-reef-82414.git'
Heroku Git URL - https://git.heroku.com/lit-earth-17372.git
https://lit-earth-17372.herokuapp.com/https://git.heroku.com/damp-reef-82414.gitwas directory earlier on heroku ,
current folder's ... | fatal: Invalid refspec (Heroku nodejs) |
Prometheus' Alertmanager usesgo templates, and I don't think they support arithmetic out of the box.Your idea of using(probe_ssl_last_chain_expiry_timestamp_seconds - time())/86400 < 29is usually correct for this kind of issue.If you need both divided and not values, or if you need to include result of another metric,y... | I have an alert in Prometheus that fires if a SSL Certificate expires 29 days from now.The Alert works perfectly fine. The problem is the Value it returns is not in days.
The query i use is as follow:probe_ssl_last_chain_expiry_timestamp_seconds - time() < 86400 * 29Now i would like to have the number of days in my des... | How can i use arithmetic operations in the description of a Prometheus Alert? |
What Makes a System Highly Available?One of the goals of high availability is to eliminate single points of
failure in your infrastructure. A single point of failure is a
component of your technology stack that would cause a service
interruption if it became unavailable.Let's take your example of a replica that c... | I'm struggling to understand the idea ofreplicainstances in Docker Swarm Mode. I've read that it's a feature that helps with high availability.However, Docker automatically starts up a new task on a different node if one node goes down even with 1replicadefined for the service, which also provides high availability.So ... | What's the main advantage of using replicas in Docker Swarm Mode? |
Instead of use libmcrypt or php5-mcrypt (below line apt-get install -y \) just use following library in dockerfile:
libmcrypt-dev \
|
I work on some old project (Laravel 4.2) which use mcrypt and php5 and wanna run it on docker. Here is my dockerfile:
FROM php:5-apache
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN apt-get update &&\
apt-get install -y \
git \
libpng-dev \
zlib1g-dev \
zip \
unzip &&\
... | php:5-apache mcrypt.h not found |
0
I don't know what is going on, but the latest development build of Eclipse Memory Analyzer gives some interesting findings.
Snapshot comparison - load heap dump 1, load heap dump 2, run
"Leak Suspects by Snapshot Comparison
: includes leak suspects
and a system overview f... |
I am trying to find a workaround for the JDK Nashorn bug JDK-8229011.
I reproduced the error with the script linked in the bug ticket and took several heap dumps. I used JProfiler and Eclipse Memory Analyzer
to find the root of the problem. But, I always end up in unreachable paths and I don't understand why the objec... | Java Memory leak: Why are unreachable objects not collected? |
I've encountered this issue recently and I fixed it by installing root certificates by executing the "Install Certificates.command" script in the python home directory used to run dbt.Laurent | I have a custom Databricks instance with a Domain name that points to an AWS Load Balancer. When I put that information in using either the HTTP instructionshereor the databricks cluster instructionshere, I get this response in the DBT CLI:Connection:
host: https://subdomain.domain.com
port: 443
cluster: 123456-stu... | Databricks DBT Runtime Error, cannot connect to Database. Maybe an SSL error? |
If I forked a repo and then modified it by deleting a couple of files, would there be any way to update the files I keep while making sure that the files I deleted remain deleted?I think rerere is what I would use but I am not sure if that works. Is there any way to use gitignore?It would cause conflicts. If you add th... | If I forked a repo and then modified it by deleting a couple of files, would there be any way to update the files I keep while making sure that the files I deleted remain deleted?I think rerere is what I would use but I am not sure if that works. Is there any way to use gitignore?Also would there be any way to do this ... | Is there any way to delete a file from a fork and have it stay deleted every time you sync in github? |
It was because of low cache Size for data to store so ..check it by giving
final int cacheSize = maxMemory; or by sufficient cache size
|
I am new to LruCache in android and i want to put and get bitmap images (JPEG) on this cache to prevent memory errors and memory exception,
so i can't understand why my code does not work. here is my code:
ImageView imageview = (ImageView)findViewById(R.id.imageView1);
Bitmap b = BitmapFactory.decodeFile(imagePath);
... | android: LruCache return null |
They're the same underlying risk (with respect to what you wrote as "disadvantages") because atype: LoadBalancerisatype: NodePortwhich just additionally works with the cluster's configured cloud-provider to provision a cloud load balancer which points to the allocated NodePort and keeps the Node membership in sync with... | From the documentation I seeNodePort: Exposes the service on each Node’s IP at a static port (the NodePort). A ClusterIP service, to which the NodePort service will route, is automatically created. You’ll be able to contact the NodePort service, from outside the cluster, by requesting :.LoadBalancer: Exposes the servic... | When to choose "LoadBalancer" over "NodePort" service type(or vice versa) in Kubernetes to expose service externally? |
In that case you're asking two questions. Sonar is a stand-alone server separate to Jenkins. It can be started from the command-line, as you've discovered.By default Sonar will startup it's own webserver and run with an embedded database. It is normal to configure Sonar to connect to a more permanent database like MySQ... | i have installed sonar, jenkins and the sonar jenkins plugin.on a working projekt I added sonar as a post build action. Now when i start the job, it fails with:"The current batch process and the configured remote server do not share the same DB configuration"I found 2 possible reasons for this:1. The database URL on th... | The workflow of jenkins and sonar with the database |
Simply disable "Require approvals" (the second checkbox in your screenshot), you will still be required to create a PR.
You can merge your own PRs, the only thing you cannot do is to approve your own work (after all: why would you? Hopefully you deem your own changes good!)
|
I am working on a repo where I am the owner and only author in it.
I want to have in my repo the same behavior as I would when working with a team that protects my branch from direct commits as they must go through a Pull Request. The reason for doing so is to protect from my own mistakes as I sometimes go back to mai... | Creating a pull request rule on GitHub that prevents me to accidentally push new code to main branch |
From thedocumentation:Known LimitationsAnalysis of Web Site Solutions is not supported, however analysis of Web Application Solutions is supported. | My solution contains Web Application projects and a couple of Web Site projects. SonarQube analysis works great for Web Application modules, but completely ignores code in Web Site projects. I know that the analysis is also possible using generic sonar runner, but the point is, how to do it using MSBuild.Sonar.Runner ? | Sonar analysis of C# Website Project with MSBuild.Sonar.Runner |
4
Normal way of taking heap and thread dump relies JMX and so called VM operations.
GC is itself a VM operation, so until it is finished next VM operation cannot start (and JMX is implement in Java so it is also blocked as a part of Stop-the-World pause).
You can try using ... |
We are facing GC overhead limit Exception on our servers and we are unable to take heap and thread dump , as it is giving some exception. How to go about solving this issue ? Can some one please help here .
| GC overhead limit Exception : Unable to take threads & heap dump |
There are several ways to do this inPython. For example, checking if'stringA' is in 'stringB':list1=['test-eob/PROCESSED_BY/FILE_JSON/222-Account.json',
'test-eob/PROCESSED_BY/FILE_JSON/1212121-Account.json',
'test-eob/PROCESSED_BY/FILE_JSON/122-multi.json',
'test-eob/PROCESSED_BY/FILE_JSON/qwqwq-Account.json',
'test-e... | I have connected to Amazon S3 and am trying to retrieve data from the JSON content from multiple buckets using the below code.But I have to read only specific JSON files, but not all. How do I do it?Code:for i in bucket:
try:
result = client.list_objects(Bucket=i,Prefix = 'PROCESSED_BY/FILE_JSON', Delimit... | Read files with only specific names from Amazon S3 |
1
+50
Actually the OutputCache directive is used for both Client as Server side caching. When you set the Location of that directive to Any, Client, Downstream or ServerAndClient, proper cache response headers are set such that browsers or ... |
I have an ASP.Net Web Forms application. The blog post "CacheCow Series - Part 0: Getting started and caching basics" mentions that Output Caching uses HttpRuntime.Cache behind the scene -hence not HTTP caching. The request reaches the server and cached response is sent from the server (when the valid cached output is... | Is there any Http Caching for ASP.Net Web Forms? |
found the answer , in the webrole or workerrole properties, set the number of instances to minimum 2, this is the issue for me. got it resolved after 8 hours of debugging | I'm having some trouble using Windows Azure Cache Preview.I've add the Nuget Package here:http://nuget.org/packages/Microsoft.WindowsAzure.Cachingand have configured my role for storing the ASP.NET sessions state as per the info on windowsazure.comProblem is, I getNo connection could be made because the target machine ... | Windows Azure Cache Preview |
We use a similarSocketFactoryandX509TrustManagerimplementation in some of our projects. In order to bind these classes up to your implementation, all you basically should have to do is hook them up to theHttpClient(assuming that's what you're using) used for client-server communication.We normally have a method to crea... | Like so many here, I'm trying to communicate with a site that has a self-signed cert. There are many many classes and code snippets showing how to do this, e.g.HTTPS GET (SSL) with Android and self-signed server certificate, but I can't find any that show how to actually use the classes. I've experimented a great deal,... | Android: Ignoring Self-Signed Cert Errors; Actual Implementation? |
Note:GitHub Pages now uses Actions by defaultIt means that, instead of configuring apublication source(a branch ordocs/folder), you can add in a.github/workflows(inside your repository) aactions/starter-workflowspages/static.ymlin order to publish your static HTML5 pages. | I have created the portfolio website using HTML5 and uploaded the respective files in the GitHub with new repository, but I cannot able to view the url link like (it is published at...) shown in YouTube videos.I searched GitHub pages under the "Code and Automation" tab, still I cannot able to view the URL.Can somebody ... | How to host our Portfolio in Github pages? |
Add to the pod definition:securityContext:
runAsNonRoot: true
runAsUser: 1000Also check this answer for more details:Kubernetes runAsNonRoot failing: CreateContainerConfigError | working with rancher below types of issue comes ---please help me for exacted code
App: influxdb2Installing
Failed to install app influxdb2. Error: failed post-install: job failed: DeadlineExceededCreateContainerConfigError: container has runAsNonRoot and image will run as rootRegards
Praveen | CreateContainerConfigError: container has runAsNonRoot and image will run as root |
First, check to see if the old remote is still in your list:
git remote -v
If it is, and you want to delete it, you do:
git remote rm [remote-name]
... for example.
Now create a new "remote" with the URL of the new repository host:
git remote add origin [https://github.com/user/repo.git]
Then to push your local bra... |
I was working on a branch. But one of the contributors deleted the remote version of the branch. So, I now have a local copy of the code but no remote branch to push to. How do I recreate the remote version?
| How to make a remote branch from a local branch in Git? |
To make sure I understand the situation, let me use a concrete example. Let's say the project has a folder that contains images.project/img/The user can add their own images to that folder, and they can change the existing ones. You don't want the user's additions and changes to the images pushed.Making that work wit... | I have some folders where is downloaded by developers when they set up the development environment for the first time and doesn't have to be re-download. How can I set this folder for satisfying this requirements in the Git?① First time when the developer commands "git clone ", the folder have to be downloaded.② When t... | I want to preserve the specific folders, but don't download from git repo |
Hosting provider says: This is a new security feature that is recently added to avoid domain mapping attacks on the websites so server will not serve a website if the domain name is not present in the Nginx domain relevant file.
To fix, in your cloudways hosting account:
Choose the application experiencing the error m... |
Website Unavailable
The website you are trying to reach is unavailable because it use security service to prevent unauthorized access and online attack.
No information in the Cloudways KB - a broad search returned nothing so I'm adding this here for others.
| Cloudways Hosting - application shows Website Unavailable |
solved using generic-webhook-triggerhttps://link.medium.com/NaDci1Hfvfb | I build a freestyle jenkins pipeline that executes sonarqube scanner on develop branch and sends slack notification after the build finishes with the results, when I build the pipeline manually it works as expected.I used Bitbucket Plugin to trigger the build after each commit, but it's only working after I changed the... | Trigger Jenkins build for each commit on develop branch |
Why not move the images up and then deny all?location ~* \.(jpg|jpeg|gif|png|bmp|ico|pdf|flv|swf|exe|html|htm|txt|css|js) {
add_header Cache-Control public;
add_header Cache-Control must-revalidate;
expires 7d;
}
location / {
deny all;
}there is no syntax for NOT matching a regula... | I'm trying to setup nginx so "static.domain.com" can only serve images. This is what I have come up with, but I know it can be done more efficiently. I want to serve 403.html if someone tries to access any .htm, .php, directory (anything else I'm missing?) files. Of course, with the exception of 403.htm and static.htm ... | nginx - serve only images |
The first patterns will run your cronjob every 58th second: 00:00:58, 00:01:58, 00:02:58...and so on.The slash character can be used to identify periodic values. For example*/15 * * * * *means, that your job will run ever 15th second: 00:00:15, 00:00:30, 00:00:45 ...and so on.In my opinion*/58doesn't look very useful.... | I am usingnode-cron. Please help to explain to me the different between:var pattern_1 = '58 * * * * *';
var pattern_2 = '*/58 * * * * *';when running this function:new CronJob(pattern, function() {
console.log('lalalalala')
}, null, true, 'America/Los_Angeles'); | time pattern in node-cronjob |
I'm not sure as to why you need to compare the dates, so I'll just assume you want to update rows that where created that exact second.I believe it will be much easier for you to useMySql Eventsas you won't have to worry about timezones as it's the same time, and basically it runs a cron itself and you have basically t... | I am trying to update table row every minute when crondate(timestamp field) and current timestamp match. When both match i am setting state = 0 but not working. I have check cronjob and it is working and executing every miniute.I will thankful If anyone can help me.My Code:function runCronJob(){
$timestamp = date... | Update table row every minute using with Cron Job |
Just commit your pdf into your repo and it will be accessible just like any other file.For instance, my resume is committed to my repo athttps://github.com/xiongchiamiov/xiongchiamiov.github.com/blob/master/about/resume.pdfand is available on the web athttps://changedmy.name/about/resume.pdf(I have a CNAME set up forch... | I have a github webpage. How do I make a page displaying purely a pdf? I.e my cv?To clarify, I wish the page to be filled only with the pdf - not any headings etc. | I have a github webpage. How do I make a page displaying purely a pdf? I.e my cv? |
Is there any reason you are using rm instead of find's own delete primary?find /home/.../...* -size 39c -type f -deleteThe key to why it is not working though it that the size primary takes is parameter as a number of 512k blocks and rounds the file size up to meet that, so 39 actually means a file size between 14,337 ... | I am trying to delete all files in a certain directory with a certain size, in this case 39 bits exactly. I know the below code will delete all files that are 0 bits.find /home/.../...* -size 0 -type f -exec rm -f '{}' \;So what do I need to do to make it work for 39 bit files? The below cron doesn't work.find /home/..... | Delete Files Inside Of Directory By Size With Cron Jobs |
It is not possible according tohttps://github.com/kubernetes/autoscaler/issues/966Probably because there is no way to access the executable (which it seems to be) on GKE.You can't even view the logs of the autoscaler on GKE:https://github.com/kubernetes/autoscaler/issues/972 | I create cluster onGoogle Kubernetes EnginewithCluster Autoscaleroption enabled.I want to config the scaling behavior such as--scale-down-delay-after-deleteaccording tohttps://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md.But I found no Pod or Deployment on kube-system which is cluster autosca... | Where to config the Kubernetes Cluster Autoscaler on Google Cloud? |
You can use this rule:RewriteCond %{REQUEST_URI} !^/folder/index\.html$
RewriteRule ^([a-z0-9-]+)\.html$ /folder/index.html [L,R=301] | I have search for this however cannot seem to find the answer. I have a folder with 50 html pages and the index (home page)
(Don't ask why, it's inherited)What I'd like to do is redirect all of these 50 files to the index page in the same folder.Eg. folder/test.html to folder/index.html, folder/test2.html to folder/ind... | redirect all files within the same folder to the index page (same folder) |
Is this due to a Docker or an OSX limitation?
NO Increase the amount of available RAM to Docker to resolve this issue.
Is there a way I can modify these limits? If I drop the requested
limit to 1GB, it will spin up, but still crashes once I run my heavy
query (which is what caused the need for increased Heap space... |
I'm trying to spin up a Neo4j 3.1 instance in a Docker container (through Docker-Compose), running on OSX (El Capitan). All is well, unless I try to increase the max-heap space available to Neo above the default of 512MB.
According to the docs, this can be achieved by adding the environment variable NEO4J_dbms_memory_... | Neo4j in Docker - Max Heap Size Causes Hard crash 137 |
There is no official API call to retrieveInstance Typesavailable in each region.However, you can retrieve and parse theAWS Price List API, which is really a set ofstatic JSON/CSV filesthat contain pricing for each Instance Type in each Region.You'll be amazed at how many pricing combinations there are -- the master EC2... | I need to list all the instance types that are provided by AWS using boto. I could've used a static list of instances but it doesn't seem a good solution because the instance types might change in future. | List AWS instance types using boto3 |
Check first the syntax:
${VER}
# not
{$VER}
In your case:
extra_build_args: "--build-arg CURRENT_DD_VERSION=${VER}"
You also have the documentation "Environment variables"
To set custom environment variables, you need to specify the variables in the workflow file.
You can define environment variables for a step, jo... |
I am calling a GitHub action, and I want to pass it the parameter extra_build_args with the value --build-arg CURRENT_DD_VERSION={$VER} (not in string) where $VER is a shell variable that I set with a specific version. When I check what was passed in I see it took the literal value {$VER} instead of resolving the vari... | Use bash variables as parameters to a GitHub Action |
So far, I've managed to get a workaround by adding a rewrite rule to Nginx, under plain http:rewrite ^/(.*)$ https://www.example.com/$1? permanent;Which redirects all plainhttprequests to thehttpsserver.Update:Apparently, as I want the app not to care about how the front web server is serving it, it's up to the same w... | To start with, this sounds more like a bug then anything else.My rails application is served by Unicorn. Then, using Nginx as a reverse proxy, I serve the application to the outside world using SSL.So far so good, no problem. I'm using relative paths (Restful path helpers), so there should be no problem to produce this... | Rails application behind proxy, with SSL, renders paths as "http://" |
3
Just as an example I'm providing my config file below, here is just a base setup, for more information you can read this article: https://blog.codemagic.io/how-to-dockerize-flutter-apps. Please feel free to ask additional questions.
FROM cirrusci/flutter
RUN sdkmanager -... |
I want to deploy to docker my already built flutter mobile app. I was unable to find a clear tutorial of this exact case using Dockerfile and docker-compose.yaml.
any help ???
I want to deploy it on docker and be able to use it on any mobile device by running the app container.
Any help will be really appreciated.
| How to deploy to docker a flutter mobile app? |
If you push project P, no one will be able to get the commit from step 6, because you do not have permission to make push any changes to the 3rd party library's remote repo.Have you considered to create a repo to store your company's changes to Q, instead of registering the submodule to 3rd party's remote? So that you ... | I have a git project P. Within my project P is a submodule Q that was cloned off a 3rd party library's master branch.P
|
- src
- Vendor
|
- QI do not have permission to make push any changes to the 3rd party library's remote repo.I made some fixes inQand I now want those to be pushed into themasterbranch of ... | Make changes to a git submodule and then add those into my main project |
You can't redirect https to http if you don't have a valid https certificate.(More precisely, you can, but with the scary red browser warning)You can create a new certificate with let's encrypt for example. (must be renewed every 3 months, but it's free and can be automated) | The website in question has been indexed by google on it'shttps://URL. But recently the SSL Certificate subscription ended.Now when people click on the link in Google the browsersunsafe privacy pageis displayed, because we lack a SSL certificate.How to redirect ALL requests to the http site?We tried this, but it didn't... | How to redirect all HTTPS to HTTP |
So, in my update, I mentioned adding CNAMEs from a blog post. This was it, the second I did that, it started working.
To clarify, I did this to solve my problem:
Edit your CloudFront distribution.
Under the tab General, click edit.
In the Alternate Domain Names text box, add (at least) the something.mydomain.example ... |
I can't get the Internet <-> CloudFront <-> S3 Bucket working, using an AWS certificate. This is what I did:
Created a certificate, a wildcard one, like: *.mydomain.example.
Created a S3 bucket, no fiddeling with properties.
Creating a CloudFront distribution, using the created S3 bucket URL as origin, selecting my c... | CloudFront distribution and AWS issued certificate gives SSL_ERROR_NO_CYPHER_OVERLAP |
I just ran into a limit. I added60 CloudWatch triggersto a Lambda function and when I tried adding one more trigger, I got an error saying:"The final policy size (20643) is bigger than the limit (20480). (Service: AWSLambda; Status Code: 400; Error Code: PolicyLengthExceededException;" | I cannot find this limitation listed anywhere in the AWS Documentation for maximum number of event sources to trigger one Lambda.I have a Lambda which will be triggered by an indefinitely growing number of S3 Buckets. Obviously this will only work if the maximum number of buckets exceeds the maximum number of triggers.... | What is the maximum number of event source mappings per AWS Lambda? |
Ended up logging in to swarm master, and from there I logged into the swarm-agent with:ssh -i nopass.pem [USERNAME]@10.0.0.5The ip-address to the swarm-agent I found at portal.azure.comFrom the swarm-agent I could dodocker rmi 7c3ea6fa5131 | I can't remove docker images on azure, and I have run out of storage space.I login to$ ssh -i nopass.pem -fNL LOCAL_PORT:localhost:REMOTE_PORT -p 2200 [USERNAME]@[DNSPREFIX]mgmt.[REGION].cloudapp.azure.comand then I can see a bunch of images with$ docker -H 127.0.0.1:22375 images
REPOSITORY TAG ... | Cant remove docker images on azure, gives "Error: No such image" |
After a lot of struggle, I came to conclusion that this error was caused due to Certificate Temper detection feature in Dex-guard. We have to add SHA-256 hash inside Dex-guard rules.
|
I am getting java.lang.OutOfMemoryError at app startup i.e Splash Activity, when building release APK with latest dexguard version 9.1.13.
java.lang.OutOfMemoryError: Failed to allocate a 574109856 byte allocation with 938429 free bytes and 253MB until OOM, target footprint 3753717, growth limit 268435456
at com.paym... | Getting java.lang.OutOfMemoryError while building Release APK with DexGuard |
At the beginning of the PHP page that does all your credit card processing, you can add this:It will redirect back to itself, except usinghttpsif it was first loaded overhttp. Of course you still need an SSL certificate installed for your domain.if (!isset($_SERVER['HTTPS']) || !$_SERVER['HTTPS']) { // if request is n... | I have a single PHP file which handles credit card processing. It starts as a form to input the credit card number, then becomes a "confirm" screen (showing the credit card number) then once more to process and display the results. All three loads will be done with PHP submits (I realize the confirm might be better a... | How do I force HTTPS on a single file? (PHP) |
Have you tried setting the Bitmap variables as Soft-references?
|
i have a custom list view. in that i am listing out images of around 200. The images are been stored in my drawable. I have converted the image to be a bitmap and i am displaying the image as bitmap. Every time when the activity is being opened the images get listed out. Like this when i am calling the activity for ar... | how to solve the out of memory error in android app |
If you consider a typical 5 stage pipeline (IF, ID, EX, MEM, WB), the output of theADDwill be available atEX -> MEMinterface. For theMEMstage of theSWinstruction, it needs the memory address, which is0 + ($t2)and the data which is supposed to be in$t0. However$t0has not been updated yet, as the pipeline has not reached... | On a static two-issue pipeline for MIPS, can I use the forwarding paths with two instructions running in the same clock cycle?For example:1. add $t0, $t0, $t1
2. sw $t0, 0($t2)Can I execute these two instructions on the same clock cycle?
Theswcould use the resulting value of theaddwhen it is going to execute the MEM... | MIPS - Forwarding in static multiple-issue |
That code is extremely convoluted and can be simplified to:public static function _fetch($sql) {
$q = mysql_query($sql);
if (mysql_num_rows($q) == 0) {
return false;
}
$result = array();
while ($linha = mysql_fetch_row($q)) {
$result[] = $linha;
}
return $result;
}Does exac... | I made a method on my class to fetch and store in a array all the results the desired SQL statement has in it, and it works just fine. Now, after some months in production, I came across this error:Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 3503272 bytes) in C:\xxpathxx\class.DGC_Ge... | Memory Exhausting in mysql_free_result() |
Create your key and then when calling aws's --public-key-material argument, call it with file:// in front of your key path.
Example:
$ aws --region eu-central-1 ec2 import-key-pair \
--key-name "awsfrankfurt" \
--public-key-material file://~/.ssh/awsfrankfurt # <-- this
This is a weird issue, because, file:/... |
How to solve this?
# I used this command to create the key with a password
$ ssh-keygen -b 2048 -t rsa -C "awsfrankfurt" -f ~/.ssh/awsfrankfurt
# Then when I try to import it into AWS EC2, the error appears:
$ aws --region eu-central-1 ec2 import-key-pair \
--key-name "awsfrankfurt" \
--public-key-material ~/... | AWS CLI: Key is not in valid OpenSSH public key format |
Assumining your Jenkins is running on a linux machine, you could use shell commands to achieve this. The following example should work for your scenario:pipeline{
agent any
environment {
PS=""
}
stages {
stage ("assigning variable") {
steps {
dir('dev/team/') {
script {
... | I would like to get the file name from a folder and set it to a global variable in a jenkins pipeline.,
eg;def PS, this was placed on the top of the declarative pipeline script.Assume that the file name is Someting.zip (it may change frequently) inside a folder (say/dev/team/*.zip) Whatever the name might be., we need ... | Using declarative pipeline script., Get the name of the file from a folder and assign it to a global variable, and call that variable in another stage |
You can get around this problem simply by making sure the target dir (with the dev. packages) is symlinked to the same link in both environments.E.g. if your dev packages are in /home/micper/packages, create a symlink:ln -s /home/micper/packages /opt/php/packagesThen add the same logic to your docker config:volumes:
... | I have a docker container with a host's directories mapped like this -/app(project itself) and/packages(local dependencies). Then I have/app/composer.jsonfile in which I define local repositories which reside in/packageslike this"require": {
"myvendor/mypackage": "^1.0",
},
"repositories": [
{
"type": "... | Force PHP composer to create relative, not absolute, symlinks of local repositories |
8
In your case, it's highly probale that the script you're processing reached some given limit of the amount of resources it's able to use and that depends on your OS and other parameters, are you running something else with the script ? or are there many open files etc ?
T... |
I am facing a problem with a python script getting killed. I had always used this script with no problem at all until two days ago, then it started to print, without any change in the code, the string 'killed' before aborting the execution.
Other people have tried to run the same code on their system and it works fine... | Python script gets "killed" |
Consider your Test1 performs the following behavior:
char * x1 = NULL;
Test1 (x1);
Test1 is done within the following:
void test1 (char * t) / / t -> x1 -> null
{
t = (char *) malloc (11);
// t now points a different place (the memory allocated), and the reference of x1 continues pointing to null
strcpy (... |
it seems i'm stuck with some basics. Can someone explain me why next code:
#include <stdlib.h>
void Test1(char *t)
{
t = (char *)malloc(11);
strcpy(t, "1234567890");
}
void Test2(char **t)
{
*t = (char *)malloc(11);
strcpy(*t, "1234567890");
}
void Test3(char *t)
{
strcpy(t, "1234567890");
}
c... | Pointers to string in functions |
That variable was defined inplugins.sh(which is deprecated and supposed to be replaced byinstall-plugins.sh)# the war includes a # of plugins, to make the build efficient filter out
# the plugins so we dont install 2x - there about 17!
if [ -d "$JENKINS_HOME" ]
then
TEMP_ALREADY_INSTALLED=$JENKINS_HOME/preinstalled... | I am trying to package the vanilla Jenkins image into Docker using this tutorial:https://github.com/jenkinsci/jenkinsfile-runner/blob/master/DOCKER.mdEverything works until one of the last steps where the Dockerfile tries to runinstall-plugins.shfrom aplugins.txtfile that was just copeid into its own directory. This is... | jenkinsci docker install-plugins.sh fails build |
Sounds like your branches depend on each other and this is causing you problems. Branch depencencies can be caused by the branches getting bigger and bigger and containing too much stuff.
This means that you could benefit from merging smaller things earlier! However looks like you don't want to merge teacher or studen... |
I'm maintaining 4 branches of a project on Git with a structure as below.
master
student
teacher
authentication
The problem is I created "authentication" branch the last and added some code from this branch. Now, I switched to "teacher" branch to continue working on it. However, I need some features I added in the "... | Working on multiple git branches that are dependent on each other |
I believe the original issue stems from Node (probably sending large files inside Node's I/O loop), and my assumption that Nginx was taking the download from Node properly was incorrect. I had a couple mistakes that meant NginxXSendfile wasn't working, and Node was still handling the response.
I had a syntax error:
To... |
Sending large files (1.5gb) to a client with a connection speed < 2mbps results in the browser only receiving 1.08gb of data, but believing the download to be complete. Faster connections receive the full 1.5gb file.
My Express.js app figures out which file to send and responds with the response#download method:
app.g... | Nginx fails to send full file from Node/Express app |
You might have a look at deployingKafka Connectinside of Kubernetes. Since you want to replicate data from various RDMBS databases, you need to setupsource connectors,A source connector ingests entire databases and streams table updates
to Kafka topics. It can also collect metrics from all of your
application serve... | The challenge is to create a Kafka producer that connects to a Kafka cluster that lives within a Kubernetes cluster from outside that cluster. We have several RDBMS databases that sit on premise and we want to stream data directly to Kafka that lives in Kubernetes on AWS. We have tried a few things and deployed the Con... | How to connect to Kafka in Kubernetes from outside? |
When you search for a docker image on Docker hub, there will be 2 tabs-Repo InfoandTags. Open Tags tab and you will see the sizes of all the types of images you can pull for that image. | How does one get the size of a Docker imagebeforethey pull it to their machine? | Get the size of a Docker image before a pull? |
NoDisposeis not called. It is easy to test.public class TestClass : IDisposable
{
public void Dispose()
{
Console.WriteLine("disposed");
}
}
MemoryCache _MemoryCache = new MemoryCache("TEST");
void Test()
{
_MemoryCache.Add("key",
new TestClass(),
ne... | I have a builder class that creates an instance implementing IDisposable. Whenever the item to build is already in the cache, the builder will return that instance instead. My question is, will the cache call the Dispose() method on the IDisposable items it contains when they are evicted or do I have to explicitly code... | Will System.Runtime.Caching.MemoryCache dispose IDisposable items when evicted? |
References
Often times issues are dependent on other issues, or at least relate to them and you’d like to connect the two. You can reference issues by typing in a hashtag plus the issue number.
Hey @kneath, I think the problem started in #42
Issue in another repository? Just include the repository before the name lik... |
Nearly every issue I file on gh refers to code on a particular branch. Does github have any mechanism to link an issue to the branch?
I need to filter issues by branch, so I am not distracted by issues in other feature branches.
Is there a way to do this? I know milestones can be (ab)used to reach a similar effect, bu... | How to associate GitHub issues with a branch? |
As long as you don't abuse the application state, then I don't see a problem in using it for items that you don't want to expire.
Alternatively I would probably use a static variable near the code that uses it. That way you avoid to go through HttpApplicationState and then be forced to have a reference to System.Web i... |
I know that most people recommend using HttpRuntime.Cache because it has more flexibility... etc. But what if you want the object to persist in the cache for the life of the application? Is there any big downside to using the Application[] object to cache things?
| HttpRuntime.Cache[] vs Application[] |
You can use regular expression instead of cut. For example to extract version number fromnginx-1.15.0use:echo 'nginx-1.15.0' | grep -o '[0-9.]*$'Output:1.15.0 | I'm trying to check if the installed nginx version is equal with the version defined in a config file.My code:#check version
command="nginx -v"
nginxv=$( ${command} 2>&1 )
nginxvcutted="echo ${nginxv:21}"
nginxonpc=$( ${nginxvcutted} 2>&1 )
if [ $nginxonpc != ${NGINX_VERSION} ]; then
echo "${error} The installed Ng... | Bash: Nginx Version check cut |
To unlink the git repo to GitHub,enteringgit remote -vwill list the remotes configured.origin[email protected]:user/repo.git (fetch)
origin[email protected]:user/repo.git (push)
gitlab[email protected]:/user/repo.git (fetch)
gitlab[email protected]:/user/repo.git (push)the one with github.com (https://orgit@) points to... | I'm trying to completely delete and re-upload my GitHub repository. I'm using Pycharm's GitHub integration, and for the life of me I can't figure out how to make Pycharm forget I ever had GitHub repo setup and just start from scratch.I even tried moving the .git files to another location and clear Pycharm's cache but t... | How to completely reset github repository in Pycharm? |
So my question is, in the CreateList function, how is the program allocating memory for temp?
It isn't, which is a problem. It should do something like this:
temp = malloc(sizeof(Listhead));
And does the code *hallocp = temp copy the temp LIST into the hallocbuf array?
It copies the pointer that was saved in tem... |
I'm writing a bit of code for a class, but since I have no experience in C I'm a bit unsure of what the code I've written actually does. Particularly what the memory looks like. Here's the relevant bits:
typedef struct listnode *Node;
typedef struct listnode {
void *data;
Node next;
Node previous;
} Listno... | Need some help understanding pointers and memory in C |
That particular job is going to run to completion pretty quickly, I believe. Once you get the setup working there may be no interesting metrics because the job doesn't run long enough for anything to show up.When you run with a mini-cluster (asjava -jar ...), theflink-conf.yamlfile isn't loaded (unless you've done some... | I'm trying to expose the built-in metrics of Flink to Prometheus, but somehow Prometheus doesn't recognize the targets - both theJMXas well as thePrometheusReporter.The scraping defined inprometheus.ymllooks like this:scrape_configs:
- job_name: node
static_configs:
- targets: ['localhost:9100']
- job_na... | Can't expose Flink metrics to Prometheus |
As is the usual case, I've figured out my own problem and its quite obvious. If you're trying to accomplish the above the trick is quite simple.First create a new NGINX Virtual Host that listens on HTTP and proxy_passes to your remote HTTPS backend like so:/etc/nginx/sites-available/remote_proxyupstream remote {
... | Suppose I want to proxy some portion of my traffic to a remote backend instead of the local listener on the server. For example:upstream backends {
server 127.0.0.1:8080 weight=20; # local process (HTTP)
server other-remote-backend.company-internal.com:443; # remote server (HTTPS)
}
location / {
# ...ot... | With NGINX upstreams, is it possible to proxy pass to both HTTP and HTTPS backends in the same upstream? |
For local ignoresyou should use the.git/info/excludefile, not.gitignore:Patterns which are specific to a particular repository but which do not need to be shared with other related repositories (e.g., auxiliary files that live inside the repository but are specific to one user’s workflow) should go into the$GIT_DIR/inf... | I would like to know how to gitignore files but only on local, without pushing it (because the other people working on the project should not get this update of gitignore of files I added there.To be simple, after a git status I only have :modified: .gitignorebecause I added my files to ignore to my gitignore but wel... | .gitignore only on local |
Short answer is: yes.
Longer answer is depends. There is a hardware support for page re-mapping, which basically gives your program a window of a few pages into a larger area of memory.
This window is however, should be managed by the program itself and will not get support from memory manager. There are examples of ... | Is a 32-bit program running on a 64-bit OS able to use more than 4GB of memory if available? | Can a 32-bit program use more than 4GB of memory on a 64-bit OS? |
I would say AWS-SDK. I have not used fog, but have used the AWS gem, and switched. I have found that the official support and bug fixing from the ruby person at Amazon has been pretty good. Also the code in AWS-SDK is nice and clean, and I like the approach. When AWS announces a new feature, the AWS-SDK client seems t... |
I am just about to start working with AWS (s3 and ec2) and I was wondering which gem is better: aws-sdk or fog?
| Which gem is better for working with AWS: aws-sdk or fog? |
According tohttps://help.github.com/articles/searching-issues/#search-based-on-when-an-issue-or-pull-request-was-created-or-last-updatedcreated:2016-12-01..2016-12-08Will output issue created during these 7 days.ShareFollowansweredAug 2, 2016 at 21:05sebastienvgsebastienvg31111 silver badge77 bronze badges117Thanks. Bu... | We'd like to list all GitHub issues created in the last seven (or,n) days. This is a relative time window.We don't want to use a specific date, because we'd like to create a link that is always correct (so we can link to the report of recent issues).Thanks! | How do I search GitHub issues "created in the last seven days"? |
You can pull anything with a ref. The thing to do is to make a branch that tracks only that subtree, github's gh-pages is a very common example of this. Here's a worked example, that shows how to use the plumbing to do gruntwork with already-committed content like this, you can put your webhook on just the gh-pages b... |
So I've been trying to find an acceptable deploy solution for my team and our projects. I read a ton of How To's but at the end of the day, I just want to push to the master branch on github and have the site updated.
So to do that, I thought I'd do this:
create a web hook on github that notifies our server when the ... | Git pull specific folder (actually only download that folder) |
I have found a way.
Here is the content of my Dockerfile:
FROM php:7.3
# Update packages
RUN apt-get update
# Install PHP and composer dependencies
RUN apt-get install gnupg -qq git wget curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libzip-dev
# Clear out the local repository of retrieved pa... |
I need a docker image that can get connected to an external MSSQL datatbase when executing a PHP script. I have created one, but I could only get connected to the DB through the tsql CLI. I think it uses Freetds. But when I tried to use a php script I had an error saying that the php could not find the PDO library... ... | I need a docker image that can get connected to an external MSSQL datatbase with php |
You usually need to add the SAS executable to the command. Assuming it is in the path then justsas /prod/file/sas-data2/....../SasProgram.sasshould work.If it is not in the path, then explicitly prefixsaswith the path. | I am new to the world of PuTTY and hoping this is an easy ask. I have 16 programs in SAS that I need to automatically kick off once a month using crontab via PuTTY environment. I have it set up to email me but it just tells me the file doesn't exist. What am I missing in my script?CRONTAB:
SHELL=/bin/bash
* 9 15 * * /p... | Running SAS program via Crontab PuTTY |
I think this is the as designed behavior for cmdlets that take pipeline input. When input is pipelined, each object is treated individually, but if you pass the collection as the InputObject the collection is treated as a single object.You can try it withSelect-Object. There is a distinct difference betweenps | Select ... | I have a PowerShell script that takes pipeline input, processes each item, and then callsWrite-Hoston each one.When I call the script using parameter input, myforeachloop writes out a single header row, and then the data below it. When called via the pipeline, I get one header row and one data row for each row of input... | How should I use Write-Host so that pipeline and parameter input behave the same way? |
I think you can achieve the batch operation by setting SQS queue as destination for S3 notification. Let's say you want to specify a batch size of 20, all your S3 events are going to SQS. You would create a CloudWatch rule to trigger a Lambda when your SQS have 20 items. Your Lambda would poll SQS for the batch of 20 ... |
I have an AWS Lambda function which processes events from S3. I'd like to aggregate them before processing and let lambda process the batch.
This is depicted below:
Ideally, I'd like to be able to specify a batch size, and a timeout (say a single even, and then nothing for 5 sec, I'd like to send an 1-event batch).
... | Is there an idiomatic way to aggregate events before processing them in AWS Lambda? |
In the end, I found a workaround - not a particularly nice one, mind you. I opened up the Sonar database and had a look in the PROJECTS table:select * from projects where kee like 'au.com.foo:project-bar%'This revealed a couple of old entries from a previously (unsuccessful, I guess - there was no files indexed against... | I'm having trouble creating a project in my sonarqube instance - it's like there are projects already created that I cannot see.I login as the admin user, go to the Administration -> Projects -> Projects Management page, and then click Create Project.I give it a name, and then when I type in my maven project name in th... | Can't create project in sonar |
Well, just changeRewriteRule ^$ http://example.com/mobile [L,R=302]toRewriteRule ^/?(.*)$ http://example.com/mobile [L,R=302]or maybeRewriteRule ^/?(.*)$ http://example.com/mobile/$1 [L,R=302,QSA]To redirect to a different hostname (sometimes called a "subdomain"), as asked in the comment below, you can do that:Rewrite... | how do i redirect users to my mobile page ?i am using this code on htaccessRewriteEngine on
RewriteCond %{QUERY_STRING} !^desktop
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|iphone|ipod|#opera mobile|palmos|webos" [NC]
RewriteCond %{HTTP_USER_AGENT} "acs|alav|alca|amoi|audi|aste|avan|be... | redirect to mobile site using htaccess |
Download the geoPlugin class from:http://www.geoplugin.com/_media/webservices/geoplugin.class.phps(free lookup limit of 120 requests per minute and block for 1h if crossed the limit. the block will automatically remove 1 hour after the last time your server stopped sending more than 120 requests a minute)Put aindex.php... | I made a site it with some subdomains; according to the country's IP address the user is supposed to be automatically redirected to corresponding subdomain.Example :Main site isabcd.comSuppose some one fromIndiatyped this url abcd.com,then the page redirects toind.abcd.com | how to redirect domain according to country IP address |
Data forwarding overcomes some hazards, with the recognition that the necessary value computed by a prior instruction is available sooner than when it appears back in the register. So data forwarding is always a win over stalling and NOPs.Of course, stalling is sometimes necessary, as in the case you describe with a l... | We can use bothNOPs, data forwarding and stall cycles to resolve data and load-use hazards. However if we have multiple data hazards, then it becomes quite inefficient to resolve all of them usingNOPs, as they would increase the runtime of the program. In comparison to that, if we have a load use hazard, we can use dat... | Why are data forwarding and stall cycles more efficient than NOPs for dealing with load-use hazards? |
for this you can use picasso Library
You can download it from Picasso Library site simply put this jar file into libs folder. It will manage all property of Image.http://square.github.io/picasso/String imgURL = "Your URL";
ivmage = (ImageView) findViewById(R.id.imageView1);
Picasso.with(MainActivity.this).load(imgURL).... | Hi i am new beginner in android. I want to insert image in imageView from URL but whenever one time it is loaded from URL in imageView then second time it should be insert without internet means it would be stored in cache as well. | Load image from URL to imageView as well as Cache |
0
When something like that happens to me (very rarely) I can only think of git reflog which is a commit history of all your git commands.
So if you want to go back in time in a given git operation you can
$ git reflog
794e18b HEAD@{0}: commit (merge): Fixed conflicts
f9b382... |
I wanted to push a file to my GitHub account.
I did
git push origin master
and got an error
src refspec master does not match any.
I did
git push --force origin master
now all the other files in the repository are deleted
I want to reverse this step. How can I do that? Is it also possible to reverse changes thro... | Lost some files in Git |
Maybe your class file is in sub package.
This should work:property "sonar.exclusions", "**/**/*LineChart.java" | I am working in Code smells in my project, but here is one class in which i don't want to change anything. This class showing in code smells, I want it should not be show in Code smells.Using This Property to Exclude that class but didn't work for meproperty "sonar.exclusions", "**/*LineChart.java"Can anyone please hel... | How to exclude file from Code Smells in SonarQube? |
I ask the support of heroku and they answered, that you can't access herokudns address you can only use it in your CNAME,.. you can access only your app through yourdomain.herokuapp.com .... so this is basically normal and nothing to worry about. | I just upgraded my account on heroku to "hobby plan" and it gave me a new dns address, i was trying to access the dns address they given with the format mydomain.herokudns.com. and the page says No such app. | No such app error with herokudns address |
Before processing the second image could you try callingdel content_activations
del loss
import gc
gc.collect()These are objects that will need to be redefined anyway and this way you clean them up (therefore freeing the GPU memory) before the nextcontent_activationsandlosshave been constructed.ShareFolloweditedFeb 21... | I am going through theArtistic Styling transfer tutorial in CNTK. I can go through for one image then have to restart the jupyter notebook to avoid running out of GPU memory to style an additional image.The error code is blow. I would like to just put the last 2 codes blocks in a for loop that reads in a folder of imag... | Dump GPU memory in CNTK Artistic Styling Transfer |
Solved:The below configuration solved my issue.Explanation:The javascript module had sources in thesrc/main/webdirectory which I guess the sonarqube plugin do not analyze implicitly. Setting the propertysonar.sourcestosrc/main/webwill trigger analysis of all javascript code in this directory and below.plugins {
id ... | I have multi-module gradle project as shown hereprj-root
-prj-react-js
-src/main/web
-prj-java
-prj-java-mod-1
-src/main/java
-prj-java-mod-2
-src/main/javaTheprj-react-jsmodule is javascript module and onlyplugin id 'base'is applied in its gradle file.
The s... | gradle sonarqube plugin on non-java module |
There's no sense in caching both image sizes, it takes too much memory.
Best practices would be (to my humble opinion):
Make sure your cache uses SoftReferences, this way you can make sure that you don't run out of memory, and can always load new bitmaps on the "expense" of losing old ones.
Use the Canvas' drawBitmap... |
I have an app which operates a large quantity (~100) of bitmaps - i.e. music cover art. Bitmaps are used in two ways - as a large background and a small (50dip) icon.
Does it make sense to preload and cache two sizes as separate bitmaps?
I've implemented both approaches (use large bitmap as the icon | cache both size... | Android bitmap caching |
The definitive way to check if your GPU is being utilized is by using nvidia-smi command. My favorite arguments are:
nvidia-smi --query-gpu=timestamp,name,pci.bus_id,driver_version,pstate,pcie.link.gen.max,pcie.link.gen.current,temperature.gpu,utilization.gpu,utilization.memory,memory.total,memory.free,memory.used --f... |
Can I see what are the available GPUs with mxnet?
Is there something similar for TensorFlow's
tf.test.gpu_device_name()
in mxnet?
| Is there a way to check if mxnet uses my gpu? |
The correct answer is : Image 3.
I'm not going to draw this but your example leads to 5 objects on the Heap.
Objects (instances) don't have names but they are referred to by the following references:
objectA
objectA.AList
objectA.AList[0]
objectA.AList[1]
objectA.AList[2]
Each string is also an object on its own.
Th... |
I have the following class:
public class A
{
public List<string> AList { get; set; }
}
Then I create object of a class:
A objectA = new A();
objectA.AList = new List<string>() { "1", "2", "3" };
My question is how memory will be allocated in a heap? I mean will be objectA.AList allocated inside of objectA (imag... | How is memory allocated when you create a property of class? |
You can invoke a Lambda function asynchronously via API Gateway only if the integration isnon-proxy. By default, HTTP APIs are designed to support onlyproxy integrations for Lambda and HTTP endpointsso it is not possible to set theX-Amz-Invocation-Typeheader in the API Gateway integration config.In order to invoke a La... | I'm using the new HTTP Api (The one introduced in December 2019) of AWS Api Gateway.I used to work with REST Api, which lets you trigger lambda functions async by adding X-Amz-Invocation-Type:Event header.The new HTTP Api does not let you specify that header, how can I call lambda functions asynchronously?thanks in adv... | How to invoke lambda async with AWS ApiGateway HttpApi |
3
You have a trailing slash behind database.js
database.js/
It should simply be
database.js
Please refer to the documentation.
Share
Improve this answer
Follow
edited Jun 10, 2020 at 7:57
... |
I want to hide the node_modules folder and a javascript file in git,for which I added the following in .gitignore file :
node_modules/
database.js/
After that,in git bash I added the following commands
git rm -r --cached .
git add .
git commit -m "hide files"
... | hiding files using gitignore |
As the GitHub Developer Search API documentation says,
The Search API helps you search for the specific item you want to find. For example, you can find a user or a specific file in a repository. Think of it the way you think of performing a search on Google. It's designed to help you find the one result you're look... |
I was wondering if someone could help to figure out the following problem:
I am fetching some user data Github API v3 and I noticed the value "total_count" does not match the sum of the number of records per page, example:
GET on https://api.github.com/search/users?q=location%3AGermany returns the users with location ... | Github API total count and results mismatch |
wgetis a unix command to visit a web URL.curlis another command working similarly. You could also usephp path\to\script.phpto run, as Gigawatt mentioned. There is no big difference from all of them* */1 * * *is to set cron timing./usr/bin/wgetis the location wherewgeton your serverYes, once cron set, you can leave it a... | the last days I have researched about cron jobs. First I want to tell you abaout my problem.
I want to run a php script on my webserver every minute without loading the page. this php script inserts some data via yql. I read that cron is just working with unix/linux. my server runs on unix (wait for it). is it now poss... | cron job on webserver |
using parameters in command line PHP is differentthe command should bephp auto.php myuserthen in the script you access the variables using the$_SERVER['argv']superglobal array - each command line argument is in order in that array starting with the script name. You can check the number of arguments passed with$_SERVER[... | I'm currently running cronjobs for several people, to know who are those people i give it a parameter with some details :0 1 * * * cd /var/www; php auto.php?user=userfor some reason it returns this result :Could not open input file: auto.php?user=useris there anything wrong with the syntax ? do i have to encode anythin... | Execute PHP get request through terminal |
Have you tried displaying smaller bitmaps? You can down sacle images right when you're reading in using BitmapFactory.Option when calling decodeFile. | I keep getting the above error, going from my first activity that has a galleryview of over 100 images, to a GridView activity that displays the images in a vertical Grid. Also, it does make it to the GridView activity once in a while (especially when the images are low res). From the GridView activity, once the user c... | Calling GridView from GalleryView causes OutOfMemoryError: bitmap size exceeds VM budget |
You can see inapi/client/service/update.gotaskResources().Limits = &swarm.Resources{}
updateInt64Value(flagLimitCPU, &task.Resources.Limits.NanoCPUs)--limit-cpuwas introduced incommit 12a00e6Considering thatswarmkit/manager/scheduler/nodeinfo.gohas, when removing a task, the following code:nodeInfo.AvailableResources.N... | service createcommand of docker 1.12 has two options to limit cpu and memory as follows:--limit-cpu value Limit CPUs (default 0.000)
--limit-memory value Limit Memory (default 0 B)Do they limit resource per service or per container? | Do --limit-xxx options of service command limit resource per service or per container? |
tl;dr: Add the following entry to your~/.ssh/configwhere$useris the GitHub username and$keyis the private key specified for that user and defined in the setting for that GitHub user:Host github.com-$user
Hostname github.com
User git
IdentityFile ~/.ssh/$key
IdentitiesOnly yesThen, configure your git rem... | I'm trying to configure a remote linux machine to access two distinct git accounts which I own. I keep getting authentication access manifesting in.> git push
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.Steps i... | Setting up multiple SSH key access to Github |
It wasn't explained very well, but the solution is:// EC2 Instance <> EIP
let ec2Assoc = new ec2.CfnEIPAssociation(this, "Ec2Association", {
eip: eip.ref,
instanceId: ec2Instance.instanceId
}); | In AWS CDK, I have an EC2 instance and Elastic IP created as follows:// EC2 Instance
let ec2Instance = new ec2.Instance(this, "EC2Instance", {
instanceType: ec2.InstanceType.of(InstanceClass.T2, InstanceSize.MICRO),
vpc: vpc,
securityGroup: securityGroupEc2,
keyName: Config.keyPairNa... | How to create Elastic IP association with an EC2 instance using AWS CDK? |
0
You need to also backup the Packages folder, besides Assets and ProjectSettings.
The Packages folder contains the manifest.json file that describes all packages you use in your project. If you don't have it, packages will be missing in your project.
Share
Improv... |
This question already has answers here:
Cleaning up and Backup / Migrating existing Unity project into new one or another PC
(2 answers)
Closed 12 months ago.
How the best way to b... | How to backup vuforia unty project smallest size? [duplicate] |
In the scenario you describe, the browser will essentially reference the same image several times on one page, and this will almost certainly be cached.Across different pages, the answer depends on the browser, and on the expiration headers your server sends will impact the caching behavior in conforming agents.ShareFo... | When I have the same image used for different elements (sprite images) I usually don't call that image again as this is a new HTTP request.I rather use:element1 {
background: url(someImage.png);
}
element2 {
background-image: inherit;
}Is this saving HTTP requests?Or if the browser is smart and I can use:eleme... | Is the browser caching CSS background images? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.