Search Results

Search found 891 results on 36 pages for 'andy ibanez'.

Page 23/36 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • SOLR and Natural Language Parsing - Can I use it?

    - by andy
    hey guys, my requirements are pretty similar to this: Requirements http://stackoverflow.com/questions/90580/word-frequency-algorithm-for-natural-language-processing Using Solr While the answer for that question is excellent, I was wondering if I could make use of all the time I spent getting to know SOLR for my NLP. I thought of SOLR because: It's got a bunch of tokenizers and performs a lot of NLP. It's pretty use to use out of the box. It's restful distributed app, so it's easy to hook up I've spent some time with it, so using could save me time. Can I use Solr? Although the above reasons are good, I don't know SOLR THAT well, so I need to know if it would be appropriate for my requirements. Ideal Usage Ideally, I'd like to configure SOLR, and then be able to send SOLR some text, and retrieve the indexed tonkenized content. Context So you guys know, I'm working on a small component of a bigger recommendation engine.

    Read the article

  • Using DataTypeAttribute to validate a date

    - by Andy Evans
    I'm having some difficulty understanding how to validate a date (DOB) using MVC2. What I want to do is 1. Is the date entered a valid date and, 2. Is the date at lease 13 years in the past. For example, to validate an email I use the following code: [Required(ErrorMessage = "Email address is required.")] [StringLength(320, ErrorMessage = "Email must be less than 320 characters.")] [Email(ErrorMessage = "This email address is invalid.")] public string email { get; set; } To validate the email I use: public class EmailAttribute : RegularExpressionAttribute { public EmailAttribute() : base("insert long regex expression here") { } } Any assistance would be greatly appreciated, thanks!

    Read the article

  • Using lambda expressions and linq

    - by Andy
    So I've just started working with linq as well as using lambda expressions. I've run into a small hiccup while trying to get some data that I want. This method should return a list of all projects that are open or in progress from Jira Here's the code public static List<string> getOpenIssuesListByProject(string _projectName) { JiraSoapServiceService jiraSoapService = new JiraSoapServiceService(); string token = jiraSoapService.login(DEFAULT_UN, DEFAULT_PW); string[] keys = { getProjectKey(_projectName) }; RemoteStatus[] statuses = jiraSoapService.getStatuses(token); var desiredStatuses = statuses.Where(x => x.name == "Open" || x.name == "In Progress") .Select(x=>x.id); RemoteIssue[] AllIssues = jiraSoapService.getIssuesFromTextSearchWithProject(token, keys, "", 99); IEnumerable<RemoteIssue> openIssues = AllIssues.Where(x=> { foreach (var v in desiredStatuses) { if (x.status == v) return true; else return false; } return false; }); return openIssues.Select(x => x.key).ToList(); } Right now this only select issues that are "Open", and seems to skip those that are "In Progress". My question: First, why am I only getting the "Open" Issues, and second is there a better way to do this? The reason I get all the statuses first is that the issue only stores that statuses ID, so I get all the statuses, get the ID's that match "Open" and "In Progress", and then match those ID numbers to the issues status field.

    Read the article

  • SQL Server 2008 GUID column is all 0's

    - by Andy Evans
    I'm hoping this is a simple goof I did on my end ... I have a table in my database set up like so: column name: widget_guid data type: uniqueidentifier allow nulls: false default value: newid() identity: false row guid: true When records are created (via LINQ to SQL) that the values in this field are formatted as a GUID but contain all 0's My assumption was that when a new record was created, that a guid would be autogenerated for that column, much like an auto-incrementing row id. Is this not true? Any help would be greatly appreciated. Thanks.

    Read the article

  • [PowerShell] Input encoding

    - by Andy
    Hi! I need to get output of native application under PowerShell. The problem is, output is encoded with UTF-8 (no BOM), which PowerShell does not recognize and just converts those funky UTF chars directly into Unicode. I've found PowerShell has $OutputEncoding variable, but it does not seem to affect input data. Good ol' iconv is of no help either, since this unnecessary UTF8-as-if-ASCII = Unicode conversion takes place before the next pipeline member acquires data.

    Read the article

  • Public code repository

    - by Andy White
    Can anyone recommend a public code repository? A few friends and I are thinking of starting a few projects for iPhone, web, Android, etc., and it would be nice to have a public (internet) code repository to use that would work well on any platform (Mac, PC, Linux). Any type of repository is fine (SVN, CVS, Git, etc.). A few ideas are Sourceforge or Google Code. Any recommendations? Thanks

    Read the article

  • WCF MSMQ consumer thread count

    - by Andy White
    What's the best way to configure the maximum number of threads that can pull messages from an MSMQ queue, using a netMsmqBinding in WCF? For example, say I have an MSMQ service for which I only want to have 2 (or 10, or whatever number of) worker threads pulling messages off at a time.

    Read the article

  • problem in html, table class text stretching out.

    - by Andy
    Hey people, I've got a slight problem after weeks of html programming. I've got a large table which I use to construct tabs with, details don't really matter. On every tab there is a tab title (which is defined as one single cell in a table with a class from a .css) and under it there are other rows and columns for the table. sample code for the single table with the single cell in it: <table class='tabcontainer_title'><tr><td class='tabcontainer_title'>TEXT</td></tr></table> This table is again positioned in one cell of the table outside it, which has a different class 'tabcontainer_content' This is in the CSS: .tabcontainer_title{ background-color : #58af34; background-image : url(); text-align : right; vertical-align : top; margin-top : 0px; margin-right : 0px; margin-bottom : 0px; margin-left : 0px; padding-top : 5px; padding-right : 10px; padding-bottom : 5px; padding-left : 0px; font-size : 14px; font-style : normal; color : #000000; } .tabcontainer_content{ width : 100%; font-weight : bolder; background-color : #58af34; color : #000000; padding : 0px; border-collapse : collapse; } The problem I'm experiencing right now is that if there are like 3 rows in the table, which means there's a lot of emtpy space instead of those rows, the text in the tab title has a large margin from the top: but I haven't configured any margin to be present. When the table is full of rows though, hence the table is full, then the tab title holds no unnecessary empty space above the text. What am I missing here?

    Read the article

  • c# Reflection - Find the Generic Type of a Collection

    - by Andy Clarke
    Hi, I'm reflecting a property 'Blah' its Type is ICollection public ICollection<string> Blah { get; set; } private void button1_Click(object sender, RoutedEventArgs e) { var pi = GetType().GetProperty("Blah"); MessageBox.Show(pi.PropertyType.ToString()); } This gives me (as you'd expect!) ICollection<string> ... But really I want to get the collection type i.e. ICollection (rather than ICollection<string>) - does anyone know how i'd do this please?

    Read the article

  • SOLR not searching on certain fields

    - by andy
    hey guys, just installed solr, edited the schema.xml, and am now trying to index it and search on it with some test data. In the XML file I'm sending to SOLR, one of my fields look like this: <field name="PageContent"><![CDATA[<p>some text in a paragrah tag</p>]]></field> There's HTML there, so I've wrapped it in CDATA. In my SOLR schema.xml, the definition for that field looks like this: <field name="PageContent" type="text" indexed="true" stored="true"/> When I ran the POSTing tool, everything went ok, but when I search for content which I know is inside the PageContent field, I get no results. However, when I set the node to PageContent, it works. But if I set it to any other field, it doesn't search in PageContent. Am I doing something wrong? what's the issue? thanks very much for any help cheers! UPDATE Just to clarify on the error. I've uploaded a "doc" with the following data: <field name="PageID">928</field> <field name="PageName">some name</field> <field name="PageContent"><![CDATA[<p>html content</p>]]></field> In my schema I've defined the fields as such: <field name="PageID" type="integer" indexed="true" stored="true" required="true"/> <field name="PageName" type="text" indexed="true" stored="true"/> <field name="PageContent" type="text" indexed="true" stored="true"/> And: <uniqueKey>PageID</uniqueKey> <defaultSearchField>PageName</defaultSearchField> Now, when I use the Solr admin tool and search for "some name" I get a result. But, if I search for "html content", or "html", or "content", or "928", I get no results why? cool, thanks!

    Read the article

  • How to paste transparent image into flash project

    - by Andy
    Hi, I've created a short text (a word) in photoshop with the blending options I prefer and now it's all done I would like to paste it into my flash project. The problem is I can't get the text to be transparent in the flash, I always see the white background which is not very nice since the background on which the text will show is actually a picture. How to make this text transparent? In photoshop I started a new transparent project. Copying from a .GIF file also doesn't work... Thanks!!

    Read the article

  • How to manage a single-selection (exclusive) list?

    - by Andy
    I've got a detail view that consists of a table view with a few rows of data. I can fill the rows just fine, and moving back and forth from the parent view to the subview works too. This detail view should allow the user to select a single value, placing a checkmark accessory in the cell and then returning to the parent view (where the selected value becomes the cell.textLabel.text property of the cell from which the detail view was called). This all works as of right now. However, when the user taps the cell in the parent view to go back to the detail view (to change their selection), my checkmark has disappeared and I cannot for the life of me figure out how to make it stay. Here's my cellForRowAtIndexPath: method: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; } NSString *labelText = [[phones objectAtIndex:indexPath.row] valueForKey:@"phoneNumberLabel"]; cell.textLabel.text = labelText; NSString *currentLabel = [ruleBuilder.tableView cellForRowAtIndexPath:selectedIndexPath].textLabel.text; if (labelText == currentLabel) { cell.accessoryType = UITableViewCellAccessoryCheckmark; } NSString *detailText = [[phones objectAtIndex:indexPath.row] valueForKey:@"phoneNumber"]; cell.detailTextLabel.text = detailText; return cell; } I've checked out Apple's sample code for exclusive-list management in Table View Programming Guide, but the snippet seems incomplete, and I can't find the related code in Apple's sample code. This doesn't seem like it ought to be that hard to do.

    Read the article

  • Drools 5.0 - Locally... Global

    - by Andy
    Hello, I'd like to declare a global variable that is scoped to only my rules file. For example: variable $reUseMe is only declared once. rule 1 $reUseMe : POJO(val = 1) //other conditions rule 2 $reUseMe val

    Read the article

  • Commenting out protect_from_forgery

    - by Andy
    Hi, I was trying to use active record store but I kept getting an invalid authenticity token. Someone told me to remove my protect_from_forgery from application controller. I know that this would remove all auth tokens but I'm not sure if this is a good idea. Does active record store not need auth tokens? By the way, all I need is a way to dynamically calculate the number of users online and their session variables. If there is a better way than using active record store it would be nice to know.

    Read the article

  • How to improve multi-threaded access to Cache (custom implementation)

    - by Andy
    I have a custom Cache implementation, which allows to cache TCacheable<TKey> descendants using LRU (Least Recently Used) cache replacement algorithm. Every time an element is accessed, it is bubbled up to the top of the LRU queue using the following synchronized function: // a single instance is created to handle all TCacheable<T> elements public class Cache() { private object syncQueue = new object(); private void topQueue(TCacheable<T> el) { lock (syncQueue) if (newest != el) { if (el.elder != null) el.elder.newer = el.newer; if (el.newer != null) el.newer.elder = el.elder; if (oldest == el) oldest = el.newer; if (oldest == null) oldest = el; if (newest != null) newest.newer = el; el.newer = null; el.elder = newest; newest = el; } } } The bottleneck in this function is the lock() operator, which limits cache access to just one thread at a time. Question: Is it possible to get rid of lock(syncQueue) in this function while still preserving the queue integrity?

    Read the article

  • Best tools to parse reports

    - by Andy Schaefer
    I have a report that I need to parse/scrape for loading into an alternate or query-able data store. The report looks like something akin to: this. My gut is that PERL would do a decent job, but I have several different permutations of the report and I don't really want to make a script around each form. This report is a pretty stock type report, and I have seen where Monarch Pro can parse these types of reports, but I have had a difficult time finding alternatives to how these could be parsed since I'm looking to do this working primarily in a Linux environment. Any suggestions?

    Read the article

  • Detecting DOM event support in Firefox

    - by Andy E
    What's the best way to detect event support in Firefox. Opera, Internet Explorer and Safari/Chrome all support eventName in object, but Firefox doesn't. My test case is this: javascript:alert("onclick" in document.createElement("a")) Which alerts true when entered into the address bar on the aforementioned browsers, and alerts false for Firefox. I figured out a solution using typeof on an event like so: var a = document.createElement("a"); a.setAttribute("onclick", ""); alert(typeof(a.onclick) == "function"); Is there a better method of detecting event support in Firefox?

    Read the article

  • How do I create a view with a picker on the bottom and a table view on the top?

    - by Andy
    Hi - first time asker, long-time lurker. I am trying to create an iPhone view that has a date/time picker on the bottom half of the screen, and a grouped, single-section, four-row table view on the top half of the screen (almost identical to the one Apple shows in Fig. 2-4 of their View Controller Programming Guide (but then never goes on to explain). Conceptually, I think I understand that what I need is a main view with a pair of subviews - one for the picker, and one for the table view. I'm pretty sure I can make the picker function once I have it on-screen, and I'm pretty sure I can make the table view function too. What I can't for the life of me figure out is how, programmatically speaking, to get the two views onto the screen simultaneously. I can lay it out perfectly in Interface Builder, but then it all goes to hell when I switch to Xcode...the view appears with the picker, but no table view. Thanks, in advance, for any help you can offer.

    Read the article

  • Dojo StackContainer children are not resizing on browser maximise/restore

    - by Andy
    Hi. I have the following nested layout in a dojo 1.4 app: BorderContainer 1 -- Stack Container 1 ----BorderContainer 2 ----BorderContainer 3 The StackContainer is sized with width and height 100%. When I resize the browser window using maximise/restore, the StackContainer correctly resizes to the center region of it's parent BorderContainer. The problem I have is that the StackContainer children (BorderContainer 2 and 3) do not get resized to the StackContainer's contentBox. Is there something special you have to do to force a resize of StackContainer children? I have tried calling StackContainer1.resize() but this makes no difference. Thanks in advance. Additional information: Thanks for the reply peller. The widget hierachy that contains the StackContainer is actually a custom widget, so the StackContainer is not actually in a BorderContainer directly, but has its height and width explicitly set to 100%. This works and the StackContainer is resized correctly on browser maximise. The direct children of the stackcontainer are BorderContainers and it is these BorderContainers that do not get resized when the StackContainer is resized. One point to note is that when the StackContainer is created in markup, the stackcontainer children are empty divs. These divs are then used as placeholders for custom widget creation, e.g. var widget = new com.company.widget(params, placeholderDiv); where placeholderDiv is a direct child of the StackContainer in markup. Should I be adding the programatically created 'widget' to the stackcontainer using addChild instead?

    Read the article

  • Simple POSIX threads question

    - by Andy
    Hi, I have this POSIX thread: void subthread(void) { while(!quit_thread) { // do something ... // don't waste cpu cycles if(!quit_thread) usleep(500); } // free resources ... // tell main thread we're done quit_thread = FALSE; } Now I want to terminate subthread() from my main thread. I've tried the following: quit_thread = TRUE; // wait until subthread() has cleaned its resources while(quit_thread); But it does not work! The while() clause does never exit although my subthread clearly sets quit_thread to FALSE after having freed its resources! If I modify my shutdown code like this: quit_thread = TRUE; // wait until subthread() has cleaned its resources while(quit_thread) usleep(10); Then everything is working fine! Could someone explain to me why the first solution does not work and why the version with usleep(10) suddenly works? I know that this is not a pretty solution. I could use semaphores/signals for this but I'd like to learn something about multithreading, so I'd like to know why my first solution doesn't work. Thanks!

    Read the article

  • Question about using awk to print all columns great then nth

    - by Andy
    right now I have this line, and it worked until I had whitespace in the second field. svn status | grep '\!' | gawk '{print $2;}' > removedProjs is there a way to have awk print everything in $2 or greater? ($3, $4.. until we don't have anymore columns?) I suppose I should add that I'm doing this in a windows environment with cygwin.

    Read the article

  • Multiple instances of this carousel on a single page - can't get it to work

    - by Andy
    This code comes from a tutorial so it's not originally my own work. What I am trying to do is implement this several times on a single page. I have tried and so far failed - by numbering the id "carousel" and so forth. Any help would be seriously appreciated. I'm tearing my hair out. http://jsfiddle.net/AndyMP/zcKDV/5/ For completeness.. this is the carousel JQuery as it stands. //rotation speed and timer var speed = 5000; var run = setInterval('rotate()', speed); //grab the width and calculate left value var item_width = $('#slides li').outerWidth(); var left_value = item_width * (-1); //move the last item before first item, just in case user click prev button $('#slides li:first').before($('#slides li:last')); //set the default item to the correct position $('#slides ul').css({'left' : left_value}); //if user clicked on prev button $('#prev').click(function() { //get the right position var left_indent = parseInt($('#slides ul').css('left')) + item_width; //slide the item $('#slides ul').animate({'left' : left_indent}, 200,function(){ //move the last item and put it as first item $('#slides li:first').before($('#slides li:last')); //set the default item to correct position $('#slides ul').css({'left' : left_value}); }); //cancel the link behavior return false; }); //if user clicked on next button $('#next').click(function() { //get the right position var left_indent = parseInt($('#slides ul').css('left')) - item_width; //slide the item $('#slides ul').animate({'left' : left_indent}, 200, function () { //move the first item and put it as last item $('#slides li:last').after($('#slides li:first')); //set the default item to correct position $('#slides ul').css({'left' : left_value}); }); //cancel the link behavior return false; }); //if mouse hover, pause the auto rotation, otherwise rotate it $('#slides').hover( function() { clearInterval(run); }, function() { run = setInterval('rotate()', speed); } ); //a simple function to click next link //a timer will call this function, and the rotation will begin :) function rotate() { $('#next').click(); }

    Read the article

  • Webmail Contact List Importer

    - by Andy Jarrett
    Does anyone know of a Webmail Contact List Importer scripts (ColdFusion, PHP etc) like those used on Twitter and LinkedIn ? I've found some but they are paid for and I want some more bespoke & open. To clarify a little more I'm not looking for a way to process .csv files :) I'm looking for a bit of code that can logging into gmail, yahoo mail, hotmail, aol and pull out the users address book.

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >