Search Results

Search found 31200 results on 1248 pages for 'field service'.

Page 126/1248 | < Previous Page | 122 123 124 125 126 127 128 129 130 131 132 133  | Next Page >

  • an error "variable of field declared void"

    - by lego69
    I have this code: header - test.h Inside header I have some class Z and definitions of two functions test and test2 I call function test2 from test void test2(Z z, Z const *za); this is implementation of the function: void test2(Z z, Z const *za){ int i = z; //this row works cout << i << endl; } I call it from test: test2(z1, za1); // za1 is pinter to object and z1 is some object but in my header I receive an 3 errors: Multiple markers at this line - initializer expression list treated as compound expression - `A' was not declared in this scope - variable or field `quiz2' declared void can somebody please explain why? thanks in advance

    Read the article

  • MySQL Join Comma Separated Field

    - by neeraj
    I have two tables. First Table is a batch table that contain comma separated student id in field "batch" batch -------------- id batch -------------- 1 1,2 2 3,4 Second Table is marks marks ---------------------- id studentid subject marks 1 1 English 50 2 2 English 40 3 3 English 70 4 1 Math 65 5 4 English 66 6 5 English 75 7 2 Math 55 How we can find those students of first batch id =1 who have scored more than 45 marks in English without using sub query. Problem i found to get this done using a single query is that we can not use IN as an association operator in JOIN statement What changes are required in below query to make it work? SELECT * FROM batch INNER JOIN marks ON marks.studentid IN(batch.batch) where batch.id = 1

    Read the article

  • Toggled() text input field not working in IE6 in Jquery 1.3.2

    - by Michal
    In IE6 after showing() or toggling() an initially hidden text input field it is impossible to enter any text in the box. It is also impossible to focus() on the element. I am using jquery 1.3.2 Here is the code... Any ideas? $(document).ready(function(){ $(".hide").click(function(){ $(".form").toggle(); }) }) and HTML <form> <div class="hide"> Show </div> <div class="form" style="display:none"> <input type="text" name="crap"> </div> </form>

    Read the article

  • Preventing entire JOINed MYSQL query from failing when one field is missing within a WHERE clause

    - by filip o
    I am doing a couple of joins with a variable in the WHERE clause. I'm not sure if I am doing everything as efficiently as I could, or even using the best practices but my issue is that half my tables have data for when tableC.type=500, and the other half don't resulting in the entire query failing. SELECT tableA.value1 , tableB.value2, tableC.value3 FROM tableA JOIN tableB ON tableB.id=tableA.id JOIN tableC ON tableC.id=tableB.id WHERE tableA.category=$var && tableC.type=500; What I would like to happen is to still get tableA.value1 and tableB.value2 even if there is no field in tableC with a type=500. any thoughts? i'm totally stumped as how to approach this...

    Read the article

  • Match two mysql cols on alpha chars (ignoring numbers in same field)

    - by Steve
    I was wondering if you know of a way I could filter a mysql query to only show the ‘alpha’ characters from a specific field So something like SELECT col1, col2, **alpha_chars_only(col3)** FROM table I am not looking to update only select. I have been looking at some regex but without much luck most of what turned up was searching for fields that only contain ‘alpha’ chars. In a much watered down context... I have col1 which contains abc and col two contains abc123 and I want to match them on alpha chars only. There can be any number of letters or numbers. Any help very much wel come

    Read the article

  • Project Naming Convention Feedback Please

    - by Sam Striano
    I am creating a ASP.NET MVC 3 application using Entity Framework 4. I am using the Repository/Service Pattern and was looking for feedback. I currently have the following: MVC Application (GTG.dll) GTG GTG.Controllers GTG.ViewModels Business POCO's (GTG.Business.dll) This contains all business objects (Customer, Order, Invoice, etc...) EF Model/Repositories (GTG.Data.dll) GTG.Business (GTG.Context.tt) I used the Entity POCO Generator Templates. GTG.Data.Repositories Service Layer (GTG.Data.Services.dll) GTG.Data.Services - Contains all of the service objects, one per aggregate root. The following is a little sample code: Controller Namespace Controllers Public Class HomeController Inherits System.Web.Mvc.Controller Function Index() As ActionResult Return View(New Models.HomeViewModel) End Function End Class End Namespace Model Namespace Models Public Class HomeViewModel Private _Service As CustomerService Public Property Customers As List(Of Customer) Public Sub New() _Service = New CustomerService _Customers = _Service.GetCustomersByBusinessName("Striano") End Sub End Class End Namespace Service Public Class CustomerService Private _Repository As ICustomerRepository Public Sub New() _Repository = New CustomerRepository End Sub Function GetCustomerByID(ByVal ID As Integer) As Customer Return _Repository.GetByID(ID) End Function Function GetCustomersByBusinessName(ByVal Name As String) As List(Of Customer) Return _Repository.Query(Function(x) x.CompanyName.StartsWith(Name)).ToList End Function End Class Repository Namespace Data.Repositories Public Class CustomerRepository Implements ICustomerRepository Public Sub Add(ByVal Entity As Business.Customer) Implements IRepository(Of Business.Customer).Add End Sub Public Sub Delete(ByVal Entity As Business.Customer) Implements IRepository(Of Business.Customer).Delete End Sub Public Function GetByID(ByVal ID As Integer) As Business.Customer Implements IRepository(Of Business.Customer).GetByID Using db As New GTGContainer Return db.Customers.FirstOrDefault(Function(x) x.ID = ID) End Using End Function Public Function Query(ByVal Predicate As System.Linq.Expressions.Expression(Of System.Func(Of Business.Customer, Boolean))) As System.Linq.IQueryable(Of Business.Customer) Implements IRepository(Of Business.Customer).Query Using db As New GTGContainer Return db.Customers.Where(Predicate) End Using End Function Public Sub Save(ByVal Entity As Business.Customer) Implements IRepository(Of Business.Customer).Save End Sub End Class End Namespace

    Read the article

  • PHP displaying error for already used Username and empty field

    - by Pixel Reaper
    I want PHP to make sure the username is not already used and also check to see if the field is empty. Sorry I am a huge noob when it comes to php. Here is my code: // Check for an Username: $dup = mysql_query("SELECT user_username FROM users WHERE user_username='".$_POST['user_username']."'"); if(mysql_num_rows($dup) >0){ $errors[] = 'Username already used.'; } else{ $un = mysqli_real_escape_string($dbc, trim($_POST['user_username'])); echo '<b>Congrats, You are now Registered.</b>'; } else { $errors[] = 'You forgot to enter your Username.'; }

    Read the article

  • What is an instance of a field called?

    - by waxwing
    This might be an odd question, but it has actually caused me some headache. In Object oriented programming, there are accepted names for key concepts. In our model, we have classes with methods and fields. Now, going to the data world: An instance of a class is called an object. An instance of a field is called... what? A value? Isn't the term value a little broad for this? I have been offered "property" as well, but isn't property also part of the model and not the data? (This is not purely academic, I am actually coding these concepts.)

    Read the article

  • Django m2m adding field in the secondary table

    - by dana
    I have a model in wich i'm using m2m Django ORM feature, in order to create an aditional table to hold my 'classrom members'. My problem is: the membership to a classroom must be accepted by the invited one, so i need a boolean field :1=accepted, 0=refused/unseen yet. How can i include this boolean variable in the aditionally generated classroom_membership (and NOT in the primary created Classroom table)? class Classroom(models.Model): user = models.ForeignKey(User, related_name = 'classroom_creator') classname = models.CharField(max_length=140, unique = True) date = models.DateTimeField(auto_now=True) open_class = models.BooleanField(default=True) #domain = models.EnumField() members = models.ManyToManyField(User,related_name="list of invited members") Thanks in advance!!

    Read the article

  • Programming terms - field, member, properties (C#)

    - by Petr
    Hi, I was trying to find meaning of this terms but especially due to language barrier I was not able to understand what they are used for. I assume that "field" is variable (object too?) in the class while "property" is just an object that returns specific value and cannot contain methods etc. By "member" I understand any object that is declared on the class level. But these are just my assumptions based on commented code samples where some careful programmers used "property region" etc. I would really appreciate if someone could explain it to me.

    Read the article

  • Getting age from an encrypted DOB field

    - by Mailforbiz
    Hi all Due to certain compliance requirements, we have to encrypt the user DOB field in the database. We also have another requirement to be able to search a user by his age. Our DB doesn't support transparent encryption so encryption will handled by the application. Any good ideas on how to allow for searching by age? One thought is to save the YOB in a separate column in cleartext and still be able to comply to our compliance requirement. Aside from that, any other design strategy that would help? Thanks in advance!

    Read the article

  • Unable to send Url in a Form field

    - by araja
    I am facing a problem while submitting a simple HTML form. Here is the form: <form name="form1" method="post" action="dest.php"> <input type="hidden" name="my_url" value="http://www.livrotek.com/book_image/thumb/12726851341.jpg" /> </form> When I submit this form, I get an apache error: You don't have permission to access dest.php on this server. If I change the value of "my_url" field to any value other than a URL, then it works fine.

    Read the article

  • Validating an e-mail field based on a specific domain

    - by mmsa
    I have a site that will require a login by the users. The client will only only users from their company's domain to gain access. I need to validate the field based on an e-mail domain address. ie. only allow email addresses from @mycompany.com to go through. Can this be done with the jquery.validate plugin? I see where you can check to see if it's a valid e-mail, but I'd like to make sure it matches a specific pattern (@mycompany.com). Any help would be appreciated!

    Read the article

  • R: Change the fields' (slots') values of the class assigning a value to some other field

    - by Max Li
    Assgning a value to one field, how can I make the other fields changing. Consider the following R5 class C<-setRefClass("C", fields=list(a="numeric",b="numeric") , methods=list( seta = function(x){ a<<-x b<<-x+10 cat("The change took place!") } ) # end of the methods list ) # end of the class Now create the instance of the class c<-C$new() This command c$seta(10) will result in that c$a is 10 and c$b is 20. So it actually works, however, I want to achieve this result by the command c$a<-10 (i.e. after that I want c$b to be equal to 20 as defined in the class in the logic of seta() function) How can I do it?

    Read the article

  • Linq.Where-to-SQL on a text field comparing to a list of values

    - by StampedeXV
    Customer.text is a field in an T-SQL DB (that I do not control and thus may not alter) of type "text". I'd like to do something like this: List<string> compare = new List<string>(); compare.Add("one"); compare.Add("two"); var q = from t in customer where t.text.Contains( compare.First()) select t; this will work. But now I'd like to do something like: (!NOT WORKING!) var q = from t in customer where compare.Contains( t.text ) select t; How can I achieve this? Is it even possible?

    Read the article

  • SQL update statement to change the value of a field and not replace it

    - by wzzrd
    I'm in the process of migrating some databases. I have this table that has a couple of hundred rows, and has a filename column. To each record in this table, the filename column needs to be altered and part of a path needs to be prepended to the value that is in that field. The table is like: | 1 | filename1 | | 2 | filename2 | and needs to become: | 1 | path/filename1 | | 2 | path/filename2 | I am not an SQL guru, but I know the basics. This eludes me though. Is there a way to do something like: update table set filename = 'path/' + filename where id = 1;

    Read the article

  • Best practice: Define form field name in backend or the template

    - by AbcAeffchen
    If you designing a webpage you should separate the backend from the frontend. But if you use forms you have to name them. But where should you set this name? e.g. PHP: $fieldName = 'email'; $template->setVar('field_name', $fieldName) ... if(!empty($_POST)) validate($_POST[$fieldName]); Template: <input type="text" name="{$field_name}"> Or just PHP: if(!empty($_POST)) validate($_POST['email']); Template: <input type="text" name="email"> Or should I write a function that can be called from the template an converts an array of field data (name, type, value, id, class, ...) into html code? Is there a best practice where to define fieldnames (types,etc.)? Notice: I used php and smarty like pseudocode (and tags), but its a general question.

    Read the article

  • Best way to create a Unique ID field for an enum

    - by jax
    What is the best way to get a Unique ID from an ENUM that will stay consistent between repeated execution of the program? Currently I am doing this manually by passing an ID to the enum constructor. I don't really want to do this is I can help it. Another option would be to use a static field that gets incremented for each enum value. The problem is that if later I decide to move the enum fields around or delete some this will cause problems with my program as the ID will be saved into user preferences. The ID can be any basic type or a String.

    Read the article

  • LINQ to SQL - Get only substring from a field

    - by domanokz
    I'm studying ASP.NET MVC and I use LINQ to SQL for model. I have a table named "Note" with the fields "Title" and "Content". The "Content" field can contain thousand characters. What I want to do is to display the LIST of notes in a page. I use table with two columns, for "Title" and SUBSTRING of the "Content" (50 characters). My problem is, I don't know how to edit the model so that it will display only the substring of the "Content". Thanks in advance!

    Read the article

  • Display custom field if it has content or hide if not

    - by fxg
    I'm display a custom field this way: <div class="blog_text"> <img src="<?php the_field('imagen_prensa'); ?>" /> </div> I would like to make the img appear only if the user has uploaded an image, because right now if there is no image appear the symbol of broken image. I have tried with this but it doesn't work: <?php if (get_field('imagen_prensa') != ''): ?> <img src="<?php the_field('imagen_prensa'); ?>" /> <?php endif; ?> Any idea on the way to achieve it?

    Read the article

  • TFS: how to change custom field allowed values

    - by Budda
    I have my custom field of string type with predefined set of values: "1 - Cool", "2 - Good", "3 - Average",... Now it is necessary to remove "2 - Good" value and rename "3 - Average" into "2 - Average". I see easy solution: just delete 2 existing "2 - Good" and "3 - Average" and create the new "2 - Average". Question: Q1: What will happens with issues that contain values to be deleted? Probably, system won't accept such work item change? Q2: What is a good approach to do what I need? Thanks a lot! Any thoughts are welcome!

    Read the article

  • [PyQt4] QFileDialog problem (native: fast but no input field; non-native: has input field but slow)

    - by Bing Jian
    Hi, This seems a known problem but I have not found a good workaround. I like the style of the non-native QFileDialog, especially the feature that allows the user to input the path directly which is very convenient since the user can easily copy/paste the folder/file name from other applications. However, it seems very slow when the dialog is first launched. The native option is quite responsive but the problem is that it does not provide an input field so for the user to select a folder he/she has to walk into the directory, which can take many mouse clicks and is not fun. I am not sure if you have experienced similar problem or if I miss something. BTW, my PyQt version is 4.4.3 and I am working on Windows XP. Thanks, Bing

    Read the article

  • MySQL TEXT field performance

    - by Jonathon
    I have several TEXT and/or MEDIUMTEXT fields in each of our 1000 MySQL tables. I now know that TEXT fields are written to disk rather than in memory when queried. Is that also true even if that field is not called in the query? For example, if I have a table (tbExam) with 2 fields (id int(11) and comment text) and I run SELECT id FROM tbExam, does MySQL still have to write that to disk before returning results or will it run that query in memory? I am trying to figure out if I need to reconfigure our actual db tables to switch to varchar(xxxx) or keep the text fields and reconfigure the queries.

    Read the article

  • Filtering SQLAlchemy query on attribute_mapped_collection field of relationship

    - by bsa
    I have two classes, Tag and Hardware, defined with a simple parent-child relationship (see the full definition at the end). Now I want to filter a query on Tag using the version field in Hardware through an attribute_mapped_collection, eg: def get_tags(order_code=None, hardware_filters=None): session = Session() query = session.query(Tag) if order_code: query = query.filter(Tag.order_code == order_code) if hardware_filters: for k, v in hardware_filters.iteritems(): query = query.filter(getattr(Tag.hardware, k).version == v) return query.all() But I get: AttributeError: Neither 'InstrumentedAttribute' object nor 'Comparator' object associated with Tag.hardware has an attribute 'baseband The same thing happens if I strip it back by hard-coding the attribute, eg: query.filter(Tag.hardware.baseband.version == v) I can do it this way: query = query.filter(Tag.hardware.any(artefact=k, version=v)) But why can't I filter directly through the attribute? Class definitions class Tag(Base): __tablename__ = 'tag' tag_id = Column(Integer, primary_key=True) order_code = Column(String, nullable=False) version = Column(String, nullable=False) status = Column(String, nullable=False) comments = Column(String) hardware = relationship( "Hardware", backref="tag", collection_class=attribute_mapped_collection('artefact'), ) __table_args__ = ( UniqueConstraint('order_code', 'version'), ) class Hardware(Base): __tablename__ = 'hardware' hardware_id = Column(Integer, primary_key=True) tag_id = Column(String, ForeignKey('tag.tag_id')) product_id = Column(String, nullable=True) artefact = Column(String, nullable=False) version = Column(String, nullable=False)

    Read the article

  • Submitting GET data with no input field?

    - by Rob
    I've never really thought about this, but it helps with some security of something I'm currently working on. Is it possible to submit GET data without an actual input field, and instead just getting it from the URL? If so, how would I go about doing this? It kind of makes sense that it should be possible, but at the same time it makes no sense at all. Perhaps I've been awake too long and need some rest. But I'd like to finish this project a bit more first, so any help you can offer would be appreciated. Thanks

    Read the article

< Previous Page | 122 123 124 125 126 127 128 129 130 131 132 133  | Next Page >