records

Implementation of vector class in Delphi?

How would you go about creating a vector class in Delphi? I would prefer to put all math related stuff into a DLL. Should I use a record or a class implementing an interface? Pros of record approach: Fast and lightweight Value type Operator overloading Cons of record approach: Implementation cannot be hidden in DLL (no inheritance...

Android: How to edit specific record from database in Android Programming (Using Ruby on rails)

At first,I have a database created by using Ruby on rails. I just already implement insert function(HTTPPost) in my Android Application and it's work. But I don't know how to retrieve specific record from my databases and insert it back to specific record in Android (Like edit function in RoR) This is my insert code : private void inse...

What is the best way to join 2 records in Pascal?

Hi, I've a little problem with records in Pascal. I'm writting a program where I've got two lists of records: one with patients and second with diseases but I don't have idea how to join it. I was trying to do a dynamic table with diseases id's in patient list but lazarus had problems with compiling it. I would be glad if someone helps m...

Why can't Delphi records have inheritance?

Something I've wondered for a long time: why aren't Delphi records able to have inheritance (and thus all other important OOP features)? This would essentially make records the stack-allocated version of classes, just like C++ classes, and would render "objects" (note: not instances) obsolete. I don't see anything problematic with it. T...

visual basic, filtering and finding records

I have done coding the AddNew Delete Update Refresh This is my code DataEnvironment1.rsSubject.Addnew DataEnvironment1.rsSubject.Delete etc. Now I'm having a hard time filtering and finding records using Data.Environment1.rsSubject.Find or Filer. . . Can anyone help?? ...

Creating an excel macro to sum lines with duplicate values

I need a macro to look at the list of data below, provide a number of instances it appears and sum the value of each of them. I know a pivot table or series of forumlas could work but i'm doing this for a coworker and it has to be a 'one click here' kinda deal. The data is as follows. A B Smith 200.00 Dean 100.00 Smith 1...

Insert multiple records using Linq to Entities (EF)

I have a map table (tblUserRoles) which can contain multiple records. When i insert only one record using L2E it saves but when try to save multiple records it gives exception. I am saving like this: foreach (tblUserRoles u in InsertUserRole) { EntityHelperUtil.AddObject(context, "tblUserRoles", (IEntityWithRelationships)u); ...

Nested record information hiding in Delphi

I have a relatively complicated data structure to model. I would like to do this with a record structure in Delphi, and the structure is complicated enough to justify splitting this into nested records. A simplified example: type TVertAngle = record strict private fDecDegrees: Double; fDegrees: integer...

MySQL database not wanting to add any new records

Hi every1! ok so I have this code `$sql = "INSERT INTO userTable (username, password, gender, city, zip, email) VALUES ('$username', '$password', '$male', '$city', '$email')"; mysql_query($sql) or die ("unable to process query");` and for some reason it works on my local server but not on the webserver, all the variables are set for...

Read variable-length records from a buffer - weird memory issues

Hi, I'm trying to implement an i/o intensive quicksort (C++ qsort) on a very large dataset. In the interests of speed, I'd like to read in a chunk of data at a time into a buffer and then use qsort to sort it inside the buffer. (I am currently working with text files but would like to move to binary soon.) However, my data is composed o...

How to pass multiple different records (not class due to delphi limitations) to a function?

Hi to all. I have a number of records I cannot convert to classes due to Delphi limitation (all of them uses class operators to implement comparisons). But I have to pass to store them in a class not knowing which record type I'm using. Something like this: type R1 = record begin x :Mytype; class operator Equal(a,b:R1) end; type ...

Delphi - RTTI info about methods in records

hello, how to extract RTTI info about methods in Delphi records? is it possible by using new Rtti unit? ...

What is the difference between a constructor and a procedure in Delphi records?

Is there difference in behavior between a constructor call and a procedure call in Delphi records? I have a D2010 code sample I want to convert to D2009 (which I am using). The sample uses a parameterless constructor, which is not permitted in Delphi 2009. If I substitute a simple parameterless procedure call, is there any functional dif...

Primary key vs. RRN

What's the difference between a primary key and an RRN? ...

MySQL Query exceptions

In one page, it should show records that has the following selected month from the drop down menu and it is set in the ?month=March So the query will do this $sql = "SELECT * FROM schedule WHERE month = '" . Clean($_GET['month']) . "' AND finished='0' ORDER BY date ASC"; But it shows records that has a value of 2 in the finished colu...

Different tables values add up | Microsoft Access

How do I get two tables of their values to add up into one table record, e.g. Item table: ID - Autonumber OrderID - Number Price - Currency Details - Text Order table: ID - Autonumber CustomerID - Number Date - Date TotalPrice - Currency The TotalPrice should add up all the items and the total price of adding them up into the ...

"Could not open listen socket" in j2me

Hello, I am currently doing a bit of j2me development and I am using the Samsung SDK as the emulator. The problem I am having is to do with RecordStores (RMS). At first everything was working fine and I could create/delete/edit RecordStores as I wanted. Now, for some reason whenever I try to create a new RecordStore, I get the following...

iPhone sdk: How do I get a count of all the phone numbers in a address book?

Hi i am developing an app for my QA department. I need to programically get how many phone numbers are there in the entire address book. No user input. Just click a button and then get how many phonenumbers are there in the ENTIRE addressbook. ...

delphi Ado (mdb) update records

I´m trying to copy data from one master table and 2 more child tables. When I select one record in the master table I copy all the fields from that table for the other. (Table1 copy from ADOQuery the selected record) procedure TForm1.copyButton7Click(Sender: TObject); SQL.Clear; SQL.Add('SELECT * from ADoquery'); SQL.Add('Where numeraca...

Datamapper Clone Record w/ New ID

class Item include DataMapper::Resource property :id, Serial property :title, String end item = Item.new(:title => 'Title 1') # :id => 1 item.save item_clone = Item.first(:id => 1).clone item_clone.save This does "clone" the object as described but how can this be done so it applies a different ID once the record is saved, e.g...