Newest records Questions

Q&A for professional and enthusiast programmers

To change the function field to editable in odoo 8?

I have a function field. The function of the field is def _wage(self, cr, uid, ids, fieldnames, args, context=None): res = {} for obj in self.browse(cr, uid, ids, context=context): s = ( """...

c++ std::bad_alloc with around 20,000,000x6 double records

I have a MATLAB code which is working perfectly over 20,000,000×6 double records. I converted same code to cC++ and use vector to store those records, but it give me bad_alloc problem. This is my ...

awk: aggregate several lines in only one based on a field value

I would like to aggregate values in a file based on a specific field value which is a kind of group attribute. The ending file should have one line per group. MWE: $ head -n4 foo X;Y;OID;ID;OQTE;...

I want to show data from list as day passes by

I have an method which shows usage history of data. In my method, it shows all 30 data together, like todays data consumed and past 29 data`s. But I want to do that it shows todays data and suppose ...

Using numpy.fromfile to read scattered binary data

There are different blocks in a binary that I want to read using a single call of numpy.fromfile. Each block has the following format: OES=[ ('EKEY','i4',1), ('FD1','f4',1), ('EX1','f4',1), ('EY1','...

Beginner Python Game. Create records file

I am learning Python and did this little game where you try to guess the number the Computer has generated. from random import randint def guess(): play = 0 while play != 'exit': ...

Reserve selected records in a sql server

I could use some advice on how to solve this issue. I have application that connect to a sql server and fetch some records, when this is done I need to "reserve" those records so that in case another ...

How can I Handle user plugins in my types?

I'm writing a modular and extensible text editor in Haskell and I'd like to implement plugins in such a way: The writer of the plugin provides a single function that looks something like this: ...

Binary variable to multiple records of same key based on characters in another field in R

I have a table of doctor visits wherein there are sometimes multiple records for the same encounter key (Enc_Key) if there are multiple diagnoses, such as: Enc_Key | Patient_Key | Enc_Date | Diag ...

Activation Records and Arrays in Fortran (or languages that have all Static Environments)

When creating an array, how does a language like fortran make activation records when it is in an all static environment (because it doesn't know the size of the array during compile time)? I know it ...

TYPO3: Disable deletion of records

Is it possible to prevent the deletion of Records in the TYPO3 backend of certain tables from an own Extension?

PHP- Force download file from URL

I have problem. I created a web page with upload files, I have database (MySQL) with correctly URL to file (file path) (in database is only url to the file, file is in folder on the server). And now I ...

Mybatis: how to map OUT parameter from stored procedure which IN and OUT parameters are collections

There is stored procedure which can be used like DECLARE l_in someapps._reservations_pkg.t_reservation_table := someapps._reservations_pkg.t_reservation_table(); l_out someapps._reservations_pkg....

Apply binary variable to multiple records of same key in R

I have a table of doctor visits wherein there are sometimes multiple records for the same encounter key if there are multiple diagnoses, such as: Enc_Key | Patient_Key | Enc_Date | Diag_Key 123 ...

What is a good character length for a code when we need 1 million unique variations?

I need a good trade off between readability (e.g. not too long) vs being long enough to create 1 million unique variations. The code can use numbers and letters. We need to provision 1 million ...

How to design for extension using records

I'd like to know how people from the Haskell community approach the following design. Assume a workflow-like system where you are piping some data (structure) through multiple steps in the system. As ...

Effectively make database records read-only

How can I make sure that specific data in the database isn't altered anymore. We are working with TSQL. Inside the database we store contract revisions. These have a status: draft / active. When the ...

SQL Logic or Query to find what is missing

Hi all I need your help on the following logic. Currently I have a table that has 300 records, that are related but on this new tables I have the columns called them country, POS so for each ...

How do I make a search feature that links to individual records in php

I want to make a search feature in php which links to a user's specific records. I know how to link them to their specific information and do the search function, but I do not know how to do both. ...

How to leave out unselected dict entry for Zope form records?

I have a tabular form with many rows like: id - start_date - end_date In order to submit all data at once, I use the records argument (https://docs.zope.org/zope2/zdgbook/ObjectPublishing.html#...

extract the date from ID and get the data for last one year

I have below query in which i can extract the date using to_date(substr(id, 1, 14), 'YYYYMMDDHH24MISS') from id column. But now i want to get the data for last one year comparins this date from id ...

Change isolation level in records query or close transaction

I'm trying to build some autotest scripts using Kenneth Reitz's records library. I need to check the MySQL database for updates here and there. db_url_mysql = 'mysql://user:pass@mysql.localhost:3306/...

SQL - Update multiple records in one query with Composite Key

I have looked at this question which addresses updating multiple records in one query. The general solution is UPDATE table_name SET field_to_update = CASE table_key WHEN ...

MySQL query to get multiple columns to 3 columns

I have a the following mysql table and records: http://sqlfiddle.com/#!9/fb7c68/1 I want to make a query that will show the records in 3 columns product_id, parent_option_id, parent_option_value_id (...

How to use Rcords to pass parameters to the queue

how i can pass memo lines strings to TRecords fields to use theme as a parameters for idHTTP POST methode? usually id do it like this for i := 0 to Memo1.Lines.Count-1 do begin P := Pos('+', ...

Are Delphi record constructors really needed?

SITUATION I am studying "More Coding in Delphi" by Nick Hodges, and he is using a TFraction record to explain operator overloading. I have written by myself this record: type TFraction = record ...

Update mysql table with select query

i want to update a column of a table with new values from a select query. the table where the values should go to looks like this. And the values should go to the value column. |id1|id2|value| |1 |...

How to create a selection dropdown in php form

I am working on a project and would like to give the user per-determined values when updating a record. Here is my code so far. <?php // if there are any errors, display them if ($error != '')...

How to manage looping on this list on Applscript?

The list is in the form of:- 0: https://url 1: https://url ..... And so on. How could I loop on this list. So I could fetch the number first without ":" and type it somewhere then fetch the url that ...

Read / write different Records data from / to Untyped files in Pascal?

I've a programming project in my college. Using a File type for storing data is allowed, and I did exactly like this one: pascal-programming And, here's what I achieved so far: I tried to write the ...

Haskell: is there a way of 'mapping' over an algebraic data type?

Suppose that I have some simple algebraic data (essentially enums) and another type which has these enums as fields. data Color = Red | Green | Blue deriving (Eq, Show, Enum, Ord) data Width = ...

What's a better way of managing large Haskell records?

Replacing fields names with letters, I have cases like this: data Foo = Foo { a :: Maybe ... , b :: [...] , c :: Maybe ... , ... for a lot more fields ... ...

Android uninstalled app records

I want get the records of the deleted apps.Can this be realized?Some apps may have deleted now,I want to get the records.I want know the API. Thanks very much!

Simple Object class and records

I am currently learning Java and I have done several tutorials. However, each exercise was focused on one part (example learning IO, learning Strings, graphics, etc) but only a few had multiple ...

Deleting MySQL records at a certain time

I have a database set up on a shared hosting plan that has a set of records that I would like to have delete automatically at the date and time that a user has entered into the exptime column. How ...

MS Access trying to link a record with a page tab

I've been searching for a few days and doing every word combination I can think of to try to find the answer to my issue. I'm hoping someone can help me. Before I begin I'd also like to say I'm very ...

Last 2 month record in SQL

I try this SQL query to get current total and also last 2 months records and current month record means total 3 months.. Select distinct tblRv.Owner, (Select Count(*) as total from tblvv WHERE ...

OCAML the record field is not mutable

I have this code: type seed = {c: Graphics.color option; x : int; y : int };; type voronoi = {dim : int * int; seeds : seed array};; let v1 = {dim = 50,50; seeds = [| {c=Some Graphics.red; x=50; y=...

Suitescript - How do I access “Related Records” subtab and get/store their associated values?

I am trying to get the associated values from the related records subtab. For example, I am trying to get the associated bills values (amount billed) on a purchase order. There is no other way to do ...

Crystal reports filter out data on condition

I have a report where I have multiple fields and I want to filter out records of a group on the basis of 2 fields and still show all the other records. for eg I have 5 fields, the values of status ...

Improve performance when copying records from table to another one

Hi buddies :) I was required to create a php code to handle some workers' data stored in DB. I got the desired result but it takes seconds and seconds (seconds and seconds! >.<) to finish, so I'm ...

PHP NetSuite API - get Customer records by internalID range

I need to sync Customers from NetSuite to another system and would like to search Customers by internalId range, using the PHP library for the API. Given that the internalId's are autoincrement ...

Records with Z3

I have looked quite closely at the documentation and guides and tried a fair few things myself. However, the solution to my problems evades me. This is what the tutorial says regarding records but it ...

MySQL select one record from multiple tables

I have 400+ tables and each has a column timestamp. I'd like to pull the first row/record for timestamp for each of these tables. I don't want to run 400+ queries, what would the best way to do this ...

display all records where foreign key is equal to id in a modal

I want to display all the records from transactions table to the modal where the transactions "records_id" is equal to records "ID" but then display only the current row of the looped link which is "...

Displaying duplicate values in sql

I need to find all records where two fields in one table occur more than once in a specified date range. I have used the below which enables me to display the duplicates but i need to specify within ...

Multiple records in SQL

UPDATE first i try this sp with filter id select Row_number() OVER(ORDER BY (SELECT 1)) AS 'RowNumber', vf.* from login ld, veh vf where (ld.fid=vf.fid) and ld.id = '0257' and ld.id <> ...

Error while installing records library via pip for Python

just found this records library (version 0.5.0) for Python (my version is 3.6.0) and tried to install it with $ pip3 install records The package loads and finishes but afterwards the installation is ...

Returning a new structure with fields changed

I'm looking for a simple way to return a new structure which is a copy of an existing one with some fields changed, without modifying the original. I get that you can use setf to change the data in ...

Updating Every Record in Mongo [duplicate]

How would I update every record in the "title" collection for mongo, to make a field named LastReturnedName set to Name for every single record? Thought it would be something like this: db.title....
Translating... 0%