Questions tagged [models]

A model is an abstract representation of a real-life object or process. Models are a part of the popular MVC pattern, as well as a more general concept in the sciences for approximating behavior.

A model is one of the three components of Model-View-Controller (MVC) programming pattern that provides knowledge: data and how to work with this data, responding to requests by changing its state.

It can also refer to models in a more general scientific sense, denoting a representation (generally a simplification) of how a real-world process operates.

2397 questions
0
votes
1 answer

Running tensorflow demo models

I am completely new to tensorflow and have some questions about running the demo models. I have installed tensorflow in a venv with anaconda and also cloned the whole GitHub tensorflow repo into a seperate folder on my mac (don't know if that is…
ctfreak90
  • 11
  • 3
0
votes
1 answer

getcolumntype() function in model.php script giving problem

The site that I worked on is working very fine on the test server. I downloaded the same copy and uploaded onto the new server (live). I changed the database.php in app/config folder to set the db connection variables. And I get this following error…
Hima
  • 1
0
votes
1 answer

ASP.Net MVC C# model with multiple instances of another model?

I am trying to achieve system where an engineer will be able to raise a request and a person from the support will be able to assign the request to himself/herself, so that when someone will try to display the request in the website, it will appear…
0
votes
1 answer

Notify Users on User Defined Events on Data changes on server

I have a node.js webservice with 10k users.each user can monitor price changes of 1k items(realtime or every second). my problem started here: each user can listen 4 event : start/stop/higher/lower for each item. when event fired i need to send sms…
0
votes
1 answer

Ruby on Rails 3 multiple tables

This is my first ROR application, so this is probably a basic question. I'm building a review site where users submit reviews. I have a User model, a Review model, a Location model, and a Category model. The Category model belongs to the Location…
John
  • 4,362
  • 5
  • 32
  • 50
0
votes
1 answer

how to push data to array of a model in angular2

I have a model to store some data. I created a array of that model in my service.Like this modelArray: MyModel[]; But when i try to push some data to the array it fails with the error Cannot read property push of…
Shruti Nair
  • 1,982
  • 8
  • 30
  • 57
0
votes
2 answers

Mongoose: moving find() results to an array in the file

I created a module that contains a mongoose model (user) that I want to export. For now, this only contains properties name and age. var mongoose = require('mongoose'); var db = mongoose.createConnection('localhost', 'moviemeter'); var schema…
Tijl Declerck
  • 105
  • 1
  • 11
0
votes
2 answers

Django Datetime field question

Hello I have been having a problem with django while trying to work with datetime. In my webapp I have a table like so when I run server. ID Owing 1 -100 (All the same value) 2 -100 3 -100 . . . . . . It has in one column Invoice…
Shehzad009
  • 1,547
  • 6
  • 28
  • 42
0
votes
1 answer

Extract field form django model

I have defined the following model: class User(models.Model): userid = models.CharField(max_length=26,unique=True) status = models.CharField(max_length=5) Now I would like to extract the value of my status field for a specific userid that I…
robjeiter
  • 197
  • 1
  • 16
0
votes
1 answer

two model in one scene

I think two canvas on a page, load the two models, right hand slide, can compare, but now found a problem, fingers sliding at the same time, the program will mistake is magnified model, rather than rotating model? So, I think of a way , a canvas,…
shunzizhan
  • 23
  • 4
0
votes
1 answer

Django admin inline table not posting values to one to one relationship

sorry for the convoluted question but I am a uni student who has been thrown into the Django framework without any training and I'm doing my best to understand all this in a short time. I really enjoy Django but just can't figure out one problem I'm…
0
votes
2 answers

Multiple relationships in CakePHP

Suppose (for lack of better example) I have a model Person and another model Twin (meaning a pair of twins). Twins has two Person foreign keys, say first_born_id and second_born_id referencing the id fields of two different people (in Person). How…
zephyr
  • 159
  • 1
  • 11
0
votes
2 answers

Atom Editor Django model autocomplete db model field types

I like using Atom for Django projects and most of the autocomplete is working as well as linting but .... I would thing the the type of the model fields could be autocompleted for example: name = models.***CharField***(max_length=256) age =…
seagraph
  • 7
  • 3
0
votes
2 answers

Django question on querysets

I have another Django/python question. I have a models.py which look something like this. class Client(models.Model): client_number = models.PositiveIntegerField() name = models.CharField(max_length=80) address =…
Shehzad009
  • 1,547
  • 6
  • 28
  • 42
0
votes
1 answer

Django make document filing structure + foreign keys

So... I am using django and sqlite3 and am trying to create a file storage system to link in with my database. I have 2 models: patient and appointment where patient has a 1 to many relationship with appointment. Each appointment needs to have…
Rudra Mutalik
  • 372
  • 4
  • 17