Response
stringlengths
15
2k
Instruction
stringlengths
37
2k
Prompt
stringlengths
14
160
Try:RewriteCond %{HTTP_HOST} ^(news\.)?mydomain\.com [NC] RewriteCond %{QUERY_STRING} ^n=(.+)$ RewriteRule ^news\.php$ http://news.mydomain.com/%1.html? [L,R=301]This will make it so if someone types:http://mydomain.com/news.php?n=100orhttp://news.mydomain.com/news.php?n=100in their browser's URL address bar, they'll g...
We used this rulesRewriteCond %{HTTP_HOST} ^mydomain\.com [NC] RewriteCond %{QUERY_STRING} ^n=(.+)$ RewriteRule ^news\.php$ http://news.mydomain.cop/news.php?n=%1 [L,R=301]for redirecthttp://mydomain.com/news.php?n=100tohttp://news.mydomain.com/news.php?n=100but we needhttp://mydomain.com/news.php?n=100andhttp://news.m...
rewrite file to subdomain
BecauseSecondsis not Mandatory for crontab expression and there might be some Special characters as belowtables.Field nameMandatory?Allowed valuesSpecial charactersSecondsNo0-59* / , -MinutesYes0-59* / , -HoursYes0-23* / , -Day of monthYes1-31* / , - L WMonthYes1-12 or JAN-DEC* / , -Day of weekYes0-6 or SUN-SAT* / , - ...
I have a feild that store crontab ,now I want to sort the tablee accordring to the crontab hour,how to write the sql? For example,the crontab field is :7 9 9 */1 * ?, 0 9 8 */1 * ?, 0 9 19 */1 * ?;I want the result is0 9 8 */1 * ?, 7 9 9 */1 * ?, 0 9 19 */1 * ?;Now I can only write the sql like this:select * from tb_...
How to get hour from crontab and sort by order when store in mysql?
Solved the issue by using correct BKS file. I learn with this issue that, don't try to solve issue only one sided, though try with all the probable solution with open mind. Even I still don't know that how to validate correct BKS file if we've .p12 and .cer files. But you must have to be correct keystore file for succe...
I've my p12 file and cer file provided by client.I've using below code as to connect with server, but having SSSLHandshakeException always:KeyStore trustStore = KeyStore.getInstance("BKS"); trustStore.load(R.raw.trustore), password.toCharArray()); SSLSocketFactory sf = new M...
javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSLhandshaketerminated:
2 The individual arguments are available as variables beginning with $arg_. For example: $arg_attribute $arg_category See this document for details. Share Improve this answer Follow answered Jul...
How to get value of both query parameters (attribute and category) in nginx? Example link: example.com/?attribute=2&category=1 My nginx code: if ($args ~ "attribute=(\d+)") { set $attribute $1; } if ($args ~ "category=(\d+)") { set $category $1; } In this way i can get only attribute value.
Right way to get value of query parameters nginx
I never did find out if Traefik could do what I wanted, but ended up solving it differently. Since one domain was only going to be accessed internally, I left that at port 443. The other domain got a different port on the server, but I had my router point 443 to that port. So if I want to access the external site inter...
I have two docker containers that need to share the HTTPS port, each with a different hostname. A Traefik container with letsencrypt seems like a good option, but here's the tricky bit: one of the containers should only allow internal access.With HTTP sites, I could just block external access to the hostname on my rout...
Traefik block external access for hostname
There's a question asking just about the same thinghere. You can read it from the CPUID if you feel like delving into some assembly. You'll have to write platform specific code for this of course.You're probably already familiar with Agner Fog'smanuals for optimizationwhich gives the cache information for many popula...
Background:I've implemented a stochastic algorithm that requires random ordering for best convergence. Doing so obviously destroys memory locality, however. I've found that by prefetching the next iteration's data, the performance drop is minimized.I can prefetchncache lines using_mm_prefetchin a simple, mostly OS+co...
How can I prefetch a memory region most easily?
In viewDidUnload typical practice is to nil, using accessors, any objects embedded in the view controller's view - buttons, views, textfields, any descendant of UIView that could be in the view hierarchy: self.myButton = nil; In dealloc you should release ALL retained variables directly, including subviews: [myButton...
for a UIViewController which methods should a "release" and set to "nil" the outlets/instance variables? That which of the methods out of "viewDidUnload" and "dealloc" should I be putting: The "release" for outlets or other member variables in the class, and The "xxx = nil" (i.e. set to nil) in
for a UIViewController which methods should a "release" and set to "nil" the outlets/instance variables?
You can use the following mod-alias based solutionRedirect /en/ http://domain.com/
I need to redirect only a folder with parameter to a new domain, for example:fromwww.domain.it/en/page/2/productstowww.domain.com/page/2/productsHow I do it?I tried this but is not working for my pourpose:RewriteCond $1 !/$ RewriteCond %{REQUEST_FILENAME}/en/ -d RewriteRule (.+) http://www.domain.com/$1/ [R=301,L]
redirect .htaccess from folder to domain with parameters
The buildkit answer is correct, except it runs everything as root which is considered a bad security practice.Here's a Dockerfile that works and uses the correct usernodeas the node Dockerfile sets up. Note the secret mount has theuidparameter set, otherwise it mounts as root which usernodecan't read. Note also the c...
I have an application which runs in a Docker container. It requires some private modules from the company's private NPM registry (Sinopia), and accessing these requires user authentication. The Dockerfile isFROM iojs:latest.I have tried:1) creating an .npmrc file in the project root, this actually makes no difference a...
docker build + private NPM (+ private docker hub)
This rule should work for you in yourDOCUMENT_ROOT/.htaccessfile:RewriteEngine On RewriteRule ^(directory)/([^/.]+)/?$ /$1/index.php?id=$2 [L,NC,QSA]Make sure there is no other.htaccessfile indirectory.
What I'm asking for is simply rewriting any URL-given sub-directiories to a PHP URL parameter for nicer looking, user friendly URL.I know that this is possible using the Apache Rewrite Engine and associated parameters. The problem on my end is that I do not want to rewrite i.emydomain.com/parameter -----------> mydomai...
Rewriting a URL to a PHP parameter from inside a subdirectory
CloudWatch metrics are a very "ephemereal" entity in AWS, they don't exist outside of their datapoints.So "importing" a metric is as simple as specifying its namespace, name, and dimensions, regardless if it already "exists" (i.e. there are datapoints with the same namespace, name, and dimensions) or not.So what you're...
The API Gateway in AWS creates the metrics 4XXError and 5XXError for different APIs in CloudWatch. I need to set alarms for these already existing metrics in CDK.I cannot find how you can import pre-existing CloudWatch metrics in CDK. Can anyone help me with how the code block would look for it?Currently, the code look...
Creating a Cloudwatch alarm on an existing Cloudwatch metric in CDK
At a guess you are using the builtin Flask development server. Such builtin development servers in Flask and Django, or anything based on the web server or WSGI server in the standard library are not intended for production systems and don't normally handle shutdown on signals properly.As such, you should really use a ...
I'm trying to write aFlaskapp that behaves correctly when running inKubernetes, especially when it comes tograceful shutdown.As such, I need to have the code:recieve the shutdown signalstart the "shutdown timer"continue serving requests as normal until the time is "up"then shut itself downSo far, what I've got is this:...
How to run a background timer in Flask
The following worked for me on an OSX mavericks 1.9.2 machine (after I got my github ssh clone stuff working) I did this:git clone[email protected]:andxyz/sublime-text-2-configs.git ~/temp-sublime-text-2-configs mv ~/temp-sublime-text-2-configs/.git ~/Library/Application\ Support/Sublime\ Text\ 2/.git rm -rf ~/temp-sub...
I have my current sublime-text-2 "Packages/User" folder in a git repo (on github)How do I clone it into an existing folder "Application Support/Sublime Text 2" now that I am on a new computer?Here is the repo:http://github.com/andxyz/sublime-text-2-configsHere is the existing folder on the new computer:cd /Users/andxyz...
How do I clone my git repo of sublime-text-2 settings to another computer
will not adding anything be fine?No, you need to specify the private key in a.ssh/configfile (and I would put the full path of the key instead of relying on~)Ifssh -T[email protected]works without, checkwhereopenssh finds its key withssh -Tv[email protected]: by default, it is~/.ssh/id_rsa.
I will explain this issue as a story, so that as much detail can be provided as possible.A (devops) user has generated 2 SSH keypairs:/user/.ssh/serverkey /user/.ssh/serverkey.pub/user/.ssh/github /user/.ssh/github.pubThis user works with 100s of different servers and they have automated that when spinning up a new ser...
SSH agent-forwarding on multiple servers
Basically, ingress-nginx-controllerdrops any request headers that contains "_"in them. You can find various threads which discuss this issue like,Why HTTP servers forbid underscores in HTTP header namesSo, I just enabled ingress controller to pass such request headers. This can be done by adding following entry to conf...
I am working on a kubernetes cluster and problem faced is:From UI/browser, I can see it is sending a request header called "request_id" please refer to image:But while checking on backend it is unavailable. While searching through internet, I could see that people are talking about adding following entry toIngressobjec...
kubernetes ingress controller not forwarding request headers
long enoughis ~14 days.I've gone through every mention of inactive & idle in the AWS Lambda docs.The blog post you have linked mentions'long enough':A function transitions to the Inactive state when it has been idlelong enoughfor the Lambda service to reclaim the external resources that were configured for it.TheLambda...
FollowingthisAWS blog, I can see thatA function transitions to theInactivestate when it has been idlelong enoughfor the Lambda service to reclaim the external resources that were configured for it.So what islong enough? I have Lambda functions deployed in a VPC that may be idle for weeks or months, and I'd like to avoi...
How long before idle Lambda function transitions to Inactive state?
ThePublic Suffix Listindicates lists of top level and second level domains under which one can register a domain name. If a name has exactly one more level beyond its matching entry on this list, then it's what you are looking for.(Note that "subdomains" as you call them can be DNS zones in their own right and have ind...
I'm trying to write a script where part of its functionality depends on if a user-provided domain is a zone apex (example.com) or not (www.example.com). What is a robust way to determine if I'm dealing with a zone apex or a subdomain? I'm hoping for a purely pattern-based approach but that seems tricky (example: xx.yy....
Determine if domain is zone apex or subdomain
If your "numbers" are simple-enough ones (signed or unsigned integers of up to 4 bytes each, or floats of 4 or 8 bytes each), I recommend the standard libraryarraymodule as the best way to keep a few millions of them in memory (the "tip" of your "virtual array") with a binary file (open for binary R/W) backing the rest...
If I have a list(or array, dictionary....) in python that could exceed the available memory address space, (32 bit python) what are the options and there relative speeds? (other than not making a list that large) The listcouldexceed the memory but I have no way of knowing before hand. Once it starts exceeding 75% I wou...
Alternatives to keeping large lists in memory (python)
0 I might be wrong, but this sounds like an use-case where dynamic route and getStaticPaths and getStaticProps could work for you. getStaticPaths would check the existing files and make routes for them, and getStaticProps would fetch the required post when needed. On export...
I want to make a simple static blog site, and when I export my pages, everything is good and fast. But in dev mode, my post generation is slow and I want to cache it, so that it is done only once. This is done in a post.ts file and my cache is const posts: Post[] = [] . What I expect is that after typing yarn dev, the...
NextJS Using a memory cache in dev does not work
Movedocker-compose.ymlto a short folder path (for example,D:\).
I usehttps://github.com/bitnami/bitnami-docker-kafka. Filedocker-compose.ymlon Windows 10 pro x64, with Docker for Windows 4.8.2 (79419)version: "2" services: zookeeper: image: docker.io/bitnami/zookeeper:3.8 ports: - "2181:2181" volumes: - "zookeeper_data:/bitnami" environment: - A...
java.io.IOException: Len error. A message from /172.19.0.1:36208 with advertised length of 1195725856 is either a malformed
if you list the pods in kube-system namespace, you can see the pods. The pod's names will be started with weave-net-xxxxx. Since it is Deamonset object, the pod's count will be based on your k8s nodes. Actually one pod will be created for one node.kubectl get pods -n kube-system
Suppose, I just installed one of the Kubernetes CNI plugins, for exampleweave-net:kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"How can I view or list the installed CNI plugins?After installing how do I know that it is running? Or if Ikubectl deletethe plugin,...
kubernetes: How to view or list the installed CNI addons?
Check if Git is installed in a folder with spaces or special character. Try and unzip a recent Git (like PortableGit-2.3.7.1-dev-preview-64-bit.7z.exe) under C:\Git, and add that to your PATH: set PATH=C:\Git\cmd;%PATH% bundle install The PATH issue was mentioned before in issue 5027 and in "Can't run bundle update o...
I have set up my github account, configured it with SSH and now I am trying to retrieve group work from gitlab. I have managed to pull the work so that it is on my machine but when I go to bundle install I encounter an error. It says that I need to install git in order to gems from git repository. I've added an image ...
Git problems, 'git not installed'
That depends on how you want to handle ownership and if a partition is going to have value semantics. Think about what should happen if you copy a partition: Is the copy of the partition going to share the modules with the original. Are changes in a module to be shared between the partitions? If yes, you should use a...
I have an abstract module class that specific modules derive from. At runtime, I parse a config file and determine the specific module type of each module within the config file: std::vector<module*> modules; module *temp; //Let nm be the result of parsing as a std::string if(nm == "type1") { temp = new module_1...
Deleting a vector of pointers passed to a class
I think what you need is the Core Foundation Memory Management Guide. According to the linked document, you own both of those objects. Here's an example that uses both of your functions. See how the objects are released with CFRelease() at the end.
I'm using this piece of code in my app: ABAddressBookRef addressBook = ABAddressBookCreate(); NSArray *contacts = (NSArray*) ABAddressBookCopyArrayOfAllPeople(addressBook); Am I responsible for releasing both addressBook and contacts? I've found nothing on the documentation about that... Thanks
Memory management with ABAddressBook
I foundoffsetis the correct keyword.Query like this:sum(vss_device_number) - sum(vss_device_number offset 1d)Will return difference between now and yesterday.Docs.
I have a Prometheus metric calleddevice_number. What I want is to show the difference in value between now and one day/week/month etc ago. Which means subtracting two values with two different timestamps. Checking around I don't find any useful documentation on how to do it.Something I would do, but doesn't work is:sum...
Get delta between two custom timestamps in Prometheus
Try usingCMD ["/usr/sbin/httpd", "-DFOREGROUND"].You also can run :docker run -d <image name> /usr/sbin/httpd -DFOREGROUND
I'm building a Docker container and in this container I am downloading the Apache service. Is it possible to automatically start the Apache service at some point? Systemctl start httpd does not work inside of the Dockerfile.Basically, I want the apache service to be started when the docker container is started.FROM c...
Starting a service inside of a Dockerfile
how do I use this function within my Activity?Well, as the function ispublic staticsimply:className.getAssetImage(this, yourDrawableName);without creating aninstanceof the classclassName (Utils)ex:Drawable mDrawable = Utils.getAssetImage(this, "my_drawable_image_name");wheremDrawableis theDrawableimage returned.
I'm usingthisanswer to help solve my out of memory issue. The solution was to move all the drawables to a new drawable folder inside the assets folder and use this functionpublic static Drawable getAssetImage(Context context, String filename) throws IOException { AssetManager assets = context.getResources().get...
Android Out of Memory error
It turns out that Nginx won't pass on headers that have underscores in them by default. You could replace your custom headers' underscores with hyphens as others have done, or you could update your nginx.conf file and set: underscores_in_headers on Now your headers will appear in the $_SERVER superglobal with the HTT...
I'm trying to convert my PHP web application (a RESTful API) from Apache to Nginx. It's working fine in Apache, but the codebase currently uses the apache_request_headers() method in order to retrieve the custom headers that we use for authentication. An example header is auth_system_signature. I had hoped it would be...
PHP - Get Custom Headers when Using Nginx with php-fpm
I have a similar setup. I have all my configuration (e.g. the.vimrc,.zshrcetc.) in a git repo.On the machines I use symlinks to link to the configs in the repo.For example, I have my config repo cloned to~/configs, which it contains a filevimrc. The~/.vimrcfile is a symlink to the config file:/home/toydarian/.vimrc -> ...
Recently I've created a bare git repository so i can backup my configuration files (dotfiles) which are located in many places, some under the root directory.The idea was to have a repo on github so I can store the files there and update them from any computer (such as a Windows laptop I use at work).Now I have the rep...
cloning bare git repository and tracking files in other locations
AddingRedirectMatch 301 ^(.+?)\.htm$ $1.phpinto your .htaccess file should be fine if you're running Apache.However, if you're using nginx for example, you cannot use .htaccess files.(If you're using nginx, try taking a a readhere.)ShareFollowansweredJul 9, 2015 at 10:51Daniel DewhurstDaniel Dewhurst2,56322 gold badges...
I am ready to launch a new version of an existing site which currently has all .htm files and the new files will be exactly the same name but with a .php extension - is updating the htaccess file with:RedirectMatch 301 (.*)\.htm$ $1.phpstill the best way to redirect all of these files?I have never done this through the...
htaccess file still best way to redirect .htm to .php version of file?
I think you have misunderstood what the RUN --mount=type=bind... syntax is for. From the documentation: This mount type allows binding directories (read-only) in the context or in an image to the build container. In other words, this does not permit you to access arbitrary host directories in the build stage. It is ...
I want to make a folder on my host machine available during a RUN statement. That is, similar to the effect of a container run with -v: docker run -v /path/on/host:/path/in/container mycontainer:tag In the container this gives me /path/in/container with all files/folder in path/on/host. To this end I am trying the ex...
Docker run --mount make all files available in a different folder during RUN
Yes.go getclones the repository (as well as any submodules in the vendor directory if GO15VENDOREXPERIMENT is enabled.) Since the repository is being cloned, it will count in the traffic as cloning.ShareFollowansweredJan 25, 2016 at 0:44driusandriusan54033 silver badges99 bronze badgesAdd a comment|
When a user installs a Go package with the command:go get github.com/username/repositoryname/packagenameis this counted in the GitHub traffic as cloning?I have a new Go repository and my GitHub account counted several clones. However I installed my own package as a test with the go get command a few times. Is this also...
Is installing a Go package with 'go get' counted as cloning at GitHub?
2 A SqlCommand has a CommandTimeout value of 30 seconds by default. If the operation specified does not complete in that time period, an exception is thrown. If your operation requires more than 30 seconds to complete, set the CommandTimeout to a greater value. The time to ...
I have written some codes in vb.net to backup a database in local computer. In many computers it work without problem. but in a specific computer I encounter with this error :*"Timeout expired. The timeout elapsed prior to completion of the operation or the server is not responding The backup or restore was aborted." ...
Backup Sql server Database with vb.net
Coverage = (CT + CF + LC)/(2*B + EL)Where CT+CF=conditions_to_cover - uncovered_conditions 2*B=conditions_to_cover LC=lines_to_cover - uncovered_lines EL=lines_to_coverSo it can be computed out of existing metrics.ShareFollowansweredMar 14, 2018 at 9:52Cross2004Cross200495111 gold badge77 silver badges1212 bro...
I am in situation where I want more precision than just 1 decimal place for code_coverage metric.I saw that this is stored in sonar_qube in a table called metrics under decimal_scale.If I set this to more than 1, when restarting sonarqube it gets reseted to default, that is 1.Is there a way to change this? I want to ha...
Code_coverage sonarqube decimal scale
The AWS Documentation has it documentedhereThis question was also answeredhere
I have GitLab runner running on AWS and I've connected it to my GitLab Project. During on CI/CD Pipeline I want to run End to End test on my React Native mobile usingreactnativecommunity/react-native-androidimage. But when want to create SDK the job fail and display errorNo space left on device. However when I rundf -h...
How to Increase Disk Space GitLab Runner
This is what Terraformdata sourcesare for. If your Terraform module is getting a security group name as a variable, then you would look up the security group like this:data "aws_security_group" "lb_sg" { name = var.security_group_name }Then you could use the data source when creating your ALB, like this:security_grou...
I am trying to write a generic script in terraform to create ALB (in AWS). The security groups are created (sg_alb) but not in the same script. It is pre-created I want to extract the id of the security group and pass it security_groups = ["${aws_security_group.lb_sg.id}"]I have seen examples where the above referen...
Extract security group id from security group name in terraform
A possible approach here would be to have your "physical" file generated only when it is on the remote server. You could use environment variables for this; You would read them into variables:# database.php $user = getenv('DB_USER'); $password = getenv('DB_PASSWORD');When you deploy your application to your servers, yo...
Let's say my remote project has a file,database.php, with database connection info as an array.I want to include the file in my repo, but redact its contents. You could say I want the physical file (the shell) to be in the repo but not the content.The idea then would be that developers who clone my repo (to work on it ...
Contain shell of a file but redacted contents?
Imho the question should rather be : What is the element pointer/id is about ?As WebElement doesn't have a state, only methods that call browser. @CacheLookup is only a shortcut forpublic WebElement el = driver.findElement(By);when initializing WebDriver's PageObject, for instance.After you have the instance, you are e...
I'm not sure that I understand the caching principle :@CacheLookup @FindBy(how = How.ID, using = namespace + signifLvl) private WebElement sigLvl;If we use this Annotation way, ElementLocator is being used and the first time one refer to the field, the element is founddriver.findElement(by)and cached via ElementLocato...
How does @CacheLookup work in WebDriver?
I went ahead and wrote a caching solution for private use that stored the data in a shared object. This wasn't really query caching, it stores specific results instead of raw sql results ordered by hashes, but it kept what I needed in memory and was ridiculously easy to write.Since I originally asked this question a nu...
Is there an implementation of database (mysql) query caching written purely in Node.js?I'm writing a Node web app and was planning on caching queries with memcached, but while considering this I realised it's probably possible to do the caching through a separate Node.js layer insteadTo explain:You could query the data...
Caching database queries with Node.js
They actually just published a post about tracking down memory leaks on the Android Developer blog a couple hours ago:http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+blogspot%2FhsDu+%28Android+Developers+Blog%29ShareFollowanswere...
I've built a simple android program. The program uses an SQL database and has a lot of pictures.When I check how much RAM my application takes, I see that it uses 4.5M the first time I launch it, and grows by something like 1M every time I exit it via the back or the the home button, and re-enter it.My question is- is ...
My Android Application Take Too Much Memory?
5 python3 --version solution found. you might have selected python3.8/python3.7 as your runtime for the app. The error occurs when there is mismatching the python version of your system. check python version: python3 --version and use the same runtime of app as same as ...
I am following this tutorial to build a SAM App: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-getting-started-hello-world.html When i did sam build, I got following error ❯ sam build Building codeuri: hello_world/ runtime: python3.8 metadata: {} functions: ['HelloWorldFunct...
Python is not configured for aws sam cli
You should avoid that approach, as it would make it a recursive call. Instead you should check the cause in the failure function first and then retry. Also fix the number of retry times.
Am doing my project using retrofit2. When my Call goes on failure i repeat same call again.Repeation of this call made my app to force close. When i look on log i got error log, which is given below. I felt this is caused by multiple enqueue to same Call. So i did that before enqueus i called cancel. But its not worki...
Multiple enqueue in retrofit causing out of memory error?
9 if the changes is only in docker-compose but not Dockerfile, then you do not need to re-build the image , however you need to make sure that compose is aware of the changes. From the Docs using docker-compiose restart: If you make changes to your docker-compose.yml confi...
I have my containers running with docker-compose.yml configuration. After that, if I updated my docker-compose.yml file, do I need to rebuild the image or is it fine just restart the containers to have the updated configuration being applied?
update docker-compose, do I need to re-build image
Git is a project based version control system. This means that when you commit your work in Git, you generally commit every file in the repository. So there is no distinction between your two folders with regard to this. Note that this differs from a VCS tool like Perforce or CVS, where you could version just one o...
Following is the exact scenario: Master branch in git repository is having two folders: Project A Project B I have done some major changes in Project B, whereas Project A is completely untouched. Now, I dont want to commit and push the changes in Project B at this stage, because it is waiting for the review, and the...
How do I shelve my changes of one particular folder in Git repository?
No, there is no "intrinsic" way of knowing that (e.g.)zap.co.itis a subdomain (because Italy's registrar DOES sell domains such asco.it) whilezap.co.ukisn't(because the UK's registrar DOESN'T sell domains such asco.uk, but only likezap.co.uk).You'll just have to use an auxiliary table (or online source) to tell you whi...
how would you extract the domain name from a URL, excluding any subdomains?My initial simplistic attempt was:'.'.join(urlparse.urlparse(url).netloc.split('.')[-2:])This works forhttp://www.foo.com, but nothttp://www.foo.com.au. Is there a way to do this properly without using special knowledge about valid TLDs (Top Lev...
How to extract top-level domain name (TLD) from URL
It should be https and you can check it out by looking at the config file in the local .git folder. Look out for: [remote "origin"] url = https://foo.bar.git EDIT: As it's written in the source code http_fetch () { # $1 = Remote, $2 = Local curl -nsfL $curl_extra_args "$1" >"$2" I expect curl to only follow th...
I have set up nginx to redirect HTTP traffic to HTTPS like this: server { listen 80; server_name git.mydomain.it; return 301 https://$host$request_uri; } I can successfully connect via HTTPS and HTTP. When I do git clone http://git.mydomain.it/oznt/tracker.git I am being prompted with the correct UR...
Understanding NGINX HTTP to HTTPS redirect
Create aCollectorimplementation that conditionally emits the metric:var counter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "success_count", Help: "The number of API count success. ", }) func main() { prometheus.MustRegister(counterExporter{}) } type counterExporter struct{} func (e counterExpo...
I need to implement counter metrices on conditional basis. While implementing the counters facing issue when the condition changes. likePseudo Code:counter =prometheus.NewCounter(prometheus.CounterOpts{ Name: "success_count", Help: "The number of API count success. ", }) // On Init defaultRegistry := prometheus...
Not getting counter metric after unregister and register again in prometheous
I came across this question yesterday and decided to refactor a solution that has been implemented in one of my projects, and came up with a GitHub Action for this: https://github.com/marketplace/actions/validate-issues-over-pull-requests You can create a new workflow with the following content: name: PR has a valid I...
I would like a workflow to trigger on an Issue once it is linked to a PR but it doesn't seem like this option is provided by github. Does anyone have a workaround for this?
How to trigger Github workflows on 'link Issue to PR'?
For the elasticsearch.client, you can use http-aws-es for connectionClass and amazonES with keys.var client = new elasticsearch.Client({ hosts: config.elasticsearch.host, connectionClass: require('http-aws-es'), amazonES: { region: config.aws.region, accessKey: config.aws.key, secret...
I'm using theAWS Elasticsearchservice and would like to connect viaelasticsearch.js, but a port is required.It looks like AWS only offers theREST API(e.g. via curl), running on port 80. My cluster is up and I can access via the browser, but not via elasticsearch.js.This example doesn't work for me:var elasticsearch = r...
How to connect to AWS Elasticsearch using the Elasticsearch JavaScript SDK?
1 Please see the issue I opened on both Docker and OpenSSH specifically dealing with this issue showing a full video reproduction of the issue, and the workaround including all the versions I tested: https://github.com/docker/machine/issues/4483 https://github.com/PowerShel...
On Windows x64, using Docker Toolbox and VirtualBox 6, when trying to create a new machine, it hangs for a long time at the "Waiting for an IP..." point, eventually timing out with this message: Error creating machine: Error in driver during machine creation: Too many retries waiting for SSH to be available. Last er...
Docker: Timeout waiting for an IP
TheOrigin Pathsetting is applied to the requestafterthe cache is checked... not before. When the object requested in the URI is not in the cache, the object is requested from the Origin server. At that point, Origin Path is prepended to the incoming request path, then sent to the origin. Caching is based on theincomi...
We have a static site hosted in S3 and delivered with CloudFront. The site works but rolling out updates takes quite long -- hours or longer. Specifically, changing theOrigin Pathis not reflected on edge locations nearly as quickly as desired.Here is what we are trying to achieve...Our S3 bucket is configured to host a...
Changing "Origin Path" in CloudFront takes very long to kick in
You can make this work very simply. Create a small AppEngine application that answers a URL that will be called by the AE cron. That request handler can use theURL Fetch APIto call your external URL. Atinylittle bit of extra work, but you will accomplish your goal.Seethis questionfor more information and practical exam...
I try to use GAE for a cron job. But I get a server error 500. Is it because I try to cron on a external url? I cannot find any documentation on this. When I use an internal URL it works fine. But I would like to cron job a php script on my website.Is there another way to do this? I am quite noob...Thanks for any help ...
Google App Engine (GAE) cron on external url: http
You can persist the state of downloaded & precompiled packages by mounting a dedicated volume into/home/your_user/.juliainside the container:$ docker run --mount source=dot-julia,target=/home/your_user/.julia [OTHER_OPTIONS]Depending on how (and by which user) julia is run inside the container, you might have to adjust...
I'm running Julia on the raspberry pi 4. For what I'm doing, I need Julia 1.5 and thankfully there is a docker image of it here:https://github.com/Julia-Embedded/jlcrossMy challenge is that, because this is a work-in-progress development I find myself adding packages here and there as I work. What is the best way to ...
how should I persistently save Julia packages in a Docker container
You don't actually need to copy the data, rather making use of same volume should work. You need to share a named volume between the two containers. Your docker-compose.yaml should be: version: "3" services: nginx-server: image: nginx_server:dev container_name: nginx | | volumes: - .:/r...
Now I am developing a React application. For the deployment I want to use nginx as the web server. I have written a docker-compose file with two services (One for React app and another for nginx webserver). Usually nginx service needs only the 'build' folder from the react project. Now my question is how can I copy th...
How to copy some data from one container to another container by docker-compose.yml
RewriteRule ^data-([2-9]|[1-9]\d+)/?$ index.php?page=data&var=$1 [NC,L]
I'm trying to create a rewrite rule to match data-2, data-3, data-4 etc. and send them to data.php?var=2. It needs to ignore data-1.RewriteRule ^data-([2-9])/?$ index.php?page=data&var=$1 [NC,L]The above rule works for numbers 2-9, but how can I make it so that it works for any number greater than 1?
htaccess regex for number greater than 1?
This will clean out any missing refs:git for-each-ref --format="%(refname)" | while read ref; do git show-ref --quiet --verify $ref 2>/dev/null || git update-ref -d $ref done
I have a fork of a Git repo and my clone appears to have an issue with an old, no longer existant, branch. I keep seeing this message:error: refs/heads/t_1140 does not point to a valid object!I don't have any other messages and the repo works fine. There's no operation that stops me from working on other branches, push...
Getting rid of '... does not point to a valid object' for an old git branch
I actually found a better way to do this using Git SubTree Merge. That works much better than submodules, since I do want to be able to:have the local (merged) files therebe able to make changes to thenhave the full history of the original repositories.Here are more details about Git's subtree merge:http://help.github...
I know that current Git submodules are not supported by AppHarbor (as perthis support ticketand I just did a quick test that confirmed it)BUT, is there another way?I currently have aGitHub repositorythat I want to use as my submodule's remote master, and I need to create a number of other GitHub repositories that use t...
Using SubModules on AppHarbor
In PySpark there is a method you can use to either get the current session by name if it already exists or create a new one if it does not exist. In your scenario it sounds like Databricks has the session already created (so the get or create would just get the session) and in sonarqube it sounds like the session is no...
We run our code on Databricks where SparkSession and SparkContext are defined in the backend of the platform. However, when our code is analysed by Sonarqube, we keep having these false positive bugs. Then we need to manually flag as a false positive. How can that be overcome? Not sure if in Sonarqube side or in the co...
Sonarqube: spark is not defined. Change its name or define it before using it
I cut a ticket with GitHub for the same issue. They have confirmed it to be a bug with their renderer. You can verify it's the same problem by checking the raw notebook file for an output block. If text is there but not rendered, GitHub say they have a few reports of the problem and are working on a fix.
I am using VsCode to write my .ipynb codes, and GitHub Desktop to push the files to repositories in GitHub.When opening the code file in VsCode I can see both input and output cells. Meanwhile after pushing the files to GitHub I can see all input cells and some output cells only when they contain figures or tables, oth...
GitHub is not showing output cells from .ipynb files
For some reason this worked for me under Big Sur (but not providing the full path to osascript only):* * * * * * /usr/bin/bash; osascript -e 'display dialog "Kilroy was here!"'ShareFollowansweredDec 18, 2020 at 0:03P-DP-D1111 bronze badge4It turned out that prefix command with /bin/zsh; works as well AND EVEN JUST SEMI...
How can I display osascript dialog with crontab? I could simply execute"""osascript -e 'display dialog "displaying content" ' """with pythonos.systemin terminal, and the dialog bar will show, which means theos.systemproperly executed theosascript command. and I can execute the crontab command like32 10 * * * mkdir /p...
couldn't display osascript dialog with crontab
+50Ok, as a quick check, you could try a regex like the following for Apache:RewriteRule ^/([0-9]+)\.html$ https://www.example.com?p=$1 [L,R=301]And something like this for Nginx:rewrite ^/([0-9]+)\.html$ https://www.example.com?p=$1 permanent;This should match any page composed of digits0-9and.html.The rule you posted...
I have one problem about the redirecting I want to make redirect to example.com/12321.html to example.com?p=12321.I was user before url typle like first number things after this i change my system to seo url with content name to url. Now i guest best system to redirect to ?p=What I TryFirst i try to change that on .hta...
Nginx - Wordpress redirect to default url
I think the issue lies in the html.Your current html may have something like<a href="/upload">upload</a>Making all the links "relative" should solve your problem<a href="./upload">upload</a>Links starting with/will be relative to the domain, while links starting with./will be relative to the current directory (nodeAdmi...
I am new to nodejs and nginx as well. So what I am trying to do is reverse-proxy node in nginx. I am able to do so but my subsequent routes from nodejs doesn't get reverse-proxied.app.get('/', (req, res) => { res.render('index'); }); app.post('/upload', (req, res) => { upload(req, res, (err) => { conso...
How to appropriately reverse-proxy nodejs subroutes?
Update: this answer is no longer relevant - was for 2016 TP5. AD support has been added in later releasesOriginal answerQuick answer - no, containers are not supported as part of AD so you can't use AD accounts to run processes within a container or authenticate with itThis used to be mentioned on the MS Containers sit...
So I have Windows Server 2016 TP5 and I'm playing around with the containers. I am able to do basic docker tasks fine. I'm trying to figure out how to containerize some of our IIS-hosted web applications.Thing is, we usually use integrated authentication for the DB and use domain service accounts for the app pool. I cu...
Active directory accounts inside a windows container (server 2016 TP5)
After few hours of debugging we figured out that the issue was in "tcp offloading". On VMs virtual NIC does not support offloading so everything worked fine. On BMs we had to issuesudo ethtool -K <interface> tx off rx offto disable offloading and that fixed the issue.
Looking for a peice of advice on troubleshooting an issue with Rancher + Calico on a bare metal Ubuntu 20.04.Here is the issue. We have few Rancher (2.5.7) clusters built on top of Ubuntu 20.04 running on KVM(Proxmox) VMs. All clusters have similar setup and use Calico as CNI. Everything works like a charm.The other da...
Q: Rancher + Calico + Ununtu 20.04 bare metal - no access to service network (10.43.0.10)
You can't, Github actually means you want to share something with the community, or you are showcasing your work in the open source community. Unfortunately you cannot restrict the users from downloading your content from your Repository.Alternatively what you can do Just make your Repository private. But then in this ...
Is there any way todisableviewers to download my files from github? I want to show my work, but I am afraid anybody can steal my code.
Disable zip downloads from github
+150You shouldn't consider this a production environment. The guides are examples, often for lab environments, and testing scenarios with the application. I would not consider them production ready, and compose is often not considered a production grade tool since everything it does is to a single docker node, where in...
There are a lot of articles online about running an Elasticsearch multi-node cluster using docker-compose, includingthe official documentation for Elasticsearch 8.0. However, I cannot find a reason why you would set up multiple nodes on the same docker host. Is this the recommended setup for a production environment? O...
Why should I run multiple elasticsearch nodes on a single docker host?
Set theexpires headerin your web server to some far away date.ShareFollowansweredMay 11, 2009 at 21:35BjornBjorn70.3k3939 gold badges137137 silver badges164164 bronze badges14For what it's worth, "Cache-Control: max-age=#" is the newer snazzier version of Expires, but either will work. Seew3.org/Protocols/rfc2616/rfc26...
The web application I'm working on serves up images with URLs like /image?name=a.gif. Pages are loading slowly partly because browsers are not caching the images.Is there any combination of http headers that will persuade IE to cache the images even though the URL has a query string in it? I'm trying to avoid the brows...
Caching from URLs with a query string
I believe eden space is always used for small objects, and very large objects are allocated directly in old space. If new objects were allocated in the survivor space, it would kinda defeat the point of having separate spaces. See this PDF for more details, including: Most objects are initially allocated in Eden. (...
are the new objets assigned from eden space or eden + fromSurvivor space ? can free space in from survivor space be also used for allocation to new objects? EDIT : consider the scenario: suppose Eden space is full and from survivor space occupancy is less, then in that case if new object is created (new object is sm...
are the new objects assigned from eden space or eden + fromSurvivor space?
You will want to check that the installed language plugins are the same between the server instances. I see mainly 2 possible reasons to the issue you describe:one language plugin is only installed on the source serverthe version of a language plugin is newer on the source server than on the destination one
I face an issue, if you can guide me please,I have exported a QualityProfile "Sonar way" from an instance SonarQube Version 6.5 (build 27846) - LGPL v3 to be imported in the same version.The problem is, when i want to import it, it ignore some rules,i search in the changelog to find why, is it blocked by the new instan...
Same profile SonarQube ignore some rules in the new instance
It is impossible to have a generic solution for this problem: you must coordinate all the parties yourself.The common solution is to issue a new secret and let all the participants to accept both.Then after some time to stop issuing the old version and remove it from everywhere.
In my k8s cluster I have two deployments: one for generating JWTs using a given key-pair and another one for validating JWTs using the same key-pair.Both deployments using the same k8s secret which contains the key/pair.When I want to revoke/update that key pair, how do I create consistency between the deployments? Pra...
K8S synchronization between deployments which use the same secret
The partition key is used for partitioning the data. Data with the same partition key is stored together, which allows you to query data with the same partition key in 1 query. The (optional) sort key determines the order of how data with the same partition key is stored. Using a clever sort key allows you to query ma...
With contrast to primary key, composite key and candidate key, what is a partition key and a sort key in dynamodb?
What is the difference between partition key and sort key in amazon dynamodb?
No you can't. You will need a Linux to launch Linux containers and a Windows Server 2016 to launch Windows containersI said inRun normal Win32 applications in Docker for Windowsif you have Windows Server 2016, you will be able to launch Windows containers (and you will need a Linux server to launch Linux containers).Se...
I'm usingDocker Desktop for Windowswith the new feature of Windows Containers now Windows-based containers are possible but it raised this question?Can I mixlinux-basedandwindows-basedimages in same docker engine host? If yes, are going to work all network features? Is this independent of the host OS for the user?
Can I mix linux-based and windows-based containers in same docker engine host?
This is more of a toss-up or opinion in terms of how you want to design your whole architecture. Here are some things to consider:Same cluster:ProsWorkloads don't need to go to a different podCidr to get its data.You can optimize your resources in the same set of servers.This is one of the main reasons people use conta...
Does it make sense to create a separateKubernetescluster for myCassandrainstances and one cluster for theapplication layer? Is the DB cluster accessible from the service cluster when both are in the same region and zone?Or is it better to have one cluster with different pools - one pool for the service layer and one po...
Kubernetes cluster architecture
This is how I resolved it. NorthScale was not throwing any error when the serialization failed. I serialized my domain object with Binary Serialization and was able to find out which classes were failing (since they were not marked as [Serializable]). Fixed it and it worked Seeing the results of protobuf-net I am thin...
I have this huge domain object(say parent) which contains other domain objects. It takes a lot of time to "create" this parent object by querying a DB (OK we are optimizing the DB). So we decided to cache it using memcached (with northscale to be specific) So I have gone through my code and marked all the classes (I t...
Serialization for memcached
You mentioned that you already used git add ., git add . Here are 2 options why it's not working This command adds all your files inside the current directory, so you might not be in the root folder If you are using an older version of git <2, git add -A is the equivalent to git add . Empty directories Git will no...
I have a local repo on my machine, and when I try to push it to my remote repo on GitHub, only external files show up. The directory in my computer was like this: However, it showed up like this on GitHub: Only the hello.py file was added. I ran the following on my terminal: git init git remote add origin {repourl} ...
Git not pushing folders to GitHub, only files outside folders
Default controller is what loads when there are no url segments present - that's it.If you want/accountsto load thetestcontroller andaccountsmethod, you'll have to use aroutelike this:$route['accounts'] = 'test/accounts';Otherwise you'll have to have an accounts controller or access it through/test/accounts/
I am trying to get this URL to work on a codeigniter installation, just installed the newest version today (2.0.2):http://mydomain.com/pete/ci_test/accountsSo I have set my default controller in routes.php to test.php, and inside my controller, test.php I have this code:class test extends CI_Controller { public functi...
CodeIgniter Setup Question
I think it is far more efficient to do an array allocation of cats, and when they are freed, place them in a free list. struct CatPool { size_t poolSize_; size_t i_; cat *pool_; cat *free_; typedef std::unique_ptr<cat[]> PoolPtr; std::list<PoolPtr> cleanup_; CatPool (size_t pool_size) : po...
I have a couple different objects that allocate certain objects to communicate with each other and I decided to give them each a locally managed memory pool where a node can be tagged as free merely by setting a flag within it. The idea is like this: struct cat {/**couple data fields*/}; struct rat { rat() : pool...
Is there a faster way or optimization I can apply to my improvised memory pool?
dnsjava was the solution for me (http://www.dnsjava.org/)def lookup(host: String, nameServer: String): Array[String] = { val l = new Lookup(host) l.setResolver(new SimpleResolver(nameServer)) l.run() if (l.getResult() == Lookup.SUCCESSFUL) l.getAnswers().map(_.rdataToString()) else Array.empty[String]...
Given a hostname like "example.com" I want to get its IP-addreses using specific nameserver.java.net.InetAddress hasprivate static InetAddress getByName(String host, InetAddress reqAddr)which looks like what I need, but the blooper is that method is private.https://github.com/gilt/scala-srv-dnshasdef lookup(serviceName...
Scala or java lib to resolve host name with specific nameserver
Docker provisioner help to prepare environment: build and pull images, run containers if you need multiple containers running for your vagrant machine. Docker provider is running vagrant machine in docker container (instead of VM/cloud as other providers do). On Linux vagrant is using docker from the host OS. On Windo...
Can anybody explain to me the difference? Provisioner - is something doing provision - in docker installing, running, pulling containers. Provider - is something that runs the VM. I.e. VBox runs the ubuntu OS image. How can be Docker a provider? It runs directly some docker image? If I'm on windows there must some hi...
Vagrant - Docker provider vs. docker provisioner
Yes: this is described in the githooks documentation (which needs some work): ... where <old-value> is the old object name stored in the ref, <new-value> is the new object name to be stored in the ref and <ref-name> is the full name of the ref. When creating a new ref, <old-value> is the all-zeroes object name. The ...
I want to trigger a Jenkins job after a new branch has been created and then populated via a push. For example I would do something like this: git checkout -b jdd_debug_branch_create_a git push --set-upstream origin jdd_debug_branch_create_a On the Jenkins server I see the following json snippet being delivered via a...
How do I detect when the first push to new branch is completed via a GitHub webhook?
In my.git/configi have to changeurl =[email protected]:UserB/ProjectB.gittourl =[email protected]:UserB/ProjectB.gitWhere UserB is in/root/.ssh/configHost github.com-UserBhttp://www.freshblurbs.com/blog/2013/06/22/github-multiple-ssh-keys.html
I have two accounts Github (UserA and UserB)I have Two project (projectA e ProjectB)Both(private)I have three Server (Server A, ServerB, Local)In Server A I have The ProjectA and i can do Push merge commit etc...root@UserA:~/.ssh# ssh -T[email protected]Hi UserA! You've successfully authenticated, but GitHub does not p...
Two User Git and Two Different Project in the Same Server
Your crontab needs a username Please specify it as13 10 * * * pk1 /home/pk1/Templates/dump.sh
I have a crontab in fedora 17 with command13 10 * * * /home/pk1/Templates/dump.shIn dump.sh#!/bin/sh mysqldump --host=localhost --user=root --password=toor mba_new | gzip > /home/pk1/Templates/`date +"webt-backup_%m-%d-%y"`.gzIn log file have an errorMar 25 10:13:01 area7 crond[31770]: (*system*) RELOAD (/etc/crontab) ...
Crontab not work
curl -u 'dmalikov:my_password' https://api.github.com/user/repos -d '{"name":"HI"}' works fine for me, now I have this HI repo.
I need to be able to create github repositories via bash scripts that run from a php page, so I need to be able to pass the password in the curl command or the API Key. However I can not seem to find the API key as I believe this may be redundant now with V3 of the github API I followed Is it possible to create a re...
Create github repo bash file, NOT be prompted for password
export KUBECONFIG=/path/to/first/config:/path/to/second/config"https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/has details.
This question already has answers here:How to merge kubectl config file with ~/.kube/config?(16 answers)Closed2 years ago.I have 2 yaml files with configuration and certs and everything from 2 different hyperscaler to use to access kubernetes clusters in each of them, so I wonder if I can add to my actual .kube/config ...
how to merge config.yamls files on kubeconfig [duplicate]
7 No. You can only delete what you get back from new- no exceptions. Share Improve this answer Follow answered Jul 9, 2011 at 20:45 PuppyPuppy 146k3939 gold badges260260 silver badges47247...
guys! Out of curiosity – the following code would probably not be legal, would it? T *p = ::operator new(sizeof(T)); // allocate memory for a T new (p) T; // construct a T into the allocated memory delete p; //delete the object using the standard delete operator
Would combining raw operator new, placement new and standard delete be legal?
To copy locallyaws s3 sync s3://origin /local/pathTo copy to destination bucket:aws s3 sync /local/path s3://destination
I need to get the contents of one S3 bucket into another S3 bucket.The buckets are in two different accounts.I was told not to create a policy to allow access to the destination bucket from the origin bucket.Using the AWS CLI how can I download all the contents of the origin bucket, and then upload the contents to the ...
How to download all the contents of an S3 bucket and then upload to another bucket?
Views don't have an onDestroy method because views usually don't get destroyed, activities do. A view won't just be destroyed if nothing happens to its activity (Unless you inflate a different layout... That's not the case, right?), and if something happens to its activity, you do have a callback getting called. If th...
I am developing an app which instantiates a bunch of bitmap objects (e.g. buttons, which have cache bitmaps, so they don't have to get rendered again and again) Now, I realised that when I run and start the app repeatedly on my huawei mobile device, I get an OutOfMemoryException at a point where the app tries to alloc...
android: cleaning up memory on app destroy
2 Try this one. touch filename.txt git add filename.txt Share Improve this answer Follow answered Nov 8, 2014 at 6:50 Ilya IsaevIlya Isaev 19766 bronze badges 1 This ans...
I can't create a text file in gitshell. I've been trying to add files using git add filename.txt I don't know what I'm doing wrong...is there something else I need to add?
Can't create text file through Gitshell
I don't know if this is the correct solution, but givingListAllMyBucketspermission worked for me.I just added another statement along with the previous one.{ "Sid": "Stmt1490288788", "Effect": "Allow", "Action": [ "s3:*" ], "Resource": [ "arn:aws:s3:::bucket-name/*" ] }{ "Sid...
Created an IAM user, with S3 full access (S3:*) on a specific ARN (only one bucket). Upload and delete works, but not able to rename or copy/paste.Here is my IAM policy.{ "Sid": "Stmt1490288788", "Effect": "Allow", "Action": [ "s3:*" ], "Resource": [ "arn:...
Renaming object from in aws s3 console, with IAM user
9 Once you push your gh-pages branch, old files are replaced by new ones on the static files server. Only one Jekyll build snapshot allowed. Share Improve this answer Follow answered May 10, 2016...
I'm trying to view the documentation of a repository at a specific point in time. Is the github pages url hackable enough that I can specific a specific commit hash? I can't seem to find any information on the web about this.
How to view github pages at specific commit?
The solution is to useconn.autocommit(True)once orconn.commit()after each Select query.With this option, there will be a commit after each select query. Otherwise, subsequent selects will render the same result.This error seems to beBug #42197related to Query cache and auto-commit in MySQL. The status is won't fix! The...
Simplifying my program, I have a MySQL RDS DB, and I want to develop a Lambda function to get the last value inserted in a specific column.I have got the following code in a lambda function, based onthis AWS tutorial:# Connexion to DB outside the handler, per AWS recomendation def lambda_handler(event, context): w...
Why is an AWS Lambda python call to a MySQL RDS being cached?
As AussieDan mentions, alerting is not available with the hawkular datasource or other datasource plugins.However hawkular has its own alerting engine that you could use instead, though it's not visible from grafana dashboards (might be visible as annotations in the future), example herehttp://www.hawkular.org/hawkular...
We have setup Grafana and installed Hawkular plugin to connect with Hawkular services. It worked & shown some metrics. When an alert is configured via Grafana UI, it shown following error in Grafana UI:tsdb.HandleRequest() error Could not find executor for data source type: hawkular-datasourceIs there any option to g...
Grafana alerting not working with Hawkular services
The answer is simple:You cannot.http://httpd.apache.org/docs/current/mod/mod_rewrite.htmlThe only thing you can do is to group some parameters into one and then parse it later in your script.Of course, you can try splitting your pattern into 2 rules, so one rule matches 5 or 6 parameters, and then 2nd rule matches the ...
I'm having trouble spending more than nine parameters in. htaccess file with mod_rewrite apache, for example, if I pass the parameter $ 10 = "something" mod_rewrite passes the value of parameter $ 1. Is there any solution for this?
how to pass more than 9 parameters in the file. htaccess (mod_rewrite)?
You should have no problem finding any number of sites with information on C++ memory allocation. Here is a small sample from a quick Google search:http://www.cplusplus.com/doc/tutorial/dynamic/http://oopweb.com/CPP/Documents/CPPHOWTO/Volume/C++Programming-HOWTO-9.htmlhttps://users.cs.jmu.edu/bernstdh/web/common/lectur...
I came acrossthis presentationwhile browsing SO some time ago, and it relates performance to specific memory allocation decisions. The author has some interesting diagrams that show how various objects are allocated by a C++ program, and goes on to optimise the program by making some changes in the code. His diagrams m...
Where can I read more about memory structure in C++?
I assume you are doing a sumSeries() (or similar) on multiple series which arrive from different sources. When the sources have not all delivered the data yet, the sum for the last data point will be too low, because the some data is missing.To cosmetically fix it and provide a projection of the near future, you can us...
I work as a NOC operator and monitor performance of an Amazon Cloud Application. Ops team uses Graphite to monitor its health and Grafana on top of it to render fancy graphs. By design "graphite" collects data every minute But I've encountered an issue with Grafana, it renders incorrect data (or not fully collected, se...
Grafana renders data incorrectly for the last minute
I ended up doing two things. The first is from the referenced link.First off, I changed the target directory for the code generation to instead be:<sourceDestDir>${project.basedir}/target/main/java</sourceDestDir>Finally, in inteliJ I right clicked the folder in target/main/java and clickedmark as directory as generat...
IntroHi, I am using the following plugin in order to generate sources for a soap web-services.<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxws-maven-plugin</artifactId> <version>1.9</version> <executions> ...
Code Coverage and Sonar - SOAP generated code - importWS
After playing around, I found out that changing the code to connect in this fashion works:import boto from boto.ec2.connection import EC2Connection from boto.dynamodb import connect_to_region key = 'abc' secret = '123' regions = EC2Connection(key,secret).get_all_regions() for r in regions: con = connect_to_region(aw...
I'm using thebotolibrary in Python to connect to DynamoDB. The following code has been working for me just fine:import boto key = 'abc' secret = '123' con = boto.connect_dynamodb(key,secret) table = con.get_table('Table Name') -- rest of code --When I try to connect to a specific region, I can connect just fine, but ...
Amazon DynamoDB -- region-specific connection
Best practice is for the RDS instance to be multi-AZ, in private subnets, without a public IP, and reachable only by those systems that need access (typically the RDS instance's inbound security group will only allow access from the app servers). Whether or not the app and the DB should be in the same VPC depends enti...
I am too new to the cloud and AWS. I am working on some web application where I need to store some data on RDS. In AWS cloud I am using Beanstalk for deploying my java code and MySQL as DB via AWS-RDS. My question is - Is it a good practice to have beanstalk [EC2] and RDS instance inside a same VPC? P.S: In this lin...
AWS: Is it good practice to have webapp and DB instance in same VPC
For Heroku there are only very little kinds of files.code, static files: belongs into gitgenerated things from the code: are generated when pushing and stored in the dynotemporary files: just write locally on the dyno / in the containsuser-generated media: outside heroku, for example into Amazon S3 (or a similar object...
So I know that the Heroku docs (https://devcenter.heroku.com/articles/container-registry-and-runtime, under "Unsupported Dockerfile commands") lists the VOLUME command as being unsupported as the Heroku file system is ephemeral. Fine. But does that also mean we cannot deploy a Docker container to Heroku that use volume...
Volumes in Docker container on Heroku
No, there shouldn't be a steady increase in memory usage - why would there be? The events are basically streamed to the subscriber; they're not being buffered up anywhere. The point of Rx is that events are pushed to the subscriber, who can choose what to do with them. It's not like adding events to a list which is th...
I have the following code in a WPF application using Reactive Extensions for .NET: public MainWindow() { InitializeComponent(); var leftButtonDown = Observable.FromEvent<MouseButtonEventArgs>(this, "MouseLeftButtonDown"); var leftButtonUp = Observable.FromEvent<MouseButtonEventArgs>(this, "MouseLeftButton...
Reactive Extensions memory usage