question_id
int64
1
1.16M
title
stringlengths
10
191
question_body
stringlengths
6
2k
answer_body
stringlengths
0
2.5k
tags
stringclasses
73 values
question_score
int64
-15
1.65k
answer_score
int64
0
2.91k
view_count
int64
4
1.24M
creation_date
stringdate
2008-08-01 18:45:00
2025-06-19 04:44:02
category
stringclasses
12 values
source_site
stringclasses
8 values
53,542
How to divide 7 non-continuous result values into 5 legend categories?
I'm making a map which displays score results for river reaches. The score results are integers from 1 to 7. Now I want to make a legend and color code my results. However, I don't want to use too many color shades as the human eye/brain is not really able to distinguish clearly between more than +/- 5 shades. So my qu...
You do not have to use shades of the same colour. You can keep 7 colours if they have sufficient contrast between them. The [CODE] and [CODE] colour schemes of [CODE] may be be used to select the 7 colours. Some examples include. In Wolfram Language [CODE] [CODE] The [CODE] and [CODE] options will need to be set to use...
1
1
39
2019-06-10T17:48:56.960
data_quality
datascience.stackexchange.com
40,032
Convert a (big) vm from ESXi 3.5 to Hyper-V Server 2008 R2
Ok Here is my problem I have 1 ESXi 3.5 server that has 3 vm's on it. I have decided to move over to Hyper-V Server R2 since I like what they are doing on the free side of things. (Free Clustering and Live Migration seal the deal for me) we are a small shop and don't have a real iscsi setup yet (but it's coming, soon I...
Copy the .vmx and any VMDK files from the ESX console to a Windows folder. Then you should be able to point SCVMM at the .vmx and it should work. If it fails at that point you can edit the .vmx to make sure the vmdk paths in it are OK (ie just remove any paths from them if they are there). Veeam FastSCP will do the tri...
1
2
5,245
2009-07-13T18:25:55.607
infrastructure
serverfault.com
414,473
ghost phpmyadmin folder?
I have a server runing CentOS6. i installed phpmyadmin and the rest with this tutorial - http://www.kdweb.co.uk/blog/installing-apache-mysql-php-phpmyadmin-centos-6-php-memcache-drupal-6-memcache-api After instalation..i cant find the phpmyadmin in my /var/www/html..i tried restarting httpd...tried rebooting the server...
If you examine the contents of the package you'll see that it contains a HTTPd configuration file which aliases [CODE] to a directory under [CODE] . Look in the HTTPd error log to see why you can't access it.
1
4
310
2012-08-05T19:24:39.583
database_errors
serverfault.com
896,783
how to determine yarn.scheduler.maximum-allocation-vcores value in ambari cluster
we have ambari cluster ( version 2.6 ) with 3 workers machine , and each worker machine have 16 CPU CORE ( see pic down ) , while each machine have 32G memory according to: yarn.nodemanager.resource.cpu-vcores: Set to the appropriate number in yarn-site.xml on all the nodes. This is strictly dependent on the type of wo...
This blog: https://qubole.zendesk.com/hc/en-us/articles/115002396546-Reference-Default-yarn-scheduler-maximum-allocation-vcores ...claims: The default value for yarn.scheduler.maximum-allocation-vcores in Qubole is set to twice the number of CPUs. This oversubscription assumes that CPUs are not always running a thread,...
0
0
3,872
2018-02-11T21:23:09.533
pipeline_ops
serverfault.com
48,976
Upgrading MySQL 5.1 to 5.5 on Centos 6 without removing dependencies
I'm trying to upgrade MySQL 5.1 to 5.5 using yum/rpm combo (yum to remove MySQL 5.1 and rpm to install MySQL 5.5). Most instructions I've found suggest to do first: [CODE] However doing so will remove in my case lots of other packages which I definitely don't want to remove: [CODE] How can I upgrade MySQL without remov...
You can remove MySQL without removing the dependencies with RPM: [CODE] Keep in mind that [CODE] is going to complain next time you try to install a package about the rpm database being modified. You can correct that with [CODE] .
2
4
6,478
2013-08-29T21:12:10.053
database_errors
dba.stackexchange.com
749,283
STARTTLS sendmail handshake failures on SMTP and retries
I'd like to gracefully handle sendmail STARTTLS handshake failures. On outgoing mail, it would be best if there were an immediate retry without STARTTLS in the case of failure. On inbound mail, ideally a site that caused handshake failures would be whitelisted to not use STARTTLS in the future, though I realize this is...
Sorry to be the bearer of bad news but AFAIK, sendmail does not offer that level of granularity. For outbound mail, that means a simple three-step opportunistic format by default: Check to see if remote downstream MTA advertises support [CODE] . If the remote side DOES advertise support, proceed to negotiate a [CODE] c...
0
1
702
2016-01-15T04:41:54.513
infrastructure
serverfault.com
1,064,305
Policyd-rate-limit for Postfix correctly configured but still wont work
I have tested policyd-rate-limit on my developer server and there is everything work correctly. But my production server wont work with policyd-rate-limit. My configuration: Postfix ( dev ) version: 3.4.13 ( prod ) version: 3.1.15 main.cf: [CODE] In logs /var/log/syslog I dont see any entry like this example: 001/001 h...
OK problem has been solved. Policyd-rate-limit installed from default debian repository ( Debian 9.13 ) cant correctly to work with Postfix 3.1.15. So I have uninstalled package policyd-rate-limit along with configuration files. After I installed manually policyd-rate-limit using pip3. Of course it needs to be copied m...
0
0
544
2021-05-21T09:57:26.217
api_errors
serverfault.com
256,499
Is a mocking framework useful if I'm unit testing a repository/database?
I'm trying to improve my testing skills. I frequently hear about mocking framework to build fake objects (as far as I understand). Right now I need to test my repository (the usual add, remove, update and GetById methods). I do this test to be sure that every operation on the database happens correctly. The question is...
There are several sides to unit-testing: Unit-testing is meant to give you confidence that a component works as it should and that future changes don't break any of the current functionality. Unit tests should be fast enough that you can execute them often without it feeling as a slowdown in your workflow. How fast the...
0
3
1,066
2014-09-17T10:55:10.697
api_errors
softwareengineering.stackexchange.com
132,668
SQL Server Log File Size Management
I have all my databases in full recovery and have the log backups happening every 15 minutes so my log files are usually pretty small. question is if there is a nightly operation that causes lots of transactions to happen and causes my log files to grow, should i shrink them back down afterward? Does having a gigantic ...
There shouldn't be a performance hit having a large log file. You actually would be taking a performance hit needing to regrow the log file each night when the long running operation happens. If disk space is not an issue and logs are not completely out of control I would leave them be, but as always keep an eye on the...
3
3
526
2010-04-15T12:29:54.080
database_errors
serverfault.com
246,566
Get the scope role for each employee
I have the following query, for each employee I get the list of his different roles : [CODE] This is an extract of the previous query output : I want to get the scope for each label (role) of any employee (here the EmployeeId=54) : The logic behind ValueId : NULL means that we don’t care about the scope because your Ro...
This can be solved with dynamic SQL. Alternatively, you can convert your resulting row into XML, where each column will be turned into an attribute. This allows you to produce a name/pair values from your row, and filter based upon the column name you were interested in. Here is a POC, where the contents of the CTE Tes...
-1
2
85
2019-08-29T15:23:44.403
warehouse_errors
dba.stackexchange.com
37,036
Update strings for all cmdexec Jobs
Does anyone know if it's possible, (and furthermore advisable) to update all cmdexec strings in jobs on a server? We'd like to change our logging location, and in principle I'd think this could be done very simply by changing the [CODE] strings. I can see how you'd do that in fact [CODE] BUT I've had it drummed into me...
In my opinion, this is one of those operations that would definitely benefit from PowerShell. All you'd need to do is gather the list of job steps that have your old string (in this case, your old location) and replace it with the new string (read: new location). [CODE] NOTE: This is sample code and should thoroughly b...
4
4
1,489
2013-03-19T17:07:27.417
warehouse_errors
dba.stackexchange.com
193,563
Problem with nginx frontend Apache backend
My setup is basically this: I have pointed two domains at my VPS running Ubuntu 10.04. I am using an nginx frontend and Apache running Django with mod-wsgi (not an issue, it works fine). Nginx is proxying just fine and Apache does its job, but all requests are picked up by the first Virtualhost, even if the server_name...
CMIIW, i think you must pass the Host header also [CODE]
1
1
730
2010-10-21T19:10:01.610
infrastructure
serverfault.com
775,770
Email with PDF attachments larger than 4 MB getting dropped by Exchange 2007
Have replicated this issue multiple times, from multiple email accounts. I have verified the email passes through the anti-spam firewall (Untangle), but Exchange Message Tracking doesn't even have record of the email coming in. Also, I do not see the test sender email address (my gmail) in our Exchange Logs (C:\Program...
Found the issue, it was on our Untangle UTM. Max message size was far too low (1 MB), plus TLS session were not being allowed.
0
0
72
2016-05-09T23:19:02.513
api_errors
serverfault.com
336,780
Best performance: 1tb vs larger drives in app using only sequential read/writes
I have a custom app that is multi-threaded; each thread runs on its own logical core (the workstation is a dual xeon, with 12 physical and 24 logical cores). So there are 24 threads running simultaneously. I've been researching the multitude of storage options over the last 2 days, and my head is spinning at about 15k ...
Most importantly, for best performance you need 24 drives (or more, bear with me), because you have 24 threads. If there are less disks than threads, you do not have sequential operation. Considering two threads on a single disk, it will have some seeks; each seek is say 10 ms, so a loss of about 1 MB of transfer oppor...
6
3
623
2011-12-01T20:23:43.183
infrastructure
serverfault.com
46,729
Where can I find ready to use windows scripts that used robocopy?
We are installing the Windows Resource Kit, and that installs RoboCopy. We want to have access to a few windows scripts that uses RoboCopy so we can start from those to build something else. Any ideas on where I can find a few samples? NOTE 1: A bit of information. Every time we try to copy D drive to E drive (new driv...
I used Robocopy to synchronize website content across 9 web servers. Here's a sample of the batch file that ran robocopy.exe. This batch file was scheduled to run every 5 or 10 minutes or could be run manually to push changes immediately. [CODE] The previous command will copy the content of d:\inetpub\wwwroot and push ...
1
5
30,326
2009-07-27T21:32:53.473
infrastructure
serverfault.com
40,599
Default parameters for decision trees give better results than parameters optimised using GridsearchCV
I am using Gridsearch for a DecisionTreeClassifier predicting a binary outcome. When I run fit and predict with default parameters, I get the following results: [CODE] Then I try GridsearchCV: [CODE] When I check the results in y_pred, they only contain one class (0) and thus I get a warning when I try to look at F1: s...
My Suggestion: The intrinsic separation of classes needs more complex model to be captured. I say this, because the difference between default model and your grid search is in max_depth parameter which is one of complexity indicators in Decision Trees. The default is None so it uses the maximum complexity it can get fr...
4
3
2,472
2018-11-02T05:02:25.870
data_quality
datascience.stackexchange.com
320,263
Connect to remote Oracle database from local SQL Developer client
I installed Oracle Linux 21c on the remote machine, tested it in Linux shell, and it worked as expected (I can query the testing table I created). But I am stuck when trying to connect to the database from local SQL Developer client (Version 22.2.1.234). I downloaded 3 ODBC-related packages instantclient-basic-windows....
Okay, I figured that out. sysdba is not a username, and I entered it when testing the connection. Certainly it wouldn't work. So, I created a user and used its username and password to connect to the remote DB and it worked.
0
0
557
2022-11-28T07:24:32.557
database_errors
dba.stackexchange.com
21,357
SQL Server Workspace Memory
Does Workspace memory (part of buffer pool) is limited for only Hash Join, Sort etc. only? If I have a query that does use a nested loop join (wihtout a sort or hash), would it not use workspace memory? Where would worktable for a simple query that return 100 rows will be created? in Tempdb..
If a query does not have a memory grant then it cannot request memory from this 'workspace'. You can see which queries request memory in [CODE] . As you already noticed only certain operators request memory grants, namely the operators that require some significant intermediate storage. A nested loop does not require a...
6
6
953
2012-07-23T21:31:38.677
database_errors
dba.stackexchange.com
174,605
Extended event for lock count does not show locks
I recently came across the article Locking and Performance . It has following statements If we manually monitor locking activity while this query executes, we see that without the page locking granularity hint, SQL Server acquires and releases over half a million row level locks while seeking the clustered index. The p...
You mentioned that you are testing in SQL 2012 I suggest you change you query for SQL 2012. You are using the version for 2008R2. Pay attention to these lines. [CODE] Full test code that is working for me. [CODE] I also tested this as target to a file. You can then save it in a database table and query/aggregate to you...
1
3
1,038
2017-05-25T18:39:14.923
database_errors
dba.stackexchange.com
257,575
Apache subdomain not working: uses real domain
Let's say I have domain.com and sub.domain.com. Domain.com 's root should be /var/www/domain_com/ and sub.domain.com 's root should be /var/www/domain_com/sub/ . /etc/apache2/sites-enabled/domain_com: [CODE] /etc/apache2/sites-enabled/000-default [CODE] Currently, I get this when I do to sub.domain.com/img.png: [CODE] ...
For name-based virtual hosting to work correctly, you need to match your bind address for the [CODE] blocks to what's configured in the [CODE] directive. Name-based hosting isn't happening, so the first block to take the address is getting all requests. Typically, you will have a directive like this somewhere in your A...
1
2
3,307
2011-04-08T23:39:55.407
infrastructure
serverfault.com
307,942
How to enhance update to be faster for small count of updated rows?
I'm working in SQL Server 2019 and facing an issue where when making an update, it takes 20 seconds for only 162 rows. Estimated execution plan Actual execution plan [CODE] Scripts sample [CODE] Indexes I have on the #package table [CODE] Package attributes table [CODE] Nop_AcceptedValuesOption table [CODE] So, how to ...
Adding to Brendan’s answer, swap this conversion [CODE] to [CODE] And you should be able to replace the non-clustered columnstore scan with 162 index lookups. If you don't get a nested loop plan, try [CODE] .
4
10
608
2022-02-24T21:43:54.220
database_errors
dba.stackexchange.com
517,985
change route to website - Gateway timeout
My website has to connect to a web service, but sometimes it is receiving a Gateway Timeout, sometimes it works allright. I'm guessing the route it's going on is wrong. Right now, the traceroute is this one: [CODE] Anyone has any idea how I can fix this? Is it wrong really? I kind of did not like networks on college. :...
There is a routing issue, or the host or a proxy is intermittently down. If the point at which your traceroute stops is in the same AS as the remote host, chances are they are having trouble with their hosting. If it is in the same AS as you, chances are your ISP is having trouble. If it is in the middle, there is a ro...
0
1
168
2013-06-24T02:50:57.473
infrastructure
serverfault.com
448,830
Exchange- Outbound emails not working
My old mans 2003 SBS Server is doing weird things.. specifically with Exchange. Inbound emails are trickling through slowly, but outbound emails have stopped working. Is there a way to track outbound emails to see what is happening with them? We use a smart host which is our ISP. Thanks
Your first stop should be "Queues" under your server computer object in the Exchange System Manager. There should be a queue containing your outbound email in "Retry" state. Highlighting that queue should show you, under the "Additional queue information" frame, some reason why the queue is in "Retry" state. You should...
1
1
2,456
2012-11-14T23:12:05.963
infrastructure
serverfault.com
250,181
How to use OR in IIF statement in row visibility?
How to use [CODE] in [CODE] statement in [CODE] [CODE] Its throwing error
[CODE] The result is boolean itself and does not need in additional [CODE] .
0
1
1,655
2019-10-03T12:18:27.147
warehouse_errors
dba.stackexchange.com
836,674
Jasper login page not loading
I'm wondering whether something needs to be in user tomcat's environment. I'm not going to run tomcat as root. BTW, does anyone use the installer or is everyone just downloading the war file and dropping it into tomcat? [CODE]
You need to build everything as a non-root user, I believe, because you do not want to run tomcat as root. So I su - tomcat to run the installer but unfortunately this js-catalog-postgresql-ce.zip package refused to build unless I ran the build with sudo. Perhaps I should experiment with running the installer as root a...
1
0
2,752
2017-03-06T23:19:40.257
infrastructure
serverfault.com
80,262
Dramatic decrease in SQL Azure performance after scaling to new edition
Yesterday, we scaled one of our databases in Azure from the old Business edition to the new Standard one (S2). Since then, it has been behaving rather erratically. We have a relatively simple table called dbo.Asset. On it, there is a column called ContentSetId which is of type integer. This column is also covered by an...
My diagnosis from the information that is currently available: Sounds like your tables are for whatever reason mostly uncached. The first run brings all data into cache. The plans probably have tons of random IO. This is extremely slow to run on a disk, and almost unnoticeable in memory. Therefore, I guess that the new...
4
4
8,584
2014-10-15T14:53:52.180
warehouse_errors
dba.stackexchange.com
873,569
OpenLDAP ACL to prevent anonymous user from getting list of all groups
I am trying to secure existing OpenLDAP installation where it is a requirement to allow anonymous user to retrieve information about records if it knows uid of specific user entry in LDAP. Assume structure as below: [CODE] Now if anonymous know that entry uid=user1 exist in LDAP, they should be able to retrieve list of...
I don't think this is possible this way around, as you couldn't restrict which groups can be read. However, OpenLDAP offers an alternative way that might help you. This is called "Reverse Group Maintenance" (see Chapter 12.8 in the (outdated) docs ) with the [CODE] overlay. Basically, it maintains a list of every group...
3
2
599
2017-09-14T06:24:25.097
infrastructure
serverfault.com
255,859
Blocked Process Report - which process does lockmode apply to?
I am analyzing a blocked process report and my blocking-process XML is as follows (some sections redacted for simplicity) [CODE] my blocked-process XML is as follows [CODE] I can find the database and object affected in the blocking-process node: [CODE] However, what I don't know is what lock the blocking process held....
I just tried this out in my local copy of the Stack Overflow sample database. I ran the following query in one session: [CODE] Which was granted several X key locks in the users table (from [CODE] ): [CODE] I then ran this query in another session, which got blocked: [CODE] According to the same sp_WhoIsActive query, t...
2
3
334
2019-12-18T11:38:12.297
warehouse_errors
dba.stackexchange.com
6,730
How to Prevent an Ever-Growing index file (MyISAM engine) From Causing Disk Fragmentation in Windows (NTFS partition)?
We have a keep-growing table which using MYISAM storage engine. Almost every half year, this table will crash, and need to be repaired. I checked the defragment result reported by windows defragment program, the most fragmental files are: [CODE] you can see, the index file caused 3812 fragment when it's 213 MB size. co...
When you perform any OS defragmentation or virus scan operations, please make sure mysql is shutdown. No utilities (mysql-based or otherwise) should be running against any table while the server is up. MySQL is not good to run on a PC that is not dedicated to MySQL DB only, especially in the presence of defragmentation...
1
2
899
2011-10-12T02:13:57.807
database_errors
dba.stackexchange.com
162,615
Why don't languages use explicit fall-through on switch statements?
I was reading Why do we have to use [CODE] in [CODE] ? , and it led me to wonder why implicit fall-through is allowed in some languages (such as PHP and JavaScript), while there is no support (AFAIK) for explicit fall-through. It's not like a new keyword would need to be created, as [CODE] would be perfectly appropriat...
It's primarily historical, most languages just copied what C did. The reason that C did it that way is that the creators of C intended switch statements to be easy to optimize into a jump table. This is also the reason that C limits switch statements to integral values. In a jump table, the program will calculate what ...
19
23
4,074
2012-08-28T13:43:55.700
api_errors
softwareengineering.stackexchange.com
18,243
How should I save apache logs into a mysql table?
This is a php script to view apache logs. I want to save apache logs into a mysql database. Then add some rules for tagging urls using mysql REGEXP search, like: SET tag='some tag' WHERE url REGEXP 'some pattern'; a) Should I use one table for storing all the urls every time they are accessed even if they repeat and th...
Because this is really logging data that you are capturing, I would first store it in its raw form, then ETL/normalize it as needed. For searching, you can index the front part of the URLs first few characters. Let's say the options are http:// and https:// - then limit the index size to three characters passed the pro...
1
3
5,304
2012-05-21T22:08:16.977
database_errors
dba.stackexchange.com
501,554
launchd PathState usage
I am trying to use PathState to start and stop a daemon on Mac OSX. It start when I create a file called /var/cache/myjob/run. However when the file is removed, the daemon doesn't stop again. How do you use PathState to make it stop? The launch configuration [CODE]
You can't do that with a launchd item. A launchd item specifies the conditions under which a program should be started (and maybe restarted if it exits), but not the conditions under which it should be stopped. You'll need to use some other mechanism to stop the process. (Note that you can stop a running daemon with e....
1
0
1,482
2013-04-22T13:36:03.213
infrastructure
serverfault.com
677,027
Why would CUPS be duplicating pages when you specify how many copes to print?
I'm running ArchLinux with a CUPS server on it. I am using an gutuenprint driver for a Sinfonia printer. Whenever I tell cups to print more than one copy of a 1-page document, it duplicates the pages by the amount of copies, and then continues to print those amounts of copies. So the amount of pages that I end up getti...
I found the problem. In the GutenPrint driver for my printer, it was setting the attribute [CODE] set to [CODE] . Setting the value to [CODE] resolved the issue.
0
0
1,139
2015-03-20T15:39:02.937
data_quality
serverfault.com
520,978
https www not able to redirect to non-www https nginx
I can't seem to redirect my [CODE] to [CODE] How it is currently the site thinks that [CODE] . is a completely separate site. I want to redirect properly, but when I add configuration on what I think is correct I get an infinite redirect. Non-https www redirects properly. Only issue is [CODE] . Here is my nginx config,...
For a simple 301 redirect, we could use return directive. [CODE] This is effectively the same as Alan's answer, but by using the return directive we can completely avoid evaluation of regular expression .
2
2
1,376
2013-07-04T23:16:15.043
infrastructure
serverfault.com
1,121,686
SCVMM 2022 Windows Server 2022 Bare Metal Provisioning Error
We recently updated our SCVMM manager from 2016 to 2022. Now we want to add new hypervisors by using the physical host provisioning option from the SCVMM. We have a physical hardware profile with a windows server 2022 vhd which was installed from a 2022 ISO and then syspreped (OOBE + generalized). However the setup of ...
If anyone with a similar issue finds this: I was able to solve the issue by building a reference image following this (old) blogpost: https://learn.microsoft.com/de-de/archive/blogs/adiyq/end-to-end-bare-metal-provisioning-with-scvmm-2012-sp1-r2-part-6-building-a-reference-image-with-mdt-2013 Just note you will also ne...
0
0
372
2023-02-01T11:50:35.350
pipeline_ops
serverfault.com
25,609
Best table schema to store daily hits for many items?
In my Sql Server 2005 database, I'm considering two ways of creating a table to track daily views on 100,000 items: Option 1) Each day would insert a new row for each item. So the table columns would look like this: [CODE] That would mean the table grows by 100,000 rows per day. Option 2) Each row would contain an enti...
I would want to attempt to insert a row for every hit and use SQL partitioning to store the table in managable chronological slices (by week or by month). This way, by keeping the original timestamp for each hit, you'll be able to aggregate the data using different methods as needed (by year one day, by hour the next, ...
1
1
6,034
2012-10-08T09:36:53.700
database_errors
dba.stackexchange.com
10,626
What can I do with a Decision Tree with poor ROC
Let's say I do a Decision Tree analysis. But the performance characteristics are nothing great (e.g. ROC is nothing great). Is there anything I can do with this "not so great" tree. Or do I typically need to trash it and try something else (either a new data set or a new analysis on the same data)?
Decision trees has one big quality and one big drawback. Their big quality is that they are what is known as glass-box models. What I mean by that is that they expose what they learn in a very clear and intuitive way. The name comes from the fact that you can see through a glass box. So, because of that, decision trees...
1
4
3,066
2016-03-10T03:42:07.697
data_quality
datascience.stackexchange.com
83,341
Error on DDL statement never invokes CATCH
When I try to close the SS Management Studio window below is the error I understand that DDL statements are implicit COMMIT and the below WARNING message is because BEGIN TRAN never COMMIT or ROLLBACK. Alter DDL statement aborted and never looped through CATCH block. Unable to understand why the control is not passed t...
Why isn't it caught? Because TRY / CATCH doesn't catch all types of errors. But you can get it to catch the non-system-critical stuff by wrapping it in an EXEC(), such as: [CODE] The error in the ALTER will fail out to the EXEC, which in turn will return to the TRY / CATCH block reporting a simple, catchable error. For...
3
8
2,246
2014-11-22T05:17:51.927
warehouse_errors
dba.stackexchange.com
209,576
How to remove multiple redundant indexes?
I have a legacy app. I wanted to find out which tables are the largest ones using script from Percona blog . It turned out some of my tables have indices that are larger than actual data by factor of 3 and more. I've dumped schema off the MySql server and found that some tables have lots of what seem to be redundant in...
The question cannot be answered without seeing the [CODE] . Here are some partial answers... The only obviously redundant queries are [CODE] and [CODE] . The rule is simple: If all the column(s) of an index are exactly the first column (s) of some other index, then toss it. (Note: This applies only to non-unique indexe...
1
2
739
2018-06-13T16:49:39.400
database_errors
dba.stackexchange.com
361,874
Can Event Sourcing and an API Management platform leverage each other?
I'm evaluating the use of Kafka to implement Event Sourcing in a microservices environment that already makes use of an API Management platform. I was wondering if it is common and/or considered a good practice to use the API Management as a gateway to the Kafka topics . The benefits could be analytics, caching, rate l...
Generally speaking, the relation between event streaming and APIs is still a controversial topic and I don't think there is one right answer for such a question. However, for each specific use case, we should be able to find a suitable architect based on many factors like performance, cost, security ...etc. Before answ...
6
1
502
2017-12-05T15:21:53.150
data_quality
softwareengineering.stackexchange.com
308,071
Divide the world map into fixed sized blocks
I am developing an app where I need to divide the entire world map into fixed sized square blocks. For simplicity, think of it as a problem of dividing the google maps into a fixed sized block. I can choose any arbitrary point in the map and my app needs to create a block of fixed size around that point. The primary co...
You can't map the surface of a sphere onto a plane square grid, whilst at the same time preserving distance, area and angles - there has to be some sort of compromise. See here for more details. If you really want "equal sized elements", a better solution might be to use a spherical co-ordinate system - latitude and lo...
5
2
3,173
2016-01-22T16:14:05.733
api_errors
softwareengineering.stackexchange.com
1,085,418
in drbd 9 cant parse node-id or connection
according to https://linbit.com/drbd-user-guide/drbd-guide-9_0-en/ and http://manpages.ubuntu.com/manpages/bionic/man5/drbd.conf-9.0.5.html I'd configured my drbd config . my config: [CODE] when i wanna up my resource c_ssd1_drbd1 with command [CODE] it shows me this error: [CODE] and if i comment node-id after that it...
You probably have a DRBD 8 kernel module loaded, then drbdadm parses the configuration in v8 format which doesn't have node-id. Hope that helps,
0
0
1,095
2021-12-05T06:31:42.677
infrastructure
serverfault.com
1,154,022
Apache Guacamole + Portainer + Nginx Proxy Manager + Cloudflare
maybe somebody could help with this... My setup: Qnap TS-664 Docker containers (Portainer managed) Domain at porkbun (lets call it example.com) Cloudflare DNS: A Name: example.com C Name: Name: nginx, Content: example.com, Proxied C Name: Name: g, Content: example.com, Proxied C Name: Name: portainer, Content: example....
Your docker-compose for the nginx proxy manager could look like this [CODE]
0
0
176
2024-02-21T12:13:55.243
pipeline_ops
serverfault.com
327,099
iptables+iptables_netflow: iptables blocking netflow export?
I am running an iptables firewall on OpenSuSE 11.3 --recently I became interested in traffic monitoring and accounting, and to this end installed iptables_netflow module on the firewall and WANGuard Platform on another server. The iptables_netflow module is built and installed and aggregating data; I can see the statis...
Is there anything between the openvpn01.dev and the host 192.168.3.194 a firewall or some such device may be ?? A diagram would help. If the iptables output is of your wanguard server Your policies are set to ACCEPT so they should not have been the issue. Is the service that you mentioned running on the server. Please ...
2
1
1,995
2011-11-02T16:12:48.260
pipeline_ops
serverfault.com
856,452
Error when running docker build on any dockerfile: "unable to prepare context: unable to evaluate symlinks in Dockerfile path"
I'm running : [CODE] Every time I run that I get this error: [CODE] The full error is: [CODE] I thought this had to do with the docker version I'm using, so upgraded to the latest version using this guide: Install Latest docker version . I still get the same error. I've tried different docker versions. I've tried on di...
I see this question being asked at a number of places. Well I think I found the solution. In earlier versions, the DockerFile was named with a capital 'F'. However in the latest releases, the DockerFile is recognized only if contains a small 'f'. I recently upgraded the docker [Docker version 17.09.1-ce, build 19e2cf6 ...
7
10
103,843
2017-06-18T09:10:18.967
pipeline_ops
serverfault.com
75,171
Prediction for not completely well classified data
I have a DataFrame of users, some of them are "bots" and they are identified with a bit equal to 1 in the "is_bot" column, if the bit is 0, the user is considered as "human". The problem is that some users may be misclassified as "humans" instead of "bots" since the "bots" have been identified on the basis on an incomp...
You are dealing with noisy labels. I would not switch the labelling according to a trained model that learned on that particular data set, since probably you don't know which patterns lead to your models decision. Otherwise if you know the reason for the wrong labelling, you could try to build methods yourself that run...
2
2
46
2020-05-31T12:00:23.397
data_quality
datascience.stackexchange.com
62,675
Why does my table hold duplicate primary keys?
To my big (and worrying) surprise I just realized that my table with millions of rows, has a few handful of rows, where the primary key (ID) is a duplicate! I don't understand how this can ever happen, and how I might prevent it in the future? The column holding the primary key is, and has always been, subject to a [CO...
It was all caused by the bug described and fixed in this release: http://www.postgresql.org/about/news/1506/ It caused us a lot of trouble!
8
6
10,222
2014-04-07T12:14:38.013
database_errors
dba.stackexchange.com
331,918
Postfix setting reply-to field to sender
I would like to set the reply-to field to the sender of the mail if the recipient matches some addresses. I know I could do a regular expression like this to do this [CODE] But that would be static, is there a way to set the sender of the message?
According to http://www.postfix.org/header_checks.5.html you could use Perl Syntax for text replacement e.g. /^(To|Cc):.*foo@bar.com/ PREPEND Reply-To: ${1} The puzzle I've left to you is to look up the Perl RE Syntax to retrieve only the email as match. Update: In your case it's this RegExp: /^(To|Cc):\s*(\w+@\w+.\w{2...
2
1
3,203
2011-11-17T11:55:38.803
infrastructure
serverfault.com
130,595
Update function to enter random/unique GUID per row
I am new to SQL and am trying to do the following. i am using SQLite browser to edit the current file I have I do have a SQLite database with around 1500 rows of data that I would like to create a GUID for. I created the Col with the name [CODE] and has a default value of [CODE] . My update script looks like: [CODE] Th...
Just Add another column to your table and mark the AI checkbox. (AI= Autoincrement ). This will make it automatically a PK ( Primary Key ). It will automatically populate the column with a different number in each row. Now if you want to create another type of key, use this GUID field in your update as part of the calc...
2
1
3,582
2016-02-26T17:56:34.860
api_errors
dba.stackexchange.com
315,818
Do I have to fork a server program as an "C" child process in order for correct interprocess communication to take place?
I would like to implement interprocess communication between an Ubuntu Linux 15.10 mono 4.1.2 C# recorder client and Ubuntu Linux 15.10 mono 4.1.2 C# video server using a C++ mutex class and C++ event class which harnesses pthreads, shm_open and mmap. The recorder client and video server reside on the same Ubuntu Linux...
Don't use Pthread mutexes to synchronize between processes , at least on Linux. (I am not sure that Linux is implementing pthread_mutexattr_setpshared correctly and efficiently, at least not in GNU glibc 2.21 ). Use POSIX semaphores, see sem_overview(7) . Or consider the Linux specific eventfd(2) probably with poll(2) ...
2
1
1,444
2016-04-15T10:38:59.860
api_errors
softwareengineering.stackexchange.com
683,450
Nginx and gunicorn are not displaying the whole page (caching issue)
I have a django application, which works fine on django's server. I just configured it to work with nginx and gunicorn. Almost every page works just fine except for one of them. It is a pretty big page, which consists of 4 select(dropdown) menus with 1000 entries in each and all that is sent by a single html file by gu...
I have tried a lot of different configurations and got it working, though I am not sure what was really the case. What I think was the case was the directive called [CODE] . It is now set to [CODE] . Also, what might solve this problem is setting [CODE] . Here is the official documentation about this directive.
2
0
1,656
2015-04-17T09:04:03.187
infrastructure
serverfault.com
1,144,830
Newbie: How to add mod_sec rule exception for specific use-case
maybe someone with experience or basic knowledge that knows what they're doing (unlike me :)) can help.... Currently, I have Ubuntu 20.04 installation with OpenLitespeed and Cyberpanel. I've installed Plausible Analytics via docker container on pa.domain1.com and noticed that when I visit the address pa.domain1.com/dom...
If you want to exclude id 920440 and 949110 for pa.domain1.com only, then you can try adding the following to the REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf file. [CODE] Then restart the web server with the following command: [CODE]
0
0
185
2023-09-30T16:14:35.530
pipeline_ops
serverfault.com
356,192
Cacls, full permission, local names
I tried to use cacls to give "Everyone" group access to certain folder. And I failed. As I understand the reason is i'm trying to use groupname in english while my windows is localized. Attempt to use localized groupname succeded. I can't predict language of target system. How can I grant permissions on folder regardle...
Best i could do is use version number checking, if winVersion >= 6 then use icacls else use xcacls.vbs which i ship with my script. Though xcacls is extremly slow, it works for me for now. In future - we'll see.
1
0
366
2012-02-02T14:30:24.350
infrastructure
serverfault.com
484,249
How DNS queries are forwarded in a Windows Workgroup network
Situation: 20 computers in the same windows workgroup. They are connected with some switches. Then there is router and a firewall (2 separate hardware, but I don't know how they are connected) with the physical ADSL modem to the internet. Computers have mostly windows XP, some windows 7. In the TCP/IP configuration of ...
Let's say you're at one of the workstations browsing the web. You type google.com into your browser's address bar. Assume you don't already have anything cached. The DNS servers that are set in your TCP/IP configuration on your workstation will be used. Let's say that's your router. Since your router does not host goog...
0
1
3,175
2013-03-03T13:56:11.500
infrastructure
serverfault.com
157,151
Does it still make sense to think about effective code on micro scale in C++?
Early in my programming career I was in love with pointer twiddling, lean code, doing everything with as little layers of abstraction as possible and so on. The code was very C like I would say, close to metal and clever. Time has passed, I have a lot more experience, and I'm noticing my attitude towards the code has c...
No. Profilers can quickly and adequately tell you exactly where the problem spots are. The reason why some frameworks are problematic is because when the problem spot is in a framework or virtual machine function, you are screwed. If you have, realistically, complete performance control over the application then go nut...
3
6
577
2012-07-18T00:40:13.897
pipeline_ops
softwareengineering.stackexchange.com
111,794
Show the error message, after I accidentally clicked "Yes" on "don't show error again"
I was trying to alter an existing Maintenance Plan, but received an error on doing so. Before actually reading it I clicked it away, too late realizing that the text said "Do you wish to hide this error message in the future?" I tried logging out/logging in, resetting my settings, browsing through Tools > Options but t...
You could try shutting down all instances of SSMS and deleting the file [CODE] , which works for clearing out things like the MRU list for server connections. Just note that this will also wipe out other preferences, so you may want to export certain settings (like if you've customized fonts and colors, startup options...
1
1
249
2015-08-21T10:04:08.960
database_errors
dba.stackexchange.com
533,011
build-essential: no installation candidate *sometimes*
I'm having a reoccurring issue when sometimes build-essential isn't available while trying to setup ubuntu 12.04.2 on AWS (using ubuntu provided ami: ami-ce7b6fba). Script that sets up the instance: [CODE] The fairly annoying bit is that it sometimes works. I have tried to add the eu-west-1 ubuntu mirror, but that didn...
Ah, figured it out. [CODE] Fixed the issue.
5
2
10,395
2013-08-22T17:11:02.783
infrastructure
serverfault.com
90,953
Virtual Machine is slow if open from host OS but fast with Remote desktop connection
I have two virual machines on Host 2008 server. If i operate the VM full screen from HOST OS then cursor moves slow but i use the remote desktop connection only to that machine then its normal. what should i do
With vmware tools installed: Right-click My Computer and select properties -> Advanced System Settings -> Performance settings and select "Adjust for best performance". Et voila - Your console access is now lag-free :) Edit: This is for the VIRTUAL computers, not the host. You didn't mention what OS they run, but I'm g...
2
1
2,635
2009-12-04T03:25:20.193
database_errors
serverfault.com
48,123
PHP & MySQL on Mac OS X: Access denied for GUI user
This question was first posted to Stack Overflow, but as it is perhaps just as much a server issue I though it might be just as well to post it here also. I have just installed and configured Apache, MySQL, PHP and phpMyAdmin on my Macbook in order to have a local development environment. But after I moved one of my pr...
How are you calling [CODE] ? I notice that you don't save the connection handle from the [CODE] call. It looks to me like the failing [CODE] call is not using the connection you're making. I recommend that you revise your code to do something like this: [CODE] This will ensure that the connection you make with [CODE] i...
4
1
1,185
2009-07-30T15:39:22.897
database_errors
serverfault.com
313,519
SSL Encryption for Kafka Pipelines
Any [SingleStore] users out there? For enabling SSL encryption (only) for Kafka pipelines, we created the pipeline like below: [CODE] from https://docs.memsql.com/v7.0/concepts/pipelines/kafka-kerberos-ssl/ 22 Please note that we’re not looking for Client authentication (mutual TLS connection). This requires us to manu...
Let's suppose, This is your (== customer’s) service name: com.amazonaws.vpce.ap-southeast-2.vpce-svc-05738b36bf477df03 This is mine (== ss’s) dns name for your endpoint: com.amazonaws.vpce.ap-southeast-2.vpce-svc-05738b36bf477df03 vpce-07e59dd12b36925ee-q2lyxq0y.vpce-svc-05738b36bf477df03.ap-southeast-2.vpce.amazonaws....
1
1
88
2022-06-18T18:51:17.573
pipeline_ops
dba.stackexchange.com
176,310
MySql not displaying all columns in the result
I am trying to teach myself DBA. when I execute this query: [CODE] I get the following: [CODE] Why are the cust_no, date not displaying and also the CASE type displaying at the start in my mysql console? Thanks. The Table Transactions Description below: [CODE]
Kind of looks like there's a CR (carriage return, ASCII 13) after the C in [CODE] . Try specifying the column names, and put that first; it would disappear, but the other columns would be visible. You can explicitly check for non-printing characters like this using the ORD() function. Let's say [CODE] is a [CODE] (or [...
0
1
2,607
2017-06-14T19:55:52.493
database_errors
dba.stackexchange.com
253,137
Locating all records relevant for a specific date
I have a MySQL InnoDB table with about 1GB of records and growing. each record in this table has, among other fields two date fields : AddedDateRecord - The date the record was added (datetime). LastUpdatedRecord - The date the record was last updated (datetime). The problem is that if i want to find all records releva...
No [CODE] can handle that [CODE] . Nor can any combination of indexes. [CODE] can help with the first 2 range tests, but it won't help with the 3rd. The 3rd range may include one-fourth of the table. Is there any limit on the time between Adding and Updating? We might be able to use a partitioning or spatial trick with...
0
0
44
2019-11-13T06:05:10.643
database_errors
dba.stackexchange.com
852,344
How to keep log of a whole day, for complete AWS s3 bucket, in single file?
I have [CODE] buckets say [CODE] , and say [CODE] . [CODE] to keep the files, and [CODE] to keep files. I have one folder as [CODE] , and i have also enabled logging for [CODE] with prefix [CODE] I have done no extra configuration, everything going on defaults. So after some time i see logs like this in [CODE] folder o...
S3 is a distributed system, and this is at least one factor in the large numbers of log files it generates. Objects in S3 are immutable -- it isn't possible to directly append data to an S3 object, and doing so requires an emulation operation: the bytes of the object must be copied into a new object, followed by the ad...
0
3
1,759
2017-05-26T04:28:44.203
infrastructure
serverfault.com
444,531
How can I protect an SQL connection string in a client-side application?
I am developing a .NET Windows application and I need to make requests to a SQL Server instance. How do I secure the authentication data in my code in case someone decompiles my application? I know there are ways to encrypt the connection string, but if someone decompiles the application, they gain access to the encryp...
There are two options I can see: The "modern" option: As Philip Kendall explains, don't . Do not directly connect to the database from the client. Instead, have a dedicated backend service which does. This is what most modern client/server applications do - web applications in particular, but native applications as wel...
5
31
4,249
2023-03-16T23:05:32.643
database_errors
softwareengineering.stackexchange.com
422,608
multicast streaming, too much network traffic?
I am thinking of switching our streaming servers to use multicasting instead of registering multiple clients and duplicating the streams manually on the server. It seems to work very well. However, I did notice that on the packet capture, when a server is multicasting the packets show up on every node, even those that ...
Multicast, by it's nature, is broadcast based in the sense that the multicast stream is flooded to all switch ports in the same VLAN or broadcast domain. The hosts that have subscribed to and are interested in that stream will then listen to that stream, all other hosts ignoring it. The way to "solve" this "broadcast p...
0
4
1,144
2012-08-29T18:58:00.037
infrastructure
serverfault.com
330,367
Is there an efficient way to determine the number of subarrays or substrings that have a certain property?
The naive solution is to generate the set of subarrays/substrings and check each for the property, but that is very inefficient. Is there a general algorithm that offers better performance without knowing more about the data or the criteria themselves? The substrings would be defined as contiguous subsets. So for insta...
No, there is no efficient way to do this given the generality of your question. Since you haven't specified a class of properties, I'll let H be a cryptographic hash function into the natural numbers and let my property be "hashes to an even number under H ". We're assuming that H is difficult to invert (and that such ...
1
6
340
2016-09-07T03:51:26.843
api_errors
softwareengineering.stackexchange.com
828,737
Centos Postgres Failed to start
I have CentOs 6.7 installed on my server: [CODE] After server restart, my PostgreSQL 9.6 server is not starting due to locale issue. Here is the log error message: pgstartup.log [CODE] It is expecting locale "en_US.UTF-8" to be available in the system. I have checked and it is indeed available. [CODE] So, I commented t...
I have found the solution to this problem. Actually, locales are provided by Glibc library. In the server, Glibc version was 2.12. For some reason, we needed 2.14 version and it was not possible to upgrade 2.12 to 2.14 via yum, as yum was saying its latest version. So we manually compiled 2.14 source and created binari...
1
1
1,639
2017-01-26T12:18:19.760
database_errors
serverfault.com
802,405
Linux firewall packet handling
When a client communicates with a the server via HTTP, for example, there are many packets going in both directions. It means from the client to the server and vice versa. I would like to ask how exactly Linux firewall or iptables installed on the client machine applies rules to these packets. My possible explanations ...
It highly depends on your configuration. Iptables doesn't do anything by default. In my experience, I've seen the following two practices as most common: The allow rule accepts all incoming packets with a certain destination port & no outgoing rules. Eventually accept all packets from a specific source network with a c...
-3
3
117
2016-09-11T13:12:38.193
infrastructure
serverfault.com
89,031
Using DISTINCT in window function with OVER
I'm trying to migrate a query from Oracle to SQL Server 2014. Here is my query which works great in Oracle: [CODE] Here is the error i got after tried to run this query in SQL Server 2014. [CODE] Anyone know what is the problem? Is such as kind of query possible in SQL Server? Please advise.
Anyone know what is the problem? Is such as kind of query possible in SQL Server? No it isn't currently implemented. See the following connect item request. OVER clause enhancement request - DISTINCT clause for aggregate functions Another possible variant would be [CODE] the cast to [CODE] is there to avoid integer div...
22
14
75,481
2015-01-11T09:21:19.627
database_errors
dba.stackexchange.com
1,051,128
NGINX Custom Error page for 504 timeout not working
Some of a server operation can be slow and cause a nginx 504 timeout. I am trying to add a custom error page for 502,504 errors but nginx always shows the default error page. Here is my config [CODE]
Your [CODE] files need to be located under [CODE] directory, because nginx appends the path after [CODE] to the path specified in [CODE] directive.
2
2
3,397
2021-01-25T15:17:53.887
infrastructure
serverfault.com
17,166
Local dev, online test/prod - best approach?
My teams develop on their laptops (using the wonderful K3D) with a local repo. But, the test and prod environments are in Azure. Locally we configure a docker image repository (using k3d), and in Azure we use ACR. My teams' internet connections are flakey at best, so we cannot all be online all the time. Currently, I u...
My suggestion is "use kustomize ", and then create a development overlay that overrides the images. Using the image transformer , you would end up with something like: [CODE] This would replace all references to an image named [CODE] (in Pods, Deployments, Statefulsets, Daemonsets, Jobs, etc) with [CODE] . You can also...
0
0
41
2023-01-02T09:38:47.550
pipeline_ops
devops.stackexchange.com
1,093,614
add notty to authorized users
I miss to understand the topic: a request from my corp's sec team. while setting up an sftp with chroot they insist I've to (quoting) "add notty to authorized users". to my knowledge the notty is the outcome of a login made by a user with no shell (e.g. an ssh user whose config bind her to sftp only and -to-say- has /u...
This looks like it's what you want: https://serverfault.com/a/354618/230046 It'll mean users in the [CODE] group can only SFTP, not SSH.
0
1
385
2022-02-14T13:38:22.467
infrastructure
serverfault.com
366,943
Organizing Ad-Hoc Tooling in a Muti-Repo Structure
Imagine you have the following scenario. Your organization deploys some app core to its mission. For example if you're Stack Exchange, this might be the customer facing web server. Let's also say you subscribe to something like the 12-Factor App philosophy . Each app mantains its own SCM repo, which acts as the canonic...
Your whole question can be answered by changing the point of view and not seeing those "tools" as something separate from the main application, but as a part or feature of the application (even if they are not features for the end user, but features for the devs, admins or testers). Then the rules for managing the tool...
3
1
137
2018-03-03T13:17:49.340
api_errors
softwareengineering.stackexchange.com
126,645
When should I invalidate a cache of a user's credentials?
We develop a Windows client application that locally caches a user's credentials for connecting to our server application using the Windows Credential Management API . Our caching logic works in the following way: The user opens the application and selects a server in the UI. It then queries the server for authenticati...
It depends on the security sensitivity of the application, and the environment in which it is used. If this application is used by a business whose employees log off their machines at the end of their shifts, it is probably ok to keep the credentials cached for the Windows session. If they leave their computers logged ...
1
2
693
2011-12-22T21:31:55.997
data_quality
softwareengineering.stackexchange.com
735,312
ERR_CONNECTION_TIMED_OUT (unless I'm using a proxy)
I run my own online business as well as managing over a dozen self hosted sites for other people using the wordpress.org. platform. They're all hosted by a small company in the UK and if I do experience any problems the company are usually quick to sort them out. However... Right now, using Chrome or Safari (on an iMac...
Sounds like it might be DNS related. Are you able to ping the websites? Can you navigate to them by IP address?
1
0
2,171
2015-11-10T17:00:58.013
infrastructure
serverfault.com
578,215
Use Active Directory Administrative Center outside domain
I'm setting up a Active Directory lab environment on a Windows 8.1 laptop. I now have a Windows Server Core 2012 domain controller running inside a VM. I installed Server Manager for Windows 8.1 and have set things up so I can manage everything from the Win8.1 host machine. Well, everything except Active Directory Admi...
Is it impossible to run ADAC outside an AD domain or am I still missing some configuration? Yes. Most of the built-in tools to manage things relating to your domain require that they are being run as a domain user. That necessitates the machine they are running from be joined to that domain. That said, there are 3rd pa...
2
1
5,527
2014-02-25T18:06:57.713
infrastructure
serverfault.com
839,035
MySQL is using too much CPU
I have i7 3770 dedicated server with 32GB ram, and Centos7 is installed, below are CPU details [CODE] and mysql is using too much CPU on it. I am using it for web hosting and there is no so demanding account with a lot of visits. Databases are mixed, some are InnoDB and other are MyISAM, and I can't make them all to In...
As i can see you have core i7 cpu if mysql is using 100% also then its using only one core, your usage can go up to 700% Also check if there is read-write delay wait time for resources If any slave replication is enabled try disabling it and check you web server which is sending queries to mysql, it can be bug or bad q...
-1
2
8,487
2017-03-17T21:35:59.440
database_errors
serverfault.com
522,765
Inaccessible disk after OS reinstall
Our server has an OS RAID 1 and a separate 8 disk RAID 1 array. It was originally running server 2008, but it crashed on us. I attempted to fix the issue by removing the server from the domain, but when I tried to get back in, the local Administrator password didn't work, so I was unable to ever log back into windows. ...
Taking ownership of the drive via drive properties/security/advanced might be a fair place to start before attempting to apply permissions. (I'm assuming that the physical disk & volume has been checked in disk manager and no issues shown there).
0
0
71
2013-05-30T20:31:31.073
infrastructure
serverfault.com
214,265
How to write case when in where statement in Oracle
I wrote below statement. In MySQL it executes ok, but in Oracle it fails with error: meg:ORA-00905: missing keyword How should I write this SQL? [CODE]
You're mixing up two ways of doing case. You either need: [CODE] or [CODE] your query is malformed [CODE] your clause is not well good. you can do it differently like this : [CODE] You can read here for further information.
1
0
6,682
2018-08-07T10:30:06.120
database_errors
dba.stackexchange.com
883,073
nginx: [emerg] "stream" directive is not allowed here
I have the latest NGINX from ppa installed on Ubuntu 16.04. nginx version: nginx/1.12.1 From my understanding, it should support stream and UDP load balancing. But I get this error message: [CODE] This is my config in [CODE] [CODE]
stream needs to be on the same level as http block so like [CODE] My guess is your include for [CODE] is located in the [CODE] block and not outside of it. Checkout the /etc/nginx/nginx.conf for the include and maybe you have to make a new one for the stream section
36
66
86,594
2017-11-12T17:01:15.227
infrastructure
serverfault.com
280,002
reapply permissions post sql server restart
In our environment, users were granted read/write/ddladmin permissions on tempdb database (dev/qa/prod). These permissions will be lost when SQL Services restart, as tempdb rebuilds every time. One solution that is currently in place is - reapply the permissions scripts from a SQL Agent job, when ever SQLAgent starts. ...
An alternative to modifying model might be to create a stored procedure in the master database that contains whatever you need to do. Then you mark this as startup proc (sp_procoption). You might have to put in a WAITFOR in there in case SQL Server executes this before model has been recovered and tempdb has been creat...
0
2
514
2020-11-20T02:00:47.903
database_errors
dba.stackexchange.com
629,553
How to view two dialog boxes on the linux console, running on the same time?
I want to view on the Linux console two dialog windows on the same time. I want a window that views the progress BAR, and the a second tailbox that view the logs are running. The problem is that the dialog appears always in the center of the console. What I want is to view the two dialog boxes on the same time on the c...
You can use [CODE] program. Executing screen manually After installing [CODE] , execute it by typing [CODE] in your console. Split your screen by pressing ctrl a then S (uppercase S, with shift Enter your first command After having the fist command executed, press ctrl a then tab to switch to the another window. Press ...
2
3
1,852
2014-09-18T14:15:43.007
infrastructure
serverfault.com
274,283
Proper use of model in asp mvc
What is a proper use of model in asp mvc? Should a model contain only data that will be accessed inside a form, or it is also a good idea to put data that are static and would be used in a view, but not inisde a form of a view. I am asking this because I am curious about relevance of a model size on performance. If thi...
Your confusion is understandable. Different MVC frameworks have different approaches when it comes to models: some encourage lightweight models, while others welcome models which contain a lot of information. In ASP.NET MVC, the common practice I observe in many projects is the following: Business logic: Models don't c...
2
3
1,328
2015-02-24T12:44:45.313
api_errors
softwareengineering.stackexchange.com
162,351
Moving Reporting Processes from Access to MySQL
I am soon due to be given SQL access to our CRM system, which will allow me to automate some reporting processes. At present I use Access which I update with Excel imports. As one example I have created a report which is used to assess sales team performance. To do this I manipulate the data using queries in Access and...
Once I discovered MySQL, Excel was relegated to being just a fancy calculator. It will take you some time to understand SQL, but in the long run, it will probably be well worth it. If you end up with performance problems, you might need to avoid Views.
0
1
28
2017-01-26T16:17:27.597
database_errors
dba.stackexchange.com
102,983
How to determine the number of K in KNN
I have a question about how many k values (k=1 or k=5 or k=50) to choose in the following two scenarios. I initially thought choosing k=5 will be the right choice of k for both because it will minimize the total number of errors. I would like to hear from experts what they think is the best k to choose out of the three...
It depends on the goal of the project. Most machine learning projects want to maximize predictive ability. One useful way to maximize predictive ability is to pick an evaluation metric then find the value of k (a hyperparameter) that maximizes that evaluation metric on a hold-out data set.
-1
1
1,233
2021-10-10T05:46:13.180
data_quality
datascience.stackexchange.com
162,473
Difference in database dump file size
Actually I am bit confused with my database export, while i exporting it shows "Total estimation using BLOCKS method: 20.83 GB" But my DB export dump is only 6 GB. Few days back we deleted some unwanted files and data from our database. But I am not getting idea about this huge difference. Also, my export dump file is ...
Data pump uses BLOCKS method to estimate the size of the dump by default during the export. The estimate is calculated by multiplying the number of database blocks used by the source objects, multiply the block sizes. If the tables are fragmented then actual size may vary. In your case, as you have said, you had heavy ...
1
3
11,353
2017-01-27T17:37:35.547
warehouse_errors
dba.stackexchange.com
290,445
use windows vpn tunnel from linux vm image
I have a windows xp desktop with a linux centos vmware image running on it Due to some issues I am having lately with vpnc on linux, I would like to know if I can route vpn traffic from linux to windows. So I will connect to the vpn from windows (with cisco's vpn client) and I would like to route traffic, for a specifi...
You can route your Linux traffic through the Windows (host) VPN session if the Linux guest is setup with a NAT NIC through the hypervisor.
1
1
1,495
2011-07-14T17:15:08.817
infrastructure
serverfault.com
487,804
how to google for help about 'scientific linux' related questions?
I tried googling for help on several questions related to the scientific linux distribution. Similar distributions have somewhat non-colliding handles ( "RHEL", "CentOS", ..) that are very good search engine "filters". Is there an effective, standard way to search for "scientific linux" pages that i maybe missing ?
Scientific Linux is based on RHEL. Thus, all the documentation and Google results available for it (and for CentOS, too) may help you. If you need distro-specific info, try to get help from Scientific Linux mailing lists: https://www.scientificlinux.org/maillists/ , particularly from the first one - Scientific-Linux-Us...
-1
0
52
2013-03-14T14:40:03.113
infrastructure
serverfault.com
334,886
Can a server outside the Windows domain connect to a 2nd SQL instance via a linked server?
I have the infrastructure shown in the diagram below. Web Server 1 is outside the Windows Domain. Web Server 2 is inside the Windows Domain. SQL Server 1 and 2 are both inside the domain. There is a linked server connection from SQL Server 1 to SQL Server 2. Both SQL Servers only accept Windows Authentication, not SQL ...
This is a classic double-hop problem, but in this case, you are using NTLM rather than Kerberos (as it's outside the domain). So it's impossible to do double-hop, as NTLM doesn't support it . Options are: Join Web1 to the domain and set up Kerberos delegation Use an SQL Authentication login instead. You only need to do...
1
3
44
2024-01-15T18:21:17.090
database_errors
dba.stackexchange.com
991,513
Nginx 403 access forbidden when using X-Accel-Redirect
I have an issue in Nginx with security and [CODE] . Nginx Server 777 [CODE] Nginx Server 888 has identical config for [CODE] [CODE] However, all requests from source ip [CODE] to Server 777 are getting a 403 response from Server 777 , with the error: [CODE] From what I can see, the [CODE] location is blocking the reque...
So, it looks like the custom [CODE] (@server888) needs to permit the loopback address in order for this to work: [CODE] I'm not sure what the technical explanation is here. Normally, the [CODE] directive should permit access when the request is generated by [CODE] : http://nginx.org/en/docs/http/ngx_http_core_module.ht...
0
0
900
2019-11-12T14:29:56.473
api_errors
serverfault.com
1,028,633
Windows Storage Spaces - a useful replacement for RAID6?
// short update at the bottom // another update is near the bottom to reply to a suggested edit So, at first I had this idea: Find a virtual driver to set up and use software raid on windows. Result: Failed even with support from developer. The next idea then came into my mind after watching a YouTube video about virtu...
Windows Parity Spaces are dog slow and (according to Microsoft) aren’t designed for anything except archive workloads. Microsoft keeps trying to improve write performance say implemented log missing from the hardware RAIDs, but lack of the battery-powered write back cache takes away all the fun. You can however try to ...
11
12
7,161
2020-08-03T05:10:59.767
infrastructure
serverfault.com
15,039
Azure DevOps Clean after pipeline run
I have self-hosted build agents using Azure DevOps. We have the clean flag in the checkout step, however we run out of space sometimes. What is the preferred way of cleaning the agents' work directories? The problem is, that the clean process is in the beginning of a pipeline, and leaves everything behind. This is even...
There is a [CODE] option within the job properties. See the job definition . [CODE] As it would be called before fetching, there will be always space for the new build.
4
1
7,431
2021-11-25T14:36:22.990
pipeline_ops
devops.stackexchange.com
338,088
size_t or int for dimensions, index, etc
In C++, [CODE] (or, more correctly [CODE] which is "usually" [CODE] ; i.e., a [CODE] type) is used as the return value for [CODE] , the argument to [CODE] , etc. (see [CODE] , et. al.) On the other hand, .NET languages use [CODE] (and, optionally, [CODE] ) for the same purpose; in fact, CLS-compliant languages are not ...
Given that .NET is newer than C++, something tells me that there may be problems using unsigned int even for things that "can't possibly" be negative like an array index or length. Yes. For certain types of applications such as image processing or array processing, it is often necessary to access elements relative to t...
17
10
5,808
2016-12-13T20:58:30.777
api_errors
softwareengineering.stackexchange.com
110,932
Performing EDA on a dataset with missing features
I'm new to DS. I want to perform EDA on such dataset, where these are the missing features stats of my train and test sets: train: Test_0 0 Test_1 31 Test_2 0 Test_3 141 Test_4 0 Test_5 0 Test_6 0 Test_7 0 Test_8 1045 Test_9 0 Test_10 0 Test_11 0 Test_12 0 Test_13 0 Test_14 0 Test_15 2967 Class 0 dtype: int64 test: Tes...
There are a lot of techniques through which you can fill the missing values. Some of them are: 1.) Replacing with mean, median or mode as you correctly pointed out. 2.) Replacing with a constant value like 0 3.) KNN Imputer 4.) Iterative Imputer Which ones to use depends on what kind of data you have. Or you can try al...
0
1
93
2022-05-14T12:36:07.527
data_quality
datascience.stackexchange.com
56,427
Windows 2003 SP1 server will not upgrade to SP2
Got an issue in upgrading a server to SP2. Box: Win 2003 Ent SP1 x86 Roles: McAfee ePO server, DHCP, 2ndary DC When installing SP2 it locks up (at the backing registry stage) and has 0 cpu usage in task manager. I then have to force close the process and then restart the machine. In the svcpack.log file the last entrie...
Can you just rebuild it from scratch and reinstall EPO? Might be the easier option.
1
1
1,676
2009-08-20T01:29:36.570
infrastructure
serverfault.com
126,040
Rewriting URLs from subdomain to domain in Apache
My webserver is running Plesk and part of my site structure goes like this: [CODE] I have a WordPress installation in the domain root folder and WP is configured to display a static page when accessing [CODE] and to display the blog when accessing [CODE] . However, I want to redirect (using mod_rewrite) all requests fr...
You can of course proxy the requests from [CODE] to [CODE] . You can find simple examples for a reverse proxy in the documentation for mod_proxy. Just place the directives in an [CODE] file in the document root of [CODE] or put them into the respective [CODE] file. But I really don't see any advantage over just redirec...
2
1
704
2010-03-25T00:54:48.217
hadoop_errors
serverfault.com
1,140,703
Path not excluded by mod_rewrite config
I am trying to roll my own vhost config to handle certbot/letsencrypt. I want to redirect anything other than requests to /.well-known to HTTPS. But the exception for .well-known is not working; requests for http://www.example.com/.well-known/ return a 301 redirect to https. I have anonimized the hostname in the code b...
You are missing the leading [CODE] , i.e., you are using [CODE] instead of [CODE] . It would probably be best to add the tailing [CODE] , too, to match the contents on that directory alone: [CODE] . Still, the example on Daniel Ferradal's answer is a more correct way to achieve the same. On the other hand, because this...
0
2
78
2023-08-04T11:50:35.460
data_quality
serverfault.com
378,751
CentOS PHP Sessions not working even though the PHP Info page says it is
I have PHP installed properly from the Remi repo on CentOS 6 (64 bit). As shown in the image above, the PHP information page shows sessions as working and installed, yet I get this error: [CODE] I've tried multiple reinstalls, different PHP RPM's, and yet nothing will get sessions going. How can I get PHP sessions work...
You're looking for [CODE] . "session_create()" is a phpBB function.
0
3
4,609
2012-04-12T04:03:21.743
infrastructure
serverfault.com
319,942
Guava Multimap merging consecutive items with same key
I have been playing around with Guava Multimaps and I ran into an issue with tracking when an user is damaged (more the way it's displayed, really) Let's say I have a [CODE] and [CODE] consists of 2 fields: damager (string), and damage (double). Here is an example of what my collection might look like: dangerous01, 6 d...
What you might want is Multiset, another Guava collection. From one perspective, a multiset is just a collection that condenses duplicates to save memory. But it can also be viewed as a map of objects to counts. Each user could then have a [CODE] field. To record damage, you would simply do [CODE] This updates the amou...
0
0
1,326
2016-05-31T20:05:51.130
api_errors
softwareengineering.stackexchange.com
639,887
IIS permissions to allow outgoing REST http requests from site code
I can't use outgoing http requests in IIS due some security permissions or something I am trying to use my own REST http service (it is a standalone application) on localhost in my perl CGI site [CODE] Here what I've got [CODE] my [CODE] service is a standalone application outside of IIS, it is running and gives an ali...
It's not a security restriction. Perl tries to find some driver's dll's in system registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip but path to dll is based on environment variable %SystemRoot%, and IIS do not pass environment through FastCGI Add following text to your programm: BEGIN { [CODE] };
1
2
1,796
2014-10-27T07:50:41.743
infrastructure
serverfault.com