Search Results

Search found 37183 results on 1488 pages for 'string conversion'.

Page 67/1488 | < Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >

  • How to fix error in pdf2djvu: "Bogus memory allocation size"

    - by Tim
    I am using pdf2djvu to convert a pdf file into a djvu file, but got this error while trying to convert either bundled or indirect multi-page djvu file: $ pdf2djvu 1.pdf -o 1.djvu 1.pdf: - page #1 -> #1 Bogus memory allocation size $ pdf2djvu 1.pdf -i 1.djvu 1.pdf: - page #1 -> #1 Bogus memory allocation size I was wondering what is wrong here and how I shall fix the problem? You can suggest another application other than pdf2djvu. To convert it to djvu My pdf file can be downloaded from here , in case that you may wonder what is special about it. Thanks and regards

    Read the article

  • What packages do I install for ffmpeg and libmp3lame?

    - by matt wilkie
    On my desktop Ubuntu 10.4 I use ffmpeg to convert videos to a format my dvd-player understands. On my laptop running 10.10 I can't get the same command to work, what package(s) are missing? ffmpeg -i infile.flv \ -threads 2 -vcodec mpeg4 -vtag divx -acodec libmp3lame -sameq \ outfile.avi #...snip Unknown encoder 'libmp3lame' Using apt-cache search libmp3lame I'm told there exist libmp3lame0 and libmp3lame-dev, both of which I've installed. Using acodec libmp3lame0 doesn't work either.

    Read the article

  • Converting mp4 to mp3

    - by aki
    I have a video I need to convert to mp3 (from the command line - not GUI) video.mp4 I tried: ffmpeg -i -b 192 video.mp4 video.mp3 with no success. I get the following error: WARNING: library configuration mismatch Seems stream 0 codec frame rate differs from container frame rate: 59.83 (29917/500) -> 59.75 (239/4) WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s Encoder (codec id 86017) not found for output stream #0.0 so I tried lame: lame -h -b 192 video.mp4 video.mp3 I get: Warning: unsupported audio format Am I missing something?

    Read the article

  • What packages do I install for ffmpeg and libmp3lame?

    - by matt wilkie
    On my desktop Ubuntu 10.4 I use ffmpeg to convert videos to a format my dvd-player understands. On my laptop running 10.10 I can't get the same command to work, what package(s) are missing? ffmpeg -i infile.flv \ -threads 2 -vcodec mpeg4 -vtag divx -acodec libmp3lame -sameq \ outfile.avi #...snip Unknown encoder 'libmp3lame' Using apt-cache search libmp3lame I'm told there exist libmp3lame0 and libmp3lame-dev, both of which I've installed. Using acodec libmp3lame0 doesn't work either.

    Read the article

  • Auto convert odt to pdf

    - by Gautam K
    I am creating a few documents in Libre office and I have to always send them as .pdf. but each and every time I forget to export it as pdf , So is there any way to auto convert the .odt document into pdf every time I save the document ? I have only about 4 docs , I keep making changes on them , So each and every time I make a change and save the odt I need that change to be updated in the corresponding pdf file . Ps : I understand that unoconv can be used to convert via command line but is there a way to automatically do it ? Another Ps : I found out that there is something called inotify and inotify-tools and that can be used to trigger events when a file changes . But I have no idea on how to use it .

    Read the article

  • How to convert mkv to dvd or avi

    - by nathanvda
    I have some mkv files, and while Totem plays them perfectly, when i use Devede to burn them to dvd it all gets messed up: the video is ok, but the audio is out of sync. I did see that Devede does write my dixv avi files correctly to disk. So i am thinking what the best way could be to convert my mkv for playback on dvd? I was thinking maybe converting them to avi first? But i did not find a good way for that to happen. What do you suggest?

    Read the article

  • Is there a quick way to convert camera raw files to DNG?

    - by dericke
    Before I switched from Windows to Ubuntu for my daily computing, I used Adobe's Photoshop Lightroom for processing photos from my DSLR. Adobe made it really straightforward to convert from proprietary camera raw files (in my case, .NEF) to DNG. I haven't found any way to convert NEF to DNG in Ubuntu yet. Most photography programs do process NEFs to JPG/TIFF/PNG/etc., but I'm looking for a converter for archival purposes. Are there any tools available, either standalone or built into another app, that can losslessly convert from NEF to DNG?

    Read the article

  • How to replace avconv with (the real) ffmpeg and have it work right?

    - by u2n
    Anyone know how to install the real, current ffmpeg (not the older version by avconv that comes w/ Ubuntu) without having the problems mentioned here? Reasons: Everything works (or so many have written), Use the new syntax, and After some research -- and without getting into the controversy -- I simply believe the packagers made a mistake going with avconv. This is a fix. Apparently this isn't as easy as it should be due to versioning conflicts, and that avconv and ffmpeg can't coexist on the same machine (noted in the above post). Though at least one guide mentions installing ffmpeg locally (~) to achieve coexistence. My release is Precise 12.04.3 LTS, but it appears this would apply to newer ones also.

    Read the article

  • string parsing to double fails in C++ (Xcode problem?)

    - by helixed
    Here's a fun one I've been trying to figure out. I have the following program: #include <iostream> #include <string> #include <sstream> using namespace std; int main(int argc, char *argv[]) { string s("5"); istringstream stream(s); double theValue; stream >> theValue; cout << theValue << endl; cout << stream.fail(); } The output is: 0 1 I don't understand why this is failing. Could somebody please tell me what I'm doing wrong? Thanks, helixed EDIT: Okay, sorry to turn this into a double post, but this looks like a problem specific to Xcode. If I compile this in g++, the code works without a problem. Does anybody have an idea why this is happening in Xcode, and how I could possibly fix it? Thanks again, helixed

    Read the article

  • Unable to use nMock GetProperty routine on a property of an inherited object...

    - by Chris
    I am getting this error when trying to set an expectation on an object I mocked that inherits from MembershipUser: ContactRepositoryTests.UpdateTest : FailedSystem.InvalidProgramException: JIT Compiler encountered an internal limitation. Server stack trace: at MockObjectType1.ToString() Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(ref MessageData msgData, Int32 type) at System.Object.ToString() at NMock2.Internal.ExpectationBuilder.On(Object receiver) Here are the tools I am using... VS2008 (SP1) Framework 3.5 nUnit 2.4.8 nMock 2.0.0.44 Resharper 4.1 I am at a loss as to why this would be happening. Any help would be appreciated. Test Class... [TestFixture] public class AddressRepositoryTests { private Mockery m_Mockery; private Data.IAddress m_MockDataAddress; private IUser m_MockUser; [SetUp] public void Setup() { m_Mockery = new Mockery(); m_MockDataAddress = m_Mockery.NewMock<Data.IAddress>(); m_MockUser = m_Mockery.NewMock<IUser>(); } [TearDown] public void TearDown() { m_Mockery.Dispose(); } [Test] public void CreateTest() { string line1 = "unitTestLine1"; string line2 = "unitTestLine2"; string city = "unitTestCity"; int stateId = 1893; string postalCode = "unitTestPostalCode"; int countryId = 223; bool active = false; int createdById = 1; Expect.Once .On(m_MockUser) .GetProperty("Identity") .Will(Return.Value(createdById)); Expect.Once .On(m_MockDataAddress) .Method("Insert") .With( line1, line2, city, stateId, postalCode, countryId, active, createdById, Is.Anything ) .Will(Return.Value(null)); IAddressRepository addressRepository = new AddressRepository(m_MockDataAddress); IAddress address = addressRepository.Create( line1, line2, city, stateId, postalCode, countryId, active, m_MockUser ); Assert.IsNull(address); } } User Class... public interface IUser { int? Identity { get; set; } int? CreatedBy { get; set; } DateTime CreatedOn { get; set; } int? ModifiedBy { get; set; } DateTime? ModifiedOn { get; set; } string UserName { get; } object ProviderUserKey { get; } string Email { get; set; } string PasswordQuestion { get; } string Comment { get; set; } bool IsApproved { get; set; } bool IsLockedOut { get; } DateTime LastLockoutDate { get; } DateTime CreationDate { get; } DateTime LastLoginDate { get; set; } DateTime LastActivityDate { get; set; } DateTime LastPasswordChangedDate { get; } bool IsOnline { get; } string ProviderName { get; } string ToString(); string GetPassword(); string GetPassword(string passwordAnswer); bool ChangePassword(string oldPassword, string newPassword); bool ChangePasswordQuestionAndAnswer(string password, string newPasswordQuestion, string newPasswordAnswer); string ResetPassword(string passwordAnswer); string ResetPassword(); bool UnlockUser(); } public class User : MembershipUser, IUser { #region Public Properties private int? m_Identity; public int? Identity { get { return m_Identity; } set { if (value <= 0) throw new Exception("Address.Identity must be greater than 0."); m_Identity = value; } } public int? CreatedBy { get; set; } private DateTime m_CreatedOn = DateTime.Now; public DateTime CreatedOn { get { return m_CreatedOn; } set { m_CreatedOn = value; } } public int? ModifiedBy { get; set; } public DateTime? ModifiedOn { get; set; } #endregion Public Properties #region Public Constructors public User() { } #endregion Public Constructors } Address Class... public interface IAddress { int? Identity { get; set; } string Line1 { get; set; } string Line2 { get; set; } string City { get; set; } string PostalCode { get; set; } bool Active { get; set; } int? CreatedBy { get; set; } DateTime CreatedOn { get; set; } int? ModifiedBy { get; set; } DateTime? ModifiedOn { get; set; } } public class Address : IAddress { #region Public Properties private int? m_Identity; public int? Identity { get { return m_Identity; } set { if (value <= 0) throw new Exception("Address.Identity must be greater than 0."); m_Identity = value; } } public string Line1 { get; set; } public string Line2 { get; set; } public string City { get; set; } public string PostalCode { get; set; } public bool Active { get; set; } public int? CreatedBy { get; set; } private DateTime m_CreatedOn = DateTime.Now; public DateTime CreatedOn { get { return m_CreatedOn; } set { m_CreatedOn = value; } } public int? ModifiedBy { get; set; } public DateTime? ModifiedOn { get; set; } #endregion Public Properties } AddressRepository Class... public interface IAddressRepository { IAddress Create(string line1, string line2, string city, int stateId, string postalCode, int countryId, bool active, IUser createdBy); } public class AddressRepository : IAddressRepository { #region Private Properties private Data.IAddress m_DataAddress; private Data.IAddress DataAddress { get { if (m_DataAddress == null) m_DataAddress = new Data.Address(); return m_DataAddress; } set { m_DataAddress = value; } } #endregion Private Properties #region Public Constructor public AddressRepository() { } public AddressRepository(Data.IAddress dataAddress) { DataAddress = dataAddress; } #endregion Public Constructor #region Public Methods public IAddress Create(string line1, string line2, string city, int stateId, string postalCode, int countryId, bool active, IUser createdBy) { if (String.IsNullOrEmpty(line1)) throw new Exception("You must enter a Address Line 1 to register."); if (String.IsNullOrEmpty(city)) throw new Exception("You must enter a City to register."); if (stateId <= 0) throw new Exception("You must select a State to register."); if (String.IsNullOrEmpty(postalCode)) throw new Exception("You must enter a Postal Code to register."); if (countryId <= 0) throw new Exception("You must select a Country to register."); DataSet dataSet = DataAddress.Insert( line1, line2, city, stateId, postalCode, countryId, active, createdBy.Identity, DateTime.Now ); return null; } #endregion Public Methods } DataAddress Class... public interface IAddress { DataSet GetByAddressId (int? AddressId); DataSet Update (int? AddressId, string Address1, string Address2, string City, int? StateId, string PostalCode, int? CountryId, bool? IsActive, Guid? ModifiedBy); DataSet Insert (string Address1, string Address2, string City, int? StateId, string PostalCode, int? CountryId, bool? IsActive, int? CreatedBy, DateTime? CreatedOn); } public class Address : IAddress { public DataSet GetByAddressId (int? AddressId) { Database database = DatabaseFactory.CreateDatabase(); DbCommand dbCommand = database.GetStoredProcCommand("prAddress_GetByAddressId"); DataSet dataSet; try { database.AddInParameter(dbCommand, "AddressId", DbType.Int32, AddressId); dataSet = database.ExecuteDataSet(dbCommand); } catch (SqlException sqlException) { string callMessage = "prAddress_GetByAddressId " + "@AddressId = " + AddressId; throw new Exception(callMessage, sqlException); } return dataSet; } public DataSet Update (int? AddressId, string Address1, string Address2, string City, int? StateId, string PostalCode, int? CountryId, bool? IsActive, Guid? ModifiedBy) { Database database = DatabaseFactory.CreateDatabase(); DbCommand dbCommand = database.GetStoredProcCommand("prAddress_Update"); DataSet dataSet; try { database.AddInParameter(dbCommand, "AddressId", DbType.Int32, AddressId); database.AddInParameter(dbCommand, "Address1", DbType.AnsiString, Address1); database.AddInParameter(dbCommand, "Address2", DbType.AnsiString, Address2); database.AddInParameter(dbCommand, "City", DbType.AnsiString, City); database.AddInParameter(dbCommand, "StateId", DbType.Int32, StateId); database.AddInParameter(dbCommand, "PostalCode", DbType.AnsiString, PostalCode); database.AddInParameter(dbCommand, "CountryId", DbType.Int32, CountryId); database.AddInParameter(dbCommand, "IsActive", DbType.Boolean, IsActive); database.AddInParameter(dbCommand, "ModifiedBy", DbType.Guid, ModifiedBy); dataSet = database.ExecuteDataSet(dbCommand); } catch (SqlException sqlException) { string callMessage = "prAddress_Update " + "@AddressId = " + AddressId + ", @Address1 = " + Address1 + ", @Address2 = " + Address2 + ", @City = " + City + ", @StateId = " + StateId + ", @PostalCode = " + PostalCode + ", @CountryId = " + CountryId + ", @IsActive = " + IsActive + ", @ModifiedBy = " + ModifiedBy; throw new Exception(callMessage, sqlException); } return dataSet; } public DataSet Insert (string Address1, string Address2, string City, int? StateId, string PostalCode, int? CountryId, bool? IsActive, int? CreatedBy, DateTime? CreatedOn) { Database database = DatabaseFactory.CreateDatabase(); DbCommand dbCommand = database.GetStoredProcCommand("prAddress_Insert"); DataSet dataSet; try { database.AddInParameter(dbCommand, "Address1", DbType.AnsiString, Address1); database.AddInParameter(dbCommand, "Address2", DbType.AnsiString, Address2); database.AddInParameter(dbCommand, "City", DbType.AnsiString, City); database.AddInParameter(dbCommand, "StateId", DbType.Int32, StateId); database.AddInParameter(dbCommand, "PostalCode", DbType.AnsiString, PostalCode); database.AddInParameter(dbCommand, "CountryId", DbType.Int32, CountryId); database.AddInParameter(dbCommand, "IsActive", DbType.Boolean, IsActive); database.AddInParameter(dbCommand, "CreatedBy", DbType.Int32, CreatedBy); database.AddInParameter(dbCommand, "CreatedOn", DbType.DateTime, CreatedOn); dataSet = database.ExecuteDataSet(dbCommand); } catch (SqlException sqlException) { string callMessage = "prAddress_Insert " + "@Address1 = " + Address1 + ", @Address2 = " + Address2 + ", @City = " + City + ", @StateId = " + StateId + ", @PostalCode = " + PostalCode + ", @CountryId = " + CountryId + ", @IsActive = " + IsActive + ", @CreatedBy = " + CreatedBy + ", @CreatedOn = " + CreatedOn; throw new Exception(callMessage, sqlException); } return dataSet; } }

    Read the article

  • Problems manipulating strings through a stdcall to a dll

    - by ibiza
    I need to create a C++ dll that will be called from another program through stdcall. What is needed : the caller program will pass an array of string to the dll and the dll should change the string values in the array. The caller program will then continue to work with these string values that came from the dll. I made a simple test project and I am obviously missing something... Here is my test C++ dll : #ifndef _DLL_H_ #define _DLL_H_ #include <string> #include <iostream> struct strStruct { int len; char* string; }; __declspec (dllexport) int __stdcall TestFunction(strStruct* s) { std::cout << "Just got in dll" << std::endl; std::cout << s[0].string << std::endl; //////std::cout << s[1].string << std::endl; /* char str1[] = "foo"; strcpy(s[0].string, str1); s[0].len = 3; char str2[] = "foobar"; strcpy(s[1].string, str2); s[1].len = 6; */ //std::cout << s[0].string << std::endl; //std::cout << s[1].string << std::endl; std::cout << "Getting out of dll" << std::endl; return 1; } #endif and here is a simple C# program that I am using to test my test dll : using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace TestStr { class Program { [DllImport("TestStrLib.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern int TestFunction(string[] s); static void Main(string[] args) { string[] test = new string[2] { "a1a1a1a1a1", "b2b2b2b2b2" }; Console.WriteLine(test[0]); Console.WriteLine(test[1]); TestFunction(test); Console.WriteLine(test[0]); Console.WriteLine(test[1]); Console.ReadLine(); } } } And here is the output produced : a1a1a1a1a1 b2b2b2b2b2 Just got in dll b2b2b2b2b2 Getting out of dll a1a1a1a1a1 b2b2b2b2b2 I have some questions : 1) Why is it outputting the element in the second position of the array rather than in the first position?? 2) If I uncomment the line commented with ////// in the dll file, the program crashes. Why? 3) Obviously I wanted to do more things in the dll (the parts in /* */) than what it does right now, but I am blocked by the first 2 questions... Thanks for all your help

    Read the article

  • how can modify or add new item into generic list of string's

    - by Sadegh
    hi, i want to remove some pretty words in list of words. public System.String CleanNoiseWord(System.String word) { string key = word; if (word.Length <= 2) key = System.String.Empty; else key = word; //other validation here return key; } public IList<System.String> Clean(IList<System.String> words) { var oldWords = words; IList<System.String> newWords = new string[oldWords.Count()]; string key; var i = 0; foreach (System.String word in oldWords) { key = this.CleanNoiseWord(word); if (!string.IsNullOrEmpty(key)) { newWords.RemoveAt(i); newWords.Insert(i++, key); } } return newWords.Distinct().ToList(); } but i can't add, remove or insert any thing in list! and exception NotSupportedException occured Collection was of a fixed size. how i can modify or add new item into generic list of string's?

    Read the article

  • C#: How to get all public (both get and set) string properties of a type

    - by Svish
    I am trying to make a method that will go through a list of generic objects and replace all their properties of type string which is either null or empty with a replacement. How is a good way to do this? I have this kind of... shell... so far: public static void ReplaceEmptyStrings<T>(List<T> list, string replacement) { var properties = typeof(T).GetProperties( -- What BindingFlags? -- ); foreach(var p in properties) { foreach(var item in list) { if(string.IsNullOrEmpty((string) p.GetValue(item, null))) p.SetValue(item, replacement, null); } } } So, how do I find all the properties of a type that are: Of type string Has public get Has public set ? I made this test class: class TestSubject { public string Public; private string Private; public string PublicPublic { get; set; } public string PublicPrivate { get; private set; } public string PrivatePublic { private get; set; } private string PrivatePrivate { get; set; } } The following does not work: var properties = typeof(TestSubject) .GetProperties(BindingFlags.Instance|BindingFlags.Public) .Where(ø => ø.CanRead && ø.CanWrite) .Where(ø => ø.PropertyType == typeof(string)); If I print out the Name of those properties I get there, I get: PublicPublic PublicPrivate PrivatePublic In other words, I get two properties too much. Note: This could probably be done in a better way... using nested foreach and reflection and all here... but if you have any great alternative ideas, please let me know cause I want to learn!

    Read the article

  • Cannot determine why pointer variable will not address elements in a string in this program?

    - by Smith Will Suffice
    I am attempting to utilize a pointer variable to access elements of a string and there are issues with my code generating a compilation error: #include <stdio.h> #define MAX 29 char arrayI[250]; char *ptr; int main(void) { ptr = arrayI; puts("Enter string to arrayI: up to 29 chars:\n"); fgets(arrayI, MAX, stdin); printf("\n Now printing array by pointer:\n"); printf("%s", *ptr); ptr = arrayI[1]; //(I set the pointer to the second array char element) printf("%c", *ptr); //Here is where I was wanting to use my pointer to //point to individual array elements. return 0; } My compiler crieth: [Warning] assignment makes pointer from integer without a cast [enabled by default] I do not see where my pointer was ever assigned to the integer data type? Could someone please explain why my attempt to implement a pointer variable is failing? Thanks all!

    Read the article

  • In PHP how do a translate a date to numerical format not knowing the format of the string beforehand

    - by stormist
    Examples of the translations I need to do: $stringDate = "November 2009"; $output = "11/09"; $stringDate = "October 1 2010"; $output = "10/01/2010"; $stringDate = "January 2010"; $output = "01/10"; $stringDate = "January 9 2010"; $output = "01/09/2010"; Note that I do not know which format the $stringDate will be in and the lack of commas in the month day year set. Thanks for any help anyone might offer.

    Read the article

  • Batch Convert .mkv to .mp4

    - by IamHere
    I want to batch convert all .mkv files in a folder into .mp4 with VLC. It should use the original video-/audio stream and if possible the .ass subtitle of the .mkv. It's not really a conversion, it's more like changing the container – my player can't read the MKV videos. If I do this conversion by hand (manually) it works, but I have a lot of MKV files to convert, so it would take a lot of time. I have searched the internet for a batch file to do this and I found a few. I tried to modify them to my wish, but all attempts I tried just created a .mp4 file that doesn't contain the audio stream and the video stream also cannot be rendered by all my media players on the PC. So could someone tell me how the batch has to look like, so it works with the original video and audio stream (and maybe .ass subtitles)?

    Read the article

  • Add note model in Rails

    - by dannymcc
    Hi Everyone, I am following the 15 minute blog tutorial on Ruby on Rails .com: http://media.rubyonrails.org/video/rails_blog_2.mov and am stumbling into some issues. I am using the following alterations to the names in the tutorial: posts = kases comments = notes I have setup the models as follows: class Kase < ActiveRecord::Base validates_presence_of :jobno has_many :notes belongs_to :company # foreign key: company_id belongs_to :person # foreign key in join table belongs_to :surveyor, :class_name => "Company", :foreign_key => "appointedsurveyor_id" belongs_to :surveyorperson, :class_name => "Person", :foreign_key => "surveyorperson_id" def to_param jobno end and... class Note < ActiveRecord::Base belongs_to :kase end The Notes controller look like this: # POST /notes # POST /notes.xml def create @kase = Kase.find(params[:kase_id]) @note = @kase.notes.build(params[:note]) redirect_to @kase end and the database scheme for Kases looks like this: create_table "notes", :force => true do |t| t.integer "kase_id" t.text "body" t.datetime "created_at" t.datetime "updated_at" end and for kases... create_table "kases", :force => true do |t| t.string "jobno" t.date "dateinstructed" t.string "clientref" t.string "clientcompanyname" t.text "clientcompanyaddress" t.string "clientcompanyfax" t.string "casehandlername" t.string "casehandlertel" t.string "casehandleremail" t.text "casesubject" t.string "transport" t.string "goods" t.string "claimantname" t.string "claimantaddressline1" t.string "claimantaddressline2" t.string "claimantaddressline3" t.string "claimantaddresscity" t.string "claimantaddresspostcode" t.string "claimantcontact" t.string "claimanttel" t.string "claimantmob" t.string "claimantemail" t.string "claimanturl" t.string "lyingatlocationname" t.string "lyingatlocationaddressline1" t.string "lyingatlocationaddressline2" t.string "lyingatlocationaddressline3" t.string "lyingatlocationaddresscity" t.string "lyingatlocationaddresspostcode" t.string "lyingatlocationcontactname" t.string "lyingattel" t.string "lyingatmobile" t.string "lyingatlocationurl" t.text "comments" t.string "invoicenumber" t.string "netamount" t.string "vat" t.string "grossamount" t.date "dateclosed" t.date "datepaid" t.datetime "filecreated" t.string "avatar_file_name" t.string "avatar_content_type" t.integer "avatar_file_size" t.datetime "avatar_updated_at" t.datetime "created_at" t.datetime "updated_at" t.string "kase_status" t.string "invoice_date" t.integer "surveyorperson_id" t.integer "appointedsurveyor_id" t.integer "person_id" t.string "company_id" t.string "dischargeamount" t.string "dishchargeheader" t.text "highrisesubject" end Whenever I enter a note into the kase show view's note entry form: <h2>Notes</h2> <div id="sub-notes"> <%= render :partial => @kase.notes %> </div> <% form_for [@kase, Note.new] do |f| %> <p> <%= f.label :body, "New Note" %><br /> <%= f.text_area :body %> </p> <p><%= f.submit "Add Note" %></p> <% end %> partial: <% div_for note do %> <p> <strong>Created <%= time_ago_in_words(note.created_at) %> ago</strong><br /> <%= h(note.body) %> </p> <% end %> I get the following error: ActiveRecord::RecordNotFound in NotesController#create Couldn't find Kase with ID=Test Case I have tried removing the def to_param jobno end from the kase model, but the same error shows. Any ideas what I'm missing? Thanks, Danny

    Read the article

  • Difference in String concatenation performance

    - by Homer
    I know you should use a StringBuilder when concatenating strings but I was just wondering if there is a difference in concatenating string variables and string literals. So, is there a difference in performance in building s1, s2, and s3? string foo = "foo"; string bar = "bar"; string s1 = "foo" + "bar"; string s2 = foo + "bar"; string s3 = foo + bar;

    Read the article

  • Using a Linq-To-SQL class automagically generates the connection string for me; is there a way to ma

    - by Sergio Tapia
    I'm just beginning to use Linq-to-SQL and it's just wonderful to use. The problem is, this software is going to be run on a lot of machines and each machine will have a unique connection string. Is there a way for me to manually set the connection the Linq-to-SQL (.dbml) uses? The way I'm doing things now is creating the .dbml file, and in the graphic designer I'm dragging tables from the Server Explorer to the white board of the .dbml.

    Read the article

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