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 |
|---|---|---|---|---|---|---|---|---|---|---|
44,630 | Is there a way in TestNG to validate something but not fail the test case at the end (not soft assert)? | I'm using TestNG to run a test and I've been using the Assert.assert statements in Java. Now there are a few places where I would like to validate whether a function returned true or not. If it didn't then I don't want to fail the test but would rather have it log a message and continue. In effect, I'm trying something... | You can catch the assert True, if you read the documentation of asserttrue: https://www.javadoc.io/doc/org.testng/testng/6.8.17/org/testng/Assert.html#assertEquals(boolean,%20boolean,%20java.lang.String) you can see that asserttrue throws an error and not an exception. So you have to capture the Throwable. ANd you can ... | 0 | 2 | 1,252 | 2020-05-20T10:38:05.317 | data_quality | sqa.stackexchange.com | |
490,019 | Using several rewrite rules .htaccess | I have a website wich is based on a searchpage, which shows a list, and next is a detail page of the items. if visitors use [CODE] , should be redirected to [CODE] . I had that working now for the details [CODE] , should be redirected to [CODE] and here I fail... I keep getting redirected to index.php with my $1 as 'de... | You need to add the [CODE] ('last') flag to the first [CODE] : [CODE] According to the documentation , this flag will: Stop the rewriting process here and don't apply any more rewrite rules. This corresponds to the Perl last command or the break command in C. Use this flag to prevent the currently rewritten URL from be... | 2 | 1 | 1,913 | 2013-03-21T12:26:15.230 | infrastructure | serverfault.com | |
133,536 | Should an OFFLINE database be SET EMERGENCY before dropping? | As a rule before dropping a database I, SET OFFLINE, for 30 days before dropping it. If there is anything that was missed and the database is still needed, I can SET ONLINE quickly for a full restore. [CODE] If you drop a database while it is offline, the files stay on the server forever unless you purposely go clean t... | Note: make sure you have a final full backup of the database before you drop it, just incase if you need to restore. Normally, [CODE] mode is used for getting your database out of corruption. You are right, that [CODE] mode will allow only sysadmin members and the db will be read-only - nothing gets written to T-LOG. I... | 2 | 4 | 1,235 | 2016-03-28T13:28:34.553 | database_errors | dba.stackexchange.com | |
73,438 | How to start mysqld with read-only data directory? | I'm trying to start MariaDB in a docker container, using a data directory from the host mounted read-only. MySQLd is of course shut down on the host. Unfortunately, even with adding the [CODE] flag to my.conf, I get the following errors: [CODE] How can I start the database server with a read-only data directory? | Please note the InnoDB Architecture (Pictorial Representation by Percona CTO Vadim Tkachenko) The system tablespace file [CODE] has moving parts requiring writes Data Dictionary Double Write Buffer Safety Net to Prevent Data Corruption Helps Bypass OS for Caching Insert Buffer (Streamlines Changes to Secondary Indexes)... | 3 | 4 | 13,163 | 2014-08-07T19:24:19.040 | pipeline_ops | dba.stackexchange.com | |
34,083 | Get ticket sales and reservations grouped by time slot | Ok, I am definitely no guru when it comes to SQL, I will preface this by saying that. Also, hopefully the info I post will be enough for those out there to figure out what I need to do. That being said here is my query: [CODE] The Results I am getting are in this picture . Obviously what it is doing is counting the [CO... | For the first part of your query and all those hard-coded [CODE] expressions, there is a much better way to do that: [CODE] Partial results: [CODE] More examples of generating sets without loops or tedious [CODE] expressions: http://sqlperformance.com/generate-a-set-1 http://sqlperformance.com/generate-a-set-2 http://s... | 0 | 1 | 1,721 | 2013-02-04T17:24:54.930 | warehouse_errors | dba.stackexchange.com | |
93,835 | ffill missing data based on the sort order of another column | I have a column with missing data that I need to imput. Column is called 'Bandwidth'. There is a relationship between the Bandwidth column, and another column called 'Age'. As Age increases, so does Bandwidth. I want to ffill Bandwidth, but I have to do it based on the value in Age. I have over 10k records, so there is... | Since you mentioned that there is a linear relationship between Age and Bandwidth, you could train a simple linear model i.e linear regression on your dataset to estimate the bandwidth based on Age. Once you have figured out the relationship you can use it to impute the missing bandwidths. | 0 | 0 | 22 | 2021-05-02T03:20:45.197 | data_quality | datascience.stackexchange.com | |
131,410 | How do you create a new database in SQL Developer? | I am a software developer that supports and develops an application that connects to both Oracle databases and SQL Server databases. I want to learn more about database administration. In SQL Studio Manager you can open a connection to a server and then selected the master database and then run a statement like this: [... | The term [CODE] has a different meaning in Oracle. The definition of database by Oracle: A set of files, located on disk, that store data. Because a database instance and a database are so closely connected, the term Oracle database is often used to refer to both instance and database. Oracle Database Architecture If y... | 1 | 3 | 18,229 | 2016-03-06T09:46:04.453 | database_errors | dba.stackexchange.com | |
506,053 | How does one properly escape a leading "#" character in linux etc/environment? | I would like to store a system-wide environment variable in [CODE] on AWS Linux AMI 2013.03. In this example, I am trying to store the phrase "#hello". See the examples below. [CODE] produces [CODE] I expected [CODE] (below) to produce: [CODE] but instead it produces a blank line. The following is list of tests I typed... | Well it is tricky stuff you want to do /etc/environment is not shell syntax, it looks like one , but it is not, which does frustrates people. The idea behind /etc/environment was wonderful. A shell-independent way to set up variables! Yay! But the practical limitations make it useless. You can't pass variables in there... | 5 | 4 | 2,265 | 2013-05-08T15:26:14.507 | infrastructure | serverfault.com | |
231,190 | MySQL hitting IOPS wall in AWS, not able to utilize full volume IOPS level | We are scaling up an existing MySQL 5.6.41 (with Galera) based system running in AWS on EC2, and are hitting a wall in performance, which we believe is narrowed down to storage IOPS. Please note for the sake of testing baseline MySQL performance the Galera cluster consists of a single node – no node-node replication is... | There are many reasons that may lead to the inability to use all the IOPs available. Here's an unordered list of thoughts. How many threads are being invoked in the benchmark? More than about 40 threads may get into a "thundering herd" scenario, where none of the threads are running efficiently because they are steppin... | 4 | 2 | 2,093 | 2019-03-03T20:56:42.730 | api_errors | dba.stackexchange.com | |
857,886 | Specifying a folder to filter Ansible Dynamic inventory for VMware | I want to use the vmware_inventory.py dynamic inventory script with Ansible to generate an inventory based on my VMware guests. However, my Vsphere cluster has many hosts running on it which I do not with to have included in the inventory, or manage with Ansible. In the vmware_inventory.ini configuration I see the foll... | I discovered that I needed to first modify the skip_keys parameter as such [CODE] (removing parent, so that key is no longer skipped) Now, I can specify a filter like this: [CODE] And it will return all machines under the folder MyFolderName in VSphere | 1 | 2 | 2,829 | 2017-06-26T12:29:08.633 | pipeline_ops | serverfault.com | |
272,009 | NFS stalls on client side when server goes down | I'm running a few Amazon EC2 instances. One of them is a NFS server with the following exports: [CODE] And in the client side: [CODE] I've tried to: change soft to hard disable the noauto use the elastic ip address instead of the public dns The issue I'm having is whenever the server reboots, the client isn't able to s... | It sounds like you are getting NFS stale mounts due to server reboot. The change in your fstab naming is causing the NFS dialog to restart and thus address the problem. NFS cannot carry a service across server reboots as it must accomplish some security negotiation on establishment of the service that will not persist. | 0 | 1 | 1,208 | 2011-05-20T17:51:38.387 | database_errors | serverfault.com | |
127,572 | Where can I find accessible bug/issue databases with complete revision history | I'm performing some research and analysis on bug/issue tracking databases and more specifically on how programmers and teams of programmers actually interact with them. What I'm looking for involves understanding how those databases change over time. So what I don't need for example: is a database of all the bugs of so... | You might want to have a look at Philip Guo's publications (and maybe get into contact). If I remember correctly, he published a few papers for which he had access to data of big bug trackers. http://www.pgbovine.net/academic.htm#pubs | 3 | 0 | 595 | 2011-12-29T15:22:07.677 | api_errors | softwareengineering.stackexchange.com | |
723,271 | Add file with puppet and remove it after a run | I want to add a file with puppet that should only exist while puppet runs. The file should be there to prevent apt from starting any services (which fails) during my puppet run. This is the class I have so far that doesn't work since there is a duplicate declaration of the same file: [CODE] This should give an idea of ... | Unfortunately this is not how Puppet is designed to work - Puppet will enforce a known system state, rather than being an interactively running script. One way of doing what you want is to use [CODE] resources to add/remove the file, and using a locally-deployed 'source'. Example (not complete, may not work): [CODE] | 1 | 1 | 7,220 | 2015-09-18T11:30:47.607 | pipeline_ops | serverfault.com | |
179,281 | Different database for Membership and our web data or use just one? | Is better to keep our Membership stuff on the DefaultConnection and create another connection (another database) for our data? Or just one database for all? If I have a MyAppContext and I want migrations for that context, It seems that I cannot have migrations for UserContext (In other words, I can just migrate one con... | The 'normal' way is to keep it all in a single database. Its just fewer moving pieces you have to keep track of in your application. You can always move the member list into its own database should the need arise. The only time I'd separate them from the start is if the long term plan would be for the membership list t... | 4 | 1 | 4,572 | 2012-12-13T14:21:42.763 | api_errors | softwareengineering.stackexchange.com | |
1,042,049 | Why are pods failing to schedule due to resources when node has plenty available? | The pods in my application scale with 1 pod per user (each user gets their own pod). I have the limits for the application container set up like so: [CODE] The nodes in my nodepool have 8GB of memory each. I started up a bunch of user instances to begin testing, and watched my resource metrics go up as I started each o... | I found out that when viewing available capacity, you need to pay attention to [CODE] , and not [CODE] . From Azure support: Please take a look a this document “Resource reservations”, if we follow the example on that document (using round number to 8GB per node): [CODE] For a 8GB server, the amount reserved is around ... | 4 | 2 | 8,143 | 2020-11-10T16:13:51.890 | pipeline_ops | serverfault.com | |
33,670 | Migrating to new HDDs | I am running a W2k3 Server on a software raid 1 using two old PATA drives. I now want to replace them with two new SATA drives. What's the easiest way to go about this? Since uptime isn't really an issue at this point, I was thinking about breaking the array, installing the new drive, and rebuilding it; then remove the... | Your idea sounds fine. I would take out disk 0 and cable disk 1 to where disk 0 was, then reboot. Assuming it boots fine keep disk 0 somewhere safe as if it all goes pear shaped you just put the original disk 0 back. JR | 3 | 1 | 164 | 2009-06-30T08:28:06.003 | infrastructure | serverfault.com | |
276,593 | Convert columns to rows without using pivot | I have been assigned to get the data in required format from two tables. TableStaff : [CODE] and TableLead [CODE] As you will notice StaffID is the foreign key to TableStaff . I have to represent the data in following format [CODE] What I have tried: [CODE] Any NULL spots should be replaced by 0. Can anyone show me the... | You can use a SUM(CASE... and a GROUP BY [CODE] StaffID | StaffName | NewLeadAccount | QualifiedLeadAccount ------: | :-------- | -------------: | -------------------: 1 | John | 1 | 1 2 | Jack | 1 | 0 db<>fiddle here | -1 | 2 | 3,679 | 2020-10-06T09:22:30.653 | warehouse_errors | dba.stackexchange.com | |
330,419 | Lie 2: Code should be designed around a model of the world? | I recently read the Three Big Lies blog post and I am having a hard time justifying the second lie, which is quoted here: (LIE #2) CODE SHOULD BE DESIGNED AROUND A MODEL OF THE WORLD There is no value in code being some kind of model or map of an imaginary world. I don't know why this one is so compelling for some prog... | Firstly, let's look at some context: this is a game designer writing on a blog whose subject is eking out the last drop of performance from a Cell BE CPU. In other words: it is about console game programming, more specifically, console game programming for the PlayStation 3. Now, game programmers are a curious bunch, c... | 23 | 63 | 3,150 | 2016-09-07T16:45:34.230 | api_errors | softwareengineering.stackexchange.com | |
324,790 | IIS/ASP Request Wait Time Need Advice | We are running an ASP application using ASP 2.0.50727 running on IIS 6.0 and Windows 2003. We are having random high response times and I can see using PerfMon at times we have ASP\Request Wait Times of 5-14 seconds. The corresponding ASP\Requests Queued are 6-12. I looked in our ASP Machine.config and the we are set t... | Perfmon is a good tool when you know exactly what you want to measure, but for looking up bottlenecks I'd go for Process Explorer first to get a general overview and if that reveals anything zoom in with xperf or another profiler. If your ASP application is using a database, try using a database profiler to check the q... | 1 | 2 | 3,744 | 2011-10-26T00:44:48.207 | infrastructure | serverfault.com | |
12,197 | Selecting multiple options and deselecting options using Selenium with python | I am trying to open a webpage and select options before submitting the form. The issue I am having is being able to selecting more than one option in the select box. Eventually I want to be able to deselect an option as well and submit the the form. A snippet of the relevant html and python code is below Snippet of htm... | read up on Select object - http://selenium-python.readthedocs.org/en/latest/api.html?highlight=select#module-selenium.webdriver.support.select Use IDs or names, or even CSS before XPATH. Best practices, explained here | 0 | 1 | 5,303 | 2015-02-18T14:37:44.107 | data_quality | sqa.stackexchange.com | |
289,495 | MySQL freezes every hour at the exact same time | We have an hard-to-understand issue with our production MySQL RDS 8.0.20 instance. It's db.r5.2xlarge instance, Ireland region, Multi-AZ, besides, there is a Replica. Problem: Every hour, at the exact same time, at :00 we experience a database glitch. Sometimes it's big and customers are affected, sometimes it's not, b... | This is on rds. Probably shared Infra structure. The problem might be a busy neighbor. An other application that shares your infra might have an hourly procedure that steals your io causing your app a delay. | 2 | 1 | 1,224 | 2021-04-08T15:10:24.693 | pipeline_ops | dba.stackexchange.com | |
570,672 | Mysql running out of memory | I am having a lot of trouble with mysql eating too much ram on a small machine and am looking for some help in figuring out why it is eating so much. I have a small virtual machine with 256MB of RAM running Debian Wheezy. On this server I have apache2 and mysql installed. I don't do very much on this server, only a few... | 256 MB for both Apache and MySQL is extremely low. I always recommend atleast 512MB for that combination (and thats the bare minimum). What your saying however is not necessarily MySQL causing the problem, its just the OOM killer killing MySQL because the VM ran out of memory. Besides that MySQL has alot of defaults, s... | 2 | 1 | 2,237 | 2014-01-29T10:28:12.060 | database_errors | serverfault.com | |
275,677 | Query optimizer triggering statistics update seems to be slowing down queries | We are running SQL Server 2016 and have a very simple stored procedure that does a select using a clustered index seek of a single row in a table with 140 million rows. In that table, we keep around the last 6 months of data, with roughly the same number of rows per day. On a daily basis, we delete the oldest day and i... | So its not that you get a bad plan, your issue is that you have somebody becoming a victim of the auto-stats, right? Since you probably know what table(s) we're talking about, I suggest you disable auto-update at the table (or even stats) level. You can do this using [CODE] . Now you don't affect the rest of the databa... | 0 | 1 | 446 | 2020-09-17T18:52:05.387 | database_errors | dba.stackexchange.com | |
77,673 | Trouble connecting to a remote instance of SQL Server 2008 (Developer Ed) | I just installed a named instance of SQL Server 2008 Developer Edition on our Windows 2008 server. I've been working all morning trying to enable remote connections but have been unsuccessful. Here are some details: SQL Server service is running using the network service account SQL Server Browser service is running us... | Well, I changed the static port for the named instance to a non-standard port (not 1433). I'm not exactly sure why this fixed it but I am now able to connect. Thanks for the help and troubleshooting tips everyone! | 1 | 1 | 5,063 | 2009-10-23T15:38:28.740 | database_errors | serverfault.com | |
64,184 | How do you organize a large data layer in a project? | I have a data layer that strictly interacts with the database and returns the result into a model. I have an asynchronous connection with the DB so sometimes I have to chain results where I have to do many queries. I have about 1000 lines of code in a single class and It's getting hard to manage. My question is, how do... | It sounds like you are doing by hand what an Object Relational Mapper is supposed to do for you. I would therefore advise you to find a decent ORM that is already written for your platform. Given the technologies you have listed, a quick search turned up https://stackoverflow.com/questions/3299889/best-orm-for-adobe-ai... | 1 | 4 | 398 | 2011-03-31T22:41:00.573 | api_errors | softwareengineering.stackexchange.com | |
911,590 | This could be due to CredSSP encryption oracle remediation - RDP to Windows 10 pro host | Error Following Windows security updates in May 2018, when attempting to RDP to a Windows 10 Pro workstation the following error message is displayed after successfully entering user credentials: An authentication error occurred. The function requested is not supported. This could be due to CredSSP encryption oracle re... | Research Referring to this article: https://blogs.technet.microsoft.com/askpfeplat/2018/05/07/credssp-rdp-and-raven/ May 2018 tentative update that could impact the ability to establish remote host RDP session connections within an organization. This issue can occur if the local client and the remote host have differin... | 50 | 4 | 103,225 | 2018-05-10T08:40:09.760 | api_errors | serverfault.com | |
371,659 | Setting up sound on a LTSP server | I've got a Fedora 13 server setup and running successfully. Unfortunately I'm having issues making sure the clients can hear sound. I've installed the necessary alsa packages but I'm not having any luck. [CODE] Any idea what I should be looking at? | We had quite a few problems with 64-bit LTSP installations prior to 2010. And considering that you're looking to run an old, in fact now-unsupported, version of Fedora, I'd consider moving up to a more recent release on 64-bit or dropping to a 32-bit install with PAE. Our 32-bit Ubuntu deployments of LTSP have always b... | -1 | 1 | 440 | 2012-03-20T17:51:34.420 | infrastructure | serverfault.com | |
93,192 | BERT is running out of memory in forward pass for my dictionary | Running code from this answer , my BERT is running out for my 4k words dictionary. I don't need to do anything with these words yet, just make embeddings for my data. So, using this exactly: [CODE] gives me memory leakage. How can I manage this with batching since I don't have labels for classification or something lik... | It is likely to be independent of dictionary. Loading BERT model and running a forward pass has its own memory requirements. How did you figure that it is memory leak? Try visualizing memory footprints on each step in your code by using some break points. It will give you clear idea about the hardware requirements and ... | 1 | 0 | 292 | 2021-04-17T22:40:09.610 | data_quality | datascience.stackexchange.com | |
546,125 | Windows could not reconnect all network drives | OK, before you get all "OFF TO SUPERUSER WITH YOUR ISSUE!", they specifically state in their Help pages: " NOT about issues specific to corporate IT support and networks", and since this is a corporate network I'm dealing with and I'm the IT manager/sr.admin, well there you go...and yes I feel silly being unable to fig... | While MDMarra's suggestion was good and is typically something that should be set via GPO anyway to allow for network scripts, etc. to function properly during login, unfortunately it didn't fix it like I thought. Consider it a placebo effect for a few days, but the issue returned in force. But, I did find a Technet co... | 14 | 3 | 8,246 | 2013-10-15T13:30:31.620 | infrastructure | serverfault.com | |
978,733 | Samba 4 and "file modified outside this application" messages | I've used CentOS 5 and 6 for many years as a web development server. I edit files directly on samba share mounted on a windows 7 (previously windows XP). I'm trying to migrate to CentOS 7 which has Samba 4.8. There is a strange problem when I edit a file on a samba share. I edit the file, save it and then I get a messa... | I found out that if option [CODE] Samba will have the above behavior. So in any normal linux distribution you could set [CODE] . However I'm not sure how to workaround QNAP overwriting the config file every time I change samba configuration (and maybe on reboot?). So I won't accept this as an answer, but it might help ... | 0 | 0 | 113 | 2019-08-10T19:53:20.490 | infrastructure | serverfault.com | |
854,013 | exchange operation can't be performed because you're running another time-consuming operation | I'm trying to add/delete a user permission from a public folder but i keep getting this error. The operation can't be performed because you're running another time-consuming operation. Try again when it completes. can i stop the operation? Can someone help me with this. | If you got the error when modifying the permission via EAC, please try to use EMS to add/delete the user permission on Public Folders. Or please schedule a downtime to reboot all Exchange 2013 servers(CAS & Mailbox) to fix the issue. PS: This error would occur if there are some bad requests in the background. | 0 | 0 | 1,648 | 2017-06-05T11:40:34.570 | infrastructure | serverfault.com | |
830,416 | Cannot upload files with scp, but with pscp it works | I can login to a remote server with a login, which has a private key. This private key is without any password. When using [CODE] on Windows, I can login to that remote server without problems given that private key. Using [CODE] on Windows with this key also works without any problems. But when using [CODE] from linux... | A [CODE] file is a Putty private key file, it's not an OpenSSH key file. See What difference between openssh key and putty key? From the [CODE] messages you posted: [CODE] OpenSSH can't parse the key file you provided. | 0 | 2 | 1,086 | 2017-02-03T12:58:09.060 | api_errors | serverfault.com | |
95,410 | MYSQL: update field with random fixed char | would like to update all record on a field which i only want it to fill it with random either Y or N currently using: update table1 set field1=( RAND() FROM Y FOR N) which is not working, any idea? | solved with this: [CODE] | 1 | 1 | 448 | 2015-03-17T01:16:01.640 | database_errors | dba.stackexchange.com | |
842,743 | Adding binary log to existing mysql server | I have a fairly large (~50m rows) database on a single Centos server. I want to set up replication but the existing database has no binary logs. Is there a way to retrospectively add binary logs so that the data can be replicated? If not, I assume the only method is to dump the database with mysqldump and then import i... | Is there a way to retrospectively add binary logs so that the data can be replicated? Yes. Although it requires a server restart you can upgrade a single MySQL server to a Master in a replication cluster at any point in time. The steps are pretty well documented in the manual: https://dev.mysql.com/doc/refman/5.7/en/re... | 0 | 1 | 787 | 2017-04-05T13:01:56.913 | database_errors | serverfault.com | |
14,103 | Usefulness of Foreign Key WITHOUT reference option | Sorry, if this is naive question, but I searched a lot and did not get a vivid answers. Consider a simple [CODE] [CODE] without [CODE] or [CODE] I think this will avoid [CODE] of a value which does not exist in the parent table. Is there any other advantage? Does this [CODE] assist a better [CODE] on the corresponding ... | Having built databases since before there were efficient database engines, I would recommend you create FOREIGN KEY constraints where required. Presence or absence of ON DELETE and ON UPDATE does not avoid the INSERT requirement on the parent table. They will influence what happens when the parent key is changed or rem... | 1 | 3 | 2,440 | 2012-02-29T03:09:58.860 | database_errors | dba.stackexchange.com | |
1,073,901 | MySQL is not using my certificate, uses its own self-signed | I have tried to find an answer to this and I have come up empty. I have a certificate from LetsEncrypt that I use for all my SSL needs. It is valid for all the DNS names that I am trying to use. Today I tried to get it working for MySQL, but MySQL insists on using its own self-signed cert. MySQL version is 8.0.26-0ubun... | I finally figured this out. The config files must have a .cnf file extension or mysql ignores them. And once I fixed that, I had a permission problem -- I had split the cert file into three separate files, but the other two files were owned by root:root. Once I fixed that, everything worked. | 3 | 2 | 1,994 | 2021-08-08T16:30:19.737 | database_errors | serverfault.com | |
107,062 | django subdomains apache config | Trying to setup django to take subdomains and use different settings file based on subdomain dns is setup as wildcards apache mod_vhost_alias sounded like good option, it did not work [CODE] gets this error [CODE] can mod_vhost_alias be made to work somehow? can rewrite module be used to pass along subdomain to django ... | mod_rewrite's RewriteRule has a flag, E, that sets an environment variable. You could probably have a RewriteRule that matches everything and sets E=DJANGO_SETTINGS_MODULE:%{SERVER_NAME) %0, %1 etc. from mod_vhost_alias only works in its own settings such as VirtualScriptAlias etc. | 2 | 0 | 513 | 2010-01-28T04:07:32.403 | infrastructure | serverfault.com | |
143,189 | I can't program because the code I am using uses old coding styles. Is this normal to programmers? | I have my first real job as programmer, but I can't solve any problems because of the coding style used. The code here: Does not have comments Does not have functions (50, 100, 200, 300 or more lines executed in sequence) Uses a lot of [CODE] statements with a lot of paths Has variables that make no sense (eg.: [CODE] ... | Ok, I'll be blunt. That is a bad place to work... I've been in such situations, and usually it ends with you being swallowed by this code. After a year or so, you'll get used to it, and you'll loose the grip on how modern alternatives can be used to achieve the same task easier, in a more maintainable way, and also, fa... | 29 | 1 | 5,319 | 2012-04-05T18:21:24.390 | api_errors | softwareengineering.stackexchange.com | |
723,259 | WordPress in sub-directory is serving root index.php on nginx fastcgi | I am encountering a weird problem on my NGINX server. As explained in the Codex I moved wordpress from my root directory to a subdirectory /blog/. It shows the blog index successfully, but if I want to show anything else, like a specific post or archive page it serves the root index.php Even non-existent URLs are serve... | The try_files statement is sending all none-existent files to index.php in the web root. I needed to add a second location specifically for the blog to the configuration: [CODE] Now it works fine. (Thanks to Steve E. who pointed this out on StackOverflow ) | 0 | 1 | 910 | 2015-09-18T10:57:28.590 | hadoop_errors | serverfault.com | |
6,953 | How to automate Windows remote desktop login poup in server using Web Driver | Step 1: I have provided the login in browser level Step 2: It moved to remote desktop Step 3: When I click on remote desktop icon in browser it will show the window authentication login of QA server Step 4: I have tried with selenium IDE to record but the actions are not recorded after the click on remote desktop Here ... | I concur with Lyndon - this may require additional tooling beyond Selenium. If you are on a Windows OS, I have had good experiences with AutoIt for scripting system interactions like this. You can find more details about this tool at: http://www.autoitscript.com/site/autoit/ | 0 | 1 | 6,014 | 2013-10-10T07:03:40.140 | api_errors | sqa.stackexchange.com | |
850,892 | Managing stage and live webapps (apache, haproxy, https redirection) | We have a staging environment for our rails webapp set up as a second Apache virtual host, with haproxy 1.5 sitting in front of both. Until recently the stage was configured as a different frontend listening on a different port to the live version. This worked pretty well as any redirections, links etc. worked perfectl... | I wouldn't look into different URL, subdir, port or anything like that if you want to set up a staging environment. Instead I could recommend 2 different approaches which do not require any URL rewriting. You could set up the frontend for the staging environment on a different IP address. In case you want to test the s... | 0 | 0 | 152 | 2017-05-18T12:59:56.503 | infrastructure | serverfault.com | |
18,252 | How to Allow Firefox Offline Storage using Selenium | I am in the process of creating some BDD tests using Java, Cucumber & Selenium. The problem I am having is the website I am attempting to test has been specifically designed to work with firefox and I have been asked to test it only on this browser. When I navigate to the page, firefox creates a popup asking for permis... | I think this behavior is a global event and should be treat accordingly. Consider use of https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/firefox/FirefoxProfile.html some "code" would be: 1) create an instance of FirefoxProfile 2) use a setPreference method and pass in the instruction to disable ... | 3 | 1 | 325 | 2016-04-22T09:31:12.103 | data_quality | sqa.stackexchange.com | |
257,707 | MySQL: I need to return rows according to certain conditions | I have a 3 tables: work, recording, release 1 work can have multiple recordings and 1 recording appears in only 1 release and 1 release can be in m recordings. TABLE: work [CODE] TABLE: recording [CODE] TABLE: release [CODE] Basically, for each [CODE] , I want to return the [CODE] where [CODE] and [CODE] AND were the [... | Step by step: Basically, for each work, I want to return the recording where is_art = 1 and is_vid = 0 AND were the release is the oldest (oldest year, month and date). Sometimes, the release can have the same year, month and day, so, in that case, I guess I need to find a unique identifier, so ill go with latest relea... | 0 | 0 | 62 | 2020-01-19T00:20:45.887 | database_errors | dba.stackexchange.com | |
17,876 | For Mantis, can the DEFECT TYPE field be displayed in the grid? | I m using Bug tracking tool Mantis. At times i need to view the issues on the basis of Defect type. Can I have this in the GRID to make things easier and up going. Thanks. | Is 'Defect Type' custom field? If is, read this topic, it should help: https://www.mantisbt.org/forums/viewtopic.php?f=4&t=8621 (I'm sorry I have no enough reputation to comment) | 0 | 1 | 78 | 2016-03-31T07:30:50.570 | data_quality | sqa.stackexchange.com | |
805,627 | Debugging MySQL performance issues | I work on a WordPress site that gets roughly 100K page views per day. We use Varnish for a caching layer. Recently, we've been running into a problem where, seemingly at random, MySQL performance slows to a halt and brings down our application. Here's a graph from New Relic for an outage that occurred yesterday: This h... | Do you have everything in one machine? Are you sure your server(s) are not swapping? During the problem can you check with top and friends if your workload is CPU / Memory / IO bound? Do you collect this data? If not start installing systat (sar and friends) so you can check what happened system wide after the problem ... | 2 | 0 | 617 | 2016-09-27T14:34:28.887 | database_errors | serverfault.com | |
379,577 | Arch Linux with an nginx/django setup refuses to display ANYTHING | I'm on Amazon Ec2, with an Arch Linux server. While I truly am loving it, I'm having the issue of actually getting nginx to display anything. Everytime I try to throw my hostname into the browser, the browser states that it's not available for some reason - almost as if the host doesn't even exist. One thing I'd like t... | For some reason, I had thought that port 80 was open (as I remember enabling it before). The issue was simply that it was closed. So, on the local machine, all I did was type [CODE] Where [CODE] is the port directive, and [CODE] is the name of the security group. | 1 | 1 | 763 | 2012-04-15T05:34:11.170 | infrastructure | serverfault.com | |
63,301 | SQL Server query disk write/sec limit | I am facing an issue which it looks like the server is hitting disk write limit. But after some test, I realize it wasn't. I was running the following query: [CODE] The following shows some print screen and explanation of my problem: At 1st, I opened 1 query window and run the query, then I checked Performance Monitor:... | You don't say but I'm guessing that your log files are on your D: drive and what you're seeing here is writes to the transaction log files, not to the database files i.e. to ldf not to mdf. You won't see the mdf files written until the DB hits a [CODE] , which could be some minutes later. The linear increase is good an... | 1 | 1 | 4,246 | 2014-04-16T04:35:32.257 | database_errors | dba.stackexchange.com | |
666,941 | Exchange 2010 is trying to relay messages for delivery | I am using Exchange 2010 on premises. I am in the process of setting up a SMTP proxy that will receive all messages coming into the office, log them, then forward them to my exchange server for local delivery. I am running into a problem with messages that contain a To or CC for users on non-company domains. When the m... | Configuring a relay connector to allow the proxy SMTP server to relay through Exchange doesn't make Exchange an open relay. Many organizations configure and use relay connectors in Exchange for applications, web servers, log servers, etc. But I'm not really understanding the problem. Why is the SMTP proxy trying to sen... | 3 | 0 | 422 | 2015-02-11T23:29:56.327 | infrastructure | serverfault.com | |
645,928 | Apex ANAME / ALIAS record in Windows Server 2012 R2 DNS Manager | Some DNS hosts offer a way to have an A record that serves an IP address which is determined on-the-fly (or frequently enough via scheduled job) by resolving some other hostname behind the scenes. This is used when example.com (and not a subdomain like www.example.com) MUST point to a host whose IP address changes from... | Given the exact circumstances of the problem, I would say that the ideal solution would be to point the apex at a webserver that redirects HTTP requests for [CODE] to [CODE] . [CODE] can in turn be a CNAME to the DNS record managed by AWS. While it would be possible to set up a solution on your servers that automatical... | 2 | 1 | 4,767 | 2014-11-20T20:22:06.413 | infrastructure | serverfault.com | |
671,481 | How do I install the JRE on a Windows server without Oracle adware? | I would like to install Java on one of our servers, but I am reticent due to Oracle's bundling of an Ask.com toolbar and some virus scanner. I've read that the java updater even installs these for important security fixes if they are missing, and the toolbar install has a 10 minute delay built-in so you can't immediate... | The off-line installers at http://oracle.com/technetwork/java/javase/downloads/index.html do not include bundled software. | 45 | 60 | 11,283 | 2015-02-26T02:56:20.127 | database_errors | serverfault.com | |
593,805 | Comparing 2 CSV files in powershell exporting difference to another file | I've write this script out, and could have swore I had it giving me a Failed early this morning but now I'm getting nothing and not sure why. Basically I need to compare [CODE] with [CODE] and export what is the difference between the files to another CSV. Any help on how to get the output file would be appreciated. Or... | Was directed to the Try/Catch that does the error handling I need this fixes the problem. [CODE] | 1 | 3 | 4,615 | 2014-05-08T00:38:45.927 | infrastructure | serverfault.com | |
60,376 | MySQL hangs in killed state | I have a strange situation where a mysql OPTIMIZE query will never end. After killinh it, it remains in the "killed" state. Scenario to reproduce: OS: CentOS 6.5 MySQL: 5.6 Engine: MyISAM (with at least one BLOB/LONGTEXT column) mysql config 'myisam_repair_threads' = 2 I have a table with 40MB of data and 1500 records.... | From the DBA Square blog : What actually happens when you run KILL? The command sytnax is KILL [QUERY | CONNECTION] , where thread_id is the value from the first column of the process list output. The optional argument determines whether only running query or should the entire session be terminated. It defaults to the ... | 4 | 5 | 15,209 | 2014-02-27T13:07:03.093 | database_errors | dba.stackexchange.com | |
198,827 | Restore all IDENTITY seeds (out of sync since database restore) | We have recently done a full restore on a database from a backup (schema & data). When trying to insert new rows we are getting the "Cannot insert duplicate key in object" error message, it is trying to insert duplicate keys into an identity column. We are not manually specifying the values for those columns. We can fi... | Next script generates a DBCC CHECKIDENT command for each table in your server adding 1 to the current IDENT_CURRENT value. Notice I've commented: [CODE] within the CURSOR, I strongly suggest you to check each generated COMMAND before to execute it. Additionally you can un-comment within the SELECT statement [CODE] just... | 0 | 3 | 986 | 2018-02-26T13:50:08.820 | data_quality | dba.stackexchange.com | |
56,668 | Pandas change value of a column based another column condition | I have values in column1, I have columns in column2. What I want to achieve: Condition: where column2 == 2 leave to be 2 if column1 90. Here is what i did so far, the problem is 2 does not change to 3 where column1 > 90. [CODE] | What I want to achieve: Condition: where column2 == 2 leave to be 2 if column1 90 This can be simplified into [CODE] . The [CODE] part is redundant, since the value of [CODE] is only going to change from 2 to 3 if [CODE] . In the code that you provide, you are using pandas function replace , which operates on the entir... | 13 | 13 | 112,867 | 2019-07-31T10:08:51.983 | data_quality | datascience.stackexchange.com | |
575,580 | Forward web request to another computer | I have one notebook and two servers: ip = 172.17.0.2 (I have installed nginx here) ip = 172.17.0.3 (There is nothing here, but I can ping 172.17.0.2 from here) I open browser on my notebook, open [CODE] and get web page from Nginx. Now I want to do something so, if I will open [CODE] in the browser this server forward ... | A way to "forward" [CODE] to [CODE] could be to use an [CODE] server. Then, you will be able to redirect [CODE] to [CODE] On Server [CODE] : [CODE] Edit [CODE] and add something likle this : [CODE] Restart [CODE] : [CODE] Now, [CODE] should redirect you at [CODE] No need of [CODE] anymore here. | 0 | 1 | 4,512 | 2014-02-14T11:53:04.267 | pipeline_ops | serverfault.com | |
443,168 | How to propagate lexical scope in a compiler, specifically around step-by-step functions? | I am working on a compiler in TypeScript, and currently am focused on how to pass around the "lexical scope" to the relevant objects. Essentially every time there is a conceptual major branch in the code, there is a new lexical scope created and assigned to that AST node, pointing to its parent for parent variables. [C... | But I'm wondering typically how you are supposed to handle variables that are defined in random places in a linear sequence. Does this mean that every time a variable is introduced, we fork the scope as well? It would be error-prone to automatically create a nested scope for each new variable declaration (in a linear s... | -1 | 3 | 143 | 2023-01-03T04:36:00.117 | api_errors | softwareengineering.stackexchange.com | |
446,215 | Multiple domains on same virtual hosts in Apache | I'm working on an application for my clients that allows them to set up small landing pages for their campaigns. I have a set of templates and views for adding text, photos etc to the templates. Everything works pretty well straight out of the box, with authentication, admin views etc. I'm using the Laravel framework. ... | Rename this virtual-host to [CODE] Making sure it sorts first lexicographically. When requests come to the server that doesn't match any of your vhosts, it will default to the first one. | 0 | 0 | 793 | 2012-11-07T09:36:54.340 | api_errors | serverfault.com | |
312,517 | LIKE query with leading wildcards in large MySQL production database | According to insights in Amazon RDS the following query in a large MySQL production database is causing high loads ( ~ 50.000.000 entries): [CODE] Columns responsible for it: common_name: VARCHAR(255) additional_names: VARCHAR(2000) (Note: This is unfortunately a comma-seperated string of zero to hundreds of names per ... | Approach 1: A fulltext index can't do everything a [CODE] condition can do. The most common problem I see preventing use of fulltext is that MySQL's implementation only indexes whole words, so if your search is for a partial word it won't help. It will take time to create the index, but if it's important to avoid downt... | -1 | 1 | 1,585 | 2022-05-24T14:01:46.137 | database_errors | dba.stackexchange.com | |
387,524 | OS X tools for testing & visualizing network performance between two points | A client of mine has had intermittent network issues between their office and their server hosted on AWS. A speedtest (at speedtest.net) shows their bandwidth is fine. When I test their server, from a different location, the speed is fine – works on my machine. Can you recommend any tools for OS X which will allow them... | Depending on your relationship with this client and the setup, I'd be tempted to get a small headless workstation with SSH access and connect it to their network with remote access for you. You can script connection tests and such from that system. Something small and out of the way, rather than relying on them to use ... | 0 | 1 | 124 | 2012-05-09T16:19:38.460 | infrastructure | serverfault.com | |
7,924 | One Big Database vs. Several Smaller Ones | We have a situation were we can (A) deploy instances of an applications in one MySQL database using table prefixing or (B) use different MySQL databases for each instance of the application, for e.g., Setup "A": [CODE] The end result being a large db with many tables. Setup "B": [CODE] The end result being many databas... | I ran a system with the best part of a thousand databases, spread across multiple servers. They were all an identical structure and were synchronised with a template database which was on each of the machines. This allowed me the ability to migrate databases from one db to another if one was getting excessively over-lo... | 19 | 16 | 33,296 | 2011-11-15T21:16:53.390 | database_errors | dba.stackexchange.com | |
136,290 | Redo/Noredo in Oracle | I have an Oracle 11.2.0.3 about 700GB in size running in noarchivelog mode in a pretty slow storage setup. It barely gives IOPS and there is resource crunch in terms of hardware resources. The transactions hitting the database is heavily read/write intensive and redo generation is quite high (near to 8MB/Sec) and natur... | Can nologging in certain tables boost the performance? Not for a normal transactional load. [CODE] only affects some very specific cases of DML (essentially direct-path inserts) and some DDL (see [CODE] ). So essentially only for bulk data-loading scenarios. If that's not what your database is doing, it won't help at a... | 0 | 2 | 119 | 2016-04-23T07:37:35.110 | hadoop_errors | dba.stackexchange.com | |
229,207 | 2U rack hardware, budget but stable, what to buy? | So, I'm tasked with helping buy motherboard/CPU/ram for a 2U server, that will be brought in luggage to China. The requirements are that the hardware is reliable/stable (read: long lasting) at the best price possible. It doesn't matter if it's not bleeding edge. Apparently they already have a 2U chassis over there that... | 1) Kingston ValueRam is generally Non-ECC, so stable it won't be. Certainly if you get memory errors, then you might get some pretty serious OS faults. 2) You want a server. A real live server.. That will cost you a lot more than $300. I reckon you should be looking to pay somewhere between $1500 and $3500. Look at the... | -1 | 8 | 462 | 2011-01-31T16:33:15.170 | infrastructure | serverfault.com | |
846,516 | Apache reverse proxy port error | I asked a question earlier on how to get an ssl certificate on a service I'm running. Question asked here. Now I have my domain linked to my server and I can connect to my apache with ssl enabled. So I wanted to enable the reverse proxy that was posted as a solution. I followed this guide to set up my apache server as ... | I found the solution. I removed port 8002 from the apache ports.conf file and commented out the line "DocumentRoot /var/www/". Now when I connect to the website I get the proxy'd service. | 0 | 0 | 765 | 2017-04-25T19:07:22.883 | api_errors | serverfault.com | |
454,156 | How to prevent particular program from using particular network connection under Windows? | In my company almost every user has 3G mobile connection and many of them travel a lot. To prevent expensive mobile charges I'm looking for a solution that would prevent particular program (Windows Updates, Dropbox, etc.) from using 3G/Mobile Broadband connection. Ideally connection rules should be controlled globally ... | as and easy and dirty way could be to set up a local DNS server/forwarder with the dropbox, windows update, etc stuff set to localhost that they cannot access the internet at all. problem with that is for sure, that you cannot administrate it from remote. if all internet connections go through the firewall, you could m... | 0 | 0 | 231 | 2012-12-01T15:32:48.050 | infrastructure | serverfault.com | |
735,751 | SQL Server express - Management studio installation hangs at native images installation | I've been trying to install SQL server express edition (2014) with management studio and consistently failing to do so because installation stalls at step 'Install_sql_common_core_Cpu64_Action : Write_NativeImage_64. Generating Native images' . I've tried several time but still it hangs at this point. I even left it ov... | Disabling AVG virus protection before starting the install setup allowed me to proceed with the install past this point | 1 | 2 | 2,456 | 2015-11-12T05:40:45.853 | database_errors | serverfault.com | |
276,538 | Postgres 12 and full text search against arbitrary key-value pairs | I was hoping to get some advice or guidance around a problem I'm having. We currently store event data in Postgres 12 (AWS RDS) - this data could contain anything. To reduce the amount of data (alot of keys for example are common across all events) we flatten this data and store it across 3 tables - event_keys - the ke... | You may be setting up indexes wrong. Indexes need to be customized to the operations you do with them. One index may be great for one query but useless for another. A GIN on MD5 (or any other hash) is only good for equality. If you wish to search in multiple ways you may need multiple indexes. Also, having too much fle... | 0 | 2 | 691 | 2020-10-05T16:14:35.370 | warehouse_errors | dba.stackexchange.com | |
947,281 | Upgrade windows server HDD without losing any data in RAID1 | I have a Windows Server 2012 R2 installed on a system with RAID1 setup which has several services running like Active Directory, etc.. It has 500 GB hard disk as of now. Now we want to upgrade the server with more RAM & 2 TB RAID1 Hard disk setup, and we plan to use the same server machine to host virtual machines usin... | Here is an another more elegant way to do this. 1) Take a backup on a remote location in network using Windows Server Backup. 2) Change the disks (make sure you configure it as RAID), replace with newer disk. Boot using Windows Server Installation Media, and select to Repair using System Image Recovery we backed up at ... | 0 | 0 | 2,713 | 2019-01-02T07:06:12.837 | pipeline_ops | serverfault.com | |
501,436 | Source policy routing breaks layer 2 domain routing | I have a Linux (Ubuntu 12.04) machine (c220-1) that has multiple interfaces. The two of interest here are: eth2: 10.10.0.131/24 eth3: 10.20.0.2/24 The default route is set to 10.20.0.2. However, I'd like to be able to ssh into this machine by connecting to either 10.20.0.2 or 10.10.0.131, from a separate network (192.1... | I have just run into the same problem and have found the issue to be in the order of operation in which the route tables are applied. if you issue the following prior to applying the policy routes: [CODE] And then after: [CODE] IMHO I would expect any new routing tables to be applied somewhere between the 'main' routin... | 0 | 0 | 484 | 2013-04-22T02:53:38.917 | infrastructure | serverfault.com | |
1,109,335 | Sending system mail via SMTP to public mail server - port already in use | I have a docker host that runs a containerized mail server. On the host there are a couple of system status mails in the mail queue that I want to be forwarded to my mail account. These Mails are generated by Debian. On other systems i have used postfix to do this. On this system however the Mail-Ports are already used... | The above answers are making sense to me. So: stop postfix outside your container and send the emails TO the container. Probably you need to use the hostname of the computer running the containers. Not "localhost". Something like: echo "from host" | mailx -r @ @ | 1 | 0 | 273 | 2022-08-29T04:59:41.773 | api_errors | serverfault.com | |
13,814 | Internet Authentication Service (IAS) failure when SQL logging server unavailable | We are setting up netlogin on our network switches to authenticate computers prior to letting them on the network. In the process, the switch will send the MAC address of the computer to the RADIUS server (we are using Windows Server 2003 IAS) to determine what VLAN the computer should be in. In IAS there is an option ... | If this is going to be a mission critical thing I'd suggest clustering your SQL Server. That particular drawback is specific to IAS so you'd have to take that up with Microsoft. Sorry :-/ | 0 | 0 | 907 | 2009-05-28T14:20:51.633 | database_errors | serverfault.com | |
206,969 | Increasing Apache Server Availability | We are currently running a Perl web application on top of Apache 1.3 (I know this is seriously outdated but there is nothing we can do about it at this time). Throughout the day, as the number of users accessing the application increases, the server becomes less and less responsive until it eventually becomes unavailab... | Some general ideas: Use "top" and "free" to check the status of your server during times of high load. Typically the bottleneck will be one of CPU, Memory, or IO but there may be a specific issue with your app/setup as well (e.g., deadlock issues when the number of concurrent users increases). If the issue is memory (e... | 0 | 1 | 131 | 2010-11-29T12:41:02.090 | infrastructure | serverfault.com | |
1,112,868 | BIND9 local reverse lookup with public IPs - is the setup broken or is the setup faulty? | We are having a prelaunch-site to test DNS (and other services) before going hot. I've never involved public IPs here previously and it may not work as I've intended. We have a /29-net from our ISP that are public IPs. 121.24.124.144/29. To test our DNS for different "view"s we have set up the LAN side of a router to e... | What you do internally with the reverse DNS records for the public IP-addresses assigned to by your provider is up to you, but the rest of the internet will only see whatever your ISP offers/supports/sets up for you. Personally I would align with them rather than locally override whatever their reverse DNS records for ... | 0 | 0 | 961 | 2022-10-11T23:48:04.333 | infrastructure | serverfault.com | |
12,660 | Kibana slow performance optimization | I have a Kibana page which takes about 7-10 seconds to load. Benchmarking same page shows ~1s to complete the request [CODE] and the exact same query to elastic takes about 1s to complete as well. [CODE] It's just 2 simple [CODE] filters within a request to [CODE] index. Taking into account benchmarking above I don't t... | So basically I've ended up turning these flags off ( [CODE] ) [CODE] Other ideas I had in mind: adding nginx as a proxy caching all the static files (js for plugins / images) warmup script (periodically makes requests to predefined hot pages for Kibana to internally cache these pages) if that would work migrate to host... | 3 | 3 | 1,787 | 2020-10-29T10:08:22.377 | database_errors | devops.stackexchange.com | |
888,495 | amavisd-new: fail (bad RSA signature) | After installing IredMail on my Debian 9 server, I followed this tutorial to configure DKIM Add new domain to iRedmail - with DKIM signature . After following all the steps and running the [CODE] command I get the following response: First: [CODE] But if I run the command again, I get this other message: [CODE] | Now everything seems to be working. For those who have the same problem: All settings on the server are working. As I'm using CloudFlare I had to add a new TXT record on the dns tab so things work out. That's the tip. | -1 | 0 | 1,115 | 2017-12-16T23:30:08.540 | infrastructure | serverfault.com | |
605,485 | CIFS and NFS: Permissions and underlying file systems | I have been doing a little reading, but am not completely clear still. My understanding is that NFS permissions are fairly black or white, and are controlled by the exports file (I believe there are options to have the local filesystem permissions be respected for the NFS client, but I typically don't see that used). t... | This is quite a broad question, and a bit depends on e.g. NFS versions. However: NFS allows you to specify a security mode on export. It also allows you to apply limits to which servers may mount your export. (Either limiting mounting at all, or enforcing read only/no root). This is nothing at all to do with permission... | 1 | 2 | 5,564 | 2014-06-16T14:37:09.030 | infrastructure | serverfault.com | |
253,687 | Is there a way to avoid type-checking in this scenario? | I have a class [CODE] with two subclasses [CODE] and [CODE] . I have a method in a different class which takes a [CODE] parameter. The method should do different things depending on the type of the object it receives. To illustrate: [CODE] I want to avoid type-checking (i.e. [CODE] ) because it doesn't feel like proper... | Basically, [CODE] should belong to [CODE] instead of your other class, then [CODE] and [CODE] each have their own implementations. Sometimes you might be able to pull only a small part of [CODE] into [CODE] . You might need to make [CODE] an argument of [CODE] . It's hard to say more without more details. The bottom li... | 3 | 9 | 1,598 | 2014-08-18T17:35:03.190 | api_errors | softwareengineering.stackexchange.com | |
1,086,342 | Oracle cloud compute change ssh port fails | I am new to cloud computing and plan to use an always free compute service from Oracle Cloud to obtain a public IP address to run a website. As a basic security measure I require my machines to not listen for SSH on default port 22 as this is too easy to sniff for but swap it to a new port that I will keep secret but I... | I found the answer here This issue is with ufw vs iptables. Although on a reference home install of ubuntu ufw is disabled and iptables is very lenient to give the perception that if ufw is disabled then you dont need to worry about iptables. This is not a good rule of thumb. Oracle cloud has some specific iptables rul... | 0 | 0 | 3,546 | 2021-12-14T22:00:01.573 | api_errors | serverfault.com | |
246,742 | Best datatype to store a ternary, or three-state variable | Disclaimer: I know that datatypes are a little bit subjective to which scripting/programming language you are using, I like to write in Python as a matter of preference; though I am happy to hear about any lanugage/implementation. What is the best datatype to store a three-state variable? Something capable or represent... | Apart from an enum which is the obvious and clearest way of expressing this, the system used for interoperable system where a language-specific enum cannot be expressed is the -1/0/1 option. You may like to try a bitmask though, where 0 means 0, 1 means 'bit 2 set' and 2 means 'bit 3 set' (ie you have 3 bits that can b... | 19 | 10 | 22,662 | 2014-07-03T02:33:40.337 | api_errors | softwareengineering.stackexchange.com | |
66,631 | create a stored procedure if it doesnt exist using a ddl in db2 | My requirements are, I want to create a ddl script which will check if a stored procedure exists on DB, if yes then drop it and recreate it. What I tried is, [CODE] which didn't work. so I even tried with creating another procedure which is doing same task still no success. The error message was DB21034E The command wa... | IBM Added The OR REPLACE option in version 7.1 So your code should work like this : [CODE] | 0 | 1 | 6,087 | 2014-06-05T08:49:08.480 | database_errors | dba.stackexchange.com | |
204,825 | MariaDB / MySQL client table-formatting like `psql`? | I hate to nitpick over style, but for the purposes of use Database Administrators is there a way to clean this up a bit, [CODE] For comparison, with PostgreSQL, [CODE] Can I get the psql output from MySQL or MariaDB? I know `psql, the client for PostgreSQL has a ton of options for formatting the output table [CODE] Set... | Sadly, no, but there are a few options which may help [CODE] , [CODE] Do not write column names in results. [CODE] , [CODE] Do not write line numbers for errors. Useful when you want to compare result files that include error messages. [CODE] , [CODE] Silent mode. Produce less output. This option can be given multiple ... | 2 | 2 | 563 | 2018-04-24T18:02:04.983 | database_errors | dba.stackexchange.com | |
254,165 | How to use -WhatIf in the New-QADUser cmdlet? | I'm writing a powershell script and I want to find out the result of a New-QADUser command if the command fails. I found an argument to the New-QADUser command called [CODE] (which I believe to be run if the cmdlet call fails) but I can't find any good examples of using it, and my attempts to use it have failed. | if a cmdlet fails it returns an error. You can trap errors in powershell. See finding and avoiding errors the -whatif parameter tells the cmdlet not to actually perform any actions but report of what the cmdlet would have done if allowed to. | 1 | 2 | 874 | 2011-03-31T15:04:26.577 | infrastructure | serverfault.com | |
383,926 | CACLS "Access is denied" | I am on Windows Server 2008. I'm trying to set deny permissions for a certain user on the Windows folder with the following command: [CODE] I get the error message "Access is denied." I'm running Command Prompt as Administrator. I also tried ICACLS -- no luck. [CODE] These commands work on individual files within the W... | Access to a lot of stuff in the Windows folder is restricted to the TrustedInstaller account. This is by design. http://msdn.microsoft.com/en-us/library/windows/desktop/aa382530%28v=vs.85%29.aspx | 4 | 2 | 8,892 | 2012-04-27T19:59:48.273 | infrastructure | serverfault.com | |
456,041 | Getting client denied when accessing a wsgi graphite script | I'm trying to set up graphite on my Mac OS X 10.7 lion, i've set up apache to call the python graphite script via WSGI, but when i try to access it, i get a forbiden from apache and in the error log. [CODE] I've checked that the scripts location is allowed in httpd.conf, and the permissions of the file, but they seem c... | Since apache 2.4, [CODE] is required: [CODE] Up to apache 2.2, you would write: [CODE] See upgrading notes . Note that you can activate mod_access_compat to use old (pre 2.4) directives in apache 2.4. It might be useful if you want to quickly rule out this as the cause for your initial issue, but frankly, the migration... | 16 | 26 | 22,772 | 2012-12-07T13:57:50.400 | infrastructure | serverfault.com | |
1,106,295 | how to update linux headers properly in ubuntu 20.04 server | we have given our servers to security check and then they have suggested the below. Installed package : linux-headers-5.4.0-29_5.4.0-29.33 Fixed package : linux-headers-5.4.0-_5.4.0-105.119 Installed package : linux-headers-5.4.0-29-generic_5.4.0-29.33 Fixed package : linux-headers-5.4.0--generic_5.4.0-105.119 Installe... | There are two ways to update them: Run [CODE] (remember to add the focal-updates repo). Compile them from source code. Download the latest source (5.4.0 LTS branch) from https://cdn.kernel.org . Extract the file, run make menuconfig, configure it, run make deb-pkg, wait some time, and then in the parent directory you'l... | 0 | 0 | 2,965 | 2022-07-22T10:39:21.923 | infrastructure | serverfault.com | |
219,736 | Syntax error in SQL Server while making Dynamic SQL | Scenario: I have a table with 100M+ rows of data so I have created an index with something as: [CODE] Now when I execute the following code, it executed in less time: [CODE] Now, I want to create this query as dynamic SQL as these parts [CODE] need to be dynamic and will be sent through the backend. But, when I try to ... | @marcello has the syntax right , but another thing, to prevent SQL injection you can check the values of [CODE] and [CODE] (since I assume those are coming from the user). The direction is easy: [CODE] Column names are a little more involved. You can just use constants to limit to the output columns from the query: [CO... | 1 | 1 | 1,501 | 2018-10-10T08:26:47.830 | database_errors | dba.stackexchange.com | |
231,770 | Error Code: 1239. Incorrect foreign key definition for 'foreign key without name': reference and table don't match | I'm making a new database in MySQL in which after making the Department table I receive an error when adding other tables. [CODE] I had a look at Error 1239: Incorrect foreign key definition but it didn't seem to help. | You need to add column name along with table name. [CODE] | 3 | 3 | 14,501 | 2019-03-10T06:07:57.343 | database_errors | dba.stackexchange.com | |
106,647 | Query strategies using SQL Server 2016 system-versioned temporal tables for Slowly-Changing Dimensions | When using a system-versioned temporal table (new in SQL Server 2016), what are the query authoring and performance implications when this feature is used to handle Slowly Changing Dimensions in a large relational data warehouse? For example, assume I have a 100,000-row [CODE] dimension with a [CODE] column and a multi... | I think, in your case a derived table is necessary to isolate querying number of mutations of postcodes per customer: [CODE] upd: Since the query is supposed to serve DWH/Analytics scenarios, the columnstore indexing is an option to check. I also made some benchmarks previously for a 10 million rows table. | 17 | 1 | 1,387 | 2015-07-10T23:05:43.923 | database_errors | dba.stackexchange.com | |
41,077 | Use specific interface for outbound connections (Ubuntu 9.04) | I have two ethernet interfaces in my computer, which is running Ubuntu 9.04. Both interfaces sport static IPs, but use separate gateways. My [CODE] file looks something like this: auto eth0 eth1 iface eth0 inet static address 10.0.0.5 netmask 255.255.255.0 gateway 10.0.0.1 iface eth1 inet static address 192.168.2.5 net... | You should only have one default gateway. If you remove the gateway line from eth1, it'll all just work (after networking is restarted). | 8 | 12 | 21,326 | 2009-07-15T14:40:18.670 | infrastructure | serverfault.com | |
14,372 | Performance degradation after rebuilding indexes | I am optimizing some server application task that uses database (querying, complex calculations, data insertions...). Execution of this task spends about 16 minutes (I have tested it 3 more times) and it predictable time to do it. Then I executed script: [CODE] for every table in a database. And what I see now. The tim... | It's because when you rebuild indexes, you also necessarily rebuild the statistics on each index as it happens. That means that SQL Server rebuilds internal "tables" of data about the distribution of data in your indexes themselves. The distribution of data indicated by your statistics govern how the cost-based query o... | 4 | 5 | 1,576 | 2012-03-05T12:06:30.203 | warehouse_errors | dba.stackexchange.com | |
183,203 | Oracle data pump import parallel configuration | I am trying to track down a cause for a difference in oracle impdp processing, and I am not finding anything, so I am wondering if anyone here can explain the cause of the differences. At times I have seen times where using the parallel=x parameter in oracle datapump will cause either multiple tables to be inserted at ... | Two common reasons: Each worker thread uses a seperate dumpfile and requires exclusive access to it. If you have fewer dumpfiles than the degree of parallelism you provided, the parallel threads will not be fully utilized. If you have a single dump file, only 1 worker thread can be active. Tables that contain Basicfile... | 1 | 1 | 2,075 | 2017-08-10T17:36:01.607 | pipeline_ops | dba.stackexchange.com | |
301,163 | Any idea how much it costs for 1 Domino license? | Possible Duplicate: Can you help me with my software licensing question? Any idea how much it cost per domino license per year? | I hope you mean the ibm Collaboration licenses. Look here: gemini-systems.com stdi.com I give no warranty that this informations are correct (google is my friend). | 0 | 0 | 1,025 | 2011-08-15T10:17:21.750 | data_quality | serverfault.com | |
34,089 | MySQL InnoDB locking on combined UPDATE-JOIN statements | on querying statements which contain an UPDATE combined with JOIN, we are getting the following errors: [CODE] These statements finally turn into deadlocks and kill other statements trying to access the same table (update: it doesnt even seem the queries care about the timeout, because some deadlocks occure after 5-20 ... | Without seeing your specific query and table structures, it's not possible to give a really precise explanation or to know whether MySQL is being unnecessarily cautious; however, the message you are seeing appears to be a consequence of using [CODE] which you should be able to safely change to [CODE] . The problem is, ... | 0 | 2 | 3,894 | 2013-02-04T13:54:34.150 | database_errors | dba.stackexchange.com | |
759,998 | EC2 - How to route outbound traffic through a single public IP | I have 3 web servers (ec2 instances) in a vpc public subnet, and they all have EIPs. I have the usual Internet Gateway with the route to ensure those instances will be able to call external services, and a load balancer (ELB) rotating incoming traffic between those instances. The main issue is that the application on t... | Yes, you can use either a NAT Gateway or a NAT instance, in conjunction with an ELB... and that is the most sensible way to whitelist your internally-initiated, outbound traffic with external services. A NAT gateway always has a static public IP address. You must [...] specify an Elastic IP address to associate with th... | 7 | 8 | 7,717 | 2016-02-26T11:12:46.027 | infrastructure | serverfault.com | |
34,717 | SQL 2008 publisher -> SQL 2000 subscriber: Is a pull subscription possible for merge replication? | I am trying to synchronize a SQL 2000 SP4 subscriber to a SQL 2008 publisher via a merge pull subscription. When the subscriber tries to run the merge agent, it fails the following error: [CODE] Has anyone had success with this setup? I was able to create and synchronize a push subscription so I know that communication... | Are you able to use Query Analyzer on the SQL 2000 server to connect to the SQL 2008 server? If that doesn't work nothing else will. Start with the basics. Is the SQL Browser running on the SQL 2008 server? Can you ping the SQL 2008 server from the SQL 2000 server? Can you access the TCP port that the SQL 2008 instance... | 0 | 0 | 1,019 | 2009-07-01T21:11:02.080 | database_errors | serverfault.com | |
100,777 | postgres fetch record from partitions without the check constraints | I am using postgres 9.4, I have a [CODE] table that has 100M records, messages belongs to one feed_id, so I decided to partition the tables by posted_at. [CODE] Inherits: messages There is a problem when I try to query parent messages. A parent message can have multiple child messages that posted at different date. I f... | A few details are still not clear, but let's see, what we can do now. First, having about 100M rows and 231 partitions sounds not that good. The resulting tables will be too small, in turn their number too high - I cannot tell the threshold, but at some point the query planning migt get too expensive. I think it is qui... | 0 | 2 | 1,516 | 2015-05-06T16:17:56.977 | data_quality | dba.stackexchange.com | |
1,100,214 | Can postfix log source ports for inbound SMTP connections? | At the moment, postfix logs inbound connections like this: [CODE] This isn't enough information for hosting providers to respond to abuse reports where they use CGNAT. They need the source port to identify the offending customer. Is there any way to make postfix log the source port? Something like this would be ideal: ... | Yes, just set [CODE] to [CODE] . smtpd_client_port_logging (default: no) Enable logging of the remote SMTP client port in addition to the hostname and IP address. The logging format is "host[address]:port". This feature is available in Postfix 2.5 and later. -- man 5 postconf Note that the format does not quite match y... | 2 | 2 | 580 | 2022-05-05T07:54:31.890 | infrastructure | serverfault.com | |
1,125,693 | when does the Windows DNS client resolver switch back to the first server? | https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd197552(v=ws.10)?redirectedfrom=MSDN I know that the client resolver on W10 switches to the second DNS server after trying and failing with the first server for 1 second. But when does it switch back? I know it does afte... | The DNS Client selection of secondary or tertiary responses depends on the number of network adapters, the number of DNS Servers, and if Smart Multi Host Name Resolution is enabled. If enabled (the default), all DNS servers are queried in parallel , and the first response is accepted. If disabled, it does not retry. An... | 0 | 0 | 523 | 2023-03-09T00:40:18.397 | infrastructure | serverfault.com | |
171,477 | Mirrored drive separated and lost one copy | I have a dedicated server with two identical hard drives, which ran in a raid array, mirrored until yesterday, when the datacenter had a power failure and corrupted one of the discs. I figured if I 'break' the mirror (not 'remove'), I would be able to get TWO identical copies of the data, one on the bad drive and one o... | Mirroring:data safety == TSA uniform:flight safety. Windows mirror setups are often all but useless in practice, since whatever corrupts one drive can easily corrupt the other. You're better off to use the second drive as permanent backup media and keep backups as often as practical. Depending on your actual Windows OS... | 1 | 1 | 310 | 2010-08-17T16:01:08.503 | data_quality | serverfault.com | |
323,881 | Straightforward inner join is slow despite using indices and ref/eq_ref types | I have a couple moderately-sized MySQL 8.0.30 InnoDB tables: models - 1,000,000 rows activations - 10,000,000 rows A fairly simple [CODE] takes about 500ms, which seems like a lot (is it?). This [CODE] is run every 1-2 seconds, as I need the value more often than it makes sense to cache. For comparison, I also have sev... | The problem is that for each elibigle activation, MySql has to check if the corresponding model is a test, before it can be counted. There are 50.000 activations on average, so 50.000 checks. An index on [CODE] doesn't reduce the number of checks, and even an index on [CODE] is not useful for your query, since most mod... | 2 | 1 | 207 | 2023-02-22T00:10:15.010 | api_errors | dba.stackexchange.com | |
1,659 | Do we need to require everyone to give a locale? | Let's go over how we got here. Harper posted this HNQ answer which says (in part) Do you follow any of the warnings we give around here about the danger of 3-prong (groundless) range receptacles... and you think "Why does a 240V oven need 120V?" The oven light. That's right. The dangerous setup is solely so consumers c... | My own take, if the person answering is being helpful, particularly to the OP asking the question, adding a requirement like this to every question would be an undue burden. Not only on those providing a helpful drive by answer that won't be back to resolve any clarification requests in the comments, but especially on ... | discussion,localization | 4 | 1 | 119 | 2022-01-07T20:08:59.250 | other | diy.meta.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.