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
250,783
Why a hashtable? Why not just a non-hashed associative array?
I've been learning about using a hashtable to efficiently check for items in a list without looping through the whole thing, but there's one thing that I don't get: Why hashed keys? It seems like: [CODE] Would work just as well as: [CODE] What's the performance difference between looking up a hashed key and a simple na...
Because you still need a way to search the associative array. The hash table is your search mechanism; it gives you O(1) performance for any given key search, by computing an index into the bucket containing your item. What is your underlying search mechanism, if it's not a hash table? A Binary Search Tree? That's good...
2
7
3,335
2014-07-22T21:26:50.800
api_errors
softwareengineering.stackexchange.com
770,874
Setting the system date to a day in the past on Windows 2012
I have an business application that uses the system date for all of it's date processing. We need to be able to fix the date to a particular date, and at midnight, reset the date back to this fixed date. This was all possible in Windows Server 2003, and though we had to connect to file shares on the box using the IP ad...
I used to work at a place that did this with a training system. (I don't remember which version of Windows it was, but it certainly wasn't 2012--it was 2003 or 2008.) Basically, they had to use only local accounts because Kerberos will not allow you to connect to a server whose system time is five months out of date (o...
0
3
3,205
2016-04-16T18:39:55.910
api_errors
serverfault.com
316,922
Oracle PL/SQL: Trigger Syntax
I'm kinda new(like 1 year of experience) in PL/SQL and i have to make a kind of tricky trigger, and i want to check if my syntax is correct, mainly the selects, inserts and variable value store i make . So, i want to have a trigger that, when i insert a new row on a table, i have to make a select to that table to store...
You cannot select the based table within the (row-level) trigger. Instead of [CODE] use [CODE] When you use [CODE] then schema and table names are case-sensitive - which is possible but rather uncommon for Oracle. [CODE] is different to [CODE] . Oracle default object names to uppercase. This does not make any sense: [C...
1
0
226
2022-09-15T11:27:19.203
data_quality
dba.stackexchange.com
369,232
"Base Python" vs "System Python"
I've been using this term with a loose understanding as heard in the phrases "uses base python", "built on base python" that basically suggests a python project that only depends externally on Python Standard Library modules alone. I've recently been exposed to the lingo of [CODE] , and seeing comments like [CODE] head...
Without the context where the terms comes from, guessing its meaning is no easy task. system imports Querying the python documentation for the terms "system imports" bears no interesting result. Yes, it is imprecise to refer to standard library modules as system imports . system python Specific reference for system pyt...
-1
2
1,231
2018-04-11T22:00:05.833
api_errors
softwareengineering.stackexchange.com
222,971
Missing wsrep variables in mysql / percona / galera cluster
I set up a small mysql/percona/galera cluster using the percona cluster docker image, with 3 nodes. I followed the documentation written here After starting up the whole cluster, I'm missing some of the wsrep variables. For instance wsrep_local_state_comment . (among many others) Does anyone knows why is this happening...
After starting up the whole cluster, I'm missing some of the wsrep variables. I'm not sure if this is the issue, but [CODE] is not a wsrep variable, it's a status variable. Which means you have to use [CODE] rather than [CODE] , i.e. in this case: [CODE] And more generally: [CODE]
0
1
142
2018-11-20T13:05:23.490
pipeline_ops
dba.stackexchange.com
637,497
Vagrant private IP not found after network change
I've got a simple Vagrant Ubuntu virtual machine setup using Virtual Box, running on a Mac. I'm using private networking, configured with a static private IP like so: [CODE] This works fine, except for when I switch back and forth between wifi and my wired network. When I do, I can't seem to connect to the VM with it's...
It seems that the network adapter for VirtualBox can be restarted easily at the command prompt by running something like the following (will be a little different on your system) [CODE] Note that you'll have to replace [CODE] with whatever your virtual network adapter is for VirtualBox, which you can find out by: Start...
2
6
7,466
2014-10-16T12:27:15.880
infrastructure
serverfault.com
78,159
What could cause "Permission denied" for command `crontab -e`?
Here's some output that I hope is helpful: [CODE] Problem: Crontab does not have setguid, and is not in the crontab group. [CODE] Solution: As root... [CODE]
Does [CODE] have the [CODE] permission set? -rwxr-sr-x 1 root crontab 32K 2008-09-28 14:07 /usr/bin/crontab* If not, [CODE] it (and if needed, [CODE] before that) Edit: Note that this only applies to Vixie Cron (used by most distros); other daemons (such as [CODE] ) may use different permissions ( [CODE] ).
30
15
103,180
2009-10-25T20:57:17.697
infrastructure
serverfault.com
44,476
Merging dataframes in Pandas is taking a surprisingly long time
I'm trying to merge a list of time series dataframes (could be over 100) using Pandas. The largest file has a size of $\approx$ 50 MB. The number of rows and columns vary (for instance, one file could have 45,000 rows and 20 columns, another has 100 rows and 900 columns), but they all have common columns of "SubjectID"...
I ended up using the native csv library to read in the files row by row and store each row into a nested dictionary of lists. I also wrote a function to check if 1) the row already exists in the dictionary and if it does, move on to the next row, 2) if the row doesn't exist, see if it can be merged on a column with an ...
5
1
15,608
2019-01-24T04:59:16.090
data_quality
datascience.stackexchange.com
725,973
NFS ACLs do not apply to root
I've been using CIFS for my networking for the longest time, and I'd like to use NFS for my Linux to Linux file distribution. I've got a share drive that I've set a sticky group on, which appears to work okay when mounted via NFS except when root is writing. So on the fileserver there is a directory called media that I...
Classic NFS handles the root user specially. You might try setting the [CODE] option in your exports file on the server. See [CODE]
2
0
984
2015-10-01T07:30:49.990
infrastructure
serverfault.com
441,920
postfix disable smtpd error notifications
How can i disable postfix smtpd error notifications? Here is message headers: [CODE]
looks like i found answer here : i removed [CODE] from [CODE] directive protocol [CODE]
3
3
3,149
2012-10-24T17:35:20.693
infrastructure
serverfault.com
1,007,804
Cloudfront infront of ELB and kubernetes is showing Default backend (nginx-ingress)
Having kubernetes cluster with nginx ingress, pointed to AWS ELB load balancer and Route 53 domain pointed to this ELB is working just fine. Now I am trying to add cloudfront, it's pointing to load balancer, but it shows 404 Default backend all the time. It seems cloudfront is not passing domain correctly, or am I miss...
A quick search surfaced an Amazon support article that claims you must whitelist headers in order for CloudFront to pass them along, and apparently [CODE] is not one that is in the default whitelist There's a similar question which discusses some more scenarios
2
2
3,992
2020-03-21T14:03:28.480
pipeline_ops
serverfault.com
58,363
"My unqualified host name (foo.bar) unknown" Problem
When trying to start [CODE] or send a mail using a wordpress plugin , this error shows up in the [CODE] : [CODE] After Googling the best advice was, "add foo.bar to the /etc/hosts file", but it already is: [CODE]
Simply changed: [CODE] To this [CODE] [CODE] looks for a fully qualified domain (FQDN) name and will use the [CODE] in the single line version.
44
65
88,683
2009-08-25T11:28:49.540
infrastructure
serverfault.com
4,817
py2neo AddressError When Connecting to neo4j in Docker
I am having difficulty creating a [CODE] object on Neo4j 3.4.6 using py2neo 4.10 with Python 3.7.0. I created a Docker container running Neo4j, and I disabled authentication using Dockerfile entry [CODE] . I verified that I can browse to the Neo4j database from the host with http://localhost:7474 and that I was not req...
I had a similar error while using a virtual environment using PyCharm. In my case, I was using an upgraded version of neo4j-driver in my virtual environment compared to my host environment. I downgraded neo4j-driver from 1.7 to 1.6.2. Make sure you have neo4j-driver installed in general.
1
1
413
2018-08-22T23:59:30.560
pipeline_ops
devops.stackexchange.com
48,660
Comparing binary 0x and 0x00 turns out to be equal on SQL Server
It seems that SQL Server considers 0x and 0x00 equal values: [CODE] This outputs [CODE] . How can I get true binary bit-for-bit comparison behavior? Also, what are the exact rules under which two [CODE] values are considered equal? Also note the following behavior: [CODE] Background of the question is that I'm trying t...
I couldn't find this comparison behaviour specified anywhere in BOL. But the Connect Item Invalid equality comparison for varbinary data with right padded zeros states that Basically, the standard leaves it up to implementation to treat strings that differ only by [trailing] [CODE] as equal or less. We treat it as equa...
8
6
11,998
2013-08-24T11:06:18.690
data_quality
dba.stackexchange.com
254,456
Synchronized access to network industrial equipment
I have an industrial equipment which is controlled by a software. The software connects to it using sockets, and keeps the connection all the time alive, while from time to time sending commands to the equipment. Now, this equipment is represented by a class which encapsulates the sending and receiving of data. Next, I...
Either solution would work. It is a generally good idea to apply a lock when writing to such values. If you're expecting a lot of reads, then you could use ReaderWriterLockSlim to put a write lock on it, which would prevent other threads from writing the value, but it could be read with no locking whatsoever. This assu...
1
2
178
2014-08-26T08:14:35.017
api_errors
softwareengineering.stackexchange.com
1,091,496
LDAP finds user, but "permission denied" when logging in
I am setting up an LDAP client in Red Hat 8. After setting up the config files I did an LDAP user test and it came back successfully: [CODE] If I run an [CODE] it returns successfully with the expected results: [CODE] But if I try to [CODE] to the Red Hat 8 machine from another machine then I get this error: [CODE] I h...
I finally found a solution, by creating a custom [CODE] profile with custom [CODE] , [CODE] , and [CODE] files. 1. Create custom profile based off sssd [CODE] 2. Overwrite [CODE] and [CODE] with the following settings [CODE] 3. Overwrite [CODE] with the following settings [CODE] 4. Select new profile [CODE] 5. Restart ...
1
1
6,737
2022-01-28T15:49:28.973
infrastructure
serverfault.com
31,610
problems during training a MLP type of network
I trained a neural network model, a MLP type of network, where the first several layers are 1-D convolution for processing sequence type of input. However, the training process looks like as follows, where the orange line represents the validation loss and the blue line represents the training loss. The validation loss...
When the training loss is lower than the validation loss, the model is said to overfit the training data, i.e. it has learned so much from the training data that it only adjusts well to it and it can't generalize to new data. This phenomena is regarded as the variance of the model . The bias of the model is the differe...
1
1
259
2018-05-13T20:52:07.210
data_quality
datascience.stackexchange.com
111,026
Single Server Multiple Virtual PCs remote access to Virtual PCs
We want to setup one mega server (8GB RAM, Quad Core Processor) and install Virtual Machines for the following tasks. Virtual Machine for SVN server, Bug tracker Virtual Machine for Sharepoint portal development Virtual machine for IIS deployment for client access we will be port forwarding request to virtual machine i...
You can have multiple developers access different VMs using VNC and port forwarding, but I'd suggest assigning different IPs to each VM and using a bridged rather than NAT'd network configuration. If you use NAT, the behaviour of accessing a VM differs depending on if you're accessing it from the main network or a diff...
0
2
149
2010-02-09T07:46:07.363
pipeline_ops
serverfault.com
245,185
Is it useful to index a column if it is already the first column in a composite index?
Suppose I have this table (simplified from my project): [CODE] As you can see, the primary key is a composite of the BillID and TaxCode columns and uses a clustered index for speed. All queries against the table will seek on BillID, but some queries will seek on both BillID and TaxCode. Also, all queries will include o...
Given these queries, is it useful to create a separate (non-clustered) index on just the BillID column? First, note that an index on BillId will include TaxCode. The clustered index key is the row loacator for this table, so every index must contain it. And for non-unique indexes, the clustered index key columns are ad...
3
1
476
2019-08-13T00:19:54.487
database_errors
dba.stackexchange.com
72,399
Scale out to between 0 and 1 before computing loss fucnction in keras
Is there a way to scale the output of a CNN before computing the loss function in keras. It would have to work for batches as well. Specifically I am training images and the output is a probability map of each pixels for the entire batch. Then I compute the loss function with the ground truth data. The problem is that ...
Use Lambda layer [CODE]
2
1
84
2020-04-15T23:22:59.090
data_quality
datascience.stackexchange.com
892,414
Why does the VNC server lose its configuration when rebooting the system?
I have installed a VNC server but there is a problem, when restarting I lose the geometry and color depth configuration. Having to stop service, reconfigure geometry and color depth. Someone knows how these data can be configured so that they are still present at restart. This is what I've done to install and configure...
Try to add the following line to your Unit file (/etc/systemd/system/vncserver@:1.service) [CODE] Here is the complete Unit file in my system (an Ubuntu 17.04 system): [CODE]
0
0
868
2018-01-16T11:20:41.167
infrastructure
serverfault.com
973,474
Can I use a different nameserver for a domain that is a nameserver itself as ns1.domain.com
My example.com domain used as the name server for all my other websites and domains, the following name servers have been setup as nameservers on different IP address and servers: [CODE] Can I use the following name servers for all my other website but set another 2 nameservers on CloudFlare to route example.com itself...
There aren't restrictions for it. You can use any domain names for [CODE] records of zones.
-2
0
78
2019-06-30T19:39:16.713
infrastructure
serverfault.com
280,030
Hardware Solution to connect to multiple ISPs for one WAN
I'm looking for a piece of hardware to connect to different types of ISPs, normal DSL, cable DSL and USB egde sturfstick to offer one Internet connection with a higher cumulated bandwidth. I'm pretty sure something like this exists, but I don't know how to call it or where I can find something like that.
It is link aggregation and one of the more popular technologies to achieve this at the carrier and higher-end networking level is via MLPPP (Multi-Link Point-to-Point Protocol).
1
2
236
2011-06-13T19:23:54.420
infrastructure
serverfault.com
654,667
Iptables block connection from specific IP - to another IP
My server with dnsmasq will send Facebook.com (for example) to DNS 8.8.8.8. All other websites go trough another dns server. When i use:sudo iptables -A INPUT -p udp -s 8.8.8.8 --sport 53 -j DROP With that rule facebook.com is not reachable for everyone. I want this only for 1 or more IP's.. not for everybody.
To define a source IP for a rule, you use [CODE] . In this example, you want to add [CODE] to your line. [CODE]
-2
1
353
2014-12-24T19:27:46.250
infrastructure
serverfault.com
120,613
Closing idle connections with iptables
I have a server application that does not remove idle connections (resulting from for example client or communication failures). Is it possible to configure iptables to monitor activity on sockets and close connections haven't had any activity for a specified amount of time?
I don't believe there is anything iptables can do about this. Iptables generally just operates on packets being pass through the kernel.
0
1
1,738
2010-03-08T08:26:01.383
infrastructure
serverfault.com
43,609
.Net Runtime Error with Error ID 0 -
I'm getting the following error on a web server and have no idea what's causing it. The error is: [CODE] The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You ...
Well, you've got a .NET app that's not behaving somewhere (to point out the obvious). It's not necessarily an ASP.NET app, though, it could be something else. Something things I would try going along the ASP.NET culprit idea: make sure your app is not sharing an application pool with another ASP.NET app using a differe...
1
1
5,403
2009-07-21T16:21:05.123
infrastructure
serverfault.com
265,936
Fetch data if exist in distinct of another column
I am trying to generate the query to fetch the data on the basis of company which have tax paid record in each year of : [CODE] I know the above query is wrong. Will you please rectify it? Sample data are as below: Script : [CODE] TestData Table : [CODE] Expected Result : [CODE]
I could achieve the result you expected with this query: [CODE] It doesn't have a [CODE] though.
1
2
60
2020-04-27T17:22:42.103
warehouse_errors
dba.stackexchange.com
126,974
Multivariate time series forecasting - model selection
I have historical data on customer contracts. I know the date a customer terminated their contract and the date they notified of this termination. For example, a customer could end their contract in March-2024 and notify about it in January 2024. I have applied some transformations to the data and created a time series...
are these the raw data? what does the raw data look like? you may be missing many important features, especially if you have individual data (higher granularity) and you are grouping everything. from what i can tell you a few useful points based on what you provided so far. use time series cross validation techniques l...
1
2
87
2024-02-21T20:37:59.693
data_quality
datascience.stackexchange.com
626,581
Client computers (W7) asking update PDFCreator printer drivers (2008R2)
For over 18 months it has been working. Suddenly, without any updates (server is not connected to the Internet) and nothing is being pushed to it, all client computers (over 100 of them) are asking to update printer drivers. Is there any known cause for that? All client computers are frozen with Deep Freeze, so it's su...
Obviously, the PDFCreator printer drivers come packaged with an application that automatically "phones home" from time to time to check for updates. It phoned home, found an update, and is now prompting your users to install it. To stop this from happening again, you would remove or reconfigure this application so it d...
0
0
298
2014-09-05T17:12:24.593
infrastructure
serverfault.com
1,081,603
Is it possible to set up an alias on an Active Directory domain controller Linux server?
We have a Red Hat Enterprise based Linux distro that is the domain controller for a bunch of Win 10 clients. Some clients are not in the right AD domain (they are on a former domain that was used before the server crashed and was reconfigured before I came here.) I can't change them to the right domain because I can't ...
This is not how domains work. They won't be able to login or otherwise work correctly with the new domain even if you were able to set up "alias". Use tools, (e.g. [CODE] ) to change admin passwords in those computers, then join them correctly into the new domain.
1
3
302
2021-10-25T09:56:43.080
infrastructure
serverfault.com
309,845
MySQL running but not connecting to Drupal Database.
Our School Drupal site died after upgrade. MySQL is running but cannot connect to database. MyphpAdmin returns Error 2002. ![Screenshot of MySQL activity.][1] Drupal 6.22 (after attempted upgrade) with MySQL 5.1.37 running on Apple Xserve 10.4.11. How can I reconnect to database and recover Drupal data? driscollx:/usr/...
Have you run [CODE] yet? If not, your database is unaffected; simply roll back the content of your DocumentRoot and you're back in business. If you did, then you might have a more-complex problem on your hands. Assuming you ran update.php, or if you'd just prefer to actually update your site instead of doing a rollback...
0
0
238
2011-09-09T18:49:47.463
database_errors
serverfault.com
1,041,476
Dynamic outbound IP on Azure
I have a REST API that is protected by the Cloudflare firewall, and a client of mine who uses my API started to have problems with using the API, because his IP that connects to my API has a bad reputation on HoneyProject. He informed me that his system is hosted on Azure with a fixed IP, but the connections coming fro...
Assuming he is using a VM in Azure, there are 4 ways to set the outbound IP: Assign a public IP to the VM Put the VM behind a load balancer with a static IP assigned Use virtual network NAT Use an Azure Firewall If it is not a VM we will need more details of what they are using.
0
0
94
2020-11-06T01:31:02.937
api_errors
serverfault.com
211,108
Having multiple ResultSets in parallel on same connection.. Will it cause any problem? [Mysql/Postgres]
I have tried out the following in my local machine using jdbc/mysql: step 1: conn = getNewConnection step 2: stmt1 = "new statement" using connection 'conn' step 3: stmt2 = "new statement" using the same connection 'conn' step 4: resultSet1 = execute stmt1 step 5: resultSet2 = execute stmt2 step 6: operating on both re...
SQL is not made for parallelism. Adding such in your code will only make things more complex, and possibly slower. For now, focus on writing non-parallel code. When finished, you may need to ask the question of "how can I make this faster", with the sub-question of "would parallelism help". The former question may invo...
0
1
324
2018-07-02T08:19:36.843
database_errors
dba.stackexchange.com
116,816
FLUSH TABLES WITH READ LOCK not working?
I use this command to "lock" my database, flush logs , take a LVM snapshot and release it. Testing the recover + binlogs , appear it's not working. (I discovery this when during the recover, applying the binlogs give error of duplicate key where supose not should exists at that moment) The behave I get is the data file...
Found the reason my script failed. The lock is released when the connection is finished. Appear be quite obvious, but I don't remember read at any place about this behave and since few commands are able to execute from prompt with mysqladmin (not this case) induce to wrong interpretation of FLUSH behave. My first scrip...
2
1
3,885
2015-10-02T13:31:42.383
data_quality
dba.stackexchange.com
75,814
List of mail servers using DKIM, SPF and SenderID
I am setting up Postfix mail server. What I want to know is that, what the popular mail server's like yahoo, gmail, AOL, Microsoft Outlook server etc. use for sender identification of e-mails. e.g: Which one use SPF or DKIM or SenderId etc. Any listing enumerating about these properties would be highly useful. Thanks i...
Yahoo! uses DKIM. Google uses both SPF and DKIM. Microsoft/Hotmail use SenderID, which is a slight variation of SPF. Outblaze (Now IBM iNotes) uses neither. What is your actual goal though?
3
3
1,183
2009-10-19T07:24:59.630
infrastructure
serverfault.com
1,106,775
Installing Hyper-V on Windows Server 2022 reduces host system CPU to 1 core 1 thread
Bit of an odd situation, I've installed Windows Server 2022 (desktop experience) on a server, installed MegaStorage MSM and the relevant drivers from Supermicro and any Windows updates. When I install the role HyperV (just the Windows feature Hyper V, not any VMs), my host goes from 8c16t to 1c1t. I thought it might be...
We have the same behavior with one of two servers in a HyperV Failovercluster. Host1 and Host2 shows all cores/cpu's in Device Manager, but Host1 only runs on one core and one CPU. Also visible in TaskManager. Reinstalled, new BIOS, reset BIOS, latest updates. Supermicro distributor is trying to help, but no clue... No...
0
0
1,460
2022-07-27T17:28:06.207
data_quality
serverfault.com
128,511
Linux crypted filesystem : is there actually big issues?
as a SaaS provider with sensitive informations we think about crypted filesystem (under Linux) but is there any problem about performances or maintenance if the filesystem crash? We want to use it on Mysql server for web application with medium load but high peeks of visitors. Thanks, Regards Cédric
1) There is a performance hit. That might be low enough for you to handle... or maybe not. You'll have to test in your environment. 2) FS crashes aren't any worse with encryption, though when booting into whatever recovery console you use (main system , or a boot cd) you'll need to have all the encryption tools and pas...
0
2
223
2010-04-01T15:51:04.320
database_errors
serverfault.com
523,389
Linux clock loses 10 minutes every week
One of my linux server's clock loses 10 minutes every now and then, nearly every week. I update the time so it stays correct, and although it doesn't really bother me, i'd like to fix it. I've been searching around a bit. Nothing can be responsible in the crontab, and i can't find any related message in the logs. Some ...
HyperV is the disease, NTPd is the cure. Where to look or what i could use to monitor those date change? You can query the NTPd daemon (via the [CODE] client) to get the difference between local clock and the NTPd servers reference clock. But that implies actually running NTPd so you are not monitoring your changes alo...
3
3
2,682
2013-07-15T14:16:44.387
infrastructure
serverfault.com
30,689
Get contents from old .CSR
At one of my new customer sites, I have a SSL certificate which is about to expire. I've been notified by my provider of expiry. The previous admin was pretty detailed and I've located the .CSR which was used to request the about-to-expire certificate. However, this host is a debian host, and I've confirmed that the .C...
Try this: [CODE]
3
6
1,645
2009-06-24T00:36:51.057
api_errors
serverfault.com
5,516
Is it common to track defects found during code reviews?
In " Applied Software Measurement " and " Code Complete " the authors state concrete numbers for removal efficiency of defects found during code reviews (formal, informal etc). Is it common to track defects found during code reviews? What about informal reviews; I could imagine that it is quite difficult to persuade de...
At my current workplace, we don't distinguish between different ways that bugs are discovered. If a developer expects the test team to test the bug fix, they log it. If they don't expect the test team to test it, they don't log it. They understand there actions have consequences, and so they make that decision carefull...
3
5
1,258
2013-01-13T18:31:39.267
data_quality
sqa.stackexchange.com
114,820
Fix a Truecrypt Volume
I've have a backup volume using truecrypt (USB Disk, entire disk (eg /dev/sdb)) accidentally added to a Windows System and then using windows that disk has been initialized. No other action has been taken on that disk. The disk no longer mounts. Assuming no other external sources (backups of the headers etc) is it poss...
My understanding is that without a backup this is impossible by design. http://www.cgsecurity.org/wiki/Recover_a_TrueCrypt_Volume
1
1
746
2010-02-19T22:56:45.287
database_errors
serverfault.com
629,114
high cpu usage on 2811 router
there is high cpu usage and high intterupt rate on 2811 router while there is low rate traffic about 10 Mbit. How can i fix this problem. output of sh processes cpu sorted 5sec | exc 0.00 command that [CODE]
Cisco provides a troubleshooting document for this issue, it's relatively useful. http://www.cisco.com/c/en/us/support/docs/routers/10000-series-routers/15095-highcpu.html
-1
0
2,308
2014-09-17T07:53:04.457
infrastructure
serverfault.com
45,264
Spread SQL Server data files across devices to improve performance?
Would it improve performance of a database in SQL Server if I place the [CODE] (rows data) and [CODE] (log) files on separate sets of raided disks, as opposed to having both files on the same set of raided disks?
All performance solutions are based on measurements. As the theory goes, SQL Server requires the transactions to flush to durable storage (disk) before acknowledging commit ( WAL ). This makes the log write throughput critical for high write loads. Separating the LDF file on a separate physical disk allows the log writ...
3
12
2,274
2013-06-26T07:52:21.420
database_errors
dba.stackexchange.com
609,287
mysql: Unable to Grant while using root user, what could be the reason?
I have a mysql server which i'm able to log into using root password (no password) but for some reason I'm unable to grant other users access to mysql. When I run: [CODE] I get this error: [CODE] I've tried doing the next steps in order to fix root user: [CODE] When I check root's user in mysql, I can see it has all th...
I've done everything I know to fix this issue without re-installing mysql but to no avail... I believe a file got corrupted or something, otherwise I can't imagine why I bumped into these errors. I've saved mysql data on some external disk, re-installed mysql, copied back the data and now it's working like a charm. Tha...
1
1
1,265
2014-07-01T13:02:21.533
database_errors
serverfault.com
603,738
windows 2008 always keep local dns in first
I have a windows 2008 system and it always keep ::1 in first of the dns setting. I can see the following in "ipconfig /all": [CODE] and "Obtain dns server address automatically" option in network interface setting is disabled. I installed active directory once and uninstalled now, I think it's the reason. But I can't f...
[CODE] is an IPv6 address, so you have to remove it from the list of IPv6 DNS servers, not the IPv4 list. Windows unfortunately keeps two separate lists...
3
3
119
2014-06-09T00:36:20.887
infrastructure
serverfault.com
524,325
Change a virtual machine Notes attributes in esxi shell
I have tried to change via ESXi shell the attribute field with the following command: [CODE] but it doesn't change the attributes and doesn't give me any error. Is there any command to do that? I am using ESXi 5.0,
You can do this using PowerCLI . [CODE]
1
0
109
2013-07-18T09:12:19.413
infrastructure
serverfault.com
1,094,503
Trunking between two Cisco 3750s to another desktop switch
So I'm trying to scrape all the memory I have from college where we used Cisco almost a decade ago, but I haven't touched them since then. I'm trying to clean up our internal network a little bit because we currently have 4 little 5-8 port switches sitting on a shelf connected to our firewall, but we had 2 Cisco 3750s ...
I would see another solution to your problem than trunking to a non managed switch that would not allow it. I have more a router background than an expert on switch, as such if your switch in the remote office does not support VLAN I suggest to you to make sure the gateway used by those computers is routed correctly to...
0
0
34
2022-02-22T21:47:17.800
infrastructure
serverfault.com
98,987
Webmin doesn't work fine behind reverse proxy
I have Webmin configured to listen on localhost:1000 and nginx configured to listen on my.domain.tld:80 with reverse proxy pointing to Webmin. This configuration works fine but sometimes I get 404 errors and HTTP headers say that this is Webmin's miniserv puts 302 redirects into them: HTTP/1.0 302 Moved Temporarily Dat...
I had a very similar problem. However, my problem was specifically that after you login to Webmin, it would redirect to the non-proxied address and port. To further illustrate, assume I wanted webmin to appear to the outside post-proxy on ' https://example.com/admin/webmin ', but it's really running on ' https://exampl...
1
4
7,891
2010-01-03T11:56:16.190
infrastructure
serverfault.com
735,045
yum "Transaction Check Error" pointing to files that do not exist
I am trying to install a boost148 package. This is a separate package from the boost, which I have installed and is version 1.41. [CODE] But when I try to install Boost148 using [CODE] I receive the following [CODE] So I checked to see if boost148 is partially installed [CODE] Nothing Shows up. Also if I try to ls any ...
You actually do have a couple of conflicting packages on your system: [CODE] and [CODE] provided by [CODE] (whoever he is). I have no idea how these got on your system, as .sroycode's repo doesn't seem to be in the list of installed repositories. To resolve the problem, get rid of these packages, then try your installa...
1
1
5,627
2015-11-09T18:40:33.367
infrastructure
serverfault.com
576,100
error 404 with WordPress on ISPConfig3
I had a shared server with Wordpress and now I'm transferring everything to a dedicated server running ISPConfig. I changed the DNS so that the dedicated server is the one showing the website. I transferred the entire web folder to the new server (/web/_entire_wp_files_folders) I also transferred the database. I can ac...
I didn't transfer ALL the files. I missed the hidden .htaccess file. Now everything works except the index, but it seems that the db flushed itself for that one page !
2
1
1,567
2014-02-17T07:39:40.420
infrastructure
serverfault.com
110,279
Cross Validation after using train-test to decide optimal algorithm to use?
I am interested in training different algorithms on a data set and observing performance metrics. Currently, my approach is to train different algorithms on train data, and then evaluate performance on a test set. Then, I use a [CODE] with cross-validation to find the optimal hyper-parameters for the best-performing mo...
The main issue is to obtain a reliable estimate of performance. It's important to take into account that both stages (the selection of the algorithm and the hyper-parameter tuning) are training stages themselves, therefore the resulting model (after selection, and only this model) should be evaluated on a fresh test se...
1
0
30
2022-04-22T17:22:44.347
data_quality
datascience.stackexchange.com
290,714
How to set statement timeout per user?
I have multiple users in Postgres. I would like to set up different statement timeouts for different users. Eg: Guest 5 minutes and Admin 10 minutes. Is it possible in Postgres 11.11?
Yes, Postgres allows settings per user or even per database and user, including [CODE] : [CODE] Related: How does the search_path influence identifier resolution and the “current schema” To see the currently active setting for the session: [CODE] Or get more details from the view [CODE] (including how it was set): [COD...
8
15
18,455
2021-04-29T11:03:52.967
warehouse_errors
dba.stackexchange.com
586,230
Disable auditd immutable mode without rebooting
Hello I've been tasked with fixing up a auditd policy but it's on a server that's actively being used and the policy installed was set immutable. I've tried searching and everyone recommends rebooting to escape immutable mode… But is there really no way to code up something that, as root, removes immutable mode without...
Charged this windmill many times. Proper security posture requires that the rules be set to immutable (-e 2), to prevent "bad guy" from changing it and hiding his "bas activities" from the sys admins. The "bad guys," if they exist, will attempt to change the auditd rules far more often than the system administrators wi...
3
3
15,980
2014-04-02T17:13:54.303
infrastructure
serverfault.com
238,951
SQL: Comparing multiple dates
I got a table with multiple columns that contain DateTime namely [CODE] up to [CODE] . In my stored procedure, the user will have to input a date ( [CODE] ). Now I have to compare the inputted date to the 8 dates which will filter all the data. The problem is that I have to get the two closest dates (out of eight dates...
[CODE] fiddle If there are duplicated dates in [CODE] fields within the row, the [CODE] returned will be random. To avoid use RANK() instead of ROW_NUMBER() and use [CODE] fiddle
0
0
3,091
2019-05-24T04:00:29.117
database_errors
dba.stackexchange.com
497,161
give user access permission to selected folder only (AD 2003)
I created a Global Security Group (MIS_Dept). and user A as a member. The folder (IT Folder) which i create that is exclusive to access for MIS_Dept only has a setup like this: Sharing Tab : Do not share this folder Security TAb: Administrator, Creator Owner, SYSTEM , MIS_Dept Now, when I try to log-in to another user ...
I'm doing this from memory and not actually looking at an '03 server. Try this. Under the "Sharing" tab enable to share it and either leave the share name alone or change it to whatever. Under the permissions (Permission button?) remove everyone in there. Add the user, "Authenticated Users" and then click all of the ch...
0
0
3,935
2013-04-08T08:26:06.177
infrastructure
serverfault.com
223,516
ERROR 1130 (HY000) not allowed to connect to this MariaDB server facing issue in granting permission
I am trying to connect to mariadb running different container.Getting below error $ mysql -u root -h test-mysql --port 3306 [CODE] Mariadb Server: I tried the following MariaDB [(none)]> SELECT host, user FROM mysql.user; [CODE] MariaDB [(none)]> GRANT ALL PRIVILEGES ON . TO 'root'@'%'; [CODE]
The [CODE] statement doesn't work because the user@host combination [CODE] doesn't exist (yet). You can create it and then re-run the [CODE] : [CODE] The [CODE] part gives the user the power to [CODE] privileges to other users. Note that in order to be able to connect from the other container, you may also have to remo...
1
4
15,037
2018-11-27T06:28:35.787
pipeline_ops
dba.stackexchange.com
508,729
How to debug and prevent flaky unreliable IT environment?
I am not an IT admin, I'm a software developer (microsoft stack) and I'm trying to understand what is wrong with the IT environment of one of our customers. We have deployed our client\server solution to a medium sized business. The problem is, the customers IT environment (mostly various types of Microsoft servers - s...
Generally reliability in IT is provided by a few different practices, namely: Access control Change management Configuration management Revision control Secret Sauce Access control is simply limiting who can make changes to critical/production systems. Change management is generally handled through access control and v...
-4
4
142
2013-05-17T17:33:15.110
database_errors
serverfault.com
78,329
Updating a table with a single UPDATE statement vs several UPDATE statements
CREATE TABLE `messages` ( `mes_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT 'номер объявления', `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'дата/время дачи/изменения объявления', `expire` date NOT NULL COMMENT 'Дата истечения объявления', `paid_top_cat` tinyint(1) unsigned NOT NULL DEFAULT...
When update executed once it's guaranteed that all rows that satisfy conditions will be updated (or none in case of error). 4 separate updates may update different rows (something may change between updates, and you're using MyIsam, so transactions won't help; in addition, your [CODE] depends on non-deterministic [CODE...
0
1
240
2014-10-03T16:12:32.473
database_errors
dba.stackexchange.com
565,574
Change DNS Handling From Zerigo Without Downtime
Zerigo have just removed their free plan. As a result I need to switch out my DNS handling. The problem is that the site is live, so I need to minimize any downtime. Currently Zerigo handles both the naked domain and the [CODE] subdomain. So far as I can see I need to do the following: Switch nameservers back to my dom...
Set up DNS elsewhere then change the nameservers via your registrars to those new servers. There is no technical requirement requiring a domain to 'point at' a name server to set up that zone. Set everything up, then cut over. Your DNS provider may not allow you to 'add' a domain without changing the nameservers first ...
0
3
277
2014-01-07T14:08:31.817
infrastructure
serverfault.com
1,008,661
Freeswitch drops calls after 32 seconds
So I've installed Freeswitch on a raspberry PI 3 and it's dropping calls after 32 seconds. I've googled extensively and this appears to be a common problem but all of the people with the problem had complicated setups with external gateways, VPNs, NAT, multiple subnets etc. In my case I'm using almost bog stock config,...
So I solved this. I captured packets for calls that were working and calls that were not. It appeared Freeswitch was actually asking the clients to respond on an IP address that was similar to my public IP but not the same. The clients that worked appeared to ignore this and just respond locally. Some clients would do ...
2
5
2,305
2020-03-27T10:40:40.893
infrastructure
serverfault.com
1,121,644
What needs to be open to the Internet for Office 2019 applications run smoothly?
In a tightly closed down environment, I have a linux machine acting as router with a fireHOL firewall (iptables), limitting not only inbound traffic, but also outbound traffic. Office 2019 applications running on windows 10, suffer from frequent hangs and freezing. We do not think this is related to bad installations (...
Office 365 URL and IP list https://learn.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide If you use web filtering I have Sophos example https://support.sophos.com/support/s/article/KB-000038173?language=en_US#Method-1
0
0
324
2023-01-31T22:55:15.047
infrastructure
serverfault.com
342,082
Apache2, Multiple IPs, multiple vhosts one SSL
i'm setting up an apache2 server based on debian squeeze. I want to serve multiple websites using multiple IPs. Some of them need a certificate (one certificate for every website). Well, my server has 3 IPs (let's say 0.0.0.0, 1.1.1.1 and 2.2.2.2) i've already set up multiple vhosts for the 0.0.0.0 and 1.1.1.1 IPs, one...
It seems that your server might not be listening on port 443. Do you also have virtual hosts configured for HTTPS? E.g. [CODE]
0
1
339
2011-12-18T10:44:36.307
api_errors
serverfault.com
155,828
How do I select distinct json columns?
I have over 10,000 geojson rows in a table. How do I go about selecting only distinct coordinates? The data was imported from a csv file into PostgreSQL 9.5. The columns in the table are: Trip Duration (seconds) Start Time and Date Stop Time and Date Start Station Name End Station Name Station ID Station Lat/Long The i...
You'll want PostGIS's [CODE] . [CODE] Should work to get the points. However may find this is faster... I'd be interested in seeing a benchmark. [CODE] will eliminate duplicate points and geometries too. [CODE] Update Is it faster, what advantages and disadvantages does this have? [CODE] requires a [CODE] . faster to s...
1
0
4,794
2016-11-21T02:24:01.930
database_errors
dba.stackexchange.com
15,190
Why TensorFlow can't fit simple linear model if I am minimizing absolute mean error instead of the mean squared error?
In Introduction I have just changed [CODE] to [CODE] and model is unable to learn the loss just became bigger with time. Why?
I tried this and got same result. It is because the gradient of [CODE] is harder for a simple optimiser to follow to the minima, unlike squared difference where gradient approaches zero slowly, the gradient of the absolute difference has a fixed magnitude which abruptly reverses, which tends to make the optimiser oscil...
11
17
1,894
2016-11-17T13:10:22.037
data_quality
datascience.stackexchange.com
387,196
Dell MD1000 and an x4 SAS connector throughput / layout
I'm trying to get my head around how a multi lane x4 SAS connector works in a DAS system such as the Dell MD1000. I understand that each lane is 3Gbps, and that multiple hard drives can share a lane. What I'm having trouble finding information on is how are drives assigned to a lane, and how does that change when you d...
You'll be massively oversubscribed. A single 4-lane SAS link at 3Gbps == 12Gbps total throughput. There's an expander on each MD1000 enclosure, so your 45 (SAS or SATA) disks will easily saturate that link. That's a theoretical max throughput of 1.5 Gigabytes/second over that connection - 12 Gigabits/sec == 1.5 Gigabyt...
6
5
3,832
2012-05-08T18:03:34.237
infrastructure
serverfault.com
801,855
CentOS7: configure static ip and ifconfig: command not found
All I am trying to do is assign a static IP to a server. As per instructions online, I made following changes in the [CODE] [CODE] After this I ran : [CODE] After which I try running [CODE] and I get: [CODE] I cant ping google.com or install any packages using yum, for example when I try to run [CODE] , I get the follo...
First of all: https://unix.stackexchange.com/questions/145447/ifconfig-command-not-found now, short story: [CODE] long one: Reading good documentation is the solution: you can find some information there . Inside that book you have nmtui .
-1
0
823
2016-09-08T13:17:13.660
infrastructure
serverfault.com
111,912
Performing a text classification based on a dictionary
I have been given a kind of dictionary which maps a category with a set of certain strings. A sample of the dictionary is given below: This is all I have, there is no other data. There are around 46 categories (DT5 Category) and in the similar way all categories have a few keywords associated with them. Now I am suppos...
As defined, there's no ML in this problem: the program would associate each keyword to a category, so it would consist of a loop over the words in the documents, and inside the loop there is an if statement: [CODE] That's it, this is the full rule-based classifier. But this would not be a good system of course. Two of ...
3
3
915
2022-06-17T17:18:36.487
data_quality
datascience.stackexchange.com
107,106
Trouble with IIS SMTP relaying to Gmail
I appreciate that similar questions have been asked about how to setup SMTP relaying with IIS's virtual SMTP server. However I'm still completely stumped on this problem. Here's the setup: IIS 6.0 SMTP server running on Win2k3 box with a NAT'ed IP. Company uses Gmail for all email services. An app on the box needs to s...
We tried going this route too, but relaying email can be quite difficult. After struggling with the Windows SMTP server for a couple months, we gave up and created an SMTP Proxy which we uploaded to CodePlex. You can use it for free and it is much simpler to use and maintain.
4
1
8,736
2010-01-28T08:26:40.700
hadoop_errors
serverfault.com
64,951
Assigning host names to linux virtual machines
I'm a web developer and most of my work from running CentOS or Ubuntu servers from VMWare Fusion on my Macbook. I interact w/ the servers wholly over SSH and like this set up very well. One problem I am running into, however, is that when I switch between wireless networks, the IP Address of the virtual machines change...
I use Zeroconf for this. Install avahi-daemon on the servers and they announce themselves as "hostname.local." - you then just need zeroconf support in your clients. OS X have it built in, Windows get it with Apple Bonjour package. I am not certain about Linux, but perhaps avahi has client support.
0
0
503
2009-09-13T18:39:14.707
infrastructure
serverfault.com
147,617
IIS Manager won't let me create an application
Had a thing at work today on a Windows Server 2003 box. In IIS Manager I'm trying to create an application for a directory. So I've brought up the properties dialog and clicked the "Create" button and it did absolutely nothing - no error, the application name box stays greyed out and there's no gear icon on the folder....
I just created a sample virdir under my Default Web Site and I see the below entry in Metabase.xml file. Sometime, the IIS UI does not reflects the changes made in the Metabase and hence can be misleading. Check the entry [CODE] I didn't had to restart IIS for the same. Alternately, you can try Metabase Auditing to ver...
0
0
220
2010-06-02T22:06:50.383
infrastructure
serverfault.com
577,015
How to stop double-bounce FROM sender in postfix
I am getting huge amount of these in my mail log, and unable to find its originator. What could be the reason? Here is log entry: [CODE]
The double-bounce messages are used by postfix for address verification. You may find more detail here... http://www.postfix.org/ADDRESS_VERIFICATION_README.html
5
7
17,210
2014-02-20T10:32:32.003
infrastructure
serverfault.com
413,052
Is it an anti-pattern on React to search for children with a specific element type?
Context When designing the API of a React component, you may decide to receive props in a more semantical way. Here's a simple example [CODE] A more complex example would be this one, where we have a table and we need to set responsiveness: [CODE] In both scenarios, I'd strongly argue the second design brings more bene...
It’s not a big issue to use [CODE] on structured, nested data. It’s not surprising if [CODE] elements renders differently compared to [CODE] . If you want to be explicit, you can always use the render props pattern. As an example, you can pass refs for calling imperative methods from the parent, or pass a callback to i...
1
1
568
2020-07-23T22:40:09.983
api_errors
softwareengineering.stackexchange.com
868,705
After updating ssh, root login from only one IP does not work anymore
I've configured the ssh server in one of my PCs to allow root login from only one PC. This worked just fine, until I updated ssh (currently, the server is running Debian Jessie). Here is what my sshd_config looks like: [CODE] Here is the result of doing ssh -v root@p00: [CODE] Just to be clear, the update was done to t...
The following construction has one issue: [CODE] It is described in the manual page for [CODE] : For each parameter, the first obtained value will be used. This means that [CODE] will never get used. To avoid it, write the configuration the other way round: [CODE] Edit: If the [CODE] -based [CODE] blocks stopped workin...
0
1
609
2017-08-15T10:37:19.000
infrastructure
serverfault.com
1,114,090
Different ports are serving different SSL certificates
I have an nginx server with ssl set up using certbot. Someone else set up the server originally. The main files are served at the root of the domain, and there is a node api running on port 4040. The problem is that while the SSL certificate for the root domain works fine (eg. https://example.com/some/path ), the SSL c...
I figured it out, and really should have caught this earlier. The node server that I'm running for the api handles serving the SSL certificate on it's own through the https module. Because the app didn't restart after the certificate was renewed by certbot, it was still serving the old certificate. Restarting the node ...
0
0
436
2022-10-26T16:41:20.350
api_errors
serverfault.com
325,816
Agile User Stories for Deep Thought Machine
If You've seen Hitchiker's guide to the Galaxy, you know that Deep Thought (pictured below) is a machine that was built to compute the meaning of life: Let's imagine that we were tasked with building this machine using Agile Scrum, and to use User Stories. There really only appears to be one Story, which is: "As a user...
Since there is no such thing as a "true agilist", I'll make up my own definition. A "true agilist" knows that a larger story is composed of smaller stories. Agile practices teach us to relate these stories to users, and to break down these stories into smaller and smaller piece until we end up with individual pieces th...
4
2
747
2016-07-26T16:13:32.473
api_errors
softwareengineering.stackexchange.com
175,246
Mongodb error after db repair command
I was working with MongoDB using Pymongo Libraries. Suddenly MongoDB stopped. I restarted it. After a while it stopped again. So I searched and tried the following repair command: [CODE] The process kept running. But I stopped it using the keyboard interruption. Now When I am trying to use start the server using my con...
OK.. You have managed to get your self in middle of mess. As it says: UnsupportedFormat: Unable to find metadata for table:index-3--243586308771972589 Index: {name: id , ns: admin.system.version} - version too new for this mongod. See http://dochub.mongodb.org/core/3.4-index-downgrade for detailed instructions on how t...
0
1
2,668
2017-06-02T05:37:49.080
database_errors
dba.stackexchange.com
282,450
Full Permissions on Shared Folders for Local Administrators
I am not sure if this is normal or not, however it seems network shares on our domain are given full access to users that are admins on their local machine if the server\Administrators security permissions is set. Is this standard? It poses a fair few issues for setting up permissions as my predecessor has set all sort...
It probably sounds like the users are added to the administrator security group in ADUC.
2
1
1,432
2011-06-21T03:00:42.397
infrastructure
serverfault.com
68,968
What are some significance tests to rank features(multiple) before training the data
I have 8 features for a classification problem. The target value tells if there was an anomaly or not. I want to run some significance tests to rank each feature, as being a distinctive feature of anomalies. Could you please suggest some significance tests for this in Python?
One of the easiest ways to do this is with a correlation matrix. Variables that are correlated with the value you are predicting will probably be good predictors. Here is a good answer on how to do that in Python: https://stackoverflow.com/questions/29432629/plot-correlation-matrix-using-pandas However - be careful. If...
0
1
59
2020-03-01T23:10:48.943
data_quality
datascience.stackexchange.com
384,574
Improving SSHFS performance when reflecting changes in host directory
I have an SSHFS mount from a Ubuntu Server VM guest, mounting a host Mac OS X directory. Changes made directly in the Mac OS X host directory take approx 5 - 10 seconds to reflect in the Ubuntu Server VM guest mount. I am using the following command... sshfs user@host: ~/host What additional options (if any) will impro...
SSH is not designed to be a file transfer protocol. SSHFS works by periodically looking at the directory list and caching results. You can control the caching behavior, but at the cost of performance as it relates to interactivity. If the SSH host you are connecting is accessed via a high latency link, or slow connecti...
16
19
27,419
2012-04-30T15:04:00.707
infrastructure
serverfault.com
169,230
best way to backup data from disk failure?
As lots of people prefer to backup data to multiple backup storage, this is not a perfect choice. Lets say a video file stored in a server which connected to hundreds of other server in cluster. The backup mechanism automatically backup every day to backup storage. But one day, bad sector happen (permanent disk damage)...
Maybe something like a monthly snapshot of the data, in addition to whatever other daily/hourly backups are taking place. Static data benefits from this, in that it never changes, so a backup from last month end, is the same as the month before, and so on. It sounds like you are talking about a simple 2 month 'full' st...
2
3
403
2010-08-11T12:30:16.273
database_errors
serverfault.com
943,158
Include location depending on server_name
I have a need to serve some static data only in a specific testing environment. I'm trying to do the following: [CODE] I get an error: nginx: [emerg] "location" directive is not allowed here in mypath... So how could I do it another way?
Pay attention to the context in which nginx directives may or may not be used. You cannot use a [CODE] or [CODE] directives within an [CODE] block. Additionaly, you need to check [CODE] variable instead of [CODE] . The only way I see without defining second [CODE] block is to define alternative root: [CODE] and put you...
1
0
621
2018-12-06T15:12:30.447
infrastructure
serverfault.com
332,569
Is this a balanced or unbalanced binary tree?
Good day, I am new to java and new to this forum but I request a bit of help. I am learning java on my own and I am currently learning binary trees. I have come an algorithm that is giving me a little issue. It is a binary tree code that basically inserts five nodes into a tree structure and then traverses the tree. My...
Your code, as written, will produce a tree that looks like this: [CODE] A properly balanced tree looks like this: [CODE] So, no. this is not balancing your binary tree. This is simply constructing a sorted binary tree with a balance that is totally dependent on the sequence of insertion. Depending on the order of [CODE...
0
4
1,745
2016-10-02T00:46:32.680
api_errors
softwareengineering.stackexchange.com
904,346
Wait for service to gracefully exit before machine shutdown/reboot
How do you write a systemd service that gracefully shuts down upon machine shutdown or reboot? In particular, it should delay machine shutdown until it exits gracefully. I have a service that takes 10 seconds to shut down: /usr/local/bin/shutdowntest.sh: [CODE] I set TimeoutStopSec to 15s in /etc/systemd/system/shutdow...
The comment from Bigon is correct. I was looking in [CODE] , but this is written by [CODE] , which systemd stops pretty early in the shutdown process (as indicated by “Stopped System Logging Service” below). After I enabled persistent journald logging instead ( [CODE] in [CODE] and [CODE] ), [CODE] shows that my servic...
14
8
23,684
2018-03-24T01:09:11.557
infrastructure
serverfault.com
1,020,374
System-wide redirect traffic to local proxy server using iptables
The code used in my example is taken from a [CODE] tutorial but it doesn't do the job for me. I'm trying to redirect all my tcp traffic through a local proxy server. [CODE] I receive this error when executing the script: [CODE] . I think I'm missing a rule but I can't figure out which one.
you would have to create [CODE] before, hint: try TPROXY target (in PREROUTING / mangle ). ( only valid in the mangle table, in the PREROUTING chain and user-defined chains which are only called from this chain) . they have a good example : [CODE] from the manual: It redirects the packet to a local socket without chang...
0
2
1,868
2020-06-07T12:18:02.877
infrastructure
serverfault.com
541,072
Is it possible to execute the Vagrant Ansible provisioner on a Windows host machine?
It seems that Vagrant doesn't let me automatically provision the Ansible provisioner on Windows using Vmware. I'm not really sure whether Ansible has to be installed on the host machine, (in my case Windows) or on the guest. I tried to automatically provision the guest machine with the following shell script: [CODE] Wh...
I've had success installing Ansible (and subsequently running a playbook) onto a new Vagrant guest with the following bash script (tested with Ubuntu 13.04): [CODE]
6
6
4,049
2013-09-23T18:26:01.310
pipeline_ops
serverfault.com
185,631
PostgresSQL PITR
I have a master\server setup with pgpool and postgres 9.5. Both servers are running on centOS7. I wanted to setup a point in time recovery with base backups every saturday, eliminating the old xlogs. The server is archiving the xlogs with success on a external filesystem. But when i try to execute the basebackup comman...
Sounds like you're using [CODE] with a user named [CODE] , or you're using a program that calls [CODE] If you don't specify the database name, [CODE] tries to connect to a database with the same name as the username Try setting the PGDATABASE environment variable: [CODE] or [CODE]
-1
0
53
2017-09-11T15:35:36.677
database_errors
dba.stackexchange.com
416,113
MSSQL Express Logfile ist too big
Its on a SBS2008 Server, and we're running out of space. when checking what's the reason i found that the Errorlog from MSSQ is using above 50 gigs (see Picture) How can i solve this? google doens't show me the right solution..
Run sp_cycle_errorlog . Schedule that to happen semi-frequently (once a week maybe?).
3
4
117
2012-08-09T21:56:41.113
infrastructure
serverfault.com
309,233
Apache serves some files, others get 403
I've just setup a CentOS 5.5 install with Apache and Mapserver. While trying to do the tutorial for mapserver, I've found that Apache returns 403 forbidden when accessing any of the tutorial files, yet for any file I create and upload it serves it normally. When checked with [CODE] the permissions are exactly the same,...
I suspect that you have SELinux set to [CODE] by the default. And it is the cause of this problem, check with: [CODE] or: [CODE] Try this: [CODE] and let me know if it works.
5
6
1,676
2011-09-08T03:59:34.670
api_errors
serverfault.com
64,345
Can someone explain what batch size is doing in convolutional NNs?
I've noticed that the performance of my models vary quite a bit as a function of the batch size, both in terms of the time to converge and (possibly) the amount of overfitting.I thought batch size was simply controlling the number of images sent to the gpu / cpu at any given time, but I can't match that up with this be...
Batch size determines how often the weights are updated during training. The smaller the batch size, the more frequent the updates. On the other hand, when the batch size is small, updates are made without evaluating a large portion of the data at hand so at times, the gradient may be moving in a direction other than m...
2
1
225
2019-12-06T17:13:23.963
data_quality
datascience.stackexchange.com
1,079,449
Cant install certbot using snap return: Run configure hook of "certbot" snap if present
I want to install certbot using snap, but when I tried Official instruction : [CODE] but returns: error: cannot perform the following tasks: Run configure hook of "certbot" snap if present (run hook "configure": /var/lib not root-owned 1000:1000) Previously, I uninstalled certbot(from apt) by using the below command: [...
I just need to change [CODE] folder to root user using bellow command: [CODE] In other server, [CODE] folder and the inside is owned by root. I don't exactly know why the user of the folder on this server is not root, after changed it now I can install certbot and use it.
0
0
2,336
2021-10-04T02:53:20.247
infrastructure
serverfault.com
157,268
PHP5 module makes Apache 1.3 segfault
I am trying to get PHP4 and 5 to work with Apache 1.3. PHP4 is compiled as a module and currently works fine, although Apache does display the following warning upon starting: [CODE] So I compiled PHP5 using the latest source. I get the same warning, twice now for each PHP module, but then Apache gets a segmentation fa...
You can't load both modules at the same time because they export the same symbols. This inevitably leads to crashes. You have to use (F)CGI for one of them.
0
0
215
2010-07-03T14:36:46.740
infrastructure
serverfault.com
237,599
How to view who gets kicked from my SQL Server Script?
I have a maintenance job in SQL that was failing because of an application that was holding a lock for a specific user. I'm now running a script before the step that runs the maintenance job to kick the user. Now the maintenance job runs without issues. I'd like to get output from the step as it runs so I can see in th...
In the Job Step Properties, on thew Advanced page, enable the option to include step output in job history: Then include a PRINT statement in your cursor loop to output the details of each KILL. Example: [CODE]
2
1
86
2019-05-07T23:04:34.573
database_errors
dba.stackexchange.com
699,636
How to delete journal on ext3 network drive
Something happened when I was copying files to a ext3 drive (via network, mounted by samba) and I lost ability to write anything to this HDD. After I used dmesg command it is explained: [CODE] I investigated problem further and found out tha the journal is probably corrupted. It was suggested that I should: unmount dri...
The problem is not the journal itself. You have an unreadable block (ie: The disk is failing) that corrupted the journal or another metadata, so simply get rid of the journal is not the right solution. I strongly suggest you to backup all you can and to replace the failing disk.
0
2
891
2015-06-17T11:52:10.547
data_quality
serverfault.com
27,363
Selenium login method guidance
I have a Login method that accepts an ENUM e.g Customer.VALID or Customer.INVALID and I use cucumber to login with a valid or invalid customer using that, however I want to change it to just accept username/password for more re-use cases. How do I handle this situation: hit the login box with credentials (user/password...
Tests should only test one use case of your product. It's bad practice to expect variance in this context as the test should either test a correct login or an incorrect login. In my opinion you should write two tests that test both these cases and should not mix them.
1
1
300
2017-05-20T11:03:16.977
data_quality
sqa.stackexchange.com
5,381
How can I add an existing OS install to the Windows Vista boot manager?
I had Windows Server 2003 installed on my primary hard drive. I then added a new hard drive and formatted/installed Windows Vista on the new hard drive. The old drive with Windows Server 2003 is still on my system as D: but I don't have the option to boot to it. Is there any way to set it up so that I can choose which ...
EasyBCD will make handling this a tad easier (though nowhere near as cool as doing it manually with bcdedit ;) Here's a Microsoft KB about various bootloader problems with BCD and legacy/boot.ini systems.
1
5
814
2009-05-06T16:33:21.290
infrastructure
serverfault.com
344,961
Debian 3.1 / Apache2 does not restart after update
I just ran updates with apt-get on my debian 3.1 server updating apache2 and php. After the updates I can't get my apache server up again. [CODE] gives no error but checking the processes the server is not running afterwards When I try to start it by [CODE] I get the error [CODE] I already checked with netstat but no p...
Are you sure you are root ? Usually the logs error comes if your are a normal user. You need to be root to have access to port 80.
0
2
293
2011-12-29T09:24:08.630
infrastructure
serverfault.com
936,869
Postfix: Email Forwarding - Relay Access Denied
I have a system that we've setup as a mailserver to forward all email that comes into it for that domain to other external email addresses. I've been digging around and found this tutorial which I thought would be perfect as it did exactly what I want it to. The problem that I'm getting is that it says Relay access den...
virtual_alias_domains = testdomain,org Shouldn't that be [CODE] ?
1
0
660
2018-10-23T20:53:25.823
infrastructure
serverfault.com
333,509
Aggregate SCD Type 2 data "as of" each day
Problem When working with SCD type 2 data it's easy to see the state of a table "as of" a given point in time by using your date columns, eg: [CODE] and [CODE] . For example: [CODE] You can then group by or use window functions to aggregate. But what if I want to do that repeatedly, for each date in a range (eg: daily)...
Turns out I was very much overthinking it. Thank you to this Stack Overflow post for reminding me of the basics, particularly that you can just join [CODE] [CODE] with comparisons, and SergeyA's comment: just make a list of dates and join to it. Here is one complete solution ( db-fiddle ): [CODE] as_of_date event_id re...
1
0
83
2023-11-28T05:58:00.027
database_errors
dba.stackexchange.com
995,832
Check RAM speed on virtual machine
On a bare metal server, I'm able to get the RAM speed by running: [CODE] Speed: 2400 MHz Configured Clock Speed: 2400 MHz On a virtual machine though, the output is always the same: Speed: Unknown Configured Memory Speed: Unknown Is there any way to know, or even roughly benchmark, the RAM speed on a virtual machine?
dmidecode reads information from the system BIOS. This may or may not be supported or reliable on different platforms whether on physical or virtual hardware. Name brand server hardware is likely to report supported memory from the vendor, while an inexpensive workstation is less likely to report any meaningful data in...
1
1
3,221
2019-12-17T07:33:38.970
infrastructure
serverfault.com
4,971
How to access maximum volume of tweets using Twitter Streaming API, without firehose access?
Twitter is a popular source of data for many applications, especially involving sentiment analysis and the like. I have some things I'm interested in doing with Twitter data, but here's the issue: To get all Tweets, you have to get special permission from Twitter (which, as I understand it, is never granted) or pay big...
Topsy - The site provides much more rate limit, and has archived all the tweets from 2006. Its API provides a free trial. A solution that is paid will be Gnip's Full history search API
4
1
462
2015-01-28T19:24:07.543
data_quality
datascience.stackexchange.com