Search Results

Search found 7391 results on 296 pages for 'record locking'.

Page 46/296 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • File sizing issue in DOS/FAT

    - by Heather
    I've been tasked with writing a data collection program for a Unitech HT630, which runs a proprietary DOS operating system that can run executables compiled for 16-bit MS DOS with some restrictions. I'm using the Digital Mars C/C++ compiler, which is working well thus far. One of the application requirements is that the data file must be human-readable plain text, meaning the file can be imported into Excel or opened by Notepad. I'm using a variable length record format much like CSV that I've successfully implemented using the C standard library file I/O functions. When saving a record, I have to calculate whether the updated record is larger or smaller than the version of the record currently in the data file. If larger, I first shift all records immediately after the current record forward by the size difference calculated before saving the updated record. EOF is extended automatically by the OS to accommodate the extra data. If smaller, I shift all records backwards by my calculated offset. This is working well, however I have found no way to modify the EOF marker or file size to ignore the data after the end of the last record. Most of the time records will grow in size because the data collection program will be filling some of the empty fields with data when saving a record. Records will only shrink in size when a correction is made on an existing entry, or on a normal record save if the descriptive data in the record is longer than what the program reads in memory. In the situation of a shrinking record, after the last record in the file I'm left with whatever data was sitting there before the shift. I have been writing an EOF delimiter into the file after a "shrinking record save" to signal where the end of my records are and space-filling the remaining data, but then I no longer have a clean file until a "growing record save" extends the size of the file over the space-filled area. The truncate() function in unistd.h does not work (I'm now thinking this is for *nix flavors only?). One proposed solution I've seen involves creating a second file and writing all the data you wish to save into that file, and then deleting the original. Since I only have 4MB worth of disk space to use, this works if the file size is less than 2MB minus the size of my program executable and configuration files, but would fail otherwise. It is very likely that when this goes into production, users would end up with a file exceeding 2MB in size. I've looked at Ralph Brown's Interrupt List and the interrupt reference in IBM PC Assembly Language and Programming and I can't seem to find anything to update the file size or similar. Is reducing a file's size without creating a second file even possible in DOS?

    Read the article

  • Drupal Views Question: Displaying results in two columns?

    - by Jonathan
    I'm new to drupal and I have a question about views: I'm building an employee directory and need to display the results in two columns, such as: Record 1 Record 2 Record 3 Record 4 Record 5 Record 6 . . . How can I accomplish this? To take it one step further, I want each record formatted as: IMAGE NAME TITLE I have no idea where to start. Any assistance is appreciated!

    Read the article

  • Is there a way to force/manage file locking in windows?

    - by JPbuntu
    I have a 2 Windows machines networked and I am having trouble with simultaneous access to files. I would like only one user to be able to open a file at a time, which I thought was automatic, using file locks.... if the program used to access the file is locking the file. I believe the problem I am having is some of the programs I use, don't lock the file, and there for can be modified simultaneously by multiple users, which is very much not desired. Currently I am having this problem with only two computers, although as soon as I can figure out a solution to this problem the network is going to be expanded to 6 computers, which will include Windows 7, Vista, and XP, as well as a central file server (Samba). Is there a way to ensure that all files opened in windows get locked? Any suggestions are appreciated, thanks.

    Read the article

  • What is the best method to determine an account through DNS A record configuration?

    - by Matt
    I apologize if my description of the problem is unclear. I am working for an online CMS that allows external domains to be used similar to Tumblr or Flavors.me. I noticed both of these services simply require you to add an A record to your domain's DNS. When trying this, I added an A record for a blank name and "www" both leading to my webserver's IP. While this successfully routes to my server, it doesn't retain the used domain. This leaves me without any idea of what account they're attempting to reach at the application layer. I'm using nginx as my webserver. I have changed all the nameservers for a domain before, and that works properly, however that causes complications with other issues such as mail and isn't feasible on a scaled solution. What should I be doing here? Is the A record the correct method of accomplishing this? How are sites like Tumblr and Flavors.me determining which account is being referenced by the domain?

    Read the article

  • Will this SPF record restrict delivery of email for the original domain?

    - by user199421
    As part of the product we offer we send emails on behalf of our clients. Because the emails don't come from an IP associated with the client they are sometimes flagged as spam. We advised some of our clients to add an SPF record approving us to send emails on their behalf. We saw immediate improvement in deliverability rates after making the change however one of our clients was notified by his hosting provider that the SPF record we suggested to add would "slightly restrict" all emails that don't come from our servers (including our client's own servers). The record we use is this: v=spf1 a mx include:ourdomain.com ~all So my question is if the warning we received about this is correct and if so why and what can be done to solve this (allow sending email both from original domain and by ourselves).

    Read the article

  • Where are the Record Volume Controls in Windows 7?

    - by DJbigJack
    Windows XP (and previous versions) had a Record Volume Control panel that could be used to select between music inputs (Stereo Mix, Wav, etc) and a microphone. There doesn't seem to be an equivalent capability in Windows 7 . Is there a third party application that provides this functionality? Note: the Windows XP Record Volume Control was accessed by doubleclicking the Speaker icon in the system try which displayed the (Listen) Volume Control. In the menu there was a "properties" which gave you the option of displaying the RECORD Volume Control instead. I used this capabiliy in Win XP to select the required inputs for an Internet Radio Station and now with Win 7, I can't do it any longer

    Read the article

  • How to record both audio, Where i have one music running and my microphone is in use?

    - by YumYumYum
    I have one music playing, and i have microphone open, already the microphone is used by other application. In such case, how can i record that music and the microphone audio to a file? (if possible with command line). Follow up: $ rec new-file.wav Input File : 'default' (alsa) Channels : 2 Sample Rate : 48000 Precision : 16-bit Sample Encoding: 16-bit Signed Integer PCM In:0.00% 00:00:25.94 [00:00:00.00] Out:1.24M [ | ] Clip:0 ^C $ sox -d new-file.wav

    Read the article

  • Setting alias for DynDNS domain

    - by metalball
    Hey all, I've created DynDNS domain for testing my local sites, and i'm having trouble with pointing to root domain. From my registrar (GoDaddy) I've created a CNAME for www to point my example.dyndns.com so going to url www.example.com I'm reaching my site. But if I'm going to example.com I'm reaching to the IP of the A record. I can't set the IP for the A record to be my IP because I have dynamic IP, and it changes constatly, and I can't point the A record to domain, only IP. When trying to create CNAME record @ to point example.dyndns.com I'm getting error "A record of a different type exists for the hostname @, could not create CNAME" The only record using the '@' host are NS record, which I can't delete, and when tried to set another NS record with @ point to example.dyndns.com, I've lost connection to my site :) So what can I do to get example.com url reach my site? Thanx!

    Read the article

  • Hmm, why finding by '2' or '2' return the same record?

    - by SXLee
    Hi everyone, forget my newbie question, but why finding by '2' or '2' in Mysql returns the same record? For example: Say I have a record with string field named 'slug', and the value is '2'. And the following SQLs returns same record. SELECT * From articles WHERE slug='2' SELECT * From articles WHERE slug='2'

    Read the article

  • How do I record streams in chunks on Flash Media Server.

    - by Vasil
    I want to record a stream which is published with Flash Live Encoder to FMS 3.5, but split the recording in files with predefined length. For example if a stream 'webcam' is published I want to record it in chunks of 10 minutes: 'webcam1.flv', 'webcam2.flv' ... From what I can tell there's no facility to work with timers. The only solution I could think of was using stream.record() with a time limit parameter but that seems like a hack because it triggers NetStream.Record.DiskQuotaExceeded on the stream when the recordin should stop and start recording another chunk. Has anyone done something similar?

    Read the article

  • How to Check for record existence and do Insert in MYSQL ?

    - by karthik
    How to Check for record existence and do Insert or Update in MYSQL ? I have a script, which has set of Insert statements for multiple tables. Now when i try to execute the Insert statement, i want to do the following.. Check for the record existence and then do Insert or Update. If the Record is not exist do Insert. If the Record is already do not do anything. How to accomplish this ? Note : The script with Insert Statements are generated programmaticaly using SP

    Read the article

  • Handling Session timeout in asp.net so all info. is aviable before create/update record

    - by Jack
    I'm having problem with some data missing in the record. I've a ASP.net web app that take some information from the user then create a record on the database. It's your typical CRUD app but I've noticed lately that some record are missing couple fields. Where they are null value. I think it might have been an Session issue. What's the best way to handle session time out in a typical CRUD app? Thanks

    Read the article

  • Rails - Create if record doesn't exist or else update.....Whats Best way to do this?

    - by ChrisWesAllen
    Hi, I have a create statement for some models but its creating a record within a join table regardless if the record exist. Here is what my code looks like. @user = User.find(current_user) @event = Event.find(params[:id]) for interest in @event.interests @user.choices.create(:interest => interest, :score => 4) end The problem is it creates records no matter what. I would like it to create a record if it doesnt exist, if a record does exist I would just to it to take the attribute of the found record and add or subtract 1. So, I've been looking around and I see something called find_or_create_by. My question is what happens if it finds? Preferably if it finds,I would like to take the current :score attribute and +1. SO is it possible to find or create by id? I'm not sure what attribute I would find by since the model I'm looking at is a join model which only had id foreign keys and the score attribute. I tried @user.choices.find_or_create_by_user(:user => @user.id, :interest => interest, :score => 4) but got "undefined method `find_by_user'".....ANy ideas or help?

    Read the article

  • Count word occurrences in a text field with LINQ

    - by Yoann. B
    How can i get the occurrences count of a Word in a database text field With LINQ ? Keyword token sample : ASP.NET EDIT 4 : Database Records : Record 1 : [TextField] = "Blah blah blah ASP.NET bli bli bli ASP.NET blu ASP.NET yop yop ASP.NET" Record 2 : [TextField] = "Blah blah blah bli bli bli blu ASP.NET yop yop ASP.NET" Record 3 : [TextField] = "Blah ASP.NET blah ASP.NET blah ASP.NET bli ASP.NET bli bli ASP.NET blu ASP.NET yop yop ASP.NET" So Record 1 Contains 4 occurrence of "ASP.NET" keyword Record 2 Contains 2 occurrence of "ASP.NET" keyword Record 3 Contains 7 occurrence of "ASP.NET" keyword Collection Extraction IList < RecordModel (ordered by word count descending) Record 3 Record 1 Record 2 LinqToSQL should be the best, but LinqToObject too :) NB : No issue about the "." of ASP.NET keyword (this is not the goal if this question)

    Read the article

  • How to turn off the display in Windows 8 without locking or making computer go to sleep?

    - by darshshah
    How to turn of the display in Windows 8 without locking or making computer go to sleep ? The problem is that when I enable ‘Turn off display after x minutes’ feature from control panel, the device goes into sleep after ‘x’ minutes. It seems that both the options – turn off display/put computer to sleep are connected. It devices goes automatically to sleep mode as soon as the display is turned off. So, is there any method to turn off the display of the device without it going into sleep mode ? Someone wrote in the microsoft forum " The whole key to this problem seems to be the "Turn off the Display" setting. If you have that set to 5 minutes, 10 minutes, 15 minutes, etc...the computer will go to sleep one minute after you lock the screen. With this setting set to "Never", it doesn't do it. So something is wrong there." I want to turnoff the display but don't want to lock the device. Is that also possible ? Thanks

    Read the article

  • Locking a detail view if a user is editing the item...

    - by BenTheDesigner
    Hi All I am developing a user manager which must control access to the detail view of editable items. At present, when a user clicks 'edit', the application queries the link table to check if a user is currently editing that page, if not, it allows access to the page and then inserts a record into the link table preventing another user from editing the same page at the same time. My question is what would the best way to handle the removal of records if say a user exists the browser without saving etc, therefore no action to remove the record. I have a couple of ideas but would like other input before I decide. BenTheDesigner

    Read the article

  • IDataRecord.IsDBNull causes an System.OverflowException (Arithmetic Overflow)

    - by Ciddan
    Hi! I have a OdbcDataReader that gets data from a database and returns a set of records. The code that executes the query looks as follows: OdbcDataReader reader = command.ExecuteReader(); while (reader.Read()) { yield return reader.AsMovexProduct(); } The method returns an IEnumerable of a custom type (MovexProduct). The convertion from an IDataRecord to my custom type MovexProduct happens in an extension-method that looks like this (abbrev.): public static MovexProduct AsMovexProduct(this IDataRecord record) { var movexProduct = new MovexProduct { ItemNumber = record.GetString(0).Trim(), Name = record.GetString(1).Trim(), Category = record.GetString(2).Trim(), ItemType = record.GetString(3).Trim() }; if (!record.IsDBNull(4)) movexProduct.Status1 = int.Parse(record.GetString(4).Trim()); // Additional properties with IsDBNull checks follow here. return movexProduct; } As soon as I hit the if (!record.IsDBNull(4)) I get an OverflowException with the exception message "Arithmetic operation resulted in an overflow." StackTrace: System.OverflowException was unhandled by user code Message=Arithmetic operation resulted in an overflow. Source=System.Data StackTrace: at System.Data.Odbc.OdbcDataReader.GetSqlType(Int32 i) at System.Data.Odbc.OdbcDataReader.GetValue(Int32 i) at System.Data.Odbc.OdbcDataReader.IsDBNull(Int32 i) at JulaAil.DataService.Movex.Data.ExtensionMethods.AsMovexProduct(IDataRecord record) [...] I've never encountered this problem before and I cannot figure out why I get it. I have verified that the record exists and that it contains data and that the indexes I provide are correct. I should also mention that I get the same exception if I change the if-statemnt to this: if (record.GetString(4) != null). What does work is encapsulating the property-assignment in a try {} catch (NullReferenceException) {} block - but that can lead to performance-loss (can it not?). I am running the x64 version of Visual Studio and I'm using a 64-bit odbc driver. Has anyone else come across this? Any suggestions as to how I could solve / get around this issue? Many thanks!

    Read the article

  • How to mass insert/update in linq to sql?

    - by chobo2
    Hi How can I do these 2 scenarios. Currently I am doing something like this public class Repository { private LinqtoSqlContext dbcontext = new LinqtoSqlContext(); public void Update() { // find record // update record // save record ( dbcontext.submitChanges() } public void Insert() { // make a database table object ( ie ProductTable t = new ProductTable() { productname ="something"} // insert record ( dbcontext.ProductTable.insertOnSubmit()) // dbcontext.submitChanges(); } } So now I am trying to load an XML file what has tons of records. First I validate the records one at a time. I then want to insert them into the database but instead of doing submitChanges() after each record I want to do a mass submit at the end. So I have something like this public class Repository { private LinqtoSqlContext dbcontext = new LinqtoSqlContext(); public void Update() { // find record // update record } public void Insert() { // make a database table object ( ie ProductTable t = new ProductTable() { productname ="something"} // insert record ( dbcontext.ProductTable.insertOnSubmit()) } public void SaveToDb() { dbcontext.submitChanges(); } } Then in my service layer I would do like for(int i = 0; i < 100; i++) { validate(); if(valid == true) { update(); insert() } } SaveToDb(); So pretend my for loop is has a count for all the record found in the xml file. I first validate it. If valid then I have to update a table before I insert the record. I then insert the record. After that I want to save everything in one go. I am not sure if I can do a mass save when updating of if that has to be after every time or what. But I thought it would work for sure for the insert one. Nothing seems to crash and I am not sure how to check if the records are being added to the dbcontext.

    Read the article

  • XSLT Type Checking

    - by mo
    Hi Folks Is it possible to check an elements ComplexType? i have this (simplified): complexType Record complexType Customer extension of Record complexType Person extension of Record <xsl:template match="/"> <records> <xsl:apply-templates /> </records> </xsl:template> <xsl:template match="!!! TYPECHECK FOR RECORD !!!" name="Record"> <record><xsl:value-of select="." /></record> </xsl:template> is it possible to check elementstype incl. inheritence? i dont know the elements name only that they are a subtype of Record. schema 1: complexType name="Customer" extension base="Record" element name="customers" element name="customer" type="Customer" schema 2: complexType name="Person" extension base="Record" element name="persons" element name="person" type="Person" schema ?: complexType name="UnknownType" extension base="Record" element name="unknowns" element name="unknown" type="UnknownType" xml 1: <customers> <customer /> <customer /> </customers> xml 2: <persons> <person /> <person /> </persons> xml ?: <?s> <? /> <? /> </?s> the xml input ist custom so i have to match by the type (i think)

    Read the article

  • How to add DNS txt record in cpanel and what to name it?

    - by Lars Holdgaard
    I have a domain, where I have to add a DNS text change. More specifically, I have to do the following: "You should now create a DNS text record with the meta tag value shown below for the domain you're securing." The value I should insert is this one: globalsign-domain-verification=list_of_random_chars How do I add this in cPanel? I thought about doing it this way, but I have to add a name: I also thought about adding it like this: So my question really is: how do I add this txt file in a correct way?

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >