Search Results

Search found 6630 results on 266 pages for 'cname record'.

Page 65/266 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • Pageview implementation

    - by The Elite Gentleman
    Hi everyone I want to add a pageview feature on my current web application. This page view is based on the count of user viewing the page. It must be unique, i.e. I must not view a person's page 10000 times and record it as 10000 views, just record 1 view instead. My question is, should I base my pageview count on IP address? If not, what is/are the best approach in doing this? I know that if the person has logged in to my system, I can simply use the user id stored in the session and check on the record if the user has/hasn't viewed the page and update accordingly. But for "anonymous" viewers, what is the best approach? Thanks. PS How does Youtube does it?

    Read the article

  • How To Get A Field Value Based On The Max Of Another Field In VFP v8.0

    - by DaveB
    So, I have a table and I want to get the value from one field in the record with the greatest DateTime() value in another field and where still another field is equal to a certain value. Example data: Balance Created MeterNumber 7924.252 02/02/2010 10:31:48 AM 2743800 7924.243 02/02/2010 11:01:37 AM 2743876 7924.227 02/02/2010 03:55:50 PM 2743876 I want to get the balance for a record with the greatest created datetime for a specific meter number. In VFP 7 I can use: SELECT a.balance ,MAX(a.created) FROM MyTable a WHERE a.meternumber = '2743876' But, in the VFP v8.0 OleDb driver I am using in my ASP.NET page I must conform to VFP 8 which says you must have a GROUP BY listing each non aggregate field listed in the SELECT. This would return a record for each balance if I added GROUP BY a.balance to my query. Yes, I could issue a SET ENGINEBEHAVIOR 70 but I wanted to know if this could be done without having to revert to a previous version?

    Read the article

  • Cross-reference between delphi records

    - by Paul-Jan
    Let's say I have a record TQuaternion and a record TVector. Quaternions have some methods with TVector parameters. On the other hand, TVector supports some operations that have TQuaternion parameters. Knowing that Delphi (Win32) does not allow for forward record declarations, how do I solve this elegantly? Using classes is not really an option here, because I really want to use operator overloading for this rare case where it actually makes good sense. For now I simply moved these particular methods out of the records and into separate functions, the good old-fashioned way. Better suggestions are most welcome.

    Read the article

  • Getting "on the wire" Size of Messages in WCF

    - by Mystagogue
    While I'm making SOAP or REST invocations to WCF, I'd like to have the channel stack on either end (client and server) record the on-the-wire size of the data received. So I'm guessing I need to add a custom behavior to the channel stack on either side. That is, on the server side I'd record the IP-header advertised size that was received. On the client side I'd record the IP-header advertised size that was returned from the server. But this presupposes that this information is visible to a custom WCF behavior at the channel stack level. Perhaps it is only visible at the level of ASP.NET (at a layer beneath WCF)? In short, does anyone have any further insight on if and how this information is accessible? I must qualify that this "size" data will be collected in a production environment, as part of regular business logic calls. This question is related to my earlier bandwidth question.

    Read the article

  • Question About DateCreated and DateModified Columns - MS SQL Server

    - by user311509
    CREATE TABLE Customer ( customerID int identity (500,20) CONSTRAINT . . dateCreated datetime DEFAULT GetDate() NOT NULL, dateModified datetime DEFAULT GetDate() NOT NULL ); When i insert a record, dateCreated and dateModified gets set to default date/time. When i update/modify the record, dateModified and dateCreated remains as is? What should i do? Obviously, i need to dateCreated value to remain as was inserted the first time and dateModified keeps changing when a change/modification occurs in the record fields. In other words, can you please write a sample quick trigger? I don't know much yet... Any help will be appreciated.

    Read the article

  • Question About DateCreated and DateModified Columns - SQL Server

    - by user311509
    CREATE TABLE Customer ( customerID int identity (500,20) CONSTRAINT . . dateCreated datetime DEFAULT GetDate() NOT NULL, dateModified datetime DEFAULT GetDate() NOT NULL ); When i insert a record, dateCreated and dateModified gets set to default date/time. When i update/modify the record, dateModified and dateCreated remains as is? What should i do? Obviously, i need to dateCreated value to remain as was inserted the first time and dateModified keeps changing when a change/modification occurs in the record fields. In other words, can you please write a sample quick trigger? I don't know much yet...

    Read the article

  • Must I loop to search results for a specific value?

    - by tag
    I have a table in the database: name Opinion Tim Tim has an opinion John other random text Dan Dan's random text Al Al says something else I call this data and get it back in getRecords.lastResult To access John's opinion, I could use: getRecords.lastResult[1].opinion But that's only because I know that John is the second record (record 1), but this may change. So the right way is to search through the results to first find the record index for John, then access his opinion. My guess is I need some sort of a loop? Is there an easier way to search for John directly without a loop?

    Read the article

  • MVC: Upload image in partial view, routing problem

    - by D.J
    I am trying to upload images via a form which sits in partial view using MVC. View Code: <form action="/Item/ImageUpload" method="post" enctype="multipart/form-data"> <%= Html.TextBox("ItemId",Model.ItemId) %> <input type="file" name="file" id="file" /> <input type="submit" value="Add" /> </form> Action Code: public void ImageUpload(string ItemId, HttpPostedFileBase file) { // upload image // Add Image record to database // Associate Image record to Item record //Go back to existing view where the partial view sits RedirectToAction("Details/"+ItemId); } The Image is uploaded successful All the data manipulation are working as expected However instead of redirect to view "Item/Details/id", page went to "/Item/ImageUpload" I tried several different way of doing this including using jsonResultAction, but all failed in this same result. where did i do wrong, any ideas? thanks in advance

    Read the article

  • 50 sequences in one line

    - by user343934
    I have Muttiple sequence alignment (clustal) file and i want to read this file and arrange sequences in a such a way that in looks more clear and precise in order. I am doing this from biopython using AlignIO object. My codes like this alignment = AlignIO.read("opuntia.aln", "clustal") print "Number of rows: %i" % len(align) for record in alignment: print "%s - %s" % (record.id, record.seq) My Output-- http://i48.tinypic.com/ae48ew.jpg , it looks messy and long scrolling. What i want to do is print only 50 sequences in each line and continue till the end of alignment file. I wish to have output like this---http://i45.tinypic.com/4vh5rc.jpg from --http://www.ebi.ac.uk/Tools/clustalw2/, sorry two links are just a text due to my reputation. Any suggestions, algorithm and sample code is appreciated Thanks in advance Br,

    Read the article

  • Querying Two Tables At Once

    - by John
    Hello, I am trying to do what I believe is called a join query. First, in a MySQL table called "login," I want to look up what "loginid" is in the record where "username" equals $profile. (This will be just one record / row in the MySQL table). Then, I want to take that "loginid" and look up all rows / records in a different MySQL table called "submission," and pull data that have that "loginid." This could possibly be more than one record / row. How do I do this? The code below doesn't seem to work. Thanks in advance, John $profile = mysql_real_escape_string($_GET['profile']); $sqlStr = "SELECT l.username, l.loginid, s.loginid, s.submissionid, s.title, s.url, s.datesubmitted, s.displayurl FROM submission AS s, login AS l WHERE l.username = '$profile', s.loginid = l.loginid ORDER BY s.datesubmitted DESC";

    Read the article

  • .net Diagnostics best practices?

    - by mamu
    We initially didn't use any logging or debug tracing but after spending few weeks to trace down some data corruption we decided to put required Debug.Write and Trace for production and Debug.Assert So now question is What is the best practice to use debug and trace logging. I am just looking for some thing generic. public void AddRectodatabase(object record) { Debug.WriteLine(record.ToString()); Trace.WriteLine(record.ToString()); // Add it to databse Debug.Assert(true, "Use this on case by case basis"); } Is this good enough for general purpose, am i doing anything wrong in there? We want to stick with .net System.Diagnostics over other alternatives like log4net. Is there any thing else useful in System.Diagnostics?

    Read the article

  • Walking a hierarchy table with Linq

    - by Retrocoder
    I have a table with two columns, GroupId and ParentId (both are GUIDS). The table forms a hierarchy so I can look for a value in the “GroupId” filed, when I have found it I can look at its ParentId. This ParentId will also appear in the GroupId of a different record. I can use this to walk up the hierarchy tree from any point to the root (root is an empty GUID). What I’d like to do is get a list of records when I know a GroupId. This would be the record with the GroupId and all the parents back to the root record. Is this possible with Linq and if so, can anyone provide a code snippet?

    Read the article

  • Best practice for partial updates in a RESTful service

    - by magiconair
    I am writing a RESTful service for a customer management system and I am trying to find the best practice for updating records partially. For example, I want the caller to be able to read the full record with a GET request. But for updating it only certain operations on the record are allowed, like change the status from ENABLED to DISABLED. (I have more complex scenarios than this) I don't want the caller to submit the entire record with just the updated field for security reasons (it also feels like overkill). Is there a recommended way of constructing the URIs? Do I use GET, POST, PUT or is there no agreed way of doing these kind of things? When reading the REST books RPC style calls seem to be frowned upon. Thanks Frank

    Read the article

  • Upsert - Efficient Update or Insert in VB.Net, SQL Server

    - by HK1
    I'm trying to understand how to streamline the process of inserting a record if none exists or updating a record if it already exists. I'm not using stored procedures, although maybe that would be the most efficient way of doing this. The actual scenario in which this is necessary is saving a user preference/setting to my SettingsUser table. In MS Access I would typically pull a DAO recordset looking for the specified setting. If the recordset comes back empty then I know I need to add a new record which I can do with the same recordset object. On the other hand, if it isn't empty, I can just update the setting's value right away. In theory, this is only two database operations. What is the recommended way of doing this in .NET?

    Read the article

  • Data model for timesheet to task and/or timesheet to project?

    - by John
    Let's say I want to make a simple project tracking system. A manager can create a project. Then he can create tasks for that project. Team members can record the hours they work for each task or for the project as a whole. Is the following design for the t_timesheet table a good idea? timesheet_id - primary key, autoincrement project_id - not null, foreign key constraint to t_project task_id - nullable, foreign key constraint to t_task user_id - not null, foreign key constraint to t_user hours - decimal Or should I do something like this: timesheet_id - primary key, autoincrement task_id - not null, foreign key constraint to t_task user_id - not null, foreign key constraint to t_user hours - decimal In the second option, I intend to always have a record in t_task labelled "miscellaneous items" with a foreign key to the relevant t_project record. Then I'll be able to track all hours for a project that aren't for any particular task. Are any of the ideas above good? What would be better?

    Read the article

  • SQL trigger for audit table question

    - by mattgcon
    I am writing a trigger to audit updates and deletes in tables. I am using SQL Server 2008 My questions are, Is there a way to find out what action is being taken on a record without going through the selection phase of the deleted and inserted tables? Another question is, if the record is being deleted, how do I record within the audit table the user that is performing the delete. (NOTE: the user connected to the database is a general connection string with a set user, I need the user who is logged into either a web app or a windows app) Please help?

    Read the article

  • PHP e-commerce site talking to internal database for stock / ordering?

    - by CitrusTree
    Hi. I'm working on an e-commerce site (either bespoke with PHP, or using Drupal/Ubercart), and I'd like to investigate the site interacting with an internal (filemaker) database we use to manage stock and orders. Currently we manually transfer orders from the web site to our own database, and the site does not check or record changes in stock. My plan to allow the 2 to interact is as follows: Make the internal database available externaly on a machine with a fixed IP Allow external access from the site only Connect to the internal database using ODBC (or similar) Use simple queries to check stock / record stock changes / record order details Am I missing something here as this sounds quite straight forward? Is there another solution I should be taking a look at? Thanks in advance for any help or comments.

    Read the article

  • Simulating an identity column within an insert trigger

    - by William Jens
    I have a table for logging that needs a log ID but I can't use an identity column because the log ID is part of a combo key. create table StuffLogs { StuffID int LogID int Note varchar(255) } There is a combo key for StuffID & LogID. I want to build an insert trigger that computes the next LogID when inserting log records. I can do it for one record at a time (see below to see how LogID is computed), but that's not really effective, and I'm hoping there's a way to do this without cursors. select @NextLogID = isnull(max(LogID),0)+1 from StuffLogs where StuffID = (select StuffID from inserted) The net result should allow me to insert any number of records into StuffLogs with the LogID column auto computed. StuffID LogID Note 123 1 foo 123 2 bar 456 1 boo 789 1 hoo Inserting another record using StuffID: 123, Note: bop will result in the following record: StuffID LogID Note 123 3 bop

    Read the article

  • Oracle SQL Update query takes days to update

    - by B Senthil Kumar
    I am trying to update a record in the target table based on the record coming in from source. For instance, if the incoming record is present in the target table I would update them in the target else I would simply insert. I have over one million records in my source while my target has 46 million records. The target table is partitioned based on calendar key. I implement this whole logic using Informatica. I find that the Informatica code is perfectly fine looking at the Informatica session log but its in the update it takes long time (more than 5 days to update one million records). Any suggestions as to what can be done on the scenario to improve the performance?

    Read the article

  • saving a records containing a member of type string to a file (Delphi, Windows)

    - by wonderer
    I have a record that looks similar to: type TNote = record Title : string; Note : string; Index : integer; end; Simple. The reason I chose to set the variables as string (as opposed to an array of chars) is that I have no idea how long those strings are going to be. They can be 1 char long, 200 or 2000. Of course when I try to save the record to a type file (file of...) the compiler complains that I have to give a size to string. Is there a way to overcome this? or a way to save those records to an untyped file and still maintain a sort of searchable way? Please do not point me to possible solutions, if you know the solution please post code. Thank you

    Read the article

  • MVVM where does the code to load the data belong?

    - by cody
    As I wrap my head around the mvvm thing, the view is the view, and the viewmodel is 'a modal of a view' and the model are the entities we are dealing with (or at least that is my understanding). But I'm unclear as to what and when the model entities are populated. So for example: Lets say I have app that needs to create a new record in a DB. And that record should have default values to start with. Who is responsible for the new record, and getting the default values. Does this have anything to do with MVVM or is that part of a data access layer? Who calls the the viewmodel? Or for existing records when\where are the records retrieved? And saved if altered? Thanks

    Read the article

  • Commenting out protect_from_forgery

    - by Andy
    Hi, I was trying to use active record store but I kept getting an invalid authenticity token. Someone told me to remove my protect_from_forgery from application controller. I know that this would remove all auth tokens but I'm not sure if this is a good idea. Does active record store not need auth tokens? By the way, all I need is a way to dynamically calculate the number of users online and their session variables. If there is a better way than using active record store it would be nice to know.

    Read the article

  • Alternative to NOT EXISTS

    - by Dave Colwell
    Hi all, I have two tables linked by an ID column, lets call them Table A and table B. My goal is to find all the records in table A that have no record in table B. For instance: Table A: ID----Value 1-----value1 2-----value2 3-----value3 4-----value4 Table B ID----Value 1-----x 2-----y 4-----z 4-----l As you can see, record with ID = 3 does not exist in table B, so i want a query that will give me record 3 from table A. the way i am currently doing this is by saying AND NOT EXISTS (SELECT ID FROM TableB) but since the tables are huge, the performance on this is terrible. Also, when i tried using a Left Join where TableB.ID is null, it didnt work. Can anyone suggest an alternative?

    Read the article

  • C++ conditional compilation

    - by Shaown
    I have the following code snippet #ifdef DO_LOG #define log(p) record(p) #else #define log(p) #endif void record(char *data){ ..... ..... } Now if I call log("hello world") in my code and DO_LOG isn't defined, will the line be compiled, in other words will it eat up the memory for the string "hello world"? P.S. There are a lot of record calls in the program and it is memory sensitive, so is there any other way to conditionally compile so that it only depends on the #define DO_LOG? Thanks in advance.

    Read the article

  • How to use Zend_Cache Identifier ?

    - by ArneRie
    Hi Folks, i think iam getting crazy, iam trying to implement Zend_Cache to cache my database query. I know how it works and how to configure. But i cant find a good way to set the Identifier for the cache entrys. I have an method wich search for records in my database (based on an array with search values). /** * Find Record(s) * Returns one record, or array with objects * * @param array $search Search columns => value * @param integer $limit Limit results * @return array One record , or array with objects */ public function find(array $search, $limit = null) { $identifier = 'NoIdea'; if (!($data = $this->_cache->load($identifier))) { // fetch // save to cache with $identifier.. } But what kind of identifier can use in this situation?

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >