Search Results

Search found 8536 results on 342 pages for 'indexed fields'.

Page 7/342 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Find Duplicate Fields in a Table

    - by Derek Dieter
    A common scenario when querying tables is the need to find duplicate fields within the same table. To do this is simple, it requires utilizing the GROUP BY clause and counting the number of recurrences. For example, lets take a customers table. Within the customers table, we want to find all the [...]

    Read the article

  • How to make a Django model fields calculated at runtime?

    - by Anatoly Rr
    I have a model: class Person (models.Model): name = models.CharField () birthday = models.DateField () age = models.IntegerField () I want to make age field to behave like a property: def get_age (self): return (datetime.datetime.now() - self.birthday).days // 365 age = property (get_age) but at the same time I need age to be a true field, so I can find it in Person._meta.fields, and assign attributes to it: age.help_text = "Age of the person", etc. Obviously I cannot just override Person.save() method to calculate and store age in the database, because it inevitably will become wrong later (in fact, it shouldn't be stored in the database at all). Actually, I don't need to have setters now, but a nice solution must have setting feature. Is it possible in Django, or probably there is a more pythonic and djangoic approach to my problem?

    Read the article

  • Bidirectional one-to-many associations with indexed collections in NHibernate

    - by Jørn Schou-Rode
    Last summer, I asked a question regarding how to add new object to an IList mapped as a one-to-many with NHibernate. One of the answers let me to this paragraph in the documentation: Please note that NHibernate does not support bidirectional one-to-many associations with an indexed collection (list, map or array) as the "many" end, you have to use a set or bag mapping. While I am pretty sure I understand what this paragraph says, I have no idea why or how to work around this limitation. As I am now again working with a model that seems to require a "bidirectional one-to-many association with an index collection", I figured the time was right for follow-up questions: Why does NHibernate have this limitation on associations? It is my impression that the guys behind NHibernate are quite clever, so I assume there is a pretty good reason. What are the common workarounds for this shortcoming? Making the collection a non-indexed bag and adding an explicit Position property to the child class? Any better solutions?

    Read the article

  • How can i have custom fields on the posts page in wordpress?

    - by Luccas
    First I've created a home.php page to replace index.php and can add some custom fields on this new one and to have in it lastest 3 posts. On home.php page I put: <?php echo get_post_meta($post->ID, 'test', true); ?>"/> but it doesn't works cause it tries get the post id and not the id of the page. If i put 18 (id of the page) directly it works, but i want it dinamicaly: <?php echo get_post_meta(18, 'test', true); ?>"/> And this condition is not satisfied for test: if($post->post_type == 'page'){ echo 'This item is a page and the ID is: '.$post->ID; }

    Read the article

  • Filtering custom fields on wordpress admin page

    - by Kyril
    I'm currently working on a wordpress 2.9.2 plugin (my first) that creates additional custom fields that will later be read from the template. The plugin adds an additional meta box to the "Edit Post" screen which is responsible for manipulating these values. My problem is that the custom fields generated by the plugin also show up in the "Custom Fields" box. Ideally I would like for the custom fields generated by the plugin to be managed separately from any other custom fields for that same post/page. Is there a way that I can filter fields specific to my plugin to prevent them from being displayed in the "Custom Fields" box? I have yet to locate any action or filter that will let me capture and manipulate those values before they are rendered on "Edit Post".

    Read the article

  • Definition of variables/fields type within a constructor, how is it done?

    - by elementz
    I just had a look at Suns Java tutorial, and found something that totally confused me: Given the following example: public Bicycle(int startCadence, int startSpeed, int startGear) { gear = startGear; cadence = startCadence; speed = startSpeed; } Why is it, that the types of the variables (fields?) gear, cadence and speed do not need to be defined? I would have written it as follows: public Bicycle(int startCadence, int startSpeed, int startGear) { int gear = startGear; int cadence = startCadence; int speed = startSpeed; } What would be the actual differnce?

    Read the article

  • How to handle existing indexed Mixed Case url's?

    - by marcusstarnes
    I have an asp.net web forms application that has been live for a number of years and as such has quite a lot of indexed content on google. Ideally, I'd prefer that all Url's for the website are in lowercase but I understand that having 2 versions of the same content indexed in search engines (MixedCase.aspx and mixedcase.aspx) will be bad for seo. I was wondering: a) Should I just leave everything in its current Mixed Case form and never change it? OR b) I can change the code so everything is in lowercase from here on in, BUT, is there a way of doing this so as the search engines are aware of this change and don't penalise me?

    Read the article

  • Getting list of fields back from 'use fields' pragma?

    - by makenai
    So I'm familiar with the use fields pragma in Perl that can be used to restrict the fields that are stored in a class: package Fruit; use fields qw( color shape taste ); sub new { my ( $class, $params ) = @_; my $self = fields::new( $class ) unless ref $class; foreach my $name ( keys %$params ) { $self->{ $name } = $params->{ $name }; } return $self; } My question is.. once I've declared the fields at the top, how I can get the list back.. say because I want to generate accessors dynamically? Is keys %FIELDS the only way? Secondarily, is there a more efficient way to pre-populate the fields in the constructor than looping through and assigning each parameter as I am above? Thanks!

    Read the article

  • Indexed key vs indexed separate columns, which one is faster ?

    - by Jerry
    In MYSQL, from a pure performance perspective, if I have a table with large amount of data with 10/1 read/write ratio. is it faster in read/write performance to have 4 search criteria in separate columns and all indexed or have them combined in to one single string acting as a key and store in one indexed column ? e.g. say this table with 5 columns, first name, last name, sex, country and file where the first four columns will ALWAYS be given as a part of search parameters in a search or have a table with two columns, key and file. where the value of key can be john-smith-male-australia ?? I don't quite get the pros and cons. the point I try to stress is the fact that all parameters will be given.in a search.

    Read the article

  • Dynamic Custom Fields for Data Model

    - by Jerry Deng
    I am in the process of creating a dynamic database where user will be able to create resource type where he/she can add custom fields (multiple texts, strings, and files) Each resource type will have the ability to display, import, export its data; I've been thinking about it and here are my approaches. I would love to hear what do you guys think. Ideas: just hashing all the custom data in a data field (pro: writing is easier, con: reading back out may be harder); children fields (the model will have multiple fields of strings, fields of text, and fields for file path); fixed number of custom fields in the same table with a key mapping data hash stored in the same row; Non-SQL approach, but then the problem would be generating/changing models on the fly to work with different custom fields;

    Read the article

  • SQL SERVER – Identity Fields – Contest Win Joes 2 Pros Combo (USD 198) – Day 2 of 5

    - by pinaldave
    August 2011 we ran a contest where every day we give away one book for an entire month. The contest had extreme success. Lots of people participated and lots of give away. I have received lots of questions if we are doing something similar this month. Absolutely, instead of running a contest a month long we are doing something more interesting. We are giving away USD 198 worth gift every day for this week. We are giving away Joes 2 Pros 5 Volumes (BOOK) SQL 2008 Development Certification Training Kit every day. One copy in India and One in USA. Total 2 of the giveaway (worth USD 198). All the gifts are sponsored from the Koenig Training Solution and Joes 2 Pros. The books are available here Amazon | Flipkart | Indiaplaza How to Win: Read the Question Read the Hints Answer the Quiz in Contact Form in following format Question Answer Name of the country (The contest is open for USA and India residents only) 2 Winners will be randomly selected announced on August 20th. Question of the Day: Which of the following statement is incorrect? a) Identity value can be negative. b) Identity value can have negative interval. c) Identity value can be of datatype VARCHAR d) Identity value can have increment interval larger than 1 Query Hints: BIG HINT POST A simple way to determine if a table contains an identity field is to use the SSMS Object Explorer Design Interface. Navigate to the table, then right-click it and choose Design from the pop-up window. When your design tab opens, select the first field in the table to view its list of properties in the lower pane of the tab (In this case the field is ProductID). Look to see if the Identity Specification property in the lower pane is set to either yes or no. SQL Server will allow you to utilize IDENTITY_INSERT with just one table at a time. After you’ve completed the needed work, it’s very important to reset the IDENTITY_INSERT back to OFF. Additional Hints: I have previously discussed various concepts from SQL Server Joes 2 Pros Volume 2. SQL Joes 2 Pros Development Series – Output Clause in Simple Examples SQL Joes 2 Pros Development Series – Ranking Functions – Advanced NTILE in Detail SQL Joes 2 Pros Development Series – Ranking Functions – RANK( ), DENSE_RANK( ), and ROW_NUMBER( ) SQL Joes 2 Pros Development Series – Advanced Aggregates with the Over Clause SQL Joes 2 Pros Development Series – Aggregates with the Over Clause SQL Joes 2 Pros Development Series – Overriding Identity Fields – Tricks and Tips of Identity Fields SQL Joes 2 Pros Development Series – Many to Many Relationships Next Step: Answer the Quiz in Contact Form in following format Question Answer Name of the country (The contest is open for USA and India) Bonus Winner Leave a comment with your favorite article from the “additional hints” section and you may be eligible for surprise gift. There is no country restriction for this Bonus Contest. Do mention why you liked it any particular blog post and I will announce the winner of the same along with the main contest. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Joes 2 Pros, PostADay, SQL, SQL Authority, SQL Puzzle, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • null values vs "empty" singleton for optional fields

    - by Uko
    First of all I'm developing a parser for an XML-based format for 3D graphics called XGL. But this question can be applied to any situation when you have fields in your class that are optional i.e. the value of this field can be missing. As I was taking a Scala course on coursera there was an interesting pattern when you create an abstract class with all the methods you need and then create a normal fully functional subclass and an "empty" singleton subclass that always returns false for isEmpty method and throws exceptions for the other ones. So my question is: is it better to just assign null if the optional field's value is missing or make a hierarchy described above and assign it an empty singleton implementation?

    Read the article

  • Recognizing text fields according to their label value

    - by Pierpaolo Bagnasco
    I have an application who has text fields (not select, not checkbox or other types) where an user can enter some value, like this: ISBN and E-Mail are the label of each input. Now I have to automatically test these inputs according to their label. The question is: how to recognize that, for example, the first input requires an ISBN code? I programmed something like this: turn the label value to lowercase check if the label value contains isbn if so set the field value to a random ISBN code (i.e.: 1234567890), else set it to a random value (default) For the email field: turn the label value to lowercase check if the label value contains e-mail or email or mail if so set the field value to a random email (i.e.: [email protected]), else set it to a random value (default) And so on for each text field I encounter. Is that reliable? How can I improve the "recognizing part"? I know only the label value and the field value (what is already written in the field by default) for each text input.

    Read the article

  • Wordpress homepage with latest posts and Advanced Custom fields - How?

    - by Allan Crabtree
    I'd like my homepage to display my latest posts which are portfolio projects of mine. Beneath these project thumbnails I've got my static content which I'm using the Repeater add-on from Advanced Custom Fields to grab. I cant get it all to work on the same page... either get the blog to work or the ACF stuff to work. Never both because one needs to be a designated static page and one needs to be a posts page. I don't understand how to tie it together and make it appear as one page. I've experimented with the settings in the reading panel.. I've tried using front-page.php I've read up on the WP hierarchy etc I've tried using templates... I've tried wp_reset_postdata(); which I read about elsewhere on Stack Overflow. What settings must I use in the reading panel. Do I need to use a template file? Here's the code I'm working with, I've split the code between templates and different files already, but just for ease of reading its all together here (maybe that's the right way to do it anyway, I wouldn't know..) <!-- The posts/portfolio items --> <?php get_header(); ?> <div> <?php if(have_posts()) : ?> <ul> <?php while ( have_posts() ) : the_post(); ?> <li> <!-- Permalink,title and post thumbnail here (omitted) --> </li> <?php endwhile; ?> </ul> <?php else: ?> <h2>No Posts found</h2> <?php endif; ?> </div> <!-- Now for the ACF Stuff --> <?php if(get_field('care_list')): ?> <?php while(has_sub_field('care_list')): ?> <div class="grid_2 what-i-care-about gap"> <div class="important-img-container"> <?php the_sub_field('care_list_image'); ?> </div> <h3><?php the_sub_field('care_list_title'); ?></h3> </div> <?php endwhile; ?> <?php endif; ?> <?php get_footer(); ?> Please help a frustrated learner! Thanks in advance.

    Read the article

  • How to make Delphi Prism indexed properties visible to C# when properties are not default

    - by Arcturus
    I have several Delphi Prism classes with indexed properties that I use a lot on my C# web applications (we are migrating a big Delphi Win32 system to ASP.Net). My problem is that it seems that C# can't see the indexed properties if they aren't the default properties of their classes. Maybe I'm doing something wrong, but I'm completely lost. I know that this question looks a lot like a bug report, but I need to know if someone else knows how to solve this before I report a bug. If I have a class like this: TMyClass = public class private ... method get_IndexedBool(index: Integer): boolean; method set_IndexedBool(index: Integer; value: boolean); public property IndexedBool[index: Integer]: boolean read get_IndexedBool write set_IndexedBool; default; // make IndexedBool the default property end; I can use this class in C# like this: var myObj = new TMyClass(); myObj[0] = true; However, if TMyClass is defined like this: TMyClass = public class private ... method get_IndexedBool(index: Integer): boolean; method set_IndexedBool(index: Integer; value: boolean); public property IndexedBool[index: Integer]: boolean read get_IndexedBool write set_IndexedBool; // IndexedBool is not the default property anymore end; Then the IndexedBool property becomes invisible in C#. The only way I can use it is doing this: var myObj = new TMyClass(); myObj.set_IndexedBool(0, true); I don't know if I'm missing something, but I can't see the IndexedBool property if I remove the default in the property declaration. Besides that, I'm pretty sure that it is wrong to have direct access to a private method of a class instance. Any ideas?

    Read the article

  • How to remove old indexed URLs from Google?

    - by Gok Demir
    I used Cs-cart for a site. Default installation SEO is not suitable for Turkish accented characters such as "ö" which maps to automatically "ae". Then I modified the php code and now it substitutes "ö" with "o" and "s"-"s" etc. Also I changed a category name to a better one. My problem is, google indexed both previous versions and new versions. Previous wrong urls gives 404 error. I used sitemap addon and send it to google and sitemap does not include wrong urls. However these old urls are still indexed on google. What can I do to remove them. For example http://www.google.com.tr/search?q=%C3%A7ak%C4%B1l+ta%C5%9Flar%C4%B1ndan+babil+site:eeski.com&hl=tr&client=firefox-a&hs=Z31&rls=com.ubuntu:en-US:official&filter=0 gives two top results old wrong url leads to 404: http://www.eeski.com/kitap-dergi/bilim-ve-teknik/cakl-talarndan-babil-kulesine-rakamlarn-evrensel-tarihi-ii.html right current url: http://www.eeski.com/kitap/bilim-ve-teknik/cakil-taslarindan-babil-kulesine-rakamlarin-evrensel-tarihi-ii.html What could I make google only index current urls stated on sitemap?

    Read the article

  • Fluent NHibernate Automap does not take into account IList<T> collections as indexed

    - by Francisco Lozano
    I am using automap to map a domain model (simplified version): public class AppUser : Entity { [Required] public virtual string NickName { get; set; } [Required] [DataType(DataType.Password)] public virtual string PassKey { get; set; } [Required] [DataType(DataType.EmailAddress)] public virtual string EmailAddress { get; set; } public virtual IList<PreferencesDescription> PreferencesDescriptions { get; set; } } public class PreferencesDescription : Entity { public virtual AppUser AppUser { get; set; } public virtual string Content{ get; set; } } The PreferencesDescriptions collection is mapped as an IList, so is an indexed collection (when I require standard unindexed collections I use ICollection). The fact is that fluent nhibernate's automap facilities map my domain model as an unindexed collection (so there's no "position" property in the DDL generated by SchemaExport). ¿How can I make it without having to override this very case - I mean, how can I make Fluent nhibernate's automap make always indexed collections for IList but not for ICollection

    Read the article

  • Speed up SQL Server Fulltext Index through Text Duplication of Non-Indexed Columns

    - by Alex
    1) I have the text fields FirstName, LastName, and City. They are fulltext indexed. 2) I also have the FK int fields AuthorId and EditorId, not fulltext indexed. A search on FirstName = 'abc' AND AuthorId = 1 will first search the entire fulltext index for 'abc', and then narrow the resultset for AuthorId = 1. This is bad because it is a huge waste of resources as the fulltext search will be performed on many records that won't be applicable. Unfortunately, to my knowledge, this can't be turned around (narrow by AuthorId first and then fulltext-search the subset that matches) because the FTS process is separate from SQL Server. Now my proposed solution that I seek feedback on: Does it make sense to create another computed column which will be included in the fulltext search which will identify the Author as text (e.g. AUTHORONE). That way I could get rid of the AuthorId restriction, and instead make it part of my fulltext search (a search for 'abc' would be 'abc' and 'AUTHORONE' - all executed as part of the fulltext search). Is this a good idea or not? Why?

    Read the article

  • Spring Data Neo4J @Indexed(unique = true) not working

    - by Markus Lamm
    I'm new to Neo4J and I have, probably an easy question. There're NodeEntitys in my application, a property (name) is annotated with @Indexed(unique = true) to achieve the uniqueness like I do in JPA with @Column(unique = true). My problem is, that when I persist an entity with a name that already exists in my graph, it works fine anyway. But I expected some kind of exception here...?! Here' s an overview over basic my code: @NodeEntity public abstract class BaseEntity implements Identifiable { @GraphId private Long entityId; ... } public class Role extends BaseEntity { @Indexed(unique = true) private String name; ... } public interface RoleRepository extends GraphRepository<Role> { Role findByName(String name); } @Service public class RoleServiceImpl extends BaseEntityServiceImpl<Role> implements { private RoleRepository repository; @Override @Transactional public T save(final T entity) { return getRepository().save(entity); } } And this is my test: @Test public void testNameUniqueIndex() { final List<Role> roles = Lists.newLinkedList(service.findAll()); final String existingName = roles.get(0).getName(); Role newRole = new Role.Builder(existingName).build(); newRole = service.save(newRole); } That's the point where I expect something to go wrong! How can I ensure the uniqueness of a property, without checking it for myself?? THANKS IN ADVANCE FOR ANY IDEAS!! P.S.: I'm using neo4j 1.8.M07, spring-data-neo4j 2.1.0.BUILD-SNAPSHOT and Spring 3.1.2.RELEASE.

    Read the article

  • How is SU indexed so fast on Google?

    - by ekaj
    I just did a quick Google for a question that was 20 minutes old, to look for an answer, and it was already on Google Search - how is this possible? I glanced over this article which seems to suggest that SU has added RSS feeds (which SU has, but when I opened the feed the article says last posted 6 minutes ago, but when Googled it is 11 hours old) - which leads me to think (Based on that article, I don't know much about search indexing but I am reading at the moment) that most of this indexing is done thanks to the sitemap - is there anything else I am unaware of that helps SU questions get on Google so fast?

    Read the article

  • Change the language of fields in Microsoft Word

    - by Martin Wiboe
    Hi, I am using Word 2010 and some built-in features with fields, such as bibliography. My Word installation is English and I am writing a report in US English. However, my computer has its locale set to Denmark. This affects the formatting of dates and some of the text in the auto-generated fields (e.g. in bibliography it says "citeret:" instead of "cited:"). How can I change the language of the fields to US English? Thanks, Martin

    Read the article

  • Force Windows 8 to search indexed files

    - by Hrvoje
    When using search files in Windows 8 (win+f) I don't get expected results. For example, I installed VLC, it's in Program Files (86) folder, and that folder is selected for indexing. Search for files (win+f) gives 0 results. If I pin to start that exe, then it's found - but I don't want to do this, that's not the point. Where does it search for files? Is there any way to specify search locations? It doesn't use Indexing Options settings, at least it seams so. Also, searching from explorer window is kinda slow - I tried entering VLC.EXE in search box (when in c:\ root), and it takes some time to give correct results. It works, but it looks like it doesn't use indexing, rather scan all files/folders, which is slow.

    Read the article

  • Vlookup using wildcards in indexed column

    - by Dm3k1
    I know how to use a wildcard with Vlookup on the reference value, but what about on the matched column index? I know you can do for instance VLOOKUP("*Hello*",A4:G4,2,FALSE) However, what if you wanted to match a cell that is "Hello", with another one that is "Why, Hello there!" (so the opposite i suppose) My data is set in a way where a macro is going to ask if A4 in workbook 1 matches C2:C25000 in workbook 2 to return the corresponding value in D back to workbook 1. The thought is that when A4 in workbook 1 says Its DHS Here, that I could input a value such as DHS in column C in workbook 2 and have it say its a match. Is this possible?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >