Questions tagged [underscores]
The underscore character, Unicode Character 'LOW LINE' (U+005F)
0
votes
0answers
14 views
Get custom field on Contact Form 7 (with underscore)
I am trying to fill a field on the form with post_meta as explained in the documentation.
This custom field “edit_last” is working:
[text* edit_last default:post_meta]
But when the custom field ...
10
votes
1answer
129 views
When are python sunder names used?
In Python, there are conventions for single leading underscore, double leading underscore, double leading + double trailing underscore, and single trailing underscore. Many of those are outlined in ...
992
votes
13answers
289k views
What is the meaning of a single- and a double-underscore before an object name?
I want to clear this up once and for all. Can someone please explain the exact meaning of having leading underscores before an object's name in Python? Also explain the difference between a single and ...
45
votes
2answers
8k views
What does an underscore and interface name after keyword var mean?
From http://golang.org/src/pkg/database/sql/driver/types.go:
type ValueConverter interface {
// ConvertValue converts a value to a driver Value.
ConvertValue(v interface{}) (Value, error)
}
...
0
votes
2answers
27 views
PHP Regex - Add underscore in front of capital letters, but only first capital letter if there are multiple in a row
Trying to convert something like WebsiteURL to website_url. I was able to convert it to website_u_r_l using this suggestion: PHP - add underscores before capital letters
However, that doesn't work ...
1
vote
2answers
373 views
How to replace the underscore with Hyphen using Htaccess rule
How to replace the underscore with Hyphen using Htaccess rule
Here is link:
http://iloansdirect.netsmartz.us/property_finder.shtml
I want to below link:
http://iloansdirect.netsmartz.us/property-...
5
votes
2answers
2k views
Is the proper Rails inflection of underscore 'underscoreize'?
It seems that with Rails/AR and the Inflector methods added to String by ActiveSupport, I would expect that by default,
Nested::ClassDerived::FromAR.name.tableize == Nested::ClassDerived::FromAR....
33
votes
5answers
18k views
Javascript convert PascalCase to underscore_case
How can I convert PascalCase string into underscore_case string? I need conversion of dots to underscore as well.
eg. convert
TypeOfData.AlphaBeta
into
type_of_data_alpha_beta
30
votes
6answers
15k views
Underscore between two image-links
I have the following HTML code inside a div:
<a href="http://www.mysql.com">
<img src="images/php-power-micro2.png" alt="Image not available" title="PHP" border="0"/>
</a>
<a ...
460
votes
4answers
185k views
What is the purpose of the single underscore “_” variable in Python?
What is the meaning of _ after for in this code?
if tbh.bag:
n = 0
for _ in tbh.bag.atom_set():
n += 1
0
votes
0answers
30 views
What’s the purpose of the following code ? Increase public storage usage?
I found the following code in this contract.
// `hat` address is unique root user (has every role) and the
// unique owner of role 0 (typically 'sys' or 'internal')
contract DSChief is DSRoles, ...
2
votes
1answer
37 views
Extract the part of a variable value before '_'
I have data which looks like this:
Linking <- data.frame(
ID = c(round((runif(20, min=10000, max=99999)), digits=0), rep(NA,10)),
PSU = c(paste("A", round((runif(20, min=10000, max=99999)), ...
7
votes
2answers
129 views
Go struct tags with underscore before function names
I am working with go, specifically QT bindings. However I do not understand the the use of leading underscores in the struct below. I am aware of the use of underscores in general but not this ...
1
vote
1answer
34 views
Only keep a part of the 'id' string before a pattern (“_”)
I have a little issue here:
I actually have a fasta file such:
g1.t1_0035_0042
ATTAGGAGGAA
g2.t1_0042_0042
ATTAGGAGA
g3.t1_0042_0035
ATTGGAAT
etc
and what I would liek is only to get the first ...
0
votes
2answers
62 views
Visual Studio Code strange underscoring
I'm making some django project since yesterday and it all went fine until I started it up today. I launched Visual Studio Code and program became to underscoring lines which was fine to it yesterday, ...
-3
votes
1answer
43 views
how to replace subdomain character underscores with dashes using htaccess
how to replace subdomain character using htaccess ?
For example:
http://test_test.domain.com
after rewrite should be
http://test-test.domain.com
thank you
0
votes
1answer
41 views
Are underscore required for new querys with hibernate and spring boot?
I'm discovering the implementation of hibernate + spring boot and I was wondering if underscores were important for our query when our table's column name has one.
For instance a basic query would be
...
1
vote
1answer
52 views
RewriteRule to change underscores to dashes only on the first directory
I know there are alot of questions already on this website related to the subject of turning underscores into dashes but i just couldn't find the right one.
Here's my problem, i only want to turn ...
21
votes
6answers
7k views
camelCase to underscore in vi(m)
If for some reason I want to selectively convert camelCase named things to being underscore separated in vim, how could I go about doing so?
Currently I've found that I can do a search /s[a-z][A-Z] ...
1
vote
1answer
58 views
Use of underscore in PHP code [duplicate]
Firstly, to be clear, I'm not talking about the use of underscores as for visual separation of words in function names, etc., for example from the code below, woocommerce_wp_text_input.
In following ...
-2
votes
2answers
2k views
Underline some chars in a String with Javascript
I have the following problem:
My js code shows a display value this way:
d3.select("#" + uiElement).html("")
.append("span").attr("class", "displayvalue").html(stringToUse);
...
802
votes
5answers
208k views
What are the rules about using an underscore in a C++ identifier?
It's common in C++ to name member variables with some kind of prefix to denote the fact that they're member variables, rather than local variables or parameters. If you've come from an MFC background, ...
186
votes
9answers
126k views
Converting camel case to underscore case in ruby
Is there any ready function which converts camel case Strings into underscore separated string?
I want something like this:
"CamelCaseString".to_underscore
to return "camel_case_string".
...
0
votes
0answers
133 views
Wordpress Template Underscores --> Navigation Toggle not working
I've tried several things, but my javascript toggling the mobile navigation is not reacting at all and I really don't know why.
I'm using the blank theme underscores for creating the current website. ...
-3
votes
2answers
156 views
Is `char _3 = 'c'` valid in C and C++? [duplicate]
Considering, i have declared variable name as a numeric with underscore.
#include <stdio.h>
int main()
{
char _3 = 'c';
printf("%c\n",_3);
}
I wonder, It's working fine in C and C++. So,...
15
votes
3answers
3k views
C# Variable Name “_” (underscore) only
I was just hit with a minor issue in C#, it was just a copy-paste mistake but don't know how C# accept it.
This code gets compiled successfully...HOW
namespace DemoNS
{
class DemoClass
{
...
1
vote
1answer
111 views
Matlab variable name: input character is not valid in MATLAB statements or expressions [closed]
I 'm using this 720_15_LDP_OFF_values as matrix name in Matlab 2015b but I get the following error:
The input character is not valid in MATLAB statements or expressions.
4
votes
1answer
89 views
Why an underscore in `float.is_integer`, but not in `str.isnumeric`?
It appears that float.is_integer is the only "is" method with an underscore in its name among built-in types in Python. Examples that don't include an underscore: str.isalnum, str.isalpha, str....
0
votes
1answer
97 views
Django app.py removes underscore in Config
PEP 8 says "Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although ...
0
votes
1answer
22 views
Match and replace a specific underscore to tab in shell
I want to replace a specific underscore from a file and replace it with a tab. The problem is that I have a lot of underscores and when I try with tr all the underscores are replaced by tabs. Here's ...
0
votes
5answers
49 views
aggregate items from list to first underscore
Let's say I have a file(.txt) with:
footest_footest
footest_footest2
footest_footest3
footest_footest6
bartest_bartest
bartest_bartest2
cartest_cartest
cartest_cartest2
cartest_cartest5
Using ...
1
vote
4answers
1k views
Vim: underscore(_) automatically converted to (<-)
I have been writing R scripts in Vim for some time now. Starting an hour ago, I began facing an issue that every time I type an underscore (_), it gets automatically converted to <-.
What setting ...
-1
votes
2answers
40 views
What does an underscore at the beginning of a JS chain mean
What does an underscore at the beginning of a chain mean in Javascript? For example the value of the template property below:
EmProjectItem = Views.PostItem.extend({
tagName: 'li',
...
1
vote
1answer
907 views
How to change breakpoint for mobile menu toggle in Underscores theme
I am using the Underscores WordPress theme and currently the toggle for the mobile menu displays at 600px and smaller. But I'd like to change that to a larger screen size. I can't figure out how to ...
1
vote
4answers
922 views
why to use an underscore for a struct in c?
In the source code below, could somebody explain the rational (why is it good programming practice to typedef the struct _lwm2m_object_t with the new name lwm2m_object_t? All it does is drop the ...
3
votes
3answers
34 views
regex conditional not returning false on the minimum underscores
I am using this regex in if regex is match
if (Regex.IsMatch(_familyname, @"(\S*_){3}\S"))
I tried to ensure that the word passing the test had at least this
Word1_Word2_WORD3-maybe_Word4 (note ...
1
vote
1answer
122 views
Expanding an Index in a Bash Loop Script in a Combination with a Wildcard and an Underscore [duplicate]
I have 80 pairs of files of the following type:
170309-N701-S517_S1_L001_R1_001.fastq.gz
170309-N701-S517_S1_L001_R2_001.fastq.gz
170309-N701-S502_S2_L001_R1_001.fastq.gz
170309-N701-...
2
votes
1answer
68 views
Use of underscore in function call with Try parameters
I'm trying to understand particular use of underscore in Scala. And following piece of code I cannot understand
class Test[T, S] {
def f1(f: T => S): Unit = f2(_ map f)
def f2(f: Try[T] => ...
1
vote
2answers
815 views
Android KeyCode of Underscore
I'm implementing a custom keyboard for Android from an xml but I can't find the KeyCode for the underscore.
I tried to print the keycode overriding onKeyDown but does not seem to work.
Where can I ...
15
votes
4answers
7k views
Unix sort treatment of underscore character
I have two linux machines, on which unix sort seems to behave differently. I believe I've narrowed it down to the treatment of the underscore character.
If I run sort tmp, where tmp contains the ...
3
votes
2answers
2k views
C# Code Style: Switching from “this.” prefix to “underscore”
I've been using the "this." prefix for about two years (StyleCop SA1102 rule). But now I'm changing my mind and using the "underscore" prefix for static and instance private fields and remove the "...
4
votes
2answers
223 views
Is there any significance of the triple underscores in this python for loop?
Is there any significance in the triple underscore in Python?
This was in a script for getting all .txt files in a directory.
for ___,___,files in os.walk(some_folder):
files[:]=[x for x in ...
1
vote
1answer
179 views
sort command not working as expected for uppercase letters followed by underscore
I'm sorting a list of usernames. When the letters are lowercase, the sort command works as expected.
Expected and actual output for lowercase:
n
n_123
na
na_123
When the characters are uppercase ...
0
votes
1answer
136 views
Linux remove a single underscore before and after a character using command line
How do I remove a single underscore (_) before and after a character?. I have a large number of files named like
filename_part_one_-_filename_part_two.file
To get the filename to the above format ...
12
votes
5answers
19k views
Meaning of _ underscore as a variable prefix in VB.net
What is the meaning of underscore in visual basic? I have this code:
Private _isAuthenticated As Boolean
Is that the same as doing this?
Private isAuthenticated As Boolean
Or does adding the ...
1
vote
2answers
2k views
Escaping _ efficiently in Tabular environment, LaTeX
How can you escape underscores only in the tabular environment without the use of \_?
This thread discusses about underscore in general.
I cannot use the environment verbatim nor the package ...
0
votes
1answer
61 views
What will go wrong if I store the value for a python getter and setter in __dict__?
I am using python getters and setters, but I don't like using a dummy variable to store the value. For example, a simple getter and setter in python might be defined like so:
class Foo(object):
...
0
votes
1answer
52 views
Mettle C++ Test Framework's use of undescore [duplicate]
Looking at the mettle test framework they have code like this:
#include <mettle.hpp>
using namespace mettle;
suite<> basic("a basic suite", [](auto &_) {
_.test("a test", []() {
...
5
votes
2answers
951 views
When to use one or two underscore in Python
Ok I think I have understood the use of one and two heading underscores in Python.
Correct me if I am wrong,
In the case of one underscore, the underscore prevents the from X import * statement to ...
2
votes
3answers
980 views
Any rules about underscores in filenames in C/C++?
I know that there are rules for using underscores in identifiers in C/C++. Are there any rules for using them in source code filenames?
For instance, are there any restrictions against beginning or ...