Search Results

Search found 262 results on 11 pages for 'jimmy moo moo'.

Page 5/11 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • How to use Object.GetHashCode() on a type that overrides GetHashCode()

    - by Jimmy
    Hi, I have a class A that implements IEquatable<, using its fields (say, A.b and A.c) for implementing/overriding Equals() and overriding GetHashCode(), and everything works fine, 99% of the time. Class A is part of a hierarchy (class B, C) that all inherit from interface D; they can all be stored together in a dictionary Dictionary, thus it's convenient when they all carry their own default Equals()/GetHashCode(). However, while constructing A I sometime need to do some work to get the values for A.b and A.c; while that's happening, I want to store a reference to the instance that's being built. In that case, I don't want to use the default Equals()/GetHashCode() overrides provided by A. Thus, I was thinking of implementing a ReferenceEqualityComparer, that's meant to force the use of Object's Equals()/GetHashCode(): private class ReferenceEqualityComparer<T> : IEqualityComparer<T> { #region IEqualityComparer<T> Members public bool Equals(T x, T y) { return System.Object.ReferenceEquals(x, y); } public int GetHashCode(T obj) { // what goes here? I want to do something like System.Object.GetHashCode(obj); } #endregion } The question is, since A overrides Object.GetHashCode(), how can I (outside of A) call Object.GetHashCode() for an instance of A? One way of course would be for A to not implement IEquatable< and always supply an IEqualityComparer< to any dictionary that I create, but I'm hoping for a different answer. Thanks

    Read the article

  • Cannot install xdebug with WAMP SERVER 2.1

    - by Jimmy Nguyen
    Hi all, I use WAMP SERVER 2.1 and select PHP 5.3.3 for my system, so I select xDebug with php_xdebug-2.1.0-5.3-vc6.dll and changed name becoming php_xdebug.dll for easy way to use. Following the instructions: php.ini (in Apache folder) extension=php_xdebug.dll ... zend_extension = "C:/wamp/bin/php/php5.3.3/ext/php_xdebug.dll" xdebug.remote_enable=on xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.idekey="netbeans-xdebug" However, nothing happens, there are no information related to xdebug from phpinfo. Also xdebug announce that xdebug have not installed yet (http://xdebug.org/find-binary.php). I am so worried causing too much time for configuration. I got crazy and totally gave up. Anyone have ideas to solve it, I am so appreciated what you help me. Thanks

    Read the article

  • Unable to display data in a WPF datagrid that has a DataView instance as the items source

    - by Jimmy W
    I am using a DataGrid object from the WPF toolkit. I am binding the DataGrid object to the default view of a DataTable instance as declared in the following code: WeatherGrid.ItemsSource = weatherDataTable.DefaultView; weatherDataTable has three columns. The first column is defined to contain a string data type. The other two columns are defined to contain double data types. When the application exits the function that calls the binding as expressed in the declaration, The DataGrid object displays data for the first column, but not the other columns. When I type the following in the immediate window in the debugger: ((DataRowView)WeatherGrid.Items[0]).Row[1] I get a number, but this doesn't correspond with what is being displayed. Why is only the first column visible, and how can I get all of the data to be visible? I'll leave my XAML definition for the DataGrid object below: <toolkit:DataGrid Margin="12.726,77.71,12,0" Name="WeatherGrid" Height="500" Grid.Row="1" VerticalAlignment="Top" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True" />

    Read the article

  • ASP.NET putting dynamic controls on page in reverse messes up events

    - by Jimmy Geels
    I have this weird problem when putting textboxes on the page in reverse. The whole event system is messed up. Changing one textbox fires TextChange on all textboxes. I can fix this by putting the controls in a list first and then call add while iterating trough the list in reverse. But i just want to know why this fails. Heres some code (.net 2.0) public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) { InitFields(); } private void InitFields() { int nrFields; //We have a static textbox called nrElements, this determines the number //of fields to initialize if (int.TryParse(nrElements.Text, out nrFields)) { //Put all the dynamic fields on the screen in reverse order foreach(Control t in GetDynamicFields(nrFields)) { //Calling Controls.Add works fine //Calling Controls.AddAt messes up the events //Try changing different textboxes plhFields.Controls.AddAt(0, t); } } } private IEnumerable<Control> GetDynamicFields(int nrFields) { for (int i = 0; i < nrFields; i++) { TextBox txtBox = new TextBox(); txtBox.ID = string.Format("dynTextBox{0}", i.ToString()); txtBox.AutoPostBack = true; txtBox.TextChanged += t_TextChanged; yield return txtBox; } } private void t_TextChanged(object sender, EventArgs e) { TextBox txtBox = sender as TextBox; if (txtBox != null) txtBox.Text = txtBox.Text + "Changed "; } }

    Read the article

  • How can I create an email newsletter by taking objects from a database?

    - by jimmy
    Well, I'm trying to create a newsletter, that will send emails to users in a database. The newsletter itself would draw "events" and other activities from a database. Whats the best way to take that list, and put them in an email? I was thinking about putting them into an html page, then sending an html email, but not all emails support html(like school email). What would your guys recommend? Could you point me to some good resources? Also, this is for a school project, so I cant use any open source type stuff, unfortunately :(

    Read the article

  • Force max length for string in PostgreSQL

    - by Jimmy
    Hey guys, I am using heroku for a RoR application and am trying to manually set the length of a string column and am having trouble. I tried making a migration along the lines of change_column :posts, :content, :string, :length => 10000 I assumed this would work but no such luck, anyone have some pointers? Thanks!

    Read the article

  • .NET regex: Match.nextMatch() never returns

    - by Jimmy
    I have a regex that seems to have worked fine for the past year or so, and all of a sudden today with a new slightly different text to match against, Match.nextMatch() never returns. I'm no regex expert and I'm sure the regex can be optimized, but previous data sets weren't much more complex than what I've tried today. Furthermore, the regex works fine against the offending data set in a tool like RegexBuddy; it's only in .net (running in debug in Visual Studio) that it seems to hang. Nevertheless, if anyone can figure out how to tweak the regex to make it work, I'd really appreciate it. This is the regex: <tr>(<td[^>]*><a[^>]*>(?<callOptionTicker>[A-Z]{1,5}\d{6}C\d{8})</a></td>)(<td[^>]*>.*?</td>){6}(<td[^>]*><b><a[^>]*>(?<strikePrice>\d*\.\d*)</a></b></td>)(<td[^>]*><a[^>]*>(?<putOptionTicker>[A-Z]{1,5}\d{6}P\d{8})</a></td>) It's meant to extract put and call option tickers from a Yahoo option chain page (i.e., raw HTML). It works fine for IBM http://finance.yahoo.com/q/os?s=IBM&m=2010-05-21 It doesn't work for SPX options (this is the offending data set) http://finance.yahoo.com/q/os?s=I:SPX.W&m=2010-05

    Read the article

  • Using $.get with jquery validation

    - by Jimmy McCarthy
    I'm trying to use the Jquery builtin validator on my page. The issue is that I have certain fields that only are required if the JobID (entered into another field) does not already exist in our database. I have a simple service which simply takes JobID and returns True or False based on whether the JobID exists, but I can't seem to get this information where I want it. Some sample code: $("#dep_form").validate({ rules: { JobID: { required: true, digits: true, minlength: 3 }, OrgName: { required: function(element) { //This field is required if the JobID is new. return $("#jobinfo").html().length==15; } } }, messages: { JobID: { required: "Enter a Job Number.", digits: "Only numbers are allowed in Job ID's.", minlength: "Job Number must be at least 3 digits" }, OrgName: { required: "Select a Practice from the dropdown list." } }, errorClass: "ui-state-error-input", errorLabelContainer: "#errorbox", errorElement: 'li', errorContainer: "#validation_errors", onfocusout: false, onkeyup: false, focusinvalid: false }; Currently, I'm using a lazy method to validate (shown above). However, I now have access to a service using the URL: var lookupurl = "/deposits/jobidvalidate/?q=" + $("#id_JobID").val() + "&t=" + new Date().getTime(); which is a page which will contain just the word True or False based on whether that given JobID exists. I've tried half a dozen different ways of setting variables and calling functions within functions and still cannot get a way to simply return the value of that page (which I've been trying to access with $.get() ) to my validator, so that required is set to true when the Job does not exist and false if the job already exists. Any suggestions? Thanks.

    Read the article

  • Adding a font for use in ReportLab

    - by Jimmy McCarthy
    I'm trying to add a font to the python ReportLab so that I can use it for a function. The function is using canvas.Canvas to draw a bunch of text in a PDF, nothing complicated, but I need to add a fixed width font for layout issues. When I tried to register a font using what little info I could find, that seemed to work. But when I tried to call .addFont('fontname') from my Canvas object I keep getting "PDFDocument instance has no attribute 'addFont'" Is the function just not implemented? How do I get access to fonts other than the 10 or so default ones that are listed in .getAvailableFonts? Thanks. Some example code of what I'm trying to make happen: from reportlab.pdfgen import canvas c = canvas.Canvas('label.pdf') c.addFont('TestFont') #This throws the error listed above, regardless of what argument I use (whether it refers to a font or not). c.drawString(1,1,'test data here') c.showPage() c.save() To register the font, I tried from reportlab.lib.fonts import addMapping from reportlab.pdfbase import pdfmetrics pdfmetrics.registerFont(TTFont('TestFont', 'ghettomarquee.ttf')) addMapping('TestFont', 0, 0, 'TestFont') where 'ghettomarquee.ttf' was just a random font I had lying around.

    Read the article

  • Easy Flood Fill

    - by Jimmy
    Some advice, please. I'm just starting out in C#. I've managed to get some shapes created on a Windows form, and now I'd like to fill them with color. In the old C++ I studied years ago, there was a floodfill function that was really easy. It has been an unpleasant realization to find there's not a similar method available in regular old C#. Does anyone have advice for me, or some code, so I can implement filling without understanding GDI+, DirectX, or rest of the avalanche of acronyms that I've run into by researching this on the web? I need to fill irregular shapes, bounded by a certain color. Gradient and transparency control would be nice, but I'd settle for plain old solid fill right now, just to get a modicom of control over this. Any help, code or advice would be really appreciated.

    Read the article

  • UTF-8 BOM in php response to mootools xmlhttprequest

    - by Jimmy
    Hi, I'm writing my first little AJAX-enabled Joomla component. I'm using mootools. I got a xmlhttprequest to contact my Joomla component, and the component returns a response - just plain text echoed by php, like echo 'Hello World!'; It's all working fine, except wireshark tells me that the response is prepended with \357\273\277\357\273\277 when it gets read by the javascript on the client side. This shows up as a little square before the response in an alert box that the script shows. I don't explicitly set the encoding on the xmlhttprequest; mootools docs say that it defaults to UTF8. What's the right way to handle this? Should I be setting the encoding on the request? Mime type? Should the javascript get rid of it? I'm not planning to have any characters requiring UTF8 in the response, so using plain old ascii would be ok for me too. Thanks

    Read the article

  • Excluding files from being deployed with Capistrano while still under version control with Git

    - by Jimmy Cuadra
    I want to start testing the JavaScript in my Rails apps with qUnit and I'm wondering how to keep the test JavaScript and test runner HTML page under version control (I'm using Git, of course) but keep them off the production server when I deploy the app with Capistrano. My first thought is to let Capistrano send all the code over as usual including the test files, and write a task to delete them at the end of the deployment process. This seems like sort of a hack, though. Is there a cleaner way to tell Capistrano to ignore certain parts of the repository when deploying?

    Read the article

  • mysql C connector unresolved symbols on Win2k8 but not on XP?

    - by jimmy glick
    I have a visual C++ 2008 express project which compiles fine on Windows XP with mysql C connector 6.0.2. When I copy the project over to a Windows Server 2008 x64 machine, it gets a bunch of linker errors like "unresolved external symbol _mysql_server_end@0" "unresolved external symbol _mysql_close@4" "unresolved external _mysql_real_connect@32". Is the mysql C connector 6.0.2 known to not work with Win Server 2008? (Note, the C connector is installed into the same place on both machines, and since I just copied over the project wholesale, it still has the correct libmysql.lib include. The interesting thing is that the errors I get on XP if I remove the libmysql.lib are not the same errors I'm getting on Win2k8, so that's what makes me think it might be an incompatibility...or maybe it's just because win2k8 is x64 and XP is x86?) Thanks

    Read the article

  • compiling cocos3d 0.7.2 with Xcode5 error

    - by jimmy
    I tried to compile my cocos3d 0.7.2 project with xcode5. I am already stuck at the first error I get with the line “super.parent = aNode;” in CC3ParametricMeshNodes.m. this line is in the setParent function: -(void) setParent: (CC3Node*) aNode { super.parent = aNode; [self deriveNameFrom: aNode]; if ( !mesh ) self.box = self.parentBoundingBox; } and the error I get is: CC3ParametricMeshNodes.m:246:15: Assignment to readonly property I am sure that there will be other errors after this one is fixed. Is there any topic on common errors that occur while compiling cocos3d 0.7.2 with Xcode5? Thanks

    Read the article

  • Ruby open-uri open method loses file extension opening images

    - by Jimmy
    I'm using ruby 1.9.2 along with Rails 3.1.4 and Paperclip 2.4.5. My issue is trying to save a paperclip attachment from a URI loses the file extension and saves the file without one resulting in issues with things like fancybox that require an extension. Some example code: uri = "http://featherfiles.aviary.com/2012-06-13/bbe5f0de1/0c5a672b88ea47ecb4631ac173e27430.png" open(uri) #=> #<File:/var/folders/zc/d69gxhzx10x_bvjrkqgyjgxr0000gn/T/open-uri20120613-27204-i6cldv> Because there is no extension on the temp file paperclip is saving the file without one resulting in issues. Has anyone run into this issue? I've seen multiple answers about using paperclip to store images from a URI but none seem to address the same problem we're running

    Read the article

  • Point of Sale how to add quantity v2

    - by Jimmy nguyen
    Problem - I have Point of Sale V9 -intuit When ringing up a customer by using a barcode scanner for 1 item and the customer wants multiple of that same item but the receipt shows a long list of that same item. How can I get that program to set it where it would just self update without having to physically touching the keyboard or mouse I would pretty much want it to be user friendly Also if there is a code for this where do I put in the code?

    Read the article

  • MYSQL : First and last record of a grouped record (aggregate functions)

    - by Jimmy
    I am trying to do fectch the first and the last record of a 'grouped' record. More precisely, I am doing a query like this SELECT MIN(low_price), MAX(high_price), open, close FROM symbols WHERE date BETWEEN(.. ..) GROUP BY YEARWEEK(date) but I'd like to get the first and the last record of the group. It could by done by doing tons of requests but I have a quite large table. Is there a [low processing time if possible] way to do this with MySQL?

    Read the article

  • Ruby on Rails solution for scrubbing data of WYSIWYG editor user input

    - by Jimmy
    Hey everyone, I am working on a simple blogging type ruby on rails application and I have everything working through tinyMCE for a nice WYSIWYG editor so the user can add some simple things like images/youtube videos and lists. What I am looking for is a nice solution for blacklisting certain elements to be filtered out of the data when it is displayed. So is there a solution for this available as a gem or available to download anywhere? Thanks!

    Read the article

  • Initialize a static member ( an array) in C++

    - by Jimmy zhang
    I intended to create a class which only have static members and static functions. One of the member variable is an array. Would it be possible to initialize it without using constructors? I am having lots of linking errors right now... Class A{ public: static char a[128]; static void do_something(); } How would you initialize a[128]? Why can't I initialize a[128] by directly specifying its value like in C? a[128={1,2,3,...};

    Read the article

  • How do I subtract a binding using a Guice module override?

    - by Jimmy Yuen Ho Wong
    So according to my testing, If you have something like: Module modA = new AbstractModule() { public void configure() { bind(A.class).to(AImpl.class); bind(C.class).to(ACImpl.class); bind(E.class).to(EImpl.class); } } Module modB = New AbstractModule() { public void configure() { bind(A.class).to(C.class); bind(D.class).to(DImpl.class); } } Guice.createInjector(Modules.overrides(modA, modB)); // gives me binding for A, C, E AND D with A overridden to A->C. But what if you want to remove the binding for E in modB? I can't seem to find a way to do this without having to break the bind for E into a separate module. Is there a way?

    Read the article

  • Convert text box text into Argb argument

    - by Jimmy
    I have been looking into coloring objects like ellipses with code such as SolidBrush trnsRedBrush = new SolidBrush(Color.FromArgb(0x78FF0000)); I'd like to play around further with this by entering FromArgb's argument into a textbox on a form, then using the textbox to set the Brush's color. How would I convert the textbox's text into an argument usable by FromArgb?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >