Css calc() function, operator + [duplicate] - css

This question already has answers here:
Disable LESS-CSS Overwriting calc() [duplicate]
(5 answers)
Closed 6 years ago.
I wanted to do something in CSS with the calc() function but I have a problem.
I try to do this operation and have an error in console :
width: calc(~"33.33333333%" + unit(20, px));
Console show this message :
ParseError: Unrecognised input in
C:path\translation.less
on line 24, column 3:
23
24 .title {
25
Process finished with exit code 1
Yet if I do this, I have no error :
width: calc(~"66.66666667%" - unit(20, px));
Someone would be able to help me and make me understand why this error by changing the operator?
Thank you

Ok, I solve it with trying this :
~"calc(33.33333333% + 20px)";
And it's perfect working.

Related

pyqt6 WindowContextHelpButtonHint [duplicate]

This question already has answers here:
How to check MouseButtonPress event in PyQt6?
(2 answers)
Closed 11 months ago.
In PyQt5 I use this code to hide the Windows Dialog help question mark. I cannot find an equivalent flag in PyQt6.
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
Resolved, its namespace is:
Qt.WindowType.WindowContextHelpButtonHint

How to solve the unexpected '}' in "}" in a user-made function contaning an ifelse statement? [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
So I have this function:
library(worms)
library(dplyr)
worms_from_species_list<-function(file_name,file_location,header=T){
if(header==T){
setwd(file_location)
lista<-read_tsv(file_name)
names(lista)<-"Species"
worms_df<-wormsbynames(lista[,"Species"])
}else{
setwd(file_location)
lista<-read_tsv(file_name)
worms_df<-wormsbynames(lista)
}
worms_df<-worms_df%>%
mutate(new_name = ifelse(status=="unaccepted" & !is.na(status),valid_name,
ifelse(status=="accepted" & !is.na(status),name,name))
return(worms_df)
}
However, I can't even run it to begin with because it returns the following errors:
Error: unexpected ')' in:
" worms_df<-worms_df%>%
ifelse(status=="accepted" & !is.na(status),name,name))"
> }
Error: unexpected '}' in "}"
Does anyone have any idea what it might be?
Most IDEs provide paren-matching in some form. In this case, it suggests that you need to close out the mutate call.
In RStudio, for instance, when the cursor is to the right of name)), it indicates that the last right-paren on that line matches the left-paren of ifelse:
The | is the cursor, and the background-gray ( is the matching left-paren.
Similarly (though it's less commonly used), emacs/ess can show it if configured as such:
Here, both the right-paren and its matching left-paren are highlighted with a blue background.
Another trick in RStudio (and other IDEs) is to indent rows and see where they pan out. You'll see that I did that in before the first screenshot above, and you can see that it thinks return(worms_df) is within the mutate.
The solution looks like this:
worms_from_species_list<-function(file_name,file_location,header=T){
if(header==T){
setwd(file_location)
lista<-read_tsv(file_name)
names(lista)<-"Species"
worms_df<-wormsbynames(lista[,"Species"])
}else{
setwd(file_location)
lista<-read_tsv(file_name)
worms_df<-wormsbynames(lista)
}
worms_df<-worms_df%>%
mutate(new_name = ifelse(status=="unaccepted" & !is.na(status),valid_name,
ifelse(status=="accepted" & !is.na(status),name,name)))
return(worms_df)
}

Warning: Cannot modify header information wp-includes/functions.php [duplicate]

This question already has answers here:
How to fix "Headers already sent" error in PHP
(11 answers)
Closed 7 years ago.
Warning: Cannot modify header information - headers already sent by (output started at /home/******/public_html/wp-includes/functions.php:3198) in /home/*****/public_html/wp-includes/option.php on line 773
How To Fix ?
Something is writing to the output buffer in advance of WordPress try to set the headers, resulting in the error you see. Usually this is a space or other character at the beginning of one of your files (not option.php, this is the file trying to set a header(), the error is probably in your theme or wp-config.php).
Remove the code that is sending the text (whatever it may be) and the error will go away.

How to press "ALT+F4" using AutoIt [duplicate]

This question already has answers here:
How to press "Ctrl+Shift+Q" in AutoIt
(2 answers)
Closed 4 years ago.
I am new in AutoIt. I have run the notepad by using the following code in AutoIt:
Run("notepad.exe")
Now I want to quit the application by using "ALT+F4". How to press "ALT+F4" with AutoIt tool?
You'll want to check out the documentation for AutoIt - which is pretty good.
The one you're looking for is: https://www.autoitscript.com/autoit3/docs/functions/Send.htm
Keep in mind that you want to make sure that the window is active or that you're targeting the window.
With that, I recommend using this : https://www.autoitscript.com/autoit3/docs/functions/ControlSend.htm
ControlSend() works in a similar way to Send() but it can send key
strokes directly to a window/control, rather than just to the active
window.
The following code for pressing "ALT+F4" should work in AutoIt:
Send("{ALT down}{F4 down}{F4 up}{ALT up}")
OR,
Send("!{F4}")
OR,
Send("!{F4}", 0)

How to cut and paste tabbed lines with auto indent set to on in vi [duplicate]

This question already has answers here:
Turning off auto indent when pasting text into vim
(25 answers)
Closed 9 years ago.
Not sure which stack exchange group this question goes so please move to the correct one if this is the wrong one.
What's happening is if I highlight something with tabs/indents from one window/browser and want to paste it into vi, the formatting gets messed up.
For example, I have the following in another window that I want to copy:
"date_created" : "2013-06-06 21:12:31",
"netdriver_duplex" : "Full",
"mac_address" : "FA:16:3E:17:CC:E1",
"interfaces" : "eth0,sit0",
"processors" : null
After I highlight it and paste it in vi, I get the following:
"date_created" : "2013-06-06 21:12:31",
"netdriver_duplex" : "Full",
"mac_address" : "FA:16:3E:17:CC:E1",
"interfaces" : "eth0,sit0",
"processors" : null
Someone told me auto-indent is messing me up and to run
ESC-> :set noai
Copy/Paste stuff
ESC-> :set ai
but this gets tiring after a while. Is there a workaround when pasting tabbed lines in vi with autoindent set to on or do I have to turn off auto-indent, paste, turn ai back on every time?
Thanks in advance for your help.
You have to use, in normal mode
:set paste
Then you paste what you want. To comeback to your original setting, use, in normal mode
:set nopaste

Resources