field

how to call method without knowing the class name?

I have defined two classes below. public class junk { private BigInteger a = BigIngeger.valueOf(1), b=BigInteger.valueOf(2), c; public void DoSomething(){ c = a.add(b); } // ... other stuff here } public class junkChild extends junk{ private BigDecimal a = BigDecimal.valueOf(1), b=BigDecimal.valueOf(2), c;...

MySQL - Ideal Field Type For Fixed Width Binary Data

If I want to store binary data (hash values) and they're always 128bytes long, what field type should I use? BLOBs are nice, but they aren't fixed width (and result in dynamic tables).. CHAR requires a charset. ...

Share Point Choice Field

Hi All, Is there any way to get to data to sharepoint list choice field when user want to add an item in the Sharepoint list Thank ...

COM object in base class - access via field or property?

I've inherited a codebase of C# dlls that are called via COM-interop (or so it has been described). The C# code also uses COM objects internally to perform the basic functionality of the parent application. I'm refactoring some of the DRY violations out of the code because finding duplications in 100,000 lines of code across 50 or 60 d...

How can I make MS Query (in Excel) see tables with field-level security on SQL Server 2005 or later?

MS Query, when connecting to SQL Server through an ODBC Data Source, uses the system procedure "sp_tables" to retrieve a listing of tables in the database. The source for sp_tables can be viewed but not altered. The problem with this procedure is that it will not return a table name for which the connected user has permissions to acces...

jQuery: val() updated too late

UPDATE: there was a problem with some other code. I'm trying to get the value of some input text field. The problem is that the value I obtain by my_val = $('#MyInput').val(); is not really updated. If I write in the field 'foo' and then click on the element which triggers the script, then I get my_val = undefined. On the other han...

Jquery Validator plugin, how to validate fields with one error message

Here is the problem i have, i have 3 select lists. Basically its a date to choose like DAY MONTH YEAR and i need to validate 3 of them but with one error message meaning each one of them must be selected or will give an error message. I have it working but i come up with 3 error messages for each field which is not what i need. Here is ...

ACL on field level in Grails

Hello, in our new software project, we have the following requirement: A webpage shall show a set of data. This data shall be editable by some users (assigned to roles, i.e. manager), and only viewable by others. The tricky part is described by an example: A User-page consists of address data and account information. The addess data sha...

java: how can i set a class's field by a field name that stored in a variable

Hi. how can i set a field in a class that it's name is dynamic and stored in a string variable ? public class test { public String a1; public string a2; public test(String key) { this.key='found'; <--- error } } ...

Questions regarding BlackBerry BrowserField2

Hello, does anyone know how to specify the height of a net.rim.device.api.browser.field2.BrowserField? I cannot find how to do so in the BlackBerry API. Also, when I use a browser field within my application, am I able to load one page, and from that page click a link and go to another? I am having issues doing that with the BrowserFiel...

Matlab: Magnetic fields calculated with biot-savarts-law

Hello! This is the code for the computation of magnetic fields using the biot-savart-law. I hope to get some tipps for the optimization of this code. Regrettably I use german language :( I never will do this again. :) tic clear all; clc; clf skalierungsfaktor = 10^-6; % vom m-Bereich zum mm-Bereich wg. T = Vs / m^2 I = 1; % in A konstan...

Joins with multiple fields on GroupBy table data in LINQ query/method

Urgent: I have to work out how to write the following SQL query usingLINQ query or method syntax. (Edit: This is to return a list of latest AgentActivities for all Agents). Any help will be much appreciated. SELECT a.[AgentActivityId], a.[AgentId], a.[ActivityId], a.[StartedAt], a.[EndedAt], a.[Version] FROM [dbo].[AgentActivity...

access array from struct in C

In my data.h file I have: typedef struct { double ***grid; } Solver; In my .c file I have static Solver _solver; which first makes a call to a function to do some allocation on grid such as _solver.grid = malloc(....); //then makes a call to GS_init(_solver.grid); The GS_init function is declared in GS.h as: void GS_init(...

Magento: Adminhtml form “Image” Field

Hi, I have set an input field of type “Image” in an admin form using the code below: <?php // Tab Form // File: app/code/local/MyCompany/Mymodule/Block/Adminhtml/Items/Edit/Tab/Form.php class MyCompany_Mymodule_Block_Adminhtml_Items_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form { protected function _prepareForm() { ...

Custom address field in Django Model

What's the common practice to represent postal addresses in Django models? Is there a library for custom model fields that include postal address fields and potentially handle validation and formatting? If no library exists, how can I write one? Can I represent a composite field (a field that gets serialized to multiple columns in db)...

Sharepoint: rename column (field) with C#

I want to rename a column (field) of some list with C#. How do I do this? Resetting 'Title' property or something else doesn't work. ...

Should I declare my abstract class's attributes with get; set;?

I'm making a little program that will crawl my hard drive and present a list of file found in a given drive. My idea is to have a base File class, and implement Picture.cs, Video.cs and Document.cs classes inherited from the File.cs class. Here's my code: using System; using System.Collections.Generic; using System.Linq; using System....

Why not abstract fields?

Why can't Java classes have abstract fields like they can have abstract methods? For example: I have two classes that extend the same abstract base class. These two classes each have a method that is identical except for a String constant, which happens to be an error message, within them. If fields could be abstract, I could make thi...

get list of all <input objects in javascript, without accessing a form object

I need to get all the input objects and manipulate the onclick param. the following does the job for links. looking for something like this for input tags. for (var ls = document.links, numLinks = ls.length, i=0; i<numLinks; i++){ var link = unescape(ls[i].href); link = link.replace(/\\'/ig,"#"); ...

Django - Determine field type of a variable passed to a template tag

I would like to write a Django template tag to which I can pass a variable. I would like the template tag to behave differently depending on what type of model field the variable was derived from (CharField, BooleanField, IntegerField, etc.) as well as other information used in the field's definition (max_length, etc.) I can pass the v...