Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
The general way to do this is read from enviroment variable:import os
application.secret_key = os.getenv('SECRET_KEY', 'for dev')Note it also set a default value for development.You can set the enviroment variableSECRET_KEYmanually:$ export SECRET_KEY=you_key_here # use $ set ... in WindowsOr you can save it in a.env... | This question already has answers here:Where should I place the secret key in Flask?(2 answers)Closed5 years ago.I am building a flask web application and would like to put it on a github repo.I notice that in the .wsgi file#!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.inse... | Standard practice for .wsgi secret key for flask applications on github repositories [duplicate] |
The first thing I would say is that you should almost never SSH from Lambda into EC2. There are much better ways to remotely run scripts on EC2, including:SSM Run ManagerExpose an API on the EC2 instance and call that APIIf you really want to do this, perhaps for some academic reason, then:store the keypair in Secrets ... | I'm trying to write my first Python code in Lambda function that will check whether i'm able to SSH (port 22) in to an EC2 instance.I have created an EC2 instance with Security Group 22 CidrIP my public IP
then, created a Lambda function with python 3.8 as runtime in the same accountNow, through code i,m trying to SSH... | How to ssh into EC2 instance from lambda function |
Fromhttps://docs.docker.com/engine/reference/builder/#cmd:If you would like your container to run the same executable every time, then you should consider using ENTRYPOINT in combination with CMD. See ENTRYPOINThttps://docs.docker.com/engine/reference/builder/#entrypointtl;drYou could define anentrypointunder app and d... | I just followed this article onRunning a Rails Development Environment in Docker. Good article, works great. After setting everything up, I decided to go on and set up a production environment.GOAL:I want torake db:create && rake db:migrateevery time my docker image is run.PROBLEM:If I move the database creation and mi... | Docker Compose + Rails: best practice to migrate? |
The counter gld_transactions is not comparable between Kepler and Maxwell architecture. Furthermore, this is not equivalent to the count of global instructions executed.On Fermi/Kepler this counts the number of SM to L1 128 byte requests. This can increment from 0-32 per global/generic instruction executed.On Maxwell g... | I had an experiment on both GTX760(Kepler) and GTX750Ti(Maxwell) using benchmarks(Parboil, Rodinia). Then I analyzed results using Nvidia visual profiler. In most of the applications, the number of global instructions are enormously increased up to 7-10 times on Maxwell architecture.spec. for both graphic cardsGTX760 6... | *Modified* Nvidia Maxwell, increased global memory instruction count |
Are you deriving/using WebSpheres dyna-cache (DistributedObjectCache)? How are you creating your cache instance?TheDistributedObjectCache(through it'sDistributedMapparent) defines a "put" method overload that accepts a TTL for the individual cache entry. If you want to set the TTL for the entire cache, there is convers... | I have created a cache in the web sphere which will be shared by multiple applications and i wanted to make one entry in the created cache to not to expire. How can i make it ?Thanks and Regards,Sunny. | How to make a cache entry in websphere not to expire |
2
Since Docker uses Virtualbox to work on Windows, and Virtualbox will not expose CUDA to the guest without PCI passthrough, I think it will not be possible to do this as you are thinking.
Share
Follow
edited... |
I notice that nvidia has support for GPU and Docker, but I believe this is only for linux at the moment. Has anyone got it working on windows 10?
In particular, I'm hoping to get access to it for machine learning applications.
https://github.com/NVIDIA/nvidia-docker
| Getting access to GPU on Docker on Windows 10 |
This is beyond the capabilities of .htaccess files, if the requirement is to run the PHP embedded in the HTML stored on github.com at the server on yourserver.com simply by a configuration line like a redirect in the .htaccess file.
A .htaccess file is typically used to provide directives to the Apache web server. ... |
I was wondering if there was a way to basically host a site on your server so you can run PHP, but have the actual code hosted on GitHub. In other words...
If a HTTP request went to:
http://mysite.com/docs.html
It'd request and pull in the content (via file_get_contents() or something):
https://raw.github.com/OscarGod... | Routing .htaccess to GitHub |
If you're not using ARC, then you should autorelease the cell:
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
Note that this is not equivalent with autoreleasing it after retrieving it from dequeueReusableCellWithIdentifier:, because that metho... |
Pretty basic cellForRowAtIndexPath implementation.
I'm wondering why the analyzer is telling me that i'm leaking memory here.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableVie... | UITableViewCell memory management |
I have same the problem when run Jade with many sending and receiving messages between agents.The problem maybe is since A sends messages very fast while B extracts them from its queue VERY slow (he sleeps for 3 secs after each message), the queue of B becomes bigger and bigger until the heap of the JVM is full.You can... | I'm trying to increase jvm heap size because my JADE agent program throwsjava.lang.OutOfMemoryError: Java heap spaceerror.I have set java heap size usingJava Control Panel -> Java Runtime Environment Settingsin Windows 7. But it doesn't help. How can I set-Xmxfor jade agent? | How to set jvm heap size when starting a jade agent |
L1 Cache is the cache that exists per Hibernate session, and this cache is not shared among threads. This cache makes use of Hibernate's own caching.L2 Cache is a cache that survives beyond a Hibernate session, and can be shared among threads. For this cache you can use either a caching implementation that comes with H... | I just want some general info about standard purpose of using L1 cache and L2 cache.I'm curious because I'm investigating the system with terracotta as 2nd level cache and I've found that it also has 1st-level cache. | What's the difference between L1 and L2 caches in web-applications with Hibernate as ORM mechanism? |
0
This is not seem possible. Two years ago it was promised that this would be implemented, but nothing has been done yet.
See the official answer: https://repost.aws/questions/QUhf2ksaV2SA-MWaw04M4U_Q/changing-pg-trgm-similarity-threshold-in-rds
Share
Improve th... |
I'm trying to set the pg_trgm.word_similarity_threshold GUC parameter on an RDS postgres (13) instance.
I have tried setting it with a post-deployment SQL script:
SET pg_trgm.word_similarity_threshold = 0.5;
SELECT pg_reload_conf();
But this results in an error: Npgsql.PostgresException (0x80004005): 42501: permissio... | AWS Postgres setting pg_trgm.word_similarity_threshold |
2
You must release it. TVarRec is a type that is meant to be used only as parameter, and is usually managed by the runtime, but only if the runtime allocated and filled it, in the form of an array of const. Otherwise it is up to you to manage them.
More here, in an article... |
I'm trying to dublicate record in DataSet.
procedure TMSExtQuery.CloneCurRecord(IgnoreFields: array of const);
begin
AppendRecord(RecordFieldsValue(IgnoreFields));
end;
function TMSExtQuery.RecordFieldsValue(IgnoreFields: array of const): TFieldsArray;
var
Idx: integer;
V: Variant;
begin
SetLength(Result, Fi... | TvarRec and release the memory in delphi |
One of the major benefits of React (and Create React App) is that you don't need the overhead of running a Node server (or proxying to it with Nginx); you can serve the static files directly.From theDeployment documentationyou've linked to, Create React App describes what to do:npm run buildcreates abuilddirectory with... | I'm attempting to deploy mycreate-react-appSPA on a Digital Ocean droplet with Ubuntu 14.04 and Nginx. Per the static serverdeployment instructions, I can get it working when I runserve -s build -p 4000, but the app comes down as soon as I close the terminal. It is not clear to me from thecreate-react-apprepo readme ho... | Deploy Create-React-App on Nginx |
Looks like in my case I had a version of openssl that was causing problems. The solution was to remove it:brew uninstall --force openssl098 | Unable to install gems on ruby 2.4.1.$ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin14]
$rvm osx-ssl-certs status all
Selected SSL certs for: ruby-1.9.2-p290
cURL certificate bundle /usr/share/curl/curl-ca-bundle.crt not found
Certificates bundle /usr/local/etc/openssl/cert.pem is up to date.
Certif... | RVM "Empty path passed to certificates update" when updating certs on Ruby 2.4.1 |
you don't have a Gemfile.lock filetrybundle installand thengit commit -am "message you wanna put here"as mentioned below, check thegitignoreand remove/Gemfile.lockand the commit again may resolve your problem | i am currently trying to deploy an app to herokuhttps://github.com/Shopify/dashing/wiki/How-to%3A-Deploy-to-HerokuI am following these instructions exactlybundle install
git init
git add .
git commit -m "My beautiful dashboard"
heroku apps:create myapp
git push heroku masterand receive this error everytimegit push he... | trying to deploy app to heroku recieving error everytime |
1
hg unbundle /home/jla/solar_capture/.hg/strip-backup/ca681926dad2-a0fffac7-backup.hg
Share
Follow
answered May 2, 2017 at 19:33
John Lawrence AspdenJohn Lawrence Aspden
17.3k1212 gold bad... |
I botched a histedit, and I'd like my original changesets back:
$ hg histedit
3 files updated, 0 files merged, 1 files removed, 0 files unresolved
saved backup bundle to /home/jla/solar_capture/.hg/strip-backup/ca681926dad2-a0fffac7-backup.hg
There appears to be a backup bundle, how do I make it as if I'd done
$ hg h... | How do I recover from a botched histedit in mercurial? |
For non-Maven Java projects, you have to use the dedicated Sonar analysis build step, which relies on the standalone SonarQube Runner. | I am trying to build and run an analyses on anon-maven java projectby building it on Hudson and then running a Sonar analyses via the Hudson-Sonar-plugin.The trouble is, Sonar assumes that the project is a maven project, and fails the build when it doesn't find a pom file.How can I fix this?Here's the relevant parts fr... | Trouble getting SonarQube to analyze non-maven java project |
Probably you needshare_le_over_timefunction from VictoriaMetrics (I work on this Prometheus-like system). For example, the following query returns the share of raw samples during the last hour per each series with namem, which don't exceed 42:share_le_over_time(m[1h], 42)The returned share is in the range0 .. 1, where0... | Am I missing something or is there no function in promql to calculate either one of the following:theRankof a metric among previous observations of that same metric.thePercent Rankof a metric among all previous observations of that same metric.Something like theinverseofquantile_over_time()A roundabout way might be to:... | Is it possible to calculate Ranks of metrics? |
I would recommend that you cache them somewhere inside the DOM itself, either at their natural place or in a "cache" div, just hide them or their container (visibility: hidden). Move them around the DOM (e.g. final_container.appendChild(cache.removeChild(cached_item))) and show them as required. This should give you... |
I am building a simple blog which is viewed single-page (do not worry, it is progressively built) and thus I am sending AJAX requests which return HTML to be inserted into the page.
What is the most efficient way to store/cache information (HTML) to be added at a later time into the DOM?
How much information (old entr... | AJAX and Javascript cache efficiency question |
Try something like this:if (isset($_GET['q'])) {
header('Location: http://example.com/search-'.rawurlencode($_GET['q']));
exit;
}This will redirect a request that’s URL query contains aqargument like in your/index.php?q=SEARCHTERMHERE&x=0&y=0to/search-SEARCHTERMHERE.EditYou can also try this with mod_rewrite on... | I'm trying to make seo to search queries. i've got a form like this:<form action="index.php?<?=$_GET['search-input01']?>'" method="get">
<p class="nom t-center">
<label for="search-input01">All:</label>
<input type="text" size="75" name="q" id="search-input01" />
<input type="image" src="design/search... | using mod_rewrite with $_GET |
I have managed to fix this with some help.- stage: Deploy${{parameters.environmentType}}Environment
displayName: Deploy ${{parameters.environmentType}} Environment
${{ if ne(parameters.environmentType, 'prd') }}:
dependsOn:
- Validate_${{parameters.environmentType}}
- GetADUserUPN
$... | I have a multi-stage deploy file that does validation of Bicep, then a pre-flight what-if and then the final deploy. They all depend on a little bit of code that takes a UPN and returns the ID. This is for the bicep file to tag the resource and add role assignments.I am getting an error stating that the dependsOn is ... | Azure Pipeline - Stage with Multiple depends on with if condition |
@SergeyBushmanov helped me diagnose the error in my title, it was caused by runningSimpleImputeron text.I have a further error that I'll write a new question for. | I'm trying to use SKLearn 0.20.2 to make a pipeline while using the new ColumnTransformer feature. My problem is that I keep getting the error:AttributeError: 'numpy.ndarray' object has no attribute 'lower'I have a column of blobs of text called,text. All of my other columns are numerical in nature. I'm trying to use t... | SKLearn Pipeline w/ ColumnTransformer: 'numpy.ndarray' object has no attribute 'lower' |
+50In the directory where WordPress is installed, i editing the .htaccess file and i have add the following line. (CakePHP subdirectory will be called "cake")Wordpress.htaccess# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^cake/(.*)$ /cake/$1 [L,QSA]
RewriteRule ^index\.php$ ... | i installed wordpress in the root directory of my FTP, and then in a subfolder I install cakephp, however I have a problem with htaccess.www/
.htacess
(wordpress)
/folderCakephp/
.htacess
(cakephp)Wordpress htaccess :# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
R... | .htaccess rules to have wordpress in root and cakephp in subfolder |
pod eviction policy of my cluster and changeThese thresholds ( pod eviction) are flags ofkubelet, you can tune these values according to your requirement. you can edit the kubelet config file, here is the detailconfig-fileDynamic Kubelet Configurationallows you to edit these values in the live clusterThe restart polic... | I have a Kubernetes cluster deployed on GCP with a single node, 4 CPU's and 15GB memory. There are a few pods with all the pods bound to the persistent volume by a persistent volume claim. I have observed that the pods have restarted automatically and the data in the persistent volume is lost.After some research, I sus... | How to identify pod eviction policy? |
Maybe I lost something there, but I didn't see any difference between them. The frm is a local variable, not a static field.
|
There are many many similar links in stackoverflow, all which seem to be addressing complex functions (so quite difficult for me to understand what i really should go for). But mine is simple. I just want to know if declaring a function as static right way to go, if i can manage the same functionality even with a nons... | Is static function a right coding practice in this case, performance-wise and resource usage-wise? |
This can be accomplished using the cPanel GUI. Here are some instructions I found:Add Password ProtectionLog into cPanel.Go to the Files section and click on the Directory Privacy icon.Select the directory you want to password protect and then you will see Set permissions for $PATH screen appear.Click on the checkbox l... | I am working on a website in which I want to restrict the access to it by entering some username and password in it likeif I/or any outside users open the website, it should ask forUsernameandPassword.The current code which I am using in .htaccess file inside public_html folder is:<IfModule mod_rewrite.c>
RewriteEng... | How can I restrict access to our website through .htaccess in cpanel? |
If you need a named volume that's pointing to a host filesystem location (which is a bit of reinventing the wheel since you can do a host mount, but there appear to be a lot of people asking for it), there's thelocal persist filesystem driver. This is included in Docker'slist of plugins.Update: It's also possible to do... | This question already has answers here:Docker: change folder where to store docker volumes(2 answers)Closed7 years ago.I'm new to Docker and I was playing around withdocker volume. I wanted to specify the location wheredocker volumestores the data. Much like when we provide the-voption when we executedocker run.Ex : -v... | docker volume custom mount point [duplicate] |
GitHub.com and your GitHub enterprise are two completely different different instances. They do not share any user data.This means to add a collaborator to a project on your GitHub enterprise instance the user needs to create an account onthisGitHub enterprise instance and not on GitHub.comShareFollowansweredJun 23, 20... | I am new to GitHub and ran into a strange problem. I have a GitHub Enterprise account, and am trying to add other GitHub account users as collaborators to a repo. When I searched for their user names, it errored with a message "XXX isn't a GitHub member". I am very sure that the users I am trying to add just create... | GitHub - Failed to locate other GitHub public accounts to add as collaborator |
I haven't directly used Gerrit, but I like the idea of intermediate and specialized repo between:
your developer's repos
the central GitHub remote repo
So you need to determine what you want to publish in the remote GitHub repo:
code to be reviewed (meaning a local Gerrit webapp would pull the GitHub code to examin... |
I'm just getting started using GitHub, Gerrit, and Hudson(Jenkins) together. And I need some thoughts on workflow.
We'd like to use GitHub as our main remote repo. We'd like to use Gerrit primarily for code reviews, but also for build triggers in Hudson.
At the moment, though, I'm having some trouble thinking through ... | GitHub, Gerrit, Hudson(Jenkins) workflow |
What you are asking for is exactly what theblamefeature does.The only API I could find wasthisrestfulgit.Based on blind text searchthis herelooks like the function that implements gettingblameinfo, if you understand how it uses the underlying git api then you can just copy that part instead of using therestfulgit | I am trying to make a script that runs pylint on the files present in the pull request and creates inline comments for the linting errors.I got a hang on how to usePyGithub. The problem is that in order to comment on a pull-request you will have to know thecommitthat modified the file and theline numberfrom the patch. ... | Integrate pylint with github review comments |
Your Multiline JSON file:[
{"name":"Wer","address":"TN"}
{"name":"Yin","address":"KL"}
]Necessary packagefrom pyspark.sql.functions import from_jsonRead your json file as text filedf_1 = spark.read.text("path/to/file.json")Filter unwanted recordsfilter_condition = (col("value") != "[") & (col("value") != "]")
df_2 = df... | I'm trying to read a multi-line JSON file without comma separation using pyspark. I'm not much comfortable with Pyspark. I wanted to do it with simple python but I was getting Memory Errors with 16GB of RAM and file size is 14GB. | Multiline JSON without comma separator in Pyspark |
0
Have to leave for a meeting. I'll leave you the script I've been working on to help you:
#!/bin/sh
# in your case filename would be the variable used in the for loop
filename=$(find DATA-TT*)
# Part gets the date from the filename
part=$(echo $filenam... |
Directory structure
MyDirectory
-data/
-DATA-TT_20160714_soe_test_testbill_52940_1.lst
-output/
-DATA-TT_20160714_soe_test_testbill_52940_1.pdf
-Backup/
enter code here
#!/bin/bash
for i in $( ls ); do
echo $i
#cd $i
#cd $i/data/
echo $i... | navigating directories and sub-directories and moving the files using shell |
Well, at least with GCC 4.4.5, which is what I have handy on this
machine,std::stringis a typdef forstd::basic_string<char>, andbasic_stringis defined in/usr/include/c++/4.4.5/bits/basic_string.h. There's a lot of
indirection in that file, but what it comes down to is that nonemptystd::strings store a pointer to one of... | I am currently working on an application for a low-memory platform that requires an std::set of many short strings (>100,000 strings of 4-16 characters each). I recently transitioned this set from std::string to const char * to save memory and I was wondering whether I was really avoiding all that much overhead per str... | std::string implementation in GCC and its memory overhead for short strings |
Instead ofmemcpy(numarray->data, nums, size);it must bememcpy(numarray->data, nums, size * sizeof(int)); | I have the following structure:struct NumArray {
size_t size;
int* data;
};Then, I wrote this function to build a "NumArray" from a common array:struct NumArray* CreateNumArray(const int* nums, const size_t size) {
struct NumArray* numarray = malloc(sizeof(struct NumArray));
if (numarray == NULL) {
... | Copy the contents of one array into another within a pointer to a structure | C |
1
(#1) The Apple docs say to do both
In addition, because of a detail of the implementation of dealloc in UIViewController, you should also set outlet variables to nil in dealloc:
http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/m... |
Hey guys, sorry for beating the memory management (dead)horse again. I know this question has been asked several times on SO, but I feel all the threads out there is still lacking two pieces of information. Let me put forth what I DO know to save everyone some time.
1) When you create an IBOutlet, your view controller... | memory management with outlets and properties in view controllers |
Try theNoSQL Workbench for DynamoDB. It canconnect to DynamoDB Local. | As the title speaks, is there a way to visualize data in local dynamodb like how it is on AWS Console? This seems to be one of the drawback to me because using localhost:8000/shell (default endpoint) and doing scans requiring the setup of the attributes and etc. | Local Dynamodb Console |
Set up a Git repository one levelabovepublic_html (git init; git commit -a). Simple and easy (Git only creates one folder wherever you create it); you don't need to use Github (which is a publicly accessible Git repository). | I have a webserver setup using the standard linux, apache, mysql, php config and I currently don't have a way of doing revision control - I just backup the whole thing every now and then. I'd like to set up a github repository for just the php and html files - basically everything in public_html. Not really sure wher... | Set up a github repository for an existing LAMP set up |
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("network.http.phishy-userpass-length", 255);
profile.setAssumeUntrustedCertificateIssuer(false);ShareFollowansweredAug 21, 2012 at 15:58kamalkamal9,6973030 gold badges105105 silver badges169169 bronze badgesAdd a comment| | I have an https login page from a Web App which i am trying to automate using Webdriver.Login URL:https://a.b.c.d/web/certLogon.jspi looked athandling-untrustedsslcertificates-using-webdriverbut since my cert was NOT prepared against a.b.c.d (Which is usual in testing environments) this would not work.
and i get error ... | Bypassing CERT Exception in Webdriver with Java Language binding |
You can try running your unit tests under Instruments with the Leak Detection Instrument.
However, this will only work for Application (bundle) tests, if you're using OCUnit. If you happen to use something else, please let us know.
|
Is it possible to test if memory leaks occur when running a Unit Test?
I want to check if my memory management is handled correctly.
Thanks
| Xcode Memory Leaks detection in Unit Test |
In 4.5.7, your only option is to provide full DB credentials to the analyses.Your best bet is to address the causes underlying "we can't upgrade" and then do the upgrade. By 5.2, analysis doesn't talk to the database. The current release is 6.3, and the current LTS is 5.6.6 - by which time you only need an authenticati... | We have centralized SonarQube system. We are executing Sonar runner from different server that is our build machine. We are using a plugin which scans our source code. It uses ant build.xml to execute scan from runner. I know that we can use jdbc string and credential to access database. As per our org policy, we shoul... | Access Sonar server and its db without jdbc connection string |
I had raised a support ticket against Github and got a response confirming the fact that ALL pages are public. I've now requested them to add a note to help.github.com/pages.ShareFollowansweredJun 13, 2012 at 3:14kashyapkashyap5,27833 gold badges1616 silver badges1111 bronze badges86Does your pages repo have to be publ... | Couldn't find anything in the github documentation and also here on SO. But I was wondering if there could be ahttp://foo.github.comfor a private repository namedfoowhich is accessible only one had access to thefoorepository itself.I remember having read something about github pages always being public but can't seem t... | Private pages for a private Github repo |
OnGitHub, you can "archive" a repository, making it read-only, which seems exactly what you're looking for. You can find a button to do so right in the settings of your repo, that ishttps://github.com/<username>/<repository>/settings. A banner will be shown stating that the repository is archived and no further modific... | I haven't found anything about closing a GitHub/GitLab repository. I guess it's not feasible.By "closed", I mean: it's possible to browse it/clone it, but not to create new commits/branches.Maybe there is some kind of equivalent or other way to achieve this on either GitLab or GitHub for this? Bonus point if there is a... | Is it possible to close a GitHub/GitLab repository? |
You still need to install the AWS CLI inside the docker container.
# Swap to root user to install pip and aws cli then go back to jenkins user
USER root
RUN apt-get update
RUN apt install python3-pip -y
RUN pip3 install awscli --upgrade
USER jenkins
|
When running aws from Jenkins pipeline I have the following error message: command not found - which aws returns command not found.
By other hand, when running aws from a single job it works - which aws returns /usr/local/bin/aws.
Do you have any idea why this is happening?
Thank you.
| Running AWS Command Line Interface using Jenkins installed through Docker: command not found? |
Just use the pod name like you had figured out from your other question:- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.nameThe pod name should be very unique (if you want completely unique, you'll need to grab its UID, but i'm not sure what you're trying to solve).The pod name will be generated u... | I currently have a kubernetes CronJob with aconcurrencyPolicy: Forbid.
I would like to be able to uniquely identify this pod externally (k8 cluster) and internally from the pod, with an ID that will be unique forever.
I was thinking of using thecreationTimestampand the name of the pod but unfortunately it isnot that ea... | How to uniquely identify a cronjob run from within the pod |
As the error suggests, there is a github file size limit. Hence you should remove such files before pushing.
git rm -r --cached folder_name/logs
git commit
git push
Now to explain, the rm --cached is just to remove them from the being tracked. I have avoided git add . command as it will add all the files again. You ... |
I've updated the folder stucture of a project locally on my computer to make it way better organized. I deleted some folders, did some name changes and changed the location of files.
But now I'm not able to push the whole thing into my github repo.
Is there a method to update the repo (master branch) from my locally m... | Update github repo after local changes |
I think you should specifysonar.librariesproperty too."Comma-separated paths to files with third-party libraries. This property is used by rule engines during issues detection (mainly the SonarQube and FindBugs engines, which both rely on bytecode)."Details:http://docs.sonarqube.org/display/SONAR/Analysis+Parameters.Or... | I am having serious major difficulties configuringSonarQubeto use theFindBugsplugin. I know that this 1) requires the location of the binaries (.class files) to be explicitly defined in the sonar-project.properties file. My problem is that I have a huge amount of source code to scan with binaries located throughout the... | SonarQube with FindBugs Plugin |
My current workflow now involves desk.
For each project, I have initialized a desk via:
desk edit project_a
and there I run all the steps that I would have done manually, e.g.:
ponysay "INIT PROJECT A"
docker stop $(docker ps -a -q) # stopping all the running containers
cd ~/src/docker-compose/basic-services
docker-... |
I have multiple projects that I need to switch in between on a regular basis. The projects are setup via docker-compose, yet some need external containers to be available.
So in order to run docker-compose up -d in a project, I have to switch to a different directory first and start some basic service containers there... | How to quickly switch between docker environments for development? |
See:https://support.cloud.engineyard.com/entries/20996676-Restore-or-load-a-databaseUse scp to ssh copy your database to the server.ShareFollowansweredFeb 25, 2013 at 5:13KrishnaKrishna13311 silver badge1010 bronze badgesAdd a comment| | I am thinking of deploying my Rails app to Engine Yard. I have a MySql db with all of the data for the site. When I deploy to engine yard cloud, will I be able to "push" this database to the server somehow?Something like this (?):https://blog.heroku.com/archives/2009/3/18/push_and_pull_databases_to_and_from_heroku/Or c... | Engine Yard Push/Load Database |
The Docker bind-mount model can't really be used in Kubernetes the way you describe.Kubernetes's model is around a cluster of essentially interchangeable machines. Say you have 10 systems. Which one has that HTML content? How does it get there? What happens if you need to add another node, or that one node is destr... | I'm trying to wrap my head around Kubernetes and as an exercise, I want to .igrate my docker-compose setup, which consists of nginx, php-fpm and mysql to a k8s cluster.. While I'm familiar with Docker and docker-compose, I just don't seem to figure out, how to mount a local folder into a Kunernetes pod.What I want to a... | Kubernetes mounting folders in WSL2 |
The specific error you are getting is because your line endings are not uniform; this usually happens when you shift between systems (Windows and Linux use different line endings). If you are interested in this, you canread the wikipedia entry, which also includes options on making sure your entries are uniform. You ca... | This question already has answers here:Closed12 years ago.Possible Duplicate:git replacing LF with CRLFI have a Django project which I would like to collaborate and work on it with my team. I am very new to git and would like to know how to set it up.I have cd into the project directory and did 'git init'but when I try... | "LF would be replaced by CRLF in crush/admin.py" error when staging with git [duplicate] |
-2To maintain an SLA, clusters created by ACS limit the default use of alpha or beta features within Kubernetes. To use more advanced features of ACS, visithttps://github.com/Azure/acs-engine, and modify the kubelet yaml within the /parts directory.ShareFollowansweredMar 30, 2017 at 14:53A HoweA Howe12222 bronze badge... | Is it possible to enabled Alpha API options for Azure ACS Kubernetes instances? If so how?For example--enable-custom-metrics=trueFor horizontal auto scaling based on custom metrics | Alpha options for Azure ACS (Kubernetes) |
Certificates are stored assecrets. Thensecretcan be used and mounted in adeployment.So in your example it would look something like this:...
volumeMounts:
- name: certificates
mountPath: /certs
# Create on-disk volume to store exec logs
...
volumes:
- name... | I am trying to configure SSL for the Kubernetes Dashboard. Unfortunately I receive the following error:2020/07/16 11:25:44 Creating in-cluster Sidecar client
2020/07/16 11:25:44 Error while loading dashboard server certificates. Reason: open /certs/tls.crt: no such file or directoryvolumeMounts:
- name: cer... | Kubernetes: Open /certs/tls.crt: no such file or directory |
General indicators for different certificate types are:Root certificateis usually self-signed:issuerfield matchessubjectfield. Public key stored in the certificate can be used to validate the signature of the certificate.Basic Constraintscertificate extension is presented andisCAattribute is set totrue.Intermediate CA ... | We have one Android and iOS mobile app in which there is one SSL Certificate pinned. Now I want to know that what kind of certificate is pinned in the both apps? (Leaf, Intermediate or Root). Is there any way to distinguish between this certificates. Any kind of help will be appreciated. Thanks in advance. | Distinguishing between SSL certificates |
Kubernetes config file describes 3 objects:clusters,users, andcontexts.cluster- cluster name + details - the host and the certificates.user- user name and credentials, to authorise you against any cluster host.thecontextrole is to make the connection between auserand acluster, so when you use that context,kubectlwill a... | I can't seem to figure out how to create a totally new Kubernetes cluster on a Docker Desktop running instance on my computer. (It shouldn't matter if this was a Mac or PC).I know how to -set- the current cluster context, but I only have one cluster so I can't set anything else.### What's my current context pointing to... | How to create a new Kubernetes cluster on Docker Desktop? |
0
make sure the code is being executed as a user with sufficient privileges. You can confirm this by running whoami in the script that tries to pull with git
Share
Improve this answer
Follow
an... |
We have a PHP script which consists of nothing but the following code...
/usr/bin/git pull
...we originally were using just git pull.
Whenever GitHub posts data to this script the git pull fails. We've tried using https://www.php.net/manual/en/function.shell-exec.php and storing the response in a variable and writing ... | GitHub post-hook doesn't work with our PHP script |
One option i see to work around this issue, is to attach a retention policy (retain) to the cluster, update stack, remove the cluster from the template, update stack and finally import the DB Cluster into the template with the correct version.Can be difficult with dependencies, for those!Refcalls one could hard code th... | Have an RDS database cluster. The deployed version in AWS has the following attributes:
Engine: aurora-postgresql
EngineVersion: '10.11'My cloudformation template specified 'EngineVersion 10.7', but I believe the minor version was updated automatically on the deployed cluster. When I tried to deploy my Cloudformation s... | InvalidParameterCombination error deploying RDS database cluster |
I've been through this recently when cloning an older commit, making new changes and trying to re-push it. Git wasn't recognizing my project anymore.
What solved it for me was, instead of cloning it using the HTTPS URL as usual, I've used the SSH one (which is password protected by an SHH key). With that, I've made th... |
I was working on a project for many weeks now and I'm having this error when trying to add new changes to git, suddenly:
fatal: not a git repository (or any of the parent directories): .git
My terminal is not recognizing my project as a git repository anymore, so it's not running git commands. I know I could create a... | Git not longer identified by terminal |
The default cache size is 300, according to the code.
Your snippet won't tell you anything useful about the size of the cache. When the locmem cache is full, a subsequent set will cause it to evict items based solely on the modulus of their key's position in the dict, which is unpredictable. There is no attempt to evi... |
What is the default size of the local memory cache for Django.
https://docs.djangoproject.com/en/1.8/ref/settings/ does not mention any.
https://docs.djangoproject.com/en/1.8/topics/cache/#cache-arguments says it is 300, but the following code always returns a different value:
for i in range(0, 10000):
cache.set(i... | Django localmem size |
1
git config --global user.name "John Doe"
git config --global user.email [email protected]
You just need to enter these two lines to get user and email globally. This will automatically apply to your project each and every time. So you will not need to initialize each tim... |
Do I need to initialize a git user and email each time I want to work on a new project? What if I want to continue work on an existing project? I am very new to git
| Initializing git user for projects |
You have to use theproxy_redirectto handle the redirection.Sets the text that should be changed in the “Location” and “Refresh” header fields of a
proxied server response. Suppose a proxied server returned the header field
“Location:https://myserver/uri/”. The directive
will rewrite this string to “Location: http:... | I want to set up Nginx as a reverse proxy for a https service, because we have a special usecase where we need to "un-https" a connection:http://nginx_server:8080/myserver ==> https://mysecureserviceBut what happens is that the actual https service isn't proxied. Nginx does redirect me to the actual service, so the URL... | Nginx does redirect, not proxy |
Try the PromQL below:label_replace(label_replace(metrics-app-123456-spark-whatever-1{}, "app", "$3", "__name__", "(.*)-(.*)-(.*)-(.*)-(.*)-(.*)"), "__name__", "$1-$4-$5-$6", "__name__", "(.*)-(.*)-(.*)-(.*)-(.*)-(.*)")Q: how can I use the app ID from the metric name to be added as a label?A: Use the prometheus function... | Let's say I have a metric namedmetrics-app-123456-spark-whatever-1.I know you can use the following options for relabeling:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_confighttps://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configsWith these tw... | Rename a Prometheus label by using a regex against a metric name |
Did you try to use tzutil command?Method 1Follows a example to use the comamnd, to set a Australia time zone.tzutil /s "AUS Eastern Standard Time"Method 2On the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation , has all information related to timezone.From a virtual or physical machine with the c... | Is it possilbe to set the timezone in a windows container which is based on microsoft/aspnet:4.7.2.From the documentation this should work by running the following commanddocker run -e TZ=Pacific/Honolulu -d -p 8000:80 --name <ContainerName>but the date is not changed when I log into the container via the following c... | Docker windows container setting the Time Zone does not seem to work |
.eap file is a jet (MS-Access) database file.
There are no merge tools to merge .eap files. EA's version control system relies on xmi files.
So basically you should be using the built-in xmi-based mechanism instead of trying to merge binary files.
|
I have a request to use GitHub Pull Request in a git repo which is continuously developing in a single binary file (EAP model from Enterprise Architect) into a master branch.
By the time a pull request is open, it triggers Jenkins and it should use an special merging tool in order to merge EAP files, but how to integr... | Use Pull Request to merge EAP files (Enterprise Architect) |
12
Communication between regions on AWS goes through the untrusted internet. You need to add the external IP of the EC2 instance to the security group of the RDS instance to get that to work. However, I would recommend you to move the EC2 instance into the RDS instance re... |
I have following setup on AWS
One RDS instance in Region 1.
One Ec2 instance in Region 2.
EC2-Security Group sgrg2 in Region 2.
I am trying to access RDS from EC2 by adding Security Group to RDS instance list. It is not authorizing.
Moreover, while adding sgrg2 to RDS security group, it is saying ' EC2 security ... | RDS instance access from Ec2 instance from different region |
You need to serve the actual ip address of the server, by defaultng servewill use the loopback address. You can achieve this with:ng serve --host 0.0.0.0 | I have built a simple web app using angular-cli 2,it works well in the local machine. now i tried to deploy it onto a digitalocean server,however when going to the web server link withhttp://ipaddress:4200, i can't visit the web app.Note: I can make sure the firewall is open to the web application on that port since in... | can not visit the web app made of angular cli on the digitalocean |
Change your rewrite rule to not match blog:rewrite ^/((?!blog).+)/$ /$1 permanent; | I'm using Nginx and in my .conf file I have added a rewrite to remove all trailing slashes on the urlsrewrite ^/(.*)/$ /$1 permanent;This works perfectly except for the /blog folder which enters into an infinite loop.As I understand it it is because the /blog folder is a directory and all directories automatically add... | How to remove trailing slash on blog folder in Nginx |
Given your the available RAM on your machine, if you are running a 64-bit JVM in server mode, then yes, the heap size will be able to go up to approximately 7.5 GB.
Documentation (I highlighted the relevant parts):
Client JVM Default Initial and Maximum Heap Sizes
The default maximum heap size is half of the physical... |
I am running java process through main class on java 8. I have not specified anywhere min(Xms) and max(Xmx) heap size. But when i check through visualVM it's
4267704320(i.e. 4.26 GB) which is the default max heap size for a given process(confirmed through windows command also which is
-XX:+PrintFlagsFinal -version 2>&... | Will process be allocated enough heap when no explicit parameters are specified? |
Thepush eventdoes indeed detect tag and branch creation.But its event payload also include "size": The number of commits in the push.If that size is 0, your listener won't have to trigger any build.ShareFollowansweredOct 16, 2018 at 5:15VonCVonC1.3m539539 gold badges4.6k4.6k silver badges5.4k5.4k bronze badges21Thank y... | In my project, I have buildspec.yml that deploys my app and creates a new release on GitHub.If I create a new CodeBuild project with the yml file above and watch master branch with GitHub push webhook, it keeps releasing new versions forever...It seems that if I watch "push" event, the webhook also triggers a new build... | Filter codebuild push event |
3
Shields.io has progressively added support for Jenkins over the years and now has a variety of badge options available:
Build status badge:
https://img.shields.io/jenkins/s/https/builds.apache.org/job/commons-lang.svg
Tests status badge:
https://img.shields.io/jenki... |
I'm using Jenkins to run my builds, and update the github status of my projects.
This works fine.
I'd like to show the status of the build using http://shields.io/ on my README.md, like Travis does it.
Any thought of how can I do that ?
I don't want to use Travis for my project, I want to keep Jenkins.
Thanks !
| Show github build status in readme.md |
2
It's always a good idea to read the documentation:
The variable’s value is made available in locations processed by the proxy_pass, fastcgi_pass, uwsgi_pass, and scgi_pass directives when the request body was read to a memory buffer .
As you can see, you have to configu... |
I'm having some trouble getting nginx to conditionally log the request body. I don't want to log login credentials, and accordingly have included a map that correctly triggers when the URI is/is not the login URI. There seem to be a number of similar posts suggesting using
client_body_in_single_buffer on
fastcgi_pas... | Unable to log $request_body in nginx log |
Usedocker buildxcommand instead ofdocker build -tcommand.
Docker build only create docker image with respective platform.For more information refer documentation :https://www.docker.com/blog/multi-arch-images/ | Let's say I have an appfoobuilt for many different arches (e.g,foo-arm64,foo-amd64, etc). I would like to make very small Docker images like so:FROM scratch
ARG ARCH
ADD foo-$ARCH /bin/foo
ENTRYPOINT [ "/bin/foo" ]However, when I build an image:docker build -t foo:arm64 --platform linux/arm64 --build-arg ARCH=arm64 ... | how to set architecture when building multi-arch Docker image? |
. Client Side Caching (built-in)All session data stored on client-side as Cookies.Example storing explicitly variable:usernamefrom flask import Flask, session, request
app = Flask(__name__)
app.config["SECRET_KEY"] = "any random string"
@app.route("/login", methods=["GET", "POST"])
def login():
if request.method... | I am building a web form using Flask and would like the user to be able to enter multiple entries, and give them the opportunity to regret an entry with an undo button, before sending the data to the database. I am trying to useFlask-Cachingbut have not managed to set it up properly.I have followedThe Flask Mega-Tutori... | How to cache a variable with Flask? |
The hook cannot be prevented from executing, but you can prevent the bulk of the script from running using a conditional.git diff --cached --name-only --diff-filter=ACM src/will return the list of files added, copied or modified in thesrc/folder.In your hook script, check the number of lines that are output from thegit... | My project has client code and server code in one projectI want to run the test code through the pre-commit hook only when the client code has been modified.Is there a way to run a pre-commit hook only when a file is modified under a specific folder? | Run a pre-commit hook if the file is modified under a specific directory |
0
So while your question doesn't show the actual content that is unchanged, leading to doubt in the issue, I was having this same problem.
I came across this thread where the submitter eventually claimed that changing the port of his server caused it to begin working. I ... |
I need to serve static html-files with content replace.
I try:
server {
root /var/www/test;
location / {
gzip off;
sub_filter test test1;
}
}
But it doesn't work :( content is not modified.
Content type: text/html
nginx -V:
nginx version: nginx/1.9.4
built by gcc 4.9.2 (Debian 4.9.2-10)
bui... | How to use sub_filter for serving static files? |
CPU caches actually do two things.The one you mentioned is caching recently used memory.The other however is predicting which memory is going to be used in near future. The algorithm is usually quite simple - it assumes that the program processes big array of data and whenever it accesses some memory it will prefetch f... | I was wondering what were the advantages and disadvantages of linked-list compared to contiguous arrays in C. Therefore I read a wikipedia article about linked-lists.https://en.wikipedia.org/wiki/Linked_list#DisadvantagesAccording to this article, the disadvantages are the following:They use more memory than arrays bec... | CPU Cache disadvantages of using linked lists in C |
4
But, if I force kill (kill -9) the process, will the dynamically allocated memory (using new operator) be de-allocated by the operating system?
Memory is tied to a process through the virtual memory system and the memory management unit (MMU). Thus yes, all memory (not ... |
I have a C++ application to be run on Oracle Linux OS.
Consider, I have created few objects with new operator. Though I have used delete operator to deallocate it, but the force kill command would not reach this implementation.
But, if I force kill (kill -9) the process, will the dynamically allocated memory (using ne... | Does the force kill command (kill -9) in linux cleanup the dynamically allocated memory with new operator in C++ application? |
Since the root of your virtual host is /home/user/www/site/public_html and since /home/user/www/site/public_html is a symlink to /home/user/project/public_html and since /home/user/project/public_html is a symlink to your latest release - nginX location blocks will actually search inside /home/user/releases/v1/public_... |
Our website (laravel) project directory is like this:
/home/user/project/{app,route,public_html,storage,...}
New releases are placed in:
/home/user/releases/v1
For some reason we have to link public_html directory for every release, so:
/home/user/releases/v1/public_html > /home/user/project/public_html
Nginx root... | Nginx root directory with nested symlinks |
You could use a nested query. Try something like thisSELECT elap FROM
(SELECT difference("value") as diff, elapsed("value") as elap FROM "MyMeasurement")
WHERE diff > 0If the values in "value" are always just 0 and 1, then the difference between consecutive values will either be 1 or -1. You can use this as a fil... | Just new to InfluxDB.I have a monitored IO signal that everytime it is changed then InfluxDB will record its timestamp. The data is like below:time value
---- -----
2020-03-19 06:02:50 0
2020-03-19 06:01:28 1.00
2020-03-19 03:25:58 0
2020-03-19 03:22:38 1.00
2020-03-18 ... | InfluxDB elapsed time based on a specific value |
The answer is yes, to both your questions.That is apparent from these two points from the documentation:Distinction betweenCountandScannedCount:If you used a QueryFilter in the request, then Count is the number of items returned after the filter was applied, and ScannedCount is the number of matching items before the f... | If I'm not mistaken, to perform a count of items, in DynamoDB we have to use thequeryaction and provideSelect: 'COUNT'as parameter. Let's consider that I'd like to count the number of items that have a certain partition key. Given that we have to use thequeryaction, does that mean the following?:Even though we're retur... | DynamoDB count operation capacity units consumption |
helm show values nginx bitnami/nginx | Likenginx chart, is there a way to quickly generate a list of all parameters? | How to genarate the list of all parameters in helm chart template? |
This is how I got this to work:Deleted repository on GitHub.Created a new repository with the same
name, but didnotinclude the.gitIgnoreandReadMefile recommended by
GitHub.Pushed the local repository using Xcode 5.It works perfectly now!Again: Do not include the.gitIgnoreandReadMefile from GitHub.P.S. If someone else a... | On GitHub, I have deleted my existing repository and created a new one with the same nameTest.Now, when trying to push my local repository to GitHub for the first time, I get the error message: "Working copy out of date. Try pulling from the remote to get the latest changes, then push again."And when trying to pull fro... | Xcode 5: Pushing and pulling from new GitHub repository does not work |
2
I'm not going to talk about partitioning here, as that comes down to your own requirements for ordering and I can't really infer enough information to make any educated guesses on that.
With regards to horizontally scaling your consumers / producers, I can hopefully help.... |
Consider a "dockerized" application that consumes a single kafka topic and produces on many kafka topics that are consumed by other applications, let's call these ones services.
The application queries the services by producing a message into their unique consumer topic.
The query message is composed by a header and ... | How to replicate microservices when consuming same kafka topic? |
4
Yes you can, simply use the docker cp command.
An example from the official CLI documentation :
sudo docker cp <container-id>:/etc/hosts .
Share
Improve this answer
Follow
edited May 28, 2014 at 15:23
... |
Is it possible to pull files off a docker container onto the local host?
I want to take certain directories off the docker containers I have worked on and move them to the local host on a daily basis.
Is this possible and how can it be done?
| Taking files off a docker container |
You can specify your ssl cert by adding the location right after the command line arguments--ssl-cert--ssl-keyLike so:ng serve --ssl true --ssl-cert \"./ssl/localhost.crt\" --ssl-key \"./ssl/localhost.key\"Also you can put the path to your key and certificate in your angular.json file as follows:{
"$schema": "./node... | in my project, I wanted to get a local SSL connection because of some third-party APIs so I used this--ssl truecommand in the start script .when I start my server first time after that command added topackage.jsoni saw this in my CLIGenerating SSL Certificate. I want to remove this generated .crt and .key file but I ca... | How to remove angular CLI generated SSL certificate |
I also met the same issue. I think we should change the readable permission to make sure any of the directories is readable by "all". So I tried the command: sudo chown -R $USER:admin /usr/local
and then: brew link --overwrite git It works for me, hope it will also work for you.
|
Hi I just tried installing git via homebrew on my mac - something is wrong. I had the github for mac app installed, but I tried removing that. The current git version in my system is:
Nielsk@~: $ git --version
git version 1.9.3 (Apple Git-50)
This is what happens if I try to install git via homebrew:
Nielsk@~: $ brew... | Install git via homebrew on mac osx 10.10 results in: Error: Permission denied - /usr/local/lib/perl5/site_perl/5.18.2 |
git checkout master
git merge --squash new-feature
git commit
The commit message will start out showing the entire list of commits being
merged/squashed, but you can of course edit that to be whatever you want.
|
So let's say I have a main branch, we'll call 'master'. I've made a branch, called 'new-feature'. I've made a ton of commits in this branch so I can go back in time, but I've done quite a bit of back and forth on while developing the feature so the commit log is pretty messy.
If I were to look at
git diff master..new... | Git branch diff into one new commit |
Each hstate is one huge-pagepoolfor a certain unit size and of a certain NUMA node. Each hstate is represented by one/sys/devices/system/node/node<ID>/hugepages/hugepages-<size>/directory insysfs. On normal desktops you'd usually find only one global hstate of 2MB pages and another one for 1GB pages, through the latter... | Inhugetlb_init_hstates(), it has this:for_each_hstate(h) {
if(h->order < MAX_ORDER) {
hugetlb_hstate_alloc_pages(h);
}
}Does everyhstatemean one hugepage? | What is struct hstate in hugetlb.c? |
If you're using Heroku's Github integration (where Heroku either automatically deploys a specific Github branch or you can choose a branch to deploy manually) you can disconnect your old repository and connect the new one. Navigate toDeploystab, and click theDisconnect...button inApp connected to Githubsection:Then con... | I have a fully working application with data persisted in the database but I need to change the github repository associated with it.
So I have something like:https://github.com/foo/barAnd I need to change to:https://github.com/bar/fooWithout doing anything to the application hosted and without losing data.
Is there an... | Heroku change github repository |
With the introduction offine-grained personal access tokens, make sure you have created a PAT which is not limited to one repository.Do create aclassic PAT, with arepo scope, and that PAT should allow you to push to your repository. | I created new PAT today. Repo is publicgit push
Username for 'https://github.com': MilenkoMarkovic
Password for 'https://[email protected]':
remote: Permission to MilenkoMarkovic/github-action-maven-example-start.git denied to MilenkoMarkovic.
fatal: unable to access 'https://github.com/MilenkoMarkovic/github-action-m... | Why is permisson denied(forked repo)? The requested URL returned error: 403 |
Internally SortedDictionary<TKey, TValue> uses TreeSet<KeyValuePair<TKey, TValue>>. The tree uses Node<T> and obviously it uses references between nodes, so in addition to each key and value you will have references to left and right nodes as well as some additional properties. Node<T> is a class so each instance has... |
long b = GC.GetTotalMemory(true);
SortedDictionary<int, int> sd = new SortedDictionary<int, int>();
for (int i = 0; i < 10000; i++)
{
sd.Add(i, i+1);
}
long a = GC.GetTotalMemory(true);
Console.WriteLine((a - b));
int reference = sd[10];
output (32 bit):
280108
output (64 bit):
480248
Storing th... | Why does sortedDictionary need so much overhead? |
Yes, they show up as a single commit. That's because GitHub only counts commits that end up on the default branch, and when you squash a PR, you end up with one commit on the default branch.I personally don't worry about my contribution graph, so this doesn't matter to me. However, I also don't use squash and merge, ... | I'm working on feature branches that can have over a hundred commits over the course of a week or two. I've expected to get daily marks on my contribution graph for these daily commits once my pull request is accepted, but when that pull request gets "Squashed and merged", it looks like it just shows up as a single com... | Do squashed pull requests show up in the contributions graph as a single commit? |
from io import BytesIO
client = docker.from_env()
data = client.containers.run("deep_analize/show_exploit:1.0", ['Apache 1.3.42'], detach=True)
sleep(5)
file_json = data.get_archive('/wd/out.json')
stream, stat = file_json
file_obj = BytesIO()
for i in stream:
file_obj.write(i)
file_obj.seek(0)
tar = tarfile.open... |
client = docker.from_env()
data = client.containers.run("namecontainer:1.0", ['param'],detach=True)
file_json = data.get_archive(data, '/wd/out.json')
How make it? How get file out.json? I don't understand.
| How get file from docker container in python |
echo $HOMEis being evaluated on your host because you haven't got the syntax of the switch to bash correct. It's Linux so you need single quotes.Try replacing your double quotes with single quotes.eg. This is what I get:bash-3.2$ docker run ubuntu /bin/bash -c 'echo $HOME'
/root | I've got a problem with environment variables in docker.
When I run command:$ docker run ubuntu /bin/bash -c "echo $HOME"I've got response:/Users/bylekBut when I run:$ docker run -it ubuntu /bin/bashand then:root@5e079c47affa:/# echo $HOMEI've got:/rootSecond response is correct. Why first command return $HOME value fr... | Environment variables in docker when exec docker run |
I think I should share the result of my investigations.
"Out of memory" - is what I've got from DevOps-guy, and first thing I imagine - OutOfMemoryException. So, thanks Alex for clarifying question.
In my case It was OOMKill in docker environment from underlying OS. I allocated 1G for container and restricted the java... |
I'm trying to tune some kind of hi-load application, which streaming data from one cloud to other with some preprocessing.
The specific of my application is extensive memory usage and low CPU consumption.
I monitored the app with jconsole and reached some interesting picture - cpu is loaded up to 15% and I'm still cat... | Out of memory with low CPU consumption |
There is an automatic NSAutoreleasePool in each thread and you don't have to create one instead you're creating a new thread.
Use [pool release]; instead of [pool drain] unless to have a memory leak.
For your code it's the responsibility of the method to release allocated object so add
return [bundleOfJoy autorelease... |
Say I have a class DoStuff, and that class has two methods, like so
- (NSMutableDictionary* returnToCaller) methodOne : (NSString* ) myString {
NSMutableDictionary* bundleOfJoy = [[NSMutableDictionary alloc] init];
if (myString) {
bundleOfJoy = [self methodTwo];
}
return bundleOfJoy;
}
... | Objective-C: autorelease confusion |
Resolution found, based on Jim's answer above.root /staticHas now been changed to:root /home/user/site/staticHowever then checking the logs it seems that the path nginx was trying to locate athttp://127.0.0.1/staticwas /home/user/site/static/static/ which is evidently incorrect.I'm unsure if this is the correct method ... | I'm a little rusty when it comes to the new way of static file serving with django 1.3 however I'm sure it cannot be django that is at fault here.I'm trying to run a django app with nginx + fastcgi on a cloud server with debian installed. We only have one server at the moment (while we develop) and will be looking to r... | Serving static files from nginx with django + fastcgi debian |
Try thisRewriteEngine on
RewriteCond %{REQUEST_URI} !index.php
## if the request is not for a valid file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?test=$1 [NC,L] | I have a problem, URL's have been rewritten like thisRewriteEngine on
RewriteCond %{REQUEST_URI} !index.php
RewriteRule ^(.*)$ index.php?test=$1 [NC,L]None of my images, nor css styles are being applied. I have tried<base href="/">, but it is not working.Any solutions? | .htaccess images not showing after rewriting |
I found a solution for this question. The signed url needs to be generated for cloudfront url endpoint from s3 bucket. Therefore instead ofhttps://files.customdomain.com/file123?AWSAccessKeyId=XXX&Expires=1541220685&Signature=XXXXit needs to behttps://cloudfront-url/file123?AWSAccessKeyId=XXX&Expires=1541220685&Signatu... | Following is what I'm doing. I'm generating a pre-signed URL using a custom domain for my s3 bucket resources which are not public.https://files.customdomain.com/file123?AWSAccessKeyId=XXX&Expires=1541220685&Signature=XXXXAlso to add the certificate I've created a cloudfront distribution for the bucket having following... | AWS Get Pre-Signed URL with custom domain |
You can do agit branch -avvto see ifmy-new-branchhasorigin/developas an upstream branch. That would be strange, and maybe related toorigin refspec.If you want to force the upstream branch, do a:git push -u origin my-new-branch:my-new-branchShareFollowansweredJan 19, 2016 at 16:58VonCVonC1.3m539539 gold badges4.6k4.6k s... | I have forked a foreign repository whose "main" branch is calleddevelop(instead ofmaster) and made several commits on thisdevelopbranch.Now I want to create a new branch of the initial foreign repository'sdevelopbranch (and not thedevelopbranch of the one I forked and worked on) so as to work without my previous change... | git push origin [local-branch] tries to push into remote main branch instead of creating a new one |
As per the instructionshereyou need to add the chrome repo. So changing your dockerfile to something like the following works:FROM python:3.8
WORKDIR /test
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main... | I wanted to install google-chrome-stable on pyton image in docker, but I got the following error:[7/9] RUN apt-get update && apt-get install -y google-chrome-stable:
#11 1.250 Hit:1 http://deb.debian.org/debian buster InRelease
#11 1.275 Get:2 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
#11 1.279 Ge... | Error when installing google-chrome-stable on python image in Dockerfile |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.