Questions tagged [field]

In computer science a field is a smaller piece of data from a larger collection.

In computer science, data that has several parts can be divided into fields. Relational databases arrange data as sets of database records, also called rows or tuples. Each record consists of several fields, also called attributes; the fields of all records form the columns.

In object-oriented programming, field (also called data member or member variable) is the data encapsulated within a class or object. In the case of a regular field (also called instance variable), for each instance of the object there is an instance variable: for example, an Employee class has a Name field and there is one distinct name per employee. A static field (also called class variable) is one variable, which is shared by all instances.

Source: Field (Computer Science) - Wikipedia article

Related tags:

5904 questions
1
vote
2 answers

How do I extract data from a FoxPro memo field using .NET?

I'm writing a C# program to get FoxPro database into datatable everything works except the memo field is blank or some strange character. I'm using C# .Net 2.0. I tried the code posted by Jonathan Demarks dated Jan 12. I am able to get the index but…
Madhu kiran
  • 73
  • 1
  • 2
  • 6
1
vote
2 answers

In C# if it recommended that I always declare my instance fields private (encapsulation) should I also always declare my static fields as private?

public class Person { private string _name; // always recommended to be private private static string s_homePlanet; // recommended? } As mentioned in the question the practice of encapsulation recommends that I always declare my instance…
MVPyro
  • 43
  • 5
1
vote
1 answer

Snowflake SQL Field Function

I am running this query in Snowflake SQL SELECT field('q', 's', 'q', 'l'); However I get this error: SQL compilation error: Unknown function FIELD Anyway I can find the position of something in an "IN" statement? Ideally in a statement such…
1
vote
1 answer

unexpected behabiour of operator $ in R

It seems that the R operator $ looks for a field name similar to the requested one if it does not exist, which seems to me to be a totally inexperienced and very dangerous behaviour. I have reproduced the following code in two versions of R R…
vdebuen
  • 31
  • 3
1
vote
4 answers

How to create lists from pandas columns

I have created a pandas dataframe using this code: import numpy as np import pandas as pd ds = {'col1': [1,2,3,3,3,6,7,8,9,10]} df = pd.DataFrame(data=ds) The dataframe looks like this: print(df) col1 0 1 1 2 2 3 3 3 4 …
Giampaolo Levorato
  • 1,055
  • 1
  • 8
  • 22
1
vote
1 answer

HTML reset fields in form is not working in radio field

I am new writing HTML code. I am playing with it, but I am having this problem. I create a page where user relect something from a radio choice and insert a value in another field. Af inserting a calculation is made based in the value selected in…
1
vote
2 answers

Python: initiated Logger with dataclass field param

This is my Logger class: import logging import os import datetime class Logger: _logger = None def __new__(cls, user: str, *args, **kwargs): if cls._logger is None: cls._logger = super().__new__(cls, *args, **kwargs) …
falukky
  • 1,099
  • 2
  • 14
  • 34
1
vote
2 answers

Consolidating multiple fields within one table

Hello Stack Overflow community, I would like to consolidate multiple fields within the same table. Among other fields,'Table1' contains a number of fields each for a different US state. For a given 'ID' (primary key), a US state field will return a…
RLUGO
  • 13
  • 4
1
vote
0 answers

Highest values among corresponding field in oracle

I have two supplier_type (Direct and Indirect) for one supply code. I want to produce a new column supplier_type based on supplier_Name for one supply_code like Example: If supply_Name is Apple,Dell,Hp,Lenovo then supply_type as Direct If…
1
vote
2 answers

(SOLVED) MYSQL: how to get the list of all the fields produced by a SELECT?

I need to know, given a MySQL SELECT, no matter how complex is and how many tables are joined, if there is a way to get the list of the fields resulting, especially if there are asterisks instead of the field list. For example: SELECT a.*, b.field1,…
m3t4l
  • 41
  • 4
1
vote
1 answer

Add a result of another script into a table with awk

I have an awk script (let's call it my_script) which gives output as one column, like this: DD EE AA CC BB I also have another table: C1 123 C3 222 C5 175 C4 318 C8 299 I want to add it to my existing table as the last column: C1 123 DD C3 222…
1
vote
4 answers

change field value of one file based on another input file using awk

I have a sparse matrix ("matrix.csv") with 10k rows and 4 columns (1st column is "user", and the rest columns are called "slots" and contain 0s or 1s), like this: user1,0,1,0,0 user2,0,1,0,1 user3,1,0,0,0 Some of the slots that contain a "0"…
ElTitoFranki
  • 375
  • 1
  • 7
1
vote
0 answers

How could I create an array using a field id in a field form

I have a form with the following text fields that I would want to push as an array:
Kudown lod
  • 11
  • 3
1
vote
1 answer

Can I use unique and nullable attributes in CharField with tortoise?

Can I do the following to make a charfield unique and not null using tortoise orm? class User(Model): id = fields.IntField(pk = True) username = fields.CharField(max_length = 128, unique = True, nullable = False) Or what would be the…
Diego L
  • 185
  • 1
  • 9
1
vote
0 answers

How to make Goland fill struct fields with defined type,not with nil

When I use Goland to initialize a structure,I can use Alt+Enter to auto fill the fileds.However,when the field is a slice or map,it will be fill with nil.So I have to go to the struct define to see the field define and copy it ,sometimes it can be…
1 2 3
99
100