Search Results

Search found 5136 results on 206 pages for 'comment bot'.

Page 121/206 | < Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >

  • Adding STI to Existing Table...

    - by keruilin
    I want to add STI to an existing table using a custom type column. Let's call this taste_type whose corresponding model is Fruit. In the Fruit model I have: set_inheritance_column :taste_type In my migration to add STI I have: class AddSTI < ActiveRecord::Migration def self.up add_column :fruits, :taste_type, :string, :limit => 100, :null => false Fruit.reset_column_information Fruit.find_by_id(1).update_attributes({:taste_type => 'Sour'}) end def self.down remove_column :fruits, :taste_type end end When I run the migration, I get the following error: Mysql::Error: Column 'taste_type' cannot be null: ... Any idea what's going? I can get the migration to run if I comment the set_inheritance_column in the Fruit model, then uncomment it after I run the migration. Obviously, I don't want to do this, however.

    Read the article

  • Nant task sysinfo verbose - fails

    - by Broken Link
    Nant.core.dll : 0.86.2898.0 I can not get the following tag working on my machine. <sysinfo verbose="true" /> <sysinfo /> It gives me the following error. If I comment out those two lines I'm able to build. I google'd but not much help. Any idea? NAnt 0.85 (Build 0.85.1932.0; rc3; 4/16/2005) Copyright (C) 2001-2005 Gerry Shaw http://nant.sourceforge.net Buildfile: file:///C:/xyz/source/Default.build Target framework: Microsoft .NET Framework 1.1 Target(s) specified: all [tstamp] Thursday, July 30, 2009 3:10:24 PM. [sysinfo] Setting system information properties under sys.* BUILD FAILED Property name 'sys.env.Zen Managed Workstation' is invalid. Total time: 0 seconds.

    Read the article

  • Are all languages used within .net Equally performant?

    - by WeNeedAnswers
    I know the "Sales pitch" answer is yes to this question, but is it technically true. The Common Language Runtime (CLR) is designed as an intermediate language based on Imperative Programming (IP), but this has obvious implications when dealing with Declarative Programming (DP). So how efficient is a language based on a different paradigm than the Imperative Style when implemented in the CLR? I also get the feeling that the step to DP would incur an extra level of abstraction that might not model at all performant, would this be a fair comment? I have done some simple tests using F# and it all looks great, but am I missing something if the programs get more complex?

    Read the article

  • Discussion: Working TDD in a Scrum context

    - by Anders Juul
    Hi all, When I work TDD I tend to start out with the big picture and create the tests that should succeed in order for the overall assignment to be completed - it then kicks off a number of supporting classes/methods/tests as I 'dig in'. If my assignment has been planned out in detail, I would then open one task, and in order to solve it, open another and then another. Only when the overall tests are succeeding can I close the original task, which means that at any given time, I would have a number of open tasks. I find that this approach conflict somewhat with the scrum approach where, ideally, I should be able to take and close a task within a day's work - and never have more than one task open at a time. I'm looking for input about how you manage this in your project - references to articles are also very welcome, I'm sure this has been debated thoroughly somewhere... The 'answer tick' will be awarded to best comment/reference. Thanks for any input, Anders, Denmark

    Read the article

  • Toubleshooting mapkit performance

    - by brettr
    I'm plotting over 500 points on a map using mapkit. Zooming is a little jittery compared to the native google map app. I've discovered what is causing the slowness. I'm adding custom annotations so that I can later add different pin colors and buttons for detail views: - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(AddressNote *) annotation { MKPinAnnotationView *annView=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"currentlocation"]; annView.pinColor = MKPinAnnotationColorGreen; annView.animatesDrop=TRUE; annView.canShowCallout = YES; annView.calloutOffset = CGPointMake(-5, 5); return annView; } If I comment out the above code, everything works fine. Very smooth with zooming in/out. Should I be adding annotations differently to boost performance?

    Read the article

  • Drupal setup for proofreaders - "Revision Moderation"

    - by Olav
    I would like to have external proofreaders to work directly inside my Drupal site. Basically they should be able to create new revisions, annotate, comment etc without affecting what users see without my approval. Particularly the node might already be public. "Revision Moderation" module sounds a bit like what I want, but it seems not to be so much used, and I run into other modules like "Workflow". What is important for me: Possibility to work on content already published Easy for the proofreader, easy for me to direct her to the right location Other useful features such as comments (Like those balloons in Word), diffs etc (I guess I could work around (1) by copying the content)

    Read the article

  • Ruby gems gone after after jruby install

    - by James
    Today I installed jruby by downloading it, extracting it to /home/james/jruby-1.4.0 and adding the following line to .bashrc export JRUBY_HOME=/home/james/jruby-1.4.0 export PATH=$JRUBY_HOME/bin:$PATH And then I installed some jruby gems via jruby -S gem install ... Jruby works fine, but this seemed to have cause two problems: 1) When I try to run a ruby (not jruby) on rails migration, I see: Missing the Rails gem. Please `gem install -v= rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. 2) when I do gem list --local, I only see the gems that I've installed for jruby. Launching web applications via ruby script/server succeeds without any warnings. Please help.

    Read the article

  • Will JavaScript evaluate a property's value if it's not part of an assignment statement?

    - by Bungle
    I've come across a fairly obscure problem having to do with measuring a document's height before the styling has been applied by the browser. More information here: http://sonspring.com/journal/jquery-iframe-sizing http://ajaxian.com/archives/safari-3-onload-firing-and-bad-timing In Dave Hyatt's comment from June 27, he advises simply checking the document.body.offsetLeft property to force Safari to do a reflow. Can I simply use the following statement: document.body.offsetLeft; or do I need to assign it to a variable, e.g.: var force_layout = document.body.offsetLeft; in order for browsers to calculate that value? I think this comes down to a more fundamental question - that is, without being part of an assignment statement, will JavaScript still evaluate a property's value? Does this depend on whether a particular browser's JavaScript engine optimizes the code?

    Read the article

  • Audit Table using Triggers

    - by Jose
    DROP TABLE IF EXISTS `actividades`.`act_actividad_audit`; CREATE TABLE `actividades`.`act_actividad_audit` ( `fe_creacion` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `usr_digitador` char(10) NOT NULL, `ip_digitador` char(15) NOT NULL, `id_act_actividad` int(10) unsigned NOT NULL, `titulo` char(64) NOT NULL, `act_prioridad_id` int(10) unsigned NOT NULL, `act_motivo_id` int(10) unsigned NOT NULL, `detalle` text, `detalle_tecnico` text, `hostname_id` int(10) unsigned NOT NULL, `hostname_nombre` char(50) NOT NULL, `es_SMOP` tinyint(1) NOT NULL, `url_SMOP` text, `es_tecnico` tinyint(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Auditoria Actividad General'; I want to populate that audit table with a trigger but how can i send or fill the values for usr_digitador or ip_digitador if that values are on client side.? please help

    Read the article

  • Silverlight error-handling conventions: There is no relationship between onSilverlightError and Repo

    - by rasx
    When I see the call System.Windows.Browser.HtmlPage.Window.Eval (which is evil) in ReportErrorToDOM (in App.xaml.cs) this shows me that it has no relationship to onSilverlightError. So what kind of JavaScript-based scenario calls onSilverlightError? When will onSilverlightError definitely be needed? What are Silverlight error-handling conventions in general? This is a very important comment by Erik Monk but needs more detail: There are 2 kinds of terminal errors in Silverlight. 1) Managed errors (hit the managed Application_UnhandledException method). Note that some errors may not even get to this point. If the managed infrastructure can't be loaded for some reason (out of memory error maybe...), you won't get this kind of error. Still, if you can get it, you can use a web service (or the CLOG project) to communicate it back to the server. 2) Javascript errors.

    Read the article

  • complex mysql query problem

    - by Scarface
    Hey guys I have a query that selects data and organizes but not in the correct order. What I want to do is select all the comments for a user in that week and sort it by each topic, then sort the cluster by the latest timestamp of each comment in their respective cluster. My current query selects the right data, but in seemingly random order. Does anyone have any ideas? select * from ( SELECT topic.topic_title, topic.topic_id FROM comments JOIN topic ON topic.topic_id=comments.topic_id WHERE comments.user='$user' AND comments.timestamp>$week order by comments.timestamp desc) derived_table group by topic_id

    Read the article

  • Voting UI for showing like/dislike community comments side-by-side

    - by Justin Grant
    We want to add a comments/reviews feature to our website's plugin gallery, so users can vote up/down a particular plugin and leave an optional short comment about what they liked or didn't like about it. I'm looking for inspiration, ideally a good implementation elsewhere on the web which isn't annoying to end users, isn't impossibly complex to develop, and which enables users to see both good and bad comments side-by-side, like this: Like: 57 votes Dislike: 8 votes --------------------------------- -------------------------------- "great plugin, saved me hours..." "hard to install" "works well on MacOS and Ubuntu" "Broken on Windows Vista with UAC enabled" "integrates well with version 3.2" More... More... Anyone know a site which does something like this?

    Read the article

  • Does C99 guarantee that arrays are contiguous ?

    - by kriss
    Following an hot comment thread in another question, I came to debate of what is and what is not defined in C99 standard about C arrays. Basically when I define a 2D array like int a[5][5], does the standard C99 garantee or not that it will be a contiguous block of ints, can I cast it to (int *)a and be sure I will have a valid 1D array of 25 ints. As I understand the standard the above property is implicit in the sizeof definition and in pointer arithmetic, but others seems to disagree and says casting to (int*) the above structure give an undefined behavior (even if they agree that all existing implementations actually allocate contiguous values). More specifically, if we think an implementation that would instrument arrays to check array boundaries for all dimensions and return some kind of error when accessing 1D array, or does not give correct access to elements above 1st row. Could such implementation be standard compilant ? And in this case what parts of the C99 standard are relevant.

    Read the article

  • How do I maintain formatting of comments when I save them to the database in an asp.net mvc applicat

    - by baijajusav
    The title was probably not very clear. Consider this scnerio: you have a blog site or really just any site where a user can respond via a comment. You want to maintain the formatting for the comments. So paragraph's should be separated, first sentence indented, bolding of keywords allowed, etc. How would one go about doing this? This is something just about every kind of blogging site handles, including this site. My initial guess is that comments are saved to that database either in an xml format or as the raw html. Those are really my only guesses. I suppose magic strings could be used to denote the starting and ending of various formatting as well, but magic strings are generally frowned upon. I'm doing this in an asp.net mvc application. I'm using version 1 of mvc, but I would be willing to move to 2 if that makes for an easy solution here.

    Read the article

  • Problem with Validate Anti Forgery

    - by Mikael Egnér
    Hi! I have a problem regarding MVC Anti forgery token. When I do my authentication I have pseudo code like this: var user = userRepository.GetByEmail(email); System.Threading.Thread.CurrentPrincipal = HttpContext.Current.User = user; by doing so I'm able to get the current user in my code like this: var user = HttpContext.Current.User as EntityUser; This works fine until I add the [ValidateAntiForgeryToken] attribute to an action. When I add the attribute I get A required anti-forgery token was not supplied or was invalid. If I comment out this line: System.Threading.Thread.CurrentPrincipal = HttpContext.Current.User = user; The antiforgery validation works fine, but the I don't have my convenient way of getting my "EntityUser" from the HttpContext. Any ideas of how to work around this? Best regards Mikael

    Read the article

  • CodeContracts: ccrewrite fails with Object reference not set to an instance of an object

    - by Vyas Bharghava
    The below code makes ccrewrite blow up! Ideas? BTW, If you comment out the ActualClass, ccrewrite succeeds... [ContractClass(typeof(TestContracts))] interface ITestInterface { bool IsStarted { get; set; } void Begin(); } class ActualClass : ITestInterface { public bool IsStarted { get; set; } public void Begin() { this.IsStarted = true; } } [ContractClassFor(typeof(ITestInterface))] class TestContracts : ITestInterface { ITestInterface Current { get; set; } private TestContracts() { Current = this; } #region ITestInterface Members bool ITestInterface.IsStarted { get; set; } void ITestInterface.Begin() { Contract.Requires(!Current.IsStarted); Contract.Ensures(Current.IsStarted); } Thanks in advance!

    Read the article

  • Looking for actively maintained matrix math library for php

    - by Mnebuerquo
    Does anyone know where I might find a PHP matrix math library which is still actively maintained? I need to be able to do the basic matrix operations like reduce, transpose (including non-square matrices), invert, determinant, etc. This question was asked in the past, then closed with no answers. Now I need an answer to the same question. See these links to related questions: http://stackoverflow.com/questions/428473/matrix-artihmetic-in-php http://stackoverflow.com/questions/435074/matrix-arithmetic-in-php-again I was in the process of installing the pear Math_Matrix library when I saw these and realized it wouldn't help me. (Thanks Ben for putting that comment about transpose in your question.) I can code this stuff myself, but I would make me happier to see that there is a library for this somewhere.

    Read the article

  • How to implement following with Zend navigation?

    - by simple
    I have a top navigation and a side one Home | Tours | Booking Tour1 ------ Tour2 ------ Tour3 I show the side menu depending on a active top item. But sometimes when the side menu item is clicked I have to show that items children instead of the sidemenu. When no children exist I just show Children of a top menu depending on the active item. I an really having difficulties implementing that kind a logic and any help would be appreciated. //Comment button is not working so I will add comments here After stumbling the zend navigation view helpers, I am coming to the point - Understanding the concept of how in zend V part of MVC is implemented can save someone who is new to the framework many hours. As said in the answer to this question - "Use what is available", thought first we have to know where to find what is already available out there - that is where comes handy to take a look at the concept of helpers and so forth.

    Read the article

  • DISQUS - filtering the recent-comments list when using disqus on two seperate resources on the same

    - by stephemurdoch
    I'm using Disqus comments on my site. Users can comment on blog posts or on podcasts. So I have a page that lists all the blog-posts and one listing all of my podcasts. I'm using the combo-widget to display the most recent comments on each of these two pages. But I only want recent blog-post comments to show up in the list on the blog index page and likewise for podcasts. At the moment, the combo-widget lists all the comments, regardless of whether or not they were left on a blog post or a podcast... Is Disqus even built to be used in this way? [Site built with rails and I'm using norman's disqus plugin, although I doubt it matters...]

    Read the article

  • Do you have any tips for comments to keep them in step with the code? [closed]

    - by Rob Wells
    Possible Duplicate: How do you like your comments? G'day, I've read both of Steve McConnell's excellent Code Complete books "Code Complete" and "Code Complete 2" and was wondering if people have any other suggestions for commenting code. My commenting mantra could be summed up by the basic idea of expressing "what the code below cannot say". While enjoying this interesting blog post by Jeff about commenting I was still left wondering "When coding, when do you feel a comment is required?" Edit: Oops. Seems to be a duplicate of this question http://stackoverflow.com/questions/121945/how-do-you-like-your-comments so sorry for the noise. Thanks to my, seemingly, SO shadow for pointing it out - wouldn't have thought I was that interesting. Now off to read the original post and see if it is relevant. Edit: I meant to emphasise the best appraoch to ensure that your comments will stay in step with the code. Maybe expressing an intent rather than the mechansim for instance.

    Read the article

  • Image (?) File(?) Metadata(?) Properties(?)

    - by Marco Parenzan
    Sorry for the question marks, but a simple (I think) question has an impossible solution. From file system, if I click on an image file "Properties | Details tab" I access to many metadata. I need to access from a WPF application to the Description properties (Title, Subject, Rating, Tag and Comment). In particular Tag. I have found a lot of articles, many are very old. A few in WPF and Imaging library. But no one access to that properties. So the question marks: are these properties on image? On file system? I think they are on the image..I don0t undestand where are these properties and why is so difficult to access... Can someone help me? Thanks in advance, Marco Parenzan

    Read the article

  • Command line switches parsed out of executable's path

    - by Roger Pate
    Why do Windows programs parse command-line switches out of their executable's path? (The latter being what is commonly known as argv[0].) For example, xcopy: C:\Temp\foo>c:/windows/system32/xcopy.exe /f /r /i /d /y * ..\bar\ Invalid number of parameters C:\Temp\foo>c:\windows\system32\xcopy.exe /f /r /i /d /y * ..\bar\ C:\Temp\foo\blah -> C:\Temp\bar\blah 1 File(s) copied What behavior should I follow in my own programs? Are there many users that expect to type command-line switches without a space (e.g. program/? instead of program /?), and should I try to support this, or should I just report an error and exit immediately? What other caveats do I need to be aware of? (In addition to Anon.'s comment below that "debug/program" runs debug.exe from PATH even if "debug\program.exe" exists.)

    Read the article

  • multiline gtk.Label ignores xalign=0.5

    - by thomas
    A gtk.Label can't be aligned in center when line-wrap is turned on. Example code: import pygtk pygtk.require('2.0') import gtk class testwin(gtk.Window): def __init__(self): gtk.Window.__init__(self) width,height = 300,300 self.set_size_request(width,height) self.set_position(gtk.WIN_POS_CENTER) self.set_title("test window") label = gtk.Label("test text") label.set_line_wrap(True) label.set_justify(gtk.JUSTIFY_CENTER) label.set_alignment(0.5,0.5) label.connect("size-allocate",lambda l,s: l.set_size_request(s.width-1, -1)) self.add(label) self.connect("destroy", gtk.main_quit) self.show_all() testwin() gtk.main() It looks like this, that means, it's aligned left: http://m45.img-up.net/?up=pic122x97.png If you comment out line 14 (set_line_wrap) everything is perfectly fine: http://o54.img-up.net/?up=pic2y00p9.png Please note that yalign works fine. So it seems like the first argument in the gtk.Misc.set_alignment-function has no effect when line wrap is turned on. Using Fedora 16, 64bit, gtk 3.2.4, pygtk 2.24.0, python 2.7.2 Question: Is this intended or a bug? How is it supposed to be made or is a workaround available?

    Read the article

  • StackOverflow Site Layout Problem in Chrome

    - by Laramie
    I was cleaning up one of my questions here and noticed that Stack Overflow's comments were overflowing into the right column in Chrome. The question is, what's the difference in CSS handling between Chrome and Firefox. I don't have access to Safari, Opera, et al. Can someone tell me in which browsers the error manifests? Is it just me? Here's the layout error: (my apologies to Tim Down for covering up his name with my comment bubble) Since I have no natural skill for good layouts and the whole process makes me sad, I wonder if someone can diagnose the error on StackOverflow and make a recommendation on how to avoid it. Is this a consequence of embedding a div inside a td? Plus I admit it. It's fun to point out an error on one of the greatest sites ever.

    Read the article

  • How can I get latency info from Android's AudioTrack class?

    - by Ryan
    I've noticed that the C++ classes underlying the AudioTrack and AudioRecord APIs in Android both have a latency() method that is not exposed via JNI. As far as I can see, the latency() method in AudioRecord still does not take into account the hardware latency (they have a TODO comment for that), but the latency() method in AudioTrack does add in the hardware latency. I absolutely need to get this latency value from AudioTrack. Is there any possible way I can do this? I don't care what kind of crazy hack is needed as long as it doesn't require a rooted phone (the resulting code must still be packaged as an app on the market).

    Read the article

< Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >