Search Results

Search found 1462 results on 59 pages for 'adam johns'.

Page 44/59 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • filter functions problem

    - by Adam
    I'm working on a search component for an app I'm working on and I needed to add some filters to it. I've found an example and got the first filter working fine. Now I'm trying to add a second filter I'm running into problems... In the example I found they use filterFunctions, but I only get an option for filterFunction, why is that? Here's the example code productsCollection.filterFunctions = [ filterByPrice, filterByType, filterByCondition, filterByVendor ] And this is what I'm trying acData.filterFunction = [filterByStatus, filterByDate] but with this code I get the following error message - 1067: Implicit coercion of a value of type Array to an unrelated type Function. Why am I getting this error and how would I go about add multiple filters to my Array Collection? Thanks!

    Read the article

  • Guru of the Week 2 no match for the operator==

    - by Adam
    From Guru of the Week 2. We have the function: string FindAddr(const list<Employee> l, string name) { for( list<Employee>::const_iterator i = l.begin(); i != l.end(); i++) { if( *i == name ) // here will be compilation error { return (*i).addr; } } return ""; } I added dummy Employee class to that: class Employee { string n; public: string addr; Employee(string name) : n(name) {} Employee() {} string name() const { return n; } operator string() { return n; } }; And got compilation error: error: no match for ‘operator==’ in ‘i.std::_List_iterator<_Tp>::operator* [with _Tp = Employee]() == name’ It works only if add operator== to Employee. But, Herb Sutter wrote that: The Employee class isn't shown, but for this to work it must either have a conversion to string or a conversion ctor taking a string. But Employee has a conversion function and conversion constructor as well. GCC version 4.4.3. Compiled normally, g++ file.cpp without any flags. There should be implicit conversion and it should work, why it doesn't?

    Read the article

  • How could I use AJAX to create a Json data source .txt file?

    - by Adam
    I'm creating a form that collects standard information about customers. When the user hits save, I would like to create a .txt file that would be used to later retrieve all of the data collected from customers. I'm using DataTables which is a jQuery plugin to display the data. The .txt file would be formatted to be saved as such: { "aaData": [ ["client 1 name","address","city","state","zip"], ["client 2 name","address","city","state","zip"], ["client 3 name","address","city","state","zip"], ... ["client x name","address","city","state","zip"] ] } Where "aaData": is used by DataTables. This is going to part of an iPhone app, so the data source has to be very small and not reliant on a constant connection to a server, so, essentially, a client-side data source. The .txt file has to also be updated when edited and saved, and then replaced every time it is downloaded.

    Read the article

  • Rails - Why is my custom validation being triggered for only a build command.

    - by adam
    I have a sentence and correction model with a has_one and belongs_to relationship respectively. For some reason when I do def create @sentence = Sentence.find(params[:sentence_id]) @correction = @sentence.build_correction(params[:correction]) a custom validation I wrote for Correction is being called at the build_correction point. the validation is below class Correction < ActiveRecord::Base attr_accessible :text, :sentence_id, :user_id belongs_to :sentence belongs_to :user validate :correction_is_different_than_sentence def correction_is_different_than_sentence errors.add(:text, "can't be the same as the original sentence.") if (text == self.sentence.text) end the problem is for some reason on validation the correction object doesn't have the sentence id set (despite I used the build_correction method) and so it complains "you have nil object .... while executing nil.text" in the if clause in the validation above. So my question is why is the validation occuring for a build command, i thought it only triggers on a create or update. And why isnt the sentence_id getting set?

    Read the article

  • Opening all external links in Phongap's ChildBrowser using jQuery Mobile

    - by Adam
    I'm using jQuery Mobile & Phonegap, and have the following code to open all external links in a certain div with the ChildBrowser: $('.someDIV a').live('click', function() { var thisUrl = $(this).attr('href'); PhoneGap.exec("ChildBrowserCommand.showWebPage", thisUrl); return false; }); For some reason, while the page loads in the childbrowser, it also loads in the background, as if there's no "return false". I've found a workaround by giving the link's href attribute a value of "#", and using the title for the url like this: And updating the jQuery code accordingly, but this is a problem where my links are dynamically generated, and I can't have the url in the title attribute. Any ideas how to solve this?

    Read the article

  • How to get RSS feed item count?

    - by Adam Kane
    Hello, In C#, .NET 3.5, in a Windows Forms application... How does one get the integer count of the number of items that a given RSS url returns? Example: For my blog at: http://forgefx.blogspot.com/feeds/posts/default The expected result would be: postCount = 25 Thanks!

    Read the article

  • Using javascript, show a certain amount of divs based on an answer

    - by Adam
    I'm building a form that first asks if you have 'foo'. If the answer is 'Yes', a div appears and asks 'How many foo do you have'? Based on the quantity answered, I'd like to show only that many divs. Thus if the user answers 1, only the first div will show. If they answer three, the first three will show. I have it set so that if the user answers no, the question of the amount remains hidden, but if they answer yes, they would be prompted for the quantity. This is what I've got so far... <script type="text/javascript"> $(document).ready(function(){ $(window).load(function() { $('#amt_of_foo,.foo_panels').hide(); }); $('#yes_foo').click(function() { $('#amt_of_foo').show(); }); $('#no_foo').click(function() { $('.foo_panels,#amt_of_foo').hide(); }); }); </script> </head> <body> <ul> <li> <div class="panel section_panel"> <h2>Questions About Your Foo</h2> <span>Do you have foo?:</span> <input type="radio" name="foo" id="no_foo" /> No <br /> <input type="radio" name="foo" id="yes_foo" /> Yes:</span></span> <span id="amt_of_foo"> <span>How many foo do you have?:</span> <span><input id="qty_of_foo" type="text" size="5" /> </span> </span> </div> </li> <!--answered yes to foo, and entered amount--> <div class="foo_panels"> <li> <li> <div class="panel foo_1"> <h1>First foo's information</h1> <span>Foo name:&nbsp;<input type="text" size="20" /></span> </div> </li> <li> <div class="panel foo_2"> <h1>Second foo's information</h1> <span>Foo name:&nbsp;<input type="text" size="20" /></span> </div> </li> <li> <div class="panel foo_3"> <h1>Third foo's information</h1> <span>Foo name:&nbsp;<input type="text" size="20" /></span> </div> </li> </div> <!--answered no to foo--> <li> <div class="panel"> <h1>Next Question, if no foo</h1> </div> </li> </ul> The ul is used for a jQuery 'slider' plugin. the 'panel' class is used for global css.

    Read the article

  • Is Cassandra database row size limited by available memory?

    - by Adam Hollidge
    I'm working with very long time series -- hundreds of millions of data points in one series -- and am considering Cassandra as a data store. In this question, one of the Cassandra committers (the über helpful jbellis) says that Cassandra rows can be very large, and that column slicing operations are faster than row slices, hence my question: Is the row size still limited by available memory?

    Read the article

  • Mirroring a portion of the screen to an external display (in OSX)

    - by Adam
    I would like to write a program that can mirror a portion of the main display into a new window. Ideally this new window could then be displayed on an external monitor. I have seen this uiltity for a flightsim that does this on a pc (a multifunction display extractor). MFDex http://trac2.assembla.com/lightnings..._x86_Setup.msi I have looked at screen magnifiers or vnc clients for ideas but I think I need to write something from scratch. I have tried to do some reading on osx programing but where do I start in terms of gaining access to the display? I somehow need to extract the graphics from a particular program. Is it best to go near the final output stage (the individual pixels sent to the display) or somewhere nearer the window management stage. Any ideas or pointers would be much appreciated. I just need somewhere to start from. Regards,

    Read the article

  • C++ Array of Variable sized Arrays

    - by adam
    I am very new to C++ and I realise the following is not necessarily as easy as I'd like it to be, but I'd really appreciate a more expert opinion. I am essentially trying to achieve a dynamic iteration over a variable sized array of variable sized arrays similar to the following. String *2d_array[][] = {{"A1","A2"},{"B1","B2","B3"},{"C1"}}; for (int i=0; i<2d_array.length; i++) { for (int j=0; j<2d_array[i].length; j++) { print(2d_array[i][j]); } } Is there a reasonable way to do this? Perhaps by using a vector, or another struct? Thanks :)

    Read the article

  • How to change the size of NSImageView control from within program?

    - by Adam
    The following line of code displays an image on my application window, within an NSImageView control named outputImageView. I used Interface Builder to put the NSImageView control onto the window, initially (then bound it to outputImageView). How do I change the size of the NSImageView control within my program, so that it matches the size of the actual image I am displaying (which may change, periodically)? And what if I wanted to change the anchor point for the image (i.e., centered, left edge, bottom right, or whatever? Thanks in advance! [outputImageView setImage: outputImage];

    Read the article

  • [PHP/MySQL] How to create text diff web app

    - by Adam Kiss
    Hello, idea I would like to create a little app for myself to store ideas (the thing is - I want it to do MY WAY) database I'm thinking going simple: id - unique id of revision in database text_id - identification number of text rev_id - number of revision flags - various purposes - expl. later title - self expl. desc - description text - self expl . flags - if I (i.e.) add flag rb;65, instead of storing whole text, I just said, that whenever I ask for latest revision, I go again in DB and check revision 65 Question: Is this setup the best? Is it better to store the diff, or whole text (i know, place is cheap...)? Does that revision flag make sense (wouldn't it be better to just copy text - more disk space, but less db and php processing. php I'm thinking, that I'll go with PEAR here. Although main point is to open-edit-save, possiblity to view revisions can't be that hard to program and can be life-saver in certain situations (good ideas got deleted, saving wrong version, etc...). However, I've never used PEAR in a long-time or full-project relationship, however, brief encounters in my previous experience left rather bad feeling - as I remember, it was too difficult to implement, slow and humongous to play with, so I don't know, if there's anything better. why? Although there are bazillions of various time/project/idea management tools, everything lacks something for me, whether it's sharing with users, syncing on more PCs, time-tracking, project management... And I believe, that this text diff webapp will be for internal use with various different tools later. So if you know any good and nice-UI-having project management app with support for text-heavy usage, just let me know, so I'll save my time for something better than redesigning the weel.

    Read the article

  • How do I make this linkButton custom component work?

    - by Adam
    package { import mx.controls.LinkButton; import flash.text.TextLineMetrics; public class multiLineLinkButton extends LinkButton { override protected function createChildren():void { super.createChildren(); if (textField){ textField.wordWrap = true; textField.multiline = true; } } override public function measureText(s:String):TextLineMetrics { textField.text = s; var lineMetrics:TextLineMetrics = textField.getLineMetrics(0); lineMetrics.width = textField.textWidth; lineMetrics.height = textField.textHeight; return lineMetrics; } } my issue here is if you use this component you will see that the text is bunched up into a very small area. It does not fill the entire width of the linkButton. Anyone know why this is happening?

    Read the article

  • jquery carousel

    - by Adam Wright
    Hi, I'm looking for a jquery carousel to contain image with the following requirements: must run on auto must not pause must be able to pause on image hover must have external controls that once clicked change the direction of the carousel. must be able to fadeout buttons when the carousel is moving in that direction. I've looked at jcaursel and jcaousellite but both have a pause of in auto mode or you have to specify how many items to slide. I just want it to move continously like a news ticker. Any suggestions on how to achieve this or how to customise jcaurousel or jcarouselite?

    Read the article

  • How do I change the application background color at run-time in a Flex 3.5 application?

    - by Adam Tuttle
    I have a Flex 3.5 application that will serve multiple purposes, and as part of the visual changes that I'd like to make to indicate which mode the application is in, I want to change its background color. Currently, the application tag looks like this: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:com="ventures.view.component.*" xmlns:views="ventures.view.*" layout="absolute" preinitialize="onPreInitialize()" creationComplete="onCreationComplete()" applicationComplete="onApplicationComplete()" click="onClick(event)" enabled="{(!chainController.generalLocked)}" backgroundGradientColors="[0xFFFFFF, 0xFFFFFF]" > I've tried using a binding, for both the backgroundColor and backgroundGradientColors attributes: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" ... backgroundColor="{app_background_color}" > —and— <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" ... backgroundGradientColors="{app_background_color}" > but for the former binding is not allowed, and for the latter there is a warning that: Data binding will not be able to detect assignments to "app_background_color". I also ran across this page which seems to indicate that I could do it with the setStyle() method, but the documentation seems to indicate that this method is only available for components, not the main canvas. I suppose I could wrap everything in a <mx:Canvas></mx:Canvas> specificially for this purpose, but that seems wasteful—like Div-itis in HTML or something. What's the best way to change the main application background color at run-time?

    Read the article

  • Applying transformations to NSBitmapImageRep

    - by Adam
    So ... I have an image loaded into an NSBitmapImageRep object, so I am able to examine the contents of specific pixels via a two dimensional array. Now I want to apply a couple of "transformations" to the image, in preparation for some additional processing. If I was manipulating the image manually, in Photoshop, I would: Rotate the image Crop a portion of it and discard the rest Apply a "threshold" transformation (which essentially converts the image to black and white, based on the threshold value I provide) Resample the image to shrink it down a bit (which, although losing some image quality, will speed up the subsequent processing) (not necessarily in that order) Are there objective C methods available to facilitate these specific image manipulations, with the data in the NSBitmapImageRep object? If so, can someone point me to some good examples?

    Read the article

  • Automaically select the lastrow in PivotTable SourceData to avoid (blanks)

    - by Adam
    Hi A little help needed, I have a Macro automatically creating pivot tables and charts, this is all working fine but I am getting (blank) in my pivot table becuase my range is all the way to 65536. How do I automatically get the lastrow / column in my source data so I dont get any blanks. The data is changing constantly so this needs to be automatic Here is the source data, I am looking to get the R65536C37 to be automatically generated based on the lastcolumn of the "raw" sheet ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _ "raw!R1C1:R65536C37").CreatePivotTable _ TableDestination:="Frontpage!R7C1", TableName:="PivotTable2", _ DefaultVersion:=xlPivotTableVersion10 I have tried; LastRow = ActiveSheet.UsedRange.Rows.Count SourceData:= "raw!R1C1:" & LastRow & C37" Pivot Macro Sheets("Frontpage").Select Range("A7").Select ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _ "raw!R1C1:R65536C37").CreatePivotTable _ TableDestination:="Frontpage!R7C1", TableName:="PivotTable2", _ DefaultVersion:=xlPivotTableVersion10 Sheets("Frontpage").Select Cells(7, 1).Select ActiveSheet.Shapes.AddChart.Select ActiveChart.SetSourceData Source:=Range("Frontpage!$A$7:$H$22") ActiveChart.ChartType = xlColumnClustered With ActiveSheet.PivotTables("PivotTable2").PivotFields("Priority") .Orientation = xlRowField .Position = 1 End With ActiveSheet.PivotTables("PivotTable2").AddDataField ActiveSheet.PivotTables( _ "PivotTable2").PivotFields("Case ID"), "Count of Case ID", xlCount ActiveChart.Parent.Name = "IncidentsbyPriority" ActiveChart.ChartTitle.Text = "Incidents by Priority" Dim RngToCover As Range Dim ChtOb As ChartObject Set RngToCover = ActiveSheet.Range("D7:L16") Set ChtOb = ActiveSheet.ChartObjects("IncidentsbyPriority") ChtOb.Height = RngToCover.Height ' resize ChtOb.Width = RngToCover.Width ' resize ChtOb.Top = RngToCover.Top ' reposition ChtOb.Left = RngToCover.Left ' reposition Any help would be greatly appreciated. I need to repeat this in four other pivots so as to avoid getting (blank) in my tables and charts.

    Read the article

  • How do I set the text color of a Cocoa tooltip?

    - by Adam Preble
    I am using BGHUDAppKit for an outline view within a HUD-style (black) NSPanel. As such the text in my outline view cells is light gray or white. Unfortunately this means that when I hover to bring up a tooltip for a cell's value, it shows up as light gray text on yellow, which is illegible. How can I set the text color for the tooltip, or is there a way that I can modify the control itself (without changing its appearance) to work better with the tooltip mechanism?

    Read the article

  • jQuery inline text scrolling/rotating/carousel effect

    - by Adam Pope
    I trying to create an animation with JQuery that scrolls 1 word in a sentence. For example, I am a nice sententce of text with a MAGIC word in it OTHER HIDDEN WORDS After a second or so, MAGIC would move upwards and OTHER would scroll into view. I've tried playing with a few carousel plugins but I can't seem to get the effect working. Some seem to have so many nested divs that they refuse to display inline, others have issues when one word is longer than another. Does anybody know of a plugin that could make this possible? Is this even possible?

    Read the article

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