Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
You'll need to get the results into a format that SonarQube can interpret. Assuming you are using Jasmine/Karma this would be an LCOV format.Modify your build script to include the following line:ng test --code-coverageThis should create a coverage folder in your angular project. However it will be in an html format.... | This is my dahsboard from Bamboo related to Sonarqube:https://i.stack.imgur.com/FU7c9.jpgThe project build result page looks like this:https://i.stack.imgur.com/DRltU.jpgSo, I want enable somehow test coverage in Bamboo to see unit tests reports.
I mention that we have local coverage for my angular project.Can you help... | How to "Enable front-end code coverage in sonarqube" for a Angular project |
You have done all the steps correctly. I believe your goal here is to run docker commands without sudo.However after adding user to the docker (Or any) group,you have to refresh the user's group id.You can either login again or dosu - $USER.You can runidbefore and after to confirm. | I am unable to run Docker on AMI linux EC2 instance on AWS. My AMI linux instance isLinux ip-172-31-29-77 4.14.62-65.117.amzn1.x86_64 #1 SMP Fri Aug 10 20:03:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux.I am able to install docker and start the service using:sudo yum install -y docker
sudo service docker start
sudo userm... | Unable to run Docker without sudo on AMI linux EC2 instance on AWS |
In addition to @Colwins answer, you should also add mandatory keynameinto container spec, otherwise you'll getdoes not contain declared merge key: nameSo, you kubectl command should look like:kubectl patch statefulset my-set -p '{"spec": {"template": {"spec":{"containers":[{"name":"nginx","imagePullPolicy":"Never"}]}}}... | Need to understand exactly how patch works. How could I patch "imagePullPolicy" for instance. Could someone explain in simple details how patch works.kubectl patch statefulset my-set -p '{"spec":{"containers":{"imagePullPolicy":"IfNotPresent"}}}'This is not working what is wrong with it? | How to patch statefulset on kubernetes cluster and set imagePullPolicy |
I had the same doubts about the bookmarking months ago (October 2019) and since the documentation provided by Amazon is not very clear I opened a support case to understand more how it is implemented.
In my Glue Job there was:
A read function from S3 (glue_context.create_dynamic_frame.from_options)
A ResolveChoice.ap... |
The AWS Glue Bookmark document (https://docs.aws.amazon.com/glue/latest/dg/monitor-continuations.html) seems to suggest one has to pass a transformation_ctx parameter to source, transform and sink operation for the bookmark to work. This is reflected in the sample code in that page, where invocation of all of create_d... | Why do I need to set the `transformation_ctx` parameter when calling transformation and sink operations for AWS Glue bookmark to work? |
Yes, it is an error to make a UIViewController releasing in a background thread (or queue). In UIKit, dealloc is not thread safe. This is explicitly described in Apple's TN2109 doc:
When a secondary thread retains the target object, you have to ensure that the thread releases that reference before the main thread rel... |
Is it an error to call dealloc on a UIViewController from a background thread? It seems that UITextView (can?) eventually call _WebTryThreadLock which results in:
bool _WebTryThreadLock(bool): Tried to obtain the web lock from a thread
other than the main thread or the web thread. This may be a result of calling
... | dealloc on Background Thread |
You should use generic type or actual type for return type of method declarationpublic interface IAsyncTestService<T>
{
Future<T> submit(Runnable task);
}Orpublic interface IAsyncTestService
{
<T> Future<T> submit(Runnable task);
}Or specific type:public interface IAsyncTestService
{
Future<String> submit(R... | When I use SonarLint plugin to scan the Java code in IntelliJ IDEA, it shows warning like this:remove usage of generic wildcard type.This is the Java code:import java.util.concurrent.Future;
public interface IAsyncTestService
{
Future<?> submit(Runnable task);
}What should I do to avoid this warnings? | What should I do to fix SonarLint warning "remove usage of generic wildcard type" |
You can actually do a ref update instead of merge.status=$(curl --write-out %{http_code} -H "Content-Type: application/json" -H "Authorization: token ${GITHUB_TOKEN}" -X PATCH https://api.github.com/repos/:owner/${REPO}/git/refs/heads/${BASE} \
-d '{ "sha": $(curl -H "Content-Type: application/json" -H "Authorization:... | I'm setting up a Jenkins pipeline script and using API calls to GitHub to perform merges and releases after tests pass.For my intended workflow, I need to use the Jenkinsfile to merge myrelease-candidatebranch into mybeta-releasebranch. This merge should always be a fast-forward merge, since this is the only way work e... | How can I do a fast-forward merge using the GitHub API? |
1
%cd gives the committer date. If you just want the name, use %cn or %cN alone.
Without looking at your exact output, I am guessing the 400 500 you see if the timezone in the date.
Share
Improve this answer
Follow
... |
Git log gives 400,500 as the committer name
I have a powershell script which run the git diff between 2 branches and gives me the output in a file.
git diff generates the diff file using git diff --summary --name-status --diff-filter=ADMRCT $branch1..$branch2 | Out-File $temp
$temp file is iterated and every ... | Git log gives 400 500 as committer name |
Conceptually this isn't that far off from what amulti-stage builddoes. Docker can't create files or run commands on the host, but you can build your application in an intermediate image and then copy the results out of that image.# First stage: build the jar file.
FROM azul/zulu-openjdk-alpine:8 AS build
WORKDIR /app ... | I have a git repository as my build context for a docker image, and i want to execute gradle build and copy the jar file into the docker image and run it on entrypoint.I know that we can copy the entire project into the image and run build and execute, however i want to run build first and copy only the jar executable ... | RUN a command on build context before copying files in Docker image |
Optionally match the last/. Change your .htaccess file to this:RewriteEngine On
RewriteRule ^(.*)/?$ public/$1 [L] | I have strange for me problem. I'm developing Zend Framework application and have this file structure:/
/application/
/public/
/public/.htaccess
/public/index.php
/public/js/
/public/style/
/public/profile/
/.htaccessMy domain point tofolder /When I enter the addressexample.com/profile/it goes to the controller profile... | htaccess redirects unexpectedly to folder |
1
Git cache your credentials in memory. The default timeout is 900s i.e. 15 min.
You can invalidate git cache by this git credential-cache exit command.
The best practice would be configuring the ssh keys in github.
Share
Improve this answer
... |
I get an image of a key in terminal when I am prompted to add my password and it will not let me manually type a password. When I press enter it gives me an error that the password is incorrect.
I tried the following code with no success (I still get the key image):
git credential-osxkeychain erase
host=github.com
pro... | Updated my Github password and now I can not push to Github |
You need to add into Dockerfile.yml file including of gd and types format like :FROM php:7.2-apache
RUN apt-get update && \
apt-get install -y \
libfreetype6-dev \
libwebp-dev \
libjpeg62-turbo-dev \
libpng-dev \
nano \
libgmp-dev \
libldap2-dev \
netcat \
sqlite3 \
libsqlit... | I try to install my laravel 5.7.19 application under docker(version: '3.1', ) and running some pages I got error:Call to undefined function Intervention\Image\Gd\imagecreatefromjpeg()I include jpeg support in web/Dockerfile.yml:FROM php:7.2-apache
RUN apt-get update -y && apt-get install -y libpng-dev libjpeg-dev libx... | Under docker error Call to undefined function Intervention\Image\Gd\imagecreatefromjpeg |
If you have already successfully unmerged the projects (which I assume you did through a git reset --hard HEAD~N), then you need to force the changes onto the "mainline" via a:
git push -f
Please note that this isn't generally advised unless you know for sure that no one pulled from the "mainline" after you accidenta... |
I accidently merged a project with another project that had nothing to do with it, which I didn't want to do. I successfully unmerged the projects. However, now I want to delete the erroneous commits. How do I do this.
I tried using git rebase, but it doesn't display the merge.
| How do I delete a merge from github, permanently? |
what was the function that you used in scapy and how did you open a port?
detection of the firewall depends to type of the firewall and term of network.traceroute in scapy ==>
traceroute("www.google.com", maxttl=10)ShareFollowansweredMar 29, 2013 at 13:35user1056124user10561241122 bronze badgesAdd a comment| | I open a port 4000 on computer A and send a packet from another remote computer B
but A didn't get the packet, I think maybe the enterprise firewall filtered the packet
how can I detect this?
are there any traceroute functions in scapy or other tools that can detect this?
thanks! | how to detect firewall with scapy |
2
A process can be attached to another process in such a way that it has access to that process's memory.
It is used for debugging programs.
A debugger needs to be attached to the process being debugged, and needs to be able to read any memory data, break execution, edit me... |
Is there any way (OS-independent) for accessing an arbitrary process's virtual memory with i/o access?
Alternatively.. a way to launch such process in shared memory instance.
(Isn't that the way Cheat Engine works? Some sort of IPC as far as I can tell..)
| Entering program's internal memory area |
The only solution I know is to create a complete backup of your active database and restore this backup to a copy of the database in a 'warm backup' state. First create a backup from the active db:
backup database activedb to disk='somefile'
Then restore the backup on another sql server. If needed you can use the WIT... |
We have a warm sql backup. full backup nightly, txn logs shipped every so often during the day and restored. I need to move the data files to another disk. These DB's are in a "warm backup" state (such that I can't unmark them as read-only - "Error 5063: Database '<dbname>' is in warm standby. A warm-standby databa... | Warm SQL Backup |
It's not a valid command, remove the "root".Since you edited the root crontab(sudo crontab -e), the command is already executed as a root.ShareFolloweditedSep 24, 2018 at 11:15Łukasz D. Tulikowski1,57011 gold badge1818 silver badges4040 bronze badgesansweredSep 24, 2018 at 9:39AlrikAlrik3622 bronze badges0Add a comment... | I've put the command*/5 * * * * root /sbin/shutdown -r nowInside "sudo crontab -e" on a Raspberry Pi, which should reboot the raspberry pi every 5 minutes. But instead nothing happens.I've looked in "/var/log/syslog" but all it says isSep 24 08:55:01 raspberrypi CRON[638]: (root) CMD (root /sbin/shutdown -r now)
Sep 24... | CronTab every 5 minutes reboot doesn't work |
I've updated the CORS configuration in AWS to and it worked
http://localhost:3000
https://example.com
GET
HEAD
DELETE
PUT
POST
*
| I'm new to AWS and usedElastic beanstalkto deploy my rest API (api.example.com) in nodeandS3 bucketwithcloudfrontfor my static website (example.com) in React.When calling the API endpoints from website, the browser is giving the CORS error. How can i prevent that?I'm using following code in the node project for CORSapp... | CORS on AWS Elastic beanstalk |
Under the Metrics tab, add new metric that will be hidden in the chart and is used for alerting only. Duplicate the query and remove all template variables (i.e.$somevar) from it. Replace the template variable with a hard-coded value you want to create alert for. Hide the metric by clicking on the “eye” icon.Source:htt... | Hi I want to create a simple alert in grafana to check whether there is no data for the last 5 minutes.But I get an errorTemplate variables are not supported in alert queriesWell, according to thisissuetemplates are not supporting in grafana yet.
I have two questions:What is templating?How can I avoid this error? | Grafana: Template variables are not supported in alert queries |
This is the correct way, use a regex to allow sub folders navigation and a perfect match on /app2 to redirect traffic on http://app2:
location ~ ^/app2/(.*)$ {
proxy_pass http://app2/$1;
}
location = /app2 {
proxy_pass http://app2/;
}
location / {
proxy_pass http://app1;
}
|
Summary
I created this simple example to correct and check the errors that I have in another more complex project.
So I've a docker-compose file with 1 web server and 2 app and a nginx conf file.
Please note, that I'm testing it with Docker Quick Start Terminal for Windows 10 Home Edition, but I've tested even on Ubun... | Nginx with docker, location different from slash not found |
The deleted/merged branch build will disappear after a period of time (<24 hours). It is not removed immediately to show the recently deleted/merged branches and give a chance to review the prior build statuses. It is relatively harmless since the jobs for these branches are deactivated (read-only).
Note that the remo... |
I'm setting up a new Jenkins job using multibranch pipeline and I have noticed that when a branch is deleted, it only has a strikethrough and isn't actually removed on Jenkins. This is solved by re-running branch indexing. However, I cannot really use this as it will also cause every other branch to rebuild (a consequ... | Using Multibranch Pipeline Jenkins job, is it possible to run branch indexing without re-running existing branch builds |
-1Assuming that you are using InfluxDB as your backend time series database, use the below configuration in Grafana's config.js file.datasources: {
influxdb: {
type: 'influxdb',
url: "http://localhost:8086/db/jmeter",
username: 'root',
password: 'root',
},
grafana: {
type: 'inf... | i have working with Jmeter 2.13 and try a new listener Backend listener, I'm using windows.I have installed grafana/graphite in windows and run it from the web page
http:/localhost:8080 and run smoothly. Grafana shows standard dashboard "shared dashboards" and 'dashboards'.In jmeter a listener Backend listers was added... | Jmeter 2.13 Backend Listener |
There are two options that I can think of:As user @krishna_mee2004 stated, you can use CloudWatch to listen on your EC2 instance and this in turn will trigger your lambda.On your EC2 instance, there is a field calledUser dataunder the Instance Details. InUser datayou can add commands that should be ran whenever your EC... | I am compiling a fairly complex CloudFormation template and at some point I am creating anec2instance;I want to create alambdafunction that:takes as input parameter the public IP of the instance created in this CF stackopens a security group port for that particular IP (the security group isnotpart of the specific CF t... | AWS: Use EC2 instance creation to trigger lambda |
What I find works is to check in a version of the file with blanked or dummy values and then to run:git update-index --assume-unchanged [fileName]Git will then stop monitoring changes to that file allowing you to put the real config info into it without fear of checking it in.If you later make changes that you DO want ... | I'm working on a small side-project and I'm using connection strings and also api keys and values that should not be seen or used by other people. I use a public GitHub account for source control. What is the usual method for using source control when these values are in plain text in web.config?Do I need to remove the... | How to hide connection string, user name, pw when using source control? |
Okay, I made it. How I made it for debian squeeze with nginx server: (all commands I execute from root user)First of all you need to install sendmailapt-get install sendmailnext, you must configure this file that was easier than I thoughtsendmailconfigokay, next step that I make was a php.ini configuration (I'm not a g... | May be it's a dumb question, but I can't find the reason why php mail function doesn't work
I have a nginx server on debian squeeze, I moved to it recently. I tried simple mail execution but it return false.if(mail('[email protected]', 'test-subject', 'test-text-blablabla'))
echo 'ok';
else
echo 'bad';What can i ... | mail() doesn't work on new server |
The amount of IO is going to depend a lot on how you have MySQL configured and how your application uses the database. Caching, log file sizes, database engine, transactions, etc. will all affect how much IO you do. In other words, it's probably not possible to predict in advance although I'd guess that SQLite would h... |
I have a Java program and PHP website I plan to run on my Amazon EC2 instance with an EBS volume. The program writes to and reads from a database. The website only reads from the same database.
On AWS you pay for the amount of IOPS (I/O requests Per Second) to the volume. Which database has the least IOPS? Also, can S... | MySQL vs SQLite on Amazon EC2 |
0
Not sure about through the webservice, but I know you can access the state of backup jobs by running the bpdbjobs command and parsing through the output.
Share
Follow
answered Feb 2, 2015 at 20:0... |
I work with SharePoint. I was given a project where I need to call NetBackup web services and download all the failed Backup jobs. Backup Status = failed or something like it.
All I know they (backup team) gave me a url http://netbk004/Operation/opscenter.home.landing.action? I have worked with asmx before but I have... | Web Services - How to get failed backup jobs from NetBackup |
No, the @Cache annotation goes on entities and on collections. Your composite key will be used as key for the cache entry.
|
my entity class is annotated with @Cache, my primary keys are combined of few table fields, primary keys are embedded into this class as embedded class. Do I need to put @Cache for the embedded class as well?
| jpa embedded class need cachable? |
I testet it. You must set thestride * 2to (stride * 2)! For my solution it worked well.if ((i % (stride*2)) == 0 && (i + stride) < size) {
array[i] += array[i+stride];
}ShareFolloweditedMay 12, 2016 at 12:13Dovydas Šopa2,29288 gold badges2727 silver badges3434 bronze badgesansweredMay 12, 2016 at 10:47CComRedCComR... | i'm starting to learn OpenCl and as one of the tasks I have to write I program, that sums all elements of an array.The program is supposed to be simple and I don't know what's wrong with me today, but it's not working. Well, it does, but sometimes it shows wrong results (sometimes doesn't).The more elements we have, th... | Invalid results by summing an array, OpenCL, Interleaved Addressing |
From the error message, it looks likeapi.jsis part of your own coding (not a dependency).You reference asonar-requestmodule on your computer which, according to your error message, does not exist. Usually, you would need tonpm installit. But there is no such module on theregistry(at the time of this posting)Please chec... | When I run tests on my Sonarqube plugin, if a class call to the api, it returns an error but when there is no call to the api, it works great.
Here is the error:FAIL src\main\js\__tests__\Cards-test.js
Test suite failed to run
Cannot find module 'sonar-request' from 'api.js'
at Resolver.resolveModule (node_module... | Cannot find module 'sonar-request' from 'api.js' when I run npm run test |
Copy your commit (or set of commits) to a new commit (or set of commits) that comes after the latest commit the other person has.
This is a little confusing, so it might help to have three people's names here. You have your own commit(s), which we might label V for Viet. There are (at least) two other people involve... |
So here's the problem at the moment.
So I grabbed the upstream branch and made some changes and created a commit.
I have an employer now telling me I need to make a PR to his branch. But his branch isn't updated to the latest commit like how my is.
So when I do make a PR, It's also bringing all of the commits in betwe... | Reset to git commit except for my recent commit |
Whilegit stashis not yet (Q4 2017) available for Visual Studio (seethis uservoice), you can still stash your currently modified files in command line:cd /path/to/your/repo
git stashThen your git pull can proceed. Typegit stash popto get back your current changes. | I am using Visual Studio 2017 and trying to sync push my local changes to remote repository using Git plug-in in VS 2017.
I staged my changes and committed them. Now when I try to push the changes I get below error-Error encountered while pushing to the remote repository: rejected
Updates were rejected because the ti... | Unable to sync changes with Visual Studio Git plugin |
First of all you must be using a version 2 Compose file to use the new specifications for creating and using named volumes. TheCompose File Referenceincludes all you need to know, including examples.To summarize:Addversion: '2'to the top ofdocker-compose.yml.Place service units under aservices:key.Place volume units un... | I'm building my containers withdocker-composeand I would like to use the new volume API from Docker, but I don't see how to.I want to be able to saydocker-compose up -dto:Create a volume, or use it if already created.Create services containers with data from previous volume container. | Replicate 'docker volume create --name data' command on docker-compose.yml |
I believe the commit should be gone for all new clones and fetches after you removed it, but there's an easy way to prove this: simply clone the repo again and see if it's still there. (It shouldn't be).Assuming it is gone when you clone, then the only people that could potentially still access it are those that had pu... | This question already has answers here:Remove sensitive files and their commits from Git history(12 answers)Closed3 years ago.I committed some stuff to github that I would prefer that I hadn't. It's not super sensitive. It's the domain name that I use to access my home IP address. It's not keys, certificates or credent... | How do I ensure that commits I have removed from github are not retrievable by anyone else [duplicate] |
Finally figured it out. It was rather simple but on the server side of things.I had to addpublish_time_fix off;in the nginx config for rtmp server.Thanks to thisblog. | PS: First time gstreamer user here. :)Im trying to stream video from a logitech c920 webcam connected to a beaglebone using gstreamer to an nginx server. But somehow rtmpsink is failing on me. However, with filesink im able to save the video on the beaglebone. Though I still have some frame loss issues and no audio, I ... | gstreamer streaming to nginx rtmp server |
Have a look athttps://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/#NarrowingtheFocus-IgnoreIssuesIt gives detailed information on how to ignore certain rules for certain files in SonarQube.Best way is to have all the POJOs under a package (eg 'model') and exclude that package from the Sonar sca... | How to ignore duplicated blocks in SonarQube for getters/setters in POJOs?Example:@Entity
public class Clazz {
@Id
private int id;
private String abc;
}
public class ClazzDTO {
private int id;
private String abc;
} | Duplicated blocks in SonarQube between POJOs |
You need to add a second RewriteRule above your current one.
Here's an example:RewriteRule ^/(.*)/(.*)$ index.php?page=$1&p=$2 [L,QSA]This will rewrite/product/ford-mustangtoindex.php?page=product&p=ford-mustangRemember to add it above your current RewriteRule, because it first tries to match the first RewriteRule, whe... | I have this .htaccess that I've been using to rewrite URLs like these:www.example.com/index.php?page=brand www.example.com/brand
www.example.com/index.php?page=contact www.example.com/contact
www.example.com/index.php?page=giveaways www.example.com/giveawaysRewriteEngine on
RewriteCond $1 !^(index\... | .htaccess rewriting |
How to get the tags?See "How to list all tags for a Docker image on a remote registry?".The API is enoughFor instance, visit:https://registry.hub.docker.com/v2/repositories/library/java/tags/?page_size=100&page=2Will the base image safe?As long as you save your own built image in a registry (eithe rpublic one, or a sel... | I have aDockerfilesomething like follows:FROM openjdk:8u151
# others hereI have 2 questions about the base image:1. How to get the tags?Usually, I get it from dockerhub, let's sayopenjdk:8u151, I can get it fromdockerhub's openjdk repository.If I could get all tags from any local docker command, then I no need to visi... | Best practice for dockerfile maintain? |
Usually linked list implementation in nutshell looks similar to something like this:class LinkedList {
Node head; // head
class Node {
int data;
Node next; // link to the next node
Node(int d) {
data = d;
}
}
}So node class is areference typewhich is stored onh... | While i was studying java and data structures, i learned what a LinkedList is and how it can increase it's maximum size even after declared. So i want to know how this works in the memory, does it just skip to the next available slot? For example, if it initially used slots 11, 12 and 13, and i increase it, does it jus... | Linked List in RAM memory |
Git will only record 755 or 644 as permission.
See "How Git Treats Changes in File Permissions."And the local file owner isnotrecorded, which means if it is root when you clone/use a repo, it only reflects the local account you are using when doing those operation: Git knows nothing about it.So don't use the root acco... | I've created a new repository in GitHub.Then, I make a commit and push in my terminal.But all files I add to GitHub have as owner root.However, in my terminal when I check files permissions with "ls -la" they have 755 for folder and 644 for files with 1000:1000.Why the owner is root when I use that repository in other ... | git upload the files as root |
Each instruction must go though the four stages. Once the pipeline is full, the flow of instructions in and out is determined by the duration of the longest stage:Fetch|Decode|Exec|Write|
10ns | 6ns |8ns | 8ns |
-----+------+----+-----+
I7 I6 I5 --> I4 : I3 : I2 : I1 --> out
... | In a CPU with a four (4)-stage pipeline composed of fetch, decode, execute, and write
back, each stage takes 10, 6, 8, and 8 ns, respectively. Which of the following is an
approximate average instruction execution time in nanoseconds (ns) in the CPU? Here, the
number of instructions to be executed is sufficiently large... | CPU Pipeline: How to find average instruction execution time |
Use git revert command to revert any commit you don't want.
git revert <commit id>
Additionally, if there was a PR raised to merge "PUSH B" then you also get "revert" option in the merged PR, which will ease your work.
Let me know if this helps!
|
This question already has answers here:
How to revert a merge commit with a newer commit after it?
(2 answers)
Closed 3 years ago.
Suppose I've working code in my master branch at ... | Git - How to Revert incorrect code between 2 push on master [duplicate] |
Take a look atRuntime.getRuntime().exec("contrab file.txt") | i want to execute the commandcrontab file.txtin java.What is the procedure...? | execute linux command in java |
(char*)malloc(sizeof(char) * (size+1)) would be more appropriate (the +1 is to account for the NULL at the end of string, if applicable).
If one is copying a string, strlen() doesn't account for the NULL terminating the string hence an additional memory char is required.
|
I have created a macro to make reserve memory for my strings in C. It looks like this:
#define newString(size) (char*)malloc(sizeof(char) + size)
So is there any reason I shouldn't use this macro in my own personal projects? I know I shouldn't do this in production code because it would require everyone to have that ... | Which way to reserve memory for a string? |
To future readers: visiting somepage.php%3Fid=1234.html worked. (See the comments above.)
|
I've got some code that mirrors some pages using wget, and some of the pages to be mirrored are links like "http://example.com/somepage.php?id=1234". wget ends up saving those pages as "somepage.php?id=1234.html". When I try to visit that page, I get a 404.
I've tried adding "autoindex on;" to the config for that dire... | View file with question mark in nginx |
As Barmar said, this option doesn't exist onkubectl cpIf you want to copy a directory into the container use the command below:kubectl cp /home/local-dir <pod-name>:/tmp/container-dirTo copy the directory to a specific container into the pod use:kubectl cp /home/local-dir <pod-name>:/tmp/container-dir -c container-name | I am getting Error: unknown shorthand flag: 'R' in -R error when I run the line below. I'm aware of the root cause. It is -R. How can I run this command without issue?kubectl -n $NAMESPACE -c vault cp -R /source /destinationP.S.: withour -R, I can run the command, but I want to copy the directories. Any help would be a... | How to solve unknown shorthand flag: 'R' error with CP command |
Picasso uses the HTTP client for disk caching and if one is already configured it will use that instead of installing its own.
For the built-in UrlConnection the docs for installing a cache are here: https://developer.android.com/reference/android/net/http/HttpResponseCache.html
If you are using OkHttp then you just c... |
I'm using picasso library to load images for my app. But I don't how to implement my own disk (sdcard) caching with picasso library.
| How to implement my own disk cache with picasso library - Android? |
You should be able to do this using theSystem.Configuration.ConfigurationManagerclass.The OpenMappedConfiguration method can be used to open a instance of the System.Configuration.Configuration type based on your app/web config (or any other file in the right format, so someone else's app/web config). Then the Configur... | Are there any built in methods in System.Configuration that would allow one to backup the currently running apps XXX.exe.config file. Or if not, how would one retrieve the current applications config file name for backup. | Built-In methods to backup app.config |
What's the chance your code is not threadsafe? i.e., some concurrent runs of the script collide? The corrupted file you show looks like it could have incorrect dimensions.ShareFollowansweredMar 24, 2016 at 5:47some ideassome ideas6433 silver badges1414 bronze badges2i'm only running the script once per image, where I'm... | I'm having an issue with AWS Lambda where my resized images become corrupted every few uploads. I wrote a script that pulls from S3 and resizes it into 3 sizes into another bucket, mostly with filestreams. Here is the code:https://github.com/handonam/AWS-Resizer/blob/493ff10c317e7150d1ac040f54065083963a9c67/createThum... | AWS Lambda image corrupted |
I had the same issue. Locally my pytorch model would return a prediction in 25 ms and then on Kubernetes it would take 5 seconds. The problem had to do with how many threads torch had available to use. I'm not 100% sure why this works, but reducing the number of threads sped up performance significantly.Set the followi... | I would like to make the result of a text classification model (finBERT pytorch model) available through an endpoint that is deployed on Kubernetes.The whole pipeline is working but it's super slow to process (30 seconds for one sentence) when deployed. If I time the same endpoint in local, I'm getting results in 1 or ... | pytorch model evaluation slow when deployed on kubernetes |
The|>!operator you're describing is thestandard "map" patternthat can apply to just aboutany"wrapper" type, not justasync. If yourreturn f rhad beenreturn! f rthen you would have thestandard "bind" pattern, which by convention should be written as the operator>>=if you're defining an operator for it.And it is a good id... | What if we define a|>!operator like so:let (|>!) a f = async {
let! r = a
return f r
}Then instead of writinglet! r = fetchAsync()
work rwe could writefetchAsync() |>! workIs this a good idea or would it generate inefficient code? | Is this async pipelining operator ok |
A message only commit might help you :git commit --allow-empty | I've pushed some changes to repository on Github withgit push origin master, but one of webhooks was not triggered because of network failures. This webhooks is configured to send only "push" events. Is it possible to push nothing viagitCLI to retrigger webhooks for latest commit (which is already pushed)?I can't do th... | Push to git on GIthub to re-trigger missed 'push' webhook |
Update, since this was asked, docker has changed the paths for the volume mounts. See the current documentation athttps://github.com/docker-library/docs/blob/master/mariadb/README.md#where-to-store-dataUse the following to mount/path/on/hostfrom the host to/var/lib/mysqlin the container:- '/path/on/host:/var/lib/mysql' | I have a MariaDB container, to handle my database.Here is my problem, I execute :docker-compose exec mariadb mysql -u rootto enter MariaDB container and create a test database, then exit the container, and shut it down through command :docker-compose downAfter that, I start back all my containers through commanddocker-... | docker container mariadb volumes |
I'm not certain if that is possible to do withhttps://kubernetes.io/docs/reference/access-authn-authz/webhook/but if you had a way to know with that request payload if it was a token then you could handle it that way.If not, you would probably need to use a like gateway/proxy in front of the API server to intercept req... | We need to disable logging in via service account token.We were thinking of having a webhook for login event and forwarding it to opa, opa will check if the login request uses token. If it does, it throw an error, if it does it will just continue the flow of forwarding the request to the authenticator/identity provider... | How to filter authentication request before forwarding to authentication server? |
There are two issues I've identified so far. Maya G points out a third in the comments below.Incorrect conditional logicYou need to replace:if len(sys.argv) >= 2:
sys.exit('ERROR: Received 2 or more arguments. Expected 1: Input file name')With:if len(sys.argv) > 2:
sys.exit('ERROR: Received more than two argume... | I've successfully built a Docker container and copied my application's files into the container in the Dockerfile. However, I am trying to execute a Python script that references an input file (that was copied into the container during the Docker build). I can't seem to figure out why my script is telling me it cannot ... | Docker Python script can't find file |
IDEA supports GutHub as a source of issues to create Task from.
It is not possible to do vice versa or create an issue on GitHub from IDE directly.AFAIK, there are no plugins to do so either, at least I was not able to find one in JetBrains plugin repo.A feature request is welcome athttps://youtrack.jetbrains.com/issue... | I know that IDEA (and AS) supports GitHub issues as contexts and we can watch them, create commits etc. But I wonder is it possible to create an issue directly from AS? | Is it possible to create a GitHub issue from Intellij IDEA (Android studio)? |
Found the answer and have been installing npm packages for fun every since ;) I followed this tutorial Node.js and npm into for VS2015
I found editing the packages.json file first fixed it for me. Cause after doing so then running the commands it installed perfectly fine. Thanks for the answers guys, did help me find ... |
I need to install this project/code as its required for a project I am working on.
Is the easiest way to just grab whats in the Dist folder and copy it into the project?
Do all projects have npm install commands? in the documentation this one doesn't appear to have any explanation for installing it?
| Install project from github |
Try to move the include fastcgi_params; higher, above the fastcgi_params
|
I'm trying to pass all the requests that hits a specific location, to a PHP file with the request URL via Nginx config file, I've almost done this but I cannot pass the URL to the PHP file.
I've tried var_dump($_REQUEST); var_dump($_ENV); var_dump($argv); but returns NULL or emtpy array results.
location /p/ {
t... | Nginx passing parameters to a PHP file |
You can remove both perms from your url using a single rule, try :RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^news-(.*?)\.html$ /$1 [L,R=301]Clear your browser cache before testing this redirect. | I have a small question .htaccess perspective.I urls from the old site which is composed as follows:news- pecq_mur_quai_plateforme_bimodale_dechargement_inauguration_escaut.htmlthese URLs become :pecq_mur_quai_plateforme_bimodale_dechargement_inauguration_escautI have to delete 'news-' and '.html' of these urls .I have... | .htaccess combine 2 RewriteRule |
Use web GUI, press button. Or drag and drop to webpage.Or create a new empty file put inside a folder:Reference:https://help.github.com/articles/adding-a-file-to-a-repository/https://github.com/blog/2105-upload-files-to-your-repositoriesShareFolloweditedDec 24, 2016 at 16:00answeredDec 24, 2016 at 15:53Vy DoVy Do49.3k6... | I'm looking for a way in Git to add new files to an existing remote repo without having to clone all of it.
I have a large repo on Github and I want to add a new folder at its root, but I don't want to clone the remote repo. Is there a way to do that?Or maybe just clone the structure of the repo to be able to add it to... | Add new files to existing repo without cloning |
In order to explain how to merge labels labels from two metrics, I'll take a common case:avaluemetricvalue{instance="foo",a_label="bar"} 42aninfometricinfo{instance="foo",version="1.2.3",another="bar"} 1Info metrics (such as version, compiler, ...) have value 1 such that you can apply operators between the metrics:valu... | We have a situation where I want to add a MIB variable label to another query. This another query gives me the value result that I want but I need to add the label from first variable in order to then sort them by what I want (for example just as we do it withinstancelabel).E.g.variable1{alert,env, index, instance, ...... | Concatenate MIB variable label to another query result from other two MIB variables in Prometheus |
Having read through these answers I'm astonished that so many take the stance that OP's computer memory belongs to others. It'shiscomputer andhismemory to do with as he sees fit, even if it breaks other systems taking a claim it. It's an interesting question. On a more primitive system I hadmemavail()which would tell m... | I want to allocate my buffers according to memory available. Such that, when I do processing and memory usage goes up, but still remains in available memory limits. Is there a way to get available memory (I don't know will virtual or physical memory status will make any difference ?). Method has to be platform Independ... | How to get available memory C++/g++? |
helm install myappwill always install latest available version of your chart from your chart repository.Fromdocumentation--version string specify the exact chart version to install.If this is not specified, the latest version is installedShareFollowansweredMar 26, 2019 at 11:10edbigheadedbighead5,96555 gold b... | I got the following Chart.yaml file for kubernetes:apiVersion: v1
description: Chart for installing myapp
name: myapp
version: 1.5.0
namespace: my-appHow do I get the latest version without updating manually every new version? | Get latest version in Chart.yaml |
Your problem is caused by back-forward cache. It is supposed to save complete state of page when user navigates away. When user navigates back with back button page can be loaded from cache very quickly. This is different from normal cache which only caches HTML code.
When page is loaded for bfcache onload event wont ... |
Got an issue with safari loading old youtube videos when back button is clicked. I have tried adding onunload="" (mentioned here Preventing cache on back-button in Safari 5) to the body tag but it doesn't work in this case.
Is there any way to prevent safari loading from cache on a certain page?
| Prevent safari loading from cache when back button is clicked |
You forgot a *, and you've too many fields. It's the hour you need to care about
0 */6 * * * /path/to/mycommand
This means every sixth hour starting from 0, i.e. at hour 0, 6, 12 and 18 which you could write as
0 0,6,12,18 * * * /path/to/mycommand
|
How can I run command every six hours every day?
I tried the following, but it did not work:
/6 * * * * * mycommand
| Running a cron job on Linux every six hours |
There's nothing you can do except renew your certificate.The warning is opened by your browser,beforeany request is ever even sent to the server. When it tries to resolve an HTTPS request, it first establishes the SSL handshake with the server, this is where the server gives the browser the certificate and the browser ... | In the past I had a ssl certificate but I don't have it anymore because I didn't use it. However, now I see that some of the my website's page are indexed on google with https. Clicking those links directs you to a security warning. How can I best solve this? I tried adjusting the htaccess file redirect https requests ... | How to get rid of an ssl security warning with expired certificate |
Have you tried adding count to that? Like this:stats count(detail.finding-severity-counts.CRITICAL) as severity | i am getting the logs from the Cloud watch to Grafana dashboard.However i am not able to make it panel or dashboard out of it.What i tried is to go to Explore check for the Cloud watch logs and run the query"fields @messages"which is returning the value{
"version": "0",
"id": "sadfasdf-sdf-asfd-asdf-a3753e4aa9a... | Grafana query for cloud watch logs |
You can't limit when BitBucket fires its POST hook; but you can use thecontents of the POSTto make the decision about whether or not to proceed with the deployment. Just parse the JSON that BitBucket sends you and only continue if any of the"commits"elements have a"branch"of "master", for example. | Complicated title, let me explain.I want to limit an automatic POST hook when I push to themasterbranch; so it won't fire when I push to thedevbranch. This is so the app will only deploy to the live servers when the changes have been merged withmasterand the newmasterpasses the unit tests.Is this possible? | Limit POST Hook to git branch, not repository, on Bitbucket |
If you want to use the same certificate both for CloudFront and for
other AWS services, you must upload the certificate twice: once for
CloudFront and once for the other services.From here:http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPSShareFollowansweredFeb 4... | I'm trying to install a DigiCert Wildcard SSL on a CloudFront CDN.It worked immediately with all Elastic load balancers, but it's not showing up the CloudFront SSL certificate selection dropdown, even if the certificate is found in the IAM store.Any ideas what permissions could be conflicting? | AWS CloudFront: Not showing IAM SSL certificates |
You would use the name of the service in your fig.yml, in this case I think you're calling it flickrcrawler. So something like http://flickrcrawler:3100.
|
I have a docker container with an sinatra app inside, and another container with an node.js app. They are both linked through Fig. In my sinatra app I am making a HTTP Post request to the node.js app. For that I am using the Faraday gem.
My questions is now how can I make a HTTP request to another linked container.
H... | How can I make a HTTP request from one docker container to another linked container? |
We spent the last few weeks looking at this, too. I assume you are also also seeing big CPU spikes (or even a constant 100% iptables) in networks with large amounts of ingress rules/routes.That was identified a few releases ago and in the 1.5 cycle we got a few patches in that would reduce the number of iptables calls... | We are having problems on kube-proxy loading iptables. It locks docker when there's a large number of services. Is there a way to tune this with its parameters?From its documentation, I can only find --iptables-min-sync-period and --iptables-sync-period might be related? What's the recommended values for these in a lar... | what parameters can impove kube-proxy performance? |
@LinPy Thank you for u help.
https://www.x-cellent.com/blog/cgo-bindings/
I solved the problem. But build takes a long time, about 10 minutes, and I'm still looking for a better solution.
Images Dockerfile : https://github.com/sillyhatxu/alpine-build
FROM xushikuan/alpine-build:2.0 AS builder
ENV WORK_DIR=$GOPATH/sr... |
I want to use sqlite3 in Golang project. But run it in docker container has some error.Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub
this is my build script
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main main.go
I can't use CGO_ENABLED=1 in mac computer.
FROM golang... | Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub |
Currently this is impossible to add TSLint rules to SonarTS SonarQube plugin. | An existing TS project with a set of TSLint rules activated want to be analyzed with Sonarqube, therefore I installed the latest LTE version of sonarqube as well as TS plugin provided by Sonar.Despite the fact the TS plugin includes a good set of rules, the ones currently used by the project does not match one-to-one w... | How to add TSLint rules to Sonarqube Typescript plugin? |
git checkout develop
git cherry-pick <release-line commit>Note that if you're just looking to cherry-pick the latest commit on thereleasebranch, you can justgit cherry-pick release. | I have a develop branch and I need to cherry-pick a commit from my release branch.What are the steps to reproduce? | How to Cherry pick in Git if I have hash of particular commit? |
The problem is caused by violation of the same origin policy.
AFAICT there is no work around other than to insure that the XSLT file is available from the same domain as the source file. | I am getting the above error in Firefox 32.0, in Chrome Version 37.0.2062.120 I get a blank page but show page source displays the XML file (it is a schema).The details are that this is a stylesheet that I am developing and when I reference it locally, it is working as expected. Adding the reference to the schema from ... | Error loading stylesheet: A network error occurred loading an XSLT stylesheet: |
+50You can use thebackupcommand provided by theReplicationHandler. It's an asynchronous operation and it takes time if your index is big. This way you don't need to shutdown Solr. Then you'll find within the index directory a new directory namedbackup.yyyymmddHHMMSSwith the backup date. You can also configure how many ... | We're usingsolr 3.6 replicationwith 2 servers -a master and a slave- and we're currently looking for the way to do clean backups.As the wiki says so, we can use a HTTP command to create a snapshot of the master like this:http://myMasterHost/solr/replication?command=backupBut we still have some questions:What is the ben... | Backup strategy with master-slave solr 3.6 servers |
To quickly test the JWT functionality you only need to include luciferous/JWT.phpYou include library files using the PHPrequire_onceorinclude_oncestatements.
Have a look at the luciferous/tests/Bootstrap.php and JWTTest.php for an usage example.The other files you mention are used to create the PEAR package (PEAR = PH... | reading thishttps://developers.google.com/in-app-payments/docs/tutorialQuoted from the above page:
Because you sign the JWT using a secret key (the Seller Secret), you must generate the JWT using server-side code. It's simplest if you use a library.https://github.com/luciferous/jwtMust I somehow include this...? I so h... | How to use goog.payments.inapp.buy with luciferous jwt? |
this works fine for me:http {
server {
listen 80;
server_name service1.domain.com;
location / {
proxy_pass http://192.168.0.2:8181;
proxy_set_header host service1.domain.com
}
}
server {
listen 80;
ser... | I have 2 servers on my network:one linux machine (192.168.0.2) with a website listening on port 8181 for service1.domain.com
one windows machine (192.168.0.3) with a website listening on port 8080 for service2.domain.comI want to set up an nginx reverse proxy so that I can route requests like so:service1.domain.com -->... | NGinx config for redirecting domain |
Here is how to pipe it without a shell loop, and parse JSON natively, either withgh api -qbuilt-injqquery, orjqitself.#!/usr/bin/env sh
REPOSITORY_NAME=
OWNER=
gh api -H "Accept: application/vnd.github+json" \
"repos/${OWNER}/${REPOSITORY_NAME}/pulls" --cache 1h |
jq -j --arg curbranch "$(git rev-parse --abbrev-r... | I was wondering how to check if a pull request has conflicts on GitHub using a script from my PC?
There is a nice solution mentioned here to do it via GitHub actions:https://stackoverflow.com/a/71692270/4441211However, taking the same script from https://olivernybroe/action-conflict-finder and running it on my PC won't... | How to check if a pull request on GitHub has conflicts using a script? |
Given the size of the network (very small) I'm inclined to think this is a DMA issue: copying data from the CPU to the GPU is expensive, maybe expensive enough that it makes up for the GPU being much faster at doing larger matrix multiplications. | I have created aneural network classifierwith2hidden layers.Hidden Layersunits[50,25].The model is training much faster onCPUthanGPU.My questions are :Is this expected? I do see that the architecture is small but not that small to be faster on CPU :/How should I debug this?I tried increasing batch size, expecting that... | Tensorflow Neural Network faster on CPU than GPU |
+250While I can't definetly say it will help, I think it's worth trying to push the work to the GPU. You can either do that yourself by rendering a textured quad at a given size, or by usingGPUImageand its resizing capabilities. While it has some texture size limitations on older devices, itshouldhave much better perfo... | In background thread, my application needs to read images from disk, downscale them to the size of screen (1024x768 or 2048x1536) and save them back to disk. Original images are mostly from the Camera Roll but some of them may have larger sizes (e.g. 3000x3000).Later, in a different thread, these images will frequently... | What is the most memory-efficient way of downscaling images on iOS? |
Create a .gitignore in the repo folder with one rule:
!*
This forgets the rules (with !) of all of the files (*) in the main .gitignore.
|
After looking at git ignore exception, I realized that one can ignore files in a repository from a global .gitignore file.
Is there any way that you can override all rules from the global .gitignore file, so that the repository will have everything in it and nothing ignored? (besides un-ignoring every file individuall... | Un-ignore all files in global .gitignore |
No, there is no such D package that I know of. Ideally it should behave like theJCache, but I am afraid that would be too much to ask. :) JCache is going to be an amazing addition to the already excellent Java API.D community would certainly benefit from something like that. | Is there a way in D to have a list that allows you to shift
around values? I'm creating a cache and I would like to keep a
log of when an item was last accessed so when the cache shrinks
or is about to overflow I can delete the items that haven't been
accessed in a while.I would like to be able to push to the back ... | Lists Allowing for Pushing, Popping & Switching Values |
It's nothing to do with Python. The files scanned will still be in the OS's file system cache, so don't require as much disk access as the first run...You could reproduce with something like:with open('a 100mb or so file') as fin:
filedata = fin.read()On the second run, it's likely the file is still in memory rathe... | I have made a simple program, that searches for a particular file in a particular directory.The problem with the program is that it runs very slow the first time, but very fast when you run it subsequently. I am pasting a screenshot of the same.I would like to know, why is it so? I have discovered the same thing on bot... | Why do python programs run very slow the first time? |
2
This usually happens because there is a problem in the configuration of the ValidatingWebhookConfiguration. When you deploy the nginx controller it deploys multiple resources, one of those is this validation, which function is to validate all the ingress that you create l... |
I'm creating my Kubernetes single node cluster using kubeadm. After applying the ingress ngnix controller, I'm getting the following error when I try to apply the ingress file.
I'm getting the following error while applying the ingress:
Error from server (InternalError): error when creating "ingress.yaml": Internal er... | Failed calling webhook "validate.nginx.ingress.kubernetes.io": error while applying the ingress in Kubernetes |
The solution was to disable theLegacy Stackdriverand enableStackdriver Kubernetes Engine Monitoring:Go to the cluster page and click on edit;Disable both Legacy Stackdriver Monitoring and Logging;Enable Stackdriver Kubernetes Engine Monitoring using the option "System and workload logging and monitoring" | Recently I did an upgrade on my cluster that's running multiple containers for microservices written in Java (using default Spring Boot's log4j2 default configuration). Since then, the container log is not being updated anymore.
Thekubectl logscommand is working fine, all the recent logs can be seen using this command,... | Container logs not working after cluster update on GKE |
OK, there was a lot in my original question, but the core of it really came down to: as a non-UI person, how do I make an OAuth workflow work with a React app? The callback URL in this case is a route, which doesn't exist if you unload the index.html page. If you're going directly against S3, this is solved by direc... |
I may be twisting things about horribly, but... I was given a ReactJS application that has to be served out to multiple sub-domains, so
a.foo.bar
b.foo.bar
c.foo.bar
...
Each of these should point to a different instance of the application, but I don't want to run npm start for each one - that would be a... | Can a ReactJS app with a router be hosted on S3 and fronted by an nginx proxy? |
Not sure you have created the service account and granted access to the adapter however there is two models of custom metrics adapter. Legacy adapter and new resource version.If adapter is up and running did you check the logs of POD ?New resource model to install :kubectl apply -f https://raw.githubusercontent.com/Goo... | I would like to scale my deployment based on a custom logging metric, but I'm not able to make that work, I created already the custom metric and I'm also able to see it in the metric explorer but for some reason the stackdriver adapter is not able to get the metric values.This is my hpa.yamlapiVersion: autoscaling/v2b... | Horizontal pod autoscaling using a logging custom metric in GKE |
You could change the last 3 commits by interactive rebase.
git rebase -i HEAD~3
And change the commit to "edit".
See https://help.github.com/articles/about-git-rebase/
|
I made a "little" mistake and added a "little" (>100MB) file to my local repo.
Two commits later I'm trying to push to remote repo in github that have a limit of 100MB.
I can remove the file from my current commit with git rm --cached, but it still in previous commits.
How can I remove the file from all commits?
I've ... | Git remove file from all commits |
0
For a docker image, named "hello-world":
docker save --output hello-world.tar hello-world
sha256sum hello-world.tar
It should give you the content sha of image.
Share
Improve this answer
Follow
... |
How can I calculate a deterministic and reproducible checksum of a docker image, locally, without pinging any registry?
The checksum should not depend on the image name or in which registry it lives. It should solely depend on the content of all layers.
For example, assume the following:
a given file a
a dockerfile w... | How can I calculate a deterministic and reproducible checksum of a docker image, locally, without pinging any registry? |
In order to authenticate you shoukd firstly be using the correct operator and executor in Airflow. In your case this would be the Kubernetes Executor. When using this executor you need to set up secret/s for use with k8s.
Refer to the documentation hereKubernetes ExecutorOverview | I have Apache Airflow on k8s.Earlier, when Airflow was running on my local server (not k8s) i didn't have troubles with oauth2 creds verification: when Google Operators (based on GoogleCloudHook) starts, my browser opens and redirects me to Google Auth page. It was one-time procedure.With Airflow on k8s my tasks runnin... | Airflow on k8s and Google Operators: creds verification |
Described situation by you is caused by fact that fill() fills data only if you do not have anything in your group by time() period in your query. If you get spread=0 then you probably have only one value in this period, so no fill() is used.
What I can suggest to you is to use subquery with lower group period time to ... | How can I plot time-grouped increment data in a bar graph in Grafana, but with a sparse data source that needs interpolation BEFORE calculating the increment?My data source is an InfluxDB with a sparse time series of accumulated values (think: gas meter readings). The data points are usually a few days apart.
My goal i... | How to plot daily increment data from a sparse data set with interpolation in Grafana? |
0
I can assure you that there is nothing wrong with the code you are showing.
Share
Improve this answer
Follow
answered Dec 22, 2012 at 6:41
CocoaneticsCocoanetics
8,18922 gold badges3030 ... |
I'm using ARC and generic Cocoa and still hitting memory issues. With NSZombiesEnabled, the following line points to the crash:
[self.menu itemWithTag:MYMenuItemStatus].title = NSLocalizedString(@"DISCONNECTED", nil);
With the error:
*** -[CFString retain]: message sent to deallocated instance
self.menu is defined a... | ARC + NSLocalizedString + NSMenuItem#title == Memory Issue |
You seem to say your app crashes with an out of memory error, in this case you should provide JVM args to the app settings the heap size, not to eclipse
they look like this:
-Xms256M;-Xmx512M
|
Here is my eclipse.ini file:
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.java.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSiz... | Eclipse's .ini settings don't seem to be helping me change the max heap size |
These folders should be installed/populated via a dependency manager at install time (npm and bower, respectively).
You should create a .gitignore file in the root of your project as per this. This should be added to git so it is cloned with the repository on other machines too.
# cat .gitignore
node_modules
bower_com... |
When I load my project into Github, it writes me "Commit is failed". I use bower and nodeJS, and I think that problems is about it, but I need to download these catalogs. What I need to do, or may be it can be done in another way?
| How to load the project into Github |
Try using Springs Cache Abstraction,docs.spring.io/spring/docs/current/spring-framework-reference/html/cache.html.You can use this abstraction in the method which has the restTemplate call.Any method calls response can be cached using this abstraction, with the method parameters as the keys and the return type as the r... | I am building an app in java.I hit api more than 15000 times in loop and get the response ( response is static only )Example**
username in for loop
GET api.someapi/username
processing
end loop
**It is taking hours to complete all the calls. Suggest me any way (any cache technology) to reduce the call time.P.... | How to cache REST API response in java |
If you are running Docker Desktop for Windows 4.5.0 then you should be aware of an existing issue where the default backend selected after installing is not the correct one.You can switch to the correct backend manually by editing the file located at:%AppData%\Docker\settings.json(full path:C:\Users\%UserName%\AppData\... | I'm trying to setup docker with WSL 2 to run a Dockerfile. I downloaded Docker Desktop, and when I tried to follow the quick start guide, I got the following error:docker: error during connect: This error may indicate that the docker daemon is not running.: Post "http://%2F%2F.%2Fpipe%d2Fdocker_engine/v1.24/containers/... | Docker not starting on Windows 11 with WSL 2 |
Sub-domain configuration starts with an entry in the DNS server of the parent domain and the lookup resolves the sub-domain to an IP address of the web server. The web server in turn delegates the requests based on its configuration for the sub-domain.If you don't have a DNS setup in your sub-domain, then the admin at ... | There are several questions on SO about nginx subdomain configuration but didn't find one that exactly the same as mine.Say I got a virtual hostsome.example.comfrom higher-level net adminexample.comat our organization. I want to usesome.example.comas my primary site and usefoo.some.example.comandbar.some.example.comfor... | nginx subdomain configuration on virtual host |
I found the accepted answer here to be incorrect & insecure, and Bao's answer above is very close - except you don't need NFS Inbound on your EC2 (mount target) security group. You just need a security group assigned to your EC2 (even with no rules) so that your EFS Security group can be limited to that security group... |
I am following this tutorial to mount efs on AWS EC2 instance but when Iam executing the mount command
sudo mount -t nfs4 -o vers=4.1 $(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone).[EFS-ID].efs.[region].amazonaws.com:/ efs
I am getting connection time out every time.
mount.nfs4: Conne... | aws efs connection timeout at mount |
Fix for code itself - this would work, but this is not clear naming that would be fixed -https://github.com/intel/scikit-learn-intelex/pull/1343patch_sklearn(['PCA','Linear'])patch_sklearn() would affect only your CPU code - i.e. regular scikit code.In case of GPU there is no notion of GPU support in scikit-learn itsel... | I'm trying to usesklearnex/scikit-learn-intelexfor GPU accelaration. This is my code, learnt from 'Patching several algorithms:':try:
from sklearnex import patch_sklearn
patch_sklearn()
except:
pass
patch_sklearn(['PCA','LinearRegression'])Apparentlythe package suppports linear regression. However, it retur... | Does sklearnex (sklearn-intel-extension) really support linear regression? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.