3,538 questions
0
votes
2
answers
43
views
How to use DROP DEFAULT in MySQL 8?
I'm using MySQL: Server version: 8.0.36 Homebrew
I'm trying to remove the default value of a column (currently set to 0), and it's erroring:
ALTER TABLE comments ALTER COLUMN commentable_id integer ...
0
votes
0
answers
42
views
The zsh v5.9 on OSX v15.1 fails on tests like [[ -n "$SSH_AGENT_PID" ]]
Helping a friend who has a Mac, knows nothing about shell programming. Hopefully someone with access to zsh 5.9 on OSX 15.1 (or later) has a solution. I've checked this in older versions of OSX and ...
0
votes
1
answer
41
views
Reading default registry key value in from a batch script without registry type
I would like to find the proper batch script command line to read the default value of a registry key and store the result in a variable.
I found many examples to achieve this, but all of them keep on ...
0
votes
0
answers
13
views
Why do these apache wildcard virtual hosts cause unexpected results?
I was trying to have apache configured to have a default VirtualHost that would reply to any request that doesn't match any other VirtualHost, e.g when ip is typed in browser.
While trying a ...
1
vote
1
answer
67
views
How to skip default named arguments while setting a named variadic argument in a function call?
I have an existing method:
public function dbQuery(
string $query,
bool $flag1 = false,
int $flag2 = SOME_DEFAULT,
bool $flag3 = false
)
Now I want to adapt it so it is possible to ...
1
vote
1
answer
43
views
How to change a default setting temporarily in PostgreSQL?
In my psql script all foreign key references include the clause on delete cascade on update cascade, because the default is on delete no action on update no action:
create table x (
y bigint
...
1
vote
1
answer
84
views
Effect on synthesis when adding default to a unique case
In System Verilog, I want to instruct the synthesizer to infer a parallel check of some conditions, thus I am using a unique case. I am also adding a default statement. What I would expect is the ...
1
vote
0
answers
42
views
Error output from Process empty when error occurs
I'm trying to wrap some defaults read and defaults write commands into a macOS tool. I figured I could use the Process to run the tool and capture the output:
func runDefaultsCommand(arguments: [...
1
vote
1
answer
66
views
Windows PowerShell Get Registry '(Default)' 'Value Size' and 'Value data'
If I use regedit, I can view Registry 'Computer\HKEY_CURRENT_USER\AppEvents'.
The only entry is:
Name (Default)
Type 'REG_SZ'
Data (Value not set)'
If I double-click on the '(Default)' entry:
Value ...
0
votes
0
answers
157
views
Warning: Ie: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead
Warning: Ie: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
I am using next 14.2.10 version this warning ...
0
votes
0
answers
51
views
Dynaconf: how to set a key's default value for all elements in array
consider the following configuration file:
#settings.toml
default_datapath = "/data"
[[hosts]]
address = "192.168.10.4"
name = "foo"
[[hosts]]
address = "192.168....
1
vote
2
answers
305
views
Why does Eclipse use an old JRE by default?
I installed Eclipse 2023-06 (4.28.0) and tried to make a new Java project using JavaSE-20. I don't actually know what I'm doing with this, I just figured I should be using the most recent versions of ...
0
votes
2
answers
86
views
How do I deal with default values in extern functions?
The basic function:
void foo(int bar=99){
};
And in the #include'd routine:
extern void foo(int);
foo();
This doesn't compile as it says 1 argument is required for foo(). If I make it:
extern void ...
1
vote
1
answer
58
views
creating case_when function with two inputs, one numeric and one string
I have to do a bunch of conditional recodes where the variable to be recoded is numeric but the conditional variable is string. I've created a function that takes the two variables as input and then ...
0
votes
0
answers
64
views
c++ default constructor can't build an object [duplicate]
c++ default constructor can't build an object.
class Data {
};
int main() {
Data data(); // this way can't build data.
Data data1{};
Data data2;
}
Data data(); can't step in ...
0
votes
1
answer
424
views
How to Add a New Default Column to an Existing Table in Google Big Query?
Current Situation
I have a bigquery table called orders containing some columns, and about 0.5 million rows.
What I Need
The table needs to have a new column, called ingestion_time, of type DATETIME ...
0
votes
1
answer
584
views
How can I set a default baud rate in TeraTerm?
When I launch TeraTerm for use on a serial port (like a USB port), the default (initial) serial settings are 9600 baud rate, 8 data bits, 1 stop bit, and no parity bit. It's possible to change these ...
0
votes
1
answer
143
views
Switch case: Return from impossible default case
What to do if I use a switch case in a function, and the default case should not happen, yet I must return something?
I tried to program some cellular automaton, where there are two possible cell ...
0
votes
1
answer
151
views
Visual Studio 2022 - Multiple Publish Profiles - Publishing a file using context menu
In VS 2022, Right-clicking any file in my project (html, js.. et) it gives me an option to "Publish" it. I also have multiple profiles in under Properties>PublishProfiles.
If I publish ...
0
votes
0
answers
38
views
How to fetch blocked contacts list in android without making it default dialer
I need to display a list of blocked contacts from the device. I want to retrieve this information without setting my app as the default dialer. I understand that accessing blocked contacts usually ...
1
vote
0
answers
49
views
R: Default argument scoping [duplicate]
A colleague of mine ran into an interesting problem with R. We managed to work around it but want to understand how R (internally) handles the scoping of default arguments for user-defined functions. ...
1
vote
1
answer
73
views
Rails: Form that sets up default values for an object?
Say I have an object that has some attributes with default values. I set up the default values for these attributes at a model level like so...
after_initialize :set_defaults
def set_defaults
...
0
votes
0
answers
20
views
Android default sms app transfer data google sms app
Android default sms app transfer data google sms app it is possible?
my app by default sms app, i filter one number if sms receive another number i need transfer data to google sms app.
0
votes
0
answers
279
views
Android Studio New Empty Activity Kotlin-based project - default code: is there a way to override this?
When I create a new Empty Activity project in Android Studio (Koala 2024.1.1. patch) Android studio creates a MainActivity.kt file with this code in the MainActivity class:
class MainActivity : ...
0
votes
0
answers
12
views
How do I set default webpage in web.com for .Net 3.5 server
I am trying to set my default page via web.config on a 3.5 server to default.aspx. How do I do that?
I cannot find the area in the web.config to insert the following recommendation found elsewhere ...
2
votes
1
answer
150
views
How can I hinder ggplot from overwriting arguments to default that have been set before?
I am frustrated from ggplot2 overwriting arguments that have been set before. In fact I encouter the described problem with different ggplot2 functions, but in order to illustrate what I mean I write ...
1
vote
0
answers
106
views
Flask not creating default session cookie. Why?
I'm creating a basic web app in Flask. I want a way to identify users to persist between pages in the app, without the hassle of a user logging in. For this I'm making my app read the 'session' cookie ...
1
vote
1
answer
35
views
Add default locale when I enter URL for the first time
Hello I want to add locale to my URL.
When I start the app my "default URL" is http://localhost:5173 and the page looks like this:
I get this error:
And I want to get this:
To get it I ...
0
votes
0
answers
49
views
Laravel migration default
**I'm following the 4 hour laravel tutorial on youtube and I'm using a windows and he was using Mac,
After doing the part in validation and store listing this happened to my code**
<?php
namespace ...
0
votes
1
answer
52
views
How can I get the list of registered browsers from a script?
In System Settings, Desktop & Dock, I have this:
How can I get the list of apps appearing in that dropdown from a script? AppleScript or even Zsh would be great.
I use different browsers for ...
0
votes
1
answer
91
views
SQL Server setting a default format when displaying columns
In SSMS or Visual studio writing:
query: select 1.234567 -> display: 1.234567
query: select format(1.234567, 'n') -> display: 1.23
For a long query it is heavy:
select format(1.234567, 'n'), ...
0
votes
0
answers
32
views
Shiny.fluent is setting the default value not only on the start of the app
The default value should set only one time if the app is started not every time if the focus is on the pivot element.
Example : change the default value and click on another pivot element and go back. ...
0
votes
0
answers
56
views
Why don't cygwin permissions simply inherit from parent folder in NTFS?
Whenever I create a new file (on NTFS) using a cygwin terminal session
the permissions do not inherit from the container, nor indeed do
they seem logical.
For instance in my windows Documents folder (...
3
votes
1
answer
785
views
Set Type Typescript has no isSubsetOf
I would like to use sets like they are implemented in MDN with typescript.
I have the latest typescript installed in my package:
"typescript": "^5.4.5"
and in my tsconfig I have:
&...
0
votes
0
answers
44
views
Remove default class function (like .ToString) from a class
As asked in the title, how do I remove default functions from class (like .ToString, .Equals, .GetHashCode, ...) ?
Bellow example of the class itself :
Public Class FontConstants
Public Shared ...
0
votes
0
answers
49
views
Code runs but only I change the out put type from class library, to different output type, and then back to class
I am working on creating an ASP.NET webpage on .NET 4.8 framework. When I first launch my code from Visual Studio, I get a server error in '/' application stating:
The resource cannot be found.
...
0
votes
1
answer
49
views
Why does choosing the app as the default launcher create a new activity without destroying the current one?
I'm encountering an unexpected behavior in my Android app where selecting the app as the default launcher leads to the creation of a new activity instance without destroying the current one.
My ...
1
vote
0
answers
60
views
how to set my own message in event.returnValue in beforeunload function
window.addEventListener('beforeunload', (event) => {
event.returnValue = 'Are you sure you want to leave this page?'
updateapi();
})
I want to show above message only instead default ...
0
votes
0
answers
41
views
Is it possible to populate list of values in ansible's defaults/main.yml
Having a custom inventory data structures and input arguments of a role, I want to populate those input arguments from inventory data structures. Is it possible to somehow populate list in a loop?
For ...
1
vote
1
answer
224
views
How do you change the default startup code on BlueJ?
Every time I start BLueJ up, create a new project, and create a class in the project, and open the editor, it defaults to some pre-written code, and I was wondering if I could change that so every ...
0
votes
2
answers
57
views
Is there a way to call method from an extended class in a interface default method?
I got like 10 classes that should implement an interface.
Those classes also extend a type of another class, either directly or as subextended class. I cannot change those classes i extend, because ...
0
votes
2
answers
193
views
How do default values of Class fields work in JavaScript
I saw this piece of code in MDN while I was learning some syntax about Class in JavaScript today, which really confused me. Here it is:
class Rectangle {
height = 0;
width;
constructor(height, ...
0
votes
1
answer
66
views
How to get kivy to set its defaults in the Config at runtime?
How can I tell Kivy to update a given Config with its default values at runtime?
I have a "reset settings to defaults" button in my app that deletes all of the entries in my Kivy Config, ...
0
votes
1
answer
180
views
KQL How to display default rows for every case even on no match
With KQL, is there a way to generate extra rows in the results table, for every possibility in a case statement, even if there were no matches from the dataset? This is to save the front end from ...
0
votes
0
answers
123
views
Why doesn't kotlinx.datetime.LocalTime XML deserialization with Jackson use default kotlin values?
I was trying to de-serialize an XML payload with a nullable kotlinx.datetime.LocalTime field. However, I encountered an error suggesting that my field was in fact not declared as nullable even though ...
1
vote
1
answer
461
views
How to set a default value for a flag in cobra
Is there a way to define a default value for a flag (VarP) in the cobra?
func (f *FlagSet) VarPF(value Value, name, shorthand, usage string) *Flag {
// Remember the default value as a string; it ...
0
votes
2
answers
97
views
Set multiple variables to the same if they are not set
Is there a shorthand for the following:
$a ??= []; # Note: $a ??= [] is equivalent to $a = isset($a) ? $a : []
$b ??= [];
#...
$z ??= [];
One possible solution is:
foreach (array("a", "...
0
votes
0
answers
16
views
How can we set new java parameters as default?
We are upgrading our system to java 17. However, we need to set some parameters after the transition. It is very difficult to add new parameters one by one to 200+ Tomcat jvms running on 10+ servers.
...
1
vote
1
answer
193
views
Python pyodbc BACKUP DATABASE TO DISK getting default MSSQL backup path added
I'm writing Python to backup MS SQL database to a different server. When I put the //remoteServer/share/filename into command, I get:
pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][ODBC ...
0
votes
0
answers
38
views
This script is opening default browser but I facing issue on navigating url on Brower url fields
Code:
public static WebDriver driver;
public static Logger logger;
@Parameters({"Browser_name","Browser_version"})
@BeforeClass
// @Test
public void ...