Search Results

Search found 6108 results on 245 pages for 'entry'.

Page 12/245 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Sql Server XML-type column duplicate entry detection

    - by aaaa bbbb
    In Sql Server I am using an XML type column to store a message. I do not want to store duplicate messages. I only will have a few messages per user. I am currently querying the table for these messages, converting the XML to string in my C# code. I then compare the strings with what I am about to insert. Unfortunately, Sql Server pretty-prints the data in the XML typed fields. What you store into the database is not necessarily exactly the same string as what you get back out later. It is functionally equivalent, but may have white space removed, etc. Is there an efficient way to compare an XML string that I am considering inserting with those that are already in the database? As an aside, if I detect a duplicate I need to delete the older message then insert the replacement.

    Read the article

  • WinMain not called before main (C/C++ Program Entry Point Issue)

    - by BT
    I was under the impression that this code #include <windows.h> #include <stdio.h> int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { printf("WinMain\n"); return 0; } int main() { printf("main\n"); return 0; } would output WinMain, but of course nothing ever works how you expects. Anyways, could somebody please tell me how to get this program to run WinMain first (I do have a reason for using both). I'm running windows 7 with mingw if that helps anything.

    Read the article

  • Entry points on different urls possible?

    - by user246114
    Hi, I've got a typical gwt project, but am using some url rewriting techniques such that urls entered like: www.mysite.com/johndoe www.mysite.com/janedoe all get served by my main entrypoint project.jsp file. This works great when deployed. When I'm running in hosted mode, it's a total bummer because changing the url in the browser breaks the link with the hosted-mode debugging, such that when I make changes to the source in eclipse and refresh, those changes are not immediately shown. I need to recompile the app and relaunch, and we all know how long that takes. Is there any way to somehow get the hosted-mode environment to recognize that the same webapp is being served on these different urls, and just reconnect the debugging connection? We basically get: http://localhost:8888/myproject.jsp?gwt.codesvr=192.168.1.2:9997 when launching hosted mode, I'd like: http://localhost:8888/johndoe to just reconnect to the debugger, if possible. Thanks

    Read the article

  • add_without_safety create new DB entry in controller

    - by Karl Entwistle
    Im trying to get a controller to create a new account with the user id filled in, this doesn't work in my controller or in the console, why? Any suggestions on how to implement this would be much appreciated. class PaymentNotification < ActiveRecord::Base after_create :add_account_to_market private def add_account_to_market if status == "Completed" line = LineItem.find(:first, :conditions => { :cart_id => cart.id }) line.quantity.times do Account.new(:user_id => cart.user_id) end end end end

    Read the article

  • @ManyToMany Duplicate Entry Exception

    - by zp26
    I have mapped a bidirectional many-to-many exception between the entities Course and Trainee in the following manner: Course { ... private Collection<Trainee> students; ... @ManyToMany(targetEntity = lesson.domain.Trainee.class, cascade = {CascadeType.All}, fetch = {FetchType.EAGER}) @Jointable(name="COURSE_TRAINEE", joincolumns = @JoinColumn(name="COURSE_ID"), inverseJoinColumns = @JoinColumn(name = "TRAINEE_ID")) @CollectionOfElements public Collection<Trainee> getStudents() { return students; } ... } Trainee { ... private Collection<Course> authCourses; ... @ManyToMany(cascade = {CascadeType.All}, fetch = {FetchType.EAGER}, mappedBy = "students", targetEntity = lesson.domain.Course.class) @CollectionOfElements public Collection<Course> getAuthCourses() { return authCourses; } ... } Instead of creating a table where the Primary Key is made of the two foreign keys (imported from the table of the related two entities), the system generates the table "COURSE_TRAINEE" with the following schema: I am working on MySQL 5.1 and my App. Server is JBoss 5.1. Does anyone guess why?

    Read the article

  • Django: url and content creation results in 500 and no apache error log entry

    - by user1684082
    If i try to open a created url i get an 500 error. My procedure was: First python manage.py startapp black I added in project/settings.py under INSTALLED_APPS 'black', I added in project/urls.py url(r'^test/', include('black.urls')), Content of black/urls.py is: from django.conf.urls import patterns, url from black import views urlpatterns = patterns('', url(r'^$', views.index, name='index') ) And content of black/views.py: from django.http import HttpResponse def index(request): return HttpResponse("SHOW ME: BLACK") After all i synced the database. I can't see any error in apache-error-log and also not in my posted django files. What could cause this?

    Read the article

  • perl: added hash entry in a subroutine is lost

    - by hansi
    Why is the hash empty on the second call of printHash? my %hash = (); addToHash(\%hash); printHash(\%hash); sub addToHash { my %hash = %{$_[0]}; $hash{"test"} = "test"; printHash(\%hash); } sub printHash { print "printHash: \n"; my %hash = %{$_[0]}; foreach my $key (keys %hash) { print "key: $key, value: $hash{$key}\n"; } } Output: printHash: key: test, value: test printHash:

    Read the article

  • Screen orientation change forces data re-entry

    - by Timbermar
    I'm developing a simple app, only a handful of activities and nothing to complicated. The issue I'm having is that in a few of my activities I have EditText widgets, and when the screen is rotated, these widgets loose their values. They still visually, that is, on the handset screen, report their values from before the rotation, but to the code report their default values. An example, I have an activity with an EditText, I enter a number, 15, the calculator starts calculating, displays a result. If at this point I rotate to a different orientation, as expected the activity dies, reloads, shows the new orientation, my value of 15 is still in the EditText, however the calculator (the code) calculates as if it was 0, which is the initial value. I have not tried changing the initial value to see if it is really pulling from the default value, or just setting itself to 0 when I cast it as an int. If I didn't explain this well enough, let me know, I can add source code if I need to. Thanks.

    Read the article

  • Forcing entry of certain character types in UITextField

    - by cannyboy
    If I have a UITextField which the user is inputing a registration number, which has the format: 11-11-1111 (that is 2 digits, a dash, 2 digits, a dash, four digits) How do I force the user to enter this kind of data only... so they can't enter anything except 0-9 in the first character, and only '-' for the third character etc.

    Read the article

  • How to reset keyboard for an entry field?

    - by David.Chu.ca
    I am using tag field as a flag for text fields text view fields for auto-jumping to the next field: - (BOOL)findNextEntryFieldAsResponder:(UIControl *)field { BOOL retVal = NO; for (UIView* aView in mEntryFields) { if (aView.tag == (field.tag + 1)) { [aView becomeFirstResponder]; retVal = YES; break; } } return retVal; } It works fine in terms of auto-jumping to the next field when Next key is pressed. However, my case is that the keyboards are different some fields. For example, one fields is numeric & punctuation, and the next one is default (alphabetic keys). For the numeric & punctuation keyboard is OK, but the next field will stay as the same layout. It requires user to press 123 to go back ABC keyboard. I am not sure if there is any way to reset the keyboard for a field as its keyboard defined in xib? Not sure if there is any APIs available? I guess I have to do something is the following delegate? -(void)textFieldDidBegingEditing:(UITextField*) textField { // reset to the keyboard to request specific keyboard view? .... } OK. I found a solution close to my case by slatvik: -(void) textFieldDidBeginEditing:(UITextField*) textField { textField.keyboardType = UIKeybardTypeAlphabet; } However, in the case of the previous text fields is numeric, the keyboard stays numeric when auto-jumped to the next field. Is there any way to set keyboard to alphabet mode?

    Read the article

  • Grouping and retrieving most recent entry in a table for each group

    - by Lisa
    First off, please bear with me if I don't state the SQL question correctly. I have a table that has multiple columns of data. The selection criteria for my table groups based on column 1(order #). There could be multiple items on each order, but the item #'s are not grouped together. Example: Order Customer Order Date Order Time Item Quantity 123456 45 01/02/2010 08:00 140 4 123456 45 01/02/2010 08:30 270 29 123456 45 03/03/2010 09:00 140 6 123456 45 04/02/2010 09:30 140 10 123456 45 04/02/2010 10:00 270 35 What I need is a result like: Order Customer Order Date Order Time Item Quantity 123456 45 04/02/2010 09:30 140 10 123456 45 04/02/2010 10:00 270 35 This result shows that after all the changes the final order includes 10 of Item 140 and 35 of Item 270. Is this possible. python

    Read the article

  • JPA @version - can it be used to calcualate version of a table entry

    - by OpenSource
    Hi, Please consider the following table (created using a corresponding entity) request ------- id requestor type version items 1 a t1 1 5 2 a t1 2 3 3 b t1 1 2 4 a t2 1 4 5 a t1 3 9 The above is what I want to achieve. The version field is a calculated field others are user provided. Basically the request's version needs to be calculated based on the combination of requestor and the type. The first occurance with a given combination will have a version 1 then version 2 and so on. I tried various things using @version on a different entity with just the three columns and joining the two entities using ManytoOne etc but I'm not able to get to the desired outcome. I dont want to confuse you with the things I tried. Since the objective is simple there should be an easier way I suppose? Can you please help? - any help greatly appreciated! thanks in advance

    Read the article

  • Getting the most recent entry per group in a select statement

    - by TheObserver
    I have 3 tables to join to get table1.code, table1.series, table2.entry_date, table3.title1 and I'm trying to get the most recent non null table3.title1 grouped by table1.code and table1.series. select table1.code, table1.series, max(table2.entry_date), table3.Title1 from table3 INNER JOIN table2 ON table3.ID = table2.ID INNER JOIN table1 ON table2.source_code = table1.code where table3.Title1 is not NULL group by table1.code, table1.series, table3.Title1 seems to give me all entries with a non null title1 instead of the most recent one. How should I structure the query to just pick the newest version of Title1 per code & series?

    Read the article

  • Grabbing Just The Top Entry From A LINQ Query

    - by Soo
    I basically have a lot of poorly designed code to do something that, I'm sure, can be done far more elegantly. What I'm trying to do is grab the last date from a database table. var Result = from a in DB.Table orderby a.Date descending select new {Date = a}; foreach(var Row in Result) { LastDate = Row.Date.Date; break; } Basically, there's a foreach loop that is designed to run only once. Crappy code! What's a "best practice" way to accomplish the same thing?

    Read the article

  • I can't access certain subkeys in an entry in the registry

    - by shifuimam
    I'm trying to get to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\, but the only subkey being returned in C# is MachineSettings - even though there are additional subkeys, including Games and several keys named for different user SIDs. How can I access these other keys? Even a standard user account can read the content of both Games and that account's own SID (when looking in regedit)...

    Read the article

  • Elegant way to distinct Path or Entry key

    - by sum1stolemyname
    I have an application loading CAD data (Custom format), either from the local filesystem specifing an absolute path to a drawing or from a database. Database access is realized through a library function taking the drawings identifier as a parameter. the identifiers have a format like ABC 01234T56-T, while my paths a typical windows Paths (eg x:\Data\cadfiles\cadfile001.bin). I would like to write a wrapper function Taking a String as an argument which can be either a path or an identifier which calls the appropriate functions to load my data. Like this: Function CadLoader(nameOrPath : String):TCadData; My Question: How can I elegantly decide wether my string is an idnetifier or a Path to a file? Use A regexp? Or just search for '\' and ':', which are not appearing in the Identifiers?

    Read the article

  • SELECT GROUP BY latest entry in INBOX msg sent by user

    - by Mohatir S
    i am building a simple PM for my personal website where a user can join and send message to the registered users on my website, i am stuck in grouping and selecting latest user (by latest msg time) in INBOX page my table : id msg_from msg_to msg date in_del out_del i want to show latest user's id each in a group here is my SQL query : SELECT ttalk.id, ttalk.msg_from, users.first_name, users.last_name FROM ttalk INNER JOIN users ON ttalk.msg_from = users.id WHERE ttalk.msg_to = '$_SESSION[user_id]' AND ttalk.in_del='0' GROUP BY ttalk.msg_from DESC LIMIT 500 Thanks in advance :-)

    Read the article

  • Alternate value of "FeedUri" for contacts entry .

    - by Preeti
    Hi, I am trying to create a contact on Google Apps. I am using Admin credential to create contact in other users in same domain. Problem i am facing is when i use: Uri feedUri = new Uri(ContactsQuery.CreateContactsUri("default")); ContactEntry createdEntry = (ContactEntry)service.Insert(feedUri, ContactEntry[0]); It is adding contact in Admin account but i a want to put contact in other user's account. How can i do that? I am using Google Apps API version 2 for .NET. Thanx

    Read the article

  • database deign advice wanted: double data entry

    - by john
    hi, I'm designing a database for capturing clinical trial data. The data are entered twice by two persons, independently and the results must be matched. What are the best database tools to use to achieve the best results. Any one has similar experiences? Your helps are highly appreciated. thanks.

    Read the article

  • How do I generate an array from a string representation of that array?

    - by question_about_the_problem
    I want to generate the array $result_array. There is no error at the page, but not works! that not works ! //BOF: Result Array $result_array = ''; $result_array .= '"messages" => "' . $errors .'",'; $result_array .= '"this_addr_type" => "' . (int)$_REQUEST['edit'] .'",'; if (ACCOUNT_GENDER == 'true') { $result_array .= '"gender_male" => "' . $male .'",'; $result_array .= '"gender_female" => "' . $female .'",'; } $result_array .= '"firstname" => "' . $entry['entry_firstname'] .'",'; $result_array .= '"lastname" => "' . $entry['entry_lastname'] .'",'; if (ACCOUNT_COMPANY == 'true') { $result_array .= '"company" => "' . $entry['entry_company'] .'",'; } $result_array .= '"street_address" => "' . $entry['entry_street_address'] .'",'; if (ACCOUNT_SUBURB == 'true') { $result_array .= '"suburb" => "' . $entry['entry_suburb'] .'",'; } $result_array .= '"postcode" => "' . $entry['entry_postcode'] .'",'; $result_array .= '"city" => "' . $entry['entry_city'] .'",'; if (ACCOUNT_STATE == 'true') { $result_array .= '"state" => "' . $entry['entry_state'] .'",'; } $result_array .= '"country" => "' . $entry['entry_country_id'] .'"'; //EOF: Result Array $_RESULT = array($result_array); that works $_RESULT = array( "this_addr_type" => (int)$_REQUEST['edit'], "gender_male" => $male, "gender_female" => $female, "firstname" => $entry["entry_firstname"], "lastname" => $entry["entry_lastname"], "company" => $entry["entry_company"], "street_address" => $entry["entry_street_address"], "suburb" => $entry["entry_suburb"], "postcode" => $entry["entry_postcode"], "city" => $entry["entry_city"], "state" => $entry["entry_state"], "country" => $entry["entry_country_id"] );

    Read the article

  • Why the array not works ?

    - by question_about_the_problem
    I want to generate the array $result_array. There is no error at the page, but not works! that not works ! //BOF: Result Array $result_array = ''; $result_array .= '"messages" => "' . $errors .'",'; $result_array .= '"this_addr_type" => "' . (int)$_REQUEST['edit'] .'",'; if (ACCOUNT_GENDER == 'true') { $result_array .= '"gender_male" => "' . $male .'",'; $result_array .= '"gender_female" => "' . $female .'",'; } $result_array .= '"firstname" => "' . $entry['entry_firstname'] .'",'; $result_array .= '"lastname" => "' . $entry['entry_lastname'] .'",'; if (ACCOUNT_COMPANY == 'true') { $result_array .= '"company" => "' . $entry['entry_company'] .'",'; } $result_array .= '"street_address" => "' . $entry['entry_street_address'] .'",'; if (ACCOUNT_SUBURB == 'true') { $result_array .= '"suburb" => "' . $entry['entry_suburb'] .'",'; } $result_array .= '"postcode" => "' . $entry['entry_postcode'] .'",'; $result_array .= '"city" => "' . $entry['entry_city'] .'",'; if (ACCOUNT_STATE == 'true') { $result_array .= '"state" => "' . $entry['entry_state'] .'",'; } $result_array .= '"country" => "' . $entry['entry_country_id'] .'"'; //EOF: Result Array $_RESULT = array($result_array); that works $_RESULT = array( "this_addr_type" => (int)$_REQUEST['edit'], "gender_male" => $male, "gender_female" => $female, "firstname" => $entry["entry_firstname"], "lastname" => $entry["entry_lastname"], "company" => $entry["entry_company"], "street_address" => $entry["entry_street_address"], "suburb" => $entry["entry_suburb"], "postcode" => $entry["entry_postcode"], "city" => $entry["entry_city"], "state" => $entry["entry_state"], "country" => $entry["entry_country_id"] );

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >