Search Results

Search found 505 results on 21 pages for 'minus'.

Page 11/21 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Full text search for irregular rapper names with Solr

    - by Horace Loeb
    I'm implementing full text search functionality on my rap website, and I'm running into some issues with rapper and song names. For example, someone might want to search for the rapper "Cam'ron" using the query "camron" (leaving out the mid-word apostrophe). Likewise, someone might search for the song "3 Peat" using the query "3peat". "The Notorious B.I.G." is a bit of a weird case: both "The Notorious BIG" and "The Notorious B.I.G." both work (I guess because the solr.StandardFilterFactory removes dots from acronyms?), but "The Notorious B.I.G" (i.e., minus the trailing dot) doesn't. Ideally all reasonable variations of these names should work. I'm guessing the answer has something to do with the solr.WordDelimiterFilterFactory, but I'm not sure. Also, I'm using Sunspot with Rails if that's relevant.

    Read the article

  • jquery hasClass "active" on ul#navigation li on page load not working

    - by Ross
    $(document).ready(function(){ $("li").click(function(){ if ($(this).hasClass("active") ) $(this).fadeTo("slow", 1.0); }); }); I have a navigation bar made and am using this code to add a transparency effect on hover: $(document).ready(function(){ $(".thumbs").fadeTo("slow", 0.6); $(".thumbs").hover(function(){ $(this).fadeTo("slow", 1.0); },function(){ $(this).fadeTo("slow", 0.4); }); }); I'm also using hoverIntent. The opacity rollover works a treat, but I'd like my "active" page to have 100% opacity, but I can't seem to get it to work..what am I doing wrong? the link in questions HTML is: <ul id="navigation"> <li class="active"><a href="page.htm"></a></li> </ul> the nav works perfect minus my "active" class so I think I provided all the necessary code. thank you.

    Read the article

  • Are the built-in images in iPhone documented, and is there a list of their names somewhere?

    - by Alex Gosselin
    I discovered somewhat by accident that if you make a UIButton in Interface Builder and type in Plus in the image field, a + image appears for the button. A similar result comes from typing Minus. I am wondering if this is a bug, or if there is some way the poor programmers can access the built-in general GUI images from other apple apps, such as the green +, the red -, the detail disclosure chevron, the big red "Delete Contact" or similarly styled button, etc. Has anyone else encountered this, or know where to access these things in Xcode? It makes sense to me that they should be usable, cause the Apple HIG seems to be all about making things recognizable and intuitive, and using them the way other apps use them.

    Read the article

  • Babel Django Off By 1 Cent

    - by Dave
    I ran into a problem today while using BabelDjango and thought I would ask if anyone has ran into anything similar. I was using the tags in my templates, {% load babel %} and then {{amount_owed|currencyfmt:"USD"}} which returned the amount_owed minus one-cent. I thought maybe the returned value was 9.949999 which should still be $9.95 but when I returned the raw value it returned "9.95". However when I formatted it using the babel tags the rsult was off by one-cent. My 9.95 returned "$9.94" Anyone have any advice where to look to troubleshoot this problem? Thanks in advance for your help.

    Read the article

  • Caching instances in a jee web app

    - by SibzTer
    Hi, Consider the scenario of a typical webapp with JSFs on the front and ejb3, with Hibernate as JPA provider, talking to backend database such as mysql, etc. The main user actions are login and mostly CRUD operations (minus any D(elete) operations). And the App Server is GlassFish of course. Given this scenario, how and where all would one go about providing caching to improve performance? From what I have googled, I have seen that hibernate provides some sort of caching through different cache providers. Is there any sort of caching that can be provided for the jsf pages? How about session beans or entity beans on the ejb side of things? Also, I just read about memcached and was wondering if this was something to consider?

    Read the article

  • Favicon to PNG in PHP

    - by sailtheworld
    I need a PHP script to convert favicons to PNGs while keeping their original dimensions. I know Google has it's secret icon converter - http://www.google.com/s2/favicons?domain=http://facebook.com/ but this converts favicons to 16x16 even if they they were originally larger. So basically I need this, minus the shrinking effect. I've also seen this - http://www.controlstyle.com/articles/programming/text/php-favicon/ but I couldn't get it to work after hours of messing around with it. Basically I am trying to automatically grab the icon for a link that will be as large as possible - automatically 48x48 png based on a URL would be the perfect scenario, but I don't know of any humanly possible way to do this given that no websites happen to keep a 48x48 icon in a publicly accessible spot. Does anybody know of a script/service or have a suggestion? Thanks!

    Read the article

  • Calculating a delta of years from a date

    - by Spiros
    I am trying to figure out a way to calculate the year of birth for records when given the age to two decimals at a given date - in Perl. To illustrate this example consider these two records: date, age at date 25 Nov 2005, 74.23 21 Jan 2007, 75.38 What I want to do is get the year of birth based on those records - it should be, in theory, consistent. The problem is that when I try to derive it by calculating the difference between the year in the date field minus the age, I run into rounding errors making the results look wrong while they are in fact correct. I have tried using some "clever" combination of int() or sprintf() to round things up but to not avail. I have looked at Date::Calc but cant see something I can use. p.s. As many dates are pre-1970, I cannot not unfortunately use UNIX epoch for this.

    Read the article

  • Perl: calculating a delta of years from a date

    - by Spiros
    Hello, I am trying to figure out a way to calculate the year of birth for records when given the age to two decimals at a given date - in Perl. To illustrate this example consider these two records: date, age at date 25 Nov 2005, 74.23 21 Jan 2007, 75.38 What I want to do is get the year of birth based on those records - it should be, in theory, consistent. The problem is that when I try to derive it by calculating the difference between the year in the date field minus the age, I run into rounding errors making the results look wrong while they are in fact correct. I have tried using some "clever" combination of int() or sprintf() to round things up but to not avail. I have looked at Date::Calc but cant see something I can use. p.s. As many dates are pre-1970, I cannot not unfortunately use UNIX epoch for this.

    Read the article

  • Objective-c Method to get a number then countdown in 1 every second

    - by Sami
    Hi, i need a little help i have a method which gets value such as 50, it then assigns that value to trackDuration, so NSNumber *trackDuration = 50, i want the method to every second minus 1 from the value of trackDuration and update a label, the label being called duration. Here's what i have so far; - (void) countDown { iTunesApplication *iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"]; NSNumber *trackDuration = [NSNumber numberWithDouble:[[iTunes currentTrack] duration]]; while (trackDuration > 0) { trackDuration - 1; int inputSeconds = [trackDuration intValue]; int hours = inputSeconds / 3600; int minutes = ( inputSeconds - hours * 3600 ) / 60; int seconds = inputSeconds - hours * 3600 - minutes * 60; NSString *trackDurationString = [NSString stringWithFormat:@"%.2d:%.2d:%.2d", hours, minutes, seconds]; [duration setStringValue:trackDurationString]; sleep(1); }} Any help would be much appreciated, thanks in advanced, Sami.

    Read the article

  • Cross-Browser jQuery text-zoom implementation

    - by JMC Creative
    I've got some code to increase/decrease font size. This is giving me a headache because each browser seems to implement the $.css('font-size') differently (see jquery bug). The part that's really killing me, though, is that Firefox is scaling up okay, but when I use the scale down function below, it scales up. Webkit & IE are both working as expected. Any ideas on that? I put this in a fiddle here: http://jsfiddle.net/srQ3P/1/ where you can see it working as expected, and you can see it broken in firefox at the project page: http://cumberlandme.info/residents MAJOR EDIT Sorry, the issue is not the code, it's firefox buggy behavior. After I zoom in or out with the browser controls (ctrl + plus or ctrol + minus) the js goes haywire. This doesn't happen in other browsers. This is the real issue. Any advice on that

    Read the article

  • java: copy-on-write data structure?

    - by Jason S
    Is there anything in Java that implements something like the following interface MSet<T> extends Iterable<T> { /** * return a new set which consists of this set plus a new element. * This set is not changed. */ MSet<T> add(T t); /** * return a new set which consists of this set minus a designated element. * This set is not changed. */ MSet<T> remove(T t); }

    Read the article

  • SQL Server adding a record record manually to a view

    - by SelectDistinct
    I have a view which contains the data seen in the image below. The view is showing me how many working days are available in each month for the current financial year taking away any school/bank holidays. As the month of August has zero days available it has excluded this month from the view. As the total number of days available will always be zero for the month of August, then it seems acceptable to hardcode the SQL to always have 0 for August, and also an April-August record which will be the same as April-July. What would be the best way to add these 2 records, and where about in the code should it be placed see example of code layout: see link (answered question) for layout of code: SQL populate total working days per month minus bank holidays for current financial year

    Read the article

  • Highlight polygon and tint rest of map using Google Maps

    - by Haes
    Hi, I'd like to display a highlighted polygon using Google Maps. The idea is that the polygon in question would be displayed normally and the rest of the map should be darkened a little bit. Here's an example image what I would like to accomplish with a polygon from Austria: Unfortunately, I'm a complete rookie when it comes to Google Maps API's and map stuff in general. So, is this even possible do this with Google Map API's? If yes, with what version (v2, v3)? Would it be easier to do it with other map toolkits, like openlayers? PS: One idea I had, was to build an inverse polygon (in this example, the whole world minus the shape of austria) and then display a black colored overlay with transparency using this inverted polygon. But that seems to be quite complicated to me.

    Read the article

  • Removing values from a returned linq query

    - by Diver D
    HI there I am hoping for some help with a query I have. I have this query var group = from r in CustomerItem group r by r.StoreItemID into g select new { StoreItemID = g.Key, ItemCount = g.Count(), ItemAmount = Customer.Sum(cr => cr.ItemAmount),RedeemedAmount = Customer.Sum(x => x.RedeemedAmount) }; I am returning my results to a list so I can bind it listbox. I have a property called EntryType which is an int. There are 2 available numbers 1 or 2 Lets say I had 3 items that my query is working with 2 of them had the EntryType = 1 and the 3rd had EntryType2. The first records had a ItemAmount of 55.00 and the 3rd had a ItemAmount of 50.00 How can I group using something simlar to above but minus the ItemAmount of 50.00 from the grouped amount to return 60.00? Any help would be great!!

    Read the article

  • Content organizer auto create folder has wrong time in sharepoint 2010

    - by user208628
    Hi, I have a problem, I am using the content organizer feature to redirect document on upload and the auto create folder feature of it, the property used is a date set by the user when the document gets uploaded. My problem is that when the folder gets created it writes the time set by the user minus two hours, I see that it uses GMT time while everything on the server, the site and the computers is set to UTC+2, so how come it still uses GMT time ? Can someone help me out please. Thank you.

    Read the article

  • Select an entity according to a list of associated entities

    - by Maverickch
    I have the following database schema : Two tables, books and tags, with n-m relationship. Books - Tags We can have for example the book 1, with tags {A,B,C}, and book 2, with tags {A}. I would like to select the books according to a list of tags. For example : selected tags list : {A,B} - book 1 My idea was to use the MINUS SQL function, to subtract book tags list to the selected tags list, and return the book if the list was empty. Unfortunately, this SQL function is not supported by HQL. Any idea about that ?

    Read the article

  • Enums With Default Throw Clause?

    - by Tom Tresansky
    I noticed the following in the Java Language spec in the section on enumerations here: link switch(this) { case PLUS: return x + y; case MINUS: return x - y; case TIMES: return x * y; case DIVIDE: return x / y; } throw new AssertionError("Unknown op: " + this); However, looking at the switch statement definition section, I didn't notice this particular syntax (the associated throw statement) anywhere. Can I use this sort of "default case is throw an exception" syntactic sugar outside of enum definitions? Does it have any special name? Is this considered a good/bad practice for short-cutting this behavior of "anything not in the list throws an exception"?

    Read the article

  • Strange pattern matching with functions instancing Show

    - by Sean D
    So I'm writing a program which returns a procedure for some given arithmetic problem, so I wanted to instance a couple of functions to Show so that I can print the same expression I evaluate when I test. The trouble is that the given code matches (-) to the first line when it should fall to the second. {-# OPTIONS_GHC -XFlexibleInstances #-} instance Show (t -> t-> t) where show (+) = "plus" show (-) = "minus" main = print [(+),(-)] returns [plus,plus] Am I just committing a motal sin printing functions in the first place or is there some way I can get it to match properly? edit:I realise I am getting the following warning: Warning: Pattern match(es) are overlapped In the definition of `show': show - = ... I still don't know why it overlaps, or how to stop it.

    Read the article

  • Searching in Rails 3

    - by cbarton
    Here is the situation: I have the need to search for specifics or generals, much like expedia.com or your local library catalog search. In that there are fields that may or may not be filled out based on the individual need. It acts much like an "advanced search page". I have all of that code done for the models/controller and such and have it setup with a Searches controller along with matching model and views. The question that I have is there a way to cut down the amount of parameters posted to GET so that the url isn't search?search[:a]=""+search[:b]=""+search[:c]="x"... plus the unicode checkmark. I only want the filled out fields to be shown in the response link especially minus the checkmark. cbarton

    Read the article

  • Default Values Specflow Step Definitions

    - by Gavin Osborn
    I'm starting out in the world of SpecFlow and I have come across my first problem. In terms of keeping my code DRY I'd like to do the following: Have two scenarios: Given I am on a product page And myfield equals todays date Then... Given I am on a product page And myfield equals todays date plus 4 days Then... I was hoping to use the following Step Definition to cover both variants of my And clause: [Given(@"myfield equals todays date(?: (plus|minus) (\d+) days)?")] public void MyfieldEqualsTodaysDate(string direction, int? days) { //do stuff } However I keep getting exceptions when SpecFlow tries to parse the int? param. I've checked the regular expression and it definitely parses the scenario as expected. I'm aware that I could so something as crude as method overloading etc, I was just wondering if SpecFlow supported the idea of default parameter values, or indeed another way to achieve the same effect. Many Thanks

    Read the article

  • What jquery based table plugin can hide sub rows?

    - by user1458290
    I'm in the need to convert excel macros into jquery code, the function is that you need to click on the plus sign to unfold and show the sub rows to modify column2 if you want to type values in column2, the other columns can't be modified. You can't straightly modify values of column2 until you unfold the parent row, because there are many sub rows belonging to parent row,say Car. The values of Name, Model, Code are existing, they are master data, no need to type or modify. please see the snapshot at folded and unfolded, besides modifying values in sub rows , I need to be able to know which sub rows are modified and values of those rows.Initially the editable columns are blank. And when you click on the minus sign, the sub rows can be folded again,but the modified values won't be lost,they are still there when unfolded again. One last requirement is it's cross devices, the code must run well on pc,mobile phone,pad. Is that possible? Many thanks.

    Read the article

  • Retrieve value of one column in a table

    - by user327094
    Here is my problem: I have 2 tables Accounts and Transaction Logs. in Accounts table, it has column "Amount" which is a base amount of an account. and in Trans Logs table, it also has column "Amount" which is additional (add or minus to the base amount) amount of the account. and I don't know how to retrieve that base amount to edit it, then save it back to the table. That means I need to get a value of the right column by using Acc_No to find. I'm using DataSet, by the way. i think it should go like this: Dim Amount as Decimal Amount = *the code to retrieve the base amount* Amount = Amount + txtAmount.Text *the code to save the new amount back to Accounts table* Thank you!

    Read the article

  • How to read changed values with native query during one transaction? (Spring and JPA)

    - by knarf1983
    We have container transaction with Spring and JPA (Hibernate). I need to make an update on a table to "flag" some rows via native statements. Then we insert some rows via EntityManager from JPATemplate to this table. After that, we need to calculate changes in the table via native statement (with Oracle's union and minus, complex groups...) I see that changes from step 1 and 2 are not commited and thats why the statement from 3 fails. I already tried with transaction propagation REQUIRES_NEW, EntityManager.flush... Didn't work. 1) update SOMETABLE acolumn = somevalue (native) 2) persist some values into SOMETABLE (via entity manager) 3) select values from SOMETABLE Is there a possibility to read the changes from step 1 and 2 in step 3?

    Read the article

  • Regex to catch all files but those starting with "."

    - by tmslnz
    In a directory with mixed content such as: .afile .anotherfile bfile.file bnotherfile.file .afolder/ .anotherfolder/ bfolder/ bnotherfolder/ How would you catch everything but the files (not dirs) starting with .? I have tried with a negative lookahead ^(?!\.).+? but it doesn't seem to work right. Please note that I would like to avoid doing it by excluding the . by using [a-zA-Z< plus all other possible chars minus the dot >] Any suggestions?

    Read the article

  • Is it possible to make a div 50px less than 100% in CSS?

    - by Derek
    Exact duplicate > http://stackoverflow.com/questions/11103728/css-to-achieve-width100-150px > http://stackoverflow.com/questions/8877827/how-can-an-element-have-a-width-of-100-50px-using-only-css > http://stackoverflow.com/questions/651317/div-width-100-minus-fixed-amount-of-pixels > http://stackoverflow.com/questions/899107/how-can-i-do-width-100-100px-in-css Is it possible to make a div 50px less than 100% in pure CSS? I want the <div> to be only 50px less than 100%. I don't want any JavaScript.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >